summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2002-01-27 12:00:11 +0000
committerobrien <obrien@FreeBSD.org>2002-01-27 12:00:11 +0000
commit2c76fd68f4fb39c1af5cde1a8eac2bdd7b3f9909 (patch)
treed0fb877bb74b99ef3fc1c560a6340040f60f0392
parentea6b809e7d17f67670458d8b26735098ed0ec32a (diff)
parentfc89183cdc6be5afa8deb7250fd15a20832ab528 (diff)
downloadFreeBSD-src-2c76fd68f4fb39c1af5cde1a8eac2bdd7b3f9909.zip
FreeBSD-src-2c76fd68f4fb39c1af5cde1a8eac2bdd7b3f9909.tar.gz
This commit was generated by cvs2svn to compensate for changes in r89857,
which included commits to RCS files with non-trunk default branches.
-rw-r--r--contrib/binutils/ChangeLog464
-rw-r--r--contrib/binutils/MAINTAINERS27
-rw-r--r--contrib/binutils/Makefile.in217
-rw-r--r--contrib/binutils/bfd/ChangeLog5294
-rw-r--r--contrib/binutils/bfd/ChangeLog-00019592
-rw-r--r--contrib/binutils/bfd/ChangeLog-9193109
-rw-r--r--contrib/binutils/bfd/ChangeLog-949516
-rw-r--r--contrib/binutils/bfd/ChangeLog-969762
-rw-r--r--contrib/binutils/bfd/ChangeLog-989924
-rw-r--r--contrib/binutils/bfd/Makefile.am462
-rw-r--r--contrib/binutils/bfd/Makefile.in471
-rw-r--r--contrib/binutils/bfd/README2
-rw-r--r--contrib/binutils/bfd/aout-arm.c320
-rw-r--r--contrib/binutils/bfd/aout-encap.c84
-rw-r--r--contrib/binutils/bfd/aout-sparcle.c8
-rw-r--r--contrib/binutils/bfd/aout-target.h26
-rw-r--r--contrib/binutils/bfd/aout0.c8
-rw-r--r--contrib/binutils/bfd/aoutf1.h159
-rw-r--r--contrib/binutils/bfd/aoutx.h1328
-rw-r--r--contrib/binutils/bfd/archive.c254
-rw-r--r--contrib/binutils/bfd/archive64.c245
-rw-r--r--contrib/binutils/bfd/archures.c38
-rw-r--r--contrib/binutils/bfd/armnetbsd.c10
-rw-r--r--contrib/binutils/bfd/bfd-in.h162
-rw-r--r--contrib/binutils/bfd/bfd-in2.h1125
-rw-r--r--contrib/binutils/bfd/bfd.c406
-rw-r--r--contrib/binutils/bfd/binary.c37
-rw-r--r--contrib/binutils/bfd/cache.c4
-rw-r--r--contrib/binutils/bfd/coff-alpha.c133
-rw-r--r--contrib/binutils/bfd/coff-arm.c888
-rw-r--r--contrib/binutils/bfd/coff-i386.c4
-rw-r--r--contrib/binutils/bfd/coff-ia64.c27
-rw-r--r--contrib/binutils/bfd/coff-ppc.c207
-rw-r--r--contrib/binutils/bfd/coff-rs6000.c2943
-rw-r--r--contrib/binutils/bfd/coff-sparc.c15
-rw-r--r--contrib/binutils/bfd/coffcode.h860
-rw-r--r--contrib/binutils/bfd/coffgen.c307
-rw-r--r--contrib/binutils/bfd/cofflink.c271
-rw-r--r--contrib/binutils/bfd/coffswap.h808
-rwxr-xr-xcontrib/binutils/bfd/config.bfd199
-rwxr-xr-xcontrib/binutils/bfd/configure951
-rw-r--r--contrib/binutils/bfd/configure.host10
-rw-r--r--contrib/binutils/bfd/configure.in251
-rw-r--r--contrib/binutils/bfd/corefile.c4
-rw-r--r--contrib/binutils/bfd/cpu-arc.c2
-rw-r--r--contrib/binutils/bfd/cpu-i386.c8
-rw-r--r--contrib/binutils/bfd/cpu-ia64-opc.c2
-rw-r--r--contrib/binutils/bfd/cpu-powerpc.c6
-rw-r--r--contrib/binutils/bfd/demo64.c10
-rw-r--r--contrib/binutils/bfd/dep-in.sed7
-rw-r--r--contrib/binutils/bfd/doc/ChangeLog62
-rw-r--r--contrib/binutils/bfd/doc/Makefile.am88
-rw-r--r--contrib/binutils/bfd/doc/Makefile.in145
-rw-r--r--contrib/binutils/bfd/doc/bfd.texinfo20
-rw-r--r--contrib/binutils/bfd/doc/bfdint.texi21
-rw-r--r--contrib/binutils/bfd/doc/bfdsumm.texi2
-rw-r--r--contrib/binutils/bfd/doc/header.sed12
-rw-r--r--contrib/binutils/bfd/dwarf1.c62
-rw-r--r--contrib/binutils/bfd/dwarf2.c474
-rw-r--r--contrib/binutils/bfd/ecoff.c344
-rw-r--r--contrib/binutils/bfd/ecofflink.c122
-rw-r--r--contrib/binutils/bfd/ecoffswap.h439
-rw-r--r--contrib/binutils/bfd/elf-bfd.h797
-rw-r--r--contrib/binutils/bfd/elf-eh-frame.c1212
-rw-r--r--contrib/binutils/bfd/elf-strtab.c449
-rw-r--r--contrib/binutils/bfd/elf32-arc.c52
-rw-r--r--contrib/binutils/bfd/elf32-arm.h740
-rw-r--r--contrib/binutils/bfd/elf32-gen.c23
-rw-r--r--contrib/binutils/bfd/elf32-ppc.c309
-rw-r--r--contrib/binutils/bfd/elf32-sparc.c221
-rw-r--r--contrib/binutils/bfd/elf64-gen.c19
-rw-r--r--contrib/binutils/bfd/elf64-ppc.c4463
-rw-r--r--contrib/binutils/bfd/elf64-ppc.h22
-rw-r--r--contrib/binutils/bfd/elf64-sparc.c376
-rw-r--r--contrib/binutils/bfd/elf64-x86-64.c252
-rw-r--r--contrib/binutils/bfd/elfarm-nabi.c117
-rw-r--r--contrib/binutils/bfd/elfarm-oabi.c629
-rw-r--r--contrib/binutils/bfd/elfcode.h555
-rw-r--r--contrib/binutils/bfd/elfcore.h63
-rw-r--r--contrib/binutils/bfd/elflink.c57
-rw-r--r--contrib/binutils/bfd/elfxx-ia64.c828
-rw-r--r--contrib/binutils/bfd/elfxx-target.h87
-rw-r--r--contrib/binutils/bfd/format.c102
-rw-r--r--contrib/binutils/bfd/gen-aout.c9
-rw-r--r--contrib/binutils/bfd/hash.c14
-rw-r--r--contrib/binutils/bfd/host-aout.c8
-rw-r--r--contrib/binutils/bfd/i386aout.c15
-rw-r--r--contrib/binutils/bfd/i386bsd.c8
-rw-r--r--contrib/binutils/bfd/i386freebsd.c8
-rw-r--r--contrib/binutils/bfd/i386linux.c55
-rw-r--r--contrib/binutils/bfd/i386netbsd.c8
-rw-r--r--contrib/binutils/bfd/ieee.c572
-rw-r--r--contrib/binutils/bfd/ihex.c110
-rw-r--r--contrib/binutils/bfd/libaout.h344
-rw-r--r--contrib/binutils/bfd/libbfd-in.h64
-rw-r--r--contrib/binutils/bfd/libbfd.c260
-rw-r--r--contrib/binutils/bfd/libbfd.h174
-rw-r--r--contrib/binutils/bfd/libcoff-in.h108
-rw-r--r--contrib/binutils/bfd/libcoff.h608
-rw-r--r--contrib/binutils/bfd/libecoff.h11
-rw-r--r--contrib/binutils/bfd/libieee.h28
-rw-r--r--contrib/binutils/bfd/linker.c231
-rw-r--r--contrib/binutils/bfd/merge.c955
-rw-r--r--contrib/binutils/bfd/netbsd-core.c221
-rw-r--r--contrib/binutils/bfd/opncls.c105
-rw-r--r--contrib/binutils/bfd/osf-core.c92
-rw-r--r--contrib/binutils/bfd/peXXigen.c663
-rw-r--r--contrib/binutils/bfd/po/Make-in4
-rw-r--r--contrib/binutils/bfd/po/SRC-POTFILES.in22
-rw-r--r--contrib/binutils/bfd/po/bfd.pot1955
-rw-r--r--contrib/binutils/bfd/ppcboot.c40
-rw-r--r--contrib/binutils/bfd/ptrace-core.c39
-rw-r--r--contrib/binutils/bfd/reloc.c567
-rw-r--r--contrib/binutils/bfd/reloc16.c26
-rw-r--r--contrib/binutils/bfd/sco5-core.c115
-rw-r--r--contrib/binutils/bfd/section.c392
-rw-r--r--contrib/binutils/bfd/sparclinux.c45
-rw-r--r--contrib/binutils/bfd/sparcnetbsd.c8
-rw-r--r--contrib/binutils/bfd/srec.c97
-rw-r--r--contrib/binutils/bfd/stabs.c211
-rw-r--r--contrib/binutils/bfd/sunos.c199
-rw-r--r--contrib/binutils/bfd/syms.c98
-rw-r--r--contrib/binutils/bfd/sysdep.h6
-rw-r--r--contrib/binutils/bfd/targets.c550
-rw-r--r--contrib/binutils/bfd/targmatch.sed1
-rw-r--r--contrib/binutils/bfd/tekhex.c80
-rw-r--r--contrib/binutils/bfd/trad-core.c41
-rw-r--r--contrib/binutils/bfd/version.h1
-rw-r--r--contrib/binutils/binutils/ChangeLog1111
-rw-r--r--contrib/binutils/binutils/ChangeLog-919711
-rw-r--r--contrib/binutils/binutils/MAINTAINERS149
-rw-r--r--contrib/binutils/binutils/Makefile.am243
-rw-r--r--contrib/binutils/binutils/Makefile.in452
-rw-r--r--contrib/binutils/binutils/NEWS25
-rw-r--r--contrib/binutils/binutils/README71
-rw-r--r--contrib/binutils/binutils/aclocal.m418
-rw-r--r--contrib/binutils/binutils/addr2line.c34
-rw-r--r--contrib/binutils/binutils/ar.c30
-rw-r--r--contrib/binutils/binutils/arlex.l6
-rw-r--r--contrib/binutils/binutils/arsup.c3
-rw-r--r--contrib/binutils/binutils/arsup.h50
-rw-r--r--contrib/binutils/binutils/bucomm.c64
-rw-r--r--contrib/binutils/binutils/bucomm.h2
-rw-r--r--contrib/binutils/binutils/coffdump.c205
-rw-r--r--contrib/binutils/binutils/coffgrok.c18
-rw-r--r--contrib/binutils/binutils/coffgrok.h2
-rw-r--r--contrib/binutils/binutils/config.in18
-rwxr-xr-xcontrib/binutils/binutils/configure1145
-rw-r--r--contrib/binutils/binutils/configure.in34
-rw-r--r--contrib/binutils/binutils/defparse.y6
-rw-r--r--contrib/binutils/binutils/dlltool.c83
-rw-r--r--contrib/binutils/binutils/dllwrap.c18
-rw-r--r--contrib/binutils/binutils/doc/Makefile.am161
-rw-r--r--contrib/binutils/binutils/doc/Makefile.in557
-rw-r--r--contrib/binutils/binutils/doc/binutils.texi3832
-rw-r--r--contrib/binutils/binutils/objcopy.c355
-rw-r--r--contrib/binutils/binutils/objdump.c261
-rw-r--r--contrib/binutils/binutils/po/binutils.pot1713
-rw-r--r--contrib/binutils/binutils/rclex.l14
-rw-r--r--contrib/binutils/binutils/rcparse.y19
-rw-r--r--contrib/binutils/binutils/readelf.c2709
-rw-r--r--contrib/binutils/binutils/resrc.c22
-rw-r--r--contrib/binutils/binutils/resres.c6
-rw-r--r--contrib/binutils/binutils/size.c148
-rw-r--r--contrib/binutils/binutils/srconv.c428
-rw-r--r--contrib/binutils/binutils/stabs.c52
-rw-r--r--contrib/binutils/binutils/sysdump.c188
-rw-r--r--contrib/binutils/binutils/sysinfo.y8
-rw-r--r--contrib/binutils/binutils/unwind-ia64.c74
-rw-r--r--contrib/binutils/binutils/version.c11
-rw-r--r--contrib/binutils/binutils/wrstabs.c6
-rwxr-xr-xcontrib/binutils/config.guess457
-rw-r--r--contrib/binutils/config.if4
-rwxr-xr-xcontrib/binutils/config.sub205
-rw-r--r--contrib/binutils/config/ChangeLog7
-rwxr-xr-xcontrib/binutils/configure74
-rw-r--r--contrib/binutils/configure.in183
-rw-r--r--contrib/binutils/gas/CONTRIBUTORS2
-rw-r--r--contrib/binutils/gas/ChangeLog5435
-rw-r--r--contrib/binutils/gas/ChangeLog-00017703
-rw-r--r--contrib/binutils/gas/ChangeLog-9295225
-rw-r--r--contrib/binutils/gas/ChangeLog-969740
-rw-r--r--contrib/binutils/gas/ChangeLog-989974
-rw-r--r--contrib/binutils/gas/Makefile.am1953
-rw-r--r--contrib/binutils/gas/Makefile.in2025
-rw-r--r--contrib/binutils/gas/NEWS17
-rw-r--r--contrib/binutils/gas/README32
-rw-r--r--contrib/binutils/gas/app.c31
-rw-r--r--contrib/binutils/gas/as.c26
-rw-r--r--contrib/binutils/gas/as.h20
-rw-r--r--contrib/binutils/gas/atof-generic.c16
-rw-r--r--contrib/binutils/gas/bit_fix.h6
-rw-r--r--contrib/binutils/gas/cgen.c165
-rw-r--r--contrib/binutils/gas/cgen.h13
-rw-r--r--contrib/binutils/gas/cond.c8
-rw-r--r--contrib/binutils/gas/config.in10
-rw-r--r--contrib/binutils/gas/config/e-i386aout.c2
-rw-r--r--contrib/binutils/gas/config/e-i386coff.c2
-rw-r--r--contrib/binutils/gas/config/e-i386elf.c2
-rw-r--r--contrib/binutils/gas/config/obj-aout.c4
-rw-r--r--contrib/binutils/gas/config/obj-coff.c103
-rw-r--r--contrib/binutils/gas/config/obj-coff.h7
-rw-r--r--contrib/binutils/gas/config/obj-ecoff.c72
-rw-r--r--contrib/binutils/gas/config/obj-elf.c392
-rw-r--r--contrib/binutils/gas/config/obj-elf.h28
-rw-r--r--contrib/binutils/gas/config/obj-ieee.c5
-rw-r--r--contrib/binutils/gas/config/tc-alpha.c1469
-rw-r--r--contrib/binutils/gas/config/tc-alpha.h30
-rw-r--r--contrib/binutils/gas/config/tc-arc.c50
-rw-r--r--contrib/binutils/gas/config/tc-arc.h8
-rw-r--r--contrib/binutils/gas/config/tc-arm.c6129
-rw-r--r--contrib/binutils/gas/config/tc-arm.h6
-rw-r--r--contrib/binutils/gas/config/tc-ia64.c432
-rw-r--r--contrib/binutils/gas/config/tc-ia64.h25
-rw-r--r--contrib/binutils/gas/config/tc-ppc.c1348
-rw-r--r--contrib/binutils/gas/config/tc-ppc.h71
-rw-r--r--contrib/binutils/gas/config/tc-sparc.c276
-rw-r--r--contrib/binutils/gas/config/tc-sparc.h12
-rw-r--r--contrib/binutils/gas/depend.c24
-rw-r--r--contrib/binutils/gas/doc/Makefile.am29
-rw-r--r--contrib/binutils/gas/doc/Makefile.in30
-rw-r--r--contrib/binutils/gas/doc/all.texi4
-rw-r--r--contrib/binutils/gas/doc/as.texinfo1052
-rw-r--r--contrib/binutils/gas/doc/c-arm.texi164
-rw-r--r--contrib/binutils/gas/doc/c-ppc.texi95
-rw-r--r--contrib/binutils/gas/doc/internals.texi67
-rw-r--r--contrib/binutils/gas/dwarf2dbg.c34
-rw-r--r--contrib/binutils/gas/ecoff.c64
-rw-r--r--contrib/binutils/gas/ehopt.c4
-rw-r--r--contrib/binutils/gas/emul-target.h23
-rw-r--r--contrib/binutils/gas/emul.h35
-rw-r--r--contrib/binutils/gas/expr.c93
-rw-r--r--contrib/binutils/gas/frags.c2
-rw-r--r--contrib/binutils/gas/frags.h20
-rw-r--r--contrib/binutils/gas/gasp.c54
-rw-r--r--contrib/binutils/gas/hash.c6
-rw-r--r--contrib/binutils/gas/input-file.c111
-rw-r--r--contrib/binutils/gas/input-scrub.c2
-rw-r--r--contrib/binutils/gas/itbl-lex.l3
-rw-r--r--contrib/binutils/gas/itbl-ops.c13
-rw-r--r--contrib/binutils/gas/listing.c22
-rw-r--r--contrib/binutils/gas/macro.c88
-rw-r--r--contrib/binutils/gas/output-file.c46
-rw-r--r--contrib/binutils/gas/po/POTFILES.in10
-rw-r--r--contrib/binutils/gas/po/gas.pot5182
-rw-r--r--contrib/binutils/gas/read.c346
-rw-r--r--contrib/binutils/gas/read.h2
-rw-r--r--contrib/binutils/gas/stabs.c47
-rw-r--r--contrib/binutils/gas/struc-symbol.h12
-rw-r--r--contrib/binutils/gas/subsegs.c4
-rw-r--r--contrib/binutils/gas/symbols.c258
-rw-r--r--contrib/binutils/gas/symbols.h3
-rw-r--r--contrib/binutils/gas/tc.h7
-rw-r--r--contrib/binutils/gas/write.c303
-rw-r--r--contrib/binutils/gas/write.h4
-rw-r--r--contrib/binutils/include/ChangeLog274
-rw-r--r--contrib/binutils/include/ansidecl.h312
-rw-r--r--contrib/binutils/include/aout/ChangeLog24
-rw-r--r--contrib/binutils/include/aout/aout64.h75
-rw-r--r--contrib/binutils/include/aout/sun4.h20
-rw-r--r--contrib/binutils/include/bfdlink.h35
-rw-r--r--contrib/binutils/include/coff/ChangeLog110
-rw-r--r--contrib/binutils/include/coff/alpha.h16
-rw-r--r--contrib/binutils/include/coff/arm.h223
-rw-r--r--contrib/binutils/include/coff/external.h254
-rw-r--r--contrib/binutils/include/coff/i386.h195
-rw-r--r--contrib/binutils/include/coff/ia64.h162
-rw-r--r--contrib/binutils/include/coff/internal.h82
-rw-r--r--contrib/binutils/include/coff/powerpc.h175
-rw-r--r--contrib/binutils/include/coff/rs6000.h72
-rw-r--r--contrib/binutils/include/coff/rs6k64.h70
-rw-r--r--contrib/binutils/include/coff/sh.h209
-rw-r--r--contrib/binutils/include/coff/sparc.h85
-rw-r--r--contrib/binutils/include/coff/ti.h219
-rw-r--r--contrib/binutils/include/demangle.h45
-rw-r--r--contrib/binutils/include/dis-asm.h39
-rw-r--r--contrib/binutils/include/dyn-string.h8
-rw-r--r--contrib/binutils/include/elf/ChangeLog151
-rw-r--r--contrib/binutils/include/elf/alpha.h26
-rw-r--r--contrib/binutils/include/elf/arm.h51
-rw-r--r--contrib/binutils/include/elf/common.h46
-rw-r--r--contrib/binutils/include/elf/cris.h54
-rw-r--r--contrib/binutils/include/elf/dwarf2.h55
-rw-r--r--contrib/binutils/include/elf/external.h4
-rw-r--r--contrib/binutils/include/elf/h8.h96
-rw-r--r--contrib/binutils/include/elf/ia64.h22
-rw-r--r--contrib/binutils/include/elf/internal.h36
-rw-r--r--contrib/binutils/include/elf/mips.h2
-rw-r--r--contrib/binutils/include/elf/mmix.h151
-rw-r--r--contrib/binutils/include/elf/openrisc.h39
-rw-r--r--contrib/binutils/include/elf/ppc.h77
-rw-r--r--contrib/binutils/include/elf/s390.h73
-rw-r--r--contrib/binutils/include/elf/x86-64.h2
-rw-r--r--contrib/binutils/include/elf/xstormy16.h53
-rw-r--r--contrib/binutils/include/fibheap.h81
-rw-r--r--contrib/binutils/include/filenames.h4
-rw-r--r--contrib/binutils/include/floatformat.h10
-rw-r--r--contrib/binutils/include/hashtab.h3
-rw-r--r--contrib/binutils/include/libiberty.h84
-rw-r--r--contrib/binutils/include/objalloc.h11
-rw-r--r--contrib/binutils/include/opcode/ChangeLog275
-rw-r--r--contrib/binutils/include/opcode/alpha.h8
-rw-r--r--contrib/binutils/include/opcode/arc.h6
-rw-r--r--contrib/binutils/include/opcode/cgen.h57
-rw-r--r--contrib/binutils/include/opcode/i386.h9
-rw-r--r--contrib/binutils/include/opcode/ppc.h19
-rw-r--r--contrib/binutils/include/partition.h8
-rw-r--r--contrib/binutils/include/safe-ctype.h7
-rw-r--r--contrib/binutils/include/sort.h8
-rw-r--r--contrib/binutils/include/splay-tree.h12
-rw-r--r--contrib/binutils/include/ternary.h51
-rw-r--r--contrib/binutils/include/xregex.h28
-rw-r--r--contrib/binutils/include/xregex2.h565
-rw-r--r--contrib/binutils/ld/ChangeLog1774
-rw-r--r--contrib/binutils/ld/ChangeLog-9197225
-rw-r--r--contrib/binutils/ld/ChangeLog-989914
-rw-r--r--contrib/binutils/ld/Makefile.am257
-rw-r--r--contrib/binutils/ld/NEWS9
-rw-r--r--contrib/binutils/ld/README2
-rw-r--r--contrib/binutils/ld/aclocal.m418
-rw-r--r--contrib/binutils/ld/config.in215
-rwxr-xr-xcontrib/binutils/ld/configure1032
-rw-r--r--contrib/binutils/ld/configure.in4
-rw-r--r--contrib/binutils/ld/deffilep.y27
-rw-r--r--contrib/binutils/ld/emulparams/armelf.sh7
-rw-r--r--contrib/binutils/ld/emulparams/armelf_nbsd.sh6
-rw-r--r--contrib/binutils/ld/emulparams/armelf_oabi.sh5
-rw-r--r--contrib/binutils/ld/emulparams/elf32_sparc.sh1
-rw-r--r--contrib/binutils/ld/emulparams/elf32b4300.sh33
-rw-r--r--contrib/binutils/ld/emulparams/elf32l4300.sh27
-rw-r--r--contrib/binutils/ld/emulparams/elf32lppc.sh21
-rw-r--r--contrib/binutils/ld/emulparams/elf32lppcsim.sh18
-rw-r--r--contrib/binutils/ld/emulparams/elf32ppc.sh15
-rw-r--r--contrib/binutils/ld/emulparams/elf32ppclinux.sh24
-rw-r--r--contrib/binutils/ld/emulparams/elf32ppcsim.sh18
-rw-r--r--contrib/binutils/ld/emulparams/elf64_ia64.sh11
-rw-r--r--contrib/binutils/ld/emulparams/elf64_sparc.sh1
-rw-r--r--contrib/binutils/ld/emulparams/elf64alpha_nbsd.sh2
-rw-r--r--contrib/binutils/ld/emulparams/elf64lppc.sh3
-rw-r--r--contrib/binutils/ld/emulparams/elf64ppc.sh29
-rw-r--r--contrib/binutils/ld/emulparams/elf_i386.sh3
-rw-r--r--contrib/binutils/ld/emulparams/elf_i386_chaos.sh3
-rw-r--r--contrib/binutils/ld/emulparams/elf_i386_ldso.sh12
-rw-r--r--contrib/binutils/ld/emulparams/elf_x86_64.sh3
-rw-r--r--contrib/binutils/ld/emulparams/i386moss.sh2
-rw-r--r--contrib/binutils/ld/emulparams/i386nw.sh2
-rw-r--r--contrib/binutils/ld/emulparams/sh.sh3
-rw-r--r--contrib/binutils/ld/emultempl/armcoff.em3
-rw-r--r--contrib/binutils/ld/emultempl/armelf.em9
-rw-r--r--contrib/binutils/ld/emultempl/armelf_oabi.em3
-rw-r--r--contrib/binutils/ld/emultempl/generic.em61
-rw-r--r--contrib/binutils/ld/emultempl/linux.em15
-rw-r--r--contrib/binutils/ld/emultempl/pe.em494
-rw-r--r--contrib/binutils/ld/emultempl/ppc64elf.em99
-rw-r--r--contrib/binutils/ld/emultempl/vanilla.em7
-rw-r--r--contrib/binutils/ld/gen-doc.texi1
-rwxr-xr-xcontrib/binutils/ld/genscripts.sh71
-rw-r--r--contrib/binutils/ld/ld.h21
-rw-r--r--contrib/binutils/ld/ld.texinfo756
-rw-r--r--contrib/binutils/ld/ldcref.c151
-rw-r--r--contrib/binutils/ld/ldctor.c7
-rw-r--r--contrib/binutils/ld/ldemul.c11
-rw-r--r--contrib/binutils/ld/ldemul.h6
-rw-r--r--contrib/binutils/ld/ldexp.c102
-rw-r--r--contrib/binutils/ld/ldfile.c14
-rw-r--r--contrib/binutils/ld/ldgram.y68
-rw-r--r--contrib/binutils/ld/ldint.texinfo122
-rw-r--r--contrib/binutils/ld/ldlang.c718
-rw-r--r--contrib/binutils/ld/ldlang.h11
-rw-r--r--contrib/binutils/ld/ldlex.l26
-rw-r--r--contrib/binutils/ld/ldmain.c97
-rw-r--r--contrib/binutils/ld/ldmisc.c108
-rw-r--r--contrib/binutils/ld/ldmisc.h19
-rw-r--r--contrib/binutils/ld/ldver.c18
-rw-r--r--contrib/binutils/ld/ldver.h2
-rw-r--r--contrib/binutils/ld/lexsup.c148
-rw-r--r--contrib/binutils/ld/mri.c17
-rw-r--r--contrib/binutils/ld/pe-dll.c1046
-rw-r--r--contrib/binutils/ld/pe-dll.h6
-rw-r--r--contrib/binutils/ld/po/ld.pot890
-rw-r--r--contrib/binutils/ld/scripttempl/armaout.sc6
-rw-r--r--contrib/binutils/ld/scripttempl/armcoff.sc26
-rw-r--r--contrib/binutils/ld/scripttempl/elf.sc310
-rw-r--r--contrib/binutils/ld/scripttempl/nw.sc7
-rw-r--r--contrib/binutils/ld/scripttempl/pe.sc4
-rw-r--r--contrib/binutils/libiberty/ChangeLog656
-rw-r--r--contrib/binutils/libiberty/Makefile.in306
-rw-r--r--contrib/binutils/libiberty/_doprnt.c303
-rw-r--r--contrib/binutils/libiberty/aclocal.m455
-rw-r--r--contrib/binutils/libiberty/alloca.c101
-rw-r--r--contrib/binutils/libiberty/argv.c120
-rw-r--r--contrib/binutils/libiberty/asprintf.c44
-rw-r--r--contrib/binutils/libiberty/atexit.c10
-rw-r--r--contrib/binutils/libiberty/basename.c16
-rw-r--r--contrib/binutils/libiberty/bcmp.c27
-rw-r--r--contrib/binutils/libiberty/bcopy.c16
-rw-r--r--contrib/binutils/libiberty/bsearch.c17
-rw-r--r--contrib/binutils/libiberty/bzero.c14
-rw-r--r--contrib/binutils/libiberty/calloc.c11
-rw-r--r--contrib/binutils/libiberty/choose-temp.c163
-rw-r--r--contrib/binutils/libiberty/clock.c12
-rw-r--r--contrib/binutils/libiberty/concat.c239
-rw-r--r--contrib/binutils/libiberty/config.in48
-rw-r--r--contrib/binutils/libiberty/config.table1
-rwxr-xr-xcontrib/binutils/libiberty/configure878
-rw-r--r--contrib/binutils/libiberty/configure.in115
-rw-r--r--contrib/binutils/libiberty/copying-lib.texi565
-rw-r--r--contrib/binutils/libiberty/copysign.c12
-rw-r--r--contrib/binutils/libiberty/cp-demangle.c348
-rw-r--r--contrib/binutils/libiberty/cplus-dem.c88
-rw-r--r--contrib/binutils/libiberty/fdmatch.c32
-rw-r--r--contrib/binutils/libiberty/ffs.c27
-rw-r--r--contrib/binutils/libiberty/fibheap.c523
-rw-r--r--contrib/binutils/libiberty/floatformat.c54
-rw-r--r--contrib/binutils/libiberty/fnmatch.txh48
-rw-r--r--contrib/binutils/libiberty/functions.texi937
-rw-r--r--contrib/binutils/libiberty/gather-docs128
-rw-r--r--contrib/binutils/libiberty/getcwd.c24
-rw-r--r--contrib/binutils/libiberty/getopt.c2
-rw-r--r--contrib/binutils/libiberty/getpagesize.c18
-rw-r--r--contrib/binutils/libiberty/getpwd.c12
-rw-r--r--contrib/binutils/libiberty/getruntime.c12
-rw-r--r--contrib/binutils/libiberty/hashtab.c112
-rw-r--r--contrib/binutils/libiberty/hex.c100
-rw-r--r--contrib/binutils/libiberty/index.c12
-rw-r--r--contrib/binutils/libiberty/insque.c31
-rw-r--r--contrib/binutils/libiberty/lbasename.c37
-rw-r--r--contrib/binutils/libiberty/libiberty.texi324
-rw-r--r--contrib/binutils/libiberty/maint-tool278
-rw-r--r--contrib/binutils/libiberty/make-temp-file.c179
-rw-r--r--contrib/binutils/libiberty/md5.c136
-rw-r--r--contrib/binutils/libiberty/memchr.c41
-rw-r--r--contrib/binutils/libiberty/memcmp.c17
-rw-r--r--contrib/binutils/libiberty/memcpy.c13
-rw-r--r--contrib/binutils/libiberty/memmove.c12
-rw-r--r--contrib/binutils/libiberty/memset.c11
-rw-r--r--contrib/binutils/libiberty/mkstemps.c27
-rw-r--r--contrib/binutils/libiberty/obstack.c2
-rw-r--r--contrib/binutils/libiberty/obstacks.texi758
-rw-r--r--contrib/binutils/libiberty/partition.c4
-rw-r--r--contrib/binutils/libiberty/pexecute.c81
-rw-r--r--contrib/binutils/libiberty/putenv.c19
-rw-r--r--contrib/binutils/libiberty/random.c18
-rw-r--r--contrib/binutils/libiberty/regex.c8373
-rw-r--r--contrib/binutils/libiberty/rename.c11
-rw-r--r--contrib/binutils/libiberty/rindex.c12
-rw-r--r--contrib/binutils/libiberty/setenv.c24
-rw-r--r--contrib/binutils/libiberty/sigsetmask.c13
-rw-r--r--contrib/binutils/libiberty/spaces.c18
-rw-r--r--contrib/binutils/libiberty/splay-tree.c36
-rw-r--r--contrib/binutils/libiberty/strcasecmp.c12
-rw-r--r--contrib/binutils/libiberty/strchr.c18
-rw-r--r--contrib/binutils/libiberty/strdup.c11
-rw-r--r--contrib/binutils/libiberty/strerror.c125
-rw-r--r--contrib/binutils/libiberty/strncasecmp.c12
-rw-r--r--contrib/binutils/libiberty/strncmp.c11
-rw-r--r--contrib/binutils/libiberty/strrchr.c22
-rw-r--r--contrib/binutils/libiberty/strsignal.c135
-rw-r--r--contrib/binutils/libiberty/strstr.c22
-rw-r--r--contrib/binutils/libiberty/strtod.c15
-rw-r--r--contrib/binutils/libiberty/strtol.c19
-rw-r--r--contrib/binutils/libiberty/ternary.c166
-rw-r--r--contrib/binutils/libiberty/tmpnam.c14
-rw-r--r--contrib/binutils/libiberty/vasprintf.c40
-rw-r--r--contrib/binutils/libiberty/vfork.c10
-rw-r--r--contrib/binutils/libiberty/vprintf.c17
-rw-r--r--contrib/binutils/libiberty/vsprintf.c6
-rw-r--r--contrib/binutils/libiberty/waitpid.c12
-rw-r--r--contrib/binutils/libiberty/xatexit.c14
-rw-r--r--contrib/binutils/libiberty/xexit.c12
-rw-r--r--contrib/binutils/libiberty/xmalloc.c43
-rw-r--r--contrib/binutils/libiberty/xmemdup.c13
-rw-r--r--contrib/binutils/libiberty/xstrdup.c11
-rw-r--r--contrib/binutils/libiberty/xstrerror.c11
-rw-r--r--contrib/binutils/libtool.m4234
-rw-r--r--contrib/binutils/ltcf-c.sh306
-rw-r--r--contrib/binutils/ltcf-cxx.sh398
-rw-r--r--contrib/binutils/ltcf-gcj.sh212
-rwxr-xr-xcontrib/binutils/ltconfig387
-rw-r--r--contrib/binutils/ltmain.sh1011
-rw-r--r--contrib/binutils/opcodes/ChangeLog1105
-rw-r--r--contrib/binutils/opcodes/ChangeLog-929716
-rw-r--r--contrib/binutils/opcodes/ChangeLog-9899118
-rw-r--r--contrib/binutils/opcodes/Makefile.am248
-rw-r--r--contrib/binutils/opcodes/Makefile.in248
-rw-r--r--contrib/binutils/opcodes/aclocal.m418
-rw-r--r--contrib/binutils/opcodes/alpha-dis.c38
-rw-r--r--contrib/binutils/opcodes/alpha-opc.c8
-rw-r--r--contrib/binutils/opcodes/arc-dis.c415
-rw-r--r--contrib/binutils/opcodes/arc-ext.c73
-rw-r--r--contrib/binutils/opcodes/arc-opc.c9
-rw-r--r--contrib/binutils/opcodes/arm-dis.c133
-rw-r--r--contrib/binutils/opcodes/arm-opc.h176
-rw-r--r--contrib/binutils/opcodes/cgen-asm.c38
-rw-r--r--contrib/binutils/opcodes/cgen-asm.in168
-rw-r--r--contrib/binutils/opcodes/cgen-dis.c63
-rw-r--r--contrib/binutils/opcodes/cgen-dis.in96
-rw-r--r--contrib/binutils/opcodes/cgen-ibld.in72
-rw-r--r--contrib/binutils/opcodes/cgen-opc.c81
-rw-r--r--contrib/binutils/opcodes/config.in3
-rwxr-xr-xcontrib/binutils/opcodes/configure1022
-rw-r--r--contrib/binutils/opcodes/configure.in12
-rw-r--r--contrib/binutils/opcodes/dis-buf.c4
-rw-r--r--contrib/binutils/opcodes/disassemble.c36
-rw-r--r--contrib/binutils/opcodes/i386-dis.c205
-rw-r--r--contrib/binutils/opcodes/ia64-gen.c18
-rw-r--r--contrib/binutils/opcodes/ia64-opc.c24
-rw-r--r--contrib/binutils/opcodes/po/POTFILES.in21
-rw-r--r--contrib/binutils/opcodes/po/opcodes.pot181
-rw-r--r--contrib/binutils/opcodes/ppc-dis.c54
-rw-r--r--contrib/binutils/opcodes/ppc-opc.c1658
-rw-r--r--contrib/binutils/opcodes/sh-dis.c9
-rw-r--r--contrib/binutils/opcodes/sh-opc.h2
-rwxr-xr-xcontrib/binutils/symlink-tree4
514 files changed, 100867 insertions, 42731 deletions
diff --git a/contrib/binutils/ChangeLog b/contrib/binutils/ChangeLog
index f6aa08d..03b39e0 100644
--- a/contrib/binutils/ChangeLog
+++ b/contrib/binutils/ChangeLog
@@ -1,3 +1,195 @@
+2002-01-26 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * configure.in (*-*-netbsd*): New. Skip target-newlib,
+ target-libiberty, and target-libgloss. Skip Java-related
+ libraries if not supported for NetBSD on target CPU.
+
+2002-01-23 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * configure.in: Import StrongARM and XScale target_configdirs from
+ FSF GCC version.
+
+2002-01-16 H.J. Lu (hjl@gnu.org)
+
+ * config.guess: Import from master sources, rev 1.225.
+ * config.sub: Import from master sources, rev 1.238.
+
+ * MAINTAINERS: Updated notes on config.guess and config.sub.
+
+2002-01-11 Steve Ellcey <sje@cup.hp.com>
+
+ * configure.in (ia64*-*-hpux*): New target for IA64 HP-UX,
+ ld and gdb are not supported.
+
+2002-01-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ * Change reference to Cygnus Solutions to be Red Hat.
+
+2002-01-07 Jeff Johnston <jjohnstn@redhat.com>
+
+ * COPYING.NEWLIB: Update generic copyright date.
+
+2002-01-07 Mark Salter <msalter@redhat.com>
+
+ * configure.in: Remove target-bsp and target-cygmon from arm builds.
+ Allow target-libgloss to be built for arm, strongarm, and xscale.
+
+2002-01-03 Ben Elliston <bje@redhat.com>
+
+ * MAINTAINERS: Update URL for config.* scripts.
+
+2001-12-18 Alan Modra <amodra@bigpond.net.au>
+
+ * config.sub: Import latest version.
+ * config.guess: Likewise.
+
+2001-12-13 Thomas Fitzsimmons <fitzsim@redhat.com>
+
+ * configure.in (FLAGS_FOR_TARGET): Remove -nostdinc and -isystem
+ options for i[3456]86-pc-linux* native builds.
+
+2001-12-05 Laurent Guerby <guerby@acm.org>
+
+ * MAINTAINERS: gcc adopts symlink-tree, refer more to
+ libiberty.
+
+ Import this patch from gcc:
+
+ 2000-12-09 Laurynas Biveinis <lauras@softhome.net>
+
+ * symlink-tree: handle DOS-style absolute paths.
+
+2001-11-28 DJ Delorie <dj@redhat.com>
+ Zack Weinberg <zack@codesourcery.com>
+
+ When build != host, create libiberty for the build machine.
+
+ * Makefile.in (TARGET_CONFIGARGS, BUILD_CONFIGARGS): Replace
+ CONFIG_ARGUMENTS.
+ (ALL_BUILD_MODULES_LIST, BUILD_CONFIGDIRS, BUILD_SUBDIR):
+ New variables.
+ (ALL_BUILD_MODULES, CONFIGURE_BUILD_MODULES): New variables
+ and rules.
+ (all.normal): Depend on ALL_BUILD_MODULES.
+ (CONFIGURE_TARGET_MODULES rule): Use TARGET_CONFIGARGS.
+ (all-build-libiberty): Depend on configure-build-libiberty.
+
+ * configure: Calculate and substitute proper value for
+ ALL_BUILD_MODULES.
+ * configure.in: Create the build subdirectory.
+ Calculate and substitute TARGET_CONFIGARGS (formerly
+ CONFIG_ARGUMENTS); also BUILD_SUBDIR and BUILD_CONFIGARGS (new).
+
+2001-11-26 Geoffrey Keating <geoffk@redhat.com>
+
+ * config.sub: Update to version 1.232 on subversion.
+
+2001-11-20 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * Makefile.in (do-proto-toplev): Use msgfmt to generate .gmo
+ files from .po files for a distribution.
+
+2001-11-19 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * COPYING.NEWLIB: Mention preserved notice in specific parts.
+
+2001-11-13 Jeff Holcomb <jeffh@redhat.com>
+
+ Merged from net gcc:
+ 2001-07-30 Jeff Sturm <jsturm@one-pont.com>
+ * ltcf-c.sh: Use $objext, not $ac_objext.
+ 2001-07-27 Mark Kettenis <kettenis@gnu.org>
+ * ltcf-cxx.sh: Add support for GNU.
+ 2001-07-22 Timothy Wall <twall@redhat.com>
+ * ltcf-c.sh: Don't disable shared libraries for AIX5/IA64. Preserve
+ default settings if using GNU tools with that configuration.
+ * ltcf-cxx.sh: Ditto.
+ * ltcf-gcj.sh: Ditto.
+ 2001-07-21 Michael Chastain <chastain@redhat.com>
+ * ltconfig: Set max_cmd_len to a maximum of 512Kb, as it seems some
+ HPUX 11.0 systems have trouble with 1MB. Mark as gcc-local.
+ * ltmain.sh: Mark as gcc-local.
+
+2001-11-13 Jeff Holcomb <jeffh@redhat.com>
+
+ * Makefile.in (all-bison): Revert 2001-10-24.
+ Don't depend on texinfo.
+
+2001-11-12 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * COPYING.NEWLIB: Add BSD-style license/copyright blurb for my work.
+
+2001-11-08 Phil Edwards <pedwards@disaster.jaj.com>
+
+ * configure.in (--enable-languages): Be more permissive about
+ syntax. Check for empty lists better. Warn about $LANGUAGES.
+
+2001-11-06 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * Makefile.in (MAKEINFO): Use "missing" for makeinfo older than 4.0.
+
+2001-10-24 Jeff Holcomb <jeffh@redhat.com>
+
+ Makefile.in (all-bison): Don't depend on texinfo.
+
+2001-10-03 Alan Modra <amodra@bigpond.net.au>
+
+ * gettext.m4: Test po/POTFILES.in exists before trying to read.
+
+2001-09-29 Alexandre Oliva <aoliva@redhat.com>
+
+ * Makefile.in (configure-target-gperf): Depend on $(ALL_GCC_CXX).
+
+2001-09-28 Hans-Peter Nilsson <hp@axis.com>
+
+ * config.sub, config.guess: Import latest from subversions.
+
+2001-09-21 Alexandre Oliva <aoliva@redhat.com>
+
+ * Makefile.in (AS_FOR_TARGET, LD_FOR_TARGET,
+ DLLTOOL_FOR_TARGET, WINDRES_FOR_TARGET, AR_FOR_TARGET,
+ RANLIB_FOR_TARGET, NM_FOR_TARGET): Don't use double quotes to
+ avoid quotes nesting problems.
+ (NATIVE_CHECK_MODULES): Ditto, just for consistency.
+ (DO_X): Export only variables that are set.
+
+2001-09-19 Ben Elliston <bje@redhat.com>
+
+ * configure.in (sparc-sun-solaris2*): Don't use /usr/bin/which on
+ Solaris when testing for the /usr/ucb/cc compiler; it has incorrect
+ semantics. Use the shell built-in "type" command instead.
+
+2001-09-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config.sub: Reverted the earlier change, this version is not the
+ master file.
+
+2001-09-14 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config.sub: Change machine triplets from mipsel*-* to mips*el-*.
+ Add support for mips64.
+
+2001-09-03 Jeff Holcomb <jeffh@redhat.com>
+
+ * configure.in: Enable libstdc++-v3 for h8300 targets.
+
+2001-08-30 Eric Christopher <echristo@redhat.com>
+ Jason Eckhardt <jle@redhat.com>
+
+ * config.sub: Add support for mipsisa32.
+
+2001-08-30 Eric Christopher <echristo@redhat.com>
+
+ * config.sub, config.guess: Import latest from subversions.
+
+2001-08-20 Alan Modra <amodra@bigpond.net.au>
+
+ * config.sub, config.guess: Import latest from subversions.
+
+2001-07-26 DJ Delorie <dj@redhat.com>
+
+ * MAINTAINERS: Clarify libiberty merge rules and procedures.
+
2001-06-19 Alan Modra <amodra@bigpond.net.au>
* Makefile.in: Revert 2001-06-17.
@@ -9,21 +201,177 @@
(gas+binutils.tar.bz2): Likewise.
(binutils.tar.bz2): Pass TOOL=bfd PACKAGE=binutils to make.
-2001-06-11 Alan Modra <amodra@bigpond.net.au>
+Fri Jun 8 11:14:02 2001 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * Makefile.in (VER): When present, extract the version number from
+ the file version.in.
+
+2001-06-08 Alexandre Oliva <aoliva@redhat.com>, Jeff Sturm <jsturm@one-point.com>
+
+ * Makefile.in (AS_FOR_TARGET, LD_FOR_TARGET, NM_FOR_TARGET): If
+ gcc/xgcc is built, use -print-prog-name to find out the program
+ name to use.
+
+2001-06-04 Mark Mitchell <mark@codesourcery.com>
+
+ * ltcf-c.sh (archive_cmds, archive_expsym_cmds) [solaris,
+ with_gcc]: Use `gcc -shared' to build a shared library.
+
+2001-06-04 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * ltcf-c.sh (archive_cmd) [hpux, with_gcc]: Use gcc to link shared
+ archives.
+
+2001-05-28 Simon Patarin <simon.patarin@inria.fr>
+
+ * ltcf-cxx.sh (osf3/osf4/osf5): Support creation of C++ shared
+ libraries when using g++ with native linker.
+
+2001-05-28 Alexandre Oliva <aoliva@redhat.com>
+
+ * ltconfig, ltmain.sh: Upgrade to libtool 1.4a 1.641.2.256.
+
+2001-05-24 Tom Rix <trix@redhat.com>
+
+ * configure.in : enable ld for aix
+
+2001-05-22 Alexandre Oliva <aoliva@redhat.com>
+
+ * ltcf-cxx.sh (allow_undefined_flag, no_undefined_flag)
+ [aix4*|aix5*]: Prepend blank.
+
+2001-05-20 Alexandre Oliva <aoliva@redhat.com>
+
+ * ltconfig, ltmain.sh, libtool.m4, ltcf-c.sh, ltcf-cxx.sh,
+ ltcf-gcj.sh: Upgraded to libtool 1.4a 1.641.2.254. Rebuilt a number
+ of subdir/configure scripts to use the new libtool.m4.
+
+2001-05-14 H.J. Lu <hjl@gnu.org>
+
+ * config.if (libc_interface): Set to -libc6.2- for cross
+ compiling to Linux/glibc 2.2.
+
+2001-05-03 Alexandre Oliva <aoliva@redhat.com>
+
+ * configure.in (noconfigdirs) [*-cygwin*, *-mingw*, *-beos]: Disable
+ libgcj.
+
+2001-04-26 Alexandre Oliva <aoliva@redhat.com>
+
+ * configure.in (noconfigdirs): Don't reset it from scratch in the
+ target case; only append to it.
+
+2001-04-26 Alexandre Oliva <aoliva@redhat.com>
+
+ * configure.in (noconfigdirs) [hppa*-*-*, mips*-*-irix6*,
+ sparc-*-solaris2.8]: Disable ${libgcj}.
+
+2001-04-25 Alexandre Oliva <aoliva@redhat.com>
+
+ * configure.in (libgcj_saved): Copy from $libgcj.
+ (libgcj): Zero out if --enable-libgcj; add to noconfigdirs is
+ --disable-libgcj.
+
+2001-04-20 Alexandre Oliva <aoliva@redhat.com>
+
+ * ltconfig, ltmain.sh, ltcf-cxx.sh: Upgraded to libtool 1.4a
+ 1.641.2.228.
+
+2001-04-12 Alexandre Oliva <aoliva@redhat.com>
+
+ * ltconfig, ltmain.sh, libtool.m4, ltcf-c.sh, ltcf-cxx.sh,
+ ltcf-gcj.sh: Upgraded to libtool 1.4a 1.641.2.226.
+
+2001-04-01 Alexandre Oliva <aoliva@redhat.com>
+
+ * Makefile.in (CXX_FOR_TARGET_FOR_RECURSIVE_MAKE, RECURSE_FLAGS):
+ New macros.
+ (bootstrap, cross): Use RECURSE_FLAGS.
+ * configure.in: Subst CXX_FOR_TARGET_FOR_RECURSIVE_MAKE.
+
+2001-03-27 Alexandre Oliva <aoliva@redhat.com>
+
+ * configure.in (CXX_FOR_TARGET): Use xgcc for libstdc++-v3.
+
+2001-03-23 Nick Clifton <nickc@redhat.com>
- Merge from mainline.
- 2001-03-23 Nick Clifton <nickc@redhat.com>
* README-maintainer-mode: Add note about inability to use "make
distclean" in maintainer mode.
+2001-03-22 Alexandre Oliva <aoliva@redhat.com>
+
+ Re-installed:
+ 2001-01-02 Laurynas Biveinis <lauras@softhome.net>
+ * ltcf-c.sh: Clear ac_cv_prog_cc_pic for DJGPP. Do not add
+ '-DPIC' to ac_cv_prog_cc_pic for DJGPP.
+ * ltcf-cxx.sh: Likewise.
+ * ltcf-gcj.sh: Likewise.
+
2001-03-22 Philip Blundell <philb@gnu.org>
* config.sub, config.guess: Import latest from subversions.
+2001-03-22 Alexandre Oliva <aoliva@redhat.com>
+
+ * ltconfig, ltmain.sh, libtool.m4, ltcf-c.sh, ltcf-cxx.sh,
+ ltcf-gcj.sh: Upgraded to libtool 1.4a 1.641.2.198.
+
+2001-03-20 Michael Chastain <chastain@redhat.com>
+
+ * Makefile.in: all-m4 depends on all-texinfo.
+
+2001-03-08 Alexandre Oliva <aoliva@redhat.com>
+
+ * Makefile.in (ALL_GCC, ALL_GCC_C, ALL_GCC_CXX): Set before use.
+
+2001-02-22 Jeff Johnston <jjohnstn@redhat.com>
+
+ * COPYING.NEWLIB: Remove DJ Delorie's address because it is no
+ longer valid.
+
+2001-02-16 Nick Clifton <nickc@redhat.com>
+
+ * configure.in (noconfigdirs): Allow configuration of texinfo
+ for Cygwin hosts.
+
+2001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * config.guess: Add linux target for S/390.
+ * config.sub: Likewise.
+ * configure.in: Likewise.
+
+2001-02-06 Ben Elliston <bje@redhat.com>
+
+ * configure: Output host type to stdout, not stderr.
+
+2001-02-04 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+
+ * config.guess: Import from subversions.gnu.org (revision 1.181).
+ * config.sub: Import from subversions.gnu.org (revision 1.199).
+
2001-01-30 Alan Modra <alan@linuxcare.com.au>
* config.guess: Handle hppa64-linux systems.
+2001-01-27 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+
+ * ltcf-cxx.sh (ac_cv_prog_cc_pic_works, ac_cv_prog_cc_static_works):
+ Don't unset, it's non-portable and no longer necessary, set to empty
+ instead.
+
+2001-01-27 Michael Sokolov <msokolov@ivan.Harhan.ORG>, Alexandre Oliva <oliva@lsd.ic.unicamp.br>
+
+ * ltconfig: Shell portability fix for the tagname validity check.
+
+2001-01-27 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+
+ * ltcf-cxx.sh: Use parentheses around eval $ac_compile.
+
+2001-01-27 Alexandre Oliva <aoliva@redhat.com>
+
+ * ltcf-c.sh (ld_shlibs) [aix5*]: Disable on unknown CPU types.
+ * ltcf-cxx.sh, ltcf-gcj.sh: Likewise.
+
2001-01-24 Alexandre Oliva <aoliva@redhat.com>
* ltmain.sh (TAG disable-shared, TAG disable-static): Make sure we
@@ -86,12 +434,12 @@
or C++ library to have already been built to work properly.
(do_proto_toplev): Set them to an empty string.
-Sat Nov 18 18:57:50 2000 Alexandre Oliva <aoliva@redhat.com>
+2000-11-18 Alexandre Oliva <aoliva@redhat.com>
* Makefile.in (HOST_LIB_PATH, TARGET_LIB_PATH): New macros.
(REALLY_SET_LIB_PATH): Use them.
-Mon Nov 6 14:19:35 2000 Christopher Faylor <cgf@cygnus.com>
+2000-11-06 Christopher Faylor <cgf@cygnus.com>
* config.sub: Add support for Sun Chorus
@@ -252,7 +600,7 @@ Mon Nov 6 14:19:35 2000 Christopher Faylor <cgf@cygnus.com>
* symlink-tree: Check number of arguments.
-Thu Jul 6 15:36:55 2000 Andrew Cagney <cagney@b1.cygnus.com>
+2000-06-06 Andrew Cagney <cagney@b1.cygnus.com>
* texinfo/texinfo.tex: Update to version 2000-05-28.15.
@@ -282,11 +630,11 @@ Thu Jul 6 15:36:55 2000 Andrew Cagney <cagney@b1.cygnus.com>
* README-maintainer-mode: New file: Contains notes on using
--enable-maintainer-mode with binutils.
-Mon May 29 13:50:03 2000 Andrew Cagney <cagney@b1.cygnus.com>
+2000-05-29 Andrew Cagney <cagney@b1.cygnus.com>
* texinfo/texinfo.tex: Update. Version from makeinfo 4.0.
-Tue May 30 19:01:12 2000 Andrew Cagney <cagney@b1.cygnus.com>
+2000-05-30 Andrew Cagney <cagney@b1.cygnus.com>
* config.sub: Import CVS version 1.167 Tue May 30 09:00:07 2000.
* config.guess: Import CVS version 1.148 Tue May 30 09:00:06 2000
@@ -300,11 +648,11 @@ Tue May 30 19:01:12 2000 Andrew Cagney <cagney@b1.cygnus.com>
(GCC_FOR_TARGET): Likewise.
(CXX_FOR_TARGET): Likewise.
-Thu May 18 10:58:13 2000 Jeffrey A Law (law@cygnus.com)
+2000-05-18 Jeffrey A Law (law@cygnus.com)
* configure.in (hppa*64*-*-*): Do build ld for this configuration.
-Wed May 17 16:03:48 2000 Alexandre Oliva <aoliva@cygnus.com>
+2000-05-17 Alexandre Oliva <aoliva@cygnus.com>
* Makefile.in (configure-target-libiberty): Depend on
configure-target-newlib.
@@ -314,12 +662,12 @@ Wed May 17 16:03:48 2000 Alexandre Oliva <aoliva@cygnus.com>
* configure.in, Makefile.in: Merge all libffi-related
configury stuff from the libgcj tree.
-Tue May 16 10:06:21 2000 Andrew Cagney <cagney@b1.cygnus.com>
+2000-05-16 Andrew Cagney <cagney@b1.cygnus.com>
Thu Apr 27 11:01:48 2000 Andrew Cagney <cagney@b1.cygnus.com>:
* Makefile.in (do-tar-bz2, do-md5sum): Skip CVS directories.
-Tue May 16 09:57:35 2000 Andrew Cagney <cagney@b1.cygnus.com>
+2000-05-16 Andrew Cagney <cagney@b1.cygnus.com>
Wed Apr 26 17:03:53 2000 Andrew Cagney <cagney@b1.cygnus.com>:
* Makefile.in (do-djunpack): New target. Update djunpack.bat with
@@ -335,11 +683,11 @@ Tue May 16 09:57:35 2000 Andrew Cagney <cagney@b1.cygnus.com>
* ltmain.sh: Preserve in relink_command any environment
variables that may affect the linker behavior.
-Fri May 12 11:23:17 2000 Jeffrey A Law (law@cygnus.com)
+2000-05-12 Jeffrey A Law (law@cygnus.com)
* config.sub (basic_machine): Recognize hppa64 as a valid cpu type.
-Wed May 10 21:26:51 2000 Jim Wilson <wilson@cygnus.com>
+2000-05-10 Jim Wilson <wilson@cygnus.com>
* configure.in (ia64*-*-elf*): Add gdb and friends to noconfigdirs.
@@ -356,7 +704,7 @@ Wed May 10 21:26:51 2000 Jim Wilson <wilson@cygnus.com>
* djunpack.bat: New file.
-Wed Apr 19 12:46:26 2000 Andrew Cagney <cagney@b1.cygnus.com>
+2000-04-19 Andrew Cagney <cagney@b1.cygnus.com>
* Makefile.in (taz, gdb-taz, gas.tar.bz2, binutils.tar.bz2,
gas+binutils.tar.bz2, libg++.tar.bz2, gnats.tar.bz2, gdb.tar.bz2,
@@ -368,7 +716,7 @@ Wed Apr 19 12:46:26 2000 Andrew Cagney <cagney@b1.cygnus.com>
* config.sub (case $basic_machine): Change default for "ibm-*"
to "openedition".
-Wed Apr 12 16:42:48 2000 Andrew Cagney <cagney@b1.cygnus.com>
+2000-04-12 Andrew Cagney <cagney@b1.cygnus.com>
* Makefile.in (gdb-taz): New target. GDB specific archive.
(do-md5sum): New target.
@@ -382,7 +730,7 @@ Wed Apr 12 16:42:48 2000 Andrew Cagney <cagney@b1.cygnus.com>
(gdb.tar.bz2, dejagnu.tar.bz2, gdb+dejagnu.tar.bz2,
insight.tar.bz2): Use gdb-taz to create archive.
-Fri Apr 7 18:10:29 2000 Andrew Cagney <cagney@b1.cygnus.com>
+2000-04-07 Andrew Cagney <cagney@b1.cygnus.com>
* configure (warn_cflags): Delete.
@@ -403,7 +751,7 @@ Fri Apr 7 18:10:29 2000 Andrew Cagney <cagney@b1.cygnus.com>
* configure.in: -linux-gnu*, not -linux-gnu.
-Fri Mar 3 18:44:08 2000 Andrew Cagney <cagney@b1.cygnus.com>
+2000-03-03 Andrew Cagney <cagney@b1.cygnus.com>
* Makefile.in (taz): Set PACKAGE to TOOL when not defined.
(do-tar-bz2): Replace TOOL with PACKAGE.
@@ -424,7 +772,7 @@ Fri Mar 3 18:44:08 2000 Andrew Cagney <cagney@b1.cygnus.com>
* config.sub: Support an OS of "wince".
-Thu Feb 24 16:15:56 2000 Andrew Cagney <cagney@b1.cygnus.com>
+2000-02-24 Andrew Cagney <cagney@b1.cygnus.com>
* config.guess, config.sub: Updated to match config's 2000-02-15
version.
@@ -451,7 +799,7 @@ Thu Feb 24 16:15:56 2000 Andrew Cagney <cagney@b1.cygnus.com>
* config.sub: Add support for avr target.
-Tue Feb 1 00:07:46 2000 Hans-Peter Nilsson <hp@bitrange.com>
+2000-02-01 Hans-Peter Nilsson <hp@bitrange.com>
* config.sub: Add mmix-knuth-mmixware.
@@ -630,11 +978,11 @@ Thu Jul 8 12:32:23 1999 John David Anglin <dave@hiauly1.hia.nrc.ca>
* config.sub: Add mcore target.
-Sun May 30 16:03:16 1999 Cort Dougan <cort@cs.nmt.edu>
+1999-05-30 Cort Dougan <cort@cs.nmt.edu>
* config.guess (ppc-*-linux-gnu): Also use ld emul elf32ppclinux.
-Tue May 25 11:20:46 1999 H.J. Lu (hjl@gnu.org)
+1999-05-25 H.J. Lu (hjl@gnu.org)
* config.guess (dummy): Changed to $dummy.
@@ -651,7 +999,7 @@ Tue May 25 11:20:46 1999 H.J. Lu (hjl@gnu.org)
more accurately recorded in this ChangeLog.
* config.sub: Likewise.
-Thu May 20 10:00:42 1999 Stephen L Moshier <moshier@world.std.com>
+1999-05-20 Stephen L Moshier <moshier@world.std.com>
* Makefile.in (GCC_FOR_TARGET): Add -I$(build_tooldir)/include.
@@ -679,13 +1027,13 @@ Tue Apr 13 22:50:54 1999 Donn Terry (donn@interix.com)
* configure.in (i?86-*-beos*): Do config gperf; don't config
gdb, newlib, or libgloss.
-Sun Apr 11 23:55:34 1999 Alexandre Oliva <oliva@dcc.unicamp.br>
+1999-04-11 Alexandre Oliva <oliva@dcc.unicamp.br>
* config-ml.in: On mips*-*-*, if multidirs contains mabi=64, try to
link a trivial program with -mabi=64. If it fails, remove mabi=64
from multidirs.
-Sat Apr 10 21:50:01 1999 Philipp Thomas (kthomas@gwdg.de)
+1999-04-10 Philipp Thomas (kthomas@gwdg.de)
* config.sub: Set basic_machine to i586 when target_alias = k6-*.
@@ -765,7 +1113,7 @@ Wed Mar 10 17:39:09 1999 Drew Moseley <dmoseley@cygnus.com>
* config.sub: Rename CYGNUS LOCAL to EGCS LOCAL
-Sun Feb 28 02:20:00 1999 Geoffrey Noer <noer@cygnus.com>
+1999-02-28 Geoffrey Noer <noer@cygnus.com>
* config.sub: Check for "cygwin*" rather than "cygwin32*"
@@ -773,14 +1121,14 @@ Sun Feb 28 02:20:00 1999 Geoffrey Noer <noer@cygnus.com>
* config.sub: Fix typo in arm recognition.
-Wed Feb 24 13:51:40 1999 Drew Moseley <dmoseley@cygnus.com>
+1999-02-24 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>
+1999-02-24 Stan Shebs <shebs@andros.cygnus.com>
* configure.in (*-*-windows*): Remove, no longer used.
* config/mh-windows: Ditto.
@@ -790,11 +1138,11 @@ Wed Feb 24 12:52:17 1999 Stan Shebs <shebs@andros.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>
+1999-02-18 Marc Espie <espie@cvs.openbsd.org>
* config.guess: Recognize openbsd-*-hppa.
-Wed Feb 17 01:38:59 1999 H.J. Lu (hjl@gnu.org)
+1999-02-17 H.J. Lu (hjl@gnu.org)
* Makefile.in (REALLY_SET_LIB_PATH): Append $$$(RPATH_ENVVAR)
only if it is not empty.
@@ -811,7 +1159,7 @@ Wed Feb 17 01:38:59 1999 H.J. Lu (hjl@gnu.org)
* configure.in: Added target-bsp for sparclite.
-Mon Feb 8 14:17:24 1999 Richard Henderson <rth@cygnus.com>
+1999-02-08 Richard Henderson <rth@cygnus.com>
* config.sub: Recognize alphapca5[67] and up to alphaev8.
@@ -820,51 +1168,51 @@ Mon Feb 8 14:17:24 1999 Richard Henderson <rth@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>
+1999-02-07 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>
+1999-02-04 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>
+1999-02-02 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>
+1999-02-02 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)
+1999-01-30 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>
+1999-01-30 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>
+1999-01-18 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>
+1998-12-30 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>
+1998-12-30 Christopher Faylor <cgf@cygnus.com>
* configure.in: libtermcap.a should be built when cygwin is the
target as well as the host.
@@ -872,11 +1220,11 @@ Wed Dec 30 01:13:03 1998 Christopher Faylor <cgf@cygnus.com>
* Makefile.in: Add libtermcap target.
* config/mt-cygwin: New file. libtermcap target info.
-Wed Dec 23 00:20:50 1998 Jeffrey A Law (law@cygnus.com)
+1998-12-23 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)
+1998-12-22 Rodney Brown (rodneybrown@pmsc.com)
* config.guess: Use C code to identify more HP machines.
@@ -924,7 +1272,7 @@ 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>
+1998-11-17 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.
@@ -939,25 +1287,25 @@ Tue Nov 17 16:57:51 1998 Geoffrey Noer <noer@cygnus.com>
(INSTALL_MODULES): Added install-zip.
(CLEAN_MODULES): Added clean-zip.
-Thu Nov 12 17:27:21 1998 Geoffrey Noer <noer@cygnus.com>
+1998-11-12 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>
+1998-11-05 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>
+1998-11-04 Dave Brolley <brolley@cygnus.com>
* config.sub: Add fr30.
-Mon Nov 2 15:19:33 1998 Geoffrey Noer <noer@cygnus.com>
+1998-11-02 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*.
-Thu Oct 22 10:55:25 1998 Robert Lipe <robertl@dgii.com>
+1998-10-22 Robert Lipe <robertl@dgii.com>
* config.guess: Match any version of Unixware7.
@@ -966,16 +1314,16 @@ Thu Oct 22 10:55:25 1998 Robert Lipe <robertl@dgii.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)
+1998-10-18 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)
+1998-10-14 Jeffrey A Law (law@cygnus.com)
* Makefile.in (DEVO_SUPPORT): Add config.if.
-Tue Oct 13 15:45:36 1998 Manfred Hollstein <manfred@s-direktnet.de>
+1998-10-13 Manfred Hollstein <manfred@s-direktnet.de>
* configure: Add pattern to replace "build_tooldir"'s
definition in the generated Makefile with "tooldir"'s
@@ -7273,7 +7621,7 @@ Fri Dec 13 01:17:06 1991 K. Richard Pixley (rich at cygnus.com)
* config.subr: resync from rms.
-Wed Dec 11 22:25:20 1991 K. Richard Pixley (rich at rtl.cygnus.com)
+1991-12-11 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
@@ -7281,7 +7629,7 @@ Wed Dec 11 22:25:20 1991 K. Richard Pixley (rich at rtl.cygnus.com)
* Makefile.in: revised install for dir.info.
-Tue Dec 10 00:04:35 1991 K. Richard Pixley (rich at rtl.cygnus.com)
+1991-12-10 K. Richard Pixley (rich at rtl.cygnus.com)
* configure.in: add decstation host makefile frag.
@@ -7290,11 +7638,11 @@ Tue Dec 10 00:04:35 1991 K. Richard Pixley (rich at rtl.cygnus.com)
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)
+1991-12-09 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)
+1991-12-07 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.
@@ -7303,13 +7651,13 @@ Sat Dec 7 00:17:01 1991 K. Richard Pixley (rich at rtl.cygnus.com)
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)
+1991-12-06 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)
+1991-12-05 K. Richard Pixley (rich at rtl.cygnus.com)
* configure: +options become --options. -subdirs commented out.
added -host, -datadir. Renamed -destdir to -prefix. Comment in
@@ -7321,7 +7669,7 @@ Thu Dec 5 22:46:52 1991 K. Richard Pixley (rich at rtl.cygnus.com)
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)
+1991-11-22 K. Richard Pixley (rich at rtl.cygnus.com)
* Freshly created ChangeLog.
diff --git a/contrib/binutils/MAINTAINERS b/contrib/binutils/MAINTAINERS
index 16dab80..75f3240 100644
--- a/contrib/binutils/MAINTAINERS
+++ b/contrib/binutils/MAINTAINERS
@@ -21,18 +21,21 @@ cgen/; cgen parts of opcodes/, sim/ & include/
May need separate opcodes/ or sim/ approval for
commits of regenerated files there.
-config.guess; config.sub
- config: http://gnu.org
+config.guess; config.sub; dejagnu/config.guess;
+readline/support/config.sub; readline/support/config.guess
+ config: http://savannah.gnu.org/projects/config
Patches to config-patches@gnu.org.
Changes need to be done in tandem with the official CONFIG
sources or submitted to the master file maintainer and brought
in via a merge.
+ Please notify the following of any committed patches:
+ binutils@sources.redhat.com
+ gdb-patches@sources.redhat.com
dejagnu/
Notify http://dejagnu.sourceforge.net/ of generic changes.
- Generic patches to gdb-patches@sources.redhat.com &
- sid@sources.redhat.com.
- See also SID & GDB.
+ Generic patches to gdb-patches@sources.redhat.com;
+ Other dependents of dejagnu include sid@, binutils@, gcc@, etc.
gdb/; mmalloc/; readline/; sim/; GDB's part of include/ & dejagnu/
gdb: http://sources.redhat.com/gdb/
@@ -46,7 +49,11 @@ libiberty/; libiberty's part of include/
gcc: http://gcc.gnu.org
Changes need to be done in tandem with the official GCC
sources or submitted to the master file maintainer and brought
- in via a merge.
+ in via a merge. Note: approved patches in gcc's libiberty
+ are automatically approved in this libiberty also; feel free
+ to merge them yourself if needed sooner than the next merge.
+ Otherwise, changes are automatically merged, usually within
+ a day.
ltconfig; ltmain.sh
libtool: http://gnu.org
@@ -54,13 +61,17 @@ ltconfig; ltmain.sh
sources or submitted to the master file maintainer and brought
in via a merge.
-mkinstalldirs; move-if-change; symlink-tree
+mkinstalldirs; move-if-change
autoconf: http://gnu.org
Patches to autoconf-patches@gnu.org.
Changes need to be done in tandem with the official AUTOCONF
sources or submitted to the master file maintainer and brought
in via a merge.
+symlink-tree
+ gcc: http://gcc.gnu.org
+ See libiberty.
+
newlib/; libgloss/
http://sources.redhat.com/newlib/
Patches to newlib@sources.redhat.com.
@@ -89,7 +100,7 @@ expect/; config-ml.in; mpw-README; mpw-build.in; mpw-config.in;
mpw-configure; mpw-install; setup.com; missing; makefile.vms; utils/;
config/; config.if; makefile.vms; missing; ylwrap; mkdep; etc/;
install-sh; intl/
- Ask.
+ Ask DJ Delorie <dj@redhat.com> after reading the libiberty entry.
modules file
Obviously changes to this file should not go through
diff --git a/contrib/binutils/Makefile.in b/contrib/binutils/Makefile.in
index d4ae7e9..e48d98a 100644
--- a/contrib/binutils/Makefile.in
+++ b/contrib/binutils/Makefile.in
@@ -141,9 +141,13 @@ M4 = `if [ -f $$r/m4/m4 ] ; \
then echo $$r/m4/m4 ; \
else echo ${DEFAULT_M4} ; fi`
+# For an installed makeinfo, we require it to be from texinfo 4 or
+# higher, else we use the "missing" dummy.
MAKEINFO = `if [ -f $$r/texinfo/makeinfo/Makefile ] ; \
then echo $$r/texinfo/makeinfo/makeinfo ; \
- else echo makeinfo ; fi`
+ else if (makeinfo --version \
+ | egrep 'texinfo[^0-9]*([1-3][0-9]|[4-9])') >/dev/null 2>&1; \
+ then echo makeinfo; else echo $$s/missing makeinfo; fi; fi`
# This just becomes part of the MAKEINFO definition passed down to
# sub-makes. It lets flags be given on the command line while still
@@ -175,8 +179,16 @@ TARGET_CONFIGDIRS = libiberty libgloss $(SPECIAL_LIBS) newlib libio librx libstd
# Changed by configure to $(target_alias) if cross.
TARGET_SUBDIR = .
-# This is set by the configure script to the arguments passed to configure.
-CONFIG_ARGUMENTS =
+BUILD_CONFIGDIRS = libiberty
+BUILD_SUBDIR = .
+
+# This is set by the configure script to the arguments to use when configuring
+# directories built for the target.
+TARGET_CONFIGARGS =
+
+# This is set by the configure script to the arguments to use when configuring
+# directories built for the build system.
+BUILD_CONFIGARGS =
# This is set by configure to REALLY_SET_LIB_PATH if --enable-shared
# was used.
@@ -220,6 +232,7 @@ FLAGS_FOR_TARGET =
CC_FOR_TARGET =
CHILL_FOR_TARGET =
CXX_FOR_TARGET =
+CXX_FOR_TARGET_FOR_RECURSIVE_MAKE =
# If GCC_FOR_TARGET is not overriden on the command line, then this
# variable is passed down to the gcc Makefile, where it is used to
@@ -230,8 +243,10 @@ GCC_FOR_TARGET = $$r/gcc/xgcc -B$$r/gcc/ $(FLAGS_FOR_TARGET)
AS_FOR_TARGET = ` \
if [ -f $$r/gas/as-new ] ; then \
echo $$r/gas/as-new ; \
+ elif [ -f $$r/gcc/xgcc ]; then \
+ $(CC_FOR_TARGET) -print-prog-name=as ; \
else \
- if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
+ if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
echo $(AS); \
else \
t='$(program_transform_name)'; echo as | sed -e 's/x/x/' $$t ; \
@@ -241,8 +256,10 @@ AS_FOR_TARGET = ` \
LD_FOR_TARGET = ` \
if [ -f $$r/ld/ld-new ] ; then \
echo $$r/ld/ld-new ; \
+ elif [ -f $$r/gcc/xgcc ]; then \
+ $(CC_FOR_TARGET) -print-prog-name=ld ; \
else \
- if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
+ if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
echo $(LD); \
else \
t='$(program_transform_name)'; echo ld | sed -e 's/x/x/' $$t ; \
@@ -253,7 +270,7 @@ DLLTOOL_FOR_TARGET = ` \
if [ -f $$r/binutils/dlltool ] ; then \
echo $$r/binutils/dlltool ; \
else \
- if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
+ if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
echo $(DLLTOOL); \
else \
t='$(program_transform_name)'; echo dlltool | sed -e 's/x/x/' $$t ; \
@@ -264,7 +281,7 @@ WINDRES_FOR_TARGET = ` \
if [ -f $$r/binutils/windres ] ; then \
echo $$r/binutils/windres ; \
else \
- if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
+ if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
echo $(WINDRES); \
else \
t='$(program_transform_name)'; echo windres | sed -e 's/x/x/' $$t ; \
@@ -275,7 +292,7 @@ AR_FOR_TARGET = ` \
if [ -f $$r/binutils/ar ] ; then \
echo $$r/binutils/ar ; \
else \
- if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
+ if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
echo $(AR); \
else \
t='$(program_transform_name)'; echo ar | sed -e 's/x/x/' $$t ; \
@@ -286,8 +303,12 @@ RANLIB_FOR_TARGET = ` \
if [ -f $$r/binutils/ranlib ] ; then \
echo $$r/binutils/ranlib ; \
else \
- if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
- echo $(RANLIB); \
+ if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
+ if [ x'$(RANLIB)' != x ]; then \
+ echo $(RANLIB); \
+ else \
+ echo ranlib; \
+ fi; \
else \
t='$(program_transform_name)'; echo ranlib | sed -e 's/x/x/' $$t ; \
fi; \
@@ -296,8 +317,10 @@ RANLIB_FOR_TARGET = ` \
NM_FOR_TARGET = ` \
if [ -f $$r/binutils/nm-new ] ; then \
echo $$r/binutils/nm-new ; \
+ elif [ -f $$r/gcc/xgcc ]; then \
+ $(CC_FOR_TARGET) -print-prog-name=nm ; \
else \
- if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
+ if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
echo $(NM); \
else \
t='$(program_transform_name)'; echo nm | sed -e 's/x/x/' $$t ; \
@@ -385,6 +408,14 @@ BASE_FLAGS_TO_PASS = \
"target_alias=$(target_alias)" \
"libsubdir=$(libsubdir)"
+# For any flags above that may contain shell code that varies from one
+# target library to another. When doing recursive invocations of the
+# top-level Makefile, we don't want the outer make to evaluate them,
+# so we pass these variables down unchanged. They must not contain
+# single nor double quotes.
+RECURSE_FLAGS = \
+ CXX_FOR_TARGET='$(CXX_FOR_TARGET_FOR_RECURSIVE_MAKE)'
+
# Flags to pass down to most sub-makes, in which we're building with
# the host environment.
# If any variables are added here, they must be added to do-*, below.
@@ -466,6 +497,18 @@ EXTRA_GCC_FLAGS = \
GCC_FLAGS_TO_PASS = $(BASE_FLAGS_TO_PASS) $(EXTRA_GCC_FLAGS)
# This is a list of the targets for all of the modules which are compiled
+# using the build machine's native compiler. Configure edits the second
+# macro for build!=host builds.
+ALL_BUILD_MODULES_LIST = \
+ all-build-libiberty
+ALL_BUILD_MODULES =
+
+# This is a list of the configure targets for all of the modules which
+# are compiled using the native tools.
+CONFIGURE_BUILD_MODULES = \
+ configure-build-libiberty
+
+# This is a list of the targets for all of the modules which are compiled
# using $(FLAGS_TO_PASS).
ALL_MODULES = \
all-apache \
@@ -931,6 +974,7 @@ CLEAN_X11_MODULES = \
# The target built for a native build.
.PHONY: all.normal
all.normal: \
+ $(ALL_BUILD_MODULES) \
$(ALL_MODULES) \
$(ALL_X11_MODULES) \
$(ALL_TARGET_MODULES) \
@@ -964,16 +1008,15 @@ $(DO_X):
case $$i in \
gcc) \
for flag in $(EXTRA_GCC_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
;; \
*) \
for flag in $(EXTRA_HOST_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
;; \
esac ; \
- export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \
if (cd ./$$i; \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -990,9 +1033,8 @@ $(DO_X):
for i in $(TARGET_CONFIGDIRS) -dummy-; do \
if [ -f $(TARGET_SUBDIR)/$$i/Makefile ]; then \
for flag in $(EXTRA_TARGET_FLAGS); do \
- eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'|"`; \
+ eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \
done; \
- export AR AS CC CXX LD NM RANLIB DLLTOOL WINDRES; \
if (cd $(TARGET_SUBDIR)/$$i; \
$(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \
"CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \
@@ -1174,6 +1216,106 @@ gcc-no-fixedincludes:
mv gcc/tmp-include gcc/include 2>/dev/null; \
else true; fi
+# This rule is used to build the modules which are built with the
+# build machine's native compiler.
+.PHONY: $(ALL_BUILD_MODULES)
+$(ALL_BUILD_MODULES):
+ dir=`echo $@ | sed -e 's/all-build-//'`; \
+ if [ -f ./$${dir}/Makefile ] ; then \
+ r=`pwd`; export r; \
+ s=`cd $(srcdir); pwd`; export s; \
+ (cd $(BUILD_SUBDIR)/$${dir} && $(MAKE) all); \
+ else \
+ true; \
+ fi
+
+# This rule is used to configure the modules which are built with the
+# native tools.
+.PHONY: $(CONFIGURE_BUILD_MODULES)
+$(CONFIGURE_BUILD_MODULES):
+ @dir=`echo $@ | sed -e 's/configure-build-//'`; \
+ if [ ! -d $(BUILD_SUBDIR) ]; then \
+ true; \
+ elif [ -f $(BUILD_SUBDIR)/$${dir}/Makefile ] ; then \
+ true; \
+ elif echo " $(BUILD_CONFIGDIRS) " | grep " $${dir} " >/dev/null 2>&1; then \
+ if [ -d $(srcdir)/$${dir} ]; then \
+ [ -d $(BUILD_SUBDIR)/$${dir} ] || mkdir $(BUILD_SUBDIR)/$${dir};\
+ r=`pwd`; export r; \
+ s=`cd $(srcdir); pwd`; export s; \
+ AR="$(AR_FOR_BUILD)"; export AR; \
+ AS="$(AS_FOR_BUILD)"; export AS; \
+ CC="$(CC_FOR_BUILD)"; export CC; \
+ CFLAGS="$(CFLAGS_FOR_BUILD)"; export CFLAGS; \
+ CXX="$(CXX_FOR_BUILD)"; export CXX; \
+ CXXFLAGS="$(CXXFLAGS_FOR_BUILD)"; export CXXFLAGS; \
+ GCJ="$(GCJ_FOR_BUILD)"; export GCJ; \
+ DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \
+ LD="$(LD_FOR_BUILD)"; export LD; \
+ LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \
+ NM="$(NM_FOR_BUILD)"; export NM; \
+ RANLIB="$(RANLIB_FOR_BUILD)"; export RANLIB; \
+ WINDRES="$(WINDRES_FOR_BUILD)"; export WINDRES; \
+ echo Configuring in $(BUILD_SUBDIR)/$${dir}; \
+ cd "$(BUILD_SUBDIR)/$${dir}" || exit 1; \
+ case $(srcdir) in \
+ /* | [A-Za-z]:[\\/]*) \
+ topdir=$(srcdir) ;; \
+ *) \
+ case "$(BUILD_SUBDIR)" in \
+ .) topdir="../$(srcdir)" ;; \
+ *) topdir="../../$(srcdir)" ;; \
+ esac ;; \
+ esac; \
+ if [ "$(srcdir)" = "." ] ; then \
+ if [ "$(BUILD_SUBDIR)" != "." ] ; then \
+ if $(SHELL) $$s/symlink-tree $${topdir}/$${dir} "no-such-file" ; then \
+ if [ -f Makefile ]; then \
+ if $(MAKE) distclean; then \
+ true; \
+ else \
+ exit 1; \
+ fi; \
+ else \
+ true; \
+ fi; \
+ else \
+ exit 1; \
+ fi; \
+ else \
+ true; \
+ fi; \
+ srcdiroption="--srcdir=."; \
+ libsrcdir="."; \
+ else \
+ srcdiroption="--srcdir=$${topdir}/$${dir}"; \
+ libsrcdir="$$s/$${dir}"; \
+ fi; \
+ if [ -f $${libsrcdir}/configure ] ; then \
+ rm -f no-such-file skip-this-dir; \
+ CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
+ $(BUILD_CONFIGARGS) $${srcdiroption} \
+ --with-build-subdir="$(BUILD_SUBDIR)"; \
+ else \
+ rm -f no-such-file skip-this-dir; \
+ CONFIG_SITE=no-such-file $(SHELL) $$s/configure \
+ $(BUILD_CONFIGARGS) $${srcdiroption} \
+ --with-build-subdir="$(BUILD_SUBDIR)"; \
+ fi || exit 1; \
+ 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; \
+ else \
+ true; \
+ fi
+
# This rule is used to build the modules which use FLAGS_TO_PASS. To
# build a target all-X means to cd to X and make all.
#
@@ -1198,7 +1340,7 @@ $(ALL_MODULES) all-gui all-libproc:
.PHONY: $(CHECK_MODULES) $(NATIVE_CHECK_MODULES) $(CROSS_CHECK_MODULES)
$(NATIVE_CHECK_MODULES):
- @if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
+ @if [ '$(host_canonical)' = '$(target_canonical)' ] ; then \
dir=`echo $@ | sed -e 's/check-//'`; \
if [ -f ./$${dir}/Makefile ] ; then \
r=`pwd`; export r; \
@@ -1318,12 +1460,12 @@ $(CONFIGURE_TARGET_MODULES):
if [ -f $${libsrcdir}/configure ] ; then \
rm -f no-such-file skip-this-dir; \
CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \
- $(CONFIG_ARGUMENTS) $${srcdiroption} \
+ $(TARGET_CONFIGARGS) $${srcdiroption} \
--with-target-subdir="$(TARGET_SUBDIR)"; \
else \
rm -f no-such-file skip-this-dir; \
CONFIG_SITE=no-such-file $(SHELL) $$s/configure \
- $(CONFIG_ARGUMENTS) $${srcdiroption} \
+ $(TARGET_CONFIGARGS) $${srcdiroption} \
--with-target-subdir="$(TARGET_SUBDIR)"; \
fi; \
if [ -f skip-this-dir ] ; then \
@@ -1349,7 +1491,8 @@ $(ALL_TARGET_MODULES):
r=`pwd`; export r; \
s=`cd $(srcdir); pwd`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/$${dir}; $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
+ (cd $(TARGET_SUBDIR)/$${dir}; \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) all); \
else \
true; \
fi
@@ -1363,7 +1506,8 @@ $(CHECK_TARGET_MODULES):
r=`pwd`; export r; \
s=`cd $(srcdir); pwd`; export s; \
$(SET_LIB_PATH) \
- (cd $(TARGET_SUBDIR)/$${dir};$(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
+ (cd $(TARGET_SUBDIR)/$${dir}; \
+ $(MAKE) $(TARGET_FLAGS_TO_PASS) check);\
else \
true; \
fi
@@ -1478,7 +1622,7 @@ bootstrap bootstrap-lean bootstrap2 bootstrap2-lean bootstrap3 bootstrap3-lean b
s=`cd $(srcdir); pwd` ; export s; \
$(SET_LIB_PATH) \
echo "Building runtime libraries"; \
- $(MAKE) $(BASE_FLAGS_TO_PASS) all
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) all
.PHONY: cross
cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
@@ -1491,7 +1635,8 @@ cross: all-texinfo all-bison all-byacc all-binutils all-gas all-ld
s=`cd $(srcdir); pwd` ; export s; \
$(SET_LIB_PATH) \
echo "Building runtime libraries"; \
- $(MAKE) $(BASE_FLAGS_TO_PASS) all LANGUAGES="c c++"
+ $(MAKE) $(BASE_FLAGS_TO_PASS) $(RECURSE_FLAGS) \
+ LANGUAGES="c c++" all
.PHONY: check-gcc
check-gcc:
@@ -1542,6 +1687,9 @@ install-dosrel: installdirs info
install-dosrel-fake:
+ALL_GCC = all-gcc
+ALL_GCC_C = $(ALL_GCC) all-target-newlib all-target-libgloss
+ALL_GCC_CXX = $(ALL_GCC_C) all-target-libstdc++ all-target-libstdc++-v3
# This is a list of inter-dependencies among modules.
all-apache:
@@ -1578,17 +1726,14 @@ all-flex: all-libiberty all-bison all-byacc
all-gas: all-libiberty all-opcodes all-bfd all-intl
all-gash: all-tcl
all-gawk:
-ALL_GCC = all-gcc
-ALL_GCC_C = $(ALL_GCC) all-target-newlib all-target-libgloss
-ALL_GCC_CXX = $(ALL_GCC_C) all-target-libstdc++ all-target-libstdc++-v3
all-gcc: all-bison all-byacc all-binutils all-gas all-ld all-zlib
all-bootstrap: all-libiberty all-texinfo all-bison all-byacc all-binutils all-gas all-ld all-zlib
GDB_TK = all-tk all-tcl all-itcl all-tix all-libgui
all-gdb: all-libiberty all-opcodes all-bfd all-mmalloc all-readline all-bison all-byacc all-sim $(gdbnlmrequirements) $(GDB_TK)
all-gettext:
all-gnuserv:
-configure-target-gperf: $(ALL_GCC_C)
-all-target-gperf: configure-target-gperf all-target-libiberty all-target-libstdc++
+configure-target-gperf: $(ALL_GCC_CXX)
+all-target-gperf: configure-target-gperf all-target-libiberty all-target-libstdc++-v3
all-gprof: all-libiberty all-bfd all-opcodes all-intl
all-grep: all-libiberty
all-grez: all-libiberty all-bfd all-opcodes
@@ -1611,6 +1756,9 @@ all-target-libio: configure-target-libio all-gas all-ld all-gcc all-target-libib
check-target-libio: all-target-libstdc++
all-libgui: all-tcl all-tk all-tcl8.1 all-tk8.1 all-itcl
all-libiberty:
+
+all-build-libiberty: configure-build-libiberty
+
configure-target-libffi: $(ALL_GCC_C)
all-target-libffi: configure-target-libffi
configure-target-libjava: $(ALL_GCC_CXX) configure-target-zlib configure-target-boehm-gc configure-target-qthreads configure-target-libffi
@@ -1630,7 +1778,7 @@ configure-target-libchill: $(ALL_GCC_C)
all-target-libchill: configure-target-libchill all-target-libiberty
configure-target-libobjc: $(ALL_GCC_C)
all-target-libobjc: configure-target-libobjc all-target-libiberty
-all-m4: all-libiberty
+all-m4: all-libiberty all-texinfo
all-make: all-libiberty
all-mmalloc:
configure-target-newlib: $(ALL_GCC)
@@ -1743,8 +1891,12 @@ VER = ` if grep 'AM_INIT_AUTOMAKE.*BFD_VERSION' $(TOOL)/configure.in >/dev/null
sed < bfd/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \
elif grep AM_INIT_AUTOMAKE $(TOOL)/configure.in >/dev/null 2>&1; then \
sed < $(TOOL)/configure.in -n 's/AM_INIT_AUTOMAKE[^,]*, *\([^)]*\))/\1/p'; \
- else \
+ elif test -f $(TOOL)/version.in; then \
+ head -1 $(TOOL)/version.in; \
+ elif grep VERSION $(TOOL)/Makefile.in > /dev/null 2>&1; then \
sed < $(TOOL)/Makefile.in -n 's/^VERSION *= *//p'; \
+ else \
+ echo VERSION; \
fi`
PACKAGE = $(TOOL)
@@ -1836,6 +1988,11 @@ do-proto-toplev: $(DEVO_SUPPORT) $(SUPPORT_FILES) texinfo/texinfo.tex
else true; fi
chmod -R og=u . || chmod og=u `find . -print`
#
+ # Create .gmo files from .po files.
+ for f in `find . -name '*.po' -type f -print`; do \
+ msgfmt -o `echo $$f | sed -e 's/\.po$$/.gmo/'` $$f ; \
+ done
+ #
-rm -f $(PACKAGE)-$(VER)
ln -s proto-toplev $(PACKAGE)-$(VER)
diff --git a/contrib/binutils/bfd/ChangeLog b/contrib/binutils/bfd/ChangeLog
index d782ee5..b7a2496 100644
--- a/contrib/binutils/bfd/ChangeLog
+++ b/contrib/binutils/bfd/ChangeLog
@@ -1,5003 +1,467 @@
-2001-10-24 Richard Henderson <rth@redhat.com>
+2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
- * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Copy
- timestamp to time_t for ctime.
-
-2001-10-24 Richard Henderson <rth@redhat.com>
-
- 2001-08-23 Jakub Jelinek <jakub@redhat.com>
- * elfxx-ia64.c (elfNN_ia64_hash_table_create): Clear ia64_info.
-
-2001-10-06 Stephane Carrez <Stephane.Carrez@worldnet.fr>
-
- * dwarf2.c (comp_unit_find_nearest_line): Check for end of
- compilation unit.
-
-2001-08-29 Joel Sherrill <joel@OARcorp.com>
-
- * config.bfd (i[3456]86-*-rtems*, m68*-*-rtems*): Change
- default from coff to elf.
-
-2001-08-03 Ben Harris <bjh21@netbsd.org>
-
- * elf32-arm.h (elf32_arm_final_link_relocate): Include offset of
- reloc from start of section when computing value for R_ARM_REL32
- reloc.
-
-2001-07-06 Philip Blundell <philb@gnu.org>
-
- * elf32-arm.h (elf32_arm_merge_private_bfd_data): Correct sense of
- `interworking' warning message.
-
-2001-07-05 Nick Clifton <nickc@cambridge.redhat.com>
-
- * peicode.h (coff_swap_scnhdr_in): For sections containing
- uninitialised data, only set their size to s_paddr if this does
- not reset their size to zero. MS's latest compilers will set
- s_paddr to zero.
-
-2001-06-20 Bo Thorsen <bo@suse.co.uk>
-
- * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix linking of
- shared libraries.
-
-2001-06-21 Alan Modra <amodra@bigpond.net.au>
-
- * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Always
- allocate local .got space. Use shortcuts from hash table for .got
- and .plt rather than comparing section names.
- (elf32_hppa_check_relocs): Use local_plt_refcounts var rather than
- adjusting index into local_got_refcounts to document what we are
- really doing.
- (elf32_hppa_relocate_section): Similarly for local_plt_offsets.
- Tidy .got and .plt error checking.
-
-2001-06-19 Philip Blundell <philb@gnu.org>
-
- * configure.in: Set version to 2.11.2.
+ * configure.in <64-bit configuration>: If using gcc, check and
+ emit error for egcs-1.1.2.
* configure: Regenerate.
-2001-06-19 Andreas Jaeger <aj@suse.de>
-
- Merge from mainline sources:
- 2001-06-19 Andreas Jaeger <aj@suse.de>
- * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix creation of
- dynamic symbols.
- 2001-06-07 Andreas Jaeger <aj@suse.de>
- * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Add an
- assertion.
- (elf64_x86_64_check_relocs): Set an alignment of 8 for .rela
- sections; handle further relocations.
- 2001-06-01 Andreas Jaeger <aj@suse.de>
- * elf64-x86-64.c (elf64_x86_64_relocate_section): Add PC8
- relocation, small reformatting.
-
-2001-06-14 Nick Clifton <nickc@redhat.com>
-
- Merge from mainline sources:
- 2001-04-27 Sean McNeil <sean@mcneil.com>
- * config.bfd: Add arm-vxworks target.
- * coff-arm (coff_arm_relocate_section): Add in symbol value to
- addend (fro VXworks targets).
- 2001-03-06 Nick Clifton <nickc@redhat.com>
- * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero
- of offset in BLX(1) instruction.
- * coff-arm.c (coff_arm_relocate_section): Clear bit zero of
- offset in BLX(1) instruction.
- Fix formatting.
- 2001-03-06 Nick Clifton <nickc@redhat.com>
- * coff-arm.c (coff_arm_reloc_type_lookup): Add
- BFD_RELOC_THUMB_PCREL_BLX.
- 2001-05-04 Nick Clifton <nickc@cambridge.redhat.com>
- * elf32-arm.h (elf32_arm_final_link_relocate): Set
- EF_ARM_HASENTRY if the start address is set.
-
-2001-06-11 Alan Modra <amodra@bigpond.net.au>
-
- * configure.in (<COREFILE case stmt>): Move powerpc-*-*bsd* after
- powerpc-*-freebsd*.
-
- Merge from mainline.
- 2001-06-02 H.J. Lu <hjl@gnu.org>
- * elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX
- and ELFOSABI_HPUX.
- * elf64-hppa.c (elf64_hppa_object_p): Likewise.
-
- 2001-06-02 Hans-Peter Nilsson <hp@axis.com>
- * section.c (_bfd_strip_section_from_output): Handle NULL
- output_section.
-
- 2001-05-30 Alan Modra <amodra@one.net.au>
- * elf32-hppa.c (elf32_hppa_check_relocs): Don't NEED_PLT for
- millicode. Don't allocate .got and .rela.got space here..
- (elf32_hppa_gc_sweep_hook): ..and no need to deallocate here..
- (elf32_hppa_adjust_dynamic_symbol): ..and don't allocate .plt and
- .rela.plt here..
- (hppa_handle_PIC_calls): ..nor here..
- (allocate_plt_and_got): ..instead do it all here. New function.
- (elf32_hppa_size_dynamic_sections): Allocate local .got space and
- call allocate_plt_and_got. No need to zap .got if not dynamic.
- (elf32_hppa_final_link): Call regular bfd_final_link instead of
- gc_common_final_link.
- (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
- (elf32_hppa_relocate_section): Use it here.
- (elf32_hppa_finish_dynamic_symbol): Remove superfluous test of
- dynamic_sections_created.
- (hppa_type_of_stub): Don't LONG_BRANCH_VIA_PLT if millicode sym.
-
- 2001-05-28 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
- * elflink.h (elf_link_size_reloc_section): Use bfd_zmalloc instead of
- a zeroing loop.
- (elf_link_output_relocs): Handle MIPS ELF64 relocations correctly.
- (elf_link_input_bfd): Likewise.
- (elf_reloc_link_order): Likewise.
- (elf_finish_pointer_linker_section): Typo. Handle MIPS ELF64
- relocations correctly.
-
- 2001-05-28 Alan Modra <amodra@one.net.au>
- * elf32-hppa.c (elf32_hppa_relocate_section): Set up .plt entries
- for symbols forced local that need plabels.
- (elf32_hppa_adjust_dynamic_symbol): Don't allocate space in
- .plt.rela for local syms if non-shared.
- (hppa_build_one_stub): Mask lsb of plt.offset.
- (elf32_hppa_finish_dynamic_symbol): Abort if lsb of plt.offset set.
- (clobber_millicode_symbols): Correct comment.
- (elf32_hppa_relocate_section): Likewise.
- (elf32_hppa_finish_dynamic_symbol): Likewise.
-
- 2001-05-25 Alan Modra <amodra@one.net.au>
- * elf32-hppa.c (elf32_hppa_relocate_section): Don't allow
- undefined millicode syms in shared libs.
- (hppa_build_one_stub): Turn BFD_ASSERTs into aborts.
- (elf32_hppa_check_relocs): Likewise.
- (elf32_hppa_adjust_dynamic_symbol): Likewise.
- (elf32_hppa_size_dynamic_sections): Likewise.
- (elf32_hppa_relocate_section): Likewise.
- (elf32_hppa_finish_dynamic_symbol): Likewise.
- (elf32_hppa_finish_dynamic_sections): Likewise.
-
- 2001-05-23 Alexandre Oliva <aoliva@redhat.com>
- * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo
- s/ENTIRES/ENTRIES/.
-
- 2001-05-23 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
- * reloc.c (bfd_reloc_code_real): Add MIPS ELF64 relocations.
- * libbfd.h: Regenerate.
- * bfd-in2.h: Regenerate.
- * aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support.
- * archures.c (bfd_mach_mips12000): Define.
- * cpu-mips.c (arch_info_struct): Add MIPS r12k support.
- * elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k
- support.
- (_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef.
- * bfd-in2.h: Regenerate.
- * elfxx-target.h: Do not redefine bfd_elfNN_bfd_make_debug_symbol.
-
- 2001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
- * elf-bfd.h (NUM_SHDR_ENTRIES): New macro: compute the number
- of entries in a structured section.
- * elf.c: Use new macro.
- * elf32-i386.c: Use new macro.
- * elf32-mips.c: Use new macro.
- * elf64-alpha.c: Use new macro.
- * elf64-sparc.c: Use new macro.
- * elfcode.h: Use new macro.
- * elflink.h: Use new macro.
-
- 2001-05-21 Andreas Jaeger <aj@suse.de>
- * dwarf2.c (decode_line_info): Fix error message.
- (read_abbrevs): Fix test for offset as suggested by Alan Modra and
- adjust error message.
-
- 2001-05-17 H.J. Lu <hjl@gnu.org>
- * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the
- version definition to basename of the output filename.
-
- 2001-05-15 Alexandre Oliva <aoliva@redhat.com>
- * elf-m10300.c (mn10300_elf_relax_section): Don't relax
- negative 32-bit operands to 16 operands when the operand is
- going to be zero-extended by the modified opcode.
-
- 2001-05-11 Jakub Jelinek <jakub@redhat.com>
- * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind
- sections as well.
- (elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO
- to .gnu.linkonce.t.FOO text section.
-
- 2001-05-11 Nick Clifton <nickc@cambridge.redhat.com>
- * dwarf1.c (_bfd_dwarf1_find_nearest_line): Change type of 'addr'
- to be unsigned long, in order to match its use.
-
- 2001-05-10 H.J. Lu <hjl@gnu.org>
- * linker.c (_bfd_generic_link_add_one_symbol): Check loop on
- indirect symbols.
-
- 2001-05-09 H.J. Lu <hjl@gnu.org>
- * elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate
- versymhdr->sh_size bytes for extversym instead of hdr->sh_size.
- Remove the unused veriable `dynver'.
-
- 2001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
- * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it
- is always a positive integer. Cast away sign mismatch.
- * elf32-mips.c: Fix misleading comment and typo.
- (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use
- correct data type.
- * elflink.c: Fix typo.
- (_bfd_elf_create_dynamic_sections): Remove superfluous initialization.
- * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch.
-
- 2001-05-03 Nick Clifton <nickc@cambridge.redhat.com>
- * targets.c (_bfd_target_vector_entries): Compute value based on
- the size of the _bfd_target_vector and not bfd_target_vector.
-
- 2001-05-03 Andreas Jaeger <aj@suse.de>
- * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute.
- (elf_generic_info_to_howto_rel): Likewise.
- * coff-alpha.c (reloc_nil): Likewise.
- (alpha_ecoff_bad_format_hook): Likewise.
- (alpha_adjust_reloc_out): Likewise.
- (alpha_bfd_reloc_type_lookup): Likewise.
- (alpha_convert_external_reloc): Likewise.
- * elf64-alpha.c (elf64_alpha_reloc_nil): Likewise.
- (elf64_alpha_reloc_bad): Likewise.
- (elf64_alpha_reloc_gpdisp): Likewise.
- (elf64_alpha_bfd_reloc_type_lookup): Likewise.
- (elf64_alpha_info_to_howto): Likewise.
- (elf64_alpha_add_symbol_hook): Likewise.
- (elf64_alpha_create_got_section): Likewise.
- (elf64_alpha_is_local_label_name): Likewise.
- (elf64_alpha_merge_ind_symbols): Likewise.
- * elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise.
- (mips_elf64_get_reloc_upper_bound): Likewise.
- * nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise.
- (nlm_alpha_get_public_offset): Likewise.
-
- 2001-04-30 H.J. Lu <hjl@gnu.org>
- * elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1
- only for ELF_LINK_FORCED_LOCAL.
- * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
- * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise.
- * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
- * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL
- if the symbol has hidden or internal visibility.
-
- 2001-04-14 Mark Elbrecht <snowball3@bigfoot.com>
- * coffcode.h (coff_write_object_contents): Use
- bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
-
- 2001-04-09 Hans-Peter Nilsson <hp@axis.com>
- * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
- only hide symbols marked STV_INTERNAL or STV_HIDDEN.
-
- 2001-04-05 Steven J. Hill <sjhill@cotw.com>
- * config.bfd (mips*el*-*-linux-gnu*): Use traditional little
- endian MIPS ELF target.
- (mips*-*-linux-gnu*): Use traditional big endian MIPS ELF target.
- * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
- 64bit big endian MIPS ELF target.
- (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
- endian MIPS ELF target.
- * configure: Regenerated.
- * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
- little endian targets.
- (mips_elf_sym_is_global): Handle traditional targets.
- * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
- 64bit big endian MIPS ELF target.
- (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
- endian MIPS ELF target.
- * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
- and bfd_elf64_tradlittlemips_vec.
-
- 2001-04-04 Alan Modra <alan@linuxcare.com.au>
- * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
- when -Bsymbolic causes a symbol to no longer need a .plt entry.
-
- 2001-04-03 David Mosberger <davidm@hpl.hp.com>
- * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
-
- 2001-03-30 H.J. Lu <hjl@gnu.org>
- * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
- (PEI_DEFAULT_TARGET_SUBSYSTEM): This.
-
- 2001-03-23 Nick Clifton <nickc@redhat.com>
- * Makefile.am (BUILD_CFILES): New variable: List of C source
- files created in build directory.
- (BUILD_HFILES): New variable: List of header files created in
- build directory.
- (POTFILES): Delete.
- (po/POTFILES.in): Replace rule with empty entry.
- (po/SRC-POTFILES.in): New rule: Create a list of source files
- in the source directory.
- (po/BLD-POTFILES.in): New rule: Create a list of source files
- in the build directory.
- (MOSTLYCLEAN): Do not delete source files created in build
- directory.
- * Makefile.in: Regenerate.
- * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
- into po/Makefile.
- * configure: Regenerate.
- * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES
- and BLD_POTFILES.
- Add .. to the search path when building bfd.pot.
- Delete POTFILES when performing distclean.
- Add comment describing why distclean is broken in maintainer mode.
- * po/POTFILES.in: Delete.
- * po/SRC-POTFILES.in: New file.
- * po/BLD-POTFILES.in: New file.
- * po/bfd.pot: Regenerate.
-
- 2001-03-06 Igor Shevlyakov <igor@windriver.com>
- * archures.c (bfd_default_scan): Add Coldfire CPUs.
- * bfd-in2.h: Regenerate.
- * cpu-m68k.c: Add Coldfire CPUs for arch table.
- * ieee.c (ieee_write_processor): Set proper id for
- Coldfire CPUs.
-
- 2001-02-27 H.J. Lu <hjl@gnu.org>
- * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
- abfd->tdata.aout_data == NULL.
-
- 2001-02-26 Nick Clifton <nickc@redhat.com>
- * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy
- up, replacing multiple if statements with a switch.
- (handle_COMDAT): New function.
-
- 2001-02-26 H.J. Lu <hjl@gnu.org>
- * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue
- a warning for section flags we do not handle instead of
- aborting.
-
- 2001-02-19 Jakub Jelinek <jakub@redhat.com>
- * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
- entries that could serve as a definition for a weak symbol.
- * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
-
- 2001-02-18 Jim Kingdon <jkingdon@engr.sgi.com>
- * irix-core.c (irix_core_core_file_p): Set the architecture (GDB
- multiarch needs it).
-
- 2001-02-18 H.J. Lu <hjl@gnu.org>
- * elflink.h (elf_link_input_bfd): Ignore invalid section symbol
- index.
-
- 2001-02-18 Kazu Hirata <kazu@hxi.com>
- * vms-misc.c: Fix formatting.
-
- 2001-02-16 Kazu Hirata <kazu@hxi.com>
- * vms.c: Fix formatting.
-
- 2001-02-14 H.J. Lu <hjl@gnu.org>
- * elf.c (elf_find_function): New function.
- (_bfd_elf_find_nearest_line): Call elf_find_function () to find
- the file name and function name.
-
- 2001-02-14 Nick Clifton <nickc@redhat.com>
- * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c
- (BFD64_BACKENDS): Add pepigen.c
- Add rules to create peigen.c and pepigen.c from peXXigen.c.
-
- 2001-02-14 H.J. Lu <hjl@gnu.org>
- * libcoff-in.h (pe_tdata): Add members target_subsystem and
- force_minimum_alignment.
-
- 2001-02-13 Kazu Hirata <kazu@hxi.com>
- * vms.c (vms_print_symbol): Remove unreachable code.
- * rs6000-core.c: Fix formatting.
-
- 2001-02-13 David Mosberger <davidm@hpl.hp.com>
- * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
- as _bfd_XXi_only_swap_filehdr_out.
- (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
- pe->force_minimum_alignment to TRUE.
- (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
- PEI_TARGET_SUBSYSTEM.
- (pe_print_private_bfd_data): Call
- _bfd_XX_print_private_bfd_data_common() instead of
- _bfd_pe_print_private_bfd_data_common().
- (pe_bfd_copy_private_bfd_data): Call
- _bfd_XX_bfd_copy_private_bfd_data_common() instead of
- _bfd_pe_bfd_copy_private_bfd_data_common().
- (coff_bfd_copy_private_section_data): Define as
- _bfd_XX_bfd_copy_private_section_data instead of
- _bfd_pe_bfd_copy_private_section_data.
- (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
- of a _bfd_pe_get_symbol_info.
- * peigen.c: Delete.
- * peXXigen.c: Renamed from peigen.c.
- (COFF_WITH_XX): Define this macro (will get expanded into
- COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
- compiled as peigen.c or pepigen.c.
- [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
- define the canonical PEP structures and definitions.
- (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
- effect, enforce minimum file and section alignments. If
- extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
- pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
- so, by default, this is a no-op).
- * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
- (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
- _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
- _bfd_pefoo if it's not defined. Use these macros to define
- coff swap macros.
- * libcoff.h (pe_tdata): Add members target_subsystem and
- force_minimum_alignment.
- * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
- COFF_WITH_pep.
- (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
- * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
- peigen.lo.
- * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
- (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
- PEPAOUTHDR.
- * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
- (BFD64_BACKENDS_CFILES): Mention pepigen.c
- (peigen.c): Add rule to generate from peXXigen.c.
- (pepigen.c): Ditto.
- (pepigen.lo): List dependencies for pepigen.lo.
-
- 2001-02-11 H.J. Lu <hjl@gnu.org>
- * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
- alignment.
+ * doc/Makefile.am (install): Depend on install-info.
+ * doc/Makefile.in: Regenerate.
- 2001-02-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
- * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch
- from 2000-10-13. Do not add the symbol's value for R_MIPS_REL32
- relocations against dynsym symbols.
- * elf32-mips.c (elf_mips_howto_table): Fix the comment on
- the R_MIPS_26 relocation.
- (mips_elf_calculate_relocation): Use (p + 4) instead of p for
- the R_MIPS_26 relocation.
- (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26
- relocation.
- * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on
- the R_MIPS_26 relocation.
- (mips_elf64_howto_table_rela): Likewise.
- * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub
- member to mark symbols that have non-CALL relocations against
- them.
- (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
- (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
- R_MIPS_GOT16.
- (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a
- non-CALL relocation against it is encountered.
- (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well.
- (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if
- no_fn_stub is not set.
- * elf32-mips.c (mips_elf_output_extsym): Get the output section
- information from the real symbol for indirect ones.
- Check no_fn_stub to find out if a symbol has a function stub
- indeed.
+2002-01-26 Egor Duda <deo@logos-m.ru>
- 2001-02-09 Jakub Jelinek <jakub@redhat.com>
- * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
+ * elf.c (elfcore_grok_win32pstatus): Copy only as much information
+ as possible to avoid stack corruption.
- 2001-02-09 Mark Kettenis <kettenis@gnu.org>
- * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
- similar to R_SPARC_32.
- * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
+2002-01-26 Richard Henderson <rth@redhat.com>
- 2001-02-08 Richard Henderson <rth@redhat.com>
- * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
- before visibility. Locally defined protected symbols are not
- dynamic.
+ * elf64-alpha.c (elf64_alpha_check_relocs): Don't set reltext
+ for non-allocated sections.
- 2001-02-07 Jakub Jelinek <jakub@redhat.com>
- * elflink.h (is_global_symbol_definition): Rename to
- is_global_data_symbol_definition and have it reject function
- symbols.
- (elf_link_is_defined_archive_symbol): Use renamed function.
+2002-01-25 Mark Kettenis <kettenis@gnu.org>
- 2001-02-07 Todd Vierling <tv@wasabisystems.com>
- * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
- * libbfd.h (bfd_target_vector): Likewise.
- * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
- make static; create pointer reference named bfd_target_vector.
- (_bfd_target_vector_entries): Calculate this based on the array
- typed _bfd_target_vector.
+ * elf.c (elfcore_write_prstatus): Make sure we pass the address of
+ prstat.pr_reg even if it is a struct.
- 2001-02-06 H.J. Lu <hjl@gnu.org>
- * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
- internal symbols are not dynamic.
- * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
+2002-01-25 Steve Ellcey <sje@cup.hp.com>
- 2001-02-06 Kazu Hirata <kazu@hxi.com>
- * elf-m10200.c: Fix formatting.
+ * bfd/elfxx-ia64.c: Reset AIX vector function overrides for HP-UX.
- 2001-02-01 Kazu Hirata <kazu@hxi.com>
- * elf-m10300.c: Fix formatting.
+2002-01-25 Philipp Thomas <pthomas@suse.de>
-2001-06-10 Philip Blundell <philb@gnu.org>
+ * coffgen.c (coff_print_symbol): Don't mark info message
+ for translation.
- * configure.in: Set version to 2.11.1.
- * configure: Regenerate.
+2002-01-25 Nick Clifton <nickc@redhat.com>
-2001-06-09 Philip Blundell <philb@gnu.org>
+ * po/fr.po: Updated translation.
+ * po/es.po: Updated translation.
- * elf32-arm.h (elf32_arm_plt0_entry): Correct error in last
- change.
- (elf32_arm_plt_entry): Likewise.
+2002-01-25 Philipp Thomas <pthomas@suse.de>
-2001-06-07 Alan Modra <amodra@bigpond.net.au>
+ * coff-alpha.c (alpha_relocate_section): Unify warning message
+ for GP relative relocations without GP defined.
+ * coff-mips.c (mips_relocate_section): Likewise.
- * Most files: Update copyright notices.
+2002-01-25 Alan Modra <amodra@bigpond.net.au>
-2001-05-29 Andreas Jaeger <aj@suse.de>
+ * elf-eh-frame.c (_bfd_elf_eh_frame_section_offset): Avoid
+ unsigned overflow when new_offset < old_offset.
- * elf64-x86-64.c (elf64_x86_64_check_relocs): Handle R_X86_64_64.
- (elf64_x86_64_relocate_section): Likewise.
+2002-01-24 Philipp Thomas <pthomas@suse.de>
-2001-05-28 Andreas Jaeger <aj@suse.de>
+ * bfd.c (_bfd_abort): Fix typo.
- * elf64-x86-64.c (elf64_86_64_size_info): Remove, we can use the
- generic version since we want a hashsize of 4.
- (elf_backend_size_info): Likewise.
+2002-01-23 Richard Henderson <rth@redhat.com>
-2001-05-28 Nicolas Pitre <nico@cam.org>
+ * elf64-alpha.c (elf64_alpha_adjust_dynamic_symbol): Don't suppress
+ plt entries for undefweak symbols.
- * elf32-arm.h: Fix PLT generation for big endian ARM.
+2002-01-23 Steve Ellcey <sje@cup.hp.com>
-2001-05-28 Jeff Sturm <jsturm@one-point.com>
+ * bfd/targets.c (bfd_elf32_ia64_hpux_big_vec): Add to
+ DEFAULT_VECTOR.
+ (bfd_elf64_ia64_hpux_big_vec): Ditto.
+ (bfd_elf32_h8300_vec): Ditto.
- * reloc.c: Add BFD_RELOC_SPARC_UA16 and BFD_RELOC_SPARC_UA64.
- * bfd-in2.h: Regenerate.
- * libbfd.h: Regenerate.
- * elf32-sparc.c: Enable BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32
- and BFD_RELOC_SPARC_UA64 mapping
- * elf64-sparc.c: Likewise.
+2002-01-23 Alan Modra <amodra@bigpond.net.au>
-2001-05-23 Alan Modra <amodra@one.net.au>
-
- Merge from mainline.
- 2001-05-17 Alan Modra <amodra@one.net.au>
- * elf32-hppa.c (hppa_build_one_stub): Add an assert to check
+ * elf64-ppc.c: Remove stale part of ABI comment.
+ (NO_OPD_RELOCS): Define.
+ (ppc64_elf_check_relocs): Use it.
+ (ppc64_elf_relocate_section): Here too.
+ (build_one_stub): Don't point function syms at the stub. Instead,
+ hijack plt.offset.
+ (ppc64_elf_relocate_section): Check whether REL24 relocs should
+ really go to the stub. Make all dynamic relocs in opd against
+ locals.
+ (ppc64_elf_finish_dynamic_symbol): Allow for non-standard use of
plt.offset.
- 2001-05-16 Alan Modra <amodra@one.net.au>
- * section.c (asection): Add linker_has_input field.
- (STD_SECTION): Adjust initialization to suit.
- * ecoff.c (bfd_debug_section): Likewise.
- * bfd-in2.h: Regenerate.
-
- 2001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
- * ecoff.c (bfd_debug_section): Fix initialization.
-
- 2001-05-12 Peter Targett <peter.targett@arccores.com>
- * cpu-arc.c (arch_info_struct): Add entry 'base' representing old
- name for 'arc5' core versions.
- (bfd_arc_arch): Make bfd_mach_arc_6 default.
- * elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default
- architecture.
- (arc_elf_final_write_processing): Make bfd_mach_arc_6 default.
-
- 2001-05-08 Ian Lance Taylor <ian@zembu.com>
- * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is
- NULL or is not COFF.
- (coff_i386_rtype_to_howto): Don't dump core if output section
- owner is not COFF.
-
- 2001-04-13 Roger Sayle <roger@metaphorics.com>
- * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
- flag on pe-i386 targets.
-
- 2001-04-26 H.J. Lu <hjl@gnu.org>
- * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
- valid.
-
- 2001-04-05 David Mosberger <davidm@hpl.hp.com>
- * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
- ordinary "progbits" section.
-
-2001-05-04 Richard Henderson <rth@redhat.com>
-
- * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true.
-
-2001-04-30 Andreas Jaeger <aj@suse.de>, Andreas Schwab <schwab@suse.de>
-
- * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
- R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
-
-2001-04-27 Andreas Jaeger <aj@suse.de>
-
- * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
- out handled entries.
- (elf64_x86_64_finish_dynamic_symbol): Set up GOT entries.
- (elf64_x86_64_relocate_section): Fix GOTPCREL calculation.
- (elf64_x86_64_relocate_section): Merge entries for GOTPCREL and
- GOT32.
-
-2001-04-30 Alan Modra <amodra@one.net.au>
-
- * elf32-hppa.c (final_link_relocate): Branch to .+8 for
- calls to undefined weak symbols.
-
-2001-04-19 Andreas Jaeger <aj@suse.de>
-
- * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
- (elf64_x86_64_plt_entry): Likewise.
- (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
- (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
-
-2001-03-31 Philip Blundell <philb@gnu.org>
-
- From 2001-03-26 H.J. Lu <hjl@gnu.org>
- * elf32-gen.c (elf32_generic_link_add_symbols): New. Check
- if there are any relocations for generic ELF.
- (bfd_elf32_bfd_link_add_symbols): Defined to
- elf32_generic_link_add_symbols.
- * elf64-gen.c (elf64_generic_link_add_symbols): New. Check
- if there are any relocations for generic ELF.
- (bfd_elf64_bfd_link_add_symbols): Defined to
- elf64_generic_link_add_symbols.
-
-2001-03-21 Alan Modra <alan@linuxcare.com.au>
-
- * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
- non-NULL before attempting to dereference.
-
-2001-03-20 Andreas Schwab <schwab@suse.de>
-
- * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
- relocation value when resolving a reference from a debugging
- section.
-
-2001-03-16 Philip Blundell <philb@gnu.org>
-
- * configure: Regenerate.
-
-2001-03-16 Alan Modra <alan@linuxcare.com.au>
-
- * elf32-hppa.c (elf32_hppa_link_hash_entry): Add maybe_pic_call.
- (hppa_link_hash_newfunc): Init it.
- (hppa_type_of_stub): Only use non-PIC to PIC call stub if caller
- section appears to be non-PIC.
- (final_link_relocate): Likewise.
- (elf32_hppa_adjust_dynamic_symbol): Set maybe_pic_call for any
- possible candidate function, and set pic_call for those that will
- only have a .plt entry for the PIC call stub.
- (hppa_handle_PIC_calls): Set maybe_pic_call.
-
- * elf32-hppa.c: Correct field selector in stub comments.
- (clobber_millicode_symbols): Formatting fix.
-
-2001-03-11 Philip Blundell <philb@gnu.org>
-
- * configure.in: Set version to 2.11.
-
- * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
- entries that could serve as a definition for a weak symbol.
-
-2001-03-07 Andreas Jaeger <aj@suse.de>
-
- * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
- some relocation values.
-
-2001-02-28 Andreas Jaeger <aj@suse.de>
-
- * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
- to addend.
-
-2001-02-26 Andreas Jaeger <aj@suse.de>
-
- * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
-
-2001-02-21 David Mosberger <davidm@hpl.hp.com>
-
- * cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
- C8 said "1" instead of "8". Clarify error string for IMM22:
- "signed integer" instead of just "integer".
-
-2001-02-20 Andreas Jaeger <aj@suse.de>
-
- * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
- PLT entries that could serve as a definition for a weak symbol.
-
-2001-02-18 David O'Brien <obrien@FreeBSD>
-
- * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
- FreeBSD/i386-CURRENT differently until I can figure out the needed
- corefile changes.
- * configure: Regenerate.
- * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
- FreeBSD/PowerPC, and FreeBSD/sparc64.
-
-2001-02-14 Philip Blundell <pb@futuretv.com>
-
- From 2001-02-06 H.J. Lu <hjl@gnu.org>
- * bfd/peicode.h (coff_swap_filehdr_in): Remove the e_magic
- checking.
- (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
- external_PEI_IMAGE_hdr.
-
-2001-02-14 Bo Thorsen <bo@suse.de>
-
- * elf64-x86-64.c: Small formatting fixes and rearrangements of code.
- (elf64_86_64_size_info): Struct added to fix a problem
- with the hashtable string entries.
- (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
- (elf64_x86_64_size_dynamic_sections): A FIXME removed.
- (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
- remove the FIXME for this.
- (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
- section. Also removed the FIXME for it.
- (x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
- (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
- (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
-
-2001-02-14 Philip Blundell <pb@futuretv.com>
-
- From 2001-02-08 H.J. Lu <hjl@gnu.org>
- * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_32
- relocation entries for weak definitions when building DSO with
- -Bsymbolic.
-
-2001-02-13 Richard Henderson <rth@redhat.com>
-
- * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
- and not user provided.
-
-2001-02-13 Alan Modra <alan@linuxcare.com.au>
-
- * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$. If
- $global$ referenced but not defined, set its value here.
-
-2001-02-09 Bo Thorsen <bo@suse.de>
-
- * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
- alignment to 3.
- (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
- and relocation.
- (elf64_x86_64_relocate_section): Fix formatting.
- (elf64_x86_64_relocate_section): Fix addend for relocation of
- R_X86_64_(8|16|32|PC8|PC16|PC32).
-
-Mon Feb 12 17:44:39 CET 2001 Jan Hubicka <jh@suse.cz>
-
- * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
-
-2001-02-10 Nick Clifton <nickc@redhat.com>
-
- * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
- rel, it will be handled later on.
-
-2001-02-09 David Mosberger <davidm@hpl.hp.com>
-
- * elfxx-ia64.c (is_unwind_section_name): New function. Returns
- true if section name is an unwind table section name.
- (elfNN_ia64_additional_program_headers): Count each unwind section
- separately.
- (elfNN_ia64_modify_segment_map): Install one unwind program header
- for each unwind separate section. Note: normally the linker
- script merges the unwind sections that go into a single segment,
- so this still generates at most one unwind program header per
- segment.
-
- * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
- name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
- (elfNN_ia64_fake_sections): Mark sections with names that start
- with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
- unwind section.
-
- * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
- Use it to make sh_info in unwind section point to the text section
- it applies to.
+2002-01-22 Richard Henderson <rth@redhat.com>
-2001-02-07 Mark Elbrecht <snowball3@bigfoot.com>
+ * elf64-alpha.c (INSN_UNOP): Encode with RB as $sp.
- * coffgen.c (coff_find_nearest_line): If stabs info is successfully
- found, do not attempt to find dwarf2 info before returning.
+2002-01-22 Alan Modra <amodra@bigpond.net.au>
-2001-01-30 Alan Modra <alan@linuxcare.com.au>
+ * elf64-ppc.c (ppc64_elf_finish_dynamic_sections): Correct sign of
+ TOC_BASE_OFF adjustment.
- * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
- (elf_backend_get_symbol_type): Define.
- (elf64_hppa_object_p): Set architecture and machine from elf
- header flags.
-
-2001-01-30 Curtis L. Janssen <cljanss@ca.sandia.gov>
-
- * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
- before mdebug.
-
-2001-01-26 Richard Henderson <rth@redhat.com>
-
- * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
- for non-default visibility.
- * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
- delete ugly macro and replace with pretty function.
-
-2001-01-25 Mark Elbrecht <snowball3@bigfoot.com>
-
- * coff-go32.c: Update copyright.
- * coff-stgo32.c: Likewise.
- * coff-go32.c (COFF_LONG_FILENAMES): Define.
- * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
- * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
- * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
-
-2001-01-25 Kazu Hirata <kazu@hxi.com>
-
- * bfd-in2.h: Rebuild.
- * libbfd.h: Likewise.
-
-2001-01-23 H.J. Lu <hjl@gnu.org>
-
- * bfd-in2.h: Rebuild.
-
-2001-01-23 H.J. Lu <hjl@gnu.org>
-
- * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
- is NULL or PRIV(vms_rec) is outside of the buffer.
-
-2001-01-23 Kazu Hirata <kazu@hxi.com>
-
- * coff64-rs6000.c: Fix formatting.
- * coff-arm.c: Likewise.
- * coffgen.c: Likewise.
- * cofflink.c: Likewise.
- * coff-mcore.c: Likewise.
- * coff-mips.c: Likewise.
- * coff-pmac.c: Likewise.
- * coff-ppc.c: Likewise.
- * coff-rs6000.c: Likewise.
- * elf32.c: Likewise.
- * elf32-fr30.c: Likewise.
- * elf32-i370.c: Likewise.
- * elf32-i860.c: Likewise.
- * elf32-m32r.c: Likewise.
- * elf32-m68k.c: Likewise.
- * elf32-mcore.c: Likewise.
- * elf32-ppc.c: Likewise.
- * elf32-sh.c: Likewise.
- * elf32-v850.c: Likewise.
- * elf64-alpha.c: Likewise.
- * elf64-sparc.c: Likewise.
- * elflink.c: Likewise.
- * elflink.h: Likewise.
- * elf-m10200.c: Likewise.
- * elf-m10300.c: Likewise.
- * elfxx-ia64.c: Likewise.
-
- * aoutx.h: Fix formatting.
- * bfd.c: Likewise.
- * bfd-in2.h: Likewise.
- * bfd-in.h: Likewise.
- * cpu-i386.c: Likewise.
- * cpu-m68hc11.c: Likewise.
- * dwarf2.c: Likewise.
- * elf64-x86-64.c: Likewise.
- * format.c: Likewise.
- * freebsd.h: Likewise.
- * hash.c: Likewise.
- * hp300hpux.c: Likewise.
- * hppabsd-core.c: Likewise.
- * hpux-core.c: Likewise.
-
-2001-01-22 Bo Thorsen <bo@suse.de>
-
- * elf64-x86-64.c: Added PIC support for X86-64.
- (elf64_x86_64_link_hash_newfunc): Function added.
- (elf64_x86_64_link_hash_table_create): Likewise.
- (elf64_x86_64_check_relocs): Likewise.
- (elf64_x86_64_gc_mark_hook): Likewise.
- (elf64_x86_64_gc_sweep_hook): Likewise.
- (elf64_x86_64_adjust_dynamic_symbol): Likewise.
- (elf64_x86_64_size_dynamic_sections): Likewise.
- (elf64_x86_64_discard_copies): Likewise.
- (elf64_x86_64_finish_dynamic_symbol): Likewise.
- (elf64_x86_64_finish_dynamic_sections): Likewise.
- (elf64_x86_64_relocate_section): Add relocation of PIC sections.
-
-2001-01-21 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
-
- * Makefile.am (install-data-local): Make use of $(DESTDIR).
+ * Makefile.am: Run "make dep-am".
* Makefile.in: Regenerate.
+ * po/SRC-POTFILES.in: Regenerate.
+
+2002-01-22 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * configure.host (hppa*64*-*-hpux*, hppa*64*-*-linux*): Add new
+ host defines.
+
+2002-01-21 Hans-Peter Nilsson <hp@axis.com>
+
+ * elf32-cris.c (cris_elf_relocate_section) <case R_CRIS_32_GOTREL>:
+ Check for and emit error if sgot is NULL at this point.
+
+2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * config.bfd (ia64*-*-netbsd*): New target.
+
+2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
+
+ * som.c (som_write_space_strings): Comment typo fix.
+
+2002-01-21 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (struct ppc_link_hash_entry): Add is_func and
+ is_func_descriptor fields.
+ (link_hash_newfunc): Init them.
+ (ppc64_elf_check_relocs): Only R_PPC24_REL24 syms starting with a
+ dot are candidates for plt entries. When processing .opd relocs,
+ set function descriptor strings to point inside function code
+ string, and set new ppc_link_hash_entry fields.
+ (ppc64_elf_gc_sweep_hook): Don't sweep R_PPC64_REL24 relocs.
+ (ppc64_elf_adjust_dynamic_symbol): Remove most code dealing with
+ function descriptors. It's now done in..
+ (func_desc_adjust): New.
+ (ppc64_elf_func_desc_adjust): New.
+ (define elf_backend_always_size_sections): Define.
+ (ppc64_elf_hide_symbol): New.
+ (define elf_backend_hide_symbol): Define.
+ (allocate_dynrelocs): Remove code looking up function descriptors
+ as that has been done earlier.
+ (ppc64_elf_size_dynamic_sections): Use htab shortcut to elf hash
+ table.
+ (ppc64_elf_finish_dynamic_symbol): Likewise. Remove code looking
+ up function descriptor.
+ (build_one_stub): Look up the function code sym. Check for
+ invalid plt offsets.
+ (ppc64_elf_relocate_section): Tweak calls to undefined weak syms.
+ Convert R_PPC64_TOC relocs to R_PPC64_RELATIVE in shared libs.
+
+ * elf-bfd.h (elf_backend_data <elf_backend_hide_symbol>): Add
+ boolean param.
+ (_bfd_elf_link_hash_hide_symbol): Likewise.
+ * elflink.h (elf_link_add_object_symbols): Adjust call to
+ elf_backend_hide_symbol.
+ (elf_fix_symbol_flags): Likewise.
+ (elf_link_assign_sym_version): Likewise. Use bfd_malloc rather
+ than bfd_alloc.
+ * elf.c (_bfd_elf_link_hash_hide_symbol): Add "force_local" param.
+ Set ELF_LINK_FORCED_LOCAL and call _bfd_elf_strtab_delref.
+ * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
+ (clobber_millicode_symbols): Adjust to suit new hide_symbol.
+ * elf32-cris.c (elf_cris_hide_symbol): Add "force_local" param
+ and adjust to suit.
+ * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise, and call
+ _bfd_elf_link_hash_hide_symbol rather than duplicating code.
+ * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
-2001-01-21 Kazu Hirata <kazu@hxi.com>
-
- * coff-a29k.c: Fix formatting.
-
-2001-01-19 H.J. Lu <hjl@gnu.org>
-
- * elf32-i386.c (elf_i386_check_relocs): Report files with bad
- relocation section names.
- (elf_i386_relocate_section): Report files with bad relocation
- section names and return false.
-
-2001-01-17 Bo Thorsen <bo@suse.de>
-
- * targets.c: Alphabetize list of xvecs.
-
-2001-01-14 Alan Modra <alan@linuxcare.com.au>
-
- * config.bfd: Add linux target variant for elfxx-hppa.
- * configure.in: Recognize bfd_elf32_hppa_linux_vec and
- bfd_elf64_hppa_linux_vec.
- * configure: Regenerate.
- * elf64-hppa.c: Include elf64-target.h again to support linux
- target variant.
- (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
- * elf32-hppa.c: Include elf32-target.h again to support linux
- target variant.
- (elf32_hppa_post_process_headers): New function.
- (elf_backend_post_process_headers): Define.
- * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
- bfd_elf32_hppa_linux_vec.
-
- * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
- and data_segment_base fields.
- (elf32_hppa_link_hash_table_create ): Init them.
- (elf32_hppa_check_relocs): Update comments.
- (hppa_record_segment_addr): New function.
- (elf32_hppa_relocate_section): Call it.
- (final_link_relocate): Handle R_PARISC_SEGREL32.
- (elf32_hppa_final_link): New function.
- (bfd_elf32_bfd_final_link): Define to call it.
- (hppa_unwind_entry_compare): New function.
- * cache.c (bfd_open_file): Create files in write+read mode.
-
- * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
- SEGREL32 and numerous other relocs. Change duplicate
- R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
-
- * opncls.c (bfd_fdopenr): Add parens like the comment says around
- O_ACCMODE.
-
- * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
- .plt entries for DT_INIT and DT_FINI.
- (elf32_hppa_finish_dynamic_sections): Remove special handling of
- DT_INIT and DT_FINI.
-
- * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
- offsets for stub .plt access if wide mode. Check offset in range.
-
-2001-01-13 Nick Clifton <nickc@redhat.com>
-
- * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
- line.
-
- * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
- line.
-
-2001-01-12 Alan Modra <alan@linuxcare.com.au>
-
- * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
- * configure: Regenerate.
-
-2001-01-11 Peter Targett <peter.targett@arccores.com>
-
- * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
- bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
- * cpu-arc.c (arch_info_struct): Add entries for variants.
- (bfd_arc_arch) Set default to bfd_mach_arc_5.
- (arc_get_mach) Don't assume machine names prefixed arc- before
- testing.
- * elf32-arc.c (arc_elf_object_p): Set machine number based on new
- selections.
- (arc_elf_final_write_processing) Likewise.
- (ELF_MACHINE_CODE) Use EM_ARC.
-
-2001-01-10 Nick Clifton <nickc@redhat.com>
-
- * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
-
-2001-01-07 Philip Blundell <philb@gnu.org>
-
- * README: Replace `bug-gnu-utils@gnu.org' with
- `bug-binutils@gnu.org'.
-
-2001-01-04 Kazu Hirata <kazu@hxi.com>
-
- * som.c: Fix formatting.
-
-2001-01-03 Kazu Hirata <kazu@hxi.com>
-
- * ecoffswap.h: Fix formatting.
- * elf-bfd.h: Likewise.
- * elfarm-nabi.c: Likewise.
- * elfarm-oabi.c: Likewise.
- * elfcode.h: Likewise.
- * elfcore.h: Likewise.
- * elflink.c: Likewise.
- * elflink.h: Likewise.
- * elfxx-ia64.c: Likewise.
- * elfxx-target.h: Likewise.
- * libbfd.c: Likewise
- * linker.c: Likewise.
- * lynx-core.c: Likewise.
-
-2001-01-02 Kazu Hirata <kazu@hxi.com>
-
- * pc532-mach.c: Fix formatting.
- * pe-arm.c: Likewise.
- * pe-i386.c: Likewise.
- * pe-mips.c: Likewise.
- * pe-ppc.c: Likewise.
- * pe-sh.c: Likewise.
- * pei-mips.c: Likewise.
- * pei-sh.c: Likewise.
- * peicode.h: Likewise.
- * ppcboot.c: Likewise.
- * ptrace-core.c: Likewise.
-
-2001-01-01 Kazu Hirata <kazu@hxi.com>
-
- * reloc.c: Fix formatting.
- * riscix.c: Likewise.
- * rs6000-core.c: Likewise.
- * xcoff-target.h: Likewise.
-
-2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
-
- * elfcode.h (elf_object_p): Also restore the bfd mach field on
- error, by calling bfd_default_set_arch_mach with incoming
- values.
-
-2000-12-26 Kazu Hirata <kazu@hxi.com>
-
- * vaxnetbsd.c: Fix formatting.
- * versados.c: Likewise.
- * vms-gsd.c: Likewise.
- * vms-hdr.c: Likewise.
- * vms-misc.c: Likewise.
-
-2000-12-25 Alexandre Oliva <aoliva@redhat.com>
-
- * archive.c (coff_write_armap): Don't write more than symbol_count
- `archive_member_file_ptr's.
-
-2000-12-25 Kazu Hirata <kazu@hxi.com>
-
- * vms-tir.c: Fix formatting.
-
-2000-12-23 Kazu Hirata <kazu@hxi.com>
-
- * vms.c: Fix formatting.
- * vms.h: Likewise.
-
-2000-12-21 Santeri Paavolainen <santtu@ssh.com>
-
- * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
-
- * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
-
- * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
- arithmetic.
-
- * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
-
- * coffcode.h (styp_to_sec_flags): Add empty statement after label.
-
-2000-12-21 Richard Sandiford <rsandifo@redhat.com>
-
- * libbfd.c (bfd_get_bits): Added
- (bfd_put_bits): Likewise
- * bfd-in.h: Declared the above.
- * bfd-in2.h: Regenerated.
-
-2000-12-20 Kazu Hirata <kazu@hxi.com>
-
- * targets.c: Fix formatting.
- * tekhex.c: Likewise.
- * trad-core.c: Likewise.
-
-2000-12-19 Kazu Hirata <kazu@hxi.com>
-
- * sco5-core.c: Fix formatting.
- * section.c: Likewise.
- * sparclinux.c: Likewise.
- * sparclynx.c: Likewise.
- * sparcnetbsd.c: Likewise.
- * srec.c: Likewise.
- * stabs.c: Likewise.
- * stab-syms.c: Likewise.
- * sunos.c: Likewise.
- * syms.c: Likewise.
- * sysdep.h: Likewise.
-
-2000-12-18 Nick Clifton <nickc@redhat.com>
-
- * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
- defined.
- * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
- * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
-
-2000-12-18 Nick Clifton <nickc@redhat.com>
-
- * vms-misc.c (_bfd_vms_get_record): Add default case to
- file_format switch.
-
-2000-12-15 Miloslav Trmac <mitr@volny.cz>
-
- * elfcore.h (elf_core_file_p): Move to the start of the program
- headers before attempting to read them.
-
-2000-12-14 Kazu Hirata <kazu@hxi.com>
-
- * peigen.c: Fix formatting.
- * som.c: Likewise.
- * som.h: Likewise.
-
-2000-12-13 Kazu Hirata <kazu@hxi.com>
-
- * peigen.c: Fix formatting.
-
-2000-12-12 Jim Wilson <wilson@redhat.com>
-
- * elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
-
-2000-12-08 Mark Salter <msalter@redhat.com>
-
- * binary.c (binary_set_section_contents): Ignore sections
- with zero size.
-
-2000-12-12 Kazu Hirata <kazu@hxi.com>
-
- * m68klinux.c: Fix formatting.
- * m68knetbsd.c: Likewise.
- * mipsbsd.c: Likewise.
- * netbsd-core.c: Likewise.
- * netbsd.h: Likewise.
- * newsos3.c: Likewise.
- * nlm32-alpha.c: Likewise.
- * nlm32-i386.c: Likewise.
- * nlm32-ppc.c: Likewise.
- * nlm32-sparc.c: Likewise.
- * nlmcode.h: Likewise.
- * nlmswap.h: Likewise.
- * nlm-target.h: Likewise.
- * ns32knetbsd.c: Likewise.
-
-2000-12-10 Fred Fish <fnf@be.com>
-
- * elflink.h (elf_link_output_extsym): Don't complain about undefined
- symbols in shared objects if allow_shlib_undefined is true.
-
-2000-12-12 Nick Clifton <nickc@redhat.com>
-
- * cpu-sh.c: Fix formattng.
- * elf.c: Fix formattng.
- * elf32-mips.c: Fix formattng.
- * elf32-sh.c: Fix formattng.
- * elf64-alpha.c: Fix formattng.
-
-2000-12-09 Nick Clifton <nickc@redhat.com>
-
- * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
- dwarf2_find_line_info as last parameter to invocation of
- _bfd_dwarf2_find_nearest_line.
- * elf32-arm.h (elf32_arm_find_nearest_line): Pass
- dwarf2_find_line_info as last parameter to invocation of
- _bfd_dwarf2_find_nearest_line.
-
-2000-12-08 Mark Elbrecht <snowball3@bigfoot.com>
-
- * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
- (BFD_LIBS): ...to here.
- (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
- (BFD_LIBS_CFILES): ...to here.
- * Makefile.in: Regenerate.
- * configure.in: Remove dwarf.lo from the elf shell variable.
- * configure: Regenerate.
- * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
- * libcoff.h: Regenerate.
- * coffgen.c (coff_find_nearest_line): Call
- _bfd_dwarf2_find_nearest_line.
- * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
- accordingly.
- (read_abbrevs): Likewise
- (decode_line_info): Likewise.
- (parse_comp_unit): Likewise.
- (comp_unit_find_nearest_line): Likewise.
- * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
- * libbfd.h: Regenerate.
- * elf.c (_bfd_elf_find_nearest_line): Update call.
- * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
- * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
- * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
- (sec_to_styp_flags): Use them. Handle DWARF2 sections.
- (styp_to_sec_flags): Handle DWARF2 sections.
- * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
- to _bfd_find_nearest_line.
- * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
- call to _bfd_find_nearest_line.
-
-2000-12-08 Kazu Hirata <kazu@hxi.com>
-
- * coffgen.c: Fix formatting.
- * elf-m10300.c: Likewise.
- * elf32-i386.c: Likewise.
- * elf32-i960.c: Likewise.
- * elf32-m68k.c: Likewise.
- * elf32-mcore.c: Likewise.
- * elf32-ppc.c: Likewise.
- * elf32-sh.c: Likewise.
- * elf32-sparc.c: Likewise.
- * elf32-v850.c: Likewise.
- * elf64-alpha.c: Likewise.
- * elf64-hppa.c: Likewise.
- * elf64-mips.c: Likewise.
- * elf64-sparc.c: Likewise.
-
-2000-12-07 Kazu Hirata <kazu@hxi.com>
-
- * elf32-ppc.c: Fix formatting.
- * elf64-x86-64.c: Likewise.
-
-2000-12-06 Ulf Carlsson <ulfc@engr.sgi.com>
-
- From Ralf Baechle <ralf@gnu.org>
-
- * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
- BFDs containing no sections or empty .text, .data or .bss sections
- to be merged, regardless of their flags.
-
-2000-12-06 Kazu Hirata <kazu@hxi.com>
-
- * elf32-m32r.c: Fix formatting.
- * elf32-m68hc11.c: Likewise.
- * elf32-m68hc12.c: Likewise.
- * elf32-m68k.c: Likewise.
- * elf32-mcore.c: Likewise.
- * elf32-pj.c: Likewise.
- * elf32-ppc.c: Likewise.
-
-2000-12-05 Kazu Hirata <kazu@hxi.com>
-
- * elf32-fr30.c: Fix formatting.
- * elf32-hppa.c: Likewise.
- * elf32-i370.c: Likewise.
- * elf32-i386.c: Likewise.
- * elf32-i860.c: Likewise.
- * elf32-i960.c: Likewise.
-
-2000-12-03 Kazu Hirata <kazu@hxi.com>
-
- * elf32-arm.h: Fix formatting.
- * elf32-avr.c: Likewise.
- * elf32-cris.c: Likewise.
- * elf32-d10v.c: Likewise.
- * elf32-d30v.c: Likewise.
- * elf-hppa.h: Likewise.
- * elf-m10200.c: Likewise.
- * elf-m10300.c: Likewise.
-
-2000-12-01 Chris Demetriou <cgd@sibyte.com>
-
- * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
- bfd_mach_mips32_4k. Update FIXME comment.
- * archures.c (bfd_mach_mips32): New constant.
- (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
- the latter, renumber it.
- * bfd-in2.h (bfd_mach_mips32): New constant.
- (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
- the latter, renumber it.
- * cpu-mips.c (I_mips32): New constant.
- (I_mips4K, I_mips32_4k): Rename the former to the latter.
- (arch_info_struct): Add bfd_mach_mips32 entry, replace
- bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
- * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
- (elf_mips_mach): Likewise. Also, replace E_MIPS_MACH_MIPS32
- with E_MIPS_MACH_MIPS32_4K.
- (_bfd_mips_elf_final_write_processing): Replace
- bfd_mach_mips4K with bfd_mach_mips32_4k case, add
- bfd_mach_mips32 case.
- (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
- comparison with support for MIPS32.
- (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
- MIPS32.
-
- * aoutx.h (NAME(aout,machine_type)): Add cases for
- bfd_mach_mips5 and bfd_mach_mips64.
- * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
- * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
- * cpu_mips.c (I_mips5, I_mips64): New definitions.
- (arch_info_struct): Add entries for bfd_mach_mips5 and
- bfd_mach_mips64.
- * elf32-mips.c (elf_mips_isa, elf_mips_mach,
- _bfd_mips_elf_print_private_bfd_data): Add cases for
- E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
- (_bfd_mips_elf_final_write_processing): Add cases for
- bfd_mach_mips5 and bfd_mach_mips64.
-
- * bfd/aoutx.h (NAME(aout,machine_type)): Add a
- bfd_mach_mips_sb1 case.
- * bfd/archures.c (bfd_mach_mips_sb1): New constant.
- * bfd/bfd-in2.h (bfd_mach_mips_sb1): New constant.
- * bfd/cpu-mips.c (I_sb1): New constant.
- (arch_info_struct): Add entry for bfd_mach_mips_sb1.
- * bfd/elf32-mips.c (elf_mips_mach): Add case for
- E_MIPS_MACH_SB1.
- (_bfd_mips_elf_final_write_processing): Add case for
- bfd_mach_mips_sb1.
-
-2000-12-01 Joel Sherrill <joel@OARcorp.com>
-
- * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
- (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
- (sparc*-*-rtems*): Switched from a.out to ELF.
-
-2000-11-30 Jan Hubicka <jh@suse.cz>
-
- * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
- BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
- (elf64-x86-64.lo): Add dependencies.
- * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
- bfd_mach_x86_64_intel_syntax.
- * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
- * config.bfd (x86_64): Add.
- * configure.in: Add support for bfd_elf64_x86_64_vec.
- * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
- (bfd_i386_arch, i8086_ar): Link in.
- * elf64-x86-64.c: New file.
- * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
- * targets.c (bfd_elf64_x86_64_vec): Add.
- (bfd_target_vect): Add bfd_elf64_x86_64_vec.
-
-2000-11-30 Kazu Hirata <kazu@hxi.com>
-
- * xcofflink.c: Fix formatting.
-
-2000-11-28 Kazu Hirata <kazu@hxi.com>
-
- * aoutx.h: Fix formatting.
- * bfd-in.h: Likewise.
- * bfd-in2.h: Likewise.
- * cache.c: Likewise.
- * cisco-core.c: Likewise.
- * coff64-rs6000.c: Likewise.
- * coffcode.h: Likewise.
- * coffswap.h: Likewise.
- * corefile.c: Likewise.
- * elf32-mips.c: Likewise.
-
-2000-11-27 Kazu Hirata <kazu@hxi.com>
-
- * aout-adobe.c: Fix formatting.
- * coff64-rs6000.c: Likewise.
- * coffgen.c: Likewise.
- * cofflink.c: Likewise.
-
-2000-11-27 Philip Blundell <pb@futuretv.com>
-
- * libcoff-in.h (coff_tdata): Add `strings_written' flag.
- (obj_coff_strings_written): New accessor macro for above.
- * libcoff.h: Regenerate.
- * cofflink.c (_bfd_coff_final_link): Say that we wrote the
- strings.
- * coffcode.h (coff_write_object_contents): No need to write out
- the string table if it's already been done.
-
-2000-11-22 Philip Blundell <pb@futuretv.com>
-
- * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
- weak undefined symbols.
-
-2000-11-24 Nick Clifton <nickc@redhat.com>
-
- * archures.c (bfd_mach_arm_5TE): Define.
- (bfd_mach_arm+XScale): Define.
- * bfd-in2.h: Regenerate.
-
- * coff-arm.c (coff_arm_reloc_type_lookup): Accept
- BFD_RELOC_ARM_PCREL_BLX.
-
- * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
- XScale machine numbers.
-
- * config.bfd (xscale-elf): Add target.
- (xscale-coff): Add target.
-
- * cpu-arm.c: Add xscale machine name.
- Add v5t, v5te and XScale machine numbers.
-
-2000-11-23 Kazu Hirata <kazu@hxi.com>
-
- * aix386-core.c: Fix formatting.
-
-2000-11-22 Jim Wilson <wilson@redhat.com>
-
- * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
- (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
- * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
- (ins_imms_scaled): Initialize sign_bit at function entry.
- (elf64_ia64_operands): Add missing initializers.
- * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
- elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
- elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
- elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
- elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
- parameters.
- (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
- and free_extsyms at function entry.
- (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
- (elfNN_ia64_create_dynamic_sections): Delete unused local h.
- (get_got): Delete unused local srel.
- (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
- (elfNN_ia64_relocate_section): Delete unused local dynindx.
-
-2000-11-21 Kazu Hirata <kazu@hxi.com>
-
- * coff-a29k.c: Fix formatting.
- * coff-h8500.c: Likewise.
- * coff-i960.c: Likewise.
- * coff-ppc.c: Likewise.
- * coff-rs6000.c: Likewise.
- * coff-stgo32.c: Likewise.
- * coff-tic54x.c: Likewise.
- * coff-w65.c: Likewise.
- * cpu-h8500.c: Likewise.
- * cpu-hppa.c: Likewise.
- * cpu-ns32k.c: Likewise.
- * ecoff.c: Likewise.
- * ecofflink.c: Likewise.
-
-2000-11-21 Nick Clifton <nickc@redhat.com>
-
- * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
- remove possibility of infinite loop.
-
-2000-11-20 Kazu Hirata <kazu@hxi.com>
-
- * aix386-core.c: Fix formatting.
- * aout-adobe.c: Likewise.
- * aout-arm.c: Likewise.
- * aout-encap.c: Likewise.
- * aout-ns32k.c: Likewise.
- * aout-target.h: Likewise.
- * aout-tic30.c: Likewise.
- * aoutf1.h: Likewise.
- * aoutx.h: Likewise.
- * archive.c: Likewise.
- * bfd-in.h: Likewise.
- * bfd-in2.h: Likewise.
- * bfd.c: Likewise.
- * bout.c: Likewise.
-
-2000-11-17 H.J. Lu <hjl@gnu.org>
-
- * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
- pltoff entries for DT_INIT and DT_FINI.
- (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
- (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
- entries.
-
-2000-11-16 Richard Henderson <rth@redhat.com>
-
- * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
- (allocate_dynrel_entries): Likewise.
- (elfNN_ia64_relocate_section): Likewise. Set REL addends correctly.
- (set_pltoff_entry): Likewise.
- (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
- (elfNN_ia64_reloc_type_lookup): Likewise.
- (elfNN_ia64_install_value): Likewise.
- (elfNN_ia64_relocate_section): Likewise.
- * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
- (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
-
-2000-11-16 Kazu Hirata <kazu@hxi.com>
-
- * cpu-a29k.c: Fix formatting.
- * cpu-alpha.c: Likewise.
- * cpu-arm.c: Likewise.
- * cpu-avr.c: Likewise.
- * cpu-d10v.c: Likewise.
- * cpu-h8500.c: Likewise.
- * cpu-hppa.c: Likewise.
- * cpu-i370.c: Likewise.
- * cpu-i386.c: Likewise.
- * cpu-i960.c: Likewise.
- * cpu-ia64-opc.c: Likewise.
- * cpu-ia64.c: Likewise.
- * cpu-m32r.c: Likewise.
- * cpu-m68hc11.c: Likewise.
- * cpu-m68hc12.c: Likewise.
- * cpu-m68k.c: Likewise.
- * cpu-m88k.c: Likewise.
- * cpu-mips.c: Likewise.
- * cpu-ns32k.c: Likewise.
- * cpu-pj.c: Likewise.
- * cpu-powerpc.c: Likewise.
- * cpu-sh.c: Likewise.
- * cpu-sparc.c: Likewise.
- * cpu-tic54x.c: Likewise.
- * cpu-v850.c: Likewise.
- * cpu-vax.c: Likewise.
- * cpu-w65.c: Likewise.
- * cpu-we32k.c: Likewise.
- * cpu-z8k.c: Likewise.
- * dwarf1.c: Likewise.
- * dwarf2.c: Likewise.
-
-2000-11-15 Kazu Hirata <kazu@hxi.com>
-
- * coff-arm.c: Fix formatting.
- * coff-ppc.c: Likewise.
- * coff-rs6000.c: Likewise.
- * coff-sh.c: Likewise.
- * coff-sparc.c: Likewise.
- * coff-tic30.c: Likewise.
- * coff-tic54x.c: Likewise.
- * coff-tic80.c: Likewise.
- * coff-w65.c: Likewise.
- * coff-we32k.c: Likewise.
- * coff-z8k.c: Likewise.
-
-2000-11-15 Richard Henderson <rth@redhat.com>
-
- * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
- section with the same ALLOC|LOAD flags as the source section.
-
-2000-11-14 Jakub Jelinek <jakub@redhat.com>
-
- * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
- by STO_ALPHA constants.
-
-2000-11-14 Kazu Hirata <kazu@hxi.com>
-
- * coff-pmac.c: Fix formatting.
- * coff-ppc.c: Likewise.
-
-2000-11-13 H.J. Lu <hjl@gnu.org>
-
- * elflink.h (elf_link_add_object_symbols): Also add indirect
- symbols for common symbols with the default version.
-
-2000-11-09 Philip Blundell <pb@futuretv.com>
-
- * section.c (STD_SECTION): Set gc_mark flag.
-
-2000-11-11 Kazu Hirata <kazu@hxi.com>
-
- * coff-i960.c: Likewise.
- * coff-m68k.c: Likewise.
- * coff-m88k.c: Likewise.
- * coff-mcore.c: Likewise.
- * coff-mips.c: Likewise.
-
-2000-11-11 Bernd Schmidt <bernds@cygnus.co.uk>
-
- * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
-
-2000-11-10 Kazu Hirata <kazu@hxi.com>
-
- * coff-h8300.c: Fix formatting.
- * coff-h8500.c: Likewise.
- * coff-i386.c: Likewise.
- * coff-i860.c: Likewise.
- * coff-i960.c: Likewise.
- * coff-ia64.c: Likewise.
-
-2000-11-09 Kazu Hirata <kazu@hxi.com>
-
- * archive.c: Fix formatting.
- * archures.c: Likewise.
-
-2000-11-07 Richard Henderson <rth@redhat.com>
-
- * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
- Set it before bfd_elf64_bfd_final_link call. Use it after the call.
- * section.c (bfd_set_section_contents): Call memcpy if
- section->contents set and location not equal to contents plus offset.
-
-2000-11-08 Kazu Hirata <kazu@hxi.com>
-
- * bfd-in.h: Fix formatting.
- * bfd-in2.h: Likewise.
- * bfd.c: Likewise.
- * binary.c: Likewise.
- * bout.c: Likewise.
- * coff-a29k.c: Likewise.
- * coff-alpha.c: Likewise.
- * coff-apollo.c: Likewise.
- * coff-aux.c: Likewise.
-
-2000-11-07 Kazu Hirata <kazu@hxi.com>
-
- * aix386-core.c: Fix formatting.
- * aoutf1.h: Likewise.
- * aoutx.h: Likewise.
- * archures.c: Likewise.
- * armnetbsd.c: Likewise.
-
-2000-11-07 Alan Modra <alan@linuxcare.com.au>
-
- * coff-h8300.c (special): Adjust reloc address.
-
-2000-11-06 Steve Ellcey <sje@cup.hp.com>
-
- * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
- to differentiate elf32 and elf64 on ia64.
- * bfd-in2.h: Regenerate.
- * config.bfd: Add target for "ia64*-*-hpux*".
- * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
- * configure: Regenerate.
- * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
- * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
-
- * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
- from elfxx-ia64.c. Add depenency rules for making elf32-ia64.lo.
- * Makefile.in: Regnerate.
- * elf64-ia64.c: Deleted.
- * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
-
-2000-11-06 Kazu Hirata <kazu@hxi.com>
-
- * aout-adobe.c: Fix formatting.
- * aout-arm.c: Likewise.
- * aout-cris.c: Likewise.
- * aout-encap.c: Likewise.
- * aout-ns32k.c: Likewise.
- * aout-target.h: Likewise.
- * aout-tic30.c: Likewise.
-
-2000-11-05 Philip Blundell <philb@gnu.org>
-
- * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
- BFDs containing no sections to be merged, regardless of their flags.
-
-2000-11-04 Philip Blundell <philb@gnu.org>
-
- * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
- if a relocation for an undefined symbol also results in an
- overflow.
-
-2000-11-06 Christopher Faylor <cgf@cygnus.com>
-
- * config.bfd: Add support for Sun Chorus.
-
-2000-11-05 David O'Brien <obrien@FreeBSD.org>
-
- * configure.in: Recognize alpha-*-freebsd*.
- * configure: Regenerate.
-
-2000-11-02 Luciano Gemme <ishitawa@yahoo.com>
-
- * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
- (Chunk): New global variable set by a parameter in objcopy.c.
- (S3Forced): New global variable set by a parameter in
- objcopy.c.
- (srec_set_section_contents): If S3Forced is true, always generate
- S3 records.
- (srec_write_section): Use 'Chunk' to limit maximum length of S
- records.
-
-2000-11-02 Per Lundberg <plundis@chaosdev.org>
-
- * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
- * Makefile.in: Regenerate.
- * bfd-in2.h: Regenerate.
- * po/bfd.pot: Regenerate.
-
-2000-10-31 Philip Blundell <philb@gnu.org>
-
- * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
- EF_SOFT_FLOAT if it is defined.
-
-2000-10-27 Philip Blundell <philb@gnu.org>
-
- * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
- attempts to mix PIC code with non-PIC, just mark the output as
- being position dependent.
- (elf32_arm_merge_private_bfd_data): Likewise. Print an error
- message for EF_SOFT_FLOAT mismatches. Display diagnostics for
- all mismatches, not just the first one.
-
-2000-10-25 Chris Demetriou <cgd@sibyte.com>
-
- * ieee.c (ieee_archive_p): Plug one of many possible
- memory leaks in error handling.
-
-2000-10-20 Jakub Jelinek <jakub@redhat.com>
-
- * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
- elf32_sparc_object_p, elf32_sparc_final_write_processing):
- Support v8plusb.
- * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
- sparc64_elf_object_p): Support v9b.
- * archures.c: Declare v8plusb and v9b machines.
- * bfd-in2.h: Ditto.
- * cpu-sparc.c: Ditto.
-
-2000-10-16 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
-
- * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
- of a GOT reloc.
-
- * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
- (SYMBOL_CALLS_LOCAL): New macro.
- (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
- (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
- (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
- (ppc_elf_relocate_section): Use flag variable to determine
- whether the relocation refers to a local symbol.
- Test whether a PLTREL24 reloc will produce a reloc by looking
- to see whether a PLT entry was made.
-
-2000-10-14 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
-
- * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
- entries that could serve as a definition for a weak symbol.
-
-2000-10-13 Ulf Carlsson <ulfc@engr.sgi.com>
-
- From Ralf Baechle <ralf@gnu.org>
-
- * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
- local_p. Add symbol value only for non-R_MIPS_REL32 relocations
- against local symbols.
- (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
-
-2000-10-12 Alan Modra <alan@linuxcare.com.au>
-
- * section.c (struct sec): Add kept_section.
- (struct bfd_comdat_info): Remove sec, we can use above.
- (STD_SECTION): Add initializer.
- (bfd_make_section_anyway): Init here too.
-
- * bfd-in2.h: Regenerate.
-
- * elflink.h (elf_link_add_object_symbols): Remove unnecessary
- zeroing of `flags'.
- (elf_link_input_bfd): Set all asection->symbol->value's here, and
- fudge values for discarded link-once section symbols.
-
- * elf64-hppa.c: Include alloca-conf.h
-
-2000-10-11 Alan Modra <alan@linuxcare.com.au>
-
- * elf.c (swap_out_syms): Revert 2000-10-07 changes.
-
- * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
-
-2000-10-10 Alan Modra <alan@linuxcare.com.au>
-
- * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
-
-2000-10-10 Tom Rix <trix@redhat.com>
-
- * section.c (bfd_make_section_anyway): Release newsect ptr when
- newsect->symbol fails to alloc. Use bfd_release instead of free.
-
-2000-10-09 Richard Henderson <rth@cygnus.com
-
- * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
- (elf64_ia64_unwind_entry_compare): New.
- (elf64_ia64_final_link): Sort the .IA_64.unwind section.
-
-2000-10-07 Alan Modra <alan@linuxcare.com.au>
-
- * elflink.h (size_dynamic_sections): Don't create various tags if
- .dynstr is excluded from the link. Don't set first dynsym entry
- if dynsymcount is zero.
- (elf_bfd_final_link): Don't try to swap out dynamic syms if
- .dynsym excluded from the link. Don't try to write any dynamic
- sections excluded from the link.
-
- * elf.c (swap_out_syms): Handle global section symbols.
-
-2000-10-05 DJ Delorie <dj@redhat.com>
-
- * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
- * coffcode.h (coff_set_alignment_hook): read extended reloc count
- (coff_write_relocs): write extended reloc count
- (coff_write_object_contents): account for extended relocs
-
-2000-10-05 Jim Wilson <wilson@cygnus.com>
-
- * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
- field.
- * elf.c (_bfd_elf_make_section_from_shdr): Call the
- elf_backend_section_flags function.
- * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
- code.
- (elf64_ia64_section_flags): New function containing flag conversion
- code.
- (elf_backend_section_flags): Define to elf64_ia64_section_flags.
- * elfxx-target.h (elf_backend_section_flags): Define.
- (elfNN_bed): Initialize elf_backend_section_flags field.
-
-2000-10-02 Alan Modra <alan@linuxcare.com.au>
-
- * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
- _bfd_elf32_gc_record_vtable. Correct a comment.
-
-2000-10-01 Ulf Carlsson <ulfc@engr.sgi.com>
-
- From Ralf Baechle <ralf@gnu.org>
-
- * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
- produces binaries with got[1] = 0x80000001 to differenciate them
- for the dynamic linker from the broken binaries produced by old
- versions.
-
-2000-09-30 Petr Sorfa <petrs@sco.com>
-
- * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
- (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
- * configure.in: Add check for pxstatus_t and lwpxstatus_t.
- * configure: Regenerate.
-
-2000-09-27 Hans-Peter Nilsson <hp@axis.com>
-
- Define two bfd_targets for absence and presence of leading
- underscore on symbols. Make sure to only link same kind.
- * elf32-cris.c (cris_elf_object_p,
- cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
- cris_elf_merge_private_bfd_data): New.
- (elf_backend_object_p, elf_backend_final_write_processing,
- bfd_elf32_bfd_print_private_bfd_data,
- bfd_elf32_bfd_merge_private_bfd_data): Define.
- <Target vector definition>: Include elf32-target.h twice with
- different macro settings:
- (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
- bfd_elf32_us_cris_vec.
- (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
- (elf_symbol_leading_char): First as 0, then '_'.
- (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
- * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
- * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
- * configure: Regenerate.
- * targets.c: Declare bfd_elf32_us_cris_vec.
- * po/bfd.pot: Regenerate.
-
-2000-09-29 Momchil Velikov <velco@fadata.bg>
-
- * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
- R_ARM_THM_PC22 relocations.
-
-2000-09-29 NIIBE Yutaka <gniibe@chroot.org>
-
- * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
-
-2000-09-29 Momchil Velikov <velco@fadata.bg>
-
- * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
- is has the SEC_HAS_CONTENTS flag set.
-
-2000-09-28 Örjan Friberg <orjanf@axis.com>
- Hans-Peter Nilsson <hp@axis.com>
-
- * aout-cris.c (N_TXTADDR): Define.
-
-2000-09-28 John David Anglin <dave@hiauly1.hia.nrc.ca>
-
- * som.c: Include alloca-conf.h.
- * Makefile.am: "make dep-am"
- * Makefile.in: Regenerate.
-
-2000-09-27 Alan Modra <alan@linuxcare.com.au>
-
- * elf32-hppa.c (plt_stub): New.
- (PLT_STUB_ENTRY): Define.
- (elf32_hppa_link_hash_table): Change multi_subspace to packed
- boolean. Add need_plt_stub, has_12bit_branch and has_17bit_branch.
- (elf32_hppa_link_hash_table_create): Init to suit.
- (elf32_hppa_check_relocs): Set has_12bit_branch and
- has_17bit_branch as appropriate.
- (elf32_hppa_adjust_dynamic_symbol): Set need_plt_stub for
- non-local functions.
- (elf32_hppa_size_dynamic_sections): Correct setting of reltext.
- Add space for plt_stub as needed.
- (elf32_hppa_finish_dynamic_symbol): Point .plt entries for global
- functions at plt_stub.
- (elf32_hppa_finish_dynamic_sections): Write plt_stub.
- (elf32_hppa_create_dynamic_sections): Leave .plt executable.
-
- * elf32-hppa.h (elf32_hppa_size_stubs): Add group_size param.
- * elf32-hppa.c (elf32_hppa_size_stubs): Likewise. Use it instead
- of fixed size, and if negative, disable handling of input sections
- before stub section. Set up default stub group size depending
- on detected branch relocs.
- (hppa_build_one_stub): Use lrsel and rrsel for import stubs to
- ensure different offsets from sym_value aren't rounded to
- different 2k blocks. Use lrsel and rrsel for other stubs too for
- consistency rather than necessity.
- (elf32_hppa_check_relocs): Handle R_PARISC_DIR14F.
- (final_link_relocate): Likewise.
- (elf32_hppa_relocate_section): Likewise.
-
- * elf-hppa.h (elf_hppa_howto_table): Add R_PARISC_DIR14F reloc.
- (_bfd_elf_hppa_gen_reloc_type): Generate them.
- (elf_hppa_final_link_relocate): Handle them.
- (elf_hppa_relocate_insn): Likewise.
- (_bfd_elf_hppa_gen_reloc_type): Add missing e_ldsel and e_rdsel cases.
-
-2000-09-26 Hans-Peter Nilsson <hp@axis.com>
-
- * elfcode.h (elf_object_p): Preserve and clear abfd section
- information. Restore at error.
-
-2000-09-26 Paul Sokolovsky <Paul.Sokolovsky@technologist.com>
-
- * peigen.c (_bfd_pei_swap_aouthdr_in): If some DataDirectory
- is empty, make sure that its rva also 0. NT loader dislikes
- having otherwise.
-
-2000-09-26 Steve Ellcey <sje@cup.hp.com>
-
- * som.c (som_bfd_derive_misc_symbol_info): Make weak symbols
- global by default.
-
-2000-09-21 Alan Modra <alan@linuxcare.com.au>
-
- * elf32-hppa.c (elf32_hppa_check_relocs): Fix weak sym handling in
- currently unused RELATIVE_DYNAMIC_RELOCS code.
- (hppa_discard_copies): Likewise.
- (elf32_hppa_size_stubs): Size `input_list' array correctly. Correct
- comments. Don't check non-code output sections for stub grouping.
-
-2000-09-20 Alan Modra <alan@linuxcare.com.au>
-
- * section.c (bfd_get_unique_section_name): Return NULL if
- bfd_malloc fails.
-
-2000-09-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
-
- * elf32-m68k.c (elf_cpu32_plt0_entry): Change the PLT entry 0
- instruction sequence to actually work.
- (elf_m68k_finish_dynamic_sections): Change the patch-in offset
- accordingly.
-
-2000-09-18 Alexandre Oliva <aoliva@redhat.com>
-
- * elf32-sh.c (sh_elf_relocate_section): Use
- _bfd_final_link_relocate to apply the relocation against a section
- symbol, when doing relocatable links.
-
-2000-09-18 Alan Modra <alan@linuxcare.com.au>
-
- * elf32-hppa.c (elf32_hppa_stub_hash_entry): Rename input_section
- to id_sec.
- (stub_hash_newfunc): Here too.
- (hppa_add_stub): And here.
- (elf32_hppa_link_hash_table): Remove stub_section_created,
- reloc_section_created, first_init_sec and first_fini_sec. Add
- stub_group.
- (elf32_hppa_link_hash_table_create): Init to suit.
- (hppa_get_stub_entry): Add support for grouping stub sections.
- (hppa_add_stub): Likewise. Remove sec_count param and init/fini
- section code. Index stub vars by section->id.
- (elf32_hppa_size_stubs): Likewise. Remove duplicated function
- exit paths. Zap allocation of above removed vars. Refine
- link-once test.
-
- * elf32-hppa.h (elf32_hppa_size_stubs): Add output_bfd param.
- * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
- (hppa_get_stub_entry): Pass in pointer to elf32_hppa_link_hash_table
- rather than pointer to bfd_link_info.
- (hppa_add_stub): Likewise.
- (final_link_relocate): Likewise.
-
-2000-09-17 David Huggins-Daines <dhd@linuxcare.com>
-
- (elf32_hppa_size_stubs): Don't try to build stubs for discarded
- link-once sections.
-
-2000-09-16 Alexandre Oliva <aoliva@redhat.com>
-
- * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match
- ld/emulparams/shelf.sh.
-
-2000-09-10 Michael Sokolov <msokolov@ivan.Harhan.ORG>
-
- * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): New function.
- * bfd-in.h (bfd_m68k_elf32_create_embedded_relocs): Add declaration.
- * bfd-in2.h: Regenerate.
-
-2000-09-15 Kenneth Block <Kenneth.Block@compaq.com>
-
- * bfd/elf64-alpha.c (elf64_alpha_relax_with_lituse): ld performs
- LITUSE relocations incorrectly if -relax is specified on the ld
- command line and the displacement field of the load or store
- instruction is non-zero. (Patch by paul.winalski@compaq.com)
-
-2000-09-15 Alan Modra <alan@linuxcare.com.au>
-
- * elf32-hppa.c (hppa_add_stub): Dont set first_init_sec and
- first_fini_sec here.
- (elf32_hppa_size_stubs): Instead correctly find the first .init
- and .fini section here.
-
-2000-09-15 David Huggins-Daines <dhd@linuxcare.com>
-
- * elf32-hppa.c (clobber_millicode_symbols): New function.
- (elf32_hppa_size_dynamic_sections): Call it.
-
-2000-09-14 Alan Modra <alan@linuxcare.com.au>
-
- * elf32-hppa.c (elf32_hppa_link_hash_entry): Make pic_call
- packed. Add plabel, plt_abs packed booleans.
- (hppa_link_hash_newfunc): Init new fields.
- (PLABEL_PLT_ENTRY_SIZE): Define.
- (hppa_stub_name): Use size_t len vars.
- (hppa_add_stub): Likewise.
- (elf32_hppa_build_stubs): Likewise.
- (hppa_build_one_stub): Kill some compiler warnings.
- (elf32_hppa_check_relocs): Always generate a plt entry for PLABELs
- if dynamic linking. Munge the local plt offsets into
- local_got_refcounts. Set h->plabel for all global PLABELs. Use
- size_t len vars. Add assert for plabel addend.
- (elf32_hppa_gc_sweep_hook): Sweep local plt entries too.
- (elf32_hppa_hide_symbol): New function.
- (elf_backend_hide_symbol): Define.
- (elf32_hppa_adjust_dynamic_symbol): Don't throw away plt entries
- with h->plabel set. Don't make plt entries to have dynamic syms
- when they have been forced local. If plt entry is used by a
- plabel, make it PLABEL_PLT_ENTRY_SIZE.
- (elf32_hppa_size_dynamic_sections): Set plt_abs for init fns.
- Set up .plt offsets for local syms.
- (elf32_hppa_relocate_section): Initialise plt entries for local
- syms. Leave weak undefined plabels zero. Make global plabel
- relocs against function symbol, and leave the addend zero.
- Use *ABS* DIR32 relocs instead of SEGREL32 for dynamic got relocs.
- (elf32_hppa_finish_dynamic_symbol): Set up IPLT relocs for
- non-dynamic syms. Init extra plt for plabels. Use *ABS* DIR32
- relocs instead of SEGREL32 for dynamic got relocs.
- (elf32_hppa_finish_dynamic_sections): Reserve one more .got entry.
- (elf_backend_got_header_size): Adjust.
- (elf32_hppa_set_gp): Calculate an "ideal" LTP.
-
- * elf32-hppa.c (LONG_BRANCH_VIA_PLT): Define.
- (hppa_type_of_stub): Use it instead of #if 0
- (hppa_discard_copies): Use it here too.
- (elf32_hppa_size_dynamic_sections): And here.
-
- * elf32-hppa.c (elf32_hppa_link_hash_table): Remove `offset' field.
- (elf32_hppa_link_hash_table_create): And here.
- (hppa_build_one_stub): And here. Instead keep track of stub
- offset using _raw_size.
- (elf32_hppa_size_stubs): Likewise.
- (elf32_hppa_build_stubs): Likewise.
- (hppa_size_one_stub): Likewise. Resize reloc section too.
-
- * elf32-hppa.c (hppa_add_stub): Correct first_init_sec and
- first_fini_sec handling. Don't search for reloc section or set
- hplink->reloc_section_created here.
- (elf32_hppa_size_stubs): Instead search for reloc sections, and
- set reloc_section_created here.
- (hppa_handle_PIC_calls): Set ELF_LINK_HASH_NEEDS_PLT.
- (elf32_hppa_size_dynamic_sections): Make a .plt entry for DT_INIT
- and DT_FINI.
- (elf32_hppa_finish_dynamic_sections): Set DT_INIT and DT_FINI.
-
- * elf32-hppa.c (hppa_build_one_stub): Replace `elf_hash_table (info)'
- with `hplink->root.'.
- (elf32_hppa_check_relocs): Likewise.
- (elf32_hppa_gc_sweep_hook): Likewise.
- (elf32_hppa_adjust_dynamic_symbol): Likewise.
- (hppa_handle_PIC_calls): Likewise.
- (elf32_hppa_size_dynamic_sections): Likewise.
- (elf32_hppa_set_gp): Likewise.
- (elf32_hppa_relocate_section): Likewise.
- (elf32_hppa_finish_dynamic_symbol): Likewise.
- (elf32_hppa_finish_dynamic_sections): Likewise.
-
- From David Huggins-Daines <dhd@linuxcare.com>
- * elf32-hppa.c (hppa_type_of_stub): Generate import stubs for
- defined weak symbols in shared links.
- (final_link_relocate): Calls to defined weak symbols in shared
- objects must go via import stubs, as the target might not be known
- at link time.
-
-2000-09-14 Alexandre Oliva <aoliva@redhat.com>
-
- * elf32-sh.c (sh_elf_howto_table): Moved R_SH_GOT32, R_SH_PLT32,
- R_SH_COPY, R_SH_GLOB_DAT, R_SH_JMP_SLOT, R_SH_RELATIVE,
- R_SH_GOTOFF, R_SH_GOTPC) to the range from 160 to 167. Replaced
- the original entries with EMPTY_HOWTOs, and added new ones to fill
- in the gap.
- (sh_elf_info_to_howto): Make sure the new gap isn't used.
- (sh_elf_relocate_section): Likewise.
-
-2000-09-13 Anders Norlander <anorland@acc.umu.se>
-
- * cpu-mips.c (arch_info_struct): Add mips:4K
- * bfd-in2.h (bfd_mach_mips4K): New define.
- * archures.c: Add bfd_mach_mips4K to comment.
- * elf32-mips.c (_bfd_mips_elf_final_write_processing): Return
- E_MIPS_ARCH_2 for bfd_mach_mips4K.
-
-2000-09-13 Marco Franzen <marcof@thyron.com>
-
- * som.c (som_write_symbol_strings): Do not used fixed buffers,
- use size_t as a counter.
- (som_write_space_strings): Similarly.
-
-2000-09-12 Jason Eckhardt <jle@cygnus.com>
-
- * elf32-i860.c (elf32_i860_relocate_pc26): New function
- and prototype.
- (elf32_i860_relocate_section): Invoke new function from here.
-
-2000-09-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
-
- * elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names
- static.
-
-2000-09-10 Michael Sokolov <msokolov@ivan.Harhan.ORG>
-
- * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Emit 8 NULs for
- target section name instead of dumping core when the target symbol is
- undefined.
-
-2000-09-09 Kazu Hirata <kazu@hxi.com>
-
- * riscix.c: Remove DEFUN.
-
-2000-09-08 Nick Clifton <nickc@redhat.com>
-
- * elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not
- initialise flags in output bfd if the input bfd is the default
- architecture with the default flags.
-
-2000-09-08 Kazu Hirata <kazu@hxi.com>
-
- * archive.c: Fix formatting.
- * coff-arm.c: Likewise.
- * doc/chew.c: Likewise.
-
-2000-09-08 Alan Modra <alan@linuxcare.com.au>
-
- * section.c (bfd_get_unique_section_name): Put a dot before the
- numeric suffix.
-
-2000-09-07 Kazu Hirata <kazu@hxi.com>
-
- * doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID.
- * elf.c: Fix formatting.
-
-2000-09-07 Alexandre Oliva <aoliva@redhat.com>
-
- * config.bfd (sh-*-linux*): Added.
- * configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New.
- * targets.c: Declare them.
- * elf32-sh-lin.c: New file.
- * Makefile.am: Compile it.
- * elf32-sh.c: Don't override defines from elf32-sh-lin.c.
- * configure, Makefile.in: Rebuilt.
-
-2000-09-06 Geoffrey Keating <geoffk@cygnus.com>
-
- * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
- pseduo-section when determining where the TOC ends.
-
- * coff-rs6000.c (_bfd_xcoff_swap_aux_out): Use bfd_h_put_16 to
- output x_tvndx as it is only two bytes wide.
-
- * coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute
- reloc is 26 or 32 bits wide.
-
- * coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant
- for relocs that don't change anything. Also look at the full
- 6 bits of bitsize.
-
-2000-09-06 Philip Blundell <philb@gnu.org>
-
- * config.bfd (arm*-*-uclinux*): New target.
-
-2000-09-06 Alexandre Oliva <aoliva@redhat.com>
-
- * configure: Rebuilt with new libtool.m4.
-
-2000-09-06 Alan Modra <alan@linuxcare.com.au>
-
- * section.c (bfd_get_unique_section_name): Avoid c++ reserved
- word for variable name.
- * bfd-in2.h: Regenerate.
-
-2000-09-05 Nick Clifton <nickc@redhat.com>
-
- * config.in: Regenerate.
- * libbfd.h: Regenerate.
- * po/bfd.pot: Regenerate.
- * doc/bfdint.texi: Remove CVS date string - it foils compares with
- local versions.
-
-2000-09-05 Steven Johnson <sbjohnson@ozemail.com.au>
-
- * cpu-powerpc.c (arch_info_struct): Added MPC860 Family entry.
-
-2000-09-05 Alan Modra <alan@linuxcare.com.au>
-
- Shared library and PIC support.
- * elf32-hppa.c (PLT_ENTRY_SIZE): New.
- (GOT_ENTRY_SIZE): New.
- (ELF_DYNAMIC_INTERPRETER): New.
- (STUB_SUFFIX): Define.
- (LONG_BRANCH_PIC_IN_SHLIB): Define.
- (RELATIVE_DYNAMIC_RELOCS): Define.
- (enum elf32_hppa_stub_type): New.
- (struct elf32_hppa_stub_hash_entry): Rename offset to
- stub_offset. Add a number of new fields.
- (struct elf32_hppa_link_hash_entry): New.
- (struct elf32_hppa_link_hash_table): Add numerous fields. Remove
- global_value.
- (elf32_hppa_hash_table): Rename to hppa_link_hash_table.
- (elf32_hppa_stub_hash_lookup): Rename to hppa_stub_hash_lookup.
- (elf32_hppa_stub_hash_newfunc): Rename to stub_hash_newfunc. Init
- new fields.
- (hppa_link_hash_newfunc): New function.
- (elf32_hppa_link_hash_table_create): Use above function. Init new
- fields.
- (elf32_hppa_stub_name): Rename to hppa_stub_name. Pass in reloc
- instead of addend, and remove sym_name from args. Don't use
- symbol name for local syms, instead use sym index.
- (elf32_hppa_size_of_stub): Rename to hppa_type_of_stub, and return
- stub type rather than size. Pass in hash and handle import stub
- case. Also pass in reloc instead of offset so we can calculate
- PCREL22F and PCREL12F branches properly.
- (elf32_hppa_build_one_stub): Rename to hppa_build_one_stub. Build
- import and export stubs too.
- (elf32_hppa_size_one_stub): Rename to hppa_size_one_stub. Handle
- import and export stub sizing.
- (elf32_hppa_check_relocs): New function.
- (elf32_hppa_adjust_dynamic_symbol): New function.
- (hppa_discard_copies): New function.
- (elf32_hppa_size_dynamic_sections): New function.
- (elf_backend_size_dynamic_sections): Define.
- (elf32_hppa_finish_dynamic_symbol): New function.
- (elf_backend_finish_dynamic_symbol): Define.
- (elf32_hppa_size_stubs): Stash params in link hash table, and move
- some local vars into the link hash table too. For shared links,
- trundle over function syms, generating export stubs. Handle
- PCREL22F branches. Break out stub creation code from here..
- (hppa_add_stub): .. to here. New function.
- (elf32_hppa_final_link): Rename to elf32_hppa_set_gp, and don't
- call the bfd linker. Use elf_gp to record global pointer.
- Calculate a value from sections if $global$ is missing.
- (bfd_elf32_bfd_final_link): Define as _bfd_elf32_gc_common_final_link.
- (elf32_hppa_gc_mark_hook): New function.
- (elf_backend_gc_mark_hook): Define.
- (elf32_hppa_gc_sweep_hook): New function.
- (elf_backend_gc_sweep_hook): Define.
- (elf32_hppa_bfd_final_link_relocate): Rename to final_link_relocate.
- Add rel to args, and remove howto, input_bfd, offset, addend,
- sym_name as we can recalculate these locally. Handle calls to
- dynamic objects, extra PIC relocs, PCREL22F branches. Change
- handling of undefined weak syms. Check that stubs are in range.
- Only look for import stubs on PCREL17F and PCREL22F relocs. Add
- message on hitting a DPREL21L reloc that needs fixing. Subtract
- off PC for PCREL14F. Break out code that does a stub lookup from
- here..
- (hppa_get_stub_entry): ..to here. New function.
- (elf32_hppa_relocate_insn): Merge into final_link_relocate.
- (elf32_hppa_relocate_section): Handle got and plt relocs, dynamic
- relocs, etc. etc.
- (elf32_hppa_finish_dynamic_sections): New function.
- (elf_backend_finish_dynamic_sections): Define.
- (elf_backend_final_write_processing) Define.
- (hppa_handle_PIC_calls): New function.
- (elf32_hppa_build_stubs): Call it. Pass link_info to
- hppa_build_one_stub.
- (elf32_hppa_create_dynamic_sections): New function
- to create .plt and .got then set .plt flags correctly.
- (elf_backend_create_dynamic_sections): Define.
- (elf32_hppa_object_p): New function.
- (elf_backend_object_p): Define.
- (elf32_hppa_elf_get_symbol_type): New function.
- (elf_backend_get_symbol_type): Define.
- (elf_backend_can_gc_sections): Define.
- (elf_backend_want_got_plt): Define.
- (elf_backend_plt_alignment): Set to 2.
- (elf_backend_plt_readonly): Define.
- (elf_backend_want_plt_sym): Define.
- (elf_backend_got_header_size): Reserve one entry.
-
- * elf32-hppa.h (elf32_hppa_build_stubs): Don't pass stub bfd.
- (elf32_hppa_size_stubs): Pass in multi_subspace.
- (elf32_hppa_set_gp): Declare.
-
- * section.c (SEC_HAS_GOT_REF): Define new flag for asection.
- (bfd_get_unique_section_name): New function.
- * bfd_in2.h: Regenerate.
-
- * elf64-hppa.c (elf64_hppa_check_relocs): Handle R_PARISC_PCREL12F.
- (elf64_hppa_size_dynamic_sections): Remove the FIXME at bfd_zalloc
- comment.
+2002-01-18 Alan Modra <amodra@bigpond.net.au>
- From David Huggins-Daines <dhd@linuxcare.com>
- * elf64-hppa.c (elf64_hppa_check_relocs): Fix a warning.
- (elf64_hppa_mark_exported_functions): Set dyn_h->st_shndx.
- (elf64_hppa_link_output_symbol_hook): Test dyn_h->st_shndx has
- been updated in finish_dynamic_symbol before modifying function
+ * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Test for a
+ dynamic function descriptor symbol, not the associated function
symbol.
- * elf-hppa.h (elf_hppa_howto_table): Restructure into groups of
- eight entries. Replace NULL with bfd_elf_generic_reloc. Add
- R_PARISC_GNU_VTENTRY, R_PARISC_GNU_VTINHERIT and R_PARISC_PCREL12F.
- (_bfd_elf_hppa_gen_reloc_type): Handle R_PARISC_GNU_VT*. Add some
- comments. Handle format == 12 for R_HPPA_PCREL_CALL.
- (elf_hppa_final_link_relocate): Handle R_PARISC_PCREL12F.
- (elf_hppa_relocate_insn): Likewise. Reformat some comments.
- (elf_hppa_final_write_processing): Expose it for ARCH_SIZE == 32.
-
- From David Huggins-Daines <dhd@linuxcare.com>
- * elf-hppa.h (elf_hppa_is_local_label_name): Accept the SysV/ELF
- style of local labels as well.
-
-2000-09-03 Philip Blundell <philb@gnu.org>
-
- * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
- references to undefined symbols in debugging sections.
+2002-01-17 Eric Christopher <echristo@redhat.com>
-2000-09-02 H.J. Lu <hjl@gnu.org>
+ * elf32-mips.c (mips_elf_calculate_relocation): Fix typo.
- * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
- BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE,
- BFD_RELOC_SH_GOTPC): Move them from the MIPS section to the SH
- section.
+2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
-2000-09-02 Jason Eckhardt <jle@cygnus.com>
-
- * elf32-i860.c (bfd_elf32_bfd_is_local_label_name): Define macro.
- (elf32_i860_is_local_label_name): New function and prototype.
-
-2000-09-02 Nick Clifton <nickc@redhat.com>
-
- * configure.in: Increase version number to 2.10.91.
- * configure: Regenerate.
- * aclocal.m4: Regenerate.
- * config.in: Regenerate.
* po/bfd.pot: Regenerate.
-
-2000-09-02 Daniel Berlin <dberlin@redhat.com>
-
- * elf.c (_bfd_elf_make_section_from_shdr): Add
- .gnu.linkobce.wi. to the list of debug section names.
-
-2000-09-02 Nick Clifton <nickc@redhat.com>
-
- * dwarf2.c (find_debug_info): New function: Locate a section
- containing dwarf2 debug information.
- (bfd_dwarf2_find_nearest_line): Find all sections containing
- debug information and include them in the stash.
-
-2000-09-01 Niibe Yutaka <gniibe@m17n.org>, Kaz Kojima <kkojima@rr.iij4u.or.jp>, Alexandre Oliva <aoliva@redhat.com>
-
- * elf32-sh.c (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
- R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New.
- (sh_reloc_map): Add new relocs.
- (sh_elf_check_relocs, sh_elf_link_hash_newfunc,
- sh_elf_link_hash_table_create, sh_elf_adjust_dynamic_symbol,
- sh_elf_size_dynamic_sections, sh_elf_finish_dynamic_symbol,
- sh_elf_finishe_dynamic_sections, sh_elf_discard_copies): New
- functions.
- (ELF_DYNAMIC_INTERPRETER, PLT_ENTRY_SIZE): Define.
- (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
- elf_sh_plt_entry_be, elf_sh_plt_entry_le,
- elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
- New array constants.
- (elf_sh_plt0_entry, elf_sh_plt_entry, elf_sh_pic_plt_entry):
- New variables.
- (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
- elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset,
- elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset,
- elf_sh_plt_reloc_offset): Define.
- (elf_sh_pcrel_relocs_copied, elf_sh_link_hash_entry,
- elf_sh_link_hash_table): New structs.
- (sh_elf_link_hash_traverse, sh_elf_hash_table): New macros.
- (sh_elf_relocate_section, sh_elf_check_relocs): Handle new
- relocation types.
- (elf_backend_create_dynamic_sections,
- bfd_elf32_bfd_link_hash_table_create,
- elf_backend_adjust_dynamic_symbol,
- elf_backend_size_dynamic_sections,
- elf_backend_finish_dynamic_symbol,
- elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
- elf_backend_plt_readonly, elf_backend_want_plt_sym,
- elf_backend_got_header_size, elf_backend_plt_header_size):
- Define.
- * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
- BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC):
- New relocs.
- * bfd-in2.h, libbfd.h: Rebuilt.
-
-2000-09-01 Alan Modra <alan@linuxcare.com.au>
-
- * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert 2000-08-27
- change.
-
-2000-08-31 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * elf32-sh.c (sh_elf_merge_private_data): If ibfd's elf header flags
- not initialized, set them to indicate the SH1 instruction set.
-
-2000-08-31 Alexandre Oliva <aoliva@redhat.com>
-
- * acinclude.m4: Include libtool and gettext macros from the
- top level.
- * aclocal.m4, configure: Rebuilt.
-
-2000-08-29 Michael Snyder <msnyder@seadog.cygnus.com>
-
- * elf.c: Eliminate references to __sparcv9 macro; replace with
- autoconf variables HAVE_PSINFO32_T etc.
- * configure.in: Auto-configure HAVE_PSINFO_32_T, HAVE_PRPSINFO32_T,
- HAVE_PSTATUS32_T, HAVE_PRSTATUS32_T, HAVE_PRSTATUS32_T_PR_WHO.
- * config.in: Ditto.
- * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE) define _SYSCALL32 so it can
- detect the above typedefs. (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Ditto.
- * aclocal.m4: Ditto.
- * configure: Regenerate.
-
-2000-08-27 Alan Modra <alan@linuxcare.com.au>
-
- * elf32-i386.c (elf_i386_check_relocs): Keep info on relocs copied
- for any shared link, not just shared -Bsymbolic.
- (elf_i386_size_dynamic_sections): Call elf_i386_discard_copies on
- any shared link, and pass link info to it.
- (elf_i386_size_dynamic_sections): Update comment.
- (elf_i386_discard_copies): Modify to discard relocs for symbols
- that have been forced local.
- (elf_i386_finish_dynamic_symbol): Don't copy relocs for symbols
- that have been forced local.
-
-2000-08-24 Denis Chertykov <denisc@overta.ru> & Nick Clifton <nickc@redhat.com>
-
- * elflink.h (elf_link_add_object_symbols): Allow common
- symbols to have an alignment of 1 if explicitly requested, and
- not overridden by other definitions.
-
-2000-08-22 Doug Kwan <dkwan@transmeta.com>
-
- * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
- * coffcode.h (coff_set_flags): Add detection of w65 architecture.
-
-2000-08-22 H.J. Lu <hjl@gnu.org>
-
- * elf-bfd.h (elf_link_hash_table): Add runpath.
-
- * bfd-in.h (bfd_elf_get_runpath_list): New prototype.
- * bfd-in2.h: Rebuilt.
-
- * elf.c (_bfd_elf_link_hash_table_init): Initialize the
- "runpath" field to NULL.
- (bfd_elf_get_runpath_list): New function.
-
- * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and
- DT_RUNPATH entries.
-
-2000-08-22 Alexandre Oliva <aoliva@redhat.com>
-
- * elf32-sh.c (sh_elf_relocate_section) [R_SH_IND12W,
- R_SH_DIR8WPN, R_SH_DIR8WPZ, R_SH_DIR8WPL]: Handle them
- explicitly. Improve validation of r_type.
-
-2000-08-21 H.J. Lu <hjl@gnu.org>
-
- * elf32-i386.c (elf_i386_size_dynamic_sections): Zero out the
- dynamic allocated content space. Add a comment to remind us that
- one day this ought to be fixed.
- * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
- * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
- * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
-
-2000-08-21 Jason Eckhardt <jle@cygnus.com>
-
- * elf32-i860.c (elf32_i860_relocate_pc16): Just write the immediate
- field with the newly relocated value instead of adding it to the
- existing immediate field.
- (elf32_i860_relocate_splitn): Likewise.
- (elf32_i860_relocate_highadj): Likewise.
-
-2000-08-16 Jason Eckhardt <jle@cygnus.com>
-
- * elf32-i860.c (elf32_i860_relocate_pc16): Implemented function (it
- was previously just a stub).
-
-2000-08-16 Alexandre Oliva <aoliva@redhat.com>
-
- * elflink.c (_bfd_elf_create_got_section): Don't abort().
- Formatting fixes.
- (_bfd_elf_create_dynamic_sections): Likewise.
-
-2000-08-16 Andrew Macleod <amacleod@cygnus.com>
-
- * elf64-sparc.c (sparc64_elf_relocate_section): Set relocation address
- for undefined symbols to be the beginning of the section.
-
- * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Don't allocate
- four extra entries at the beginning of the .rela.plt section.
- (sparc64_elf_finish_dynamic_symbol): Adjust the offset in the .rela.plt
- section to account for the four reserved entries in the .plt section.
-
-2000-08-15 Geoffrey Keating <geoffk@cygnus.com>
-
- * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Add ori r0,r0,0
- to the list of NOPs we recognize after a branch-and-link.
- Use the ori NOP when one is needed.
-
- * coff-rs6000.c (_bfd_xcoff_slurp_armap): Finish implementation
- for large archives.
-
-2000-08-14 Jim Wilson <wilson@cygnus.com>
-
- * elf64-ia64.c (elf64_ia64_merge_private_bfd_data): Handle
- EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, and EF_IA_64_NOFUNCDESC_CONS_GP.
- (elf64_ia64_print_private_bfd_data): Likewise. Also handle
- EF_IA_64_ABSOLUTE.
-
-2000-08-11 Alexandre Oliva <aoliva@redhat.com>
-
- * elf32-sh.c (sh_elf_set_mach_from_flags): Make it static.
-
-2000-08-10 Jason Eckhardt <jle@cygnus.com>
-
- * elf32-i860.c (elf32_i860_relocate_section): New function.
- (i860_final_link_relocate): New function.
- (elf32_i860_relocate_splitn): New function.
- (elf32_i860_relocate_pc16): New function.
- (elf32_i860_relocate_highadj): New function.
- (elf32_i860_howto): Minor adjustments to some relocations.
- (elf_info_to_howto_rel): Define.
- (elf_backend_relocate_section): Define.
-
-2000-08-10 Nick Clifton <nickc@cygnus.com>
-
- * elf32-arm.h: Fix formatting.
-
-2000-08-10 Bernd Schmidt <bernds@cygnus.co.uk>
-
- * elf32-sh.c (sh_elf_reloc_loop): Make LAST_SYMBOL_SECTION static.
-
-2000-08-08 Jason Eckhardt <jle@cygnus.com>
-
- * elf32-i860.c (elf32_i860_howto_table): Updated some fields.
-
-2000-08-07 Kazu Hirata <kazu@hxi.com>
-
- * ieee.c (ieee_write_debug_part): Rewrite a comment.
- * elf64-ia64.c: Fix a typo.
-
-2000-08-05 Jason Eckhardt <jle@cygnus.com>
-
- * elf32-i860 (elf32_i860_howto_table): New structure.
- (lookup_howto): New function.
- (elf32_i860_reloc_type_lookup): New function.
- (elf32_i860_info_to_howto_rela): New function.
- (elf_code_to_howto_index): New structure.
- (elf_info_to_howto): Re-define as elf32_i860_info_to_howto_rela.
- (bfd_elf32_bfd_reloc_type_lookup): Re-define as
- elf32_i860_reloc_type_lookup.
-
-2000-08-04 Rodney Brown <RodneyBrown@pmsc.com>
-
- * som.c (struct fixup_format): Constify `format'.
- (som_hppa_howto_table): Use SOM_HOWTO macro.
- (try_prev_fixup, hppa_som_reloc): Decorate unused parameter.
- (som_bfd_reloc_type_lookup): Likewise.
- (compare_subspaces): Remove unused `count1', `count2'.
- (som_begin_writing): Remove unused `total_reloc_size'.
- (som_bfd_derive_misc_symbol_info): Decorate unused parameter.
- (som_print_symbol, som_bfd_is_local_label_name): Likewise.
- (som_set_reloc_info): Constify `cp'. Remove unused `addend'.
- (som_find_nearest_line): Decorate unused parameter(s).
- (som_sizeof_headers, som_get_symbol_info, som_write_armap): Likewise.
- (som_bfd_link_split_section): Likewise.
-
-2000-08-03 Nick Clifton <nickc@cygnus.com>
-
- * section.c: Restore backed out code.
- * elf.c: Restore backed out code.
- (copy_private_bfd_data): Fix bug preventing stipped dynamic
- binaries from working.
- * bfd-in2.h: Regenerate.
-
-2000-08-03 H.J. Lu <hjl@gnu.org>
-
- * section.c: Back out the change made by Nick Clifton
- <nickc@cygnus.com> on 2000-07-31. It breaks stripping dynamic
- binaries.
- * bfd-in2.h: Likewise.
- * elf.c: Likewise.
-
-2000-08-03 Alexandre Oliva <aoliva@redhat.com>
-
- * elf32-sh.c (sh_elf_reloc_loop): Warning removal.
-
-2000-07-31 Jason Eckhardt <jle@cygnus.com>
-
- * reloc.c (BFD_RELOC_860_*): New bfd relocs for i860.
- * bfd-in2.h, libbfd.h: Regenerate.
-
-2000-07-31 Nick Clifton <nickc@cygnus.com>
-
- * section.c (struct sec): Add new boolean field 'segment_mark'.
- (STD_SECTION): Initialise new field to zero.
-
- * bfd-in2.h: Regenerate.
-
- * elf.c (copy_private_bfd_data): Reorganise section to segment
- mapping to cope with moved sections requiring new segments,
- and overlapping segments.
- (SEGMENT_END): New macro: Return the end address of a segment.
- (IS_CONTAINED_BY_VMA): New macro: Determine if a segment
- contains a section by comparing their VMA addresses.
- (IS_CONTAINED_BY_LMA): New macro: Determine if a segment
- contains a section by comparing their LMA addresses.
- (INCLUDE_SECTION_IN_SEGMENT): New macro: Determine if a
- section should be included in a segment.
- (SEGMENT_AFTER_SEGMENT): New macro: Determine if one segment
- follows another in memory.
- (SEGMENT_OVERLAPS_SEGMENT): New macro: Determine if two
- segments overlap.
-
-2000-07-22 Jason Eckhardt <jle@cygnus.com>
-
- * cpu-i860.c: Added comments.
-
- * elf32-i860.c (TARGET_LITTLE_SYM): Defined to
- bfd_elf32_i860_little_vec.
- (TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
- (ELF_MAXPAGESIZE): Changed to 4096.
-
- * targets.c (bfd_elf32_i860_little_vec): Declaration of
- new target.
- (bfd_target_vector): Added bfd_elf32_i860_little_vec.
-
- * config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
- config for little endian elf32 i860.
- (targ_defvec): Define for the new config above
- as "bfd_elf32_i860_little_vec".
- (targ_selvecs): Define for the new config above
- as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"
-
- * configure.in (bfd_elf32_i860_little_vec): Added recognition
- of new target vec.
-
- * configure: Regenerated.
-
-2000-07-27 H.J. Lu <hjl@gnu.org>
-
- * elflink.h (elf_merge_symbol): Take one more argument,
- dt_needed, to indicate if the symbol comes from a DT_NEEDED
- entry. Don't overide the existing weak definition if dt_needed
- is true.
- (elf_link_add_object_symbols): Pass dt_needed to
- elf_merge_symbol ().
-
-2000-07-27 Nick Clifton <nickc@cygnus.com>
-
- * elflink.h (elf_link_size_reloc_section): Zeroes the section's
- allocated contents.
-
-2000-07-25 Geoffrey Keating <geoffk@cygnus.com>
-
- * configure.host (*-*-aix*): AIX has 'long long' always.
-
- * coff-rs6000.c (xcoff_write_one_armap_big): New procedure.
- (xcoff_write_armap_big): Write both 32-bit and 64-bit armaps.
- (xcoff_write_archive_contents_big): Don't update the offset
- of the symbol table, xcoff_write_armap will do it.
-
-2000-07-23 Ulf Carlsson <ulfc@engr.sgi.com>
-
- * elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead
- of dynobj for SGI_COMPAT checks.
-
-2000-07-21 Michael Sokolov <msokolov@ivan.Harhan.ORG>
-
- * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): New function.
- * bfd-in.h (bfd_m68k_coff_create_embedded_relocs): Add declaration.
- * bfd-in2.h: Regenerate.
-
-2000-07-21 Nick Clifton <nickc@cygnus.com>
-
- * elf32-mips.c (_bfd_mips_elf_check_relocs): Detect out of
- range symbol indices in relocs and issue an error message.
-
-2000-07-20 H.J. Lu <hjl@gnu.org>
-
- * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't check
- info->new_dtags when setting DT_FLAGS_1. It will only be set
- by the new linker options. It shouldn't break anything.
-
-2000-07-20 H.J. Lu <hjl@gnu.org>
-
- * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1
- only if info->new_dtags is true.
-
-2000-07-20 H.J. Lu <hjl@gnu.org>
-
- * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set
- DT_RUNPATH and DT_FLAGS only if info->new_dtags is true.
-
-2000-07-20 Hans-Peter Nilsson <hp@axis.com>
-
- * Makefile.am (ALL_MACHINES): Add cpu-cris.lo.
- (ALL_MACHINES_CFILES): Add cpu-cris.c.
- (BFD32_BACKENDS): Add aout-cris.lo and elf32-cris.lo.
- (BFD32_BACKENDS_CFILES): Add aout-cris.c and elf32-cris.c.
- (cpu-cris.lo, aout-cris.lo, elf32-cris.lo): New rules.
- * Makefile.in: Rebuild.
- * aclocal.m4: Rebuild.
- * aoutx.h (NAME(aout,machine_type)): Add case for bfd_arch_cris.
- * archures.c (enum bfd_architecture): Add bfd_arch_cris.
- (bfd_cris_arch): Declare.
- (bfd_archures_list): Add bfd_cris_arch.
- * bfd-in2.h: Rebuild.
- * config.bfd: (cris-*-*): New target.
- * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vectors.
- * configure: Rebuild.
- * elf.c (prep_headers): Add bfd_arch_cris.
- * libbfd.h: Rebuild.
- * libaout.h (enum machine_type): Add M_CRIS.
- * reloc.c: Add CRIS relocations.
- * targets.c (bfd_elf32_cris_vec, cris_aout_vec): Declare.
- (bfd_target_vect): Add bfd_elf32_cris_vec and cris_aout_vec.
- * cpu-cris.c, aout-cris.c, elf32-cris.c: New files.
- * po/POTFILES.in, po/bfd.pot: Regenerate.
-
-2000-07-19 H.J. Lu <hjl@gnu.org>
-
- * elf32-arm.h (elf32_arm_size_dynamic_sections): Also set
- DF_TEXTREL if DT_TEXTREL is set.
+ * po/fr.po: Regenerate.
+
+2002-01-17 Alan Modra <amodra@bigpond.net.au>
+
+ * elf-bfd.h (elf_backend_data <elf_backend_section_from_bfd_section>):
+ Remove "Elf_Internal_Shdr *" param.
+ (_bfd_mips_elf_section_from_bfd_section): Ditto.
+ * elf32-mips.c (_bfd_mips_elf_section_from_bfd_section): Ditto.
+ * elf32-m32r.c (_bfd_m32r_elf_section_from_bfd_section): Ditto.
+ * elf32-v850.c (v850_elf_section_from_bfd_section): Ditto.
+ * elf64-mmix.c (mmix_elf_section_from_bfd_section): Ditto.
+ * elfxx-ia64.c (elfNN_hpux_backend_section_from_bfd_section): Ditto.
+ * elf.c (_bfd_elf_section_from_bfd_section): Allow backend
+ function to override special sections. Remove hdr arg from
+ backend call, and don't loop.
+
+2002-01-16 Eric Christopher <echristo@redhat.com>
+
+ * elf32-mips.c (mips_elf_calculate_relocation): Set require_jalxp
+ on R_MIPS_26 and target is 16bit. Add R_MIPS16_GPREL to list of
+ relocations requiring gp0 and gp.
+
+2002-01-16 Richard Earnshaw <rearnsha@arm.com>
+
+ * elf32-arm.h (elf32_arm_merge_private_bfd_data): Handle
+ EF_ARM_VFP_FLOAT.
+ (elf32_arm_print_private_bfd_data): Likewise.
+
+2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * po/tr.po: Import new version.
+
+2002-01-16 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (ppc64_elf_howto_raw): Remove stale FIXMEs.
+ (ppc64_elf_reloc_type_lookup): Use proper CTOR reloc.
+ (ORI_R0_R0_0): Correct.
+
+2002-01-16 Alan Modra <amodra@bigpond.net.au>
+
+ * elflink.c (_bfd_elf_create_dynamic_sections): Don't set SEC_CODE
+ when plt_not_loaded.
+ * elf64-ppc.c (ppc64_elf_create_dynamic_sections): No need to
+ clear .plt SEC_CODE here. Create .stub and correct .glink flags.
+ (PLT_INITIAL_ENTRY_SIZE): Set to 24.
+ (ppc64_elf_glink_code): Delete.
+ (PPC64_ELF_GLINK_SIZE): Delete.
+ (ADDIS_R12_R2, STD_R2_40R1, LD_R11_0R12, LD_R2_0R12, MTCTR_R11,
+ BCTR, ADDIS_R12_R12_1, LD_R2_40R1, NOP, LI_R0_0, B_DOT, LIS_R0_0,
+ ORI_R0_R0_0): Define.
+ (PLT_CALL_STUB_SIZE, GLINK_CALL_STUB_SIZE): Define.
+ (struct ppc_link_hash_table): Add sstub and plt_overflow.
+ (ppc64_elf_link_hash_table_create): Init them.
+ (ppc64_elf_check_relocs <R_PPC64_REL24>): Refcount .plt entry.
+ Don't copy to shared lib.
+ (ppc64_elf_check_relocs): Call bfd_set_error on errors.
+ (ppc64_elf_gc_sweep_hook <R_PPC64_REL24>): Sweep plt refcount.
+ (allocate_dynrelocs <plt>): Don't change function sym here. Make
+ room for .stub and .glink code.
+ (ppc64_elf_size_dynamic_sections): Handle .stub. Make entry for
+ DT_PPC64_GLINK.
+ (ppc64_elf_final_link): Rename to ppc64_elf_set_toc. Don't call
+ bfd_elf64_bfd_final_link.
+ (bfd_elf64_bfd_final_link): Don't define.
+ (ppc64_elf_size_stubs): New.
+ (build_plt_stub): New.
+ (build_one_stub): New.
+ (ppc64_elf_build_stubs): New.
+ (ppc64_elf_relocate_section <toc relocs>): Remove assert.
+ (ppc64_elf_relocate_section): Don't copy R_PPC64_REL24 relocs.
+ (ppc64_elf_finish_dynamic_symbol): Don't build stubs here. Set
+ DT_PPC64_GLINK entry. Tweak DT_PLTGOT, DT_JMPREL, DT_PLTRELSZ in
+ case output sections not separate. Adjust DT_RELASZ to not
+ include plt relocs. Set reserved got entry. Set got and plt
+ entry size.
+ (elf_backend_got_header_size): Set to 8.
+ * elf64-ppc.h: New file.
+
+2002-01-16 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-arm.h (elf32_arm_size_dynamic_sections): When removing
+ sections, use bfd_section_list_remove.
* elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
- * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
- * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
- * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
- * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
- * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
- * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
- * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
- * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise.
- * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
-
- * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also
- set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if
- DT_RPATH is set.
- Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
-
-2000-07-19 H.J. Lu <hjl@gnu.org>
-
- * bfd-in.h (bfd_elf_set_dt_needed_soname): New.
- * bfd-in2.h: Rebuild.
-
- * elf-bfd.h (elf_obj_tdata): Add dt_soname.
- (elf_dt_soname): New.
-
- * elf.c (bfd_elf_set_dt_needed_soname): New.
-
- * elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED
- entry if the shared object loaded by DT_NEEDED is used to
- resolve the reference in a regular object.
-
-2000-07-19 H.J. Lu <hjl@gnu.org>
-
- * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG,
- DT_DEPAUDIT and DT_AUDIT as strings.
-
-2000-07-19 Nick Clifton <nickc@cygnus.com>
-
- * format.c: Fix formatting.
-
-2000-07-19 H.J. Lu <hjl@gnu.org>
-
- * elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
-
-2000-07-19 H.J. Lu <hjl@gnu.org>
-
- * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_BIND_NOW,
- DT_INIT_ARRAY, DT_FINI_ARRAY, DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ,
- DT_RUNPATH, DT_FLAGS, DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ,
- DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE, DT_POSFLAG_1,
- DT_SYMINSZ, DT_SYMINENT, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT,
- DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT, DT_RELCOUNT,
- DT_FLAGS_1, DT_USED and DT_CHECKSUM.
-
-2000-07-18 Andrew Cagney <cagney@b1.cygnus.com>
-
- * elf.c (bfd_elf_get_sign_extend_vma, bfd_elf_get_arch_size): Move
- renamed functions from here...
- (assign_section_numbers): Use renamed functions.
- (prep_headers): Use renamed functions.
-
- * bfd.c (bfd_get_sign_extend_vma, bfd_get_arch_size): ...To here.
- * bfd-in.h (bfd_get_sign_extend_vma, bfd_get_arch_size): Update.
- * bfd-in2.h: Regenerate.
-
-2000-07-18 Ulf Carlsson <ulfc@engr.sgi.com>
-
- * elf32-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Add
- parenthesis in if statement.
-
-2000-07-17 Koundinya K <kk@ddeorg.soft.net>
-
- Enable the support for Traditional MIPS.
- * elf32-mips.c (IRIX_COMPAT): Recognize bfd_elf32_tradbigmips_vecand
- return ict_none appropriately for traditional mips targets.
- (STUB_LW): Change 0x8f998000 to 0x8f998010 for traditional mips.
- (STUB_MOVE): Conditionalize for traditonal mips.
- (STUB_LI16): Likewise.
- (_bfd_mips_elf_modify_segment_map): Conditionalize to avoid making
- room for RTPROC header.
- (_bfd_mips_elf_modify_segment_map): For a normal mips executable set
- the permission for the PT_DYNAMIC as read, write and execute.
- (mips_elf_calculate_relocation): Check for the symbol _DYNAMIC_LINKING
- for traditonal mips.
- (_bfd_mips_elf_create_dynamic_sections): Add the symbol
- _DYNAMIC_LINKING for traditonal mips.
- (_bfd_mips_elf_create_dynamic_sections): Add the symbol __RLD_MAP
- in case of traditonal mips.
- (_bfd_mips_elf_adjust_dynamic_symbol): Create a stub only if a PLT
- entry is required. For a function if PLT is not required then set the
- corresponding hash table entry to 0.
- (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG entry for
- traditonal mips.
- (_bfd_mips_elf_finish_dynamic_symbol): for a undefined symbol in a
- shared object set the value to 0.
- (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol
- _DYNAMIC_LINKING for traditonal mips.
- (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol __RLD_MAP
- for traditonal mips.
-
-2000-07-15 H.J. Lu <hjl@gnu.org>
-
- * aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL.
-
-2000-07-12 Charles Wilson <cwilson@ece.gatech.edu>
-
- * libbfd.c (bfd_seek): fix 'seek beyond EOF' error when writing
- out a structure that is BFD_IN_MEMORY.
-
-2000-07-11 Alan Modra <alan@linuxcare.com.au>
-
- * elf64-hppa.c (get_dyn_name): Pass in section pointer instead of
- bfd pointer. Print section id instead of bfd pointer for local
- syms. Prefix addend with `+' for global syms as well as local.
- Correct calculation of name component lengths.
- (elf64_hppa_check_relocs): Update call to get_dyn_name.
-
- From David Huggins-Daines <dhd@linuxcare.com>
- * elf-hppa.h (elf_hppa_relocate_section): Update calls here too.
- * elf64-hppa.c (elf64_hppa_check_relocs): Fix some warnings.
- (elf64_hppa_modify_segment_map): Likewise.
-
-2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
-
- * elf.c (bfd_elf_get_sign_extend_vma): Return tendency of VMA
- addresses to be "naturally" sign extended. Return -1 if unknown.
- * bfd-in.h (bfd_elf_get_sign_extend_vma): Add declaration.
- * bfd-in2.h: Regenerate.
-
-2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
-
- * ecoffswap.h (ecoff_get_off, ecoff_put_off): Add ECOFF_SIGNED_32
- and ECOF_SIGNED_64 to list ways to extract an offset.
- (ecoff_swap_fdr_in, ecoff_swap_fdr_out, ecoff_swap_pdr_in,
- ecoff_swap_pdr_out, ecoff_swap_ext_in, ecoff_swap_ext_out):
- Update.
- * elf64-mips.c (ECOFF_SIGNED_64): Define instead of ECOFF_64.
- * elf32-mips.c (ECOFF_SIGNED_32): Define instead of ECOFF_32.
-
-2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
-
- * elfcode.h (elf_object_p): Use bfd_set_start_address and not
- bfd_get_start_address.
- (elf_swap_ehdr_in): Sign extend e_entry when applicable.
- (elf_swap_ehdr_out): Ditto.
-
-2000-07-10 Alexander Aganichev <AAganichev@hypercom.com>
-
- * archures.c (bfd_default_scan): Add set of bfd_mach_ cases for
- compatibility with older binutils.
-
-2000-07-10 Alan Modra <alan@linuxcare.com.au>
-
- * section.c (bfd_make_section_anyway): Start section_id at 0x10.
- (STD_SECTION): Avoid negative ids, instead use 0 to 3.
-
- From Ryan Bradetich <rbradetich@uswest.net>
- * dwarf1.c (parse_die): Cure signed/unsigned char warnings.
- (parse_line_table): Ditto.
- (_bfd_dwarf1_find_nearest_line): Ditto.
- * syms.c (cmpindexentry): Remove extra `*' from params.
-
-2000-07-09 Koundinya K <kk@ddeorg.soft.net>
-
- * elf32-mips.c (sort_dynamic_relocs): New Function.
- (_bfd_mips_elf_finish_dynamic_sections): Call sort_dynamic_relocs
- via qsort to sort the dynamic relocations in increasing r_symndx
- value.
-
-2000-07-09 Alan Modra <alan@linuxcare.com.au>
-
- * elf64-hppa.c (elf64_hppa_dyn_hash_table_init): Add
- ATTRIBUTE_UNUSED to unused args.
- (get_opd): Likewise.
- (get_plt): Likewise.
- (get_dlt): Likewise.
- (get_stub): Likewise.
- (elf64_hppa_adjust_dynamic_symbol): Likewise.
- (elf64_hppa_link_output_symbol_hook): Likewise.
- (elf64_hppa_check_relocs): Delete unused var.
- (elf64_hppa_size_dynamic_sections): Likewise.
- (elf64_hppa_finalize_opd): Likewise.
- (elf64_hppa_finalize_dynreloc): Likewise.
- (elf64_hppa_modify_segment_map): Likewise.
- (elf64_hppa_finish_dynamic_sections): Likewise.
-
- * elf-hppa.h (elf_hppa_final_write_processing): Add
- ATTRIBUTE_UNUSED to unused args.
- (elf_hppa_final_link_relocate): Likewise.
- (elf_hppa_record_segment_addrs): Add paretheses.
- (elf_hppa_relocate_section): Constify dyn_name.
-
- From David Huggins-Daines <dhd@linuxcare.com>
- * config.bfd: Add hppa*64*-*-linux-gnu 64-bit target, and
- rearrange case statement so that it gets preferred to 32-bit ones.
-
- * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Use
- asection->id instead of address of asection structure.
- (elf32_hppa_size_stubs): Likewise.
-
- * elf32-hppa.c (elf32_hppa_size_stubs): Use just one stub section
- for .init* and .fini*.
-
- * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Mask pointers
- and addends used in stub names to 32 bits.
- (elf32_hppa_size_stubs): Likewise.
-
- * elf-hppa.h (elf_hppa_final_link_relocate): Don't sum addend
- twice for R_PARISC_GPREL64. Use bfd_put_32 for R_PARISC_PCREL32,
- not bfd_put_64. Fix minor comment typo and formatting.
-
- Changes to create multiple linker stubs, positioned immediately
- before the section where they are required.
- * elf32-hppa.c: Don't include hppa_stubs.h.
- (elf32_hppa_stub_hash_entry): Add a pointer to the stub section.
- (elf32_hppa_stub_hash_table): Delete.
- (elf32_hppa_link_hash_entry): Delete.
- (elf32_hppa_link_hash_table): Use plain bfd_hash_table for
- stub_hash_table, and store the struct here rather than a pointer.
- Delete output_symbol_count. Add offset array. Change
- global_value to a bfd_vma.
- (elf32_hppa_stub_hash_lookup): Use table instead of table->root.
- (elf32_hppa_stub_hash_traverse): Delete.
- (elf32_hppa_name_of_stub): Delete.
- (elf32_hppa_link_hash_lookup): Delete.
- (elf32_hppa_link_hash_traverse): Delete.
- (elf32_hppa_stub_hash_table_init): Delete.
- (elf32_hppa_size_of_stub): Pass input section and offset rather
- than location and calculate location here. Don't pass name as all
- stubs are now the same size.
- (elf32_hppa_stub_hash_newfunc): Init new fields.
- (elf32_hppa_link_hash_table_create): Likewise, and stub_hash_table
- too.
- (elf32_hppa_bfd_final_link_relocate): Cast enums to int before
- comparing against ints. Rewrite stub handling code.
- (elf32_hppa_relocate_section): Make r_type and r_symndx unsigned.
- Case enums to int before comparing against ints. Remove
- bfd_reloc_dangerous case.
- (elf32_hppa_build_one_stub): Rewrite.
- (elf32_hppa_size_one_stub): New function.
- (elf32_hppa_build_stubs): Rewrite.
- (elf32_hppa_size_stubs): Pass in linker call-back functions.
- Rewrite stub-handling specific code.
-
- * elf32-hppa.h (elf32_hppa_size_stubs): Update prototype.
-
- * elf64-hppa.c (elf64_hppa_dyn_hash_entry): Fix a comment typo.
-
- * hppa_stubs.h: Delete.
- * Makefile.am (SOURCE_HFILES): Remove hppa_stubs.h
- (elf32-hppa.lo): Remove hppa_stubs.h from dependencies.
- * Makefile.in: Regenerate.
-
- * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle e_nlsel and
- e_nlrsel.
-
- * libhppa.h (hppa_field_adjust): Correct e_nsel case.
-
- * elf32-hppa.c (elf32_hppa_relocate_section): Mention the offset
- and section name for bfd_reloc_notsupported error message.
- (elf32_hppa_bfd_final_link_relocate): Print reasons for returning
- bfd_reloc_notsupported.
- (elf32_hppa_relocate_section): Add ATTRIBUTE_UNUSED to output_bfd.
-
- * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Handle
- undefined weak symbols for all relocs.
- (elf32_hppa_size_of_stub): Adjust calculation by 8 since branch
- offsets are relative to one past the delay slot.
- (elf32_hppa_size_stubs): Account for reloc addend when calculating
- branch destination. Put addend into stub name too.
- (elf32_hppa_bfd_final_link_relocate): Account for reloc addend and
- adjust by 8 when deciding whether a linker stub is needed. Put
- addend into stub name as for above.
-
- * elf32-hppa.c (hppa_elf_relocate_insn): Change signed/unsigned on
- various args and vars.
- (elf32_hppa_bfd_final_link_relocate): Here too.
- (elf32_hppa_size_stubs): Rename index -> indx. Use e_indx for
- inner block var to avoid shadowing.
-
- * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type): Make `field' arg
- unsigned.
- * elf64-hppa.h (_bfd_elf64_hppa_gen_reloc_type): Ditto.
- * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Ditto.
- (elf_hppa_fake_sections): Rename local var to avoid shadowing.
-
- * libhppa.h: Change practically all unsigned ints to plain ints.
- Remove tests on gcc version. Instead use ATTRIBUTE_UNUSED for
- prototypes.
-
- From Ryan Bradetich <rbradetich@uswest.net>
- * libhppa.h (hppa_opcode_type): New enum to replace #define's.
- * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Modify to
- suit above.
- From David Huggins-Daines <dhd@linuxcare.com>
- * elf-hppa.h (elf_hppa_relocate_insn): Update the opcode constants
- to the new OP_* ones.
-
- * elf32-hppa.c (elf32_hppa_size_stubs): Consolidate freeing on
- error exit. Bail out earlier on plabel relocs that we aren't
- interested in. Don't tell elf32_hppa_stub_hash_lookup to copy
- string, and then don't free our copy.
- (elf32_hppa_build_one_stub): Make insn unsigned int.
-
- * libhppa.h (bfd_hppa_insn2fmt): 22 bit branches are only
- available with BL, not BE and BLE.
-
- * elf32-hppa.c (hppa_elf_relocate_insn): Add some more example
- code for elf arg relocs.
- (elf32_hppa_bfd_final_link_relocate): Replace boolean is_local
- argument with elf_link_hash_entry h. Handle undefined weak
- symbols. Move $global$ lookup from here...
- (elf32_hppa_relocate_section): ...to here. Return correct error
- message for non-handled relocs.
- (elf32_hppa_size_of_stub): Correctly test branch range. Previous
- wrong test was -0x3ffff to +0x40000.
-
- * elf-hppa.h (elf_hppa_final_link_relocate): R_PARISC_DIR17R,
- R_PARISC_DIR17F, and R_PARISC_DIR21L are for absolute branches;
- Handle them as such.
- (elf_hppa_relocate_insn): Fix a typo.
-
- * libhppa.h (GET_FIELD, GET_BIT, MASK, CATENATE, ELEVEN): Delete.
- (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
- assemble_17, assemble_21): Delete.
- Supply defines for all 64 possible opcodes.
- (bfd_hppa_insn2fmt): Add bfd argument, and use to select wide mode
- formats. Handle COMICLR.
- (hppa_rebuild_insn): Delete bfd argument. Handle formats 10, -11,
- -10, -16, 16, 22.
-
- * elf32-hppa.c (hppa_elf_relocate_insn): Complete rewrite.
- (elf32_hppa_bfd_final_link_relocate): Major rewrite.
- (elf32_hppa_build_one_stub): Modify hppa_elf_relocate_insn calls
- to suit.
- (elf32_hppa_size_stubs): Don't free stub_name twice. Read in all
- the local syms - did this code get deleted accidentally? Ignore
- undefined and undefweak syms.
-
- * elf-hppa.h (elf_hppa_final_link): Move hppa_info to outermost
- block. Use it instead of elf64_hppa_hash_table (info).
- (elf_hppa_final_link_relocate): Use hppa_info instead of
- elf64_hppa_hash_table (info).
-
- * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
- re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
- (hppa_rebuild_insn): Mask immediate bits here instead.
- * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
-
-2000-07-08 Alan Modra <alan@linuxcare.com.au>
-
- * section.c (struct sec): Add id field. Tidy comment formatting.
- (bfd_make_section_anyway): Set id.
- (STD_SECTION): Init id too.
- Change CONST to const throughout.
- * archures.c (bfd_arch_info): Tidy comment.
- (bfd_arch_list): Change a CONST to const.
- * libbfd-in.h: Tidy comments and replace CONST with const.
- * elf-bfd.h: Likewise.
- * libbfd.h: Regenerate.
- * bfd-in2.h: Regenerate.
- * libcoff.h: Regenerate.
-
-2000-07-07 DJ Delorie <dj@redhat.com>
-
- * archive.c (_bfd_write_archive_contents): Add an informative
- comment.
-
-2000-07-06 Kazu Hirata <kazu@hxi.com>
-
- * srec.c: Fix formatting.
-
-2000-06-05 DJ Delorie <dj@redhat.com>
-
- * MAINTAINERS: new
-
-2000-07-04 Alexandre Oliva <aoliva@redhat.com>
-
- * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
- value of PC-relative offsets.
-
-2000-07-03 Jim Wilson <wilson@cygnus.com>
-
- * elf64-alpha.c (alpha_elf_size_info): New.
- (elf_backend_size_info): Define to alpha_elf_size_info.
- * elfcode.h (elf_size_info): Change hash bucket size to 4.
-
-2000-07-03 Ulf Carlsson <ulfc@engr.sgi.com>
-
- * elf32-mips.c: Include elf32-target.h again for the traditional
- MIPS targets.
-
-2000-07-03 Marek Michalkiewicz <marekm@linux.org.pl>
-
- * elf32-avr.c (bfd_elf32_bfd_reloc_type_lookup):
- Add ATTRIBUTE_UNUSED to unused arguments to avoid warnings.
- (avr_info_to_howto_rela): Likewise.
- (elf32_avr_gc_mark_hook): Likewise.
- (elf32_avr_gc_sweep_hook): Likewise.
- (elf32_avr_relocate_section): Likewise.
-
-2000-07-03 Mark Elbrecht <snowball3@bigfoot.com>
-
- * cofflink.c (_bfd_coff_write_global_sym): Turn a weak symbol into
- an external symbol for a non-shared, non-relocatable link.
-
-2000-07-03 Nick Clifton <nickc@redhat.com>
-
- * cofflink.c (IS_EXTERNAL): New macro: Return true if the symbol
- is an external symbol.
- (IS_WEAK_EXTERNAL): New macro: Return true if the symbol is a weak
- external symbol.
-
-2000-07-03 Kazu Hirata <kazu@hxi.com>
-
- * reloc16.c: Fix formatting.
-
-2000-07-01 Koundinya K <kk@ddeorg.soft.net>
-
- * config.bfd: Change targ_defvec and targ_selvecs for mips*-*-sysv4*
- to add a new target for traditional mips i.e
- bfd_elf32_tradbigmips_vec and bfd_elf32_tradlittlemips_vec.
- * configure.in: Likewise.
- * configure: Rebuild.
- * targets.c (bfd_elf32_tradbigmips_vec): Declare and put in
- bfd_target_vector.
- (bfd_elf32_tradlittlemips_vec): Likewise.
- * elfxx-target.h: Add macro INCLUDED_TARGET_FILE which is more a test
- to see that elfNN_bed does not get redefined even if the target file
- is included twice for a chip. See elf32-mips.c.
+ * elflink.h (elf_link_add_object_symbols): When removing all
+ sections, use bfd_section_list_clear.
-2000-07-01 Alan Modra <alan@linuxcare.com.au>
-
- * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed
- (CLEANFILES): Add DEPA.
- * Makefile.in: Regenerate.
-
-2000-06-30 DJ Delorie <dj@cygnus.com>
-
- * peicode.h (coff_swap_filehdr_in): can't use e_magic because we
- can't assume the PE header is at 0x80.
-
-2000-06-29 Mark Elbrecht <snowball3@bigfoot.com>
-
- * syms.c (_bfd_stab_section_find_nearest_line): Use IS_ABSOLUTE_PATH.
-
-2000-06-28 Mark Elbrecht <snowball3@bigfoot.com>
-
- * go32stub.h: Update stub.
-
-2000-06-26 Marek Michalkiewicz <marekm@linux.org.pl>
-
- * archures.c (bfd_mach_avr5): Define.
- * bfd-in2.h (bfd_mach_avr5): Define.
- * cpu-avr.c (arch_info_struct): Rename bfd_mach_avr4 to
- bfd_mach_avr5, add bfd_mach_avr4. Update comments.
- (compatible): Update comment. Add missing test.
- * elf32-avr.c (avr_final_link_relocate): Support 8K wrap
- for avr2 and avr4. Simplify 8K wrap code.
- (bfd_elf_avr_final_write_processing): Recognize bfd_mach_avr5.
- (elf32_avr_object_p): Recognize E_AVR_MACH_AVR5.
-
-2000-06-26 Kazu Hirata <kazu@hxi.com>
-
- * coff-h8300.c: Fix formatting.
- * cpu-h8300.c: Likewise.
-
-2000-06-24 Alexandre Oliva <aoliva@redhat.com>
-
- * elf32-arm.h (elf32_arm_final_link_relocate): Print `(local)'
- for local symbols whose names are unknown.
-
-2000-06-22 Alan Modra <alan@linuxcare.com.au>
-
- * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
- find one.
- * Makefile.in: Regenerate.
- * doc/Makefile.in: Regenerate.
-
-2000-06-20 H.J. Lu <hjl@gnu.org>
-
- * Makefile.am: Rebuild dependency.
- * Makefile.in: Rebuild.
-
-2000-06-20 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
-
- * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function.
- (elf_backend_copy_indirect_symbol): Map to the new function.
-
-2000-06-20 Alan Modra <alan@linuxcare.com.au>
-
- * archive.c (normalize): Correct pointer comparison when checking
- for backslashes.
- (bfd_bsd_truncate_arname): Likewise.
- (bfd_gnu_truncate_arname): Likewise.
-
-2000-06-20 Ulf Carlsson <ulfc@engr.sgi.com>
-
- * elf-bfd.h (struct elf_obj_tdata): Define per BFD Irix 5 virtual
- sections elf_{text,data}_{section,symbol}.
- * elf32-mips.c: mips_elf_{text,data}_{section,symbol}{,_ptr}: Remove.
- (_bfd_mips_elf_hide_symbol): New function.
- (elf_backend_hide_symbol): Map to the new function.
- (_bfd_mips_elf_add_symbol_hook): Change to use new per BFD
- definitions of mips_elf_{text,data}_{section,symbol}.
- (mips_elf_local_relocation_p): Try to find the direct symbol
- based on new check_forced argument.
- (mips_elf_calculate_relocation): Use new version of
- mips_elf_local_relocation_p.
- (mips_elf_relocate_section): Likewise.
- (_bfd_mips_elf_relocate_section): Likewise.
- (mips_elf_sort_hash_table): Only assert that have enough GOT
- space.
- (mips_elf_got16_entry): Match all 32 bits to the existing GOT
- entry if the relocation based on the new external argument.
- (mips_elf_create_dynamic_relocation): Assert that we have a
- section contents allocated where we can swap out the dynamic
- relocations.
- (mips_elf_calculate_relocation): Find the real hash-table entry
- correctly by using h->root.root.type. Only create a dynamic
- relocation entry if the symbol is defined in a shared library.
- Create an external GOT entry for the GOT16 relocation if the
- symbol was forced local.
- (_bfd_mips_elf_finish_dynamic_symbol): Don't assert there is a
- dynamic index if the symbol was forced local.
-
-2000-06-20 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
-
- * elf32-mips.c: Fix typos in comments.
-
-2000-06-19 Mark Kettenis <kettenis@gnu.org>
-
- * rs6000-core.c: Wrap definition of `union VmInfo' within #ifdef
- CORE_VERSION_1.
-
-2000-06-18 Stephane Carrez <stcarrez@worldnet.fr>
-
- * Makefile.in, bfd-in2.h, libbfd.h, configure: Rebuild.
- * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES, BFD32_BACKENDS,
- BFD32_BACKENDS_CFILES): Add 68hc12, 68hc11 files.
- * configure.in (bfd_elf32_m68hc12_vec): Recognize.
- (bfd_elf32_m68hc11_vec): Likewise.
- * config.bfd (targ_cpu): Recognize 68hc12 and 68hc11.
- Supports 68hc11 & 68hc12 at the same time.
- * targets.c (bfd_elf32_m68hc12_vec): Declare and put in
- bfd_target_vector.
- (bfd_elf32_m68hc11_vec): Likewise.
- * elf.c (prep_headers): Recognize bfd_arch_m68hc12 and 68hc11.
- * archures.c (bfd_m68hc12_arch): Define and register in global list
- (bfd_m68hc11_arch): Likewise.
- * reloc.c (BFD_RELOC_M68HC11_HI8, BFD_RELOC_M68HC11_LO8,
- BFD_RELOC_M68HC11_3B): Define.
- * cpu-m68hc12.c, elf32-m68hc12.c: New files for 68hc12 support.
- * cpu-m68hc11.c, elf32-m68hc11.c: New files for 68hc11 support.
-
-2000-06-18 Ulf Carlsson <ulfc@engr.sgi.com>
-
- * elf_bfd.h (struct elf_backend_data): Add info argument to
- elf_backend_hide_symbol.
- (_bfd_elf_link_hash_hide_symbol): Likewise.
- * elf.c (_bfd_elf_link_hash_hide_symbol): Likewise.
- * elf64-ia64.c (elf64_ia64_hash_hide_symbol): Likewise.
- * elflink.h (elf_link_add_object_symbols): Likewise.
- (elf_link_assign_sym_version): Likewise.
-
-2000-06-18 H.J. Lu <hjl@gnu.org>
-
- * coff-i386.c (coff_i386_reloc): Don't return in case of
- output_bfd == (bfd *) NULL if COFF_WITH_PE is defined.
- Compensate PE relocations when linking with non-PE object
- files to generate a non-PE executable.
-
-2000-06-17 Ulf Carlsson <ulfc@engr.sgi.com>
-
- * elf32-mips.c (mips_elf_calculate_relocation): Explicitly write
- GOT entries if we're doing a static link or -Bsymbolic link.
-
-2000-06-15 Ulf Carlsson <ulfc@engr.sgi.com>
-
- * elflink.h (elf_link_adjust_relocs): Check for and call backend
- specifific swap_reloc_{in,out} and swap_reloca_{in,out} if
- available.
- (elf_link_output_relocs): Likewise.
- (elf_reloc_link_order): Likewise.
-
-2000-06-16 Nicholas Duffek <nsd@redhat.com>
-
- * archures.c (enum bfd_architecture): #define constants for
- PowerPc and RS6000 machine numbers.
- * bfd-in2.h: Regenerate.
- * coffcode.h (coff_set_arch_mach_hook): #ifdef XCOFF64, set arch
- to bfd_arch_powerpc instead of bfd_arch_rs6000. Refer to PowerPc
- and RS6000 machine numbers using #defined constants from
- archures.c.
- * cpu-powerpc.c (arch_info_struct): Refer to PowerPc and RS6000
- machine numbers using #defined constants from archures.c. Add
- entries for EC603e, 630, A35, RS64II, RS64III, 7400. Specify
- 64-bit words in 620 entry.
- * cpu-rs6000.c (arch_info_struct): Create with entries for RS1,
- RSC, and RS2.
- (bfd_rs6000_arch): Change default machine to 0 (bfd_mach_rs6k).
-
-2000-06-16 Nicholas Duffek <nsd@cygnus.com>
-
- * coffcode.h (coff_mkobject_hook): Set xcoff_tdata.xcoff64.
- * libcoff-in.h (struct xcoff_tdata): Define xcoff64 field.
- * libcoff.h (struct xcoff_tdata): Define xcoff64 field.
-
-2000-06-16 Nicholas Duffek <nsd@redhat.com>
-
- * bfd-in.h (bfd_family_coff): Define.
- * bfd-in2.h: Regenerate.
- * coffgen.c (coff_count_linenumbers, coff_symbol_from,
- coff_find_nearest_line): Check COFFness using bfd_family_coff()
- instead of bfd_target_coff_flavour.
- * cofflink.c (_bfd_coff_final_link): Likewise.
- * cpu-ns32k.c (do_ns32k_reloc): Don't strcmp() target name to
- exclude XCOFF files.
- * reloc.c (bfd_perform_relocation, bfd_install_relocation):
- Likewise.
- * targets.c (enum bfd_flavour): Add bfd_target_xcoff_flavour.
- * xcoff-target.h (TARGET_SYM): Use bfd_target_xcoff_flavour.
- * xcofflink.c (XCOFF_XVECP): Delete.
- (bfd_xcoff_link_record_set, bfd_xcoff_import_symbol,
- bfd_xcoff_export_symbol, bfd_xcoff_link_count_reloc,
- bfd_xcoff_record_link_assignment,
- bfd_xcoff_size_dynamic_sections): Replace XCOFF_XVECP() with
- check for bfd_target_xcoff_flavour.
-
-2000-06-16 Nicholas Duffek <nsd@redhat.com>
-
- * rs6000-core.c: Support 64-bit core files, support pre-4.3 core
- files on AIX 4.3.
- (read_hdr): New function.
- (rs6000coff_core_p): Store mstsave or __context64 struct instead
- of trying to extract individual registers. Set abfd->arch_info
- to match the architecture that created the core file.
- (rs6000coff_get_section_contents): Delete.
- * xcoff-target.h (rs6000coff_get_section_contents): Delete.
-
-2000-06-14 H.J. Lu <hjl@gnu.org>
-
- * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_rec)
- is NULL.
-
-2000-06-13 H.J. Lu <hjl@gnu.org>
+2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
+ * po/sv.po: New file: Swedish translation.
+ * configure.in (ALL_LINGUAS): Add sv.
* configure: Regenerate.
-2000-06-13 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * peicode.h (pe_ILF_object_p): Use TARGET_LITTLE_SYM instead of
- armpei_little_vec.
-
-2000-06-08 David O'Brien <obrien@FreeBSD.org>
-
- * configure.in (VERSION): Update to show this is the CVS mainline.
-
-2000-06-07 Alan Modra <alan@linuxcare.com.au>
-
- * elf32-d10v.c: Include elf/d10v.h
- (enum reloc_type): Delete.
- * elf32-d30v.c: Include elf/d30v.h
- (enum reloc_type): Delete.
-
- * Makefile.am: Run "make dep-am" to regenerate dependencies.
- * Makefile.in: Regenerate.
-
- * elf32-i386.c (elf_howto_table): Remove EMPTY_HOWTOs.
- (elf32_i386_vtinherit_howto, elf32_i386_vtentry_howto): Delete and
- move HOWTOs into elf_howto_table.
- (R_386_standard, R_386_ext_offset): Define.
- (R_386_ext, R_386_vt_offset, R_386_vt): Define.
- (elf_i386_reloc_type_lookup): Modify calculation of index into
- elf_howto_table since we've removed the padding.
- (elf_i386_info_to_howto_rel): Likewise.
- (elf_i386_relocate_section): Likewise.
-
-2000-06-06 Michael Snyder <msnyder@seadog.cygnus.com>
-
- * elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t.
-
-2000-06-05 H.J. Lu <hjl@gnu.org>
-
- * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag
- an error when seeing an undefined symbol with hidden/internal
- attribute. It is handled in *_relocate_section ().
-
-2000-06-05 H.J. Lu <hjl@gnu.org>
-
- * elflink.h (elf_fix_symbol_flags): Follow the link for the
- indirect symbol for the ELF_LINK_NON_ELF bit.
- (elf_link_output_extsym): Don't output the indirect symbol even
- if the ELF_LINK_NON_ELF bit is set.
-
-2000-06-01 J.T. Conklin <jtc@redback.com>
-
- * config.bfd (i[3456]86-*-netbsdelf*): New target.
- (i[3456]86-*-netbsdaout*): New target.
- (i[3456]86-*-netbsd*): Add bfd_elf32_i386_vec to targ_selvecs.
- (i[3456]86-*-openbsd*): Likewise.
-
-2000-05-30 Andrew Cagney <cagney@b1.cygnus.com>
+2002-01-15 Jakub Jelinek <jakub@redhat.com>
- * trad-core.c: From hpux-core.c, include <dirent.h> or
- <sys/ndir.h> when possible.
+ * elflink.h (elf_link_input_bfd): Back out 2002-01-07 change.
+ * elf.c (merge_sections_remove_hook): New function.
+ (_bfd_elf_merge_sections): Pass it as 3rd argument to
+ _bfd_merge_sections.
+ * libbfd-in.h (_bfd_merge_sections): Add 3rd argument.
+ * libbfd.h: Rebuilt.
+ * merge.c (_bfd_merge_sections): Add remove_hook argument.
+ Call remove_hook if a SEC_EXCLUDE section is encountered.
-2000-05-31 Nick Clifton <nickc@cygnus.com>
+2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
- * opintl.h (_(String)): Explain why dgettext is used instead
- of gettext.
+ * elf32-xstormy16.c (xstormy16_reloc_map): Add new field 'table'.
+ (xstormy16_reloc_map): Initialise new field with correct howto
+ table.
+ (xstormy16_reloc_type_lookup): Use 'table' field to locate correct
+ howto entry.
-2000-05-31 Ulrich Drepper <drepper@redhat.com>
+2002-01-10 Michael Snyder <msnyder@redhat.com>
- * elf.c (_bfd_elf_slurp_version_tables): Correct reading of version
- definitions. We must not assume they are sorted in the file
- according to their index numbers.
+ * elf.c (elfcore_write_prstatus): Use long instead of pid_t;
+ (elfcore_write_pstatus): Use long instead of pid_t;
+ * elf-bfd.h: Change prototypes to use long instead of pid_t;
-2000-05-31 Alan Modra <alan@linuxcare.com.au>
+2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
- * elf-hppa.h: (elf_hppa_final_link_relocate): Use e_rsel field
- selector for R_PARISC_PCREL17R. R_PARISC_DIR17R and
- R_PARISC_DIR17F are for absolute branches; Handle them as such.
+ * elf.c: Update copyright years.
+ (elfcore_grok_netbsd_note): Use NT_NETBSDCORE_PROCINFO
+ and NT_NETBSDCORE_FIRSTMACH. Improve a comment.
-2000-05-30 Nick Clifton <nickc@cygnus.com>
+2002-01-08 Michael Snyder <msnyder@redhat.com>
- * cpu-i960.c (scan_960_mach): Accept 80960KA, 80960KB,
- 80960CA, 80960MC as valid machine names.
+ Add capability to write corefile note sections, for gdb.
+ * elf.c (elfcore_write_note): New function.
+ (elfcore_write_prpsinfo): New function.
+ (elfcore_write_prstatus): New function.
+ (elfcore_write_pstatus): New function.
+ (elfcore_write_prfpreg): New function.
+ (elfcore_write_prxfpreg): New function.
+ * elf-bfd.h: Add prototypes for above functions.
-2000-05-30 H.J. Lu <hjl@gnu.org>
+2002-01-08 Alexandre Oliva <aoliva@redhat.com>
- * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the
- visibility bits if the symbol is undefined. Correctly handle
- weak undefined symbols with hidden and internal attributes.
+ * elf.c (elf_fake_sections): Propagate errors from
+ elf_backend_fake_section.
- * elflink.h (elf_link_add_object_symbols): Always turn the
- symbol into local if it has the hidden or internal attribute.
+2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
-2000-05-29 Philip Blundell <philb@gnu.org>
-
- * ppcboot.c: Add packed attribute if compiling with GCC.
-
-2000-05-29 Anatoly Vorobey <mellon@pobox.com>
-
- * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal.
-
-2000-05-26 Michael Snyder <msnyder@seadog.cygnus.com>
-
- * elf.c (elfcore_grok_prstatus, elfcore_grok_pstatus,
- elfcore_grok_psinfo): Add code to allow debugging a 32-bit
- corefile on a 64-bit (Sparc Solaris) host. Also clean up
- a few old comments.
-
-2000-05-26 Alan Modra <alan@linuxcare.com.au>
-
- * Makefile.am: Update dependencies with "make dep-am"
+ * Makefile.am (BFD32_BACKENDS): Add elf32-sh-nbsd.lo.
+ (BFD32_BACKENDS_CFILES): Add elf32-sh-nbsd.c.
+ (elf32-sh-nbsd.lo): New rule.
* Makefile.in: Regenerate.
-
- * sysdep.h (gettext, dgettext, dcgettext, textdomain,
- bindtextdomain): Replace defines with those from intl/libgettext.h
- to quieten gcc warnings.
-
-2000-05-26 Eli Zaretskii <eliz@is.elta.co.il>
-
- * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH.
-
- * archive.c (normalize, bfd_bsd_truncate_arname,
- bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support
- file names with backslashes.
-
- * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file
- before opening it.
-
- * sysdep.h: Include filenames.h.
-
-2000-05-26 Alan Modra <alan@linuxcare.com.au>
-
- * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777.
-
-2000-05-26 Jakub Jelinek <jakub@redhat.com>
-
- * elf64-sparc.c (sparc64_elf_relax_section): New.
- (sparc64_elf_relocate_section): Optimize tail call into branch always
- if possible.
- * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
- (elf32_sparc_relax_section): New.
-
-2000-05-26 Jakub Jelinek <jakub@redhat.com>
-
- * elf64-sparc.c: Add ATTRIBUTE_UNUSED to unused function parameters.
- Remove unusued variables.
- (sparc64_elf_relocate_section): Change r_symndx type to unsigned long.
- (sparc64_elf_merge_private_bfd_data): Fix shared library case from
- previous fix, so that shared libs really don't influence targets
- extension mask and memory model.
-
-2000-05-23 H.J. Lu <hjl@gnu.org>
-
- * elf64-alpha.c (elf64_alpha_relocate_section): Check
- h->root.other not h->other.
- * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
-
- * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
-
-2000-05-23 H.J. Lu <hjl@gnu.org>
-
- * elf32-i386.c (elf_i386_relocate_section): Don't allow the
- undefined symbol with the non-default visibility attributes.
- * elf-hppa.h (elf_hppa_relocate_section): Likewise.
- * elf32-arm.h (elf32_arm_relocate_section): Likewise.
- * elf32-i370.c (i370_elf_relocate_section): Likewise.
- * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
- * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
- * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
- * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
- * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
- * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
- * elf64-ia64.c (elf64_ia64_relocate_section): Likewise.
- * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
-
-2000-05-22 Richard Henderson <rth@cygnus.com>
-
- * elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI,
- PCREL22, PCREL64I. Zero size of special relocs.
- (elf64_ia64_reloc_type_lookup): Likewise.
- (USE_BRL, oor_brl, oor_ip): New.
- (elf64_ia64_relax_section): New.
- (elf64_ia64_check_relocs): Handle PCREL60B, PCREL22, PCREL64I.
- (elf64_ia64_install_value): Likewise, plus PCREL21BI.
- (elf64_ia64_relocate_section): Likewise.
- (bfd_elf64_bfd_relax_section): New.
- * reloc.c (BFD_RELOC_IA64_PCREL21BI): New.
- (BFD_RELOC_IA64_{PCREL22,PCREL60B,PCREL64I}): New.
- * bfd-in2.h, libbfd.h: Regenerate.
-
-2000-05-22 Nick Clifton <nickc@cygnus.com>
-
- * configure.in : Add peigen.lo to MIPS PE targets.
+ * config.bfd (sh*le-*-netbsdelf*): New target.
+ (sh*-*-netbsdelf*): New target.
+ * configure.in: Include netbsd-core.lo for native sh*-*-netbsd*.
+ (bfd_elf32_shnbsd_vec): New vector.
+ (bfd_elf32_shlnbsd_vec): New vector.
* configure: Regenerate.
+ * elf32-sh-nbsd.c: New file.
+ * targets.c: Update copyright years.
+ (_bfd_target_vector): Add bfd_elf32_shlnbsd_vec and
+ bfd_elf32_shnbsd_vec.
-2000-05-22 Momchil Velikov <velco@fadata.bg>
-
- * libbfd.c (_bfd_generic_verify_endian_match): Compare endianess
- only if it is known for both input and output bfds. Separate
- error message strings as in some languages, it may be necessary
- to change more than one place in the string to change between
- 'big' and 'little'.
-
- * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Remove inline
- endianess checks, call _bfd_generic_verify_endian_match() instead.
-
- * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
-
- * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
-
- * elf32-arm.h (elf32_arm_merge_private_bfd_data): Likewise. Verify
- endianess before checking bfd flavours.
-
-2000-05-22 H.J. Lu <hjl@gnu.org>
-
- * elflink.h (elf_link_output_extsym): Clear the visibility
- field for symbols not defined locally.
-
-2000-05-18 Alan Modra <alan@linuxcare.com.au>
-
- * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
- re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
- (hppa_rebuild_insn): Mask immediate bits here instead.
- * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
-
-2000-05-18 Momchil Velikov <velco@fadata.bg>
-
- * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting
- relocs for an executable, ensure that they are virtual addresses.
-
-2000-05-18 Jeffrey A Law (law@cygnus.com)
-
- * config.bfd (hppa*64*-*-hpux11*): New target triplet.
-
-2000-05-17 S. Bharadwaj Yadavalli <sby@scrugs.lkg.dec.com>
- Rick Gorton <gorton@scrugs.lkg.dec.com>
-
- * elflink.h: Add emitrelocations support: when enabled, relocation
- information and relocation sections are put into final output
- executables. If the emitrelocations flag is set, do the following:
- (elf_bfd_final_link): Emit relocation sections.
- (elf_link_input_bfd): Compute relocation section contents.
- (elf_gc_sections): Don't clean relocation sections.
-
-2000-05-16 Catherine Moore <clm@cygnus.com>
-
- * som.c (som_decode_symclass): Recognize weak symbols.
-
-2000-05-16 Szabolcs Szakacsits <szaka@F-Secure.com>
-
- * peigen.c (pe_print_idata): Undo part of 2000-05-12 change that
- read idata section only from dataoff.
- (pe_print_edata): Correctly check for valid eat_member.
-
-2000-05-16 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
-
-2000-05-14 Philip Blundell <philb@gnu.org>
-
- * config.bfd (armeb-*-elf, arm*b-*-linux-gnu*): New targets.
-
-2000-05-12 Alan Modra <alan@linuxcare.com.au>
-
- * targets.c (bfd_target_vector): #ifdef BFD64 rs6000coff64_vec
-
- * peigen.c (pe_print_idata): Look for .idata section and print
- info even if data directory has zero entries. Read idata section
- starting from dataoff, and adjust all data offsets to suit. Cast
- all bfd_vma vars to unsigned long before passing to fprintf.
- * peigen.c (pe_print_edata): Similarly, look for .edata section
- and print info even if data directory has zero entries. Cast
- all bfd_vma vars to unsigned long before passing to fprintf.
-
- From Szabolcs Szakacsits <szaka@F-Secure.com>
- * peigen.c (pe_print_idata): Use bfd_section_size rather than data
- directory size which may be bogus.
- * peigen.c (pe_print_edata): Similarly.
-
-2000-05-09 Alan Modra <alan@linuxcare.com.au>
-
- * 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.
-
-2000-05-08 Alan Modra <alan@linuxcare.com.au>
-
- * versados.c (versados_scan): Init stringlen and pass_2_done.
-
- * trad-core.c (trad_unix_core_file_p): Return
- bfd_error_wrong_format rather than bfd_error_file_truncated.
-
- * 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.
-
- 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.
-
-2000-05-05 Clinton Popetz <cpopetz@cygnus.com>
-
- * xcoff.h: Rename to xcoff-target.h
- * Makefile.am: Change all instances of xcoff.h to xcoff-target.h
- * coff-rs6000.c: Ditto.
- * coff64-rs6000.c: Ditto.
- * coff-pmac.c: Ditto.
- * Makefile.in: Regenerate.
-
-2000-05-05 Clinton Popetz <cpopetz@cygnus.com>
-
- * coffcode.h (coff_set_arch_mach_hook, coff_set_flags):
- Change U802TOC64MAGIC to U803XTOCMAGIC.
-
-2000-05-04 Michael Snyder <msnyder@seadog.cygnus.com>
-
- * elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1.
- * bfd-in.h: Prototype bfd_elf_get_arch_size.
- * bfd-in2.h: Prototype bfd_elf_get_arch_size.
-
-2000-05-04 Alan Modra <alan@linuxcare.com.au>
-
- * libhppa.h (HPPA_R_CONSTANT): Cast argument to bfd_signed_vma.
+2002-01-07 Aldy Hernandez <aldyh@redhat.com>
-2000-05-03 Martin v. Löwis <loewis@informatik.hu-berlin.de>
+ * coff-rs6000.c (READ20): Use bfd_scan_vma.
- * elflink.h (elf_link_add_object_symbols): Reset dynindx for
- hidden and internal symbols.
- (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with
- visibility.
- * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not
- assign a PLT or GOT entry to symbols with hidden and
- internal visibility.
+2002-01-07 Geoffrey Keating <geoffk@redhat.com>
-2000-05-03 Mark Elbrecht <snowball3@bigfoot.com>
+ * elflink.h (elf_link_input_bfd): Don't ask for the merged offset
+ of a symbol in a section that will be deleted.
- * bfd/coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
- the .bss section.
- * bfd/coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
+2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
-2000-05-02 H.J. Lu <hjl@gnu.org>
-
- * elf.c (prep_headers): Use ELFOSABI_NONE instead of
- ELFOSABI_SYSV.
-
-2000-05-02 Alan Modra <alan@linuxcare.com.au>
-
- * targets.c (bfd_target_vector): Restore bfd_elf32_hppa_vec.
- * Makefile.am (BFD32_BACKENDS): Restore elf32-hppa.lo. Regenerate
- dependencies.
- * Makefile.in: Regenerate.
-
-2000-05-01 Jim Wilson <wilson@cygnus.com>
-
- * Makefile.am (BFD32_BACKENDS): Add efi-app-ia32.lo.
- (BFD32_BACKENDS_CFILES): Add efi-app-ia32.c.
- (BFD64_BACKENDS): Delete coff-ia64.lo. Add efi-app-ia64.lo.
- (BFD64_BACKENDS_CFILES): Delete coff-ia64.c. Add efi-app-ia64.c.
- * Makefile.in: Rebuild.
-
-2000-05-02 Alan Modra <alan@linuxcare.com.au>
-
- * config.bfd: Re-enable elf32-hppa. It now compiles, even if it
- doesn't work very well.
-
- * elf-hppa.h (elf_hppa_internal_shdr): Define.
- (elf_hppa_fake_sections): hdr is elf_hppa_internal_shdr.
- Set hdr->s_type to 1 if ARCH_SIZE == 32.
- (_bfd_elf_hppa_gen_reloc_type): Add prototype.
- (elf_hppa_info_to_howto): Likewise.
- (elf_hppa_info_to_howto_rel): Likewise.
- (elf_hppa_reloc_type_lookup): Likewise.
- (elf_hppa_is_local_label_name): Likewise.
- (elf_hppa_fake_sections): Likewise.
- (elf_hppa_final_write_processing): Likewise.
- (elf_hppa_howto_table): Fully initialise all entries.
- (_bfd_elf_hppa_gen_reloc_type): Add ATTRIBUTE_UNUSED to args.
- (elf_hppa_info_to_howto): Likewise.
- (elf_hppa_info_to_howto_rel): Likewise.
- (elf_hppa_reloc_type_lookup): Likewise.
- (elf_hppa_final_write_processing, elf_hppa_add_symbol_hook,
- elf_hppa_unmark_useless_dynamic_symbols,
- elf_hppa_remark_useless_dynamic_symbols,
- elf_hppa_record_segment_addrs, elf_hppa_final_link,
- elf_hppa_relocate_section, elf_hppa_final_link_relocate,
- elf_hppa_relocate_insn): Compile only if ARCH_SIZE == 64 until
- elf32-hppa.c mess is cleaned up.
- (elf_hppa_final_link_relocate): Make insn and r_type unsigned
- int. Delete r_field. In case R_PARISC_PCREL21L, don't set
- r_field then call hppa_field_adjust inline func with variable
- r_field arg, instead call hppa_field_adjust with fixed arg.
- In case R_PARISC_PCREL22F, don't set r_field.
- (elf_hppa_relocate_insn): Change args and return type to unsigned
- int. Call re_assemble_* funcs to do the work.
-
- * elf32-hppa.c (hppa_elf_relocate_insn): Don't assume 32 bit when
- sign extending.
-
- * libhppa.h (HPPA_R_CONSTANT): Don't assume 32 bit when sign
- extending.
- (sign_extend): Mask first before sign extending.
- (low_sign_extend): Rewrite without condition expression.
- (ones, dis_assemble_3, dis_assemble_12, dis_assemble_16,
- dis_assemble_17, dis_assemble_21, dis_assemble_22): Delete.
- (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
- assemble_17, assemble_21, sign_unext, low_sign_unext): Return
- result as function return value rather than through pointer arg.
- Accept unsigned int args, and return unsigned int.
- (re_assemble_3): New. Combines function of dis_assemble_3 with
- re-assembly of opcode and immediate.
- (re_assemble_12): Likewise.
- (re_assemble_16): Likewise.
- (re_assemble_17): Likewise.
- (re_assemble_21): Likewise.
- (re_assemble_22): Likewise.
- (hppa_field_adjust): Rewrite and document, paying attention to
- size of types and signed/unsigned issues.
- (get_opcode): Shift before masking.
- (FDLW): Rename to FLDW.
- (bfd_hppa_insn2fmt): Change arg to unsigned int. Delete fmt.
- (hppa_rebuild_insn): Change args and return value to unsigned
- int. Make use of re_assemble_*. Correct case 11.
-
- * dep-in.sed: Handle ../opcodes/.
- * Makefile.am (SOURCE_HFILES): Add elf-hppa.h, elf32-hppa.h,
- elf64-hppa.h, hppa_stubs.h, xcoff.h.
- (BFD32_BACKENDS_CFILES): Restore elf32-hppa.c.
- Remove elf64-hppa.lo, cpu-ia64.lo, elf64-ia64.lo, elfarm-oabi.lo,
- elfarm-nabi.lo dependencies outside of auto-dependency area.
- Regenerate dependencies.
- * Makefile.in: Regenerate.
-
- * configure.in (TRAD_HEADER): Test non-null before
- AC_DEFINE_UNQUOTED.
+ * po/es.po: New file: Spanish translation.
+ * configure.in (ALL_LINGUAS): Add es.
* configure: Regenerate.
- * reloc.c: Fix mis-spelling in comment.
-
-2000-05-01 Alan Modra <alan@linuxcare.com.au>
-
- * coff-sh.c (bfd_coff_small_swap_table): Fix Fri Apr 28 change.
- * vms.c (vms_openr_next_archived_file): Return NULL.
-
-2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
-
- * coffcode.h Copy changes mistakenly done to libcoff.h in
- 4/24/2000 patch.
-
-2000-04-29 Andreas Jaeger <aj@suse.de>
-
- * libbfd-in.h: Correctly check GCC version.
- * bfd-in.h: Likewise.
- * libhppa.h: Likewise.
+2002-01-06 Steve Ellcey <sje@cup.hp.com>
+
+ * elfxx-ia64.c (is_unwind_section_name): Add target vector as
+ argument so we can handle HP-UX specially.
+ (elfNN_ia64_hpux_vec): New for use in is_unwind_section_name.
+ (elfNN_hpux_backend_section_from_bfd_section): New for support
+ of SHN_IA_64_ANSI_COMMON.
+ (elfNN_ia64_relax_section): Add support for SHN_IA_64_ANSI_COMMON.
+ (is_unwind_section_name): Add special HP-UX support.
+ (elfNN_ia64_section_from_shdr): Add support for more sections.
+ (elfNN_ia64_fake_sections): Modify is_unwind_section_name call and
+ add support for more sections.
+ (elfNN_ia64_additional_program_headers): Modify
+ is_unwind_section_name call.
+ (elfNN_ia64_modify_segment_map): Remove assumption that there is
+ only one unwind section in segment.
+
+2002-01-06 Alan Modra <amodra@bigpond.net.au>
+
+ * syms.c (_bfd_generic_make_empty_symbol): New function.
+ * libbfd-in.h (_bfd_nosymbols_make_empty_symbol): Define as
+ _bfd_generic_make_empty_symbol.
* libbfd.h: Regenerate.
* bfd-in2.h: Regenerate.
-
-2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
-
- * Makefile.am (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): Add
- coffdu-rs6000.{lo,c}.
- (coff-pmac.lo, coff-rs6000.lo, coff64-rs6000.lo): Add dependency
- on xcoff.h
- * Makefile.in: Regenerate.
- * xcoff.h: New file.
- * coff-pmac.c: Use xcoff.h instead of coff-rs6000.c.
- * coff-rs6000.c: Move all declarations and defines that are
- common to the xcoff backends into xcoff.h
- * coff64-rs6000.c: Ditto,
-
-2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
-
- * coff-mips.c (mips_ecoff_backend_data): Add initialization of
- _bfd_coff_force_symnames in strings and
- _bfd_coff_debug_string_prefix_length to their default values.
- * coff-sh.c: (bfd_coff_small_swap_table): Ditto.
-
-2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
-
- * coff-alpha.c (alpha_ecoff_backend_data): Add initialization of
- _bfd_coff_force_symnames in strings and
- _bfd_coff_debug_string_prefix_length to their default values.
-
-2000-04-27 Alan Modra <alan@linuxcare.com.au>
-
- * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return if dynobj NULL.
- Check local_got_refcounts before dereferencing.
-
- * elf32-ppc.c (ppc_elf_relocate_section): Check splt != NULL
- before deciding we don't need R_PPC_PLT32 relocation.
- (ppc_elf_gc_sweep_hook): Check local_got_refcounts before
- dereferencing.
-
- * elflink.h (elf_gc_common_finalize_got_offsets): Fix comment.
-
- * elf32-i386.c (elf_i386_check_relocs): Reference count .got and
- .plt entries.
- (elf_i386_gc_sweep_hook): Garbage collect .got and .plt entries.
- (elf_i386_adjust_dynamic_symbol): Recognize unused .plt entries.
- (elf_i386_relocate_section): Allow for .plt to go missing.
- (elf_i386_finish_dynamic_symbol): Use same test to decide if we
- can use a relative reloc for got as elf_i386_relocate_section.
- (bfd_elf32_bfd_final_link): Define to use gc form of final link.
-
-2000-04-26 Clinton Popetz <cpopetz@cygnus.com>
-
- * config.bfd: Remove extraneous bfd_powerpc_64_arch.
-
-2000-04-24 Clinton Popetz <cpopetz@cygnus.com>
-
- * Makefile.am (coff64-rs6000.lo): New rule.
- * Makefile.in: Regenerate.
- * coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
- xcoff_is_local_label_name, xcoff_rtype2howto,
- xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
- xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
- xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
- (NO_COFF_SYMBOLS): Define.
- (xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
- xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
- internally.
- (MINUS_ONE): New macro.
- (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
- relocation.
- (coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
- coff_SWAP_aux_out): Map to the new functions.
- * coff64-rs6000.c: New file.
- * libcoff.h (bfd_coff_backend_data): Add new fields
- _bfd_coff_force_symnames_in_strings and
- _bfd_coff_debug_string_prefix_length.
- (bfd_coff_force_symnames_in_strings,
- bfd_coff_debug_string_prefix_length): New macros for above fields.
- * coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
- Set machine to 620 for XCOFF64. Use bfd_coff_swap_sym_in instead
- of using coff_swap_sym_in directly.
- (FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
- (coff_set_flags) Set magic for XCOFF64.
- (coff_compute_section_file_positions): Add symbol name length to
- string section length if bfd_coff_debug_string_prefix_length is
- true.
- (coff_write_object_contents): Don't do reloc overflow for XCOFF64.
- (coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
- using coff_swap_lineno_in directly.
- (bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
- and _bfd_coff_debug_string_prefix_length fields.
- * coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
- symbol names into strings table when
- bfd_coff_force_symnames_in_strings is true.
- * coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
- SET_RELOC_VADDR): New macros.
- (coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
- (coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
- code.
- (coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
- changes within RS6000COFF_C specific code.
- (coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
- MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
- * reloc.c (bfd_perform_relocation, bfd_install_relocation):
- Extend existing hack on target name.
- * xcofflink.c (XCOFF_XVECP): Extend existing hack on
- target name.
- * coff-tic54x.c (ticof): Keep up to date with new fields
- in bfd_coff_backend_data.
- * config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
- targ_selvecs to include rs6000coff64_vec for rs6000.
- * configure.in: Add rs6000coff64_vec case.
- * cpu-powerpc.c: New bfd_arch_info_type.
-
-2000-04-24 Jeffrey A Law (law@cygnus.com)
-
- * config.bfd: Only disable elf32-hppa vectors, not all of the
- BSD and OSF configuration support. Provide (disabled) clauses
- for PA64 support.
- * configure.in: Add clause for PA64 support.
- * configure: Rebuilt.
-
- * targets.c (bfd_target_vector): Add bfd_elf64_hppa_vec.
- (bfd_elf64_hppa_vec): Declare.
-
- * Makefile.am (BFD64_BACKENDS): Add elf64-hppa.lo
- (BFD64_BACKENDS_CFILES): Add elf64-hppa.c
- (elf64-hppa.lo): Add dependencies.
- * Makefile.in: Rebuilt.
-
- * elf64-hppa.c, elf64-hppa.h: New files with PA64 support.
-
-2000-04-24 Jason Eckhardt <jle@cygnus.com>
-
- * libhppa.h (dis_assemble_16): New function.
- (pa_arch): Added pa20w element.
-
-2000-04-24 Ulrich Drepper <drepper@cygnus.com>
-
- * elf-bfd.h: Add prototypes for bfd_elf32_write_relocs,
- bfd_elf32_slurp_reloc_table, bfd_elf64_write_relocs, and
- bfd_elf64_slurp_reloc_table.
-
- * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): New
- definitions to get external names.
- (elf_write_relocs): Renamed from write_relocs and make global.
- (elf_slurp_reloc_table): Make global.
- (_bfd_elf,size_info): Use elf_write_relocs instead of write_relocs.
-
- * archive.c (hpux_uid_gid_encode): New function.
- (bfd_ar_hdr_from_filesystem): Use it if HPUX_LARGE_AR_IDS is
- defined and the ID is greater than 99999.
- (bfd_generic_stat_arch_elt): If HPUX_LARGE_AR_IDS is defined decode
- special uid/gid fields into 32 bit values.
-
-2000-04-21 Matthew Green <mrg@cygnus.com>
-
- * config.bfd: Add NetBSD/sparc64 support.
-
-Fri Apr 21 13:20:53 2000 Richard Henderson <rth@cygnus.com>
- David Mosberger <davidm@hpl.hp.com>
- Timothy Wall <twall@cygnus.com>
- Jim Wilson <wilson@cygnus.com>
-
- * Makefile.am (ALL_MACHINES): Add cpu-ia64.lo.
- (ALL_MACHINES_CFILES): Add cpu-ia64.c.
- (BFD64_BACKENDS): Add elf64-ia64.lo.
- (BFD64_BACKENDS_CFILES): Add elf64-ia64.c.
- (cpu-ia64.lo, elf64-ia64.lo): New rules.
- * Makefile.in: Rebuild.
- * archures.c (enum bfd_architecture): Add bfd_arch_ia64.
- (bfd_ia64_arch): Declare.
- (bfd_archures_list): Add bfd_ia64_arch.
- * bfd-in2.h: Rebuild.
- * config.bfd: (ia64*-*-linux-gnu*, ia64*-*-elf*): New targets.
- * configure: Rebuild.
- * configure.host: (ia64-*-linux*): New host.
- * configure.in (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec,
- bfd_efi_app_ia64_vec, bfd_efi_app_ia64_vec): New vectors.
- * elf.c (prep_headers): Add bfd_arch_ia64.
- * libbfd.h: Rebuild.
- * reloc.c: Add IA-64 relocations.
- * targets.c (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec):
- Declare.
- (bfd_target_vect): Add bfd_elf64_ia64_little_vec.
- * cpu-ia64-opc.c, cpu-ia64.c, elf64-ia64.c: New files.
-
-2000-04-21 Richard Henderson <rth@cygnus.com>
-
- * elf32-d30v.c (bfd_elf_d30v_reloc): Don't modify section
- contents when performing a partial link.
- (bfd_elf_d30v_reloc_21): Likewise.
-
-2000-04-20 H.J. Lu <hjl@gnu.org>
-
- * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
- patch to symbols defined by a shared object.
- * elf32-ppc.c (ppc_elf_relocate_section): Similarly.
-
-2000-04-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
-
- 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 17 19:14:36 2000 David Mosberger <davidm@hpl.hp.com>
-
- * Makefile.am (BFD64_BACKENDS): Mention coff-ia64.lo.
- (BFD64_BACKENDS_CFILES): Mention coff-ia64.c
- (coff-ia64.lo): Add dependency.
- * Makefile.in: Regenerate.
- * coff-ia64.c: New file.
- * efi-app-ia32.c: Ditto.
- * efi-app-ia64.c: Ditto.
- * coffcode.h (coff_set_arch_mach_hook): Handle IA64MAGIC.
- (coff_set_flags): Ditto.
- (coff_write_object_contents) [IA64]: Set magic number to ZMAGIC.
- * config.bfd (i[3456]86-*-linux-gnu*): Mention bfd_efi_app_ia32_vec.
- * configure.in (elf): Handle bfd_efi_app_ia32 and bfd_efi_app_ia64_vec.
- * configure: Regenerate.
- * libpei.h (GET_OPTHDR_IMAGE_BASE): New macro.
- (PUT_OPTHDR_IMAGE_BASE): Ditto.
- (GET_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
- (PUT_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
- (GET_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
- (PUT_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
- (GET_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
- (PUT_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
- (GET_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
- (PUT_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
- (GET_PDATA_ENTRY): Ditto.
- * peigen.c (_bfd_pei_swap_aouthdr_in) [COFF_WITH_PEP64]: Don't read
- data_start. Use above macros to read fields that are 64 bit wide for
- COFF_WITH_PEP64. Don't truncate entry and text_start to 32 bits.
- (_bfd_pei_swap_aouthdr_out) [PEI_FORCE_MINIMUM_ALIGNMENT]: Force
- FileAlignment and SectionAlignment to minimum alignment if they
- are zero.
- (_bfd_pei_swap_aouthdr_out) [PEI_DEFAULT_TARGET_SUBSYSTEM]: Set
- Subsystem to default PEI_DEFAULT_TARGET_SUBSYSTEM.
- (_bfd_pei_swap_aouthdr_out) [COFF_WITH_PEP64]: Don't set data_start.
- Use above macros to write fields that are 64 bit wide for
- COFF_WITH_PEP64.
- (pe_print_pdata): Set PDATA_ROW_SIZE to 3*8 for COFF_WITH_PEP64,
- 5*4 otherwise. This should be right for IA-32 and IA-64, but may
- be wrong for platforms. Use PDATA_ROW_SIZE instead of hardcoded
- value of 20 bytes. Modify printing for COFF_WITH_PEP64 to print
- begin address, end address, and unwind info address only. Use
- GET_PDATA_ENTRY() to read .pdata entries. Use fprintf_vma() to
- print addresses.
- (tbl): Add SECTION, REL32, RESERVED1, MIPS_JMPADDR16, DIR64, and
- HIGH3ADJ relocation names.
- (_bfd_pe_print_private_bfd_data): Print Subsystem name in legible form.
- * targets.c: Declare bfd_efi_app_ia32_vec and
- bfd_efi_app_ia64_vec.
- (bfd_target_vector): Mention bfd_efi_app_ia32_vec and
- bfd_efi_app_ia64_vec.
-
-2000-04-17 Timothy Wall <twall@cygnus.com>
-
- * bfd-in2.h: Add prototypes for tic54x load page access.
- * bfd-in.h: Regenerate.
- * coff-tic54x.c: Add load page functions; allow bfd_arch_unknown
- in customized _set_arch_mach function.
- * coffcode.h (coff_set_alignment_hook): Set section load page if
- the appropriate macro is defined.
- (write_object_contents): Read section load page.
-
-2000-04-13 Alan Modra <alan@linuxcare.com.au>
-
- * elf32-hppa.h: Update copyright date.
-
- * elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix.
- * elf32-mips.c (_bfd_mips_elf_relocate_section): And here.
-
- * elf32-d30v.c (MAX32): Don't use LL suffix.
- (MIN32): Define in terms of MAX32.
- (bfd_elf_d30v_reloc): Make relocation a bfd_signed_vma.
-
- * coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise
- expression.
-
- * peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants.
-
-2000-04-12 Alan Modra <alan@linuxcare.com.au>
-
- * dep-in.sed: Match space before file name, not after.
- * Makefile.am: Regenerate dependencies.
- * Makefile.in: Regenerate.
-
- * 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.
-
-2000-04-11 Alan Modra <alan@linuxcare.com.au>
-
- * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using
- signed quantites.
- * elf32-mips.c (gprel16_with_gp): Likewise.
- * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Test range
- here using -0x40000, not (int)0xfffc0000.
- (elf32_hppa_size_of_stub): Likewise.
-
-2000-04-11 Timothy Wall <twall@cygnus.com>
-
- * coff-tic54x.c: Now builds with all targets.
- * Makefile.am: Add coff/tic54x.h to coff-tic54x.o dependencies.
- * Makefile.in: Regenerate.
- * coffcode.h (coff_set_arch_mach_hook): Eliminate warning on
- unitialized variable.
-
-Fri Apr 7 15:56:57 2000 Andrew Cagney <cagney@b1.cygnus.com>
-
- * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
- --enable-build-warnings option.
- * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
- * Makefile.in, configure: Re-generate.
-
-2000-04-07 Nick Clifton <nickc@cygnus.com>
-
- * reloc.c: Add BFD_RELOC_ARM_PCREL_BLX and
- BFD_RELOC_THUMB_PCREL_BLX.
-
- * elf32-arm.h (elf32_arm_final_link_relocate): Handle
- R_ARM_XPC25 and R_ARM_THM_PC22.
-
- * elfarm-nabi.c (elf32_arm_howto_): Fix definitions of
- R_ARM_XPC25 and R_ARM_THM_XPC22.
- (elf32_arm_reloc_map): Make BFD_RELOC_{ARM|THUMB}_PCREL_BLX to
- R_ARM_[XPC25|THM_XPC22].
-
- * elfarm-oabi.c: Define OLD_ARM_ABI and change include from
- elf/arm-oabi.h to elf/arm.h
-
- * Makefile.am: Fix dependency for elfarm-oabi.c
- * Makefile.in: Regenerate.
-
+ * hppabsd-core.c (hppabsd_core_make_empty_symbol): Delete function.
+ (hppabsd_core_get_symtab_upper_bound): Don't define.
+ (hppabsd_core_get_symtab): Likewise.
+ (hppabsd_core_print_symbol): Likewise.
+ (hppabsd_core_get_symbol_info): Likewise.
+ (hppabsd_core_bfd_is_local_label_name): Likewise.
+ (hppabsd_core_get_lineno): Likewise.
+ (hppabsd_core_find_nearest_line): Likewise.
+ (hppabsd_core_bfd_make_debug_symbol): Likewise.
+ (hppabsd_core_read_minisymbols): Likewise.
+ (hppabsd_core_minisymbol_to_symbol): Likewise.
+ (hppabsd_core_vec): Use BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols).
+ Formatting fixes.
+ * hpux-core.c: Similarly.
+ * irix-core.c: Similarly.
+ * osf-core.c: Similarly.
+ * sco5-core.c: Similarly.
+ * binary.c (binary_make_empty_symbol): Remove function, define as
+ _bfd_generic_make_empty_symbol.
+ * ihex.c (ihex_make_empty_symbol): Likewise.
+ * mmo.c (mmo_make_empty_symbol): Likewise.
+ * ppcboot.c (ppcboot_make_empty_symbol): Likewise.
+ * srec.c (srec_make_empty_symbol): Likewise.
+ * versados.c (versados_make_empty_symbol): Likewise.
+ * vms.c (_bfd_vms_make_empty_symbol): Remove.
+ (vms_make_empty_symbol): Define as _bfd_generic_make_empty_symbol.
+ * vms-gsd.c (_bfd_vms_slurp_gsd): Call bfd_make_empty_symbol
+ rather than _bfd_vms_make_empty_symbol.
+ * vms-misc.c (new_symbol): Likewise.
+
+2002-01-05 Alan Modra <amodra@bigpond.net.au>
+
+ * section.c (bfd_section_init): Remove unnecessary initialisations.
+ (bfd_section_list_clear): New function.
+ (bfd_section_list_remove, bfd_section_list_insert): New macros.
+ (_bfd_strip_section_from_output): Use them.
+ * coffcode.h (coff_set_alignment_hook): Likewise.
+ * elf32-mips.c (_bfd_mips_elf_final_link): Likewise.
+ * elf64-mips.c (mips_elf64_final_link): Likewise.
+ * elf64-mmix.c (mmix_elf_final_link): Likewise.
+ * sunos.c (sunos_add_dynamic_symbols): Likewise.
+ * xcofflink.c (_bfd_xcoff_bfd_final_link): Likewise.
* bfd-in2.h: Regenerate.
- * libbfd.h: Regenerate.
-
-2000-04-06 Michael Snyder <msnyder@seadog.cygnus.com>
-
- * elfcore.h (elf_core_file_p): preserve value of tdata at entry,
- and restore it on failure. Release newly allocated tdata on
- failure.
-
-Fri Apr 7 11:33:47 2000 Jim Wilson <wilson@cygnus.com>
-
- * dwarf2.c (struct dwarf2_debug): New field dwarf_line_size.
- (decode_line_info): Set it. Report error if unit->line_offset is
- equal to or larger than it.
-
-2000-04-07 Timothy Wall <twall@cygnus.com>
-
- * targets.c: Added vecs for tic54x.
- * reloc.c: Added relocs for tic54x.
- * libbfd.h: Regenerated.
- * configure: Add TI COFF vecs for tic54x.
- * configure.in: Ditto.
- * config.bfd (targ_cpu): Recognize new tic54x target.
- * coffcode.h (coff_slurp_symbol_table): Additions for TI COFF handling.
- * bfd-in2.h: Add tic54x target and relocations.
- * Makefile.am, Makefile.in: Add tic54x target.
- * archures.c (bfd_archures_list): Add tic54x target.
- * coff-tic54x.c: New.
- * cpu-tic54x.c: New.
-
-2000-04-06 Michael Snyder <msnyder@seadog.cygnus.com>
- * elfcore.h (elf_core_file_p): call backend_object_p which
- thereby gets an opportunity to update the arch/machine type.
-
-2000-04-06 Timothy Wall <twall@cygnus.com>
-
- * coffcode.h (coff_slurp_symbol_table): Handle C_STATLAB storage
- class. Handle SEC_CLINK and SEC_BLOCK flags.
- * section.c: Add SEC_CLINK and SEC_BLOCK flags.
- * bfd-in2.h: Add SEC_CLINK and SEC_BLOCK flags.
-
-2000-04-06 Nick Clifton <nickc@cygnus.com>
-
- * elf32-arm.h (elf32_arm_set_private_flags): Only check for
- EF_INTERWORK if this is an unknown EABI.
- (elf32_arm_merge_private_bfd_data): Check EABI version
- numbers. Only check EF_xxx flags if the EABI version number
- is unknown.
- (elf32_arm_check_private_bfd_data): Only check EF_xxx flags
- if the EABI version number is unknown.
- (elf32_arm_print_private_bfd_data): Only decode EF_xxx flags
- if the EABI version number is unknown.
-
-Wed Apr 5 22:04:20 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and
- BFD_RELOC_SH_LOOP_END.
- * elf32-sh.c (sh_elf_howto_tab): Change special_func to
- sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore.
- Add entries for R_SH_LOOP_START and R_SH_LOOP_END.
- (sh_elf_reloc_loop): New function.
- (sh_elf_reloc): No need to test for always-to-be-ignored relocs
- any more.
- (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}.
- (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}.
- * bfd-in2.h, libbfd.h: Regenerate.
-
-2000-04-04 Alan Modra <alan@linuxcare.com.au>
-
- * po/bfd.pot: Regenerate.
-
- * 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.
-
-2000-04-03 Kevin Buettner <kevinb@redhat.com>
-
- * configure.in: Added corefile support for AIX 4.3. In particular,
- AIX_CORE_DUMPX_CORE will be defined in addition to AIX_CORE when
- compiling rs6000-core.c.
+ * netbsd-core.c (netbsd_core_file_p): Use bfd_make_section_anyway
+ rather than doing our own section handling. Clean up after errors
+ with bfd_release and bfd_section_list_clear. Handle unexpected
+ flags.
+ * aoutf1.h (sunos4_core_file_p): Likewise.
+ * aix386-core.c (aix386_core_file_p): Likewise.
+ * cisco-core.c (cisco_core_file_validate): Likewise.
+ * ptrace-core.c (ptrace_unix_core_file_p): Likewise.
+ * trad-core.c (trad_unix_core_file_p): Likewise.
+
+ * hppabsd-core.c (hppabsd_core_core_file_p): Clean up after errors
+ with bfd_release and bfd_section_list_clear.
+ * hpux-core.c (hpux_core_core_file_p): Likewise.
+ * irix-core.c (irix_core_core_file_p): Likewise.
+ * lynx-core.c (lynx_core_file_p): Likewise.
+ * osf-core.c (osf_core_core_file_p): Likewise.
+ * rs6000-core.c (rs6000coff_core_p): Likewise.
+ * sco5-core.c (sco5_core_file_p): Likewise.
+
+ * elf32-mips.c (_bfd_mips_elf_lo16_reloc): Simplify, and perform
+ sign extension adjustments without conditionals.
+
+2002-01-04 Jakub Jelinek <jakub@redhat.com>
+
+ * elf-eh-frame.c (_bfd_elf_write_section_eh_frame): Don't crash if
+ CIE at .eh_frame start is removed due to no FDEs referencing it.
+
+2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * config.bfd (x86_64-*-netbsd*): New target.
+ * configure.in (x86_64-*-netbsd*): Set COREFILE
+ to netbsd-core.lo.
* configure: Regenerated.
-2000-04-03 H.J. Lu <hjl@gnu.org>
-
- * cache.c (bfd_open_file): Unlink the output file only if
- it has non-zero size.
-
-2000-04-01 Ken Block USG <block@zk3.dec.com>
-
- * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit
- relative relocations for non-loaded sections in shared objects.
- (elf64_alpha_check_relocs): Similarly.
-
-Mon Apr 3 13:37:15 2000 Hans-Peter Nilsson <hp@axis.com>
-
- * aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and
- BFD_RELOC_16 to switch for extended relocs.
- (MY_swap_ext_reloc_in): New.
- (MY_swap_ext_reloc_out): New.
- (NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather
- than NAME(aout,swap_ext_reloc_in) for extended relocs.
- (NAME(aout,squirt_out_relocs)): Similarly use
- MY_swap_ext_reloc_out.
- (aout_link_reloc_link_order): Use MY_put_ext_reloc if defined.
-
-2000-04-03 Kazu Hirata <kazu@hxi.com>
-
- * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
- the R_PCRWORD_B case.
-
-2000-03-31 Thomas de Lellis <tdel@wrs.com>
-
- * srec.c : Set CHUNK size to 16 bytes to prevent download failures
- on some targets.
- * ihex.c : Ditto.
-
-Wed Mar 30 15:28:00 2000 Donald Lindsay <dlindsay@cygnus.com>
-
- * 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.
-
-2000-03-27 Alan Modra <alan@linuxcare.com.au>
-
- * 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.
-
-2000-03-27 Denis Chertykov <denisc@overta.ru>
-
- * 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.
-
-2000-03-24 H.J. Lu <hjl@gnu.org>
-
- * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
- (elf64_alpha_find_reloc_at_ofs): Likewise.
-
-2000-03-17 Alan Modra <alan@linuxcare.com.au>
-
- * 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".
-
-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>
-
- * 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>
-
- * 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>
+2002-01-03 Tom Rix <trix@redhat.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.
+ * xcofflink.c (_bfd_xcoff_bfd_final_link): Update .pad section ordering
+ for recent bfd_make_section_anyway change.
-2000-03-10 Alan Modra <alan@linuxcare.com.au>
+2002-01-03 Nick Clifton <nickc@cambridge.redhat.com>
- * 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.
-
-2000-03-06 Nick Clifton <nickc@cygnus.com>
-
- * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and
- sym_ptr_ptr fields.
- (SIZEOF_ILF_SYM_PTR_TABLE): Define.
- (SIZEOF_ILF_STRINGS): Redefine.
- (pe_ILF_make_a_symbol-reloc): New function. Creates a symbol
- relative reloc, as opposed to a section relative reloc.
- (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT
- not C_LABEL.
- Add length of symbol's prefix to string pointer.
- Store a pointer to the symbol in the symbol pointer table.
- (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7.
- Initialise the symbol pointer table.
- Store the hint in the Hint/Name table.
- Make the jump reloc be symbol realtive, not section relative.
- Create an import symbol for imported code.
-
-2000-03-06 Catherine Moore <clm@cygnus.com>
-
- * elf.c (swap_out_syms): Check for null type_ptr.
-
-2000-03-01 Hans-Peter Nilsson <hp@axis.com>
-
- * aout-target.h (MY(write_object_contents)): Remove unused
- and unusable "#if CHOOSE_RELOC_SIZE".
- * pc532-mach.c (MY(write_object_contents)): Ditto.
- * netbsd.h (MY(write_object_contents)): Ditto.
- * hp300hpux.c (MY(write_object_contents)): Ditto.
- * freebsd.h (MY(write_object_contents)): Ditto.
- * aout-tic30.c (tic30_aout_write_object_contents): Ditto.
-
-2000-02-29 H.J. Lu <hjl@gnu.org>
-
- * peicode.h (jtab): Make it static.
-
- * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is
- defined and COFF_IMAGE_WITH_PE is not defined.
- (_bfd_sh_align_load_span): Defined as sh_align_load_span if
- COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined.
-
-2000-03-01 Nick Clifton <nickc@cygnus.com>
-
- * coff-arm.c (bfd_arm_process_before_allocation): Make
- 'symndx' signed to prevent compile time warning.
-
- * coff-mcore.c: Remove unused prototype for pe_object_p.
-
- * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static
- functions that are not used when COFF_IMAGE_WITH_PE is
- defined.
- (struct sh_opcode): Change type of 'flags' field to unsigned
- long so that it can hold the USESAS flag.
-
- * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
-
- * elf-m10300.c (mn10300_elf_relax_section): Initialise
- 'sym_sec'.
-
- * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
- parameters.
- Remove unusued variables and code.
- (elf_backend_add_symbol_hook): Fix prototype.
-
- * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
- 'srelgot'.
-
- * elf32-mcore.c (mcore_elf_relocate_section): Initialise
- 'oldinst'.
-
- * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
- parameters.
- Remove unusued variables and code.
- (elf_backend_add_symbol_hook): Fix prototype.
-
- * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
-
- * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED
- to unused function parameter.
-
- * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function
- parameters.
- Use EMPTY_HOWTO to initialise empty howto slots.
- Remove unused variables.
-
- * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
-
-2000-03-01 H.J. Lu <hjl@gnu.org>
-
- * aoutx.h (aout_link_input_section_std): Pass "true" to
- the undefined_symbol callback.
- (aout_link_input_section_ext): Likewise.
- * bout.c (get_value): Likewise.
- * coff-a29k.c (coff_a29k_relocate_section): Likewise.
- * coff-alpha.c (alpha_ecoff_get_relocated_section_conten):
- Likewise.
- (alpha_relocate_section): Likewise.
- * coff-arm.c (coff_arm_relocate_section): Likewise.
- * coff-i960.c (coff_i960_relocate_section): Likewise.
- * coff-mcore.c (coff_mcore_relocate_section): Likewise.
- * coff-mips.c (mips_relocate_section): Likewise.
- * coff-ppc.c (coff_ppc_relocate_section): Likewise.
- * coff-sh.c (sh_relocate_section): Likewise.
- * coff-tic80.c (coff_tic80_relocate_section): Likewise.
- * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
- * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
- * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
- * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
- * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
- * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
- * elf32-i370.c (i370_elf_relocate_section): Likewise.
- * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
- * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
- * elf32-sh.c (sh_elf_relocate_section): Likewise.
- * elf32-v850.c (v850_elf_relocate_section): Likewise.
- * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
- * elflink.h (elf_link_output_extsym): Likewise.
- * pe-mips.c (coff_pe_mips_relocate_section): Likewise.
- * reloc.c (bfd_generic_get_relocated_section_conten): Likewise.
- * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise.
-
- * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the
- undefined_symbol callback when building shared library with
- -Bsymbolic and undefined symbols are allowed. Otherwise, pass
- "true".
- * elf32-arm.h (elf32_arm_relocate_section): Likewise.
- * elf32-i386.c (elf_i386_relocate_section): Likewise.
- * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
- * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
- (elf32_mips_get_relocated_section_content): Likewise.
- * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
- * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
- * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
- * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
-
-2000-02-28 Nick Clifton <nickc@cygnus.com>
-
- * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
- * Makefile.in: Regenerate.
-
- * configure.in: Add support for mips and sh pe vectors.
- * configure: regenerate.
-
- * config.bfd: Add support for arm-wince, mips-pe and sh-pe
- targets.
-
- * targets.c: Add mips and sh pe vectors.
-
- * libpei.h (coff_final_link_postscript): Only define if not
- already defined.
-
- * coffcode.h: Add support for WinCE magic numbers.
-
- * peigen.c (pe_print_reloc): Update comment and rearrange
- appending of newline character.
-
- * peicode.h: Add support for Image Library Format.
- (pe_ILF_vars): Structure containing data used by ILF code.
- (pe_ILF_make_a_section): New function. Create a section based
- on ILF data.
- (pe_ILF_make_a_reloc): New function. Create a reloc based on
- ILF data.
- (pe_ILF_make_a_symbol): New function. Create a symbol based
- on ILF data.
- (pe_ILF_save_relocs): New function. Store the relocs created
- by pe_ILF_make_a_reloc in a section.
- (pe_ILF_build_a_bfd): New function. Create a BFD describing
- an ILF object.
- (pe_ILF_object_p): New function. Return a bfd_target pointer
- for an ILF object.
- (pe_bfd_object_p): If an ILF object is detected call
- pe_ILF_object_p on it.
-
- * coff-arm.c: Add support for WinCE relocs which are different
- from normal ARM COFF relocs.
- * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target.
-
- * coff-sh.c: Add support for sh-pe target.
- * pe-sh.c: New file. Support code for sh-pe target.
- * pei-sh.c: New file. Support code for sh-pe target.
-
- * pe-mips.c: New file. Support code for mips-pe target.
- * pei-mips.c: New file. Support code for mips-pe target.
-
-2000-02-27 Jakub Jelinek <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.
-
-Fri Feb 25 18:39:26 2000 Rodney Brown (RodneyBrown@pmsc.com)
-
- * som.c (SOM_HOWTO): Define.
- (som_hppa_howto_table): Use it.
-
-2000-02-25 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
-
- * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
-
- * config.bfd: Enable 64 bit support for Solaris7+/sparc.
-
-2000-02-24 Catherine Moore <clm@cygnus.com>
-
- * som.c (som_misc_symbol_info): Add field
- secondary_def.
- (som_bfd_derive_misc_symbol_info): Initialize
- secondary_def.
- (som_build_and_write_symbol_table): Keep track
- of secondary_def field.
- (som_slurp_symbol_table): Set BSF_WEAK symbol flag
- if secondary_def field is set.
- (som_bfd_ar_write_symbol_stuff): Initialize
- secondary_def.
-
-2000-02-23 Stephane Carrez <stcarrez@worldnet.fr>
-
- * 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>
-
- * bfd-in.h: Update copyright date.
-
-2000-02-23 Linas Vepstas <linas@linas.org>
-
- * cpu-i370.c: New file.
- * elf32-i370.c: New file.
- * archures.c (enum bfd_architecture): Add bfd_arch_i370.
- (bfd_i370_arch): New.
- (bfd_archures_list): Add bfd_i370_arch.
- * elf.c (prep_headers): Add bfd_arch_i370.
- * Makefile.am: Add support for IBM 370 elf.
- * config.bfd: Likewise.
- * configure.in: Likewise.
- * libbfd.h (bfd_reloc_code_real_names): Likewise.
- * reloc.c (bfd_reloc_code_type): Likewise.
- * targets.c: Likewise.
-
- * Makefile.in: Regenerate.
- * configure: Regenerate.
- * bfd-in2.h: Regenerate.
-
-2000-02-22 Ian Lance Taylor <ian@zembu.com>
-
- * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
- invalid relocation types, and change them to R_386_NONE.
-
-2000-02-22 H.J. Lu <hjl@gnu.org>
-
- * elflink.h (elf_link_add_object_symbols): If a version symbol is
- not defined, don't add a second ELF_VER_CHR.
-
- * elflink.h (elf_bfd_final_link): Call output_extsym for global
- symbols converted to local symbols even when stripping all
- symbols.
- (elf_link_output_extsym): Process global symbols converted to
- local symbols even if they are being stripped.
-
-2000-02-21 Alan Modra <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.
-
- * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
- (elf_gc_sections): Same here.
- (elf_gc_common_finalize_got_offsets): And here.
-
-2000-02-21 Ian Lance Taylor <ian@zembu.com>
-
- ELF HPPA doesn't work at present; remove it until it does.
- * config.bfd: Comment out setting targ_defvec to
- bfd_elf32_hppa_vec.
- * Makefile.am: Rebuild dependencies.
- (BFD32_BACKENDS): Remove elf32-hppa.lo.
- (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
- (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
- * Makefile.in: Rebuild.
- * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
-
-2000-02-18 Geoff Keating <geoffk@cygnus.com>
-
- * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
- is no bfd_free(). Revert bfd_free part of previous change.
-
-2000-02-18 Geoff Keating <geoffk@cygnus.com>
-
- * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
- arrays.
- (coff_compute_section_file_positions): Use bfd_free to pair
- bfd_malloc.
- (coff_write_object_contents): Likewise.
-
- * coff-rs6000.c (xcoff_howto_table_16): New variable.
- (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
-
-2000-02-18 Ulrich Drepper <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.
-
- * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
- bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
- 1999-11-29.
- * bfd-in2.h: Rebuild.
-
-2000-02-10 Timothy Wall <twall@cygnus.com>
-
- * coffswap.h (coff_swap_sym_in): Add hook SWAP_SYM_IN_POST to
- allow final modifications of swapped-in symbol.
- (coff_swap_sym_out): Ditto with SWAP_SYM_OUT_POST.
- * coffcode.h (coff_write_relocs): Use macro
- SECTION_RELATIVE_ABSOLUTE_SYMBOL_P if defined to determine whether
- symbol index should be set to -1.
-
-Thu Feb 10 20:07:50 GMT 2000 Toshiyasu Morita (toshi.morita@sega.com)
-
- * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
- USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
- * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
- * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
- sh_insns_uses_or_sets_freg): New functions.
- * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
- * (sh_insns_conflict): Use new functions and new macros to
- detect conflicts when two instructions both set same integer registers,
- both set same fp register, and both set special register.
-
-2000-02-09 Timothy Wall <twall@cygnus.com>
-
- * coffgen.c (coff_real_object_p): Set arch/mach info prior to
- swapping in sections, so that the swapping routines have access to
- the arch/mach info.
-
-2000-02-08 Mark Elbrecht <snowball3@bigfoot.com>
-
- * coff-go32.c: Update comment. Update copyright.
-
-2000-01-27 Thomas de Lellis <tdel@windriver.com>
-
- * syms.c (bfd_decode_symclass)
- Two new class characters were added - 'V' and 'v'. The
- meaning of 'W' is now restricted to just weak non-object
- symbols. This allows differentiation between, for example,
- weak functions vs weak objects. nm for example now dumps:
- 'W' = weak global
- 'w' = weak unresolved
- 'V' = weak global object
- 'v' = weak unresolved object
-
- (bfd_is_undefined_symclass): New function. Return true if the
- given symbol class represents and undefined/unresolved symbol.
-
- (bfd_symbol_info): Use bfd_is_undefined_symclass to check for
- unresolved symbols.
-
- * bfd-in2.h: Add prototype for bfd_is_undefined_symbol().
-
- * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the
- STT_ARM_16BIT flag set, but it is not attached to a data object
- return STT_ARM_16BIT so that it will be treated as code by the
- disassembler.
-
-2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * coff-i386.c (i3coff_object_p): Remove prototype.
- Update copyright.
-
- * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
- to name. Update copyright.
-
- * trad-core.c (trad_unix_core_file_p): Cast core_regsec
- assignment to avoid warning. Update copyright.
-
-2000-01-24 Robert Lipe (robertl@sco.com)
-
- * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
- instead of using GNU C extension.
-
-2000-01-21 Nick Clifton <nickc@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.
-
-2000-01-14 Nick Clifton <nickc@cygnus.com>
-
- * linker.c (default_indirect_link_order): oops - fix incorrectly
- applied patch from Tim Wall.
-
-2000-01-13 Timothy Wall (twall@tiac.net>
-
- * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
- = scnhsz, filhsz, relsz, aoutsz, etc)
-
- * coffswap.h: Ditto.
-
-2000-01-13 Nick Clifton <nickc@cygnus.com>
-
- * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
- interwork thumb to arm stub.
-
-2000-01-13 Timothy Wall (twall@tiac.net>
-
- * archures.c (bfd_octets_per_byte): New function: Return
- target byte size.
- (bfd_arch_mach_octets_per_byte): New function: Return target
- byte size.
-
- * section.c: Distinguish between octets and bytes for usage of
- _cooked_size, _raw_size, and output_offset. Clarify
- description of bfd_set_section_contents.
-
- * bfd-in2.h: Regenerate.
-
- * coffgen.c: Indicate that the offset parameter is in bytes, not
- octets.
-
- * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte
- where appropriate to get the octet offset when calling
- bfd_set_section_contents.
- (bfd_coff_reloc_link_order): Ditto.
-
- * linker.c (bfd_generic_reloc_link_order): Ditto.
- (_bfd_default_link_order): Ditto.
-
- * reloc.c (bfd_perform_relocation): Distinguish between octets
- and bytes. Use octets when indexing into octet data; use bytes
- when calculating target addresses.
- (bfd_install_relocation): Ditto.
-
- * srec.c (srec_write_section): Ditto.
-
-2000-01-13 Nick Clifton <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 functioning 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>
+ * elf32-arm.h (elf32_arm_final_link_relocate): Handle
+ R_ARM_THM_PC11 reloc.
- * config.bfd: Include elf32_i386 vector to target list for cygwin
- and mingw.
+2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
- * config.in: Undefine HAVE_WIN32_PSTATUS_T.
- * configure.in: Test for structure win32_pstatus_t in
- <sys/procfs.h>
+ * configure.in (LINGUAS): Add ja.
* configure: Regenerate.
+ * po/ja.po: Import from translation project's web site.
- * elf.c (elfcore_grok_win32pstatus): New function: process
- win32_pstatus_t notes in elf core file.
- (elfcore_grok_note): Detect win32_pstatus notes.
-
-2000-01-03 Martin v. Loewis <loewis@informatik.hu-berlin.de>
+2002-01-02 Nick Clifton <nickc@cambridge.redhat.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.
+ * elf32-arm.h (elf32_arm_merge_private_bfd_data): Reformat error
+ messages to ease translation into other languages.
-For older changes see ChangeLog-9899
+For older changes see ChangeLog-0001
Local Variables:
mode: change-log
diff --git a/contrib/binutils/bfd/ChangeLog-0001 b/contrib/binutils/bfd/ChangeLog-0001
new file mode 100644
index 0000000..3000c03
--- /dev/null
+++ b/contrib/binutils/bfd/ChangeLog-0001
@@ -0,0 +1,9592 @@
+2001-12-31 Jakub Jelinek <jakub@redhat.com>
+
+ * elflink.h (elf_bfd_final_link): Check if dynobj is not NULL
+ before looking for .eh_frame_hdr section.
+ * elf-eh-frame.c (_bfd_elf_write_section_eh_frame_hdr): If
+ .eh_frame_hdr section is being stripped from output, don't do
+ anything.
+
+2001-12-27 Tom Rix <trix@redhat.com>
+
+ * coff-rs6000.c (xcoff_generate_rtinit): Clean data_buffer alloc/free.
+ * coff64-rs6000.c (xcoff64_generate_rtinit): Same.
+ (xcoff_write_archive_contents_big): Rewrite.
+ (xcoff_write_armap_big): Rewrite.
+ (xcoff_write_one_armap_big): Delete.
+ * libxcoff.h : Clean up.
+
+2001-12-21 Tom Rix <trix@redhat.com>
+
+ * xcofflink.c (bfd_xcoff_link_generate_rtinit): New function.
+ Interface to linker for generation of __rtinit.
+ * libxcoff.h (struct xcoff_backend_data_rec): Add new ops to xcoff
+ backend to generate special linker symbol __rtinit.
+ * coff-rs6000.c (bfd_xcoff_backend_data, bfd_pmac_xcoff_backend_data)
+ : Add new rtinit ops
+ * coff64-rs6000.c (bfd_xcoff_aix5_backend_data,
+ bfd_xcoff_backend_data): Same.
+ * bfd-in.h: Add bfd_xcoff_link_generate_rtinit.
+ * bfd-in2.h : Regenerate.
+
+2001-12-21 Jakub Jelinek <jakub@redhat.com>
+
+ * elf32-sparc.c (_bfd_sparc_elf_howto_table): Fix dst_mask for
+ R_SPARC_DISP32. Support R_SPARC_PLT32.
+ (sparc_reloc_map): Add BFD_RELOC_16_PCREL and BFD_RELOC_SPARC_PLT32.
+ (elf32_sparc_check_relocs): Handle R_SPARC_PLT32.
+ (elf32_sparc_relocate_section): Likewise.
+ * elf64-sparc.c (sparc64_elf_howto_table): Fix dst_mask for
+ R_SPARC_DISP32. Support R_SPARC_PLT32 and R_SPARC_PLT64.
+ (sparc_reloc_map): Add BFD_RELOC_16_PCREL, BFD_RELOC_64_PCREL
+ and BFD_RELOC_SPARC_PLT32.
+ (sparc64_elf_check_relocs): Handle R_SPARC_PLT32 and R_SPARC_PLT64.
+ (sparc64_elf_relocate_section): Likewise.
+ * reloc.c (bfd_reloc_code_type): Add BFD_RELOC_SPARC_PLT32.
+ * bfd-in2.h, libbfd.h: Rebuilt.
+
+2001-12-20 Tom Rix <trix@redhat.com>
+
+ * coffcode.h (coff_compute_section_file_positions): Add special AIX
+ loader alignment of text section.
+
+2001-12-20 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * config.bfd (mips-dec-netbsd*): Delete alias for mips*el-*-netbsd*.
+
+ * config.bfd (arm-*-netbsdelf*): Add target.
+ * configure.in: Include netbsd-core.lo for native arm-*-netbsd*.
+ * configure: Regenerate.
+
+2001-12-20 Alan Modra <amodra@bigpond.net.au>
+
+ * elfcode.h (elf_slurp_symbol_table): Test elf_elfsections for NULL,
+ as can happen with a core file, before dereferencing.
+
+2001-12-19 Michael Snyder <msnyder@redhat.com>
+
+ * elf32-i386.c (elf_i386_grok_psinfo): Fix copy-and-paste error:
+ target is i386 (not mips), and size of descdata is 124 (not 128).
+
+2001-12-19 Jakub Jelinek <jakub@redhat.com>
+
+ * elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): If new_size
+ is 0, temporarily grow it to minimal CIE size.
+ (_bfd_elf_write_section_eh_frame): If input .eh_frame section would
+ end up empty, build a fake minimal CIE.
+
+2001-12-19 Steve Ellcey <sje@cup.hp.com>
+
+ * config.bfd (bfd_elf32_ia64_hpux_big_vec): New vector for
+ ia64*-*-hpux* target.
+ (bfd_elf64_ia64_hpux_big_vec): Likewise.
+ * targets.c: Ditto.
+ * configure.in: Ditto.
+ * configure: Regenerate
+ * elfxx-ia64.c (elfNN_ia64_final_write_processing): Replace use of
+ alloca with bfd_malloc.
+ (get_local_sym_hash): Likewise.
+ (elfNN_hpux_post_process_headers): New function.
+ #include elfNN-target.h again with values for IA64 HP-UX vector.
+
+2001-12-18 Michael Snyder <msnyder@redhat.com>
+
+ * elf.c (assign_file_positions_for_segments): Don't sort PT_NOTE
+ sections of corefiles. Also it makes no sense to sort if count == 1.
+
+2001-12-18 H.J. Lu <hjl@gnu.org>
+
+ * elf.c (_bfd_elf_copy_private_bfd_data): Also copy GP.
+
+2001-12-18 H.J. Lu <hjl@gnu.org>
+
+ * elf.c (_bfd_elf_copy_private_bfd_data): Update comments.
+
+2001-12-18 H.J. Lu <hjl@gnu.org>
+
+ * elf-bfd.h (_bfd_elf_copy_private_bfd_data): New. Prototype.
+ (_bfd_mips_elf_copy_private_bfd_data): Removed.
+
+ * elf.c (_bfd_elf_copy_private_bfd_data): New. Copy e_flags in
+ the ELF header.
+
+ * elf32-i370.c (??_elf_copy_private_bfd_data): Removed.
+ (bfd_elf??_bfd_copy_private_bfd_data): Removed.
+ * elf32-m32r.c: Likewise.
+ * elf32-m68k.c: Likewise.
+ * elf32-mcore.c: Likewise.
+ * elf32-mips.c: Likewise.
+ * elf32-ppc.c: Likewise.
+ * elf32-v850.c: Likewise.
+ * elf64-ppc.c: Likewise.
+ * elf64-sparc.c: Likewise.
+ * elfxx-ia64.c: Likewise.
+
+ * elf64-mips.c (bfd_elf64_bfd_copy_private_bfd_data): Removed.
+
+ * elfxx-target.h (bfd_elfNN_bfd_copy_private_bfd_data): Defined
+ to _bfd_elf_copy_private_bfd_data.
+
+2001-12-18 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * elf32-s390 (elf_s390_check_relocs): Pass addend to
+ gc_record_vtentry.
+ * elf64-s390 (elf_s390_check_relocs): Likewise.
+ Fix by Andreas Jaeger <aj@suse.de>.
+
+2001-12-18 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * configure.host: Correctly match all NetBSD/mips
+ hosts.
+
+2001-12-18 matthew green <mrg@eterna.com.au>
+
+ * config.bfd (m68*-*-netbsdelf*): New target.
+ (m68*-*-netbsd): Also include bfd_elf32_m68k_vec.
+ (m68*-*-netbsdaout*): New alias for m68*-*-netbsd.
+
+2001-12-18 Jakub Jelinek <jakub@redhat.com>
+
+ * elflink.h (size_dynamic_sections): Skip anonymous version tag.
+ (elf_link_assign_sym_version): Don't count anonymous version tag.
+
+2001-12-18 Jakub Jelinek <jakub@redhat.com>
+
+ * elf-eh-frame.c (struct cie): Add make_lsda_relative.
+ (struct eh_cie_fde): Add lsda_encoding, lsda_offset,
+ make_lsda_relative.
+ (read_value, write_value): New.
+ (_bfd_elf_discard_section_eh_frame): Inicialize
+ lsda_encoding, lsda_offset and make_lsda_relative.
+ (_bfd_elf_eh_frame_section_offset): If make_lsda_relative,
+ request no dynamic reloc for LSDA field of FDE.
+ (_bfd_elf_write_section_eh_frame): Handle make_lsda_relative.
+ If a non-DW_EH_PE_absptr value is 0, don't adjust it by base
+ or pcrel. Fix address computation for DW_EH_PE_pcrel relocs.
+ Update LSDA field if LSDA encoding is DW_EH_PE_pcrel, because
+ . might have changed due to deleted FDE or CIEs.
+
+2001-12-18 Jakub Jelinek <jakub@redhat.com>
+
+ * elf-strtab.c (struct elf_strtab_hash_entry): Add u.next.
+ (last_eq): Remove.
+ (_bfd_elf_strtab_finalize): Don't use a hash table for last
+ character chains, instead use an array.
+
+2001-12-18 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * elf.c (elfcore_netbsd_get_lwpid): New function.
+ (elfcore_grok_netbsd_procinfo): New function.
+ (elfcore_grok_netbsd_note): New function.
+ (elfcore_read_notes): Call elfcore_grok_netbsd_note to process
+ NetBSD ELF core file notes.
+
+2001-12-18 Alan Modra <amodra@bigpond.net.au>
+
+ * elfcode.h (struct bfd_preserve): New.
+ (elf_object_p): Replace preserved_* vars with instance of above.
+ Save and restore arch_info pointer rather than arch, mach so that
+ more cases can be restored. Save and restore new section_tail,
+ section_htab structure, and init appropriately. Move "rest of
+ section header" code so that i_shdrp needs no NULL initialisation.
+ Free old section_htab on success.
+ * elfcore.h (elf_core_file_p): Likewise.
+
+2001-12-17 Tom Rix <trix@redhat.com>
+
+ * coffcode.h (sec_to_styp_flags): Add STYP_EXCEPT and STYP_TYPCHK for
+ xcoff.
+
+2001-12-17 Jakub Jelinek <jakub@redhat.com>
+
+ * elf-bfd.h (elf_discarded_section): Define.
+ * elflink.h (elf_link_input_bfd): Use it.
+ (elf_reloc_symbol_deleted_p): Likewise.
+
+ * elf64-alpha.c (elf64_alpha_relocate_section): Don't warn about
+ overflows for pc relative relocs against discarded sections.
+
+2001-12-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * elf32-mips.c (_bfd_mips_elf_relocate_section): Formatting.
+ * elf64-mips.c: Add most of the fixes and tweaks done in elf32-mips.c
+ over the last months. Add some code for mips16 handling.
+ (mips_elf64_check_mips16_stubs): New function.
+ (mips_elf64_stub_section_p): Likewise.
+ (mips_elf64_calculate_relocation): Change interface to support mips16.
+ (mips_elf64_perform_relocation): Likewise.
+
+2001-12-17 Alan Modra <amodra@bigpond.net.au>
+
+ Support for more than 64k ELF sections.
+ * elf-bfd.h (elf_size_info <swap_symbol_out>): Add shndx param.
+ (bfd_elf32_swap_symbol_in): Likewise.
+ (bfd_elf32_swap_symbol_out): Likewise.
+ (bfd_elf64_swap_symbol_in): Likewise.
+ (bfd_elf64_swap_symbol_out): Likewise.
+ (elf_reloc_cookie): Add locsym_shndx field. Make locsyms a PTR.
+ (elf_obj_tdata): Add num_elf_sections, symtab_shndx_hdr and
+ symtab_shndx_section.
+ (elf_numsections): Define.
+ (elf_symtab_shndx): Define.
+ * elf.c (setup_group): Use elf_numsections rather than header e_shnum.
+ (bfd_elf_find_section): Likewise.
+ (bfd_section_from_elf_index): Likewise.
+ (bfd_section_from_shdr): Likewise. Handle SHT_SYMTAB_SHNDX.
+ (bfd_section_from_r_symndx): Read symbol shndx extension, and
+ translate st_shndx for > SHN_HIRESERVE.
+ (assign_section_numbers): Skip reserved sections. Assign
+ symtab_shndx_section and elf_numsections. Exclude reserved
+ sections from e_shnum. Set up symtab_shndx_hdr.
+ (_bfd_elf_compute_section_file_positions): Handle symtab_shndx_hdr.
+ (map_sections_to_segments): Don't map eh_frame_hdr unless required.
+ (assign_file_positions_except_relocs): Use elf_numsections rather
+ than header e_shnum. Skip reserved sections and symtab_shndx_section.
+ (prep_headers): Set name for symtab_shndx_hdr.
+ (_bfd_elf_assign_file_positions_for_relocs): Use elf_numsections.
+ (_bfd_elf_write_object_contents): Likewise. Skip reserved sections.
+ (_bfd_elf_section_from_bfd_section): Check bfd_{abs,com,und}_section
+ first. Use elf_section_data if available. Use elf_numsections.
+ Start scan at index 1.
+ (copy_private_bfd_data ): Comment fixes.
+ (MAP_ONESYMTAB): Define above SHN_HIOS.
+ (MAP_DYNSYMTAB): Likewise.
+ (MAP_STRTAB): Likewise.
+ (MAP_SHSTRTAB): Likewise.
+ (MAP_SYM_SHNDX): New define.
+ (_bfd_elf_copy_private_symbol_data): Handle symtab_shndx_section.
+ (swap_out_syms): Swap out SHT_SYMTAB_SHNDX section too.
+ * elfcode.h (elf_swap_symbol_in): Add shndx param, and handle shndx
+ extension.
+ (elf_swap_symbol_out): Likewise.
+ (elf_object_p): Set elf_numsections, and use instead of e_shnum.
+ Initialialise reserved elf_elfsections to point at shdr[0]. Remove
+ redundant bfd_release calls.
+ (elf_slurp_symbol_table): Read symbol shndx extension, and use with
+ elf_swap_symbol_in. Translate st_shndx for > SHN_HIRESERVE too.
+ * elflink.h (elf_link_is_defined_archive_symbol): Read symbol shndx
+ extension, and use with elf_swap_symbol_in.
+ (elf_link_record_local_dynamic_symbol): Likewise.
+ (elf_link_add_object_symbols): Likewise. Also translate st_shndx
+ for elf sections > SHN_HIRESERVE.
+ (NAME(bfd_elf,size_dynamic_sections)): Adjust elf_swap_symbol_out
+ call.
+ (struct elf_final_link_info): Add locsym_shndx and symshndxbuf.
+ (elf_bfd_final_link): Allocate the above, and tidy code allocating
+ other buffers. Use elf_numsections instead of e_shnum. Adjust
+ elf_swap_symbol_out calls.
+ (elf_link_output_sym): Swap out symbol shndx extension too.
+ (elf_link_flush_output_syms): And flush them to disk.
+ (elf_link_output_extsym): Use SHN_BAD. Adjust elf_swap_symbol_out
+ calls.
+ (elf_gc_mark): Read symbol shndx extension, and use with
+ elf_swap_symbol_in.
+ (elf_link_input_bfd): Likewise, Translate st_shndx for elf sections
+ > SHN_HIRESERVE too. Use SHN_BAD.
+ (elf_reloc_symbol_deleted_p): Use symbol shndx extensions with
+ elf_swap_symbol_in. Translate st_shndx > SHN_HIRESERVE too.
+ (elf_bfd_discard_info): Read symbol shndx extension. Don't attempt
+ to continue after a bfd error.
+ * elf-m10200.c (mn10200_elf_relax_section): Only read local syms.
+ Stash them immediately to symtab_hdr->contents rather than later
+ in multiple places. Clean up afterwards. Read symbol shndx
+ extension, and use with swap_symbol_in. Translate SHN_UNDEF,
+ SHN_ABS, SHN_COMMON and elf sections > SHN_HIRESERVE to bfd
+ sections too. Remove dead code.
+ (mn10200_elf_relax_delete_bytes): Use symbol shndx extension
+ when swapping in symbols. Tidy code adjusting global syms.
+ Don't swap in global syms.
+ (mn10200_elf_symbol_address_p): Likewise. Remove extsyms param.
+ (mn10200_elf_get_relocated_section_contents): Read symbol shndx
+ extension, and use with swap_symbol_in. Rename "size" -> "amt"
+ to maximize code in common with other files. Translate st_shndx
+ for > SHN_HIRESERVE too. Remove dead code.
+ * elf-m10300.c (mn10300_elf_relax_section): Only read local syms.
+ Stash them immediately to symtab_hdr->contents rather than later
+ in multiple places. Clean up afterwards. Read symbol shndx
+ extension, and use with swap_symbol_in. Remove dead code.
+ (mn10300_elf_relax_delete_bytes): As for elf-m10200.c.
+ (mn10300_elf_symbol_address_p): Likewise.
+ (mn10300_elf_get_relocated_section_contents): Likewise.
+ * elf32-h8300.c (elf32_h8_relax_section): As for elf-m10300.c.
+ (elf32_h8_relax_delete_bytes): Likewise.
+ (elf32_h8_symbol_address_p): Likewise.
+ (elf32_h8_get_relocated_section_contents): Likewise.
+ * elf32-hppa.c (elf32_hppa_size_stubs): Read symbol shndx
+ extension, and use with swap_symbol_in.
+ * elf64-hppa.c (elf64_hppa_check_relocs): Likewise.
+ * elf32-i370.c (i370_elf_finish_dynamic_sections): Adjust call to
+ bfd_elf32_swap_symbol_out.
+ * elf32-m32r.c (m32r_elf_get_relocated_section_contents): Translate
+ elf sections > SHN_HIRESERVE too.
+ * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Only read
+ local syms. Read symbol shndx extension, and use with swap_symbol_in.
+ * elf32-mips.c (_bfd_mips_elf_final_write_processing): Use
+ elf_numsections rather than header e_shnum.
+ * elf32-sh.c (sh_elf_relax_section): As for elf-m10300.c.
+ (sh_elf_relax_delete_bytes): Likewise.
+ (sh_elf_get_relocated_section_contents): Likewise. Only read local
+ symbols.
+ * elf32-v850.c (v850_elf_symbol_processing): Use an unsigned int to
+ hold section index. Use elf_numsections rather than e_shnum.
+ Rename "index" -> "indx" to avoid shadowing warning.
+ (v850_elf_add_symbol_hook): Likewise.
+ * elf64-alpha.c (elf64_alpha_relax_section): Only read local syms.
+ Read symbol shndx extension, and use with swap_symbol_in.
+ * elf32-xstormy16.c (xstormy16_elf_relax_section): Likewise.
+ Translate SHN_COMMON and elf sections > SHN_HIRESERVE too.
+ * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
+ (elfNN_ia64_aix_add_symbol_hook): Use elf_numsections.
+
+ * elf-m10300.c (mn10300_elf_gc_mark_hook): Remove unnecessary checks
+ before calling bfd_section_from_elf_index on local syms.
+ * elf32-arm.h (elf32_arm_gc_mark_hook): Likewise.
+ * elf32-avr.c (elf32_avr_gc_mark_hook): Likewise.
+ * elf32-cris.c (cris_elf_gc_mark_hook): Likewise.
+ * elf32-d10v.c (elf32_d10v_gc_mark_hook): Likewise.
+ * elf32-fr30.c (fr30_elf_gc_mark_hook): Likewise.
+ * elf32-hppa.c (elf32_hppa_gc_mark_hook): Likewise.
+ * elf32-i386.c (elf_i386_gc_mark_hook): Likewise.
+ * elf32-m32r.c (m32r_elf_gc_mark_hook): Likewise.
+ * elf32-m68k.c (elf_m68k_gc_mark_hook): Likewise.
+ * elf32-mcore.c (mcore_elf_gc_mark_hook): Likewise.
+ * elf32-mips.c (_bfd_mips_elf_gc_mark_hook): Likewise.
+ * elf32-openrisc.c (openrisc_elf_gc_mark_hook): Likewise.
+ * elf32-ppc.c (ppc_elf_gc_mark_hook): Likewise.
+ * elf32-s390.c (elf_s390_gc_mark_hook): Likewise.
+ * elf32-sh.c (sh_elf_gc_mark_hook): Likewise.
+ * elf32-sparc.c (elf32_sparc_gc_mark_hook): Likewise.
+ * elf32-v850.c (v850_elf_gc_mark_hook): Likewise.
+ * elf32-xstormy16.c (xstormy16_elf_gc_mark_hook): Likewise.
+ * elf64-mips.c (mips_elf64_gc_mark_hook): Likewise.
+ * elf64-mmix.c (mmix_elf_gc_mark_hook): Likewise.
+ * elf64-ppc.c (ppc64_elf_gc_mark_hook): Likewise.
+ * elf64-s390.c (elf_s390_gc_mark_hook): Likewise.
+ * elf64-x86-64.c (elf64_x86_64_gc_mark_hook): Likewise.
+
+2001-12-17 Alan Modra <amodra@bigpond.net.au>
+
+ Hash bfd sections for fast lookup and create.
+ * bfd.c (struct _bfd): Add section_htab, section_tail.
+ * libbfd-in.h (_bfd_delete_bfd): Declare.
+ (bfd_section_hash_newfunc): Declare.
+ * opncls.c (_bfd_new_bfd): Free memory on failure. Init
+ section_htab and section_tail.
+ (_bfd_delete_bfd): New function.
+ (bfd_openr): Use it.
+ (bfd_fdopenr): Likewise.
+ (bfd_openstreamr): Likewise.
+ (bfd_openw): Likewise.
+ (bfd_close): Likewise.
+ (bfd_close_all_done): Likewise.
+ (bfd_release): Comment.
+ * section.c (struct section_hash_entry): New.
+ (bfd_section_hash_newfunc): New function.
+ (section_hash_lookup): Define.
+ (bfd_section_init): New function, split out from
+ bfd_make_section_anyway.
+ (bfd_get_section_by_name): Lookup via hash table.
+ (bfd_get_unique_section_name): Likewise.
+ (bfd_make_section_old_way): Rewrite to use hash table.
+ (bfd_make_section_anyway): Likewise.
+ (bfd_make_section): Likewise. Return NULL for attempts to make
+ BFD_{ABS,COM,UND,IND}_SECTION_NAME.
+ (_bfd_strip_section_from_output): Adjust section_tail if needed.
+ * configure.in: Bump bfd version.
+ * configure: Regenerate.
+ * libbfd.h: Regenerate.
+ * bfd-in2.h: Regenerate.
+
+2001-12-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * elf64-mips.c (mips_elf64_link_hash_entry): New link hash.
+ (mips_elf64_high): New Function.
+ (mips_elf64_higher): Likewise.
+ (mips_elf64_highest): Likewise.
+ (mips_elf64_info_to_howto_rel): Likewise.
+ (mips_elf64_info_to_howto_rela): Likewise.
+ (mips_elf64_write_rel): Likewise.
+ (mips_elf64_write_rela): Likewise.
+ (mips_elf64_link_hash_newfunc): Likewise.
+ (mips_elf64_hi16_reloc): Likewise.
+ (mips_elf64_higher_reloc): Likewise.
+ (mips_elf64_highest_reloc): Likewise.
+ (mips_elf64_gprel16_reloc): Likewise.
+ (mips_elf64_gprel16_reloca): Likewise.
+ (mips_elf64_literal_reloc): Likewise.
+ (mips_elf64_gprel32_reloc): Likewise.
+ (mips_elf64_shift6_reloc): Likewise.
+ (mips_elf64_got16_reloc): Likewise.
+ (mips_elf64_assign_gp): Likewise.
+ (mips_elf64_final_gp): Likewise.
+ (gprel16_with_gp): Likewise.
+ (mips_elf64_additional_program_headers): Likewise.
+ (mips_elf64_link_hash_table_create): Likewise.
+ (mips_elf64_got_offset_from_index): Likewise.
+ (_mips_elf64_got_info): Likewise.
+ (mips_elf64_sign_extend): Likewise.
+ (mips_elf64_overflow_p): Likewise.
+ (mips_elf64_global_got_index): Likewise.
+ (mips_elf64_sort_hash_table_f): Likewise.
+ (mips_elf64_sort_hash_table): Likewise.
+ (mips_elf64_swap_msym_out): Likewise.
+ (mips_elf64_create_local_got_entry): Likewise.
+ (mips_elf64_local_got_index): Likewise.
+ (mips_elf64_got_page): Likewise.
+ (mips_elf64_got16_entry): Likewise.
+ (mips_elf64_local_relocation_p): Likewise.
+ (mips_elf64_next_relocation): Likewise.
+ (mips_elf64_create_dynamic_relocation): Likewise.
+ (mips_elf64_calculate_relocation): Likewise.
+ (mips_elf64_obtain_contents): Likewise.
+ (mips_elf64_perform_relocation): Likewise.
+ (mips_elf64_relocate_section): Likewise.
+ (mips_elf64_create_dynamic_sections): Likewise.
+ (mips_elf64_adjust_dynamic_symbol): Likewise.
+ (mips_elf64_always_size_sections): Likewise.
+ (mips_elf64_size_dynamic_sections): Likewise.
+ (mips_elf64_finish_dynamic_symbol): Likewise.
+ (mips_elf64_finish_dynamic_sections): Likewise.
+ (mips_elf64_gc_mark_hook): Likewise.
+ (mips_elf64_gc_sweep_hook): Likewise.
+ (mips_elf64_create_got_section): Likewise.
+ (mips_elf64_record_global_got_symbol): Likewise.
+ (mips_elf64_create_msym_section): Likewise.
+ (mips_elf64_allocate_dynamic_relocations): Likewise.
+ (mips_elf64_check_relocs): Likewise.
+ (mips_elf64_output_extsym): Likewise.
+ (mips_elf64_swap_gptab_in): Likewise.
+ (mips_elf64_swap_gptab_out): Likewise.
+ (gptab_compare): Likewise.
+ (mips_elf64_final_link): Likewise.
+ (prev_reloc_addend): Remenber addend of previous parts of a combined
+ reloc.
+ (ELF_MIPS_GP_OFFSET): New define.
+ (STUB_LW,STUB_MOVE,STUB_JALR,STUB_LI16): Likewise.
+ (MIPS_FUNCTION_STUB_SIZE): Likewise.
+ (mips_elf64_howto_rel): Fix HOWTO defines.
+ (mips_elf64_howto_rela): Likewise.
+ (mips_elf64_swap_reloca_out): Fix signedness.
+ (mips_elf64_be_swap_reloc_in): Use ELF64* instead of ELF32*.
+ (mips_elf64_be_swap_reloca_in): Likewise.
+ (mips_elf64_be_swap_reloc_out): Likewise. Preserve extended type info.
+ (mips_elf64_be_swap_reloca_out): Likewise.
+
+2001-12-15 Jakub Jelinek <jakub@redhat.com>
+
+ * elf-bfd.h (_bfd_elf_maybe_strip_eh_frame_hdr): New prototype.
+ * elf-eh-frame.c (struct eh_frame_hdr_info): Add strip.
+ (_bfd_elf_discard_section_eh_frame): Don't create .eh_frame_hdr
+ sec_info here. Free ehbuf.
+ (_bfd_elf_discard_section_eh_frame_hdr): Don't size the section
+ if hdr_info->strip.
+ (_bfd_elf_maybe_strip_eh_frame_hdr): New.
+ * elflink.h (size_dynamic_sections): Call it.
+
+2001-12-14 Alan Modra <amodra@bigpond.net.au>
+
+ * elflink.h (elf_bfd_discard_info): Fix segfault when dynobj NULL.
+
+2001-12-13 Jakub Jelinek <jakub@redhat.com>
+
+ * elf-bfd.h (enum elf_link_info_type): New.
+ (struct bfd_elf_section_data): Remove stab_info and merge_info
+ fields, add sec_info and sec_info_type.
+ (struct elf_obj_tdata): Add eh_frame_hdr field.
+ (_bfd_elf_discard_section_eh_frame): New prototype.
+ (_bfd_elf_discard_section_eh_frame_hdr): Likewise.
+ (_bfd_elf_eh_frame_section_offset): Likewise.
+ (_bfd_elf_write_section_eh_frame): Likewise.
+ (_bfd_elf_write_section_eh_frame_hdr): Likewise.
+ * Makefile.am (BFD32_BACKENDS): Add elf-eh-frame.lo.
+ (BFD32_BACKENDS_CFILES): Add elf-eh-frame.c.
+ (elf-eh-frame.lo): New.
+ * Makefile.in: Rebuilt.
+ * configure.in (elf): Add elf-eh-frame.lo.
+ * configure: Rebuilt.
+ * elf.c (_bfd_elf_print_private_bfd_data): Support PT_GNU_EH_FRAME.
+ (map_sections_to_segments): Create PT_GNU_EH_FRAME if requested.
+ (get_program_header_size): Take into account PT_GNU_EH_FRAME
+ segment.
+ (_bfd_elf_rela_local_sym): Use sec_info_type and sec_info.
+ (_bfd_elf_rel_local_sym): Likewise.
+ (_bfd_elf_section_offset): Likewise. Call
+ _bfd_elf_eh_frame_section_offset too.
+ * elfxx-ia64.c (elfNN_ia64_relocate_section): Use sec_info_type and
+ sec_info.
+ * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
+ * elf-eh-frame.c: New file.
+ * elflink.h (elf_link_add_object_symbols): Don't optimize SHF_MERGE
+ .stab sections. Set sec_info_type, use sec_info instead
+ of merge_info and stab_info.
+ (elf_link_create_dynamic_sections): Create .eh_frame_hdr section
+ if --eh-frame-hdr.
+ (elf_bfd_final_link): Write .eh_frame_hdr section.
+ (elf_link_sec_merge_syms): Use sec_info_type and sec_info.
+ (elf_link_input_bfd): Likewise.
+ Call _bfd_elf_write_section_eh_frame to write .eh_frame sections.
+ (elf_bfd_discard_info): Add output_bfd argument.
+ Call _bfd_elf_discard_section_eh_frame and
+ _bfd_elf_discard_section_eh_frame_hdr.
+ (elf_section_ignore_discarded_relocs): Use sec_info_type, not section
+ names.
+ * bfd-in.h (bfd_elf32_discard_info, bfd_elf64_discard_info): Adjust
+ prototypes.
+ * bfd-in2.h (bfd_elf32_discard_info, bfd_elf64_discard_info): Likewise.
+
+2001-12-12 Richard Henderson <rth@redhat.com>
+
+ * syms.c (_bfd_generic_read_minisymbols): Early return for
+ no symbols. Patch from FreeBSD folk; exact origin unknown.
+
+2001-12-11 Alan Modra <amodra@bigpond.net.au>
+
+ * elfcode.h (elf_swap_ehdr_out): Adjust value written for e_shnum
+ and e_shstrndx if out of range.
+ (elf_object_p): Read extended values for e_shnum and e_shstrndx
+ from the first section header. Allocate space in elf_elfsections
+ for reserved sections and set to NULLs.
+ (elf_write_shdrs_and_ehdr): Set overflow fields in first section
+ header. Skip reserved sections in elf_elfsections. Remove
+ duplicate size calculation.
+
+2001-12-07 Geoffrey Keating <geoffk@redhat.com>
+ Richard Henderson <rth@redhat.com>
+ Corinna Vinschen <vinschen@redhat.com>
+
+ * Makefile.am: Add support for xstormy16.
+ * archures.c: Add support for xstormy16.
+ * config.bfd: Add support for xstormy16.
+ * configure.in: Add support for xstormy16.
+ * reloc.c: Add support for xstormy16.
+ * targets.c: Add support for xstormy16.
+ * cpu-xstormy16.c: New file.
+ * elf32-xstormy16.c: New file.
+ * Makefile.in: Regenerated.
+ * bfd-in2.h: Regenerated.
+ * configure: Regenerated.
+ * libbfd.h: Regenerated.
+
+2001-12-07 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * elf.c (assign_file_positions_for_segments): Combine sentance
+ fragments into a single sentance in order to permit better
+ translation into foreign languages.
+
+2001-12-07 Jim Blandy <jimb@redhat.com>
+
+ * elf32-s390.c (elf32_s390_grok_prstatus): New function.
+ (elf_backend_grok_prstatus): Define.
+
+2001-12-07 Jakub Jelinek <jakub@redhat.com>
+
+ * elf32-sparc.c (elf32_sparc_relocate_section): Revert
+ 2001-09-14 change.
+
+2001-12-07 Jakub Jelinek <jakub@redhat.com>
+
+ * elf.c (_bfd_elf_rela_local_sym): Only call
+ _bfd_merged_section_offset if merge_info is non-NULL.
+ (_bfd_elf_rel_local_sym, _bfd_elf_section_offset): New.
+ * elf-bfd.h (_bfd_elf_rel_local_sym, _bfd_elf_section_offset): New
+ prototypes.
+ * elf32-arm.h (elf32_arm_final_link_relocate): Use
+ _bfd_elf_section_offset.
+ (elf32_arm_relocate_section): Use _bfd_elf_rel_local_sym.
+ * elf32-i386.c (elf_i386_relocate_section): Use
+ _bfd_elf_section_offset and _bfd_elf_rel_local_sym.
+ * elf32-sh.c (sh_elf_relocate_section): Likewise.
+ * elf32-sparc.c (elf32_sparc_relocate_section): Use
+ _bfd_elf_section_offset.
+ * elf32-cris.c (cris_elf_relocate_section): Likewise.
+ * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
+ * elf32-i370.c (i370_elf_relocate_section): Likewise.
+ * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
+ * elf32-mips.c (mips_elf_create_dynamic_relocation): Likewise.
+ * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
+ * elf32-s390.c (elf_s390_relocate_section): Likewise.
+ * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
+ * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
+ * elf64-s390.c (elf_s390_relocate_section): Likewise.
+ * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
+ * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
+ * elfxx-ia64.c (elfNN_ia64_install_dyn_reloc): Likewise.
+
+2001-12-07 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-hppa.c (clobber_millicode_symbols): Don't do anything if
+ already forced local.
+
+2001-12-05 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * elf32-arm.h (elf32_arm_merge_private_bfd_data): Combine
+ fragmented sentence parts into a whole sentence to permit
+ better translation into foreign languages.
+
+2001-12-06 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * configure: Regenerate.
+ * Makefile.in: Regenerate.
+
+2001-12-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * Makefile.am: split up BFD_LIBS like statements in BFD32_LIBS and
+ BFD64_LIBS, make the latter depending on the availability of BFD64.
+ Add archive64.c source file.
+ * archive64.c: New file implementing bfd_elf64_archive_slurp_armap
+ and bfd_elf64_archive_write_armap, code from elf64-mips.c
+ * archive.c (bfd_slurp_armap): Add ELF64 archive support.
+ * config.bfd (mips*-*-irix6*): Allow with BFD64 only.
+ (mips64*el-*-linux*): Likewise.
+ (mips*el-*-linux*): Likewise. Reorder entries.
+ * configure.in (bfd_libs): Define in dependency of BFD64 and
+ AC_SUBST it.
+ * elf64-mips.c (mips_elf64_slurp_armap): Remove, use
+ bfd_elf64_archive_slurp_armap instead.
+ (mips_elf64_write_armap): Remove, use bfd_elf64_archive_write_armap
+ instead.
+
+2001-12-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config.bfd: Remove trailing blanks.
+ * elf32-mips.c (gprel16_with_gp): Remove superfluous casts.
+
+2001-12-04 Alexandre Oliva <aoliva@redhat.com>
+
+ * elf32-d10v.c (elf_d10v_howto_table): Adjust bit-size of
+ R_D10V_10_PCREL_L, R_D10V_10_PCREL_R, R_D10V_18,
+ R_D10V_18_PCREL. Check 10_PCREL relocations as signed.
+ Disable pointless overflow checking of NONE and 32.
+
+2001-12-04 Alan Modra <amodra@bigpond.net.au>
+
+ * reloc.c (bfd_install_relocation): Correct reloc address test.
+ (bfd_perform_relocation): Formatting fix.
+ * bfd-in2.h: Regenerate for 2001-12-02 reloc.c change.
+
+2001-12-03 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * configure.in (LINGUAS): Add tr.
+ * configure: Regenerate.
+ * po/tr.po: Import from translation project's web site.
+
+2001-12-03 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-hppa.c (hppa_get_stub_entry): Remove debug message that
+ happens to trigger on undefined symbols.
+ (final_link_relocate): Return bfd_reloc_undefined for undefined
+ stubs.
+ (elf32_hppa_relocate_section): Don't say we can't handle a reloc
+ if we have already warned about an undefined symbol.
+
+2001-12-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * elf32-mips.c (NEWABI_P): New define.
+ (USE_REL): Remove, replaced by
+ (elf_backend_may_use_rel_p): New define.
+ (elf_backend_may_use_rela_p): Likewise.
+ (elf_backend_default_use_rela_p): Likewise.
+ (elf_mips_howto_table): Rename to elf_mips_howto_table_rel.
+ Fix some relocation definitions.
+ (elf_mips_howto_table_rela): New RELA relocation definitions for
+ NewABI support.
+ (mips32_64bit_reloc): Use the renamed elf_mips_howto_table_rel.
+ (bfd_elf32_bfd_reloc_type_lookup): Likewise.
+ (mips_rtype_to_howto): Likewise.
+ (_bfd_mips_elf_relocate_section): Likewise.
+ (_bfd_mips_elf_object_p): Typo.
+ (elf_backend_sign_extend_vma): Reordered together with many other
+ defines nearby to resemble the order of declaration in the header
+ file.
+
+2001-12-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * coff-mips.c (mips_bfd_reloc_type_lookup): Replace
+ BFD_RELOC_MIPS_GPREL by BFD_RELOC_GPREL16.
+ * pe-mips.c (mips_bfd_reloc_type_lookup): Likewise.
+ * elf32-mips.c (mips_reloc_map): Likewise. Replace
+ BFD_RELOC_MIPS_GPREL32 by BFD_RELOC_GPREL32.
+ * elf64-mips.c (mips_reloc_map): Likewise.
+ * reloc.c (BFD_RELOC_MIPS_GPREL): Remove.
+ (BFD_RELOC_MIPS_GPREL32): Remove.
+
+2001-11-30 H.J. Lu <hjl@gnu.org>
+
+ * elflink.h (elf_add_default_symbol): New.
+ (elf_link_add_object_symbols): Call elf_add_default_symbol ()
+ to create an indirect symbol from the default for the symbol
+ with the default version if needed.
+
+2001-11-29 "Peter.Schauer" <Peter.Schauer@regent.e-technik.tu-muenchen.de>
+
+ * elf.c (elfcore_grok_prstatus): Do not overwite the core signal
+ if it has already been set by another thread.
+
+2001-11-28 Jakub Jelinek <jakub@redhat.com>
+
+ * elf64-alpha.c (ALPHA_ELF_GOT_ENTRY_RELOCS_XLATED): Defined.
+ (elf64_alpha_relocate_section): Translate local_got_entries
+ for STT_SECTION symbol to SHF_MERGE section the first time
+ we see it.
+ * elfxx-ia64.c (struct elfNN_ia64_local_hash_entry): Add
+ sec_merge_done.
+ (get_local_sym_hash): New, extracted from get_dyn_sym_info.
+ (get_dyn_sym_info): Use it.
+ (elfNN_ia64_relocate_section): Translate local dyn entries
+ for STT_SECTION symbol to SHF_MERGE section the first time
+ we see it.
+
+2001-11-27 H.J. Lu <hjl@gnu.org>
+
+ * elflink.h (elf_bfd_discard_info): Skip if the input bfd isn't
+ ELF.
+
+2001-11-26 Jeffrey A Law (law@cygnus.com)
+
+ * stabs.c (_bfd_discard_section_stabs): Use PARAMS in function
+ prototypes.
+
+2001-11-24 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-hppa.c (elf32_hppa_size_stubs): Decrease default stub
+ group sizes to accommodate c++.
+
+2001-11-23 Jakub Jelinek <jakub@redhat.com>
+
+ * elf32-sparc.c (elf32_sparc_relocate_section): Don't clear
+ relocations in non-alloced sections against global symbols
+ defined in shared library being built.
+ * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
+
+2001-11-23 Jakub Jelinek <jakub@redhat.com>
+
+ * elf.c (_bfd_elf_rela_local_sym): New.
+ * elflink.h (elf_link_input_bfd): Don't consider empty
+ merged sections as removed in relocation tests.
+ * elf-bfd.h (_bfd_elf_rela_local_sym): Add prototype.
+ * elf32-i386.c (elf_i386_relocate_section): Handle relocs
+ against STT_SECTION symbol of SHF_MERGE section.
+ * elf32-arm.h (elf32_arm_relocate_section): Likewise.
+ * elf32-avr.c (elf32_avr_relocate_section): Call
+ _bfd_elf_rela_local_sym.
+ * elf32-cris.c (cris_elf_relocate_section): Likewise.
+ * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
+ * elf32-fr30.c (fr30_final_link_relocate): Likewise.
+ * elf32-h8300.c (elf32_h8_relocate_section): Likewise.
+ * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
+ * elf32-i370.c (i370_elf_relocate_section): Likewise.
+ * elf32-i860.c (elf32_i860_relocate_section): Likewise.
+ * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
+ * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
+ * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
+ * elf32-openrisc.c (openrisc_elf_relocate_section): Likewise.
+ * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
+ * elf32-s390.c (elf_s390_relocate_section): Likewise.
+ * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
+ * elf32-v850.c (v850_elf_relocate_section): Likewise.
+ * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
+ * elf64-mmix.c (mmix_elf_relocate_section): Likewise.
+ * elf64-ppc.c (ppc64_elf_relocate_section): Likewise.
+ * elf64-s390.c (elf_s390_relocate_section): Likewise.
+ * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
+ * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
+ * elf-hppa.h (elf_hppa_relocate_section): Likewise.
+ * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
+ * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
+ * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
+ * elf32-sh.c (sh_elf_relocate_section): Likewise for
+ !partial_inplace relocs. Handle relocs against STT_SECTION
+ symbol of SHF_MERGE for partial_inplace relocs.
+
+2001-11-21 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * po/Make-in (distclean): Move SRC-POTFILES.in and
+ BLD-POTFILES.in to maintainer-clean target.
+
+2001-11-21 Alan Modra <amodra@bigpond.net.au>
+
+ * elfxx-ia64.c (elfNN_ia64_relocate_section): Test r_symndx rather
+ than sym_sec->output_section to detect relocs against discarded
+ sections.
+
+2001-11-19 H.J. Lu <hjl@gnu.org>
+
+ * elflink.h (elf_link_input_bfd): Assert r_symndx != 0 when
+ discarding relocations.
+
+2001-11-19 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * section.c (bfd_is_const_section): New macro. Return true if the
+ given seciton is one of the special, constant, sections.
+ * bfd-in2.h: Regenerate.
+ * coffgen.c (coff_count_linenumbers): Use bfd_is_const_section.
+ (coff_write_native_symbol): Use bfd_is_const_section.
+
+2001-11-19 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-hppa.c (clobber_millicode_symbols): Dec dynstr refcount.
+
+ * elf32-hppa.c (elf32_hppa_size_stubs): Don't consider undefined
+ millicode syms as candidates for import stubs.
+
+ * elf32-hppa.c (PLABEL_PLT_ENTRY_SIZE): Delete.
+ (allocate_PIC_calls): Rename to allocate_plt_static.
+ (allocate_dynrelocs): Move most of code handling .plt entries to..
+ (allocate_plt_static): ..here. Don't drop plabel entries.
+
+2001-11-19 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * mmo.c: Adjust documentation tags to use texinfo 4 features.
+
+2001-11-16 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * section.c (bfd_is_const_section): New macro. Return true if the
+ section pointer refers to one of the special, constant sections.
+ * bfd-in2.h: Regenerate.
+
+ * coffgen.c (coff_count_linenumbers): Only update the line number
+ count in non-special sections.
+ (coff_write_native_symbol): Only update the line number file
+ position in non-special sections.
+
+2001-11-15 Daniel Jacobowitz <drow@mvista.com>
+
+ * elflink.h (elf_reloc_symbol_deleted_p): Catch all relocs against
+ local syms from discarded sections. Update comment.
+
+2001-11-15 Alan Modra <amodra@bigpond.net.au>
+
+ * po/SRC-POTFILES.in: Regenerate.
+
+ * elflink.h (elf_link_input_bfd): Complain about all relocs
+ against local syms from discarded sections. K&R fixes.
+ (elf_reloc_symbol_deleted_p): Don't try to swap in external syms.
+ K&R fixes.
+
+2001-11-15 Alexandre Oliva <aoliva@redhat.com>
+
+ * elf64-sparc.c (sparc64_elf_relocate_section): Disregard
+ overflows in the .stab section.
+
+2001-11-14 Daniel Jacobowitz <drow@mvista.com>
+
+ * bfd-in.h (bfd_elf32_discard_info): Add prototype.
+ (bfd_elf64_discard_info): Likewise.
+ * bfd-in2.h: Regenerate.
+ * elf-bfd.h (struct elf_reloc_cookie): New.
+ (struct elf_backend_data): Add elf_backend_discard_info,
+ elf_backend_ignore_discarded_relocs, and elf_backend_write_section.
+ (_bfd_elf32_reloc_symbol_deleted_p): Add prototype.
+ (_bfd_elf64_reloc_symbol_deleted_p): Likewise.
+ * elf32-mips.c (_bfd_elf32_mips_discard_info): New.
+ (_bfd_elf32_mips_ignore_discarded_relocs): New.
+ (_bfd_elf32_mips_write_section): New.
+ (elf_backend_discard_info): Define.
+ (elf_backend_ignore_discarded_relocs): Define.
+ (elf_backend_write_section): Define.
+ * elfcode.h (elf_bfd_discard_info): Define.
+ (elf_reloc_symbol_deleted_p): Define.
+ * elflink.h (elf_link_input_bfd): Check
+ elf_section_ignore_discarded_relocs. Call
+ bed->elf_backend_write_section if available.
+ (elf_reloc_symbol_deleted_p): New.
+ (elf_bfd_discard_info): New.
+ (elf_section_ignore_discarded_relocs): New.
+ * elfxx-target.h (elf_backend_discard_info): Define.
+ (elf_backend_ignore_discarded_relocs): Define.
+ (elf_backend_write_section): Define.
+ (elfNN_bed): Add elf_backend_discard_info,
+ elf_backend_ignore_discarded_relocs, and
+ elf_backend_write_section.
+ * libbfd-in.h (_bfd_discard_section_stabs): Add prototype.
+ * libbfd.h: Regenerate.
+ * stabs.c (_bfd_discard_section_stabs): New.
+
+2001-11-14 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * elf32-s390.c (elf_s390_relocate_section): Use the "unresolved_reloc"
+ scheme to get rid of an ugly complicated test.
+ * elf64-s390.c (elf_s390_relocate_section): Likewise.
+
+2001-11-14 Andreas Jaeger <aj@suse.de>
+
+ * cpu-i386.c (bfd_x86_64_arch_intel_syntax,bfd_x86_64_arch): Use
+ x86-64 for display.
+
+2001-11-14 Jakub Jelinek <jakub@redhat.com>
+
+ * dwarf2.c (struct line_head) [total_length]: Change type to
+ bfd_vma.
+ (struct dwarf2_debug): Add dwarf_str_buffer and dwarf_str_size.
+ (struct comp_unit): Add stash and offset_size.
+ (read_8_bytes): Return bfd_vma.
+ (read_indirect_string): New.
+ (read_attribute): Handle DW_FORM_strp.
+ (decode_line_info): Support 64-bit DWARF format.
+ (_bfd_dwarf2_find_nearest_line): Likewise.
+ (parse_comp_unit): Set offset_size and stash.
+
+2001-11-13 Keith Walker <keith.walker@arm.com>
+
+ * dwarf2.c (read_attribute_value): New function to handle
+ DW_FORM_indirect.
+ (read_attribute): Use it.
+
+2001-11-13 Geoffrey Keating <geoffk@redhat.com>
+
+ * dwarf2.c (decode_line_info): Properly deal with unknown standard
+ opcodes.
+
+2001-11-13 John Marshall <jmarshall@acm.org>
+ Alan Modra <amodra@bigpond.net.au>
+
+ * section.c (bfd_make_section_anyway): Don't increment section_id
+ and the BFD's section_count if adding the section failed.
+ * vms.c (vms_new_section_hook): Adjust for bfd_make_section_anyway
+ change.
+
+2001-11-12 Orjan Friberg <orjanf@axis.com>
+
+ * elf32-cris.c (cris_elf_grok_prstatus): Adjust values to match new
+ core dump format.
+
+2001-11-11 H.J. Lu <hjl@gnu.org>
+
+ * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Call
+ _bfd_elf_strtab_size instead of _bfd_stringtab_size.
+
+ * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Change
+ dynstr type to `struct elf_strtab_hash *'.
+
+2001-11-11 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * elf-strtab.c (_bfd_elf_strtab_finalize): Make first variable i
+ size_t. Rename second i to j.
+
+2001-11-10 Jeffrey A Law (law@cygnus.com)
+
+ * binary.c: Include safe-ctype.h after bfd.h and sysdep.h.
+
+2001-11-10 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-arm.h (elf32_arm_final_link_relocate): Don't copy STN_UNDEF
+ relocs into shared libs.
+ * elf32-cris.c (cris_elf_relocate_section): Likewise.
+ * elf32-i370.c (i370_elf_relocate_section): Likewise.
+ * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
+ * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
+ * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
+ * elf32-sh.c (sh_elf_relocate_section): Likewise.
+ * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
+ * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
+ * elf64-s390.c (elf_s390_relocate_section): Likewise.
+ * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
+ * elf64-x86-64.c (elf64_x86_64_relocate_section): Likewise.
+ * elfxx-ia64.c (elfNN_ia64_relocate_section): Likewise.
+
+ * elf.c (bfd_section_from_r_symndx): New function.
+ * elf-bfd.h (LOCAL_SYM_CACHE_SIZE): Define.
+ (struct sym_sec_cache): New.
+ (bfd_section_from_r_symndx): Declare.
+ (struct bfd_elf_section_data): Change local_dynrel type to PTR.
+ * elflink.h (elf_link_input_bfd): Don't test for removed linkonce
+ relocs when relocatable. Don't zero entire reloc, just zero the
+ addend and sym.
+ * elf32-hppa.c (struct elf32_hppa_link_hash_table): Add sym_sec.
+ (elf32_hppa_link_hash_table_create): Init it.
+ (elf32_hppa_check_relocs): Track dynamic relocs needed for local
+ syms on a per-section basis as we do for globals.
+ (elf32_hppa_gc_sweep_hook): Update for local_dynrel change.
+ (allocate_dynrelocs): Warning fix.
+ (elf32_hppa_size_dynamic_sections): Don't allocate relocs when
+ section has been discarded.
+ (elf32_hppa_relocate_section): Don't copy STN_UNDEF relocs
+ into shared libs.
+ * elf32-i386.c (struct elf_i386_link_hash_table): Add sym_sec.
+ (elf_i386_link_hash_table_create): Init it.
+ (elf_i386_check_relocs): Track dynamic relocs needed for local
+ syms on a per-section basis as we do for globals.
+ (elf_i386_gc_sweep_hook): Update for local_dynrel change.
+ Remove dead code.
+ (allocate_dynrelocs): Warning fix.
+ (elf_i386_size_dynamic_sections): Don't allocate relocs when
+ section has been discarded.
+ (elf_i386_relocate_section): Don't copy STN_UNDEF relocs
+ into shared libs.
+ * elf32-s390.c (struct elf_s390_link_hash_table): Add sym_sec.
+ (elf_s390_link_hash_table_create): Init it.
+ (elf_s390_check_relocs): Track dynamic relocs needed for local
+ syms on a per-section basis as we do for globals.
+ (elf_s390_gc_sweep_hook): Update for local_dynrel change.
+ Remove dead code.
+ (allocate_dynrelocs): Warning fix.
+ (elf_s390_size_dynamic_sections): Don't allocate relocs when
+ section has been discarded.
+ (elf_s390_relocate_section): Don't copy STN_UNDEF relocs
+ into shared libs.
+ * elf64-ppc.c (struct ppc_link_hash_table): Add sym_sec.
+ (ppc64_link_hash_table_create): Init it.
+ (ppc64_elf_check_relocs): Track dynamic relocs needed for local
+ syms on a per-section basis as we do for globals.
+ (ppc64_elf_gc_sweep_hook): Update for local_dynrel change.
+ (allocate_dynrelocs): Call the correct record_dynamic_dymbol
+ function. Warning fix.
+ (ppc64_elf_size_dynamic_sections): Don't allocate relocs when
+ section has been discarded.
+ (ppc64_elf_relocate_section): Don't copy STN_UNDEF relocs
+ into shared libs.
+ * elf64-s390.c (struct elf_s390_link_hash_table): Add sym_sec.
+ (elf_s390_link_hash_table_create): Init it.
+ (elf_s390_check_relocs): Track dynamic relocs needed for local
+ syms on a per-section basis as we do for globals.
+ (elf_s390_gc_sweep_hook): Update for local_dynrel change.
+ Remove dead code.
+ (allocate_dynrelocs): Warning fix.
+ (elf_s390_size_dynamic_sections): Don't allocate relocs when
+ section has been discarded.
+ (elf_s390_relocate_section): Don't copy STN_UNDEF relocs
+ into shared libs.
+
+2001-11-08 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * elf32-s390: Major rework that introduces all recent changes to
+ the s390 backends. Get a closer match to elf32-i386.
+ (elf_s390_relocate_section): Make use of dynamic section short-cuts.
+ Localise vars, and delay setting. Better error reporting, replace
+ BFD_ASSERT with abort. Check ELF_LINK_HASH_DEF_DYNAMIC to see if a
+ symbol is not defined in the regular object file and tread the weak
+ definition as the normal one. Don't discard relocs for undefweak or
+ undefined symbols and check !DEF_REGULAR as well as DEF_DYNAMIC in
+ test for avoided copy relocs. Reinstate fudge for unresolved relocs
+ in debugging sections.
+ (elf32_s390_adjust_dynamic_symbol): Handle nocopyreloc. Don't do copy
+ reloc processing for weakdefs. Remove redundant casts and aborts.
+ Delay setting of vars until needed. Move creation of dynamic symbols
+ and allocation of .plt and .rela.plt to allocate_dynrelocs. Replace
+ BFD_ASSERT with abort. Discard .plt entries for everything with
+ plt.refcount <= 0.
+ (elf_s390_check_relocs): Don't allocate space for dynamic relocs,
+ .got or .relgot here but do it in allocate_dynrelocs. Reference count
+ possible .plt and .got entries. Don't test input section SEC_READONLY
+ here to try to avoid copy relocs, and keep dyn_relocs regardless of
+ ELF_LINK_NON_GOT_REF. Don't set DF_TEXTREL here. Delay setting of
+ variables until needed. Remove separate switch stmt for creating .got
+ section. Initialise local_got_refcounts to 0. Cache pointer to
+ "sreloc" section in elf_section_data. Tweak condition under which .got
+ created. Report files with bad relocation section names.
+ (elf_s390_finish_dynamic_symbol): Don't copy relocs for symbols that
+ have been forced local. Use same test to decide if we can use a
+ relative reloc for got as elf_s390_relocate_section. Expand SHN_UNDEF
+ comment. Move expressions out of function calls. Replace BFD_ASSERT
+ with abort.
+ (elf_s390_finish_dynamic_sections): Migrate common code out of switch
+ statement. Replace BFD_ASSERT with abort.
+ (elf_s390_size_dynamic_sections): Call readonly_dynrelocs. Rename "i"
+ to "ibfd". Allocate space for local dyn relocs. Use DF_TEXTREL flag
+ instead of looking up section names for DT_TEXTREL. Replace
+ BFD_ASSERT with abort. Zero out the dynamic allocated content space.
+ Add a comment to remind us that one day this ought to be fixed.
+ (struct elf_s390_link_hash_entry): Rename "root" to "elf".
+ (struct elf_s390_link_hash_table): Likewise.
+ (elf_s390_link_hash_newfunc): Rename to link_hash_newfunc and get
+ rid of unnecessary casts.
+ (struct elf_s390_dyn_relocs): Add "sec", and "pc_count" fields.
+ Remove "section" field.
+ (elf_s390_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
+ Reference count possible .plt entries. Don't deallocate .got and
+ .relgot space here.
+ (struct elf_s390_pcrel_relocs_copied): Rename to elf_s390_dyn_relocs.
+ Update comment.
+ (struct elf_s390_link_hash_entry): Rename pcrel_relocs_copied to
+ dyn_relocs.
+ (elf_s390_discard_copies): Delete.
+ (elf_s390_link_hash_traverse): Delete.
+ (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link
+ rather than gc variety).
+ (struct elf_s390_link_hash_table): Add sgot, sgotplt, srelgot, splt,
+ srelplt, sdynbss, srelbss fields.
+ (elf_s390_link_hash_table_create): Init them.
+ (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
+ (allocate_dynrelocs): New function.
+ (create_got_section): New function.
+ (elf_backend_can_refcount): Define.
+ (elf_backend_copy_indirect_symbol): Define.
+ (elf_s390_copy_indirect_symbol): New function.
+ (elf_s390_create_dynamic_sections): New function.
+ (readonly_dynrelocs): New function.
+ * elf64-s390.c: Likewise.
+
+2001-11-07 Jakub Jelinek <jakub@redhat.com>
+
+ * Makefile.am (BFD32_BACKENDS): Add elf-strtab.lo.
+ (BFD32_BACKENDS_CFILES): Add elf-strtab.c.
+ (elf-strtab.lo): Add rule.
+ * Makefile.in: Rebuilt.
+ * configure.in (elf): Add elf-strtab.lo.
+ * configure: Rebuilt.
+ * elf-bfd.h (elf_strtab_hash): Forward declare.
+ (struct elf_link_hash_table): Change dynstr type to
+ struct elf_strtab_hash *.
+ (struct elf_obj_tdata): Change strtab_ptr type to
+ struct elf_strtab_hash *.
+ (_bfd_elf_strtab_init, _bfd_elf_strtab_free, _bfd_elf_strtab_add,
+ _bfd_elf_strtab_addref, _bfd_elf_strtab_delref,
+ _bfd_elf_strtab_clear_all_refs, _bfd_elf_strtab_size,
+ _bfd_elf_strtab_offset, _bfd_elf_strtab_emit,
+ _bfd_elf_strtab_finalize): New prototypes.
+ * elf-strtab.c: New file.
+ * elflink.h (elf_link_add_object_symbols): Use _bfd_elf_strtab_add
+ and _bfd_elf_strtab_size instead of _bfd_stringtab calls.
+ Call _bfd_elf_strtab_delref if DT_NEEDED entry is not needed or
+ when forcing dynamic symbol to local.
+ (elf_link_create_dynamic_sections): Call
+ _bfd_elf_strtab_init instead of elf_stringtab_init.
+ (elf_link_record_local_dynamic_symbol): Likewise, change
+ dynstr type. Use _bfd_elf_strtab functions instead of
+ _bfd_stringtab calls.
+ (size_dynamic_sections): Use _bfd_elf_strtab functions instead of
+ _bfd_stringtab calls. For DT_RUNPATH and Verdaux vda_name fields,
+ call _bfd_elf_strtab_addref. Call elf_finalize_dynstr.
+ (elf_adjust_dynstr_offsets, elf_finalize_dynstr): New functions.
+ (elf_fix_symbol_flags): Call _bfd_elf_strtab_delref when forcing
+ dynamic symbol to local.
+ (elf_link_assign_sym_version): Likewise.
+ (elf_bfd_final_link): Call _bfd_elf_strtab_emit instead of
+ _bfd_stringtab_emit.
+ * elflink.c (_bfd_elf_link_record_dynamic_symbol): Change dynstr
+ type. Call _bfd_elf_strtab functions instead of
+ _bfd_stringtab functions.
+ * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
+ * elf.c (_bfd_elf_init_reloc_shdr): Likewise.
+ (elf_fake_sections): Likewise.
+ (assign_section_numbers): Call _bfd_elf_strtab_clear_all_refs
+ on shstrtab hash table, call _bfd_elf_strtab_addref on each section
+ name in the output. Call _bfd_elf_strtab_finalize and
+ use _bfd_elf_strtab_offset to finalize sh_name section header fields.
+ (_bfd_elf_compute_section_file_positions): Use _bfd_elf_strtab_size
+ instead of _bfd_stringtab_size.
+ (prep_headers): Change shstrtab type.
+ Use _bfd_elf_strtab calls instead of _bfd_stringtab calls.
+
+2001-11-07 Alan Modra <amodra@bigpond.net.au>
+
+ * elflink.h (elf_link_input_bfd <removed linkonce relocs>): Fix
+ bad symtab segfault. Formatting and warning fixes. Improve
+ error message for internationalisation.
+
+2001-11-06 H.J. Lu (hjl@gnu.org)
+
+ * elflink.h (elf_link_input_bfd): Complain about relocs against
+ discarded sections.
+
+2001-11-03 Alan Modra <amodra@bigpond.net.au>
+
+ * elfxx-target.h (elfNN_bed): Correct want_got_sym, want_dynbss order.
+
+2001-11-02 H.J. Lu <hjl@gnu.org>
+
+ * elf32-mips.c (mips_elf_calculate_relocation): Don't create
+ dynamic relocation for symbols defined in regular objects when
+ creating executables.
+
+2001-11-02 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * configure.in (ALL_LINGUAS): Add "fr".
+ * configure: Regenerate.
+ * po/fr.po: New file.
+
+ * coffgen.c (coff_object_p): Add comment to H.J.'s recent patch.
+
+2001-11-02 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * som.c (setup_sections): Initialize subspace_sections.
+
+2001-11-02 H.J. Lu (hjl@gnu.org)
+
+ * coffgen.c (coff_object_p): Return 0 if the header is too big.
+
+2001-11-02 Hans-Peter Nilsson <hp@axis.com>
+
+ * elfcore.h (elf_core_file_p): Preserve and clear abfd section
+ information. Save bfd arch and mach values. Restore on error.
+
+2001-11-02 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-hppa.c (hppa_handle_PIC_calls): Rename to mark_PIC_calls.
+ (allocate_PIC_calls): New function.
+ (allocate_dynrelocs): Don't allocate pic_call plt entries here.
+ (elf32_hppa_size_dynamic_sections): Call allocate_PIC_calls.
+ (elf32_hppa_finish_dynamic_symbol): Remove dead code.
+
+2001-11-02 Hans-Peter Nilsson <hp@axis.com>
+
+ * elf32-cris.c (cris_elf_grok_prstatus): New function.
+ (cris_elf_grok_psinfo): New function.
+ (elf_backend_grok_prstatus): Define.
+ (elf_backend_grok_psinfo): Define.
+
+2001-11-01 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (ppc64_elf_relocate_section): Correct branch
+ prediction bits.
+
+2001-10-31 Chris Demetriou <cgd@demetriou.com>
+
+ * elf32-mips.c (_bfd_mips_elf_hi16_reloc): Handle PC-relative
+ relocations properly.
+
+2001-10-31 H.J. Lu <hjl@gnu.org>
+
+ * elflink.h (elf_link_output_extsym): Don't clear the visibility
+ field for relocateable.
+
+2001-11-01 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Don't count
+ .plt relocs in DT_RELASZ.
+
+2001-10-29 NIIBE Yutaka <gniibe@m17n.org>
+
+ * config.bfd: Supports sh3/sh4/sh3eb/sh4eb-unknown-linux-gnu
+ targets.
+
+2001-10-31 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * targets.c: Fix typo: bfd_mmo_mmix_vec => bfd_mmo_vec.
+
+2001-10-30 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * Makefile.am (ALL_MACHINES): Add cpu-mmix.lo.
+ (BFD64_BACKENDS): Add elf64-mmix.lo and mmo.lo.
+ (BFD64_BACKENDS_CFILES): Add elf64-mmix.c and mmo.c.
+ Regenerate dependencies.
+ * configure.in (bfd_elf64_mmix_vec, bfd_mmo_vec): New vectors.
+ * config.bfd: [BFD64] (mmix-*-*): New case.
+ * cpu-mmix.c, mmo.c, elf64-mmix.c: New files.
+ * archures.c (enum bfd_architecture): Add bfd_arch_mmix.
+ (bfd_mmix_arch): Declare.
+ (bfd_archures_list): Add bfd_mmix_arch.
+ * targets.c (enum bfd_flavour): Add bfd_target_mmo_flavour.
+ (bfd_elf64_mmix_vec, bfd_mmo_vec): Declare.
+ (bfd_target_vect) [BFD64]: Add bfd_elf64_mmix_vec and
+ bfd_mmo_mmix_vec.
+ * reloc.c: Add MMIX relocations.
+ * bfd.c (struct _bfd, tdata): Add mmo_data.
+ * Makefile.in: Regenerate.
+ * configure: Regenerate.
+ * libbfd.h: Regenerate.
+ * bfd-in2.h: Regenerate.
+ * configure: Rebuild.
+
+2001-10-30 Richard Earnshaw (rearnsha@arm.com)
+
+ * elf.c (_bfd_elf_make_section_from_shdr): Set the LMA based on the
+ p_paddr of the segment that contains it.
+ (copy_private_bfd_data): If the LMA for a segment is known, use it
+ for matching sections to segments.
+ (assign_file_positions_for_segments): Use the LMA when adjusting
+ for inter-section alignment padding.
+
+2001-10-29 Kazu Hirata <kazu@hxi.com>
+
+ * README: Fix a typo.
+
+2001-10-24 Richard Henderson <rth@redhat.com>
+
+ * peXXigen.c (_bfd_XX_print_private_bfd_data_common): Copy
+ timestamp to time_t for ctime.
+
+2001-10-24 Hans-Peter Nilsson <hp@axis.com>
+
+ * elf32-cris.c (cris_reloc_type_lookup): Change loop to use
+ unsigned, increasing index.
+
+2001-10-23 H.J. Lu <hjl@gnu.org>
+
+ * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Check
+ m != NULL before accessing it.
+
+2001-10-23 Alan Modra <amodra@bigpond.net.au>
+
+ * elflink.h (elf_link_input_bfd): Zero the reloc instead of doing
+ bfd_reloc_type_lookup (bfd, BFD_RELOC_NONE) as bfd_reloc_type_lookup
+ doesn't accept BFD_RELOC_* on some targets, eg. hppa.
+
+ * elf32-hppa.c (elf32_hppa_link_hash_entry): Remove plt_abs.
+ (hppa_link_hash_newfunc): Likewise.
+ (elf32_hppa_finish_dynamic_symbol): Likewise.
+ (allocate_dynrelocs): Always allocate .got relocs if shared.
+ (elf32_hppa_relocate_section): Output them too. Similarly
+ consolidate .plt reloc code, and no longer initialise .plt
+ when a reloc is output.
+ (elf32_hppa_finish_dynamic_symbol): Only initialise .plt entries
+ when no reloc is output.
+
+ From Herbert Xu <herbert@gondor.apana.org.au>
+ * elf32-hppa.c (final_link_relocate): Call bfd_set_error for
+ unreachable branches.
+
+2001-10-22 H.J. Lu <hjl@gnu.org>
+
+ * configure.in (WIN32LIBADD): Use -L../libiberty for
+ mips*-*-linux*.
+ * configure: Rebuild.
+
+2001-10-21 H.J. Lu <hjl@gnu.org>
+
+ * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
+ if shared library is enabled only for Linux hosts.
+ * configure: Rebuild.
+
+2001-10-21 H.J. Lu <hjl@gnu.org>
+
+ * configure.in (WIN32LIBADD): Check if PICFLAG is defined in
+ ../libiberty/Makefile instead of $enable_shared.
+ * configure: Rebuild.
+
+2001-10-21 H.J. Lu <hjl@gnu.org>
+
+ * elf32-cris.c (cris_reloc_type_lookup): Use int for index. Cover
+ index 0.
+
+2001-10-20 H.J. Lu <hjl@gnu.org>
+
+ * configure.in (WIN32LIBADD): Include -L../libiberty/pic -liberty
+ if shared library is enabled.
+ * configure: Rebuild.
+
+2001-10-20 H.J. Lu <hjl@gnu.org>
+
+ * elf32-cris.c (cris_reloc_type_lookup): Allow index 0.
+
+2001-10-19 H.J. Lu <hjl@gnu.org>
+
+ * elfcode.h (elf_object_p): Don't clear D_PAGED if the section
+ size is empty.
+
+2001-10-18 H.J. Lu <hjl@gnu.org>
+
+ * elf32-i370.c (i370_elf_relocate_section): Ignore R_XXX_NONE.
+ * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
+
+2001-10-18 Jakub Jelinek <jakub@redhat.com>
+
+ * section.c (_bfd_strip_section_from_output): Don't count
+ SEC_EXCLUDE sections as references. Set SEC_EXCLUDE.
+
+2001-10-17 Alan Modra <amodra@bigpond.net.au>
+
+ * elf-m10200.c (mn10200_elf_relax_section): Cast assignment to
+ Elf_Internal_Shdr.contents now that it's no longer a PTR.
+ * elf-m10300.c (mn10300_elf_relax_section): Likewise.
+ * elf32-h8300.c (elf32_h8_relax_section): Likewise.
+ * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): Likewise.
+ * elf32-sh.c (sh_elf_relax_section): Likewise.
+ * elf64-alpha.c (elf64_alpha_relax_section): Likewise.
+ * elfxx-ia64.c (elfNN_ia64_relax_section): Likewise.
+ * elf.c (setup_group): Warning fixes.
+ * elflink.h (elf_link_sort_relocs): Likewise.
+ * pdp11.c (slurp_reloc_table): Likewise.
+
+2001-10-16 Jeff Holcomb <jeffh@redhat.com>
+
+ * elflink.h (elf_link_sort_relocs): Remove unnecessary pointer
+ casts.
+
+2001-10-15 H.J. Lu <hjl@gnu.org>
+
+ * elflink.h (elf_link_input_bfd): Set type to BFD_RELOC_NONE
+ for relocations against discarded link-once section.
+
+2001-10-15 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-i386.c (elf_i386_relocate_section): Report some detail on
+ bfd_reloc_outofrange and similar errors.
+
+ * elf.c (_bfd_elf_link_hash_copy_indirect): Test ind->root.type
+ rather than ind->weakdef.
+ * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
+ * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
+ * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Likewise.
+ * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
+ * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
+
+2001-10-15 Alan Modra <amodra@bigpond.net.au>
+ H.J. Lu <hjl@gnu.org>
+
+ * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Merge dyn_reloc
+ counts for aliases instead of aborting.
+ * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
+ * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
+
+ * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Set plt.offset
+ to -1 for non-function symbols.
+ * elf32-ppc.c (ppc_elf_adjust_dynamic_symbol): Likewise.
+ * elf32-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
+ * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
+ * elf64-s390.c (elf_s390_adjust_dynamic_symbol): Likewise.
+ * elf64-x86-64.c (elf64_x86_64_adjust_dynamic_symbol): Likewise.
+ * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Refer to
+ plt.offset instead of plt.refcount when setting to -1.
+
+2001-10-12 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * elf32-arm.h (elf32_arm_relocate_section): Treat R_ARM_THM_PC22
+ like R_ARM_PC24. Include reloc number in error message about
+ unresolvable relocs.
+
+2001-10-10 Jakub Jelinek <jakub@redhat.com>
+
+ * elflink.h (elf_link_sort_cmp2): Don't mix PLT and non-PLT
+ relocations against the same symbol in .rel{,a}.dyn section.
+
+2001-10-10 Kazu Hirata <kazu@hxi.com>
+
+ * aout-encap.c: Fix comment typos.
+ * aoutx.h: Likewise.
+ * archive.c: Likewise.
+ * bout.c: Likewise.
+ * coff64-rs6000.c: Likewise.
+ * coffcode.h: Likewise.
+ * coffgen.c: Likewise.
+ * cofflink.c: Likewise.
+ * coff-mips.c: Likewise.
+ * ecoff.c: Likewise.
+ * elf32-m32r.c: Likewise.
+ * libcoff-in.h: Likewise.
+ * libecoff.h: Likewise.
+ * libxcoff.h: Likewise.
+ * nlm32-i386.c: Likewise.
+ * pdp11.c: Likewise.
+ * section.c: Likewise.
+ * som.c: Likewise.
+ * som.h: Likewise.
+ * bfd-in2.h: Regenerate.
+ * libcoff.h: Likewise.
+
+2001-10-10 Alan Modra <amodra@bigpond.net.au>
+
+ * elf.c (elf_map_symbols): Don't create new section symbols; Use
+ existing section syms. Update comments.
+ (copy_private_bfd_data): Formatting fixes.
+ (elfcore_grok_win32pstatus): Likewise.
+ (swap_out_syms): Likewise. Remove unnecessary level of braces.
+
+2001-10-09 Alan Modra <amodra@bigpond.net.au>
+
+ * elf-bfd.h (struct bfd_elf_section_data): Rename "group" to
+ "group_name".
+ (elf_group_name): Define.
+ (elf_next_in_group): Define.
+ * elf.c: Make use of elf_group_name and elf_next_in_group throughout.
+ (setup_group): Don't use sec->lineno for SHT_GROUP section to store
+ first member section; Instead use elf_next_in_group.
+ (bfd_section_from_shdr): Likewise.
+ (set_group_contents): Likewise. Use elf_section_syms, not sec->symbol.
+
+2001-10-09 Alan Modra <amodra@bigpond.net.au>
+
+ * elf-bfd.h (struct bfd_elf_section_data): Add "group" and
+ "next_in_group". Fix gp and gp_size comments.
+ * elf.c (union elf_internal_group): New.
+ (setup_group): New function.
+ (_bfd_elf_make_section_from_shdr): Set BFD flags for SHT_GROUP.
+ Call setup_group for SHF_GROUP sections.
+ (bfd_section_from_shdr): Build a BFD section for SHT_GROUP.
+ (elf_fake_sections): Set header type for SEC_GROUP, and header
+ flags for sections in a group.
+ (set_group_contents): New function.
+ (_bfd_elf_compute_section_file_positions): Call it.
+ (assign_section_numbers): Set sh_link for SHT_GROUP.
+
+ * elflink.h (gc_mark_hook): Handle section groups.
+ * elfxx-target.h: Add SEC_GROUP to applicable_flags.
+ * section.c (SEC_GROUP): Define.
+ (struct sec): Comment fixes.
+ * bfd-in2.h: Regenerate.
+
+ * elf.c (bfd_elf_print_symbol): Formatting fix; migrate expression
+ out of function args.
+ (_bfd_elf_canonicalize_reloc): Similarly.
+ (_bfd_elf_get_symtab): Here too.
+ (_bfd_elf_canonicalize_dynamic_symtab): And here.
+ * elfcode.h (elf_slurp_symbol_table): Don't recalculate size for
+ bfd_bread, and remove unnecessary cast.
+
+2001-10-08 Aldy Hernandez <aldyh@redhat.com>
+
+ * bfd/config.bfd (targ_cpu): Add arm9e-*-elf.
+
+2001-10-06 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * dwarf2.c (comp_unit_find_nearest_line): Check for end of
+ compilation unit.
+
+2001-10-06 Alan Modra <amodra@bigpond.net.au>
+
+ * bfd.c (bfd_assert): Report bfd version.
+ (_bfd_abort): Likewise.
+
+ * elflink.h (elf_link_input_bfd): Don't zero discarded link-once
+ section sym values. Instead replace any relocs against them with
+ relocs against STN_UNDEF, which has a zero value.
+
+ * elf32-arc.c (elf_arc_howto_table): Set partial_inplace for all
+ relocs.
+
+2001-10-05 Jeff Law <law@redhat.com>
+
+ * som.h (som_exec_data): New field "version_id".
+ * som.c (som_object_setup): Record the version_id if it
+ exists.
+ (som_prep_headers): Do not initialize version_id here.
+ (som_finish_writing): Initialize version_id here.
+
+2000-10-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * elf32-mips.c (elf_mips_howto_table): Fix some relocation howtos
+ according to the MIPS/SGI ELF64 ABI Draft.
+ (mips_elf_sort_hash_table): Typo.
+
+2001-10-04 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Comment typo.
+
+ * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): Bail out after
+ copying flags if this is a weakdef.
+
+2001-10-04 Alan Modra <amodra@bigpond.net.au>
+
+ * elf-bfd.h (struct elf_link_hash_entry): Reorganise for better
+ packing.
+
+ * elf32-mips.c (mips_elf_record_global_got_symbol): Set got.offset
+ to 1 rather than 0 to avoid confusing copy_indirect_symbol.
+ (mips_elf_sort_hash_table_f): Compare got.offset against 1.
+
+ * Makefile.am (BFD_H_DEPS): Add symcat.h. Ensure everything
+ depends on $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS), not just those
+ backends we configure. Run "make dep-am".
+ (install-data-local): Install symcat.h.
+ * dep-in.sed: Remove symcat.h from dependencies.
+ * Makefile.in: Regenerate.
+
+2001-10-03 Vassili Karpov <malc@pulsesoft.com>
+
+ * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Handle nocopyreloc.
+
+2001-10-03 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * elf64-mips.c (elf_backend_may_use_rela_p): New define.
+ (elf_backend_default_use_rela_p): New define.
+
+2001-10-03 Alan Modra <amodra@bigpond.net.au>
+
+ * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Fix typos in last
+ change.
+
+ * configure.in (AC_OUTPUT <bfd-in3.h>): Remove version.h.
+ * configure: Regenerate.
+ * Makefile.am (BFD_H_FILES): Add version.h.
+ * Makefile.in: Regenerate.
+ * po/SRC-POTFILES.in: Regenerate.
+
+ * elflink.h (elf_fix_symbol_flags): Copy flags to weakdef using
+ elf_backend_copy_indirect_symbol so that backend has a chance to
+ copy other necessary fields.
+ * elf-bfd.h (struct elf_backend_data): Update description of
+ elf_backend_copy_indirect_symbol.
+ * elf.c (_bfd_elf_link_hash_copy_indirect): Bail out after
+ copying flags if this is a weakdef.
+ * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
+ (elfNN_ia64_aix_add_symbol_hook): Use elf_link_hash_lookup rather
+ than bfd_link_hash_lookup.
+ * elf32-i386.c (elf_i386_adjust_dynamic_symbol): Don't do copy
+ reloc processing for weakdefs.
+ * elf32-hppa.c (elf32_hppa_adjust_dynamic_symbol): Likewise.
+ * elf64-ppc.c (ppc64_elf_adjust_dynamic_symbol): Likewise.
+
+2001-10-02 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (ppc64_elf_check_relocs): Use a local var and cast
+ result of ELF64_R_TYPE to enum before using in a switch.
+ (ppc64_elf_gc_mark_hook): Likewise.
+ (ppc64_elf_gc_sweep_hook): Likewise.
+ (ppc64_elf_reloc_type_class): Likewise.
+
+2001-10-02 Alan Modra <amodra@bigpond.net.au>
+
+ * version.h: New file.
+ * bfd-in.h: (BFD_VERSION): Substitute bfd_version.
+ (BFD_VERSION_DATE): Define.
+ (BFD_VERSION_STRING): Define.
+ * configure.in: AC_SUBST bfd_version, bfd_version_date and
+ bfd_version_string.
+ (AC_OUTPUT <bfd-in3.h>): Depend on version.h.
+ * bfd-in2.h: Regenerate.
+ * configure: Regenerate.
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
+
+ * bfd-in.h: Include "symcat.h".
+ (CONCAT4): Redefine as for old CAT4.
+ * aout-arm.c: Use equivalent CONCAT* macro in place of CAT* macros.
+ Add warning regarding whitespace.
+ * aout-cris.c: Likewise.
+ * aout-ns32k.c: Likewise.
+ * aout-sparcle.c: Likewise.
+ * aout-tic30.c: Likewise.
+ * aout0.c: Likewise.
+ * armnetbsd.c: Likewise.
+ * demo64.c: Likewise.
+ * elf-bfd.h: Likewise.
+ * gen-aout.c: Likewise.
+ * host-aout.c: Likewise.
+ * hp300bsd.c: Likewise.
+ * hp300hpux.c: Likewise.
+ * i386aout.c: Likewise.
+ * i386bsd.c: Likewise.
+ * i386dynix.c: Likewise.
+ * i386freebsd.c: Likewise.
+ * i386linux.c: Likewise.
+ * i386lynx.c: Likewise.
+ * i386mach3.c: Likewise.
+ * i386netbsd.c: Likewise.
+ * libaout.h: Likewise.
+ * m68k4knetbsd.c: Likewise.
+ * m68klinux.c: Likewise.
+ * m68klynx.c: Likewise.
+ * m68knetbsd.c: Likewise.
+ * m88kmach3.c: Likewise.
+ * mipsbsd.c: Likewise.
+ * newsos3.c: Likewise.
+ * ns32knetbsd.c: Likewise.
+ * pc532-mach.c: Likewise.
+ * pdp11.c: Likewise.
+ * riscix.c: Likewise.
+ * sparclinux.c: Likewise.
+ * sparclynx.c: Likewise.
+ * sparcnetbsd.c: Likewise.
+ * sunos.c: Likewise.
+ * targets.c: Likewise.
+ * vaxnetbsd.c: Likewise.
+ * vms-hdr.c: Likewise.
+
+2001-10-01 Alan Modra <amodra@bigpond.net.au>
+
+ * bfd-in.h: Remove comments regarding generated files.
+ * libbfd-in.h: Likewise.
+ * libcoff-in.h: Likewise.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Likewise.
+ * libcoff.h: Likewise.
+
+2001-09-30 kaz Kojima <kkojima@rr.iij4u.or.jp>
+ Hans-Peter Nilsson <hp@bitrange.com>
+
+ * elf32-sh.c (sh_elf_howto_table, R_SH_REL32): Make
+ partial_inplace, matching assembler output. Set src_mask to
+ all ones.
+ (sh_elf_relocate_section): Delete misplaced comment.
+ For relocatable linking against section symbol, call
+ _bfd_relocate_contents for partial_inplace relocs and adjust
+ rel->r_addend for others.
+ <case R_SH_DIR32, R_SH_REL32>: Fetch partial_inplace addend with
+ bfd_get_32, not at rel->r_addend.
+
+2001-09-30 Alan Modra <amodra@bigpond.net.au>
+
+ * elf.c (_bfd_elf_link_hash_copy_indirect): Set ind refcounts to
+ the old dir refcount, so we indirectly set them to init_refcount.
+ Short-circuit asserts when we've just verified they are true.
+
+2001-09-29 Alan Modra <amodra@bigpond.net.au>
+
+ * section.c (struct sec): Remove kept_section.
+ (STD_SECTION): Remove kept_section initialisation.
+ (bfd_make_section_anyway): Here too.
+ * ecoff.c (bfd_debug_section): Remove kept_section initialisation.
+ * cofflink.c (_bfd_coff_link_input_bfd): Don't test kept_section.
+ * elflink.h (elf_link_input_bfd): Set discarded link-once section
+ symbols to zero, and remove all code involved with kept_section
+ and tracking section symbol values.
+ * bfd-in2.h: Regenerate.
+ * configure.in: Bump version number.
+ * configure: Regenerate.
+
+2001-09-29 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-ppc.c (struct ppc_dyn_relocs): New.
+ (IS_ABSOLUTE_RELOC): Define.
+ (struct ppc_link_hash_entry): New.
+ (struct ppc_link_hash_table): New.
+ (ppc_hash_table): Define.
+ (link_hash_newfunc): New function.
+ (ppc64_elf_link_hash_table_create): New function.
+ (create_got_section): New function.
+ (ppc64_elf_create_dynamic_sections): Call create_got_section. Stash
+ pointers to our dynamic sections in hash table.
+ (ppc64_elf_copy_indirect_symbol): New function.
+ (ppc64_elf_check_relocs): Remove DEBUG code. Use short-cuts to
+ dynamic sections. Localise vars. Modify code for refcounts
+ starting from zero. Don't allocate here, or force symbols dynamic.
+ Don't copy all relocs if shared, select ones we need. Add code
+ to track possible copy relocs for non-shared link.
+ (ppc64_elf_gc_mark_hook): Update comment.
+ (ppc64_elf_gc_sweep_hook): Sweep dynrelocs too.
+ (ppc64_elf_adjust_dynamic_symbol): Remove DEBUG code. Rewrite .plt
+ code for reference counting garbage collection. Don't create .plt
+ entries for functions that don't comply with ABI naming convention,
+ and don't allocate .plt space here. Use short-cuts to dynamic
+ sections. If possible, keep dynamic relocations instead of using
+ copy relocs. Remove confused comments.
+ (ppc_adjust_dynindx): Delete.
+ (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
+ (allocate_dynrelocs): New function.
+ (readonly_dynrelocs): New function.
+ (ppc64_elf_size_dynamic_sections): Rewrite. Allocate local .got
+ space here, and call allocate_dynrelocs to allocate space for
+ global .plt, .got and reloc sections. Use short-cuts to dynamic
+ sections. Call readonly_dynrelocs to determine whether we need
+ DT_TEXTREL. Don't generate section symbols here, the generic
+ ELF linker code does it for us.
+ (ppc64_elf_final_link): Call regular ELF backend linker rather than
+ gc variety, since we do our own .got handling.
+ (ppc64_elf_relocate_section): Remove DEBUG code. Make use of
+ dynamic section short-cuts. Localise vars, and delay setting.
+ Handle unknown relocs in main switch statement. Replace ugly
+ complicated tests for unresolvable relocs with a simple direct
+ scheme using "unresolved_reloc" var. Test ELF_ST_VISIBILITY
+ before allowing an undefined sym in a shared lib. Do R_*_DS tests
+ after main switch, when we've set addend. Do non-addend insn
+ tweaks before main swithc. Ignore input_section->vma when
+ calculating reloc offsets as it's always zero. Rewrite dynamic
+ reloc handling. Consolidate R_*_HA handling. Handle more relocs.
+ (ppc64_elf_finish_dynamic_symbol): Remove DEBUG code. Make use
+ of dynamic section short-cuts. Reorganise .plt handling code.
+ Remove confused comments. Take note of ELF_LINK_FORCED_LOCAL.
+ Move expressions out of swap_reloca_out function calls.
+ (ppc64_elf_reloc_type_class): New function.
+ (ppc64_elf_info_to_howto): Move common expression to local var.
+ (ppc64_elf_finish_dynamic_sections): Remove DEBUG code. Make use
+ of dynamic section short-cuts. Don't fiddle with section syms
+ here as the ELF linker does it for us.
+ (elf_backend_can_refcount): Define.
+ (bfd_elf64_bfd_link_hash_table_create): Define.
+ (elf_backend_copy_indirect_symbol): Define.
+ (elf_backend_reloc_type_class): Define.
+ (elf_backend_*, bfd_elf64_bfd_* defines): Sort.
+
+2001-09-29 Alan Modra <amodra@bigpond.net.au>
+
+ * elf-bfd.h (struct elf_link_local_dynamic_entry): Add init_refcount.
+ (struct elf_backend_data): Add can_refcount.
+ * elf.c (_bfd_elf_link_hash_newfunc): Get rid of a few casts. Set
+ got.refcount and plt.refcount from init_refcount.
+ (_bfd_elf_link_hash_table_init): Set up init_refcount.
+ (_bfd_elf_link_hash_copy_indirect): Reference got/plt.refcount
+ rather than got/plt.offset, and test for <= 0 rather than -1.
+ * elflink.h (size_dynamic_sections): Set init_refcount to -1.
+ * elfxx-target.h (elf_backend_can_refcount): Define.
+ (elfNN_bed): Init can_refcount.
+ * linker.c (_bfd_link_hash_newfunc): Get rid of a few casts.
+ (_bfd_generic_link_hash_newfunc): Likewise.
+ * elf32-cris.c (cris_elf_check_relocs): Modify for refcounts
+ starting from zero.
+ (elf_backend_can_refcount): Define.
+ * elf32-hppa.c (elf32_hppa_check_relocs): Modify for refcounts
+ starting from zero.
+ (elf32_hppa_copy_indirect_symbol): Make static to agree with
+ prototype.
+ (elf_backend_can_refcount): Define.
+ * elf32-i386.c (elf_i386_check_relocs): Modify for refcounts
+ starting from zero.
+ (allocate_dynrelocs): Set plt/got.offset rather than *.refcount.
+ (elf_i386_finish_dynamic_symbol): Expand SHN_UNDEF comment.
+ (elf_i386_finish_dynamic_sections): Use local var so line < 80 chars.
+ (elf_backend_can_refcount): Define.
+ (elf_i386_copy_indirect_symbol): Make static to agree with
+ prototype. Formatting fix.
+ * elf32-m68k.c (elf_m68k_check_relocs): Modify for refcounts
+ starting from zero.
+ (elf_backend_can_refcount): Define.
+ * elf32-ppc.c (ppc_elf_check_relocs): Modify for refcounts
+ starting from zero.
+ (elf_backend_can_refcount): Define.
+ * elf32-s390.c (elf_s390_check_relocs): Modify for refcounts
+ starting from zero.
+ (elf_backend_can_refcount): Define.
+ * elf64-s390.c (elf_s390_check_relocs): Modify for refcounts
+ starting from zero.
+ (elf_backend_can_refcount): Define.
+ * elf64-x86-64.c (elf64_x86_64_check_relocs): Modify for refcounts
+ starting from zero.
+ (elf_backend_can_refcount): Define.
+
+ * som.c (som_write_symbol_strings): Cast current_offset in
+ bfd_seek call to match param type.
+
+2001-09-28 J. Brobecker <brobecker@gnat.com>
+
+ * som.c (som_write_symbol_strings): Fix incorrect type of
+ current_offset to match the function definition. Fixes a build
+ failure on HPUX-11.00.
+
+2001-09-28 Richard Henderson <rth@redhat.com>
+
+ * elfxx-target.h [section_flags]: Add SEC_ARCH_BIT_0, SEC_SMALL_DATA,
+ SEC_MERGE, SEC_STRINGS.
+
+ * section.c (SEC_ARCH_BIT_0): New; replace unused SEC_BALIGN.
+ * bfd-in2.h: Rebuild.
+
+2001-09-28 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-x86-64.c (elf64_x86_64_reloc_type_lookup): Don't map bfd
+ reloc code using x86_64_reloc_map.
+
+ * elf32-hppa.c (elf32_hppa_check_relocs): Update comment since we
+ no longer allocate here. Localise some vars to blocks where they
+ are used.
+ (elf32_hppa_adjust_dynamic_symbol): Correct a comment. Delay
+ setting of vars until needed.
+ (allocate_dynrelocs): Don't create a .plt entry without a reloc
+ when symbol visibilty makes a function local.
+ (elf32_hppa_finish_dynamic_symbol): Move expressions out of
+ swap_reloca_out function calls.
+ (elf32_hppa_relocate_section): Likewies. Comment typo fix.
+ (elf32_hppa_finish_dynamic_sections): Migrate common code out of
+ switch statement.
+
+ * elf32-i386.c (elf_i386_check_relocs): Update comment since we
+ no longer allocate here. Localise some vars to blocks where they
+ are used. Remove separate switch stmt for creating .got sec.
+ (elf_i386_adjust_dynamic_symbol): Correct a comment. Remove
+ redundant casts and aborts. Delay setting of vars until needed.
+ (allocate_dynrelocs): Remove redundant casts and aborts.
+ (elf_i386_size_dynamic_sections): Move comment.
+ (elf_i386_finish_dynamic_symbol): Move expressions out of function
+ calls.
+ (elf_i386_relocate_section): Likewise. Comment typo fix.
+ (elf_i386_finish_dynamic_sections): Migrate common code out of
+ switch statement.
+ (elf_backend_* defines): Sort.
+
+ * elf32-i386.c (allocate_dynrelocs): Don't create a .plt entry
+ without a reloc when symbol visibilty makes a function local.
+
+2001-09-27 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix detection of
+ conflicting float flags.
+
+2001-09-26 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-i386 (elf_i386_copy_indirect_symbol): New function.
+ (elf_backend_copy_indirect_symbol): Define.
+ (struct elf_i386_link_hash_entry): Rename "root" to "elf".
+ (struct elf_i386_link_hash_table): Likewise.
+ (link_hash_newfunc): Get rid of unnecessary casts.
+ (elf_i386_link_hash_table_create): Likewise.
+ (elf_i386_check_relocs): Initialise local_got_refcounts to 0.
+ Don't test input section SEC_READONLY here to try to avoid copy
+ relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
+ (elf_i386_adjust_dynamic_symbol): Check output section SEC_READONLY
+ here to properly test whether we need copy relocs. Do so for weak
+ syms too.
+
+ * elf32-hppa (elf32_hppa_copy_indirect_symbol): New function.
+ (elf_backend_copy_indirect_symbol): Define.
+ (struct elf32_hppa_link_hash_table): Rename "root" to "elf".
+ (stub_hash_newfunc): Get rid of unnecessary casts.
+ (hppa_link_hash_newfunc): Likewise.
+ (elf32_hppa_check_relocs): Initialise local_got_refcounts to 0.
+ Don't test input section SEC_READONLY here to try to avoid copy
+ relocs, and keep dyn_relocs regardleas of ELF_LINK_NON_GOT_REF.
+ (elf32_hppa_adjust_dynamic_symbol): Check output section SEC_READONLY
+ here to properly test whether we need copy relocs. Do so for weak
+ syms too.
+
+2001-09-26 Alan Modra <amodra@bigpond.net.au>
+
+ * bfd.c (_bfd_default_error_handlerl): Define using VPARAMS,
+ VA_OPEN, VA_FIXEDARG, VA_CLOSE.
+ (bfd_archive_filename): Cast bfd_malloc arg to the correct size.
+
+2001-09-25 Jakub Jelinek <jakub@redhat.com>
+
+ * elf64-sparc.c (sparc64_elf_build_plt): Fix .plt[32768+] slot
+ computation.
+
+2001-09-25 H.J. Lu <hjl@gnu.org>
+
+ * bfd-in2.h: Regenerated.
+
+2001-09-25 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-i386.c: Add comment re linker function names and ordering.
+ (elf_i386_link_hash_newfunc): Rename to link_hash_newfunc.
+ (elf_i386_grok_prstatus): Move before linker functions.
+ (elf_i386_grok_psinfo): Likewise.
+ (elf_i386_fake_sections): Move so that functions are ordered.
+ (elf_i386_reloc_type_class): Likewise. Comment function purpose.
+
+2001-09-25 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-hppa.c: Rename occurrences of "hplink" to "htab"
+ throughout file.
+
+ * elf32-hppa.c: (LONG_BRANCH_PIC_IN_SHLIB): Delete. Remove all
+ code handling this option.
+ (LONG_BRANCH_VIA_PLT): Likewise.
+ (RELATIVE_DYNRELOCS): Define as zero.
+ (struct elf32_hppa_dyn_reloc_entry): Add "sec", and
+ "pc_count" fields. Remove "section" field.
+ (elf32_hppa_link_hash_entry): Rename reloc_entries to dyn_relocs.
+ (elf32_hppa_check_relocs): Don't allocate space for dynamic
+ relocs here. Instead, record all needed dynamic relocs via
+ dyn_relocs and local_dynrel. Cache pointer to "sreloc" section
+ in elf_section_data.
+ (elf32_hppa_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
+ (allocate_plt_and_got_and_discard_relocs): Rename to
+ allocate_dynrelocs. Allocate rather than discarding dyn relocs.
+ (readonly_dynrelocs): New function.
+ (elf32_hppa_size_dynamic_sections): Mark output_bfd unused.
+ Call readonly_dynrelocs to determine need for DT_TEXTREL.
+ Rename "i" to "ibfd". Allocate space for local dyn relocs.
+ (elf32_hppa_relocate_section): Make use of cached sreloc.
+ (elf32_hppa_reloc_type_class): New function.
+ (elf_backend_reloc_type_class): Define.
+
+2001-09-25 Alan Modra <amodra@bigpond.net.au>
+
+ * elf-bfd.h (struct bfd_elf_section_data): Add "local_dynrel"
+ and "sreloc" fields.
+ * elf32-i386.c (struct elf_i386_dyn_relocs): Add "sec", and
+ "pc_count" fields. Remove "section" field.
+ (elf_i386_check_relocs): Don't set DF_TEXTREL here. Don't
+ allocate space for dynamic relocs here. Instead, record all
+ needed dynamic relocs via dyn_relocs and local_dynrel. Cache
+ pointer to "sreloc" section in elf_section_data.
+ (elf_i386_gc_sweep_hook): Sweep dyn_relocs and local_dynrel.
+ (allocate_plt_and_got_and_discard_relocs): Rename to
+ allocate_dynrelocs. Allocate rather than discarding dyn relocs.
+ (readonly_dynrelocs): New function.
+ (elf_i386_size_dynamic_sections): Call readonly_dynrelocs.
+ Rename "i" to "ibfd". Allocate space for local dyn relocs.
+ (elf_i386_relocate_section): Make use of cached sreloc.
+
+2001-09-24 Alan Modra <amodra@bigpond.net.au>
+
+ * elf-bfd.h (elf_backend_reloc_type_class): Pass in the entire
+ reloc rather than just the type.
+ (_bfd_elf_reloc_type_class): Likewise.
+ * elf.c (_bfd_elf_reloc_type_class): Likewise.
+ * elf32-arm.h (elf32_arm_reloc_type_class): Likewise.
+ * elf32-cris.c (elf_cris_reloc_type_class): Likewise.
+ * elf32-i386.c (elf_i386_reloc_type_class): Likewise.
+ * elf32-m68k.c (elf32_m68k_reloc_type_class): Likewise.
+ * elf32-ppc.c (ppc_elf_reloc_type_class): Likewise.
+ * elf32-s390.c (elf_s390_reloc_type_class): Likewise.
+ * elf32-sh.c (sh_elf_reloc_type_class): Likewise.
+ * elf32-sparc.c (elf32_sparc_reloc_type_class): Likewise.
+ * elf64-alpha.c (elf64_alpha_reloc_type_class): Likewise.
+ * elf64-s390.c (elf_s390_reloc_type_class): Likewise.
+ * elf64-sparc.c (sparc64_elf_reloc_type_class): Likewise.
+ * elf64-x86-64.c (elf64_x86_64_reloc_type_class): Likewise.
+ * elfxx-ia64.c (elfNN_ia64_reloc_type_class): Likewise.
+ * elflink.h: Formatting fixes.
+ (elf_link_sort_relocs): Make "count" and "size" bfd_size_type.
+ Call bfd_zmalloc rather than calloc. Remove unnecessary cast of
+ o->contents to PTR. Update call to elf_backend_reloc_type_class.
+
+2001-09-22 John Reiser <jreiser@BitWagon.com>
+
+ * elfcode.h (elf_object_p): Allow for no section header at all in
+ non-ET_REL files. Honor 0 for e_shnum, e_shstrndx, e_shoff.
+
+2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * elfxx-ia64.c: Fix compile time warning messages.
+ * coff-mcore.c: Fix compile time warning messages.
+ * coff-ppc.c: Fix compile time warning messages.
+ * coffcode.h: Fix compile time warning messages.
+ * elf32-mips.c: Fix compile time warning messages.
+ * elf64-alpha.c: Fix compile time warning messages.
+ * libbfd.c: Fix compile time warning messages.
+ * bfd-in2.h: Regenerate.
+
+2001-09-21 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
+
+ * aoutx.h: Formatting fixes.
+ * merge.c (_bfd_merged_section_offset): Break line at 80 chars.
+
+ * linker.c: Replace bfd_get_filename with bfd_archive_filename
+ in error message.
+
+2001-09-21 Alan Modra <amodra@bigpond.net.au>
+
+ * bfd.c (bfd_archive_filename): New function.
+ * bfd-in2.h: Regenerate.
+ * aout-adobe.c: Replace bfd_get_filename with bfd_archive_filename
+ in error messages where the bfd is an input bfd.
+ * aout-cris.c: Likewise.
+ * coff-arm.c: Likewise.
+ * coff-mcore.c: Likewise.
+ * coff-ppc.c: Likewise.
+ * coff-rs6000.c: Likewise.
+ * coff-sh.c: Likewise.
+ * coff-tic54x.c: Likewise.
+ * coff-tic80.c: Likewise.
+ * coff64-rs6000.c: Likewise.
+ * coffcode.h: Likewise.
+ * coffgen.c: Likewise.
+ * cofflink.c: Likewise.
+ * ecofflink.c: Likewise.
+ * elf-hppa.h: Likewise.
+ * elf.c: Likewise.
+ * elf32-arm.h: Likewise.
+ * elf32-cris.c: Likewise.
+ * elf32-gen.c: Likewise.
+ * elf32-hppa.c: Likewise.
+ * elf32-i370.c: Likewise.
+ * elf32-i386.c: Likewise.
+ * elf32-m32r.c: Likewise.
+ * elf32-mcore.c: Likewise.
+ * elf32-mips.c: Likewise.
+ * elf32-ppc.c: Likewise.
+ * elf32-s390.c: Likewise.
+ * elf32-sh.c: Likewise.
+ * elf32-sparc.c: Likewise.
+ * elf32-v850.c: Likewise.
+ * elf64-alpha.c: Likewise.
+ * elf64-gen.c: Likewise.
+ * elf64-ppc.c: Likewise.
+ * elf64-s390.c: Likewise.
+ * elf64-sparc.c: Likewise.
+ * elf64-x86-64.c: Likewise.
+ * elflink.h: Likewise.
+ * elfxx-ia64.c: Likewise.
+ * ieee.c: Likewise.
+ * ihex.c: Likewise.
+ * libbfd.c: Likewise.
+ * pdp11.c: Likewise.
+ * pe-mips.c: Likewise.
+ * peicode.h: Likewise.
+ * srec.c: Likewise.
+ * xcofflink.c: Likewise.
+
+ * elf32-arm.h: Make _bfd_error_handler calls K&R compatible.
+
+ * elflink.c (_bfd_elf_create_linker_section): Better grammar for
+ error message.
+
+ * coff-mcore.c (coff_mcore_relocate_section): Internalionalise
+ error message.
+
+ * elf64-sparc.c (sparc64_elf_add_symbol_hook): Constify stt_types.
+ Consolidate error messages, and split long messages to two lines.
+
+2001-09-20 John Reiser <jreiser@BitWagon.com>
+
+ * elf32-i386.c (elf_i386_relocate_section): Coordinate info->symbolic
+ and info->allow_shlib_undefined.
+ * elf32-cris.c: Likewise.
+ * elf32-hppa.c: Likewise.
+ * elf32-m68k.c: Likewise.
+ * elf32-mips.c: Likewise.
+ * elf32-ppc.c: Likewise.
+ * elf32-s390.c: Likewise.
+ * elf32-sh.c: Likewise.
+ * elf32-sparc.c: Likewise.
+ * elf64-alpha.c: Likewise.
+ * elf64-hppa.c: Likewise.
+ * elf64-ppc.c: Likewise.
+ * elf64-s390.c: Likewise.
+ * elf64-sparc.c: Likewise.
+ * elf64-x86-64.c: Likewise.
+ * elfxx-ia64.c: Likewise.
+
+2001-09-18 Bruno Haible <haible@clisp.cons.org>
+
+ * aoutx.h: Include "safe-ctype.h" instead of <ctype.h>.
+ (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
+ * archive.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (_bfd_generic_read_ar_hdr_mag): Use ISDIGIT instead of isdigit.
+ * archures.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (bfd_default_scan): Use ISDIGIT instead of isdigit.
+ * bfd.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (bfd_scan_vma): Use ISXDIGIT/ISDIGIT/ISLOWER instead of
+ isxdigit/isdigit/islower.
+ * binary.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (mangle_name): Use ISALNUM instead of isalnum.
+ * cpu-v850.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (scan): Use ISDIGIT instead of isdigit.
+ * hosts/alphavms.h: Don't include <ctype.h>.
+ * ieee.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (ieee_object_p): Use TOUPPER instead of toupper.
+ * ihex.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (ihex_bad_byte): Use ISPRINT instead of isprint.
+ * merge.c: Don't include <ctype.h>.
+ * oasys.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (oasys_write_sections): Use ISDIGIT instead of isdigit.
+ * pdp11.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (aout_link_write_symbols): Use ISDIGIT instead of isdigit.
+ * ppcboot.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (mangle_name): Use ISALNUM instead of isalnum.
+ * som.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (som_set_reloc_info): Use ISUPPER/ISLOWER/ISDIGIT instead of
+ isupper/islower/isdigit.
+ (som_decode_symclass): Use TOUPPER instead of toupper.
+ * srec.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (srec_bad_byte): Use ISPRINT instead of isprint.
+ (srec_scan): Use ISSPACE instead of isspace.
+ * stabs.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (_bfd_link_section_stabs): Use ISDIGIT instead of isdigit.
+ * syms.c: Include "safe-ctype.h"
+ (islower, toupper): Remove macro definitions.
+ (bfd_decode_symclass): Use TOUPPER instead of toupper.
+ * vms-gsd.c: Don't include <ctype.h>.
+ * vms-hdr.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (_bfd_vms_write_hdr): Use ISLOWER/TOUPPER instead of
+ islower/toupper.
+ * vms-tir.c: Don't include <ctype.h>.
+
+2001-09-18 Alan Modra <amodra@bigpond.net.au>
+
+ * libbfd.c (bfd_bread): New function replacing bfd_read without
+ redundant params. Allow reads up to (size_t) -2 in length.
+ (bfd_bwrite): Similarly for bfd_write.
+ (real_read): Return a size_t.
+ (bfd_read): Call bfd_bread.
+ (bfd_write): Call bfd_bwrite.
+ (warn_deprecated): New function to annoy everybody.
+ (bfd_get_file_window): Don't call bfd_set_error unnecessarily.
+ * bfd-in.h (bfd_bread, bfd_bwrite, warn_deprecated): Declare.
+ (bfd_read, bfd_write): Define as macro.
+ * aix386-core.c: Replace calls to bfd_read with bfd_bread, and
+ likewise for bfd_write. Ensure function args are correct size by
+ using casts or local vars. In some cases, remove unnecessary
+ casts. Formatting fixes, in some cases removing a large expression
+ from function args by using a local var. Replace CONST with const.
+ Modify variable types to avoid warings. Use casts to avoid
+ warnings when using negative numbers in unsigned expressions.
+ * aout-adobe.c: Likewise.
+ * aout-arm.c: Likewise.
+ * aout-cris.c: Likewise.
+ * aout-encap.c: Likewise.
+ * aout-ns32k.c: Likewise.
+ * aout-target.h: Likewise.
+ * aout-tic30.c: Likewise.
+ * aoutf1.h: Likewise.
+ * aoutx.h: Likewise.
+ * archive.c: Likewise.
+ * archures.c: Likewise.
+ * bfd-in.h: Likewise.
+ * bfd.c: Likewise.
+ * binary.c: Likewise.
+ * bout.c: Likewise.
+ * cache.c: Likewise.
+ * cisco-core.c: Likewise.
+ * coff-a29k.c: Likewise.
+ * coff-alpha.c: Likewise.
+ * coff-arm.c: Likewise.
+ * coff-h8300.c: Likewise.
+ * coff-h8500.c: Likewise.
+ * coff-i386.c: Likewise.
+ * coff-i860.c: Likewise.
+ * coff-i960.c: Likewise.
+ * coff-ia64.c: Likewise.
+ * coff-m68k.c: Likewise.
+ * coff-m88k.c: Likewise.
+ * coff-mcore.c: Likewise.
+ * coff-mips.c: Likewise.
+ * coff-ppc.c: Likewise.
+ * coff-rs6000.c: Likewise.
+ * coff-sh.c: Likewise.
+ * coff-sparc.c: Likewise.
+ * coff-stgo32.c: Likewise.
+ * coff-tic30.c: Likewise.
+ * coff-tic54x.c: Likewise.
+ * coff-tic80.c: Likewise.
+ * coff-w65.c: Likewise.
+ * coff-z8k.c: Likewise.
+ * coff64-rs6000.c: Likewise.
+ * coffcode.h: Likewise.
+ * coffgen.c: Likewise.
+ * cofflink.c: Likewise.
+ * coffswap.h: Likewise.
+ * corefile.c: Likewise.
+ * cpu-arc.c: Likewise.
+ * cpu-h8300.c: Likewise.
+ * cpu-h8500.c: Likewise.
+ * cpu-i960.c: Likewise.
+ * cpu-ia64-opc.c: Likewise.
+ * cpu-ns32k.c: Likewise.
+ * cpu-pdp11.c: Likewise.
+ * cpu-pj.c: Likewise.
+ * cpu-sh.c: Likewise.
+ * cpu-w65.c: Likewise.
+ * cpu-z8k.c: Likewise.
+ * dwarf1.c: Likewise.
+ * dwarf2.c: Likewise.
+ * ecoff.c: Likewise.
+ * ecofflink.c: Likewise.
+ * ecoffswap.h: Likewise.
+ * elf-bfd.h: Likewise.
+ * elf-hppa.h: Likewise.
+ * elf-m10200.c: Likewise.
+ * elf-m10300.c: Likewise.
+ * elf.c: Likewise.
+ * elf32-arc.c: Likewise.
+ * elf32-arm.h: Likewise.
+ * elf32-avr.c: Likewise.
+ * elf32-cris.c: Likewise.
+ * elf32-fr30.c: Likewise.
+ * elf32-gen.c: Likewise.
+ * elf32-h8300.c: Likewise.
+ * elf32-hppa.c: Likewise.
+ * elf32-i370.c: Likewise.
+ * elf32-i386.c: Likewise.
+ * elf32-i860.c: Likewise.
+ * elf32-m32r.c: Likewise.
+ * elf32-m68k.c: Likewise.
+ * elf32-mcore.c: Likewise.
+ * elf32-mips.c: Likewise.
+ * elf32-openrisc.c: Likewise.
+ * elf32-pj.c: Likewise.
+ * elf32-ppc.c: Likewise.
+ * elf32-s390.c: Likewise.
+ * elf32-sh-lin.c: Likewise.
+ * elf32-sh.c: Likewise.
+ * elf32-sparc.c: Likewise.
+ * elf32-v850.c: Likewise.
+ * elf64-alpha.c: Likewise.
+ * elf64-hppa.c: Likewise.
+ * elf64-mips.c: Likewise.
+ * elf64-ppc.c: Likewise.
+ * elf64-s390.c: Likewise.
+ * elf64-sparc.c: Likewise.
+ * elf64-x86-64.c: Likewise.
+ * elfarm-nabi.c: Likewise.
+ * elfcode.h: Likewise.
+ * elfcore.h: Likewise.
+ * elflink.c: Likewise.
+ * elflink.h: Likewise.
+ * elfxx-ia64.c: Likewise.
+ * elfxx-target.h: Likewise.
+ * format.c: Likewise.
+ * hash.c: Likewise.
+ * hp300hpux.c: Likewise.
+ * hppabsd-core.c: Likewise.
+ * hpux-core.c: Likewise.
+ * i386aout.c: Likewise.
+ * i386dynix.c: Likewise.
+ * i386linux.c: Likewise.
+ * i386lynx.c: Likewise.
+ * i386mach3.c: Likewise.
+ * i386msdos.c: Likewise.
+ * i386os9k.c: Likewise.
+ * ieee.c: Likewise.
+ * ihex.c: Likewise.
+ * irix-core.c: Likewise.
+ * libaout.h: Likewise.
+ * libbfd-in.h: Likewise.
+ * libbfd.c: Likewise.
+ * libcoff-in.h: Likewise.
+ * libecoff.h: Likewise.
+ * libieee.h: Likewise.
+ * libnlm.h: Likewise.
+ * libpei.h: Likewise.
+ * libxcoff.h: Likewise.
+ * linker.c: Likewise.
+ * lynx-core.c: Likewise.
+ * m68klinux.c: Likewise.
+ * merge.c: Likewise.
+ * mipsbsd.c: Likewise.
+ * netbsd-core.c: Likewise.
+ * nlm.c: Likewise.
+ * nlm32-alpha.c: Likewise.
+ * nlm32-i386.c: Likewise.
+ * nlm32-ppc.c: Likewise.
+ * nlm32-sparc.c: Likewise.
+ * nlmcode.h: Likewise.
+ * nlmswap.h: Likewise.
+ * ns32k.h: Likewise.
+ * oasys.c: Likewise.
+ * opncls.c: Likewise.
+ * osf-core.c: Likewise.
+ * pc532-mach.c: Likewise.
+ * pdp11.c: Likewise.
+ * pe-mips.c: Likewise.
+ * peXXigen.c: Likewise.
+ * peicode.h: Likewise.
+ * ppcboot.c: Likewise.
+ * ptrace-core.c: Likewise.
+ * reloc.c: Likewise.
+ * reloc16.c: Likewise.
+ * riscix.c: Likewise.
+ * rs6000-core.c: Likewise.
+ * sco5-core.c: Likewise.
+ * section.c: Likewise.
+ * som.c: Likewise.
+ * sparclinux.c: Likewise.
+ * sparclynx.c: Likewise.
+ * srec.c: Likewise.
+ * stabs.c: Likewise.
+ * sunos.c: Likewise.
+ * syms.c: Likewise.
+ * targets.c: Likewise.
+ * tekhex.c: Likewise.
+ * trad-core.c: Likewise.
+ * versados.c: Likewise.
+ * vms-gsd.c: Likewise.
+ * vms-hdr.c: Likewise.
+ * vms-misc.c: Likewise.
+ * vms-tir.c: Likewise.
+ * vms.c: Likewise.
+ * vms.h: Likewise.
+ * xcofflink.c: Likewise.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+ * libcoff.h: Regenerate.
+
+ * bfd.c (struct _bfd): Make "where" and "origin" unsigned.
+ * bfd-in.h (file_ptr): Change from a long int to a bfd_signed_vma.
+ (ufile_ptr): Define.
+ (bfd_tell): Return a ufile_ptr.
+ * libbfd.c (bfd_tell): Likewise.
+ (bfd_seek): Use bfd_size_type locals. Don't call bfd_set_error
+ unnecessarily.
+ * aix386-core.c: Test != 0 for bfd_seek errors rather than < 0.
+ * aoutf1.h: Likewise.
+ * som.c: Likewise.
+ * cache.c (bfd_cache_lookup_worker): Guard against abfd->where
+ larger than unsigned long can represent.
+
+ * libbfd.c (bfd_malloc): Take a bfd_size_type arg. Error if
+ size overflows size_t.
+ (bfd_realloc): Likewise.
+ (bfd_zmalloc): Likewise.
+ * opncls.c (bfd_alloc): Likewise.
+ (bfd_zalloc): Likewise.
+ * libbfd-in.h (bfd_malloc, bfd_realloc, bfd_zmalloc): Update.
+ (bfd_alloc, bfd_zalloc): Update.
+
+ * libbfd.c (bfd_get_8): Mask with 0xff in case char is more than
+ 8 bits.
+ (bfd_get_signed_8): Likewise.
+ (H_PUT_64, H_PUT_32, H_PUT_16, H_PUT_8,
+ H_PUT_S64, H_PUT_S32, H_PUT_S16, H_PUT_S8,
+ H_GET_64, H_GET_32, H_GET_16, H_GET_8,
+ H_GET_S64, H_GET_S32, H_GET_S16, H_GET_S8): Define and use.
+ * libaout.h: Likewise define and use here.
+ * aout-adobe.c: Use H_GET_* and H_PUT_* macros.
+ * aout-arm.c: Likewise.
+ * aout-encap.c: Likewise.
+ * aout-ns32k.c: Likewise.
+ * aout-tic30.c: Likewise.
+ * aoutf1.h: Likewise.
+ * aoutx.h: Likewise.
+ * bout.c: Likewise.
+ * coff-alpha.c: Likewise.
+ * coff-h8300.c: Likewise.
+ * coff-h8500.c: Likewise.
+ * coff-i960.c: Likewise.
+ * coff-ia64.c: Likewise.
+ * coff-m88k.c: Likewise.
+ * coff-mips.c: Likewise.
+ * coff-ppc.c: Likewise.
+ * coff-rs6000.c: Likewise.
+ * coff-sh.c: Likewise.
+ * coff-sparc.c: Likewise.
+ * coff-stgo32.c: Likewise.
+ * coff-tic30.c: Likewise.
+ * coff-tic80.c: Likewise.
+ * coff-w65.c: Likewise.
+ * coff-z8k.c: Likewise.
+ * coff64-rs6000.c: Likewise.
+ * coffgen.c: Likewise.
+ * cofflink.c: Likewise.
+ * coffswap.h: Likewise.
+ * ecoff.c: Likewise.
+ * ecoffswap.h: Likewise.
+ * elf.c: Likewise.
+ * elf32-mips.c: Likewise.
+ * elf64-mips.c: Likewise.
+ * hp300hpux.c: Likewise.
+ * i386dynix.c: Likewise.
+ * i386lynx.c: Likewise.
+ * i386msdos.c: Likewise.
+ * i386os9k.c: Likewise.
+ * libpei.h: Likewise.
+ * nlm32-alpha.c: Likewise.
+ * nlm32-i386.c: Likewise.
+ * nlm32-ppc.c: Likewise.
+ * nlmcode.h: Likewise.
+ * nlmswap.h: Likewise.
+ * oasys.c: Likewise.
+ * pdp11.c: Likewise.
+ * pe-mips.c: Likewise.
+ * peXXigen.c: Likewise.
+ * peicode.h: Likewise.
+ * riscix.c: Likewise.
+ * sunos.c: Likewise.
+ * xcofflink.c: Likewise.
+ * elfcode.h: (put_word, get_word, put_signed_word, get_signed_word):
+ Rename to H_PUT_WORD, H_GET_WORD, H_PUT_SIGNED_WORD, H_GET_SIGNED_WORD.
+ * coff-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Don't define. Use
+ equivalent H_PUT_* macro instead.
+ (GETWORD, GETHALF, GETBYTE): Similarly.
+ * coff64-rs6000.c (PUTWORD, PUTHALF, PUTBYTE): Likewise.
+ (GETWORD, GETHALF, GETBYTE): Likewise.
+ * coffswap.h (PUTWORD, PUTHALF, PUTBYTE): Likewise.
+
+ * bfd-in.h (struct orl): Change "pos" to a union.
+ * archive.c (_bfd_compute_and_write_armap): Use it instead of casts.
+ (bsd_write_armap): Here too.
+ (coff_write_armap): And here.
+ * coff-rs6000.c (xcoff_write_armap_old): And here.
+ (xcoff_write_one_armap_big): And here.
+ (xcoff_write_armap_big): And here.
+ * ecoff.c (_bfd_ecoff_write_armap): And here.
+ * elf64-mips.c (mips_elf64_write_armap): And here.
+
+ * aoutf1.h (sunos_set_arch_mach): Make "mach" param an enum.
+ * elf-m10300.c (elf_mn10300_mach): Return an unsigned long.
+ * elf32-h8300.c (elf32_h8_mach): Likewise.
+ * elf32-mips.c (elf_mips_mach): Likewise.
+ * sparclynx.c (NAME(lynx,set_arch_mach)): Likewise.
+
+ * aix386-core.c (aix386_core_file_p): Remove redundant bfd_release
+ calls.
+ (aix386_core_vec): Typo fix.
+
+ * aout-arm.c: Include libaout.h and aout/aout64.h after N_TXTADDR
+ etc. to avoid redefined macro warning.
+ (MY(put_reloc)): Use bfd_vma for "value" rather than long.
+ (MY(fix_pcrel_26)): Likewise.
+ * aout-ns32k.c (MY(put_reloc)): Likewise.
+ * aout-cris.c (MY(swap_ext_reloc_out)): Likewise for r_addend.
+ * aoutx.h (NAME(aout,swap_ext_reloc_out)): Likewise.
+ * coff-arm.c (coff_arm_relocate_section): Likewise for my_offset.
+
+ * aout-encap.c: Include "file", not <file> for binutils headers.
+ (encap_object_p): Half baked attempt to fix compile errors in
+ code dealing with "magic".
+
+ * aout-ns32k.c: Include "file", not <file> for binutils headers.
+ (_bfd_ns32k_relocate_contents): get_data and put_data manipulate
+ bfd_vma's rather than longs.
+ * cpu-ns32k.c (ns32k_sign_extend): Delete.
+ (_bfd_ns32k_get_displacement): Return a bfd_vma, don't pass in offset.
+ (_bfd_ns32k_get_immediate): Likewise. Add code for 8 byte values,
+ remove case 3.
+ (_bfd_ns32k_put_displacement): Accept a bfd_vma, don't pass in offset.
+ Use unsigned comparisons.
+ (bfd_ns32k_put_immediate): Likewise, and add code for 8 byte values.
+ (do_ns32k_reloc): get_data and put_data operate on bfd_vma's.
+ (_bfd_do_ns32k_reloc_contents): Likewise.
+ * ns32k.h (_bfd_ns32k_get_displacement): Update prototype.
+ (_bfd_ns32k_get_immediate): Likewise.
+ (_bfd_ns32k_put_displacement): Likewise.
+ (_bfd_ns32k_put_immediate): Likewise.
+ (bfd_reloc_status_type): Likewise.
+
+ * aoutx.h (NAME(aout,find_nearest_line)): Rename 'p' to 'colon'
+ to avoid shadowing.
+ * pdp11.c (NAME(aout,find_nearest_line)): Likewise.
+ * coff-h8300.c (h8300_reloc16_extra_cases): Remove shadowing "value".
+ * coff-ppc.c (enum ref_category): Rename "data" to "tocdata" to
+ avoid shadowing.
+ (record_toc): Use a bfd_signed_vma for our_toc_offset.
+ * coffcode.h (coff_write_relocs): Rename "i" to avoid shadowing.
+ * elf.c (bfd_elf_get_bfd_needed_list): Rename "link" var to avoid
+ shadow warning.
+ (_bfd_elfcore_strndup): Likewise for "dup".
+ * elf32-cris.c (cris_elf_relocate_section): "symname" instead of
+ "name" to avoid shadowing.
+ * elf32-hppa.c (elf32_hppa_relocate_section): Remove duplicate
+ definition of "off".
+ * elf32-i386.c (elf_i386_relocate_section): Likewise.
+ * elf32-mips.c (_bfd_mips_elf_modify_segment_map): Remove duplicate
+ definition of "s".
+ (_bfd_mips_elf_final_link): Rename "i" to "j". Remove duplicate
+ "secpp".
+ * elf64-x86-64.c (elf64_x86_64_relocate_section): Rename inner "indx"
+ to avoid shadowing.
+ * elflink.h (elf_link_add_object_symbols): Rename "link" to "shlink"
+ to avoid shadowing.
+ (elf_link_input_bfd): Likewise.
+ (elf_bfd_final_link): Remove duplicate innermost "off" var.
+ * oasys.c (oasys_write_data): Rename innermost "p" to "sym".
+ * reloc16.c (bfd_coff_reloc16_relax_section): Rename "i" param to
+ "input_section".
+ * som.c (som_prep_for_fixups): Rename inner "i" to "j".
+ * sunos.c (sunos_add_dynamic_symbols): Localise "s" var.
+ (sunos_write_dynamic_symbol): Remove unused vars.
+ * syms.c (_bfd_stab_section_find_nearest_line): Remove duplicate
+ innermost "directory_name" and "file_name" vars.
+ * tekhex.c (first_phase): Rename local var "type" to "stype".
+ (tekhex_write_object_contents): Rename innermost "s" to "sym".
+ * vms-gsd.c (vms_secflag_by_name): Change "size" param to "hassize",
+ doing comparison at caller.
+ (vms_esecflag_by_name): Likewise.
+ * vms-tir.c (etir_sto): Rename innermost "psect" to "psect1".
+ * xcofflink.c (xcoff_link_input_bfd): Delete duplicate innermost "o".
+ (xcoff_write_global_symbol): Rename "p" param to "inf".
+
+ * cisco-core.c: Add missing prototypes.
+ (cisco_core_file_failing_command): Add ATTRIBUTE_UNUSED.
+ (cisco_core_file_failing_signal): Likewise.
+ (cisco_core_file_matches_executable_p): Likewise.
+ * hpux-core.c (hpux_core_core_file_failing_signal): Likewise.
+ * netbsd-core.c (netbsd_core_file_matches_executable_p): Likewise.
+ * osf-core.c (osf_core_core_file_matches_executable_p): Likewise.
+ * sco5-core.c (sco5_core_file_matches_executable_p): Likewise.
+
+ * coff-arm.c (coff_arm_link_hash_table): Use bfd_size_type for
+ thumb_glue_size and arm_glue_size.
+ * elf32-arm.h (elf32_arm_link_hash_table): Likewise here.
+
+ * coff64-rs6000.c: Group prototypes together.
+
+ * coffcode.h (coff_set_arch_mach): Add ATTRIBUTE_UNUSED.
+ (buy_and_read): Remove "seek" param. Change "size" to bfd_size_type.
+
+ * cpu-arc.c: Add missing prototypes.
+ * cpu-h8500.c: Likewise.
+ * cpu-i960.c: Likewise.
+ * cpu-pj.c: Likewise.
+ * cpu-sh.c: Likewise.
+ * cpu-w65.c: Likewise.
+ * cpu-z8k.c: Likewise.
+ * elf32-fr30.c: Likewise.
+ * elf32-h8300.c: Likewise.
+ * elf32-i370.c: Likewise.
+ * hpux-core.c: Likewise.
+ * versados.c: Likewise.
+
+ * cpu-h8300.c (bfd_default_scan_num_mach): Don't declare.
+ * cpu-h8500.c: Likewise.
+ * cpu-i960.c: Likewise.
+ * cpu-z8k.c: Likewise.
+
+ * cpu-ia64-opc.c: Correct comment.
+
+ * dwarf2.c (_bfd_dwarf2_find_nearest_line): Remove unused var.
+
+ * elf-bfd.h (elf_size_info): Change count param of write_out_phdrs
+ to unsigned.
+ (bfd_elf32_write_out_phdrs): Likewise.
+ (bfd_elf64_write_out_phdrs): Likewise.
+ (elf_linker_section_pointers): Change addend to bfd_vma.
+ (_bfd_elf_find_pointer_linker_section): Likewise.
+ (_bfd_elfcore_make_pseudosection): Change size param to size_t and
+ filepos to unsigned file_ptr.
+ (_bfd_elfcore_strndup): Change max param to size_t.
+ * elf.c (_bfd_elfcore_make_pseudosection): As above.
+ (_bfd_elfcore_strndup): Likewise.
+ (_bfd_elf_find_pointer_linker_section): Likewise.
+
+ * elf-hppa.h (elf_hppa_relocate_insn): Return an int, and change
+ insn and sym_value to ints.
+
+ * elf.c (elf_read): Make "offset" param a file_ptr, "size" a
+ bfd_size_type.
+ (elfcore_read_notes): Likewise.
+
+ * elf32-arm.h (elf32_arm_final_link_relocate): Change sym_flags
+ param from unsigned char to int.
+ (elf32_arm_relocate_section): If USE_REL, cast "rel" appropriately
+ for info_to_howto call.
+ (add_dynamic_entry): Define macro.
+ (elf32_arm_size_dynamic_sections): Use add_dynamic_entry.
+
+ * elf32-cris.c (add_dynamic_entry): Define macro.
+ (elf_cris_size_dynamic_sections): Use add_dynamic_entry.
+
+ * elf32-h8300.c (elf32_h8_final_write_processing): Make static.
+ (elf32_h8_object_p): Likewise.
+ (elf32_h8_merge_private_bfd_data): Likewise.
+ (elf32_h8_relax_section): Cast gap to int so signed comparisons work.
+
+ * elf32-hppa.c (add_dynamic_entry): Define macro.
+ (elf32_hppa_size_dynamic_sections): Use it.
+ * elf32-i370.c (add_dynamic_entry): Define macro.
+ (i370_elf_size_dynamic_sections): Use it.
+ (i370_noop): Make static.
+ * elf32-i386.c (add_dynamic_entry): Define macro.
+ (elf_i386_size_dynamic_sections): Use it.
+ * elf32-m68k.c (add_dynamic_entry): Define macro.
+ (elf_m68k_size_dynamic_sections): Use it.
+ * elf32-ppc.c (add_dynamic_entry): Define macro.
+ (ppc_elf_size_dynamic_sections): Use it.
+ * elf32-s390.c (add_dynamic_entry): Define macro.
+ (elf_s390_size_dynamic_sections): Use it.
+ * elf64-alpha.c (add_dynamic_entry): Define macro.
+ (elf64_alpha_size_dynamic_sections): Use it.
+ * elf64-hppa.c (add_dynamic_entry): Define macro.
+ (elf64_hppa_size_dynamic_sections): Use it.
+ * elf64-ppc.c (add_dynamic_entry): Define macro.
+ (ppc64_elf_size_dynamic_sections): Use it.
+ * elf64-s390.c (add_dynamic_entry): Define macro.
+ (elf_s390_size_dynamic_sections): Use it.
+ * elf64-sparc.c (add_dynamic_entry): Define macro.
+ (sparc64_elf_size_dynamic_sections): Use it.
+ * elf64-x86-64.c (add_dynamic_entry): Define macro.
+ (elf64_x86_64_size_dynamic_sections): Use it.
+ * elfxx-ia64.c (add_dynamic_entry): Define macro.
+ (elfNN_ia64_size_dynamic_sections): Use it.
+
+ * elf32-v850.c (SEXT24): Modify to avoid signed/unsigned warning.
+ (v850_elf_perform_relocation): Make "r_type" param unsigned.
+
+ * elf64-mips.c (mips_elf64_slurp_one_reloc_table): Just return
+ false if the first malloc fails rather than going via error_return.
+
+ * elf64-sparc.c (sparc64_elf_plt_entry_offset): Use a bfd_vma for
+ "index" param.
+ (sparc64_elf_plt_ptr_offset): Likewise, and for "max" param too.
+
+ * elflink.h (elf_link_input_bfd): s/ingored/ignored/ in error message.
+
+ * elfxx-ia64.c (global_sym_index): Return a long.
+
+ * ieee.c (get_symbol): Use int rather than char param.
+ (ieee_slurp_sections): Move "section" var to inner blocks.
+ (copy_expression): Don't init "value" to zero or worry about
+ clearing to zero after using.
+ (ieee_write_debug_part): Rename "output_buffer" to "obuff" to avoid
+ shadowing.
+
+ * ihex.c (ihex_write_record): Make "count" var a size_t, "addr" an
+ unsigned int.
+
+ * libbfd-in.h (BFD_ALIGN): Add cast to avoid signed/unsigned warning.
+ (bfd_write_bigendian_4byte_int): Pass an unsigned int value param.
+
+ * mipsbsd.c (mips_fix_jmp_addr): Add "error_message" param.
+
+ * pc532-mach.c (MYNSX): Delete.
+ (ns32kaout_bfd_reloc_type_lookup): Define prototype without MYNSX.
+ (write_object_contents): Correct prototype.
+
+ * peicode.h (pe_ILF_build_a_bfd): Use an unsigned int param rather
+ than unsigned short.
+
+ * section.c (bfd_set_section_contents): Remove redundant
+ "offset < 0" test. Check that "count" doesn't overflow size_t.
+ (bfd_get_section_contents): Likewise.
+
+ * som.c (som_fixup_formats): Add missing braces.
+ (som_reloc_addend): Pass a bfd_vma for "addend".
+
+ * srec.c (srec_write_record): Pass "type" as an unsigned int.
+ (srec_write_symbols): Remove an unnecessary var.
+
+ * targets.c (_bfd_target_vector): Sort entries. Sort externs
+ to match.
+ * configure.in: Sort to match. Bump version number.
+ * configure: Regenerate.
+
+ * tekhex.c (move_section_contents): Assert offset == 0.
+
+ * versados.c (new_symbol_string): Constify arg.
+ (process_esd): Use bfd_und_section_ptr rather than &bfd_und_section.
+ (versados_get_symbol_info): Make static.
+ (versados_print_symbol): Likewise.
+ (versados_get_reloc_upper_bound): Likewise.
+ (versados_canonicalize_reloc): Likewise.
+
+2001-09-18 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * elflink.h (elf_link_input_bfd): Fix typo in error message.
+
+2001-09-17 H.J. Lu <hjl@gnu.org>
+
+ * dwarf1.c (parse_die): Take a new arg for the end of the
+ section. Return false if die is beyond the section.
+ (parse_functions_in_unit): Pass the end of the section to
+ parse_die ().
+ (_bfd_dwarf1_find_nearest_line): Likewise.
+
+2001-09-14 Michael Rauch <mrauch@netbsd.org>
+
+ * elf32-sparc.c (elf32_sparc_relocate_section): Treat R_SPARC_UA32
+ just like R_SPARC_32.
+
+2001-09-14 Kevin Lo <kevlo@openbsd.org>
+
+ * configure.bfd: Add arm-openbsd target.
+
+2001-09-14 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config.bfd: Change machine triplets from mips*el*-* to mips*el-*.
+ Add support for mips64.
+
+2001-09-13 Alexandre Oliva <aoliva@redhat.com>
+
+ * elf32-openrisc.c (ELF_MACHINE_ALT1): Define as EM_OPENRISC_OLD.
+
+2001-09-12 Alexandre Oliva <aoliva@redhat.com>
+
+ * elf.c (prep_headers): Get the machine code from the elf
+ backend data.
+ * elf-m10200.c (ELF_MACHINE_CODE): Redefine to EM_MN10200.
+ (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10200.
+ * elf-m10300.c (ELF_MACHINE_CODE): Redefine to EM_MN10300.
+ (ELF_MACHINE_ALT1): Define to EM_CYGNUS_MN10300.
+ * elf-arc.c (arc_elf_final_write_processing): Don't override
+ e_machine, it's now properly set in prep_headers.
+ * elf32-avr.c (elf32_avr_object_p): Accept both EM_AVR and
+ EM_AVR_OLD.
+ (ELF_MACHINE_ALT1): Define to EM_AVR_OLD.
+ * elf-d10v.c (ELF_MACHINE_CODE): Redefine to EM_D10V.
+ (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D10V.
+ * elf-d30v.c (ELF_MACHINE_CODE): Redefine to EM_D30V.
+ (ELF_MACHINE_ALT1): Define to EM_CYGNUS_D30V.
+ * elf-fr30.c (ELF_MACHINE_CODE): Redefine to EM_FR30.
+ (ELF_MACHINE_ALT1): Define to EM_CYGNUS_FR30.
+ * elf-m32r.c (ELF_MACHINE_CODE): Redefine to EM_M32R.
+ (ELF_MACHINE_ALT1): Define to EM_CYGNUS_M32R.
+ * elf32-pj.c (ELF_MACHINE_ALT1): DEfine to EM_PJ_OLD.
+ * elf-v850.c (ELF_MACHINE_CODE): Redefine to EM_V850.
+ (ELF_MACHINE_ALT1): Define to EM_CYGNUS_V850.
+
+2001-09-11 Richard Henderson <rth@redhat.com>
+
+ * elf64-alpha.c (elf64_alpha_section_flags): New.
+ (elf64_alpha_fake_sections): Map SEC_SMALL_DATA to SHF_ALPHA_GPREL.
+
+2001-09-11 Richard Henderson <rth@redhat.com>
+
+ * elf64-alpha.c (elf64_alpha_relocate_section): Do not
+ apply HINT relocations against dynamic symbols.
+
+2001-09-11 H.J. Lu <hjl@gnu.org>
+
+ * linker.c (link_action): Change COMMON_ROW\defw from CREF to COM.
+
+2001-09-09 Richard Henderson <rth@redhat.com>
+
+ * elf64-alpha.c: Delete all unused ERIC_neverdef and rth_notdef code.
+
+ * elf64-alpha.c (elf64_alpha_relax_with_lituse): Nop out gpdisp
+ following a call to a near function.
+
+2001-09-08 Richard Henderson <rth@redhat.com>
+
+ * elf64-alpha.c (elf64_alpha_relocate_section): Soft fail
+ relocation errors. Fail gp-relative relocations against
+ dynamic symbols.
+
+2001-09-08 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-i386.c (elf_i386_relocate_section): Check !DEF_REGULAR
+ as well as DEF_DYNAMIC in test for avoided copy relocs.
+ (allocate_plt_and_got_and_discard_relocs): Likewise.
+ * elf32-hppa.c (elf_i386_relocate_section): Likewise.
+ (allocate_plt_and_got_and_discard_relocs): Likewise.
+
+2001-09-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * elf32-mips.c (mips_elf_calculate_relocation): Fix overflow handling
+ of R_MIPS_PC16.
+
+2001-09-06 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * elf64-mips.c (mips_elf64_howto_table_rel): Fix relocation HOWTO
+ definitions.
+ (mips_elf64_howto_table_rel): Likewise.
+
+2001-09-05 Tom Rix <trix@redhat.com>
+
+ * xcofflink.c (bfd_xcoff_import_symbol): Handle import file XMC_XO
+ and syscall symbols.
+ (write_global_symbol) : Same.
+ (bfd_xcoff_export_symbol): Remove unused syscall param.
+ * libxcoff.h: Change prototype of bfd_xcoff_export symbol and
+ bfd_xcoff_import_symbol.
+ * bfd-in.h: Same.
+ * bfd-in2.h : Regenerate.
+
+2001-09-04 Richard Henderson <rth@redhat.com>
+
+ * elf64-alpha.c (SKIP_HOWTO): New.
+ (elf64_alpha_howto_table): Use it to remove dead ECOFF relocs.
+ Fix sizes of 16-bit mem format relocs.
+ (elf64_alpha_reloc_map): Update to match.
+ (elf64_alpha_relax_with_lituse): Use GPREL16 as appropriate.
+ (elf64_alpha_relax_without_lituse): Likewise.
+ (elf64_alpha_check_relocs): Handle GPREL16.
+ (elf64_alpha_relocate_section): Likewise.
+ * reloc.c (BFD_RELOC_ALPHA_USER_*): Remove.
+ (BFD_RELOC_ALPHA_GPREL_HI16, BFD_RELOC_ALPHA_GPREL_LO16): New.
+ * bfd-in2.h, libbfd.h: Rebuild.
+
+2001-09-04 Jeff Law <law@redhat.com>
+
+ * elf32-h8300.c (elf32_h8_relax_section): New function.
+ (elf32_h8_relax_delete_bytes): Likewise.
+ (elf32_h8_symbol_address_p): Likewise.
+ (elf32_h8_get_relocated_section_contents): Likewise.
+ (bfd_elf32_bfd_relax_section): Define.
+ (bfd_elf32_bfd_get_relocated_section_contents): Likewise.
+
+ * elf32-h8300.c (special): New function.
+ (h8_elf_howto_table): Use it for SPECIAL_FUNCTION field in
+ all relocations.
+ (elf32_h8_final_link_relocate): Treat R_H8_DIR24A8 like 32bit
+ relocations. Fix problems with the true 24bit reloc R_H8_DIR24R8.
+ Fix minor problems with 8bit and 16bit PC relative relocations.
+
+2001-09-01 Andreas Jaeger <aj@suse.de>
+
+ * vms-tir.c: Add missing prototypes.
+ * vms-hdr.c: Likewise.
+ * vms-gsd.c: Likewise.
+ * vms-misc.c: Likewise.
+
+2001-08-31 H.J. Lu <hjl@gnu.org>
+
+ * elf32-mips.c (_bfd_mips_elf_check_relocs): Report filename
+ with bad relocation.
+
+2001-08-31 Eric Christopher <echristo@redhat.com>
+ Jason Eckhardt <jle@redhat.com>
+
+ * bfd/archures.c: Add mipsisa32 and mipsisa64. Remove mips32,
+ mips32_4k and mips64.
+ * bfd/aoutx.h: Remove bfd_mach_mips32, bfd_mach_mips32_4k,
+ bfd_mach_mips64. Add bfd_mach_mipsisa32, bfd_mach_mipsisa64.
+ * bfd/cpu-mips.c: Ditto.
+ * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing): Ditto.
+ * bfd/bfd-in2.h: Regenerate.
+
+2001-08-31 Jakub Jelinek <jakub@redhat.com>
+
+ * elf64-alpha.c (elf64_alpha_relocate_section): Duplicate memory
+ value into R_ALPHA_RELATIVE's addend.
+ (elf64_alpha_finish_dynamic_symbol): Likewise.
+
+2001-08-31 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * elf32-arm.h (elf32_arm_relocate_section): Do not rightshift
+ recomputed addend during relocatable link if not USE_REL.
+
+ * elflink.h (elf_gc_propagate_vtable_entries_used): Fix off-by-one
+ error.
+
+2001-08-30 H.J. Lu <hjl@gnu.org>
+
+ * elf32-mips.c (mips_elf_calculate_relocation): Revert the last
+ 2 changes.
+ (_bfd_mips_elf_adjust_dynamic_symbol): Allocate dynamic
+ relocations for weak definitions.
+
+2001-08-30 H.J. Lu <hjl@gnu.org>
+
+ * Makefile.am (BFD32_BACKENDS): Add elf32-h8300.lo.
+ (BFD32_BACKENDS_CFILES): Add elf32-h8300.c.
+ * Makefile.in: Rebuild.
+
+2001-08-30 H.J. Lu <hjl@gnu.org>
+
+ * elf32-mips.c (mips_elf_calculate_relocation): Don't create
+ dynamic relocation for undefined weak symbols when creating
+ executables. Check h->root.root.type, instead of h->root.type.
+
+2001-08-29 Joel Sherrill <joel@OARcorp.com>
+
+ * config.bfd (i[3456]86-*-rtems*, m68*-*-rtems*): Change
+ default from coff to elf.
+
+2001-08-29 Jeff Law <law@redhat.com>
+
+ * elf32-h8300.c (h8_elf_howto_table): Add new PC relative
+ relocations.
+ (h8_reloc_map): Similarly.
+ (elf32_h8_final_link_relocate): Remove incorrect overflow tests.
+ Add support for PC relative relocations.
+
+ * elf32-h8300.c: Put all prototypes together.
+ (elf32_h8_info_to_howto): Parameter elf_reloc is used.
+ (elf32_h8_final_link_relocate): New function for linker.
+ (elf32_h8_relocate_section): Similarly.
+ (elf_backend_relocate_section): Define.
+
+ * cpu-h8300.c (h8300_scan, compatible): Prototype.
+ (h8300_scan): Handle architecture:machine encodings typically
+ found in linker scripts.
+ * elf.c (prep_headers): Do not try to do H8 machine recognition
+ here.
+ * elf32-h8300.c: Add some missing prototypes.
+ (elf32_h8_mach, elf32_h8_final_write_processing): New functions.
+ (elf32_h8_object_p): Similarly.
+
+2001-08-29 Tom Rix <trix@redhat.com>
+
+ * xcofflink.c (xcoff_link_add_symbols): Fix XTY_LD symbol that
+ does not follow a XTY_SD.
+
+2001-08-29 Alan Modra <amodra@bigpond.net.au>
+
+ * targmatch.sed: Delete case statements.
+ * config.bfd <powerpc-*-aix* entry>: Select 64 bit xcoff for
+ aix4.3 and above.
+
+2001-08-29 J"orn Rennecke <amylaar@redhat.com>
+
+ * Makefile.am (elf32-h8300.lo): New target.
+ * config.bfd (h8300*-*-elf): New case.
+ * configure.in (bfd_elf32_h8300_vec): New case.
+ * elf.c (prep_headers): Add case for bfd_arch_h8300.
+ * reloc.c (BFD_RELOC_H8_DIR16A8): New relocation.
+ (BFD_RELOC_H8_DIR16R8, BFD_RELOC_H8_DIR24A8): Likewise.
+ (BFD_RELOC_H8_DIR24R8, BFD_RELOC_H8_DIR32A16): Likewise.
+ * targets.c (bfd_target bfd_elf32_h8300_vec): New extern declaration.
+ * elf32-h8300.c: New file.
+ * Makefile.in, bfd-in2.h, libbfd.h, configure: Regenerated.
+
+2001-08-28 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * sparclynx.c: Add missing prototypes.
+ * coff-mcore.c: Add missing prototypes.
+ * elf32-pj.c: Add missing prototypes.
+ * nlm32-sparc.c: Add missing prototypes.
+ * oasys.c: Add missing prototypes.
+ * pdp11.c: Add missing prototypes.
+ * pe-mips.c: Add missing prototypes.
+ * riscix.c: Add missing prototypes.
+
+2001-08-27 Daniel Jacobowitz <drow@mvista.com>
+
+ * elf32-i386.c: Add missing prototypes.
+ * elf32-ppc.c: Likewise.
+ * elf32-sh-lin.c: Likewise.
+ * elfarm-nabi.c: Likewise.
+
+2001-08-27 Daniel Jacobowitz <drow@mvista.com>
+
+ * elf32-i386.c (elf_i386_grok_prstatus): New function.
+ (elf_i386_grok_psinfo): New function.
+ (elf_backend_grok_prstatus): Define.
+ (elf_backend_grok_psinfo): Likewise.
+ * elf32-ppc.c (ppc_elf_grok_prstatus): New function.
+ (ppc_elf_grok_psinfo): New function.
+ (elf_backend_grok_prstatus): Define.
+ (elf_backend_grok_psinfo): Likewise.
+ * elf32-sh-lin.c (elf32_shlin_grok_prstatus): New function.
+ (elf32_shlin_grok_psinfo): New function.
+ (elf_backend_grok_prstatus): Define.
+ (elf_backend_grok_psinfo): Likewise.
+ * elfarm-nabi.c (elf32_arm_nabi_grok_prstatus): New function.
+ (elf32_arm_nabi_grok_psinfo): New function.
+ (elf_backend_grok_prstatus): Define.
+ (elf_backend_grok_psinfo): Likewise.
+
+2001-08-27 H.J. Lu <hjl@gnu.org>
+
+ * elf32-mips.c (mips_elf_create_dynamic_relocation): Add more
+ sanity check.
+ (mips_elf_calculate_relocation): Create dynamic relocation for
+ symbols with weak definition or the ELF_LINK_HASH_DEF_REGULAR
+ bit is not set.
+
+2001-08-27 H.J. Lu <hjl@gnu.org>
+
+ * elf32-mips.c (_bfd_mips_elf_hide_symbol): Add prototype.
+ (_bfd_mips_elf_copy_indirect_symbol): Likewise.
+ (_bfd_elf32_mips_grok_prstatus): Likewise.
+ (_bfd_elf32_mips_grok_psinfo): Likewise.
+ (_bfd_mips_elf_hide_symbol): Make it static and cast to
+ `struct mips_elf_link_hash_entry *'.
+ (_bfd_mips_elf_copy_indirect_symbol): Make it static.
+
+2001-08-27 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * mipsbsd.c: Add missing prototypes.
+ * hp300hpux.c: Add missing prototypes.
+ * i386aout.c: Add missing prototypes.
+ * i386lynx.c: Add missing prototypes.
+ * i386mach3.c: Add missing prototypes.
+ * i386msdos.c: Add missing prototypes.
+ * i386os9k.c: Add missing prototypes.
+
+2001-08-27 Linus Nordberg <linus@swox.se>
+ Torbjorn Granlund <tege@swox.com>
+ Staffan Ulfberg <staffanu@swox.se>
+ Alan Modra <amodra@bigpond.net.au>
+
+ * config.bfd: Add powerpc64 target. Add powerpc64 vectors to
+ targ64_selvecs for 32 bit powerpc targets.
+ * Makefile.am (BFD64_BACKENDS): Add elf64-ppc.lo.
+ (BFD64_BACKENDS_CFILES): Add elf64-ppc.c.
+ Run "make dep-am".
+ * Makefile.in: Regenerate.
+ * configure.in: Add elf64_powerpc vecs.
+ * configure: Regenerate.
+ * cpu-powerpc.c: Default to bfd_mach_ppc_620 entry for 64 bit.
+ * elf.c (prep_headers): EM_PPC64 for 64 bit ppc elf target.
+ * targets.c: Add bfd_elf64_powerpc_vec and bfd_elf64_powerpcle_vec.
+ * elf64-ppc.c: New file.
+ * reloc.c: Add powerpc64 relocs.
+ * libbfd.h: Regenerate.
+ * bfd-in2.h: Regenerate.
+
+2001-08-27 Andreas Schwab <schwab@suse.de>
+
+ * elf32-m68k.c (elf32_m68k_check_relocs): Set DF_TEXTREL if the
+ reloc is against read-only section.
+ (elf32_m68k_size_dynamic_sections): Use DF_TEXTREL flag instead of
+ looking up section names for DT_TEXTREL.
+ (elf32_m68k_reloc_type_class): New function.
+ (elf_backend_reloc_type_class): Define.
+
+2001-08-27 Andreas Jaeger <aj@suse.de>
+
+ * elf64-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
+ reloc is against read-only section.
+ (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
+ looking up section names for DT_TEXTREL.
+ (elf_s390_reloc_type_class): New.
+ (elf_backend_reloc_type_class): Define.
+
+ * elf32-s390.c (elf_s390_check_relocs): Set DF_TEXTREL if the
+ reloc is against read-only section.
+ (elf_s390_size_dynamic_sections): Use DF_TEXTREL flag instead of
+ looking up section names for DT_TEXTREL.
+ (elf_s390_reloc_type_class): New.
+ (elf_backend_reloc_type_class): Define.
+
+ * elf32-ppc.c (ppc_elf_check_relocs): Set DF_TEXTREL if the reloc
+ is against read-only section.
+ (ppc_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
+ looking up section names for DT_TEXTREL.
+ (ppc_elf_reloc_type_class): New.
+ (elf_backend_reloc_type_class): Define.
+
+2001-08-26 Andreas Jaeger <aj@suse.de>
+
+ * elf32-cris.c (cris_elf_check_relocs): Set DF_TEXTREL if the
+ reloc is against read-only section.
+ (elf_cris_size_dynamic_sections): Use DF_TEXTREL flag instead of
+ looking up section names for DT_TEXTREL.
+ (elf_cris_reloc_type_class): New.
+ (elf_backend_reloc_type_class): Define.
+
+ * elf32-sh.c (sh_elf_check_relocs): Set DF_TEXTREL if the reloc is
+ against read-only section.
+ (elf_backend_reloc_type_class): Define.
+ (sh_elf_reloc_type_class): New.
+ (sh_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
+ looking up section names for DT_TEXTREL.
+
+ * elf32-arm.h (elf32_arm_check_relocs): Set DF_TEXTREL if the
+ reloc is against read-only section.
+ (elf32_arm_size_dynamic_sections): Use DF_TEXTREL flag instead of
+ looking up section names for DT_TEXTREL.
+ (elf32_arm_reloc_type_class): New.
+ (elf_backend_reloc_type_class): Define.
+
+2001-08-25 Andreas Jaeger <aj@suse.de>
+
+ * oasys.c: Add missing prototypes.
+
+ * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Add unused
+ attribute for parameter.
+ * elf.c (_bfd_elf_reloc_type_class): Likewise.
+
+ * versados.c (get_4): Make static.
+ (get_10): Make static.
+ Add missing prototypes.
+ (process_esd): Fix call to versados_new_symbol.
+
+2001-08-25 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * coff-a29k.c: Add missing prototypes.
+ * coff-apollo.c: Add missing prototypes.
+ * coff-arm.c: Add missing prototypes.
+ * coff-i860.c: Add missing prototypes.
+ * coff-rs6000.c: Add missing prototypes.
+ * coff-tic80.c: Add missing prototypes.
+ * elf-m10200.c: Add missing prototypes.
+ * elf-m10300.c: Add missing prototypes.
+ * elf32-arm.h: Add missing prototypes.
+ * elf32-d10v.c: Add missing prototypes.
+ * elf32-m32r.c: Add missing prototypes.
+ * elf32-mcore.c: Add missing prototypes.
+ * elf32-openrisc.c: Add missing prototypes.
+ * elf32-sh.c: Add missing prototypes.
+ * elf32-sparc.c: Add missing prototypes.
+ * elf32-v850.c: Add missing prototypes.
+ * elfarm-nabi.c: Add missing prototypes.
+ * elfarm-oabi.c: Add missing prototypes.
+
+2001-08-25 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * elf32-mips.c (elf_mips_abi_name): Return the right ABI string for
+ E_MIPS_ABI_O64 and E_MIPS_ABI_EABI64
+
+2001-08-24 H.J. Lu <hjl@gnu.org>
+
+ * elf.c (_bfd_elf_merge_sections): Fail if not using an ELF
+ hash structure.
+
+2001-08-24 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * elf-bfd.h (elf_hash_table): Revert definition.
+ (is_elf_hash_table): New macro.
+ * elflink.h (elf_link_add_object_symbols): Test
+ is_elf_hash_table before accessing ELF only fields in hash
+ structure.
+ (elf_link_create_dynamic_sections): Fail if not using an ELF
+ hash structure.
+ (elf_add_dynamic_entry): Fail if not using an ELF hash
+ structure.
+ (elf_link_record_local_dynamic_symbol): Fail if not using an
+ ELF hash structure.
+ (size_dynamic_sections): Fail if not using an ELF hash
+ structure.
+ (elf_adjust_dynamic_symbol): Fail if not using an ELF
+ hash structure.
+ (elf_bfd_final_link): Fail if not using an ELF hash
+ structure.
+
+2001-08-24 H.J. Lu <hjl@gnu.org>
+
+ * elf-bfd.h (elf_hash_table): Return NULL if the linker hash
+ table is not an ELF linker hash table.
+
+ * elf.c (_bfd_elf_link_hash_table_init): Set the linker hash
+ table type to bfd_link_elf_hash_table.
+
+ * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Revert
+ the last change.
+
+ * linker.c (_bfd_link_hash_table_init): Set the linker hash
+ table type to bfd_link_generic_hash_table.
+
+2001-08-24 Alexandre Oliva <aoliva@redhat.com>
+
+ * bfd.c (bfd_alt_mach_code): New function.
+ * bfd-in2.h: Rebuilt.
+
+2001-08-24 Alexandre Oliva <aoliva@redhat.com>
+
+ * elf-m10300.c (mn10300_elf_relocate_section): Test the right
+ `type' field in the hash entry when deciding whether to follow a
+ link.
+
+2001-08-24 Jakub Jelinek <jakub@redhat.com>
+
+ * elflink.h (elf_link_sort_cmp1): Sort RELATIVE relocs first, not
+ last.
+ (elf_link_sort_relocs): Adjust accordingly.
+
+ * elf64-alpha.c (struct alpha_elf_link_hash_entry): Add reltext flag.
+ (elf64_alpha_check_relocs): Set it if section this reloc is against
+ is read-only. Set DF_TEXTREL if a RELATIVE reloc is needed against
+ read-only section.
+ (elf64_alpha_calc_dynrel_sizes): Set DF_TEXTREL flag if relocation
+ is is against read-only section.
+ (elf64_alpha_size_dynamic_sections): Use DF_TEXTREL flag, don't
+ check section names.
+ (elf64_alpha_reloc_type_class): New.
+ (elf_backend_reloc_type_class): Define.
+
+2001-08-24 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * linker.c (_bfd_generic_link_add_archive_symbols): Replace alloca()
+ by bfd_malloc().
+
+2001-08-23 Andreas Jaeger <aj@suse.de>
+
+ * elf64-x86-64.c (elf64_x86_64_check_relocs): Set DF_TEXTREL if
+ the reloc is against read-only section.
+ (elf64_x86_64_size_dynamic_sections): Use DF_TEXTREL flag instead
+ of looking up section names for DT_TEXTREL.
+ (elf64_x86_64_reloc_type_class): New.
+ (elf_backend_reloc_type_class): Define.
+
+2001-08-23 H.J. Lu <hjl@gnu.org>
+
+ * syms.c (bfd_print_symbol_vandf): Add abfd to arg.
+ * bfd-in2.h (bfd_print_symbol_vandf): Regenerated.
+
+ * aoutx.h (NAME(aout,print_symbol)): Pass abfd to
+ bfd_print_symbol_vandf.
+ * coffgen.c (coff_print_symbol): Likewise.
+ * elf.c (bfd_elf_print_symbol): Likewise.
+ * ieee.c (ieee_print_symbol): Likewise.
+ * nlmcode.h (nlm_print_symbol): Likewise.
+ * oasys.c (oasys_print_symbol): Likewise.
+ * pdp11.c (NAME(aout,print_symbol)): Likewise.
+ * som.c (som_print_symbol): Likewise.
+ * srec.c (srec_print_symbol): Likewise.
+ * tekhex.c (tekhex_print_symbol): Likewise.
+ * versados.c (versados_print_symbol): Likewise.
+ * vms.c (vms_print_symbol): Likewise.
+
+ * elf.c (_bfd_elf_print_private_bfd_data): Replace fprintf_vma
+ with bfd_fprintf_vma.
+ (bfd_elf_print_symbol): Likewise.
+ * syms.c (bfd_print_symbol_vandf): Likewise.
+
+2001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * aoutf1.h (sunos_write_object_contents): Silence compile time
+ warning.
+ * libaout.h (N_SET_DYNAMIC): Silence compile time warning.
+
+ * bout.c: Add missing function prototypes. Fix formatting.
+ * coff-z8k.c: Add missing function prototypes. Fix formatting.
+ * coff-w65.c: Add missing function prototypes. Fix formatting.
+ * coff-h8500.c: Add missing function prototypes. Fix formatting.
+ * coff-h8300.c: Add missing function prototypes. Fix formatting.
+ * coff-tic54x.c: Add missing function prototypes. Fix formatting.
+ * coff-tic30.c: Add missing function prototypes. Fix formatting.
+ * coff-m68k.c: Add missing function prototypes. Fix formatting.
+ * coff-rs6000.c: Add missing function prototypes. Fix formatting.
+ * coff-sh.c: Add missing function prototypes. Fix formatting.
+
+2001-08-23 Jakub Jelinek <jakub@redhat.com>
+
+ * elf-bfd.h (enum elf_reloc_type_class): New.
+ (struct elf_backend_data): Add elf_backend_reloc_type_class.
+ (_bfd_elf_reloc_type_class): New.
+ * elfxx-target.h (elf_backend_reloc_type_class): Define.
+ (elfNN_bed): Add elf_backend_reloc_type_class.
+ * elf.c (_bfd_elf_reloc_type_class): New.
+ * elf32-i386.c (elf_i386_check_relocs): Set DF_TEXTREL if the reloc
+ is against read-only section.
+ (elf_i386_size_dynamic_sections): Use DF_TEXTREL flag instead of
+ looking up section names for DT_TEXTREL.
+ (elf_i386_reloc_type_class): New.
+ (elf_backend_reloc_type_class): Define.
+ * elf32-sparc.c (elf32_sparc_check_relocs): Set DF_TEXTREL if the
+ reloc is against read-only section.
+ (elf32_sparc_size_dynamic_sections): Use DF_TEXTREL flag instead of
+ looking up section names for DT_TEXTREL.
+ (elf32_sparc_reloc_type_class): New.
+ (elf_backend_reloc_type_class): Define.
+ * elf64-sparc.c (sparc64_elf_check_relocs): Set DF_TEXTREL if the
+ reloc is against read-only section.
+ (sparc64_elf_size_dynamic_sections): Use DF_TEXTREL flag instead of
+ looking up section names for DT_TEXTREL.
+ (sparc64_elf_reloc_type_class): New.
+ (elf_backend_reloc_type_class): Define.
+ * elfxx-ia64.c (struct elfNN_ia64_link_hash_table): Add reltext field.
+ (elfNN_ia64_hash_table_create): Clear ia64_info.
+ (get_reloc_section): Set DF_TEXTREL if the reloc is against read-only
+ section.
+ (elfNN_ia64_size_dynamic_sections): Use ia64_info->reltext flag
+ instead of looking up section names for DT_TEXTREL.
+ (elfNN_ia64_reloc_type_class): New.
+ (elf_backend_reloc_type_class): Define.
+ * elflink.h (size_dynamic_sections): Add spare DT_NULL tags.
+ (struct elf_link_sort_rela): New.
+ (elf_link_sort_cmp1, elf_link_sort_cmp2, elf_link_sort_relocs): New.
+ (elf_bfd_final_link): Call elf_link_sort_relocs.
+ Convert one spare DT_NULL into DT_RELCOUNT resp. DT_RELACOUNT if
+ necessary.
+
+2001-08-23 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * configure.in (x86-bsdi): No corefile support.
+ * configure: Regenerate.
+
+2001-08-22 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add missing
+ comma.
+
+2001-08-21 Mark Elbrecht <snowball3@bigfoot.com>
+
+ * coff-go32.c: Make DWARF2 sections use an alignment of 0. Set
+ the alignment of dwarf2 linkonce sections to 0.
+ * coff-sto32.c: Likewise.
+
+2001-08-20 Andreas Jaeger <aj@suse.de>
+
+ * coff-sparc.c: Add missing prototypes.
+ * elf32-s390.c: Likewise.
+ * elf32-i960.c: Likewise.
+ * aout-target.h: Likewise.
+
+2001-08-20 H.J. Lu <hjl@gnu.org>
+
+ * elf-bfd.h (elf_obj_tdata): Add num_section_syms.
+ (elf_num_section_syms): New for num_section_syms.
+
+ * elf.c (elf_map_symbols): Set num_section_syms.
+ (_bfd_elf_symbol_from_bfd_symbol): Check num_section_syms for
+ the section symbol index.
+
+2001-08-20 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * elfxx-target.h (bfd_elfNN_bfd_link_hash_table_create): Never
+ select the generic has table creator. All elf backends need elf
+ specific fields in the hash table.
+
+2001-08-20 Alan Modra <amodra@bigpond.net.au>
+
+ * archive.c (offsetof): Remove define.
+ * elf.c: Likewise.
+ * oasys.c: Likewise
+ * sysdep.h (offsetof): Define.
+
+2001-08-17 Alan Modra <amodra@bigpond.net.au>
+
+ * bfd.c (bfd_get_gp_size): Return an unsigned int.
+ (bfd_set_gp_size): Make param unsigned.
+ * bfd-in2.h: Regenerate.
+ * elf32-ppc.c (ppc_elf_add_symbol_hook): Use elf_gp_size rather
+ than calling bfd_get_gp_size.
+ * elf64-alpha.c (elf64_alpha_add_symbol_hook): Likewise.
+ * elfxx-ia64.c (elfNN_ia64_add_symbol_hook): Likewise.
+
+2001-08-17 Alan Modra <amodra@bigpond.net.au>
+
+ * linker.c (default_fill_link_order): Handle four byte fill value.
+
+2001-08-17 Alan Modra <amodra@bigpond.net.au>
+
+ * elf64-sparc.c (sparc64_elf_output_arch_syms): Add missing
+ prototype.
+ * nlm32-alpha.c (nlm_alpha_write_external): Fix warning.
+
+ * elf64-mips.c (UNUSED_RELOC): Define.
+ (mips_elf64_howto_table_rel): Use it.
+ (mips_elf64_howto_table_rela): Here too.
+ (mips_elf64_write_relocs): Fix signed/unsigned warning.
+
+ * coffcode.h (coff_write_object_contents): Add ATTRIBUTE_UNUSED to
+ silence warning.
+ * coffgen.c (coff_print_symbol): Fix warnings.
+ (coff_find_nearest_line): Likewise.
+ * cofflink.c (_bfd_coff_link_input_bfd): Likewise.
+ * coff-alpha.c (alpha_convert_external_reloc): Likewise.
+ * format.c (bfd_check_format_matches): Likewise.
+ (bfd_set_format): Likewise.
+ * coff-ia64.c: Add missing prototypes.
+ * elf64-alpha.c (struct alpha_elf_link_hash_entry): Make addend
+ signed to silence warnings.
+ (elf64_alpha_relocate_section): Likewise.
+ (elf64_alpha_find_reloc_at_ofs): Fix warnings.
+ (elf64_alpha_add_symbol_hook): Likewise.
+ (elf64_alpha_final_link): Likewise.
+ (elf64_alpha_relax_section): Remove redundant assign to info.gotent.
+ (elf64_alpha_merge_gots): Add ATTRIBUTE_UNUSED to unused args.
+ (elf64_alpha_size_got_sections): Likewise.
+ * elfxx-ia64.c: Add missing prototypes.
+ (elfNN_ia64_relocate_section): Fix warning.
+ (elfNN_ia64_unwind_entry_compare): Make params const.
+
+2001-08-17 Alan Modra <amodra@bigpond.net.au>
+
+ * config.bfd (targ64_selvecs): New.
+ <powerpc-*-aix* entry>: Use it here instead of ineffectual #ifdef.
+
+ * bfd-in.h (BFD_VERSION): Remove wrong comment.
+ (BFD_DEFAULT_TARGET_SIZE): New.
+ (BFD_ARCH_SIZE): Comment.
+ * configure.in (target_size): New. Set instead of target64 in
+ selvecs case statement. Set target64 from it.
+ (bfd_default_target_size): New. Set from taget_size. AC_SUBST.
+ * bfd-in2.h: Regenerate.
+ * configure: Regenerate.
+
+2001-08-17 Alan Modra <amodra@bigpond.net.au>
+
+ * bfd.c (enum bfd_error): Add bfd_error_wrong_object_format.
+ (bfd_errmsgs): Add corresponding message.
+ * archive.c (bfd_generic_archive_p): Don't release bfd_ardata when
+ finding an archive that contains different format object files.
+ Return bfd_error_wrong_object_format for this case.
+ * format.c: Formatting fixes. s/CONST/const/.
+ (bfd_check_format_matches): Accept archives that give
+ bfd_error_wrong_object_format if no full match is found. Tidy
+ code handling matching_vector. Don't return a pointer to freed
+ memory in `matching'. Handle ambiguous matches as for partial
+ archive matches.
+ * bfd-in2.h: Regenerate.
+
+2001-08-15 Alan Modra <amodra@bigpond.net.au>
+
+ * libieee.h (common_header_type): Add last_byte field.
+
+ * ieee.c: Add missing prototypes. Some format fixes.
+ (struct output_buffer_struct): Move for availability to prototypes.
+ (ieee_part_after): New function.
+ (ieee_slurp_debug): Use it here.
+ (ieee_seek): Pass in ieee_data_struct rather than bfd. Use
+ ieee_part_after to set last_byte to one past end of current part.
+ Update callers.
+ (ieee_pos): Pass in ieee_data_struct rather than bfd.
+ Update callers.
+ (parse_expression): Don't go beyond the end of the current part.
+ (ieee_slurp_external_symbols): Correct type passed to read_2bytes.
+ (ieee_get_symtab_upper_bound, ieee_get_symtab,
+ ieee_get_symbol_info, ieee_print_symbol, ieee_new_section_hook,
+ ieee_get_reloc_upper_bound, ieee_canonicalize_reloc, block,
+ ieee_set_section_contents, ieee_write_object_contents,
+ ieee_make_empty_symbol): Make static.
+ (ieee_archive_p): Correct comments regarding bfd_read.
+ (ieee_object_p): Similarly.
+ (ieee_mkobject): Move it. Clear output_ptr_start, output_ptr,
+ output_ptr_end, input_ptr_start, input_ptr, input_ptr_end,
+ input_bfd, output_bfd, output_buffer.
+ (do_as_repeat): Write out ieee_set_current_pc_enum value as for
+ do_with_relocs, ie. as a symbol for relocatable files.
+ (ieee_vec): Add comments showing functions referenced by macros.
+
+2001-08-14 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * aout-tic30.c: Add missing prototypes. Fix formatting.
+ * aout-ns32k.c: Add missing prototypes. Fix formatting.
+ * peXXigen.c: Add missining prototypes. Fix formatting.
+ * aout-adobe.c: Add missining prototypes. Fix formatting.
+
+2001-08-13 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * elf32-v850.c: Add missing function prototypes.
+ Fix some formatting.
+
+ * cpu-v850.c: Add missing function prototype.
+ Fix some formatting.
+
+2001-08-11 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * elf-bfd.h (struct elf_backend_data): Add new fields
+ 'elf_backend_sprintf_vma' and 'elf_backend_fprintf_vma'.
+ (bfd_elf_sprintf_vma): Rename function prototype to
+ '_bfd_elf_sprintf_vma'.
+ (bfd_elf_fprintf_vma): Rename function prototype to
+ '_bfd_elf_fprintf_vma'.
+ * bfd.c (bfd_sprintf_vma): Do not invoke bfd_elf_sprintf_vma
+ directly, instead indirect via the elf_backend_data structure.
+ (bfd_fprintf_vma): Do not invoke bfd_elf_fprintf_vma directly,
+ instead indirect via the elf_backend_data structure.
+ * elf.c (bfd_elf_sprintf_vma): Rename to _bfd_elf_sprintf_vma.
+ (bfd_elf_fprintf_vma): Rename to _bfd_elf_fprintf_vma.
+ * elfxx-target.h (elf_backend_sprintf_vma): Initialise if not
+ already defined.
+ (elf_backend_fprintf_vma): Initialise if not already defined.
+ (struct elf_backend_data): Initialise the
+ elf_backend_sprintf_vma and elf_backend_fprintf_vma fields.
+
+2001-08-10 Andreas Jaeger <aj@suse.de>
+
+ * elf64-sparc.c: Add missing prototypes.
+ * elf32-cris.c: Likewise.
+ * elf32-i370.c: Likewise.
+ * elf64-hppa.c: Likewise.
+ * elf64-s390.c: Likewise.
+
+2001-08-10 Andreas Jaeger <aj@suse.de>
+
+ * elf64-x86-64.c (elf64_x86_64_elf_object_p): Make static.
+ Add prototypes where needed.
+
+2001-08-10 H.J. Lu <hjl@gnu.org>
+
+ * bfd.c (bfd_sprintf_vma): Fix a typo in the last change.
+ (bfd_fprintf_vma): Likewise.
+
+2001-08-10 H.J. Lu <hjl@gnu.org>
+
+ * bfd.c (bfd_sprintf_vma): Don't return void.
+ (bfd_fprintf_vma): Likewise.
+
+2001-08-10 Andreas Jaeger <aj@suse.de>
+
+ * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
+ to build warnings.
+ * configure: Regenerate.
+
+2001-08-10 Alan Modra <amodra@bigpond.net.au>
+
+ * elf.c (bfd_elf_sprintf_vma): Add ATTRIBUTE_UNUSED to quiet
+ warning if not BFD64. Add braces so emacs auto format works.
+ (bfd_elf_fprintf_vma): Likewise.
+
+ * libxcoff.h (struct xcoff_backend_data_rec): Constify src param
+ of _xcoff_swap_ld*.
+ * coff-rs6000.c (xcoff_swap_ldhdr_in): Modify type of external
+ param to agree with libxcoff.h.
+ (xcoff_swap_ldhdr_out): Likewise.
+ (xcoff_swap_ldsym_in): Likewise.
+ (xcoff_swap_ldsym_out): Likewise.
+ (xcoff_swap_ldrel_in): Likewise.
+ (xcoff_swap_ldrel_out): Likewise.
+ (xcoff_create_csect_from_smclas): Likewise.
+ * coff64-rs6000.c: Add missing prototypes.
+ (xcoff64_swap_ldhdr_in): Modify type of external param to agree
+ with libxcoff.h.
+ (xcoff64_swap_ldhdr_out): Likewise.
+ (xcoff64_swap_ldsym_in): Likewise.
+ (xcoff64_swap_ldsym_out): Likewise.
+ (xcoff64_swap_ldrel_in): Likewise.
+ (xcoff64_swap_ldrel_out): Likewise.
+ (xcoff64_ppc_relocate_section): Make static.
+ (xcoff64_slurp_armap): Likewise.
+ (xcoff64_archive_p): Likewise.
+ (xcoff64_openr_next_archived_file): Likewise.
+ (xcoff64_sizeof_headers): Likewise.
+ (xcoff64_is_lineno_count_overflow): Likewise.
+ (xcoff64_is_reloc_count_overflow): Likewise.
+ (xcoff64_loader_symbol_offset): Likewise.
+ (xcoff64_loader_reloc_offset): Likewise.
+ * elf64-gen.c: Add missing prototypes.
+
+2001-08-09 H.J. Lu <hjl@gnu.org>
+
+ * elf.c (bfd_elf_sprintf_vma): Check ELFCLASS64 only in BFD64.
+ (bfd_elf_fprintf_vma): Likewise.
+
+2001-08-09 H.J. Lu <hjl@gnu.org>
+
+ * bfd-in.h (bfd_elf_sprintf_vma, bfd_elf_fprintf_vma): Moved
+ to ...
+ * elf-bfd.h: Here.
+ * bfd-in2.h: Regenerated.
+
+2001-08-09 H.J. Lu <hjl@gnu.org>
+
+ * bfd-in.h (bfd_sprintf_vma): New prototype.
+ (bfd_fprintf_vma): Likewise.
+ (bfd_elf_sprintf_vma): Likewise.
+ (bfd_elf_fprintf_vma): Likewise.
+ (bfd_printf_vma): New. Defined with bfd_fprintf_vma.
+ * bfd-in2.h: Regenerated.
+
+ * bfd.c (bfd_sprintf_vma): New. Defined.
+ (bfd_fprintf_vma): Likewise.
+
+ * elf.c (bfd_elf_sprintf_vma): New. Defined.
+ (bfd_elf_fprintf_vma): Likewise.
+
+2001-08-09 Alan Modra <amodra@bigpond.net.au>
+
+ * coff-rs6000.c: Add missing prototypes.
+ (xcoff_ppc_relocate_section, xcoff_is_lineno_count_overflow,
+ xcoff_is_reloc_count_overflow, xcoff_loader_symbol_offset,
+ xcoff_loader_reloc_offset): Make static.
+ * dwarf1.c: Add missing prototypes.
+ * dwarf2.c: Add missing prototypes.
+ (struct abbrev_info): Move definition.
+ (struct attr_abbrev, ABBREV_HASH_SIZE, ATTR_ALLOC_CHUNK): Likewise.
+ * elf.c: Add missing prototypes.
+ * elf32-gen.c: Likewise.
+ * elf32-i386.c: Likewise.
+ * elf32-ppc.c: Likewise.
+ (ppc_elf_sort_rela): Use PTR instead of "void *".
+ * elflink.h: Add missing prototypes. Formatting fixes.
+ * merge.c: Add missing prototypes.
+ (last4_eq): Use PTR instead of "void *".
+ (last_eq): Likewise.
+ * syms.c: Add missing prototypes.
+
+2001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * bfd.c: Fix formatting.
+ * bfd-in2.h: Regenerate.
+
+2001-08-09 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * elf32-arc.c (R_ARC_B22_PCREL): Change 'partial_inplace' to
+ true (this target uses REL relocations) and 'pcrel_offset' to
+ false (the PC is implied, not stored in the offset).
+
+2001-08-08 Alan Modra <amodra@bigpond.net.au>
+
+ 1999-10-19 Linus Nordberg <linus@swox.se>
+ * elf-bfd.h (struct elf_backend_data): Add want_got_sym.
+ * elfxx-target.h (elf_backend_want_got_sym): Define.
+ (elfNN_bed): Add elf_backend_want_got_sym.
+ * elflink.c (_bfd_elf_create_got_section): Define
+ _GLOBAL_OFFSET_TABLE_ only if bed->want_got_sym.
+
+2001-08-08 Alexandre Oliva <aoliva@redhat.com>
+
+ * dwarf2.c (struct dwarf2_debug): Add sec, sec_info_ptr and syms.
+ (find_rela_addend): New function.
+ (parse_comp_unit): Call it to find the abbrev offset addend.
+ (_bfd_dwarf2_find_nearest_line): Initialize and maintain the new
+ members of dwarf2_debug as debugging information is read.
+
+2001-08-07 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * coff-sh.c (sh_coff_reloc_type_lookup): Provide for sh-coff
+ targets as well as sh-pe.
+
+2001-08-03 Ben Harris <bjh21@netbsd.org>
+
+ * elf32-arm.h (elf32_arm_final_link_relocate): Include offset of
+ reloc from start of section when computing value for R_ARM_REL32
+ reloc.
+
+2001-08-03 Alan Modra <amodra@bigpond.net.au>
+
+ From H.J. Lu <hjl@gnu.org>
+ * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Don't
+ keep relocs for undefined syms if there are no dynamic sections in
+ executable.
+ * elf32-hppa.c (allocate_plt_and_got_and_discard_relocs): Likewise.
+
+2001-08-02 Paul Sokolovsky <paul.sokolovsky@technologist.com>
+
+ * cofflink.c (coff_link_check_ar_symbols): also search for
+ __imp__symbol as well as _symbol.
+ * linker.c (_bfd_generic_link_add_archive_symbols): also
+ search for __imp__symbol as well as _symbol.
+
+2001-08-01 Adam Nemet <anemet@lnxw.com>
+
+ * elf.c (elf_sort_sections): Return zero only as the last step.
+
+2001-08-01 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * config.bfd (arm-vxworks): Change name of define from VXWORKS to
+ ARM_COFF_BUGFIX.
+ (arm-epoc-pe): Define ARM_COFF_BUGFIX.
+ coff-arm.c (coff_arm_relocate_section): Replace VXWORKS with
+ ARM_COFF_BUGFIX.
+
+2001-07-30 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
+
+ * libecoff.h (_bfd_ecoff_styp_to_sec_flags): Changed return type
+ to match corresponding bfd_coff_backend data member.
+
+2001-07-24 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am: Update dependencies with "make dep-am".
+ * Makefile.in: Regenerate
+
+2001-07-15 H.J. Lu <hjl@gnu.org>
+
+ * Makefile.am (po/SRC-POTFILES.in): Use tmp.src instead of tmp.
+ (po/BLD-POTFILES.in): Use tmp.bld instead of tmp.
+ * Makefile.in: Regenerate.
+
+2001-07-11 H.J. Lu <hjl@gnu.org>
+
+ * elf64-alpha.c (elf64_alpha_check_relocs): Set the ALLOC|LOAD
+ flags when creating the reloc section if the ALLOC flag in the
+ source section is set.
+
+2001-07-11 Steve Ellcey <sje@cup.hp.com>
+
+ * reloc.c (bfd_reloc_code_type): Add IA64 relocs
+ BFD_RELOC_IA64_LTOFF_FPTR32MSB and BFD_RELOC_IA64_LTOFF_FPTR32LSB
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+ * elfxx-ia64.c (ia64_howto_table): Define how to handle
+ new relocations.
+ (elfNN_ia64_reloc_type_lookup): Handle new relocations.
+ (elfNN_ia64_check_relocs): Likewise.
+ (elfNN_ia64_install_value): Likewise.
+ (elfNN_ia64_relocate_section): Likewise.
+
+2001-07-11 Jakub Jelinek <jakub@redhat.com>
+
+ * elf32-sparc.c (_bfd_sparc_elf_howto_table): Remove support for
+ R_SPARC_UA64.
+ (elf32_sparc_check_relocs): Likewise.
+ Only create .rela section for alloced sections in shared libraries.
+ (elf32_sparc_relocate_section): Likewise.
+ Remove redundant check.
+ Optimize unaligned reloc usage.
+ * elf64-sparc.c (sparc64_elf_relocate_section): Remove redundant
+ check.
+
+2001-07-11 H.J. Lu <hjl@gnu.org>
+
+ * elf64-alpha.c (elf64_alpha_check_relocs): Only use the same
+ ALLOC|LOAD flags as the source section for debugging sections
+ when creating the reloc section.
+
+2001-07-05 Jim Wilson <wilson@redhat.com>
+
+ * linker.c (_bfd_generic_link_add_one_symbol, case BIG): Use
+ the section of the bigger symbol.
+
+ * syms.c (bfd_is_local_label): Return false if BSF_SECTION_SYM.
+
+2001-07-05 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * peicode.h (coff_swap_scnhdr_in): For sections containing
+ uninitialised data, only set their size to s_paddr if this does
+ not reset their size to zero. MS's latest compilers will set
+ s_paddr to zero.
+
+2001-07-04 H.J. Lu <hjl@gnu.org>
+
+ * bfd/elf32-mips.c (_bfd_mips_elf_final_write_processing):
+ Handle bfd_mach_mips4400, bfd_mach_mips4600 and
+ bfd_mach_mips5000.
+
+2001-07-03 Mark Elbrecht <snowball3@softhome.net>
+
+ * bfd.c (bfd_get_sign_extend_vma): Support DJGPP COFF targets.
+
+ * cofflink.c (_bfd_coff_link_input_bfd): Skip section symbols from
+ sections being discarded.
+
+2001-06-30 Alan Modra <amodra@bigpond.net.au>
+
+ * elfcore.h (elf_core_file_p): Call bfd_section_from_phdr directly
+ instead of _bfd_elfcore_section_from_phdr.
+ * elf-bfd.h (_bfd_elfcore_section_from_phdr): Remove.
+ * elf.c (_bfd_elfcore_section_from_phdr): Remove.
+ (_bfd_elfcore_make_pseudosection): Expedite tail-call.
+ (elfcore_grok_prstatus): Likewise.
+ (elfcore_grok_lwpstatus): Likewise.
+ (bfd_get_elf_phdr_upper_bound): Likewise.
+ (elfcore_make_note_pseudosection): Formatting.
+ (_bfd_elfcore_strndup): Formatting.
+ * elf32-mips.c (mips_elf_sym_is_global): Formatting.
+ (_bfd_elf32_mips_grok_prstatus): Expedite tail-call.
+
+2001-06-29 Daniel Jacobowitz <drow@mvista.com>
+
+ * elf-bfd.h: Add prototypes for _bfd_elfcore_make_pseudosection
+ and _bfd_elfcore_strndup.
+ (struct elf_backend_data): Add elf_backend_grok_prstatus
+ and elf_backend_grok_psinfo.
+ * elf.c (_bfd_elfcore_make_pseudosection): New function.
+ (elfcore_grok_prstatus): Use it.
+ (elfcore_make_note_pseudosection): Likewise.
+ (elfcore_strndup): Rename to...
+ (_bfd_elfcore_strndup): Here, and make global.
+ (elfcore_grok_psinfo): Use _bfd_elfcore_strndup.
+ (elfcore_grok_note): Call elf_backend_grok_prstatus
+ and elf_backend_grok_psinfo if available.
+ * elf32-mips.c (_bfd_elf32_mips_grok_prstatus): New function.
+ (_bfd_elf32_mips_grok_psinfo): New function.
+ (elf_backend_grok_prstatus): Define.
+ (elf_backend_grok_psinfo): Define.
+ * elfxx-target.h (elf_backend_grok_prstatus): Default to NULL.
+ (elf_backend_grok_psinfo): Likewise.
+ (elfNN_bed): Include elf_backend_grok_prstatus and
+ elf_backend_grok_psinfo.
+
+2001-06-29 H.J. Lu <hjl@gnu.org>
+
+ * elf32-hppa.c (elf32_hppa_finish_dynamic_sections): Check if
+ hplink->sgot is NULL before filling GOT. Check if hplink->splt
+ is NULL before filling PLT.
+
+2001-06-29 Alan Modra <amodra@bigpond.net.au>
+
+ * elflink.h (elf_link_output_extsym): Revert 1999-04-10.
+
+2001-06-27 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-hppa.c (elf32_hppa_check_relocs): Don't make syms dynamic
+ here..
+ (elf32_hppa_adjust_dynamic_symbol): ..nor here..
+ (allocate_plt_and_got_and_discard_relocs): .. instead do so here
+ after gc has run.
+
+ * elf32-hppa.c (RELATIVE_DYNAMIC_RELOCS): Delete.
+ (IS_ABSOLUTE_RELOC): Define.
+ (elf32_hppa_link_hash_entry): Always include reloc_entries field.
+ (hppa_link_hash_newfunc): Always init it.
+ (elf32_hppa_check_relocs): Mark symbols as ELF_LINK_NON_GOT_REF to
+ create COPY relocs only when the reloc is in a read-only section.
+ Instead, allocate space for a dynamic reloc to reference the
+ library symbol directly. Keep track of space we allocate using
+ relocs_entries.
+ (hppa_discard_copies): Delete, and move code to..
+ (allocate_plt_and_got): ..here. Rename to
+ allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
+ relocs for non-shared link.
+ (elf32_hppa_size_dynamic_sections): Update calls to above.
+ (elf32_hppa_relocate_section): Write out the dynamic relocs used
+ in lieu of COPY relocs.
+
+ * elf32-i386.c (elf_i386_check_relocs): Don't make syms dynamic
+ here..
+ (elf_i386_adjust_dynamic_symbol): ..nor here..
+ (allocate_plt_and_got_and_discard_relocs): .. instead do so here
+ after gc has run.
+ (elf_i386_size_dynamic_sections): Fix a comment.
+ (elf_i386_relocate_section <R_386_32, R_386_PC32>): Rearrange code
+ involved in writing reloc out.
+
+2001-06-25 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-i386.c (elf_i386_check_relocs <R_386_32, R_386_PC32>):
+ Ensure syms are dynamic if we might be emitting a reloc.
+ (allocate_plt_and_got_and_discard_relocs): Don't discard relocs
+ for undefweak or undefined syms..
+ (elf_i386_relocate_section <R_386_32, R_386_PC32>): .. and emit.
+
+ * elf32-i386.c (allocate_plt_and_got_and_discard_relocs): Discard
+ relocs without ELF_LINK_HASH_DEF_DYNAMIC set.
+ (elf_i386_relocate_section <R_386_32, R_386_PC32>): Remove
+ redundant bfd_link_hash_defined, bfd_link_hash_defweak test.
+
+2001-06-24 H.J. Lu <hjl@gnu.org>
+
+ * cpu-i960.c (scan_960_mach): Don't modify const char *. Use
+ strncasecmp/strcasecmp instead of strncmp/strcmp.
+
+2001-06-23 H.J. Lu <hjl@gnu.org>
+
+ * elf32-i386.c (elf_i386_relocate_section <R_386_32, R_386_PC32>):
+ Check ELF_LINK_HASH_DEF_DYNAMIC to see if a symbol is not defined
+ in the regular object file and treat the weak definition as
+ the normal one.
+
+2001-06-23 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-i386.c (elf_i386_relocate_section <R_386_GOT32>): Tighten
+ unresolved_reloc test to exclude cases where we use "relocation"
+ before setting it to point into the .got. Reinstate fudge for
+ unresolved relocs in debugging sections.
+
+ * elf32-i386.c (elf_i386_relocate_section): Replace ugly
+ complicated tests for unresolvable relocs with a simple direct
+ scheme using "unresolved_reloc" var.
+
+ * elf32-i386.c (struct elf_i386_pcrel_relocs_copied): Rename to
+ elf_i386_dyn_relocs. Update comment.
+ (struct elf_i386_link_hash_entry): Rename pcrel_relocs_copied to
+ dyn_relocs.
+ (elf_i386_adjust_dynamic_symbol): Remove a BFD_ASSERT, change
+ others to aborts.
+ (allocate_plt_and_got_and_discard_relocs): Replace BFD_ASSERT with
+ abort.
+ (elf_i386_size_dynamic_sections): Likewise.
+ (elf_i386_finish_dynamic_symbol): Likewise.
+ (elf_i386_finish_dynamic_sections): Likewise.
+ (elf_i386_relocate_section): Likewise. Tidy R_386_GOT32 and error
+ handling code.
+
+ Avoid creating COPY relocs if possible.
+ * elf32-i386.c (elf_i386_check_relocs): Tweak condition under
+ which .got created. Mark symbols used by R_386_32 and R_386_PC32
+ relocs as ELF_LINK_NON_GOT_REF to create COPY relocs only when the
+ reloc is in a read-only section. Instead, allocate space for a
+ dynamic reloc to reference the library symbol directly. Keep
+ track of space we allocate using pcrel_relocs_copied.
+ (discard_copies): Delete, and move code to ..
+ (allocate_plt_and_got): ..here. Rename to
+ allocate_plt_and_got_and_discard_relocs. Remove unneeded dynamic
+ relocs for non-shared link.
+ (elf_i386_size_dynamic_sections): Update calls to above functions.
+ (elf_i386_relocate_section): Write out the dynamic relocs. Add
+ more ugly logic to avoid "unresolvable relocation" error. Use
+ htab shortcut in place of elf_hash_table macro.
+ (elf_i386_finish_dynamic_sections): Allow that dynamic .got may
+ not always be created now.
+
+2001-06-20 Bo Thorsen <bo@suse.co.uk>
+
+ * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix linking of
+ shared libraries.
+
+2001-06-18 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * configure.host (mips64-*-linux): Reformat.
+
+2001-06-21 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Always
+ allocate local .got space. Use shortcuts from hash table for .got
+ and .plt rather than comparing section names.
+ (elf32_hppa_check_relocs): Use local_plt_refcounts var rather than
+ adjusting index into local_got_refcounts to document what we are
+ really doing.
+ (elf32_hppa_relocate_section): Similarly for local_plt_offsets.
+ Tidy .got and .plt error checking.
+
+2001-06-20 Catherine Moore <clm@redhat.com>
+
+ * elf-bfd.h (struct elf_backend_data):
+ elf_backend_emit_relocs: New field: Function for emitting
+ relocs.
+ elf_backend_count_relocs: New field: Function for determining
+ the number of relocs to be emitted.
+ * elfxx-target.h: Provide default (NULL) values for
+ elf_backend_emit_relocs and elf_backend_count_relocs.
+ * elflink.h (elf_link_size_reloc_section): Make the hash table
+ big enough to hold the relocs counted by either reloc_count or
+ o->reloc_count.
+ (elf_bfd_final_link) emit_relocs: New boolean, set if relocs
+ should be emitted, either because of a command line option
+ stored in the info structure or because the target provides a
+ special reloc emitting function.
+ If the target provides a reloc counting function use it,
+ unless performing a relocatable link or emitting all relocs.
+ Also set the SEC_RELOC flag on any output section which will
+ contain relocs.
+ (elf_link_input_bfd): emit_relocs: New boolean, set if relocs
+ should be emitted, either because of a command line option
+ stored in the info structure or because the target provides a
+ special reloc emitting function.
+ If the target provides a reloc emitting function, use it,
+ unless performing a relocatable link or emitting all relocs.
+
+2001-06-20 H.J. Lu <hjl@gnu.org>
+
+ * elf32-i386.c (elf_i386_size_dynamic_sections): Always
+ allocate local .got space.
+
+2001-06-19 Andreas Jaeger <aj@suse.de>
+
+ * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix creation of
+ dynamic symbols.
+
+2001-06-18 Hans-Peter Nilsson <hp@axis.com>
+
+ * elflink.h (struct elf_assign_sym_version_info): Remove member
+ export_dynamic. All users changed to use info member.
+ NAME(bfd_elf,size_dynamic_sections)): Remove parameter
+ export_dynamic, instead use member in parameter info.
+ * bfd-in.h (bfd_elf32_size_dynamic_sections,
+ bfd_elf64_size_dynamic_sections): Update prototype.
+ * bfd-in2.h: Regenerate.
+
+2001-06-18 H.J. Lu <hjl@gnu.org>
+
+ * elflink.h (elf_info_failed): Add a new field, verdefs.
+ (NAME(bfd_elf,size_dynamic_sections): Pass verdefs to
+ elf_export_symbol.
+ (elf_export_symbol): Check eif->verdefs to decide if a symbol
+ should be exported.
+
+2001-06-17 H.J. Lu <hjl@gnu.org>
+
+ * elf32-mips.c (mips_elf_link_hash_entry): Add a new field,
+ readonly_reloc, to record if a relocation in the .rel.dyn
+ section is against a read-only section.
+ (mips_elf_link_hash_newfunc): Initialize the readonly_reloc
+ field to false.
+ (_bfd_mips_elf_check_relocs): Record if there is a relocation
+ in the .rel.dyn section against a read-only section by setting
+ DF_TEXTREL or readonly_reloc.
+ (_bfd_mips_elf_copy_indirect_symbol): Copy readonly_reloc if
+ it is true.
+ (_bfd_mips_elf_adjust_dynamic_symbol): Record DF_TEXTREL if
+ there is a relocation in the .rel.dyn section against a
+ read-only section.
+ (_bfd_mips_elf_size_dynamic_sections): Set DT_TEXTREL if
+ DF_TEXTREL is set.
+
+2001-06-12 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * coffcode.h (styp_flags_to_sec_flags): Change to a boolean
+ function. Move flagword result into parameter list. Remove
+ comment about setting bfd_error_handler to intercept failure
+ results.
+ * coffgen.c (make_a_section_from_file): Examine result of
+ calling bfd_coff_styp_to_sec_flags and pass a failure back to
+ caller.
+ * ecoff.h (styp_flags_to_sec_flags): Change to a boolean
+ function. Move flagword result into parameter list.
+ * libcoff.h: Regenerate.
+ * libecoff.h: Regenerate.
+
+2001-06-13 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * aoutx.h (adjust_z_magic): Only pad the tesxt section if the data
+ section is going to follow it.
+
+2001-06-12 Catherine Moore <clm@redhat.com>
+
+ * elflink.h (elf_gc_propagate_vtable_entries): Replace FILE_ALIGN
+ with the file_align entry from elf_backend_data.
+ (elf_gc_smash_unused_vtentry_relocs): Likewise.
+ (elf_gc_record_vtentry): Likewise.
+
+2001-06-10 Alan Modra <amodra@bigpond.net.au>
+
+ * elflink.h: Whitespace changes.
+ (elf_link_read_relocs_from_section): Use "unsigned int" iterator
+ rather than "unsigned char".
+ (elf_link_output_relocs): Likewise.
+ (elf_link_input_bfd): Likewise.
+ (elf_reloc_link_order): LIkewise.
+ * elf.c: s/CONST/const/. Whitespace changes.
+ * elf32-mips.c: Formatting fix.
+
+ * Makefile.am (SOURCE_HFILES): Include xcoff-target.h, remove xcoff.h.
+ * Makefile.in: Regenerate.
+ * po/Make-in: Remove trailing tab.
+
+2001-06-09 Philip Blundell <philb@gnu.org>
+
+ * elf32-arm.h (elf32_arm_plt0_entry): Correct error in last
+ change.
+ (elf32_arm_plt_entry): Likewise.
+
+2001-06-08 H.J. Lu <hjl@gnu.org>
+
+ * elf.c (swap_out_syms): Keep names for global section symbols.
+
+2001-06-07 H.J. Lu <hjl@gnu.org>
+
+ * config.bfd: Put back ecoff for Linux/mips. Firmwares on some
+ MIPS-based machines need it.
+
+2001-06-07 H.J. Lu <hjl@gnu.org>
+
+ * elf32-mips.c (_bfd_mips_elf_object_p): Set the bad symtab
+ for SGI only.
+
+ * config.bfd: Remove ecoff from Linux/mips.
+
+2001-06-07 Andreas Jaeger <aj@suse.de>
+
+ * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Add an
+ assertion.
+ (elf64_x86_64_check_relocs): Fix VTENTRY relocation; set an
+ alignment of 8 for .rela sections; handle further relocations.
+
+2001-06-06 Christian Groessler <cpg@aladdin.de>
+
+ * coff-z8k.c: Fix formatting.
+ Fix howtos: howto->size was always 1.
+
+2001-06-05 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * configure.host (mips64*-*-linux*): Define.
+
+2001-06-05 Alan Modra <amodra@bigpond.net.au>
+
+ * elf32-i386.c (elf_i386_discard_copies): Rename to
+ discard_copies, and use elf_link_hash_entry arg rather than
+ elf_i386_link_hash_entry.
+ (elf_i386_link_hash_traverse): Delete.
+ (elf_i386_size_dynamic_sections): Adjust call to discard_copies.
+ Tidy sizing of dynamic sections.
+ (elf_i386_check_relocs <R_386_32, R_386_PC32>): Reference count
+ possible .plt entries.
+ (elf_i386_gc_sweep_hook): Likewise.
+ (elf_i386_adjust_dynamic_symbol): Discard .plt entries for
+ everything with plt.refcount <= 0.
+
+ * elf32-i386.c (elf_i386_check_relocs): Don't allocate .got and
+ .relgot space here.
+ (elf_i386_gc_sweep_hook): ..and no need to deallocate here..
+ (elf_i386_adjust_dynamic_symbol): ..and don't allocate .plt and
+ .rel.plt here..
+ (allocate_plt_and_got): ..instead do it all here. New function.
+ (elf_i386_size_dynamic_sections): Allocate local .got space and
+ call allocate_plt_and_got. No need to zap .relgot if not dynamic.
+ (bfd_elf32_bfd_final_link): Delete. (ie. use regular final link
+ rather than gc variety).
+ (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
+ (elf_i386_relocate_section): Use it here and correct handling of
+ R_386_GOT32. Provide section and offset for "unresolvable
+ relocation" error message.
+ (elf_i386_finish_dynamic_symbol): Correct handling of R_386_GOT32.
+
+ * elf32-i386.c (struct elf_i386_link_hash_table): Add sgot,
+ sgotplt, srelgot, splt, srelplt, sdynbss, srelbss fields.
+ (elf_i386_link_hash_table_create): Init them.
+ (create_got_section): New function.
+ (elf_i386_create_dynamic_sections): New function.
+ (elf_backend_create_dynamic_sections): Set to above.
+ (elf_i386_check_relocs): Use shortcuts from hash table rather than
+ calling bfd_get_section_by_name.
+ (elf_i386_gc_sweep_hook): Likewise.
+ (elf_i386_adjust_dynamic_symbol): Likewise.
+ (elf_i386_size_dynamic_sections): Likewise.
+ (elf_i386_relocate_section): Likewise.
+ (elf_i386_finish_dynamic_sections): Likewise.
+
+ * elf32-hppa.c (allocate_plt_and_got): Skip indirect and warning syms.
+
+2001-06-02 H.J. Lu <hjl@gnu.org>
+
+ * elf32-hppa.c (elf32_hppa_object_p): Check ELFOSABI_LINUX
+ and ELFOSABI_HPUX.
+ * elf64-hppa.c (elf64_hppa_object_p): Likewise.
+
+2001-06-02 H.J. Lu <hjl@gnu.org>
+
+ * aout-cris.c (MACHTYPE_OK): New. Defined.
+
+2001-06-02 Hans-Peter Nilsson <hp@axis.com>
+
+ * section.c (_bfd_strip_section_from_output): Handle NULL
+ output_section.
+
+2001-06-02 H.J. Lu <hjl@gnu.org>
+
+ * config.bfd (powerpc-*-aix*, powerpc-*-beos*, rs6000-*-*): Add
+ rs6000coff64_vec only if BFD64 is defined.
+ (powerpc64-*-aix*): Enable only if BFD64 is defined.
+
+2001-06-02 H.J. Lu <hjl@gnu.org>
+
+ * coff-ia64.c (ia64coff_object_p): Rewrite with
+ external_PEI_DOS_hdr and external_PEI_IMAGE_hdr.
+
+2001-06-01 Andreas Jaeger <aj@suse.de>
+
+ * elf64-x86-64.c (elf64_x86_64_relocate_section): Add PC8
+ relocation, small reformatting.
+
+2001-05-29 Andreas Jaeger <aj@suse.de>
+
+ * elf64-x86-64.c (elf64_x86_64_check_relocs): Handle R_X86_64_64.
+ (elf64_x86_64_relocate_section): Likewise.
+
+2001-05-30 Alan Modra <amodra@one.net.au>
+
+ * elf32-hppa.c (elf32_hppa_check_relocs): Don't NEED_PLT for
+ millicode. Don't allocate .got and .rela.got space here..
+ (elf32_hppa_gc_sweep_hook): ..and no need to deallocate here..
+ (elf32_hppa_adjust_dynamic_symbol): ..and don't allocate .plt and
+ .rela.plt here..
+ (hppa_handle_PIC_calls): ..nor here..
+ (allocate_plt_and_got): ..instead do it all here. New function.
+ (elf32_hppa_size_dynamic_sections): Allocate local .got space and
+ call allocate_plt_and_got. No need to zap .got if not dynamic.
+ (elf32_hppa_final_link): Call regular bfd_final_link instead of
+ gc_common_final_link.
+ (WILL_CALL_FINISH_DYNAMIC_SYMBOL): Define.
+ (elf32_hppa_relocate_section): Use it here.
+ (elf32_hppa_finish_dynamic_symbol): Remove superfluous test of
+ dynamic_sections_created.
+ (hppa_type_of_stub): Don't LONG_BRANCH_VIA_PLT if millicode sym.
+
+2001-05-28 Andreas Jaeger <aj@suse.de>
+
+ * elf64-x86-64.c (elf64_86_64_size_info): Remove, we can use the
+ generic version since we want a hashsize of 4.
+ (elf_backend_size_info): Likewise.
+
+2001-05-28 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * elflink.h (elf_link_size_reloc_section): Use bfd_zmalloc instead of
+ a zeroing loop.
+ (elf_link_output_relocs): Handle MIPS ELF64 relocations correctly.
+ (elf_link_input_bfd): Likewise.
+ (elf_reloc_link_order): Likewise.
+ (elf_finish_pointer_linker_section): Typo. Handle MIPS ELF64
+ relocations correctly.
+
+2001-05-28 Nicolas Pitre <nico@cam.org>
+
+ * elf32-arm.h: fix PLT generation for big endian ARM
+
+2001-05-28 Alan Modra <amodra@one.net.au>
+
+ * elf32-hppa.c (elf32_hppa_relocate_section): Set up .plt entries
+ for symbols forced local that need plabels.
+ (elf32_hppa_adjust_dynamic_symbol): Don't allocate space in
+ .plt.rela for local syms if non-shared.
+ (hppa_build_one_stub): Mask lsb of plt.offset.
+ (elf32_hppa_finish_dynamic_symbol): Abort if lsb of plt.offset set.
+ (clobber_millicode_symbols): Correct comment.
+ (elf32_hppa_relocate_section): Likewise.
+ (elf32_hppa_finish_dynamic_symbol): Likewise.
+
+2001-05-28 Jeff Sturm <jsturm@one-point.com>
+
+ * reloc.c: Add BFD_RELOC_SPARC_UA16 and BFD_RELOC_SPARC_UA64.
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+ * elf32-sparc.c: Enable BFD_RELOC_SPARC_UA16, BFD_RELOC_SPARC_UA32
+ and BFD_RELOC_SPARC_UA64 mapping
+ * elf64-sparc.c: Likewise.
+
+2001-05-25 H.J. Lu <hjl@gnu.org>
+
+ * Makefile.am (BFD32_BACKENDS): Remove coff-pmac.lo.
+ (BFD32_BACKENDS_CFILES): Remove coff-pmac.c.
+ (coff-rs6000.lo): Remove the old dependency.
+ * Makefile.in: Rebuild.
+
+ * configure.in (pmac_xcoff_vec): Replace coff-pmac.lo with
+ coff-rs6000.lo.
+
+2001-05-25 H.J. Lu <hjl@gnu.org>
+
+ * coff-rs6000.c (rs6000coff_vec): Use rs6000coff_core_p,
+ rs6000coff_core_file_matches_executable_p,
+ rs6000coff_core_file_failing_command and
+ rs6000coff_core_file_failing_signal only if AIX_CORE is
+ defined.
+ (pmac_xcoff_vec): Likewise.
+ * coff64-rs6000.c (rs6000coff64_vec): Likewise.
+
+2001-05-25 Timothy Wall <twall@redhat.com>
+
+ * elfxx-ia64.c (allocate_dynrel_entries): Don't allocate an entry
+ for __GLOB_DATA_PTR on AIX5. Clean up some relocation bugs.
+
+2001-05-25 H.J. Lu <hjl@gnu.org>
+
+ * bfd-in2.h: Regenerated.
+ * libcoff.h: Likewise.
+
+2001-05-25 Alan Modra <amodra@one.net.au>
+
+ * elf32-hppa.c (elf32_hppa_relocate_section): Don't allow
+ undefined millicode syms in shared libs.
+ (hppa_build_one_stub): Turn BFD_ASSERTs into aborts.
+ (elf32_hppa_check_relocs): Likewise.
+ (elf32_hppa_adjust_dynamic_symbol): Likewise.
+ (elf32_hppa_size_dynamic_sections): Likewise.
+ (elf32_hppa_relocate_section): Likewise.
+ (elf32_hppa_finish_dynamic_symbol): Likewise.
+ (elf32_hppa_finish_dynamic_sections): Likewise.
+
+2001-05-24 Tom Rix <trix@redhat.com>
+
+ * Makefile.am coff-pmac bfd now defined in coff-rs6000.c
+ xcoff-target.h not used to define rs6000 or ppc bfd.
+ * Makefile.in same
+
+ * bfd-in.h : (struct lineno_cache_entry) promote element "offset"
+ to 64 bit.
+
+ * coff-rs6000.c : Many changes for 64 bit support. Move common
+ 32/64 code to xcofflink.c. Explictly define the rs6000coff_vec
+ and pmac_xcoff_vec
+
+ * coff64-rs6000.c : Many changes for 64 bit support. 64 bit
+ linker now supported. Explictly define the rs6000coff64_vec.
+
+ * coffcode.h : (coff_set_arch_mach_hook) xcoff 64 bit support
+ (coff_print_aux) same
+ (coff_write_object_contents) same
+ (coff_slurp_line_table) same
+
+ * coffgen.c : (coff_fix_symbol_name) formatting
+ (coff_mangle_symbols) xcoff 64 bit support
+ (coff_write_symbol) same
+ (coff_write_alien_symbol) same
+ (coff_write_native_symbol) same
+ (coff_write_symbols) same
+ (coff_get_symbol_info) same
+ (bfd_coff_get_syment) same
+ (coff_print_symbol) same
+
+ * config.bfd : add powerpc64-*-aix* target
+
+ * libcoff-in.h : formatting
+
+ * libcoff.h : move xcoff extern declarations to libxcoff.h
+
+ * libxcoff.h : New file
+
+ * xcofflink.c : Many changes for xcoff64 support. Move common
+ structures to include/coff/xcoff.h. Move specific structure to
+ backends coff-rs6000.c and coff64-rs6000.c. Use new backend
+ functions, defined in libxcoff.h, to isolate 32/64 dependencies.
+
+ (bfd_xcoff_size_dynamic_sections) : special __rtinit symbol for
+ aix4.2+ -binitfini.
+
+ (xcoff_build_ldsyms) : handle special __rtinit symbol.
+
+2001-05-23 Alexandre Oliva <aoliva@redhat.com>
+
+ * elf64-sparc.c (sparc64_elf_slurp_reloc_table): Fix typo
+ s/ENTIRES/ENTRIES/.
+
+2001-05-23 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * reloc.c (bfd_reloc_code_real): Add MIPS ELF64 relocations.
+ * libbfd.h: Regenerate.
+ * bfd-in2.h: Regenerate.
+
+ * aoutx.h (aout_@var{size}_machine_type): Add MIPS r12k support.
+ * archures.c (bfd_mach_mips12000): Define.
+ * cpu-mips.c (arch_info_struct): Add MIPS r12k support.
+ * elf32-mips.c (_bfd_mips_elf_final_write_processing): Add MIPS r12k
+ support.
+ (_bfd_mips_elf_size_dynamic_sections): Use official bfd typedef.
+ * bfd-in2.h: Regenerate.
+ * elfxx-target.h: Do not redefine bfd_elfNN_bfd_make_debug_symbol.
+
+2001-05-23 kaz Kojima <kkojima@rr.iij4u.or.jp>
+
+ * elf32-sh.c (elf_sh_plt0_entry_be, elf_sh_plt0_entry,
+ elf_sh_plt_entry_be, elf_sh_plt_entry, elf_sh_pic_plt_entry_be,
+ elf_sh_pic_plt_entry): New PLT code, that does not use r2, since
+ that is used by GCC.
+
+2001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * elf-bfd.h (NUM_SHDR_ENTRIES): New macro: compute the number
+ of entries in a structured section.
+ * elf.c: Use new macro.
+ * elf32-i386.c: Use new macro.
+ * elf32-mips.c: Use new macro.
+ * elf64-alpha.c: Use new macro.
+ * elf64-sparc.c: Use new macro.
+ * elfcode.h: Use new macro.
+ * elflink.h: Use new macro.
+
+2001-05-23 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * bfdint.texi: Replace -oformat with --oformat.
+
+2001-05-21 Andreas Jaeger <aj@suse.de>
+
+ * dwarf2.c (decode_line_info): Fix error message.
+ (read_abbrevs): Fix test for offset as suggested by Alan Modra and
+ adjust error message.
+
+2001-05-18 H.J. Lu <hjl@gnu.org>
+
+ * elflink.h (elf_link_add_object_symbols): Revert the last
+ change.
+
+2001-05-17 Alan Modra <amodra@one.net.au>
+
+ * elf32-hppa.c (clobber_millicode_symbols): Temporarily set
+ ELF_LINK_FORCED_LOCAL to suit 2001-04-30 change.
+ (hppa_build_one_stub): Add an assert to check plt.offset.
+
+2001-05-17 H.J. Lu <hjl@gnu.org>
+
+ * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set the
+ version definition to basename of the output filename.
+
+2001-05-17 H.J. Lu <hjl@gnu.org>
+
+ * elflink.h (elf_link_add_object_symbols): Set DT_NEEDED to
+ basename of the bfd filename.
+
+2001-05-16 Alan Modra <amodra@one.net.au>
+
+ * section.c (asection): Add linker_has_input field.
+ (STD_SECTION): Adjust initialization to suit.
+ * ecoff.c (bfd_debug_section): Likewise.
+ * bfd-in2.h: Regenerate.
+
+2001-05-15 Alexandre Oliva <aoliva@redhat.com>
+
+ * elf-m10300.c (mn10300_elf_relax_section): Don't relax
+ negative 32-bit operands to 16 operands when the operand is
+ going to be zero-extended by the modified opcode.
+
+2001-05-12 Peter Targett <peter.targett@arccores.com>
+
+ * cpu-arc.c (arch_info_struct): Add entry 'base' representing old
+ name for 'arc5' core versions.
+ (bfd_arc_arch): Make bfd_mach_arc_6 default.
+
+ * elf32-arc.c (arc_elf_object_p): Make E_ARC_MACH_ARC6 default
+ architecture.
+ (arc_elf_final_write_processing): Make bfd_mach_arc_6 default.
+
+2001-05-11 Jakub Jelinek <jakub@redhat.com>
+
+ * elfxx-ia64.c (is_unwind_section_name): Consider linkonce unwind
+ sections as well.
+ (elfNN_ia64_final_write_processing): Map .gnu.linkonce.ia64unw.FOO
+ to .gnu.linkonce.t.FOO text section.
+
+2001-05-11 Jakub Jelinek <jakub@redhat.com>
+
+ * merge.c (struct sec_merge_hash_entry): Add u.entsize and u.suffix
+ fields, change sec into secinfo.
+ (struct sec_merge_info): Add chain, remove last fields.
+ (struct sec_merge_sec_info): Add next, sec, psecinfo fields.
+ (sec_merge_hash_lookup): If lookup could not use a string only
+ because it has bad alignment, mark the old string for deletion.
+ (sec_merge_add): Add secinfo argument. Don't compute entry's
+ position, instead record the section.
+ (sec_merge_emit): Update for the sec into secinfo change in
+ struct sec_merge_hash_entry.
+ (_bfd_merge_section): Only record the section for merging, defer
+ putting strings into the hash table.
+ (cmplengthentry, last4_eq, last_eq, record_section, merge_strings,
+ _bfd_merge_sections): New functions.
+ (_bfd_merged_section_offset): Update for the sec_merge_hash_entry
+ changes.
+ * libbfd-in.h (_bfd_merge_sections): Add prototype.
+ (_bfd_nolink_bfd_merge_sections): Define.
+ * libbfd.h: Likewise.
+ (bfd_generic_merge_sections): Add prototype.
+ * targets.c (BFD_JUMP_TABLE_LINK): Add _bfd_merge_sections.
+ (struct bfd_target): Likewise.
+ * bfd.c (bfd_merge_sections): Define.
+ * bfd-in2.h: Rebuilt.
+ * elf.c (_bfd_elf_merge_sections): New function.
+ * elf-bfd.h (_bfd_elf_merge_sections): Add prototype.
+ * elfxx-target.h (bfd_elfNN_bfd_merge_sections): Define.
+ * reloc.c (bfd_generic_merge_sections): New function.
+ * vms.c (vms_bfd_merge_sections): New function.
+ * aout-adobe.c (aout_32_bfd_merge_sections): Define.
+ * aout-target.h (MY_bfd_merge_sections): Define.
+ * aout-tic30.c (MY_bfd_merge_sections): Define.
+ * binary.c (binary_bfd_merge_sections): Define.
+ * bout.c (b_out_bfd_merge_sections): Define.
+ * coff-alpha.c (_bfd_ecoff_bfd_merge_sections): Define.
+ * coffcode.c (coff_bfd_merge_sections): Define.
+ * coff-mips.c (_bfd_ecoff_bfd_merge_sections): Define.
+ * i386msdos.c (msdos_bfd_merge_sections): Define.
+ * i386os9k.c (os9k_bfd_merge_sections): Define.
+ * ieee.c (ieee_bfd_merge_sections): Define.
+ * ihex.c (ihex_bfd_merge_sections): Define.
+ * nlm-target.h (nlm_bfd_merge_sections): Define.
+ * oasys.c (oasys_bfd_merge_sections): Define.
+ * ppcboot.c (ppcboot_bfd_merge_sections): Define.
+ * som.c (som_bfd_merge_sections): Define.
+ * srec.c (srec_bfd_merge_sections): Define.
+ * tekhex.c (tekhex_bfd_merge_sections): Define.
+ * versados.c (versados_bfd_merge_sections): Define.
+ * xcoff-target.h (_bfd_xcoff_bfd_merge_sections): Define.
+
+2001-05-11 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * dwarf1.c (_bfd_dwarf1_find_nearest_line): Change type of 'addr'
+ to be unsigned long, in order to match its use.
+
+2001-05-10 H.J. Lu <hjl@gnu.org>
+
+ * linker.c (_bfd_generic_link_add_one_symbol): Check loop on
+ indirect symbols.
+
+2001-05-09 H.J. Lu <hjl@gnu.org>
+
+ * elflink.h (elf_link_add_object_symbols): Fix a typo. Allocate
+ versymhdr->sh_size bytes for extversym instead of hdr->sh_size.
+ Remove the unused veriable `dynver'.
+
+2001-05-08 Ian Lance Taylor <ian@zembu.com>
+
+ * coff-i386.c (coff_i386_reloc): Don't dump core if output_bfd is
+ NULL or is not COFF.
+ (coff_i386_rtype_to_howto): Don't dump core if output section
+ owner is not COFF.
+
+2001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * ecoff.c (bfd_debug_section): Fix initialization.
+ * elf.c (_bfd_elf_slurp_version_tables): Change maxidx to unsigned, it
+ is always a positive integer. Cast away sign mismatch.
+ * elf32-mips.c: Fix misleading comment and typo.
+ (_bfd_mips_elf_section_from_bfd_section): Remove unused attribute, use
+ correct data type.
+ * elflink.c: Fix typo.
+ (_bfd_elf_create_dynamic_sections): Remove superfluous initialization.
+ * ecoffswap.h (ecoff_swap_fdr_in): Cast away sign mismatch.
+
+2001-05-04 Richard Henderson <rth@redhat.com>
+
+ * elf64-alpha.c (SREL16, SREL32, SREL64): Set pcrel_offset true.
+
+2001-05-04 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * elf32-arm.h (elf32_arm_final_link_relocate): Set
+ EF_ARM_HASENTRY if the start address is set.
+
+2001-05-03 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * targets.c (_bfd_target_vector_entries): Compute value based on
+ the size of the _bfd_target_vector and not bfd_target_vector.
+
+2001-05-03 H.J. Lu <hjl@gnu.org>
+
+ * elfcode.h: Include "libiberty.h".
+
+ * elflink.h (elf_link_add_object_symbols): Set
+ elf_dt_name (abfd) to basename of the bfd filename.
+ (NAME(bfd_elf,size_dynamic_sections)): Set vn_file to basename
+ of the bfd filename.
+
+2001-05-03 Andreas Jaeger <aj@suse.de>
+
+ * elf64-gen.c (elf_generic_info_to_howto): Add unused attribute.
+ (elf_generic_info_to_howto_rel): Likewise.
+ * coff-alpha.c (reloc_nil): Likewise.
+ (alpha_ecoff_bad_format_hook): Likewise.
+ (alpha_adjust_reloc_out): Likewise.
+ (alpha_bfd_reloc_type_lookup): Likewise.
+ (alpha_convert_external_reloc): Likewise.
+ * elf64-alpha.c (elf64_alpha_reloc_nil): Likewise.
+ (elf64_alpha_reloc_bad): Likewise.
+ (elf64_alpha_reloc_gpdisp): Likewise.
+ (elf64_alpha_bfd_reloc_type_lookup): Likewise.
+ (elf64_alpha_info_to_howto): Likewise.
+ (elf64_alpha_add_symbol_hook): Likewise.
+ (elf64_alpha_create_got_section): Likewise.
+ (elf64_alpha_is_local_label_name): Likewise.
+ (elf64_alpha_merge_ind_symbols): Likewise.
+ * elf64-mips.c (mips_elf64_reloc_type_lookup): Likewise.
+ (mips_elf64_get_reloc_upper_bound): Likewise.
+ * nlm32-alpha.c (nlm_alpha_mangle_relocs): Likewise.
+ (nlm_alpha_get_public_offset): Likewise.
+
+2001-05-02 Johan Rydberg <jrydberg@opencores.org>
+
+ * elf32-openrisc.c (openrisc_elf_howto_table): Do not complain
+ about overflow in R_OPENRISC_LO_16_IN_INSN and
+ R_OPENRISC_HI_16_IN_INSN.Index: bfd/elf32-openrisc.c
+
+2001-04-30 H.J. Lu <hjl@gnu.org>
+
+ * elf.c (_bfd_elf_link_hash_hide_symbol): Set dynindx to -1
+ only for ELF_LINK_FORCED_LOCAL.
+ * elf32-hppa.c (elf32_hppa_hide_symbol): Likewise.
+ * elf32-mips.c (_bfd_mips_elf_hide_symbol): Likewise.
+ * elfxx-ia64.c (elfNN_ia64_hash_hide_symbol): Likewise.
+
+ * elflink.h (elf_fix_symbol_flags): Set ELF_LINK_FORCED_LOCAL
+ if the symbol has hidden or internal visibility.
+
+2001-04-30 Alan Modra <amodra@one.net.au>
+
+ * elf32-hppa.c (final_link_relocate): Branch to .+8 for
+ calls to undefined weak symbols.
+
+2001-04-30 Andreas Jaeger <aj@suse.de>, Andreas Schwab <schwab@suse.de>
+
+ * elf64-x86-64.c (elf64_x86_64_relocate_section): Correct test for
+ R_X86_64_GOTPCREL, don't use assignments instead of comparisons.
+
+2001-04-27 Andreas Jaeger <aj@suse.de>
+
+ * elf64-x86-64.c (elf64_x86_64_finish_dynamic_sections): Only swap
+ out handled entries.
+ (elf64_x86_64_finish_dynamic_symbol): Set up GOT entries.
+ (elf64_x86_64_relocate_section): Fix GOTPCREL calculation.
+ (elf64_x86_64_relocate_section): Merge entries for GOTPCREL and
+ GOT32.
+
+2001-04-27 Sean McNeil <sean@mcneil.com>
+
+ * config.bfd: Add arm-vxworks target.
+ * coff-arm (coff_arm_relocate_section): Add in symbol value to
+ addend (fro VXworks targets).
+
+2001-04-26 H.J. Lu <hjl@gnu.org>
+
+ * elf32-i386.c (elf_i386_check_relocs): Verify if r_symndx is
+ valid.
+
+2001-04-25 Frank Ch. Eigler <fche@redhat.com>
+
+ * bfd-in.h (bfd_cache_close): Declare newly exported function.
+ * bfd-in2.h: Regenerated.
+
+2001-04-24 Jakub Jelinek <jakub@redhat.com>
+
+ * merge.c (struct sec_merge_hash_entry): Add alignment field.
+ (struct sec_merge_hash): Remove alignment_power.
+ (sec_merge_hash_newfunc): Clear alignment.
+ (sec_merge_hash_lookup): Pass alignment as argument.
+ Use hashp->root.next, not hashp->next to walk the hash chain.
+ If a string already in the hashtable does not have required
+ alignment, create a new hashtable entry.
+ (sec_merge_init): Remove alignment_power argument.
+ (sec_merge_add): Add alignment argument.
+ (sec_merge_emit): Alignment is now a per-entity thing, not per
+ section.
+ (_bfd_merge_section): Sanity check even non-SEC_STRINGS sections
+ for proper alignment.
+ Pass alignment information to sec_merge_add.
+
+2001-04-24 Christian Groessler <cpg@aladdin.de>
+
+ * coff-z8k.c (extra_case): added handler for R_DISP7, R_CALLR
+ and R_REL16 reloc types; accept odd values for R_REL16 type
+
+2001-04-24 Johan Rydberg <jrydberg@opencores.org>
+
+ * cpu-openrisc.c: New file.
+ * elf32-openrisc.c: Likewise.
+
+ * Makefile.am (ALL_MACHINES): Add cpu-openrisc.lo.
+ (ALL_MACHINES_CFILES): Add cpu-openrisc.c.
+ (BFD32_BACKENDS): Add elf32-openrisc.lo.
+ (BFD32_BACKENDS_CFILES): Add elf32-openrisc.c.
+ (cpu-openrisc.lo, elf32-openrisc.lo): New rules.
+ * Makefile.in: Regenerated.
+ * config.bfd: (openrisc-*-elf): New target.
+ * configure.in (bfd_elf32_openrisc_vec): New vector.
+ * configure: Regenerated.
+ * libbfd.h: Regenerated.
+ * bfd-in2.h: Regenerated.
+ * reloc.c: Add OpenRISC relocations.
+ * targets.c (bfd_elf32_openrisc_vec): Declare.
+ (bfd_target_vect): Add bfd_elf32_openrisc_vec.
+ * archures.c (enum bfd_architecture): Add bfd_arch_openrisc.
+ (bfd_openrisc_arch): Declare.
+ (bfd_archures_list): Add bfd_openrisc_arch.
+ * elf.c (prep_headers): Add bfd_arch_openrisc.
+
+2001-04-23 Bo Thorsen <bo@suse.de>
+
+ * elf64-x86-64.c: Add c++ vtable hack.
+ Small whitespace and comment changes.
+
+2001-04-19 Andreas Jaeger <aj@suse.de>
+
+ * elf64-x86-64.c (elf64_x86_64_plt0_entry): Fix instructions.
+ (elf64_x86_64_plt_entry): Likewise.
+ (elf64_x86_64_finish_dynamic_sections): Fix PLT0 generation.
+ (elf64_x86_64_finish_dynamic_symbol): Fix PLT generation.
+
+2001-04-17 Hans-Peter Nilsson <hp@axis.com>
+
+ * elf32-cris.c: Tweak comments related to dynamic linking.
+ (cris_elf_relocate_section): When not creating shared object, fill
+ in the .got table for any symbol not in the dynamic symbol table.
+ (elf_cris_finish_dynamic_symbol): When not creating shared object,
+ only emit a .got.rela reloc if the symbol is in the dynamic symbol
+ table.
+ (cris_elf_check_relocs): Use variable r_type in all places rather
+ than the original expression. Add default case in switch for
+ reloc types.
+ (elf_cris_size_dynamic_sections): Iterate over
+ elf_cris_discard_excess_program_dynamics when not creating shared
+ library.
+ (elf_cris_discard_excess_dso_dynamics): Renamed from
+ elf_cris_discard_copies. Correct typo, s/Rel/Rela/.
+ (elf_cris_discard_excess_program_dynamics): New.
+
+2001-04-14 Mark Elbrecht <snowball3@bigfoot.com>
+
+ * coffcode.h (coff_write_object_contents): Use
+ bfd_coff_swap_filehdr_out instead of coff_swap_filehdr_out.
+
+2001-04-14 H.J. Lu <hjl@gnu.org>
+
+ * bfd-in2.h: Regenerate.
+
+2001-04-14 Jakub Jelinek <jakub@redhat.com>
+
+ * section.c (STD_SECTION): Add entsize.
+
+2001-04-13 H.J. Lu <hjl@gnu.org>
+
+ * section.c (SEC_MERGE): Define new flag for merging.
+ (SEC_STRINGS): Likewise.
+ (entsize): New field.
+
+2001-04-13 Roger Sayle <roger@metaphorics.com>
+
+ * coff-i386.c (TARGET_SYM): SEC_READONLY is an applicable section
+ flag on pe-i386 targets.
+
+2001-04-13 Jakub Jelinek <jakub@redhat.com>
+
+ * libbfd-in.h (_bfd_merge_section): New.
+ (_bfd_write_merged_section): New.
+ (_bfd_merged_section_offset): New.
+ * libbfd.h: Rebuilt.
+ * linker.c (_bfd_generic_link_output_symbols): Handle
+ discard_sec_merge.
+ * aoutx.h (aout_link_write_symbols): Likewise.
+ * pdp11.c (aout_link_write_symbols): Likewise.
+ * elflink.h (elf_link_add_object_symbols): Call _bfd_merge_section.
+ (elf_bfd_final_link): Adjust global symbols pointing into SEC_MERGE
+ sections.
+ (elf_link_sec_merge_syms): New.
+ (elf_link_input_bfd): Call _bfd_merged_section_offset
+ and _bfd_write_merged_section.
+ Handle discard_sec_merge.
+ * elf-bfd.h (struct elf_link_hash_table): Add merge_info
+ field.
+ (struct bfd_elf_section_data): Likewise.
+ * elf.c (_bfd_elf_make_section_from_shdr): Set SEC_MERGE and
+ SEC_STRINGS section flags and entsize from their ELF counterparts.
+ (_bfd_elf_link_hash_table_init): Initialize merge_info.
+ (elf_fake_sections): Set SHF_MERGE, SHF_STRINGS and sh_entsize
+ from their BFD counterparts.
+ * merge.c: New file.
+ * Makefile.am: Add strtab.lo.
+ * Makefile.in: Rebuilt.
+
+2001-04-09 Hans-Peter Nilsson <hp@axis.com>
+
+ * elflink.h (elf_fix_symbol_flags): For non-default visibilities,
+ only hide symbols marked STV_INTERNAL or STV_HIDDEN.
+
+2001-04-05 Steven J. Hill <sjhill@cotw.com>
+
+ * config.bfd (mips*el*-*-linux-gnu*): Use traditional little
+ endian MIPS ELF target.
+ * config.bfd (mips*-*-linux-gnu*): Use traditional big endian
+ MIPS ELF target.
+
+ * configure.in (bfd_elf64_tradbigmips_vec): New. Traditional
+ 64bit big endian MIPS ELF target.
+ (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
+ endian MIPS ELF target.
+ * configure: Regenerated.
+
+ * elf32-mips.c (IRIX_COMPAT): Handle traditional 64bit and
+ little endian targets.
+ (mips_elf_sym_is_global): Handle traditional targets.
+
+ * elf64-mips.c (bfd_elf64_tradbigmips_vec): New. Traditional
+ 64bit big endian MIPS ELF target.
+ (bfd_elf64_tradlittlemips_vec): New. Traditional 64bit little
+ endian MIPS ELF target.
+
+ * targets.c: (_bfd_target_vector): Add bfd_elf64_tradbigmips_vec
+ and bfd_elf64_tradlittlemips_vec.
+
+2001-04-05 David Mosberger <davidm@hpl.hp.com>
+
+ * elf32-i386.c (elf_i386_fake_sections): Treat ".reloc" as an
+ ordinary "progbits" section.
+
+2001-04-04 Alan Modra <alan@linuxcare.com.au>
+
+ * elflink.h (elf_fix_symbol_flags): Call elf_backend_hide_symbol
+ when -Bsymbolic causes a symbol to no longer need a .plt entry.
+
+2001-04-03 David Mosberger <davidm@hpl.hp.com>
+
+ * efi-app-ia32.c (ALIGN_SECTIONS_IN_FILE): Deleted.
+
+2001-03-30 H.J. Lu <hjl@gnu.org>
+
+ * efi-app-ia32.c (PEI_TARGET_SUBSYSTEM): Rename from ...
+ (PEI_DEFAULT_TARGET_SUBSYSTEM): This.
+
+2001-03-26 H.J. Lu <hjl@gnu.org>
+
+ * elf32-gen.c (elf32_generic_link_add_symbols): New. Check
+ if there are any relocations for generic ELF.
+ (bfd_elf32_bfd_link_add_symbols): Defined to
+ elf32_generic_link_add_symbols.
+ * elf64-gen.c (elf64_generic_link_add_symbols): New. Check
+ if there are any relocations for generic ELF.
+ (bfd_elf64_bfd_link_add_symbols): Defined to
+ elf64_generic_link_add_symbols.
+
+2001-03-23 Nick Clifton <nickc@redhat.com>
+
+ * Makefile.am (BUILD_CFILES): New variable: List of C source
+ files created in build directory.
+ (BUILD_HFILES): New variable: List of header files created in
+ build directory.
+ (POTFILES): Delete.
+ (po/POTFILES.in): Replace rule with empty entry.
+ (po/SRC-POTFILES.in): New rule: Create a list of source files
+ in the source directory.
+ (po/BLD-POTFILES.in): New rule: Create a list of source files
+ in the build directory.
+ (MOSTLYCLEAN): Do not delete source files created in build
+ directory.
+ * Makefile.in: Regenerate.
+ * configure.in: Insert SRC-POTFILES.in and BLD-POTFILES.in
+ into po/Makefile.
+ * configure: Regenerate.
+
+ * po/Make-in: Replace occurrences of POTFILES with SRC-POTFILES
+ and BLD_POTFILES.
+ Add .. to the search path when building bfd.pot.
+ Delete POTFILES when performing distclean.
+ Add comment describing why distclean is broken in maintainer mode.
+ * po/POTFILES.in: Delete.
+ * po/SRC-POTFILES.in: New file.
+ * po/BLD-POTFILES.in: New file.
+ * po/bfd.pot: Regenerate.
+
+2001-03-22 Hans-Peter Nilsson <hp@axis.com>
+
+ * elf32-cris.c: Shlib and PIC support. PCREL tweaks.
+ (elf_cris_discard_copies, elf_cris_adjust_gotplt_to_got,
+ elf_cris_try_fold_plt_to_got, elf_cris_link_hash_newfunc,
+ elf_cris_link_hash_table_create, elf_cris_adjust_dynamic_symbol,
+ elf_cris_size_dynamic_sections, elf_cris_finish_dynamic_symbol,
+ elf_cris_finish_dynamic_sections,elf_cris_hide_symbol): New
+ functions.
+ (cris_elf_howto_table) <R_CRIS_8_PCREL, R_CRIS_16_PCREL,
+ R_CRIS_32_PCREL>: Correct comments. Set pcrel_offset to false.
+ <R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE,
+ R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT,
+ R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL>:
+ New HOWTO members for new relocs.
+ (cris_reloc_map): Map new relocs.
+ (ELF_DYNAMIC_INTERPRETER): Define.
+ (PLT_ENTRY_SIZE): Define.
+ (elf_cris_plt0_entry, elf_cris_plt_entry, elf_cris_pic_plt0_entry,
+ elf_cris_pic_plt_entry): New, PLT templates.
+ (struct elf_cris_pcrel_relocs_copied, struct
+ elf_cris_link_hash_entry, struct elf_cris_link_hash_table): New.
+ (elf_cris_link_hash_traverse, elf_cris_hash_table): Define.
+ (cris_final_link_relocate): Check that 16-bit GOT relocs have
+ positive values. Adjust PCREL relocs to be relative to location
+ after relocation.
+ (cris_elf_relocate_section): Handle relocations to dynamic
+ objects. Handle new relocations. Call error handler when seeing
+ non-PIC relocation for read-only sections while generating shared
+ object.
+ (cris_elf_check_relocs): Set reference counts for GOT and PLT
+ entries.
+ (bfd_elf32_bfd_link_hash_table_create,
+ elf_backend_adjust_dynamic_symbol,
+ elf_backend_size_dynamic_sections,
+ elf_backend_finish_dynamic_symbol,
+ elf_backend_finish_dynamic_sections,
+ elf_backend_create_dynamic_sections, bfd_elf32_bfd_final_link,
+ elf_backend_hide_symbol, elf_backend_want_got_plt,
+ elf_backend_plt_readonly, elf_backend_want_plt_sym,
+ elf_backend_got_header_size, elf_backend_plt_header_size):
+ Define.
+
+ * reloc.c: (BFD_RELOC_CRIS_COPY, BFD_RELOC_CRIS_GLOB_DAT,
+ BFD_RELOC_CRIS_JUMP_SLOT, BFD_RELOC_CRIS_RELATIVE,
+ BFD_RELOC_CRIS_32_GOT, BFD_RELOC_CRIS_16_GOT,
+ BFD_RELOC_CRIS_32_GOTPLT, BFD_RELOC_CRIS_16_GOTPLT,
+ BFD_RELOC_CRIS_32_GOTREL, BFD_RELOC_CRIS_32_PLT_GOTREL,
+ BFD_RELOC_CRIS_32_PLT_PCREL): New relocs.
+ * bfd-in2.h, libbfd.h: Regenerate.
+
+2001-03-21 Diego Novillo <dnovillo@redhat.com>
+
+ (_bfd_mips_elf_relocate_section): Give a better error message when
+ a relocation is not recognized.
+
+2001-03-21 Alan Modra <alan@linuxcare.com.au>
+
+ * elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
+ non-NULL before attempting to dereference.
+
+2001-03-20 H.J. Lu <hjl@gnu.org>
+
+ * configure.in: Remove the redundent AC_ARG_PROGRAM.
+ * configure: Rebuild.
+
+2001-03-20 Andreas Schwab <schwab@suse.de>
+
+ * elf32-m68k.c (elf_m68k_relocate_section): Don't need the
+ relocation value when resolving a reference from a debugging
+ section.
+
+2001-03-16 Scott Thomason <SThomaso@hii.com>
+
+ * coff64-rs6000.c (xcoff64_swap_sym_out): Fix syntax errors.
+ (xcoff64_swap_sym_out): Fix syntax errors.
+
+2001-03-16 Richard Sandiford <rsandifo@redhat.com>
+
+ * elf32-arm.h (elf32_arm_merge_private_bfd_data): Fix warning.
+
+2001-03-15 Alan Modra <alan@linuxcare.com.au>
+
+ * elf32-hppa.c (elf32_hppa_link_hash_entry): Add maybe_pic_call.
+ (hppa_link_hash_newfunc): Init it.
+ (hppa_type_of_stub): Only use non-PIC to PIC call stub if caller
+ section appears to be non-PIC.
+ (final_link_relocate): Likewise.
+ (elf32_hppa_adjust_dynamic_symbol): Set maybe_pic_call for any
+ possible candidate function, and set pic_call for those that will
+ only have a .plt entry for the PIC call stub.
+ (hppa_handle_PIC_calls): Set maybe_pic_call.
+
+2001-03-12 DJ Delorie <dj@redhat.com>
+
+ * elf32-sh.c (sh_elf_relocate_section): Only relocation
+ R_SH_DIR8WP* relocs if they're against external symbols, else
+ they're just for relaxing. Validate the reloc values.
+
+2001-03-12 Stefan Geuken <mail@stefan-geuken.de>
+
+ * binary.c (bfd_external_binary_architecture): Declare.
+ (binary_object_p): If bfd_external_binary_architecture is defined,
+ set the architecture to this string.
+
+2001-03-11 Philip Blundell <philb@gnu.org>
+
+ * elf32-arm.h (elf32_arm_finish_dynamic_symbol): Don't make PLT
+ entries that could serve as a definition for a weak symbol.
+
+2001-03-08 Nick Clifton <nickc@redhat.com>
+
+ * Most files: Update copyright notices using Perl script created
+ by Kevin Buettner <kevinb@redhat.com>.
+
+2001-03-07 Nick Clifton <nickc@redhat.com>
+
+ * elf32-arm.h (elf32_arm_final_link_relocate): Conditionalise
+ prior patch on ! defined OLD_ARM_ABI.
+
+2001-03-07 Andreas Jaeger <aj@suse.de>
+
+ * elf64-x86-64.c (elf64_x86_64_relocate_section): Fix handling of
+ some relocation values.
+
+2001-03-06 Nick Clifton <nickc@redhat.com>
+
+ * elf32-arm.h (elf32_arm_final_link_relocate): Clear bit zero
+ of offset in BLX(1) instruction.
+ * coff-arm.c (coff_arm_relocate_section): Clear bit zero of
+ offset in BLX(1) instruction.
+ Fix formatting.
+
+2001-03-06 Nick Clifton <nickc@redhat.com>
+
+ * coff-arm.c (coff_arm_reloc_type_lookup): Add
+ BFD_RELOC_THUMB_PCREL_BLX.
+
+2001-03-06 Igor Shevlyakov <igor@windriver.com>
+
+ * archures.c (bfd_default_scan): Add Coldfire CPUs.
+ * bfd-in2.h: Regenerate.
+ * cpu-m68k.c: Add Coldfire CPUs for arch table.
+ * ieee.c (ieee_write_processor): Set proper id for
+ Coldfire CPUs.
+
+2001-03-01 D.J. Barrow <djbarrow@de.ibm.com,barrow_dj@yahoo.com>
+
+ * configure.in: Add s390 target.
+ * configure: Regenerate.
+
+2001-02-28 Andreas Jaeger <aj@suse.de>
+
+ * elf64-x86-64.c (elf64_x86_64_relocate_section): Add relocation
+ to addend.
+
+2001-02-28 Philip Blundell <pb@futuretv.com>
+
+ * elf32-arm.h: Update mentions of renamed EF_xx constants.
+ (elf32_arm_print_private_bfd_data): Handle ARM EABI version 2.
+
+2001-02-27 H.J. Lu <hjl@gnu.org>
+
+ * aoutx.h (NAME(aout,bfd_free_cached_info)): Return true if
+ abfd->tdata.aout_data == NULL.
+
+2001-02-27 Alan Modra <alan@linuxcare.com.au>
+
+ * elf32-hppa.c: Correct field selector in stub comments.
+ (clobber_millicode_symbols): Formatting fix.
+
+ * configure.in: Bump version to 2.11.90.
+ * configure: Regenerate.
+ * Makefile.am (CFILES): Rename to SOURCE_CFILES.
+ (CFILES): $SOURCE_CFILES + generated C files.
+ (POTFILES): Include $HFILES not $SOURCE_HFILES.
+ Run "make dep-am"
+ * Makefile.in: Regenerate.
+ * doc/Makefile.in: This too.
+
+2001-02-26 Timothy Wall <twall@cygnus.com>
+
+ * elfxx-ia64.c (elfNN_ia64_aix_add_symbol_hook): Remove obsolete
+ comments.
+
+2001-02-26 Nick Clifton <nickc@redhat.com>
+
+ * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Tidy
+ up, replacing multiple if statements with a switch.
+ (handle_COMDAT): New function.
+
+2001-02-26 H.J. Lu <hjl@gnu.org>
+
+ * coffcode.h (styp_to_sec_flags) [COFF_WITH_PE version]: Issue
+ a warning for section flags we do not handle instead of
+ aborting.
+
+2001-02-26 Andreas Jaeger <aj@suse.de>
+
+ * elf64-x86-64.c (x86_64_elf_howto_table): Fix order of entries.
+
+2001-02-22 Timothy Wall <twall@cygnus.com>
+
+ * config.bfd (targ_cpu): Add vectors for ia64-*-aix* (aka Monterey).
+ * configure.in: Add objects for elf64_ia64_aix vectors.
+ * configure: Regenerated.
+ * configure.host: Recognize ia64-*-aix*.
+ * elfxx-ia64.c: Add hooks for ELF64 on AIX5. Define new vectors
+ for AIX. AIX5 requires most relocations to be dynamic (*all*
+ binaries are somewhat similar to shared libraries).
+ * targets.c: Add elf64_ia64_aix vectors.
+
+2001-02-21 David Mosberger <davidm@hpl.hp.com>
+
+ * cpu-ia64-opc.c (elf64_ia64_operands}: Fix typo: error string for
+ C8 said "1" instead of "8". Clarify error string for IMM22:
+ "signed integer" instead of just "integer".
+
+2001-02-20 Andreas Jaeger <aj@suse.de>
+
+ * elf64-x86-64.c (elf64_x86_64_finish_dynamic_symbol): Don't make
+ PLT entries that could serve as a definition for a weak symbol.
+
+2001-02-19 Jakub Jelinek <jakub@redhat.com>
+
+ * elf32-sparc.c (elf32_sparc_finish_dynamic_symbol): Don't make PLT
+ entries that could serve as a definition for a weak symbol.
+ * elf64-sparc.c (sparc64_elf_finish_dynamic_symbol): Likewise.
+
+2001-02-18 David O'Brien <obrien@FreeBSD>
+
+ * configure.in: Recognize FreeBSD/arm, FreeBSD/PowerPC, and treat
+ FreeBSD/i386-CURRENT differently until I can figure out the needed
+ corefile changes.
+ * configure: Regenerate.
+ * config.bfd: Recognize FreeBSD/x86-64, FreeBSD/ia64, FreeBSD/arm,
+ FreeBSD/PowerPC, and FreeBSD/sparc64.
+
+2001-02-18 lars brinkhoff <lars@nocrew.org>
+
+ * Makefile.am: Add PDP-11 a.out target.
+ * config.bfd: Likewise.
+ * configure.in: Likewise.
+ * targets.c: Likewise.
+ * archures.c: Likewise.
+ * bfd-in2.h: Likewise. Add PDP-11 relocations.
+ * libbfd.h: Add PDP-11 relocations.
+ * reloc.c: Likewise.
+ * cpu-pdp11.c: New file.
+ * pdp11.c: New file.
+
+ * libaout.h (GET_WORD) [ARCH_SIZE==16]: Define.
+ (GET_SWORD) [ARCH_SIZE==16]: Likewise.
+ (GET_SWORD) [ARCH_SIZE==16]: Likewise.
+ (PUT_WORD) [ARCH_SIZE==16]: Likewise.
+ (GET_MAGIC): New macro.
+ (PUT_MAGIC): Likewise.
+ * aout-target.h (MY(object_p)): Use GET_MAGIC to read magic word.
+
+2001-02-18 Jim Kingdon <jkingdon@engr.sgi.com>
+
+ * irix-core.c (irix_core_core_file_p): Set the architecture (GDB
+ multiarch needs it).
+
+2001-02-18 H.J. Lu <hjl@gnu.org>
+
+ * elflink.h (elf_link_input_bfd): Ignore invalid section symbol
+ index.
+
+2001-02-18 Kazu Hirata <kazu@hxi.com>
+
+ * vms-misc.c: Fix formatting.
+
+2001-02-16 Kazu Hirata <kazu@hxi.com>
+
+ * vms.c: Fix formatting.
+
+2001-02-14 H.J. Lu <hjl@gnu.org>
+
+ * elf.c (elf_find_function): New function.
+ (_bfd_elf_find_nearest_line): Call elf_find_function () to find
+ the file name and function name.
+
+2001-02-14 Nick Clifton <nickc@redhat.com>
+
+ * ecoff.c (bfd_debug_section): Update to initialise new fields in
+ asection structure.
+
+ * Makefile.am (BFD32_BACKENDS_CFILES): Remove peigen.c
+ (BFD64_BACKENDS): Add pepigen.c
+ Add rules to create peigen.c and pepigen.c from peXXigen.c.
+
+ * Makefile.in: Regenerate.
+ * configure: Regenerate.
+ * po/POTFILES.in: Regenerate.
+ * po/bfd.pot: Regenerate.
+
+2001-02-14 H.J. Lu <hjl@gnu.org>
+
+ * libcoff-in.h (pe_tdata): Add members target_subsystem and
+ force_minimum_alignment.
+
+2001-02-14 Bo Thorsen <bo@suse.de>
+
+ * elf64-x86-64.c: Small formatting fixes and rearrangements of code.
+ (elf64_86_64_size_info): Struct added to fix a problem
+ with the hashtable string entries.
+ (elf64_x86_64_adjust_dynamic_symbol): Add generation of .got.plt.
+ (elf64_x86_64_size_dynamic_sections): A FIXME removed.
+ (elf64_x86_64_size_dynamic_sections): Fix a dynamic entry and
+ remove the FIXME for this.
+ (elf64_x86_64_adjust_dynamic_symbol): Fix check for unneeded .plt
+ section. Also removed the FIXME for it.
+ (x86_64_elf_howto_table): Use bfd_elf_generic_reloc.
+ (ELF_DYNAMIC_INTERPRETER): Fix the name of the dynamic linker.
+ (elf64_x86_64_finish_dynamic_sections): Enable .got.plt writing.
+
+2001-02-13 Richard Henderson <rth@redhat.com>
+
+ * elfxx-ia64.c (elfNN_ia64_final_link): Set __gp if required
+ and not user provided.
+
+2001-02-13 Kazu Hirata <kazu@hxi.com>
+
+ * vms.c (vms_print_symbol): Remove unreachable code.
+
+ * rs6000-core.c: Fix formatting.
+
+2001-02-13 David Mosberger <davidm@hpl.hp.com>
+
+ * peicode.h (coff_swap_filehdr_out) [COFF_IMAGE_WITH_PE]: Define
+ as _bfd_XXi_only_swap_filehdr_out.
+ (pe_mkobject) [PEI_FORCE_MINIMUM_ALIGNMENT]: Set
+ pe->force_minimum_alignment to TRUE.
+ (pe_mkobject) [PEI_TARGET_SUBSYSTEM]: Set pe->target_subsystem to
+ PEI_TARGET_SUBSYSTEM.
+ (pe_print_private_bfd_data): Call
+ _bfd_XX_print_private_bfd_data_common() instead of
+ _bfd_pe_print_private_bfd_data_common().
+ (pe_bfd_copy_private_bfd_data): Call
+ _bfd_XX_bfd_copy_private_bfd_data_common() instead of
+ _bfd_pe_bfd_copy_private_bfd_data_common().
+ (coff_bfd_copy_private_section_data): Define as
+ _bfd_XX_bfd_copy_private_section_data instead of
+ _bfd_pe_bfd_copy_private_section_data.
+ (coff_get_symbol_info): Define as _bfd_XX_get_symbol_info instead
+ of a _bfd_pe_get_symbol_info.
+
+ * peigen.c: Delete.
+
+ * peXXigen.c: Renamed from peigen.c.
+ (COFF_WITH_XX): Define this macro (will get expanded into
+ COFF_WITH_pep or COFF_WITH_pe, depending on whether this is being
+ compiled as peigen.c or pepigen.c.
+ [COFF_WITH_pep]: Include "coff/ia64.h" instead of "coff/i386.h" to
+ define the canonical PEP structures and definitions.
+ (_bfd_XXi_swap_aouthdr_out): If pe->force_minimum_alignment is in
+ effect, enforce minimum file and section alignments. If
+ extra->Subsystem is IMAGE_SUBSYSTEM_UNKNOWN, set it to
+ pe->target_subsystem (this defaults to IMAGE_SUBSYSTEM_UNKNOWN,
+ so, by default, this is a no-op).
+
+ * libpei.h: Rename COFF_WITH_PEP to COFF_WITH_pep.
+ (_bfd_XX_bfd_copy_private_bfd_data_common): Add macros to map
+ _bfd_XXfoo to _bfd_pepfoo if COFF_WIT_PEP is defined and to
+ _bfd_pefoo if it's not defined. Use these macros to define
+ coff swap macros.
+
+ * libcoff.h (pe_tdata): Add members target_subsystem and
+ force_minimum_alignment.
+
+ * efi-app-ia64.c (COFF_WITH_pep): Rename COFF_WITH_PEP to
+ COFF_WITH_pep.
+ (PEI_TARGET_SUBSYSTEM): Rename from PEI_DEFAULT_TARGET_SUBSYSTEM.
+
+ * configure.in (bfd_efi_app_ia64_vec): Use pepigen.lo instead of
+ peigen.lo.
+
+ * coff-ia64.c: Rename COFF_WITH_PEP to COFF_WITH_pep.
+ (AOUTSZ): Rename PEP64AOUTSZ and PEP64AOUTHDR to PEPAOUTSZ and
+ PEPAOUTHDR.
+
+ * Makefile.in (BFD64_BACKENDS): Mention pepigen.lo.
+ (BFD64_BACKENDS_CFILES): Mention pepigen.c
+ (peigen.c): Add rule to generate from peXXigen.c.
+ (pepigen.c): Ditto.
+ (pepigen.lo): List dependencies for pepigen.lo.
+
+2001-02-13 Alan Modra <alan@linuxcare.com.au>
+
+ * elf32-hppa.c (elf32_hppa_set_gp): Handle weak $global$. If
+ $global$ referenced but not defined, set its value here.
+
+2001-02-09 Bo Thorsen <bo@suse.de>
+
+ * elf64-x86-64.c (elf64_x86_64_check_relocs): Set .rela.got section
+ alignment to 3.
+ (elf64_x86_64_check_relocs): Write R_X86_64_GOTPCREL GOT entry
+ and relocation.
+ (elf64_x86_64_relocate_section): Fix formatting.
+ (elf64_x86_64_relocate_section): Fix addend for relocation of
+ R_X86_64_(8|16|32|PC8|PC16|PC32).
+
+2001-02-12 Jan Hubicka <jh@suse.cz>
+
+ * elf64-x86-64.c (x86_64_elf_howto): Fix name of R_X86_64_GOTPCREL.
+
+2001-02-11 H.J. Lu <hjl@gnu.org>
+
+ * elflink.h (elf_bfd_final_link): Use file_align for SYMTAB
+ alignment.
+
+2001-02-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
+
+ * elf32-mips.c (mips_elf_create_dynamic_relocation): Undo patch
+ from 2000-10-13. Do not add the symbol's value for R_MIPS_REL32
+ relocations against dynsym symbols.
+
+ * elf32-mips.c (elf_mips_howto_table): Fix the comment on
+ the R_MIPS_26 relocation.
+ (mips_elf_calculate_relocation): Use (p + 4) instead of p for
+ the R_MIPS_26 relocation.
+ (mips_elf_perform_relocation): Fix the comment on the R_MIPS16_26
+ relocation.
+ * elf64-mips.c (mips_elf64_howto_table_rel): Fix the comment on
+ the R_MIPS_26 relocation.
+ (mips_elf64_howto_table_rela): Likewise.
+
+ * elf32-mips.c (struct mips_elf_link_hash_entry): Added no_fn_stub
+ member to mark symbols that have non-CALL relocations against
+ them.
+ (mips_elf_link_hash_newfunc): Initialize no_fn_stub.
+ (mips_elf_calculate_relocation): Handle R_MIPS_CALL16 like
+ R_MIPS_GOT16.
+ (_bfd_mips_elf_check_relocs): Set no_fn_stub for a symbol if a
+ non-CALL relocation against it is encountered.
+ (_bfd_mips_elf_copy_indirect_symbol): Merge no_fn_stub as well.
+ (_bfd_mips_elf_adjust_dynamic_symbol): Only create a stub if
+ no_fn_stub is not set.
+
+ * elf32-mips.c (mips_elf_output_extsym): Get the output section
+ information from the real symbol for indirect ones.
+ Check no_fn_stub to find out if a symbol has a function stub
+ indeed.
+
+2001-02-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+
+ * Makefile.am (stamp-lib): ranlib the libbfd.a in the build directory.
+ * Makefile.in: Regenerate.
+
+2001-02-09 David Mosberger <davidm@hpl.hp.com>
+
+ * elfxx-ia64.c (is_unwind_section_name): New function. Returns
+ true if section name is an unwind table section name.
+ (elfNN_ia64_additional_program_headers): Count each unwind section
+ separately.
+ (elfNN_ia64_modify_segment_map): Install one unwind program header
+ for each unwind separate section. Note: normally the linker
+ script merges the unwind sections that go into a single segment,
+ so this still generates at most one unwind program header per
+ segment.
+
+ * elfxx-ia64.c (elfNN_ia64_section_from_shdr): Accept any section
+ name for SHT_IA_64_UNWIND, not just .IA_64.unwind.
+ (elfNN_ia64_fake_sections): Mark sections with names that start
+ with .IA_64.unwind but not with .IA_64.unwind_info as an IA-64
+ unwind section.
+
+ * elfxx-ia64.c (elfNN_ia64_final_write_processing): New function.
+ Use it to make sh_info in unwind section point to the text section
+ it applies to.
+
+2001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * Makefile.am: Add linux target for S/390.
+ * archures.c: Likewise.
+ * bfd-in2.h: Likewise.
+ * config.bfd: Likewise.
+ * configure.in: Likewise.
+ * elf.c: Likewise.
+ * libbfd.h: Likewise.
+ * targets.c: Likewise.
+ * cpu-s390.c: New file.
+ * elf32-s390.c: New file.
+ * elf64-s390.c: New file.
+
+2001-02-09 Nick Clifton <nickc@redhat.com>
+
+ * peigen.c (_bfd_pe_get_symbol_info): Suppress addition of
+ ImageBase. This has already been done by coff_swap_hdr_in.
+
+2001-02-09 Jakub Jelinek <jakub@redhat.com>
+
+ * elf64-sparc.c (sparc64_elf_copy_private_bfd_data): New function.
+
+2001-02-09 Jakub Jelinek <jakub@redhat.com>
+
+ * elf64-sparc.c (sparc64_elf_check_relocs): Don't trust reloc_count.
+ (sparc64_elf_relocate_section): Likewise.
+
+2001-02-09 Mark Kettenis <kettenis@gnu.org>
+
+ * elf32-sparc.c (_bfd_sparc_elf_howto_table): Treat R_SPARC_UA32
+ similar to R_SPARC_32.
+ * elf64-sparc.c (sparc64_elf_howto_table): Likewise.
+
+2001-02-08 H.J. Lu <hjl@gnu.org>
+
+ * elf32-i386.c (elf_i386_check_relocs): Reserve R_386_PC32
+ relocation entries for weak definitions when building DSO with
+ -Bsymbolic.
+
+2001-02-08 Richard Henderson <rth@redhat.com>
+
+ * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Respect weakness
+ before visibility. Locally defined protected symbols are not
+ dynamic.
+
+2001-02-08 Geoffrey Keating <geoffk@redhat.com>
+
+ * config.bfd: Enable coff64 for rs6000-*. Patch from
+ <hzoli@austin.ibm.com>.
+
+2001-02-07 Mark Elbrecht <snowball3@bigfoot.com>
+
+ * coffgen.c (coff_find_nearest_line): If stabs info is successfully
+ found, do not attempt to find dwarf2 info before returning.
+
+2001-02-07 Jakub Jelinek <jakub@redhat.com>
+
+ * elflink.h (is_global_symbol_definition): Rename to
+ is_global_data_symbol_definition and have it reject function
+ symbols.
+ (elf_link_is_defined_archive_symbol): Use renamed function.
+
+2001-02-07 Todd Vierling <tv@wasabisystems.com>
+
+ * libbfd-in.h (bfd_target_vector): Change extern array to pointer.
+ * libbfd.h (bfd_target_vector): Likewise.
+ * targets.c (bfd_target_vector): Rename to _bfd_target_vector and
+ make static; create pointer reference named bfd_target_vector.
+ (_bfd_target_vector_entries): Calculate this based on the array
+ typed _bfd_target_vector.
+
+2001-02-06 H.J. Lu <hjl@gnu.org>
+
+ * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Only hidden and
+ internal symbols are not dynamic.
+ * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise.
+
+2001-02-06 Nick Clifton <nickc@redhat.com>
+
+ * Makefile.am (BFD64_BACKENDS_CFILES): Remove elf64-ia64.c, so
+ that it will not be pulled into the list of files that make up
+ po/POTFILES.in.
+ * Makefile.in: Regenerate.
+ * po/bfd.pot: Regenerate.
+
+2001-02-06 H.J. Lu <hjl@gnu.org>
+
+ * peicode.h (coff_swap_filehdr_in): Remove the e_magic
+ checking.
+ (pe_bfd_object_p): Rewrite with external_PEI_DOS_hdr and
+ external_PEI_IMAGE_hdr.
+
+2001-02-06 Kazu Hirata <kazu@hxi.com>
+
+ * elf-m10200.c: Fix formatting.
+
+2001-02-04 Nick Clifton <nickc@redhat.com>
+
+ * elf32-v850.c (v850_elf_reloc): Do not convert reloc addend to PC
+ rel, it will be handled later on.
+
+2001-02-02 Fred Fish <fnf@ninemoons.com>
+
+ * Makefile.in: Fix typo.
+
+2001-02-01 Kazu Hirata <kazu@hxi.com>
+
+ * elf-m10300.c: Fix formatting.
+
+2001-01-30 Alan Modra <alan@linuxcare.com.au>
+
+ * elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
+ (elf_backend_get_symbol_type): Define.
+ (elf64_hppa_object_p): Set architecture and machine from elf
+ header flags.
+
+2001-01-30 Curtis L. Janssen <cljanss@ca.sandia.gov>
+
+ * elf64-alpha.c (elf64_alpha_find_nearest_line): Query dwarf2
+ before mdebug.
+
+2001-01-26 Richard Henderson <rth@redhat.com>
+
+ * elfxx-ia64.c (elfNN_ia64_dynamic_symbol_p): Return false
+ for non-default visibility.
+ * elf64-alpha.c (alpha_elf_dynamic_symbol_p): Likewise, but
+ delete ugly macro and replace with pretty function.
+
+2001-01-25 Mark Elbrecht <snowball3@bigfoot.com>
+
+ * coff-go32.c: Update copyright.
+ * coff-stgo32.c: Likewise.
+ * coff-go32.c (COFF_LONG_FILENAMES): Define.
+ * coff-stgo32.c (COFF_LONG_FILENAMES): Likewise.
+ * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Remove .bss entry.
+ * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
+
+2001-01-25 Kazu Hirata <kazu@hxi.com>
+
+ * bfd-in2.h: Rebuild.
+ * libbfd.h: Likewise.
+
+2001-01-23 H.J. Lu <hjl@gnu.org>
+
+ * bfd-in2.h: Rebuild.
+
+2001-01-23 H.J. Lu <hjl@gnu.org>
+
+ * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_buf)
+ is NULL or PRIV(vms_rec) is outside of the buffer.
+
+2001-01-23 Kazu Hirata <kazu@hxi.com>
+
+ * coff64-rs6000.c: Fix formatting.
+ * coff-arm.c: Likewise.
+ * coffgen.c: Likewise.
+ * cofflink.c: Likewise.
+ * coff-mcore.c: Likewise.
+ * coff-mips.c: Likewise.
+ * coff-pmac.c: Likewise.
+ * coff-ppc.c: Likewise.
+ * coff-rs6000.c: Likewise.
+ * elf32.c: Likewise.
+ * elf32-fr30.c: Likewise.
+ * elf32-i370.c: Likewise.
+ * elf32-i860.c: Likewise.
+ * elf32-m32r.c: Likewise.
+ * elf32-m68k.c: Likewise.
+ * elf32-mcore.c: Likewise.
+ * elf32-ppc.c: Likewise.
+ * elf32-sh.c: Likewise.
+ * elf32-v850.c: Likewise.
+ * elf64-alpha.c: Likewise.
+ * elf64-sparc.c: Likewise.
+ * elflink.c: Likewise.
+ * elflink.h: Likewise.
+ * elf-m10200.c: Likewise.
+ * elf-m10300.c: Likewise.
+ * elfxx-ia64.c: Likewise.
+
+ * aoutx.h: Fix formatting.
+ * bfd.c: Likewise.
+ * bfd-in2.h: Likewise.
+ * bfd-in.h: Likewise.
+ * cpu-i386.c: Likewise.
+ * cpu-m68hc11.c: Likewise.
+ * dwarf2.c: Likewise.
+ * elf64-x86-64.c: Likewise.
+ * format.c: Likewise.
+ * freebsd.h: Likewise.
+ * hash.c: Likewise.
+ * hp300hpux.c: Likewise.
+ * hppabsd-core.c: Likewise.
+ * hpux-core.c: Likewise.
+
+2001-01-22 Bo Thorsen <bo@suse.de>
+
+ * elf64-x86-64.c: Added PIC support for X86-64.
+ (elf64_x86_64_link_hash_newfunc): Function added.
+ (elf64_x86_64_link_hash_table_create): Likewise.
+ (elf64_x86_64_check_relocs): Likewise.
+ (elf64_x86_64_gc_mark_hook): Likewise.
+ (elf64_x86_64_gc_sweep_hook): Likewise.
+ (elf64_x86_64_adjust_dynamic_symbol): Likewise.
+ (elf64_x86_64_size_dynamic_sections): Likewise.
+ (elf64_x86_64_discard_copies): Likewise.
+ (elf64_x86_64_finish_dynamic_symbol): Likewise.
+ (elf64_x86_64_finish_dynamic_sections): Likewise.
+ (elf64_x86_64_relocate_section): Add relocation of PIC sections.
+
+2001-01-21 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
+
+ * Makefile.am (install-data-local): Make use of $(DESTDIR).
+ * Makefile.in: Regenerate.
+
+2001-01-21 Kazu Hirata <kazu@hxi.com>
+
+ * coff-a29k.c: Fix formatting.
+
+2001-01-19 H.J. Lu <hjl@gnu.org>
+
+ * elf32-i386.c (elf_i386_check_relocs): Report files with bad
+ relocation section names.
+ (elf_i386_relocate_section): Report files with bad relocation
+ section names and return false.
+
+2001-01-17 Bo Thorsen <bo@suse.de>
+
+ * targets.c: Alphabetize list of xvecs.
+
+2001-01-14 Alan Modra <alan@linuxcare.com.au>
+
+ * config.bfd: Add linux target variant for elfxx-hppa.
+ * configure.in: Recognize bfd_elf32_hppa_linux_vec and
+ bfd_elf64_hppa_linux_vec.
+ * configure: Regenerate.
+ * elf64-hppa.c: Include elf64-target.h again to support linux
+ target variant.
+ (elf64_hppa_post_process_headers): Set ELFOSABI_LINUX for linux.
+ * elf32-hppa.c: Include elf32-target.h again to support linux
+ target variant.
+ (elf32_hppa_post_process_headers): New function.
+ (elf_backend_post_process_headers): Define.
+ * targets.c (bfd_target_vector): Add bfd_elf64_hppa_linux_vec and
+ bfd_elf32_hppa_linux_vec.
+
+ * elf32-hppa.c (elf32_hppa_link_hash_table): Add text_segment_base,
+ and data_segment_base fields.
+ (elf32_hppa_link_hash_table_create ): Init them.
+ (elf32_hppa_check_relocs): Update comments.
+ (hppa_record_segment_addr): New function.
+ (elf32_hppa_relocate_section): Call it.
+ (final_link_relocate): Handle R_PARISC_SEGREL32.
+ (elf32_hppa_final_link): New function.
+ (bfd_elf32_bfd_final_link): Define to call it.
+ (hppa_unwind_entry_compare): New function.
+ * cache.c (bfd_open_file): Create files in write+read mode.
+
+ * elf-hppa.h (elf_hppa_howto_table): Set bitsize value for
+ SEGREL32 and numerous other relocs. Change duplicate
+ R_PARISC_NONE relocs to R_PARISC_UNIMPLEMENTED.
+
+ * opncls.c (bfd_fdopenr): Add parens like the comment says around
+ O_ACCMODE.
+
+ * elf32-hppa.c (elf32_hppa_size_dynamic_sections): Don't create
+ .plt entries for DT_INIT and DT_FINI.
+ (elf32_hppa_finish_dynamic_sections): Remove special handling of
+ DT_INIT and DT_FINI.
+
+ * elf64-hppa.c (elf64_hppa_finish_dynamic_symbol): Use 16-bit
+ offsets for stub .plt access if wide mode. Check offset in range.
+
+2001-01-13 Nick Clifton <nickc@redhat.com>
+
+ * elf32-fr30.c (fr30_elf_howto_table): Remove spurious blank
+ line.
+
+ * coffcode.h (coff_canonicalize_reloc): Remove spurious blank
+ line.
+
+2001-01-12 Alan Modra <alan@linuxcare.com.au>
+
+ * configure.in ([bfd_elf64_x86_64_vec]): Set target64.
+ * configure: Regenerate.
+
+2001-01-11 Peter Targett <peter.targett@arccores.com>
+
+ * bfd-in2.h (bfd_architecture): Add bfd_mach_arc_5,
+ bfd_mach_arc_6, bfd_mach_arc_7, bfd_mach_arc_8 for ARC variants.
+ * cpu-arc.c (arch_info_struct): Add entries for variants.
+ (bfd_arc_arch) Set default to bfd_mach_arc_5.
+ (arc_get_mach) Don't assume machine names prefixed arc- before
+ testing.
+ * elf32-arc.c (arc_elf_object_p): Set machine number based on new
+ selections.
+ (arc_elf_final_write_processing) Likewise.
+ (ELF_MACHINE_CODE) Use EM_ARC.
+
+2001-01-10 Nick Clifton <nickc@redhat.com>
+
+ * coff-arm.c (LOCAL_LABEL_PREFIX): Change definition to "".
+
+2001-01-07 Philip Blundell <philb@gnu.org>
+
+ * README: Replace `bug-gnu-utils@gnu.org' with
+ `bug-binutils@gnu.org'.
+
+2001-01-04 Kazu Hirata <kazu@hxi.com>
+
+ * som.c: Fix formatting.
+
+2001-01-03 Kazu Hirata <kazu@hxi.com>
+
+ * ecoffswap.h: Fix formatting.
+ * elf-bfd.h: Likewise.
+ * elfarm-nabi.c: Likewise.
+ * elfarm-oabi.c: Likewise.
+ * elfcode.h: Likewise.
+ * elfcore.h: Likewise.
+ * elflink.c: Likewise.
+ * elflink.h: Likewise.
+ * elfxx-ia64.c: Likewise.
+ * elfxx-target.h: Likewise.
+ * libbfd.c: Likewise
+ * linker.c: Likewise.
+ * lynx-core.c: Likewise.
+
+2001-01-02 Kazu Hirata <kazu@hxi.com>
+
+ * pc532-mach.c: Fix formatting.
+ * pe-arm.c: Likewise.
+ * pe-i386.c: Likewise.
+ * pe-mips.c: Likewise.
+ * pe-ppc.c: Likewise.
+ * pe-sh.c: Likewise.
+ * pei-mips.c: Likewise.
+ * pei-sh.c: Likewise.
+ * peicode.h: Likewise.
+ * ppcboot.c: Likewise.
+ * ptrace-core.c: Likewise.
+
+2001-01-01 Kazu Hirata <kazu@hxi.com>
+
+ * reloc.c: Fix formatting.
+ * riscix.c: Likewise.
+ * rs6000-core.c: Likewise.
+ * xcoff-target.h: Likewise.
+
+2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * elfcode.h (elf_object_p): Also restore the bfd mach field on
+ error, by calling bfd_default_set_arch_mach with incoming
+ values.
+
+2000-12-26 Kazu Hirata <kazu@hxi.com>
+
+ * vaxnetbsd.c: Fix formatting.
+ * versados.c: Likewise.
+ * vms-gsd.c: Likewise.
+ * vms-hdr.c: Likewise.
+ * vms-misc.c: Likewise.
+
+2000-12-25 Alexandre Oliva <aoliva@redhat.com>
+
+ * archive.c (coff_write_armap): Don't write more than symbol_count
+ `archive_member_file_ptr's.
+
+2000-12-25 Kazu Hirata <kazu@hxi.com>
+
+ * vms-tir.c: Fix formatting.
+
+2000-12-23 Kazu Hirata <kazu@hxi.com>
+
+ * vms.c: Fix formatting.
+ * vms.h: Likewise.
+
+2000-12-21 Santeri Paavolainen <santtu@ssh.com>
+
+ * vms-hdr.c: Include alloca.h if HAVE_ALLOCA_H is defined.
+
+ * peicode.h (pe_ILF_object_p): Add const to import of TARGET_LITTLE_SYM.
+
+ * elf32-m32r.c (m32r_elf_generic_reloc): Add cast to avoid (void *)
+ arithmetic.
+
+ * elf32-fr30.c: Add casts to avoid (void *) arithmetic.
+
+ * coffcode.h (styp_to_sec_flags): Add empty statement after label.
+
+2000-12-21 Richard Sandiford <rsandifo@redhat.com>
+
+ * libbfd.c (bfd_get_bits): Added
+ (bfd_put_bits): Likewise
+ * bfd-in.h: Declared the above.
+ * bfd-in2.h: Regenerated.
+
+2000-12-20 Kazu Hirata <kazu@hxi.com>
+
+ * targets.c: Fix formatting.
+ * tekhex.c: Likewise.
+ * trad-core.c: Likewise.
+
+2000-12-19 Kazu Hirata <kazu@hxi.com>
+
+ * sco5-core.c: Fix formatting.
+ * section.c: Likewise.
+ * sparclinux.c: Likewise.
+ * sparclynx.c: Likewise.
+ * sparcnetbsd.c: Likewise.
+ * srec.c: Likewise.
+ * stabs.c: Likewise.
+ * stab-syms.c: Likewise.
+ * sunos.c: Likewise.
+ * syms.c: Likewise.
+ * sysdep.h: Likewise.
+
+2000-12-18 Nick Clifton <nickc@redhat.com>
+
+ * coff-arm.c (EXTRA_S_FLAGS): Only define if not already
+ defined.
+ * epoc-pe-arm.c (EXTRA_S_FLAGS): Define.
+ * epoc-pei-arm.c (EXTRA_S_FLAGS): Define.
+
+2000-12-18 Nick Clifton <nickc@redhat.com>
+
+ * vms-misc.c (_bfd_vms_get_record): Add default case to
+ file_format switch.
+
+2000-12-15 Miloslav Trmac <mitr@volny.cz>
+
+ * elfcore.h (elf_core_file_p): Move to the start of the program
+ headers before attempting to read them.
+
+2000-12-14 Kazu Hirata <kazu@hxi.com>
+
+ * peigen.c: Fix formatting.
+ * som.c: Likewise.
+ * som.h: Likewise.
+
+2000-12-13 Kazu Hirata <kazu@hxi.com>
+
+ * peigen.c: Fix formatting.
+
+2000-12-12 Jim Wilson <wilson@redhat.com>
+
+ * elfxx-ia64.c (get_dyn_sym_info): Cast %p argument to void *.
+
+2000-12-08 Mark Salter <msalter@redhat.com>
+
+ * binary.c (binary_set_section_contents): Ignore sections
+ with zero size.
+
+2000-12-12 Kazu Hirata <kazu@hxi.com>
+
+ * m68klinux.c: Fix formatting.
+ * m68knetbsd.c: Likewise.
+ * mipsbsd.c: Likewise.
+ * netbsd-core.c: Likewise.
+ * netbsd.h: Likewise.
+ * newsos3.c: Likewise.
+ * nlm32-alpha.c: Likewise.
+ * nlm32-i386.c: Likewise.
+ * nlm32-ppc.c: Likewise.
+ * nlm32-sparc.c: Likewise.
+ * nlmcode.h: Likewise.
+ * nlmswap.h: Likewise.
+ * nlm-target.h: Likewise.
+ * ns32knetbsd.c: Likewise.
+
+2000-12-10 Fred Fish <fnf@be.com>
+
+ * elflink.h (elf_link_output_extsym): Don't complain about undefined
+ symbols in shared objects if allow_shlib_undefined is true.
+
+2000-12-12 Nick Clifton <nickc@redhat.com>
+
+ * cpu-sh.c: Fix formattng.
+ * elf.c: Fix formattng.
+ * elf32-mips.c: Fix formattng.
+ * elf32-sh.c: Fix formattng.
+ * elf64-alpha.c: Fix formattng.
+
+2000-12-09 Nick Clifton <nickc@redhat.com>
+
+ * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Pass
+ dwarf2_find_line_info as last parameter to invocation of
+ _bfd_dwarf2_find_nearest_line.
+ * elf32-arm.h (elf32_arm_find_nearest_line): Pass
+ dwarf2_find_line_info as last parameter to invocation of
+ _bfd_dwarf2_find_nearest_line.
+
+2000-12-08 Mark Elbrecht <snowball3@bigfoot.com>
+
+ * Makefile.am (BFD32_BACKENDS): Move dwarf2.lo from here...
+ (BFD_LIBS): ...to here.
+ (BFD32_BACKENDS_CFILES): Move dwarf2.c from here...
+ (BFD_LIBS_CFILES): ...to here.
+ * Makefile.in: Regenerate.
+ * configure.in: Remove dwarf.lo from the elf shell variable.
+ * configure: Regenerate.
+ * libcoff-in.h (coff_tdata): Add pointer dwarf2_find_line_info.
+ * libcoff.h: Regenerate.
+ * coffgen.c (coff_find_nearest_line): Call
+ _bfd_dwarf2_find_nearest_line.
+ * dwarf2.c (_bfd_dwarf2_find_nearest_line): Add parameter. Update
+ accordingly.
+ (read_abbrevs): Likewise
+ (decode_line_info): Likewise.
+ (parse_comp_unit): Likewise.
+ (comp_unit_find_nearest_line): Likewise.
+ * libbfd-in.h (_bfd_dwarf2_find_nearest_line): Update prototype.
+ * libbfd.h: Regenerate.
+ * elf.c (_bfd_elf_find_nearest_line): Update call.
+ * elf-bfd.h (elf_obj_tdata): Change dwarf2_find_line_info to type PTR.
+ * dwarf2.c (concat_filename): Use IS_ABSOLUTE_PATH.
+ * coffcode.h (STYP_XCOFF_DEBUG, STYP_DEBUG_INFO): New macros.
+ (sec_to_styp_flags): Use them. Handle DWARF2 sections.
+ (styp_to_sec_flags): Handle DWARF2 sections.
+ * elf32-arm.h (elf32_arm_find_nearest_line): Add parameter to call
+ to _bfd_find_nearest_line.
+ * elf32-mips.c (_bfd_mips_elf_find_nearest_line): Add parameter to
+ call to _bfd_find_nearest_line.
+
+2000-12-08 Kazu Hirata <kazu@hxi.com>
+
+ * coffgen.c: Fix formatting.
+ * elf-m10300.c: Likewise.
+ * elf32-i386.c: Likewise.
+ * elf32-i960.c: Likewise.
+ * elf32-m68k.c: Likewise.
+ * elf32-mcore.c: Likewise.
+ * elf32-ppc.c: Likewise.
+ * elf32-sh.c: Likewise.
+ * elf32-sparc.c: Likewise.
+ * elf32-v850.c: Likewise.
+ * elf64-alpha.c: Likewise.
+ * elf64-hppa.c: Likewise.
+ * elf64-mips.c: Likewise.
+ * elf64-sparc.c: Likewise.
+
+2000-12-07 Kazu Hirata <kazu@hxi.com>
+
+ * elf32-ppc.c: Fix formatting.
+ * elf64-x86-64.c: Likewise.
+
+2000-12-06 Ulf Carlsson <ulfc@engr.sgi.com>
+
+ From Ralf Baechle <ralf@gnu.org>
+
+ * elf32-mips.c (elf32_mips_merge_private_bfd_data): Always permit
+ BFDs containing no sections or empty .text, .data or .bss sections
+ to be merged, regardless of their flags.
+
+2000-12-06 Kazu Hirata <kazu@hxi.com>
+
+ * elf32-m32r.c: Fix formatting.
+ * elf32-m68hc11.c: Likewise.
+ * elf32-m68hc12.c: Likewise.
+ * elf32-m68k.c: Likewise.
+ * elf32-mcore.c: Likewise.
+ * elf32-pj.c: Likewise.
+ * elf32-ppc.c: Likewise.
+
+2000-12-05 Kazu Hirata <kazu@hxi.com>
+
+ * elf32-fr30.c: Fix formatting.
+ * elf32-hppa.c: Likewise.
+ * elf32-i370.c: Likewise.
+ * elf32-i386.c: Likewise.
+ * elf32-i860.c: Likewise.
+ * elf32-i960.c: Likewise.
+
+2000-12-03 Kazu Hirata <kazu@hxi.com>
+
+ * elf32-arm.h: Fix formatting.
+ * elf32-avr.c: Likewise.
+ * elf32-cris.c: Likewise.
+ * elf32-d10v.c: Likewise.
+ * elf32-d30v.c: Likewise.
+ * elf-hppa.h: Likewise.
+ * elf-m10200.c: Likewise.
+ * elf-m10300.c: Likewise.
+
+2000-12-01 Chris Demetriou <cgd@sibyte.com>
+
+ * aoutx.h (NAME(aout,machine_type)): Add bfd_mach_mips32 and
+ bfd_mach_mips32_4k. Update FIXME comment.
+ * archures.c (bfd_mach_mips32): New constant.
+ (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
+ the latter, renumber it.
+ * bfd-in2.h (bfd_mach_mips32): New constant.
+ (bfd_mach_mips4K, bfd_mach_mips32_4k) Rename the former to
+ the latter, renumber it.
+ * cpu-mips.c (I_mips32): New constant.
+ (I_mips4K, I_mips32_4k): Rename the former to the latter.
+ (arch_info_struct): Add bfd_mach_mips32 entry, replace
+ bfd_mach_mips4K entry with bfd_mach_mips32_4k entry.
+ * elf32-mips.c (elf_mips_isa): Add E_MIPS_ARCH_32 case.
+ (elf_mips_mach): Likewise. Also, replace E_MIPS_MACH_MIPS32
+ with E_MIPS_MACH_MIPS32_4K.
+ (_bfd_mips_elf_final_write_processing): Replace
+ bfd_mach_mips4K with bfd_mach_mips32_4k case, add
+ bfd_mach_mips32 case.
+ (_bfd_mips_elf_merge_private_bfd_data): Generalize ISA mixing
+ comparison with support for MIPS32.
+ (_bfd_mips_elf_print_private_bfd_data): Print ISA name for
+ MIPS32.
+
+ * aoutx.h (NAME(aout,machine_type)): Add cases for
+ bfd_mach_mips5 and bfd_mach_mips64.
+ * archures.c (bfd_mach_mips5, bfd_mach_mips64): New constants.
+ * bfd-in2.h (bfd_mach_mips5, bfd_mach_mips64): Likewise.
+ * cpu_mips.c (I_mips5, I_mips64): New definitions.
+ (arch_info_struct): Add entries for bfd_mach_mips5 and
+ bfd_mach_mips64.
+ * elf32-mips.c (elf_mips_isa, elf_mips_mach,
+ _bfd_mips_elf_print_private_bfd_data): Add cases for
+ E_MIPS_ARCH_5 and E_MIPS_ARCH_64.
+ (_bfd_mips_elf_final_write_processing): Add cases for
+ bfd_mach_mips5 and bfd_mach_mips64.
+
+ * aoutx.h (NAME(aout,machine_type)): Add a
+ bfd_mach_mips_sb1 case.
+ * archures.c (bfd_mach_mips_sb1): New constant.
+ * bfd-in2.h (bfd_mach_mips_sb1): New constant.
+ * cpu-mips.c (I_sb1): New constant.
+ (arch_info_struct): Add entry for bfd_mach_mips_sb1.
+ * elf32-mips.c (elf_mips_mach): Add case for
+ E_MIPS_MACH_SB1.
+ (_bfd_mips_elf_final_write_processing): Add case for
+ bfd_mach_mips_sb1.
+
+2000-12-01 Joel Sherrill <joel@OARcorp.com>
+
+ * config.bfd (arm-*-rtems*, a29k-*rtems*): New targets.
+ (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
+ (sparc*-*-rtems*): Switched from a.out to ELF.
+
+2000-11-30 Jan Hubicka <jh@suse.cz>
+
+ * Makefile.am (BFD64_BACKENDS): Add elf64-x86-64.lo
+ BFD64_BACKENDS_CFILES): Add elf64-x86-64.c
+ (elf64-x86-64.lo): Add dependencies.
+ * archures.c (DESCRIPTION): Add bfd_mach_x86_64,
+ bfd_mach_x86_64_intel_syntax.
+ * elf.c (prep_headers): Use EM_x86_64 for 64bit output.
+ * config.bfd (x86_64): Add.
+ * configure.in: Add support for bfd_elf64_x86_64_vec.
+ * cpu-i386.c (bfd_x86_64_arch_intel_syntax, bfd_x86_64_arch): Add.
+ (bfd_i386_arch, i8086_ar): Link in.
+ * elf64-x86-64.c: New file.
+ * reloc.c (ENUMDOC): Add BFD_RELOC_X86_64*.
+ * targets.c (bfd_elf64_x86_64_vec): Add.
+ (bfd_target_vect): Add bfd_elf64_x86_64_vec.
+
+2000-11-30 Kazu Hirata <kazu@hxi.com>
+
+ * xcofflink.c: Fix formatting.
+
+2000-11-28 Kazu Hirata <kazu@hxi.com>
+
+ * aoutx.h: Fix formatting.
+ * bfd-in.h: Likewise.
+ * bfd-in2.h: Likewise.
+ * cache.c: Likewise.
+ * cisco-core.c: Likewise.
+ * coff64-rs6000.c: Likewise.
+ * coffcode.h: Likewise.
+ * coffswap.h: Likewise.
+ * corefile.c: Likewise.
+ * elf32-mips.c: Likewise.
+
+2000-11-27 Kazu Hirata <kazu@hxi.com>
+
+ * aout-adobe.c: Fix formatting.
+ * coff64-rs6000.c: Likewise.
+ * coffgen.c: Likewise.
+ * cofflink.c: Likewise.
+
+2000-11-27 Philip Blundell <pb@futuretv.com>
+
+ * libcoff-in.h (coff_tdata): Add `strings_written' flag.
+ (obj_coff_strings_written): New accessor macro for above.
+ * libcoff.h: Regenerate.
+ * cofflink.c (_bfd_coff_final_link): Say that we wrote the
+ strings.
+ * coffcode.h (coff_write_object_contents): No need to write out
+ the string table if it's already been done.
+
+2000-11-22 Philip Blundell <pb@futuretv.com>
+
+ * cofflink.c (_bfd_coff_generic_relocate_section): Don't object to
+ weak undefined symbols.
+
+2000-11-24 Nick Clifton <nickc@redhat.com>
+
+ * archures.c (bfd_mach_arm_5TE): Define.
+ (bfd_mach_arm+XScale): Define.
+ * bfd-in2.h: Regenerate.
+
+ * coff-arm.c (coff_arm_reloc_type_lookup): Accept
+ BFD_RELOC_ARM_PCREL_BLX.
+
+ * coffcode.h (coff_set_flags): Set flags for 5t, 5te and
+ XScale machine numbers.
+
+ * config.bfd (xscale-elf): Add target.
+ (xscale-coff): Add target.
+
+ * cpu-arm.c: Add xscale machine name.
+ Add v5t, v5te and XScale machine numbers.
+
+2000-11-23 Kazu Hirata <kazu@hxi.com>
+
+ * aix386-core.c: Fix formatting.
+
+2000-11-22 Jim Wilson <wilson@redhat.com>
+
+ * coff-ia64.c (howto_table): Use EMPTY_HOWTO.
+ (in_reloc_p): Add ATTRIBUTE_UNUSED to unused parameters.
+ * cpu-ia64-opc.c (ins_rsvd, ext_rsvd, ins_const, ext_const): Likewise.
+ (ins_imms_scaled): Initialize sign_bit at function entry.
+ (elf64_ia64_operands): Add missing initializers.
+ * elfxx-ia64.c (elfNN_ia64_reloc, elfNN_ia64_reloc_type_lookup,
+ elfNN_ia64_info_to_howto, elfNN_ia64_fake_sections,
+ elfNN_ia64_add_symbol_hook, elfNN_ia64_is_local_label_name,
+ elfNN_ia64_local_hash_table_init, get_fptr, get_pltoff,
+ elfNN_ia64_adjust_dynamic_symbol): Add ATTRIBUTE_UNUSED for unused
+ parameters.
+ (elfNN_ia64_info_to_howto): Initialize free_relocs, free_contents,
+ and free_extsyms at function entry.
+ (elfNN_add_symbol_hook): Add unsigned cast to bfd_get_gp_size result.
+ (elfNN_ia64_create_dynamic_sections): Delete unused local h.
+ (get_got): Delete unused local srel.
+ (elfNN_ia64_check_relocs): Initialize dynrel_type when declared.
+ (elfNN_ia64_relocate_section): Delete unused local dynindx.
+
+2000-11-21 Kazu Hirata <kazu@hxi.com>
+
+ * coff-a29k.c: Fix formatting.
+ * coff-h8500.c: Likewise.
+ * coff-i960.c: Likewise.
+ * coff-ppc.c: Likewise.
+ * coff-rs6000.c: Likewise.
+ * coff-stgo32.c: Likewise.
+ * coff-tic54x.c: Likewise.
+ * coff-w65.c: Likewise.
+ * cpu-h8500.c: Likewise.
+ * cpu-hppa.c: Likewise.
+ * cpu-ns32k.c: Likewise.
+ * ecoff.c: Likewise.
+ * ecofflink.c: Likewise.
+
+2000-11-21 Nick Clifton <nickc@redhat.com>
+
+ * elf32-sh.c (sh_elf_reloc_loop): Fix compile time warning, and
+ remove possibility of infinite loop.
+
+2000-11-20 Kazu Hirata <kazu@hxi.com>
+
+ * aix386-core.c: Fix formatting.
+ * aout-adobe.c: Likewise.
+ * aout-arm.c: Likewise.
+ * aout-encap.c: Likewise.
+ * aout-ns32k.c: Likewise.
+ * aout-target.h: Likewise.
+ * aout-tic30.c: Likewise.
+ * aoutf1.h: Likewise.
+ * aoutx.h: Likewise.
+ * archive.c: Likewise.
+ * bfd-in.h: Likewise.
+ * bfd-in2.h: Likewise.
+ * bfd.c: Likewise.
+ * bout.c: Likewise.
+
+2000-11-17 H.J. Lu <hjl@gnu.org>
+
+ * elfxx-ia64.c (elfNN_ia64_size_dynamic_sections): Don't create
+ pltoff entries for DT_INIT and DT_FINI.
+ (elfNN_ia64_final_link): Don't set DT_INIT/FINI entries.
+ (elfNN_ia64_finish_dynamic_sections): Don't fill in DT_INIT/FINI
+ entries.
+
+2000-11-16 Richard Henderson <rth@redhat.com>
+
+ * elfxx-ia64.c (elfNN_ia64_check_relocs): Handle IPLT relocs.
+ (allocate_dynrel_entries): Likewise.
+ (elfNN_ia64_relocate_section): Likewise. Set REL addends correctly.
+ (set_pltoff_entry): Likewise.
+ (ia64_howto_table): Remove R_IA64_SEGBASE, and R_IA64_EPLT[ML]SB
+ (elfNN_ia64_reloc_type_lookup): Likewise.
+ (elfNN_ia64_install_value): Likewise.
+ (elfNN_ia64_relocate_section): Likewise.
+ * reloc.c (BFD_RELOC_IA64_SEGBASE): Remove.
+ (BFD_RELOC_IA64_EPLTMSB, BFD_RELOC_IA64_EPLTLSB): Remove.
+
+2000-11-16 Kazu Hirata <kazu@hxi.com>
+
+ * cpu-a29k.c: Fix formatting.
+ * cpu-alpha.c: Likewise.
+ * cpu-arm.c: Likewise.
+ * cpu-avr.c: Likewise.
+ * cpu-d10v.c: Likewise.
+ * cpu-h8500.c: Likewise.
+ * cpu-hppa.c: Likewise.
+ * cpu-i370.c: Likewise.
+ * cpu-i386.c: Likewise.
+ * cpu-i960.c: Likewise.
+ * cpu-ia64-opc.c: Likewise.
+ * cpu-ia64.c: Likewise.
+ * cpu-m32r.c: Likewise.
+ * cpu-m68hc11.c: Likewise.
+ * cpu-m68hc12.c: Likewise.
+ * cpu-m68k.c: Likewise.
+ * cpu-m88k.c: Likewise.
+ * cpu-mips.c: Likewise.
+ * cpu-ns32k.c: Likewise.
+ * cpu-pj.c: Likewise.
+ * cpu-powerpc.c: Likewise.
+ * cpu-sh.c: Likewise.
+ * cpu-sparc.c: Likewise.
+ * cpu-tic54x.c: Likewise.
+ * cpu-v850.c: Likewise.
+ * cpu-vax.c: Likewise.
+ * cpu-w65.c: Likewise.
+ * cpu-we32k.c: Likewise.
+ * cpu-z8k.c: Likewise.
+ * dwarf1.c: Likewise.
+ * dwarf2.c: Likewise.
+
+2000-11-15 Kazu Hirata <kazu@hxi.com>
+
+ * coff-arm.c: Fix formatting.
+ * coff-ppc.c: Likewise.
+ * coff-rs6000.c: Likewise.
+ * coff-sh.c: Likewise.
+ * coff-sparc.c: Likewise.
+ * coff-tic30.c: Likewise.
+ * coff-tic54x.c: Likewise.
+ * coff-tic80.c: Likewise.
+ * coff-w65.c: Likewise.
+ * coff-we32k.c: Likewise.
+ * coff-z8k.c: Likewise.
+
+2000-11-15 Richard Henderson <rth@redhat.com>
+
+ * elf64-alpha.c (elf64_alpha_check_relocs): Create the reloc
+ section with the same ALLOC|LOAD flags as the source section.
+
+2000-11-14 Jakub Jelinek <jakub@redhat.com>
+
+ * elf64-alpha.c (elf64_alpha_relax_opt_call): Only check bits used
+ by STO_ALPHA constants.
+
+2000-11-14 Kazu Hirata <kazu@hxi.com>
+
+ * coff-pmac.c: Fix formatting.
+ * coff-ppc.c: Likewise.
+
+2000-11-13 H.J. Lu <hjl@gnu.org>
+
+ * elflink.h (elf_link_add_object_symbols): Also add indirect
+ symbols for common symbols with the default version.
+
+2000-11-09 Philip Blundell <pb@futuretv.com>
+
+ * section.c (STD_SECTION): Set gc_mark flag.
+
+2000-11-11 Kazu Hirata <kazu@hxi.com>
+
+ * coff-i960.c: Likewise.
+ * coff-m68k.c: Likewise.
+ * coff-m88k.c: Likewise.
+ * coff-mcore.c: Likewise.
+ * coff-mips.c: Likewise.
+
+2000-11-11 Bernd Schmidt <bernds@cygnus.co.uk>
+
+ * elf32-sh.c (sh_elf_relocate_section): Ignore R_SH_NONE relocs.
+
+2000-11-10 Kazu Hirata <kazu@hxi.com>
+
+ * coff-h8300.c: Fix formatting.
+ * coff-h8500.c: Likewise.
+ * coff-i386.c: Likewise.
+ * coff-i860.c: Likewise.
+ * coff-i960.c: Likewise.
+ * coff-ia64.c: Likewise.
+
+2000-11-09 Kazu Hirata <kazu@hxi.com>
+
+ * archive.c: Fix formatting.
+ * archures.c: Likewise.
+
+2000-11-07 Richard Henderson <rth@redhat.com>
+
+ * elfxx-ia64.c (elf64_ia64_final_link): New local unwind_output_sec.
+ Set it before bfd_elf64_bfd_final_link call. Use it after the call.
+ * section.c (bfd_set_section_contents): Call memcpy if
+ section->contents set and location not equal to contents plus offset.
+
+2000-11-08 Kazu Hirata <kazu@hxi.com>
+
+ * bfd-in.h: Fix formatting.
+ * bfd-in2.h: Likewise.
+ * bfd.c: Likewise.
+ * binary.c: Likewise.
+ * bout.c: Likewise.
+ * coff-a29k.c: Likewise.
+ * coff-alpha.c: Likewise.
+ * coff-apollo.c: Likewise.
+ * coff-aux.c: Likewise.
+
+2000-11-07 Kazu Hirata <kazu@hxi.com>
+
+ * aix386-core.c: Fix formatting.
+ * aoutf1.h: Likewise.
+ * aoutx.h: Likewise.
+ * archures.c: Likewise.
+ * armnetbsd.c: Likewise.
+
+2000-11-07 Alan Modra <alan@linuxcare.com.au>
+
+ * coff-h8300.c (special): Adjust reloc address.
+
+2000-11-06 Steve Ellcey <sje@cup.hp.com>
+
+ * archures.c (bfd_mach_ia64_elf64, bfd_mach_ia64_elf32): Add defines
+ to differentiate elf32 and elf64 on ia64.
+ * bfd-in2.h: Regenerate.
+ * config.bfd: Add target for "ia64*-*-hpux*".
+ * configure.in: Add bfd_elf32_ia64_big_vec to selvecs switch.
+ * configure: Regenerate.
+ * cpu-ia64.c (bfd_ia64_elf32_arch): Add elf32 arch info structure.
+ * targets.c: Add bfd_target bfd_elf32_ia64_big_vec.
+
+ * Makefile.am: Make elf32-ia64.c and elf64-ia64.c derived objects
+ from elfxx-ia64.c. Add depenency rules for making elf32-ia64.lo.
+ * Makefile.in: Regnerate.
+ * elf64-ia64.c: Deleted.
+ * elfxx-ia64.c: New file, paramaterized version of elf64-ia64.c.
+
+2000-11-06 Kazu Hirata <kazu@hxi.com>
+
+ * aout-adobe.c: Fix formatting.
+ * aout-arm.c: Likewise.
+ * aout-cris.c: Likewise.
+ * aout-encap.c: Likewise.
+ * aout-ns32k.c: Likewise.
+ * aout-target.h: Likewise.
+ * aout-tic30.c: Likewise.
+
+2000-11-05 Philip Blundell <philb@gnu.org>
+
+ * elf32-arm.h (elf32_arm_merge_private_bfd_data): Always permit
+ BFDs containing no sections to be merged, regardless of their flags.
+
+2000-11-04 Philip Blundell <philb@gnu.org>
+
+ * elf32-arm.h (elf32_arm_relocate_section): Suppress error message
+ if a relocation for an undefined symbol also results in an
+ overflow.
+
+2000-11-06 Christopher Faylor <cgf@cygnus.com>
+
+ * config.bfd: Add support for Sun Chorus.
+
+2000-11-05 David O'Brien <obrien@FreeBSD.org>
+
+ * configure.in: Recognize alpha-*-freebsd*.
+ * configure: Regenerate.
+
+2000-11-02 Luciano Gemme <ishitawa@yahoo.com>
+
+ * srec.c (CHUNK): Rename to DEFAULT_CHUNK.
+ (Chunk): New global variable set by a parameter in objcopy.c.
+ (S3Forced): New global variable set by a parameter in
+ objcopy.c.
+ (srec_set_section_contents): If S3Forced is true, always generate
+ S3 records.
+ (srec_write_section): Use 'Chunk' to limit maximum length of S
+ records.
+
+2000-11-02 Per Lundberg <plundis@chaosdev.org>
+
+ * config.bfd: Add support for i[3456]86-chaosdev-storm-chaos.
+ * Makefile.in: Regenerate.
+ * bfd-in2.h: Regenerate.
+ * po/bfd.pot: Regenerate.
+
+2000-10-31 Philip Blundell <philb@gnu.org>
+
+ * elf32-arm.h (elf32_arm_merge_private_bfd_data): Only handle
+ EF_SOFT_FLOAT if it is defined.
+
+2000-10-27 Philip Blundell <philb@gnu.org>
+
+ * elf32-arm.h (elf32_arm_copy_private_bfd_data): Don't refuse
+ attempts to mix PIC code with non-PIC, just mark the output as
+ being position dependent.
+ (elf32_arm_merge_private_bfd_data): Likewise. Print an error
+ message for EF_SOFT_FLOAT mismatches. Display diagnostics for
+ all mismatches, not just the first one.
+
+2000-10-25 Chris Demetriou <cgd@sibyte.com>
+
+ * ieee.c (ieee_archive_p): Plug one of many possible
+ memory leaks in error handling.
+
+2000-10-20 Jakub Jelinek <jakub@redhat.com>
+
+ * elf32-sparc.c (elf32_sparc_merge_private_bfd_data,
+ elf32_sparc_object_p, elf32_sparc_final_write_processing):
+ Support v8plusb.
+ * elf64-sparc.c (sparc64_elf_merge_private_bfd_data,
+ sparc64_elf_object_p): Support v9b.
+ * archures.c: Declare v8plusb and v9b machines.
+ * bfd-in2.h: Ditto.
+ * cpu-sparc.c: Ditto.
+
+2000-10-16 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
+
+ * elf64-sparc.c (sparc64_elf_relocate_section): Clear the location
+ of a GOT reloc.
+
+ * elf32-ppc.c (SYMBOL_REFERENCES_LOCAL): New macro.
+ (SYMBOL_CALLS_LOCAL): New macro.
+ (ppc_elf_adjust_dynamic_symbol): Use SYMBOL_CALLS_LOCAL.
+ (ppc_elf_check_relocs): Use SYMBOL_REFERENCES_LOCAL.
+ (ppc_elf_finish_dynamic_symbol): Use SYMBOL_REFERENCES_LOCAL.
+ (ppc_elf_relocate_section): Use flag variable to determine
+ whether the relocation refers to a local symbol.
+ Test whether a PLTREL24 reloc will produce a reloc by looking
+ to see whether a PLT entry was made.
+
+2000-10-14 Geoffrey Keating <geoffk@shoggoth.cygnus.com>
+
+ * elf32-ppc.c (ppc_elf_finish_dynamic_symbol): Don't make PLT
+ entries that could serve as a definition for a weak symbol.
+
+2000-10-13 Ulf Carlsson <ulfc@engr.sgi.com>
+
+ From Ralf Baechle <ralf@gnu.org>
+
+ * elf32-mips.c (mips_elf_create_dynamic_relocation): New argument
+ local_p. Add symbol value only for non-R_MIPS_REL32 relocations
+ against local symbols.
+ (_bfd_mips_elf_finish_dynamic_sections): Undo patch from 2000-10-01.
+
+2000-10-12 Alan Modra <alan@linuxcare.com.au>
+
+ * section.c (struct sec): Add kept_section.
+ (struct bfd_comdat_info): Remove sec, we can use above.
+ (STD_SECTION): Add initializer.
+ (bfd_make_section_anyway): Init here too.
+
+ * bfd-in2.h: Regenerate.
+
+ * elflink.h (elf_link_add_object_symbols): Remove unnecessary
+ zeroing of `flags'.
+ (elf_link_input_bfd): Set all asection->symbol->value's here, and
+ fudge values for discarded link-once section symbols.
+
+ * elf64-hppa.c: Include alloca-conf.h
+
+2000-10-11 Alan Modra <alan@linuxcare.com.au>
+
+ * elf.c (swap_out_syms): Revert 2000-10-07 changes.
+
+ * ieee.c (ieee_make_empty_symbol): Oops, bfd_zalloc needs another arg.
+
+2000-10-10 Alan Modra <alan@linuxcare.com.au>
+
+ * ieee.c (ieee_make_empty_symbol): Use bfd_zalloc, not bfd_zmalloc.
+
+2000-10-10 Tom Rix <trix@redhat.com>
+
+ * section.c (bfd_make_section_anyway): Release newsect ptr when
+ newsect->symbol fails to alloc. Use bfd_release instead of free.
+
+2000-10-09 Richard Henderson <rth@cygnus.com
+
+ * elf64-ia64.c (elf64_ia64_unwind_entry_compare_bfd): New.
+ (elf64_ia64_unwind_entry_compare): New.
+ (elf64_ia64_final_link): Sort the .IA_64.unwind section.
+
+2000-10-07 Alan Modra <alan@linuxcare.com.au>
+
+ * elflink.h (size_dynamic_sections): Don't create various tags if
+ .dynstr is excluded from the link. Don't set first dynsym entry
+ if dynsymcount is zero.
+ (elf_bfd_final_link): Don't try to swap out dynamic syms if
+ .dynsym excluded from the link. Don't try to write any dynamic
+ sections excluded from the link.
+
+ * elf.c (swap_out_syms): Handle global section symbols.
+
+2000-10-05 DJ Delorie <dj@redhat.com>
+
+ * peigen.c (_bfd_pei_swap_scnhdr_out): note extended relocs
+ * coffcode.h (coff_set_alignment_hook): read extended reloc count
+ (coff_write_relocs): write extended reloc count
+ (coff_write_object_contents): account for extended relocs
+
+2000-10-05 Jim Wilson <wilson@cygnus.com>
+
+ * elf-bfd.h (struct elf_backend_data): Add elf_backend_section_flags
+ field.
+ * elf.c (_bfd_elf_make_section_from_shdr): Call the
+ elf_backend_section_flags function.
+ * elf64-ia64.c (elf64_ia64_section_from_shdr): Delete flag conversion
+ code.
+ (elf64_ia64_section_flags): New function containing flag conversion
+ code.
+ (elf_backend_section_flags): Define to elf64_ia64_section_flags.
+ * elfxx-target.h (elf_backend_section_flags): Define.
+ (elfNN_bed): Initialize elf_backend_section_flags field.
+
+2000-10-02 Alan Modra <alan@linuxcare.com.au>
+
+ * elf32-hppa.c (elf32_hppa_check_relocs): Correct call to
+ _bfd_elf32_gc_record_vtable. Correct a comment.
+
+2000-10-01 Ulf Carlsson <ulfc@engr.sgi.com>
+
+ From Ralf Baechle <ralf@gnu.org>
+
+ * elf32-mips.c (_bfd_mips_elf_finish_dynamic_sections): Mark gld
+ produces binaries with got[1] = 0x80000001 to differenciate them
+ for the dynamic linker from the broken binaries produced by old
+ versions.
+
+2000-09-30 Petr Sorfa <petrs@sco.com>
+
+ * elf.c (elfcore_grok_pstatus): Check for size of pxstatus_t.
+ (elfcore_grok_lwpstatus): Check for size of lwpxstatus_t.
+ * configure.in: Add check for pxstatus_t and lwpxstatus_t.
+ * configure: Regenerate.
+
+2000-09-27 Hans-Peter Nilsson <hp@axis.com>
+
+ Define two bfd_targets for absence and presence of leading
+ underscore on symbols. Make sure to only link same kind.
+ * elf32-cris.c (cris_elf_object_p,
+ cris_elf_final_write_processing, cris_elf_print_private_bfd_data,
+ cris_elf_merge_private_bfd_data): New.
+ (elf_backend_object_p, elf_backend_final_write_processing,
+ bfd_elf32_bfd_print_private_bfd_data,
+ bfd_elf32_bfd_merge_private_bfd_data): Define.
+ <Target vector definition>: Include elf32-target.h twice with
+ different macro settings:
+ (TARGET_LITTLE_SYM): First as bfd_elf32_cris_vec, then as
+ bfd_elf32_us_cris_vec.
+ (TARGET_LITTLE_NAME): First as "elf32-cris", then "elf32-us-cris".
+ (elf_symbol_leading_char): First as 0, then '_'.
+ (INCLUDED_TARGET_FILE): Define for second include of elf32-target.h.
+ * config.bfd (cris-*-*): Add bfd_elf32_us_cris_vec to targ_selvecs.
+ * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vector.
+ * configure: Regenerate.
+ * targets.c: Declare bfd_elf32_us_cris_vec.
+ * po/bfd.pot: Regenerate.
+
+2000-09-29 Momchil Velikov <velco@fadata.bg>
+
+ * elf32-arm.h (arm_add_to_rel): Correctly adjust the addend for
+ R_ARM_THM_PC22 relocations.
+
+2000-09-29 NIIBE Yutaka <gniibe@chroot.org>
+
+ * elflink.h (elf_link_add_object_symbols): Don't bfd_release runpath.
+
+2000-09-29 Momchil Velikov <velco@fadata.bg>
+
+ * elf.c (elf_fake_sections): Do not mark the section SHT_NOBITS if
+ is has the SEC_HAS_CONTENTS flag set.
+
+2000-09-28 Örjan Friberg <orjanf@axis.com>
+ Hans-Peter Nilsson <hp@axis.com>
+
+ * aout-cris.c (N_TXTADDR): Define.
+
+2000-09-28 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * som.c: Include alloca-conf.h.
+ * Makefile.am: "make dep-am"
+ * Makefile.in: Regenerate.
+
+2000-09-27 Alan Modra <alan@linuxcare.com.au>
+
+ * elf32-hppa.c (plt_stub): New.
+ (PLT_STUB_ENTRY): Define.
+ (elf32_hppa_link_hash_table): Change multi_subspace to packed
+ boolean. Add need_plt_stub, has_12bit_branch and has_17bit_branch.
+ (elf32_hppa_link_hash_table_create): Init to suit.
+ (elf32_hppa_check_relocs): Set has_12bit_branch and
+ has_17bit_branch as appropriate.
+ (elf32_hppa_adjust_dynamic_symbol): Set need_plt_stub for
+ non-local functions.
+ (elf32_hppa_size_dynamic_sections): Correct setting of reltext.
+ Add space for plt_stub as needed.
+ (elf32_hppa_finish_dynamic_symbol): Point .plt entries for global
+ functions at plt_stub.
+ (elf32_hppa_finish_dynamic_sections): Write plt_stub.
+ (elf32_hppa_create_dynamic_sections): Leave .plt executable.
+
+ * elf32-hppa.h (elf32_hppa_size_stubs): Add group_size param.
+ * elf32-hppa.c (elf32_hppa_size_stubs): Likewise. Use it instead
+ of fixed size, and if negative, disable handling of input sections
+ before stub section. Set up default stub group size depending
+ on detected branch relocs.
+ (hppa_build_one_stub): Use lrsel and rrsel for import stubs to
+ ensure different offsets from sym_value aren't rounded to
+ different 2k blocks. Use lrsel and rrsel for other stubs too for
+ consistency rather than necessity.
+ (elf32_hppa_check_relocs): Handle R_PARISC_DIR14F.
+ (final_link_relocate): Likewise.
+ (elf32_hppa_relocate_section): Likewise.
+
+ * elf-hppa.h (elf_hppa_howto_table): Add R_PARISC_DIR14F reloc.
+ (_bfd_elf_hppa_gen_reloc_type): Generate them.
+ (elf_hppa_final_link_relocate): Handle them.
+ (elf_hppa_relocate_insn): Likewise.
+ (_bfd_elf_hppa_gen_reloc_type): Add missing e_ldsel and e_rdsel cases.
+
+2000-09-26 Hans-Peter Nilsson <hp@axis.com>
+
+ * elfcode.h (elf_object_p): Preserve and clear abfd section
+ information. Restore at error.
+
+2000-09-26 Paul Sokolovsky <Paul.Sokolovsky@technologist.com>
+
+ * peigen.c (_bfd_pei_swap_aouthdr_in): If some DataDirectory
+ is empty, make sure that its rva also 0. NT loader dislikes
+ having otherwise.
+
+2000-09-26 Steve Ellcey <sje@cup.hp.com>
+
+ * som.c (som_bfd_derive_misc_symbol_info): Make weak symbols
+ global by default.
+
+2000-09-21 Alan Modra <alan@linuxcare.com.au>
+
+ * elf32-hppa.c (elf32_hppa_check_relocs): Fix weak sym handling in
+ currently unused RELATIVE_DYNAMIC_RELOCS code.
+ (hppa_discard_copies): Likewise.
+ (elf32_hppa_size_stubs): Size `input_list' array correctly. Correct
+ comments. Don't check non-code output sections for stub grouping.
+
+2000-09-20 Alan Modra <alan@linuxcare.com.au>
+
+ * section.c (bfd_get_unique_section_name): Return NULL if
+ bfd_malloc fails.
+
+2000-09-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+
+ * elf32-m68k.c (elf_cpu32_plt0_entry): Change the PLT entry 0
+ instruction sequence to actually work.
+ (elf_m68k_finish_dynamic_sections): Change the patch-in offset
+ accordingly.
+
+2000-09-18 Alexandre Oliva <aoliva@redhat.com>
+
+ * elf32-sh.c (sh_elf_relocate_section): Use
+ _bfd_final_link_relocate to apply the relocation against a section
+ symbol, when doing relocatable links.
+
+2000-09-18 Alan Modra <alan@linuxcare.com.au>
+
+ * elf32-hppa.c (elf32_hppa_stub_hash_entry): Rename input_section
+ to id_sec.
+ (stub_hash_newfunc): Here too.
+ (hppa_add_stub): And here.
+ (elf32_hppa_link_hash_table): Remove stub_section_created,
+ reloc_section_created, first_init_sec and first_fini_sec. Add
+ stub_group.
+ (elf32_hppa_link_hash_table_create): Init to suit.
+ (hppa_get_stub_entry): Add support for grouping stub sections.
+ (hppa_add_stub): Likewise. Remove sec_count param and init/fini
+ section code. Index stub vars by section->id.
+ (elf32_hppa_size_stubs): Likewise. Remove duplicated function
+ exit paths. Zap allocation of above removed vars. Refine
+ link-once test.
+
+ * elf32-hppa.h (elf32_hppa_size_stubs): Add output_bfd param.
+ * elf32-hppa.c (elf32_hppa_size_stubs): Likewise.
+ (hppa_get_stub_entry): Pass in pointer to elf32_hppa_link_hash_table
+ rather than pointer to bfd_link_info.
+ (hppa_add_stub): Likewise.
+ (final_link_relocate): Likewise.
+
+2000-09-17 David Huggins-Daines <dhd@linuxcare.com>
+
+ (elf32_hppa_size_stubs): Don't try to build stubs for discarded
+ link-once sections.
+
+2000-09-16 Alexandre Oliva <aoliva@redhat.com>
+
+ * elf32-sh.c (ELF_MAXPAGESIZE): Define to 128, to match
+ ld/emulparams/shelf.sh.
+
+2000-09-10 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+
+ * elf32-m68k.c (bfd_m68k_elf32_create_embedded_relocs): New function.
+ * bfd-in.h (bfd_m68k_elf32_create_embedded_relocs): Add declaration.
+ * bfd-in2.h: Regenerate.
+
+2000-09-15 Kenneth Block <Kenneth.Block@compaq.com>
+
+ * elf64-alpha.c (elf64_alpha_relax_with_lituse): ld performs
+ LITUSE relocations incorrectly if -relax is specified on the ld
+ command line and the displacement field of the load or store
+ instruction is non-zero. (Patch by paul.winalski@compaq.com)
+
+2000-09-15 Alan Modra <alan@linuxcare.com.au>
+
+ * elf32-hppa.c (hppa_add_stub): Dont set first_init_sec and
+ first_fini_sec here.
+ (elf32_hppa_size_stubs): Instead correctly find the first .init
+ and .fini section here.
+
+2000-09-15 David Huggins-Daines <dhd@linuxcare.com>
+
+ * elf32-hppa.c (clobber_millicode_symbols): New function.
+ (elf32_hppa_size_dynamic_sections): Call it.
+
+2000-09-14 Alan Modra <alan@linuxcare.com.au>
+
+ * elf32-hppa.c (elf32_hppa_link_hash_entry): Make pic_call
+ packed. Add plabel, plt_abs packed booleans.
+ (hppa_link_hash_newfunc): Init new fields.
+ (PLABEL_PLT_ENTRY_SIZE): Define.
+ (hppa_stub_name): Use size_t len vars.
+ (hppa_add_stub): Likewise.
+ (elf32_hppa_build_stubs): Likewise.
+ (hppa_build_one_stub): Kill some compiler warnings.
+ (elf32_hppa_check_relocs): Always generate a plt entry for PLABELs
+ if dynamic linking. Munge the local plt offsets into
+ local_got_refcounts. Set h->plabel for all global PLABELs. Use
+ size_t len vars. Add assert for plabel addend.
+ (elf32_hppa_gc_sweep_hook): Sweep local plt entries too.
+ (elf32_hppa_hide_symbol): New function.
+ (elf_backend_hide_symbol): Define.
+ (elf32_hppa_adjust_dynamic_symbol): Don't throw away plt entries
+ with h->plabel set. Don't make plt entries to have dynamic syms
+ when they have been forced local. If plt entry is used by a
+ plabel, make it PLABEL_PLT_ENTRY_SIZE.
+ (elf32_hppa_size_dynamic_sections): Set plt_abs for init fns.
+ Set up .plt offsets for local syms.
+ (elf32_hppa_relocate_section): Initialise plt entries for local
+ syms. Leave weak undefined plabels zero. Make global plabel
+ relocs against function symbol, and leave the addend zero.
+ Use *ABS* DIR32 relocs instead of SEGREL32 for dynamic got relocs.
+ (elf32_hppa_finish_dynamic_symbol): Set up IPLT relocs for
+ non-dynamic syms. Init extra plt for plabels. Use *ABS* DIR32
+ relocs instead of SEGREL32 for dynamic got relocs.
+ (elf32_hppa_finish_dynamic_sections): Reserve one more .got entry.
+ (elf_backend_got_header_size): Adjust.
+ (elf32_hppa_set_gp): Calculate an "ideal" LTP.
+
+ * elf32-hppa.c (LONG_BRANCH_VIA_PLT): Define.
+ (hppa_type_of_stub): Use it instead of #if 0
+ (hppa_discard_copies): Use it here too.
+ (elf32_hppa_size_dynamic_sections): And here.
+
+ * elf32-hppa.c (elf32_hppa_link_hash_table): Remove `offset' field.
+ (elf32_hppa_link_hash_table_create): And here.
+ (hppa_build_one_stub): And here. Instead keep track of stub
+ offset using _raw_size.
+ (elf32_hppa_size_stubs): Likewise.
+ (elf32_hppa_build_stubs): Likewise.
+ (hppa_size_one_stub): Likewise. Resize reloc section too.
+
+ * elf32-hppa.c (hppa_add_stub): Correct first_init_sec and
+ first_fini_sec handling. Don't search for reloc section or set
+ hplink->reloc_section_created here.
+ (elf32_hppa_size_stubs): Instead search for reloc sections, and
+ set reloc_section_created here.
+ (hppa_handle_PIC_calls): Set ELF_LINK_HASH_NEEDS_PLT.
+ (elf32_hppa_size_dynamic_sections): Make a .plt entry for DT_INIT
+ and DT_FINI.
+ (elf32_hppa_finish_dynamic_sections): Set DT_INIT and DT_FINI.
+
+ * elf32-hppa.c (hppa_build_one_stub): Replace `elf_hash_table (info)'
+ with `hplink->root.'.
+ (elf32_hppa_check_relocs): Likewise.
+ (elf32_hppa_gc_sweep_hook): Likewise.
+ (elf32_hppa_adjust_dynamic_symbol): Likewise.
+ (hppa_handle_PIC_calls): Likewise.
+ (elf32_hppa_size_dynamic_sections): Likewise.
+ (elf32_hppa_set_gp): Likewise.
+ (elf32_hppa_relocate_section): Likewise.
+ (elf32_hppa_finish_dynamic_symbol): Likewise.
+ (elf32_hppa_finish_dynamic_sections): Likewise.
+
+ From David Huggins-Daines <dhd@linuxcare.com>
+ * elf32-hppa.c (hppa_type_of_stub): Generate import stubs for
+ defined weak symbols in shared links.
+ (final_link_relocate): Calls to defined weak symbols in shared
+ objects must go via import stubs, as the target might not be known
+ at link time.
+
+2000-09-14 Alexandre Oliva <aoliva@redhat.com>
+
+ * elf32-sh.c (sh_elf_howto_table): Moved R_SH_GOT32, R_SH_PLT32,
+ R_SH_COPY, R_SH_GLOB_DAT, R_SH_JMP_SLOT, R_SH_RELATIVE,
+ R_SH_GOTOFF, R_SH_GOTPC) to the range from 160 to 167. Replaced
+ the original entries with EMPTY_HOWTOs, and added new ones to fill
+ in the gap.
+ (sh_elf_info_to_howto): Make sure the new gap isn't used.
+ (sh_elf_relocate_section): Likewise.
+
+2000-09-13 Anders Norlander <anorland@acc.umu.se>
+
+ * cpu-mips.c (arch_info_struct): Add mips:4K
+ * bfd-in2.h (bfd_mach_mips4K): New define.
+ * archures.c: Add bfd_mach_mips4K to comment.
+ * elf32-mips.c (_bfd_mips_elf_final_write_processing): Return
+ E_MIPS_ARCH_2 for bfd_mach_mips4K.
+
+2000-09-13 Marco Franzen <marcof@thyron.com>
+
+ * som.c (som_write_symbol_strings): Do not used fixed buffers,
+ use size_t as a counter.
+ (som_write_space_strings): Similarly.
+
+2000-09-12 Jason Eckhardt <jle@cygnus.com>
+
+ * elf32-i860.c (elf32_i860_relocate_pc26): New function
+ and prototype.
+ (elf32_i860_relocate_section): Invoke new function from here.
+
+2000-09-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+
+ * elf.c (_bfd_elf_make_section_from_shdr): Make debug_sec_names
+ static.
+
+2000-09-10 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+
+ * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): Emit 8 NULs for
+ target section name instead of dumping core when the target symbol is
+ undefined.
+
+2000-09-09 Kazu Hirata <kazu@hxi.com>
+
+ * riscix.c: Remove DEFUN.
+
+2000-09-08 Nick Clifton <nickc@redhat.com>
+
+ * elf32-arm.h (elf32_arm_merge_private_bfd_data): Do not
+ initialise flags in output bfd if the input bfd is the default
+ architecture with the default flags.
+
+2000-09-08 Kazu Hirata <kazu@hxi.com>
+
+ * archive.c: Fix formatting.
+ * coff-arm.c: Likewise.
+ * doc/chew.c: Likewise.
+
+2000-09-08 Alan Modra <alan@linuxcare.com.au>
+
+ * section.c (bfd_get_unique_section_name): Put a dot before the
+ numeric suffix.
+
+2000-09-07 Kazu Hirata <kazu@hxi.com>
+
+ * doc/chew.c: Remove all uses of DEFUN and DEFUN_VOID.
+ * elf.c: Fix formatting.
+
+2000-09-07 Alexandre Oliva <aoliva@redhat.com>
+
+ * config.bfd (sh-*-linux*): Added.
+ * configure.in (bfd_elf32_shlin_vec, bfd_elf32_shblin_vec): New.
+ * targets.c: Declare them.
+ * elf32-sh-lin.c: New file.
+ * Makefile.am: Compile it.
+ * elf32-sh.c: Don't override defines from elf32-sh-lin.c.
+ * configure, Makefile.in: Rebuilt.
+
+2000-09-06 Geoffrey Keating <geoffk@cygnus.com>
+
+ * xcofflink.c (xcoff_link_input_bfd): Include the .tocbss
+ pseduo-section when determining where the TOC ends.
+
+ * coff-rs6000.c (_bfd_xcoff_swap_aux_out): Use bfd_h_put_16 to
+ output x_tvndx as it is only two bytes wide.
+
+ * coff-rs6000.c (xcoff_howto_table): A modifiable branch-absolute
+ reloc is 26 or 32 bits wide.
+
+ * coff-rs6000.c (_bfd_xcoff_rtype2howto): The bitsize is irrelevant
+ for relocs that don't change anything. Also look at the full
+ 6 bits of bitsize.
+
+2000-09-06 Philip Blundell <philb@gnu.org>
+
+ * config.bfd (arm*-*-uclinux*): New target.
+
+2000-09-06 Alexandre Oliva <aoliva@redhat.com>
+
+ * configure: Rebuilt with new libtool.m4.
+
+2000-09-06 Alan Modra <alan@linuxcare.com.au>
+
+ * section.c (bfd_get_unique_section_name): Avoid c++ reserved
+ word for variable name.
+ * bfd-in2.h: Regenerate.
+
+2000-09-05 Nick Clifton <nickc@redhat.com>
+
+ * config.in: Regenerate.
+ * libbfd.h: Regenerate.
+ * po/bfd.pot: Regenerate.
+ * doc/bfdint.texi: Remove CVS date string - it foils compares with
+ local versions.
+
+2000-09-05 Steven Johnson <sbjohnson@ozemail.com.au>
+
+ * cpu-powerpc.c (arch_info_struct): Added MPC860 Family entry.
+
+2000-09-05 Alan Modra <alan@linuxcare.com.au>
+
+ Shared library and PIC support.
+ * elf32-hppa.c (PLT_ENTRY_SIZE): New.
+ (GOT_ENTRY_SIZE): New.
+ (ELF_DYNAMIC_INTERPRETER): New.
+ (STUB_SUFFIX): Define.
+ (LONG_BRANCH_PIC_IN_SHLIB): Define.
+ (RELATIVE_DYNAMIC_RELOCS): Define.
+ (enum elf32_hppa_stub_type): New.
+ (struct elf32_hppa_stub_hash_entry): Rename offset to
+ stub_offset. Add a number of new fields.
+ (struct elf32_hppa_link_hash_entry): New.
+ (struct elf32_hppa_link_hash_table): Add numerous fields. Remove
+ global_value.
+ (elf32_hppa_hash_table): Rename to hppa_link_hash_table.
+ (elf32_hppa_stub_hash_lookup): Rename to hppa_stub_hash_lookup.
+ (elf32_hppa_stub_hash_newfunc): Rename to stub_hash_newfunc. Init
+ new fields.
+ (hppa_link_hash_newfunc): New function.
+ (elf32_hppa_link_hash_table_create): Use above function. Init new
+ fields.
+ (elf32_hppa_stub_name): Rename to hppa_stub_name. Pass in reloc
+ instead of addend, and remove sym_name from args. Don't use
+ symbol name for local syms, instead use sym index.
+ (elf32_hppa_size_of_stub): Rename to hppa_type_of_stub, and return
+ stub type rather than size. Pass in hash and handle import stub
+ case. Also pass in reloc instead of offset so we can calculate
+ PCREL22F and PCREL12F branches properly.
+ (elf32_hppa_build_one_stub): Rename to hppa_build_one_stub. Build
+ import and export stubs too.
+ (elf32_hppa_size_one_stub): Rename to hppa_size_one_stub. Handle
+ import and export stub sizing.
+ (elf32_hppa_check_relocs): New function.
+ (elf32_hppa_adjust_dynamic_symbol): New function.
+ (hppa_discard_copies): New function.
+ (elf32_hppa_size_dynamic_sections): New function.
+ (elf_backend_size_dynamic_sections): Define.
+ (elf32_hppa_finish_dynamic_symbol): New function.
+ (elf_backend_finish_dynamic_symbol): Define.
+ (elf32_hppa_size_stubs): Stash params in link hash table, and move
+ some local vars into the link hash table too. For shared links,
+ trundle over function syms, generating export stubs. Handle
+ PCREL22F branches. Break out stub creation code from here..
+ (hppa_add_stub): .. to here. New function.
+ (elf32_hppa_final_link): Rename to elf32_hppa_set_gp, and don't
+ call the bfd linker. Use elf_gp to record global pointer.
+ Calculate a value from sections if $global$ is missing.
+ (bfd_elf32_bfd_final_link): Define as _bfd_elf32_gc_common_final_link.
+ (elf32_hppa_gc_mark_hook): New function.
+ (elf_backend_gc_mark_hook): Define.
+ (elf32_hppa_gc_sweep_hook): New function.
+ (elf_backend_gc_sweep_hook): Define.
+ (elf32_hppa_bfd_final_link_relocate): Rename to final_link_relocate.
+ Add rel to args, and remove howto, input_bfd, offset, addend,
+ sym_name as we can recalculate these locally. Handle calls to
+ dynamic objects, extra PIC relocs, PCREL22F branches. Change
+ handling of undefined weak syms. Check that stubs are in range.
+ Only look for import stubs on PCREL17F and PCREL22F relocs. Add
+ message on hitting a DPREL21L reloc that needs fixing. Subtract
+ off PC for PCREL14F. Break out code that does a stub lookup from
+ here..
+ (hppa_get_stub_entry): ..to here. New function.
+ (elf32_hppa_relocate_insn): Merge into final_link_relocate.
+ (elf32_hppa_relocate_section): Handle got and plt relocs, dynamic
+ relocs, etc. etc.
+ (elf32_hppa_finish_dynamic_sections): New function.
+ (elf_backend_finish_dynamic_sections): Define.
+ (elf_backend_final_write_processing) Define.
+ (hppa_handle_PIC_calls): New function.
+ (elf32_hppa_build_stubs): Call it. Pass link_info to
+ hppa_build_one_stub.
+ (elf32_hppa_create_dynamic_sections): New function
+ to create .plt and .got then set .plt flags correctly.
+ (elf_backend_create_dynamic_sections): Define.
+ (elf32_hppa_object_p): New function.
+ (elf_backend_object_p): Define.
+ (elf32_hppa_elf_get_symbol_type): New function.
+ (elf_backend_get_symbol_type): Define.
+ (elf_backend_can_gc_sections): Define.
+ (elf_backend_want_got_plt): Define.
+ (elf_backend_plt_alignment): Set to 2.
+ (elf_backend_plt_readonly): Define.
+ (elf_backend_want_plt_sym): Define.
+ (elf_backend_got_header_size): Reserve one entry.
+
+ * elf32-hppa.h (elf32_hppa_build_stubs): Don't pass stub bfd.
+ (elf32_hppa_size_stubs): Pass in multi_subspace.
+ (elf32_hppa_set_gp): Declare.
+
+ * section.c (SEC_HAS_GOT_REF): Define new flag for asection.
+ (bfd_get_unique_section_name): New function.
+ * bfd-in2.h: Regenerate.
+
+ * elf64-hppa.c (elf64_hppa_check_relocs): Handle R_PARISC_PCREL12F.
+ (elf64_hppa_size_dynamic_sections): Remove the FIXME at bfd_zalloc
+ comment.
+
+ From David Huggins-Daines <dhd@linuxcare.com>
+ * elf64-hppa.c (elf64_hppa_check_relocs): Fix a warning.
+ (elf64_hppa_mark_exported_functions): Set dyn_h->st_shndx.
+ (elf64_hppa_link_output_symbol_hook): Test dyn_h->st_shndx has
+ been updated in finish_dynamic_symbol before modifying function
+ symbol.
+
+ * elf-hppa.h (elf_hppa_howto_table): Restructure into groups of
+ eight entries. Replace NULL with bfd_elf_generic_reloc. Add
+ R_PARISC_GNU_VTENTRY, R_PARISC_GNU_VTINHERIT and R_PARISC_PCREL12F.
+ (_bfd_elf_hppa_gen_reloc_type): Handle R_PARISC_GNU_VT*. Add some
+ comments. Handle format == 12 for R_HPPA_PCREL_CALL.
+ (elf_hppa_final_link_relocate): Handle R_PARISC_PCREL12F.
+ (elf_hppa_relocate_insn): Likewise. Reformat some comments.
+ (elf_hppa_final_write_processing): Expose it for ARCH_SIZE == 32.
+
+ From David Huggins-Daines <dhd@linuxcare.com>
+ * elf-hppa.h (elf_hppa_is_local_label_name): Accept the SysV/ELF
+ style of local labels as well.
+
+2000-09-03 Philip Blundell <philb@gnu.org>
+
+ * elf32-arm.h (elf32_arm_relocate_section): Don't try to relocate
+ references to undefined symbols in debugging sections.
+
+2000-09-02 H.J. Lu <hjl@gnu.org>
+
+ * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
+ BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE,
+ BFD_RELOC_SH_GOTPC): Move them from the MIPS section to the SH
+ section.
+
+2000-09-02 Jason Eckhardt <jle@cygnus.com>
+
+ * elf32-i860.c (bfd_elf32_bfd_is_local_label_name): Define macro.
+ (elf32_i860_is_local_label_name): New function and prototype.
+
+2000-09-02 Nick Clifton <nickc@redhat.com>
+
+ * configure.in: Increase version number to 2.10.91.
+ * configure: Regenerate.
+ * aclocal.m4: Regenerate.
+ * config.in: Regenerate.
+ * po/bfd.pot: Regenerate.
+
+2000-09-02 Daniel Berlin <dberlin@redhat.com>
+
+ * elf.c (_bfd_elf_make_section_from_shdr): Add
+ .gnu.linkobce.wi. to the list of debug section names.
+
+2000-09-02 Nick Clifton <nickc@redhat.com>
+
+ * dwarf2.c (find_debug_info): New function: Locate a section
+ containing dwarf2 debug information.
+ (bfd_dwarf2_find_nearest_line): Find all sections containing
+ debug information and include them in the stash.
+
+2000-09-01 Niibe Yutaka <gniibe@m17n.org>, Kaz Kojima <kkojima@rr.iij4u.or.jp>, Alexandre Oliva <aoliva@redhat.com>
+
+ * elf32-sh.c (R_SH_GOT32, R_SH_PLT32, R_SH_COPY, R_SH_GLOB_DAT,
+ R_SH_JMP_SLOT, R_SH_RELATIVE, R_SH_GOTOFF, R_SH_GOTPC): New.
+ (sh_reloc_map): Add new relocs.
+ (sh_elf_check_relocs, sh_elf_link_hash_newfunc,
+ sh_elf_link_hash_table_create, sh_elf_adjust_dynamic_symbol,
+ sh_elf_size_dynamic_sections, sh_elf_finish_dynamic_symbol,
+ sh_elf_finishe_dynamic_sections, sh_elf_discard_copies): New
+ functions.
+ (ELF_DYNAMIC_INTERPRETER, PLT_ENTRY_SIZE): Define.
+ (elf_sh_plt0_entry_be, elf_sh_plt0_entry_le,
+ elf_sh_plt_entry_be, elf_sh_plt_entry_le,
+ elf_sh_pic_plt_entry_be, elf_sh_pic_plt_entry_le):
+ New array constants.
+ (elf_sh_plt0_entry, elf_sh_plt_entry, elf_sh_pic_plt_entry):
+ New variables.
+ (elf_sh_sizeof_plt, elf_sh_plt_plt0_offset,
+ elf_sh_plt0_linker_offset, elf_sh_plt0_gotid_offset,
+ elf_sh_plt_temp_offset, elf_sh_plt_symbol_offset,
+ elf_sh_plt_reloc_offset): Define.
+ (elf_sh_pcrel_relocs_copied, elf_sh_link_hash_entry,
+ elf_sh_link_hash_table): New structs.
+ (sh_elf_link_hash_traverse, sh_elf_hash_table): New macros.
+ (sh_elf_relocate_section, sh_elf_check_relocs): Handle new
+ relocation types.
+ (elf_backend_create_dynamic_sections,
+ bfd_elf32_bfd_link_hash_table_create,
+ elf_backend_adjust_dynamic_symbol,
+ elf_backend_size_dynamic_sections,
+ elf_backend_finish_dynamic_symbol,
+ elf_backend_finish_dynamic_sections, elf_backend_want_got_plt,
+ elf_backend_plt_readonly, elf_backend_want_plt_sym,
+ elf_backend_got_header_size, elf_backend_plt_header_size):
+ Define.
+ * reloc.c (BFD_RELOC_SH_COPY, BFD_RELOC_SH_GLOB_DAT,
+ BFD_RELOC_SH_JMP_SLOT, BFD_RELOC_SH_RELATIVE, BFD_RELOC_SH_GOTPC):
+ New relocs.
+ * bfd-in2.h, libbfd.h: Rebuilt.
+
+2000-09-01 Alan Modra <alan@linuxcare.com.au>
+
+ * elf32-i386.c (elf_i386_finish_dynamic_symbol): Revert 2000-08-27
+ change.
+
+2000-08-31 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * elf32-sh.c (sh_elf_merge_private_data): If ibfd's elf header flags
+ not initialized, set them to indicate the SH1 instruction set.
+
+2000-08-31 Alexandre Oliva <aoliva@redhat.com>
+
+ * acinclude.m4: Include libtool and gettext macros from the
+ top level.
+ * aclocal.m4, configure: Rebuilt.
+
+2000-08-29 Michael Snyder <msnyder@seadog.cygnus.com>
+
+ * elf.c: Eliminate references to __sparcv9 macro; replace with
+ autoconf variables HAVE_PSINFO32_T etc.
+ * configure.in: Auto-configure HAVE_PSINFO_32_T, HAVE_PRPSINFO32_T,
+ HAVE_PSTATUS32_T, HAVE_PRSTATUS32_T, HAVE_PRSTATUS32_T_PR_WHO.
+ * config.in: Ditto.
+ * acinclude.m4 (BFD_HAVE_SYS_PROCFS_TYPE) define _SYSCALL32 so it can
+ detect the above typedefs. (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Ditto.
+ * aclocal.m4: Ditto.
+ * configure: Regenerate.
+
+2000-08-27 Alan Modra <alan@linuxcare.com.au>
+
+ * elf32-i386.c (elf_i386_check_relocs): Keep info on relocs copied
+ for any shared link, not just shared -Bsymbolic.
+ (elf_i386_size_dynamic_sections): Call elf_i386_discard_copies on
+ any shared link, and pass link info to it.
+ (elf_i386_size_dynamic_sections): Update comment.
+ (elf_i386_discard_copies): Modify to discard relocs for symbols
+ that have been forced local.
+ (elf_i386_finish_dynamic_symbol): Don't copy relocs for symbols
+ that have been forced local.
+
+2000-08-24 Denis Chertykov <denisc@overta.ru> & Nick Clifton <nickc@redhat.com>
+
+ * elflink.h (elf_link_add_object_symbols): Allow common
+ symbols to have an alignment of 1 if explicitly requested, and
+ not overridden by other definitions.
+
+2000-08-22 Doug Kwan <dkwan@transmeta.com>
+
+ * coff-w65.c (CREATE_LITTLE_COFF_TARGET): Fix typo.
+ * coffcode.h (coff_set_flags): Add detection of w65 architecture.
+
+2000-08-22 H.J. Lu <hjl@gnu.org>
+
+ * elf-bfd.h (elf_link_hash_table): Add runpath.
+
+ * bfd-in.h (bfd_elf_get_runpath_list): New prototype.
+ * bfd-in2.h: Rebuilt.
+
+ * elf.c (_bfd_elf_link_hash_table_init): Initialize the
+ "runpath" field to NULL.
+ (bfd_elf_get_runpath_list): New function.
+
+ * elflink.h (elf_link_add_object_symbols): Record DT_RPATH and
+ DT_RUNPATH entries.
+
+2000-08-22 Alexandre Oliva <aoliva@redhat.com>
+
+ * elf32-sh.c (sh_elf_relocate_section) [R_SH_IND12W,
+ R_SH_DIR8WPN, R_SH_DIR8WPZ, R_SH_DIR8WPL]: Handle them
+ explicitly. Improve validation of r_type.
+
+2000-08-21 H.J. Lu <hjl@gnu.org>
+
+ * elf32-i386.c (elf_i386_size_dynamic_sections): Zero out the
+ dynamic allocated content space. Add a comment to remind us that
+ one day this ought to be fixed.
+ * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
+ * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
+ * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
+
+2000-08-21 Jason Eckhardt <jle@cygnus.com>
+
+ * elf32-i860.c (elf32_i860_relocate_pc16): Just write the immediate
+ field with the newly relocated value instead of adding it to the
+ existing immediate field.
+ (elf32_i860_relocate_splitn): Likewise.
+ (elf32_i860_relocate_highadj): Likewise.
+
+2000-08-16 Jason Eckhardt <jle@cygnus.com>
+
+ * elf32-i860.c (elf32_i860_relocate_pc16): Implemented function (it
+ was previously just a stub).
+
+2000-08-16 Alexandre Oliva <aoliva@redhat.com>
+
+ * elflink.c (_bfd_elf_create_got_section): Don't abort().
+ Formatting fixes.
+ (_bfd_elf_create_dynamic_sections): Likewise.
+
+2000-08-16 Andrew Macleod <amacleod@cygnus.com>
+
+ * elf64-sparc.c (sparc64_elf_relocate_section): Set relocation address
+ for undefined symbols to be the beginning of the section.
+
+ * elf64-sparc.c (sparc64_elf_adjust_dynamic_symbol): Don't allocate
+ four extra entries at the beginning of the .rela.plt section.
+ (sparc64_elf_finish_dynamic_symbol): Adjust the offset in the .rela.plt
+ section to account for the four reserved entries in the .plt section.
+
+2000-08-15 Geoffrey Keating <geoffk@cygnus.com>
+
+ * xcofflink.c (_bfd_ppc_xcoff_relocate_section): Add ori r0,r0,0
+ to the list of NOPs we recognize after a branch-and-link.
+ Use the ori NOP when one is needed.
+
+ * coff-rs6000.c (_bfd_xcoff_slurp_armap): Finish implementation
+ for large archives.
+
+2000-08-14 Jim Wilson <wilson@cygnus.com>
+
+ * elf64-ia64.c (elf64_ia64_merge_private_bfd_data): Handle
+ EF_IA_64_REDUCEDFP, EF_IA_64_CONS_GP, and EF_IA_64_NOFUNCDESC_CONS_GP.
+ (elf64_ia64_print_private_bfd_data): Likewise. Also handle
+ EF_IA_64_ABSOLUTE.
+
+2000-08-11 Alexandre Oliva <aoliva@redhat.com>
+
+ * elf32-sh.c (sh_elf_set_mach_from_flags): Make it static.
+
+2000-08-10 Jason Eckhardt <jle@cygnus.com>
+
+ * elf32-i860.c (elf32_i860_relocate_section): New function.
+ (i860_final_link_relocate): New function.
+ (elf32_i860_relocate_splitn): New function.
+ (elf32_i860_relocate_pc16): New function.
+ (elf32_i860_relocate_highadj): New function.
+ (elf32_i860_howto): Minor adjustments to some relocations.
+ (elf_info_to_howto_rel): Define.
+ (elf_backend_relocate_section): Define.
+
+2000-08-10 Nick Clifton <nickc@cygnus.com>
+
+ * elf32-arm.h: Fix formatting.
+
+2000-08-10 Bernd Schmidt <bernds@cygnus.co.uk>
+
+ * elf32-sh.c (sh_elf_reloc_loop): Make LAST_SYMBOL_SECTION static.
+
+2000-08-08 Jason Eckhardt <jle@cygnus.com>
+
+ * elf32-i860.c (elf32_i860_howto_table): Updated some fields.
+
+2000-08-07 Kazu Hirata <kazu@hxi.com>
+
+ * ieee.c (ieee_write_debug_part): Rewrite a comment.
+ * elf64-ia64.c: Fix a typo.
+
+2000-08-05 Jason Eckhardt <jle@cygnus.com>
+
+ * elf32-i860.c (elf32_i860_howto_table): New structure.
+ (lookup_howto): New function.
+ (elf32_i860_reloc_type_lookup): New function.
+ (elf32_i860_info_to_howto_rela): New function.
+ (elf_code_to_howto_index): New structure.
+ (elf_info_to_howto): Re-define as elf32_i860_info_to_howto_rela.
+ (bfd_elf32_bfd_reloc_type_lookup): Re-define as
+ elf32_i860_reloc_type_lookup.
+
+2000-08-04 Rodney Brown <RodneyBrown@pmsc.com>
+
+ * som.c (struct fixup_format): Constify `format'.
+ (som_hppa_howto_table): Use SOM_HOWTO macro.
+ (try_prev_fixup, hppa_som_reloc): Decorate unused parameter.
+ (som_bfd_reloc_type_lookup): Likewise.
+ (compare_subspaces): Remove unused `count1', `count2'.
+ (som_begin_writing): Remove unused `total_reloc_size'.
+ (som_bfd_derive_misc_symbol_info): Decorate unused parameter.
+ (som_print_symbol, som_bfd_is_local_label_name): Likewise.
+ (som_set_reloc_info): Constify `cp'. Remove unused `addend'.
+ (som_find_nearest_line): Decorate unused parameter(s).
+ (som_sizeof_headers, som_get_symbol_info, som_write_armap): Likewise.
+ (som_bfd_link_split_section): Likewise.
+
+2000-08-03 Nick Clifton <nickc@cygnus.com>
+
+ * section.c: Restore backed out code.
+ * elf.c: Restore backed out code.
+ (copy_private_bfd_data): Fix bug preventing stipped dynamic
+ binaries from working.
+ * bfd-in2.h: Regenerate.
+
+2000-08-03 H.J. Lu <hjl@gnu.org>
+
+ * section.c: Back out the change made by Nick Clifton
+ <nickc@cygnus.com> on 2000-07-31. It breaks stripping dynamic
+ binaries.
+ * bfd-in2.h: Likewise.
+ * elf.c: Likewise.
+
+2000-08-03 Alexandre Oliva <aoliva@redhat.com>
+
+ * elf32-sh.c (sh_elf_reloc_loop): Warning removal.
+
+2000-07-31 Jason Eckhardt <jle@cygnus.com>
+
+ * reloc.c (BFD_RELOC_860_*): New bfd relocs for i860.
+ * bfd-in2.h, libbfd.h: Regenerate.
+
+2000-07-31 Nick Clifton <nickc@cygnus.com>
+
+ * section.c (struct sec): Add new boolean field 'segment_mark'.
+ (STD_SECTION): Initialise new field to zero.
+
+ * bfd-in2.h: Regenerate.
+
+ * elf.c (copy_private_bfd_data): Reorganise section to segment
+ mapping to cope with moved sections requiring new segments,
+ and overlapping segments.
+ (SEGMENT_END): New macro: Return the end address of a segment.
+ (IS_CONTAINED_BY_VMA): New macro: Determine if a segment
+ contains a section by comparing their VMA addresses.
+ (IS_CONTAINED_BY_LMA): New macro: Determine if a segment
+ contains a section by comparing their LMA addresses.
+ (INCLUDE_SECTION_IN_SEGMENT): New macro: Determine if a
+ section should be included in a segment.
+ (SEGMENT_AFTER_SEGMENT): New macro: Determine if one segment
+ follows another in memory.
+ (SEGMENT_OVERLAPS_SEGMENT): New macro: Determine if two
+ segments overlap.
+
+2000-07-22 Jason Eckhardt <jle@cygnus.com>
+
+ * cpu-i860.c: Added comments.
+
+ * elf32-i860.c (TARGET_LITTLE_SYM): Defined to
+ bfd_elf32_i860_little_vec.
+ (TARGET_LITTLE_NAME): Defined to "elf32-i860-little".
+ (ELF_MAXPAGESIZE): Changed to 4096.
+
+ * targets.c (bfd_elf32_i860_little_vec): Declaration of
+ new target.
+ (bfd_target_vector): Added bfd_elf32_i860_little_vec.
+
+ * config.bfd (i860-stardent-sysv4*, i860-stardent-elf*): Added
+ config for little endian elf32 i860.
+ (targ_defvec): Define for the new config above
+ as "bfd_elf32_i860_little_vec".
+ (targ_selvecs): Define for the new config above
+ as "bfd_elf32_i860_vec bfd_elf32_i860_little_vec"
+
+ * configure.in (bfd_elf32_i860_little_vec): Added recognition
+ of new target vec.
+
+ * configure: Regenerated.
+
+2000-07-27 H.J. Lu <hjl@gnu.org>
+
+ * elflink.h (elf_merge_symbol): Take one more argument,
+ dt_needed, to indicate if the symbol comes from a DT_NEEDED
+ entry. Don't overide the existing weak definition if dt_needed
+ is true.
+ (elf_link_add_object_symbols): Pass dt_needed to
+ elf_merge_symbol ().
+
+2000-07-27 Nick Clifton <nickc@cygnus.com>
+
+ * elflink.h (elf_link_size_reloc_section): Zeroes the section's
+ allocated contents.
+
+2000-07-25 Geoffrey Keating <geoffk@cygnus.com>
+
+ * configure.host (*-*-aix*): AIX has 'long long' always.
+
+ * coff-rs6000.c (xcoff_write_one_armap_big): New procedure.
+ (xcoff_write_armap_big): Write both 32-bit and 64-bit armaps.
+ (xcoff_write_archive_contents_big): Don't update the offset
+ of the symbol table, xcoff_write_armap will do it.
+
+2000-07-23 Ulf Carlsson <ulfc@engr.sgi.com>
+
+ * elf32-mips.c (_bfd_mips_elf_check_relocs): Use abfd instead
+ of dynobj for SGI_COMPAT checks.
+
+2000-07-21 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+
+ * coff-m68k.c (bfd_m68k_coff_create_embedded_relocs): New function.
+ * bfd-in.h (bfd_m68k_coff_create_embedded_relocs): Add declaration.
+ * bfd-in2.h: Regenerate.
+
+2000-07-21 Nick Clifton <nickc@cygnus.com>
+
+ * elf32-mips.c (_bfd_mips_elf_check_relocs): Detect out of
+ range symbol indices in relocs and issue an error message.
+
+2000-07-20 H.J. Lu <hjl@gnu.org>
+
+ * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Don't check
+ info->new_dtags when setting DT_FLAGS_1. It will only be set
+ by the new linker options. It shouldn't break anything.
+
+2000-07-20 H.J. Lu <hjl@gnu.org>
+
+ * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set DT_FLAGS_1
+ only if info->new_dtags is true.
+
+2000-07-20 H.J. Lu <hjl@gnu.org>
+
+ * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Set
+ DT_RUNPATH and DT_FLAGS only if info->new_dtags is true.
+
+2000-07-20 Hans-Peter Nilsson <hp@axis.com>
+
+ * Makefile.am (ALL_MACHINES): Add cpu-cris.lo.
+ (ALL_MACHINES_CFILES): Add cpu-cris.c.
+ (BFD32_BACKENDS): Add aout-cris.lo and elf32-cris.lo.
+ (BFD32_BACKENDS_CFILES): Add aout-cris.c and elf32-cris.c.
+ (cpu-cris.lo, aout-cris.lo, elf32-cris.lo): New rules.
+ * Makefile.in: Rebuild.
+ * aclocal.m4: Rebuild.
+ * aoutx.h (NAME(aout,machine_type)): Add case for bfd_arch_cris.
+ * archures.c (enum bfd_architecture): Add bfd_arch_cris.
+ (bfd_cris_arch): Declare.
+ (bfd_archures_list): Add bfd_cris_arch.
+ * bfd-in2.h: Rebuild.
+ * config.bfd: (cris-*-*): New target.
+ * configure.in (bfd_elf32_cris_vec, cris_aout_vec): New vectors.
+ * configure: Rebuild.
+ * elf.c (prep_headers): Add bfd_arch_cris.
+ * libbfd.h: Rebuild.
+ * libaout.h (enum machine_type): Add M_CRIS.
+ * reloc.c: Add CRIS relocations.
+ * targets.c (bfd_elf32_cris_vec, cris_aout_vec): Declare.
+ (bfd_target_vect): Add bfd_elf32_cris_vec and cris_aout_vec.
+ * cpu-cris.c, aout-cris.c, elf32-cris.c: New files.
+ * po/POTFILES.in, po/bfd.pot: Regenerate.
+
+2000-07-19 H.J. Lu <hjl@gnu.org>
+
+ * elf32-arm.h (elf32_arm_size_dynamic_sections): Also set
+ DF_TEXTREL if DT_TEXTREL is set.
+ * elf32-i370.c (i370_elf_size_dynamic_sections): Likewise.
+ * elf32-i386.c (elf_i386_size_dynamic_sections): Likewise.
+ * elf32-m68k.c (elf_m68k_size_dynamic_sections): Likewise.
+ * elf32-mips.c (_bfd_mips_elf_size_dynamic_sections): Likewise.
+ * elf32-ppc.c (ppc_elf_size_dynamic_sections): Likewise.
+ * elf32-sparc.c (elf32_sparc_size_dynamic_sections): Likewise.
+ * elf64-alpha.c (elf64_alpha_size_dynamic_sections): Likewise.
+ * elf64-hppa.c (elf64_hppa_size_dynamic_sections): Likewise.
+ * elf64-ia64.c (elf64_ia64_size_dynamic_sections): Likewise.
+ * elf64-sparc.c (sparc64_elf_size_dynamic_sections): Likewise.
+
+ * elflink.h (NAME(bfd_elf,size_dynamic_sections)): Also
+ set DF_SYMBOLIC for symbolic link. Also set DT_RUNPATH if
+ DT_RPATH is set.
+ Set the DT_FLAGS and DT_FLAGS_1 entries if necessary.
+
+2000-07-19 H.J. Lu <hjl@gnu.org>
+
+ * bfd-in.h (bfd_elf_set_dt_needed_soname): New.
+ * bfd-in2.h: Rebuild.
+
+ * elf-bfd.h (elf_obj_tdata): Add dt_soname.
+ (elf_dt_soname): New.
+
+ * elf.c (bfd_elf_set_dt_needed_soname): New.
+
+ * elflink.h (elf_link_add_object_symbols): Add the DT_NEEDED
+ entry if the shared object loaded by DT_NEEDED is used to
+ resolve the reference in a regular object.
+
+2000-07-19 H.J. Lu <hjl@gnu.org>
+
+ * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_CONFIG,
+ DT_DEPAUDIT and DT_AUDIT as strings.
+
+2000-07-19 Nick Clifton <nickc@cygnus.com>
+
+ * format.c: Fix formatting.
+
+2000-07-19 H.J. Lu <hjl@gnu.org>
+
+ * elf.c (_bfd_elf_print_private_bfd_data): Fix DT_CHECKSUM.
+
+2000-07-19 H.J. Lu <hjl@gnu.org>
+
+ * elf.c (_bfd_elf_print_private_bfd_data): Handle DT_BIND_NOW,
+ DT_INIT_ARRAY, DT_FINI_ARRAY, DT_INIT_ARRAYSZ, DT_FINI_ARRAYSZ,
+ DT_RUNPATH, DT_FLAGS, DT_PREINIT_ARRAY, DT_PREINIT_ARRAYSZ,
+ DT_PLTPADSZ, DT_MOVEENT, DT_MOVESZ, DT_FEATURE, DT_POSFLAG_1,
+ DT_SYMINSZ, DT_SYMINENT, DT_CONFIG, DT_DEPAUDIT, DT_AUDIT,
+ DT_PLTPAD, DT_MOVETAB, DT_SYMINFO, DT_RELACOUNT, DT_RELCOUNT,
+ DT_FLAGS_1, DT_USED and DT_CHECKSUM.
+
+2000-07-18 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * elf.c (bfd_elf_get_sign_extend_vma, bfd_elf_get_arch_size): Move
+ renamed functions from here...
+ (assign_section_numbers): Use renamed functions.
+ (prep_headers): Use renamed functions.
+
+ * bfd.c (bfd_get_sign_extend_vma, bfd_get_arch_size): ...To here.
+ * bfd-in.h (bfd_get_sign_extend_vma, bfd_get_arch_size): Update.
+ * bfd-in2.h: Regenerate.
+
+2000-07-18 Ulf Carlsson <ulfc@engr.sgi.com>
+
+ * elf32-mips.c (_bfd_mips_elf_finish_dynamic_symbol): Add
+ parenthesis in if statement.
+
+2000-07-17 Koundinya K <kk@ddeorg.soft.net>
+
+ Enable the support for Traditional MIPS.
+ * elf32-mips.c (IRIX_COMPAT): Recognize bfd_elf32_tradbigmips_vecand
+ return ict_none appropriately for traditional mips targets.
+ (STUB_LW): Change 0x8f998000 to 0x8f998010 for traditional mips.
+ (STUB_MOVE): Conditionalize for traditonal mips.
+ (STUB_LI16): Likewise.
+ (_bfd_mips_elf_modify_segment_map): Conditionalize to avoid making
+ room for RTPROC header.
+ (_bfd_mips_elf_modify_segment_map): For a normal mips executable set
+ the permission for the PT_DYNAMIC as read, write and execute.
+ (mips_elf_calculate_relocation): Check for the symbol _DYNAMIC_LINKING
+ for traditonal mips.
+ (_bfd_mips_elf_create_dynamic_sections): Add the symbol
+ _DYNAMIC_LINKING for traditonal mips.
+ (_bfd_mips_elf_create_dynamic_sections): Add the symbol __RLD_MAP
+ in case of traditonal mips.
+ (_bfd_mips_elf_adjust_dynamic_symbol): Create a stub only if a PLT
+ entry is required. For a function if PLT is not required then set the
+ corresponding hash table entry to 0.
+ (_bfd_mips_elf_size_dynamic_sections): Add DT_DEBUG entry for
+ traditonal mips.
+ (_bfd_mips_elf_finish_dynamic_symbol): for a undefined symbol in a
+ shared object set the value to 0.
+ (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol
+ _DYNAMIC_LINKING for traditonal mips.
+ (_bfd_mips_elf_finish_dynamic_symbol): Check for the symbol __RLD_MAP
+ for traditonal mips.
+
+2000-07-15 H.J. Lu <hjl@gnu.org>
+
+ * aoutx.h (translate_to_native_sym_flags): Handle BSF_LOCAL.
+
+2000-07-12 Charles Wilson <cwilson@ece.gatech.edu>
+
+ * libbfd.c (bfd_seek): fix 'seek beyond EOF' error when writing
+ out a structure that is BFD_IN_MEMORY.
+
+2000-07-11 Alan Modra <alan@linuxcare.com.au>
+
+ * elf64-hppa.c (get_dyn_name): Pass in section pointer instead of
+ bfd pointer. Print section id instead of bfd pointer for local
+ syms. Prefix addend with `+' for global syms as well as local.
+ Correct calculation of name component lengths.
+ (elf64_hppa_check_relocs): Update call to get_dyn_name.
+
+ From David Huggins-Daines <dhd@linuxcare.com>
+ * elf-hppa.h (elf_hppa_relocate_section): Update calls here too.
+ * elf64-hppa.c (elf64_hppa_check_relocs): Fix some warnings.
+ (elf64_hppa_modify_segment_map): Likewise.
+
+2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * elf.c (bfd_elf_get_sign_extend_vma): Return tendency of VMA
+ addresses to be "naturally" sign extended. Return -1 if unknown.
+ * bfd-in.h (bfd_elf_get_sign_extend_vma): Add declaration.
+ * bfd-in2.h: Regenerate.
+
+2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * ecoffswap.h (ecoff_get_off, ecoff_put_off): Add ECOFF_SIGNED_32
+ and ECOF_SIGNED_64 to list ways to extract an offset.
+ (ecoff_swap_fdr_in, ecoff_swap_fdr_out, ecoff_swap_pdr_in,
+ ecoff_swap_pdr_out, ecoff_swap_ext_in, ecoff_swap_ext_out):
+ Update.
+ * elf64-mips.c (ECOFF_SIGNED_64): Define instead of ECOFF_64.
+ * elf32-mips.c (ECOFF_SIGNED_32): Define instead of ECOFF_32.
+
+2000-07-11 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * elfcode.h (elf_object_p): Use bfd_set_start_address and not
+ bfd_get_start_address.
+ (elf_swap_ehdr_in): Sign extend e_entry when applicable.
+ (elf_swap_ehdr_out): Ditto.
+
+2000-07-10 Alexander Aganichev <AAganichev@hypercom.com>
+
+ * archures.c (bfd_default_scan): Add set of bfd_mach_ cases for
+ compatibility with older binutils.
+
+2000-07-10 Alan Modra <alan@linuxcare.com.au>
+
+ * section.c (bfd_make_section_anyway): Start section_id at 0x10.
+ (STD_SECTION): Avoid negative ids, instead use 0 to 3.
+
+ From Ryan Bradetich <rbradetich@uswest.net>
+ * dwarf1.c (parse_die): Cure signed/unsigned char warnings.
+ (parse_line_table): Ditto.
+ (_bfd_dwarf1_find_nearest_line): Ditto.
+ * syms.c (cmpindexentry): Remove extra `*' from params.
+
+2000-07-09 Koundinya K <kk@ddeorg.soft.net>
+
+ * elf32-mips.c (sort_dynamic_relocs): New Function.
+ (_bfd_mips_elf_finish_dynamic_sections): Call sort_dynamic_relocs
+ via qsort to sort the dynamic relocations in increasing r_symndx
+ value.
+
+2000-07-09 Alan Modra <alan@linuxcare.com.au>
+
+ * elf64-hppa.c (elf64_hppa_dyn_hash_table_init): Add
+ ATTRIBUTE_UNUSED to unused args.
+ (get_opd): Likewise.
+ (get_plt): Likewise.
+ (get_dlt): Likewise.
+ (get_stub): Likewise.
+ (elf64_hppa_adjust_dynamic_symbol): Likewise.
+ (elf64_hppa_link_output_symbol_hook): Likewise.
+ (elf64_hppa_check_relocs): Delete unused var.
+ (elf64_hppa_size_dynamic_sections): Likewise.
+ (elf64_hppa_finalize_opd): Likewise.
+ (elf64_hppa_finalize_dynreloc): Likewise.
+ (elf64_hppa_modify_segment_map): Likewise.
+ (elf64_hppa_finish_dynamic_sections): Likewise.
+
+ * elf-hppa.h (elf_hppa_final_write_processing): Add
+ ATTRIBUTE_UNUSED to unused args.
+ (elf_hppa_final_link_relocate): Likewise.
+ (elf_hppa_record_segment_addrs): Add paretheses.
+ (elf_hppa_relocate_section): Constify dyn_name.
+
+ From David Huggins-Daines <dhd@linuxcare.com>
+ * config.bfd: Add hppa*64*-*-linux-gnu 64-bit target, and
+ rearrange case statement so that it gets preferred to 32-bit ones.
+
+ * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Use
+ asection->id instead of address of asection structure.
+ (elf32_hppa_size_stubs): Likewise.
+
+ * elf32-hppa.c (elf32_hppa_size_stubs): Use just one stub section
+ for .init* and .fini*.
+
+ * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Mask pointers
+ and addends used in stub names to 32 bits.
+ (elf32_hppa_size_stubs): Likewise.
+
+ * elf-hppa.h (elf_hppa_final_link_relocate): Don't sum addend
+ twice for R_PARISC_GPREL64. Use bfd_put_32 for R_PARISC_PCREL32,
+ not bfd_put_64. Fix minor comment typo and formatting.
+
+ Changes to create multiple linker stubs, positioned immediately
+ before the section where they are required.
+ * elf32-hppa.c: Don't include hppa_stubs.h.
+ (elf32_hppa_stub_hash_entry): Add a pointer to the stub section.
+ (elf32_hppa_stub_hash_table): Delete.
+ (elf32_hppa_link_hash_entry): Delete.
+ (elf32_hppa_link_hash_table): Use plain bfd_hash_table for
+ stub_hash_table, and store the struct here rather than a pointer.
+ Delete output_symbol_count. Add offset array. Change
+ global_value to a bfd_vma.
+ (elf32_hppa_stub_hash_lookup): Use table instead of table->root.
+ (elf32_hppa_stub_hash_traverse): Delete.
+ (elf32_hppa_name_of_stub): Delete.
+ (elf32_hppa_link_hash_lookup): Delete.
+ (elf32_hppa_link_hash_traverse): Delete.
+ (elf32_hppa_stub_hash_table_init): Delete.
+ (elf32_hppa_size_of_stub): Pass input section and offset rather
+ than location and calculate location here. Don't pass name as all
+ stubs are now the same size.
+ (elf32_hppa_stub_hash_newfunc): Init new fields.
+ (elf32_hppa_link_hash_table_create): Likewise, and stub_hash_table
+ too.
+ (elf32_hppa_bfd_final_link_relocate): Cast enums to int before
+ comparing against ints. Rewrite stub handling code.
+ (elf32_hppa_relocate_section): Make r_type and r_symndx unsigned.
+ Case enums to int before comparing against ints. Remove
+ bfd_reloc_dangerous case.
+ (elf32_hppa_build_one_stub): Rewrite.
+ (elf32_hppa_size_one_stub): New function.
+ (elf32_hppa_build_stubs): Rewrite.
+ (elf32_hppa_size_stubs): Pass in linker call-back functions.
+ Rewrite stub-handling specific code.
+
+ * elf32-hppa.h (elf32_hppa_size_stubs): Update prototype.
+
+ * elf64-hppa.c (elf64_hppa_dyn_hash_entry): Fix a comment typo.
+
+ * hppa_stubs.h: Delete.
+ * Makefile.am (SOURCE_HFILES): Remove hppa_stubs.h
+ (elf32-hppa.lo): Remove hppa_stubs.h from dependencies.
+ * Makefile.in: Regenerate.
+
+ * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Handle e_nlsel and
+ e_nlrsel.
+
+ * libhppa.h (hppa_field_adjust): Correct e_nsel case.
+
+ * elf32-hppa.c (elf32_hppa_relocate_section): Mention the offset
+ and section name for bfd_reloc_notsupported error message.
+ (elf32_hppa_bfd_final_link_relocate): Print reasons for returning
+ bfd_reloc_notsupported.
+ (elf32_hppa_relocate_section): Add ATTRIBUTE_UNUSED to output_bfd.
+
+ * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Handle
+ undefined weak symbols for all relocs.
+ (elf32_hppa_size_of_stub): Adjust calculation by 8 since branch
+ offsets are relative to one past the delay slot.
+ (elf32_hppa_size_stubs): Account for reloc addend when calculating
+ branch destination. Put addend into stub name too.
+ (elf32_hppa_bfd_final_link_relocate): Account for reloc addend and
+ adjust by 8 when deciding whether a linker stub is needed. Put
+ addend into stub name as for above.
+
+ * elf32-hppa.c (hppa_elf_relocate_insn): Change signed/unsigned on
+ various args and vars.
+ (elf32_hppa_bfd_final_link_relocate): Here too.
+ (elf32_hppa_size_stubs): Rename index -> indx. Use e_indx for
+ inner block var to avoid shadowing.
+
+ * elf32-hppa.h (_bfd_elf32_hppa_gen_reloc_type): Make `field' arg
+ unsigned.
+ * elf64-hppa.h (_bfd_elf64_hppa_gen_reloc_type): Ditto.
+ * elf-hppa.h (_bfd_elf_hppa_gen_reloc_type): Ditto.
+ (elf_hppa_fake_sections): Rename local var to avoid shadowing.
+
+ * libhppa.h: Change practically all unsigned ints to plain ints.
+ Remove tests on gcc version. Instead use ATTRIBUTE_UNUSED for
+ prototypes.
+
+ From Ryan Bradetich <rbradetich@uswest.net>
+ * libhppa.h (hppa_opcode_type): New enum to replace #define's.
+ * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Modify to
+ suit above.
+ From David Huggins-Daines <dhd@linuxcare.com>
+ * elf-hppa.h (elf_hppa_relocate_insn): Update the opcode constants
+ to the new OP_* ones.
+
+ * elf32-hppa.c (elf32_hppa_size_stubs): Consolidate freeing on
+ error exit. Bail out earlier on plabel relocs that we aren't
+ interested in. Don't tell elf32_hppa_stub_hash_lookup to copy
+ string, and then don't free our copy.
+ (elf32_hppa_build_one_stub): Make insn unsigned int.
+
+ * libhppa.h (bfd_hppa_insn2fmt): 22 bit branches are only
+ available with BL, not BE and BLE.
+
+ * elf32-hppa.c (hppa_elf_relocate_insn): Add some more example
+ code for elf arg relocs.
+ (elf32_hppa_bfd_final_link_relocate): Replace boolean is_local
+ argument with elf_link_hash_entry h. Handle undefined weak
+ symbols. Move $global$ lookup from here...
+ (elf32_hppa_relocate_section): ...to here. Return correct error
+ message for non-handled relocs.
+ (elf32_hppa_size_of_stub): Correctly test branch range. Previous
+ wrong test was -0x3ffff to +0x40000.
+
+ * elf-hppa.h (elf_hppa_final_link_relocate): R_PARISC_DIR17R,
+ R_PARISC_DIR17F, and R_PARISC_DIR21L are for absolute branches;
+ Handle them as such.
+ (elf_hppa_relocate_insn): Fix a typo.
+
+ * libhppa.h (GET_FIELD, GET_BIT, MASK, CATENATE, ELEVEN): Delete.
+ (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
+ assemble_17, assemble_21): Delete.
+ Supply defines for all 64 possible opcodes.
+ (bfd_hppa_insn2fmt): Add bfd argument, and use to select wide mode
+ formats. Handle COMICLR.
+ (hppa_rebuild_insn): Delete bfd argument. Handle formats 10, -11,
+ -10, -16, 16, 22.
+
+ * elf32-hppa.c (hppa_elf_relocate_insn): Complete rewrite.
+ (elf32_hppa_bfd_final_link_relocate): Major rewrite.
+ (elf32_hppa_build_one_stub): Modify hppa_elf_relocate_insn calls
+ to suit.
+ (elf32_hppa_size_stubs): Don't free stub_name twice. Read in all
+ the local syms - did this code get deleted accidentally? Ignore
+ undefined and undefweak syms.
+
+ * elf-hppa.h (elf_hppa_final_link): Move hppa_info to outermost
+ block. Use it instead of elf64_hppa_hash_table (info).
+ (elf_hppa_final_link_relocate): Use hppa_info instead of
+ elf64_hppa_hash_table (info).
+
+ * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
+ re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
+ (hppa_rebuild_insn): Mask immediate bits here instead.
+ * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
+
+2000-07-08 Alan Modra <alan@linuxcare.com.au>
+
+ * section.c (struct sec): Add id field. Tidy comment formatting.
+ (bfd_make_section_anyway): Set id.
+ (STD_SECTION): Init id too.
+ Change CONST to const throughout.
+ * archures.c (bfd_arch_info): Tidy comment.
+ (bfd_arch_list): Change a CONST to const.
+ * libbfd-in.h: Tidy comments and replace CONST with const.
+ * elf-bfd.h: Likewise.
+ * libbfd.h: Regenerate.
+ * bfd-in2.h: Regenerate.
+ * libcoff.h: Regenerate.
+
+2000-07-07 DJ Delorie <dj@redhat.com>
+
+ * archive.c (_bfd_write_archive_contents): Add an informative
+ comment.
+
+2000-07-06 Kazu Hirata <kazu@hxi.com>
+
+ * srec.c: Fix formatting.
+
+2000-06-05 DJ Delorie <dj@redhat.com>
+
+ * MAINTAINERS: new
+
+2000-07-04 Alexandre Oliva <aoliva@redhat.com>
+
+ * coff-arm.c (coff_arm_relocate_section): Do not ignore the symbol
+ value of PC-relative offsets.
+
+2000-07-03 Jim Wilson <wilson@cygnus.com>
+
+ * elf64-alpha.c (alpha_elf_size_info): New.
+ (elf_backend_size_info): Define to alpha_elf_size_info.
+ * elfcode.h (elf_size_info): Change hash bucket size to 4.
+
+2000-07-03 Ulf Carlsson <ulfc@engr.sgi.com>
+
+ * elf32-mips.c: Include elf32-target.h again for the traditional
+ MIPS targets.
+
+2000-07-03 Marek Michalkiewicz <marekm@linux.org.pl>
+
+ * elf32-avr.c (bfd_elf32_bfd_reloc_type_lookup):
+ Add ATTRIBUTE_UNUSED to unused arguments to avoid warnings.
+ (avr_info_to_howto_rela): Likewise.
+ (elf32_avr_gc_mark_hook): Likewise.
+ (elf32_avr_gc_sweep_hook): Likewise.
+ (elf32_avr_relocate_section): Likewise.
+
+2000-07-03 Mark Elbrecht <snowball3@bigfoot.com>
+
+ * cofflink.c (_bfd_coff_write_global_sym): Turn a weak symbol into
+ an external symbol for a non-shared, non-relocatable link.
+
+2000-07-03 Nick Clifton <nickc@redhat.com>
+
+ * cofflink.c (IS_EXTERNAL): New macro: Return true if the symbol
+ is an external symbol.
+ (IS_WEAK_EXTERNAL): New macro: Return true if the symbol is a weak
+ external symbol.
+
+2000-07-03 Kazu Hirata <kazu@hxi.com>
+
+ * reloc16.c: Fix formatting.
+
+2000-07-01 Koundinya K <kk@ddeorg.soft.net>
+
+ * config.bfd: Change targ_defvec and targ_selvecs for mips*-*-sysv4*
+ to add a new target for traditional mips i.e
+ bfd_elf32_tradbigmips_vec and bfd_elf32_tradlittlemips_vec.
+ * configure.in: Likewise.
+ * configure: Rebuild.
+ * targets.c (bfd_elf32_tradbigmips_vec): Declare and put in
+ bfd_target_vector.
+ (bfd_elf32_tradlittlemips_vec): Likewise.
+ * elfxx-target.h: Add macro INCLUDED_TARGET_FILE which is more a test
+ to see that elfNN_bed does not get redefined even if the target file
+ is included twice for a chip. See elf32-mips.c.
+
+2000-07-01 Alan Modra <alan@linuxcare.com.au>
+
+ * Makefile.am (DEP): Fix 2000-06-22. grep after running dep.sed
+ (CLEANFILES): Add DEPA.
+ * Makefile.in: Regenerate.
+
+2000-06-30 DJ Delorie <dj@cygnus.com>
+
+ * peicode.h (coff_swap_filehdr_in): can't use e_magic because we
+ can't assume the PE header is at 0x80.
+
+2000-06-29 Mark Elbrecht <snowball3@bigfoot.com>
+
+ * syms.c (_bfd_stab_section_find_nearest_line): Use IS_ABSOLUTE_PATH.
+
+2000-06-28 Mark Elbrecht <snowball3@bigfoot.com>
+
+ * go32stub.h: Update stub.
+
+2000-06-26 Marek Michalkiewicz <marekm@linux.org.pl>
+
+ * archures.c (bfd_mach_avr5): Define.
+ * bfd-in2.h (bfd_mach_avr5): Define.
+ * cpu-avr.c (arch_info_struct): Rename bfd_mach_avr4 to
+ bfd_mach_avr5, add bfd_mach_avr4. Update comments.
+ (compatible): Update comment. Add missing test.
+ * elf32-avr.c (avr_final_link_relocate): Support 8K wrap
+ for avr2 and avr4. Simplify 8K wrap code.
+ (bfd_elf_avr_final_write_processing): Recognize bfd_mach_avr5.
+ (elf32_avr_object_p): Recognize E_AVR_MACH_AVR5.
+
+2000-06-26 Kazu Hirata <kazu@hxi.com>
+
+ * coff-h8300.c: Fix formatting.
+ * cpu-h8300.c: Likewise.
+
+2000-06-24 Alexandre Oliva <aoliva@redhat.com>
+
+ * elf32-arm.h (elf32_arm_final_link_relocate): Print `(local)'
+ for local symbols whose names are unknown.
+
+2000-06-22 Alan Modra <alan@linuxcare.com.au>
+
+ * Makefile.am (DEP): grep for leading `/' in DEP1, and fail if we
+ find one.
+ * Makefile.in: Regenerate.
+ * doc/Makefile.in: Regenerate.
+
+2000-06-20 H.J. Lu <hjl@gnu.org>
+
+ * Makefile.am: Rebuild dependency.
+ * Makefile.in: Rebuild.
+
+2000-06-20 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
+
+ * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function.
+ (elf_backend_copy_indirect_symbol): Map to the new function.
+
+2000-06-20 Alan Modra <alan@linuxcare.com.au>
+
+ * archive.c (normalize): Correct pointer comparison when checking
+ for backslashes.
+ (bfd_bsd_truncate_arname): Likewise.
+ (bfd_gnu_truncate_arname): Likewise.
+
+2000-06-20 Ulf Carlsson <ulfc@engr.sgi.com>
+
+ * elf-bfd.h (struct elf_obj_tdata): Define per BFD Irix 5 virtual
+ sections elf_{text,data}_{section,symbol}.
+ * elf32-mips.c: mips_elf_{text,data}_{section,symbol}{,_ptr}: Remove.
+ (_bfd_mips_elf_hide_symbol): New function.
+ (elf_backend_hide_symbol): Map to the new function.
+ (_bfd_mips_elf_add_symbol_hook): Change to use new per BFD
+ definitions of mips_elf_{text,data}_{section,symbol}.
+ (mips_elf_local_relocation_p): Try to find the direct symbol
+ based on new check_forced argument.
+ (mips_elf_calculate_relocation): Use new version of
+ mips_elf_local_relocation_p.
+ (mips_elf_relocate_section): Likewise.
+ (_bfd_mips_elf_relocate_section): Likewise.
+ (mips_elf_sort_hash_table): Only assert that have enough GOT
+ space.
+ (mips_elf_got16_entry): Match all 32 bits to the existing GOT
+ entry if the relocation based on the new external argument.
+ (mips_elf_create_dynamic_relocation): Assert that we have a
+ section contents allocated where we can swap out the dynamic
+ relocations.
+ (mips_elf_calculate_relocation): Find the real hash-table entry
+ correctly by using h->root.root.type. Only create a dynamic
+ relocation entry if the symbol is defined in a shared library.
+ Create an external GOT entry for the GOT16 relocation if the
+ symbol was forced local.
+ (_bfd_mips_elf_finish_dynamic_symbol): Don't assert there is a
+ dynamic index if the symbol was forced local.
+
+2000-06-20 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
+
+ * elf32-mips.c: Fix typos in comments.
+
+2000-06-19 Mark Kettenis <kettenis@gnu.org>
+
+ * rs6000-core.c: Wrap definition of `union VmInfo' within #ifdef
+ CORE_VERSION_1.
+
+2000-06-18 Stephane Carrez <stcarrez@worldnet.fr>
+
+ * Makefile.in, bfd-in2.h, libbfd.h, configure: Rebuild.
+ * Makefile.am (ALL_MACHINES, ALL_MACHINES_CFILES, BFD32_BACKENDS,
+ BFD32_BACKENDS_CFILES): Add 68hc12, 68hc11 files.
+ * configure.in (bfd_elf32_m68hc12_vec): Recognize.
+ (bfd_elf32_m68hc11_vec): Likewise.
+ * config.bfd (targ_cpu): Recognize 68hc12 and 68hc11.
+ Supports 68hc11 & 68hc12 at the same time.
+ * targets.c (bfd_elf32_m68hc12_vec): Declare and put in
+ bfd_target_vector.
+ (bfd_elf32_m68hc11_vec): Likewise.
+ * elf.c (prep_headers): Recognize bfd_arch_m68hc12 and 68hc11.
+ * archures.c (bfd_m68hc12_arch): Define and register in global list
+ (bfd_m68hc11_arch): Likewise.
+ * reloc.c (BFD_RELOC_M68HC11_HI8, BFD_RELOC_M68HC11_LO8,
+ BFD_RELOC_M68HC11_3B): Define.
+ * cpu-m68hc12.c, elf32-m68hc12.c: New files for 68hc12 support.
+ * cpu-m68hc11.c, elf32-m68hc11.c: New files for 68hc11 support.
+
+2000-06-18 Ulf Carlsson <ulfc@engr.sgi.com>
+
+ * elf_bfd.h (struct elf_backend_data): Add info argument to
+ elf_backend_hide_symbol.
+ (_bfd_elf_link_hash_hide_symbol): Likewise.
+ * elf.c (_bfd_elf_link_hash_hide_symbol): Likewise.
+ * elf64-ia64.c (elf64_ia64_hash_hide_symbol): Likewise.
+ * elflink.h (elf_link_add_object_symbols): Likewise.
+ (elf_link_assign_sym_version): Likewise.
+
+2000-06-18 H.J. Lu <hjl@gnu.org>
+
+ * coff-i386.c (coff_i386_reloc): Don't return in case of
+ output_bfd == (bfd *) NULL if COFF_WITH_PE is defined.
+ Compensate PE relocations when linking with non-PE object
+ files to generate a non-PE executable.
+
+2000-06-17 Ulf Carlsson <ulfc@engr.sgi.com>
+
+ * elf32-mips.c (mips_elf_calculate_relocation): Explicitly write
+ GOT entries if we're doing a static link or -Bsymbolic link.
+
+2000-06-15 Ulf Carlsson <ulfc@engr.sgi.com>
+
+ * elflink.h (elf_link_adjust_relocs): Check for and call backend
+ specifific swap_reloc_{in,out} and swap_reloca_{in,out} if
+ available.
+ (elf_link_output_relocs): Likewise.
+ (elf_reloc_link_order): Likewise.
+
+2000-06-16 Nicholas Duffek <nsd@redhat.com>
+
+ * archures.c (enum bfd_architecture): #define constants for
+ PowerPc and RS6000 machine numbers.
+ * bfd-in2.h: Regenerate.
+ * coffcode.h (coff_set_arch_mach_hook): #ifdef XCOFF64, set arch
+ to bfd_arch_powerpc instead of bfd_arch_rs6000. Refer to PowerPc
+ and RS6000 machine numbers using #defined constants from
+ archures.c.
+ * cpu-powerpc.c (arch_info_struct): Refer to PowerPc and RS6000
+ machine numbers using #defined constants from archures.c. Add
+ entries for EC603e, 630, A35, RS64II, RS64III, 7400. Specify
+ 64-bit words in 620 entry.
+ * cpu-rs6000.c (arch_info_struct): Create with entries for RS1,
+ RSC, and RS2.
+ (bfd_rs6000_arch): Change default machine to 0 (bfd_mach_rs6k).
+
+2000-06-16 Nicholas Duffek <nsd@cygnus.com>
+
+ * coffcode.h (coff_mkobject_hook): Set xcoff_tdata.xcoff64.
+ * libcoff-in.h (struct xcoff_tdata): Define xcoff64 field.
+ * libcoff.h (struct xcoff_tdata): Define xcoff64 field.
+
+2000-06-16 Nicholas Duffek <nsd@redhat.com>
+
+ * bfd-in.h (bfd_family_coff): Define.
+ * bfd-in2.h: Regenerate.
+ * coffgen.c (coff_count_linenumbers, coff_symbol_from,
+ coff_find_nearest_line): Check COFFness using bfd_family_coff()
+ instead of bfd_target_coff_flavour.
+ * cofflink.c (_bfd_coff_final_link): Likewise.
+ * cpu-ns32k.c (do_ns32k_reloc): Don't strcmp() target name to
+ exclude XCOFF files.
+ * reloc.c (bfd_perform_relocation, bfd_install_relocation):
+ Likewise.
+ * targets.c (enum bfd_flavour): Add bfd_target_xcoff_flavour.
+ * xcoff-target.h (TARGET_SYM): Use bfd_target_xcoff_flavour.
+ * xcofflink.c (XCOFF_XVECP): Delete.
+ (bfd_xcoff_link_record_set, bfd_xcoff_import_symbol,
+ bfd_xcoff_export_symbol, bfd_xcoff_link_count_reloc,
+ bfd_xcoff_record_link_assignment,
+ bfd_xcoff_size_dynamic_sections): Replace XCOFF_XVECP() with
+ check for bfd_target_xcoff_flavour.
+
+2000-06-16 Nicholas Duffek <nsd@redhat.com>
+
+ * rs6000-core.c: Support 64-bit core files, support pre-4.3 core
+ files on AIX 4.3.
+ (read_hdr): New function.
+ (rs6000coff_core_p): Store mstsave or __context64 struct instead
+ of trying to extract individual registers. Set abfd->arch_info
+ to match the architecture that created the core file.
+ (rs6000coff_get_section_contents): Delete.
+ * xcoff-target.h (rs6000coff_get_section_contents): Delete.
+
+2000-06-14 H.J. Lu <hjl@gnu.org>
+
+ * vms-misc.c (_bfd_vms_next_record): Return -1 if PRIV(vms_rec)
+ is NULL.
+
+2000-06-13 H.J. Lu <hjl@gnu.org>
+
+ * configure: Regenerate.
+
+2000-06-13 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * peicode.h (pe_ILF_object_p): Use TARGET_LITTLE_SYM instead of
+ armpei_little_vec.
+
+2000-06-08 David O'Brien <obrien@FreeBSD.org>
+
+ * configure.in (VERSION): Update to show this is the CVS mainline.
+
+2000-06-07 Alan Modra <alan@linuxcare.com.au>
+
+ * elf32-d10v.c: Include elf/d10v.h
+ (enum reloc_type): Delete.
+ * elf32-d30v.c: Include elf/d30v.h
+ (enum reloc_type): Delete.
+
+ * Makefile.am: Run "make dep-am" to regenerate dependencies.
+ * Makefile.in: Regenerate.
+
+ * elf32-i386.c (elf_howto_table): Remove EMPTY_HOWTOs.
+ (elf32_i386_vtinherit_howto, elf32_i386_vtentry_howto): Delete and
+ move HOWTOs into elf_howto_table.
+ (R_386_standard, R_386_ext_offset): Define.
+ (R_386_ext, R_386_vt_offset, R_386_vt): Define.
+ (elf_i386_reloc_type_lookup): Modify calculation of index into
+ elf_howto_table since we've removed the padding.
+ (elf_i386_info_to_howto_rel): Likewise.
+ (elf_i386_relocate_section): Likewise.
+
+2000-06-06 Michael Snyder <msnyder@seadog.cygnus.com>
+
+ * elf.c (elf_grok_pr_status): Eliminate reference to prgregset_t.
+
+2000-06-05 H.J. Lu <hjl@gnu.org>
+
+ * elflink.c (_bfd_elf_link_record_dynamic_symbol): Don't flag
+ an error when seeing an undefined symbol with hidden/internal
+ attribute. It is handled in *_relocate_section ().
+
+2000-06-05 H.J. Lu <hjl@gnu.org>
+
+ * elflink.h (elf_fix_symbol_flags): Follow the link for the
+ indirect symbol for the ELF_LINK_NON_ELF bit.
+ (elf_link_output_extsym): Don't output the indirect symbol even
+ if the ELF_LINK_NON_ELF bit is set.
+
+2000-06-01 J.T. Conklin <jtc@redback.com>
+
+ * config.bfd (i[3456]86-*-netbsdelf*): New target.
+ (i[3456]86-*-netbsdaout*): New target.
+ (i[3456]86-*-netbsd*): Add bfd_elf32_i386_vec to targ_selvecs.
+ (i[3456]86-*-openbsd*): Likewise.
+
+2000-05-30 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * trad-core.c: From hpux-core.c, include <dirent.h> or
+ <sys/ndir.h> when possible.
+
+2000-05-31 Ulrich Drepper <drepper@redhat.com>
+
+ * elf.c (_bfd_elf_slurp_version_tables): Correct reading of version
+ definitions. We must not assume they are sorted in the file
+ according to their index numbers.
+
+2000-05-31 Alan Modra <alan@linuxcare.com.au>
+
+ * elf-hppa.h: (elf_hppa_final_link_relocate): Use e_rsel field
+ selector for R_PARISC_PCREL17R. R_PARISC_DIR17R and
+ R_PARISC_DIR17F are for absolute branches; Handle them as such.
+
+2000-05-30 Nick Clifton <nickc@cygnus.com>
+
+ * cpu-i960.c (scan_960_mach): Accept 80960KA, 80960KB,
+ 80960CA, 80960MC as valid machine names.
+
+2000-05-30 H.J. Lu <hjl@gnu.org>
+
+ * elflink.c (_bfd_elf_link_record_dynamic_symbol): Clear the
+ visibility bits if the symbol is undefined. Correctly handle
+ weak undefined symbols with hidden and internal attributes.
+
+ * elflink.h (elf_link_add_object_symbols): Always turn the
+ symbol into local if it has the hidden or internal attribute.
+
+2000-05-29 Philip Blundell <philb@gnu.org>
+
+ * ppcboot.c: Add packed attribute if compiling with GCC.
+
+2000-05-29 Anatoly Vorobey <mellon@pobox.com>
+
+ * elf.c (_bfd_elf_link_hash_table_init): Initialize dynlocal.
+
+2000-05-26 Michael Snyder <msnyder@seadog.cygnus.com>
+
+ * elf.c (elfcore_grok_prstatus, elfcore_grok_pstatus,
+ elfcore_grok_psinfo): Add code to allow debugging a 32-bit
+ corefile on a 64-bit (Sparc Solaris) host. Also clean up
+ a few old comments.
+
+2000-05-26 Alan Modra <alan@linuxcare.com.au>
+
+ * Makefile.am: Update dependencies with "make dep-am"
+ * Makefile.in: Regenerate.
+
+ * sysdep.h (gettext, dgettext, dcgettext, textdomain,
+ bindtextdomain): Replace defines with those from intl/libgettext.h
+ to quieten gcc warnings.
+
+2000-05-26 Eli Zaretskii <eliz@is.elta.co.il>
+
+ * aoutx.h (find_nearest_line): Use IS_ABSOLUTE_PATH.
+
+ * archive.c (normalize, bfd_bsd_truncate_arname,
+ bfd_gnu_truncate_arname) [HAVE_DOS_BASED_FILE_SYSTEM]: Support
+ file names with backslashes.
+
+ * cache.c (bfd_open_file) [__MSDOS__]: Don't unlink the file
+ before opening it.
+
+ * sysdep.h: Include filenames.h.
+
+2000-05-26 Alan Modra <alan@linuxcare.com.au>
+
+ * opncls.c (bfd_close_all_done): Mask file perms with 0777 not 0x777.
+
+2000-05-26 Jakub Jelinek <jakub@redhat.com>
+
+ * elf64-sparc.c (sparc64_elf_relax_section): New.
+ (sparc64_elf_relocate_section): Optimize tail call into branch always
+ if possible.
+ * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
+ (elf32_sparc_relax_section): New.
+
+2000-05-26 Jakub Jelinek <jakub@redhat.com>
+
+ * elf64-sparc.c: Add ATTRIBUTE_UNUSED to unused function parameters.
+ Remove unusued variables.
+ (sparc64_elf_relocate_section): Change r_symndx type to unsigned long.
+ (sparc64_elf_merge_private_bfd_data): Fix shared library case from
+ previous fix, so that shared libs really don't influence targets
+ extension mask and memory model.
+
+2000-05-23 H.J. Lu <hjl@gnu.org>
+
+ * elf64-alpha.c (elf64_alpha_relocate_section): Check
+ h->root.other not h->other.
+ * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
+
+ * elf32-ppc.c (ppc_elf_relocate_section): Fix a typo.
+
+2000-05-23 H.J. Lu <hjl@gnu.org>
+
+ * elf32-i386.c (elf_i386_relocate_section): Don't allow the
+ undefined symbol with the non-default visibility attributes.
+ * elf-hppa.h (elf_hppa_relocate_section): Likewise.
+ * elf32-arm.h (elf32_arm_relocate_section): Likewise.
+ * elf32-i370.c (i370_elf_relocate_section): Likewise.
+ * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
+ * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
+ * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
+ * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
+ * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
+ * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
+ * elf64-ia64.c (elf64_ia64_relocate_section): Likewise.
+ * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
+
+2000-05-22 Richard Henderson <rth@cygnus.com>
+
+ * elf64-ia64.c (ia64_howto_table): Add PCREL60B, PCREL21BI,
+ PCREL22, PCREL64I. Zero size of special relocs.
+ (elf64_ia64_reloc_type_lookup): Likewise.
+ (USE_BRL, oor_brl, oor_ip): New.
+ (elf64_ia64_relax_section): New.
+ (elf64_ia64_check_relocs): Handle PCREL60B, PCREL22, PCREL64I.
+ (elf64_ia64_install_value): Likewise, plus PCREL21BI.
+ (elf64_ia64_relocate_section): Likewise.
+ (bfd_elf64_bfd_relax_section): New.
+ * reloc.c (BFD_RELOC_IA64_PCREL21BI): New.
+ (BFD_RELOC_IA64_{PCREL22,PCREL60B,PCREL64I}): New.
+ * bfd-in2.h, libbfd.h: Regenerate.
+
+2000-05-22 Nick Clifton <nickc@cygnus.com>
+
+ * configure.in : Add peigen.lo to MIPS PE targets.
+ * configure: Regenerate.
+
+2000-05-22 Momchil Velikov <velco@fadata.bg>
+
+ * libbfd.c (_bfd_generic_verify_endian_match): Compare endianess
+ only if it is known for both input and output bfds. Separate
+ error message strings as in some languages, it may be necessary
+ to change more than one place in the string to change between
+ 'big' and 'little'.
+
+ * elf32-ppc.c (ppc_elf_merge_private_bfd_data): Remove inline
+ endianess checks, call _bfd_generic_verify_endian_match() instead.
+
+ * elf32-mips.c (_bfd_mips_elf_merge_private_bfd_data): Likewise.
+
+ * elf32-mcore.c (mcore_elf_merge_private_bfd_data): Likewise.
+
+ * elf32-arm.h (elf32_arm_merge_private_bfd_data): Likewise. Verify
+ endianess before checking bfd flavours.
+
+2000-05-22 H.J. Lu <hjl@gnu.org>
+
+ * elflink.h (elf_link_output_extsym): Clear the visibility
+ field for symbols not defined locally.
+
+2000-05-18 Alan Modra <alan@linuxcare.com.au>
+
+ * libhppa.h (re_assemble_3, re_assemble_12, re_assemble_16,
+ re_assemble_17, re_assemble_21, re_assemble_22): Don't mask insn.
+ (hppa_rebuild_insn): Mask immediate bits here instead.
+ * elf-hppa.h (elf_hppa_relocate_insn): Mask here too.
+
+2000-05-18 Momchil Velikov <velco@fadata.bg>
+
+ * elflink.h (elf_bfd_final_link, elf_link_input_bfd): When emiting
+ relocs for an executable, ensure that they are virtual addresses.
+
+2000-05-18 Jeffrey A Law (law@cygnus.com)
+
+ * config.bfd (hppa*64*-*-hpux11*): New target triplet.
+
+2000-05-17 S. Bharadwaj Yadavalli <sby@scrugs.lkg.dec.com>
+ Rick Gorton <gorton@scrugs.lkg.dec.com>
+
+ * elflink.h: Add emitrelocations support: when enabled, relocation
+ information and relocation sections are put into final output
+ executables. If the emitrelocations flag is set, do the following:
+ (elf_bfd_final_link): Emit relocation sections.
+ (elf_link_input_bfd): Compute relocation section contents.
+ (elf_gc_sections): Don't clean relocation sections.
+
+2000-05-16 Catherine Moore <clm@cygnus.com>
+
+ * som.c (som_decode_symclass): Recognize weak symbols.
+
+2000-05-16 Szabolcs Szakacsits <szaka@F-Secure.com>
+
+ * peigen.c (pe_print_idata): Undo part of 2000-05-12 change that
+ read idata section only from dataoff.
+ (pe_print_edata): Correctly check for valid eat_member.
+
+2000-05-16 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * elf32-sh.c (sh_elf_relax_delete_bytes): Handle R_SH_SWITCH8.
+
+2000-05-14 Philip Blundell <philb@gnu.org>
+
+ * config.bfd (armeb-*-elf, arm*b-*-linux-gnu*): New targets.
+
+2000-05-12 Alan Modra <alan@linuxcare.com.au>
+
+ * targets.c (bfd_target_vector): #ifdef BFD64 rs6000coff64_vec
+
+ * peigen.c (pe_print_idata): Look for .idata section and print
+ info even if data directory has zero entries. Read idata section
+ starting from dataoff, and adjust all data offsets to suit. Cast
+ all bfd_vma vars to unsigned long before passing to fprintf.
+ * peigen.c (pe_print_edata): Similarly, look for .edata section
+ and print info even if data directory has zero entries. Cast
+ all bfd_vma vars to unsigned long before passing to fprintf.
+
+ From Szabolcs Szakacsits <szaka@F-Secure.com>
+ * peigen.c (pe_print_idata): Use bfd_section_size rather than data
+ directory size which may be bogus.
+ * peigen.c (pe_print_edata): Similarly.
+
+2000-05-09 Alan Modra <alan@linuxcare.com.au>
+
+ * 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.
+
+2000-05-08 Alan Modra <alan@linuxcare.com.au>
+
+ * versados.c (versados_scan): Init stringlen and pass_2_done.
+
+ * trad-core.c (trad_unix_core_file_p): Return
+ bfd_error_wrong_format rather than bfd_error_file_truncated.
+
+ * 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.
+
+ 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.
+
+2000-05-05 Clinton Popetz <cpopetz@cygnus.com>
+
+ * xcoff.h: Rename to xcoff-target.h
+ * Makefile.am: Change all instances of xcoff.h to xcoff-target.h
+ * coff-rs6000.c: Ditto.
+ * coff64-rs6000.c: Ditto.
+ * coff-pmac.c: Ditto.
+ * Makefile.in: Regenerate.
+
+2000-05-05 Clinton Popetz <cpopetz@cygnus.com>
+
+ * coffcode.h (coff_set_arch_mach_hook, coff_set_flags):
+ Change U802TOC64MAGIC to U803XTOCMAGIC.
+
+2000-05-04 Michael Snyder <msnyder@seadog.cygnus.com>
+
+ * elf.c (bfd_elf_get_arch_size): New function, return 32 | 64 | -1.
+ * bfd-in.h: Prototype bfd_elf_get_arch_size.
+ * bfd-in2.h: Prototype bfd_elf_get_arch_size.
+
+2000-05-04 Alan Modra <alan@linuxcare.com.au>
+
+ * libhppa.h (HPPA_R_CONSTANT): Cast argument to bfd_signed_vma.
+
+2000-05-03 Martin v. Löwis <loewis@informatik.hu-berlin.de>
+
+ * elflink.h (elf_link_add_object_symbols): Reset dynindx for
+ hidden and internal symbols.
+ (elf_fix_symbol_flags): Clear NEEDS_PLT for symbols with
+ visibility.
+ * elflink.c (_bfd_elf_link_record_dynamic_symbol): Do not
+ assign a PLT or GOT entry to symbols with hidden and
+ internal visibility.
+
+2000-05-03 Mark Elbrecht <snowball3@bigfoot.com>
+
+ * coff-go32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Add entry for
+ the .bss section.
+ * coff-stgo32.c (COFF_SECTION_ALIGNMENT_ENTRIES): Likewise.
+
+2000-05-02 H.J. Lu <hjl@gnu.org>
+
+ * elf.c (prep_headers): Use ELFOSABI_NONE instead of
+ ELFOSABI_SYSV.
+
+2000-05-02 Alan Modra <alan@linuxcare.com.au>
+
+ * targets.c (bfd_target_vector): Restore bfd_elf32_hppa_vec.
+ * Makefile.am (BFD32_BACKENDS): Restore elf32-hppa.lo. Regenerate
+ dependencies.
+ * Makefile.in: Regenerate.
+
+2000-05-01 Jim Wilson <wilson@cygnus.com>
+
+ * Makefile.am (BFD32_BACKENDS): Add efi-app-ia32.lo.
+ (BFD32_BACKENDS_CFILES): Add efi-app-ia32.c.
+ (BFD64_BACKENDS): Delete coff-ia64.lo. Add efi-app-ia64.lo.
+ (BFD64_BACKENDS_CFILES): Delete coff-ia64.c. Add efi-app-ia64.c.
+ * Makefile.in: Rebuild.
+
+2000-05-02 Alan Modra <alan@linuxcare.com.au>
+
+ * config.bfd: Re-enable elf32-hppa. It now compiles, even if it
+ doesn't work very well.
+
+ * elf-hppa.h (elf_hppa_internal_shdr): Define.
+ (elf_hppa_fake_sections): hdr is elf_hppa_internal_shdr.
+ Set hdr->s_type to 1 if ARCH_SIZE == 32.
+ (_bfd_elf_hppa_gen_reloc_type): Add prototype.
+ (elf_hppa_info_to_howto): Likewise.
+ (elf_hppa_info_to_howto_rel): Likewise.
+ (elf_hppa_reloc_type_lookup): Likewise.
+ (elf_hppa_is_local_label_name): Likewise.
+ (elf_hppa_fake_sections): Likewise.
+ (elf_hppa_final_write_processing): Likewise.
+ (elf_hppa_howto_table): Fully initialise all entries.
+ (_bfd_elf_hppa_gen_reloc_type): Add ATTRIBUTE_UNUSED to args.
+ (elf_hppa_info_to_howto): Likewise.
+ (elf_hppa_info_to_howto_rel): Likewise.
+ (elf_hppa_reloc_type_lookup): Likewise.
+ (elf_hppa_final_write_processing, elf_hppa_add_symbol_hook,
+ elf_hppa_unmark_useless_dynamic_symbols,
+ elf_hppa_remark_useless_dynamic_symbols,
+ elf_hppa_record_segment_addrs, elf_hppa_final_link,
+ elf_hppa_relocate_section, elf_hppa_final_link_relocate,
+ elf_hppa_relocate_insn): Compile only if ARCH_SIZE == 64 until
+ elf32-hppa.c mess is cleaned up.
+ (elf_hppa_final_link_relocate): Make insn and r_type unsigned
+ int. Delete r_field. In case R_PARISC_PCREL21L, don't set
+ r_field then call hppa_field_adjust inline func with variable
+ r_field arg, instead call hppa_field_adjust with fixed arg.
+ In case R_PARISC_PCREL22F, don't set r_field.
+ (elf_hppa_relocate_insn): Change args and return type to unsigned
+ int. Call re_assemble_* funcs to do the work.
+
+ * elf32-hppa.c (hppa_elf_relocate_insn): Don't assume 32 bit when
+ sign extending.
+
+ * libhppa.h (HPPA_R_CONSTANT): Don't assume 32 bit when sign
+ extending.
+ (sign_extend): Mask first before sign extending.
+ (low_sign_extend): Rewrite without condition expression.
+ (ones, dis_assemble_3, dis_assemble_12, dis_assemble_16,
+ dis_assemble_17, dis_assemble_21, dis_assemble_22): Delete.
+ (assemble_3, assemble_6, assemble_12, assemble_16, assemble_16a,
+ assemble_17, assemble_21, sign_unext, low_sign_unext): Return
+ result as function return value rather than through pointer arg.
+ Accept unsigned int args, and return unsigned int.
+ (re_assemble_3): New. Combines function of dis_assemble_3 with
+ re-assembly of opcode and immediate.
+ (re_assemble_12): Likewise.
+ (re_assemble_16): Likewise.
+ (re_assemble_17): Likewise.
+ (re_assemble_21): Likewise.
+ (re_assemble_22): Likewise.
+ (hppa_field_adjust): Rewrite and document, paying attention to
+ size of types and signed/unsigned issues.
+ (get_opcode): Shift before masking.
+ (FDLW): Rename to FLDW.
+ (bfd_hppa_insn2fmt): Change arg to unsigned int. Delete fmt.
+ (hppa_rebuild_insn): Change args and return value to unsigned
+ int. Make use of re_assemble_*. Correct case 11.
+
+ * dep-in.sed: Handle ../opcodes/.
+ * Makefile.am (SOURCE_HFILES): Add elf-hppa.h, elf32-hppa.h,
+ elf64-hppa.h, hppa_stubs.h, xcoff.h.
+ (BFD32_BACKENDS_CFILES): Restore elf32-hppa.c.
+ Remove elf64-hppa.lo, cpu-ia64.lo, elf64-ia64.lo, elfarm-oabi.lo,
+ elfarm-nabi.lo dependencies outside of auto-dependency area.
+ Regenerate dependencies.
+ * Makefile.in: Regenerate.
+
+ * configure.in (TRAD_HEADER): Test non-null before
+ AC_DEFINE_UNQUOTED.
+ * configure: Regenerate.
+
+ * reloc.c: Fix mis-spelling in comment.
+
+2000-05-01 Alan Modra <alan@linuxcare.com.au>
+
+ * coff-sh.c (bfd_coff_small_swap_table): Fix Fri Apr 28 change.
+ * vms.c (vms_openr_next_archived_file): Return NULL.
+
+2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
+
+ * coffcode.h Copy changes mistakenly done to libcoff.h in
+ 4/24/2000 patch.
+
+2000-04-29 Andreas Jaeger <aj@suse.de>
+
+ * libbfd-in.h: Correctly check GCC version.
+ * bfd-in.h: Likewise.
+ * libhppa.h: Likewise.
+ * libbfd.h: Regenerate.
+ * bfd-in2.h: Regenerate.
+
+2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
+
+ * Makefile.am (BFD64_BACKENDS, BFD64_BACKENDS_CFILES): Add
+ coffdu-rs6000.{lo,c}.
+ (coff-pmac.lo, coff-rs6000.lo, coff64-rs6000.lo): Add dependency
+ on xcoff.h
+ * Makefile.in: Regenerate.
+ * xcoff.h: New file.
+ * coff-pmac.c: Use xcoff.h instead of coff-rs6000.c.
+ * coff-rs6000.c: Move all declarations and defines that are
+ common to the xcoff backends into xcoff.h
+ * coff64-rs6000.c: Ditto,
+
+2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
+
+ * coff-mips.c (mips_ecoff_backend_data): Add initialization of
+ _bfd_coff_force_symnames in strings and
+ _bfd_coff_debug_string_prefix_length to their default values.
+ * coff-sh.c: (bfd_coff_small_swap_table): Ditto.
+
+2000-04-28 Clinton Popetz <cpopetz@cygnus.com>
+
+ * coff-alpha.c (alpha_ecoff_backend_data): Add initialization of
+ _bfd_coff_force_symnames in strings and
+ _bfd_coff_debug_string_prefix_length to their default values.
+
+2000-04-27 Alan Modra <alan@linuxcare.com.au>
+
+ * elf32-m68k.c (elf_m68k_gc_sweep_hook): Return if dynobj NULL.
+ Check local_got_refcounts before dereferencing.
+
+ * elf32-ppc.c (ppc_elf_relocate_section): Check splt != NULL
+ before deciding we don't need R_PPC_PLT32 relocation.
+ (ppc_elf_gc_sweep_hook): Check local_got_refcounts before
+ dereferencing.
+
+ * elflink.h (elf_gc_common_finalize_got_offsets): Fix comment.
+
+ * elf32-i386.c (elf_i386_check_relocs): Reference count .got and
+ .plt entries.
+ (elf_i386_gc_sweep_hook): Garbage collect .got and .plt entries.
+ (elf_i386_adjust_dynamic_symbol): Recognize unused .plt entries.
+ (elf_i386_relocate_section): Allow for .plt to go missing.
+ (elf_i386_finish_dynamic_symbol): Use same test to decide if we
+ can use a relative reloc for got as elf_i386_relocate_section.
+ (bfd_elf32_bfd_final_link): Define to use gc form of final link.
+
+2000-04-26 Clinton Popetz <cpopetz@cygnus.com>
+
+ * config.bfd: Remove extraneous bfd_powerpc_64_arch.
+
+2000-04-24 Clinton Popetz <cpopetz@cygnus.com>
+
+ * Makefile.am (coff64-rs6000.lo): New rule.
+ * Makefile.in: Regenerate.
+ * coff-rs6000.c (xcoff_mkobject, xcoff_copy_private_bfd_data,
+ xcoff_is_local_label_name, xcoff_rtype2howto,
+ xcoff_reloc_type_lookup, xcoff_slurp_armap, xcoff_archive_p,
+ xcoff_read_ar_hdr, xcoff_openr_next_archived_file, xcoff_write_armap,
+ xcoff_write_archive_contents): No longer static, and prefix with _bfd_.
+ (NO_COFF_SYMBOLS): Define.
+ (xcoff64_swap_sym_in, xcoff64_swap_sym_out, xcoff64_swap_aux_in,
+ xcoff64_swap_aux_out): New functions; handle xcoff symbol tables
+ internally.
+ (MINUS_ONE): New macro.
+ (xcoff_howto_tabl, xcoff_reloc_type_lookup): Add 64 bit POS
+ relocation.
+ (coff_SWAP_sym_in, coff_SWAP_sym_out, coff_SWAP_aux_in,
+ coff_SWAP_aux_out): Map to the new functions.
+ * coff64-rs6000.c: New file.
+ * libcoff.h (bfd_coff_backend_data): Add new fields
+ _bfd_coff_force_symnames_in_strings and
+ _bfd_coff_debug_string_prefix_length.
+ (bfd_coff_force_symnames_in_strings,
+ bfd_coff_debug_string_prefix_length): New macros for above fields.
+ * coffcode.h (coff_set_arch_mach_hook): Handle XCOFF64 magic.
+ Set machine to 620 for XCOFF64. Use bfd_coff_swap_sym_in instead
+ of using coff_swap_sym_in directly.
+ (FORCE_SYMNAMES_IN_STRINGS): New macro, defined for XCOFF64.
+ (coff_set_flags) Set magic for XCOFF64.
+ (coff_compute_section_file_positions): Add symbol name length to
+ string section length if bfd_coff_debug_string_prefix_length is
+ true.
+ (coff_write_object_contents): Don't do reloc overflow for XCOFF64.
+ (coff_slurp_line_table): Use bfd_coff_swap_lineno_in instead of
+ using coff_swap_lineno_in directly.
+ (bfd_coff_backend_data): Add _bfd_coff_force_symnames_in_strings
+ and _bfd_coff_debug_string_prefix_length fields.
+ * coffgen.c (coff_fix_symbol_name, coff_write_symbols): Force
+ symbol names into strings table when
+ bfd_coff_force_symnames_in_strings is true.
+ * coffswap.h (MAX_SCNHDR_NRELOC, MAX_SCNHDR_NLNNO, GET_RELOC_VADDR,
+ SET_RELOC_VADDR): New macros.
+ (coff_swap_reloc_in, coff_swap_reloc_out): Use above macros.
+ (coff_swap_aux_in, coff_swap_aux_out): Remove RS6000COFF_C
+ code.
+ (coff_swap_aouthdr_in, coff_swap_aouthdr_out): Handle XCOFF64
+ changes within RS6000COFF_C specific code.
+ (coff_swap_scnhdr_out): Use PUT_SCNHDR_NLNNO, PUT_SCNHDR_NRELOC,
+ MAX_SCNHDR_NRELOC, and MAX_SCNHDR_NLNNO.
+ * reloc.c (bfd_perform_relocation, bfd_install_relocation):
+ Extend existing hack on target name.
+ * xcofflink.c (XCOFF_XVECP): Extend existing hack on
+ target name.
+ * coff-tic54x.c (ticof): Keep up to date with new fields
+ in bfd_coff_backend_data.
+ * config.bfd: Add bfd_powerpc_64_arch to targ_arch and define
+ targ_selvecs to include rs6000coff64_vec for rs6000.
+ * configure.in: Add rs6000coff64_vec case.
+ * cpu-powerpc.c: New bfd_arch_info_type.
+
+2000-04-24 Jeffrey A Law (law@cygnus.com)
+
+ * config.bfd: Only disable elf32-hppa vectors, not all of the
+ BSD and OSF configuration support. Provide (disabled) clauses
+ for PA64 support.
+ * configure.in: Add clause for PA64 support.
+ * configure: Rebuilt.
+
+ * targets.c (bfd_target_vector): Add bfd_elf64_hppa_vec.
+ (bfd_elf64_hppa_vec): Declare.
+
+ * Makefile.am (BFD64_BACKENDS): Add elf64-hppa.lo
+ (BFD64_BACKENDS_CFILES): Add elf64-hppa.c
+ (elf64-hppa.lo): Add dependencies.
+ * Makefile.in: Rebuilt.
+
+ * elf64-hppa.c, elf64-hppa.h: New files with PA64 support.
+
+2000-04-24 Jason Eckhardt <jle@cygnus.com>
+
+ * libhppa.h (dis_assemble_16): New function.
+ (pa_arch): Added pa20w element.
+
+2000-04-24 Ulrich Drepper <drepper@cygnus.com>
+
+ * elf-bfd.h: Add prototypes for bfd_elf32_write_relocs,
+ bfd_elf32_slurp_reloc_table, bfd_elf64_write_relocs, and
+ bfd_elf64_slurp_reloc_table.
+
+ * elfcode.h (elf_write_relocs, elf_slurp_reloc_table): New
+ definitions to get external names.
+ (elf_write_relocs): Renamed from write_relocs and make global.
+ (elf_slurp_reloc_table): Make global.
+ (_bfd_elf,size_info): Use elf_write_relocs instead of write_relocs.
+
+ * archive.c (hpux_uid_gid_encode): New function.
+ (bfd_ar_hdr_from_filesystem): Use it if HPUX_LARGE_AR_IDS is
+ defined and the ID is greater than 99999.
+ (bfd_generic_stat_arch_elt): If HPUX_LARGE_AR_IDS is defined decode
+ special uid/gid fields into 32 bit values.
+
+2000-04-21 Matthew Green <mrg@cygnus.com>
+
+ * config.bfd: Add NetBSD/sparc64 support.
+
+2000-04-21 Richard Henderson <rth@cygnus.com>
+ David Mosberger <davidm@hpl.hp.com>
+ Timothy Wall <twall@cygnus.com>
+ Jim Wilson <wilson@cygnus.com>
+
+ * Makefile.am (ALL_MACHINES): Add cpu-ia64.lo.
+ (ALL_MACHINES_CFILES): Add cpu-ia64.c.
+ (BFD64_BACKENDS): Add elf64-ia64.lo.
+ (BFD64_BACKENDS_CFILES): Add elf64-ia64.c.
+ (cpu-ia64.lo, elf64-ia64.lo): New rules.
+ * Makefile.in: Rebuild.
+ * archures.c (enum bfd_architecture): Add bfd_arch_ia64.
+ (bfd_ia64_arch): Declare.
+ (bfd_archures_list): Add bfd_ia64_arch.
+ * bfd-in2.h: Rebuild.
+ * config.bfd: (ia64*-*-linux-gnu*, ia64*-*-elf*): New targets.
+ * configure: Rebuild.
+ * configure.host: (ia64-*-linux*): New host.
+ * configure.in (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec,
+ bfd_efi_app_ia64_vec, bfd_efi_app_ia64_vec): New vectors.
+ * elf.c (prep_headers): Add bfd_arch_ia64.
+ * libbfd.h: Rebuild.
+ * reloc.c: Add IA-64 relocations.
+ * targets.c (bfd_elf64_ia64_little_vec, bfd_elf64_ia64_big_vec):
+ Declare.
+ (bfd_target_vect): Add bfd_elf64_ia64_little_vec.
+ * cpu-ia64-opc.c, cpu-ia64.c, elf64-ia64.c: New files.
+
+2000-04-21 Richard Henderson <rth@cygnus.com>
+
+ * elf32-d30v.c (bfd_elf_d30v_reloc): Don't modify section
+ contents when performing a partial link.
+ (bfd_elf_d30v_reloc_21): Likewise.
+
+2000-04-20 H.J. Lu <hjl@gnu.org>
+
+ * elf32-i386.c (elf_i386_relocate_section): Restrict 1998-12-10
+ patch to symbols defined by a shared object.
+ * elf32-ppc.c (ppc_elf_relocate_section): Similarly.
+
+2000-04-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+
+ K&R compiler fixes.
+ * dwarf2.c (concat_filename): Avoid string literal concatenation.
+ * ieee.c (ieee_get_symtab): Don't initialise union in struct.
+
+2000-04-11 David Mosberger <davidm@hpl.hp.com>
+
+ * Makefile.am (BFD64_BACKENDS): Mention coff-ia64.lo.
+ (BFD64_BACKENDS_CFILES): Mention coff-ia64.c
+ (coff-ia64.lo): Add dependency.
+ * Makefile.in: Regenerate.
+ * coff-ia64.c: New file.
+ * efi-app-ia32.c: Ditto.
+ * efi-app-ia64.c: Ditto.
+ * coffcode.h (coff_set_arch_mach_hook): Handle IA64MAGIC.
+ (coff_set_flags): Ditto.
+ (coff_write_object_contents) [IA64]: Set magic number to ZMAGIC.
+ * config.bfd (i[3456]86-*-linux-gnu*): Mention bfd_efi_app_ia32_vec.
+ * configure.in (elf): Handle bfd_efi_app_ia32 and bfd_efi_app_ia64_vec.
+ * configure: Regenerate.
+ * libpei.h (GET_OPTHDR_IMAGE_BASE): New macro.
+ (PUT_OPTHDR_IMAGE_BASE): Ditto.
+ (GET_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
+ (PUT_OPTHDR_SIZE_OF_STACK_RESERVE): Ditto.
+ (GET_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
+ (PUT_OPTHDR_SIZE_OF_STACK_COMMIT): Ditto.
+ (GET_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
+ (PUT_OPTHDR_SIZE_OF_HEAP_RESERVE): Ditto.
+ (GET_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
+ (PUT_OPTHDR_SIZE_OF_HEAP_COMMIT): Ditto.
+ (GET_PDATA_ENTRY): Ditto.
+ * peigen.c (_bfd_pei_swap_aouthdr_in) [COFF_WITH_PEP64]: Don't read
+ data_start. Use above macros to read fields that are 64 bit wide for
+ COFF_WITH_PEP64. Don't truncate entry and text_start to 32 bits.
+ (_bfd_pei_swap_aouthdr_out) [PEI_FORCE_MINIMUM_ALIGNMENT]: Force
+ FileAlignment and SectionAlignment to minimum alignment if they
+ are zero.
+ (_bfd_pei_swap_aouthdr_out) [PEI_DEFAULT_TARGET_SUBSYSTEM]: Set
+ Subsystem to default PEI_DEFAULT_TARGET_SUBSYSTEM.
+ (_bfd_pei_swap_aouthdr_out) [COFF_WITH_PEP64]: Don't set data_start.
+ Use above macros to write fields that are 64 bit wide for
+ COFF_WITH_PEP64.
+ (pe_print_pdata): Set PDATA_ROW_SIZE to 3*8 for COFF_WITH_PEP64,
+ 5*4 otherwise. This should be right for IA-32 and IA-64, but may
+ be wrong for platforms. Use PDATA_ROW_SIZE instead of hardcoded
+ value of 20 bytes. Modify printing for COFF_WITH_PEP64 to print
+ begin address, end address, and unwind info address only. Use
+ GET_PDATA_ENTRY() to read .pdata entries. Use fprintf_vma() to
+ print addresses.
+ (tbl): Add SECTION, REL32, RESERVED1, MIPS_JMPADDR16, DIR64, and
+ HIGH3ADJ relocation names.
+ (_bfd_pe_print_private_bfd_data): Print Subsystem name in legible form.
+ * targets.c: Declare bfd_efi_app_ia32_vec and
+ bfd_efi_app_ia64_vec.
+ (bfd_target_vector): Mention bfd_efi_app_ia32_vec and
+ bfd_efi_app_ia64_vec.
+
+2000-04-17 Timothy Wall <twall@cygnus.com>
+
+ * bfd-in2.h: Add prototypes for tic54x load page access.
+ * bfd-in.h: Regenerate.
+ * coff-tic54x.c: Add load page functions; allow bfd_arch_unknown
+ in customized _set_arch_mach function.
+ * coffcode.h (coff_set_alignment_hook): Set section load page if
+ the appropriate macro is defined.
+ (write_object_contents): Read section load page.
+
+2000-04-13 Alan Modra <alan@linuxcare.com.au>
+
+ * elf32-hppa.h: Update copyright date.
+
+ * elf32-fr30.c (fr30_elf_i20_reloc): Don't use U suffix.
+ * elf32-mips.c (_bfd_mips_elf_relocate_section): And here.
+
+ * elf32-d30v.c (MAX32): Don't use LL suffix.
+ (MIN32): Define in terms of MAX32.
+ (bfd_elf_d30v_reloc): Make relocation a bfd_signed_vma.
+
+ * coff-a29k.c (SIGN_EXTEND_HWORD): Replace with more concise
+ expression.
+
+ * peicode.h (pe_ILF_build_a_bfd): Remove UL from hex constants.
+
+2000-04-12 Alan Modra <alan@linuxcare.com.au>
+
+ * dep-in.sed: Match space before file name, not after.
+ * Makefile.am: Regenerate dependencies.
+ * Makefile.in: Regenerate.
+
+ * 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.
+
+2000-04-11 Alan Modra <alan@linuxcare.com.au>
+
+ * coff-mips.c (mips_gprel_reloc): Test for 16 bit range using
+ signed quantites.
+ * elf32-mips.c (gprel16_with_gp): Likewise.
+ * elf32-hppa.c (elf32_hppa_bfd_final_link_relocate): Test range
+ here using -0x40000, not (int)0xfffc0000.
+ (elf32_hppa_size_of_stub): Likewise.
+
+2000-04-11 Timothy Wall <twall@cygnus.com>
+
+ * coff-tic54x.c: Now builds with all targets.
+ * Makefile.am: Add coff/tic54x.h to coff-tic54x.o dependencies.
+ * Makefile.in: Regenerate.
+ * coffcode.h (coff_set_arch_mach_hook): Eliminate warning on
+ unitialized variable.
+
+2000-04-07 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
+ --enable-build-warnings option.
+ * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
+ * Makefile.in, configure: Re-generate.
+
+2000-04-07 Nick Clifton <nickc@cygnus.com>
+
+ * reloc.c: Add BFD_RELOC_ARM_PCREL_BLX and
+ BFD_RELOC_THUMB_PCREL_BLX.
+
+ * elf32-arm.h (elf32_arm_final_link_relocate): Handle
+ R_ARM_XPC25 and R_ARM_THM_PC22.
+
+ * elfarm-nabi.c (elf32_arm_howto_): Fix definitions of
+ R_ARM_XPC25 and R_ARM_THM_XPC22.
+ (elf32_arm_reloc_map): Make BFD_RELOC_{ARM|THUMB}_PCREL_BLX to
+ R_ARM_[XPC25|THM_XPC22].
+
+ * elfarm-oabi.c: Define OLD_ARM_ABI and change include from
+ elf/arm-oabi.h to elf/arm.h
+
+ * Makefile.am: Fix dependency for elfarm-oabi.c
+ * Makefile.in: Regenerate.
+
+ * bfd-in2.h: Regenerate.
+ * libbfd.h: Regenerate.
+
+2000-04-06 Michael Snyder <msnyder@seadog.cygnus.com>
+
+ * elfcore.h (elf_core_file_p): preserve value of tdata at entry,
+ and restore it on failure. Release newly allocated tdata on
+ failure.
+
+2000-04-07 Jim Wilson <wilson@cygnus.com>
+
+ * dwarf2.c (struct dwarf2_debug): New field dwarf_line_size.
+ (decode_line_info): Set it. Report error if unit->line_offset is
+ equal to or larger than it.
+
+2000-04-07 Timothy Wall <twall@cygnus.com>
+
+ * targets.c: Added vecs for tic54x.
+ * reloc.c: Added relocs for tic54x.
+ * libbfd.h: Regenerated.
+ * configure: Add TI COFF vecs for tic54x.
+ * configure.in: Ditto.
+ * config.bfd (targ_cpu): Recognize new tic54x target.
+ * coffcode.h (coff_slurp_symbol_table): Additions for TI COFF handling.
+ * bfd-in2.h: Add tic54x target and relocations.
+ * Makefile.am, Makefile.in: Add tic54x target.
+ * archures.c (bfd_archures_list): Add tic54x target.
+ * coff-tic54x.c: New.
+ * cpu-tic54x.c: New.
+
+2000-04-06 Michael Snyder <msnyder@seadog.cygnus.com>
+
+ * elfcore.h (elf_core_file_p): call backend_object_p which
+ thereby gets an opportunity to update the arch/machine type.
+
+2000-04-06 Timothy Wall <twall@cygnus.com>
+
+ * coffcode.h (coff_slurp_symbol_table): Handle C_STATLAB storage
+ class. Handle SEC_CLINK and SEC_BLOCK flags.
+ * section.c: Add SEC_CLINK and SEC_BLOCK flags.
+ * bfd-in2.h: Add SEC_CLINK and SEC_BLOCK flags.
+
+2000-04-06 Nick Clifton <nickc@cygnus.com>
+
+ * elf32-arm.h (elf32_arm_set_private_flags): Only check for
+ EF_INTERWORK if this is an unknown EABI.
+ (elf32_arm_merge_private_bfd_data): Check EABI version
+ numbers. Only check EF_xxx flags if the EABI version number
+ is unknown.
+ (elf32_arm_check_private_bfd_data): Only check EF_xxx flags
+ if the EABI version number is unknown.
+ (elf32_arm_print_private_bfd_data): Only decode EF_xxx flags
+ if the EABI version number is unknown.
+
+2000-04-05 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * reloc.c (_bfd_relocate_contents): Add BFD_RELOC_SH_LOOP_START and
+ BFD_RELOC_SH_LOOP_END.
+ * elf32-sh.c (sh_elf_howto_tab): Change special_func to
+ sh_elf_ignore_reloc for all entries that sh_elf_reloc used to ignore.
+ Add entries for R_SH_LOOP_START and R_SH_LOOP_END.
+ (sh_elf_reloc_loop): New function.
+ (sh_elf_reloc): No need to test for always-to-be-ignored relocs
+ any more.
+ (sh_rel): Add entries for BFD_RELOC_SH_LOOP_{START,END}.
+ (sh_elf_relocate_section): Handle BFD_RELOC_SH_LOOP_{START,END}.
+ * bfd-in2.h, libbfd.h: Regenerate.
+
+2000-04-04 Alan Modra <alan@linuxcare.com.au>
+
+ * po/bfd.pot: Regenerate.
+
+ * 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.
+
+2000-04-03 Kevin Buettner <kevinb@redhat.com>
+
+ * configure.in: Added corefile support for AIX 4.3. In particular,
+ AIX_CORE_DUMPX_CORE will be defined in addition to AIX_CORE when
+ compiling rs6000-core.c.
+ * configure: Regenerated.
+
+2000-04-03 H.J. Lu <hjl@gnu.org>
+
+ * cache.c (bfd_open_file): Unlink the output file only if
+ it has non-zero size.
+
+2000-04-01 Ken Block USG <block@zk3.dec.com>
+
+ * elf64-alpha.c (elf64_alpha_relocate_section): Don't emit
+ relative relocations for non-loaded sections in shared objects.
+ (elf64_alpha_check_relocs): Similarly.
+
+2000-04-03 Hans-Peter Nilsson <hp@axis.com>
+
+ * aoutx.h (NAME(aout,reloc_type_lookup)): Add BFD_RELOC_8 and
+ BFD_RELOC_16 to switch for extended relocs.
+ (MY_swap_ext_reloc_in): New.
+ (MY_swap_ext_reloc_out): New.
+ (NAME(aout,slurp_reloc_table)): Use MY_swap_ext_reloc_in rather
+ than NAME(aout,swap_ext_reloc_in) for extended relocs.
+ (NAME(aout,squirt_out_relocs)): Similarly use
+ MY_swap_ext_reloc_out.
+ (aout_link_reloc_link_order): Use MY_put_ext_reloc if defined.
+
+2000-04-03 Kazu Hirata <kazu@hxi.com>
+
+ * coff-h8300.c (h8300_reloc16_extra_cases): Add bsr:16 -> bsr:8 to
+ the R_PCRWORD_B case.
+
+2000-03-31 Thomas de Lellis <tdel@wrs.com>
+
+ * srec.c : Set CHUNK size to 16 bytes to prevent download failures
+ on some targets.
+ * ihex.c : Ditto.
+
+2000-03-30 Donald Lindsay <dlindsay@cygnus.com>
+
+ * 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.
+
+2000-03-27 Alan Modra <alan@linuxcare.com.au>
+
+ * 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.
+
+2000-03-27 Denis Chertykov <denisc@overta.ru>
+
+ * 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.
+
+2000-03-24 H.J. Lu <hjl@gnu.org>
+
+ * elf64-alpha.c (elf64_alpha_merge_ind_symbols): Add prototype.
+ (elf64_alpha_find_reloc_at_ofs): Likewise.
+
+2000-03-17 Alan Modra <alan@linuxcare.com.au>
+
+ * 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".
+
+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>
+
+ * 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>
+
+ * 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.
+
+2000-03-06 Nick Clifton <nickc@cygnus.com>
+
+ * peicode.h (struct pe_ILF_vars): Add sym_ptr_table and
+ sym_ptr_ptr fields.
+ (SIZEOF_ILF_SYM_PTR_TABLE): Define.
+ (SIZEOF_ILF_STRINGS): Redefine.
+ (pe_ILF_make_a_symbol-reloc): New function. Creates a symbol
+ relative reloc, as opposed to a section relative reloc.
+ (pe_ILF_make_a_symbol): Set the class of local symbols to C_STAT
+ not C_LABEL.
+ Add length of symbol's prefix to string pointer.
+ Store a pointer to the symbol in the symbol pointer table.
+ (pe_ILF_build_a_bfd): Do not build .idata$2 or .idata$7.
+ Initialise the symbol pointer table.
+ Store the hint in the Hint/Name table.
+ Make the jump reloc be symbol realtive, not section relative.
+ Create an import symbol for imported code.
+
+2000-03-06 Catherine Moore <clm@cygnus.com>
+
+ * elf.c (swap_out_syms): Check for null type_ptr.
+
+2000-03-01 Hans-Peter Nilsson <hp@axis.com>
+
+ * aout-target.h (MY(write_object_contents)): Remove unused
+ and unusable "#if CHOOSE_RELOC_SIZE".
+ * pc532-mach.c (MY(write_object_contents)): Ditto.
+ * netbsd.h (MY(write_object_contents)): Ditto.
+ * hp300hpux.c (MY(write_object_contents)): Ditto.
+ * freebsd.h (MY(write_object_contents)): Ditto.
+ * aout-tic30.c (tic30_aout_write_object_contents): Ditto.
+
+2000-02-29 H.J. Lu <hjl@gnu.org>
+
+ * peicode.h (jtab): Make it static.
+
+ * coff-sh.c (sh_align_load_span): Declared if COFF_WITH_PE is
+ defined and COFF_IMAGE_WITH_PE is not defined.
+ (_bfd_sh_align_load_span): Defined as sh_align_load_span if
+ COFF_WITH_PE is defined and COFF_IMAGE_WITH_PE is not defined.
+
+2000-03-01 Nick Clifton <nickc@cygnus.com>
+
+ * coff-arm.c (bfd_arm_process_before_allocation): Make
+ 'symndx' signed to prevent compile time warning.
+
+ * coff-mcore.c: Remove unused prototype for pe_object_p.
+
+ * coff-sh.c: Add "#ifndef COFF_IMAGE_WITH_PE" around static
+ functions that are not used when COFF_IMAGE_WITH_PE is
+ defined.
+ (struct sh_opcode): Change type of 'flags' field to unsigned
+ long so that it can hold the USESAS flag.
+
+ * coffcode.h (styp_to_sec_flags): Initialise 'target_name'.
+
+ * elf-m10300.c (mn10300_elf_relax_section): Initialise
+ 'sym_sec'.
+
+ * elf32-i370.c: Add ATTRIBUTE_UNUSED to unused function
+ parameters.
+ Remove unusued variables and code.
+ (elf_backend_add_symbol_hook): Fix prototype.
+
+ * elf32-m68k.c (elf_m68k_gc_sweep_hook): Initialise 'sgot' and
+ 'srelgot'.
+
+ * elf32-mcore.c (mcore_elf_relocate_section): Initialise
+ 'oldinst'.
+
+ * elf32-mips.c: Add ATTRIBUTE_UNUSED to unused function
+ parameters.
+ Remove unusued variables and code.
+ (elf_backend_add_symbol_hook): Fix prototype.
+
+ * elf32-sh.c (sh_elf_set_mach_from_flags): Use 'flags'.
+
+ * elflink.h (elf_bfd_link_add_symbols): Add ATTRIBUTE_UNUSED
+ to unused function parameter.
+
+ * pe-mips.c: Add ATTRIBUTE_UNUSED to unused function
+ parameters.
+ Use EMPTY_HOWTO to initialise empty howto slots.
+ Remove unused variables.
+
+ * peicode.h (pe_ILF_build_a_bfd): Initialise id6.
+
+2000-03-01 H.J. Lu <hjl@gnu.org>
+
+ * aoutx.h (aout_link_input_section_std): Pass "true" to
+ the undefined_symbol callback.
+ (aout_link_input_section_ext): Likewise.
+ * bout.c (get_value): Likewise.
+ * coff-a29k.c (coff_a29k_relocate_section): Likewise.
+ * coff-alpha.c (alpha_ecoff_get_relocated_section_conten):
+ Likewise.
+ (alpha_relocate_section): Likewise.
+ * coff-arm.c (coff_arm_relocate_section): Likewise.
+ * coff-i960.c (coff_i960_relocate_section): Likewise.
+ * coff-mcore.c (coff_mcore_relocate_section): Likewise.
+ * coff-mips.c (mips_relocate_section): Likewise.
+ * coff-ppc.c (coff_ppc_relocate_section): Likewise.
+ * coff-sh.c (sh_relocate_section): Likewise.
+ * coff-tic80.c (coff_tic80_relocate_section): Likewise.
+ * cofflink.c (_bfd_coff_generic_relocate_section): Likewise.
+ * elf-m10200.c (mn10200_elf_relocate_section): Likewise.
+ * elf-m10300.c (mn10300_elf_relocate_section): Likewise.
+ * elf32-d10v.c (elf32_d10v_relocate_section): Likewise.
+ * elf32-fr30.c (fr30_elf_relocate_section): Likewise.
+ * elf32-hppa.c (elf32_hppa_relocate_section): Likewise.
+ * elf32-i370.c (i370_elf_relocate_section): Likewise.
+ * elf32-m32r.c (m32r_elf_relocate_section): Likewise.
+ * elf32-mcore.c (mcore_elf_relocate_section): Likewise.
+ * elf32-sh.c (sh_elf_relocate_section): Likewise.
+ * elf32-v850.c (v850_elf_relocate_section): Likewise.
+ * elflink.c (_bfd_elf_link_record_dynamic_symbol): Likewise.
+ * elflink.h (elf_link_output_extsym): Likewise.
+ * pe-mips.c (coff_pe_mips_relocate_section): Likewise.
+ * reloc.c (bfd_generic_get_relocated_section_conten): Likewise.
+ * reloc16.c (_bfd_ppc_xcoff_relocate_section): Likewise.
+
+ * elf-hppa.h (elf_hppa_relocate_section): Pass "false" to the
+ undefined_symbol callback when building shared library with
+ -Bsymbolic and undefined symbols are allowed. Otherwise, pass
+ "true".
+ * elf32-arm.h (elf32_arm_relocate_section): Likewise.
+ * elf32-i386.c (elf_i386_relocate_section): Likewise.
+ * elf32-m68k.c (elf_m68k_relocate_section): Likewise.
+ * elf32-mips.c (mips_elf_calculate_relocation): Likewise.
+ (elf32_mips_get_relocated_section_content): Likewise.
+ * elf32-ppc.c (ppc_elf_relocate_section): Likewise.
+ * elf32-sparc.c (elf32_sparc_relocate_section): Likewise.
+ * elf64-alpha.c (elf64_alpha_relocate_section): Likewise.
+ * elf64-sparc.c (sparc64_elf_relocate_section): Likewise.
+
+2000-02-28 Nick Clifton <nickc@cygnus.com>
+
+ * Makefile.am: Add rules to build pe[i]-{sh|mips}.lo objects.
+ * Makefile.in: Regenerate.
+
+ * configure.in: Add support for mips and sh pe vectors.
+ * configure: regenerate.
+
+ * config.bfd: Add support for arm-wince, mips-pe and sh-pe
+ targets.
+
+ * targets.c: Add mips and sh pe vectors.
+
+ * libpei.h (coff_final_link_postscript): Only define if not
+ already defined.
+
+ * coffcode.h: Add support for WinCE magic numbers.
+
+ * peigen.c (pe_print_reloc): Update comment and rearrange
+ appending of newline character.
+
+ * peicode.h: Add support for Image Library Format.
+ (pe_ILF_vars): Structure containing data used by ILF code.
+ (pe_ILF_make_a_section): New function. Create a section based
+ on ILF data.
+ (pe_ILF_make_a_reloc): New function. Create a reloc based on
+ ILF data.
+ (pe_ILF_make_a_symbol): New function. Create a symbol based
+ on ILF data.
+ (pe_ILF_save_relocs): New function. Store the relocs created
+ by pe_ILF_make_a_reloc in a section.
+ (pe_ILF_build_a_bfd): New function. Create a BFD describing
+ an ILF object.
+ (pe_ILF_object_p): New function. Return a bfd_target pointer
+ for an ILF object.
+ (pe_bfd_object_p): If an ILF object is detected call
+ pe_ILF_object_p on it.
+
+ * coff-arm.c: Add support for WinCE relocs which are different
+ from normal ARM COFF relocs.
+ * pe-arm.c: Unset TARGET_UNDERSCORE for a WinCE target.
+
+ * coff-sh.c: Add support for sh-pe target.
+ * pe-sh.c: New file. Support code for sh-pe target.
+ * pei-sh.c: New file. Support code for sh-pe target.
+
+ * pe-mips.c: New file. Support code for mips-pe target.
+ * pei-mips.c: New file. Support code for mips-pe target.
+
+2000-02-27 Jakub Jelinek <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.
+
+2000-02-25 Rodney Brown (RodneyBrown@pmsc.com)
+
+ * som.c (SOM_HOWTO): Define.
+ (som_hppa_howto_table): Use it.
+
+2000-02-25 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
+
+ * config.bfd: Enable 64 bit support for GNU/Linux/sparc.
+
+ * config.bfd: Enable 64 bit support for Solaris7+/sparc.
+
+2000-02-24 Catherine Moore <clm@cygnus.com>
+
+ * som.c (som_misc_symbol_info): Add field
+ secondary_def.
+ (som_bfd_derive_misc_symbol_info): Initialize
+ secondary_def.
+ (som_build_and_write_symbol_table): Keep track
+ of secondary_def field.
+ (som_slurp_symbol_table): Set BSF_WEAK symbol flag
+ if secondary_def field is set.
+ (som_bfd_ar_write_symbol_stuff): Initialize
+ secondary_def.
+
+2000-02-23 Stephane Carrez <stcarrez@worldnet.fr>
+
+ * 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>
+
+ * bfd-in.h: Update copyright date.
+
+2000-02-23 Linas Vepstas <linas@linas.org>
+
+ * cpu-i370.c: New file.
+ * elf32-i370.c: New file.
+ * archures.c (enum bfd_architecture): Add bfd_arch_i370.
+ (bfd_i370_arch): New.
+ (bfd_archures_list): Add bfd_i370_arch.
+ * elf.c (prep_headers): Add bfd_arch_i370.
+ * Makefile.am: Add support for IBM 370 elf.
+ * config.bfd: Likewise.
+ * configure.in: Likewise.
+ * libbfd.h (bfd_reloc_code_real_names): Likewise.
+ * reloc.c (bfd_reloc_code_type): Likewise.
+ * targets.c: Likewise.
+
+ * Makefile.in: Regenerate.
+ * configure: Regenerate.
+ * bfd-in2.h: Regenerate.
+
+2000-02-22 Ian Lance Taylor <ian@zembu.com>
+
+ * elf32-i386.c (elf_i386_info_to_howto_rel): Give a warning for
+ invalid relocation types, and change them to R_386_NONE.
+
+2000-02-22 H.J. Lu <hjl@gnu.org>
+
+ * elflink.h (elf_link_add_object_symbols): If a version symbol is
+ not defined, don't add a second ELF_VER_CHR.
+
+ * elflink.h (elf_bfd_final_link): Call output_extsym for global
+ symbols converted to local symbols even when stripping all
+ symbols.
+ (elf_link_output_extsym): Process global symbols converted to
+ local symbols even if they are being stripped.
+
+2000-02-21 Alan Modra <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.
+
+ * elflink.h (elf_gc_sweep): Skip non-elf input bfds.
+ (elf_gc_sections): Same here.
+ (elf_gc_common_finalize_got_offsets): And here.
+
+2000-02-21 Ian Lance Taylor <ian@zembu.com>
+
+ ELF HPPA doesn't work at present; remove it until it does.
+ * config.bfd: Comment out setting targ_defvec to
+ bfd_elf32_hppa_vec.
+ * Makefile.am: Rebuild dependencies.
+ (BFD32_BACKENDS): Remove elf32-hppa.lo.
+ (BFD32_BACKENDS_CFILES): Remove elf32-hppa.c.
+ (SOURCE_HFILES): Remove elf32-hppa.h and hppa_stubs.h.
+ * Makefile.in: Rebuild.
+ * targets.c (bfd_target_vector): Comment out bfd_elf32_hppa_vec.
+
+2000-02-18 Geoff Keating <geoffk@cygnus.com>
+
+ * coffcode.h (coff_set_arch_mach_hook): Use free(), because there
+ is no bfd_free(). Revert bfd_free part of previous change.
+
+2000-02-18 Geoff Keating <geoffk@cygnus.com>
+
+ * coffcode.h (coff_set_arch_mach_hook): Don't use variable-size
+ arrays.
+ (coff_compute_section_file_positions): Use bfd_free to pair
+ bfd_malloc.
+ (coff_write_object_contents): Likewise.
+
+ * coff-rs6000.c (xcoff_howto_table_16): New variable.
+ (xcoff_rtype2howto): Handle 16-bit variants of 32-bit relocs.
+
+2000-02-18 Ulrich Drepper <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.
+
+2000-02-17 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.
+
+ * bfd-in.h: Move declarations of bfd_get_elf_phdr_upper_bound and
+ bfd_get_elf_phdrs in from bfd-in2.h, correcting patch of
+ 1999-11-29.
+ * bfd-in2.h: Rebuild.
+
+2000-02-10 Timothy Wall <twall@cygnus.com>
+
+ * 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.
+
+2000-02-10 Toshiyasu Morita (toshi.morita@sega.com)
+
+ * coff-sh.c (USES1_REG, USES2_REG, SETS1_REG, SETS2_REG,
+ USESF1_REG, USESF2_REG, SETSF1_REG, SETSF2_REG): New macros.
+ * (sh_insn_sets_reg, sh_insn_sets_freg): New prototypes.
+ * (sh_insn_sets_reg, sh_insn_uses_or_sets_reg, sh_insns_sets_freg,
+ sh_insns_uses_or_sets_freg): New functions.
+ * (sh_insn_uses_reg, sh_insn_uses_freg): Use new macros.
+ * (sh_insns_conflict): Use new functions and new macros to
+ detect conflicts when two instructions both set same integer registers,
+ both set same fp register, and both set special register.
+
+2000-02-09 Timothy Wall <twall@cygnus.com>
+
+ * coffgen.c (coff_real_object_p): Set arch/mach info prior to
+ swapping in sections, so that the swapping routines have access to
+ the arch/mach info.
+
+2000-02-08 Mark Elbrecht <snowball3@bigfoot.com>
+
+ * coff-go32.c: Update comment. Update copyright.
+
+2000-01-27 Thomas de Lellis <tdel@windriver.com>
+
+ * syms.c (bfd_decode_symclass)
+ Two new class characters were added - 'V' and 'v'. The
+ meaning of 'W' is now restricted to just weak non-object
+ symbols. This allows differentiation between, for example,
+ weak functions vs weak objects. nm for example now dumps:
+ 'W' = weak global
+ 'w' = weak unresolved
+ 'V' = weak global object
+ 'v' = weak unresolved object
+
+ (bfd_is_undefined_symclass): New function. Return true if the
+ given symbol class represents and undefined/unresolved symbol.
+
+ (bfd_symbol_info): Use bfd_is_undefined_symclass to check for
+ unresolved symbols.
+
+ * bfd-in2.h: Add prototype for bfd_is_undefined_symbol().
+
+ * elf32-arm.h (elf32_arm_get_symbol_type): If a symbol has the
+ STT_ARM_16BIT flag set, but it is not attached to a data object
+ return STT_ARM_16BIT so that it will be treated as code by the
+ disassembler.
+
+2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * coff-i386.c (i3coff_object_p): Remove prototype.
+ Update copyright.
+
+ * elflink.c (_bfd_elf_link_record_dynamic_symbol): Add const
+ to name. Update copyright.
+
+ * trad-core.c (trad_unix_core_file_p): Cast core_regsec
+ assignment to avoid warning. Update copyright.
+
+2000-01-24 Robert Lipe (robertl@sco.com)
+
+ * coffcode.h (coff_write_object_contents): Get buff via bfd_malloc
+ instead of using GNU C extension.
+
+2000-01-21 Nick Clifton <nickc@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.
+
+2000-01-14 Nick Clifton <nickc@cygnus.com>
+
+ * linker.c (default_indirect_link_order): oops - fix incorrectly
+ applied patch from Tim Wall.
+
+2000-01-13 Timothy Wall (twall@tiac.net>
+
+ * coffcode.h: Use bfd_coff_xxx instead of the macro XXX (where xxx
+ = scnhsz, filhsz, relsz, aoutsz, etc)
+
+ * coffswap.h: Ditto.
+
+2000-01-13 Nick Clifton <nickc@cygnus.com>
+
+ * elf32-arm.h (elf32_thumb_to_arm_stub): Fix offset in branch to
+ interwork thumb to arm stub.
+
+2000-01-13 Timothy Wall (twall@tiac.net>
+
+ * archures.c (bfd_octets_per_byte): New function: Return
+ target byte size.
+ (bfd_arch_mach_octets_per_byte): New function: Return target
+ byte size.
+
+ * section.c: Distinguish between octets and bytes for usage of
+ _cooked_size, _raw_size, and output_offset. Clarify
+ description of bfd_set_section_contents.
+
+ * bfd-in2.h: Regenerate.
+
+ * coffgen.c: Indicate that the offset parameter is in bytes, not
+ octets.
+
+ * cofflink.c (bfd_coff_link_input_bfd): Use bfd_octets_per_byte
+ where appropriate to get the octet offset when calling
+ bfd_set_section_contents.
+ (bfd_coff_reloc_link_order): Ditto.
+
+ * linker.c (bfd_generic_reloc_link_order): Ditto.
+ (_bfd_default_link_order): Ditto.
+
+ * reloc.c (bfd_perform_relocation): Distinguish between octets
+ and bytes. Use octets when indexing into octet data; use bytes
+ when calculating target addresses.
+ (bfd_install_relocation): Ditto.
+
+ * srec.c (srec_write_section): Ditto.
+
+2000-01-13 Nick Clifton <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 functioning 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.
+
+2000-01-03 Martin v. Loewis <loewis@informatik.hu-berlin.de>
+
+ * elflink.c (_bfd_elf_link_record_dynamic_symbol): Process symbol
+ visibility.
+ * elflink.h (elf_link_add_object_symbols): Combine visibilities.
+ * elf.c (bfd_elf_print_symbol): Interpret st_other as visibility.
+
+For older changes see ChangeLog-9899
+
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
+version-control: never
+End:
diff --git a/contrib/binutils/bfd/ChangeLog-9193 b/contrib/binutils/bfd/ChangeLog-9193
index 15af931..01863de 100644
--- a/contrib/binutils/bfd/ChangeLog-9193
+++ b/contrib/binutils/bfd/ChangeLog-9193
@@ -408,7 +408,7 @@ Tue Nov 30 16:45:23 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
* 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.
+ sco5-core.o, which no longer exists.
(CFILES): Added all *-core.c files.
Rebuilt dependencies.
@@ -458,11 +458,11 @@ Mon Nov 22 14:17:36 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
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
+ * config/delta88.mh (HDEFINES): Define this to be -DPTRACE_CORE.
+ * config/delta88.mh (HDEPFILES): Defined to be ptrace-core.o.
+ * 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.
+ * targets.c (ptrace_core_vec): New vector.
Mon Nov 22 02:33:12 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
@@ -1855,7 +1855,7 @@ 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.
+ * configure.host: Use it.
Wed Sep 1 14:23:32 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
@@ -2379,8 +2379,9 @@ Sat Aug 7 09:14:21 1993 David J. Mackenzie (djm@thepub.cygnus.com)
* 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/h8300-coff.mt, config/h8500-coff.mt, config/sh-coff.mt,
+ config/st2000.mt, config/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.
@@ -2559,7 +2560,7 @@ Tue Aug 3 16:33:11 1993 David J. Mackenzie (djm@thepub.cygnus.com)
Tue Aug 3 15:19:09 1993 Fred Fish (fnf@deneb.cygnus.com)
- * nlm_slurp_symbol_table: Don't use '&' on arrays.
+ * nlmcode.h (nlm_slurp_symbol_table): Don't use '&' on arrays.
Tue Aug 3 11:06:28 1993 Ian Lance Taylor (ian@cygnus.com)
@@ -2671,7 +2672,7 @@ 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.
+ * configure.host: Use them.
Mon Jul 26 13:22:15 1993 Ian Lance Taylor (ian@cygnus.com)
@@ -3740,8 +3741,8 @@ 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
+ * hosts/hppabsd.h: Fix declarations of malloc and free.
+ * 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.
@@ -4424,7 +4425,7 @@ Tue Jan 26 11:43:14 1993 Ian Lance Taylor (ian@cygnus.com)
(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
+ coff-mips.c, coffgen.c, ieee.c, oasys.c, reloc.c, syms.c: Use
bfd_is_com_section macro rather than checking for equality to
bfd_com_section.
@@ -4850,7 +4851,7 @@ Thu Nov 5 15:34:19 1992 Ian Lance Taylor (ian@cygnus.com)
Thu Nov 5 04:43:09 1992 John Gilmore (gnu@cygnus.com)
- * target.c (struct bfd_target): Eliminate the SDEF and SDEF_FMT
+ * targets.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,
@@ -5261,12 +5262,6 @@ Fri Aug 28 16:29:15 1992 Ian Lance Taylor (ian@cygnus.com)
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:
@@ -5297,7 +5292,7 @@ Tue Aug 25 08:39:10 1992 Steve Chamberlain (sac@thepub.cygnus.com)
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.
+ * ctor.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.
@@ -5381,7 +5376,7 @@ Sat Aug 8 23:15:35 1992 Fred Fish (fnf@cygnus.com)
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
+ * archive.c (normalize): Add to CONST to match actual usages with
CONST.
Mon Aug 3 00:35:29 1992 Fred Fish (fnf@cygnus.com)
@@ -5471,7 +5466,7 @@ Tue Jul 7 00:23:23 1992 Fred Fish (fnf@cygnus.com)
Sat Jul 4 03:29:41 1992 John Gilmore (gnu at cygnus.com)
- * syms.h: Define BSF_FILE, update BSF_SECTION_SYM desc.
+ * syms.c: 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.
@@ -5497,7 +5492,7 @@ 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.
+ * section.c (elf_print_symbol): Make CONST.
Mon Jun 22 17:35:24 1992 Per Bothner (bothner@cygnus.com)
@@ -5766,7 +5761,7 @@ Tue May 12 14:08:59 1992 Steve Chamberlain (sac@thepub.cygnus.com)
* opncls.c: don't use fdopen on DOS systems
short patches from Glenn Kasten (glenn@ready.com)
- * target.c: enabled oasys support
+ * targets.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
@@ -5923,7 +5918,7 @@ Tue Mar 17 14:12:25 1992 Per Bothner (bothner@rtl.cygnus.com)
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
+ * coff-a29k.c, coffcode.h: more hangovers from the bfd_abs_section
change
Mon Mar 16 14:57:22 1992 Steve Chamberlain (sac@rtl.cygnus.com)
@@ -6384,7 +6379,7 @@ Sat Nov 30 21:19:15 1991 Steve Chamberlain (sac at rtl.cygnus.com)
* 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
+ newsos3.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)
@@ -6792,7 +6787,7 @@ Fri Oct 11 13:03:02 1991 Per Bothner (bothner at cygnus.com)
* 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.
+ * newsos3.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
@@ -7182,7 +7177,7 @@ Wed Aug 21 14:33:06 1991 Roland H. Pesch (pesch at cygint.cygnus.com)
* bfd.c, reloc.c, syms.c: minor spelling/wording fixes in doc
portions
- * Makefile.in, awkscan-ip, awkscan-p, intobfd,
+ * Makefile.in, awkscan-ip, awkscan-p, doc/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
@@ -7251,12 +7246,14 @@ Mon Jul 15 16:27:42 1991 Steve Chamberlain (steve at cygint.cygnus.com)
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.
+ * core.c: New file.
+ * format.c: New file.
+ * reloc.c: New file.
+ * section.c: New file.
+ * syms.c: New filew.
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
@@ -7299,7 +7296,7 @@ Fri Jun 7 12:35:46 1991 Sean Fagan (sef at cygint.cygnus.com)
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
+ * 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.
@@ -7445,7 +7442,7 @@ Fri May 10 16:58:53 1991 John Gilmore (gnu at cygint.cygnus.com)
get_section_contents in favor of generics. New transfer vector
regime.
- * newsos.c: New support for Sony NEWS, another a.out format.
+ * newsos3.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.
@@ -7465,7 +7462,7 @@ Fri May 10 16:58:53 1991 John Gilmore (gnu at cygint.cygnus.com)
* 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.
+ * Makefile.in: Add aout.c and newsos3.c.
* archive.c, ieee.c, oasys.c: Lint.
@@ -7698,7 +7695,7 @@ Mon Jan 28 19:15:29 PST 1991 steve@cygnus.com
Mon Jan 21 11:53:51 PST 1991 steve@cygnus.com
- * bfd.h changed name of alignment entry in sec_struct to
+ * 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,
@@ -7706,21 +7703,21 @@ Mon Jan 21 11:53:51 PST 1991 steve@cygnus.com
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
+ * 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.
+ * 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
+ * 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.
+ * opncls.c (bfd_create): created.
- * coff-code.h (coff_new_section_hook) took away refs
+ * 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
@@ -7732,36 +7729,36 @@ Mon Jan 21 11:53:51 PST 1991 steve@cygnus.com
Sat Jan 19 16:10:42 PST 1991 steve@cygnus.com
- * archive.c lots of lint
+ * archive.c> lots of lint.
- * b.out.c added callj relocation support, upgrated reloc howto.
+ * 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.c: lots of lint, support for new bfd entry point
bfd_print_symbol.
- * bfd.h changed definition of asymbol to contain pointer to
+ * 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.
+ * cache.c: took out print statements, put in BFD_ASSERT calls.
- * coff-code.h various lints, corrected linenumber output
+ * 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.
+ * icoff.c: Added support for new howto shape.
- * liba.out.h Added support for new asymbol shape
+ * liba.out.h: Added support for new asymbol shape
- * libbfd.c various lints
+ * libbfd.c: various lints
- * libbfd.h various lints
+ * libbfd.h: various lints
- * libcoff.h added support for new asymbol shape.
+ * libcoff.h: added support for new asymbol shape.
- * sunos.c various lints. 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
@@ -7785,7 +7782,7 @@ Wed Jan 16 21:38:09 PST 1991 steve@cygnus.com
Wed Jan 16 01:55:53 1991 John Gilmore (gnu at rtl)
* ChangeLog: Started ChangeLog for BFD.
- * ToDo: Create file for suggestions.
+ * TODO: Create file for suggestions.
* Makefile: Support easy loading into Saber C.
Add dependencies for icoff.o and bcs88kcoff.o.
diff --git a/contrib/binutils/bfd/ChangeLog-9495 b/contrib/binutils/bfd/ChangeLog-9495
index 9868583..4657d66 100644
--- a/contrib/binutils/bfd/ChangeLog-9495
+++ b/contrib/binutils/bfd/ChangeLog-9495
@@ -178,7 +178,7 @@ Fri Dec 1 14:46:51 1995 Ian Lance Taylor <ian@cygnus.com>
* bfd.c (bfd_record_phdr): New function.
* bfd-in.h (bfd_record_phdr): Declare.
- * bfd_in2.h: Rebuild.
+ * bfd-in2.h: Rebuild.
* elf32-sparc.c (elf32_sparc_relocate_section): Remove bogus
BFD_ASSERT.
@@ -407,7 +407,7 @@ Wed Nov 15 18:05:52 1995 Ian Lance Taylor <ian@cygnus.com>
_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.
+ * bfd-in2.h, 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
@@ -2357,7 +2357,7 @@ Wed Aug 6 09:12:50 1995 Doug Evans <dje@canuck.cygnus.com>
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
+ * som.c (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>
@@ -4334,7 +4334,7 @@ Thu Nov 17 17:37:39 1994 Ken Raeburn <raeburn@cujo.cygnus.com>
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
+ * elf32-hppa.c (elf32_hppa_bfd_final_link_relocated): Use the
vma from the output_section containing $global$ when computing
global_vlaue.
@@ -7454,7 +7454,7 @@ Fri Apr 15 12:22:07 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
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
+ * archive.c: Consistently use ARFMAG; from
schwab@issan.informatik.uni-dortmund.de (Andreas Schwab).
(_bfd_write_archive_contents): Use ARFMAG rather than '`' and
'\012'.
@@ -8307,7 +8307,7 @@ Mon Mar 21 12:28:19 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
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 (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.
@@ -8539,7 +8539,7 @@ Mon Mar 14 11:41:23 1994 Jeffrey A. Law (law@snake.cs.utah.edu)
undefined symbols. Correctly distinguish between debugger symbols
and section symbols.
- * som (setup_sections): Set SEC_DEBUGGING and the section attributes
+ * som.c (setup_sections): Set SEC_DEBUGGING and the section attributes
for spaces and subspaces.
* som.c (som_bfd_count_ar_symbols): Fix typo.
@@ -9587,7 +9587,7 @@ Mon Jan 24 12:38:54 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
* elf32-hppa.c (hppa_elf_gen_reloc_type): Typo (== for =).
- * bfd/aoutx.h (aout_link_input_section_std,
+ * 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,
diff --git a/contrib/binutils/bfd/ChangeLog-9697 b/contrib/binutils/bfd/ChangeLog-9697
index dc22c8c..e9a5c1d 100644
--- a/contrib/binutils/bfd/ChangeLog-9697
+++ b/contrib/binutils/bfd/ChangeLog-9697
@@ -235,7 +235,7 @@ 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
+ * aclocal.m4, configure, Makefile.in: Rebuild with current
automake and autoconf.
* coff-arm.c (arm_allocate_interworking_sections): Fix typo
@@ -672,7 +672,7 @@ Tue Sep 9 10:21:56 1997 Nick Clifton <nickc@cygnus.com>
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.
+ * elf64-alpha.c (reloc_howto_type): Fix the howto table.
Thu Sep 4 09:44:10 1997 Ian Lance Taylor <ian@cygnus.com>
@@ -762,7 +762,10 @@ Tue Aug 26 17:26:51 1997 Ian Lance Taylor <ian@cygnus.com>
* 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.
+ * aclocal.m4: Rebuild.
+ * configure: Rebuild.
+ * Makefile.in: Rebuild.
+ * doc/Makefile.in: Rebuild.
Mon Aug 25 16:14:34 1997 Christopher Provenzano <proven@cygnus.com>
@@ -920,8 +923,10 @@ 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.
+ * Makefile.am: Corresponding changes.
+ * configure.in: Corresponding changes.
+ * Makefile.in: Rebuild.
+ * configure: Rebuild.
Fri Aug 8 18:34:36 1997 Ian Lance Taylor <ian@cygnus.com>
@@ -958,7 +963,9 @@ Fri Aug 1 12:58:32 1997 Ian Lance Taylor <ian@cygnus.com>
* 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.
+ * Makefile.in: Rebuild.
+ * aclocal.m4: Rebuild.
+ * configure: Rebuild.
Thu Jul 31 19:55:36 1997 Ian Lance Taylor <ian@cygnus.com>
@@ -2022,7 +2029,7 @@ Thu Mar 20 12:39:02 1997 Ian Lance Taylor <ian@cygnus.com>
* 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.
+ * targets.c (m68ksysvcoff_vec): Declare.
(bfd_target_vector): Add m68ksysvcoff_vec.
* config.bfd (m68*-motorola-sysv*): New target.
* configure.in (m68ksysvcoff_vec): New vector.
@@ -2478,7 +2485,7 @@ Fri Feb 21 13:55:14 1997 Doug Evans <dje@seba.cygnus.com>
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.
+ * bfd-in2.h, libbfd.h: Regenerated.
Thu Feb 20 23:50:31 1997 Jeffrey A Law (law@cygnus.com)
@@ -2495,12 +2502,18 @@ Thu Feb 20 23:50:31 1997 Jeffrey A Law (law@cygnus.com)
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.
+ * Makefile.in: New target, elf-*-D30V.
+ * archures.c: New target, elf-*-D30V.
+ * config.bfd: New target, elf-*-D30V.
+ * configure.in: New target, elf-*-D30V.
+ * elf.c: New target, elf-*-D30V.
+ * reloc.c: New target, elf-*-D30V.
+ * targets.c: New target, elf-*-D30V.
+ * bfd-in2.h: Rebuilt.
+ * configure: Rebuilt.
+ * libbfd.h: Rebuilt.
+ * cpu-d30v.c: New files.
+ * elf32-d30v.c: New files.
Tue Feb 18 15:31:48 1997 Fred Fish <fnf@cygnus.com>
@@ -3398,8 +3411,8 @@ Wed Oct 2 15:46:45 1996 Klaus Kaempf <kkaempf@progis.de>
* 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.
+ (_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.
@@ -3521,7 +3534,7 @@ 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.
+ * cpu-m32r.c, elf32-m32r.c: New files.
Thu Sep 12 11:10:05 1996 Ian Lance Taylor <ian@cygnus.com>
@@ -3626,8 +3639,13 @@ Mon Sep 9 22:36:01 1996 Jeffrey A Law (law@cygnus.com)
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: Add m32r support.
+ * configure.in: Likewise.
+ * configure: Likewise.
+ * Makefile.in: Likewise.
+ * archures.c: Likewise.
+ * elf.c: Likewise.
+ * targets.c: Likewise.
* config.bfd: Keep target list alphabetically sorted.
Mon Sep 9 11:48:41 1996 Jeffrey A Law (law@cygnus.com)
@@ -4320,7 +4338,7 @@ Tue Jun 25 11:41:24 1996 Richard Henderson <rth@tamu.edu>
Mon Jun 24 17:15:10 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
- * Makefile.in, (bindir, libdir, datadir, mandir, infodir, includedir):
+ * 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
@@ -4699,7 +4717,7 @@ Wed May 29 16:15:29 1996 Ian Lance Taylor <ian@cygnus.com>
* 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
+ * configure.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,
@@ -5110,7 +5128,7 @@ 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
+ * coffcode.h (coff_write_object_contents): Use #ifdef PPC_PE, not
#ifdef PPC.
* elfcore.h (bfd_prstatus, bfd_fpregset): Add thread argument.
diff --git a/contrib/binutils/bfd/ChangeLog-9899 b/contrib/binutils/bfd/ChangeLog-9899
index c6348c4..6d7f5cd 100644
--- a/contrib/binutils/bfd/ChangeLog-9899
+++ b/contrib/binutils/bfd/ChangeLog-9899
@@ -2072,10 +2072,10 @@ Wed Jun 16 03:09:57 1999 Jeffrey A Law (law@cygnus.com)
1999-06-10 Jakub Jelinek <jj@ultra.linux.cz>
- * elf64_sparc.c (sparc64_elf_relocate_section): Use R_SPARC_max_std
+ * 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.c (elf32_sparc_relocate_section): Likewise.
(elf32_sparc_info_to_howto): Likewise; handle vtable relocations.
1999-06-07 Richard Henderson <rth@cygnus.com>
@@ -2380,7 +2380,7 @@ Wed Jun 2 11:51:12 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
1999-05-25 Philip Blundell <pb@nexus.co.uk>
- * bfd/elf32-arm.h (elf32_arm_link_hash_newfunc): New function.
+ * 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
@@ -2431,7 +2431,7 @@ Mon May 17 13:35:35 1999 Stan Cox <scox@cygnus.com>
IMAGE_REL_MCORE_RVA.
(coff_mcore_relocate_section): Add support for
IMAGE_REL_MCORE_RVA.
- * elf32-mcore (mcore_elf_howto_): Add R_MCORE_RELATIVE.
+ * elf32-mcore.c (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.
@@ -2724,9 +2724,9 @@ Sat Apr 10 15:12:09 1999 Richard Henderson <rth@cygnus.com>
* 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
+ * pe-arm.c: 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
+ * pei-arm.c: 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.
@@ -3079,7 +3079,8 @@ Tue Dec 22 15:21:41 1998 Catherine Moore <clm@cygnus.com>
1998-12-16 Gavin Romig-Koch <gavin@cygnus.com>
- * archures.c,bfd-in2.h (bfd_mach_mips4111): New.
+ * archures.c (bfd_mach_mips4111): New.
+ * bfd-in2.h: Regenerate.
* 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):
@@ -3597,7 +3598,7 @@ Mon Oct 5 12:02:31 1998 Gavin Romig-Koch <gavin@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-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):
@@ -4334,7 +4335,10 @@ Thu Jun 25 18:31:41 1998 Richard Henderson <rth@cygnus.com>
* 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.
+ * evax-alpha.c: Likewise.
+ * i386msdos.c: Likewise.
+ * i386os9k.c: Likewise.
+ * 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.
@@ -4600,7 +4604,7 @@ Thu May 7 17:40:56 1998 Ian Lance Taylor <ian@cygnus.com>
* 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-alpha.c: Don't include <stdio.h>.
* evax-egsd.c: Likewise.
* evax-etir.c: Likewise.
* evax-misc.c: Likewise.
diff --git a/contrib/binutils/bfd/Makefile.am b/contrib/binutils/bfd/Makefile.am
index 630cbe1..c96f171 100644
--- a/contrib/binutils/bfd/Makefile.am
+++ b/contrib/binutils/bfd/Makefile.am
@@ -25,19 +25,23 @@ BFD_H = bfd.h
# for the debugger, so if you are downloading things as S-records you
# need two copies of the executable, one to download and one for the
# debugger).
-BFD_LIBS = \
+BFD32_LIBS = \
archive.lo archures.lo bfd.lo cache.lo coffgen.lo corefile.lo \
format.lo init.lo libbfd.lo opncls.lo reloc.lo \
section.lo syms.lo targets.lo hash.lo linker.lo \
srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo \
- dwarf2.lo
+ merge.lo dwarf2.lo
-BFD_LIBS_CFILES = \
+BFD64_LIBS = archive64.lo
+
+BFD32_LIBS_CFILES = \
archive.c archures.c bfd.c cache.c coffgen.c corefile.c \
format.c init.c libbfd.c opncls.c reloc.c \
section.c syms.c targets.c hash.c linker.c \
srec.c binary.c tekhex.c ihex.c stabs.c stab-syms.c \
- dwarf2.c
+ merge.c dwarf2.c
+
+BFD64_LIBS_CFILES = archive64.c
# This list is alphabetized to make it easier to keep in sync
# with the decls and initializer in archures.c.
@@ -68,10 +72,14 @@ ALL_MACHINES = \
cpu-m10300.lo \
cpu-mcore.lo \
cpu-mips.lo \
+ cpu-mmix.lo \
cpu-ns32k.lo \
+ cpu-openrisc.lo \
+ cpu-pdp11.lo \
cpu-pj.lo \
cpu-powerpc.lo \
cpu-rs6000.lo \
+ cpu-s390.lo \
cpu-sh.lo \
cpu-sparc.lo \
cpu-tic30.lo \
@@ -81,6 +89,7 @@ ALL_MACHINES = \
cpu-vax.lo \
cpu-we32k.lo \
cpu-w65.lo \
+ cpu-xstormy16.lo \
cpu-z8k.lo
ALL_MACHINES_CFILES = \
@@ -110,10 +119,14 @@ ALL_MACHINES_CFILES = \
cpu-m10300.c \
cpu-mcore.c \
cpu-mips.c \
+ cpu-mmix.c \
cpu-ns32k.c \
+ cpu-openrisc.c \
+ cpu-pdp11.c \
cpu-pj.c \
cpu-powerpc.c \
cpu-rs6000.c \
+ cpu-s390.c \
cpu-sh.c \
cpu-sparc.c \
cpu-tic30.c \
@@ -123,6 +136,7 @@ ALL_MACHINES_CFILES = \
cpu-vax.c \
cpu-we32k.c \
cpu-w65.c \
+ cpu-xstormy16.c \
cpu-z8k.c
# The .o files needed by all of the 32 bit vectors that are configured into
@@ -154,7 +168,6 @@ BFD32_BACKENDS = \
coff-m68k.lo \
coff-m88k.lo \
coff-mips.lo \
- coff-pmac.lo \
coff-rs6000.lo \
coff-sh.lo \
coff-sparc.lo \
@@ -182,6 +195,7 @@ BFD32_BACKENDS = \
elf32-d30v.lo \
elf32-fr30.lo \
elf32-gen.lo \
+ elf32-h8300.lo \
elf32-hppa.lo \
elf32-i370.lo \
elf32-i386.lo \
@@ -197,14 +211,20 @@ BFD32_BACKENDS = \
elf-m10300.lo \
elf32-mcore.lo \
elf32-mips.lo \
+ elf32-openrisc.lo \
elf32-pj.lo \
elf32-ppc.lo \
+ elf32-s390.lo \
elf32-sh.lo \
elf32-sh-lin.lo \
+ elf32-sh-nbsd.lo \
elf32-sparc.lo \
elf32-v850.lo \
+ elf32-xstormy16.lo \
elf32.lo \
elflink.lo \
+ elf-strtab.lo \
+ elf-eh-frame.lo \
epoc-pe-arm.lo \
epoc-pei-arm.lo \
hp300bsd.lo \
@@ -236,6 +256,7 @@ BFD32_BACKENDS = \
ns32knetbsd.lo \
oasys.lo \
pc532-mach.lo \
+ pdp11.lo \
pe-arm.lo \
pei-arm.lo \
pe-i386.lo \
@@ -292,7 +313,6 @@ BFD32_BACKENDS_CFILES = \
coff-m68k.c \
coff-m88k.c \
coff-mips.c \
- coff-pmac.c \
coff-rs6000.c \
coff-sh.c \
coff-sparc.c \
@@ -320,6 +340,7 @@ BFD32_BACKENDS_CFILES = \
elf32-d30v.c \
elf32-fr30.c \
elf32-gen.c \
+ elf32-h8300.c \
elf32-hppa.c \
elf32-i370.c \
elf32-i386.c \
@@ -334,14 +355,20 @@ BFD32_BACKENDS_CFILES = \
elf-m10300.c \
elf32-mcore.c \
elf32-mips.c \
+ elf32-openrisc.c \
elf32-pj.c \
elf32-ppc.c \
+ elf32-s390.c \
elf32-sh.c \
elf32-sh-lin.c \
+ elf32-sh-nbsd.c \
elf32-sparc.c \
elf32-v850.c \
+ elf32-xstormy16.c \
elf32.c \
elflink.c \
+ elf-strtab.c \
+ elf-eh-frame.c \
epoc-pe-arm.c \
epoc-pei-arm.c \
hp300bsd.c \
@@ -373,6 +400,7 @@ BFD32_BACKENDS_CFILES = \
ns32knetbsd.c \
oasys.c \
pc532-mach.c \
+ pdp11.c \
pe-arm.c \
pei-arm.c \
pe-i386.c \
@@ -416,8 +444,12 @@ BFD64_BACKENDS = \
elf64-ia64.lo \
elf64-gen.lo \
elf64-mips.lo \
+ elf64-mmix.lo \
+ elf64-ppc.lo \
+ elf64-s390.lo \
elf64-sparc.lo \
elf64.lo \
+ mmo.lo \
nlm32-alpha.lo \
nlm64.lo \
pepigen.lo
@@ -433,8 +465,12 @@ BFD64_BACKENDS_CFILES = \
elf64-hppa.c \
elf64-gen.c \
elf64-mips.c \
+ elf64-mmix.c \
+ elf64-ppc.c \
+ elf64-s390.c \
elf64-sparc.c \
elf64.c \
+ mmo.c \
nlm32-alpha.c \
nlm64.c
@@ -462,6 +498,7 @@ OPTIONAL_BACKENDS_CFILES = \
WORDSIZE = @wordsize@
ALL_BACKENDS = @all_backends@
BFD_BACKENDS = @bfd_backends@
+BFD_LIBS = @bfd_libs@
BFD_MACHINES = @bfd_machines@
TDEFAULTS = @tdefaults@
@@ -469,7 +506,8 @@ INCLUDES = -D_GNU_SOURCE @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES
# C source files that correspond to .o's.
SOURCE_CFILES = \
- $(BFD_LIBS_CFILES) \
+ $(BFD32_LIBS_CFILES) \
+ $(BFD64_LIBS_CFILES) \
$(ALL_MACHINES_CFILES) \
$(BFD32_BACKENDS_CFILES) \
$(BFD64_BACKENDS_CFILES) \
@@ -487,7 +525,8 @@ SOURCE_HFILES = \
elfcode.h elfcore.h elflink.h freebsd.h genlink.h go32stub.h \
libaout.h libbfd.h libcoff.h libecoff.h libhppa.h \
libieee.h libnlm.h liboasys.h libpei.h netbsd.h nlm-target.h \
- nlmcode.h nlmswap.h ns32k.h peicode.h som.h vms.h xcoff-target.h
+ nlmcode.h nlmswap.h ns32k.h peicode.h som.h vms.h libxcoff.h \
+ xcoff-target.h version.h
## ... and all .h files which are in the build tree.
BUILD_HFILES = \
@@ -499,12 +538,12 @@ SRC_POTFILES = $(SOURCE_CFILES) $(SOURCE_HFILES)
BLD_POTFILES = $(BUILD_CFILES) $(BUILD_HFILES)
po/SRC-POTFILES.in: @MAINT@ Makefile $(SRC_POTFILES)
- for file in $(SRC_POTFILES); do echo $$file; done | sort > tmp \
- && mv tmp $(srcdir)/po/SRC-POTFILES.in
+ for file in $(SRC_POTFILES); do echo $$file; done | sort > tmp.src \
+ && mv tmp.src $(srcdir)/po/SRC-POTFILES.in
po/BLD-POTFILES.in: @MAINT@ Makefile $(BLD_POTFILES)
- for file in $(BLD_POTFILES); do echo $$file; done | sort > tmp \
- && mv tmp $(srcdir)/po/BLD-POTFILES.in
+ for file in $(BLD_POTFILES); do echo $$file; done | sort > tmp.bld \
+ && mv tmp.bld $(srcdir)/po/BLD-POTFILES.in
# The following target is retained for upgrade purposes.
# This target used to exist in older versions of this makefile, and was
@@ -539,7 +578,7 @@ stamp-ofiles: Makefile
ofiles: stamp-ofiles ; @true
-libbfd_la_SOURCES = $(BFD_LIBS_CFILES)
+libbfd_la_SOURCES = $(BFD32_LIBS_CFILES) $(BFD64_LIBS_CFILES)
libbfd_la_DEPENDENCIES = $(OFILES) ofiles
libbfd_la_LIBADD = `cat ofiles` @WIN32LIBADD@
libbfd_la_LDFLAGS = -release $(VERSION) @WIN32LDFLAGS@
@@ -610,12 +649,14 @@ pepigen.c : peXXigen.c
sed -e s/XX/pep/g < $(srcdir)/peXXigen.c > pepigen.new
mv -f pepigen.new pepigen.c
-BFD_H_DEPS= $(INCDIR)/ansidecl.h
+BFD_H_DEPS= $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
LOCAL_H_DEPS= libbfd.h sysdep.h config.h
-$(BFD_LIBS): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS)
-$(BFD_MACHINES): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS)
-$(BFD_BACKENDS): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS)
-$(OPTIONAL_BACKENDS): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS)
+$(BFD32_LIBS) \
+ $(BFD64_LIBS) \
+ $(ALL_MACHINES) \
+ $(BFD32_BACKENDS) \
+ $(BFD64_BACKENDS) \
+ $(OPTIONAL_BACKENDS): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS)
# Install BFD include file, and others that it needs.
install-data-local: $(BFD_H)
@@ -623,8 +664,10 @@ install-data-local: $(BFD_H)
$(mkinstalldirs) $(DESTDIR)$(includedir)
$(INSTALL_DATA) $(BFD_H) $(DESTDIR)$(includedir)/bfd.h
$(INSTALL_DATA) $(INCDIR)/ansidecl.h $(DESTDIR)$(includedir)/ansidecl.h
+ $(INSTALL_DATA) $(INCDIR)/symcat.h $(DESTDIR)$(includedir)/symcat.h
$(INSTALL_DATA) $(INCDIR)/bfdlink.h $(DESTDIR)$(includedir)/bfdlink.h
+Makefile: $(srcdir)/configure.in
# Have to get rid of DEP1 here so that "$?" later includes all of $(CFILES).
DEP: dep.sed $(CFILES) $(HFILES) bfd.h
@@ -684,7 +727,8 @@ stmp-bfd-h: bfd-in3.h
touch stmp-bfd-h
BFD_H_FILES = bfd-in.h init.c opncls.c libbfd.c section.c archures.c \
- reloc.c syms.c bfd.c archive.c corefile.c targets.c format.c
+ reloc.c syms.c bfd.c archive.c corefile.c targets.c format.c version.h
+BFD64_H_FILES = archive64.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
@@ -702,7 +746,7 @@ headers:
# configured with --enable-maintainer-mode.
$(srcdir)/bfd-in2.h: @MAINT@ stmp-bin2-h ; @true
-stmp-bin2-h: $(BFD_H_FILES)
+stmp-bin2-h: $(BFD_H_FILES) $(BFD64_H_FILES)
(cd $(docdir); $(MAKE) $(FLAGS_TO_PASS) bfd.h)
cp $(docdir)/bfd.h bfd-in2.h-new
$(SHELL) $(srcdir)/../move-if-change bfd-in2.h-new $(srcdir)/bfd-in2.h
@@ -739,12 +783,13 @@ config.status: $(srcdir)/configure $(srcdir)/config.bfd $(srcdir)/configure.host
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
archive.lo: archive.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h \
- $(INCDIR)/aout/ranlib.h
-archures.lo: archures.c $(INCDIR)/filenames.h
+ $(INCDIR)/aout/ranlib.h $(INCDIR)/safe-ctype.h
+archures.lo: archures.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h
bfd.lo: bfd.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h \
- libcoff.h libecoff.h $(INCDIR)/coff/ecoff.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h
+ $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/sym.h libcoff.h libecoff.h $(INCDIR)/coff/ecoff.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h
cache.lo: cache.c $(INCDIR)/filenames.h
coffgen.lo: coffgen.c $(INCDIR)/filenames.h $(INCDIR)/coff/internal.h \
libcoff.h $(INCDIR)/bfdlink.h
@@ -755,24 +800,28 @@ libbfd.lo: libbfd.c $(INCDIR)/filenames.h
opncls.lo: opncls.c $(INCDIR)/filenames.h $(INCDIR)/objalloc.h
reloc.lo: reloc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h
section.lo: section.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h
-syms.lo: syms.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def
+syms.lo: syms.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def
targets.lo: targets.c $(INCDIR)/filenames.h $(INCDIR)/fnmatch.h \
targmatch.h
hash.lo: hash.c $(INCDIR)/filenames.h $(INCDIR)/objalloc.h
linker.lo: linker.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
genlink.h
-srec.lo: srec.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h
-binary.lo: binary.c $(INCDIR)/filenames.h
+srec.lo: srec.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/safe-ctype.h
+binary.lo: binary.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h
tekhex.lo: tekhex.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h
-ihex.lo: ihex.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h
+ihex.lo: ihex.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/safe-ctype.h
stabs.lo: stabs.c $(INCDIR)/filenames.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def
+ $(INCDIR)/aout/stab.def $(INCDIR)/safe-ctype.h
stab-syms.lo: stab-syms.c libaout.h $(INCDIR)/bfdlink.h \
$(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab.def
+merge.lo: merge.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
dwarf2.lo: dwarf2.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf2.h
+archive64.lo: archive64.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h
cpu-a29k.lo: cpu-a29k.c $(INCDIR)/filenames.h
cpu-alpha.lo: cpu-alpha.c $(INCDIR)/filenames.h
cpu-arc.lo: cpu-arc.c $(INCDIR)/filenames.h
@@ -800,47 +849,55 @@ cpu-m10200.lo: cpu-m10200.c $(INCDIR)/filenames.h
cpu-m10300.lo: cpu-m10300.c $(INCDIR)/filenames.h
cpu-mcore.lo: cpu-mcore.c $(INCDIR)/filenames.h
cpu-mips.lo: cpu-mips.c $(INCDIR)/filenames.h
+cpu-mmix.lo: cpu-mmix.c $(INCDIR)/filenames.h
cpu-ns32k.lo: cpu-ns32k.c $(INCDIR)/filenames.h ns32k.h
+cpu-openrisc.lo: cpu-openrisc.c $(INCDIR)/filenames.h
+cpu-pdp11.lo: cpu-pdp11.c $(INCDIR)/filenames.h
cpu-pj.lo: cpu-pj.c $(INCDIR)/filenames.h
cpu-powerpc.lo: cpu-powerpc.c $(INCDIR)/filenames.h
cpu-rs6000.lo: cpu-rs6000.c $(INCDIR)/filenames.h
+cpu-s390.lo: cpu-s390.c $(INCDIR)/filenames.h
cpu-sh.lo: cpu-sh.c $(INCDIR)/filenames.h
cpu-sparc.lo: cpu-sparc.c $(INCDIR)/filenames.h
cpu-tic30.lo: cpu-tic30.c $(INCDIR)/filenames.h
cpu-tic54x.lo: cpu-tic54x.c $(INCDIR)/filenames.h
cpu-tic80.lo: cpu-tic80.c $(INCDIR)/filenames.h
-cpu-v850.lo: cpu-v850.c $(INCDIR)/filenames.h
+cpu-v850.lo: cpu-v850.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h
cpu-vax.lo: cpu-vax.c $(INCDIR)/filenames.h
cpu-we32k.lo: cpu-we32k.c $(INCDIR)/filenames.h
cpu-w65.lo: cpu-w65.c $(INCDIR)/filenames.h
+cpu-xstormy16.lo: cpu-xstormy16.c $(INCDIR)/filenames.h
cpu-z8k.lo: cpu-z8k.c $(INCDIR)/filenames.h
aout-adobe.lo: aout-adobe.c $(INCDIR)/filenames.h $(INCDIR)/aout/adobe.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def libaout.h \
$(INCDIR)/bfdlink.h
aout-arm.lo: aout-arm.c $(INCDIR)/filenames.h libaout.h \
$(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h aoutx.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
- aout-target.h
+ $(INCDIR)/safe-ctype.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/aout/ar.h aout-target.h
aout-cris.lo: aout-cris.c aout32.c aoutx.h $(INCDIR)/filenames.h \
- $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
- aout-target.h
+ $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h libaout.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/aout/ar.h aout-target.h
aout-ns32k.lo: aout-ns32k.c $(INCDIR)/aout/aout64.h \
- ns32k.h libaout.h $(INCDIR)/bfdlink.h
+ ns32k.h libaout.h $(INCDIR)/bfdlink.h aoutx.h $(INCDIR)/filenames.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/aout/ar.h
aout-sparcle.lo: aout-sparcle.c $(INCDIR)/bfdlink.h \
libaout.h aoutf1.h $(INCDIR)/filenames.h $(INCDIR)/aout/sun4.h \
$(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
$(INCDIR)/aout/ar.h aout-target.h
aout-tic30.lo: aout-tic30.c $(INCDIR)/filenames.h libaout.h \
$(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aoutx.h
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aoutx.h \
+ $(INCDIR)/safe-ctype.h
aout0.lo: aout0.c aoutf1.h $(INCDIR)/filenames.h $(INCDIR)/aout/sun4.h \
libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
aout-target.h
-aout32.lo: aout32.c aoutx.h $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- libaout.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+aout32.lo: aout32.c aoutx.h $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.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 $(INCDIR)/filenames.h \
libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
@@ -848,94 +905,94 @@ bout.lo: bout.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
genlink.h $(INCDIR)/bout.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def libaout.h
cf-i386lynx.lo: cf-i386lynx.c $(INCDIR)/filenames.h \
- coff-i386.c $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h \
- libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
+ coff-i386.c $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
+ coffcode.h coffswap.h
cf-m68klynx.lo: cf-m68klynx.c coff-m68k.c $(INCDIR)/filenames.h \
- $(INCDIR)/coff/m68k.h $(INCDIR)/coff/internal.h libcoff.h \
- $(INCDIR)/bfdlink.h coffcode.h coffswap.h
+ $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
cf-sparclynx.lo: cf-sparclynx.c coff-sparc.c $(INCDIR)/filenames.h \
- $(INCDIR)/coff/sparc.h $(INCDIR)/coff/internal.h libcoff.h \
- $(INCDIR)/bfdlink.h coffcode.h coffswap.h
+ $(INCDIR)/coff/sparc.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
coff-a29k.lo: coff-a29k.c $(INCDIR)/filenames.h $(INCDIR)/coff/a29k.h \
- $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
- coffcode.h coffswap.h
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
coff-apollo.lo: coff-apollo.c $(INCDIR)/filenames.h \
- $(INCDIR)/coff/apollo.h $(INCDIR)/coff/internal.h libcoff.h \
- $(INCDIR)/bfdlink.h coffcode.h coffswap.h
+ $(INCDIR)/coff/apollo.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
coff-arm.lo: coff-arm.c $(INCDIR)/filenames.h $(INCDIR)/coff/arm.h \
- $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
- coffcode.h coffswap.h
-coff-aux.lo: coff-aux.c $(INCDIR)/filenames.h $(INCDIR)/coff/aux-coff.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h coff-m68k.c \
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
+coff-aux.lo: coff-aux.c $(INCDIR)/filenames.h $(INCDIR)/coff/aux-coff.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h \
+ coff-m68k.c libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
+ coffswap.h
coff-h8300.lo: coff-h8300.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- genlink.h $(INCDIR)/coff/h8300.h $(INCDIR)/coff/internal.h \
- libcoff.h coffcode.h coffswap.h
+ genlink.h $(INCDIR)/coff/h8300.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
coff-h8500.lo: coff-h8500.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/coff/h8500.h $(INCDIR)/coff/internal.h libcoff.h \
- coffcode.h coffswap.h
+ $(INCDIR)/coff/h8500.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h coffcode.h coffswap.h
coff-i386.lo: coff-i386.c $(INCDIR)/filenames.h $(INCDIR)/coff/i386.h \
- $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
- coffcode.h coffswap.h
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
coff-i860.lo: coff-i860.c $(INCDIR)/filenames.h $(INCDIR)/coff/i860.h \
- $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
- coffcode.h coffswap.h
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
coff-go32.lo: coff-go32.c coff-i386.c $(INCDIR)/filenames.h \
- $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h libcoff.h \
- $(INCDIR)/bfdlink.h coffcode.h coffswap.h
+ $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
coff-i960.lo: coff-i960.c $(INCDIR)/filenames.h $(INCDIR)/coff/i960.h \
$(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
coffcode.h coffswap.h
coff-m68k.lo: coff-m68k.c $(INCDIR)/filenames.h $(INCDIR)/coff/m68k.h \
- $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
- coffcode.h coffswap.h
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
coff-m88k.lo: coff-m88k.c $(INCDIR)/filenames.h $(INCDIR)/coff/m88k.h \
- $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
- coffcode.h coffswap.h
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
coff-mips.lo: coff-mips.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \
- $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h libcoff.h \
- libecoff.h coffswap.h ecoffswap.h
-coff-pmac.lo: coff-pmac.c $(INCDIR)/filenames.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/rs6000.h libcoff.h $(INCDIR)/bfdlink.h \
- xcoff-target.h coffcode.h coffswap.h
+ $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h $(INCDIR)/coff/external.h \
+ libcoff.h libecoff.h coffswap.h ecoffswap.h
coff-rs6000.lo: coff-rs6000.c $(INCDIR)/filenames.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/rs6000.h libcoff.h \
- $(INCDIR)/bfdlink.h xcoff-target.h coffcode.h coffswap.h
-coff-sh.lo: coff-sh.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/coff/sh.h $(INCDIR)/coff/internal.h libcoff.h \
- coffcode.h coffswap.h
+ $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/xcoff.h \
+ $(INCDIR)/coff/rs6000.h libcoff.h libxcoff.h coffcode.h \
+ coffswap.h
+coff-sh.lo: coff-sh.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
coff-sparc.lo: coff-sparc.c $(INCDIR)/filenames.h $(INCDIR)/coff/sparc.h \
- $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
- coffcode.h coffswap.h
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
coff-stgo32.lo: coff-stgo32.c coff-i386.c $(INCDIR)/filenames.h \
- $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/go32exe.h \
- libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h \
- go32stub.h
+ $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/go32exe.h libcoff.h $(INCDIR)/bfdlink.h \
+ coffcode.h coffswap.h go32stub.h
coff-svm68k.lo: coff-svm68k.c coff-m68k.c $(INCDIR)/filenames.h \
- $(INCDIR)/coff/m68k.h $(INCDIR)/coff/internal.h libcoff.h \
- $(INCDIR)/bfdlink.h coffcode.h coffswap.h
+ $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
coff-tic30.lo: coff-tic30.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/coff/tic30.h $(INCDIR)/coff/internal.h libcoff.h \
- coffcode.h coffswap.h
+ $(INCDIR)/coff/tic30.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h coffcode.h coffswap.h
coff-tic54x.lo: coff-tic54x.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \
$(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
coff-tic80.lo: coff-tic80.c $(INCDIR)/bfdlink.h $(INCDIR)/filenames.h \
- $(INCDIR)/coff/tic80.h $(INCDIR)/coff/internal.h libcoff.h \
- coffcode.h coffswap.h
+ $(INCDIR)/coff/tic80.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h coffcode.h coffswap.h
coff-u68k.lo: coff-u68k.c coff-m68k.c $(INCDIR)/filenames.h \
- $(INCDIR)/coff/m68k.h $(INCDIR)/coff/internal.h libcoff.h \
- $(INCDIR)/bfdlink.h coffcode.h coffswap.h
+ $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
coff-we32k.lo: coff-we32k.c $(INCDIR)/filenames.h $(INCDIR)/coff/we32k.h \
- $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
- coffcode.h coffswap.h
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
coff-w65.lo: coff-w65.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/coff/w65.h $(INCDIR)/coff/internal.h libcoff.h \
- coffcode.h coffswap.h
+ $(INCDIR)/coff/w65.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h coffcode.h coffswap.h
coff-z8k.lo: coff-z8k.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/coff/z8k.h $(INCDIR)/coff/internal.h libcoff.h \
- coffcode.h coffswap.h
+ $(INCDIR)/coff/z8k.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h coffcode.h coffswap.h
cofflink.lo: cofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/coff/internal.h libcoff.h
dwarf1.lo: dwarf1.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
@@ -951,16 +1008,16 @@ ecofflink.lo: ecofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \
$(INCDIR)/coff/ecoff.h libcoff.h libecoff.h
efi-app-ia32.lo: efi-app-ia32.c $(INCDIR)/filenames.h \
- coff-i386.c $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
- peicode.h libpei.h
+ coff-i386.c $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
+ $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
elf.lo: elf.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h
+ $(INCDIR)/elf/external.h $(INCDIR)/libiberty.h
elf32-arc.lo: elf32-arc.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/arc.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
+ $(INCDIR)/libiberty.h elf32-target.h
elfarm-oabi.lo: elfarm-oabi.c $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \
$(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
@@ -992,6 +1049,10 @@ elf32-fr30.lo: elf32-fr30.c $(INCDIR)/filenames.h elf-bfd.h \
elf32-gen.lo: elf32-gen.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h elf32-target.h
+elf32-h8300.lo: elf32-h8300.c $(INCDIR)/filenames.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/h8.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
elf32-hppa.lo: elf32-hppa.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h \
@@ -1045,7 +1106,12 @@ elf32-mips.lo: elf32-mips.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
genlink.h elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \
$(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h ecoffswap.h \
+ $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h $(INCDIR)/coff/external.h \
+ ecoffswap.h elf32-target.h
+elf32-openrisc.lo: elf32-openrisc.c $(INCDIR)/filenames.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/openrisc.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \
elf32-target.h
elf32-pj.lo: elf32-pj.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
@@ -1055,11 +1121,19 @@ elf32-ppc.lo: elf32-ppc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
+elf32-s390.lo: elf32-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/elf/s390.h $(INCDIR)/elf/reloc-macros.h \
+ elf32-target.h
elf32-sh.lo: elf32-sh.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
-elf32-sh-lin.lo: elf32-sh-lin.c elf32-sh.c $(INCDIR)/filenames.h \
+elf32-sh-lin.lo: elf32-sh-lin.c $(INCDIR)/filenames.h \
+ $(INCDIR)/elf/internal.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h elf32-sh.c \
+ $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-sh-nbsd.lo: elf32-sh-nbsd.c elf32-sh.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h \
$(INCDIR)/elf/reloc-macros.h elf32-target.h
@@ -1071,28 +1145,41 @@ elf32-sparc.lo: elf32-sparc.c $(INCDIR)/filenames.h \
elf32-v850.lo: elf32-v850.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
-elf32.lo: elf32.c elfcode.h $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/libiberty.h elf32-target.h
+elf32-xstormy16.lo: elf32-xstormy16.c $(INCDIR)/filenames.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h elfcore.h elflink.h
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/xstormy16.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \
+ elf32-target.h
+elf32.lo: elf32.c elfcode.h $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfcore.h \
+ elflink.h
elflink.lo: elflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h
+elf-strtab.lo: elf-strtab.c $(INCDIR)/filenames.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h
+elf-eh-frame.lo: elf-eh-frame.c $(INCDIR)/filenames.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf2.h
epoc-pe-arm.lo: epoc-pe-arm.c pe-arm.c $(INCDIR)/filenames.h \
- coff-arm.c $(INCDIR)/coff/arm.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
- peicode.h libpei.h
+ coff-arm.c $(INCDIR)/coff/arm.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
+ $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
epoc-pei-arm.lo: epoc-pei-arm.c pei-arm.c $(INCDIR)/filenames.h \
- coff-arm.c $(INCDIR)/coff/arm.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
- peicode.h libpei.h
+ coff-arm.c $(INCDIR)/coff/arm.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
+ $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
hp300bsd.lo: hp300bsd.c $(INCDIR)/filenames.h libaout.h \
$(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
hp300hpux.lo: hp300hpux.c $(INCDIR)/aout/hp300hpux.h \
- aoutx.h $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h libaout.h \
- $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
- $(INCDIR)/aout/ar.h aout-target.h
+ aoutx.h $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
+ aout-target.h
som.lo: som.c $(INCDIR)/alloca-conf.h $(INCDIR)/filenames.h
i386aout.lo: i386aout.c $(INCDIR)/filenames.h $(INCDIR)/aout/aout64.h \
libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/stab_gnu.h \
@@ -1101,9 +1188,9 @@ i386bsd.lo: i386bsd.c $(INCDIR)/filenames.h libaout.h \
$(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
i386dynix.lo: i386dynix.c $(INCDIR)/aout/dynix3.h aoutx.h \
- $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h libaout.h \
- $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
- $(INCDIR)/aout/ar.h aout-target.h
+ $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h \
+ libaout.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h
i386freebsd.lo: i386freebsd.c freebsd.h $(INCDIR)/filenames.h \
libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
@@ -1124,7 +1211,7 @@ i386mach3.lo: i386mach3.c $(INCDIR)/filenames.h $(INCDIR)/aout/aout64.h \
i386os9k.lo: i386os9k.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
libaout.h $(INCDIR)/os9k.h
ieee.lo: ieee.c $(INCDIR)/filenames.h $(INCDIR)/ieee.h \
- libieee.h
+ libieee.h $(INCDIR)/safe-ctype.h
m68k4knetbsd.lo: m68k4knetbsd.c netbsd.h $(INCDIR)/filenames.h \
libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
@@ -1163,58 +1250,64 @@ nlm32.lo: nlm32.c nlmcode.h $(INCDIR)/filenames.h libnlm.h \
ns32knetbsd.lo: ns32knetbsd.c netbsd.h $(INCDIR)/filenames.h \
libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-oasys.lo: oasys.c $(INCDIR)/filenames.h $(INCDIR)/oasys.h \
- liboasys.h
+oasys.lo: oasys.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/oasys.h liboasys.h
pc532-mach.lo: pc532-mach.c $(INCDIR)/filenames.h libaout.h \
$(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h aout-target.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+pdp11.lo: pdp11.c $(INCDIR)/filenames.h libaout.h $(INCDIR)/bfdlink.h \
+ aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h $(INCDIR)/safe-ctype.h
pe-arm.lo: pe-arm.c $(INCDIR)/filenames.h coff-arm.c \
- $(INCDIR)/coff/arm.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \
- libcoff.h $(INCDIR)/bfdlink.h coffcode.h peicode.h \
- libpei.h
+ $(INCDIR)/coff/arm.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
+ peicode.h libpei.h
pei-arm.lo: pei-arm.c $(INCDIR)/filenames.h coff-arm.c \
- $(INCDIR)/coff/arm.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \
- libcoff.h $(INCDIR)/bfdlink.h coffcode.h peicode.h \
- libpei.h
+ $(INCDIR)/coff/arm.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
+ peicode.h libpei.h
pe-i386.lo: pe-i386.c $(INCDIR)/filenames.h coff-i386.c \
- $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \
- libcoff.h $(INCDIR)/bfdlink.h coffcode.h peicode.h \
- libpei.h
+ $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
+ peicode.h libpei.h
pei-i386.lo: pei-i386.c $(INCDIR)/filenames.h coff-i386.c \
- $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \
- libcoff.h $(INCDIR)/bfdlink.h coffcode.h peicode.h \
- libpei.h
+ $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
+ peicode.h libpei.h
pe-mcore.lo: pe-mcore.c $(INCDIR)/filenames.h coff-mcore.c \
- $(INCDIR)/coff/mcore.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \
- libcoff.h $(INCDIR)/bfdlink.h coffcode.h peicode.h \
- libpei.h
-pei-mcore.lo: pei-mcore.c $(INCDIR)/filenames.h coff-mcore.c \
- $(INCDIR)/coff/mcore.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \
- libcoff.h $(INCDIR)/bfdlink.h coffcode.h peicode.h \
- libpei.h
-pe-ppc.lo: pe-ppc.c $(INCDIR)/filenames.h coff-ppc.c \
- $(INCDIR)/coff/powerpc.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/mcore.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
peicode.h libpei.h
-pei-ppc.lo: pei-ppc.c $(INCDIR)/filenames.h coff-ppc.c \
- $(INCDIR)/coff/powerpc.h $(INCDIR)/coff/internal.h \
+pei-mcore.lo: pei-mcore.c $(INCDIR)/filenames.h coff-mcore.c \
+ $(INCDIR)/coff/mcore.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
peicode.h libpei.h
-pe-sh.lo: pe-sh.c $(INCDIR)/filenames.h coff-sh.c $(INCDIR)/bfdlink.h \
- $(INCDIR)/coff/sh.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \
- libcoff.h coffcode.h peicode.h libpei.h
+pe-ppc.lo: pe-ppc.c $(INCDIR)/filenames.h coff-ppc.c \
+ $(INCDIR)/coff/powerpc.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
+ $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
+pei-ppc.lo: pei-ppc.c $(INCDIR)/filenames.h coff-ppc.c \
+ $(INCDIR)/coff/powerpc.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
+ $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
+pe-sh.lo: pe-sh.c $(INCDIR)/filenames.h coff-sh.c $(INCDIR)/libiberty.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
+ coffcode.h peicode.h libpei.h
pei-sh.lo: pei-sh.c $(INCDIR)/filenames.h coff-sh.c \
- $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h \
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/pe.h libcoff.h coffcode.h peicode.h \
libpei.h
pe-mips.lo: pe-mips.c $(INCDIR)/filenames.h $(INCDIR)/coff/mipspe.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
- $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
+ peicode.h libpei.h
pei-mips.lo: pei-mips.c $(INCDIR)/filenames.h pe-mips.c \
- $(INCDIR)/coff/mipspe.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \
- libcoff.h $(INCDIR)/bfdlink.h coffcode.h peicode.h \
- libpei.h
-ppcboot.lo: ppcboot.c $(INCDIR)/filenames.h
+ $(INCDIR)/coff/mipspe.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
+ peicode.h libpei.h
+ppcboot.lo: ppcboot.c $(INCDIR)/safe-ctype.h $(INCDIR)/filenames.h
reloc16.lo: reloc16.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
genlink.h $(INCDIR)/coff/internal.h libcoff.h
riscix.lo: riscix.c $(INCDIR)/filenames.h libaout.h \
@@ -1243,31 +1336,33 @@ vms.lo: vms.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
vms-gsd.lo: vms-gsd.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
vms.h
vms-hdr.lo: vms-hdr.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- vms.h
+ $(INCDIR)/safe-ctype.h vms.h
vms-misc.lo: vms-misc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
vms.h
vms-tir.lo: vms-tir.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
vms.h
xcofflink.lo: xcofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/coff/internal.h libcoff.h
-aout64.lo: aout64.c aoutx.h $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- libaout.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/xcoff.h libcoff.h \
+ libxcoff.h
+aout64.lo: aout64.c aoutx.h $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
coff-alpha.lo: coff-alpha.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \
$(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h \
libcoff.h libecoff.h coffswap.h ecoffswap.h
coff64-rs6000.lo: coff64-rs6000.c $(INCDIR)/filenames.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/rs6k64.h libcoff.h \
- $(INCDIR)/bfdlink.h xcoff-target.h coffcode.h coffswap.h
+ $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/xcoff.h \
+ $(INCDIR)/coff/rs6k64.h libcoff.h libxcoff.h coffcode.h \
+ coffswap.h
demo64.lo: demo64.c aoutf1.h $(INCDIR)/filenames.h \
$(INCDIR)/aout/sun4.h libaout.h $(INCDIR)/bfdlink.h \
$(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
$(INCDIR)/aout/ar.h aout-target.h
efi-app-ia64.lo: efi-app-ia64.c $(INCDIR)/filenames.h \
- coff-ia64.c $(INCDIR)/coff/ia64.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
- peicode.h libpei.h
+ coff-ia64.c $(INCDIR)/coff/ia64.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
+ $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
elf64-x86-64.lo: elf64-x86-64.c $(INCDIR)/filenames.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/x86-64.h \
@@ -1293,14 +1388,29 @@ elf64-mips.lo: elf64-mips.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h \
$(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h \
ecoffswap.h elf64-target.h
+elf64-mmix.lo: elf64-mmix.c $(INCDIR)/filenames.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/elf/mmix.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/opcode/mmix.h elf64-target.h
+elf64-ppc.lo: elf64-ppc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
+ elf64-ppc.h elf64-target.h
+elf64-s390.lo: elf64-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/elf/s390.h $(INCDIR)/elf/reloc-macros.h \
+ elf64-target.h
elf64-sparc.lo: elf64-sparc.c $(INCDIR)/filenames.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/sparc.h \
$(INCDIR)/elf/sparc.h $(INCDIR)/elf/reloc-macros.h \
elf64-target.h
-elf64.lo: elf64.c elfcode.h $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h elfcore.h elflink.h
+elf64.lo: elf64.c elfcode.h $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfcore.h \
+ elflink.h
+mmo.lo: mmo.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/elf/mmix.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/mmix.h
nlm32-alpha.lo: nlm32-alpha.c $(INCDIR)/filenames.h \
$(INCDIR)/nlm/alpha-ext.h libnlm.h $(INCDIR)/nlm/common.h \
$(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h nlmswap.h \
@@ -1308,8 +1418,8 @@ nlm32-alpha.lo: nlm32-alpha.c $(INCDIR)/filenames.h \
nlm64.lo: nlm64.c nlmcode.h $(INCDIR)/filenames.h libnlm.h \
$(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h
aix386-core.lo: aix386-core.c $(INCDIR)/filenames.h \
- $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h libcoff.h \
- $(INCDIR)/bfdlink.h
+ $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/bfdlink.h
hpux-core.lo: hpux-core.c $(INCDIR)/filenames.h
irix-core.lo: irix-core.c $(INCDIR)/filenames.h
lynx-core.lo: lynx-core.c $(INCDIR)/filenames.h
@@ -1328,9 +1438,9 @@ elf64-ia64.lo: elf64-ia64.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/bfdlink.h $(INCDIR)/opcode/ia64.h $(INCDIR)/elf/ia64.h \
$(INCDIR)/elf/reloc-macros.h elf64-target.h
peigen.lo: peigen.c $(INCDIR)/filenames.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/i386.h $(INCDIR)/coff/pe.h libcoff.h \
- $(INCDIR)/bfdlink.h libpei.h
+ $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h $(INCDIR)/coff/pe.h \
+ libcoff.h $(INCDIR)/bfdlink.h libpei.h
pepigen.lo: pepigen.c $(INCDIR)/filenames.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/ia64.h $(INCDIR)/coff/pe.h libcoff.h \
- $(INCDIR)/bfdlink.h libpei.h
+ $(INCDIR)/coff/ia64.h $(INCDIR)/coff/external.h $(INCDIR)/coff/pe.h \
+ libcoff.h $(INCDIR)/bfdlink.h libpei.h
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/contrib/binutils/bfd/Makefile.in b/contrib/binutils/bfd/Makefile.in
index 10beb2d..7333ca7 100644
--- a/contrib/binutils/bfd/Makefile.in
+++ b/contrib/binutils/bfd/Makefile.in
@@ -114,7 +114,12 @@ WIN32LDFLAGS = @WIN32LDFLAGS@
WIN32LIBADD = @WIN32LIBADD@
all_backends = @all_backends@
bfd_backends = @bfd_backends@
+bfd_default_target_size = @bfd_default_target_size@
+bfd_libs = @bfd_libs@
bfd_machines = @bfd_machines@
+bfd_version = @bfd_version@
+bfd_version_date = @bfd_version_date@
+bfd_version_string = @bfd_version_string@
l = @l@
tdefaults = @tdefaults@
wordsize = @wordsize@
@@ -144,21 +149,25 @@ BFD_H = bfd.h
# for the debugger, so if you are downloading things as S-records you
# need two copies of the executable, one to download and one for the
# debugger).
-BFD_LIBS = \
+BFD32_LIBS = \
archive.lo archures.lo bfd.lo cache.lo coffgen.lo corefile.lo \
format.lo init.lo libbfd.lo opncls.lo reloc.lo \
section.lo syms.lo targets.lo hash.lo linker.lo \
srec.lo binary.lo tekhex.lo ihex.lo stabs.lo stab-syms.lo \
- dwarf2.lo
+ merge.lo dwarf2.lo
-BFD_LIBS_CFILES = \
+BFD64_LIBS = archive64.lo
+
+BFD32_LIBS_CFILES = \
archive.c archures.c bfd.c cache.c coffgen.c corefile.c \
format.c init.c libbfd.c opncls.c reloc.c \
section.c syms.c targets.c hash.c linker.c \
srec.c binary.c tekhex.c ihex.c stabs.c stab-syms.c \
- dwarf2.c
+ merge.c dwarf2.c
+
+BFD64_LIBS_CFILES = archive64.c
# This list is alphabetized to make it easier to keep in sync
# with the decls and initializer in archures.c.
@@ -189,10 +198,14 @@ ALL_MACHINES = \
cpu-m10300.lo \
cpu-mcore.lo \
cpu-mips.lo \
+ cpu-mmix.lo \
cpu-ns32k.lo \
+ cpu-openrisc.lo \
+ cpu-pdp11.lo \
cpu-pj.lo \
cpu-powerpc.lo \
cpu-rs6000.lo \
+ cpu-s390.lo \
cpu-sh.lo \
cpu-sparc.lo \
cpu-tic30.lo \
@@ -202,6 +215,7 @@ ALL_MACHINES = \
cpu-vax.lo \
cpu-we32k.lo \
cpu-w65.lo \
+ cpu-xstormy16.lo \
cpu-z8k.lo
@@ -232,10 +246,14 @@ ALL_MACHINES_CFILES = \
cpu-m10300.c \
cpu-mcore.c \
cpu-mips.c \
+ cpu-mmix.c \
cpu-ns32k.c \
+ cpu-openrisc.c \
+ cpu-pdp11.c \
cpu-pj.c \
cpu-powerpc.c \
cpu-rs6000.c \
+ cpu-s390.c \
cpu-sh.c \
cpu-sparc.c \
cpu-tic30.c \
@@ -245,6 +263,7 @@ ALL_MACHINES_CFILES = \
cpu-vax.c \
cpu-we32k.c \
cpu-w65.c \
+ cpu-xstormy16.c \
cpu-z8k.c
@@ -277,7 +296,6 @@ BFD32_BACKENDS = \
coff-m68k.lo \
coff-m88k.lo \
coff-mips.lo \
- coff-pmac.lo \
coff-rs6000.lo \
coff-sh.lo \
coff-sparc.lo \
@@ -305,6 +323,7 @@ BFD32_BACKENDS = \
elf32-d30v.lo \
elf32-fr30.lo \
elf32-gen.lo \
+ elf32-h8300.lo \
elf32-hppa.lo \
elf32-i370.lo \
elf32-i386.lo \
@@ -320,14 +339,20 @@ BFD32_BACKENDS = \
elf-m10300.lo \
elf32-mcore.lo \
elf32-mips.lo \
+ elf32-openrisc.lo \
elf32-pj.lo \
elf32-ppc.lo \
+ elf32-s390.lo \
elf32-sh.lo \
elf32-sh-lin.lo \
+ elf32-sh-nbsd.lo \
elf32-sparc.lo \
elf32-v850.lo \
+ elf32-xstormy16.lo \
elf32.lo \
elflink.lo \
+ elf-strtab.lo \
+ elf-eh-frame.lo \
epoc-pe-arm.lo \
epoc-pei-arm.lo \
hp300bsd.lo \
@@ -359,6 +384,7 @@ BFD32_BACKENDS = \
ns32knetbsd.lo \
oasys.lo \
pc532-mach.lo \
+ pdp11.lo \
pe-arm.lo \
pei-arm.lo \
pe-i386.lo \
@@ -416,7 +442,6 @@ BFD32_BACKENDS_CFILES = \
coff-m68k.c \
coff-m88k.c \
coff-mips.c \
- coff-pmac.c \
coff-rs6000.c \
coff-sh.c \
coff-sparc.c \
@@ -444,6 +469,7 @@ BFD32_BACKENDS_CFILES = \
elf32-d30v.c \
elf32-fr30.c \
elf32-gen.c \
+ elf32-h8300.c \
elf32-hppa.c \
elf32-i370.c \
elf32-i386.c \
@@ -458,14 +484,20 @@ BFD32_BACKENDS_CFILES = \
elf-m10300.c \
elf32-mcore.c \
elf32-mips.c \
+ elf32-openrisc.c \
elf32-pj.c \
elf32-ppc.c \
+ elf32-s390.c \
elf32-sh.c \
elf32-sh-lin.c \
+ elf32-sh-nbsd.c \
elf32-sparc.c \
elf32-v850.c \
+ elf32-xstormy16.c \
elf32.c \
elflink.c \
+ elf-strtab.c \
+ elf-eh-frame.c \
epoc-pe-arm.c \
epoc-pei-arm.c \
hp300bsd.c \
@@ -497,6 +529,7 @@ BFD32_BACKENDS_CFILES = \
ns32knetbsd.c \
oasys.c \
pc532-mach.c \
+ pdp11.c \
pe-arm.c \
pei-arm.c \
pe-i386.c \
@@ -541,8 +574,12 @@ BFD64_BACKENDS = \
elf64-ia64.lo \
elf64-gen.lo \
elf64-mips.lo \
+ elf64-mmix.lo \
+ elf64-ppc.lo \
+ elf64-s390.lo \
elf64-sparc.lo \
elf64.lo \
+ mmo.lo \
nlm32-alpha.lo \
nlm64.lo \
pepigen.lo
@@ -559,8 +596,12 @@ BFD64_BACKENDS_CFILES = \
elf64-hppa.c \
elf64-gen.c \
elf64-mips.c \
+ elf64-mmix.c \
+ elf64-ppc.c \
+ elf64-s390.c \
elf64-sparc.c \
elf64.c \
+ mmo.c \
nlm32-alpha.c \
nlm64.c
@@ -591,6 +632,7 @@ OPTIONAL_BACKENDS_CFILES = \
WORDSIZE = @wordsize@
ALL_BACKENDS = @all_backends@
BFD_BACKENDS = @bfd_backends@
+BFD_LIBS = @bfd_libs@
BFD_MACHINES = @bfd_machines@
TDEFAULTS = @tdefaults@
@@ -598,7 +640,8 @@ INCLUDES = -D_GNU_SOURCE @HDEFINES@ @COREFLAG@ @TDEFINES@ $(CSEARCH) $(CSWITCHES
# C source files that correspond to .o's.
SOURCE_CFILES = \
- $(BFD_LIBS_CFILES) \
+ $(BFD32_LIBS_CFILES) \
+ $(BFD64_LIBS_CFILES) \
$(ALL_MACHINES_CFILES) \
$(BFD32_BACKENDS_CFILES) \
$(BFD64_BACKENDS_CFILES) \
@@ -617,7 +660,8 @@ SOURCE_HFILES = \
elfcode.h elfcore.h elflink.h freebsd.h genlink.h go32stub.h \
libaout.h libbfd.h libcoff.h libecoff.h libhppa.h \
libieee.h libnlm.h liboasys.h libpei.h netbsd.h nlm-target.h \
- nlmcode.h nlmswap.h ns32k.h peicode.h som.h vms.h xcoff-target.h
+ nlmcode.h nlmswap.h ns32k.h peicode.h som.h vms.h libxcoff.h \
+ xcoff-target.h version.h
BUILD_HFILES = \
@@ -635,7 +679,7 @@ BLD_POTFILES = $(BUILD_CFILES) $(BUILD_HFILES)
# COREFILE Core file routines for a native configuration
OFILES = $(BFD_BACKENDS) $(BFD_MACHINES) @COREFILE@
-libbfd_la_SOURCES = $(BFD_LIBS_CFILES)
+libbfd_la_SOURCES = $(BFD32_LIBS_CFILES) $(BFD64_LIBS_CFILES)
libbfd_la_DEPENDENCIES = $(OFILES) ofiles
libbfd_la_LIBADD = `cat ofiles` @WIN32LIBADD@
libbfd_la_LDFLAGS = -release $(VERSION) @WIN32LDFLAGS@
@@ -648,12 +692,13 @@ libbfd_la_LDFLAGS = -release $(VERSION) @WIN32LDFLAGS@
noinst_LIBRARIES = libbfd.a
libbfd_a_SOURCES =
-BFD_H_DEPS = $(INCDIR)/ansidecl.h
+BFD_H_DEPS = $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h
LOCAL_H_DEPS = libbfd.h sysdep.h config.h
BFD_H_FILES = bfd-in.h init.c opncls.c libbfd.c section.c archures.c \
- reloc.c syms.c bfd.c archive.c corefile.c targets.c format.c
+ reloc.c syms.c bfd.c archive.c corefile.c targets.c format.c version.h
+BFD64_H_FILES = archive64.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
@@ -672,6 +717,7 @@ LIBRARIES = $(noinst_LIBRARIES)
DEFS = @DEFS@ -I. -I$(srcdir) -I.
+#DEFS = @DEFS@ @elf_dynamic_interpreter@ -I. -I$(srcdir) -I.
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
@@ -682,7 +728,7 @@ LTLIBRARIES = $(lib_LTLIBRARIES)
libbfd_la_OBJECTS = archive.lo archures.lo bfd.lo cache.lo coffgen.lo \
corefile.lo format.lo init.lo libbfd.lo opncls.lo reloc.lo section.lo \
syms.lo targets.lo hash.lo linker.lo srec.lo binary.lo tekhex.lo \
-ihex.lo stabs.lo stab-syms.lo dwarf2.lo
+ihex.lo stabs.lo stab-syms.lo merge.lo dwarf2.lo archive64.lo
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
@@ -1074,12 +1120,12 @@ maintainer-clean-generic clean mostlyclean distclean maintainer-clean
po/SRC-POTFILES.in: @MAINT@ Makefile $(SRC_POTFILES)
- for file in $(SRC_POTFILES); do echo $$file; done | sort > tmp \
- && mv tmp $(srcdir)/po/SRC-POTFILES.in
+ for file in $(SRC_POTFILES); do echo $$file; done | sort > tmp.src \
+ && mv tmp.src $(srcdir)/po/SRC-POTFILES.in
po/BLD-POTFILES.in: @MAINT@ Makefile $(BLD_POTFILES)
- for file in $(BLD_POTFILES); do echo $$file; done | sort > tmp \
- && mv tmp $(srcdir)/po/BLD-POTFILES.in
+ for file in $(BLD_POTFILES); do echo $$file; done | sort > tmp.bld \
+ && mv tmp.bld $(srcdir)/po/BLD-POTFILES.in
# The following target is retained for upgrade purposes.
# This target used to exist in older versions of this makefile, and was
@@ -1164,10 +1210,12 @@ pepigen.c : peXXigen.c
rm -f pepigen.c
sed -e s/XX/pep/g < $(srcdir)/peXXigen.c > pepigen.new
mv -f pepigen.new pepigen.c
-$(BFD_LIBS): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS)
-$(BFD_MACHINES): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS)
-$(BFD_BACKENDS): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS)
-$(OPTIONAL_BACKENDS): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS)
+$(BFD32_LIBS) \
+ $(BFD64_LIBS) \
+ $(ALL_MACHINES) \
+ $(BFD32_BACKENDS) \
+ $(BFD64_BACKENDS) \
+ $(OPTIONAL_BACKENDS): $(BFD_H) $(BFD_H_DEPS) $(LOCAL_H_DEPS)
# Install BFD include file, and others that it needs.
install-data-local: $(BFD_H)
@@ -1175,8 +1223,11 @@ install-data-local: $(BFD_H)
$(mkinstalldirs) $(DESTDIR)$(includedir)
$(INSTALL_DATA) $(BFD_H) $(DESTDIR)$(includedir)/bfd.h
$(INSTALL_DATA) $(INCDIR)/ansidecl.h $(DESTDIR)$(includedir)/ansidecl.h
+ $(INSTALL_DATA) $(INCDIR)/symcat.h $(DESTDIR)$(includedir)/symcat.h
$(INSTALL_DATA) $(INCDIR)/bfdlink.h $(DESTDIR)$(includedir)/bfdlink.h
+Makefile: $(srcdir)/configure.in
+
# Have to get rid of DEP1 here so that "$?" later includes all of $(CFILES).
DEP: dep.sed $(CFILES) $(HFILES) bfd.h
rm -f DEP1
@@ -1248,7 +1299,7 @@ headers:
# configured with --enable-maintainer-mode.
$(srcdir)/bfd-in2.h: @MAINT@ stmp-bin2-h ; @true
-stmp-bin2-h: $(BFD_H_FILES)
+stmp-bin2-h: $(BFD_H_FILES) $(BFD64_H_FILES)
(cd $(docdir); $(MAKE) $(FLAGS_TO_PASS) bfd.h)
cp $(docdir)/bfd.h bfd-in2.h-new
$(SHELL) $(srcdir)/../move-if-change bfd-in2.h-new $(srcdir)/bfd-in2.h
@@ -1277,12 +1328,13 @@ config.status: $(srcdir)/configure $(srcdir)/config.bfd $(srcdir)/configure.host
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
archive.lo: archive.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h \
- $(INCDIR)/aout/ranlib.h
-archures.lo: archures.c $(INCDIR)/filenames.h
+ $(INCDIR)/aout/ranlib.h $(INCDIR)/safe-ctype.h
+archures.lo: archures.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h
bfd.lo: bfd.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h \
- libcoff.h libecoff.h $(INCDIR)/coff/ecoff.h elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h
+ $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/sym.h libcoff.h libecoff.h $(INCDIR)/coff/ecoff.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h
cache.lo: cache.c $(INCDIR)/filenames.h
coffgen.lo: coffgen.c $(INCDIR)/filenames.h $(INCDIR)/coff/internal.h \
libcoff.h $(INCDIR)/bfdlink.h
@@ -1293,24 +1345,28 @@ libbfd.lo: libbfd.c $(INCDIR)/filenames.h
opncls.lo: opncls.c $(INCDIR)/filenames.h $(INCDIR)/objalloc.h
reloc.lo: reloc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h
section.lo: section.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h
-syms.lo: syms.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def
+syms.lo: syms.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def
targets.lo: targets.c $(INCDIR)/filenames.h $(INCDIR)/fnmatch.h \
targmatch.h
hash.lo: hash.c $(INCDIR)/filenames.h $(INCDIR)/objalloc.h
linker.lo: linker.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
genlink.h
-srec.lo: srec.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h
-binary.lo: binary.c $(INCDIR)/filenames.h
+srec.lo: srec.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/safe-ctype.h
+binary.lo: binary.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h
tekhex.lo: tekhex.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h
-ihex.lo: ihex.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h
+ihex.lo: ihex.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/safe-ctype.h
stabs.lo: stabs.c $(INCDIR)/filenames.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def
+ $(INCDIR)/aout/stab.def $(INCDIR)/safe-ctype.h
stab-syms.lo: stab-syms.c libaout.h $(INCDIR)/bfdlink.h \
$(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab.def
+merge.lo: merge.c $(INCDIR)/filenames.h $(INCDIR)/hashtab.h
dwarf2.lo: dwarf2.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf2.h
+archive64.lo: archive64.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h
cpu-a29k.lo: cpu-a29k.c $(INCDIR)/filenames.h
cpu-alpha.lo: cpu-alpha.c $(INCDIR)/filenames.h
cpu-arc.lo: cpu-arc.c $(INCDIR)/filenames.h
@@ -1338,47 +1394,55 @@ cpu-m10200.lo: cpu-m10200.c $(INCDIR)/filenames.h
cpu-m10300.lo: cpu-m10300.c $(INCDIR)/filenames.h
cpu-mcore.lo: cpu-mcore.c $(INCDIR)/filenames.h
cpu-mips.lo: cpu-mips.c $(INCDIR)/filenames.h
+cpu-mmix.lo: cpu-mmix.c $(INCDIR)/filenames.h
cpu-ns32k.lo: cpu-ns32k.c $(INCDIR)/filenames.h ns32k.h
+cpu-openrisc.lo: cpu-openrisc.c $(INCDIR)/filenames.h
+cpu-pdp11.lo: cpu-pdp11.c $(INCDIR)/filenames.h
cpu-pj.lo: cpu-pj.c $(INCDIR)/filenames.h
cpu-powerpc.lo: cpu-powerpc.c $(INCDIR)/filenames.h
cpu-rs6000.lo: cpu-rs6000.c $(INCDIR)/filenames.h
+cpu-s390.lo: cpu-s390.c $(INCDIR)/filenames.h
cpu-sh.lo: cpu-sh.c $(INCDIR)/filenames.h
cpu-sparc.lo: cpu-sparc.c $(INCDIR)/filenames.h
cpu-tic30.lo: cpu-tic30.c $(INCDIR)/filenames.h
cpu-tic54x.lo: cpu-tic54x.c $(INCDIR)/filenames.h
cpu-tic80.lo: cpu-tic80.c $(INCDIR)/filenames.h
-cpu-v850.lo: cpu-v850.c $(INCDIR)/filenames.h
+cpu-v850.lo: cpu-v850.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h
cpu-vax.lo: cpu-vax.c $(INCDIR)/filenames.h
cpu-we32k.lo: cpu-we32k.c $(INCDIR)/filenames.h
cpu-w65.lo: cpu-w65.c $(INCDIR)/filenames.h
+cpu-xstormy16.lo: cpu-xstormy16.c $(INCDIR)/filenames.h
cpu-z8k.lo: cpu-z8k.c $(INCDIR)/filenames.h
aout-adobe.lo: aout-adobe.c $(INCDIR)/filenames.h $(INCDIR)/aout/adobe.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def libaout.h \
$(INCDIR)/bfdlink.h
aout-arm.lo: aout-arm.c $(INCDIR)/filenames.h libaout.h \
$(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h aoutx.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
- aout-target.h
+ $(INCDIR)/safe-ctype.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/aout/ar.h aout-target.h
aout-cris.lo: aout-cris.c aout32.c aoutx.h $(INCDIR)/filenames.h \
- $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
- aout-target.h
+ $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h libaout.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/aout/ar.h aout-target.h
aout-ns32k.lo: aout-ns32k.c $(INCDIR)/aout/aout64.h \
- ns32k.h libaout.h $(INCDIR)/bfdlink.h
+ ns32k.h libaout.h $(INCDIR)/bfdlink.h aoutx.h $(INCDIR)/filenames.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/aout/ar.h
aout-sparcle.lo: aout-sparcle.c $(INCDIR)/bfdlink.h \
libaout.h aoutf1.h $(INCDIR)/filenames.h $(INCDIR)/aout/sun4.h \
$(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
$(INCDIR)/aout/ar.h aout-target.h
aout-tic30.lo: aout-tic30.c $(INCDIR)/filenames.h libaout.h \
$(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aoutx.h
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aoutx.h \
+ $(INCDIR)/safe-ctype.h
aout0.lo: aout0.c aoutf1.h $(INCDIR)/filenames.h $(INCDIR)/aout/sun4.h \
libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
aout-target.h
-aout32.lo: aout32.c aoutx.h $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- libaout.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+aout32.lo: aout32.c aoutx.h $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.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 $(INCDIR)/filenames.h \
libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
@@ -1386,94 +1450,94 @@ bout.lo: bout.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
genlink.h $(INCDIR)/bout.h $(INCDIR)/aout/stab_gnu.h \
$(INCDIR)/aout/stab.def libaout.h
cf-i386lynx.lo: cf-i386lynx.c $(INCDIR)/filenames.h \
- coff-i386.c $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h \
- libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
+ coff-i386.c $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
+ coffcode.h coffswap.h
cf-m68klynx.lo: cf-m68klynx.c coff-m68k.c $(INCDIR)/filenames.h \
- $(INCDIR)/coff/m68k.h $(INCDIR)/coff/internal.h libcoff.h \
- $(INCDIR)/bfdlink.h coffcode.h coffswap.h
+ $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
cf-sparclynx.lo: cf-sparclynx.c coff-sparc.c $(INCDIR)/filenames.h \
- $(INCDIR)/coff/sparc.h $(INCDIR)/coff/internal.h libcoff.h \
- $(INCDIR)/bfdlink.h coffcode.h coffswap.h
+ $(INCDIR)/coff/sparc.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
coff-a29k.lo: coff-a29k.c $(INCDIR)/filenames.h $(INCDIR)/coff/a29k.h \
- $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
- coffcode.h coffswap.h
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
coff-apollo.lo: coff-apollo.c $(INCDIR)/filenames.h \
- $(INCDIR)/coff/apollo.h $(INCDIR)/coff/internal.h libcoff.h \
- $(INCDIR)/bfdlink.h coffcode.h coffswap.h
+ $(INCDIR)/coff/apollo.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
coff-arm.lo: coff-arm.c $(INCDIR)/filenames.h $(INCDIR)/coff/arm.h \
- $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
- coffcode.h coffswap.h
-coff-aux.lo: coff-aux.c $(INCDIR)/filenames.h $(INCDIR)/coff/aux-coff.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h coff-m68k.c \
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
+coff-aux.lo: coff-aux.c $(INCDIR)/filenames.h $(INCDIR)/coff/aux-coff.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h \
+ coff-m68k.c libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
+ coffswap.h
coff-h8300.lo: coff-h8300.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- genlink.h $(INCDIR)/coff/h8300.h $(INCDIR)/coff/internal.h \
- libcoff.h coffcode.h coffswap.h
+ genlink.h $(INCDIR)/coff/h8300.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
coff-h8500.lo: coff-h8500.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/coff/h8500.h $(INCDIR)/coff/internal.h libcoff.h \
- coffcode.h coffswap.h
+ $(INCDIR)/coff/h8500.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h coffcode.h coffswap.h
coff-i386.lo: coff-i386.c $(INCDIR)/filenames.h $(INCDIR)/coff/i386.h \
- $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
- coffcode.h coffswap.h
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
coff-i860.lo: coff-i860.c $(INCDIR)/filenames.h $(INCDIR)/coff/i860.h \
- $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
- coffcode.h coffswap.h
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
coff-go32.lo: coff-go32.c coff-i386.c $(INCDIR)/filenames.h \
- $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h libcoff.h \
- $(INCDIR)/bfdlink.h coffcode.h coffswap.h
+ $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
coff-i960.lo: coff-i960.c $(INCDIR)/filenames.h $(INCDIR)/coff/i960.h \
$(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
coffcode.h coffswap.h
coff-m68k.lo: coff-m68k.c $(INCDIR)/filenames.h $(INCDIR)/coff/m68k.h \
- $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
- coffcode.h coffswap.h
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
coff-m88k.lo: coff-m88k.c $(INCDIR)/filenames.h $(INCDIR)/coff/m88k.h \
- $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
- coffcode.h coffswap.h
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
coff-mips.lo: coff-mips.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \
- $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h libcoff.h \
- libecoff.h coffswap.h ecoffswap.h
-coff-pmac.lo: coff-pmac.c $(INCDIR)/filenames.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/rs6000.h libcoff.h $(INCDIR)/bfdlink.h \
- xcoff-target.h coffcode.h coffswap.h
+ $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h $(INCDIR)/coff/external.h \
+ libcoff.h libecoff.h coffswap.h ecoffswap.h
coff-rs6000.lo: coff-rs6000.c $(INCDIR)/filenames.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/rs6000.h libcoff.h \
- $(INCDIR)/bfdlink.h xcoff-target.h coffcode.h coffswap.h
-coff-sh.lo: coff-sh.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/coff/sh.h $(INCDIR)/coff/internal.h libcoff.h \
- coffcode.h coffswap.h
+ $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/xcoff.h \
+ $(INCDIR)/coff/rs6000.h libcoff.h libxcoff.h coffcode.h \
+ coffswap.h
+coff-sh.lo: coff-sh.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
coff-sparc.lo: coff-sparc.c $(INCDIR)/filenames.h $(INCDIR)/coff/sparc.h \
- $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
- coffcode.h coffswap.h
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
coff-stgo32.lo: coff-stgo32.c coff-i386.c $(INCDIR)/filenames.h \
- $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/go32exe.h \
- libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h \
- go32stub.h
+ $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/go32exe.h libcoff.h $(INCDIR)/bfdlink.h \
+ coffcode.h coffswap.h go32stub.h
coff-svm68k.lo: coff-svm68k.c coff-m68k.c $(INCDIR)/filenames.h \
- $(INCDIR)/coff/m68k.h $(INCDIR)/coff/internal.h libcoff.h \
- $(INCDIR)/bfdlink.h coffcode.h coffswap.h
+ $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
coff-tic30.lo: coff-tic30.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/coff/tic30.h $(INCDIR)/coff/internal.h libcoff.h \
- coffcode.h coffswap.h
+ $(INCDIR)/coff/tic30.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h coffcode.h coffswap.h
coff-tic54x.lo: coff-tic54x.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \
$(INCDIR)/coff/internal.h libcoff.h coffcode.h coffswap.h
coff-tic80.lo: coff-tic80.c $(INCDIR)/bfdlink.h $(INCDIR)/filenames.h \
- $(INCDIR)/coff/tic80.h $(INCDIR)/coff/internal.h libcoff.h \
- coffcode.h coffswap.h
+ $(INCDIR)/coff/tic80.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h coffcode.h coffswap.h
coff-u68k.lo: coff-u68k.c coff-m68k.c $(INCDIR)/filenames.h \
- $(INCDIR)/coff/m68k.h $(INCDIR)/coff/internal.h libcoff.h \
- $(INCDIR)/bfdlink.h coffcode.h coffswap.h
+ $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
coff-we32k.lo: coff-we32k.c $(INCDIR)/filenames.h $(INCDIR)/coff/we32k.h \
- $(INCDIR)/coff/internal.h libcoff.h $(INCDIR)/bfdlink.h \
- coffcode.h coffswap.h
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/bfdlink.h coffcode.h coffswap.h
coff-w65.lo: coff-w65.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/coff/w65.h $(INCDIR)/coff/internal.h libcoff.h \
- coffcode.h coffswap.h
+ $(INCDIR)/coff/w65.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h coffcode.h coffswap.h
coff-z8k.lo: coff-z8k.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/coff/z8k.h $(INCDIR)/coff/internal.h libcoff.h \
- coffcode.h coffswap.h
+ $(INCDIR)/coff/z8k.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h coffcode.h coffswap.h
cofflink.lo: cofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/coff/internal.h libcoff.h
dwarf1.lo: dwarf1.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
@@ -1489,16 +1553,16 @@ ecofflink.lo: ecofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \
$(INCDIR)/coff/ecoff.h libcoff.h libecoff.h
efi-app-ia32.lo: efi-app-ia32.c $(INCDIR)/filenames.h \
- coff-i386.c $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
- peicode.h libpei.h
+ coff-i386.c $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
+ $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
elf.lo: elf.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h
+ $(INCDIR)/elf/external.h $(INCDIR)/libiberty.h
elf32-arc.lo: elf32-arc.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/arc.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
+ $(INCDIR)/libiberty.h elf32-target.h
elfarm-oabi.lo: elfarm-oabi.c $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \
$(INCDIR)/filenames.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h \
@@ -1530,6 +1594,10 @@ elf32-fr30.lo: elf32-fr30.c $(INCDIR)/filenames.h elf-bfd.h \
elf32-gen.lo: elf32-gen.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h elf32-target.h
+elf32-h8300.lo: elf32-h8300.c $(INCDIR)/filenames.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/h8.h \
+ $(INCDIR)/elf/reloc-macros.h elf32-target.h
elf32-hppa.lo: elf32-hppa.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
$(INCDIR)/bfdlink.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h \
@@ -1583,7 +1651,12 @@ elf32-mips.lo: elf32-mips.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
genlink.h elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \
$(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h ecoffswap.h \
+ $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/mips.h $(INCDIR)/coff/external.h \
+ ecoffswap.h elf32-target.h
+elf32-openrisc.lo: elf32-openrisc.c $(INCDIR)/filenames.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/openrisc.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \
elf32-target.h
elf32-pj.lo: elf32-pj.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
@@ -1593,11 +1666,19 @@ elf32-ppc.lo: elf32-ppc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
+elf32-s390.lo: elf32-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/elf/s390.h $(INCDIR)/elf/reloc-macros.h \
+ elf32-target.h
elf32-sh.lo: elf32-sh.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h \
elf32-target.h
-elf32-sh-lin.lo: elf32-sh-lin.c elf32-sh.c $(INCDIR)/filenames.h \
+elf32-sh-lin.lo: elf32-sh-lin.c $(INCDIR)/filenames.h \
+ $(INCDIR)/elf/internal.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h elf32-sh.c \
+ $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h elf32-target.h
+elf32-sh-nbsd.lo: elf32-sh-nbsd.c elf32-sh.c $(INCDIR)/filenames.h \
$(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
$(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h $(INCDIR)/elf/sh.h \
$(INCDIR)/elf/reloc-macros.h elf32-target.h
@@ -1609,28 +1690,41 @@ elf32-sparc.lo: elf32-sparc.c $(INCDIR)/filenames.h \
elf32-v850.lo: elf32-v850.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/v850.h $(INCDIR)/elf/reloc-macros.h \
- elf32-target.h
-elf32.lo: elf32.c elfcode.h $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/libiberty.h elf32-target.h
+elf32-xstormy16.lo: elf32-xstormy16.c $(INCDIR)/filenames.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h elfcore.h elflink.h
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/xstormy16.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/libiberty.h \
+ elf32-target.h
+elf32.lo: elf32.c elfcode.h $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfcore.h \
+ elflink.h
elflink.lo: elflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h
+elf-strtab.lo: elf-strtab.c $(INCDIR)/filenames.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/hashtab.h
+elf-eh-frame.lo: elf-eh-frame.c $(INCDIR)/filenames.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/dwarf2.h
epoc-pe-arm.lo: epoc-pe-arm.c pe-arm.c $(INCDIR)/filenames.h \
- coff-arm.c $(INCDIR)/coff/arm.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
- peicode.h libpei.h
+ coff-arm.c $(INCDIR)/coff/arm.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
+ $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
epoc-pei-arm.lo: epoc-pei-arm.c pei-arm.c $(INCDIR)/filenames.h \
- coff-arm.c $(INCDIR)/coff/arm.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
- peicode.h libpei.h
+ coff-arm.c $(INCDIR)/coff/arm.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
+ $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
hp300bsd.lo: hp300bsd.c $(INCDIR)/filenames.h libaout.h \
$(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
hp300hpux.lo: hp300hpux.c $(INCDIR)/aout/hp300hpux.h \
- aoutx.h $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h libaout.h \
- $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
- $(INCDIR)/aout/ar.h aout-target.h
+ aoutx.h $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h \
+ aout-target.h
som.lo: som.c $(INCDIR)/alloca-conf.h $(INCDIR)/filenames.h
i386aout.lo: i386aout.c $(INCDIR)/filenames.h $(INCDIR)/aout/aout64.h \
libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/stab_gnu.h \
@@ -1639,9 +1733,9 @@ i386bsd.lo: i386bsd.c $(INCDIR)/filenames.h libaout.h \
$(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
i386dynix.lo: i386dynix.c $(INCDIR)/aout/dynix3.h aoutx.h \
- $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h libaout.h \
- $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
- $(INCDIR)/aout/ar.h aout-target.h
+ $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h \
+ libaout.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h aout-target.h
i386freebsd.lo: i386freebsd.c freebsd.h $(INCDIR)/filenames.h \
libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
@@ -1662,7 +1756,7 @@ i386mach3.lo: i386mach3.c $(INCDIR)/filenames.h $(INCDIR)/aout/aout64.h \
i386os9k.lo: i386os9k.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
libaout.h $(INCDIR)/os9k.h
ieee.lo: ieee.c $(INCDIR)/filenames.h $(INCDIR)/ieee.h \
- libieee.h
+ libieee.h $(INCDIR)/safe-ctype.h
m68k4knetbsd.lo: m68k4knetbsd.c netbsd.h $(INCDIR)/filenames.h \
libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
@@ -1701,58 +1795,64 @@ nlm32.lo: nlm32.c nlmcode.h $(INCDIR)/filenames.h libnlm.h \
ns32knetbsd.lo: ns32knetbsd.c netbsd.h $(INCDIR)/filenames.h \
libaout.h $(INCDIR)/bfdlink.h aout-target.h $(INCDIR)/aout/aout64.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
-oasys.lo: oasys.c $(INCDIR)/filenames.h $(INCDIR)/oasys.h \
- liboasys.h
+oasys.lo: oasys.c $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/oasys.h liboasys.h
pc532-mach.lo: pc532-mach.c $(INCDIR)/filenames.h libaout.h \
$(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h aout-target.h \
$(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+pdp11.lo: pdp11.c $(INCDIR)/filenames.h libaout.h $(INCDIR)/bfdlink.h \
+ aout-target.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h $(INCDIR)/safe-ctype.h
pe-arm.lo: pe-arm.c $(INCDIR)/filenames.h coff-arm.c \
- $(INCDIR)/coff/arm.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \
- libcoff.h $(INCDIR)/bfdlink.h coffcode.h peicode.h \
- libpei.h
+ $(INCDIR)/coff/arm.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
+ peicode.h libpei.h
pei-arm.lo: pei-arm.c $(INCDIR)/filenames.h coff-arm.c \
- $(INCDIR)/coff/arm.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \
- libcoff.h $(INCDIR)/bfdlink.h coffcode.h peicode.h \
- libpei.h
+ $(INCDIR)/coff/arm.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
+ peicode.h libpei.h
pe-i386.lo: pe-i386.c $(INCDIR)/filenames.h coff-i386.c \
- $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \
- libcoff.h $(INCDIR)/bfdlink.h coffcode.h peicode.h \
- libpei.h
+ $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
+ peicode.h libpei.h
pei-i386.lo: pei-i386.c $(INCDIR)/filenames.h coff-i386.c \
- $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \
- libcoff.h $(INCDIR)/bfdlink.h coffcode.h peicode.h \
- libpei.h
+ $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
+ peicode.h libpei.h
pe-mcore.lo: pe-mcore.c $(INCDIR)/filenames.h coff-mcore.c \
- $(INCDIR)/coff/mcore.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \
- libcoff.h $(INCDIR)/bfdlink.h coffcode.h peicode.h \
- libpei.h
-pei-mcore.lo: pei-mcore.c $(INCDIR)/filenames.h coff-mcore.c \
- $(INCDIR)/coff/mcore.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \
- libcoff.h $(INCDIR)/bfdlink.h coffcode.h peicode.h \
- libpei.h
-pe-ppc.lo: pe-ppc.c $(INCDIR)/filenames.h coff-ppc.c \
- $(INCDIR)/coff/powerpc.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/mcore.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
peicode.h libpei.h
-pei-ppc.lo: pei-ppc.c $(INCDIR)/filenames.h coff-ppc.c \
- $(INCDIR)/coff/powerpc.h $(INCDIR)/coff/internal.h \
+pei-mcore.lo: pei-mcore.c $(INCDIR)/filenames.h coff-mcore.c \
+ $(INCDIR)/coff/mcore.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
peicode.h libpei.h
-pe-sh.lo: pe-sh.c $(INCDIR)/filenames.h coff-sh.c $(INCDIR)/bfdlink.h \
- $(INCDIR)/coff/sh.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \
- libcoff.h coffcode.h peicode.h libpei.h
+pe-ppc.lo: pe-ppc.c $(INCDIR)/filenames.h coff-ppc.c \
+ $(INCDIR)/coff/powerpc.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
+ $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
+pei-ppc.lo: pei-ppc.c $(INCDIR)/filenames.h coff-ppc.c \
+ $(INCDIR)/coff/powerpc.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
+ $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
+pe-sh.lo: pe-sh.c $(INCDIR)/filenames.h coff-sh.c $(INCDIR)/libiberty.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
+ coffcode.h peicode.h libpei.h
pei-sh.lo: pei-sh.c $(INCDIR)/filenames.h coff-sh.c \
- $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/bfdlink.h $(INCDIR)/coff/sh.h \
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
$(INCDIR)/coff/pe.h libcoff.h coffcode.h peicode.h \
libpei.h
pe-mips.lo: pe-mips.c $(INCDIR)/filenames.h $(INCDIR)/coff/mipspe.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
- $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
+ $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
+ peicode.h libpei.h
pei-mips.lo: pei-mips.c $(INCDIR)/filenames.h pe-mips.c \
- $(INCDIR)/coff/mipspe.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h \
- libcoff.h $(INCDIR)/bfdlink.h coffcode.h peicode.h \
- libpei.h
-ppcboot.lo: ppcboot.c $(INCDIR)/filenames.h
+ $(INCDIR)/coff/mipspe.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
+ peicode.h libpei.h
+ppcboot.lo: ppcboot.c $(INCDIR)/safe-ctype.h $(INCDIR)/filenames.h
reloc16.lo: reloc16.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
genlink.h $(INCDIR)/coff/internal.h libcoff.h
riscix.lo: riscix.c $(INCDIR)/filenames.h libaout.h \
@@ -1781,31 +1881,33 @@ vms.lo: vms.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
vms-gsd.lo: vms-gsd.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
vms.h
vms-hdr.lo: vms-hdr.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- vms.h
+ $(INCDIR)/safe-ctype.h vms.h
vms-misc.lo: vms-misc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
vms.h
vms-tir.lo: vms-tir.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
vms.h
xcofflink.lo: xcofflink.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/coff/internal.h libcoff.h
-aout64.lo: aout64.c aoutx.h $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- libaout.h $(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h \
- $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/xcoff.h libcoff.h \
+ libxcoff.h
+aout64.lo: aout64.c aoutx.h $(INCDIR)/filenames.h $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/bfdlink.h libaout.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(INCDIR)/aout/ar.h
coff-alpha.lo: coff-alpha.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \
$(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h $(INCDIR)/aout/ar.h \
libcoff.h libecoff.h coffswap.h ecoffswap.h
coff64-rs6000.lo: coff64-rs6000.c $(INCDIR)/filenames.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/rs6k64.h libcoff.h \
- $(INCDIR)/bfdlink.h xcoff-target.h coffcode.h coffswap.h
+ $(INCDIR)/bfdlink.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/xcoff.h \
+ $(INCDIR)/coff/rs6k64.h libcoff.h libxcoff.h coffcode.h \
+ coffswap.h
demo64.lo: demo64.c aoutf1.h $(INCDIR)/filenames.h \
$(INCDIR)/aout/sun4.h libaout.h $(INCDIR)/bfdlink.h \
$(INCDIR)/aout/aout64.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
$(INCDIR)/aout/ar.h aout-target.h
efi-app-ia64.lo: efi-app-ia64.c $(INCDIR)/filenames.h \
- coff-ia64.c $(INCDIR)/coff/ia64.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/pe.h libcoff.h $(INCDIR)/bfdlink.h coffcode.h \
- peicode.h libpei.h
+ coff-ia64.c $(INCDIR)/coff/ia64.h $(INCDIR)/coff/external.h \
+ $(INCDIR)/coff/internal.h $(INCDIR)/coff/pe.h libcoff.h \
+ $(INCDIR)/bfdlink.h coffcode.h peicode.h libpei.h
elf64-x86-64.lo: elf64-x86-64.c $(INCDIR)/filenames.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/elf/x86-64.h \
@@ -1831,14 +1933,29 @@ elf64-mips.lo: elf64-mips.c $(INCDIR)/filenames.h $(INCDIR)/aout/ar.h \
$(INCDIR)/elf/reloc-macros.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/symconst.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/alpha.h \
ecoffswap.h elf64-target.h
+elf64-mmix.lo: elf64-mmix.c $(INCDIR)/filenames.h elf-bfd.h \
+ $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/elf/mmix.h $(INCDIR)/elf/reloc-macros.h \
+ $(INCDIR)/opcode/mmix.h elf64-target.h
+elf64-ppc.lo: elf64-ppc.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
+ elf64-ppc.h elf64-target.h
+elf64-s390.lo: elf64-s390.c $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
+ elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/elf/s390.h $(INCDIR)/elf/reloc-macros.h \
+ elf64-target.h
elf64-sparc.lo: elf64-sparc.c $(INCDIR)/filenames.h \
elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/sparc.h \
$(INCDIR)/elf/sparc.h $(INCDIR)/elf/reloc-macros.h \
elf64-target.h
-elf64.lo: elf64.c elfcode.h $(INCDIR)/filenames.h $(INCDIR)/bfdlink.h \
- elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
- $(INCDIR)/elf/external.h elfcore.h elflink.h
+elf64.lo: elf64.c elfcode.h $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/bfdlink.h elf-bfd.h $(INCDIR)/elf/common.h \
+ $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h elfcore.h \
+ elflink.h
+mmo.lo: mmo.c $(INCDIR)/filenames.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/elf/mmix.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/mmix.h
nlm32-alpha.lo: nlm32-alpha.c $(INCDIR)/filenames.h \
$(INCDIR)/nlm/alpha-ext.h libnlm.h $(INCDIR)/nlm/common.h \
$(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h nlmswap.h \
@@ -1846,8 +1963,8 @@ nlm32-alpha.lo: nlm32-alpha.c $(INCDIR)/filenames.h \
nlm64.lo: nlm64.c nlmcode.h $(INCDIR)/filenames.h libnlm.h \
$(INCDIR)/nlm/common.h $(INCDIR)/nlm/internal.h $(INCDIR)/nlm/external.h
aix386-core.lo: aix386-core.c $(INCDIR)/filenames.h \
- $(INCDIR)/coff/i386.h $(INCDIR)/coff/internal.h libcoff.h \
- $(INCDIR)/bfdlink.h
+ $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h $(INCDIR)/coff/internal.h \
+ libcoff.h $(INCDIR)/bfdlink.h
hpux-core.lo: hpux-core.c $(INCDIR)/filenames.h
irix-core.lo: irix-core.c $(INCDIR)/filenames.h
lynx-core.lo: lynx-core.c $(INCDIR)/filenames.h
@@ -1866,11 +1983,11 @@ elf64-ia64.lo: elf64-ia64.c $(INCDIR)/filenames.h elf-bfd.h \
$(INCDIR)/bfdlink.h $(INCDIR)/opcode/ia64.h $(INCDIR)/elf/ia64.h \
$(INCDIR)/elf/reloc-macros.h elf64-target.h
peigen.lo: peigen.c $(INCDIR)/filenames.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/i386.h $(INCDIR)/coff/pe.h libcoff.h \
- $(INCDIR)/bfdlink.h libpei.h
+ $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h $(INCDIR)/coff/pe.h \
+ libcoff.h $(INCDIR)/bfdlink.h libpei.h
pepigen.lo: pepigen.c $(INCDIR)/filenames.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/ia64.h $(INCDIR)/coff/pe.h libcoff.h \
- $(INCDIR)/bfdlink.h libpei.h
+ $(INCDIR)/coff/ia64.h $(INCDIR)/coff/external.h $(INCDIR)/coff/pe.h \
+ libcoff.h $(INCDIR)/bfdlink.h libpei.h
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/contrib/binutils/bfd/README b/contrib/binutils/bfd/README
index 992c285..fe6b6f3 100644
--- a/contrib/binutils/bfd/README
+++ b/contrib/binutils/bfd/README
@@ -1,4 +1,4 @@
-BFD is a an object file library. It permits applications to use the
+BFD is an object file library. It permits applications to use the
same routines to process object files regardless of their format.
BFD is used by the GNU debugger, assembler, linker, and the binary
diff --git a/contrib/binutils/bfd/aout-arm.c b/contrib/binutils/bfd/aout-arm.c
index ddb0325..b87e09c 100644
--- a/contrib/binutils/bfd/aout-arm.c
+++ b/contrib/binutils/bfd/aout-arm.c
@@ -1,5 +1,5 @@
/* BFD back-end for raw ARM a.out binaries.
- Copyright 1994, 1995, 1997, 1998, 1999, 2000
+ Copyright 1994, 1995, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
@@ -19,80 +19,90 @@ 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)
+#include "bfd.h"
+#include "sysdep.h"
+
+/* Avoid multiple defininitions from aoutx if supporting standarad a.out
+ as well as our own. */
+/* Do not "beautify" the CONCAT* macro args. Traditional C will not
+ remove whitespace added here, and thus will fail to concatenate
+ the tokens. */
+#define NAME(x,y) CONCAT3 (aoutarm,_32_,y)
+
+#define N_TXTADDR(x) \
+ ((N_MAGIC (x) == NMAGIC) \
+ ? (bfd_vma) 0x8000 \
+ : ((N_MAGIC (x) != ZMAGIC) \
+ ? (bfd_vma) 0 \
+ : ((N_SHARED_LIB (x)) \
+ ? ((x).a_entry & ~(bfd_vma) (TARGET_PAGE_SIZE - 1)) \
+ : (bfd_vma) 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 MY(OP) CONCAT2 (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 *));
-
+static boolean MY(write_object_contents)
+ PARAMS ((bfd *));
+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));
+reloc_howto_type *MY(bfd_reloc_type_lookup)
+ PARAMS ((bfd *, bfd_reloc_code_real_type));
+reloc_howto_type * MY(reloc_howto)
+ PARAMS ((bfd *, struct reloc_std_external *, int *, int *, int *));
+void MY(put_reloc)
+ PARAMS ((bfd *, int, int, bfd_vma, reloc_howto_type *,
+ struct reloc_std_external *));
+void MY(relocatable_reloc)
+ PARAMS ((reloc_howto_type *, bfd *, struct reloc_std_external *, bfd_vma *,
+ bfd_vma));
+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)
-};
+ {
+ /* 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)
@@ -148,7 +158,7 @@ MY(put_reloc) (abfd, r_extern, r_index, value, howto, reloc)
bfd *abfd;
int r_extern;
int r_index;
- long value;
+ bfd_vma value;
reloc_howto_type *howto;
struct reloc_std_external *reloc;
{
@@ -157,14 +167,16 @@ MY(put_reloc) (abfd, r_extern, r_index, value, howto, reloc)
int r_neg;
PUT_WORD (abfd, value, reloc->r_address);
- r_length = howto->size ; /* Size as a power of two */
+ /* Size as a power of two. */
+ r_length = howto->size;
/* 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 */
+ 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;
@@ -255,10 +267,10 @@ MY(fix_pcrel_26) (abfd, reloc_entry, symbol, data, input_section,
{
bfd_vma relocation;
bfd_size_type addr = reloc_entry->address;
- long target = bfd_get_32 (abfd, (bfd_byte *) data + addr);
+ bfd_vma 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 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;
@@ -270,7 +282,7 @@ MY(fix_pcrel_26) (abfd, reloc_entry, symbol, data, input_section,
return bfd_reloc_ok;
relocation = (target & 0x00ffffff) << 2;
- relocation = (relocation ^ 0x02000000) - 0x02000000; /* Sign extend */
+ relocation = (relocation ^ 0x02000000) - 0x02000000; /* Sign extend. */
relocation += symbol->value;
relocation += symbol->section->output_section->vma;
relocation += symbol->section->output_offset;
@@ -281,16 +293,16 @@ MY(fix_pcrel_26) (abfd, reloc_entry, symbol, data, input_section,
if (relocation & 3)
return bfd_reloc_overflow;
- /* Check for overflow */
+ /* Check for overflow. */
if (relocation & 0x02000000)
{
if ((relocation & ~ (bfd_vma) 0x03ffffff) != ~ (bfd_vma) 0x03ffffff)
flag = bfd_reloc_overflow;
}
- else if (relocation & ~0x03ffffff)
+ else if (relocation & ~ (bfd_vma) 0x03ffffff)
flag = bfd_reloc_overflow;
- target &= ~0x00ffffff;
+ target &= ~ (bfd_vma) 0x00ffffff;
target |= (relocation >> 2) & 0x00ffffff;
bfd_put_32 (abfd, target, (bfd_byte *) data + addr);
@@ -313,7 +325,8 @@ MY(bfd_reloc_type_lookup) (abfd,code)
case 32:
code = BFD_RELOC_32;
break;
- default: return (CONST struct reloc_howto_struct *) 0;
+ default:
+ return (const struct reloc_howto_struct *) 0;
}
switch (code)
@@ -324,7 +337,8 @@ MY(bfd_reloc_type_lookup) (abfd,code)
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;
+ default:
+ return (const struct reloc_howto_struct *) 0;
}
}
@@ -350,7 +364,7 @@ MY_swap_std_reloc_in (abfd, bytes, cache_ptr, symbols, symcount)
int r_pcrel;
struct aoutdata *su = &(abfd->tdata.aout_data->a);
- cache_ptr->address = bfd_h_get_32 (abfd, bytes->r_address);
+ cache_ptr->address = H_GET_32 (abfd, bytes->r_address);
cache_ptr->howto = MY_reloc_howto (abfd, bytes, r_index, r_extern, r_pcrel);
@@ -419,25 +433,25 @@ MY_swap_std_reloc_out (abfd, g, natptr)
if (bfd_abs_section.symbol == sym)
{
/* Whoops, looked like an abs symbol, but is really an offset
- from the abs section */
+ from the abs section. */
r_index = 0;
r_extern = 0;
}
else
{
- /* Fill in symbol */
+ /* Fill in symbol. */
r_extern = 1;
r_index = (*(g->sym_ptr_ptr))->KEEPIT;
}
}
else
{
- /* Just an ordinary section */
+ /* Just an ordinary section. */
r_extern = 0;
r_index = output_section->target_index;
}
- /* now the fun stuff */
+ /* Now the fun stuff. */
if (bfd_header_big_endian (abfd))
{
natptr->r_index[0] = r_index >> 16;
@@ -469,83 +483,83 @@ MY_swap_std_reloc_out (abfd, g, natptr)
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,
-};
+ {
+ "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,
-};
+ {
+ "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-encap.c b/contrib/binutils/bfd/aout-encap.c
index 77d6358..84c46c6 100644
--- a/contrib/binutils/bfd/aout-encap.c
+++ b/contrib/binutils/bfd/aout-encap.c
@@ -1,5 +1,6 @@
/* BFD back-end for a.out files encapsulated with COFF headers.
- Copyright 1990, 1991, 1994, 1995, 2000 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1994, 1995, 2000, 2001
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -27,9 +28,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#endif
#include "bfd.h"
-#include <sysdep.h>
+#include "sysdep.h"
#include "libbfd.h"
-#include <aout/aout64.h>
+#include "aout/aout64.h"
#include "aout/stab_gnu.h"
#include "aout/ar.h"
#include "libaout.h" /* BFD a.out internal data structures */
@@ -45,39 +46,40 @@ encap_object_p (abfd)
short coff_magic;
struct external_exec exec_bytes;
struct internal_exec exec;
+ bfd_size_type amt = sizeof (magicbuf);
- if (bfd_read ((PTR)magicbuf, 1, sizeof (magicbuf), abfd) !=
- sizeof (magicbuf))
+ if (bfd_bread ((PTR) magicbuf, amt, abfd) != amt)
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
return 0;
}
- coff_magic = bfd_h_get_16 (abfd, magicbuf);
+ coff_magic = H_GET_16 (abfd, magicbuf);
if (coff_magic != COFF_MAGIC)
return 0; /* Not an encap coff file */
- __header_offset_temp==COFF_MAGIC ? sizeof (struct coffheader) : 0)
- (fseek ((f), HEADER_OFFSET((f)), 1))
+ magic = H_GET_32 (abfd, magicbuf);
- magic = bfd_h_get_32 (abfd, magicbuf);
-
- if (N_BADMAG (*((struct internal_exec *) &magic))) return 0;
+ if (N_BADMAG (*((struct internal_exec *) &magic)))
+ return 0;
- struct external_exec exec_bytes;
- if (bfd_read ((PTR) &exec_bytes, 1, EXEC_BYTES_SIZE, abfd)
- != EXEC_BYTES_SIZE) {
- if (bfd_get_error () != bfd_error_system_call)
- bfd_set_error (bfd_error_wrong_format);
+ if (bfd_seek (abfd, (file_ptr) sizeof (struct coffheader), SEEK_SET) != 0)
return 0;
- }
+
+ amt = EXEC_BYTES_SIZE;
+ if (bfd_bread ((PTR) &exec_bytes, amt, abfd) != amt)
+ {
+ if (bfd_get_error () != bfd_error_system_call)
+ bfd_set_error (bfd_error_wrong_format);
+ return 0;
+ }
NAME(aout,swap_exec_header_in) (abfd, &exec_bytes, &exec);
return aout_32_some_aout_object_p (abfd, &exec, encap_realcallback);
}
-/* Finish up the reading of a encapsulated-coff a.out file header */
+/* Finish up the reading of an encapsulated-coff a.out file header. */
const bfd_target *
encap_real_callback (abfd)
bfd *abfd;
@@ -90,24 +92,26 @@ encap_real_callback (abfd)
text_start and exec_data_start. This is particularly useful
for remote debugging of embedded systems. */
if (N_FLAGS(exec_aouthdr) & N_FLAGS_COFF_ENCAPSULATE)
- {
- struct coffheader ch;
- int val;
- val = lseek (execchan, -(sizeof (AOUTHDR) + sizeof (ch)), 1);
- if (val == -1)
- perror_with_name (filename);
- val = myread (execchan, &ch, sizeof (ch));
- if (val < 0)
- perror_with_name (filename);
- text_start = ch.text_start;
- exec_data_start = ch.data_start;
- } else
- {
- text_start =
- IS_OBJECT_FILE (exec_aouthdr) ? 0 : N_TXTADDR (exec_aouthdr);
- exec_data_start = IS_OBJECT_FILE (exec_aouthdr)
- ? exec_aouthdr.a_text : N_DATADDR (exec_aouthdr);
- }
+ {
+ struct coffheader ch;
+ int val;
+ val = lseek (execchan, -(sizeof (AOUTHDR) + sizeof (ch)), 1);
+ if (val == -1)
+ perror_with_name (filename);
+ val = myread (execchan, &ch, sizeof (ch));
+ if (val < 0)
+ perror_with_name (filename);
+ text_start = ch.text_start;
+ exec_data_start = ch.data_start;
+ }
+ else
+ {
+ text_start =
+ IS_OBJECT_FILE (exec_aouthdr) ? 0 : N_TXTADDR (exec_aouthdr);
+ exec_data_start = (IS_OBJECT_FILE (exec_aouthdr)
+ ? exec_aouthdr.a_text
+ : N_DATADDR (exec_aouthdr));
+ }
/* Determine the architecture and machine type of the object file. */
bfd_default_set_arch_mach(abfd, bfd_arch_m68k, 0); /* FIXME */
@@ -127,10 +131,10 @@ encap_write_object_contents (abfd)
struct external_exec exec_bytes;
struct internal_exec *execp = exec_hdr (abfd);
-/****** FIXME: Fragments from the old GNU LD program for dealing with
- encap coff. */
-struct coffheader coffheader;
-int need_coff_header;
+ /* FIXME: Fragments from the old GNU LD program for dealing with
+ encap coff. */
+ struct coffheader coffheader;
+ int need_coff_header;
/* Determine whether to count the header as part of
the text size, and initialize the text size accordingly.
diff --git a/contrib/binutils/bfd/aout-sparcle.c b/contrib/binutils/bfd/aout-sparcle.c
index d8ad8a5..7772c29 100644
--- a/contrib/binutils/bfd/aout-sparcle.c
+++ b/contrib/binutils/bfd/aout-sparcle.c
@@ -1,5 +1,5 @@
/* BFD backend for sparc little-endian aout binaries.
- Copyright 1996 Free Software Foundation, Inc.
+ Copyright 1996, 2001 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -19,7 +19,11 @@ 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)
+
+/* Do not "beautify" the CONCAT* macro args. Traditional C will not
+ remove whitespace added here, and thus will fail to concatenate
+ the tokens. */
+#define MY(OP) CONCAT2 (sparcle_aout_,OP)
#include "bfd.h"
#include "bfdlink.h"
diff --git a/contrib/binutils/bfd/aout-target.h b/contrib/binutils/bfd/aout-target.h
index 2e74e37..ccedb93 100644
--- a/contrib/binutils/bfd/aout-target.h
+++ b/contrib/binutils/bfd/aout-target.h
@@ -88,9 +88,9 @@ MY(callback) (abfd)
/* Determine the architecture and machine type of the object file. */
#ifdef SET_ARCH_MACH
- SET_ARCH_MACH(abfd, *execp);
+ SET_ARCH_MACH (abfd, *execp);
#else
- bfd_default_set_arch_mach(abfd, DEFAULT_ARCH, 0);
+ bfd_default_set_arch_mach (abfd, DEFAULT_ARCH, 0);
#endif
/* The number of relocation records. This must be called after
@@ -146,18 +146,19 @@ MY(object_p) (abfd)
struct external_exec exec_bytes; /* Raw exec header from file */
struct internal_exec exec; /* Cleaned-up exec header */
const bfd_target *target;
+ bfd_size_type amt = EXEC_BYTES_SIZE;
- if (bfd_read ((PTR) &exec_bytes, 1, EXEC_BYTES_SIZE, abfd)
- != EXEC_BYTES_SIZE) {
- if (bfd_get_error () != bfd_error_system_call)
- bfd_set_error (bfd_error_wrong_format);
- return 0;
- }
+ if (bfd_bread ((PTR) &exec_bytes, amt, abfd) != amt)
+ {
+ if (bfd_get_error () != bfd_error_system_call)
+ bfd_set_error (bfd_error_wrong_format);
+ return 0;
+ }
#ifdef SWAP_MAGIC
exec.a_info = SWAP_MAGIC (exec_bytes.e_info);
#else
- exec.a_info = bfd_h_get_32 (abfd, exec_bytes.e_info);
+ exec.a_info = GET_MAGIC (abfd, exec_bytes.e_info);
#endif /* SWAP_MAGIC */
if (N_BADMAG (exec)) return 0;
@@ -250,6 +251,8 @@ MY_bfd_copy_private_section_data (ibfd, isec, obfd, osec)
file header, symbols, and relocation. */
#ifndef MY_write_object_contents
+static boolean MY(write_object_contents) PARAMS ((bfd *));
+
static boolean
MY(write_object_contents) (abfd)
bfd *abfd;
@@ -326,7 +329,7 @@ MY(set_sizes) (abfd)
#define MY_finish_dynamic_link 0
#endif
-static CONST struct aout_backend_data MY(backend_data) = {
+static const struct aout_backend_data MY(backend_data) = {
MY_zmagic_contiguous,
MY_text_includes_header,
MY_entry_is_text_address,
@@ -507,6 +510,9 @@ MY_bfd_final_link (abfd, info)
#ifndef MY_bfd_gc_sections
#define MY_bfd_gc_sections bfd_generic_gc_sections
#endif
+#ifndef MY_bfd_merge_sections
+#define MY_bfd_merge_sections bfd_generic_merge_sections
+#endif
#ifndef MY_bfd_reloc_type_lookup
#define MY_bfd_reloc_type_lookup NAME(aout,reloc_type_lookup)
#endif
diff --git a/contrib/binutils/bfd/aout0.c b/contrib/binutils/bfd/aout0.c
index 1d4c66e..731d476 100644
--- a/contrib/binutils/bfd/aout0.c
+++ b/contrib/binutils/bfd/aout0.c
@@ -1,5 +1,5 @@
/* BFD backend for SunOS style a.out with flags set to 0
- Copyright 1990, 1991, 1992, 1993, 1994, 1995
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 2001
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -20,7 +20,11 @@ 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-zero-big"
-#define MY(OP) CAT(aout0_big_,OP)
+
+/* Do not "beautify" the CONCAT* macro args. Traditional C will not
+ remove whitespace added here, and thus will fail to concatenate
+ the tokens. */
+#define MY(OP) CONCAT2 (aout0_big_,OP)
#include "bfd.h"
diff --git a/contrib/binutils/bfd/aoutf1.h b/contrib/binutils/bfd/aoutf1.h
index a62c68d..0f773a1 100644
--- a/contrib/binutils/bfd/aoutf1.h
+++ b/contrib/binutils/bfd/aoutf1.h
@@ -1,5 +1,6 @@
/* A.out "format 1" file handling code for BFD.
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000,
+ 2001, 2002
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -75,7 +76,7 @@ The name put into the target vector.
#endif
static boolean sunos_merge_private_bfd_data PARAMS ((bfd *, bfd *));
-static void sunos_set_arch_mach PARAMS ((bfd *, int));
+static void sunos_set_arch_mach PARAMS ((bfd *, enum machine_type));
static void choose_reloc_size PARAMS ((bfd *));
static boolean sunos_write_object_contents PARAMS ((bfd *));
static const bfd_target *sunos4_core_file_p PARAMS ((bfd *));
@@ -113,11 +114,11 @@ sunos_merge_private_bfd_data (ibfd, obfd)
static void
sunos_set_arch_mach (abfd, machtype)
bfd *abfd;
- int machtype;
+ enum machine_type machtype;
{
/* Determine the architecture and machine type of the object file. */
enum bfd_architecture arch;
- long machine;
+ unsigned long machine;
switch (machtype)
{
@@ -259,7 +260,7 @@ sunos_write_object_contents (abfd)
N_SET_FLAGS (*execp, aout_backend_info (abfd)->exec_hdr_flags);
- N_SET_DYNAMIC (*execp, bfd_get_file_flags (abfd) & DYNAMIC);
+ N_SET_DYNAMIC (*execp, (long)(bfd_get_file_flags (abfd) & DYNAMIC));
WRITE_HEADERS (abfd, execp);
@@ -422,8 +423,8 @@ swapcore_sun3 (abfd, ext, intcore)
{
struct external_sun3_core *extcore = (struct external_sun3_core *) ext;
- intcore->c_magic = bfd_h_get_32 (abfd, (unsigned char *) &extcore->c_magic);
- intcore->c_len = bfd_h_get_32 (abfd, (unsigned char *) &extcore->c_len);
+ intcore->c_magic = H_GET_32 (abfd, &extcore->c_magic);
+ intcore->c_len = H_GET_32 (abfd, &extcore->c_len);
intcore->c_regs_pos = (long) (((struct external_sun3_core *) 0)->c_regs);
intcore->c_regs_size = sizeof (extcore->c_regs);
#if ARCH_SIZE == 64
@@ -432,20 +433,21 @@ swapcore_sun3 (abfd, ext, intcore)
aout_32_swap_exec_header_in
#endif
(abfd, &extcore->c_aouthdr, &intcore->c_aouthdr);
- intcore->c_signo = bfd_h_get_32 (abfd, (unsigned char *) &extcore->c_signo);
- intcore->c_tsize = bfd_h_get_32 (abfd, (unsigned char *) &extcore->c_tsize);
- intcore->c_dsize = bfd_h_get_32 (abfd, (unsigned char *) &extcore->c_dsize);
+ intcore->c_signo = H_GET_32 (abfd, &extcore->c_signo);
+ intcore->c_tsize = H_GET_32 (abfd, &extcore->c_tsize);
+ intcore->c_dsize = H_GET_32 (abfd, &extcore->c_dsize);
intcore->c_data_addr = N_DATADDR (intcore->c_aouthdr);
- intcore->c_ssize = bfd_h_get_32 (abfd, (unsigned char *) &extcore->c_ssize);
+ intcore->c_ssize = H_GET_32 (abfd, &extcore->c_ssize);
memcpy (intcore->c_cmdname, extcore->c_cmdname, sizeof (intcore->c_cmdname));
intcore->fp_stuff_pos = (long) (((struct external_sun3_core *) 0)->fp_stuff);
/* FP stuff takes up whole rest of struct, except c_ucode. */
intcore->fp_stuff_size = intcore->c_len - (sizeof extcore->c_ucode) -
(file_ptr) (((struct external_sun3_core *) 0)->fp_stuff);
/* Ucode is the last thing in the struct -- just before the end */
- intcore->c_ucode =
- bfd_h_get_32 (abfd,
- intcore->c_len - sizeof (extcore->c_ucode) + (unsigned char *) extcore);
+ intcore->c_ucode = H_GET_32 (abfd,
+ (intcore->c_len
+ - sizeof (extcore->c_ucode)
+ + (unsigned char *) extcore));
intcore->c_stacktop = 0x0E000000; /* By experimentation */
}
@@ -458,8 +460,8 @@ swapcore_sparc (abfd, ext, intcore)
{
struct external_sparc_core *extcore = (struct external_sparc_core *) ext;
- intcore->c_magic = bfd_h_get_32 (abfd, (unsigned char *) &extcore->c_magic);
- intcore->c_len = bfd_h_get_32 (abfd, (unsigned char *) &extcore->c_len);
+ intcore->c_magic = H_GET_32 (abfd, &extcore->c_magic);
+ intcore->c_len = H_GET_32 (abfd, &extcore->c_len);
intcore->c_regs_pos = (long) (((struct external_sparc_core *) 0)->c_regs);
intcore->c_regs_size = sizeof (extcore->c_regs);
#if ARCH_SIZE == 64
@@ -468,20 +470,21 @@ swapcore_sparc (abfd, ext, intcore)
aout_32_swap_exec_header_in
#endif
(abfd, &extcore->c_aouthdr, &intcore->c_aouthdr);
- intcore->c_signo = bfd_h_get_32 (abfd, (unsigned char *) &extcore->c_signo);
- intcore->c_tsize = bfd_h_get_32 (abfd, (unsigned char *) &extcore->c_tsize);
- intcore->c_dsize = bfd_h_get_32 (abfd, (unsigned char *) &extcore->c_dsize);
+ intcore->c_signo = H_GET_32 (abfd, &extcore->c_signo);
+ intcore->c_tsize = H_GET_32 (abfd, &extcore->c_tsize);
+ intcore->c_dsize = H_GET_32 (abfd, &extcore->c_dsize);
intcore->c_data_addr = N_DATADDR (intcore->c_aouthdr);
- intcore->c_ssize = bfd_h_get_32 (abfd, (unsigned char *) &extcore->c_ssize);
+ intcore->c_ssize = H_GET_32 (abfd, &extcore->c_ssize);
memcpy (intcore->c_cmdname, extcore->c_cmdname, sizeof (intcore->c_cmdname));
intcore->fp_stuff_pos = (long) (((struct external_sparc_core *) 0)->fp_stuff);
/* FP stuff takes up whole rest of struct, except c_ucode. */
intcore->fp_stuff_size = intcore->c_len - (sizeof extcore->c_ucode) -
(file_ptr) (((struct external_sparc_core *) 0)->fp_stuff);
/* Ucode is the last thing in the struct -- just before the end */
- intcore->c_ucode =
- bfd_h_get_32 (abfd,
- intcore->c_len - sizeof (extcore->c_ucode) + (unsigned char *) extcore);
+ intcore->c_ucode = H_GET_32 (abfd,
+ (intcore->c_len
+ - sizeof (extcore->c_ucode)
+ + (unsigned char *) extcore));
/* Supposedly the user stack grows downward from the bottom of kernel memory.
Presuming that this remains true, this definition will work. */
@@ -499,8 +502,7 @@ swapcore_sparc (abfd, ext, intcore)
#define SPARC_USRSTACK_SPARC2 ((bfd_vma)0xf8000000)
#define SPARC_USRSTACK_SPARC10 ((bfd_vma)0xf0000000)
{
- bfd_vma sp = bfd_h_get_32
- (abfd, (unsigned char *) &((struct regs *) &extcore->c_regs[0])->r_o6);
+ bfd_vma sp = H_GET_32 (abfd, &((struct regs *) &extcore->c_regs[0])->r_o6);
if (sp < SPARC_USRSTACK_SPARC10)
intcore->c_stacktop = SPARC_USRSTACK_SPARC10;
else
@@ -518,8 +520,8 @@ swapcore_solaris_bcp (abfd, ext, intcore)
struct external_solaris_bcp_core *extcore =
(struct external_solaris_bcp_core *) ext;
- intcore->c_magic = bfd_h_get_32 (abfd, (unsigned char *) &extcore->c_magic);
- intcore->c_len = bfd_h_get_32 (abfd, (unsigned char *) &extcore->c_len);
+ intcore->c_magic = H_GET_32 (abfd, &extcore->c_magic);
+ intcore->c_len = H_GET_32 (abfd, &extcore->c_len);
intcore->c_regs_pos = (long) (((struct external_solaris_bcp_core *) 0)->c_regs);
intcore->c_regs_size = sizeof (extcore->c_regs);
@@ -534,12 +536,11 @@ swapcore_solaris_bcp (abfd, ext, intcore)
the data section is written from address zero instead of the data
start address. */
memset ((PTR) &intcore->c_aouthdr, 0, sizeof (struct internal_exec));
- intcore->c_data_addr =
- bfd_h_get_32 (abfd, (unsigned char *) &extcore->c_exdata_datorg);
- intcore->c_signo = bfd_h_get_32 (abfd, (unsigned char *) &extcore->c_signo);
- intcore->c_tsize = bfd_h_get_32 (abfd, (unsigned char *) &extcore->c_tsize);
- intcore->c_dsize = bfd_h_get_32 (abfd, (unsigned char *) &extcore->c_dsize);
- intcore->c_ssize = bfd_h_get_32 (abfd, (unsigned char *) &extcore->c_ssize);
+ intcore->c_data_addr = H_GET_32 (abfd, &extcore->c_exdata_datorg);
+ intcore->c_signo = H_GET_32 (abfd, &extcore->c_signo);
+ intcore->c_tsize = H_GET_32 (abfd, &extcore->c_tsize);
+ intcore->c_dsize = H_GET_32 (abfd, &extcore->c_dsize);
+ intcore->c_ssize = H_GET_32 (abfd, &extcore->c_ssize);
memcpy (intcore->c_cmdname, extcore->c_cmdname, sizeof (intcore->c_cmdname));
intcore->fp_stuff_pos =
(long) (((struct external_solaris_bcp_core *) 0)->fp_stuff);
@@ -547,9 +548,10 @@ swapcore_solaris_bcp (abfd, ext, intcore)
intcore->fp_stuff_size = intcore->c_len - (sizeof extcore->c_ucode) -
(file_ptr) (((struct external_solaris_bcp_core *) 0)->fp_stuff);
/* Ucode is the last thing in the struct -- just before the end */
- intcore->c_ucode =
- bfd_h_get_32 (abfd,
- intcore->c_len - sizeof (extcore->c_ucode) + (unsigned char *) extcore);
+ intcore->c_ucode = H_GET_32 (abfd,
+ (intcore->c_len
+ - sizeof (extcore->c_ucode)
+ + (unsigned char *) extcore));
/* Supposedly the user stack grows downward from the bottom of kernel memory.
Presuming that this remains true, this definition will work. */
@@ -567,8 +569,7 @@ swapcore_solaris_bcp (abfd, ext, intcore)
#define SPARC_USRSTACK_SPARC2 ((bfd_vma)0xf8000000)
#define SPARC_USRSTACK_SPARC10 ((bfd_vma)0xf0000000)
{
- bfd_vma sp = bfd_h_get_32
- (abfd, (unsigned char *) &((struct regs *) &extcore->c_regs[0])->r_o6);
+ bfd_vma sp = H_GET_32 (abfd, &((struct regs *) &extcore->c_regs[0])->r_o6);
if (sp < SPARC_USRSTACK_SPARC10)
intcore->c_stacktop = SPARC_USRSTACK_SPARC10;
else
@@ -598,7 +599,7 @@ sunos4_core_file_p (abfd)
bfd *abfd;
{
unsigned char longbuf[4]; /* Raw bytes of various header fields */
- bfd_size_type core_size;
+ bfd_size_type core_size, amt;
unsigned long core_mag;
struct internal_sunos_core *core;
char *extcore;
@@ -607,38 +608,41 @@ sunos4_core_file_p (abfd)
struct sun_core_struct suncoredata;
struct internal_sunos_core internal_sunos_core;
char external_core[1];
- }
- *mergem;
+ } *mergem;
- if (bfd_read ((PTR) longbuf, 1, sizeof (longbuf), abfd) !=
- sizeof (longbuf))
+ if (bfd_bread ((PTR) longbuf, (bfd_size_type) sizeof (longbuf), abfd)
+ != sizeof (longbuf))
return 0;
- core_mag = bfd_h_get_32 (abfd, longbuf);
+ core_mag = H_GET_32 (abfd, longbuf);
if (core_mag != CORE_MAGIC)
return 0;
/* SunOS core headers can vary in length; second word is size; */
- if (bfd_read ((PTR) longbuf, 1, sizeof (longbuf), abfd) !=
- sizeof (longbuf))
+ if (bfd_bread ((PTR) longbuf, (bfd_size_type) sizeof (longbuf), abfd)
+ != sizeof (longbuf))
return 0;
- core_size = bfd_h_get_32 (abfd, longbuf);
+ core_size = H_GET_32 (abfd, longbuf);
/* Sanity check */
if (core_size > 20000)
return 0;
- if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) < 0)
+ if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
return 0;
- mergem = (struct mergem *) bfd_zalloc (abfd, core_size + sizeof (struct mergem));
+ amt = core_size + sizeof (struct mergem);
+ mergem = (struct mergem *) bfd_zalloc (abfd, amt);
if (mergem == NULL)
return 0;
extcore = mergem->external_core;
- if ((bfd_read ((PTR) extcore, 1, core_size, abfd)) != core_size)
+ if ((bfd_bread ((PTR) extcore, core_size, abfd)) != core_size)
{
+ loser:
bfd_release (abfd, (char *) mergem);
+ abfd->tdata.any = NULL;
+ bfd_section_list_clear (abfd);
return 0;
}
@@ -659,47 +663,29 @@ sunos4_core_file_p (abfd)
break;
default:
bfd_set_error (bfd_error_system_call); /* FIXME */
- bfd_release (abfd, (char *) mergem);
- return 0;
+ goto loser;
}
abfd->tdata.sun_core_data = &mergem->suncoredata;
abfd->tdata.sun_core_data->hdr = core;
- /* create the sections. This is raunchy, but bfd_close wants to reclaim
- them */
- core_stacksec (abfd) = (asection *) bfd_zalloc (abfd, sizeof (asection));
+ /* Create the sections. */
+ core_stacksec (abfd) = bfd_make_section_anyway (abfd, ".stack");
if (core_stacksec (abfd) == NULL)
- {
- loser:
- bfd_release (abfd, (char *) mergem);
- return 0;
- }
- core_datasec (abfd) = (asection *) bfd_zalloc (abfd, sizeof (asection));
+ /* bfd_release frees everything allocated after it's arg. */
+ goto loser;
+
+ core_datasec (abfd) = bfd_make_section_anyway (abfd, ".data");
if (core_datasec (abfd) == NULL)
- {
- loser1:
- bfd_release (abfd, core_stacksec (abfd));
- goto loser;
- }
- core_regsec (abfd) = (asection *) bfd_zalloc (abfd, sizeof (asection));
+ goto loser;
+
+ core_regsec (abfd) = bfd_make_section_anyway (abfd, ".reg");
if (core_regsec (abfd) == NULL)
- {
- loser2:
- bfd_release (abfd, core_datasec (abfd));
- goto loser1;
- }
- core_reg2sec (abfd) = (asection *) bfd_zalloc (abfd, sizeof (asection));
- if (core_reg2sec (abfd) == NULL)
- {
- bfd_release (abfd, core_regsec (abfd));
- goto loser2;
- }
+ goto loser;
- core_stacksec (abfd)->name = ".stack";
- core_datasec (abfd)->name = ".data";
- core_regsec (abfd)->name = ".reg";
- core_reg2sec (abfd)->name = ".reg2";
+ core_reg2sec (abfd) = bfd_make_section_anyway (abfd, ".reg2");
+ if (core_reg2sec (abfd) == NULL)
+ goto loser;
core_stacksec (abfd)->flags = SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS;
core_datasec (abfd)->flags = SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS;
@@ -728,13 +714,6 @@ sunos4_core_file_p (abfd)
core_regsec (abfd)->alignment_power = 2;
core_reg2sec (abfd)->alignment_power = 2;
- abfd->sections = core_stacksec (abfd);
- core_stacksec (abfd)->next = core_datasec (abfd);
- core_datasec (abfd)->next = core_regsec (abfd);
- core_regsec (abfd)->next = core_reg2sec (abfd);
-
- abfd->section_count = 4;
-
return abfd->xvec;
}
@@ -822,7 +801,7 @@ sunos4_set_sizes (abfd)
#define MY_finish_dynamic_link 0
#endif
-static CONST struct aout_backend_data sunos4_aout_backend =
+static const struct aout_backend_data sunos4_aout_backend =
{
0, /* zmagic files are not contiguous */
1, /* text includes header */
diff --git a/contrib/binutils/bfd/aoutx.h b/contrib/binutils/bfd/aoutx.h
index 490ead7..0a3c05a 100644
--- a/contrib/binutils/bfd/aoutx.h
+++ b/contrib/binutils/bfd/aoutx.h
@@ -120,9 +120,9 @@ DESCRIPTION
#define KEEPIT udata.i
-#include <ctype.h>
#include "bfd.h"
#include "sysdep.h"
+#include "safe-ctype.h"
#include "bfdlink.h"
#include "libaout.h"
@@ -139,6 +139,8 @@ static boolean translate_to_native_sym_flags
static void adjust_o_magic PARAMS ((bfd *, struct internal_exec *));
static void adjust_z_magic PARAMS ((bfd *, struct internal_exec *));
static void adjust_n_magic PARAMS ((bfd *, struct internal_exec *));
+reloc_howto_type * NAME(aout,reloc_type_lookup)
+ PARAMS ((bfd *, bfd_reloc_code_real_type));
/*
SUBSECTION
@@ -156,9 +158,10 @@ DESCRIPTION
*/
#ifndef CTOR_TABLE_RELOC_HOWTO
#define CTOR_TABLE_RELOC_IDX 2
-#define CTOR_TABLE_RELOC_HOWTO(BFD) ((obj_reloc_entry_size(BFD) == RELOC_EXT_SIZE \
- ? howto_table_ext : howto_table_std) \
- + CTOR_TABLE_RELOC_IDX)
+#define CTOR_TABLE_RELOC_HOWTO(BFD) \
+ ((obj_reloc_entry_size (BFD) == RELOC_EXT_SIZE \
+ ? howto_table_ext : howto_table_std) \
+ + CTOR_TABLE_RELOC_IDX)
#endif
#ifndef MY_swap_std_reloc_in
@@ -225,23 +228,23 @@ reloc_howto_type howto_table_ext[] =
reloc_howto_type howto_table_std[] = {
/* 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, 0, 4, 64, false, 0, complain_overflow_bitfield,0,"64", true, 0xdeaddead,0xdeaddead, false),
-HOWTO( 4, 0, 0, 8, true, 0, complain_overflow_signed, 0,"DISP8", true, 0x000000ff,0x000000ff, false),
-HOWTO( 5, 0, 1, 16, true, 0, complain_overflow_signed, 0,"DISP16", true, 0x0000ffff,0x0000ffff, false),
-HOWTO( 6, 0, 2, 32, true, 0, complain_overflow_signed, 0,"DISP32", true, 0xffffffff,0xffffffff, false),
-HOWTO( 7, 0, 4, 64, true, 0, complain_overflow_signed, 0,"DISP64", true, 0xfeedface,0xfeedface, false),
-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),
+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, 0, 4, 64, false, 0, complain_overflow_bitfield,0,"64", true, 0xdeaddead,0xdeaddead, false),
+HOWTO ( 4, 0, 0, 8, true, 0, complain_overflow_signed, 0,"DISP8", true, 0x000000ff,0x000000ff, false),
+HOWTO ( 5, 0, 1, 16, true, 0, complain_overflow_signed, 0,"DISP16", true, 0x0000ffff,0x0000ffff, false),
+HOWTO ( 6, 0, 2, 32, true, 0, complain_overflow_signed, 0,"DISP32", true, 0xffffffff,0xffffffff, false),
+HOWTO ( 7, 0, 4, 64, true, 0, complain_overflow_signed, 0,"DISP64", true, 0xfeedface,0xfeedface, false),
+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),
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),
+ HOWTO (16, 0, 2, 0, false, 0, complain_overflow_bitfield,0,"JMP_TABLE", false, 0,0x00000000, false),
EMPTY_HOWTO (-1),
EMPTY_HOWTO (-1),
EMPTY_HOWTO (-1),
@@ -257,7 +260,7 @@ 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),
+ HOWTO (32, 0, 2, 0, false, 0, complain_overflow_bitfield,0,"RELATIVE", false, 0,0x00000000, false),
EMPTY_HOWTO (-1),
EMPTY_HOWTO (-1),
EMPTY_HOWTO (-1),
@@ -265,18 +268,18 @@ 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),
+ HOWTO (40, 0, 2, 0, false, 0, complain_overflow_bitfield,0,"BASEREL", false, 0,0x00000000, false),
};
-#define TABLE_SIZE(TABLE) (sizeof (TABLE)/sizeof (TABLE[0]))
+#define TABLE_SIZE(TABLE) (sizeof (TABLE) / sizeof (TABLE[0]))
reloc_howto_type *
NAME(aout,reloc_type_lookup) (abfd,code)
bfd *abfd;
bfd_reloc_code_real_type code;
{
-#define EXT(i,j) case i: return &howto_table_ext[j]
-#define STD(i,j) case i: return &howto_table_std[j]
+#define EXT(i, j) case i: return &howto_table_ext[j]
+#define STD(i, j) case i: return &howto_table_std[j]
int ext = obj_reloc_entry_size (abfd) == RELOC_EXT_SIZE;
if (code == BFD_RELOC_CTOR)
switch (bfd_get_arch_info (abfd)->bits_per_address)
@@ -366,7 +369,7 @@ NAME(aout,swap_exec_header_in) (abfd, raw_bytes, execp)
are memcmp'd, and thus the contents do matter. */
memset ((PTR) execp, 0, sizeof (struct internal_exec));
/* Now fill in fields in the execp, from the bytes in the raw data. */
- execp->a_info = bfd_h_get_32 (abfd, bytes->e_info);
+ execp->a_info = H_GET_32 (abfd, bytes->e_info);
execp->a_text = GET_WORD (abfd, bytes->e_text);
execp->a_data = GET_WORD (abfd, bytes->e_data);
execp->a_bss = GET_WORD (abfd, bytes->e_bss);
@@ -401,7 +404,7 @@ NAME(aout,swap_exec_header_out) (abfd, execp, raw_bytes)
struct external_exec *bytes = (struct external_exec *)raw_bytes;
/* Now fill in fields in the raw data, from the fields in the exec struct. */
- bfd_h_put_32 (abfd, execp->a_info , bytes->e_info);
+ H_PUT_32 (abfd, execp->a_info , bytes->e_info);
PUT_WORD (abfd, execp->a_text , bytes->e_text);
PUT_WORD (abfd, execp->a_data , bytes->e_data);
PUT_WORD (abfd, execp->a_bss , bytes->e_bss);
@@ -454,8 +457,9 @@ NAME(aout,some_aout_object_p) (abfd, execp, callback_to_real_object_p)
{
struct aout_data_struct *rawptr, *oldrawptr;
const bfd_target *result;
+ bfd_size_type amt = sizeof (struct aout_data_struct);
- rawptr = (struct aout_data_struct *) bfd_zalloc (abfd, sizeof (struct aout_data_struct ));
+ rawptr = (struct aout_data_struct *) bfd_zalloc (abfd, amt);
if (rawptr == NULL)
return 0;
@@ -480,7 +484,7 @@ NAME(aout,some_aout_object_p) (abfd, execp, callback_to_real_object_p)
/* Setting of EXEC_P has been deferred to the bottom of this function */
if (execp->a_syms)
abfd->flags |= HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS;
- if (N_DYNAMIC(*execp))
+ if (N_DYNAMIC (*execp))
abfd->flags |= DYNAMIC;
if (N_MAGIC (*execp) == ZMAGIC)
@@ -557,37 +561,38 @@ NAME(aout,some_aout_object_p) (abfd, execp, callback_to_real_object_p)
struct exec *execp = exec_hdr (abfd);
- obj_textsec (abfd)->size = N_TXTSIZE(*execp);
- obj_textsec (abfd)->raw_size = N_TXTSIZE(*execp);
+ obj_textsec (abfd)->size = N_TXTSIZE (*execp);
+ obj_textsec (abfd)->raw_size = N_TXTSIZE (*execp);
/* data and bss are already filled in since they're so standard */
/* The virtual memory addresses of the sections */
- obj_textsec (abfd)->vma = N_TXTADDR(*execp);
- obj_datasec (abfd)->vma = N_DATADDR(*execp);
- obj_bsssec (abfd)->vma = N_BSSADDR(*execp);
+ obj_textsec (abfd)->vma = N_TXTADDR (*execp);
+ obj_datasec (abfd)->vma = N_DATADDR (*execp);
+ obj_bsssec (abfd)->vma = N_BSSADDR (*execp);
/* The file offsets of the sections */
- obj_textsec (abfd)->filepos = N_TXTOFF(*execp);
- obj_datasec (abfd)->filepos = N_DATOFF(*execp);
+ obj_textsec (abfd)->filepos = N_TXTOFF (*execp);
+ obj_datasec (abfd)->filepos = N_DATOFF (*execp);
/* The file offsets of the relocation info */
- obj_textsec (abfd)->rel_filepos = N_TRELOFF(*execp);
- obj_datasec (abfd)->rel_filepos = N_DRELOFF(*execp);
+ obj_textsec (abfd)->rel_filepos = N_TRELOFF (*execp);
+ obj_datasec (abfd)->rel_filepos = N_DRELOFF (*execp);
/* The file offsets of the string table and symbol table. */
obj_str_filepos (abfd) = N_STROFF (*execp);
obj_sym_filepos (abfd) = N_SYMOFF (*execp);
/* Determine the architecture and machine type of the object file. */
- switch (N_MACHTYPE (*exec_hdr (abfd))) {
- default:
- abfd->obj_arch = bfd_arch_obscure;
- break;
- }
+ switch (N_MACHTYPE (*exec_hdr (abfd)))
+ {
+ default:
+ abfd->obj_arch = bfd_arch_obscure;
+ break;
+ }
- adata(abfd)->page_size = TARGET_PAGE_SIZE;
- adata(abfd)->segment_size = SEGMENT_SIZE;
- adata(abfd)->exec_bytes_size = EXEC_BYTES_SIZE;
+ adata (abfd)->page_size = TARGET_PAGE_SIZE;
+ adata (abfd)->segment_size = SEGMENT_SIZE;
+ adata (abfd)->exec_bytes_size = EXEC_BYTES_SIZE;
return abfd->xvec;
@@ -619,8 +624,9 @@ NAME(aout,some_aout_object_p) (abfd, execp, callback_to_real_object_p)
sets the entry point, and that is likely to be non-zero for most systems. */
if (execp->a_entry != 0
- || (execp->a_entry >= obj_textsec(abfd)->vma
- && execp->a_entry < obj_textsec(abfd)->vma + obj_textsec(abfd)->_raw_size))
+ || (execp->a_entry >= obj_textsec (abfd)->vma
+ && execp->a_entry < (obj_textsec (abfd)->vma
+ + obj_textsec (abfd)->_raw_size)))
abfd->flags |= EXEC_P;
#ifdef STAT_FOR_EXEC
else
@@ -636,7 +642,7 @@ NAME(aout,some_aout_object_p) (abfd, execp, callback_to_real_object_p)
issue. Many kernels are loaded at non standard addresses. */
if (abfd->iostream != NULL
&& (abfd->flags & BFD_IN_MEMORY) == 0
- && (fstat(fileno((FILE *) (abfd->iostream)), &stat_buf) == 0)
+ && (fstat (fileno ((FILE *) (abfd->iostream)), &stat_buf) == 0)
&& ((stat_buf.st_mode & 0111) != 0))
abfd->flags |= EXEC_P;
}
@@ -673,22 +679,21 @@ boolean
NAME(aout,mkobject) (abfd)
bfd *abfd;
{
- struct aout_data_struct *rawptr;
+ struct aout_data_struct *rawptr;
+ bfd_size_type amt = sizeof (struct aout_data_struct);
bfd_set_error (bfd_error_system_call);
- /* Use an intermediate variable for clarity */
- rawptr = (struct aout_data_struct *)bfd_zalloc (abfd, sizeof (struct aout_data_struct ));
-
+ rawptr = (struct aout_data_struct *) bfd_zalloc (abfd, amt);
if (rawptr == NULL)
return false;
abfd->tdata.aout_data = rawptr;
exec_hdr (abfd) = &(rawptr->e);
- obj_textsec (abfd) = (asection *)NULL;
- obj_datasec (abfd) = (asection *)NULL;
- obj_bsssec (abfd) = (asection *)NULL;
+ obj_textsec (abfd) = (asection *) NULL;
+ obj_datasec (abfd) = (asection *) NULL;
+ obj_bsssec (abfd) = (asection *) NULL;
return true;
}
@@ -723,95 +728,102 @@ NAME(aout,machine_type) (arch, machine, unknown)
arch_flags = M_UNKNOWN;
*unknown = true;
- switch (arch) {
- case bfd_arch_sparc:
- 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)
- arch_flags = M_SPARCLET;
- break;
-
- case bfd_arch_m68k:
- switch (machine) {
- case 0: arch_flags = M_68010; break;
- case bfd_mach_m68000: arch_flags = M_UNKNOWN; *unknown = false; break;
- case bfd_mach_m68010: arch_flags = M_68010; break;
- case bfd_mach_m68020: arch_flags = M_68020; break;
- default: arch_flags = M_UNKNOWN; break;
- }
- break;
-
- case bfd_arch_i386:
- if (machine == 0) arch_flags = M_386;
- break;
-
- case bfd_arch_a29k:
- if (machine == 0) arch_flags = M_29K;
- break;
-
- case bfd_arch_arm:
- if (machine == 0) arch_flags = M_ARM;
- break;
-
- case bfd_arch_mips:
- switch (machine) {
- case 0:
- case bfd_mach_mips3000:
- case bfd_mach_mips3900:
- arch_flags = M_MIPS1;
+ switch (arch)
+ {
+ case bfd_arch_sparc:
+ 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)
+ arch_flags = M_SPARCLET;
break;
- case bfd_mach_mips6000:
- arch_flags = M_MIPS2;
+
+ case bfd_arch_m68k:
+ switch (machine)
+ {
+ case 0: arch_flags = M_68010; break;
+ case bfd_mach_m68000: arch_flags = M_UNKNOWN; *unknown = false; break;
+ case bfd_mach_m68010: arch_flags = M_68010; break;
+ case bfd_mach_m68020: arch_flags = M_68020; break;
+ default: arch_flags = M_UNKNOWN; break;
+ }
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_mips12000:
- case bfd_mach_mips16:
- case bfd_mach_mips32:
- case bfd_mach_mips32_4k:
- case bfd_mach_mips5:
- case bfd_mach_mips64:
- case bfd_mach_mips_sb1:
- /* FIXME: These should be MIPS3, MIPS4, MIPS16, MIPS32, etc. */
- arch_flags = M_MIPS2;
+
+ case bfd_arch_i386:
+ if (machine == 0)
+ arch_flags = M_386;
break;
- default:
- arch_flags = M_UNKNOWN;
+
+ case bfd_arch_a29k:
+ if (machine == 0)
+ arch_flags = M_29K;
break;
- }
- break;
-
- case bfd_arch_ns32k:
- switch (machine) {
- case 0: arch_flags = M_NS32532; break;
- case 32032: arch_flags = M_NS32032; break;
- case 32532: arch_flags = M_NS32532; break;
- default: arch_flags = M_UNKNOWN; break;
- }
- break;
- case bfd_arch_vax:
- *unknown = false;
- break;
+ case bfd_arch_arm:
+ if (machine == 0)
+ arch_flags = M_ARM;
+ break;
- case bfd_arch_cris:
- if (machine == 0 || machine == 255) arch_flags = M_CRIS;
- break;
+ case bfd_arch_mips:
+ switch (machine)
+ {
+ case 0:
+ 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_mips12000:
+ case bfd_mach_mips16:
+ case bfd_mach_mipsisa32:
+ case bfd_mach_mips5:
+ case bfd_mach_mipsisa64:
+ case bfd_mach_mips_sb1:
+ /* FIXME: These should be MIPS3, MIPS4, MIPS16, MIPS32, etc. */
+ arch_flags = M_MIPS2;
+ break;
+ default:
+ arch_flags = M_UNKNOWN;
+ break;
+ }
+ break;
- default:
- arch_flags = M_UNKNOWN;
- }
+ case bfd_arch_ns32k:
+ switch (machine)
+ {
+ case 0: arch_flags = M_NS32532; break;
+ case 32032: arch_flags = M_NS32032; break;
+ case 32532: arch_flags = M_NS32532; break;
+ default: arch_flags = M_UNKNOWN; break;
+ }
+ break;
+
+ case bfd_arch_vax:
+ *unknown = false;
+ break;
+
+ case bfd_arch_cris:
+ if (machine == 0 || machine == 255)
+ arch_flags = M_CRIS;
+ break;
+
+ default:
+ arch_flags = M_UNKNOWN;
+ }
if (arch_flags != M_UNKNOWN)
*unknown = false;
@@ -854,18 +866,19 @@ NAME(aout,set_arch_mach) (abfd, arch, machine)
}
/* Determine the size of a relocation entry */
- switch (arch) {
- case bfd_arch_sparc:
- case bfd_arch_a29k:
- case bfd_arch_mips:
- obj_reloc_entry_size (abfd) = RELOC_EXT_SIZE;
- break;
- default:
- obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
- break;
- }
+ switch (arch)
+ {
+ case bfd_arch_sparc:
+ case bfd_arch_a29k:
+ case bfd_arch_mips:
+ obj_reloc_entry_size (abfd) = RELOC_EXT_SIZE;
+ break;
+ default:
+ obj_reloc_entry_size (abfd) = RELOC_STD_SIZE;
+ break;
+ }
- return (*aout_backend_info(abfd)->set_sizes) (abfd);
+ return (*aout_backend_info (abfd)->set_sizes) (abfd);
}
static void
@@ -878,46 +891,46 @@ adjust_o_magic (abfd, execp)
int pad = 0;
/* Text. */
- obj_textsec(abfd)->filepos = pos;
- if (!obj_textsec(abfd)->user_set_vma)
- obj_textsec(abfd)->vma = vma;
+ obj_textsec (abfd)->filepos = pos;
+ if (!obj_textsec (abfd)->user_set_vma)
+ obj_textsec (abfd)->vma = vma;
else
- vma = obj_textsec(abfd)->vma;
+ vma = obj_textsec (abfd)->vma;
- pos += obj_textsec(abfd)->_raw_size;
- vma += obj_textsec(abfd)->_raw_size;
+ pos += obj_textsec (abfd)->_raw_size;
+ vma += obj_textsec (abfd)->_raw_size;
/* Data. */
- if (!obj_datasec(abfd)->user_set_vma)
+ if (!obj_datasec (abfd)->user_set_vma)
{
#if 0 /* ?? Does alignment in the file image really matter? */
- pad = align_power (vma, obj_datasec(abfd)->alignment_power) - vma;
+ pad = align_power (vma, obj_datasec (abfd)->alignment_power) - vma;
#endif
- obj_textsec(abfd)->_raw_size += pad;
+ obj_textsec (abfd)->_raw_size += pad;
pos += pad;
vma += pad;
- obj_datasec(abfd)->vma = vma;
+ obj_datasec (abfd)->vma = vma;
}
else
- vma = obj_datasec(abfd)->vma;
- obj_datasec(abfd)->filepos = pos;
- pos += obj_datasec(abfd)->_raw_size;
- vma += obj_datasec(abfd)->_raw_size;
+ vma = obj_datasec (abfd)->vma;
+ obj_datasec (abfd)->filepos = pos;
+ pos += obj_datasec (abfd)->_raw_size;
+ vma += obj_datasec (abfd)->_raw_size;
/* BSS. */
- if (!obj_bsssec(abfd)->user_set_vma)
+ if (!obj_bsssec (abfd)->user_set_vma)
{
#if 0
- pad = align_power (vma, obj_bsssec(abfd)->alignment_power) - vma;
+ pad = align_power (vma, obj_bsssec (abfd)->alignment_power) - vma;
#endif
- obj_datasec(abfd)->_raw_size += pad;
+ obj_datasec (abfd)->_raw_size += pad;
pos += pad;
vma += pad;
- obj_bsssec(abfd)->vma = vma;
+ obj_bsssec (abfd)->vma = vma;
}
else
{
- /* The VMA of the .bss section is set by the the VMA of the
+ /* The VMA of the .bss section is set by the VMA of the
.data section plus the size of the .data section. We may
need to add padding bytes to make this true. */
pad = obj_bsssec (abfd)->vma - vma;
@@ -927,12 +940,12 @@ adjust_o_magic (abfd, execp)
pos += pad;
}
}
- obj_bsssec(abfd)->filepos = pos;
+ obj_bsssec (abfd)->filepos = pos;
/* Fix up the exec header. */
- execp->a_text = obj_textsec(abfd)->_raw_size;
- execp->a_data = obj_datasec(abfd)->_raw_size;
- execp->a_bss = obj_bsssec(abfd)->_raw_size;
+ execp->a_text = obj_textsec (abfd)->_raw_size;
+ execp->a_data = obj_datasec (abfd)->_raw_size;
+ execp->a_bss = obj_bsssec (abfd)->_raw_size;
N_SET_MAGIC (*execp, OMAGIC);
}
@@ -943,7 +956,7 @@ adjust_z_magic (abfd, execp)
{
bfd_size_type data_pad, text_pad;
file_ptr text_end;
- CONST struct aout_backend_data *abdp;
+ const struct aout_backend_data *abdp;
int ztih; /* Nonzero if text includes exec header. */
abdp = aout_backend_info (abfd);
@@ -952,18 +965,18 @@ adjust_z_magic (abfd, execp)
ztih = (abdp != NULL
&& (abdp->text_includes_header
|| obj_aout_subformat (abfd) == q_magic_format));
- obj_textsec(abfd)->filepos = (ztih
- ? adata(abfd).exec_bytes_size
- : adata(abfd).zmagic_disk_block_size);
- if (! obj_textsec(abfd)->user_set_vma)
+ obj_textsec (abfd)->filepos = (ztih
+ ? adata (abfd).exec_bytes_size
+ : adata (abfd).zmagic_disk_block_size);
+ if (! obj_textsec (abfd)->user_set_vma)
{
/* ?? Do we really need to check for relocs here? */
- obj_textsec(abfd)->vma = ((abfd->flags & HAS_RELOC)
- ? 0
- : (ztih
- ? (abdp->default_text_vma
- + adata(abfd).exec_bytes_size)
- : abdp->default_text_vma));
+ obj_textsec (abfd)->vma = ((abfd->flags & HAS_RELOC)
+ ? 0
+ : (ztih
+ ? (abdp->default_text_vma
+ + adata (abfd).exec_bytes_size)
+ : abdp->default_text_vma));
text_pad = 0;
}
else
@@ -994,47 +1007,51 @@ adjust_z_magic (abfd, execp)
text_pad += BFD_ALIGN (text_end, adata (abfd).page_size) - text_end;
text_end += obj_textsec (abfd)->filepos;
}
- obj_textsec(abfd)->_raw_size += text_pad;
+ obj_textsec (abfd)->_raw_size += text_pad;
text_end += text_pad;
/* Data. */
- if (!obj_datasec(abfd)->user_set_vma)
+ if (!obj_datasec (abfd)->user_set_vma)
{
bfd_vma vma;
- vma = obj_textsec(abfd)->vma + obj_textsec(abfd)->_raw_size;
- obj_datasec(abfd)->vma = BFD_ALIGN (vma, adata(abfd).segment_size);
+ vma = obj_textsec (abfd)->vma + obj_textsec (abfd)->_raw_size;
+ obj_datasec (abfd)->vma = BFD_ALIGN (vma, adata (abfd).segment_size);
}
if (abdp && abdp->zmagic_mapped_contiguous)
{
- text_pad = (obj_datasec(abfd)->vma
- - obj_textsec(abfd)->vma
- - obj_textsec(abfd)->_raw_size);
- obj_textsec(abfd)->_raw_size += text_pad;
+ asection * text = obj_textsec (abfd);
+ asection * data = obj_datasec (abfd);
+
+ text_pad = data->vma - (text->vma + text->_raw_size);
+ /* Only pad the text section if the data
+ section is going to be placed after it. */
+ if (text_pad > 0)
+ text->_raw_size += text_pad;
}
- obj_datasec(abfd)->filepos = (obj_textsec(abfd)->filepos
- + obj_textsec(abfd)->_raw_size);
+ obj_datasec (abfd)->filepos = (obj_textsec (abfd)->filepos
+ + obj_textsec (abfd)->_raw_size);
/* Fix up exec header while we're at it. */
- execp->a_text = obj_textsec(abfd)->_raw_size;
+ execp->a_text = obj_textsec (abfd)->_raw_size;
if (ztih && (!abdp || (abdp && !abdp->exec_header_not_counted)))
- execp->a_text += adata(abfd).exec_bytes_size;
+ execp->a_text += adata (abfd).exec_bytes_size;
if (obj_aout_subformat (abfd) == q_magic_format)
N_SET_MAGIC (*execp, QMAGIC);
else
N_SET_MAGIC (*execp, ZMAGIC);
/* Spec says data section should be rounded up to page boundary. */
- obj_datasec(abfd)->_raw_size
- = align_power (obj_datasec(abfd)->_raw_size,
- obj_bsssec(abfd)->alignment_power);
- execp->a_data = BFD_ALIGN (obj_datasec(abfd)->_raw_size,
- adata(abfd).page_size);
- data_pad = execp->a_data - obj_datasec(abfd)->_raw_size;
+ obj_datasec (abfd)->_raw_size
+ = align_power (obj_datasec (abfd)->_raw_size,
+ obj_bsssec (abfd)->alignment_power);
+ execp->a_data = BFD_ALIGN (obj_datasec (abfd)->_raw_size,
+ adata (abfd).page_size);
+ data_pad = execp->a_data - obj_datasec (abfd)->_raw_size;
/* BSS. */
- if (!obj_bsssec(abfd)->user_set_vma)
- obj_bsssec(abfd)->vma = (obj_datasec(abfd)->vma
- + obj_datasec(abfd)->_raw_size);
+ if (!obj_bsssec (abfd)->user_set_vma)
+ obj_bsssec (abfd)->vma = (obj_datasec (abfd)->vma
+ + obj_datasec (abfd)->_raw_size);
/* If the BSS immediately follows the data section and extra space
in the page is left after the data section, fudge data
in the header so that the bss section looks smaller by that
@@ -1042,12 +1059,12 @@ adjust_z_magic (abfd, execp)
(Note that a linker script, as well as the above assignment,
could have explicitly set the BSS vma to immediately follow
the data section.) */
- if (align_power (obj_bsssec(abfd)->vma, obj_bsssec(abfd)->alignment_power)
- == obj_datasec(abfd)->vma + obj_datasec(abfd)->_raw_size)
- execp->a_bss = (data_pad > obj_bsssec(abfd)->_raw_size) ? 0 :
- obj_bsssec(abfd)->_raw_size - data_pad;
+ if (align_power (obj_bsssec (abfd)->vma, obj_bsssec (abfd)->alignment_power)
+ == obj_datasec (abfd)->vma + obj_datasec (abfd)->_raw_size)
+ execp->a_bss = (data_pad > obj_bsssec (abfd)->_raw_size
+ ? 0 : obj_bsssec (abfd)->_raw_size - data_pad);
else
- execp->a_bss = obj_bsssec(abfd)->_raw_size;
+ execp->a_bss = obj_bsssec (abfd)->_raw_size;
}
static void
@@ -1055,41 +1072,41 @@ adjust_n_magic (abfd, execp)
bfd *abfd;
struct internal_exec *execp;
{
- file_ptr pos = adata(abfd).exec_bytes_size;
+ file_ptr pos = adata (abfd).exec_bytes_size;
bfd_vma vma = 0;
int pad;
/* Text. */
- obj_textsec(abfd)->filepos = pos;
- if (!obj_textsec(abfd)->user_set_vma)
- obj_textsec(abfd)->vma = vma;
+ obj_textsec (abfd)->filepos = pos;
+ if (!obj_textsec (abfd)->user_set_vma)
+ obj_textsec (abfd)->vma = vma;
else
- vma = obj_textsec(abfd)->vma;
- pos += obj_textsec(abfd)->_raw_size;
- vma += obj_textsec(abfd)->_raw_size;
+ vma = obj_textsec (abfd)->vma;
+ pos += obj_textsec (abfd)->_raw_size;
+ vma += obj_textsec (abfd)->_raw_size;
/* Data. */
- obj_datasec(abfd)->filepos = pos;
- if (!obj_datasec(abfd)->user_set_vma)
- obj_datasec(abfd)->vma = BFD_ALIGN (vma, adata(abfd).segment_size);
- vma = obj_datasec(abfd)->vma;
+ obj_datasec (abfd)->filepos = pos;
+ if (!obj_datasec (abfd)->user_set_vma)
+ obj_datasec (abfd)->vma = BFD_ALIGN (vma, adata (abfd).segment_size);
+ vma = obj_datasec (abfd)->vma;
/* Since BSS follows data immediately, see if it needs alignment. */
- vma += obj_datasec(abfd)->_raw_size;
- pad = align_power (vma, obj_bsssec(abfd)->alignment_power) - vma;
- obj_datasec(abfd)->_raw_size += pad;
- pos += obj_datasec(abfd)->_raw_size;
+ vma += obj_datasec (abfd)->_raw_size;
+ pad = align_power (vma, obj_bsssec (abfd)->alignment_power) - vma;
+ obj_datasec (abfd)->_raw_size += pad;
+ pos += obj_datasec (abfd)->_raw_size;
/* BSS. */
- if (!obj_bsssec(abfd)->user_set_vma)
- obj_bsssec(abfd)->vma = vma;
+ if (!obj_bsssec (abfd)->user_set_vma)
+ obj_bsssec (abfd)->vma = vma;
else
- vma = obj_bsssec(abfd)->vma;
+ vma = obj_bsssec (abfd)->vma;
/* Fix up exec header. */
- execp->a_text = obj_textsec(abfd)->_raw_size;
- execp->a_data = obj_datasec(abfd)->_raw_size;
- execp->a_bss = obj_bsssec(abfd)->_raw_size;
+ execp->a_text = obj_textsec (abfd)->_raw_size;
+ execp->a_data = obj_datasec (abfd)->_raw_size;
+ execp->a_bss = obj_bsssec (abfd)->_raw_size;
N_SET_MAGIC (*execp, NMAGIC);
}
@@ -1104,12 +1121,12 @@ NAME(aout,adjust_sizes_and_vmas) (abfd, text_size, text_end)
if (! NAME(aout,make_sections) (abfd))
return false;
- if (adata(abfd).magic != undecided_magic)
+ if (adata (abfd).magic != undecided_magic)
return true;
- obj_textsec(abfd)->_raw_size =
- align_power(obj_textsec(abfd)->_raw_size,
- obj_textsec(abfd)->alignment_power);
+ obj_textsec (abfd)->_raw_size =
+ align_power (obj_textsec (abfd)->_raw_size,
+ obj_textsec (abfd)->alignment_power);
*text_size = obj_textsec (abfd)->_raw_size;
/* Rule (heuristic) for when to pad to a new page. Note that there
@@ -1130,34 +1147,35 @@ NAME(aout,adjust_sizes_and_vmas) (abfd, text_size, text_end)
if (abfd->flags & D_PAGED)
/* Whether or not WP_TEXT is set -- let D_PAGED override. */
- adata(abfd).magic = z_magic;
+ adata (abfd).magic = z_magic;
else if (abfd->flags & WP_TEXT)
- adata(abfd).magic = n_magic;
+ adata (abfd).magic = n_magic;
else
- adata(abfd).magic = o_magic;
+ adata (abfd).magic = o_magic;
#ifdef BFD_AOUT_DEBUG /* requires gcc2 */
#if __GNUC__ >= 2
fprintf (stderr, "%s text=<%x,%x,%x> data=<%x,%x,%x> bss=<%x,%x,%x>\n",
({ char *str;
- switch (adata(abfd).magic) {
- case n_magic: str = "NMAGIC"; break;
- case o_magic: str = "OMAGIC"; break;
- case z_magic: str = "ZMAGIC"; break;
- default: abort ();
- }
+ switch (adata (abfd).magic)
+ {
+ case n_magic: str = "NMAGIC"; break;
+ case o_magic: str = "OMAGIC"; break;
+ case z_magic: str = "ZMAGIC"; break;
+ default: abort ();
+ }
str;
}),
- obj_textsec(abfd)->vma, obj_textsec(abfd)->_raw_size,
- obj_textsec(abfd)->alignment_power,
- obj_datasec(abfd)->vma, obj_datasec(abfd)->_raw_size,
- obj_datasec(abfd)->alignment_power,
- obj_bsssec(abfd)->vma, obj_bsssec(abfd)->_raw_size,
- obj_bsssec(abfd)->alignment_power);
+ obj_textsec (abfd)->vma, obj_textsec (abfd)->_raw_size,
+ obj_textsec (abfd)->alignment_power,
+ obj_datasec (abfd)->vma, obj_datasec (abfd)->_raw_size,
+ obj_datasec (abfd)->alignment_power,
+ obj_bsssec (abfd)->vma, obj_bsssec (abfd)->_raw_size,
+ obj_bsssec (abfd)->alignment_power);
#endif
#endif
- switch (adata(abfd).magic)
+ switch (adata (abfd).magic)
{
case o_magic:
adjust_o_magic (abfd, execp);
@@ -1174,11 +1192,11 @@ NAME(aout,adjust_sizes_and_vmas) (abfd, text_size, text_end)
#ifdef BFD_AOUT_DEBUG
fprintf (stderr, " text=<%x,%x,%x> data=<%x,%x,%x> bss=<%x,%x>\n",
- obj_textsec(abfd)->vma, obj_textsec(abfd)->_raw_size,
- obj_textsec(abfd)->filepos,
- obj_datasec(abfd)->vma, obj_datasec(abfd)->_raw_size,
- obj_datasec(abfd)->filepos,
- obj_bsssec(abfd)->vma, obj_bsssec(abfd)->_raw_size);
+ obj_textsec (abfd)->vma, obj_textsec (abfd)->_raw_size,
+ obj_textsec (abfd)->filepos,
+ obj_datasec (abfd)->vma, obj_datasec (abfd)->_raw_size,
+ obj_datasec (abfd)->filepos,
+ obj_bsssec (abfd)->vma, obj_bsssec (abfd)->_raw_size);
#endif
return true;
@@ -1203,24 +1221,27 @@ NAME(aout,new_section_hook) (abfd, newsect)
asection *newsect;
{
/* align to double at least */
- newsect->alignment_power = bfd_get_arch_info(abfd)->section_align_power;
+ newsect->alignment_power = bfd_get_arch_info (abfd)->section_align_power;
if (bfd_get_format (abfd) == bfd_object)
{
- if (obj_textsec(abfd) == NULL && !strcmp(newsect->name, ".text")) {
- obj_textsec(abfd)= newsect;
+ if (obj_textsec (abfd) == NULL && !strcmp (newsect->name, ".text"))
+ {
+ obj_textsec (abfd)= newsect;
newsect->target_index = N_TEXT;
return true;
}
- if (obj_datasec(abfd) == NULL && !strcmp(newsect->name, ".data")) {
- obj_datasec(abfd) = newsect;
+ if (obj_datasec (abfd) == NULL && !strcmp (newsect->name, ".data"))
+ {
+ obj_datasec (abfd) = newsect;
newsect->target_index = N_DATA;
return true;
}
- if (obj_bsssec(abfd) == NULL && !strcmp(newsect->name, ".bss")) {
- obj_bsssec(abfd) = newsect;
+ if (obj_bsssec (abfd) == NULL && !strcmp (newsect->name, ".bss"))
+ {
+ obj_bsssec (abfd) = newsect;
newsect->target_index = N_BSS;
return true;
}
@@ -1267,7 +1288,7 @@ NAME(aout,set_section_contents) (abfd, section, location, offset, count)
if (count != 0)
{
if (bfd_seek (abfd, section->filepos + offset, SEEK_SET) != 0
- || bfd_write (location, 1, count, abfd) != count)
+ || bfd_bwrite (location, count, abfd) != count)
return false;
}
@@ -1284,6 +1305,7 @@ aout_get_external_symbols (abfd)
{
bfd_size_type count;
struct external_nlist *syms;
+ bfd_size_type amt;
count = exec_hdr (abfd)->a_syms / EXTERNAL_NLIST_SIZE;
@@ -1298,13 +1320,13 @@ aout_get_external_symbols (abfd)
later on. If we put them on the objalloc it might not be
possible to free them. */
syms = ((struct external_nlist *)
- bfd_malloc ((size_t) count * EXTERNAL_NLIST_SIZE));
+ bfd_malloc (count * EXTERNAL_NLIST_SIZE));
if (syms == (struct external_nlist *) NULL && count != 0)
return false;
+ amt = exec_hdr (abfd)->a_syms;
if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0
- || (bfd_read (syms, 1, exec_hdr (abfd)->a_syms, abfd)
- != exec_hdr (abfd)->a_syms))
+ || bfd_bread (syms, amt, abfd) != amt)
{
free (syms);
return false;
@@ -1321,11 +1343,11 @@ aout_get_external_symbols (abfd)
unsigned char string_chars[BYTES_IN_WORD];
bfd_size_type stringsize;
char *strings;
+ bfd_size_type amt = BYTES_IN_WORD;
/* Get the size of the strings. */
if (bfd_seek (abfd, obj_str_filepos (abfd), SEEK_SET) != 0
- || (bfd_read ((PTR) string_chars, BYTES_IN_WORD, 1, abfd)
- != BYTES_IN_WORD))
+ || bfd_bread ((PTR) string_chars, amt, abfd) != amt)
return false;
stringsize = GET_WORD (abfd, string_chars);
@@ -1335,15 +1357,14 @@ aout_get_external_symbols (abfd)
return false;
strings = (char *) obj_aout_string_window (abfd).data;
#else
- strings = (char *) bfd_malloc ((size_t) stringsize + 1);
+ strings = (char *) bfd_malloc (stringsize + 1);
if (strings == NULL)
return false;
/* Skip space for the string count in the buffer for convenience
when using indexes. */
- if (bfd_read (strings + BYTES_IN_WORD, 1, stringsize - BYTES_IN_WORD,
- abfd)
- != stringsize - BYTES_IN_WORD)
+ amt = stringsize - BYTES_IN_WORD;
+ if (bfd_bread (strings + BYTES_IN_WORD, amt, abfd) != amt)
{
free (strings);
return false;
@@ -1474,6 +1495,7 @@ translate_from_native_sym_flags (abfd, cache_ptr)
asection *section;
arelent_chain *reloc;
asection *into_section;
+ bfd_size_type amt;
/* This is a set symbol. The name of the symbol is the name
of the set (e.g., __CTOR_LIST__). The value of the symbol
@@ -1490,7 +1512,8 @@ translate_from_native_sym_flags (abfd, cache_ptr)
{
char *copy;
- copy = bfd_alloc (abfd, strlen (cache_ptr->symbol.name) + 1);
+ amt = strlen (cache_ptr->symbol.name) + 1;
+ copy = bfd_alloc (abfd, amt);
if (copy == NULL)
return false;
@@ -1500,7 +1523,8 @@ translate_from_native_sym_flags (abfd, cache_ptr)
return false;
}
- reloc = (arelent_chain *) bfd_alloc (abfd, sizeof (arelent_chain));
+ amt = sizeof (arelent_chain);
+ reloc = (arelent_chain *) bfd_alloc (abfd, amt);
if (reloc == NULL)
return false;
@@ -1545,7 +1569,7 @@ translate_from_native_sym_flags (abfd, cache_ptr)
reloc->relent.address = section->_raw_size;
section->_raw_size += BYTES_IN_WORD;
- reloc->relent.howto = CTOR_TABLE_RELOC_HOWTO(abfd);
+ reloc->relent.howto = CTOR_TABLE_RELOC_HOWTO (abfd);
#endif /* 0 */
@@ -1720,7 +1744,7 @@ translate_to_native_sym_flags (abfd, cache_ptr, sym_pointer)
sym_pointer->e_type[0] = type;
}
- PUT_WORD(abfd, value, sym_pointer->e_value);
+ PUT_WORD (abfd, value, sym_pointer->e_value);
return true;
}
@@ -1731,8 +1755,8 @@ asymbol *
NAME(aout,make_empty_symbol) (abfd)
bfd *abfd;
{
- aout_symbol_type *new =
- (aout_symbol_type *)bfd_zalloc (abfd, sizeof (aout_symbol_type));
+ bfd_size_type amt = sizeof (aout_symbol_type);
+ aout_symbol_type *new = (aout_symbol_type *) bfd_zalloc (abfd, amt);
if (!new)
return NULL;
new->symbol.the_bfd = abfd;
@@ -1775,9 +1799,9 @@ NAME(aout,translate_symbol_table) (abfd, in, ext, count, str, strsize, dynamic)
return false;
in->symbol.value = GET_SWORD (abfd, ext->e_value);
- in->desc = bfd_h_get_16 (abfd, ext->e_desc);
- in->other = bfd_h_get_8 (abfd, ext->e_other);
- in->type = bfd_h_get_8 (abfd, ext->e_type);
+ in->desc = H_GET_16 (abfd, ext->e_desc);
+ in->other = H_GET_8 (abfd, ext->e_other);
+ in->type = H_GET_8 (abfd, ext->e_type);
in->symbol.udata.p = NULL;
if (! translate_from_native_sym_flags (abfd, in))
@@ -1800,7 +1824,7 @@ NAME(aout,slurp_symbol_table) (abfd)
{
struct external_nlist *old_external_syms;
aout_symbol_type *cached;
- size_t cached_size;
+ bfd_size_type cached_size;
/* If there's no work to be done, don't do any */
if (obj_aout_symbols (abfd) != (aout_symbol_type *) NULL)
@@ -1811,13 +1835,13 @@ NAME(aout,slurp_symbol_table) (abfd)
if (! aout_get_external_symbols (abfd))
return false;
- cached_size = (obj_aout_external_sym_count (abfd)
- * sizeof (aout_symbol_type));
+ cached_size = obj_aout_external_sym_count (abfd);
+ cached_size *= sizeof (aout_symbol_type);
cached = (aout_symbol_type *) bfd_malloc (cached_size);
if (cached == NULL && cached_size != 0)
return false;
if (cached_size != 0)
- memset (cached, 0, cached_size);
+ memset (cached, 0, (size_t) cached_size);
/* Convert from external symbol information to internal. */
if (! (NAME(aout,translate_symbol_table)
@@ -1911,10 +1935,11 @@ emit_stringtab (abfd, tab)
struct bfd_strtab_hash *tab;
{
bfd_byte buffer[BYTES_IN_WORD];
+ bfd_size_type amt = BYTES_IN_WORD;
/* The string table starts with the size. */
PUT_WORD (abfd, _bfd_stringtab_size (tab) + BYTES_IN_WORD, buffer);
- if (bfd_write ((PTR) buffer, 1, BYTES_IN_WORD, abfd) != BYTES_IN_WORD)
+ if (bfd_bwrite ((PTR) buffer, amt, abfd) != amt)
return false;
return _bfd_stringtab_emit (abfd, tab);
@@ -1937,30 +1962,31 @@ NAME(aout,write_syms) (abfd)
asymbol *g = generic[count];
bfd_size_type indx;
struct external_nlist nsp;
+ bfd_size_type amt;
indx = add_to_stringtab (abfd, strtab, g->name, false);
if (indx == (bfd_size_type) -1)
goto error_return;
PUT_WORD (abfd, indx, (bfd_byte *) nsp.e_strx);
- if (bfd_asymbol_flavour(g) == abfd->xvec->flavour)
+ if (bfd_asymbol_flavour (g) == abfd->xvec->flavour)
{
- bfd_h_put_16(abfd, aout_symbol(g)->desc, nsp.e_desc);
- bfd_h_put_8(abfd, aout_symbol(g)->other, nsp.e_other);
- bfd_h_put_8(abfd, aout_symbol(g)->type, nsp.e_type);
+ H_PUT_16 (abfd, aout_symbol (g)->desc, nsp.e_desc);
+ H_PUT_8 (abfd, aout_symbol (g)->other, nsp.e_other);
+ H_PUT_8 (abfd, aout_symbol (g)->type, nsp.e_type);
}
else
{
- bfd_h_put_16(abfd,0, nsp.e_desc);
- bfd_h_put_8(abfd, 0, nsp.e_other);
- bfd_h_put_8(abfd, 0, nsp.e_type);
+ H_PUT_16 (abfd, 0, nsp.e_desc);
+ H_PUT_8 (abfd, 0, nsp.e_other);
+ H_PUT_8 (abfd, 0, nsp.e_type);
}
if (! translate_to_native_sym_flags (abfd, g, &nsp))
goto error_return;
- if (bfd_write((PTR)&nsp,1,EXTERNAL_NLIST_SIZE, abfd)
- != EXTERNAL_NLIST_SIZE)
+ amt = EXTERNAL_NLIST_SIZE;
+ if (bfd_bwrite ((PTR) &nsp, amt, abfd) != amt)
goto error_return;
/* NB: `KEEPIT' currently overlays `udata.p', so set this only
@@ -1991,8 +2017,10 @@ NAME(aout,get_symtab) (abfd, location)
if (!NAME(aout,slurp_symbol_table) (abfd))
return -1;
- for (symbase = obj_aout_symbols(abfd); counter++ < bfd_get_symcount (abfd);)
- *(location++) = (asymbol *) ( symbase++);
+ for (symbase = obj_aout_symbols (abfd);
+ counter++ < bfd_get_symcount (abfd);
+ )
+ *(location++) = (asymbol *) (symbase++);
*location++ =0;
return bfd_get_symcount (abfd);
}
@@ -2017,7 +2045,7 @@ NAME(aout,swap_std_reloc_out) (abfd, g, natptr)
int r_baserel, r_jmptable, r_relative;
asection *output_section = sym->section->output_section;
- PUT_WORD(abfd, g->address, natptr->r_address);
+ PUT_WORD (abfd, g->address, natptr->r_address);
r_length = g->howto->size ; /* Size as a power of two */
r_pcrel = (int) g->howto->pc_relative; /* Relative to PC? */
@@ -2068,29 +2096,30 @@ NAME(aout,swap_std_reloc_out) (abfd, g, natptr)
}
/* now the fun stuff */
- if (bfd_header_big_endian (abfd)) {
+ 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_baserel? RELOC_STD_BITS_BASEREL_BIG: 0)
- | (r_jmptable? RELOC_STD_BITS_JMPTABLE_BIG: 0)
- | (r_relative? RELOC_STD_BITS_RELATIVE_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_baserel? RELOC_STD_BITS_BASEREL_LITTLE: 0)
- | (r_jmptable? RELOC_STD_BITS_JMPTABLE_LITTLE: 0)
- | (r_relative? RELOC_STD_BITS_RELATIVE_LITTLE: 0)
- | (r_length << RELOC_STD_BITS_LENGTH_SH_LITTLE);
- }
+ natptr->r_type[0] = ((r_extern ? RELOC_STD_BITS_EXTERN_BIG : 0)
+ | (r_pcrel ? RELOC_STD_BITS_PCREL_BIG : 0)
+ | (r_baserel ? RELOC_STD_BITS_BASEREL_BIG : 0)
+ | (r_jmptable ? RELOC_STD_BITS_JMPTABLE_BIG : 0)
+ | (r_relative ? RELOC_STD_BITS_RELATIVE_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_baserel ? RELOC_STD_BITS_BASEREL_LITTLE : 0)
+ | (r_jmptable ? RELOC_STD_BITS_JMPTABLE_LITTLE : 0)
+ | (r_relative ? RELOC_STD_BITS_RELATIVE_LITTLE : 0)
+ | (r_length << RELOC_STD_BITS_LENGTH_SH_LITTLE));
+ }
}
/* Extended stuff */
@@ -2108,7 +2137,7 @@ NAME(aout,swap_ext_reloc_out) (abfd, g, natptr)
int r_index;
int r_extern;
unsigned int r_type;
- unsigned int r_addend;
+ bfd_vma r_addend;
asymbol *sym = *(g->sym_ptr_ptr);
asection *output_section = sym->section->output_section;
@@ -2149,21 +2178,22 @@ NAME(aout,swap_ext_reloc_out) (abfd, g, natptr)
}
/* 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_EXT_BITS_EXTERN_BIG: 0)
- | (r_type << RELOC_EXT_BITS_TYPE_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_EXT_BITS_EXTERN_LITTLE: 0)
- | (r_type << RELOC_EXT_BITS_TYPE_SH_LITTLE);
- }
+ 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_EXT_BITS_EXTERN_BIG : 0)
+ | (r_type << RELOC_EXT_BITS_TYPE_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_EXT_BITS_EXTERN_LITTLE : 0)
+ | (r_type << RELOC_EXT_BITS_TYPE_SH_LITTLE));
+ }
PUT_WORD (abfd, r_addend, natptr->r_addend);
}
@@ -2174,40 +2204,44 @@ NAME(aout,swap_ext_reloc_out) (abfd, g, natptr)
Aout keeps all it's symbols based from zero, so the symbol would
contain 60. This macro subs the base of each section from the value
- to give the true offset from the section */
-
-#define MOVE_ADDRESS(ad) \
- if (r_extern) { \
- /* undefined symbol */ \
- cache_ptr->sym_ptr_ptr = symbols + r_index; \
- cache_ptr->addend = ad; \
- } else { \
- /* defined, section relative. replace symbol with pointer to \
- symbol which points to section */ \
- switch (r_index) { \
- case N_TEXT: \
- case N_TEXT | N_EXT: \
- cache_ptr->sym_ptr_ptr = obj_textsec(abfd)->symbol_ptr_ptr; \
- cache_ptr->addend = ad - su->textsec->vma; \
- break; \
- case N_DATA: \
- case N_DATA | N_EXT: \
- cache_ptr->sym_ptr_ptr = obj_datasec(abfd)->symbol_ptr_ptr; \
- cache_ptr->addend = ad - su->datasec->vma; \
- break; \
- case N_BSS: \
- case N_BSS | N_EXT: \
- cache_ptr->sym_ptr_ptr = obj_bsssec(abfd)->symbol_ptr_ptr; \
- cache_ptr->addend = ad - su->bsssec->vma; \
- break; \
- default: \
- case N_ABS: \
- case N_ABS | N_EXT: \
- cache_ptr->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr; \
+ to give the true offset from the section. */
+
+#define MOVE_ADDRESS(ad) \
+ if (r_extern) \
+ { \
+ /* Undefined symbol. */ \
+ cache_ptr->sym_ptr_ptr = symbols + r_index; \
cache_ptr->addend = ad; \
- break; \
} \
- } \
+ else \
+ { \
+ /* Defined, section relative. Replace symbol with pointer to \
+ symbol which points to section. */ \
+ switch (r_index) \
+ { \
+ case N_TEXT: \
+ case N_TEXT | N_EXT: \
+ cache_ptr->sym_ptr_ptr = obj_textsec (abfd)->symbol_ptr_ptr; \
+ cache_ptr->addend = ad - su->textsec->vma; \
+ break; \
+ case N_DATA: \
+ case N_DATA | N_EXT: \
+ cache_ptr->sym_ptr_ptr = obj_datasec (abfd)->symbol_ptr_ptr; \
+ cache_ptr->addend = ad - su->datasec->vma; \
+ break; \
+ case N_BSS: \
+ case N_BSS | N_EXT: \
+ cache_ptr->sym_ptr_ptr = obj_bsssec (abfd)->symbol_ptr_ptr; \
+ cache_ptr->addend = ad - su->bsssec->vma; \
+ break; \
+ default: \
+ case N_ABS: \
+ case N_ABS | N_EXT: \
+ cache_ptr->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr; \
+ cache_ptr->addend = ad; \
+ break; \
+ } \
+ }
void
NAME(aout,swap_ext_reloc_in) (abfd, bytes, cache_ptr, symbols, symcount)
@@ -2225,21 +2259,24 @@ NAME(aout,swap_ext_reloc_in) (abfd, bytes, cache_ptr, symbols, symcount)
cache_ptr->address = (GET_SWORD (abfd, bytes->r_address));
/* now the fun stuff */
- if (bfd_header_big_endian (abfd)) {
- r_index = (bytes->r_index[0] << 16)
- | (bytes->r_index[1] << 8)
- | bytes->r_index[2];
- r_extern = (0 != (bytes->r_type[0] & RELOC_EXT_BITS_EXTERN_BIG));
- r_type = (bytes->r_type[0] & RELOC_EXT_BITS_TYPE_BIG)
- >> RELOC_EXT_BITS_TYPE_SH_BIG;
- } else {
- r_index = (bytes->r_index[2] << 16)
- | (bytes->r_index[1] << 8)
- | bytes->r_index[0];
- r_extern = (0 != (bytes->r_type[0] & RELOC_EXT_BITS_EXTERN_LITTLE));
- r_type = (bytes->r_type[0] & RELOC_EXT_BITS_TYPE_LITTLE)
- >> RELOC_EXT_BITS_TYPE_SH_LITTLE;
- }
+ if (bfd_header_big_endian (abfd))
+ {
+ r_index = ((bytes->r_index[0] << 16)
+ | (bytes->r_index[1] << 8)
+ | bytes->r_index[2]);
+ r_extern = (0 != (bytes->r_type[0] & RELOC_EXT_BITS_EXTERN_BIG));
+ r_type = ((bytes->r_type[0] & RELOC_EXT_BITS_TYPE_BIG)
+ >> RELOC_EXT_BITS_TYPE_SH_BIG);
+ }
+ else
+ {
+ r_index = ((bytes->r_index[2] << 16)
+ | (bytes->r_index[1] << 8)
+ | bytes->r_index[0]);
+ r_extern = (0 != (bytes->r_type[0] & RELOC_EXT_BITS_EXTERN_LITTLE));
+ r_type = ((bytes->r_type[0] & RELOC_EXT_BITS_TYPE_LITTLE)
+ >> RELOC_EXT_BITS_TYPE_SH_LITTLE);
+ }
cache_ptr->howto = howto_table_ext + r_type;
@@ -2259,7 +2296,7 @@ NAME(aout,swap_ext_reloc_in) (abfd, bytes, cache_ptr, symbols, symcount)
r_index = N_ABS;
}
- MOVE_ADDRESS(GET_SWORD(abfd, bytes->r_addend));
+ MOVE_ADDRESS (GET_SWORD (abfd, bytes->r_addend));
}
void
@@ -2278,35 +2315,38 @@ NAME(aout,swap_std_reloc_in) (abfd, bytes, cache_ptr, symbols, symcount)
struct aoutdata *su = &(abfd->tdata.aout_data->a);
unsigned int howto_idx;
- cache_ptr->address = bfd_h_get_32 (abfd, bytes->r_address);
+ cache_ptr->address = H_GET_32 (abfd, bytes->r_address);
/* now the fun stuff */
- if (bfd_header_big_endian (abfd)) {
- r_index = (bytes->r_index[0] << 16)
- | (bytes->r_index[1] << 8)
- | bytes->r_index[2];
- r_extern = (0 != (bytes->r_type[0] & RELOC_STD_BITS_EXTERN_BIG));
- r_pcrel = (0 != (bytes->r_type[0] & RELOC_STD_BITS_PCREL_BIG));
- r_baserel = (0 != (bytes->r_type[0] & RELOC_STD_BITS_BASEREL_BIG));
- r_jmptable= (0 != (bytes->r_type[0] & RELOC_STD_BITS_JMPTABLE_BIG));
- r_relative= (0 != (bytes->r_type[0] & RELOC_STD_BITS_RELATIVE_BIG));
- r_length = (bytes->r_type[0] & RELOC_STD_BITS_LENGTH_BIG)
- >> RELOC_STD_BITS_LENGTH_SH_BIG;
- } else {
- r_index = (bytes->r_index[2] << 16)
- | (bytes->r_index[1] << 8)
- | bytes->r_index[0];
- r_extern = (0 != (bytes->r_type[0] & RELOC_STD_BITS_EXTERN_LITTLE));
- r_pcrel = (0 != (bytes->r_type[0] & RELOC_STD_BITS_PCREL_LITTLE));
- r_baserel = (0 != (bytes->r_type[0] & RELOC_STD_BITS_BASEREL_LITTLE));
- r_jmptable= (0 != (bytes->r_type[0] & RELOC_STD_BITS_JMPTABLE_LITTLE));
- r_relative= (0 != (bytes->r_type[0] & RELOC_STD_BITS_RELATIVE_LITTLE));
- r_length = (bytes->r_type[0] & RELOC_STD_BITS_LENGTH_LITTLE)
- >> RELOC_STD_BITS_LENGTH_SH_LITTLE;
- }
+ if (bfd_header_big_endian (abfd))
+ {
+ r_index = ((bytes->r_index[0] << 16)
+ | (bytes->r_index[1] << 8)
+ | bytes->r_index[2]);
+ r_extern = (0 != (bytes->r_type[0] & RELOC_STD_BITS_EXTERN_BIG));
+ r_pcrel = (0 != (bytes->r_type[0] & RELOC_STD_BITS_PCREL_BIG));
+ r_baserel = (0 != (bytes->r_type[0] & RELOC_STD_BITS_BASEREL_BIG));
+ r_jmptable= (0 != (bytes->r_type[0] & RELOC_STD_BITS_JMPTABLE_BIG));
+ r_relative= (0 != (bytes->r_type[0] & RELOC_STD_BITS_RELATIVE_BIG));
+ r_length = ((bytes->r_type[0] & RELOC_STD_BITS_LENGTH_BIG)
+ >> RELOC_STD_BITS_LENGTH_SH_BIG);
+ }
+ else
+ {
+ r_index = ((bytes->r_index[2] << 16)
+ | (bytes->r_index[1] << 8)
+ | bytes->r_index[0]);
+ r_extern = (0 != (bytes->r_type[0] & RELOC_STD_BITS_EXTERN_LITTLE));
+ r_pcrel = (0 != (bytes->r_type[0] & RELOC_STD_BITS_PCREL_LITTLE));
+ r_baserel = (0 != (bytes->r_type[0] & RELOC_STD_BITS_BASEREL_LITTLE));
+ r_jmptable= (0 != (bytes->r_type[0] & RELOC_STD_BITS_JMPTABLE_LITTLE));
+ r_relative= (0 != (bytes->r_type[0] & RELOC_STD_BITS_RELATIVE_LITTLE));
+ r_length = ((bytes->r_type[0] & RELOC_STD_BITS_LENGTH_LITTLE)
+ >> RELOC_STD_BITS_LENGTH_SH_LITTLE);
+ }
- howto_idx = r_length + 4 * r_pcrel + 8 * r_baserel
- + 16 * r_jmptable + 32 * r_relative;
+ howto_idx = (r_length + 4 * r_pcrel + 8 * r_baserel
+ + 16 * r_jmptable + 32 * r_relative);
BFD_ASSERT (howto_idx < TABLE_SIZE (howto_table_std));
cache_ptr->howto = howto_table_std + howto_idx;
BFD_ASSERT (cache_ptr->howto->type != (unsigned int) -1);
@@ -2325,7 +2365,7 @@ NAME(aout,swap_std_reloc_in) (abfd, bytes, cache_ptr, symbols, symcount)
r_index = N_ABS;
}
- MOVE_ADDRESS(0);
+ MOVE_ADDRESS (0);
}
/* Read and swap the relocs for a section. */
@@ -2336,13 +2376,14 @@ NAME(aout,slurp_reloc_table) (abfd, asect, symbols)
sec_ptr asect;
asymbol **symbols;
{
- unsigned int count;
+ bfd_size_type count;
bfd_size_type reloc_size;
PTR relocs;
arelent *reloc_cache;
size_t each_size;
unsigned int counter = 0;
arelent *cache_ptr;
+ bfd_size_type amt;
if (asect->relocation)
return true;
@@ -2351,9 +2392,9 @@ NAME(aout,slurp_reloc_table) (abfd, asect, symbols)
return true;
if (asect == obj_datasec (abfd))
- reloc_size = exec_hdr(abfd)->a_drsize;
+ reloc_size = exec_hdr (abfd)->a_drsize;
else if (asect == obj_textsec (abfd))
- reloc_size = exec_hdr(abfd)->a_trsize;
+ reloc_size = exec_hdr (abfd)->a_trsize;
else if (asect == obj_bsssec (abfd))
reloc_size = 0;
else
@@ -2369,19 +2410,20 @@ NAME(aout,slurp_reloc_table) (abfd, asect, symbols)
count = reloc_size / each_size;
- reloc_cache = (arelent *) bfd_malloc ((size_t) (count * sizeof (arelent)));
+ amt = count * sizeof (arelent);
+ reloc_cache = (arelent *) bfd_malloc (amt);
if (reloc_cache == NULL && count != 0)
return false;
- memset (reloc_cache, 0, count * sizeof (arelent));
+ memset (reloc_cache, 0, (size_t) amt);
- relocs = bfd_malloc ((size_t) reloc_size);
+ relocs = bfd_malloc (reloc_size);
if (relocs == NULL && reloc_size != 0)
{
free (reloc_cache);
return false;
}
- if (bfd_read (relocs, 1, reloc_size, abfd) != reloc_size)
+ if (bfd_bread (relocs, reloc_size, abfd) != reloc_size)
{
free (relocs);
free (reloc_cache);
@@ -2391,21 +2433,19 @@ NAME(aout,slurp_reloc_table) (abfd, asect, symbols)
cache_ptr = reloc_cache;
if (each_size == RELOC_EXT_SIZE)
{
- register struct reloc_ext_external *rptr =
- (struct reloc_ext_external *) relocs;
+ struct reloc_ext_external *rptr = (struct reloc_ext_external *) relocs;
for (; counter < count; counter++, rptr++, cache_ptr++)
MY_swap_ext_reloc_in (abfd, rptr, cache_ptr, symbols,
- bfd_get_symcount (abfd));
+ (bfd_size_type) bfd_get_symcount (abfd));
}
else
{
- register struct reloc_std_external *rptr =
- (struct reloc_std_external *) relocs;
+ struct reloc_std_external *rptr = (struct reloc_std_external *) relocs;
for (; counter < count; counter++, rptr++, cache_ptr++)
MY_swap_std_reloc_in (abfd, rptr, cache_ptr, symbols,
- bfd_get_symcount (abfd));
+ (bfd_size_type) bfd_get_symcount (abfd));
}
free (relocs);
@@ -2428,13 +2468,13 @@ NAME(aout,squirt_out_relocs) (abfd, section)
size_t each_size;
unsigned int count = section->reloc_count;
- size_t natsize;
+ bfd_size_type natsize;
if (count == 0 || section->orelocation == NULL)
return true;
each_size = obj_reloc_entry_size (abfd);
- natsize = each_size * count;
+ natsize = (bfd_size_type) each_size * count;
native = (unsigned char *) bfd_zalloc (abfd, natsize);
if (!native)
return false;
@@ -2454,13 +2494,15 @@ NAME(aout,squirt_out_relocs) (abfd, section)
for (natptr = native;
count != 0;
--count, natptr += each_size, ++generic)
- MY_swap_std_reloc_out(abfd, *generic, (struct reloc_std_external *)natptr);
+ MY_swap_std_reloc_out (abfd, *generic,
+ (struct reloc_std_external *) natptr);
}
- if ( bfd_write ((PTR) native, 1, natsize, abfd) != natsize) {
- bfd_release(abfd, native);
- return false;
- }
+ if (bfd_bwrite ((PTR) native, natsize, abfd) != natsize)
+ {
+ bfd_release (abfd, native);
+ return false;
+ }
bfd_release (abfd, native);
return true;
@@ -2486,21 +2528,24 @@ NAME(aout,canonicalize_reloc) (abfd, section, relptr, symbols)
if (!(tblptr || NAME(aout,slurp_reloc_table) (abfd, section, symbols)))
return -1;
- if (section->flags & SEC_CONSTRUCTOR) {
- arelent_chain *chain = section->constructor_chain;
- for (count = 0; count < section->reloc_count; count ++) {
- *relptr ++ = &chain->relent;
- chain = chain->next;
+ if (section->flags & SEC_CONSTRUCTOR)
+ {
+ arelent_chain *chain = section->constructor_chain;
+ for (count = 0; count < section->reloc_count; count ++)
+ {
+ *relptr ++ = &chain->relent;
+ chain = chain->next;
+ }
}
- }
- else {
- tblptr = section->relocation;
+ else
+ {
+ tblptr = section->relocation;
- for (count = 0; count++ < section->reloc_count;)
- {
- *relptr++ = tblptr++;
- }
- }
+ for (count = 0; count++ < section->reloc_count; )
+ {
+ *relptr++ = tblptr++;
+ }
+ }
*relptr = 0;
return section->reloc_count;
@@ -2511,22 +2556,24 @@ NAME(aout,get_reloc_upper_bound) (abfd, asect)
bfd *abfd;
sec_ptr asect;
{
- if (bfd_get_format (abfd) != bfd_object) {
- bfd_set_error (bfd_error_invalid_operation);
- return -1;
- }
- if (asect->flags & SEC_CONSTRUCTOR) {
- return (sizeof (arelent *) * (asect->reloc_count+1));
- }
+ if (bfd_get_format (abfd) != bfd_object)
+ {
+ bfd_set_error (bfd_error_invalid_operation);
+ return -1;
+ }
+ if (asect->flags & SEC_CONSTRUCTOR)
+ {
+ return (sizeof (arelent *) * (asect->reloc_count+1));
+ }
if (asect == obj_datasec (abfd))
return (sizeof (arelent *)
- * ((exec_hdr(abfd)->a_drsize / obj_reloc_entry_size (abfd))
+ * ((exec_hdr (abfd)->a_drsize / obj_reloc_entry_size (abfd))
+ 1));
if (asect == obj_textsec (abfd))
return (sizeof (arelent *)
- * ((exec_hdr(abfd)->a_trsize / obj_reloc_entry_size (abfd))
+ * ((exec_hdr (abfd)->a_trsize / obj_reloc_entry_size (abfd))
+ 1));
if (asect == obj_bsssec (abfd))
@@ -2549,7 +2596,7 @@ NAME(aout,get_symtab_upper_bound) (abfd)
return (bfd_get_symcount (abfd)+1) * (sizeof (aout_symbol_type *));
}
- alent *
+alent *
NAME(aout,get_lineno) (ignore_abfd, ignore_symbol)
bfd *ignore_abfd ATTRIBUTE_UNUSED;
asymbol *ignore_symbol ATTRIBUTE_UNUSED;
@@ -2567,7 +2614,7 @@ NAME(aout,get_symbol_info) (ignore_abfd, symbol, ret)
if (ret->type == '?')
{
- int type_code = aout_symbol(symbol)->type & 0xff;
+ int type_code = aout_symbol (symbol)->type & 0xff;
const char *stab_name = bfd_get_stab_name (type_code);
static char buf[10];
@@ -2578,47 +2625,49 @@ NAME(aout,get_symbol_info) (ignore_abfd, symbol, ret)
}
ret->type = '-';
ret->stab_type = type_code;
- ret->stab_other = (unsigned) (aout_symbol(symbol)->other & 0xff);
- ret->stab_desc = (unsigned) (aout_symbol(symbol)->desc & 0xffff);
+ ret->stab_other = (unsigned) (aout_symbol (symbol)->other & 0xff);
+ ret->stab_desc = (unsigned) (aout_symbol (symbol)->desc & 0xffff);
ret->stab_name = stab_name;
}
}
void
-NAME(aout,print_symbol) (ignore_abfd, afile, symbol, how)
- bfd *ignore_abfd ATTRIBUTE_UNUSED;
+NAME(aout,print_symbol) (abfd, afile, symbol, how)
+ bfd *abfd;
PTR afile;
asymbol *symbol;
bfd_print_symbol_type how;
{
FILE *file = (FILE *)afile;
- switch (how) {
- case bfd_print_symbol_name:
- if (symbol->name)
- fprintf (file,"%s", symbol->name);
- break;
- case bfd_print_symbol_more:
- fprintf (file,"%4x %2x %2x",(unsigned) (aout_symbol(symbol)->desc & 0xffff),
- (unsigned) (aout_symbol(symbol)->other & 0xff),
- (unsigned) (aout_symbol(symbol)->type));
- break;
- case bfd_print_symbol_all:
+ switch (how)
{
- CONST char *section_name = symbol->section->name;
+ case bfd_print_symbol_name:
+ if (symbol->name)
+ fprintf (file,"%s", symbol->name);
+ break;
+ case bfd_print_symbol_more:
+ fprintf (file,"%4x %2x %2x",
+ (unsigned) (aout_symbol (symbol)->desc & 0xffff),
+ (unsigned) (aout_symbol (symbol)->other & 0xff),
+ (unsigned) (aout_symbol (symbol)->type));
+ break;
+ case bfd_print_symbol_all:
+ {
+ const char *section_name = symbol->section->name;
- bfd_print_symbol_vandf((PTR)file,symbol);
+ bfd_print_symbol_vandf (abfd, (PTR)file, symbol);
- fprintf (file," %-5s %04x %02x %02x",
- section_name,
- (unsigned) (aout_symbol(symbol)->desc & 0xffff),
- (unsigned) (aout_symbol(symbol)->other & 0xff),
- (unsigned) (aout_symbol(symbol)->type & 0xff));
- if (symbol->name)
- fprintf (file," %s", symbol->name);
+ fprintf (file," %-5s %04x %02x %02x",
+ section_name,
+ (unsigned) (aout_symbol (symbol)->desc & 0xffff),
+ (unsigned) (aout_symbol (symbol)->other & 0xff),
+ (unsigned) (aout_symbol (symbol)->type & 0xff));
+ if (symbol->name)
+ fprintf (file," %s", symbol->name);
+ }
+ break;
}
- break;
- }
}
/* If we don't have to allocate more than 1MB to hold the generic
@@ -2706,123 +2755,126 @@ NAME(aout,find_nearest_line)
asection *section;
asymbol **symbols;
bfd_vma offset;
- CONST char **filename_ptr;
- CONST char **functionname_ptr;
+ const char **filename_ptr;
+ const char **functionname_ptr;
unsigned int *line_ptr;
{
/* Run down the file looking for the filename, function and linenumber */
asymbol **p;
- CONST char *directory_name = NULL;
- CONST char *main_file_name = NULL;
- CONST char *current_file_name = NULL;
- CONST char *line_file_name = NULL; /* Value of current_file_name at line number. */
- CONST char *line_directory_name = NULL; /* Value of directory_name at line number. */
+ const char *directory_name = NULL;
+ const char *main_file_name = NULL;
+ const char *current_file_name = NULL;
+ const char *line_file_name = NULL; /* Value of current_file_name at line number. */
+ const char *line_directory_name = NULL; /* Value of directory_name at line number. */
bfd_vma low_line_vma = 0;
bfd_vma low_func_vma = 0;
asymbol *func = 0;
- size_t filelen, funclen;
+ bfd_size_type filelen, funclen;
char *buf;
*filename_ptr = abfd->filename;
*functionname_ptr = 0;
*line_ptr = 0;
- if (symbols != (asymbol **)NULL) {
- for (p = symbols; *p; p++) {
- aout_symbol_type *q = (aout_symbol_type *) (*p);
- next:
- switch (q->type){
- case N_TEXT:
- /* If this looks like a file name symbol, and it comes after
- the line number we have found so far, but before the
- offset, then we have probably not found the right line
- number. */
- if (q->symbol.value <= offset
- && ((q->symbol.value > low_line_vma
- && (line_file_name != NULL
- || *line_ptr != 0))
- || (q->symbol.value > low_func_vma
- && func != NULL)))
- {
- const char *symname;
+ if (symbols != (asymbol **)NULL)
+ {
+ for (p = symbols; *p; p++)
+ {
+ aout_symbol_type *q = (aout_symbol_type *) (*p);
+ next:
+ switch (q->type)
+ {
+ case N_TEXT:
+ /* If this looks like a file name symbol, and it comes after
+ the line number we have found so far, but before the
+ offset, then we have probably not found the right line
+ number. */
+ if (q->symbol.value <= offset
+ && ((q->symbol.value > low_line_vma
+ && (line_file_name != NULL
+ || *line_ptr != 0))
+ || (q->symbol.value > low_func_vma
+ && func != NULL)))
+ {
+ const char *symname;
- symname = q->symbol.name;
- if (strcmp (symname + strlen (symname) - 2, ".o") == 0)
- {
- if (q->symbol.value > low_line_vma)
- {
- *line_ptr = 0;
- line_file_name = NULL;
- }
- if (q->symbol.value > low_func_vma)
- func = NULL;
- }
- }
- break;
+ symname = q->symbol.name;
+ if (strcmp (symname + strlen (symname) - 2, ".o") == 0)
+ {
+ if (q->symbol.value > low_line_vma)
+ {
+ *line_ptr = 0;
+ line_file_name = NULL;
+ }
+ if (q->symbol.value > low_func_vma)
+ func = NULL;
+ }
+ }
+ break;
- case N_SO:
- /* If this symbol is less than the offset, but greater than
- the line number we have found so far, then we have not
- found the right line number. */
- if (q->symbol.value <= offset)
- {
- if (q->symbol.value > low_line_vma)
- {
- *line_ptr = 0;
- line_file_name = NULL;
- }
- if (q->symbol.value > low_func_vma)
- func = NULL;
- }
+ case N_SO:
+ /* If this symbol is less than the offset, but greater than
+ the line number we have found so far, then we have not
+ found the right line number. */
+ if (q->symbol.value <= offset)
+ {
+ if (q->symbol.value > low_line_vma)
+ {
+ *line_ptr = 0;
+ line_file_name = NULL;
+ }
+ if (q->symbol.value > low_func_vma)
+ func = NULL;
+ }
- main_file_name = current_file_name = q->symbol.name;
- /* Look ahead to next symbol to check if that too is an N_SO. */
- p++;
- if (*p == NULL)
- break;
- q = (aout_symbol_type *) (*p);
- if (q->type != (int)N_SO)
- goto next;
-
- /* Found a second N_SO First is directory; second is filename. */
- directory_name = current_file_name;
- main_file_name = current_file_name = q->symbol.name;
- if (obj_textsec(abfd) != section)
- goto done;
- break;
- case N_SOL:
- current_file_name = q->symbol.name;
- break;
+ main_file_name = current_file_name = q->symbol.name;
+ /* Look ahead to next symbol to check if that too is an N_SO. */
+ p++;
+ if (*p == NULL)
+ break;
+ q = (aout_symbol_type *) (*p);
+ if (q->type != (int)N_SO)
+ goto next;
+
+ /* Found a second N_SO First is directory; second is filename. */
+ directory_name = current_file_name;
+ main_file_name = current_file_name = q->symbol.name;
+ if (obj_textsec (abfd) != section)
+ goto done;
+ break;
+ case N_SOL:
+ current_file_name = q->symbol.name;
+ break;
- case N_SLINE:
+ case N_SLINE:
- case N_DSLINE:
- case N_BSLINE:
- /* We'll keep this if it resolves nearer than the one we have
- already. */
- if (q->symbol.value >= low_line_vma
- && q->symbol.value <= offset)
- {
- *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:
- {
- /* We'll keep this if it is nearer than the one we have already */
- if (q->symbol.value >= low_func_vma &&
- q->symbol.value <= offset) {
- low_func_vma = q->symbol.value;
- func = (asymbol *)q;
- }
- else if (q->symbol.value > offset)
- goto done;
+ case N_DSLINE:
+ case N_BSLINE:
+ /* We'll keep this if it resolves nearer than the one we have
+ already. */
+ if (q->symbol.value >= low_line_vma
+ && q->symbol.value <= offset)
+ {
+ *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:
+ {
+ /* We'll keep this if it is nearer than the one we have already */
+ if (q->symbol.value >= low_func_vma &&
+ q->symbol.value <= offset) {
+ low_func_vma = q->symbol.value;
+ func = (asymbol *)q;
+ }
+ else if (q->symbol.value > offset)
+ goto done;
+ }
+ break;
+ }
}
- break;
- }
}
- }
done:
if (*line_ptr != 0)
@@ -2869,7 +2921,7 @@ NAME(aout,find_nearest_line)
if (func)
{
const char *function = func->name;
- char *p;
+ char *colon;
/* The caller expects a symbol name. We actually have a
function name, without the leading underscore. Put the
@@ -2882,9 +2934,9 @@ NAME(aout,find_nearest_line)
strcpy (buf + 1, function);
}
/* Have to remove : stuff */
- p = strchr (buf, ':');
- if (p != NULL)
- *p = '\0';
+ colon = strchr (buf, ':');
+ if (colon != NULL)
+ *colon = '\0';
*functionname_ptr = buf;
}
@@ -2896,7 +2948,7 @@ NAME(aout,sizeof_headers) (abfd, execable)
bfd *abfd;
boolean execable ATTRIBUTE_UNUSED;
{
- return adata(abfd).exec_bytes_size;
+ return adata (abfd).exec_bytes_size;
}
/* Free all information we have cached for this BFD. We can always
@@ -2994,9 +3046,9 @@ NAME(aout,link_hash_table_create) (abfd)
bfd *abfd;
{
struct aout_link_hash_table *ret;
+ bfd_size_type amt = sizeof (struct aout_link_hash_table);
- ret = ((struct aout_link_hash_table *)
- bfd_alloc (abfd, sizeof (struct aout_link_hash_table)));
+ ret = (struct aout_link_hash_table *) bfd_alloc (abfd, amt);
if (ret == NULL)
return (struct bfd_link_hash_table *) NULL;
if (! NAME(aout,link_hash_table_init) (ret, abfd,
@@ -3132,7 +3184,7 @@ aout_link_check_ar_symbols (abfd, info, pneeded)
strings = obj_aout_external_strings (abfd);
for (; p < pend; p++)
{
- int type = bfd_h_get_8 (abfd, p->e_type);
+ int type = H_GET_8 (abfd, p->e_type);
const char *name;
struct bfd_link_hash_entry *h;
@@ -3296,6 +3348,7 @@ aout_link_add_symbols (abfd, info)
struct aout_link_hash_entry **sym_hash;
register struct external_nlist *p;
struct external_nlist *pend;
+ bfd_size_type amt;
syms = obj_aout_external_syms (abfd);
sym_count = obj_aout_external_sym_count (abfd);
@@ -3316,10 +3369,8 @@ aout_link_add_symbols (abfd, info)
to particular symbols. We could just look them up in the hash
table, but keeping the list is more efficient. Perhaps this
should be conditional on info->keep_memory. */
- sym_hash = ((struct aout_link_hash_entry **)
- bfd_alloc (abfd,
- ((size_t) sym_count
- * sizeof (struct aout_link_hash_entry *))));
+ amt = sym_count * sizeof (struct aout_link_hash_entry *);
+ sym_hash = (struct aout_link_hash_entry **) bfd_alloc (abfd, amt);
if (sym_hash == NULL && sym_count != 0)
return false;
obj_aout_sym_hashes (abfd) = sym_hash;
@@ -3341,7 +3392,7 @@ aout_link_add_symbols (abfd, info)
*sym_hash = NULL;
- type = bfd_h_get_8 (abfd, p->e_type);
+ type = H_GET_8 (abfd, p->e_type);
/* Ignore debugging symbols. */
if ((type & N_STAB) != 0)
@@ -3525,8 +3576,8 @@ struct aout_link_includes_entry
/* Look up an entry in an the header file hash table. */
-#define aout_link_includes_lookup(table, string, create, copy) \
- ((struct aout_link_includes_entry *) \
+#define aout_link_includes_lookup(table, string, create, copy) \
+ ((struct aout_link_includes_entry *) \
bfd_hash_lookup (&(table)->root, (string), (create), (copy)))
/* During the final link step we need to pass around a bunch of
@@ -3631,9 +3682,9 @@ NAME(aout,final_link) (abfd, info, callback)
boolean includes_hash_initialized = false;
register bfd *sub;
bfd_size_type trsize, drsize;
- size_t max_contents_size;
- size_t max_relocs_size;
- size_t max_sym_count;
+ bfd_size_type max_contents_size;
+ bfd_size_type max_relocs_size;
+ bfd_size_type max_sym_count;
bfd_size_type text_size;
file_ptr text_end;
register struct bfd_link_order *p;
@@ -3665,7 +3716,7 @@ NAME(aout,final_link) (abfd, info, callback)
max_sym_count = 0;
for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
{
- size_t sz;
+ bfd_size_type sz;
if (info->relocateable)
{
@@ -3934,14 +3985,12 @@ NAME(aout,final_link) (abfd, info, callback)
&& obj_datasec (abfd)->reloc_count == 0)
{
bfd_byte b;
+ file_ptr pos;
b = 0;
- if (bfd_seek (abfd,
- (obj_datasec (abfd)->filepos
- + exec_hdr (abfd)->a_data
- - 1),
- SEEK_SET) != 0
- || bfd_write (&b, 1, 1, abfd) != 1)
+ pos = obj_datasec (abfd)->filepos + exec_hdr (abfd)->a_data - 1;
+ if (bfd_seek (abfd, pos, SEEK_SET) != 0
+ || bfd_bwrite (&b, (bfd_size_type) 1, abfd) != 1)
goto error_return;
}
@@ -4062,9 +4111,9 @@ aout_link_write_symbols (finfo, input_bfd)
false, false) != NULL)
&& discard != discard_all)
{
- bfd_h_put_8 (output_bfd, N_TEXT, outsym->e_type);
- bfd_h_put_8 (output_bfd, 0, outsym->e_other);
- bfd_h_put_16 (output_bfd, (bfd_vma) 0, outsym->e_desc);
+ H_PUT_8 (output_bfd, N_TEXT, outsym->e_type);
+ H_PUT_8 (output_bfd, 0, outsym->e_other);
+ H_PUT_16 (output_bfd, 0, outsym->e_desc);
strtab_index = add_to_stringtab (output_bfd, finfo->strtab,
input_bfd->filename, false);
if (strtab_index == (bfd_size_type) -1)
@@ -4085,7 +4134,7 @@ aout_link_write_symbols (finfo, input_bfd)
sym_end = sym + sym_count;
sym_hash = obj_aout_sym_hashes (input_bfd);
symbol_map = finfo->symbol_map;
- memset (symbol_map, 0, sym_count * sizeof *symbol_map);
+ memset (symbol_map, 0, (size_t) sym_count * sizeof *symbol_map);
for (; sym < sym_end; sym++, sym_hash++, symbol_map++)
{
const char *name;
@@ -4108,7 +4157,7 @@ aout_link_write_symbols (finfo, input_bfd)
we do copy the symbol over. */
*symbol_map = -1;
- type = bfd_h_get_8 (input_bfd, sym->e_type);
+ type = H_GET_8 (input_bfd, sym->e_type);
name = strings + GET_WORD (input_bfd, sym->e_strx);
h = NULL;
@@ -4342,6 +4391,7 @@ aout_link_write_symbols (finfo, input_bfd)
switch (discard)
{
case discard_none:
+ case discard_sec_merge:
break;
case discard_l:
if ((type & N_STAB) == 0
@@ -4378,7 +4428,7 @@ aout_link_write_symbols (finfo, input_bfd)
{
int incl_type;
- incl_type = bfd_h_get_8 (input_bfd, incl_sym->e_type);
+ incl_type = H_GET_8 (input_bfd, incl_sym->e_type);
if (incl_type == N_EINCL)
{
if (nest == 0)
@@ -4399,7 +4449,7 @@ aout_link_write_symbols (finfo, input_bfd)
{
/* Skip the file number. */
++s;
- while (isdigit ((unsigned char) *s))
+ while (ISDIGIT (*s))
++s;
--s;
}
@@ -4447,7 +4497,7 @@ aout_link_write_symbols (finfo, input_bfd)
{
int incl_type;
- incl_type = bfd_h_get_8 (input_bfd, incl_sym->e_type);
+ incl_type = H_GET_8 (input_bfd, incl_sym->e_type);
if (incl_type == N_EINCL)
{
if (nest == 0)
@@ -4468,11 +4518,9 @@ aout_link_write_symbols (finfo, input_bfd)
/* Copy this symbol into the list of symbols we are going to
write out. */
- bfd_h_put_8 (output_bfd, type, outsym->e_type);
- bfd_h_put_8 (output_bfd, bfd_h_get_8 (input_bfd, sym->e_other),
- outsym->e_other);
- bfd_h_put_16 (output_bfd, bfd_h_get_16 (input_bfd, sym->e_desc),
- outsym->e_desc);
+ H_PUT_8 (output_bfd, type, outsym->e_type);
+ H_PUT_8 (output_bfd, H_GET_8 (input_bfd, sym->e_other), outsym->e_other);
+ H_PUT_16 (output_bfd, H_GET_16 (input_bfd, sym->e_desc), outsym->e_desc);
copy = false;
if (! finfo->info->keep_memory)
{
@@ -4498,17 +4546,16 @@ aout_link_write_symbols (finfo, input_bfd)
/* Write out the output symbols we have just constructed. */
if (outsym > finfo->output_syms)
{
- bfd_size_type outsym_count;
+ bfd_size_type outsym_size;
if (bfd_seek (output_bfd, finfo->symoff, SEEK_SET) != 0)
return false;
- outsym_count = outsym - finfo->output_syms;
- if (bfd_write ((PTR) finfo->output_syms,
- (bfd_size_type) EXTERNAL_NLIST_SIZE,
- (bfd_size_type) outsym_count, output_bfd)
- != outsym_count * EXTERNAL_NLIST_SIZE)
+ outsym_size = outsym - finfo->output_syms;
+ outsym_size *= EXTERNAL_NLIST_SIZE;
+ if (bfd_bwrite ((PTR) finfo->output_syms, outsym_size, output_bfd)
+ != outsym_size)
return false;
- finfo->symoff += outsym_count * EXTERNAL_NLIST_SIZE;
+ finfo->symoff += outsym_size;
}
return true;
@@ -4528,6 +4575,7 @@ aout_link_write_other_symbol (h, data)
bfd_vma val;
struct external_nlist outsym;
bfd_size_type indx;
+ bfd_size_type amt;
output_bfd = finfo->output_bfd;
@@ -4604,12 +4652,12 @@ aout_link_write_other_symbol (h, data)
return true;
}
- bfd_h_put_8 (output_bfd, type, outsym.e_type);
- bfd_h_put_8 (output_bfd, 0, outsym.e_other);
- bfd_h_put_16 (output_bfd, 0, outsym.e_desc);
+ H_PUT_8 (output_bfd, type, outsym.e_type);
+ H_PUT_8 (output_bfd, 0, outsym.e_other);
+ H_PUT_16 (output_bfd, 0, outsym.e_desc);
indx = add_to_stringtab (output_bfd, finfo->strtab, h->root.root.string,
false);
- if (indx == (bfd_size_type) -1)
+ if (indx == - (bfd_size_type) 1)
{
/* FIXME: No way to handle errors. */
abort ();
@@ -4617,9 +4665,9 @@ aout_link_write_other_symbol (h, data)
PUT_WORD (output_bfd, indx, outsym.e_strx);
PUT_WORD (output_bfd, val, outsym.e_value);
+ amt = EXTERNAL_NLIST_SIZE;
if (bfd_seek (output_bfd, finfo->symoff, SEEK_SET) != 0
- || bfd_write ((PTR) &outsym, (bfd_size_type) EXTERNAL_NLIST_SIZE,
- (bfd_size_type) 1, output_bfd) != EXTERNAL_NLIST_SIZE)
+ || bfd_bwrite ((PTR) &outsym, amt, output_bfd) != amt)
{
/* FIXME: No way to handle errors. */
abort ();
@@ -4663,7 +4711,7 @@ aout_link_input_section (finfo, input_bfd, input_section, reloff_ptr,
if (rel_size > 0)
{
if (bfd_seek (input_bfd, input_section->rel_filepos, SEEK_SET) != 0
- || bfd_read (relocs, 1, rel_size, input_bfd) != rel_size)
+ || bfd_bread (relocs, rel_size, input_bfd) != rel_size)
return false;
}
}
@@ -4688,7 +4736,7 @@ aout_link_input_section (finfo, input_bfd, input_section, reloff_ptr,
if (! bfd_set_section_contents (finfo->output_bfd,
input_section->output_section,
(PTR) finfo->contents,
- input_section->output_offset,
+ (file_ptr) input_section->output_offset,
input_size))
return false;
@@ -4698,8 +4746,7 @@ aout_link_input_section (finfo, input_bfd, input_section, reloff_ptr,
{
if (bfd_seek (finfo->output_bfd, *reloff_ptr, SEEK_SET) != 0)
return false;
- if (bfd_write (relocs, (bfd_size_type) 1, rel_size, finfo->output_bfd)
- != rel_size)
+ if (bfd_bwrite (relocs, rel_size, finfo->output_bfd) != rel_size)
return false;
*reloff_ptr += rel_size;
@@ -4798,7 +4845,7 @@ aout_link_input_section_std (finfo, input_bfd, input_section, relocs,
r_addr = GET_SWORD (input_bfd, rel->r_address);
#ifdef MY_reloc_howto
- howto = MY_reloc_howto(input_bfd, rel, r_index, r_extern, r_pcrel);
+ howto = MY_reloc_howto (input_bfd, rel, r_index, r_extern, r_pcrel);
#else
{
int r_jmptable;
@@ -5357,7 +5404,7 @@ aout_link_input_section_ext (finfo, input_bfd, input_section, relocs,
/* For base relative relocs, r_index is always an index
into the symbol table, even if r_extern is 0. */
sym = syms + r_index;
- type = bfd_h_get_8 (input_bfd, sym->e_type);
+ type = H_GET_8 (input_bfd, sym->e_type);
if ((type & N_TYPE) == N_TEXT
|| type == N_WEAKT)
r_section = obj_textsec (input_bfd);
@@ -5518,6 +5565,7 @@ aout_link_reloc_link_order (finfo, o, p)
struct reloc_std_external srel;
struct reloc_ext_external erel;
PTR rel_ptr;
+ bfd_size_type amt;
pr = p->u.reloc.p;
@@ -5583,8 +5631,8 @@ aout_link_reloc_link_order (finfo, o, p)
if (obj_reloc_entry_size (finfo->output_bfd) == RELOC_STD_SIZE)
{
#ifdef MY_put_reloc
- MY_put_reloc(finfo->output_bfd, r_extern, r_index, p->offset, howto,
- &srel);
+ MY_put_reloc (finfo->output_bfd, r_extern, r_index, p->offset, howto,
+ &srel);
#else
{
int r_pcrel;
@@ -5647,7 +5695,7 @@ aout_link_reloc_link_order (finfo, o, p)
if (buf == (bfd_byte *) NULL)
return false;
r = MY_relocate_contents (howto, finfo->output_bfd,
- pr->addend, buf);
+ (bfd_vma) pr->addend, buf);
switch (r)
{
case bfd_reloc_ok:
@@ -5670,10 +5718,8 @@ aout_link_reloc_link_order (finfo, o, p)
}
break;
}
- ok = bfd_set_section_contents (finfo->output_bfd, o,
- (PTR) buf,
- (file_ptr) p->offset,
- size);
+ ok = bfd_set_section_contents (finfo->output_bfd, o, (PTR) buf,
+ (file_ptr) p->offset, size);
free (buf);
if (! ok)
return false;
@@ -5706,17 +5752,15 @@ aout_link_reloc_link_order (finfo, o, p)
| (howto->type << RELOC_EXT_BITS_TYPE_SH_LITTLE);
}
- PUT_WORD (finfo->output_bfd, pr->addend, erel.r_addend);
+ PUT_WORD (finfo->output_bfd, (bfd_vma) pr->addend, erel.r_addend);
#endif /* MY_put_ext_reloc */
rel_ptr = (PTR) &erel;
}
+ amt = obj_reloc_entry_size (finfo->output_bfd);
if (bfd_seek (finfo->output_bfd, *reloff_ptr, SEEK_SET) != 0
- || (bfd_write (rel_ptr, (bfd_size_type) 1,
- obj_reloc_entry_size (finfo->output_bfd),
- finfo->output_bfd)
- != obj_reloc_entry_size (finfo->output_bfd)))
+ || bfd_bwrite (rel_ptr, amt, finfo->output_bfd) != amt)
return false;
*reloff_ptr += obj_reloc_entry_size (finfo->output_bfd);
diff --git a/contrib/binutils/bfd/archive.c b/contrib/binutils/bfd/archive.c
index 0a6f023..fc2ba45 100644
--- a/contrib/binutils/bfd/archive.c
+++ b/contrib/binutils/bfd/archive.c
@@ -1,6 +1,6 @@
/* BFD back-end for archive files (libraries).
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000
+ 2000, 2001
Free Software Foundation, Inc.
Written by Cygnus Support. Mostly Gumby Henkel-Wallace's fault.
@@ -132,7 +132,7 @@ DESCRIPTION
#include "libbfd.h"
#include "aout/ar.h"
#include "aout/ranlib.h"
-#include <ctype.h>
+#include "safe-ctype.h"
#ifndef errno
extern int errno;
@@ -142,12 +142,6 @@ extern int errno;
#define BFD_GNU960_ARMAG(abfd) (BFD_COFF_FILE_P((abfd)) ? ARMAG : ARMAGB)
#endif
-/* Define offsetof for those systems which lack it */
-
-#ifndef offsetof
-#define offsetof(TYPE, MEMBER) ((unsigned long) &((TYPE *)0)->MEMBER)
-#endif
-
/* We keep a cache of archive filepointers to archive elements to
speed up searching the archive by filepos. We only add an entry to
the cache when we actually read one. We also don't sort the cache;
@@ -170,6 +164,7 @@ static char *get_extended_arelt_filename PARAMS ((bfd *arch,
const char *name));
static boolean do_slurp_bsd_armap PARAMS ((bfd *abfd));
static boolean do_slurp_coff_armap PARAMS ((bfd *abfd));
+boolean bfd_elf64_archive_slurp_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 *,
@@ -179,9 +174,9 @@ boolean
_bfd_generic_mkarchive (abfd)
bfd *abfd;
{
- abfd->tdata.aout_ar_data = ((struct artdata *)
- bfd_zalloc (abfd, sizeof (struct artdata)));
+ bfd_size_type amt = sizeof (struct artdata);
+ abfd->tdata.aout_ar_data = (struct artdata *) bfd_zalloc (abfd, amt);
if (bfd_ardata (abfd) == NULL)
return false;
@@ -290,10 +285,9 @@ _bfd_add_bfd_to_archive_cache (arch_bfd, filepos, new_elt)
bfd *arch_bfd, *new_elt;
file_ptr filepos;
{
- struct ar_cache *new_cache = ((struct ar_cache *)
- bfd_zalloc (arch_bfd,
- sizeof (struct ar_cache)));
+ bfd_size_type amt = sizeof (struct ar_cache);
+ struct ar_cache *new_cache = (struct ar_cache *) bfd_zalloc (arch_bfd, amt);
if (new_cache == NULL)
return false;
@@ -364,14 +358,14 @@ _bfd_generic_read_ar_hdr_mag (abfd, mag)
{
struct ar_hdr hdr;
char *hdrp = (char *) &hdr;
- unsigned int parsed_size;
+ size_t parsed_size;
struct areltdata *ared;
char *filename = NULL;
- unsigned int namelen = 0;
- unsigned int allocsize = sizeof (struct areltdata) + sizeof (struct ar_hdr);
+ bfd_size_type namelen = 0;
+ bfd_size_type allocsize = sizeof (struct areltdata) + sizeof (struct ar_hdr);
char *allocptr = 0;
- if (bfd_read ((PTR) hdrp, 1, sizeof (struct ar_hdr), abfd)
+ if (bfd_bread ((PTR) hdrp, (bfd_size_type) sizeof (struct ar_hdr), abfd)
!= sizeof (struct ar_hdr))
{
if (bfd_get_error () != bfd_error_system_call)
@@ -414,7 +408,7 @@ _bfd_generic_read_ar_hdr_mag (abfd, mag)
else if (hdr.ar_name[0] == '#'
&& hdr.ar_name[1] == '1'
&& hdr.ar_name[2] == '/'
- && isdigit ((unsigned char) hdr.ar_name[3]))
+ && ISDIGIT (hdr.ar_name[3]))
{
/* BSD-4.4 extended name */
namelen = atoi (&hdr.ar_name[3]);
@@ -427,7 +421,7 @@ _bfd_generic_read_ar_hdr_mag (abfd, mag)
filename = (allocptr
+ sizeof (struct areltdata)
+ sizeof (struct ar_hdr));
- if (bfd_read (filename, 1, namelen, abfd) != namelen)
+ if (bfd_bread (filename, namelen, abfd) != namelen)
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_no_more_archived_files);
@@ -482,7 +476,7 @@ _bfd_generic_read_ar_hdr_mag (abfd, mag)
ared->filename = allocptr + (sizeof (struct areltdata) +
sizeof (struct ar_hdr));
if (namelen)
- memcpy (ared->filename, hdr.ar_name, namelen);
+ memcpy (ared->filename, hdr.ar_name, (size_t) namelen);
ared->filename[namelen] = '\0';
}
@@ -607,10 +601,11 @@ bfd_generic_archive_p (abfd)
{
struct artdata *tdata_hold;
char armag[SARMAG + 1];
+ bfd_size_type amt;
tdata_hold = abfd->tdata.aout_ar_data;
- if (bfd_read ((PTR) armag, 1, SARMAG, abfd) != SARMAG)
+ if (bfd_bread ((PTR) armag, (bfd_size_type) SARMAG, abfd) != SARMAG)
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
@@ -628,8 +623,8 @@ bfd_generic_archive_p (abfd)
/* We are setting bfd_ardata(abfd) here, but since bfd_ardata
involves a cast, we can't do it as the left operand of assignment. */
- abfd->tdata.aout_ar_data = ((struct artdata *)
- bfd_zalloc (abfd, sizeof (struct artdata)));
+ amt = sizeof (struct artdata);
+ abfd->tdata.aout_ar_data = (struct artdata *) bfd_zalloc (abfd, amt);
if (bfd_ardata (abfd) == NULL)
return NULL;
@@ -684,15 +679,19 @@ bfd_generic_archive_p (abfd)
if (bfd_check_format (first, bfd_object)
&& first->xvec != abfd->xvec)
{
+#if 0
+ /* We ought to close `first' here, but we can't, because
+ we have no way to remove it from the archive cache.
+ It's close to impossible to figure out when we can
+ release bfd_ardata. FIXME. */
(void) bfd_close (first);
bfd_release (abfd, bfd_ardata (abfd));
abfd->tdata.aout_ar_data = tdata_hold;
- bfd_set_error (bfd_error_wrong_format);
+#endif
+ bfd_set_error (bfd_error_wrong_object_format);
return NULL;
}
-
- /* We ought to close first here, but we can't, because we
- have no way to remove it from the archive cache. FIXME. */
+ /* And we ought to close `first' here too. */
}
}
@@ -702,7 +701,7 @@ bfd_generic_archive_p (abfd)
/* Some constants for a 32 bit BSD archive structure. We do not
support 64 bit archives presently; so far as I know, none actually
exist. Supporting them would require changing these constants, and
- changing some bfd_h_get_32 to bfd_h_get_64. */
+ changing some H_GET_32 to H_GET_64. */
/* The size of an external symdef structure. */
#define BSD_SYMDEF_SIZE 8
@@ -727,7 +726,7 @@ do_slurp_bsd_armap (abfd)
bfd_byte *raw_armap, *rbase;
struct artdata *ardata = bfd_ardata (abfd);
char *stringbase;
- unsigned int parsed_size;
+ bfd_size_type parsed_size, amt;
carsym *set;
mapdata = (struct areltdata *) _bfd_read_ar_hdr (abfd);
@@ -740,7 +739,7 @@ do_slurp_bsd_armap (abfd)
if (raw_armap == (bfd_byte *) NULL)
return false;
- if (bfd_read ((PTR) raw_armap, 1, parsed_size, abfd) != parsed_size)
+ if (bfd_bread ((PTR) raw_armap, parsed_size, abfd) != parsed_size)
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_malformed_archive);
@@ -749,7 +748,7 @@ do_slurp_bsd_armap (abfd)
return false;
}
- ardata->symdef_count = bfd_h_get_32 (abfd, raw_armap) / BSD_SYMDEF_SIZE;
+ ardata->symdef_count = H_GET_32 (abfd, raw_armap) / BSD_SYMDEF_SIZE;
if (ardata->symdef_count * BSD_SYMDEF_SIZE >
parsed_size - BSD_SYMDEF_COUNT_SIZE)
@@ -764,9 +763,8 @@ do_slurp_bsd_armap (abfd)
stringbase = ((char *) rbase
+ ardata->symdef_count * BSD_SYMDEF_SIZE
+ BSD_STRING_COUNT_SIZE);
- ardata->symdefs = (carsym *) bfd_alloc (abfd,
- (ardata->symdef_count
- * sizeof (carsym)));
+ amt = (bfd_size_type) ardata->symdef_count * sizeof (carsym);
+ ardata->symdefs = (carsym *) bfd_alloc (abfd, amt);
if (!ardata->symdefs)
return false;
@@ -774,8 +772,8 @@ do_slurp_bsd_armap (abfd)
counter < ardata->symdef_count;
counter++, set++, rbase += BSD_SYMDEF_SIZE)
{
- set->name = bfd_h_get_32 (abfd, rbase) + stringbase;
- set->file_offset = bfd_h_get_32 (abfd, rbase + BSD_SYMDEF_OFFSET_SIZE);
+ set->name = H_GET_32 (abfd, rbase) + stringbase;
+ set->file_offset = H_GET_32 (abfd, rbase + BSD_SYMDEF_OFFSET_SIZE);
}
ardata->first_file_filepos = bfd_tell (abfd);
@@ -798,13 +796,14 @@ do_slurp_coff_armap (abfd)
int *raw_armap, *rawptr;
struct artdata *ardata = bfd_ardata (abfd);
char *stringbase;
- unsigned int stringsize;
+ bfd_size_type stringsize;
unsigned int parsed_size;
carsym *carsyms;
- unsigned int nsymz; /* Number of symbols in armap. */
+ bfd_size_type nsymz; /* Number of symbols in armap. */
bfd_vma (*swap) PARAMS ((const bfd_byte *));
char int_buf[sizeof (long)];
- unsigned int carsym_size, ptrsize, i;
+ bfd_size_type carsym_size, ptrsize;
+ unsigned int i;
mapdata = (struct areltdata *) _bfd_read_ar_hdr (abfd);
if (mapdata == NULL)
@@ -812,7 +811,7 @@ do_slurp_coff_armap (abfd)
parsed_size = mapdata->parsed_size;
bfd_release (abfd, (PTR) mapdata); /* Don't need it any more. */
- if (bfd_read ((PTR) int_buf, 1, 4, abfd) != 4)
+ if (bfd_bread ((PTR) int_buf, (bfd_size_type) 4, abfd) != 4)
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_malformed_archive);
@@ -857,8 +856,8 @@ do_slurp_coff_armap (abfd)
raw_armap = (int *) bfd_alloc (abfd, ptrsize);
if (raw_armap == NULL)
goto release_symdefs;
- if (bfd_read ((PTR) raw_armap, 1, ptrsize, abfd) != ptrsize
- || bfd_read ((PTR) stringbase, 1, stringsize, abfd) != stringsize)
+ if (bfd_bread ((PTR) raw_armap, ptrsize, abfd) != ptrsize
+ || (bfd_bread ((PTR) stringbase, stringsize, abfd) != stringsize))
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_malformed_archive);
@@ -888,7 +887,7 @@ do_slurp_coff_armap (abfd)
{
struct areltdata *tmp;
- bfd_seek (abfd, ardata->first_file_filepos, SEEK_SET);
+ bfd_seek (abfd, ardata->first_file_filepos, SEEK_SET);
tmp = (struct areltdata *) _bfd_read_ar_hdr (abfd);
if (tmp != NULL)
{
@@ -896,7 +895,7 @@ do_slurp_coff_armap (abfd)
&& tmp->arch_header[1] == ' ')
{
ardata->first_file_filepos +=
- (tmp->parsed_size + sizeof (struct ar_hdr) + 1) & ~1;
+ (tmp->parsed_size + sizeof (struct ar_hdr) + 1) & ~(unsigned) 1;
}
bfd_release (abfd, tmp);
}
@@ -919,14 +918,14 @@ bfd_slurp_armap (abfd)
bfd *abfd;
{
char nextname[17];
- int i = bfd_read ((PTR) nextname, 1, 16, abfd);
+ int i = bfd_bread ((PTR) nextname, (bfd_size_type) 16, abfd);
if (i == 0)
return true;
if (i != 16)
return false;
- if (bfd_seek (abfd, (file_ptr) - 16, SEEK_CUR) != 0)
+ if (bfd_seek (abfd, (file_ptr) -16, SEEK_CUR) != 0)
return false;
if (!strncmp (nextname, "__.SYMDEF ", 16)
@@ -936,9 +935,13 @@ bfd_slurp_armap (abfd)
return do_slurp_coff_armap (abfd);
else if (!strncmp (nextname, "/SYM64/ ", 16))
{
- /* Irix 6 archive--must be recognized by code in elf64-mips.c. */
+ /* 64bit ELF (Irix 6) archive. */
+#ifdef BFD64
+ return bfd_elf64_archive_slurp_armap (abfd);
+#else
bfd_set_error (bfd_error_wrong_format);
return false;
+#endif
}
bfd_has_map (abfd) = false;
@@ -963,8 +966,9 @@ bfd_slurp_bsd_armap_f2 (abfd)
struct artdata *ardata = bfd_ardata (abfd);
char *stringbase;
unsigned int stringsize;
+ bfd_size_type amt;
carsym *set;
- int i = bfd_read ((PTR) nextname, 1, 16, abfd);
+ int i = bfd_bread ((PTR) nextname, (bfd_size_type) 16, abfd);
if (i == 0)
return true;
@@ -972,7 +976,7 @@ bfd_slurp_bsd_armap_f2 (abfd)
return false;
/* The archive has at least 16 bytes in it. */
- if (bfd_seek (abfd, -16L, SEEK_CUR) != 0)
+ if (bfd_seek (abfd, (file_ptr) -16, SEEK_CUR) != 0)
return false;
if (!strncmp (nextname, "__.SYMDEF ", 16)
@@ -989,7 +993,8 @@ bfd_slurp_bsd_armap_f2 (abfd)
if (mapdata == NULL)
return false;
- raw_armap = (bfd_byte *) bfd_zalloc (abfd, mapdata->parsed_size);
+ amt = mapdata->parsed_size;
+ raw_armap = (bfd_byte *) bfd_zalloc (abfd, amt);
if (raw_armap == NULL)
{
byebye:
@@ -997,8 +1002,7 @@ bfd_slurp_bsd_armap_f2 (abfd)
return false;
}
- if (bfd_read ((PTR) raw_armap, 1, mapdata->parsed_size, abfd) !=
- mapdata->parsed_size)
+ if (bfd_bread ((PTR) raw_armap, amt, abfd) != amt)
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_malformed_archive);
@@ -1007,7 +1011,7 @@ bfd_slurp_bsd_armap_f2 (abfd)
goto byebye;
}
- ardata->symdef_count = bfd_h_get_16 (abfd, (PTR) raw_armap);
+ ardata->symdef_count = H_GET_16 (abfd, (PTR) raw_armap);
if (ardata->symdef_count * BSD_SYMDEF_SIZE
> mapdata->parsed_size - HPUX_SYMDEF_COUNT_SIZE)
@@ -1019,15 +1023,14 @@ bfd_slurp_bsd_armap_f2 (abfd)
ardata->cache = 0;
- stringsize = bfd_h_get_32 (abfd, raw_armap + HPUX_SYMDEF_COUNT_SIZE);
+ stringsize = H_GET_32 (abfd, raw_armap + HPUX_SYMDEF_COUNT_SIZE);
/* Skip sym count and string sz. */
stringbase = ((char *) raw_armap
+ HPUX_SYMDEF_COUNT_SIZE
+ BSD_STRING_COUNT_SIZE);
rbase = (bfd_byte *) stringbase + stringsize;
- ardata->symdefs = (carsym *) bfd_alloc (abfd,
- (ardata->symdef_count
- * BSD_SYMDEF_SIZE));
+ amt = (bfd_size_type) ardata->symdef_count * BSD_SYMDEF_SIZE;
+ ardata->symdefs = (carsym *) bfd_alloc (abfd, amt);
if (!ardata->symdefs)
return false;
@@ -1035,8 +1038,8 @@ bfd_slurp_bsd_armap_f2 (abfd)
counter < ardata->symdef_count;
counter++, set++, rbase += BSD_SYMDEF_SIZE)
{
- set->name = bfd_h_get_32 (abfd, rbase) + stringbase;
- set->file_offset = bfd_h_get_32 (abfd, rbase + BSD_SYMDEF_OFFSET_SIZE);
+ set->name = H_GET_32 (abfd, rbase) + stringbase;
+ set->file_offset = H_GET_32 (abfd, rbase + BSD_SYMDEF_OFFSET_SIZE);
}
ardata->first_file_filepos = bfd_tell (abfd);
@@ -1067,13 +1070,14 @@ _bfd_slurp_extended_name_table (abfd)
{
char nextname[17];
struct areltdata *namedata;
+ bfd_size_type amt;
/* FIXME: Formatting sucks here, and in case of failure of BFD_READ,
we probably don't want to return true. */
bfd_seek (abfd, bfd_ardata (abfd)->first_file_filepos, SEEK_SET);
- if (bfd_read ((PTR) nextname, 1, 16, abfd) == 16)
+ if (bfd_bread ((PTR) nextname, (bfd_size_type) 16, abfd) == 16)
{
- if (bfd_seek (abfd, (file_ptr) - 16, SEEK_CUR) != 0)
+ if (bfd_seek (abfd, (file_ptr) -16, SEEK_CUR) != 0)
return false;
if (strncmp (nextname, "ARFILENAMES/ ", 16) != 0 &&
@@ -1087,8 +1091,8 @@ _bfd_slurp_extended_name_table (abfd)
if (namedata == NULL)
return false;
- bfd_ardata (abfd)->extended_names =
- bfd_zalloc (abfd, namedata->parsed_size);
+ amt = namedata->parsed_size;
+ bfd_ardata (abfd)->extended_names = bfd_zalloc (abfd, amt);
if (bfd_ardata (abfd)->extended_names == NULL)
{
byebye:
@@ -1096,8 +1100,7 @@ _bfd_slurp_extended_name_table (abfd)
return false;
}
- if (bfd_read ((PTR) bfd_ardata (abfd)->extended_names, 1,
- namedata->parsed_size, abfd) != namedata->parsed_size)
+ if (bfd_bread ((PTR) bfd_ardata (abfd)->extended_names, amt, abfd) != amt)
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_malformed_archive);
@@ -1147,8 +1150,8 @@ normalize (abfd, file)
bfd *abfd;
const char *file;
{
- CONST char *first;
- CONST char *last;
+ const char *first;
+ const char *last;
char *copy;
first = file + strlen (file) - 1;
@@ -1166,7 +1169,7 @@ normalize (abfd, file)
first--;
}
- copy = (char *) bfd_alloc (abfd, last - first + 1);
+ copy = (char *) bfd_alloc (abfd, (bfd_size_type) (last - first + 1));
if (copy == NULL)
return NULL;
@@ -1244,7 +1247,7 @@ _bfd_construct_extended_name_table (abfd, trailing_slash, tabloc, tablen)
bfd_size_type *tablen;
{
unsigned int maxname = abfd->xvec->ar_max_namelen;
- unsigned int total_namelen = 0;
+ bfd_size_type total_namelen = 0;
bfd *current;
char *strptr;
@@ -1392,6 +1395,7 @@ bfd_ar_hdr_from_filesystem (abfd, filename, member)
struct areltdata *ared;
struct ar_hdr *hdr;
char *temp, *temp1;
+ bfd_size_type amt;
if (member && (member->flags & BFD_IN_MEMORY) != 0)
{
@@ -1409,8 +1413,8 @@ bfd_ar_hdr_from_filesystem (abfd, filename, member)
return NULL;
}
- ared = (struct areltdata *) bfd_zalloc (abfd, sizeof (struct ar_hdr) +
- sizeof (struct areltdata));
+ amt = sizeof (struct ar_hdr) + sizeof (struct areltdata);
+ ared = (struct areltdata *) bfd_zalloc (abfd, amt);
if (ared == NULL)
return NULL;
hdr = (struct ar_hdr *) (((char *) ared) + sizeof (struct areltdata));
@@ -1537,7 +1541,7 @@ bfd_generic_stat_arch_elt (abfd, buf)
void
bfd_dont_truncate_arname (abfd, pathname, arhdr)
bfd *abfd;
- CONST char *pathname;
+ const char *pathname;
char *arhdr;
{
/* FIXME: This interacts unpleasantly with ar's quick-append option.
@@ -1577,13 +1581,13 @@ bfd_dont_truncate_arname (abfd, pathname, arhdr)
void
bfd_bsd_truncate_arname (abfd, pathname, arhdr)
bfd *abfd;
- CONST char *pathname;
+ const char *pathname;
char *arhdr;
{
struct ar_hdr *hdr = (struct ar_hdr *) arhdr;
- int length;
- CONST char *filename = strrchr (pathname, '/');
- int maxlen = ar_maxnamelen (abfd);
+ size_t length;
+ const char *filename = strrchr (pathname, '/');
+ size_t maxlen = ar_maxnamelen (abfd);
#ifdef HAVE_DOS_BASED_FILE_SYSTEM
{
@@ -1628,13 +1632,13 @@ bfd_bsd_truncate_arname (abfd, pathname, arhdr)
void
bfd_gnu_truncate_arname (abfd, pathname, arhdr)
bfd *abfd;
- CONST char *pathname;
+ const char *pathname;
char *arhdr;
{
struct ar_hdr *hdr = (struct ar_hdr *) arhdr;
- int length;
- CONST char *filename = strrchr (pathname, '/');
- int maxlen = ar_maxnamelen (abfd);
+ size_t length;
+ const char *filename = strrchr (pathname, '/');
+ size_t maxlen = ar_maxnamelen (abfd);
#ifdef HAVE_DOS_BASED_FILE_SYSTEM
{
@@ -1733,16 +1737,16 @@ _bfd_write_archive_contents (arch)
if (bfd_seek (arch, (file_ptr) 0, SEEK_SET) != 0)
return false;
#ifdef GNU960
- wrote = bfd_write (BFD_GNU960_ARMAG (arch), 1, SARMAG, arch);
+ wrote = bfd_bwrite (BFD_GNU960_ARMAG (arch), (bfd_size_type) SARMAG, arch);
#else
- wrote = bfd_write (ARMAG, 1, SARMAG, arch);
+ wrote = bfd_bwrite (ARMAG, (bfd_size_type) SARMAG, arch);
#endif
if (wrote != SARMAG)
return false;
if (makemap && hasobjects)
{
- if (_bfd_compute_and_write_armap (arch, elength) != true)
+ if (_bfd_compute_and_write_armap (arch, (unsigned int) elength) != true)
return false;
}
@@ -1754,18 +1758,18 @@ _bfd_write_archive_contents (arch)
strcpy (hdr.ar_name, ename);
/* Round size up to even number in archive header. */
sprintf (&(hdr.ar_size[0]), "%-10d",
- (int) ((elength + 1) & ~1));
+ (int) ((elength + 1) & ~(bfd_size_type) 1));
strncpy (hdr.ar_fmag, ARFMAG, 2);
for (i = 0; i < sizeof (struct ar_hdr); i++)
if (((char *) (&hdr))[i] == '\0')
(((char *) (&hdr))[i]) = ' ';
- if ((bfd_write ((char *) &hdr, 1, sizeof (struct ar_hdr), arch)
+ if ((bfd_bwrite ((PTR) &hdr, (bfd_size_type) sizeof (struct ar_hdr), arch)
!= sizeof (struct ar_hdr))
- || bfd_write (etable, 1, elength, arch) != elength)
+ || bfd_bwrite (etable, elength, arch) != elength)
return false;
if ((elength % 2) == 1)
{
- if (bfd_write ("\012", 1, 1, arch) != 1)
+ if (bfd_bwrite ("\012", (bfd_size_type) 1, arch) != 1)
return false;
}
}
@@ -1777,7 +1781,8 @@ _bfd_write_archive_contents (arch)
struct ar_hdr *hdr = arch_hdr (current);
/* Write ar header. */
- if (bfd_write ((char *) hdr, 1, sizeof (*hdr), arch) != sizeof (*hdr))
+ if (bfd_bwrite ((PTR) hdr, (bfd_size_type) sizeof (*hdr), arch)
+ != sizeof (*hdr))
return false;
if (bfd_seek (current, (file_ptr) 0, SEEK_SET) != 0)
return false;
@@ -1787,19 +1792,19 @@ _bfd_write_archive_contents (arch)
if (amt > remaining)
amt = remaining;
errno = 0;
- if (bfd_read (buffer, amt, 1, current) != amt)
+ if (bfd_bread (buffer, (bfd_size_type) amt, current) != amt)
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_malformed_archive);
return false;
}
- if (bfd_write (buffer, amt, 1, arch) != amt)
+ if (bfd_bwrite (buffer, (bfd_size_type) amt, arch) != amt)
return false;
remaining -= amt;
}
if ((arelt_size (current) % 2) == 1)
{
- if (bfd_write ("\012", 1, 1, arch) != 1)
+ if (bfd_bwrite ("\012", (bfd_size_type) 1, arch) != 1)
return false;
}
}
@@ -1837,25 +1842,27 @@ _bfd_compute_and_write_armap (arch, elength)
bfd *current;
file_ptr elt_no = 0;
struct orl *map = NULL;
- int orl_max = 1024; /* fine initial default */
- int orl_count = 0;
+ unsigned int orl_max = 1024; /* fine initial default */
+ unsigned int orl_count = 0;
int stridx = 0; /* string index */
asymbol **syms = NULL;
long syms_max = 0;
boolean ret;
+ bfd_size_type amt;
/* Dunno if this is the best place for this info... */
if (elength != 0)
elength += sizeof (struct ar_hdr);
elength += elength % 2;
- map = (struct orl *) bfd_malloc (orl_max * sizeof (struct orl));
+ amt = (bfd_size_type) orl_max * sizeof (struct orl);
+ map = (struct orl *) bfd_malloc (amt);
if (map == NULL)
goto error_return;
/* We put the symbol names on the arch objalloc, and then discard
them when done. */
- first_name = bfd_alloc (arch, 1);
+ first_name = bfd_alloc (arch, (bfd_size_type) 1);
if (first_name == NULL)
goto error_return;
@@ -1887,7 +1894,7 @@ _bfd_compute_and_write_armap (arch, elength)
if (syms_max > 0)
free (syms);
syms_max = storage;
- syms = (asymbol **) bfd_malloc ((size_t) syms_max);
+ syms = (asymbol **) bfd_malloc ((bfd_size_type) syms_max);
if (syms == NULL)
goto error_return;
}
@@ -1908,16 +1915,15 @@ _bfd_compute_and_write_armap (arch, elength)
bfd_is_com_section (sec))
&& ! bfd_is_und_section (sec))
{
- size_t namelen;
+ bfd_size_type namelen;
struct orl *new_map;
/* This symbol will go into the archive header. */
if (orl_count == orl_max)
{
orl_max *= 2;
- new_map =
- ((struct orl *)
- bfd_realloc (map, orl_max * sizeof (struct orl)));
+ amt = (bfd_size_type) orl_max * sizeof (struct orl);
+ new_map = (struct orl *) bfd_realloc (map, amt);
if (new_map == (struct orl *) NULL)
goto error_return;
@@ -1925,17 +1931,16 @@ _bfd_compute_and_write_armap (arch, elength)
}
namelen = strlen (syms[src_count]->name);
- map[orl_count].name = ((char **)
- bfd_alloc (arch,
- sizeof (char *)));
+ amt = sizeof (char *);
+ map[orl_count].name = (char **) bfd_alloc (arch, amt);
if (map[orl_count].name == NULL)
goto error_return;
*(map[orl_count].name) = bfd_alloc (arch, namelen + 1);
if (*(map[orl_count].name) == NULL)
goto error_return;
strcpy (*(map[orl_count].name), syms[src_count]->name);
- (map[orl_count]).pos = (file_ptr) current;
- (map[orl_count]).namidx = stridx;
+ map[orl_count].u.abfd = current;
+ map[orl_count].namidx = stridx;
stridx += namelen + 1;
++orl_count;
@@ -2013,18 +2018,18 @@ bsd_write_armap (arch, elength, map, orl_count, stridx)
for (i = 0; i < sizeof (struct ar_hdr); i++)
if (((char *) (&hdr))[i] == '\0')
(((char *) (&hdr))[i]) = ' ';
- if (bfd_write ((char *) &hdr, 1, sizeof (struct ar_hdr), arch)
+ if (bfd_bwrite ((PTR) &hdr, (bfd_size_type) sizeof (struct ar_hdr), arch)
!= sizeof (struct ar_hdr))
return false;
- bfd_h_put_32 (arch, (bfd_vma) ranlibsize, temp);
- if (bfd_write (temp, 1, sizeof (temp), arch) != sizeof (temp))
+ H_PUT_32 (arch, ranlibsize, temp);
+ if (bfd_bwrite (temp, (bfd_size_type) sizeof (temp), arch) != sizeof (temp))
return false;
for (count = 0; count < orl_count; count++)
{
bfd_byte buf[BSD_SYMDEF_SIZE];
- if (((bfd *) (map[count]).pos) != last_elt)
+ if (map[count].u.abfd != last_elt)
{
do
{
@@ -2032,25 +2037,26 @@ bsd_write_armap (arch, elength, map, orl_count, stridx)
firstreal += firstreal % 2;
current = current->next;
}
- while (current != (bfd *) (map[count]).pos);
+ while (current != map[count].u.abfd);
} /* if new archive element */
last_elt = current;
- bfd_h_put_32 (arch, map[count].namidx, buf);
- bfd_h_put_32 (arch, firstreal, buf + BSD_SYMDEF_OFFSET_SIZE);
- if (bfd_write (buf, BSD_SYMDEF_SIZE, 1, arch) != BSD_SYMDEF_SIZE)
+ H_PUT_32 (arch, map[count].namidx, buf);
+ H_PUT_32 (arch, firstreal, buf + BSD_SYMDEF_OFFSET_SIZE);
+ if (bfd_bwrite (buf, (bfd_size_type) BSD_SYMDEF_SIZE, arch)
+ != BSD_SYMDEF_SIZE)
return false;
}
/* Now write the strings themselves. */
- bfd_h_put_32 (arch, stringsize, temp);
- if (bfd_write (temp, 1, sizeof (temp), arch) != sizeof (temp))
+ H_PUT_32 (arch, stringsize, temp);
+ if (bfd_bwrite (temp, (bfd_size_type) sizeof (temp), arch) != sizeof (temp))
return false;
for (count = 0; count < orl_count; count++)
{
size_t len = strlen (*map[count].name) + 1;
- if (bfd_write (*map[count].name, 1, len, arch) != len)
+ if (bfd_bwrite (*map[count].name, (bfd_size_type) len, arch) != len)
return false;
}
@@ -2058,7 +2064,7 @@ bsd_write_armap (arch, elength, map, orl_count, stridx)
bug-compatible for sun's ar we use a null. */
if (padit)
{
- if (bfd_write ("", 1, 1, arch) != 1)
+ if (bfd_bwrite ("", (bfd_size_type) 1, arch) != 1)
return false;
}
@@ -2107,7 +2113,7 @@ _bfd_archive_bsd_update_armap_timestamp (arch)
bfd_ardata (arch)->armap_datepos = (SARMAG
+ offsetof (struct ar_hdr, ar_date[0]));
if (bfd_seek (arch, bfd_ardata (arch)->armap_datepos, SEEK_SET) != 0
- || (bfd_write (hdr.ar_date, sizeof (hdr.ar_date), 1, arch)
+ || (bfd_bwrite (hdr.ar_date, (bfd_size_type) sizeof (hdr.ar_date), arch)
!= sizeof (hdr.ar_date)))
{
/* FIXME: bfd can't call perror. */
@@ -2144,11 +2150,11 @@ coff_write_armap (arch, elength, map, symbol_count, stridx)
int stridx;
{
/* The size of the ranlib is the number of exported symbols in the
- archive * the number of bytes in a int, + an int for the count. */
+ archive * the number of bytes in an int, + an int for the count. */
unsigned int ranlibsize = (symbol_count * 4) + 4;
unsigned int stringsize = stridx;
unsigned int mapsize = stringsize + ranlibsize;
- file_ptr archive_member_file_ptr;
+ unsigned int archive_member_file_ptr;
bfd *current = arch->archive_head;
unsigned int count;
struct ar_hdr hdr;
@@ -2180,7 +2186,7 @@ coff_write_armap (arch, elength, map, symbol_count, stridx)
/* Write the ar header for this item and the number of symbols. */
- if (bfd_write ((PTR) &hdr, 1, sizeof (struct ar_hdr), arch)
+ if (bfd_bwrite ((PTR) &hdr, (bfd_size_type) sizeof (struct ar_hdr), arch)
!= sizeof (struct ar_hdr))
return false;
@@ -2199,7 +2205,7 @@ coff_write_armap (arch, elength, map, symbol_count, stridx)
/* For each symbol which is used defined in this object, write
out the object file's address in the archive. */
- while (count < symbol_count && ((bfd *) (map[count]).pos) == current)
+ while (count < symbol_count && map[count].u.abfd == current)
{
bfd_write_bigendian_4byte_int (arch, archive_member_file_ptr);
count++;
@@ -2217,7 +2223,7 @@ coff_write_armap (arch, elength, map, symbol_count, stridx)
{
size_t len = strlen (*map[count].name) + 1;
- if (bfd_write (*map[count].name, 1, len, arch) != len)
+ if (bfd_bwrite (*map[count].name, (bfd_size_type) len, arch) != len)
return false;
}
@@ -2225,7 +2231,7 @@ coff_write_armap (arch, elength, map, symbol_count, stridx)
bug-compatible for arc960 we use a null. */
if (padit)
{
- if (bfd_write ("", 1, 1, arch) != 1)
+ if (bfd_bwrite ("", (bfd_size_type) 1, arch) != 1)
return false;
}
diff --git a/contrib/binutils/bfd/archive64.c b/contrib/binutils/bfd/archive64.c
new file mode 100644
index 0000000..ea94c6a
--- /dev/null
+++ b/contrib/binutils/bfd/archive64.c
@@ -0,0 +1,245 @@
+/* MIPS-specific support for 64-bit ELF
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001
+ 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.
+
+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 supports the 64-bit (MIPS) ELF archives. */
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "libbfd.h"
+#include "aout/ar.h"
+
+/* Irix 6 defines a 64bit archive map format, so that they can
+ have archives more than 4 GB in size. */
+
+boolean bfd_elf64_archive_slurp_armap PARAMS ((bfd *));
+boolean bfd_elf64_archive_write_armap
+ PARAMS ((bfd *, unsigned int, struct orl *, unsigned int, int));
+
+/* Read an Irix 6 armap. */
+
+boolean
+bfd_elf64_archive_slurp_armap (abfd)
+ bfd *abfd;
+{
+ struct artdata *ardata = bfd_ardata (abfd);
+ char nextname[17];
+ file_ptr arhdrpos;
+ bfd_size_type i, parsed_size, nsymz, stringsize, carsym_size, ptrsize;
+ struct areltdata *mapdata;
+ bfd_byte int_buf[8];
+ char *stringbase;
+ bfd_byte *raw_armap = NULL;
+ carsym *carsyms;
+ bfd_size_type amt;
+
+ ardata->symdefs = NULL;
+
+ /* Get the name of the first element. */
+ arhdrpos = bfd_tell (abfd);
+ i = bfd_bread ((PTR) nextname, (bfd_size_type) 16, abfd);
+ if (i == 0)
+ return true;
+ if (i != 16)
+ return false;
+
+ if (bfd_seek (abfd, (file_ptr) - 16, SEEK_CUR) != 0)
+ return false;
+
+ /* Archives with traditional armaps are still permitted. */
+ if (strncmp (nextname, "/ ", 16) == 0)
+ return bfd_slurp_armap (abfd);
+
+ if (strncmp (nextname, "/SYM64/ ", 16) != 0)
+ {
+ bfd_has_map (abfd) = false;
+ return true;
+ }
+
+ mapdata = (struct areltdata *) _bfd_read_ar_hdr (abfd);
+ if (mapdata == NULL)
+ return false;
+ parsed_size = mapdata->parsed_size;
+ bfd_release (abfd, (PTR) mapdata);
+
+ if (bfd_bread (int_buf, (bfd_size_type) 8, abfd) != 8)
+ {
+ if (bfd_get_error () != bfd_error_system_call)
+ bfd_set_error (bfd_error_malformed_archive);
+ return false;
+ }
+
+ nsymz = bfd_getb64 (int_buf);
+ stringsize = parsed_size - 8 * nsymz - 8;
+
+ carsym_size = nsymz * sizeof (carsym);
+ ptrsize = 8 * nsymz;
+
+ amt = carsym_size + stringsize + 1;
+ ardata->symdefs = (carsym *) bfd_zalloc (abfd, amt);
+ if (ardata->symdefs == NULL)
+ return false;
+ carsyms = ardata->symdefs;
+ stringbase = ((char *) ardata->symdefs) + carsym_size;
+
+ raw_armap = (bfd_byte *) bfd_alloc (abfd, ptrsize);
+ if (raw_armap == NULL)
+ goto release_symdefs;
+
+ if (bfd_bread (raw_armap, ptrsize, abfd) != ptrsize
+ || bfd_bread (stringbase, stringsize, abfd) != stringsize)
+ {
+ if (bfd_get_error () != bfd_error_system_call)
+ bfd_set_error (bfd_error_malformed_archive);
+ goto release_raw_armap;
+ }
+
+ for (i = 0; i < nsymz; i++)
+ {
+ carsyms->file_offset = bfd_getb64 (raw_armap + i * 8);
+ carsyms->name = stringbase;
+ stringbase += strlen (stringbase) + 1;
+ ++carsyms;
+ }
+ *stringbase = '\0';
+
+ ardata->symdef_count = nsymz;
+ ardata->first_file_filepos = bfd_tell (abfd);
+ /* Pad to an even boundary if you have to. */
+ ardata->first_file_filepos += (ardata->first_file_filepos) % 2;
+
+ bfd_has_map (abfd) = true;
+ bfd_release (abfd, raw_armap);
+
+ return true;
+
+release_raw_armap:
+ bfd_release (abfd, raw_armap);
+release_symdefs:
+ bfd_release (abfd, ardata->symdefs);
+ return false;
+}
+
+/* Write out an Irix 6 armap. The Irix 6 tools are supposed to be
+ able to handle ordinary ELF armaps, but at least on Irix 6.2 the
+ linker crashes. */
+
+boolean
+bfd_elf64_archive_write_armap (arch, elength, map, symbol_count, stridx)
+ bfd *arch;
+ unsigned int elength;
+ struct orl *map;
+ unsigned int symbol_count;
+ int stridx;
+{
+ unsigned int ranlibsize = (symbol_count * 8) + 8;
+ unsigned int stringsize = stridx;
+ unsigned int mapsize = stringsize + ranlibsize;
+ file_ptr archive_member_file_ptr;
+ bfd *current = arch->archive_head;
+ unsigned int count;
+ struct ar_hdr hdr;
+ unsigned int i;
+ int padding;
+ bfd_byte buf[8];
+
+ padding = BFD_ALIGN (mapsize, 8) - mapsize;
+ mapsize += padding;
+
+ /* work out where the first object file will go in the archive */
+ archive_member_file_ptr = (mapsize
+ + elength
+ + sizeof (struct ar_hdr)
+ + SARMAG);
+
+ memset ((char *) (&hdr), 0, sizeof (struct ar_hdr));
+ strcpy (hdr.ar_name, "/SYM64/");
+ sprintf (hdr.ar_size, "%-10d", (int) mapsize);
+ sprintf (hdr.ar_date, "%ld", (long) time (NULL));
+ /* This, at least, is what Intel coff sets the values to.: */
+ sprintf ((hdr.ar_uid), "%d", 0);
+ sprintf ((hdr.ar_gid), "%d", 0);
+ sprintf ((hdr.ar_mode), "%-7o", (unsigned) 0);
+ strncpy (hdr.ar_fmag, ARFMAG, 2);
+
+ for (i = 0; i < sizeof (struct ar_hdr); i++)
+ if (((char *) (&hdr))[i] == '\0')
+ (((char *) (&hdr))[i]) = ' ';
+
+ /* Write the ar header for this item and the number of symbols */
+
+ if (bfd_bwrite ((PTR) &hdr, (bfd_size_type) sizeof (struct ar_hdr), arch)
+ != sizeof (struct ar_hdr))
+ return false;
+
+ bfd_putb64 ((bfd_vma) symbol_count, buf);
+ if (bfd_bwrite (buf, (bfd_size_type) 8, arch) != 8)
+ return false;
+
+ /* Two passes, first write the file offsets for each symbol -
+ remembering that each offset is on a two byte boundary. */
+
+ /* Write out the file offset for the file associated with each
+ symbol, and remember to keep the offsets padded out. */
+
+ current = arch->archive_head;
+ count = 0;
+ while (current != (bfd *) NULL && count < symbol_count)
+ {
+ /* For each symbol which is used defined in this object, write out
+ the object file's address in the archive */
+
+ while (map[count].u.abfd == current)
+ {
+ bfd_putb64 ((bfd_vma) archive_member_file_ptr, buf);
+ if (bfd_bwrite (buf, (bfd_size_type) 8, arch) != 8)
+ return false;
+ count++;
+ }
+ /* Add size of this archive entry */
+ archive_member_file_ptr += (arelt_size (current)
+ + sizeof (struct ar_hdr));
+ /* remember about the even alignment */
+ archive_member_file_ptr += archive_member_file_ptr % 2;
+ current = current->next;
+ }
+
+ /* now write the strings themselves */
+ for (count = 0; count < symbol_count; count++)
+ {
+ size_t len = strlen (*map[count].name) + 1;
+
+ if (bfd_bwrite (*map[count].name, (bfd_size_type) len, arch) != len)
+ return false;
+ }
+
+ /* The spec says that this should be padded to an 8 byte boundary.
+ However, the Irix 6.2 tools do not appear to do this. */
+ while (padding != 0)
+ {
+ if (bfd_bwrite ("", (bfd_size_type) 1, arch) != 1)
+ return false;
+ --padding;
+ }
+
+ return true;
+}
diff --git a/contrib/binutils/bfd/archures.c b/contrib/binutils/bfd/archures.c
index 8f7f9de..19d862e 100644
--- a/contrib/binutils/bfd/archures.c
+++ b/contrib/binutils/bfd/archures.c
@@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfd.h"
#include "sysdep.h"
#include "libbfd.h"
-#include <ctype.h>
+#include "safe-ctype.h"
/*
@@ -137,11 +137,10 @@ DESCRIPTION
.#define bfd_mach_mips10000 10000
.#define bfd_mach_mips12000 12000
.#define bfd_mach_mips16 16
-.#define bfd_mach_mips32 32
-.#define bfd_mach_mips32_4k 3204113 {* 32, 04, octal 'K' *}
.#define bfd_mach_mips5 5
-.#define bfd_mach_mips64 64
.#define bfd_mach_mips_sb1 12310201 {* octal 'SB', 01 *}
+.#define bfd_mach_mipsisa32 32
+.#define bfd_mach_mipsisa64 64
. bfd_arch_i386, {* Intel 386 *}
.#define bfd_mach_i386_i386 0
.#define bfd_mach_i386_i8086 1
@@ -161,6 +160,7 @@ DESCRIPTION
.#define bfd_mach_h8300 1
.#define bfd_mach_h8300h 2
.#define bfd_mach_h8300s 3
+. bfd_arch_pdp11, {* DEC PDP-11 *}
. bfd_arch_powerpc, {* PowerPC *}
.#define bfd_mach_ppc 0
.#define bfd_mach_ppc_403 403
@@ -254,6 +254,13 @@ DESCRIPTION
.#define bfd_mach_avr4 4
.#define bfd_mach_avr5 5
. bfd_arch_cris, {* Axis CRIS *}
+. bfd_arch_s390, {* IBM s390 *}
+.#define bfd_mach_s390_esa 0
+.#define bfd_mach_s390_esame 1
+. bfd_arch_openrisc, {* OpenRISC *}
+. bfd_arch_mmix, {* Donald Knuth's educational processor *}
+. bfd_arch_xstormy16,
+.#define bfd_mach_xstormy16 0
. bfd_arch_last
. };
*/
@@ -311,6 +318,7 @@ extern const bfd_arch_info_type bfd_m88k_arch;
extern const bfd_arch_info_type bfd_mips_arch;
extern const bfd_arch_info_type bfd_mn10200_arch;
extern const bfd_arch_info_type bfd_mn10300_arch;
+extern const bfd_arch_info_type bfd_pdp11_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;
@@ -329,6 +337,10 @@ extern const bfd_arch_info_type bfd_fr30_arch;
extern const bfd_arch_info_type bfd_mcore_arch;
extern const bfd_arch_info_type bfd_avr_arch;
extern const bfd_arch_info_type bfd_ia64_arch;
+extern const bfd_arch_info_type bfd_s390_arch;
+extern const bfd_arch_info_type bfd_openrisc_arch;
+extern const bfd_arch_info_type bfd_mmix_arch;
+extern const bfd_arch_info_type bfd_xstormy16_arch;
static const bfd_arch_info_type * const bfd_archures_list[] = {
#ifdef SELECT_ARCHITECTURES
@@ -356,6 +368,7 @@ static const bfd_arch_info_type * const bfd_archures_list[] = {
&bfd_mips_arch,
&bfd_mn10200_arch,
&bfd_mn10300_arch,
+ &bfd_pdp11_arch,
&bfd_powerpc_arch,
&bfd_rs6000_arch,
&bfd_sh_arch,
@@ -373,6 +386,10 @@ static const bfd_arch_info_type * const bfd_archures_list[] = {
&bfd_mcore_arch,
&bfd_avr_arch,
&bfd_ia64_arch,
+ &bfd_s390_arch,
+ &bfd_openrisc_arch,
+ &bfd_mmix_arch,
+ &bfd_xstormy16_arch,
#endif
0
};
@@ -448,6 +465,7 @@ bfd_arch_list ()
const char **name_ptr;
const char **name_list;
const bfd_arch_info_type * const *app;
+ bfd_size_type amt;
/* Determine the number of architectures. */
vec_length = 0;
@@ -460,8 +478,8 @@ bfd_arch_list ()
}
}
- name_list = (const char **)
- bfd_malloc ((vec_length + 1) * sizeof (char **));
+ amt = (vec_length + 1) * sizeof (char **);
+ name_list = (const char **) bfd_malloc (amt);
if (name_list == NULL)
return NULL;
@@ -717,7 +735,7 @@ DESCRIPTION
boolean
bfd_default_scan (info, string)
- const struct bfd_arch_info *info;
+ const bfd_arch_info_type *info;
const char *string;
{
const char *ptr_src;
@@ -741,7 +759,7 @@ bfd_default_scan (info, string)
printable_name_colon = strchr (info->printable_name, ':');
if (printable_name_colon == NULL)
{
- int strlen_arch_name = strlen (info->arch_name);
+ size_t strlen_arch_name = strlen (info->arch_name);
if (strncasecmp (string, info->arch_name, strlen_arch_name) == 0)
{
if (string[strlen_arch_name] == ':')
@@ -763,7 +781,7 @@ bfd_default_scan (info, string)
Attempt to match: <arch> <mach>? */
if (printable_name_colon != NULL)
{
- int colon_index = printable_name_colon - info->printable_name;
+ size_t colon_index = printable_name_colon - info->printable_name;
if (strncasecmp (string, info->printable_name, colon_index) == 0
&& strcasecmp (string + colon_index,
info->printable_name + colon_index + 1) == 0)
@@ -802,7 +820,7 @@ bfd_default_scan (info, string)
}
number = 0;
- while (isdigit ((unsigned char) *ptr_src))
+ while (ISDIGIT (*ptr_src))
{
number = number * 10 + *ptr_src - '0';
ptr_src++;
diff --git a/contrib/binutils/bfd/armnetbsd.c b/contrib/binutils/bfd/armnetbsd.c
index aa6a882..e899adb 100644
--- a/contrib/binutils/bfd/armnetbsd.c
+++ b/contrib/binutils/bfd/armnetbsd.c
@@ -1,5 +1,5 @@
/* BFD back-end for NetBSD/ARM a.out-ish binaries.
- Copyright 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -27,12 +27,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define DEFAULT_MID M_ARM6_NETBSD
/*#define MACHTYPE_OK(mtype) ((mtype) == M_ARM6_NETBSD)*/
-#define MY(OP) CAT (armnetbsd_, OP)
+/* Do not "beautify" the CONCAT* macro args. Traditional C will not
+ remove whitespace added here, and thus will fail to concatenate
+ the tokens. */
+#define MY(OP) CONCAT2 (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 NAME(x,y) CONCAT3 (aoutarm,_32_,y)
#define aoutarm_32_get_section_contents aout_32_get_section_contents
diff --git a/contrib/binutils/bfd/bfd-in.h b/contrib/binutils/bfd/bfd-in.h
index 62ce58b..c6f2b41 100644
--- a/contrib/binutils/bfd/bfd-in.h
+++ b/contrib/binutils/bfd/bfd-in.h
@@ -4,10 +4,6 @@
Free Software Foundation, Inc.
Contributed by Cygnus Support.
-** NOTE: bfd.h and bfd-in2.h are GENERATED files. Don't change them;
-** instead, change bfd-in.h or the other BFD source files processed to
-** generate these files.
-
This file is part of BFD, the Binary File Descriptor library.
This program is free software; you can redistribute it and/or modify
@@ -24,25 +20,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. */
-/* bfd.h -- The only header file required by users of the bfd library
-
-The bfd.h file is generated from bfd-in.h and various .c files; if you
-change it, your changes will probably be lost.
-
-All the prototypes and definitions following the comment "THE FOLLOWING
-IS EXTRACTED FROM THE SOURCE" are extracted from the source files for
-BFD. If you change it, someone oneday will extract it from the source
-again, and your changes will be lost. To save yourself from this bind,
-change the definitions in the source in the bfd directory. Type "make
-docs" and then "make headers" in that directory, and magically this file
-will change to reflect your changes.
-
-If you don't have the tools to perform the extraction, then you are
-safe from someone on your system trampling over your header files.
-You should still maintain the equivalence between the source and this
-file though; every change you make to the .c file should be reflected
-here. */
-
#ifndef __BFD_H_SEEN__
#define __BFD_H_SEEN__
@@ -51,10 +28,31 @@ extern "C" {
#endif
#include "ansidecl.h"
+#include "symcat.h"
+#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
+#ifndef SABER
+/* This hack is to avoid a problem with some strict ANSI C preprocessors.
+ The problem is, "32_" is not a valid preprocessing token, and we don't
+ want extra underscores (e.g., "nlm_32_"). The XCONCAT2 macro will
+ cause the inner CONCAT2 macros to be evaluated first, producing
+ still-valid pp-tokens. Then the final concatenation can be done. */
+#undef CONCAT4
+#define CONCAT4(a,b,c,d) XCONCAT2(CONCAT2(a,b),CONCAT2(c,d))
+#endif
+#endif
+
+#define BFD_VERSION @bfd_version@
+#define BFD_VERSION_DATE @bfd_version_date@
+#define BFD_VERSION_STRING @bfd_version_string@
-/* These two lines get substitutions done by commands in Makefile.in. */
-#define BFD_VERSION "@VERSION@"
+/* The word size used by BFD on the host. This may be 64 with a 32
+ bit target if the host is 64 bit, or if other 64 bit targets have
+ been selected with --enable-targets, or if --enable-64-bit-bfd. */
#define BFD_ARCH_SIZE @wordsize@
+
+/* The word size of the default bfd target. */
+#define BFD_DEFAULT_TARGET_SIZE @bfd_default_target_size@
+
#define BFD_HOST_64BIT_LONG @BFD_HOST_64BIT_LONG@
#if @BFD_HOST_64_BIT_DEFINED@
#define BFD_HOST_64_BIT @BFD_HOST_64_BIT@
@@ -106,16 +104,6 @@ typedef enum bfd_boolean {false, true} boolean;
typedef enum bfd_boolean {bfd_fffalse, bfd_tttrue} boolean;
#endif
-/* A pointer to a position in a file. */
-/* FIXME: This should be using off_t from <sys/types.h>.
- For now, try to avoid breaking stuff by not including <sys/types.h> here.
- This will break on systems with 64-bit file offsets (e.g. 4.4BSD).
- Probably the best long-term answer is to avoid using file_ptr AND off_t
- in this header file, and to handle this in the BFD implementation
- rather than in its interface. */
-/* typedef off_t file_ptr; */
-typedef long int file_ptr;
-
/* Support for different sizes of target format ints and addresses.
If the type `long' is at least 64 bits, BFD_HOST_64BIT_LONG will be
set to 1 above. Otherwise, if gcc is being used, this code will
@@ -183,7 +171,22 @@ typedef unsigned long bfd_size_type;
#endif /* not BFD64 */
+/* A pointer to a position in a file. */
+/* FIXME: This should be using off_t from <sys/types.h>.
+ For now, try to avoid breaking stuff by not including <sys/types.h> here.
+ This will break on systems with 64-bit file offsets (e.g. 4.4BSD).
+ Probably the best long-term answer is to avoid using file_ptr AND off_t
+ in this header file, and to handle this in the BFD implementation
+ rather than in its interface. */
+/* typedef off_t file_ptr; */
+typedef bfd_signed_vma file_ptr;
+typedef bfd_vma ufile_ptr;
+
+extern void bfd_sprintf_vma PARAMS ((bfd *, char *, bfd_vma));
+extern void bfd_fprintf_vma PARAMS ((bfd *, PTR, bfd_vma));
+
#define printf_vma(x) fprintf_vma(stdout,x)
+#define bfd_printf_vma(abfd,x) bfd_fprintf_vma (abfd,stdout,x)
typedef unsigned int flagword; /* 32 bits of flags */
typedef unsigned char bfd_byte;
@@ -289,7 +292,10 @@ typedef struct carsym {
Perhaps just a forward definition would do? */
struct orl { /* output ranlib */
char **name; /* symbol name */
- file_ptr pos; /* bfd* or file position */
+ union {
+ file_ptr pos;
+ bfd *abfd;
+ } u; /* bfd* or file position */
int namidx; /* index into string table */
};
@@ -298,7 +304,7 @@ typedef struct lineno_cache_entry {
unsigned int line_number; /* Linenumber from start of function*/
union {
struct symbol_cache_entry *sym; /* Function name */
- unsigned long offset; /* Offset into section */
+ bfd_vma offset; /* Offset into section */
} u;
} alent;
@@ -341,11 +347,11 @@ typedef struct _symbol_info
{
symvalue value;
char type;
- CONST char *name; /* Symbol name. */
+ const char *name; /* Symbol name. */
unsigned char stab_type; /* Stab type. */
char stab_other; /* Stab other. */
short stab_desc; /* Stab desc. */
- CONST char *stab_name; /* String for stab type. */
+ const char *stab_name; /* String for stab type. */
} symbol_info;
/* Get the name of a stabs type code. */
@@ -438,47 +444,39 @@ extern void bfd_hash_traverse PARAMS ((struct bfd_hash_table *,
boolean (*) (struct bfd_hash_entry *,
PTR),
PTR info));
-
-/* Semi-portable string concatenation in cpp.
- The CAT4 hack is to avoid a problem with some strict ANSI C preprocessors.
- The problem is, "32_" is not a valid preprocessing token, and we don't
- want extra underscores (e.g., "nlm_32_"). The XCAT2 macro will cause the
- inner CAT macros to be evaluated first, producing still-valid pp-tokens.
- Then the final concatenation can be done. (Sigh.) */
-#ifndef CAT
-#ifdef SABER
-#define CAT(a,b) a##b
-#define CAT3(a,b,c) a##b##c
-#define CAT4(a,b,c,d) a##b##c##d
-#else
-#if defined(__STDC__) || defined(ALMOST_STDC)
-#define CAT(a,b) a##b
-#define CAT3(a,b,c) a##b##c
-#define XCAT2(a,b) CAT(a,b)
-#define CAT4(a,b,c,d) XCAT2(CAT(a,b),CAT(c,d))
-#else
-#define CAT(a,b) a/**/b
-#define CAT3(a,b,c) a/**/b/**/c
-#define CAT4(a,b,c,d) a/**/b/**/c/**/d
-#endif
-#endif
-#endif
#define COFF_SWAP_TABLE (PTR) &bfd_coff_std_swap_table
-
+
/* User program access to BFD facilities */
/* Direct I/O routines, for programs which know more about the object
file than BFD does. Use higher level routines if possible. */
-extern bfd_size_type bfd_read
- PARAMS ((PTR, bfd_size_type size, bfd_size_type nitems, bfd *abfd));
-extern bfd_size_type bfd_write
- PARAMS ((const PTR, bfd_size_type size, bfd_size_type nitems, bfd *abfd));
-extern int bfd_seek PARAMS ((bfd *abfd, file_ptr fp, int direction));
-extern long bfd_tell PARAMS ((bfd *abfd));
-extern int bfd_flush PARAMS ((bfd *abfd));
-extern int bfd_stat PARAMS ((bfd *abfd, struct stat *));
+extern bfd_size_type bfd_bread PARAMS ((PTR, bfd_size_type, bfd *));
+extern bfd_size_type bfd_bwrite PARAMS ((const PTR, bfd_size_type, bfd *));
+extern int bfd_seek PARAMS ((bfd *, file_ptr, int));
+extern ufile_ptr bfd_tell PARAMS ((bfd *));
+extern int bfd_flush PARAMS ((bfd *));
+extern int bfd_stat PARAMS ((bfd *, struct stat *));
+
+/* Deprecated old routines. */
+#if __GNUC__
+#define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \
+ (warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \
+ bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
+#define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \
+ (warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \
+ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
+#else
+#define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \
+ (warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \
+ bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
+#define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \
+ (warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\
+ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
+#endif
+extern void warn_deprecated
+ PARAMS ((const char *, const char *, int, const char *));
/* Cast from const char * to char * so that caller can assign to
a char * without a warning. */
@@ -514,6 +512,9 @@ extern int bfd_stat PARAMS ((bfd *abfd, struct stat *));
#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = (boolean) (bool)), true)
+extern boolean bfd_cache_close PARAMS ((bfd *abfd));
+/* NB: This declaration should match the autogenerated one in libbfd.h. */
+
extern boolean bfd_record_phdr
PARAMS ((bfd *, unsigned long, boolean, flagword, boolean, bfd_vma,
boolean, boolean, unsigned int, struct sec **));
@@ -622,11 +623,11 @@ extern struct bfd_link_needed_list *bfd_elf_get_needed_list
extern boolean bfd_elf_get_bfd_needed_list
PARAMS ((bfd *, struct bfd_link_needed_list **));
extern boolean bfd_elf32_size_dynamic_sections
- PARAMS ((bfd *, const char *, const char *, boolean, const char *,
+ PARAMS ((bfd *, const char *, const char *, const char *,
const char * const *, struct bfd_link_info *, struct sec **,
struct bfd_elf_version_tree *));
extern boolean bfd_elf64_size_dynamic_sections
- PARAMS ((bfd *, const char *, const char *, boolean, const char *,
+ PARAMS ((bfd *, const char *, const char *, const char *,
const char * const *, struct bfd_link_info *, struct sec **,
struct bfd_elf_version_tree *));
extern void bfd_elf_set_dt_needed_name PARAMS ((bfd *, const char *));
@@ -634,6 +635,10 @@ extern void bfd_elf_set_dt_needed_soname PARAMS ((bfd *, const char *));
extern const char *bfd_elf_get_dt_soname PARAMS ((bfd *));
extern struct bfd_link_needed_list *bfd_elf_get_runpath_list
PARAMS ((bfd *, struct bfd_link_info *));
+extern boolean bfd_elf32_discard_info
+ PARAMS ((bfd *, struct bfd_link_info *));
+extern boolean bfd_elf64_discard_info
+ PARAMS ((bfd *, struct bfd_link_info *));
/* Return an upper bound on the number of bytes required to store a
copy of ABFD's program header table entries. Return -1 if an error
@@ -708,10 +713,9 @@ extern boolean bfd_xcoff_link_record_set
bfd_size_type));
extern boolean bfd_xcoff_import_symbol
PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *,
- bfd_vma, const char *, const char *, const char *));
+ bfd_vma, const char *, const char *, const char *, unsigned int));
extern boolean bfd_xcoff_export_symbol
- PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *,
- boolean));
+ PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *));
extern boolean bfd_xcoff_link_count_reloc
PARAMS ((bfd *, struct bfd_link_info *, const char *));
extern boolean bfd_xcoff_record_link_assignment
@@ -720,6 +724,8 @@ extern boolean bfd_xcoff_size_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *, const char *, const char *,
unsigned long, unsigned long, unsigned long, boolean,
int, boolean, boolean, struct sec **));
+extern boolean bfd_xcoff_link_generate_rtinit
+ PARAMS ((bfd *, const char *, const char *));
/* Externally visible COFF routines. */
diff --git a/contrib/binutils/bfd/bfd-in2.h b/contrib/binutils/bfd/bfd-in2.h
index 08456db..e48a20d 100644
--- a/contrib/binutils/bfd/bfd-in2.h
+++ b/contrib/binutils/bfd/bfd-in2.h
@@ -1,13 +1,15 @@
+/* DO NOT EDIT! -*- buffer-read-only: t -*- This file is automatically
+ generated from "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" and "format.c".
+ Run "make headers" in your build bfd/ to regenerate. */
+
/* Main header file for the bfd library -- portable access to object files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001
Free Software Foundation, Inc.
Contributed by Cygnus Support.
-** NOTE: bfd.h and bfd-in2.h are GENERATED files. Don't change them;
-** instead, change bfd-in.h or the other BFD source files processed to
-** generate these files.
-
This file is part of BFD, the Binary File Descriptor library.
This program is free software; you can redistribute it and/or modify
@@ -24,25 +26,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. */
-/* bfd.h -- The only header file required by users of the bfd library
-
-The bfd.h file is generated from bfd-in.h and various .c files; if you
-change it, your changes will probably be lost.
-
-All the prototypes and definitions following the comment "THE FOLLOWING
-IS EXTRACTED FROM THE SOURCE" are extracted from the source files for
-BFD. If you change it, someone oneday will extract it from the source
-again, and your changes will be lost. To save yourself from this bind,
-change the definitions in the source in the bfd directory. Type "make
-docs" and then "make headers" in that directory, and magically this file
-will change to reflect your changes.
-
-If you don't have the tools to perform the extraction, then you are
-safe from someone on your system trampling over your header files.
-You should still maintain the equivalence between the source and this
-file though; every change you make to the .c file should be reflected
-here. */
-
#ifndef __BFD_H_SEEN__
#define __BFD_H_SEEN__
@@ -51,10 +34,31 @@ extern "C" {
#endif
#include "ansidecl.h"
+#include "symcat.h"
+#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
+#ifndef SABER
+/* This hack is to avoid a problem with some strict ANSI C preprocessors.
+ The problem is, "32_" is not a valid preprocessing token, and we don't
+ want extra underscores (e.g., "nlm_32_"). The XCONCAT2 macro will
+ cause the inner CONCAT2 macros to be evaluated first, producing
+ still-valid pp-tokens. Then the final concatenation can be done. */
+#undef CONCAT4
+#define CONCAT4(a,b,c,d) XCONCAT2(CONCAT2(a,b),CONCAT2(c,d))
+#endif
+#endif
-/* These two lines get substitutions done by commands in Makefile.in. */
-#define BFD_VERSION "@VERSION@"
+#define BFD_VERSION @bfd_version@
+#define BFD_VERSION_DATE @bfd_version_date@
+#define BFD_VERSION_STRING @bfd_version_string@
+
+/* The word size used by BFD on the host. This may be 64 with a 32
+ bit target if the host is 64 bit, or if other 64 bit targets have
+ been selected with --enable-targets, or if --enable-64-bit-bfd. */
#define BFD_ARCH_SIZE @wordsize@
+
+/* The word size of the default bfd target. */
+#define BFD_DEFAULT_TARGET_SIZE @bfd_default_target_size@
+
#define BFD_HOST_64BIT_LONG @BFD_HOST_64BIT_LONG@
#if @BFD_HOST_64_BIT_DEFINED@
#define BFD_HOST_64_BIT @BFD_HOST_64_BIT@
@@ -106,16 +110,6 @@ typedef enum bfd_boolean {false, true} boolean;
typedef enum bfd_boolean {bfd_fffalse, bfd_tttrue} boolean;
#endif
-/* A pointer to a position in a file. */
-/* FIXME: This should be using off_t from <sys/types.h>.
- For now, try to avoid breaking stuff by not including <sys/types.h> here.
- This will break on systems with 64-bit file offsets (e.g. 4.4BSD).
- Probably the best long-term answer is to avoid using file_ptr AND off_t
- in this header file, and to handle this in the BFD implementation
- rather than in its interface. */
-/* typedef off_t file_ptr; */
-typedef long int file_ptr;
-
/* Support for different sizes of target format ints and addresses.
If the type `long' is at least 64 bits, BFD_HOST_64BIT_LONG will be
set to 1 above. Otherwise, if gcc is being used, this code will
@@ -183,7 +177,22 @@ typedef unsigned long bfd_size_type;
#endif /* not BFD64 */
+/* A pointer to a position in a file. */
+/* FIXME: This should be using off_t from <sys/types.h>.
+ For now, try to avoid breaking stuff by not including <sys/types.h> here.
+ This will break on systems with 64-bit file offsets (e.g. 4.4BSD).
+ Probably the best long-term answer is to avoid using file_ptr AND off_t
+ in this header file, and to handle this in the BFD implementation
+ rather than in its interface. */
+/* typedef off_t file_ptr; */
+typedef bfd_signed_vma file_ptr;
+typedef bfd_vma ufile_ptr;
+
+extern void bfd_sprintf_vma PARAMS ((bfd *, char *, bfd_vma));
+extern void bfd_fprintf_vma PARAMS ((bfd *, PTR, bfd_vma));
+
#define printf_vma(x) fprintf_vma(stdout,x)
+#define bfd_printf_vma(abfd,x) bfd_fprintf_vma (abfd,stdout,x)
typedef unsigned int flagword; /* 32 bits of flags */
typedef unsigned char bfd_byte;
@@ -289,7 +298,10 @@ typedef struct carsym {
Perhaps just a forward definition would do? */
struct orl { /* output ranlib */
char **name; /* symbol name */
- file_ptr pos; /* bfd* or file position */
+ union {
+ file_ptr pos;
+ bfd *abfd;
+ } u; /* bfd* or file position */
int namidx; /* index into string table */
};
@@ -298,7 +310,7 @@ typedef struct lineno_cache_entry {
unsigned int line_number; /* Linenumber from start of function*/
union {
struct symbol_cache_entry *sym; /* Function name */
- unsigned long offset; /* Offset into section */
+ bfd_vma offset; /* Offset into section */
} u;
} alent;
@@ -341,11 +353,11 @@ typedef struct _symbol_info
{
symvalue value;
char type;
- CONST char *name; /* Symbol name. */
+ const char *name; /* Symbol name. */
unsigned char stab_type; /* Stab type. */
char stab_other; /* Stab other. */
short stab_desc; /* Stab desc. */
- CONST char *stab_name; /* String for stab type. */
+ const char *stab_name; /* String for stab type. */
} symbol_info;
/* Get the name of a stabs type code. */
@@ -438,47 +450,39 @@ extern void bfd_hash_traverse PARAMS ((struct bfd_hash_table *,
boolean (*) (struct bfd_hash_entry *,
PTR),
PTR info));
-
-/* Semi-portable string concatenation in cpp.
- The CAT4 hack is to avoid a problem with some strict ANSI C preprocessors.
- The problem is, "32_" is not a valid preprocessing token, and we don't
- want extra underscores (e.g., "nlm_32_"). The XCAT2 macro will cause the
- inner CAT macros to be evaluated first, producing still-valid pp-tokens.
- Then the final concatenation can be done. (Sigh.) */
-#ifndef CAT
-#ifdef SABER
-#define CAT(a,b) a##b
-#define CAT3(a,b,c) a##b##c
-#define CAT4(a,b,c,d) a##b##c##d
-#else
-#if defined(__STDC__) || defined(ALMOST_STDC)
-#define CAT(a,b) a##b
-#define CAT3(a,b,c) a##b##c
-#define XCAT2(a,b) CAT(a,b)
-#define CAT4(a,b,c,d) XCAT2(CAT(a,b),CAT(c,d))
-#else
-#define CAT(a,b) a/**/b
-#define CAT3(a,b,c) a/**/b/**/c
-#define CAT4(a,b,c,d) a/**/b/**/c/**/d
-#endif
-#endif
-#endif
#define COFF_SWAP_TABLE (PTR) &bfd_coff_std_swap_table
-
+
/* User program access to BFD facilities */
/* Direct I/O routines, for programs which know more about the object
file than BFD does. Use higher level routines if possible. */
-extern bfd_size_type bfd_read
- PARAMS ((PTR, bfd_size_type size, bfd_size_type nitems, bfd *abfd));
-extern bfd_size_type bfd_write
- PARAMS ((const PTR, bfd_size_type size, bfd_size_type nitems, bfd *abfd));
-extern int bfd_seek PARAMS ((bfd *abfd, file_ptr fp, int direction));
-extern long bfd_tell PARAMS ((bfd *abfd));
-extern int bfd_flush PARAMS ((bfd *abfd));
-extern int bfd_stat PARAMS ((bfd *abfd, struct stat *));
+extern bfd_size_type bfd_bread PARAMS ((PTR, bfd_size_type, bfd *));
+extern bfd_size_type bfd_bwrite PARAMS ((const PTR, bfd_size_type, bfd *));
+extern int bfd_seek PARAMS ((bfd *, file_ptr, int));
+extern ufile_ptr bfd_tell PARAMS ((bfd *));
+extern int bfd_flush PARAMS ((bfd *));
+extern int bfd_stat PARAMS ((bfd *, struct stat *));
+
+/* Deprecated old routines. */
+#if __GNUC__
+#define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \
+ (warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__), \
+ bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
+#define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \
+ (warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__), \
+ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
+#else
+#define bfd_read(BUF, ELTSIZE, NITEMS, ABFD) \
+ (warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \
+ bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
+#define bfd_write(BUF, ELTSIZE, NITEMS, ABFD) \
+ (warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\
+ bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
+#endif
+extern void warn_deprecated
+ PARAMS ((const char *, const char *, int, const char *));
/* Cast from const char * to char * so that caller can assign to
a char * without a warning. */
@@ -514,6 +518,9 @@ extern int bfd_stat PARAMS ((bfd *abfd, struct stat *));
#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = (boolean) (bool)), true)
+extern boolean bfd_cache_close PARAMS ((bfd *abfd));
+/* NB: This declaration should match the autogenerated one in libbfd.h. */
+
extern boolean bfd_record_phdr
PARAMS ((bfd *, unsigned long, boolean, flagword, boolean, bfd_vma,
boolean, boolean, unsigned int, struct sec **));
@@ -622,11 +629,11 @@ extern struct bfd_link_needed_list *bfd_elf_get_needed_list
extern boolean bfd_elf_get_bfd_needed_list
PARAMS ((bfd *, struct bfd_link_needed_list **));
extern boolean bfd_elf32_size_dynamic_sections
- PARAMS ((bfd *, const char *, const char *, boolean, const char *,
+ PARAMS ((bfd *, const char *, const char *, const char *,
const char * const *, struct bfd_link_info *, struct sec **,
struct bfd_elf_version_tree *));
extern boolean bfd_elf64_size_dynamic_sections
- PARAMS ((bfd *, const char *, const char *, boolean, const char *,
+ PARAMS ((bfd *, const char *, const char *, const char *,
const char * const *, struct bfd_link_info *, struct sec **,
struct bfd_elf_version_tree *));
extern void bfd_elf_set_dt_needed_name PARAMS ((bfd *, const char *));
@@ -634,6 +641,10 @@ extern void bfd_elf_set_dt_needed_soname PARAMS ((bfd *, const char *));
extern const char *bfd_elf_get_dt_soname PARAMS ((bfd *));
extern struct bfd_link_needed_list *bfd_elf_get_runpath_list
PARAMS ((bfd *, struct bfd_link_info *));
+extern boolean bfd_elf32_discard_info
+ PARAMS ((bfd *, struct bfd_link_info *));
+extern boolean bfd_elf64_discard_info
+ PARAMS ((bfd *, struct bfd_link_info *));
/* Return an upper bound on the number of bytes required to store a
copy of ABFD's program header table entries. Return -1 if an error
@@ -708,10 +719,9 @@ extern boolean bfd_xcoff_link_record_set
bfd_size_type));
extern boolean bfd_xcoff_import_symbol
PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *,
- bfd_vma, const char *, const char *, const char *));
+ bfd_vma, const char *, const char *, const char *, unsigned int));
extern boolean bfd_xcoff_export_symbol
- PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *,
- boolean));
+ PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *));
extern boolean bfd_xcoff_link_count_reloc
PARAMS ((bfd *, struct bfd_link_info *, const char *));
extern boolean bfd_xcoff_record_link_assignment
@@ -720,6 +730,8 @@ extern boolean bfd_xcoff_size_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *, const char *, const char *,
unsigned long, unsigned long, unsigned long, boolean,
int, boolean, boolean, struct sec **));
+extern boolean bfd_xcoff_link_generate_rtinit
+ PARAMS ((bfd *, const char *, const char *));
/* Externally visible COFF routines. */
@@ -783,16 +795,16 @@ void
bfd_init PARAMS ((void));
bfd *
-bfd_openr PARAMS ((CONST char *filename, CONST char *target));
+bfd_openr PARAMS ((const char *filename, const char *target));
bfd *
-bfd_fdopenr PARAMS ((CONST char *filename, CONST char *target, int fd));
+bfd_fdopenr PARAMS ((const char *filename, const char *target, int fd));
bfd *
bfd_openstreamr PARAMS ((const char *, const char *, PTR));
bfd *
-bfd_openw PARAMS ((CONST char *filename, CONST char *target));
+bfd_openw PARAMS ((const char *filename, const char *target));
boolean
bfd_close PARAMS ((bfd *abfd));
@@ -801,7 +813,7 @@ boolean
bfd_close_all_done PARAMS ((bfd *));
bfd *
-bfd_create PARAMS ((CONST char *filename, bfd *templ));
+bfd_create PARAMS ((const char *filename, bfd *templ));
boolean
bfd_make_writable PARAMS ((bfd *abfd));
@@ -817,9 +829,9 @@ bfd_make_readable PARAMS ((bfd *abfd));
#define bfd_put_signed_8 \
bfd_put_8
#define bfd_get_8(abfd, ptr) \
- (*(unsigned char *) (ptr))
+ (*(unsigned char *) (ptr) & 0xff)
#define bfd_get_signed_8(abfd, ptr) \
- ((*(unsigned char *) (ptr) ^ 0x80) - 0x80)
+ (((*(unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80)
#define bfd_put_16(abfd, val, ptr) \
BFD_SEND(abfd, bfd_putx16, ((val),(ptr)))
@@ -849,14 +861,14 @@ bfd_make_readable PARAMS ((bfd *abfd));
BFD_SEND(abfd, bfd_getx_signed_64, (ptr))
#define bfd_get(bits, abfd, ptr) \
- ((bits) == 8 ? bfd_get_8 (abfd, ptr) \
+ ( (bits) == 8 ? (bfd_vma) 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) == 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) \
@@ -866,40 +878,88 @@ bfd_make_readable PARAMS ((bfd *abfd));
/* Byte swapping macros for file header data. */
#define bfd_h_put_8(abfd, val, ptr) \
- bfd_put_8 (abfd, val, ptr)
+ bfd_put_8 (abfd, val, ptr)
#define bfd_h_put_signed_8(abfd, val, ptr) \
- bfd_put_8 (abfd, val, ptr)
+ bfd_put_8 (abfd, val, ptr)
#define bfd_h_get_8(abfd, ptr) \
- bfd_get_8 (abfd, ptr)
+ bfd_get_8 (abfd, ptr)
#define bfd_h_get_signed_8(abfd, ptr) \
- bfd_get_signed_8 (abfd, ptr)
+ bfd_get_signed_8 (abfd, ptr)
#define bfd_h_put_16(abfd, val, ptr) \
- BFD_SEND(abfd, bfd_h_putx16,(val,ptr))
+ BFD_SEND (abfd, bfd_h_putx16, (val, ptr))
#define bfd_h_put_signed_16 \
- bfd_h_put_16
+ bfd_h_put_16
#define bfd_h_get_16(abfd, ptr) \
- BFD_SEND(abfd, bfd_h_getx16,(ptr))
+ BFD_SEND (abfd, bfd_h_getx16, (ptr))
#define bfd_h_get_signed_16(abfd, ptr) \
- BFD_SEND(abfd, bfd_h_getx_signed_16, (ptr))
+ BFD_SEND (abfd, bfd_h_getx_signed_16, (ptr))
#define bfd_h_put_32(abfd, val, ptr) \
- BFD_SEND(abfd, bfd_h_putx32,(val,ptr))
+ BFD_SEND (abfd, bfd_h_putx32, (val, ptr))
#define bfd_h_put_signed_32 \
- bfd_h_put_32
+ bfd_h_put_32
#define bfd_h_get_32(abfd, ptr) \
- BFD_SEND(abfd, bfd_h_getx32,(ptr))
+ BFD_SEND (abfd, bfd_h_getx32, (ptr))
#define bfd_h_get_signed_32(abfd, ptr) \
- BFD_SEND(abfd, bfd_h_getx_signed_32, (ptr))
+ BFD_SEND (abfd, bfd_h_getx_signed_32, (ptr))
#define bfd_h_put_64(abfd, val, ptr) \
- BFD_SEND(abfd, bfd_h_putx64,(val, ptr))
+ BFD_SEND (abfd, bfd_h_putx64, (val, ptr))
#define bfd_h_put_signed_64 \
- bfd_h_put_64
+ bfd_h_put_64
#define bfd_h_get_64(abfd, ptr) \
- BFD_SEND(abfd, bfd_h_getx64,(ptr))
+ BFD_SEND (abfd, bfd_h_getx64, (ptr))
#define bfd_h_get_signed_64(abfd, ptr) \
- BFD_SEND(abfd, bfd_h_getx_signed_64, (ptr))
+ BFD_SEND (abfd, bfd_h_getx_signed_64, (ptr))
+
+/* Refinements on the above, which should eventually go away. Save
+ cluttering the source with (bfd_vma) and (bfd_byte *) casts. */
+
+#define H_PUT_64(abfd, val, where) \
+ bfd_h_put_64 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
+
+#define H_PUT_32(abfd, val, where) \
+ bfd_h_put_32 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
+
+#define H_PUT_16(abfd, val, where) \
+ bfd_h_put_16 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
+
+#define H_PUT_8 bfd_h_put_8
+
+#define H_PUT_S64(abfd, val, where) \
+ bfd_h_put_signed_64 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
+
+#define H_PUT_S32(abfd, val, where) \
+ bfd_h_put_signed_32 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
+
+#define H_PUT_S16(abfd, val, where) \
+ bfd_h_put_signed_16 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
+
+#define H_PUT_S8 bfd_h_put_signed_8
+
+#define H_GET_64(abfd, where) \
+ bfd_h_get_64 ((abfd), (bfd_byte *) (where))
+
+#define H_GET_32(abfd, where) \
+ bfd_h_get_32 ((abfd), (bfd_byte *) (where))
+
+#define H_GET_16(abfd, where) \
+ bfd_h_get_16 ((abfd), (bfd_byte *) (where))
+
+#define H_GET_8 bfd_h_get_8
+
+#define H_GET_S64(abfd, where) \
+ bfd_h_get_signed_64 ((abfd), (bfd_byte *) (where))
+
+#define H_GET_S32(abfd, where) \
+ bfd_h_get_signed_32 ((abfd), (bfd_byte *) (where))
+
+#define H_GET_S16(abfd, where) \
+ bfd_h_get_signed_16 ((abfd), (bfd_byte *) (where))
+
+#define H_GET_S8 bfd_h_get_signed_8
+
/* This structure is used for a comdat section, as in PE. A comdat
section is associated with a particular symbol. When the linker
@@ -929,7 +989,7 @@ typedef struct sec
int id;
- /* Which section is it; 0..nth. */
+ /* Which section in the bfd; 0..n-1 as sections are created in a bfd. */
int index;
@@ -957,9 +1017,11 @@ typedef struct sec
some relocation information too. */
#define SEC_RELOC 0x004
-#if 0 /* Obsolete ? */
-#define SEC_BALIGN 0x008
-#endif
+ /* ELF reserves 4 processor specific bits and 8 operating system
+ specific bits in sh_flags; at present we can get away with just
+ one in communicating between the assembler and BFD, but this
+ isn't a good long-term solution. */
+#define SEC_ARCH_BIT_0 0x008
/* A signal to the OS that the section contains read only data. */
#define SEC_READONLY 0x010
@@ -1042,9 +1104,10 @@ typedef struct sec
objects are to be further relocated. */
#define SEC_EXCLUDE 0x40000
- /* The contents of this section are to be sorted by the
- based on the address specified in the associated symbol
- table. */
+ /* The contents of this section are to be sorted based on the sum of
+ the symbol and addend values specified by the associated relocation
+ entries. Entries without associated relocation entries will be
+ appended to the end of the section in an unspecified order. */
#define SEC_SORT_ENTRIES 0x80000
/* When linking, duplicate sections of the same name should be
@@ -1102,6 +1165,18 @@ typedef struct sec
references found to any symbol in the section. */
#define SEC_CLINK 0x10000000
+ /* Attempt to merge identical entities in the section.
+ Entity size is given in the entsize field. */
+#define SEC_MERGE 0x20000000
+
+ /* If given with SEC_MERGE, entities to merge are zero terminated
+ strings where entsize specifies character size instead of fixed
+ size entries. */
+#define SEC_STRINGS 0x40000000
+
+ /* This section contains data about section groups. */
+#define SEC_GROUP 0x80000000
+
/* End of section flags. */
/* Some internal packed boolean fields. */
@@ -1116,13 +1191,14 @@ typedef struct sec
unsigned int linker_mark : 1;
/* Another mark flag used by some of the linker backends. Set for
- output sections that have a input section. */
+ output sections that have an input section. */
unsigned int linker_has_input : 1;
/* A mark flag used by some linker backends for garbage collection. */
unsigned int gc_mark : 1;
- /* Used by the ELF code to mark sections which have been allocated to segments. */
+ /* Used by the ELF code to mark sections which have been allocated
+ to segments. */
unsigned int segment_mark : 1;
/* End of internal packed boolean fields. */
@@ -1218,14 +1294,14 @@ typedef struct sec
unsigned int lineno_count;
+ /* Entity size for merging purposes. */
+
+ unsigned int entsize;
+
/* Optional information about a COMDAT entry; NULL if not COMDAT. */
struct bfd_comdat_info *comdat;
- /* Points to the kept section if this section is a link-once section,
- and is discarded. */
- struct sec *kept_section;
-
/* When a section is being output, this value changes as more
linenumbers are written out. */
@@ -1280,6 +1356,12 @@ extern const asection bfd_ind_section;
#define bfd_ind_section_ptr ((asection *) &bfd_ind_section)
#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr)
+#define bfd_is_const_section(SEC) \
+ ( ((SEC) == bfd_abs_section_ptr) \
+ || ((SEC) == bfd_und_section_ptr) \
+ || ((SEC) == bfd_com_section_ptr) \
+ || ((SEC) == bfd_ind_section_ptr))
+
extern const struct symbol_cache_entry * const bfd_abs_symbol;
extern const struct symbol_cache_entry * const bfd_com_symbol;
extern const struct symbol_cache_entry * const bfd_und_symbol;
@@ -1290,6 +1372,35 @@ extern const struct symbol_cache_entry * const bfd_ind_symbol;
#define bfd_get_section_size_after_reloc(section) \
((section)->reloc_done ? (section)->_cooked_size \
: (abort (), (bfd_size_type) 1))
+
+/* Macros to handle insertion and deletion of a bfd's sections. These
+ only handle the list pointers, ie. do not adjust section_count,
+ target_index etc. */
+#define bfd_section_list_remove(ABFD, PS) \
+ do \
+ { \
+ asection **_ps = PS; \
+ asection *_s = *_ps; \
+ *_ps = _s->next; \
+ if (_s->next == NULL) \
+ (ABFD)->section_tail = _ps; \
+ } \
+ while (0)
+#define bfd_section_list_insert(ABFD, PS, S) \
+ do \
+ { \
+ asection **_ps = PS; \
+ asection *_s = S; \
+ _s->next = *_ps; \
+ *_ps = _s; \
+ if (_s->next == NULL) \
+ (ABFD)->section_tail = &_s->next; \
+ } \
+ while (0)
+
+void
+bfd_section_list_clear PARAMS ((bfd *));
+
asection *
bfd_get_section_by_name PARAMS ((bfd *abfd, const char *name));
@@ -1321,18 +1432,18 @@ boolean
bfd_set_section_size PARAMS ((bfd *abfd, asection *sec, bfd_size_type val));
boolean
-bfd_set_section_contents PARAMS ((bfd *abfd,
- asection *section,
- PTR data,
- file_ptr offset,
+bfd_set_section_contents PARAMS ((bfd *abfd, asection *section,
+ PTR data, file_ptr offset,
bfd_size_type count));
boolean
-bfd_get_section_contents PARAMS ((bfd *abfd, asection *section, PTR location,
- file_ptr offset, bfd_size_type count));
+bfd_get_section_contents PARAMS ((bfd *abfd, asection *section,
+ PTR location, file_ptr offset,
+ bfd_size_type count));
boolean
-bfd_copy_private_section_data PARAMS ((bfd *ibfd, asection *isec, bfd *obfd, asection *osec));
+bfd_copy_private_section_data PARAMS ((bfd *ibfd, asection *isec,
+ bfd *obfd, asection *osec));
#define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \
BFD_SEND (obfd, _bfd_copy_private_section_data, \
@@ -1410,11 +1521,10 @@ enum bfd_architecture
#define bfd_mach_mips10000 10000
#define bfd_mach_mips12000 12000
#define bfd_mach_mips16 16
-#define bfd_mach_mips32 32
-#define bfd_mach_mips32_4k 3204113 /* 32, 04, octal 'K' */
#define bfd_mach_mips5 5
-#define bfd_mach_mips64 64
#define bfd_mach_mips_sb1 12310201 /* octal 'SB', 01 */
+#define bfd_mach_mipsisa32 32
+#define bfd_mach_mipsisa64 64
bfd_arch_i386, /* Intel 386 */
#define bfd_mach_i386_i386 0
#define bfd_mach_i386_i8086 1
@@ -1434,6 +1544,7 @@ enum bfd_architecture
#define bfd_mach_h8300 1
#define bfd_mach_h8300h 2
#define bfd_mach_h8300s 3
+ bfd_arch_pdp11, /* DEC PDP-11 */
bfd_arch_powerpc, /* PowerPC */
#define bfd_mach_ppc 0
#define bfd_mach_ppc_403 403
@@ -1527,6 +1638,13 @@ enum bfd_architecture
#define bfd_mach_avr4 4
#define bfd_mach_avr5 5
bfd_arch_cris, /* Axis CRIS */
+ bfd_arch_s390, /* IBM s390 */
+#define bfd_mach_s390_esa 0
+#define bfd_mach_s390_esame 1
+ bfd_arch_openrisc, /* OpenRISC */
+ bfd_arch_mmix, /* Donald Knuth's educational processor */
+ bfd_arch_xstormy16,
+#define bfd_mach_xstormy16 0
bfd_arch_last
};
@@ -1599,31 +1717,31 @@ bfd_arch_mach_octets_per_byte PARAMS ((enum bfd_architecture arch,
typedef enum bfd_reloc_status
{
- /* No errors detected */
+ /* No errors detected */
bfd_reloc_ok,
- /* The relocation was performed, but there was an overflow. */
+ /* The relocation was performed, but there was an overflow. */
bfd_reloc_overflow,
- /* The address to relocate was not within the section supplied. */
+ /* The address to relocate was not within the section supplied. */
bfd_reloc_outofrange,
- /* Used by special functions */
+ /* Used by special functions */
bfd_reloc_continue,
- /* Unsupported relocation size requested. */
+ /* Unsupported relocation size requested. */
bfd_reloc_notsupported,
- /* Unused */
+ /* Unused */
bfd_reloc_other,
- /* The symbol to relocate against was undefined. */
+ /* The symbol to relocate against was undefined. */
bfd_reloc_undefined,
- /* The relocation was performed, but may not be ok - presently
- generated only when linking i960 coff files with i960 b.out
- symbols. If this type is returned, the error_message argument
- to bfd_perform_relocation will be set. */
+ /* The relocation was performed, but may not be ok - presently
+ generated only when linking i960 coff files with i960 b.out
+ symbols. If this type is returned, the error_message argument
+ to bfd_perform_relocation will be set. */
bfd_reloc_dangerous
}
bfd_reloc_status_type;
@@ -1631,155 +1749,156 @@ typedef enum bfd_reloc_status
typedef struct reloc_cache_entry
{
- /* A pointer into the canonical table of pointers */
+ /* A pointer into the canonical table of pointers */
struct symbol_cache_entry **sym_ptr_ptr;
- /* offset in section */
+ /* offset in section */
bfd_size_type address;
- /* addend for relocation value */
+ /* addend for relocation value */
bfd_vma addend;
- /* Pointer to how to perform the required relocation */
+ /* Pointer to how to perform the required relocation */
reloc_howto_type *howto;
} arelent;
enum complain_overflow
{
- /* Do not complain on overflow. */
+ /* Do not complain on overflow. */
complain_overflow_dont,
- /* Complain if the bitfield overflows, whether it is considered
- as signed or unsigned. */
+ /* Complain if the bitfield overflows, whether it is considered
+ as signed or unsigned. */
complain_overflow_bitfield,
- /* Complain if the value overflows when considered as signed
- number. */
+ /* Complain if the value overflows when considered as signed
+ number. */
complain_overflow_signed,
- /* Complain if the value overflows when considered as an
- unsigned number. */
+ /* Complain if the value overflows when considered as an
+ unsigned number. */
complain_overflow_unsigned
};
struct reloc_howto_struct
{
- /* The type field has mainly a documentary use - the back end can
- do what it wants with it, though normally the back end's
- external idea of what a reloc number is stored
- in this field. For example, a PC relative word relocation
- in a coff environment has the type 023 - because that's
- what the outside world calls a R_PCRWORD reloc. */
+ /* The type field has mainly a documentary use - the back end can
+ do what it wants with it, though normally the back end's
+ external idea of what a reloc number is stored
+ in this field. For example, a PC relative word relocation
+ in a coff environment has the type 023 - because that's
+ what the outside world calls a R_PCRWORD reloc. */
unsigned int type;
- /* The value the final relocation is shifted right by. This drops
- unwanted data from the relocation. */
+ /* The value the final relocation is shifted right by. This drops
+ unwanted data from the relocation. */
unsigned int rightshift;
- /* The size of the item to be relocated. This is *not* a
- power-of-two measure. To get the number of bytes operated
- on by a type of relocation, use bfd_get_reloc_size. */
+ /* The size of the item to be relocated. This is *not* a
+ power-of-two measure. To get the number of bytes operated
+ on by a type of relocation, use bfd_get_reloc_size. */
int size;
- /* The number of bits in the item to be relocated. This is used
- when doing overflow checking. */
+ /* The number of bits in the item to be relocated. This is used
+ when doing overflow checking. */
unsigned int bitsize;
- /* Notes that the relocation is relative to the location in the
- data section of the addend. The relocation function will
- subtract from the relocation value the address of the location
- being relocated. */
+ /* Notes that the relocation is relative to the location in the
+ data section of the addend. The relocation function will
+ subtract from the relocation value the address of the location
+ being relocated. */
boolean pc_relative;
- /* The bit position of the reloc value in the destination.
- The relocated value is left shifted by this amount. */
+ /* The bit position of the reloc value in the destination.
+ The relocated value is left shifted by this amount. */
unsigned int bitpos;
- /* What type of overflow error should be checked for when
- relocating. */
+ /* What type of overflow error should be checked for when
+ relocating. */
enum complain_overflow complain_on_overflow;
- /* If this field is non null, then the supplied function is
- called rather than the normal function. This allows really
- strange relocation methods to be accomodated (e.g., i960 callj
- instructions). */
+ /* If this field is non null, then the supplied function is
+ called rather than the normal function. This allows really
+ strange relocation methods to be accomodated (e.g., i960 callj
+ instructions). */
bfd_reloc_status_type (*special_function)
- PARAMS ((bfd *abfd,
- arelent *reloc_entry,
- struct symbol_cache_entry *symbol,
- PTR data,
- asection *input_section,
- bfd *output_bfd,
- char **error_message));
-
- /* The textual name of the relocation type. */
+ PARAMS ((bfd *, arelent *, struct symbol_cache_entry *, PTR, asection *,
+ bfd *, char **));
+
+ /* The textual name of the relocation type. */
char *name;
- /* 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. */
+ /* 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
- 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
- the mask would be 0x00000000. */
+ /* The src_mask selects which parts of the read in data
+ are to be used in the relocation sum. E.g., if this was an 8 bit
+ byte of data which we read and relocated, this would be
+ 0x000000ff. When we have relocs which have an addend, such as
+ sun4 extended relocs, the value in the offset part of a
+ relocating field is garbage so we never use it. In this case
+ the mask would be 0x00000000. */
bfd_vma src_mask;
- /* The dst_mask selects which parts of the instruction are replaced
- into the instruction. In most cases src_mask == dst_mask,
- except in the above special case, where dst_mask would be
- 0x000000ff, and src_mask would be 0x00000000. */
+ /* The dst_mask selects which parts of the instruction are replaced
+ into the instruction. In most cases src_mask == dst_mask,
+ except in the above special case, where dst_mask would be
+ 0x000000ff, and src_mask would be 0x00000000. */
bfd_vma dst_mask;
- /* When some formats create PC relative instructions, they leave
- the value of the pc of the place being relocated in the offset
- slot of the instruction, so that a PC relative relocation can
- be made just by adding in an ordinary offset (e.g., sun3 a.out).
- Some formats leave the displacement part of an instruction
- empty (e.g., m88k bcs); this flag signals the fact.*/
+ /* When some formats create PC relative instructions, they leave
+ the value of the pc of the place being relocated in the offset
+ slot of the instruction, so that a PC relative relocation can
+ be made just by adding in an ordinary offset (e.g., sun3 a.out).
+ Some formats leave the displacement part of an instruction
+ empty (e.g., m88k bcs); this flag signals the fact. */
boolean pcrel_offset;
-
};
-#define HOWTO(C, R,S,B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \
- {(unsigned)C,R,S,B, P, BI, O,SF,NAME,INPLACE,MASKSRC,MASKDST,PC}
-#define NEWHOWTO( FUNCTION, NAME,SIZE,REL,IN) HOWTO(0,0,SIZE,0,REL,0,complain_overflow_dont,FUNCTION, NAME,false,0,0,IN)
+#define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \
+ { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC }
+#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) { \
- if (bfd_is_com_section (symbol->section)) { \
- relocation = 0; \
- } \
- else { \
- relocation = symbol->value; \
- } \
- } \
-}
+ 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) \
+ { \
+ if (bfd_is_com_section (symbol->section)) \
+ { \
+ relocation = 0; \
+ } \
+ else \
+ { \
+ relocation = symbol->value; \
+ } \
+ } \
+ }
unsigned int
bfd_get_reloc_size PARAMS ((reloc_howto_type *));
-typedef struct relent_chain {
+typedef struct relent_chain
+{
arelent relent;
- struct relent_chain *next;
+ struct relent_chain *next;
} arelent_chain;
bfd_reloc_status_type
bfd_check_overflow PARAMS ((enum complain_overflow how,
@@ -1838,10 +1957,12 @@ The 24-bit relocation is used in some Intel 960 configurations. */
BFD_RELOC_HI16_GOTOFF,
BFD_RELOC_HI16_S_GOTOFF,
BFD_RELOC_8_GOTOFF,
+ BFD_RELOC_64_PLT_PCREL,
BFD_RELOC_32_PLT_PCREL,
BFD_RELOC_24_PLT_PCREL,
BFD_RELOC_16_PLT_PCREL,
BFD_RELOC_8_PLT_PCREL,
+ BFD_RELOC_64_PLTOFF,
BFD_RELOC_32_PLTOFF,
BFD_RELOC_16_PLTOFF,
BFD_RELOC_LO16_PLTOFF,
@@ -1932,6 +2053,7 @@ relocation types already defined. */
BFD_RELOC_SPARC_6,
BFD_RELOC_SPARC_5,
#define BFD_RELOC_SPARC_DISP64 BFD_RELOC_64_PCREL
+ BFD_RELOC_SPARC_PLT32,
BFD_RELOC_SPARC_PLT64,
BFD_RELOC_SPARC_HIX22,
BFD_RELOC_SPARC_LOX10,
@@ -1984,24 +2106,11 @@ as the absolute section symbol), and the "addend" indicates the type
of instruction using the register:
1 - "memory" fmt insn
2 - byte-manipulation (byte offset reg)
-3 - jsr (target of branch)
-
-The GNU linker currently doesn't do any of this optimizing. */
+3 - jsr (target of branch) */
BFD_RELOC_ALPHA_LITERAL,
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. */
@@ -2015,6 +2124,11 @@ which is filled by the linker. */
which is filled by the linker. */
BFD_RELOC_ALPHA_CODEADDR,
+/* The GPREL_HI/LO relocations together form a 32-bit offset from the
+GP register. */
+ BFD_RELOC_ALPHA_GPREL_HI16,
+ BFD_RELOC_ALPHA_GPREL_LO16,
+
/* Bits 27..2 of the relocation address shifted right 2 bits;
simple reloc otherwise. */
BFD_RELOC_MIPS_JMP,
@@ -2043,16 +2157,12 @@ to compensate for the borrow when the low bits are added. */
/* Like BFD_RELOC_LO16, but PC relative. */
BFD_RELOC_PCREL_LO16,
-/* Relocation relative to the global pointer. */
-#define BFD_RELOC_MIPS_GPREL BFD_RELOC_GPREL16
-
/* Relocation against a MIPS literal section. */
BFD_RELOC_MIPS_LITERAL,
/* MIPS ELF relocations. */
BFD_RELOC_MIPS_GOT16,
BFD_RELOC_MIPS_CALL16,
-#define BFD_RELOC_MIPS_GPREL32 BFD_RELOC_GPREL32
BFD_RELOC_MIPS_GOT_HI16,
BFD_RELOC_MIPS_GOT_LO16,
BFD_RELOC_MIPS_CALL_HI16,
@@ -2108,6 +2218,10 @@ to compensate for the borrow when the low bits are added. */
BFD_RELOC_NS32K_DISP_16_PCREL,
BFD_RELOC_NS32K_DISP_32_PCREL,
+/* PDP11 relocations */
+ BFD_RELOC_PDP11_DISP_8_PCREL,
+ BFD_RELOC_PDP11_DISP_6_PCREL,
+
/* Picojava relocs. Not all of these appear in object files. */
BFD_RELOC_PJ_CODE_HI16,
BFD_RELOC_PJ_CODE_LO16,
@@ -2147,6 +2261,29 @@ to compensate for the borrow when the low bits are added. */
BFD_RELOC_PPC_EMB_RELST_HA,
BFD_RELOC_PPC_EMB_BIT_FLD,
BFD_RELOC_PPC_EMB_RELSDA,
+ BFD_RELOC_PPC64_HIGHER,
+ BFD_RELOC_PPC64_HIGHER_S,
+ BFD_RELOC_PPC64_HIGHEST,
+ BFD_RELOC_PPC64_HIGHEST_S,
+ BFD_RELOC_PPC64_TOC16_LO,
+ BFD_RELOC_PPC64_TOC16_HI,
+ BFD_RELOC_PPC64_TOC16_HA,
+ BFD_RELOC_PPC64_TOC,
+ BFD_RELOC_PPC64_PLTGOT16,
+ BFD_RELOC_PPC64_PLTGOT16_LO,
+ BFD_RELOC_PPC64_PLTGOT16_HI,
+ BFD_RELOC_PPC64_PLTGOT16_HA,
+ BFD_RELOC_PPC64_ADDR16_DS,
+ BFD_RELOC_PPC64_ADDR16_LO_DS,
+ BFD_RELOC_PPC64_GOT16_DS,
+ BFD_RELOC_PPC64_GOT16_LO_DS,
+ BFD_RELOC_PPC64_PLT16_LO_DS,
+ BFD_RELOC_PPC64_SECTOFF_DS,
+ BFD_RELOC_PPC64_SECTOFF_LO_DS,
+ BFD_RELOC_PPC64_TOC16_DS,
+ BFD_RELOC_PPC64_TOC16_LO_DS,
+ BFD_RELOC_PPC64_PLTGOT16_DS,
+ BFD_RELOC_PPC64_PLTGOT16_LO_DS,
/* IBM 370/390 relocations */
BFD_RELOC_I370_D12,
@@ -2470,6 +2607,54 @@ short offset into 11 bits. */
BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2,
BFD_RELOC_MCORE_RVA,
+/* These are relocations for the GETA instruction. */
+ BFD_RELOC_MMIX_GETA,
+ BFD_RELOC_MMIX_GETA_1,
+ BFD_RELOC_MMIX_GETA_2,
+ BFD_RELOC_MMIX_GETA_3,
+
+/* These are relocations for a conditional branch instruction. */
+ BFD_RELOC_MMIX_CBRANCH,
+ BFD_RELOC_MMIX_CBRANCH_J,
+ BFD_RELOC_MMIX_CBRANCH_1,
+ BFD_RELOC_MMIX_CBRANCH_2,
+ BFD_RELOC_MMIX_CBRANCH_3,
+
+/* These are relocations for the PUSHJ instruction. */
+ BFD_RELOC_MMIX_PUSHJ,
+ BFD_RELOC_MMIX_PUSHJ_1,
+ BFD_RELOC_MMIX_PUSHJ_2,
+ BFD_RELOC_MMIX_PUSHJ_3,
+
+/* These are relocations for the JMP instruction. */
+ BFD_RELOC_MMIX_JMP,
+ BFD_RELOC_MMIX_JMP_1,
+ BFD_RELOC_MMIX_JMP_2,
+ BFD_RELOC_MMIX_JMP_3,
+
+/* This is a relocation for a relative address as in a GETA instruction or
+a branch. */
+ BFD_RELOC_MMIX_ADDR19,
+
+/* This is a relocation for a relative address as in a JMP instruction. */
+ BFD_RELOC_MMIX_ADDR27,
+
+/* This is a relocation for an instruction field that may be a general
+register or a value 0..255. */
+ BFD_RELOC_MMIX_REG_OR_BYTE,
+
+/* This is a relocation for an instruction field that may be a general
+register. */
+ BFD_RELOC_MMIX_REG,
+
+/* This is a relocation for two instruction fields holding a register and
+an offset, the equivalent of the relocation. */
+ BFD_RELOC_MMIX_BASE_PLUS_OFFSET,
+
+/* This relocation is an assertion that the expression is not allocated as
+a global register. It does not modify contents. */
+ BFD_RELOC_MMIX_LOCAL,
+
/* 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,
@@ -2538,6 +2723,57 @@ value of SUBI insn. */
into 22 bits. */
BFD_RELOC_AVR_CALL,
+/* Direct 12 bit. */
+ BFD_RELOC_390_12,
+
+/* 12 bit GOT offset. */
+ BFD_RELOC_390_GOT12,
+
+/* 32 bit PC relative PLT address. */
+ BFD_RELOC_390_PLT32,
+
+/* Copy symbol at runtime. */
+ BFD_RELOC_390_COPY,
+
+/* Create GOT entry. */
+ BFD_RELOC_390_GLOB_DAT,
+
+/* Create PLT entry. */
+ BFD_RELOC_390_JMP_SLOT,
+
+/* Adjust by program base. */
+ BFD_RELOC_390_RELATIVE,
+
+/* 32 bit PC relative offset to GOT. */
+ BFD_RELOC_390_GOTPC,
+
+/* 16 bit GOT offset. */
+ BFD_RELOC_390_GOT16,
+
+/* PC relative 16 bit shifted by 1. */
+ BFD_RELOC_390_PC16DBL,
+
+/* 16 bit PC rel. PLT shifted by 1. */
+ BFD_RELOC_390_PLT16DBL,
+
+/* PC relative 32 bit shifted by 1. */
+ BFD_RELOC_390_PC32DBL,
+
+/* 32 bit PC rel. PLT shifted by 1. */
+ BFD_RELOC_390_PLT32DBL,
+
+/* 32 bit PC rel. GOT shifted by 1. */
+ BFD_RELOC_390_GOTPCDBL,
+
+/* 64 bit GOT offset. */
+ BFD_RELOC_390_GOT64,
+
+/* 64 bit PC relative PLT address. */
+ BFD_RELOC_390_PLT64,
+
+/* 32 bit rel. offset to GOT entry. */
+ BFD_RELOC_390_GOTENT,
+
/* 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
@@ -2596,6 +2832,8 @@ this offset in the reloc's section offset. */
BFD_RELOC_IA64_PCREL64LSB,
BFD_RELOC_IA64_LTOFF_FPTR22,
BFD_RELOC_IA64_LTOFF_FPTR64I,
+ BFD_RELOC_IA64_LTOFF_FPTR32MSB,
+ BFD_RELOC_IA64_LTOFF_FPTR32LSB,
BFD_RELOC_IA64_LTOFF_FPTR64MSB,
BFD_RELOC_IA64_LTOFF_FPTR64LSB,
BFD_RELOC_IA64_SEGREL32MSB,
@@ -2644,6 +2882,33 @@ This is the 3 bits of a value. */
BFD_RELOC_CRIS_UNSIGNED_6,
BFD_RELOC_CRIS_UNSIGNED_4,
+/* Relocs used in ELF shared libraries for CRIS. */
+ BFD_RELOC_CRIS_COPY,
+ BFD_RELOC_CRIS_GLOB_DAT,
+ BFD_RELOC_CRIS_JUMP_SLOT,
+ BFD_RELOC_CRIS_RELATIVE,
+
+/* 32-bit offset to symbol-entry within GOT. */
+ BFD_RELOC_CRIS_32_GOT,
+
+/* 16-bit offset to symbol-entry within GOT. */
+ BFD_RELOC_CRIS_16_GOT,
+
+/* 32-bit offset to symbol-entry within GOT, with PLT handling. */
+ BFD_RELOC_CRIS_32_GOTPLT,
+
+/* 16-bit offset to symbol-entry within GOT, with PLT handling. */
+ BFD_RELOC_CRIS_16_GOTPLT,
+
+/* 32-bit offset to symbol, relative to GOT. */
+ BFD_RELOC_CRIS_32_GOTREL,
+
+/* 32-bit offset to symbol with PLT entry, relative to GOT. */
+ BFD_RELOC_CRIS_32_PLT_GOTREL,
+
+/* 32-bit offset to symbol with PLT entry, relative to this relocation. */
+ BFD_RELOC_CRIS_32_PLT_PCREL,
+
/* Intel i860 Relocations. */
BFD_RELOC_860_COPY,
BFD_RELOC_860_GLOB_DAT,
@@ -2677,6 +2942,22 @@ This is the 3 bits of a value. */
BFD_RELOC_860_HIGH,
BFD_RELOC_860_HIGOT,
BFD_RELOC_860_HIGOTOFF,
+
+/* OpenRISC Relocations. */
+ BFD_RELOC_OPENRISC_ABS_26,
+ BFD_RELOC_OPENRISC_REL_26,
+
+/* H8 elf Relocations. */
+ BFD_RELOC_H8_DIR16A8,
+ BFD_RELOC_H8_DIR16R8,
+ BFD_RELOC_H8_DIR24A8,
+ BFD_RELOC_H8_DIR24R8,
+ BFD_RELOC_H8_DIR32A16,
+
+/* Sony Xstormy16 Relocations. */
+ BFD_RELOC_XSTORMY16_REL_12,
+ BFD_RELOC_XSTORMY16_24,
+ BFD_RELOC_XSTORMY16_FPTR16,
BFD_RELOC_UNUSED };
typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
reloc_howto_type *
@@ -2702,7 +2983,7 @@ typedef struct symbol_cache_entry
/* The text of the symbol. The name is left alone, and not copied; the
application may not alter it. */
- CONST char *name;
+ const char *name;
/* The value of the symbol. This really should be a union of a
numeric value with a pointer, since some flags indicate that
@@ -2825,10 +3106,13 @@ boolean
bfd_set_symtab PARAMS ((bfd *abfd, asymbol **location, unsigned int count));
void
-bfd_print_symbol_vandf PARAMS ((PTR file, asymbol *symbol));
+bfd_print_symbol_vandf PARAMS ((bfd *abfd, PTR file, asymbol *symbol));
#define bfd_make_empty_symbol(abfd) \
BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))
+asymbol *
+_bfd_generic_make_empty_symbol PARAMS ((bfd *));
+
#define bfd_make_debug_symbol(abfd,ptr,size) \
BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size))
int
@@ -2849,7 +3133,7 @@ bfd_copy_private_symbol_data PARAMS ((bfd *ibfd, asymbol *isym, bfd *obfd, asymb
struct _bfd
{
/* The filename the application opened the BFD with. */
- CONST char *filename;
+ const char *filename;
/* A pointer to the target jump table. */
const struct bfd_target *xvec;
@@ -2882,7 +3166,7 @@ struct _bfd
/* When a file is closed by the caching routines, BFD retains
state information on the file here: */
- file_ptr where;
+ ufile_ptr where;
/* and here: (``once'' means at least once) */
@@ -2920,14 +3204,20 @@ struct _bfd
anything. I believe that this can become always an add of
origin, with origin set to 0 for non archive files. */
- file_ptr origin;
+ ufile_ptr origin;
/* Remember when output has begun, to stop strange things
from happening. */
boolean output_has_begun;
- /* Pointer to linked list of sections*/
- struct sec *sections;
+ /* A hash table for section names. */
+ struct bfd_hash_table section_htab;
+
+ /* Pointer to linked list of sections. */
+ struct sec *sections;
+
+ /* The place where we add to the section list. */
+ struct sec **section_tail;
/* The number of sections */
unsigned int section_count;
@@ -2979,6 +3269,7 @@ struct _bfd
struct elf_obj_tdata *elf_obj_data;
struct nlm_obj_tdata *nlm_obj_data;
struct bout_data_struct *bout_data;
+ struct mmo_data_struct *mmo_data;
struct sun_core_struct *sun_core_data;
struct sco5_core_struct *sco5_core_data;
struct trad_core_struct *trad_core_data;
@@ -3009,6 +3300,7 @@ typedef enum bfd_error
bfd_error_system_call,
bfd_error_invalid_target,
bfd_error_wrong_format,
+ bfd_error_wrong_object_format,
bfd_error_invalid_operation,
bfd_error_no_memory,
bfd_error_no_symbols,
@@ -3032,11 +3324,11 @@ bfd_get_error PARAMS ((void));
void
bfd_set_error PARAMS ((bfd_error_type error_tag));
-CONST char *
+const char *
bfd_errmsg PARAMS ((bfd_error_type error_tag));
void
-bfd_perror PARAMS ((CONST char *message));
+bfd_perror PARAMS ((const char *message));
typedef void (*bfd_error_handler_type) PARAMS ((const char *, ...));
@@ -3049,6 +3341,9 @@ bfd_set_error_program_name PARAMS ((const char *));
bfd_error_handler_type
bfd_get_error_handler PARAMS ((void));
+const char *
+bfd_archive_filename PARAMS ((bfd *));
+
long
bfd_get_reloc_upper_bound PARAMS ((bfd *abfd, asection *sect));
@@ -3081,14 +3376,14 @@ bfd_get_mtime PARAMS ((bfd *abfd));
long
bfd_get_size PARAMS ((bfd *abfd));
-int
+unsigned int
bfd_get_gp_size PARAMS ((bfd *abfd));
void
-bfd_set_gp_size PARAMS ((bfd *abfd, int i));
+bfd_set_gp_size PARAMS ((bfd *abfd, unsigned int i));
bfd_vma
-bfd_scan_vma PARAMS ((CONST char *string, CONST char **end, int base));
+bfd_scan_vma PARAMS ((const char *string, const char **end, int base));
boolean
bfd_copy_private_bfd_data PARAMS ((bfd *ibfd, bfd *obfd));
@@ -3140,6 +3435,9 @@ bfd_set_private_flags PARAMS ((bfd *abfd, flagword flags));
#define bfd_gc_sections(abfd, link_info) \
BFD_SEND (abfd, _bfd_gc_sections, (abfd, link_info))
+#define bfd_merge_sections(abfd, link_info) \
+ BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
+
#define bfd_link_hash_table_create(abfd) \
BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
@@ -3172,6 +3470,9 @@ extern bfd_byte *bfd_get_relocated_section_contents
struct bfd_link_order *, bfd_byte *,
boolean, asymbol **));
+boolean
+bfd_alt_mach_code PARAMS ((bfd *abfd, int index));
+
symindex
bfd_get_next_mapent PARAMS ((bfd *abfd, symindex previous, carsym **sym));
@@ -3181,7 +3482,7 @@ bfd_set_archive_head PARAMS ((bfd *output, bfd *new_head));
bfd *
bfd_openr_next_archived_file PARAMS ((bfd *archive, bfd *previous));
-CONST char *
+const char *
bfd_core_file_failing_command PARAMS ((bfd *abfd));
int
@@ -3228,7 +3529,8 @@ enum bfd_flavour {
bfd_target_versados_flavour,
bfd_target_msdos_flavour,
bfd_target_ovax_flavour,
- bfd_target_evax_flavour
+ bfd_target_evax_flavour,
+ bfd_target_mmo_flavour
};
enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN };
@@ -3247,237 +3549,232 @@ typedef struct bfd_target
char symbol_leading_char;
char ar_pad_char;
unsigned short ar_max_namelen;
- bfd_vma (*bfd_getx64) PARAMS ((const bfd_byte *));
+ bfd_vma (*bfd_getx64) PARAMS ((const bfd_byte *));
bfd_signed_vma (*bfd_getx_signed_64) PARAMS ((const bfd_byte *));
- void (*bfd_putx64) PARAMS ((bfd_vma, bfd_byte *));
- bfd_vma (*bfd_getx32) PARAMS ((const bfd_byte *));
+ void (*bfd_putx64) PARAMS ((bfd_vma, bfd_byte *));
+ bfd_vma (*bfd_getx32) PARAMS ((const bfd_byte *));
bfd_signed_vma (*bfd_getx_signed_32) PARAMS ((const bfd_byte *));
- void (*bfd_putx32) PARAMS ((bfd_vma, bfd_byte *));
- bfd_vma (*bfd_getx16) PARAMS ((const bfd_byte *));
+ void (*bfd_putx32) PARAMS ((bfd_vma, bfd_byte *));
+ bfd_vma (*bfd_getx16) PARAMS ((const bfd_byte *));
bfd_signed_vma (*bfd_getx_signed_16) PARAMS ((const bfd_byte *));
- void (*bfd_putx16) PARAMS ((bfd_vma, bfd_byte *));
- bfd_vma (*bfd_h_getx64) PARAMS ((const bfd_byte *));
+ void (*bfd_putx16) PARAMS ((bfd_vma, bfd_byte *));
+ bfd_vma (*bfd_h_getx64) PARAMS ((const bfd_byte *));
bfd_signed_vma (*bfd_h_getx_signed_64) PARAMS ((const bfd_byte *));
- void (*bfd_h_putx64) PARAMS ((bfd_vma, bfd_byte *));
- bfd_vma (*bfd_h_getx32) PARAMS ((const bfd_byte *));
+ void (*bfd_h_putx64) PARAMS ((bfd_vma, bfd_byte *));
+ bfd_vma (*bfd_h_getx32) PARAMS ((const bfd_byte *));
bfd_signed_vma (*bfd_h_getx_signed_32) PARAMS ((const bfd_byte *));
- void (*bfd_h_putx32) PARAMS ((bfd_vma, bfd_byte *));
- bfd_vma (*bfd_h_getx16) PARAMS ((const bfd_byte *));
+ void (*bfd_h_putx32) PARAMS ((bfd_vma, bfd_byte *));
+ bfd_vma (*bfd_h_getx16) PARAMS ((const bfd_byte *));
bfd_signed_vma (*bfd_h_getx_signed_16) PARAMS ((const bfd_byte *));
- void (*bfd_h_putx16) PARAMS ((bfd_vma, bfd_byte *));
+ void (*bfd_h_putx16) PARAMS ((bfd_vma, bfd_byte *));
const struct bfd_target *(*_bfd_check_format[bfd_type_end]) PARAMS ((bfd *));
- boolean (*_bfd_set_format[bfd_type_end]) PARAMS ((bfd *));
- boolean (*_bfd_write_contents[bfd_type_end]) PARAMS ((bfd *));
+ boolean (*_bfd_set_format[bfd_type_end]) PARAMS ((bfd *));
+ boolean (*_bfd_write_contents[bfd_type_end]) PARAMS ((bfd *));
/* Generic entry points. */
-#define BFD_JUMP_TABLE_GENERIC(NAME)\
-CAT(NAME,_close_and_cleanup),\
-CAT(NAME,_bfd_free_cached_info),\
-CAT(NAME,_new_section_hook),\
-CAT(NAME,_get_section_contents),\
-CAT(NAME,_get_section_contents_in_window)
+#define BFD_JUMP_TABLE_GENERIC(NAME) \
+CONCAT2 (NAME,_close_and_cleanup), \
+CONCAT2 (NAME,_bfd_free_cached_info), \
+CONCAT2 (NAME,_new_section_hook), \
+CONCAT2 (NAME,_get_section_contents), \
+CONCAT2 (NAME,_get_section_contents_in_window)
/* Called when the BFD is being closed to do any necessary cleanup. */
- boolean (*_close_and_cleanup) PARAMS ((bfd *));
+ boolean (*_close_and_cleanup) PARAMS ((bfd *));
/* Ask the BFD to free all cached information. */
- boolean (*_bfd_free_cached_info) PARAMS ((bfd *));
+ boolean (*_bfd_free_cached_info) PARAMS ((bfd *));
/* Called when a new section is created. */
- boolean (*_new_section_hook) PARAMS ((bfd *, sec_ptr));
+ boolean (*_new_section_hook) PARAMS ((bfd *, sec_ptr));
/* Read the contents of a section. */
- boolean (*_bfd_get_section_contents) PARAMS ((bfd *, sec_ptr, PTR,
- file_ptr, bfd_size_type));
- boolean (*_bfd_get_section_contents_in_window)
- PARAMS ((bfd *, sec_ptr, bfd_window *,
- file_ptr, bfd_size_type));
+ boolean (*_bfd_get_section_contents) PARAMS ((bfd *, sec_ptr, PTR,
+ file_ptr, bfd_size_type));
+ boolean (*_bfd_get_section_contents_in_window)
+ PARAMS ((bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type));
/* Entry points to copy private data. */
-#define BFD_JUMP_TABLE_COPY(NAME)\
-CAT(NAME,_bfd_copy_private_bfd_data),\
-CAT(NAME,_bfd_merge_private_bfd_data),\
-CAT(NAME,_bfd_copy_private_section_data),\
-CAT(NAME,_bfd_copy_private_symbol_data),\
-CAT(NAME,_bfd_set_private_flags),\
-CAT(NAME,_bfd_print_private_bfd_data)\
+#define BFD_JUMP_TABLE_COPY(NAME) \
+CONCAT2 (NAME,_bfd_copy_private_bfd_data), \
+CONCAT2 (NAME,_bfd_merge_private_bfd_data), \
+CONCAT2 (NAME,_bfd_copy_private_section_data), \
+CONCAT2 (NAME,_bfd_copy_private_symbol_data), \
+CONCAT2 (NAME,_bfd_set_private_flags), \
+CONCAT2 (NAME,_bfd_print_private_bfd_data) \
/* Called to copy BFD general private data from one object file
to another. */
- boolean (*_bfd_copy_private_bfd_data) PARAMS ((bfd *, bfd *));
+ boolean (*_bfd_copy_private_bfd_data) PARAMS ((bfd *, bfd *));
/* Called to merge BFD general private data from one object file
to a common output file when linking. */
- boolean (*_bfd_merge_private_bfd_data) PARAMS ((bfd *, bfd *));
+ boolean (*_bfd_merge_private_bfd_data) PARAMS ((bfd *, bfd *));
/* Called to copy BFD private section data from one object file
to another. */
- boolean (*_bfd_copy_private_section_data) PARAMS ((bfd *, sec_ptr,
- bfd *, sec_ptr));
+ boolean (*_bfd_copy_private_section_data) PARAMS ((bfd *, sec_ptr,
+ bfd *, sec_ptr));
/* Called to copy BFD private symbol data from one symbol
to another. */
- boolean (*_bfd_copy_private_symbol_data) PARAMS ((bfd *, asymbol *,
- bfd *, asymbol *));
+ boolean (*_bfd_copy_private_symbol_data) PARAMS ((bfd *, asymbol *,
+ bfd *, asymbol *));
/* Called to set private backend flags */
- boolean (*_bfd_set_private_flags) PARAMS ((bfd *, flagword));
+ boolean (*_bfd_set_private_flags) PARAMS ((bfd *, flagword));
/* Called to print private BFD data */
- boolean (*_bfd_print_private_bfd_data) PARAMS ((bfd *, PTR));
+ boolean (*_bfd_print_private_bfd_data) PARAMS ((bfd *, PTR));
/* Core file entry points. */
-#define BFD_JUMP_TABLE_CORE(NAME)\
-CAT(NAME,_core_file_failing_command),\
-CAT(NAME,_core_file_failing_signal),\
-CAT(NAME,_core_file_matches_executable_p)
+#define BFD_JUMP_TABLE_CORE(NAME) \
+CONCAT2 (NAME,_core_file_failing_command), \
+CONCAT2 (NAME,_core_file_failing_signal), \
+CONCAT2 (NAME,_core_file_matches_executable_p)
char * (*_core_file_failing_command) PARAMS ((bfd *));
int (*_core_file_failing_signal) PARAMS ((bfd *));
boolean (*_core_file_matches_executable_p) PARAMS ((bfd *, bfd *));
/* Archive entry points. */
-#define BFD_JUMP_TABLE_ARCHIVE(NAME)\
-CAT(NAME,_slurp_armap),\
-CAT(NAME,_slurp_extended_name_table),\
-CAT(NAME,_construct_extended_name_table),\
-CAT(NAME,_truncate_arname),\
-CAT(NAME,_write_armap),\
-CAT(NAME,_read_ar_hdr),\
-CAT(NAME,_openr_next_archived_file),\
-CAT(NAME,_get_elt_at_index),\
-CAT(NAME,_generic_stat_arch_elt),\
-CAT(NAME,_update_armap_timestamp)
+#define BFD_JUMP_TABLE_ARCHIVE(NAME) \
+CONCAT2 (NAME,_slurp_armap), \
+CONCAT2 (NAME,_slurp_extended_name_table), \
+CONCAT2 (NAME,_construct_extended_name_table), \
+CONCAT2 (NAME,_truncate_arname), \
+CONCAT2 (NAME,_write_armap), \
+CONCAT2 (NAME,_read_ar_hdr), \
+CONCAT2 (NAME,_openr_next_archived_file), \
+CONCAT2 (NAME,_get_elt_at_index), \
+CONCAT2 (NAME,_generic_stat_arch_elt), \
+CONCAT2 (NAME,_update_armap_timestamp)
boolean (*_bfd_slurp_armap) PARAMS ((bfd *));
boolean (*_bfd_slurp_extended_name_table) PARAMS ((bfd *));
boolean (*_bfd_construct_extended_name_table)
- PARAMS ((bfd *, char **, bfd_size_type *, const char **));
- void (*_bfd_truncate_arname) PARAMS ((bfd *, CONST char *, char *));
- boolean (*write_armap) PARAMS ((bfd *arch,
- unsigned int elength,
- struct orl *map,
- unsigned int orl_count,
- int stridx));
- PTR (*_bfd_read_ar_hdr_fn) PARAMS ((bfd *));
- bfd * (*openr_next_archived_file) PARAMS ((bfd *arch, bfd *prev));
+ PARAMS ((bfd *, char **, bfd_size_type *, const char **));
+ void (*_bfd_truncate_arname) PARAMS ((bfd *, const char *, char *));
+ boolean (*write_armap)
+ PARAMS ((bfd *, unsigned int, struct orl *, unsigned int, int));
+ PTR (*_bfd_read_ar_hdr_fn) PARAMS ((bfd *));
+ bfd * (*openr_next_archived_file) PARAMS ((bfd *, bfd *));
#define bfd_get_elt_at_index(b,i) BFD_SEND(b, _bfd_get_elt_at_index, (b,i))
bfd * (*_bfd_get_elt_at_index) PARAMS ((bfd *, symindex));
int (*_bfd_stat_arch_elt) PARAMS ((bfd *, struct stat *));
boolean (*_bfd_update_armap_timestamp) PARAMS ((bfd *));
/* Entry points used for symbols. */
-#define BFD_JUMP_TABLE_SYMBOLS(NAME)\
-CAT(NAME,_get_symtab_upper_bound),\
-CAT(NAME,_get_symtab),\
-CAT(NAME,_make_empty_symbol),\
-CAT(NAME,_print_symbol),\
-CAT(NAME,_get_symbol_info),\
-CAT(NAME,_bfd_is_local_label_name),\
-CAT(NAME,_get_lineno),\
-CAT(NAME,_find_nearest_line),\
-CAT(NAME,_bfd_make_debug_symbol),\
-CAT(NAME,_read_minisymbols),\
-CAT(NAME,_minisymbol_to_symbol)
- long (*_bfd_get_symtab_upper_bound) PARAMS ((bfd *));
- long (*_bfd_canonicalize_symtab) PARAMS ((bfd *,
- struct symbol_cache_entry **));
- struct symbol_cache_entry *
- (*_bfd_make_empty_symbol) PARAMS ((bfd *));
- void (*_bfd_print_symbol) PARAMS ((bfd *, PTR,
- struct symbol_cache_entry *,
- bfd_print_symbol_type));
+#define BFD_JUMP_TABLE_SYMBOLS(NAME) \
+CONCAT2 (NAME,_get_symtab_upper_bound), \
+CONCAT2 (NAME,_get_symtab), \
+CONCAT2 (NAME,_make_empty_symbol), \
+CONCAT2 (NAME,_print_symbol), \
+CONCAT2 (NAME,_get_symbol_info), \
+CONCAT2 (NAME,_bfd_is_local_label_name), \
+CONCAT2 (NAME,_get_lineno), \
+CONCAT2 (NAME,_find_nearest_line), \
+CONCAT2 (NAME,_bfd_make_debug_symbol), \
+CONCAT2 (NAME,_read_minisymbols), \
+CONCAT2 (NAME,_minisymbol_to_symbol)
+ long (*_bfd_get_symtab_upper_bound) PARAMS ((bfd *));
+ long (*_bfd_canonicalize_symtab) PARAMS ((bfd *,
+ struct symbol_cache_entry **));
+ struct symbol_cache_entry *
+ (*_bfd_make_empty_symbol) PARAMS ((bfd *));
+ void (*_bfd_print_symbol) PARAMS ((bfd *, PTR,
+ struct symbol_cache_entry *,
+ bfd_print_symbol_type));
#define bfd_print_symbol(b,p,s,e) BFD_SEND(b, _bfd_print_symbol, (b,p,s,e))
- void (*_bfd_get_symbol_info) PARAMS ((bfd *,
- struct symbol_cache_entry *,
- symbol_info *));
+ void (*_bfd_get_symbol_info) PARAMS ((bfd *,
+ struct symbol_cache_entry *,
+ symbol_info *));
#define bfd_get_symbol_info(b,p,e) BFD_SEND(b, _bfd_get_symbol_info, (b,p,e))
- boolean (*_bfd_is_local_label_name) PARAMS ((bfd *, const char *));
+ boolean (*_bfd_is_local_label_name) PARAMS ((bfd *, const char *));
- alent * (*_get_lineno) PARAMS ((bfd *, struct symbol_cache_entry *));
- boolean (*_bfd_find_nearest_line) PARAMS ((bfd *abfd,
- struct sec *section, struct symbol_cache_entry **symbols,
- bfd_vma offset, CONST char **file, CONST char **func,
- unsigned int *line));
+ alent * (*_get_lineno) PARAMS ((bfd *, struct symbol_cache_entry *));
+ boolean (*_bfd_find_nearest_line)
+ PARAMS ((bfd *, struct sec *, struct symbol_cache_entry **, bfd_vma,
+ const char **, const char **, unsigned int *));
/* Back-door to allow format-aware applications to create debug symbols
while using BFD for everything else. Currently used by the assembler
when creating COFF files. */
- asymbol * (*_bfd_make_debug_symbol) PARAMS ((
- bfd *abfd,
- void *ptr,
- unsigned long size));
+ asymbol *(*_bfd_make_debug_symbol) PARAMS ((bfd *, void *,
+ unsigned long size));
#define bfd_read_minisymbols(b, d, m, s) \
BFD_SEND (b, _read_minisymbols, (b, d, m, s))
- long (*_read_minisymbols) PARAMS ((bfd *, boolean, PTR *,
- unsigned int *));
+ long (*_read_minisymbols) PARAMS ((bfd *, boolean, PTR *,
+ unsigned int *));
#define bfd_minisymbol_to_symbol(b, d, m, f) \
BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f))
asymbol *(*_minisymbol_to_symbol) PARAMS ((bfd *, boolean, const PTR,
asymbol *));
/* Routines for relocs. */
-#define BFD_JUMP_TABLE_RELOCS(NAME)\
-CAT(NAME,_get_reloc_upper_bound),\
-CAT(NAME,_canonicalize_reloc),\
-CAT(NAME,_bfd_reloc_type_lookup)
- long (*_get_reloc_upper_bound) PARAMS ((bfd *, sec_ptr));
- long (*_bfd_canonicalize_reloc) PARAMS ((bfd *, sec_ptr, arelent **,
- struct symbol_cache_entry **));
+#define BFD_JUMP_TABLE_RELOCS(NAME) \
+CONCAT2 (NAME,_get_reloc_upper_bound), \
+CONCAT2 (NAME,_canonicalize_reloc), \
+CONCAT2 (NAME,_bfd_reloc_type_lookup)
+ long (*_get_reloc_upper_bound) PARAMS ((bfd *, sec_ptr));
+ long (*_bfd_canonicalize_reloc) PARAMS ((bfd *, sec_ptr, arelent **,
+ struct symbol_cache_entry **));
/* See documentation on reloc types. */
reloc_howto_type *
- (*reloc_type_lookup) PARAMS ((bfd *abfd,
- bfd_reloc_code_real_type code));
+ (*reloc_type_lookup) PARAMS ((bfd *, bfd_reloc_code_real_type));
/* Routines used when writing an object file. */
-#define BFD_JUMP_TABLE_WRITE(NAME)\
-CAT(NAME,_set_arch_mach),\
-CAT(NAME,_set_section_contents)
- boolean (*_bfd_set_arch_mach) PARAMS ((bfd *, enum bfd_architecture,
- unsigned long));
- boolean (*_bfd_set_section_contents) PARAMS ((bfd *, sec_ptr, PTR,
- file_ptr, bfd_size_type));
+#define BFD_JUMP_TABLE_WRITE(NAME) \
+CONCAT2 (NAME,_set_arch_mach), \
+CONCAT2 (NAME,_set_section_contents)
+ boolean (*_bfd_set_arch_mach) PARAMS ((bfd *, enum bfd_architecture,
+ unsigned long));
+ boolean (*_bfd_set_section_contents) PARAMS ((bfd *, sec_ptr, PTR,
+ file_ptr, bfd_size_type));
/* Routines used by the linker. */
-#define BFD_JUMP_TABLE_LINK(NAME)\
-CAT(NAME,_sizeof_headers),\
-CAT(NAME,_bfd_get_relocated_section_contents),\
-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_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 *,
- bfd_byte *data, boolean relocateable,
- struct symbol_cache_entry **));
-
- boolean (*_bfd_relax_section) PARAMS ((bfd *, struct sec *,
- struct bfd_link_info *, boolean *again));
+#define BFD_JUMP_TABLE_LINK(NAME) \
+CONCAT2 (NAME,_sizeof_headers), \
+CONCAT2 (NAME,_bfd_get_relocated_section_contents), \
+CONCAT2 (NAME,_bfd_relax_section), \
+CONCAT2 (NAME,_bfd_link_hash_table_create), \
+CONCAT2 (NAME,_bfd_link_add_symbols), \
+CONCAT2 (NAME,_bfd_final_link), \
+CONCAT2 (NAME,_bfd_link_split_section), \
+CONCAT2 (NAME,_bfd_gc_sections), \
+CONCAT2 (NAME,_bfd_merge_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 *,
+ bfd_byte *, boolean, struct symbol_cache_entry **));
+
+ boolean (*_bfd_relax_section)
+ PARAMS ((bfd *, struct sec *, struct bfd_link_info *, boolean *));
/* Create a hash table for the linker. Different backends store
different information in this table. */
struct bfd_link_hash_table *(*_bfd_link_hash_table_create) PARAMS ((bfd *));
/* Add symbols from this object file into the hash table. */
- boolean (*_bfd_link_add_symbols) PARAMS ((bfd *, struct bfd_link_info *));
+ boolean (*_bfd_link_add_symbols) PARAMS ((bfd *, struct bfd_link_info *));
/* Do a link based on the link_order structures attached to each
section of the BFD. */
- boolean (*_bfd_final_link) PARAMS ((bfd *, struct bfd_link_info *));
+ boolean (*_bfd_final_link) PARAMS ((bfd *, struct bfd_link_info *));
/* Should this section be split up into smaller pieces during linking. */
- boolean (*_bfd_link_split_section) PARAMS ((bfd *, struct sec *));
+ boolean (*_bfd_link_split_section) PARAMS ((bfd *, struct sec *));
/* Remove sections that are not referenced from the output. */
- boolean (*_bfd_gc_sections) PARAMS ((bfd *, struct bfd_link_info *));
+ boolean (*_bfd_gc_sections) PARAMS ((bfd *, struct bfd_link_info *));
+
+ /* Attempt to merge SEC_MERGE sections. */
+ boolean (*_bfd_merge_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),\
-CAT(NAME,_get_dynamic_reloc_upper_bound),\
-CAT(NAME,_canonicalize_dynamic_reloc)
+#define BFD_JUMP_TABLE_DYNAMIC(NAME) \
+CONCAT2 (NAME,_get_dynamic_symtab_upper_bound), \
+CONCAT2 (NAME,_canonicalize_dynamic_symtab), \
+CONCAT2 (NAME,_get_dynamic_reloc_upper_bound), \
+CONCAT2 (NAME,_canonicalize_dynamic_reloc)
/* Get the amount of memory required to hold the dynamic symbols. */
- long (*_bfd_get_dynamic_symtab_upper_bound) PARAMS ((bfd *));
+ long (*_bfd_get_dynamic_symtab_upper_bound) PARAMS ((bfd *));
/* Read in the dynamic symbols. */
- long (*_bfd_canonicalize_dynamic_symtab)
+ long (*_bfd_canonicalize_dynamic_symtab)
PARAMS ((bfd *, struct symbol_cache_entry **));
/* Get the amount of memory required to hold the dynamic relocs. */
- long (*_bfd_get_dynamic_reloc_upper_bound) PARAMS ((bfd *));
+ long (*_bfd_get_dynamic_reloc_upper_bound) PARAMS ((bfd *));
/* Read in the dynamic relocs. */
- long (*_bfd_canonicalize_dynamic_reloc)
+ long (*_bfd_canonicalize_dynamic_reloc)
PARAMS ((bfd *, arelent **, struct symbol_cache_entry **));
/* Opposite endian version of this target. */
@@ -3490,7 +3787,7 @@ boolean
bfd_set_default_target PARAMS ((const char *name));
const bfd_target *
-bfd_find_target PARAMS ((CONST char *target_name, bfd *abfd));
+bfd_find_target PARAMS ((const char *target_name, bfd *abfd));
const char **
bfd_target_list PARAMS ((void));
@@ -3507,7 +3804,7 @@ bfd_check_format_matches PARAMS ((bfd *abfd, bfd_format format, char ***matching
boolean
bfd_set_format PARAMS ((bfd *abfd, bfd_format format));
-CONST char *
+const char *
bfd_format_string PARAMS ((bfd_format format));
#ifdef __cplusplus
diff --git a/contrib/binutils/bfd/bfd.c b/contrib/binutils/bfd/bfd.c
index 3afcd3d..122f523 100644
--- a/contrib/binutils/bfd/bfd.c
+++ b/contrib/binutils/bfd/bfd.c
@@ -37,7 +37,7 @@ CODE_FRAGMENT
.struct _bfd
.{
. {* The filename the application opened the BFD with. *}
-. CONST char *filename;
+. const char *filename;
.
. {* A pointer to the target jump table. *}
. const struct bfd_target *xvec;
@@ -70,7 +70,7 @@ CODE_FRAGMENT
. {* When a file is closed by the caching routines, BFD retains
. state information on the file here: *}
.
-. file_ptr where;
+. ufile_ptr where;
.
. {* and here: (``once'' means at least once) *}
.
@@ -108,14 +108,20 @@ CODE_FRAGMENT
. anything. I believe that this can become always an add of
. origin, with origin set to 0 for non archive files. *}
.
-. file_ptr origin;
+. ufile_ptr origin;
.
. {* Remember when output has begun, to stop strange things
. from happening. *}
. boolean output_has_begun;
.
-. {* Pointer to linked list of sections*}
-. struct sec *sections;
+. {* A hash table for section names. *}
+. struct bfd_hash_table section_htab;
+.
+. {* Pointer to linked list of sections. *}
+. struct sec *sections;
+.
+. {* The place where we add to the section list. *}
+. struct sec **section_tail;
.
. {* The number of sections *}
. unsigned int section_count;
@@ -167,6 +173,7 @@ CODE_FRAGMENT
. struct elf_obj_tdata *elf_obj_data;
. struct nlm_obj_tdata *nlm_obj_data;
. struct bout_data_struct *bout_data;
+. struct mmo_data_struct *mmo_data;
. struct sun_core_struct *sun_core_data;
. struct sco5_core_struct *sco5_core_data;
. struct trad_core_struct *trad_core_data;
@@ -203,6 +210,7 @@ CODE_FRAGMENT
#endif
#include "libiberty.h"
+#include "safe-ctype.h"
#include "bfdlink.h"
#include "libbfd.h"
#include "coff/internal.h"
@@ -211,8 +219,6 @@ CODE_FRAGMENT
#include "libecoff.h"
#undef obj_symbols
#include "elf-bfd.h"
-
-#include <ctype.h>
/* provide storage for subsystem, stack and heap data which may have been
passed in on the command line. Ld puts this data into a bfd_link_info
@@ -248,6 +254,7 @@ CODE_FRAGMENT
. bfd_error_system_call,
. bfd_error_invalid_target,
. bfd_error_wrong_format,
+. bfd_error_wrong_object_format,
. bfd_error_invalid_operation,
. bfd_error_no_memory,
. bfd_error_no_symbols,
@@ -269,27 +276,29 @@ CODE_FRAGMENT
static bfd_error_type bfd_error = bfd_error_no_error;
-CONST char *CONST bfd_errmsgs[] = {
- 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>")
- };
+const char *const bfd_errmsgs[] =
+{
+ N_("No error"),
+ N_("System call error"),
+ N_("Invalid bfd target"),
+ N_("File in wrong format"),
+ N_("Archive object 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>")
+};
/*
FUNCTION
@@ -331,14 +340,14 @@ FUNCTION
bfd_errmsg
SYNOPSIS
- CONST char *bfd_errmsg (bfd_error_type error_tag);
+ const char *bfd_errmsg (bfd_error_type error_tag);
DESCRIPTION
Return a string describing the error @var{error_tag}, or
the system error if @var{error_tag} is <<bfd_error_system_call>>.
*/
-CONST char *
+const char *
bfd_errmsg (error_tag)
bfd_error_type error_tag;
{
@@ -348,8 +357,8 @@ bfd_errmsg (error_tag)
if (error_tag == bfd_error_system_call)
return xstrerror (errno);
- if ((((int)error_tag <(int) bfd_error_no_error) ||
- ((int)error_tag > (int)bfd_error_invalid_error_code)))
+ if ((((int) error_tag < (int) bfd_error_no_error) ||
+ ((int) error_tag > (int) bfd_error_invalid_error_code)))
error_tag = bfd_error_invalid_error_code;/* sanity check */
return _(bfd_errmsgs [(int)error_tag]);
@@ -360,7 +369,7 @@ FUNCTION
bfd_perror
SYNOPSIS
- void bfd_perror (CONST char *message);
+ void bfd_perror (const char *message);
DESCRIPTION
Print to the standard error stream a string describing the
@@ -372,16 +381,18 @@ DESCRIPTION
void
bfd_perror (message)
- CONST char *message;
+ const char *message;
{
if (bfd_get_error () == bfd_error_system_call)
- perror((char *)message); /* must be system error then... */
- else {
- if (message == NULL || *message == '\0')
- fprintf (stderr, "%s\n", bfd_errmsg (bfd_get_error ()));
- else
- fprintf (stderr, "%s: %s\n", message, bfd_errmsg (bfd_get_error ()));
- }
+ /* Must be a system error then. */
+ perror ((char *)message);
+ else
+ {
+ if (message == NULL || *message == '\0')
+ fprintf (stderr, "%s\n", bfd_errmsg (bfd_get_error ()));
+ else
+ fprintf (stderr, "%s: %s\n", message, bfd_errmsg (bfd_get_error ()));
+ }
}
/*
@@ -406,57 +417,24 @@ static const char *_bfd_error_program_name;
/* This is the default routine to handle BFD error messages. */
-#ifdef ANSI_PROTOTYPES
-
static void _bfd_default_error_handler PARAMS ((const char *s, ...));
static void
-_bfd_default_error_handler (const char *s, ...)
-{
- va_list p;
-
- if (_bfd_error_program_name != NULL)
- fprintf (stderr, "%s: ", _bfd_error_program_name);
- else
- fprintf (stderr, "BFD: ");
-
- va_start (p, s);
-
- vfprintf (stderr, s, p);
-
- va_end (p);
-
- fprintf (stderr, "\n");
-}
-
-#else /* ! defined (ANSI_PROTOTYPES) */
-
-static void _bfd_default_error_handler ();
-
-static void
-_bfd_default_error_handler (va_alist)
- va_dcl
+_bfd_default_error_handler VPARAMS ((const char *s, ...))
{
- va_list p;
- const char *s;
-
if (_bfd_error_program_name != NULL)
fprintf (stderr, "%s: ", _bfd_error_program_name);
else
fprintf (stderr, "BFD: ");
- va_start (p);
-
- s = va_arg (p, const char *);
+ VA_OPEN (p, s);
+ VA_FIXEDARG (p, const char *, s);
vfprintf (stderr, s, p);
-
- va_end (p);
+ VA_CLOSE (p);
fprintf (stderr, "\n");
}
-#endif /* ! defined (ANSI_PROTOTYPES) */
-
/* This is a function pointer to the routine which should handle BFD
error messages. It is called when a BFD routine encounters an
error for which it wants to print a message. Going through a
@@ -525,6 +503,54 @@ bfd_get_error_handler ()
{
return _bfd_error_handler;
}
+
+/*
+FUNCTION
+ bfd_archive_filename
+
+SYNOPSIS
+ const char *bfd_archive_filename (bfd *);
+
+DESCRIPTION
+ For a BFD that is a component of an archive, returns a string
+ with both the archive name and file name. For other BFDs, just
+ returns the file name.
+*/
+
+const char *
+bfd_archive_filename (abfd)
+ bfd *abfd;
+{
+ if (abfd->my_archive)
+ {
+ static size_t curr = 0;
+ static char *buf;
+ size_t needed;
+
+ needed = (strlen (bfd_get_filename (abfd->my_archive))
+ + strlen (bfd_get_filename (abfd)) + 3);
+ if (needed > curr)
+ {
+ if (curr)
+ free (buf);
+ curr = needed + (needed >> 1);
+ buf = bfd_malloc ((bfd_size_type) curr);
+ /* If we can't malloc, fail safe by returning just the file
+ name. This function is only used when building error
+ messages. */
+ if (!buf)
+ {
+ curr = 0;
+ return bfd_get_filename (abfd);
+ }
+ }
+ sprintf (buf, "%s(%s)", bfd_get_filename (abfd->my_archive),
+ bfd_get_filename (abfd));
+ return buf;
+ }
+ else
+ return bfd_get_filename (abfd);
+}
/*
SECTION
@@ -550,10 +576,11 @@ bfd_get_reloc_upper_bound (abfd, asect)
bfd *abfd;
sec_ptr asect;
{
- if (abfd->format != bfd_object) {
- bfd_set_error (bfd_error_invalid_operation);
- return -1;
- }
+ if (abfd->format != bfd_object)
+ {
+ bfd_set_error (bfd_error_invalid_operation);
+ return -1;
+ }
return BFD_SEND (abfd, _get_reloc_upper_bound, (abfd, asect));
}
@@ -589,10 +616,12 @@ bfd_canonicalize_reloc (abfd, asect, location, symbols)
arelent **location;
asymbol **symbols;
{
- if (abfd->format != bfd_object) {
- bfd_set_error (bfd_error_invalid_operation);
- return -1;
- }
+ if (abfd->format != bfd_object)
+ {
+ bfd_set_error (bfd_error_invalid_operation);
+ return -1;
+ }
+
return BFD_SEND (abfd, _bfd_canonicalize_reloc,
(abfd, asect, location, symbols));
}
@@ -648,23 +677,26 @@ bfd_set_file_flags (abfd, flags)
bfd *abfd;
flagword flags;
{
- if (abfd->format != bfd_object) {
- bfd_set_error (bfd_error_wrong_format);
- return false;
- }
+ if (abfd->format != bfd_object)
+ {
+ bfd_set_error (bfd_error_wrong_format);
+ return false;
+ }
- if (bfd_read_p (abfd)) {
- bfd_set_error (bfd_error_invalid_operation);
- return false;
- }
+ if (bfd_read_p (abfd))
+ {
+ bfd_set_error (bfd_error_invalid_operation);
+ return false;
+ }
bfd_get_file_flags (abfd) = flags;
- if ((flags & bfd_applicable_file_flags (abfd)) != flags) {
- bfd_set_error (bfd_error_invalid_operation);
- return false;
- }
+ if ((flags & bfd_applicable_file_flags (abfd)) != flags)
+ {
+ bfd_set_error (bfd_error_invalid_operation);
+ return false;
+ }
-return true;
+ return true;
}
void
@@ -672,7 +704,8 @@ bfd_assert (file, line)
const char *file;
int line;
{
- (*_bfd_error_handler) (_("bfd assertion fail %s:%d"), file, line);
+ (*_bfd_error_handler) (_("BFD %s assertion fail %s:%d"),
+ BFD_VERSION_STRING, file, line);
}
/* A more or less friendly abort message. In libbfd.h abort is
@@ -690,12 +723,12 @@ _bfd_abort (file, line, fn)
{
if (fn != NULL)
(*_bfd_error_handler)
- (_("BFD internal error, aborting at %s line %d in %s\n"),
- file, line, fn);
+ (_("BFD %s internal error, aborting at %s line %d in %s\n"),
+ BFD_VERSION_STRING, file, line, fn);
else
(*_bfd_error_handler)
- (_("BFD internal error, aborting at %s line %d\n"),
- file, line);
+ (_("BFD %s internal error, aborting at %s line %d\n"),
+ BFD_VERSION_STRING, file, line);
(*_bfd_error_handler) (_("Please report this bug.\n"));
xexit (EXIT_FAILURE);
}
@@ -752,9 +785,21 @@ int
bfd_get_sign_extend_vma (abfd)
bfd *abfd;
{
+ char *name;
+
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
return (get_elf_backend_data (abfd)->sign_extend_vma);
+ name = bfd_get_target (abfd);
+
+ /* Return a proper value for DJGPP COFF (an x86 COFF variant).
+ This function is required for DWARF2 support, but there is
+ no place to store this information in the COFF back end.
+ Should enough other COFF targets add support for DWARF2,
+ a place will have to be found. Until then, this hack will do. */
+ if (strncmp (name, "coff-go32", sizeof ("coff-go32") - 1) == 0)
+ return 1;
+
bfd_set_error (bfd_error_wrong_format);
return -1;
}
@@ -774,9 +819,9 @@ RETURNS
*/
boolean
-bfd_set_start_address(abfd, vma)
-bfd *abfd;
-bfd_vma vma;
+bfd_set_start_address (abfd, vma)
+ bfd *abfd;
+ bfd_vma vma;
{
abfd->start_address = vma;
return true;
@@ -857,7 +902,7 @@ bfd_get_size (abfd)
return ((struct bfd_in_memory *) abfd->iostream)->size;
fp = bfd_cache_lookup (abfd);
- if (0 != fstat (fileno (fp), &buf))
+ if (0 != fstat (fileno (fp), & buf))
return 0;
return buf.st_size;
@@ -868,7 +913,7 @@ FUNCTION
bfd_get_gp_size
SYNOPSIS
- int bfd_get_gp_size(bfd *abfd);
+ unsigned int bfd_get_gp_size(bfd *abfd);
DESCRIPTION
Return the maximum size of objects to be optimized using the GP
@@ -876,7 +921,7 @@ DESCRIPTION
argument to the compiler, assembler or linker.
*/
-int
+unsigned int
bfd_get_gp_size (abfd)
bfd *abfd;
{
@@ -895,7 +940,7 @@ FUNCTION
bfd_set_gp_size
SYNOPSIS
- void bfd_set_gp_size(bfd *abfd, int i);
+ void bfd_set_gp_size(bfd *abfd, unsigned int i);
DESCRIPTION
Set the maximum size of objects to be optimized using the GP
@@ -906,11 +951,12 @@ DESCRIPTION
void
bfd_set_gp_size (abfd, i)
bfd *abfd;
- int i;
+ unsigned int i;
{
- /* Don't try to set GP size on an archive or core file! */
+ /* Don't try to set GP size on an archive or core file! */
if (abfd->format != bfd_object)
return;
+
if (abfd->xvec->flavour == bfd_target_ecoff_flavour)
ecoff_data (abfd)->gp_size = i;
else if (abfd->xvec->flavour == bfd_target_elf_flavour)
@@ -925,13 +971,14 @@ bfd_vma
_bfd_get_gp_value (abfd)
bfd *abfd;
{
- if (abfd->format == bfd_object)
- {
- if (abfd->xvec->flavour == bfd_target_ecoff_flavour)
- return ecoff_data (abfd)->gp;
- else if (abfd->xvec->flavour == bfd_target_elf_flavour)
- return elf_gp (abfd);
- }
+ if (abfd->format != bfd_object)
+ return 0;
+
+ if (abfd->xvec->flavour == bfd_target_ecoff_flavour)
+ return ecoff_data (abfd)->gp;
+ else if (abfd->xvec->flavour == bfd_target_elf_flavour)
+ return elf_gp (abfd);
+
return 0;
}
@@ -944,6 +991,7 @@ _bfd_set_gp_value (abfd, v)
{
if (abfd->format != bfd_object)
return;
+
if (abfd->xvec->flavour == bfd_target_ecoff_flavour)
ecoff_data (abfd)->gp = v;
else if (abfd->xvec->flavour == bfd_target_elf_flavour)
@@ -955,7 +1003,7 @@ FUNCTION
bfd_scan_vma
SYNOPSIS
- bfd_vma bfd_scan_vma(CONST char *string, CONST char **end, int base);
+ bfd_vma bfd_scan_vma(const char *string, const char **end, int base);
DESCRIPTION
Convert, like <<strtoul>>, a numerical expression
@@ -972,8 +1020,8 @@ DESCRIPTION
bfd_vma
bfd_scan_vma (string, end, base)
- CONST char *string;
- CONST char **end;
+ const char *string;
+ const char **end;
int base;
{
bfd_vma value;
@@ -993,33 +1041,32 @@ bfd_scan_vma (string, end, base)
{
if ((string[1] == 'x') || (string[1] == 'X'))
base = 16;
- /* XXX should we also allow "0b" or "0B" to set base to 2? */
+ /* XXX should we also allow "0b" or "0B" to set base to 2? */
else
base = 8;
}
else
base = 10;
}
+
if ((base == 16) &&
(string[0] == '0') && ((string[1] == 'x') || (string[1] == 'X')))
string += 2;
- /* XXX should we also skip over "0b" or "0B" if base is 2? */
+ /* XXX should we also skip over "0b" or "0B" if base is 2? */
/* Speed could be improved with a table like hex_value[] in gas. */
#define HEX_VALUE(c) \
- (isxdigit ((unsigned char) c) \
- ? (isdigit ((unsigned char) c) \
+ (ISXDIGIT (c) \
+ ? (ISDIGIT (c) \
? (c - '0') \
- : (10 + c - (islower ((unsigned char) c) ? 'a' : 'A'))) \
+ : (10 + c - (ISLOWER (c) ? 'a' : 'A'))) \
: 42)
- for (value = 0; (digit = HEX_VALUE(*string)) < base; string++)
- {
- value = value * base + digit;
- }
+ for (value = 0; (digit = HEX_VALUE (* string)) < base; string ++)
+ value = value * base + digit;
if (end)
- *end = string;
+ * end = string;
return value;
}
@@ -1126,6 +1173,9 @@ DESCRIPTION
.#define bfd_gc_sections(abfd, link_info) \
. BFD_SEND (abfd, _bfd_gc_sections, (abfd, link_info))
.
+.#define bfd_merge_sections(abfd, link_info) \
+. BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
+.
.#define bfd_link_hash_table_create(abfd) \
. BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
.
@@ -1179,11 +1229,12 @@ bfd_get_relocated_section_contents (abfd, link_info, link_order, data,
if (link_order->type == bfd_indirect_link_order)
{
abfd2 = link_order->u.indirect.section->owner;
- if (abfd2 == 0)
+ if (abfd2 == NULL)
abfd2 = abfd;
}
else
abfd2 = abfd;
+
fn = abfd2->xvec->_bfd_get_relocated_section_contents;
return (*fn) (abfd, link_info, link_order, data, relocateable, symbols);
@@ -1206,14 +1257,14 @@ bfd_record_phdr (abfd, type, flags_valid, flags, at_valid, at,
asection **secs;
{
struct elf_segment_map *m, **pm;
+ bfd_size_type amt;
if (bfd_get_flavour (abfd) != bfd_target_elf_flavour)
return true;
- m = ((struct elf_segment_map *)
- bfd_alloc (abfd,
- (sizeof (struct elf_segment_map)
- + ((size_t) count - 1) * sizeof (asection *))));
+ amt = sizeof (struct elf_segment_map);
+ amt += ((bfd_size_type) count - 1) * sizeof (asection *);
+ m = (struct elf_segment_map *) bfd_alloc (abfd, amt);
if (m == NULL)
return false;
@@ -1235,3 +1286,82 @@ bfd_record_phdr (abfd, type, flags_valid, flags, at_valid, at,
return true;
}
+
+void
+bfd_sprintf_vma (abfd, buf, value)
+ bfd *abfd;
+ char *buf;
+ bfd_vma value;
+{
+ if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
+ get_elf_backend_data (abfd)->elf_backend_sprintf_vma (abfd, buf, value);
+ else
+ sprintf_vma (buf, value);
+}
+
+void
+bfd_fprintf_vma (abfd, stream, value)
+ bfd *abfd;
+ PTR stream;
+ bfd_vma value;
+{
+ if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
+ get_elf_backend_data (abfd)->elf_backend_fprintf_vma (abfd, stream, value);
+ else
+ fprintf_vma ((FILE *) stream, value);
+}
+
+/*
+FUNCTION
+ bfd_alt_mach_code
+
+SYNOPSIS
+ boolean bfd_alt_mach_code(bfd *abfd, int index);
+
+DESCRIPTION
+
+ When more than one machine code number is available for the
+ same machine type, this function can be used to switch between
+ the preferred one (index == 0) and any others. Currently,
+ only ELF supports this feature, with up to two alternate
+ machine codes.
+*/
+
+boolean
+bfd_alt_mach_code (abfd, index)
+ bfd *abfd;
+ int index;
+{
+ if (bfd_get_flavour (abfd) == bfd_target_elf_flavour)
+ {
+ int code;
+
+ switch (index)
+ {
+ case 0:
+ code = get_elf_backend_data (abfd)->elf_machine_code;
+ break;
+
+ case 1:
+ code = get_elf_backend_data (abfd)->elf_machine_alt1;
+ if (code == 0)
+ return false;
+ break;
+
+ case 2:
+ code = get_elf_backend_data (abfd)->elf_machine_alt2;
+ if (code == 0)
+ return false;
+ break;
+
+ default:
+ return false;
+ }
+
+ elf_elfheader (abfd)->e_machine = code;
+
+ return true;
+ }
+
+ return false;
+}
diff --git a/contrib/binutils/bfd/binary.c b/contrib/binutils/bfd/binary.c
index b80343b..705ac8f 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, 1995, 1996, 1997, 1998, 1999, 2000
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support, <ian@cygnus.com>
@@ -32,10 +32,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
the file. objcopy cooperates by specially setting the start
address to zero by default. */
-#include <ctype.h>
-
#include "bfd.h"
#include "sysdep.h"
+#include "safe-ctype.h"
#include "libbfd.h"
/* Any bfd we create by reading a binary file has three symbols:
@@ -49,12 +48,15 @@ static boolean binary_get_section_contents
static long binary_get_symtab_upper_bound PARAMS ((bfd *));
static char *mangle_name PARAMS ((bfd *, char *));
static long binary_get_symtab PARAMS ((bfd *, asymbol **));
-static asymbol *binary_make_empty_symbol PARAMS ((bfd *));
static void binary_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *));
static boolean binary_set_section_contents
PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
static int binary_sizeof_headers PARAMS ((bfd *, boolean));
+/* Set by external programs - specifies the BFD architecture
+ to use when creating binary BFDs. */
+enum bfd_architecture bfd_external_binary_architecture = bfd_arch_unknown;
+
/* Create a binary object. Invoked via bfd_set_format. */
static boolean
@@ -101,6 +103,13 @@ binary_object_p (abfd)
abfd->tdata.any = (PTR) sec;
+ if (bfd_get_arch_info (abfd) != NULL)
+ {
+ if ((bfd_get_arch_info (abfd)->arch == bfd_arch_unknown)
+ && (bfd_external_binary_architecture != bfd_arch_unknown))
+ bfd_set_arch_info (abfd, bfd_lookup_arch (bfd_external_binary_architecture, 0));
+ }
+
return abfd->xvec;
}
@@ -119,7 +128,7 @@ binary_get_section_contents (abfd, section, location, offset, count)
bfd_size_type count;
{
if (bfd_seek (abfd, offset, SEEK_SET) != 0
- || bfd_read (location, 1, count, abfd) != count)
+ || bfd_bread (location, count, abfd) != count)
return false;
return true;
}
@@ -140,7 +149,7 @@ mangle_name (abfd, suffix)
bfd *abfd;
char *suffix;
{
- int size;
+ bfd_size_type size;
char *buf;
char *p;
@@ -156,7 +165,7 @@ mangle_name (abfd, suffix)
/* Change any non-alphanumeric characters to underscores. */
for (p = buf; *p; p++)
- if (! isalnum ((unsigned char) *p))
+ if (! ISALNUM (*p))
*p = '_';
return buf;
@@ -172,8 +181,9 @@ binary_get_symtab (abfd, alocation)
asection *sec = (asection *) abfd->tdata.any;
asymbol *syms;
unsigned int i;
+ bfd_size_type amt = BIN_SYMS * sizeof (asymbol);
- syms = (asymbol *) bfd_alloc (abfd, BIN_SYMS * sizeof (asymbol));
+ syms = (asymbol *) bfd_alloc (abfd, amt);
if (syms == NULL)
return false;
@@ -208,15 +218,7 @@ binary_get_symtab (abfd, alocation)
return BIN_SYMS;
}
-/* Make an empty symbol. */
-
-static asymbol *
-binary_make_empty_symbol (abfd)
- bfd *abfd;
-{
- return (asymbol *) bfd_alloc (abfd, sizeof (asymbol));
-}
-
+#define binary_make_empty_symbol _bfd_generic_make_empty_symbol
#define binary_print_symbol _bfd_nosymbols_print_symbol
/* Get information about a symbol. */
@@ -334,6 +336,7 @@ binary_sizeof_headers (abfd, exec)
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_merge_sections bfd_generic_merge_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
diff --git a/contrib/binutils/bfd/cache.c b/contrib/binutils/bfd/cache.c
index da16409..4e5ef2e 100644
--- a/contrib/binutils/bfd/cache.c
+++ b/contrib/binutils/bfd/cache.c
@@ -364,7 +364,9 @@ bfd_cache_lookup_worker (abfd)
{
if (bfd_open_file (abfd) == NULL)
return NULL;
- if (fseek ((FILE *) abfd->iostream, abfd->where, SEEK_SET) != 0)
+ if (abfd->where != (unsigned long) abfd->where)
+ return NULL;
+ if (fseek ((FILE *) abfd->iostream, (long) abfd->where, SEEK_SET) != 0)
return NULL;
}
diff --git a/contrib/binutils/bfd/coff-alpha.c b/contrib/binutils/bfd/coff-alpha.c
index b3cd0c7..4056e2c 100644
--- a/contrib/binutils/bfd/coff-alpha.c
+++ b/contrib/binutils/bfd/coff-alpha.c
@@ -76,32 +76,32 @@ static bfd *alpha_ecoff_get_elt_at_index PARAMS ((bfd *, symindex));
symbol, and lineno ones. Give them ecoff names. Define some
accessor macros for the large sizes used for Alpha ECOFF. */
-#define GET_FILEHDR_SYMPTR bfd_h_get_64
-#define PUT_FILEHDR_SYMPTR bfd_h_put_64
-#define GET_AOUTHDR_TSIZE bfd_h_get_64
-#define PUT_AOUTHDR_TSIZE bfd_h_put_64
-#define GET_AOUTHDR_DSIZE bfd_h_get_64
-#define PUT_AOUTHDR_DSIZE bfd_h_put_64
-#define GET_AOUTHDR_BSIZE bfd_h_get_64
-#define PUT_AOUTHDR_BSIZE bfd_h_put_64
-#define GET_AOUTHDR_ENTRY bfd_h_get_64
-#define PUT_AOUTHDR_ENTRY bfd_h_put_64
-#define GET_AOUTHDR_TEXT_START bfd_h_get_64
-#define PUT_AOUTHDR_TEXT_START bfd_h_put_64
-#define GET_AOUTHDR_DATA_START bfd_h_get_64
-#define PUT_AOUTHDR_DATA_START bfd_h_put_64
-#define GET_SCNHDR_PADDR bfd_h_get_64
-#define PUT_SCNHDR_PADDR bfd_h_put_64
-#define GET_SCNHDR_VADDR bfd_h_get_64
-#define PUT_SCNHDR_VADDR bfd_h_put_64
-#define GET_SCNHDR_SIZE bfd_h_get_64
-#define PUT_SCNHDR_SIZE bfd_h_put_64
-#define GET_SCNHDR_SCNPTR bfd_h_get_64
-#define PUT_SCNHDR_SCNPTR bfd_h_put_64
-#define GET_SCNHDR_RELPTR bfd_h_get_64
-#define PUT_SCNHDR_RELPTR bfd_h_put_64
-#define GET_SCNHDR_LNNOPTR bfd_h_get_64
-#define PUT_SCNHDR_LNNOPTR bfd_h_put_64
+#define GET_FILEHDR_SYMPTR H_GET_64
+#define PUT_FILEHDR_SYMPTR H_PUT_64
+#define GET_AOUTHDR_TSIZE H_GET_64
+#define PUT_AOUTHDR_TSIZE H_PUT_64
+#define GET_AOUTHDR_DSIZE H_GET_64
+#define PUT_AOUTHDR_DSIZE H_PUT_64
+#define GET_AOUTHDR_BSIZE H_GET_64
+#define PUT_AOUTHDR_BSIZE H_PUT_64
+#define GET_AOUTHDR_ENTRY H_GET_64
+#define PUT_AOUTHDR_ENTRY H_PUT_64
+#define GET_AOUTHDR_TEXT_START H_GET_64
+#define PUT_AOUTHDR_TEXT_START H_PUT_64
+#define GET_AOUTHDR_DATA_START H_GET_64
+#define PUT_AOUTHDR_DATA_START H_PUT_64
+#define GET_SCNHDR_PADDR H_GET_64
+#define PUT_SCNHDR_PADDR H_PUT_64
+#define GET_SCNHDR_VADDR H_GET_64
+#define PUT_SCNHDR_VADDR H_PUT_64
+#define GET_SCNHDR_SIZE H_GET_64
+#define PUT_SCNHDR_SIZE H_PUT_64
+#define GET_SCNHDR_SCNPTR H_GET_64
+#define PUT_SCNHDR_SCNPTR H_PUT_64
+#define GET_SCNHDR_RELPTR H_GET_64
+#define PUT_SCNHDR_RELPTR H_PUT_64
+#define GET_SCNHDR_LNNOPTR H_GET_64
+#define PUT_SCNHDR_LNNOPTR H_PUT_64
#define ALPHAECOFF
@@ -530,8 +530,8 @@ alpha_ecoff_swap_reloc_in (abfd, ext_ptr, intern)
{
const RELOC *ext = (RELOC *) ext_ptr;
- intern->r_vaddr = bfd_h_get_64 (abfd, (bfd_byte *) ext->r_vaddr);
- intern->r_symndx = bfd_h_get_32 (abfd, (bfd_byte *) ext->r_symndx);
+ intern->r_vaddr = H_GET_64 (abfd, ext->r_vaddr);
+ intern->r_symndx = H_GET_32 (abfd, ext->r_symndx);
BFD_ASSERT (bfd_header_little_endian (abfd));
@@ -603,8 +603,8 @@ alpha_ecoff_swap_reloc_out (abfd, intern, dst)
BFD_ASSERT (intern->r_extern
|| (intern->r_symndx >= 0 && intern->r_symndx <= 14));
- bfd_h_put_64 (abfd, intern->r_vaddr, (bfd_byte *) ext->r_vaddr);
- bfd_h_put_32 (abfd, symndx, (bfd_byte *) ext->r_symndx);
+ H_PUT_64 (abfd, intern->r_vaddr, ext->r_vaddr);
+ H_PUT_32 (abfd, symndx, ext->r_symndx);
BFD_ASSERT (bfd_header_little_endian (abfd));
@@ -771,7 +771,7 @@ alpha_ecoff_get_relocated_section_contents (abfd, link_info, link_order,
if (reloc_size < 0)
goto error_return;
- reloc_vector = (arelent **) bfd_malloc (reloc_size);
+ reloc_vector = (arelent **) bfd_malloc ((bfd_size_type) reloc_size);
if (reloc_vector == NULL && reloc_size != 0)
goto error_return;
@@ -1277,7 +1277,7 @@ alpha_convert_external_reloc (output_bfd, info, input_bfd, ext_rel, h)
hsec = h->root.u.def.section;
name = bfd_get_section_name (output_bfd, hsec->output_section);
- r_symndx = -1;
+ r_symndx = (unsigned long) -1;
switch (name[1])
{
case 'A':
@@ -1334,7 +1334,7 @@ alpha_convert_external_reloc (output_bfd, info, input_bfd, ext_rel, h)
break;
}
- if (r_symndx == -1)
+ if (r_symndx == (unsigned long) -1)
abort ();
/* Add the section VMA and the symbol value. */
@@ -1347,7 +1347,7 @@ alpha_convert_external_reloc (output_bfd, info, input_bfd, ext_rel, h)
/* Change the symndx value to the right one for
the output BFD. */
r_symndx = h->indx;
- if (r_symndx == -1)
+ if (r_symndx == (unsigned long) -1)
{
/* Caller must give an error. */
r_symndx = 0;
@@ -1356,8 +1356,7 @@ alpha_convert_external_reloc (output_bfd, info, input_bfd, ext_rel, h)
}
/* Write out the new r_symndx value. */
- bfd_h_put_32 (input_bfd, (bfd_vma) r_symndx,
- (bfd_byte *) ext_rel->r_symndx);
+ H_PUT_32 (input_bfd, r_symndx, ext_rel->r_symndx);
return relocation;
}
@@ -1384,6 +1383,7 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
int tos = 0;
struct external_reloc *ext_rel;
struct external_reloc *ext_rel_end;
+ bfd_size_type amt;
/* We keep a table mapping the symndx found in an internal reloc to
the appropriate section. This is faster than looking up the
@@ -1391,10 +1391,8 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
symndx_to_section = ecoff_data (input_bfd)->symndx_to_section;
if (symndx_to_section == (asection **) NULL)
{
- symndx_to_section = ((asection **)
- bfd_alloc (input_bfd,
- (NUM_RELOC_SECTIONS
- * sizeof (asection *))));
+ amt = NUM_RELOC_SECTIONS * sizeof (asection *);
+ symndx_to_section = (asection **) bfd_alloc (input_bfd, amt);
if (!symndx_to_section)
return false;
@@ -1451,9 +1449,9 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
lita_sec_data = ecoff_section_data (input_bfd, lita_sec);
if (lita_sec_data == NULL)
{
+ amt = sizeof (struct ecoff_section_tdata);
lita_sec_data = ((struct ecoff_section_tdata *)
- bfd_zalloc (input_bfd,
- sizeof (struct ecoff_section_tdata)));
+ bfd_zalloc (input_bfd, amt));
ecoff_section_data (input_bfd, lita_sec) = lita_sec_data;
}
@@ -1522,8 +1520,8 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
boolean gp_usedp;
bfd_vma addend;
- r_vaddr = bfd_h_get_64 (input_bfd, (bfd_byte *) ext_rel->r_vaddr);
- r_symndx = bfd_h_get_32 (input_bfd, (bfd_byte *) ext_rel->r_symndx);
+ r_vaddr = H_GET_64 (input_bfd, ext_rel->r_vaddr);
+ r_symndx = H_GET_32 (input_bfd, ext_rel->r_symndx);
r_type = ((ext_rel->r_bits[0] & RELOC_BITS0_TYPE_LITTLE)
>> RELOC_BITS0_TYPE_SH_LITTLE);
@@ -1552,9 +1550,8 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
address of the relocation does not appear to include the
section VMA, unlike the other relocation types. */
if (info->relocateable)
- bfd_h_put_64 (input_bfd,
- input_section->output_offset + r_vaddr,
- (bfd_byte *) ext_rel->r_vaddr);
+ H_PUT_64 (input_bfd, input_section->output_offset + r_vaddr,
+ ext_rel->r_vaddr);
adjust_addrp = false;
break;
@@ -1751,8 +1748,7 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
if (info->relocateable)
{
/* Adjust r_vaddr by the addend. */
- bfd_h_put_64 (input_bfd, addend,
- (bfd_byte *) ext_rel->r_vaddr);
+ H_PUT_64 (input_bfd, addend, ext_rel->r_vaddr);
}
else
{
@@ -1979,18 +1975,18 @@ alpha_relocate_section (output_bfd, info, input_bfd, input_section,
if (info->relocateable && adjust_addrp)
{
/* Change the address of the relocation. */
- bfd_h_put_64 (input_bfd,
- (input_section->output_section->vma
- + input_section->output_offset
- - input_section->vma
- + r_vaddr),
- (bfd_byte *) ext_rel->r_vaddr);
+ H_PUT_64 (input_bfd,
+ (input_section->output_section->vma
+ + input_section->output_offset
+ - input_section->vma
+ + r_vaddr),
+ ext_rel->r_vaddr);
}
if (gp_usedp && gp_undefined)
{
if (! ((*info->callbacks->reloc_dangerous)
- (info, _("GP relative relocation when GP not defined"),
+ (info, _("GP relative relocation used when GP not defined"),
input_bfd, input_section, r_vaddr - input_section->vma)))
return false;
/* Only give the error once per link. */
@@ -2062,12 +2058,12 @@ alpha_ecoff_read_ar_hdr (abfd)
/* This is a compressed file. We must set the size correctly.
The size is the eight bytes after the dummy file header. */
- if (bfd_seek (abfd, FILHSZ, SEEK_CUR) != 0
- || bfd_read (ab, 1, 8, abfd) != 8
- || bfd_seek (abfd, - (FILHSZ + 8), SEEK_CUR) != 0)
+ if (bfd_seek (abfd, (file_ptr) FILHSZ, SEEK_CUR) != 0
+ || bfd_bread (ab, (bfd_size_type) 8, abfd) != 8
+ || bfd_seek (abfd, (file_ptr) (- (FILHSZ + 8)), SEEK_CUR) != 0)
return NULL;
- ret->parsed_size = bfd_h_get_64 (abfd, ab);
+ ret->parsed_size = H_GET_64 (abfd, ab);
}
return (PTR) ret;
@@ -2105,20 +2101,20 @@ alpha_ecoff_get_elt_at_filepos (archive, filepos)
return nbfd;
/* We must uncompress this element. We do this by copying it into a
- memory buffer, and making bfd_read and bfd_seek use that buffer.
+ memory buffer, and making bfd_bread and bfd_seek use that buffer.
This can use a lot of memory, but it's simpler than getting a
temporary file, making that work with the file descriptor caching
code, and making sure that it is deleted at all appropriate
times. It can be changed if it ever becomes important. */
/* The compressed file starts with a dummy ECOFF file header. */
- if (bfd_seek (nbfd, FILHSZ, SEEK_SET) != 0)
+ if (bfd_seek (nbfd, (file_ptr) FILHSZ, SEEK_SET) != 0)
goto error_return;
/* The next eight bytes are the real file size. */
- if (bfd_read (ab, 1, 8, nbfd) != 8)
+ if (bfd_bread (ab, (bfd_size_type) 8, nbfd) != 8)
goto error_return;
- size = bfd_h_get_64 (nbfd, ab);
+ size = H_GET_64 (nbfd, ab);
if (size == 0)
buf = NULL;
@@ -2137,7 +2133,7 @@ alpha_ecoff_get_elt_at_filepos (archive, filepos)
left = size;
/* I don't know what the next eight bytes are for. */
- if (bfd_read (ab, 1, 8, nbfd) != 8)
+ if (bfd_bread (ab, (bfd_size_type) 8, nbfd) != 8)
goto error_return;
/* This is the uncompression algorithm. It's a simple
@@ -2148,7 +2144,7 @@ alpha_ecoff_get_elt_at_filepos (archive, filepos)
next eight bytes in the output stream. */
memset (dict, 0, sizeof dict);
h = 0;
- while (bfd_read (&b, 1, 1, nbfd) == 1)
+ while (bfd_bread (&b, (bfd_size_type) 1, nbfd) == 1)
{
unsigned int i;
@@ -2160,7 +2156,7 @@ alpha_ecoff_get_elt_at_filepos (archive, filepos)
n = dict[h];
else
{
- if (! bfd_read (&n, 1, 1, nbfd))
+ if (! bfd_bread (&n, (bfd_size_type) 1, nbfd))
goto error_return;
dict[h] = n;
}
@@ -2183,7 +2179,7 @@ alpha_ecoff_get_elt_at_filepos (archive, filepos)
/* Now the uncompressed file contents are in buf. */
bim = ((struct bfd_in_memory *)
- bfd_alloc (nbfd, sizeof (struct bfd_in_memory)));
+ bfd_alloc (nbfd, (bfd_size_type) sizeof (struct bfd_in_memory)));
if (bim == NULL)
goto error_return;
bim->size = size;
@@ -2359,6 +2355,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
+#define _bfd_ecoff_bfd_merge_sections bfd_generic_merge_sections
const bfd_target ecoffalpha_little_vec =
{
diff --git a/contrib/binutils/bfd/coff-arm.c b/contrib/binutils/bfd/coff-arm.c
index 8bb4e6c..df2be76 100644
--- a/contrib/binutils/bfd/coff-arm.c
+++ b/contrib/binutils/bfd/coff-arm.c
@@ -36,18 +36,39 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* 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))
+#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) \
+ do \
+ { \
+ coff_data (abfd)->flags &= ~(F_APCS_26 | F_APCS_FLOAT | F_PIC); \
+ coff_data (abfd)->flags |= (flgs) | F_APCS_SET; \
+ } \
+ while (0)
+
+#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) \
+ do \
+ { \
+ coff_data (abfd)->flags &= ~F_INTERWORK; \
+ coff_data (abfd)->flags |= (flg) | F_INTERWORK_SET; \
+ } \
+ while (0)
#ifndef NUM_ELEM
#define NUM_ELEM(a) ((sizeof (a)) / sizeof ((a)[0]))
@@ -79,20 +100,21 @@ static boolean coff_arm_adjust_symndx
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 *));
+ 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
+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 *));
+ 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 *));
+ 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 *));
@@ -113,12 +135,13 @@ 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 *));
+static void arm_emit_base_file_entry
+ PARAMS ((struct bfd_link_info *, bfd *, asection *, 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.
- */
+ 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"
@@ -127,6 +150,7 @@ static boolean coff_arm_final_link_postscript
#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)
@@ -144,8 +168,9 @@ coff_arm_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
diff = reloc_entry->addend;
-#define DOIT(x) \
- x = ((x & ~howto->dst_mask) | (((x & howto->src_mask) + diff) & howto->dst_mask))
+#define DOIT(x) \
+ x = ((x & ~howto->dst_mask) \
+ | (((x & howto->src_mask) + diff) & howto->dst_mask))
if (diff != 0)
{
@@ -166,7 +191,7 @@ coff_arm_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
{
short x = bfd_get_16 (abfd, addr);
DOIT (x);
- bfd_put_16 (abfd, x, addr);
+ bfd_put_16 (abfd, (bfd_vma) x, addr);
}
break;
@@ -174,7 +199,7 @@ coff_arm_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
{
long x = bfd_get_32 (abfd, addr);
DOIT (x);
- bfd_put_32 (abfd, x, addr);
+ bfd_put_32 (abfd, (bfd_vma) x, addr);
}
break;
@@ -233,300 +258,300 @@ coff_arm_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
#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),
+ 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)
+ 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
+static boolean in_reloc_p PARAMS ((bfd *, reloc_howto_type *));
/* Return true if this relocation should
appear in the output .reloc section. */
@@ -568,6 +593,7 @@ coff_arm_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
return howto;
}
+
/* Used by the assembler. */
static bfd_reloc_status_type
@@ -603,7 +629,7 @@ aoutarm_fix_pcrel_26 (abfd, reloc_entry, symbol, data, input_section,
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 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;
@@ -615,7 +641,7 @@ aoutarm_fix_pcrel_26 (abfd, reloc_entry, symbol, data, input_section,
return bfd_reloc_continue;
relocation = (target & 0x00ffffff) << 2;
- relocation = (relocation ^ 0x02000000) - 0x02000000; /* Sign extend */
+ relocation = (relocation ^ 0x02000000) - 0x02000000; /* Sign extend. */
relocation += symbol->value;
relocation += symbol->section->output_section->vma;
relocation += symbol->section->output_offset;
@@ -627,18 +653,18 @@ aoutarm_fix_pcrel_26 (abfd, reloc_entry, symbol, data, input_section,
if (relocation & 3)
return bfd_reloc_overflow;
- /* Check for overflow */
+ /* Check for overflow. */
if (relocation & 0x02000000)
{
if ((relocation & ~ (bfd_vma) 0x03ffffff) != ~ (bfd_vma) 0x03ffffff)
flag = bfd_reloc_overflow;
}
- else if (relocation & ~0x03ffffff)
+ else if (relocation & ~(bfd_vma) 0x03ffffff)
flag = bfd_reloc_overflow;
target &= ~0x00ffffff;
target |= (relocation >> 2) & 0x00ffffff;
- bfd_put_32 (abfd, target, (bfd_byte *) data + addr);
+ bfd_put_32 (abfd, (bfd_vma) 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. */
@@ -694,7 +720,7 @@ coff_thumb_pcrel_common (abfd, reloc_entry, symbol, data, input_section,
abort ();
}
- /* If this is an undefined symbol, return error */
+ /* 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;
@@ -723,7 +749,7 @@ coff_thumb_pcrel_common (abfd, reloc_entry, symbol, data, input_section,
abort ();
}
- relocation = (relocation ^ signbit) - signbit; /* Sign extend */
+ relocation = (relocation ^ signbit) - signbit; /* Sign extend. */
relocation += symbol->value;
relocation += symbol->section->output_section->vma;
relocation += symbol->section->output_offset;
@@ -735,7 +761,7 @@ coff_thumb_pcrel_common (abfd, reloc_entry, symbol, data, input_section,
if (relocation & 1)
return bfd_reloc_overflow;
- /* Check for overflow */
+ /* Check for overflow. */
if (relocation & signbit)
{
if ((relocation & ~offmsk) != ~offmsk)
@@ -754,22 +780,24 @@ coff_thumb_pcrel_common (abfd, reloc_entry, symbol, data, input_section,
case b23:
if (bfd_big_endian (abfd))
- target |= ((relocation & 0xfff) >> 1) | ((relocation << 4) & 0x07ff0000);
+ target |= (((relocation & 0xfff) >> 1)
+ | ((relocation << 4) & 0x07ff0000));
else
- target |= ((relocation & 0xffe) << 15) | ((relocation >> 12) & 0x7ff);
+ target |= (((relocation & 0xffe) << 15)
+ | ((relocation >> 12) & 0x7ff));
break;
default:
abort ();
}
- bfd_put_32 (abfd, target, (bfd_byte *) data + addr);
+ bfd_put_32 (abfd, (bfd_vma) 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 */
+ /* TODO: We should possibly have DONE entries for the THUMB PCREL relocations. */
return flag;
}
@@ -785,7 +813,8 @@ coff_thumb_pcrel_23 (abfd, reloc_entry, symbol, data, input_section,
char **error_message;
{
return coff_thumb_pcrel_common (abfd, reloc_entry, symbol, data,
- input_section, output_bfd, error_message, b23);
+ input_section, output_bfd, error_message,
+ b23);
}
static bfd_reloc_status_type
@@ -800,7 +829,8 @@ coff_thumb_pcrel_12 (abfd, reloc_entry, symbol, data, input_section,
char **error_message;
{
return coff_thumb_pcrel_common (abfd, reloc_entry, symbol, data,
- input_section, output_bfd, error_message, b12);
+ input_section, output_bfd, error_message,
+ b12);
}
static bfd_reloc_status_type
@@ -815,10 +845,11 @@ coff_thumb_pcrel_9 (abfd, reloc_entry, symbol, data, input_section,
char **error_message;
{
return coff_thumb_pcrel_common (abfd, reloc_entry, symbol, data,
- input_section, output_bfd, error_message, b9);
+ input_section, output_bfd, error_message,
+ b9);
}
-static CONST struct reloc_howto_struct *
+static const struct reloc_howto_struct *
coff_arm_reloc_type_lookup (abfd, code)
bfd * abfd;
bfd_reloc_code_real_type code;
@@ -831,7 +862,8 @@ coff_arm_reloc_type_lookup (abfd, code)
case 32:
code = BFD_RELOC_32;
break;
- default: return (CONST struct reloc_howto_struct *) 0;
+ default:
+ return (const struct reloc_howto_struct *) 0;
}
switch (code)
@@ -856,7 +888,7 @@ coff_arm_reloc_type_lookup (abfd, code)
ASTD (BFD_RELOC_THUMB_PCREL_BRANCH23, ARM_THUMB23);
ASTD (BFD_RELOC_THUMB_PCREL_BLX, ARM_THUMB23);
#endif
- default: return (CONST struct reloc_howto_struct *) 0;
+ default: return (const struct reloc_howto_struct *) 0;
}
}
@@ -872,21 +904,21 @@ coff_arm_reloc_type_lookup (abfd, code)
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 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 Thumb-to-ARM glue. */
+ bfd_size_type thumb_glue_size;
- /* The size in bytes of the section containg the ARM-to-Thumb glue. */
- long int arm_glue_size;
+ /* The size in bytes of the section containg the ARM-to-Thumb glue. */
+ bfd_size_type arm_glue_size;
- /* An arbitary input BFD chosen to hold the glue sections. */
- bfd * bfd_of_glue_owner;
+ /* 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;
+ /* 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. */
@@ -900,9 +932,9 @@ coff_arm_link_hash_table_create (abfd)
bfd * abfd;
{
struct coff_arm_link_hash_table * ret;
+ bfd_size_type amt = sizeof (struct coff_arm_link_hash_table);
- ret = ((struct coff_arm_link_hash_table *)
- bfd_alloc (abfd, sizeof (struct coff_arm_link_hash_table)));
+ ret = (struct coff_arm_link_hash_table *) bfd_alloc (abfd, amt);
if (ret == (struct coff_arm_link_hash_table *) NULL)
return NULL;
@@ -932,9 +964,9 @@ arm_emit_base_file_entry (info, output_bfd, input_section, reloc_offset)
+ 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);
+ if (coff_data (output_bfd)->pe)
+ addr -= pe_data (output_bfd)->pe_opthdr.ImageBase;
+ fwrite (& addr, 1, sizeof (addr), (FILE *) info->base_file);
}
@@ -964,7 +996,7 @@ arm_emit_base_file_entry (info, output_bfd, input_section, reloc_offset)
moves the computed address into the PC, so it must be the second one
in the sequence. The problem, however is that whilst little endian code
stores the instructions in HI then LOW order, big endian code does the
- reverse. nickc@cygnus.com */
+ reverse. nickc@cygnus.com. */
#define LOW_HI_ORDER 0xF800F000
#define HI_LOW_ORDER 0xF000F800
@@ -988,24 +1020,24 @@ insert_thumb_branch (br_insn, rel_off)
else if ((br_insn & HI_LOW_ORDER) == HI_LOW_ORDER)
br_insn = HI_LOW_ORDER | (high_bits << 16) | low_bits;
else
- abort (); /* error - not a valid branch instruction form */
-
- /* FIXME: abort is probably not the right call. krk@cygnus.com */
+ /* FIXME: the BFD library should never abort except for internal errors
+ - it should return an error status. */
+ abort (); /* Error - not a valid branch instruction form. */
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;
+ struct bfd_link_info *info;
+ const char *name;
+ bfd *input_bfd;
{
- char * tmp_name;
- struct coff_link_hash_entry * myh;
+ char *tmp_name;
+ struct coff_link_hash_entry *myh;
+ bfd_size_type amt = strlen (name) + strlen (THUMB2ARM_GLUE_ENTRY_NAME) + 1;
- tmp_name = ((char *)
- bfd_malloc (strlen (name) + strlen (THUMB2ARM_GLUE_ENTRY_NAME) + 1));
+ tmp_name = (char *) bfd_malloc (amt);
BFD_ASSERT (tmp_name);
@@ -1017,7 +1049,7 @@ find_thumb_glue (info, name, input_bfd)
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);
+ bfd_archive_filename (input_bfd), tmp_name, name);
free (tmp_name);
@@ -1026,15 +1058,15 @@ find_thumb_glue (info, name, input_bfd)
static struct coff_link_hash_entry *
find_arm_glue (info, name, input_bfd)
- struct bfd_link_info * info;
- CONST char * name;
- bfd * input_bfd;
+ struct bfd_link_info *info;
+ const char *name;
+ bfd *input_bfd;
{
- char * tmp_name;
+ char *tmp_name;
struct coff_link_hash_entry * myh;
+ bfd_size_type amt = strlen (name) + strlen (ARM2THUMB_GLUE_ENTRY_NAME) + 1;
- tmp_name = ((char *)
- bfd_malloc (strlen (name) + strlen (ARM2THUMB_GLUE_ENTRY_NAME) + 1));
+ tmp_name = (char *) bfd_malloc (amt);
BFD_ASSERT (tmp_name);
@@ -1046,7 +1078,7 @@ find_arm_glue (info, name, input_bfd)
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);
+ bfd_archive_filename (input_bfd), tmp_name, name);
free (tmp_name);
@@ -1208,7 +1240,8 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
&& 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)
+ && (h->root.u.def.section->output_section
+ == input_section->output_section))
{
static reloc_howto_type fake_arm26_reloc =
HOWTO (ARM_26,
@@ -1246,10 +1279,10 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
continue;
/* FIXME - it is not clear which targets need this next test
and which do not. It is known that it is needed for the
- VXworks target (hence the #ifdef), but it is also known
- that it was supressed for other (arm) targets. This ought
- to be sorted out one day. */
-#ifdef VXWORKS
+ VxWorks and EPOC-PE targets, but it is also known that it
+ was supressed for other ARM targets. This ought to be
+ sorted out one day. */
+#ifdef ARM_COFF_BUGFIX
/* We must not ignore the symbol value. If the symbol is
within the same section, the relocation should have already
been fixed, but if it is not, we'll be handed a reloc into
@@ -1306,9 +1339,9 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
if ( h->class == C_THUMBSTATFUNC
|| h->class == C_THUMBEXTFUNC)
{
- /* Arm code calling a Thumb function */
+ /* Arm code calling a Thumb function. */
unsigned long int tmp;
- long int my_offset;
+ bfd_vma my_offset;
asection * s;
long int ret_offset;
struct coff_link_hash_entry * myh;
@@ -1340,20 +1373,20 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
_bfd_error_handler
/* xgettext:c-format */
(_("%s(%s): warning: interworking not enabled."),
- bfd_get_filename (h_sec->owner), name);
+ bfd_archive_filename (h_sec->owner), name);
_bfd_error_handler
/* xgettext:c-format */
(_(" first occurrence: %s: arm call to thumb"),
- bfd_get_filename (input_bfd));
+ bfd_archive_filename (input_bfd));
}
--my_offset;
myh->root.u.def.value = my_offset;
- bfd_put_32 (output_bfd, a2t1_ldr_insn,
+ bfd_put_32 (output_bfd, (bfd_vma) a2t1_ldr_insn,
s->contents + my_offset);
- bfd_put_32 (output_bfd, a2t2_bx_r12_insn,
+ bfd_put_32 (output_bfd, (bfd_vma) a2t2_bx_r12_insn,
s->contents + my_offset + 4);
/* It's a thumb address. Add the low order bit. */
@@ -1362,7 +1395,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
if (info->base_file)
arm_emit_base_file_entry (info, output_bfd, s,
- my_offset + 8);
+ my_offset + 8);
}
@@ -1385,14 +1418,14 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
tmp = tmp | ((ret_offset >> 2) & 0x00FFFFFF);
- bfd_put_32 (output_bfd, tmp, contents + rel->r_vaddr
- - input_section->vma);
+ bfd_put_32 (output_bfd, (bfd_vma) tmp,
+ contents + rel->r_vaddr - input_section->vma);
done = 1;
}
}
#ifndef ARM_WINCE
- /* Note: We used to check for ARM_THUMB9 and ARM_THUMB12 */
+ /* Note: We used to check for ARM_THUMB9 and ARM_THUMB12. */
else if (howto->type == ARM_THUMB23)
{
if ( h->class == C_EXT
@@ -1401,7 +1434,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
{
/* Thumb code calling an ARM function */
asection * s = 0;
- long int my_offset;
+ bfd_vma my_offset;
unsigned long int tmp;
long int ret_offset;
struct coff_link_hash_entry * myh;
@@ -1435,11 +1468,11 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
_bfd_error_handler
/* xgettext:c-format */
(_("%s(%s): warning: interworking not enabled."),
- bfd_get_filename (h_sec->owner), name);
+ bfd_archive_filename (h_sec->owner), name);
_bfd_error_handler
/* xgettext:c-format */
(_(" first occurrence: %s: thumb call to arm"),
- bfd_get_filename (input_bfd));
+ bfd_archive_filename (input_bfd));
_bfd_error_handler
(_(" consider relinking with --support-old-code enabled"));
}
@@ -1449,22 +1482,22 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
if (globals->support_old_code)
{
- bfd_put_16 (output_bfd, t2a1_push_insn,
+ bfd_put_16 (output_bfd, (bfd_vma) t2a1_push_insn,
s->contents + my_offset);
- bfd_put_16 (output_bfd, t2a2_ldr_insn,
+ bfd_put_16 (output_bfd, (bfd_vma) t2a2_ldr_insn,
s->contents + my_offset + 2);
- bfd_put_16 (output_bfd, t2a3_mov_insn,
+ bfd_put_16 (output_bfd, (bfd_vma) t2a3_mov_insn,
s->contents + my_offset + 4);
- bfd_put_16 (output_bfd, t2a4_bx_insn,
+ bfd_put_16 (output_bfd, (bfd_vma) t2a4_bx_insn,
s->contents + my_offset + 6);
- bfd_put_32 (output_bfd, t2a5_pop_insn,
+ bfd_put_32 (output_bfd, (bfd_vma) t2a5_pop_insn,
s->contents + my_offset + 8);
- bfd_put_32 (output_bfd, t2a6_bx_insn,
+ bfd_put_32 (output_bfd, (bfd_vma) t2a6_bx_insn,
s->contents + my_offset + 12);
/* Store the address of the function in the last word of the stub. */
@@ -1472,18 +1505,19 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
s->contents + my_offset + 16);
if (info->base_file)
- arm_emit_base_file_entry (info, output_bfd, s, my_offset + 16);
+ arm_emit_base_file_entry (info, output_bfd, s,
+ my_offset + 16);
}
else
{
- bfd_put_16 (output_bfd, t2a1_bx_pc_insn,
+ bfd_put_16 (output_bfd, (bfd_vma) t2a1_bx_pc_insn,
s->contents + my_offset);
- bfd_put_16 (output_bfd, t2a2_noop_insn,
+ bfd_put_16 (output_bfd, (bfd_vma) t2a2_noop_insn,
s->contents + my_offset + 2);
ret_offset =
- ((bfd_signed_vma) h_val) /* Address of destination of the stub */
+ ((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. */
@@ -1492,7 +1526,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
+ 8); /* ARM branches work from the pc of the instruction + 8. */
bfd_put_32 (output_bfd,
- t2a3_b_insn | ((ret_offset >> 2) & 0x00FFFFFF),
+ (bfd_vma) t2a3_b_insn | ((ret_offset >> 2) & 0x00FFFFFF),
s->contents + my_offset + 4);
}
@@ -1513,9 +1547,9 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
- input_section->vma);
bfd_put_32 (output_bfd,
- insert_thumb_branch (tmp, ret_offset),
- contents + rel->r_vaddr
- - input_section->vma);
+ (bfd_vma) insert_thumb_branch (tmp,
+ ret_offset),
+ contents + rel->r_vaddr - input_section->vma);
done = 1;
}
@@ -1555,7 +1589,8 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
{
/* 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);
+ arm_emit_base_file_entry (info, output_bfd, input_section,
+ rel->r_vaddr);
}
#if 1 /* THUMBEXTENSION */
@@ -1730,7 +1765,7 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
case bfd_reloc_outofrange:
(*_bfd_error_handler)
(_("%s: bad reloc address 0x%lx in section `%s'"),
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
(unsigned long) rel->r_vaddr,
bfd_get_section_name (input_bfd, input_section));
return false;
@@ -1787,10 +1822,10 @@ bfd_arm_allocate_interworking_sections (info)
BFD_ASSERT (s != NULL);
- foo = (bfd_byte *) bfd_alloc
- (globals->bfd_of_glue_owner, globals->arm_glue_size);
+ foo = (bfd_byte *) bfd_alloc (globals->bfd_of_glue_owner,
+ globals->arm_glue_size);
#if 0
- memset (foo, test_char, globals->arm_glue_size);
+ memset (foo, test_char, (size_t) globals->arm_glue_size);
#endif
s->_raw_size = s->_cooked_size = globals->arm_glue_size;
@@ -1806,10 +1841,10 @@ bfd_arm_allocate_interworking_sections (info)
BFD_ASSERT (s != NULL);
- foo = (bfd_byte *) bfd_alloc
- (globals->bfd_of_glue_owner, globals->thumb_glue_size);
+ foo = (bfd_byte *) bfd_alloc (globals->bfd_of_glue_owner,
+ globals->thumb_glue_size);
#if 0
- memset (foo, test_char, globals->thumb_glue_size);
+ memset (foo, test_char, (size_t) globals->thumb_glue_size);
#endif
s->_raw_size = s->_cooked_size = globals->thumb_glue_size;
@@ -1829,6 +1864,8 @@ record_arm_to_thumb_glue (info, h)
char * tmp_name;
struct coff_link_hash_entry * myh;
struct coff_arm_link_hash_table * globals;
+ bfd_vma val;
+ bfd_size_type amt;
globals = coff_arm_hash_table (info);
@@ -1840,8 +1877,8 @@ record_arm_to_thumb_glue (info, h)
BFD_ASSERT (s != NULL);
- tmp_name = ((char *)
- bfd_malloc (strlen (name) + strlen (ARM2THUMB_GLUE_ENTRY_NAME) + 1));
+ amt = strlen (name) + strlen (ARM2THUMB_GLUE_ENTRY_NAME) + 1;
+ tmp_name = (char *) bfd_malloc (amt);
BFD_ASSERT (tmp_name);
@@ -1860,10 +1897,9 @@ record_arm_to_thumb_glue (info, h)
though the section isn't allocated yet, this is where we will be putting
it. */
+ val = globals->arm_glue_size + 1;
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,
+ BSF_GLOBAL, s, val, NULL, true, false,
(struct bfd_link_hash_entry **) & myh);
free (tmp_name);
@@ -1883,6 +1919,8 @@ record_thumb_to_arm_glue (info, h)
char * tmp_name;
struct coff_link_hash_entry * myh;
struct coff_arm_link_hash_table * globals;
+ bfd_vma val;
+ bfd_size_type amt;
globals = coff_arm_hash_table (info);
@@ -1894,7 +1932,8 @@ record_thumb_to_arm_glue (info, h)
BFD_ASSERT (s != NULL);
- tmp_name = (char *) bfd_malloc (strlen (name) + strlen (THUMB2ARM_GLUE_ENTRY_NAME) + 1);
+ amt = strlen (name) + strlen (THUMB2ARM_GLUE_ENTRY_NAME) + 1;
+ tmp_name = (char *) bfd_malloc (amt);
BFD_ASSERT (tmp_name);
@@ -1909,10 +1948,10 @@ record_thumb_to_arm_glue (info, h)
return; /* we've already seen this guy */
}
+ val = globals->thumb_glue_size + 1;
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);
+ BSF_GLOBAL, s, val, 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;
@@ -1924,18 +1963,17 @@ record_thumb_to_arm_glue (info, h)
#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);
+ amt = strlen (name) + strlen (CHANGE_TO_ARM) + 1;
+ tmp_name = (char *) bfd_malloc (amt);
BFD_ASSERT (tmp_name);
sprintf (tmp_name, globals->support_old_code ? BACK_FROM_ARM : CHANGE_TO_ARM, name);
myh = NULL;
-
+ val = globals->thumb_glue_size + (globals->support_old_code ? 8 : 4);
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,
+ BSF_LOCAL, s, val, NULL, true, false,
(struct bfd_link_hash_entry **) & myh);
free (tmp_name);
@@ -2067,7 +2105,7 @@ bfd_arm_process_before_allocation (abfd, info, support_old_code)
if (symndx >= obj_conv_table_size (abfd))
{
_bfd_error_handler (_("%s: illegal symbol index in reloc: %d"),
- bfd_get_filename (abfd), symndx);
+ bfd_archive_filename (abfd), symndx);
continue;
}
@@ -2195,7 +2233,7 @@ coff_arm_merge_private_bfd_data (ibfd, obfd)
_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_archive_filename (ibfd), APCS_26_FLAG (ibfd) ? 26 : 32,
bfd_get_filename (obfd), APCS_26_FLAG (obfd) ? 26 : 32
);
@@ -2214,7 +2252,7 @@ coff_arm_merge_private_bfd_data (ibfd, obfd)
/* 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_error_handler (msg, bfd_archive_filename (ibfd),
bfd_get_filename (obfd));
bfd_set_error (bfd_error_wrong_format);
@@ -2231,7 +2269,7 @@ coff_arm_merge_private_bfd_data (ibfd, obfd)
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_error_handler (msg, bfd_archive_filename (ibfd),
bfd_get_filename (obfd));
bfd_set_error (bfd_error_wrong_format);
@@ -2264,7 +2302,7 @@ coff_arm_merge_private_bfd_data (ibfd, obfd)
/* xgettext: c-format */
msg = _("Warning: input file %s does not support interworking, whereas %s does.");
- _bfd_error_handler (msg, bfd_get_filename (ibfd),
+ _bfd_error_handler (msg, bfd_archive_filename (ibfd),
bfd_get_filename (obfd));
}
}
@@ -2361,11 +2399,11 @@ _bfd_coff_arm_set_private_flags (abfd, flags)
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));
+ bfd_archive_filename (abfd));
else
/* xgettext: c-format */
_bfd_error_handler (_("Warning: Clearing the interworking flag of %s due to outside request"),
- bfd_get_filename (abfd));
+ bfd_archive_filename (abfd));
flag = 0;
}
@@ -2425,7 +2463,7 @@ coff_arm_copy_private_bfd_data (src, 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));
+ bfd_archive_filename (src));
}
SET_INTERWORK_FLAG (dest, 0);
@@ -2471,7 +2509,7 @@ coff_arm_is_local_label_name (abfd, name)
if (LOCAL_LABEL_PREFIX[0] != 0)
{
- int len = strlen (LOCAL_LABEL_PREFIX);
+ size_t len = strlen (LOCAL_LABEL_PREFIX);
if (strncmp (name, LOCAL_LABEL_PREFIX, len) != 0)
return false;
diff --git a/contrib/binutils/bfd/coff-i386.c b/contrib/binutils/bfd/coff-i386.c
index 7d4ab5a..72c58a4 100644
--- a/contrib/binutils/bfd/coff-i386.c
+++ b/contrib/binutils/bfd/coff-i386.c
@@ -157,7 +157,7 @@ coff_i386_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
{
short x = bfd_get_16 (abfd, addr);
DOIT (x);
- bfd_put_16 (abfd, x, addr);
+ bfd_put_16 (abfd, (bfd_vma) x, addr);
}
break;
@@ -165,7 +165,7 @@ coff_i386_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
{
long x = bfd_get_32 (abfd, addr);
DOIT (x);
- bfd_put_32 (abfd, x, addr);
+ bfd_put_32 (abfd, (bfd_vma) x, addr);
}
break;
diff --git a/contrib/binutils/bfd/coff-ia64.c b/contrib/binutils/bfd/coff-ia64.c
index 776d3fa..76d1bf6 100644
--- a/contrib/binutils/bfd/coff-ia64.c
+++ b/contrib/binutils/bfd/coff-ia64.c
@@ -52,6 +52,8 @@ static reloc_howto_type howto_table[] =
/* 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;
@@ -63,6 +65,8 @@ in_reloc_p(abfd, howto)
#include "coffcode.h"
+static const bfd_target *ia64coff_object_p PARAMS ((bfd *));
+
static const bfd_target *
ia64coff_object_p (abfd)
bfd *abfd;
@@ -73,9 +77,9 @@ ia64coff_object_p (abfd)
struct external_PEI_IMAGE_hdr image_hdr;
file_ptr offset;
- if (bfd_seek (abfd, 0x00, SEEK_SET) != 0
- || bfd_read (&dos_hdr, 1, sizeof (dos_hdr), abfd)
- != sizeof (dos_hdr))
+ if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0
+ || (bfd_bread (&dos_hdr, (bfd_size_type) sizeof (dos_hdr), abfd)
+ != sizeof (dos_hdr)))
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
@@ -92,23 +96,23 @@ ia64coff_object_p (abfd)
this routine can only be called correctly for a PEI file, check
the e_magic number here, and, if it doesn't match, clobber the
f_magic number so that we don't get a false match. */
- if (bfd_h_get_16 (abfd, (bfd_byte *) dos_hdr.e_magic) != DOSMAGIC)
+ if (H_GET_16 (abfd, dos_hdr.e_magic) != DOSMAGIC)
{
bfd_set_error (bfd_error_wrong_format);
return NULL;
}
- offset = bfd_h_get_32 (abfd, (bfd_byte *) dos_hdr.e_lfanew);
- if (bfd_seek (abfd, (file_ptr) offset, SEEK_SET) != 0
- || bfd_read (&image_hdr, 1, sizeof (image_hdr), abfd)
- != sizeof (image_hdr))
+ offset = H_GET_32 (abfd, dos_hdr.e_lfanew);
+ if (bfd_seek (abfd, offset, SEEK_SET) != 0
+ || (bfd_bread (&image_hdr, (bfd_size_type) sizeof (image_hdr), abfd)
+ != sizeof (image_hdr)))
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
return NULL;
}
- if (bfd_h_get_32 (abfd, (bfd_byte *) image_hdr.nt_signature)
+ if (H_GET_32 (abfd, image_hdr.nt_signature)
!= 0x4550)
{
bfd_set_error (bfd_error_wrong_format);
@@ -118,10 +122,7 @@ ia64coff_object_p (abfd)
/* Here is the hack. coff_object_p wants to read filhsz bytes to
pick up the COFF header for PE, see "struct external_PEI_filehdr"
in include/coff/pe.h. We adjust so that that will work. */
- if (bfd_seek (abfd,
- (file_ptr) (offset - sizeof (dos_hdr)),
- SEEK_SET)
- != 0)
+ if (bfd_seek (abfd, offset - sizeof (dos_hdr), SEEK_SET) != 0)
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
diff --git a/contrib/binutils/bfd/coff-ppc.c b/contrib/binutils/bfd/coff-ppc.c
index 2bf296a..f2bdfe5 100644
--- a/contrib/binutils/bfd/coff-ppc.c
+++ b/contrib/binutils/bfd/coff-ppc.c
@@ -202,9 +202,9 @@ ppc_coff_link_hash_table_create (abfd)
bfd *abfd;
{
struct ppc_coff_link_hash_table *ret;
+ bfd_size_type amt = sizeof (struct ppc_coff_link_hash_table);
- ret = ((struct ppc_coff_link_hash_table *)
- bfd_alloc (abfd, sizeof (struct ppc_coff_link_hash_table)));
+ ret = (struct ppc_coff_link_hash_table *) bfd_alloc (abfd, amt);
if (ret == NULL)
return NULL;
if (! ppc_coff_link_hash_table_init (ret, abfd,
@@ -833,7 +833,7 @@ enum ref_category
{
priv,
pub,
- data
+ tocdata
};
struct list_ele
@@ -849,18 +849,19 @@ extern struct list_ele *head;
extern struct list_ele *tail;
static void record_toc
- PARAMS ((asection *, int, enum ref_category, const char *));
+ PARAMS ((asection *, bfd_signed_vma, enum ref_category, const char *));
static void
record_toc (toc_section, our_toc_offset, cat, name)
asection *toc_section;
- int our_toc_offset;
+ bfd_signed_vma 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));
+ bfd_size_type amt = sizeof (struct list_ele);
+ struct list_ele *t = (struct list_ele *) bfd_malloc (amt);
+
if (t == NULL)
abort ();
t->next = 0;
@@ -916,16 +917,16 @@ ppc_record_toc_entry(abfd, info, sec, sym, toc_kind)
if (local_syms == 0)
{
unsigned int i;
+ bfd_size_type amt;
/* allocate a table */
- local_syms =
- (int *) bfd_zalloc (abfd,
- obj_raw_syment_count(abfd) * sizeof (int));
+ amt = (bfd_size_type) obj_raw_syment_count (abfd) * sizeof (int);
+ local_syms = (int *) bfd_zalloc (abfd, amt);
if (local_syms == 0)
return false;
- obj_coff_local_toc_table(abfd) = local_syms;
- for (i = 0; i < obj_raw_syment_count(abfd); ++i)
+ obj_coff_local_toc_table (abfd) = local_syms;
+ for (i = 0; i < obj_raw_syment_count (abfd); ++i)
{
- SET_UNALLOCATED(local_syms[i]);
+ SET_UNALLOCATED (local_syms[i]);
}
}
@@ -1194,12 +1195,12 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
default:
(*_bfd_error_handler)
(_("%s: unsupported relocation type 0x%02x"),
- bfd_get_filename (input_bfd), r_type);
+ bfd_archive_filename (input_bfd), r_type);
bfd_set_error (bfd_error_bad_value);
return false;
case IMAGE_REL_PPC_TOCREL16:
{
- bfd_vma our_toc_offset;
+ bfd_signed_vma our_toc_offset;
int fixit;
DUMP_RELOC2(howto->name, rel);
@@ -1246,13 +1247,10 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
else
{
/* write out the toc entry */
- record_toc(toc_section,
- our_toc_offset,
- priv,
- strdup(name));
+ record_toc (toc_section, our_toc_offset, priv,
+ strdup (name));
- bfd_put_32 (output_bfd,
- val,
+ bfd_put_32 (output_bfd, val,
toc_section->contents + our_toc_offset);
MARK_AS_WRITTEN(local_toc_table[symndx]);
@@ -1282,21 +1280,22 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
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);
+ 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)
+ if ((bfd_vma) 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);
+ (_("%s: Relocation for %s of %lx exceeds Toc size limit"),
+ bfd_archive_filename (input_bfd), name,
+ (unsigned long) our_toc_offset);
bfd_set_error (bfd_error_bad_value);
return false;
}
- record_toc(toc_section, our_toc_offset, pub, strdup(name));
+ record_toc (toc_section, our_toc_offset, pub,
+ strdup (name));
}
else if (IS_WRITTEN(our_toc_offset))
{
@@ -1308,11 +1307,11 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
}
else
{
- record_toc(toc_section, our_toc_offset, pub, strdup(name));
+ record_toc(toc_section, our_toc_offset, pub,
+ strdup (name));
/* write out the toc entry */
- bfd_put_32 (output_bfd,
- val,
+ bfd_put_32 (output_bfd, val,
toc_section->contents + our_toc_offset);
MARK_AS_WRITTEN(h->toc_offset);
@@ -1331,8 +1330,8 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
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;
+ 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;
@@ -1341,23 +1340,20 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
}
/* FIXME: this test is conservative */
- if ( (r_flags & IMAGE_REL_PPC_TOCDEFN) != IMAGE_REL_PPC_TOCDEFN &&
- our_toc_offset > toc_section->_raw_size)
+ if ((r_flags & IMAGE_REL_PPC_TOCDEFN) != IMAGE_REL_PPC_TOCDEFN
+ && (bfd_vma) 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);
+ (_("%s: Relocation exceeds allocated TOC (%lx)"),
+ bfd_archive_filename (input_bfd),
+ (unsigned long) 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);
+ rstat = _bfd_relocate_contents (howto, input_bfd, relocation, loc);
}
break;
case IMAGE_REL_PPC_IFGLUE:
@@ -1377,7 +1373,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
if (h->symbol_is_glue == 1)
{
x = bfd_get_32 (input_bfd, loc);
- bfd_put_32 (input_bfd, h->glue_insn, loc);
+ bfd_put_32 (input_bfd, (bfd_vma) h->glue_insn, loc);
}
}
}
@@ -1406,7 +1402,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
fprintf (stderr,
_("Warning: unsupported reloc %s <file %s, section %s>\n"),
howto->name,
- bfd_get_filename(input_bfd),
+ bfd_archive_filename(input_bfd),
input_section->name);
fprintf (stderr,"sym %ld (%s), r_vaddr %ld (%lx)\n",
@@ -1425,14 +1421,13 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
(*_bfd_error_handler)
(_("%s: Out of order IMGLUE reloc for %s"),
- bfd_get_filename (input_bfd), my_name);
+ bfd_archive_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);
@@ -1440,7 +1435,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
{
/* set magic values */
int idata5offset;
- struct coff_link_hash_entry *myh = 0;
+ struct coff_link_hash_entry *myh;
myh = coff_link_hash_lookup (coff_hash_table (info),
"__idata5_magic__",
false, false, true);
@@ -1480,7 +1475,7 @@ coff_ppc_relocate_section (output_bfd, info, input_bfd, input_section,
if (target != 0)
{
- myh = 0;
+ struct coff_link_hash_entry *myh;
myh = coff_link_hash_lookup (coff_hash_table (info),
target,
@@ -1654,7 +1649,7 @@ dump_toc (vfile)
cat = _("private ");
else if (t->cat == pub)
cat = _("public ");
- else if (t->cat == data)
+ else if (t->cat == tocdata)
cat = _("data-in-toc ");
if (t->offset > global_toc_size)
@@ -1665,7 +1660,8 @@ dump_toc (vfile)
{
fprintf (file,
_("**** global_toc_size %ld(%lx), thunk_size %ld(%lx)\n"),
- global_toc_size, global_toc_size, thunk_size, thunk_size);
+ global_toc_size, global_toc_size,
+ thunk_size, thunk_size);
cat = _("Out of bounds!");
}
}
@@ -1687,6 +1683,7 @@ ppc_allocate_toc_section (info)
{
asection *s;
bfd_byte *foo;
+ bfd_size_type amt;
static char test_char = '1';
if ( global_toc_size == 0 ) /* FIXME: does this get me in trouble? */
@@ -1705,8 +1702,9 @@ ppc_allocate_toc_section (info)
abort ();
}
- foo = (bfd_byte *) bfd_alloc(bfd_of_toc_owner, global_toc_size);
- memset(foo, test_char, global_toc_size);
+ amt = global_toc_size;
+ foo = (bfd_byte *) bfd_alloc (bfd_of_toc_owner, amt);
+ memset(foo, test_char, (size_t) global_toc_size);
s->_raw_size = s->_cooked_size = global_toc_size;
s->contents = foo;
@@ -2178,10 +2176,6 @@ ppc_coff_reloc_type_lookup (abfd, code)
#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
@@ -2191,8 +2185,10 @@ static void ppc_coff_swap_sym_in_hook PARAMS ((bfd *, PTR, PTR));
#ifndef COFF_IMAGE_WITH_PE
/* FIXME: This no longer works. */
+#if 0
#define coff_swap_sym_in_hook ppc_coff_swap_sym_in_hook
#endif
+#endif
#define SELECT_RELOC(internal, howto) {internal.r_type=howto->type;}
@@ -2220,6 +2216,8 @@ static void ppc_coff_swap_sym_in_hook PARAMS ((bfd *, PTR, PTR));
#include "coffcode.h"
#ifndef COFF_IMAGE_WITH_PE
+/* FIXME: This no longer works. */
+#if 0
/* 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
@@ -2233,6 +2231,7 @@ static void ppc_coff_swap_sym_in_hook PARAMS ((bfd *, PTR, PTR));
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 PARAMS ((bfd *, PTR, PTR));
static void
ppc_coff_swap_sym_in_hook (abfd, ext1, in1)
@@ -2275,6 +2274,7 @@ ppc_coff_swap_sym_in_hook (abfd, ext1, in1)
return;
}
#endif
+#endif
#ifndef COFF_IMAGE_WITH_PE
@@ -2321,11 +2321,11 @@ ppc_bfd_coff_final_link (abfd, info)
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;
+ bfd_size_type max_sym_count;
+ bfd_size_type max_lineno_count;
+ bfd_size_type max_reloc_count;
+ bfd_size_type max_output_reloc_count;
+ bfd_size_type max_contents_size;
file_ptr rel_filepos;
unsigned int relsz;
file_ptr line_filepos;
@@ -2333,6 +2333,7 @@ ppc_bfd_coff_final_link (abfd, info)
bfd *sub;
bfd_byte *external_relocs = NULL;
char strbuf[STRING_SIZE_SIZE];
+ bfd_size_type amt;
symesz = bfd_coff_symesz (abfd);
@@ -2433,10 +2434,9 @@ ppc_bfd_coff_final_link (abfd, info)
/* 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)));
+ amt = abfd->section_count + 1;
+ amt *= sizeof (struct coff_link_section_info);
+ finfo.section_info = (struct coff_link_section_info *) bfd_malloc (amt);
if (finfo.section_info == NULL)
goto error_return;
for (i = 0; i <= abfd->section_count; i++)
@@ -2477,13 +2477,14 @@ ppc_bfd_coff_final_link (abfd, info)
but only when doing a relocateable link, which is not the
common case. */
BFD_ASSERT (info->relocateable);
+ amt = o->reloc_count;
+ amt *= sizeof (struct internal_reloc);
finfo.section_info[o->target_index].relocs =
- ((struct internal_reloc *)
- bfd_malloc (o->reloc_count * sizeof (struct internal_reloc)));
+ (struct internal_reloc *) bfd_malloc (amt);
+ amt = o->reloc_count;
+ amt *= sizeof (struct coff_link_hash_entry *);
finfo.section_info[o->target_index].rel_hashes =
- ((struct coff_link_hash_entry **)
- bfd_malloc (o->reloc_count
- * sizeof (struct coff_link_hash_entry *)));
+ (struct coff_link_hash_entry **) bfd_malloc (amt);
if (finfo.section_info[o->target_index].relocs == NULL
|| finfo.section_info[o->target_index].rel_hashes == NULL)
goto error_return;
@@ -2506,7 +2507,7 @@ ppc_bfd_coff_final_link (abfd, info)
max_sym_count = 0;
for (sub = info->input_bfds; sub != NULL; sub = sub->link_next)
{
- size_t sz;
+ bfd_size_type sz;
sub->output_has_begun = false;
sz = obj_raw_syment_count (sub);
@@ -2515,22 +2516,23 @@ ppc_bfd_coff_final_link (abfd, info)
}
/* 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));
+ amt = max_sym_count * sizeof (struct internal_syment);
+ finfo.internal_syms = (struct internal_syment *) bfd_malloc (amt);
+ amt = max_sym_count * sizeof (asection *);
+ finfo.sec_ptrs = (asection **) bfd_malloc (amt);
+ amt = max_sym_count * sizeof (long);
+ finfo.sym_indices = (long *) bfd_malloc (amt);
+ amt = (max_sym_count + 1) * symesz;
+ finfo.outsyms = (bfd_byte *) bfd_malloc (amt);
+ amt = max_lineno_count * bfd_coff_linesz (abfd);
+ finfo.linenos = (bfd_byte *) bfd_malloc (amt);
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)));
+ {
+ amt = max_reloc_count * sizeof (struct internal_reloc);
+ finfo.internal_relocs = (struct internal_reloc *) bfd_malloc (amt);
+ }
if ((finfo.internal_syms == NULL && max_sym_count > 0)
|| (finfo.sec_ptrs == NULL && max_sym_count > 0)
|| (finfo.sym_indices == NULL && max_sym_count > 0)
@@ -2649,14 +2651,14 @@ ppc_bfd_coff_final_link (abfd, info)
if (finfo.last_file_index != -1
&& (unsigned int) finfo.last_file.n_value != obj_raw_syment_count (abfd))
{
+ file_ptr pos;
+
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)
+ pos = obj_sym_filepos (abfd) + finfo.last_file_index * symesz;
+ if (bfd_seek (abfd, pos, SEEK_SET) != 0
+ || bfd_bwrite (finfo.outsyms, symesz, abfd) != symesz)
return false;
}
@@ -2679,8 +2681,8 @@ ppc_bfd_coff_final_link (abfd, info)
/* 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));
+ amt = max_output_reloc_count * relsz;
+ external_relocs = (bfd_byte *) bfd_malloc (amt);
if (external_relocs == NULL)
goto error_return;
@@ -2708,9 +2710,9 @@ ppc_bfd_coff_final_link (abfd, info)
bfd_coff_swap_reloc_out (abfd, (PTR) irel, (PTR) erel);
}
+ amt = relsz * o->reloc_count;
if (bfd_seek (abfd, o->rel_filepos, SEEK_SET) != 0
- || bfd_write ((PTR) external_relocs, relsz, o->reloc_count,
- abfd) != relsz * o->reloc_count)
+ || bfd_bwrite ((PTR) external_relocs, amt, abfd) != amt)
goto error_return;
}
@@ -2744,21 +2746,22 @@ ppc_bfd_coff_final_link (abfd, info)
/* 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)
+ file_ptr pos;
+
+ pos = obj_sym_filepos (abfd) + obj_raw_syment_count (abfd) * symesz;
+ if (bfd_seek (abfd, pos, 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);
+ H_PUT_32 (abfd,
+ _bfd_stringtab_size (finfo.strtab) + STRING_SIZE_SIZE,
+ strbuf);
#else
- #error Change bfd_h_put_32
+ #error Change H_PUT_32 above
#endif
- if (bfd_write (strbuf, 1, STRING_SIZE_SIZE, abfd) != STRING_SIZE_SIZE)
+ if (bfd_bwrite (strbuf, (bfd_size_type) STRING_SIZE_SIZE, abfd)
+ != STRING_SIZE_SIZE)
return false;
if (! _bfd_stringtab_emit (abfd, finfo.strtab))
diff --git a/contrib/binutils/bfd/coff-rs6000.c b/contrib/binutils/bfd/coff-rs6000.c
index ed47000..2d6d6e9 100644
--- a/contrib/binutils/bfd/coff-rs6000.c
+++ b/contrib/binutils/bfd/coff-rs6000.c
@@ -29,17 +29,123 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfd.h"
#include "sysdep.h"
+#include "bfdlink.h"
#include "libbfd.h"
#include "coff/internal.h"
+#include "coff/xcoff.h"
#include "coff/rs6000.h"
#include "libcoff.h"
-#define TARGET_NAME "aixcoff-rs6000"
-#define TARGET_SYM rs6000coff_vec
-#include "xcoff-target.h"
+#include "libxcoff.h"
+
+extern boolean _bfd_xcoff_mkobject PARAMS ((bfd *));
+extern boolean _bfd_xcoff_copy_private_bfd_data PARAMS ((bfd *, bfd *));
+extern boolean _bfd_xcoff_is_local_label_name PARAMS ((bfd *, const char *));
+extern reloc_howto_type *_bfd_xcoff_reloc_type_lookup
+ PARAMS ((bfd *, bfd_reloc_code_real_type));
+extern boolean _bfd_xcoff_slurp_armap PARAMS ((bfd *));
+extern const bfd_target *_bfd_xcoff_archive_p PARAMS ((bfd *));
+extern PTR _bfd_xcoff_read_ar_hdr PARAMS ((bfd *));
+extern bfd *_bfd_xcoff_openr_next_archived_file PARAMS ((bfd *, bfd *));
+extern int _bfd_xcoff_generic_stat_arch_elt PARAMS ((bfd *, struct stat *));
+extern boolean _bfd_xcoff_write_armap
+ PARAMS ((bfd *, unsigned int, struct orl *, unsigned int, int));
+extern boolean _bfd_xcoff_write_archive_contents PARAMS ((bfd *));
+extern int _bfd_xcoff_sizeof_headers PARAMS ((bfd *, boolean));
+extern void _bfd_xcoff_swap_sym_in PARAMS ((bfd *, PTR, PTR));
+extern unsigned int _bfd_xcoff_swap_sym_out PARAMS ((bfd *, PTR, PTR));
+extern void _bfd_xcoff_swap_aux_in PARAMS ((bfd *, PTR, int, int, int, int, PTR));
+extern unsigned int _bfd_xcoff_swap_aux_out PARAMS ((bfd *, PTR, int, int, int, int, PTR));
+
+/* Forward declare _bfd_xcoff_rtype2howto for coffcode.h macro. */
+void _bfd_xcoff_rtype2howto PARAMS ((arelent *, struct internal_reloc *));
+
+/* coffcode.h needs these to be defined. */
+#define RS6000COFF_C 1
+
+#define SELECT_RELOC(internal, howto) \
+ { \
+ internal.r_type = howto->type; \
+ internal.r_size = \
+ ((howto->complain_on_overflow == complain_overflow_signed \
+ ? 0x80 \
+ : 0) \
+ | (howto->bitsize - 1)); \
+ }
+
+#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (3)
+#define COFF_LONG_FILENAMES
+#define NO_COFF_SYMBOLS
+#define RTYPE2HOWTO(cache_ptr, dst) _bfd_xcoff_rtype2howto (cache_ptr, dst)
+#define coff_mkobject _bfd_xcoff_mkobject
+#define coff_bfd_copy_private_bfd_data _bfd_xcoff_copy_private_bfd_data
+#define coff_bfd_is_local_label_name _bfd_xcoff_is_local_label_name
+#define coff_bfd_reloc_type_lookup _bfd_xcoff_reloc_type_lookup
+#ifdef AIX_CORE
+extern const bfd_target * rs6000coff_core_p ();
+extern boolean rs6000coff_core_file_matches_executable_p ();
+extern char *rs6000coff_core_file_failing_command PARAMS ((bfd *abfd));
+extern int rs6000coff_core_file_failing_signal PARAMS ((bfd *abfd));
+#define CORE_FILE_P rs6000coff_core_p
+#define coff_core_file_failing_command \
+ rs6000coff_core_file_failing_command
+#define coff_core_file_failing_signal \
+ rs6000coff_core_file_failing_signal
+#define coff_core_file_matches_executable_p \
+ rs6000coff_core_file_matches_executable_p
+#else
+#define CORE_FILE_P _bfd_dummy_target
+#define coff_core_file_failing_command \
+ _bfd_nocore_core_file_failing_command
+#define coff_core_file_failing_signal \
+ _bfd_nocore_core_file_failing_signal
+#define coff_core_file_matches_executable_p \
+ _bfd_nocore_core_file_matches_executable_p
+#endif
+#define coff_SWAP_sym_in _bfd_xcoff_swap_sym_in
+#define coff_SWAP_sym_out _bfd_xcoff_swap_sym_out
+#define coff_SWAP_aux_in _bfd_xcoff_swap_aux_in
+#define coff_SWAP_aux_out _bfd_xcoff_swap_aux_out
+
+#include "coffcode.h"
/* The main body of code is in coffcode.h. */
static const char *normalize_filename PARAMS ((bfd *));
+static boolean xcoff_write_armap_old
+ PARAMS ((bfd *, unsigned int, struct orl *, unsigned int, int));
+static boolean xcoff_write_armap_big
+ PARAMS ((bfd *, unsigned int, struct orl *, unsigned int, int));
+static boolean xcoff_write_archive_contents_old PARAMS ((bfd *));
+static boolean xcoff_write_archive_contents_big PARAMS ((bfd *));
+static void xcoff_swap_ldhdr_in
+ PARAMS ((bfd *, const PTR, struct internal_ldhdr *));
+static void xcoff_swap_ldhdr_out
+ PARAMS ((bfd *, const struct internal_ldhdr *, PTR));
+static void xcoff_swap_ldsym_in
+ PARAMS ((bfd *, const PTR, struct internal_ldsym *));
+static void xcoff_swap_ldsym_out
+ PARAMS ((bfd *, const struct internal_ldsym *, PTR));
+static void xcoff_swap_ldrel_in
+ PARAMS ((bfd *, const PTR, struct internal_ldrel *));
+static void xcoff_swap_ldrel_out
+ PARAMS ((bfd *, const struct internal_ldrel *, PTR));
+static boolean xcoff_ppc_relocate_section
+ PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
+ struct internal_reloc *, struct internal_syment *, asection **));
+static boolean _bfd_xcoff_put_ldsymbol_name
+ PARAMS ((bfd *, struct xcoff_loader_info *, struct internal_ldsym *,
+ const char *));
+static asection *xcoff_create_csect_from_smclas
+ PARAMS ((bfd *, union internal_auxent *, const char *));
+static boolean xcoff_is_lineno_count_overflow PARAMS ((bfd *, bfd_vma));
+static boolean xcoff_is_reloc_count_overflow PARAMS ((bfd *, bfd_vma));
+static bfd_vma xcoff_loader_symbol_offset
+ PARAMS ((bfd *, struct internal_ldhdr *));
+static bfd_vma xcoff_loader_reloc_offset
+ PARAMS ((bfd *, struct internal_ldhdr *));
+static boolean xcoff_generate_rtinit
+ PARAMS((bfd *, const char *, const char *));
+
/* We use our own tdata type. Its first field is the COFF tdata type,
so the COFF routines are compatible. */
@@ -49,10 +155,9 @@ _bfd_xcoff_mkobject (abfd)
bfd *abfd;
{
coff_data_type *coff;
+ bfd_size_type amt = sizeof (struct xcoff_tdata);
- abfd->tdata.xcoff_obj_data =
- ((struct xcoff_tdata *)
- bfd_zalloc (abfd, sizeof (struct xcoff_tdata)));
+ abfd->tdata.xcoff_obj_data = (struct xcoff_tdata *) bfd_zalloc (abfd, amt);
if (abfd->tdata.xcoff_obj_data == NULL)
return false;
coff = coff_data (abfd);
@@ -70,6 +175,9 @@ _bfd_xcoff_mkobject (abfd)
xcoff_data (abfd)->csects = NULL;
xcoff_data (abfd)->debug_indices = NULL;
+ /* text section alignment is different than the default */
+ /* xcoff_data (abfd)->text_align_power = 5; */
+
return true;
}
@@ -138,7 +246,7 @@ _bfd_xcoff_swap_sym_in (abfd, ext1, in1)
PTR in1;
{
SYMENT *ext = (SYMENT *)ext1;
- struct internal_syment *in = (struct internal_syment *)in1;
+ struct internal_syment * in = (struct internal_syment *)in1;
if (ext->e.e_name[0] != 0)
{
@@ -147,15 +255,14 @@ _bfd_xcoff_swap_sym_in (abfd, ext1, in1)
else
{
in->_n._n_n._n_zeroes = 0;
- in->_n._n_n._n_offset =
- bfd_h_get_32(abfd, (bfd_byte *) ext->e.e.e_offset);
+ in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
}
- in->n_value = bfd_h_get_32(abfd, (bfd_byte *) ext->e_value);
- in->n_scnum = bfd_h_get_16(abfd, (bfd_byte *) ext->e_scnum);
- in->n_type = bfd_h_get_16(abfd, (bfd_byte *) ext->e_type);
- in->n_sclass = bfd_h_get_8(abfd, ext->e_sclass);
- in->n_numaux = bfd_h_get_8(abfd, ext->e_numaux);
+ in->n_value = H_GET_32 (abfd, ext->e_value);
+ in->n_scnum = H_GET_16 (abfd, ext->e_scnum);
+ in->n_type = H_GET_16 (abfd, ext->e_type);
+ in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
+ in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
}
unsigned int
@@ -173,26 +280,18 @@ _bfd_xcoff_swap_sym_out (abfd, inp, extp)
}
else
{
- bfd_h_put_32(abfd, 0, (bfd_byte *) ext->e.e.e_zeroes);
- bfd_h_put_32(abfd, in->_n._n_n._n_offset,
- (bfd_byte *) ext->e.e.e_offset);
+ H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
+ H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
}
- bfd_h_put_32(abfd, in->n_value , (bfd_byte *) ext->e_value);
- bfd_h_put_16(abfd, in->n_scnum , (bfd_byte *) ext->e_scnum);
- bfd_h_put_16(abfd, in->n_type , (bfd_byte *) ext->e_type);
- bfd_h_put_8(abfd, in->n_sclass , ext->e_sclass);
- bfd_h_put_8(abfd, in->n_numaux , ext->e_numaux);
+ H_PUT_32 (abfd, in->n_value, ext->e_value);
+ H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
+ H_PUT_16 (abfd, in->n_type, ext->e_type);
+ H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
+ H_PUT_8 (abfd, in->n_numaux, ext->e_numaux);
return bfd_coff_symesz (abfd);
}
-#define PUTWORD bfd_h_put_32
-#define PUTHALF bfd_h_put_16
-#define PUTBYTE bfd_h_put_8
-#define GETWORD bfd_h_get_32
-#define GETHALF bfd_h_get_16
-#define GETBYTE bfd_h_get_8
-
void
_bfd_xcoff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
bfd *abfd;
@@ -203,27 +302,31 @@ _bfd_xcoff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
int numaux;
PTR in1;
{
- AUXENT *ext = (AUXENT *)ext1;
+ AUXENT * ext = (AUXENT *)ext1;
union internal_auxent *in = (union internal_auxent *)in1;
- switch (class) {
+ switch (class)
+ {
case C_FILE:
- if (ext->x_file.x_fname[0] == 0) {
+ if (ext->x_file.x_fname[0] == 0)
+ {
in->x_file.x_n.x_zeroes = 0;
in->x_file.x_n.x_offset =
- bfd_h_get_32(abfd, (bfd_byte *) ext->x_file.x_n.x_offset);
- } else {
- 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);
- }
- }
+ H_GET_32 (abfd, ext->x_file.x_n.x_offset);
+ }
+ else
+ {
+ 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);
+ }
+ }
goto end;
/* RS/6000 "csect" auxents */
@@ -231,18 +334,16 @@ _bfd_xcoff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
case C_HIDEXT:
if (indx + 1 == numaux)
{
- in->x_csect.x_scnlen.l =
- bfd_h_get_32 (abfd, ext->x_csect.x_scnlen);
- in->x_csect.x_parmhash = bfd_h_get_32 (abfd,
- ext->x_csect.x_parmhash);
- in->x_csect.x_snhash = bfd_h_get_16 (abfd, ext->x_csect.x_snhash);
+ in->x_csect.x_scnlen.l = H_GET_32 (abfd, ext->x_csect.x_scnlen);
+ in->x_csect.x_parmhash = H_GET_32 (abfd, ext->x_csect.x_parmhash);
+ in->x_csect.x_snhash = H_GET_16 (abfd, ext->x_csect.x_snhash);
/* We don't have to hack bitfields in x_smtyp because it's
defined by shifts-and-ands, which are equivalent on all
byte orders. */
- in->x_csect.x_smtyp = bfd_h_get_8 (abfd, ext->x_csect.x_smtyp);
- in->x_csect.x_smclas = bfd_h_get_8 (abfd, ext->x_csect.x_smclas);
- in->x_csect.x_stab = bfd_h_get_32 (abfd, ext->x_csect.x_stab);
- in->x_csect.x_snstab = bfd_h_get_16 (abfd, ext->x_csect.x_snstab);
+ in->x_csect.x_smtyp = H_GET_8 (abfd, ext->x_csect.x_smtyp);
+ in->x_csect.x_smclas = H_GET_8 (abfd, ext->x_csect.x_smclas);
+ in->x_csect.x_stab = H_GET_32 (abfd, ext->x_csect.x_stab);
+ in->x_csect.x_snstab = H_GET_16 (abfd, ext->x_csect.x_snstab);
goto end;
}
break;
@@ -250,13 +351,11 @@ _bfd_xcoff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
case C_STAT:
case C_LEAFSTAT:
case C_HIDDEN:
- if (type == T_NULL) {
- in->x_scn.x_scnlen = bfd_h_get_32(abfd,
- (bfd_byte *) ext->x_scn.x_scnlen);
- in->x_scn.x_nreloc = bfd_h_get_16(abfd,
- (bfd_byte *) ext->x_scn.x_nreloc);
- in->x_scn.x_nlinno = bfd_h_get_16(abfd,
- (bfd_byte *) ext->x_scn.x_nlinno);
+ if (type == T_NULL)
+ {
+ in->x_scn.x_scnlen = H_GET_32 (abfd, ext->x_scn.x_scnlen);
+ in->x_scn.x_nreloc = H_GET_16 (abfd, ext->x_scn.x_nreloc);
+ in->x_scn.x_nlinno = H_GET_16 (abfd, ext->x_scn.x_nlinno);
/* PE defines some extra fields; we zero them out for
safety. */
in->x_scn.x_checksum = 0;
@@ -268,52 +367,57 @@ _bfd_xcoff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
break;
}
- in->x_sym.x_tagndx.l = bfd_h_get_32(abfd, (bfd_byte *) ext->x_sym.x_tagndx);
- in->x_sym.x_tvndx = bfd_h_get_16(abfd, (bfd_byte *) ext->x_sym.x_tvndx);
+ in->x_sym.x_tagndx.l = H_GET_32 (abfd, ext->x_sym.x_tagndx);
+ in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class))
{
- in->x_sym.x_fcnary.x_fcn.x_lnnoptr = bfd_h_get_32(abfd, (bfd_byte *)
- ext->x_sym.x_fcnary.x_fcn.x_lnnoptr);
- in->x_sym.x_fcnary.x_fcn.x_endndx.l = bfd_h_get_32(abfd, (bfd_byte *)
- ext->x_sym.x_fcnary.x_fcn.x_endndx);
+ in->x_sym.x_fcnary.x_fcn.x_lnnoptr =
+ H_GET_32 (abfd, ext->x_sym.x_fcnary.x_fcn.x_lnnoptr);
+ in->x_sym.x_fcnary.x_fcn.x_endndx.l =
+ H_GET_32 (abfd, ext->x_sym.x_fcnary.x_fcn.x_endndx);
}
else
{
in->x_sym.x_fcnary.x_ary.x_dimen[0] =
- bfd_h_get_16 (abfd, (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
+ H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
in->x_sym.x_fcnary.x_ary.x_dimen[1] =
- bfd_h_get_16 (abfd, (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
+ H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
in->x_sym.x_fcnary.x_ary.x_dimen[2] =
- bfd_h_get_16 (abfd, (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
+ H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
in->x_sym.x_fcnary.x_ary.x_dimen[3] =
- bfd_h_get_16 (abfd, (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
+ H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
}
- if (ISFCN(type)) {
- in->x_sym.x_misc.x_fsize = bfd_h_get_32(abfd, (bfd_byte *) ext->x_sym.x_misc.x_fsize);
- }
- else {
- in->x_sym.x_misc.x_lnsz.x_lnno = bfd_h_get_16(abfd, (bfd_byte *)
- ext->x_sym.x_misc.x_lnsz.x_lnno);
- in->x_sym.x_misc.x_lnsz.x_size = bfd_h_get_16(abfd, (bfd_byte *)
- ext->x_sym.x_misc.x_lnsz.x_size);
- }
-end: ;
- /* the semicolon is because MSVC doesn't like labels at
- end of block. */
+ if (ISFCN (type))
+ {
+ in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
+ }
+ else
+ {
+ in->x_sym.x_misc.x_lnsz.x_lnno =
+ H_GET_16 (abfd, ext->x_sym.x_misc.x_lnsz.x_lnno);
+ in->x_sym.x_misc.x_lnsz.x_size =
+ H_GET_16 (abfd, ext->x_sym.x_misc.x_lnsz.x_size);
+ }
+ end: ;
+ /* The semicolon is because MSVC doesn't like labels at
+ end of block. */
}
+
+unsigned int _bfd_xcoff_swap_aux_out PARAMS ((bfd *, PTR, int, int, int, int, PTR));
+
unsigned int
_bfd_xcoff_swap_aux_out (abfd, inp, type, class, indx, numaux, extp)
- bfd *abfd;
- PTR inp;
+ bfd * abfd;
+ PTR inp;
int type;
int class;
int indx ATTRIBUTE_UNUSED;
int numaux ATTRIBUTE_UNUSED;
- PTR extp;
+ PTR extp;
{
union internal_auxent *in = (union internal_auxent *)inp;
AUXENT *ext = (AUXENT *)extp;
@@ -321,87 +425,87 @@ _bfd_xcoff_swap_aux_out (abfd, inp, type, class, indx, numaux, extp)
memset((PTR)ext, 0, bfd_coff_auxesz (abfd));
switch (class)
{
- case C_FILE:
- if (in->x_file.x_fname[0] == 0)
- {
- PUTWORD(abfd, 0, (bfd_byte *) ext->x_file.x_n.x_zeroes);
- PUTWORD(abfd,
- in->x_file.x_n.x_offset,
- (bfd_byte *) ext->x_file.x_n.x_offset);
- }
- else
- {
- memcpy (ext->x_file.x_fname, in->x_file.x_fname, FILNMLEN);
- }
- goto end;
-
- /* RS/6000 "csect" auxents */
- case C_EXT:
- case C_HIDEXT:
- if (indx + 1 == numaux)
- {
- PUTWORD (abfd, in->x_csect.x_scnlen.l,ext->x_csect.x_scnlen);
- PUTWORD (abfd, in->x_csect.x_parmhash, ext->x_csect.x_parmhash);
- PUTHALF (abfd, in->x_csect.x_snhash, ext->x_csect.x_snhash);
- /* We don't have to hack bitfields in x_smtyp because it's
- defined by shifts-and-ands, which are equivalent on all
- byte orders. */
- PUTBYTE (abfd, in->x_csect.x_smtyp, ext->x_csect.x_smtyp);
- PUTBYTE (abfd, in->x_csect.x_smclas, ext->x_csect.x_smclas);
- PUTWORD (abfd, in->x_csect.x_stab, ext->x_csect.x_stab);
- PUTHALF (abfd, in->x_csect.x_snstab, ext->x_csect.x_snstab);
- goto end;
- }
- break;
-
- case C_STAT:
- case C_LEAFSTAT:
- case C_HIDDEN:
- if (type == T_NULL) {
- bfd_h_put_32(abfd, in->x_scn.x_scnlen, (bfd_byte *) ext->x_scn.x_scnlen);
- bfd_h_put_16(abfd, in->x_scn.x_nreloc, (bfd_byte *) ext->x_scn.x_nreloc);
- bfd_h_put_16(abfd, in->x_scn.x_nlinno, (bfd_byte *) ext->x_scn.x_nlinno);
+ case C_FILE:
+ if (in->x_file.x_fname[0] == 0)
+ {
+ H_PUT_32 (abfd, 0, ext->x_file.x_n.x_zeroes);
+ H_PUT_32 (abfd, in->x_file.x_n.x_offset, ext->x_file.x_n.x_offset);
+ }
+ else
+ {
+ memcpy (ext->x_file.x_fname, in->x_file.x_fname, FILNMLEN);
+ }
goto end;
+
+ /* RS/6000 "csect" auxents */
+ case C_EXT:
+ case C_HIDEXT:
+ if (indx + 1 == numaux)
+ {
+ H_PUT_32 (abfd, in->x_csect.x_scnlen.l, ext->x_csect.x_scnlen);
+ H_PUT_32 (abfd, in->x_csect.x_parmhash, ext->x_csect.x_parmhash);
+ H_PUT_16 (abfd, in->x_csect.x_snhash, ext->x_csect.x_snhash);
+ /* We don't have to hack bitfields in x_smtyp because it's
+ defined by shifts-and-ands, which are equivalent on all
+ byte orders. */
+ H_PUT_8 (abfd, in->x_csect.x_smtyp, ext->x_csect.x_smtyp);
+ H_PUT_8 (abfd, in->x_csect.x_smclas, ext->x_csect.x_smclas);
+ H_PUT_32 (abfd, in->x_csect.x_stab, ext->x_csect.x_stab);
+ H_PUT_16 (abfd, in->x_csect.x_snstab, ext->x_csect.x_snstab);
+ goto end;
+ }
+ break;
+
+ case C_STAT:
+ case C_LEAFSTAT:
+ case C_HIDDEN:
+ if (type == T_NULL)
+ {
+ H_PUT_32 (abfd, in->x_scn.x_scnlen, ext->x_scn.x_scnlen);
+ H_PUT_16 (abfd, in->x_scn.x_nreloc, ext->x_scn.x_nreloc);
+ H_PUT_16 (abfd, in->x_scn.x_nlinno, ext->x_scn.x_nlinno);
+ goto end;
+ }
+ break;
}
- break;
- }
- PUTWORD(abfd, in->x_sym.x_tagndx.l, (bfd_byte *) ext->x_sym.x_tagndx);
- bfd_h_put_16 (abfd, in->x_sym.x_tvndx , (bfd_byte *) ext->x_sym.x_tvndx);
+ H_PUT_32 (abfd, in->x_sym.x_tagndx.l, ext->x_sym.x_tagndx);
+ H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class))
{
- bfd_h_put_32(abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr,
- (bfd_byte *) ext->x_sym.x_fcnary.x_fcn.x_lnnoptr);
- PUTWORD(abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.l,
- (bfd_byte *) ext->x_sym.x_fcnary.x_fcn.x_endndx);
+ H_PUT_32 (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr,
+ ext->x_sym.x_fcnary.x_fcn.x_lnnoptr);
+ H_PUT_32 (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.l,
+ ext->x_sym.x_fcnary.x_fcn.x_endndx);
}
else
{
- bfd_h_put_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
- (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
- bfd_h_put_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
- (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
- bfd_h_put_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
- (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
- bfd_h_put_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
- (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
+ H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
+ ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
+ H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
+ ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
+ H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
+ ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
+ H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
+ ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
}
if (ISFCN (type))
- PUTWORD (abfd, in->x_sym.x_misc.x_fsize,
- (bfd_byte *) ext->x_sym.x_misc.x_fsize);
+ H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
else
{
- bfd_h_put_16(abfd, in->x_sym.x_misc.x_lnsz.x_lnno,
- (bfd_byte *)ext->x_sym.x_misc.x_lnsz.x_lnno);
- bfd_h_put_16(abfd, in->x_sym.x_misc.x_lnsz.x_size,
- (bfd_byte *)ext->x_sym.x_misc.x_lnsz.x_size);
+ H_PUT_16 (abfd, in->x_sym.x_misc.x_lnsz.x_lnno,
+ ext->x_sym.x_misc.x_lnsz.x_lnno);
+ H_PUT_16 (abfd, in->x_sym.x_misc.x_lnsz.x_size,
+ ext->x_sym.x_misc.x_lnsz.x_size);
}
end:
return bfd_coff_auxesz (abfd);
}
+
+
/* The XCOFF reloc table. Actually, XCOFF relocations specify the
bitsize and whether they are signed or not, along with a
@@ -409,9 +513,6 @@ end:
different algorithms for putting in the reloc. Many of these
relocs need special_function entries, which I have not written. */
-/* 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)
reloc_howto_type xcoff_howto_table[] =
{
@@ -755,6 +856,7 @@ reloc_howto_type xcoff_howto_table[] =
0xffff, /* src_mask */
0xffff, /* dst_mask */
false), /* pcrel_offset */
+
HOWTO (0, /* type */
0, /* rightshift */
4, /* size (0 = byte, 1 = short, 2 = long) */
@@ -771,55 +873,6 @@ reloc_howto_type xcoff_howto_table[] =
};
-/* These are the first two like the above but for 16-bit relocs. */
-static reloc_howto_type xcoff_howto_table_16[] =
-{
- /* Standard 16 bit relocation. */
- HOWTO (0, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_POS_16", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- false), /* pcrel_offset */
-
- /* 16 bit relocation, but store negative value. */
- HOWTO (1, /* type */
- 0, /* rightshift */
- -2, /* size (0 = byte, 1 = short, 2 = long) */
- 16, /* bitsize */
- false, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_bitfield, /* complain_on_overflow */
- 0, /* special_function */
- "R_NEG_16", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- false), /* pcrel_offset */
-
- /* 16 bit PC relative relocation. */
- HOWTO (2, /* type */
- 0, /* rightshift */
- 2, /* size (0 = byte, 1 = short, 2 = long) */
- 32, /* bitsize */
- true, /* pc_relative */
- 0, /* bitpos */
- complain_overflow_signed, /* complain_on_overflow */
- 0, /* special_function */
- "R_REL_16", /* name */
- true, /* partial_inplace */
- 0xffffffff, /* src_mask */
- 0xffffffff, /* dst_mask */
- false) /* pcrel_offset */
- };
-
void
_bfd_xcoff_rtype2howto (relent, internal)
arelent *relent;
@@ -827,10 +880,12 @@ _bfd_xcoff_rtype2howto (relent, internal)
{
relent->howto = xcoff_howto_table + internal->r_type;
- if (relent->howto->bitsize != ((unsigned int) internal->r_size & 0x1f) + 1
- && (internal->r_type
- < sizeof (xcoff_howto_table_16)/sizeof (xcoff_howto_table_16[0])))
- relent->howto = xcoff_howto_table_16 + internal->r_type;
+ /* Check for relocs we don't know of. */
+ if (internal->r_type
+ >= sizeof (xcoff_howto_table) / sizeof (xcoff_howto_table[0]))
+ abort ();
+ if (internal->r_type != relent->howto->type)
+ abort ();
/* The r_size field of an XCOFF reloc encodes the bitsize of the
relocation, as well as indicating whether it is signed or not.
@@ -871,6 +926,7 @@ _bfd_xcoff_reloc_type_lookup (abfd, code)
return NULL;
}
}
+
/* XCOFF archive support. The original version of this code was by
Damon A. Permezel. It was enhanced to permit cross support, and
@@ -917,168 +973,7 @@ _bfd_xcoff_reloc_type_lookup (abfd, code)
/* XCOFF archives use this as a magic string. Note that both strings
have the same length. */
-#define XCOFFARMAG "<aiaff>\012"
-#define XCOFFARMAGBIG "<bigaf>\012"
-#define SXCOFFARMAG 8
-
-/* This terminates an XCOFF archive member name. */
-
-#define XCOFFARFMAG "`\012"
-#define SXCOFFARFMAG 2
-/* XCOFF archives start with this (printable) structure. */
-
-struct xcoff_ar_file_hdr
-{
- /* Magic string. */
- char magic[SXCOFFARMAG];
-
- /* Offset of the member table (decimal ASCII string). */
- char memoff[12];
-
- /* Offset of the global symbol table (decimal ASCII string). */
- char symoff[12];
-
- /* Offset of the first member in the archive (decimal ASCII string). */
- char firstmemoff[12];
-
- /* Offset of the last member in the archive (decimal ASCII string). */
- char lastmemoff[12];
-
- /* Offset of the first member on the free list (decimal ASCII
- string). */
- char freeoff[12];
-};
-
-#define SIZEOF_AR_FILE_HDR (5 * 12 + SXCOFFARMAG)
-
-/* This is the equivalent data structure for the big archive format. */
-
-struct xcoff_ar_file_hdr_big
-{
- /* Magic string. */
- char magic[SXCOFFARMAG];
-
- /* Offset of the member table (decimal ASCII string). */
- char memoff[20];
-
- /* Offset of the global symbol table for 32-bit objects (decimal ASCII
- string). */
- char symoff[20];
-
- /* Offset of the global symbol table for 64-bit objects (decimal ASCII
- string). */
- char symoff64[20];
-
- /* Offset of the first member in the archive (decimal ASCII string). */
- char firstmemoff[20];
-
- /* Offset of the last member in the archive (decimal ASCII string). */
- char lastmemoff[20];
-
- /* Offset of the first member on the free list (decimal ASCII
- string). */
- char freeoff[20];
-};
-
-#define SIZEOF_AR_FILE_HDR_BIG (6 * 20 + SXCOFFARMAG)
-
-/* Each XCOFF archive member starts with this (printable) structure. */
-
-struct xcoff_ar_hdr
-{
- /* File size not including the header (decimal ASCII string). */
- char size[12];
-
- /* File offset of next archive member (decimal ASCII string). */
- char nextoff[12];
-
- /* File offset of previous archive member (decimal ASCII string). */
- char prevoff[12];
-
- /* File mtime (decimal ASCII string). */
- char date[12];
-
- /* File UID (decimal ASCII string). */
- char uid[12];
-
- /* File GID (decimal ASCII string). */
- char gid[12];
-
- /* File mode (octal ASCII string). */
- char mode[12];
-
- /* Length of file name (decimal ASCII string). */
- char namlen[4];
-
- /* This structure is followed by the file name. The length of the
- name is given in the namlen field. If the length of the name is
- odd, the name is followed by a null byte. The name and optional
- null byte are followed by XCOFFARFMAG, which is not included in
- namlen. The contents of the archive member follow; the number of
- bytes is given in the size field. */
-};
-
-#define SIZEOF_AR_HDR (7 * 12 + 4)
-
-/* The equivalent for the big archive format. */
-
-struct xcoff_ar_hdr_big
-{
- /* File size not including the header (decimal ASCII string). */
- char size[20];
-
- /* File offset of next archive member (decimal ASCII string). */
- char nextoff[20];
-
- /* File offset of previous archive member (decimal ASCII string). */
- char prevoff[20];
-
- /* File mtime (decimal ASCII string). */
- char date[12];
-
- /* File UID (decimal ASCII string). */
- char uid[12];
-
- /* File GID (decimal ASCII string). */
- char gid[12];
-
- /* File mode (octal ASCII string). */
- char mode[12];
-
- /* Length of file name (decimal ASCII string). */
- char namlen[4];
-
- /* This structure is followed by the file name. The length of the
- name is given in the namlen field. If the length of the name is
- odd, the name is followed by a null byte. The name and optional
- null byte are followed by XCOFFARFMAG, which is not included in
- namlen. The contents of the archive member follow; the number of
- bytes is given in the size field. */
-};
-
-#define SIZEOF_AR_HDR_BIG (3 * 20 + 4 * 12 + 4)
-
-/* We often have to distinguish between the old and big file format.
- Make it a bit cleaner. We can use `xcoff_ardata' here because the
- `hdr' member has the same size and position in both formats. */
-#define xcoff_big_format_p(abfd) \
- (xcoff_ardata (abfd)->magic[1] == 'b')
-
-/* We store a copy of the xcoff_ar_file_hdr in the tdata field of the
- artdata structure. Similar for the big archive. */
-#define xcoff_ardata(abfd) \
- ((struct xcoff_ar_file_hdr *) bfd_ardata (abfd)->tdata)
-#define xcoff_ardata_big(abfd) \
- ((struct xcoff_ar_file_hdr_big *) bfd_ardata (abfd)->tdata)
-
-/* We store a copy of the xcoff_ar_hdr in the arelt_data field of an
- archive element. Similar for the big archive. */
-#define arch_eltdata(bfd) ((struct areltdata *) ((bfd)->arelt_data))
-#define arch_xhdr(bfd) \
- ((struct xcoff_ar_hdr *) arch_eltdata (bfd)->arch_header)
-#define arch_xhdr_big(bfd) \
- ((struct xcoff_ar_hdr_big *) arch_eltdata (bfd)->arch_header)
/* Read in the armap of an XCOFF archive. */
@@ -1116,12 +1011,14 @@ _bfd_xcoff_slurp_armap (abfd)
return false;
/* The symbol table starts with a normal archive header. */
- if (bfd_read ((PTR) &hdr, SIZEOF_AR_HDR, 1, abfd) != SIZEOF_AR_HDR)
+ if (bfd_bread ((PTR) &hdr, (bfd_size_type) SIZEOF_AR_HDR, abfd)
+ != SIZEOF_AR_HDR)
return false;
/* Skip the name (normally empty). */
namlen = strtol (hdr.namlen, (char **) NULL, 10);
- if (bfd_seek (abfd, ((namlen + 1) & ~1) + SXCOFFARFMAG, SEEK_CUR) != 0)
+ off = ((namlen + 1) & ~ (size_t) 1) + SXCOFFARFMAG;
+ if (bfd_seek (abfd, off, SEEK_CUR) != 0)
return false;
sz = strtol (hdr.size, (char **) NULL, 10);
@@ -1130,11 +1027,11 @@ _bfd_xcoff_slurp_armap (abfd)
contents = (bfd_byte *) bfd_alloc (abfd, sz);
if (contents == NULL)
return false;
- if (bfd_read ((PTR) contents, 1, sz, abfd) != sz)
+ if (bfd_bread ((PTR) contents, sz, abfd) != sz)
return false;
/* The symbol table starts with a four byte count. */
- c = bfd_h_get_32 (abfd, contents);
+ c = H_GET_32 (abfd, contents);
if (c * 4 >= sz)
{
@@ -1142,8 +1039,8 @@ _bfd_xcoff_slurp_armap (abfd)
return false;
}
- bfd_ardata (abfd)->symdefs = ((carsym *)
- bfd_alloc (abfd, c * sizeof (carsym)));
+ bfd_ardata (abfd)->symdefs =
+ ((carsym *) bfd_alloc (abfd, c * sizeof (carsym)));
if (bfd_ardata (abfd)->symdefs == NULL)
return false;
@@ -1151,7 +1048,7 @@ _bfd_xcoff_slurp_armap (abfd)
for (i = 0, arsym = bfd_ardata (abfd)->symdefs, p = contents + 4;
i < c;
++i, ++arsym, p += 4)
- arsym->file_offset = bfd_h_get_32 (abfd, p);
+ arsym->file_offset = H_GET_32 (abfd, p);
}
else
{
@@ -1169,13 +1066,14 @@ _bfd_xcoff_slurp_armap (abfd)
return false;
/* The symbol table starts with a normal archive header. */
- if (bfd_read ((PTR) &hdr, SIZEOF_AR_HDR_BIG, 1, abfd)
+ if (bfd_bread ((PTR) &hdr, (bfd_size_type) SIZEOF_AR_HDR_BIG, abfd)
!= SIZEOF_AR_HDR_BIG)
return false;
/* Skip the name (normally empty). */
namlen = strtol (hdr.namlen, (char **) NULL, 10);
- if (bfd_seek (abfd, ((namlen + 1) & ~1) + SXCOFFARFMAG, SEEK_CUR) != 0)
+ off = ((namlen + 1) & ~ (size_t) 1) + SXCOFFARFMAG;
+ if (bfd_seek (abfd, off, SEEK_CUR) != 0)
return false;
/* XXX This actually has to be a call to strtoll (at least on 32-bit
@@ -1187,11 +1085,11 @@ _bfd_xcoff_slurp_armap (abfd)
contents = (bfd_byte *) bfd_alloc (abfd, sz);
if (contents == NULL)
return false;
- if (bfd_read ((PTR) contents, 1, sz, abfd) != sz)
+ if (bfd_bread ((PTR) contents, sz, abfd) != sz)
return false;
/* The symbol table starts with an eight byte count. */
- c = bfd_h_get_64 (abfd, contents);
+ c = H_GET_64 (abfd, contents);
if (c * 8 >= sz)
{
@@ -1199,8 +1097,8 @@ _bfd_xcoff_slurp_armap (abfd)
return false;
}
- bfd_ardata (abfd)->symdefs = ((carsym *)
- bfd_alloc (abfd, c * sizeof (carsym)));
+ bfd_ardata (abfd)->symdefs =
+ ((carsym *) bfd_alloc (abfd, c * sizeof (carsym)));
if (bfd_ardata (abfd)->symdefs == NULL)
return false;
@@ -1208,7 +1106,7 @@ _bfd_xcoff_slurp_armap (abfd)
for (i = 0, arsym = bfd_ardata (abfd)->symdefs, p = contents + 8;
i < c;
++i, ++arsym, p += 8)
- arsym->file_offset = bfd_h_get_64 (abfd, p);
+ arsym->file_offset = H_GET_64 (abfd, p);
}
/* After the file offsets come null terminated symbol names. */
@@ -1238,8 +1136,9 @@ _bfd_xcoff_archive_p (abfd)
bfd *abfd;
{
char magic[SXCOFFARMAG];
+ bfd_size_type amt;
- if (bfd_read ((PTR) magic, SXCOFFARMAG, 1, abfd) != SXCOFFARMAG)
+ if (bfd_bread ((PTR) magic, (bfd_size_type) SXCOFFARMAG, abfd) != SXCOFFARMAG)
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
@@ -1256,9 +1155,8 @@ _bfd_xcoff_archive_p (abfd)
/* We are setting bfd_ardata(abfd) here, but since bfd_ardata
involves a cast, we can't do it as the left operand of
assignment. */
- abfd->tdata.aout_ar_data =
- (struct artdata *) bfd_zalloc (abfd, sizeof (struct artdata));
-
+ amt = sizeof (struct artdata);
+ abfd->tdata.aout_ar_data = (struct artdata *) bfd_zalloc (abfd, amt);
if (bfd_ardata (abfd) == (struct artdata *) NULL)
return NULL;
@@ -1277,8 +1175,9 @@ _bfd_xcoff_archive_p (abfd)
memcpy (hdr.magic, magic, SXCOFFARMAG);
/* Now read the rest of the file header. */
- if (bfd_read ((PTR) &hdr.memoff, SIZEOF_AR_FILE_HDR - SXCOFFARMAG, 1,
- abfd) != SIZEOF_AR_FILE_HDR - SXCOFFARMAG)
+ if (bfd_bread ((PTR) &hdr.memoff,
+ (bfd_size_type) SIZEOF_AR_FILE_HDR - SXCOFFARMAG, abfd)
+ != SIZEOF_AR_FILE_HDR - SXCOFFARMAG)
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
@@ -1288,7 +1187,8 @@ _bfd_xcoff_archive_p (abfd)
bfd_ardata (abfd)->first_file_filepos = strtol (hdr.firstmemoff,
(char **) NULL, 10);
- bfd_ardata (abfd)->tdata = bfd_zalloc (abfd, SIZEOF_AR_FILE_HDR);
+ amt = SIZEOF_AR_FILE_HDR;
+ bfd_ardata (abfd)->tdata = bfd_zalloc (abfd, amt);
if (bfd_ardata (abfd)->tdata == NULL)
return NULL;
@@ -1303,8 +1203,9 @@ _bfd_xcoff_archive_p (abfd)
memcpy (hdr.magic, magic, SXCOFFARMAG);
/* Now read the rest of the file header. */
- if (bfd_read ((PTR) &hdr.memoff, SIZEOF_AR_FILE_HDR_BIG - SXCOFFARMAG, 1,
- abfd) != SIZEOF_AR_FILE_HDR_BIG - SXCOFFARMAG)
+ if (bfd_bread ((PTR) &hdr.memoff,
+ (bfd_size_type) SIZEOF_AR_FILE_HDR_BIG - SXCOFFARMAG, abfd)
+ != SIZEOF_AR_FILE_HDR_BIG - SXCOFFARMAG)
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
@@ -1317,7 +1218,8 @@ _bfd_xcoff_archive_p (abfd)
bfd_ardata (abfd)->first_file_filepos = strtol (hdr.firstmemoff,
(char **) NULL, 10);
- bfd_ardata (abfd)->tdata = bfd_zalloc (abfd, SIZEOF_AR_FILE_HDR_BIG);
+ amt = SIZEOF_AR_FILE_HDR_BIG;
+ bfd_ardata (abfd)->tdata = bfd_zalloc (abfd, amt);
if (bfd_ardata (abfd)->tdata == NULL)
return NULL;
@@ -1340,10 +1242,11 @@ PTR
_bfd_xcoff_read_ar_hdr (abfd)
bfd *abfd;
{
- size_t namlen;
+ bfd_size_type namlen;
struct areltdata *ret;
+ bfd_size_type amt = sizeof (struct areltdata);
- ret = (struct areltdata *) bfd_alloc (abfd, sizeof (struct areltdata));
+ ret = (struct areltdata *) bfd_alloc (abfd, amt);
if (ret == NULL)
return NULL;
@@ -1352,22 +1255,23 @@ _bfd_xcoff_read_ar_hdr (abfd)
struct xcoff_ar_hdr hdr;
struct xcoff_ar_hdr *hdrp;
- if (bfd_read ((PTR) &hdr, SIZEOF_AR_HDR, 1, abfd) != SIZEOF_AR_HDR)
+ if (bfd_bread ((PTR) &hdr, (bfd_size_type) SIZEOF_AR_HDR, abfd)
+ != SIZEOF_AR_HDR)
{
free (ret);
return NULL;
}
namlen = strtol (hdr.namlen, (char **) NULL, 10);
- hdrp = (struct xcoff_ar_hdr *) bfd_alloc (abfd,
- SIZEOF_AR_HDR + namlen + 1);
+ amt = SIZEOF_AR_HDR + namlen + 1;
+ hdrp = (struct xcoff_ar_hdr *) bfd_alloc (abfd, amt);
if (hdrp == NULL)
{
free (ret);
return NULL;
}
memcpy (hdrp, &hdr, SIZEOF_AR_HDR);
- if (bfd_read ((char *) hdrp + SIZEOF_AR_HDR, 1, namlen, abfd) != namlen)
+ if (bfd_bread ((char *) hdrp + SIZEOF_AR_HDR, namlen, abfd) != namlen)
{
free (ret);
return NULL;
@@ -1383,7 +1287,7 @@ _bfd_xcoff_read_ar_hdr (abfd)
struct xcoff_ar_hdr_big hdr;
struct xcoff_ar_hdr_big *hdrp;
- if (bfd_read ((PTR) &hdr, SIZEOF_AR_HDR_BIG, 1, abfd)
+ if (bfd_bread ((PTR) &hdr, (bfd_size_type) SIZEOF_AR_HDR_BIG, abfd)
!= SIZEOF_AR_HDR_BIG)
{
free (ret);
@@ -1391,16 +1295,15 @@ _bfd_xcoff_read_ar_hdr (abfd)
}
namlen = strtol (hdr.namlen, (char **) NULL, 10);
- hdrp = (struct xcoff_ar_hdr_big *) bfd_alloc (abfd,
- SIZEOF_AR_HDR_BIG
- + namlen + 1);
+ amt = SIZEOF_AR_HDR_BIG + namlen + 1;
+ hdrp = (struct xcoff_ar_hdr_big *) bfd_alloc (abfd, amt);
if (hdrp == NULL)
{
free (ret);
return NULL;
}
memcpy (hdrp, &hdr, SIZEOF_AR_HDR_BIG);
- if (bfd_read ((char *) hdrp + SIZEOF_AR_HDR_BIG, 1, namlen, abfd) != namlen)
+ if (bfd_bread ((char *) hdrp + SIZEOF_AR_HDR_BIG, namlen, abfd) != namlen)
{
free (ret);
return NULL;
@@ -1416,7 +1319,7 @@ _bfd_xcoff_read_ar_hdr (abfd)
}
/* Skip over the XCOFFARFMAG at the end of the file name. */
- if (bfd_seek (abfd, (namlen & 1) + SXCOFFARFMAG, SEEK_CUR) != 0)
+ if (bfd_seek (abfd, (file_ptr) ((namlen & 1) + SXCOFFARFMAG), SEEK_CUR) != 0)
return NULL;
return (PTR) ret;
@@ -1540,6 +1443,7 @@ normalize_filename (abfd)
/* Write out an XCOFF armap. */
+/*ARGSUSED*/
static boolean
xcoff_write_armap_old (abfd, elength, map, orl_count, stridx)
bfd *abfd;
@@ -1558,7 +1462,7 @@ xcoff_write_armap_old (abfd, elength, map, orl_count, stridx)
memset (&hdr, 0, sizeof hdr);
sprintf (hdr.size, "%ld", (long) (4 + orl_count * 4 + stridx));
sprintf (hdr.nextoff, "%d", 0);
- memcpy (hdr.prevoff, xcoff_ardata (abfd)->memoff, 12);
+ memcpy (hdr.prevoff, xcoff_ardata (abfd)->memoff, XCOFFARMAG_ELEMENT_SIZE);
sprintf (hdr.date, "%d", 0);
sprintf (hdr.uid, "%d", 0);
sprintf (hdr.gid, "%d", 0);
@@ -1570,12 +1474,14 @@ xcoff_write_armap_old (abfd, elength, map, orl_count, stridx)
if (*p == '\0')
*p = ' ';
- if (bfd_write ((PTR) &hdr, SIZEOF_AR_HDR, 1, abfd) != SIZEOF_AR_HDR
- || bfd_write (XCOFFARFMAG, 1, SXCOFFARFMAG, abfd) != SXCOFFARFMAG)
+ if (bfd_bwrite ((PTR) &hdr, (bfd_size_type) SIZEOF_AR_HDR, abfd)
+ != SIZEOF_AR_HDR
+ || (bfd_bwrite (XCOFFARFMAG, (bfd_size_type) SXCOFFARFMAG, abfd)
+ != SXCOFFARFMAG))
return false;
- bfd_h_put_32 (abfd, orl_count, buf);
- if (bfd_write (buf, 1, 4, abfd) != 4)
+ H_PUT_32 (abfd, orl_count, buf);
+ if (bfd_bwrite (buf, (bfd_size_type) 4, abfd) != 4)
return false;
sub = abfd->archive_head;
@@ -1585,15 +1491,15 @@ xcoff_write_armap_old (abfd, elength, map, orl_count, stridx)
{
size_t namlen;
- while (((bfd *) (map[i]).pos) == sub)
+ while (map[i].u.abfd == sub)
{
- bfd_h_put_32 (abfd, fileoff, buf);
- if (bfd_write (buf, 1, 4, abfd) != 4)
+ H_PUT_32 (abfd, fileoff, buf);
+ if (bfd_bwrite (buf, (bfd_size_type) 4, abfd) != 4)
return false;
++i;
}
namlen = strlen (normalize_filename (sub));
- namlen = (namlen + 1) &~ 1;
+ namlen = (namlen + 1) &~ (size_t) 1;
fileoff += (SIZEOF_AR_HDR
+ namlen
+ SXCOFFARFMAG
@@ -1609,7 +1515,7 @@ xcoff_write_armap_old (abfd, elength, map, orl_count, stridx)
name = *map[i].name;
namlen = strlen (name);
- if (bfd_write (name, 1, namlen + 1, abfd) != namlen + 1)
+ if (bfd_bwrite (name, (bfd_size_type) (namlen + 1), abfd) != namlen + 1)
return false;
}
@@ -1618,183 +1524,321 @@ xcoff_write_armap_old (abfd, elength, map, orl_count, stridx)
char b;
b = '\0';
- if (bfd_write (&b, 1, 1, abfd) != 1)
+ if (bfd_bwrite (&b, (bfd_size_type) 1, abfd) != 1)
return false;
}
return true;
}
-/* Write a single armap in the big format. */
+static char buff20[XCOFFARMAGBIG_ELEMENT_SIZE + 1];
+#define FMT20 "%-20lld"
+#define FMT12 "%-12d"
+#define FMT12_OCTAL "%-12o"
+#define FMT4 "%-4d"
+#define PRINT20(d, v) \
+ sprintf (buff20, FMT20, (long long)(v)), \
+ memcpy ((void *) (d), buff20, 20)
+
+#define PRINT12(d, v) \
+ sprintf (buff20, FMT12, (int)(v)), \
+ memcpy ((void *) (d), buff20, 12)
+
+#define PRINT12_OCTAL(d, v) \
+ sprintf (buff20, FMT12_OCTAL, (unsigned int)(v)), \
+ memcpy ((void *) (d), buff20, 12)
+
+#define PRINT4(d, v) \
+ sprintf (buff20, FMT4, (int)(v)), \
+ memcpy ((void *) (d), buff20, 4)
+
+#define READ20(d, v) \
+ buff20[20] = 0, \
+ memcpy (buff20, (d), 20), \
+ (v) = bfd_scan_vma (buff20, (const char **) NULL, 10)
+
static boolean
-xcoff_write_one_armap_big (abfd, map, orl_count, orl_ccount, stridx, bits64,
- prevoff, nextoff)
+xcoff_write_armap_big (abfd, elength, map, orl_count, stridx)
bfd *abfd;
+ unsigned int elength ATTRIBUTE_UNUSED;
struct orl *map;
unsigned int orl_count;
- unsigned int orl_ccount;
- unsigned int stridx;
- int bits64;
- const char *prevoff;
- char *nextoff;
+ int stridx;
{
- struct xcoff_ar_hdr_big hdr;
- char *p;
- unsigned char buf[4];
+ struct xcoff_ar_file_hdr_big *fhdr;
+ bfd_vma i, sym_32, sym_64, str_32, str_64;
const bfd_arch_info_type *arch_info = NULL;
- bfd *sub;
- file_ptr fileoff;
- bfd *object_bfd;
- unsigned int i;
-
- memset (&hdr, 0, sizeof hdr);
- /* XXX This call actually should use %lld (at least on 32-bit
- machines) since the fields's width is 20 and there numbers with
- more than 32 bits can be represented. */
- sprintf (hdr.size, "%ld", (long) (4 + orl_ccount * 4 + stridx));
- if (bits64)
- sprintf (hdr.nextoff, "%d", 0);
- else
- sprintf (hdr.nextoff, "%ld", (strtol (prevoff, (char **) NULL, 10)
- + 4 + orl_ccount * 4 + stridx));
- memcpy (hdr.prevoff, prevoff, sizeof (hdr.prevoff));
- sprintf (hdr.date, "%d", 0);
- sprintf (hdr.uid, "%d", 0);
- sprintf (hdr.gid, "%d", 0);
- sprintf (hdr.mode, "%d", 0);
- sprintf (hdr.namlen, "%d", 0);
-
- /* We need spaces, not null bytes, in the header. */
- for (p = (char *) &hdr; p < (char *) &hdr + SIZEOF_AR_HDR_BIG; p++)
- if (*p == '\0')
- *p = ' ';
-
- memcpy (nextoff, hdr.nextoff, sizeof (hdr.nextoff));
-
- if (bfd_write ((PTR) &hdr, SIZEOF_AR_HDR_BIG, 1, abfd) != SIZEOF_AR_HDR_BIG
- || bfd_write (XCOFFARFMAG, 1, SXCOFFARFMAG, abfd) != SXCOFFARFMAG)
- return false;
-
- bfd_h_put_32 (abfd, orl_ccount, buf);
- if (bfd_write (buf, 1, 4, abfd) != 4)
- return false;
+ bfd *current_bfd;
+ size_t string_length;
+ ufile_ptr nextoff, prevoff;
+
+ /* First, we look through the symbols and work out which are
+ from 32-bit objects and which from 64-bit ones. */
+ sym_32 = sym_64 = str_32 = str_64 = 0;
- sub = abfd->archive_head;
- fileoff = SIZEOF_AR_FILE_HDR_BIG;
- i = 0;
- while (sub != NULL && i < orl_count)
+ current_bfd = abfd->archive_head;
+ if (current_bfd != NULL)
+ arch_info = bfd_get_arch_info (current_bfd);
+ i = 0;
+ while (current_bfd != NULL && i < orl_count)
{
- size_t namlen;
+ while (map[i].u.abfd == current_bfd)
+ {
+ string_length = strlen (*map[i].name) + 1;
- if ((bfd_arch_bits_per_address ((bfd *) map[i].pos) == 64) == bits64)
- while (((bfd *) (map[i]).pos) == sub)
- {
- bfd_h_put_32 (abfd, fileoff, buf);
- if (bfd_write (buf, 1, 4, abfd) != 4)
- return false;
- i++;
- }
- else
- while (((bfd *) (map[i]).pos) == sub)
+ if (arch_info->bits_per_address == 64)
+ {
+ sym_64++;
+ str_64 += string_length;
+ }
+ else
+ {
+ sym_32++;
+ str_32 += string_length;
+ }
i++;
-
- namlen = strlen (normalize_filename (sub));
- namlen = (namlen + 1) &~ 1;
- fileoff += (SIZEOF_AR_HDR_BIG
- + namlen
- + SXCOFFARFMAG
- + arelt_size (sub));
- fileoff = (fileoff + 1) &~ 1;
- sub = sub->next;
+ }
+ current_bfd = current_bfd->next;
+ if (current_bfd != NULL)
+ arch_info = bfd_get_arch_info (current_bfd);
}
- object_bfd = NULL;
- for (i = 0; i < orl_count; i++)
- {
- const char *name;
- size_t namlen;
- bfd *ob = (bfd *)map[i].pos;
+ /* A quick sanity check... */
+ BFD_ASSERT (sym_64 + sym_32 == orl_count);
+ /* Explicit cast to int for compiler. */
+ BFD_ASSERT ((int)(str_64 + str_32) == stridx);
- if (ob != object_bfd)
- arch_info = bfd_get_arch_info (ob);
+ fhdr = xcoff_ardata_big (abfd);
- if (arch_info && (arch_info->bits_per_address == 64) != bits64)
- continue;
+ /* xcoff_write_archive_contents_big passes nextoff in symoff. */
+ READ20 (fhdr->memoff, prevoff);
+ READ20 (fhdr->symoff, nextoff);
- name = *map[i].name;
- namlen = strlen (name);
- if (bfd_write (name, 1, namlen + 1, abfd) != namlen + 1)
- return false;
- }
+ BFD_ASSERT (nextoff == bfd_tell (abfd));
- if ((stridx & 1) != 0)
+ /* Write out the symbol table.
+ Layout :
+
+ standard big archive header
+ 0x0000 ar_size [0x14]
+ 0x0014 ar_nxtmem [0x14]
+ 0x0028 ar_prvmem [0x14]
+ 0x003C ar_date [0x0C]
+ 0x0048 ar_uid [0x0C]
+ 0x0054 ar_gid [0x0C]
+ 0x0060 ar_mod [0x0C]
+ 0x006C ar_namelen[0x04]
+ 0x0070 ar_fmag [SXCOFFARFMAG]
+
+ Symbol table
+ 0x0072 num_syms [0x08], binary
+ 0x0078 offsets [0x08 * num_syms], binary
+ 0x0086 + 0x08 * num_syms names [??]
+ ?? pad to even bytes.
+ */
+
+ if (sym_32)
{
- char b;
-
- b = '\0';
- if (bfd_write (&b, 1, 1, abfd) != 1)
+ struct xcoff_ar_hdr_big *hdr;
+ bfd_byte *symbol_table;
+ bfd_byte *st;
+ file_ptr fileoff;
+
+ bfd_vma symbol_table_size =
+ SIZEOF_AR_HDR_BIG
+ + SXCOFFARFMAG
+ + 8
+ + 8 * sym_32
+ + str_32 + (str_32 & 1);
+
+ symbol_table = NULL;
+ symbol_table = (bfd_byte *) bfd_malloc (symbol_table_size);
+ if (symbol_table == NULL)
return false;
- }
+ memset (symbol_table, 0, symbol_table_size);
+
+ hdr = (struct xcoff_ar_hdr_big *) symbol_table;
+
+ PRINT20 (hdr->size, 8 + 8 * sym_32 + str_32 + (str_32 & 1));
+
+ if (sym_64)
+ PRINT20 (hdr->nextoff, nextoff + symbol_table_size);
+ else
+ PRINT20 (hdr->nextoff, 0);
+
+ PRINT20 (hdr->prevoff, prevoff);
+ PRINT12 (hdr->date, 0);
+ PRINT12 (hdr->uid, 0);
+ PRINT12 (hdr->gid, 0);
+ PRINT12 (hdr->mode, 0);
+ PRINT4 (hdr->namlen, 0) ;
+
+ st = symbol_table + SIZEOF_AR_HDR_BIG;
+ memcpy (st, XCOFFARFMAG, SXCOFFARFMAG);
+ st += SXCOFFARFMAG;
+
+ bfd_h_put_64 (abfd, sym_32, st);
+ st += 8;
+
+ /* loop over the 32 bit offsets */
+ current_bfd = abfd->archive_head;
+ if (current_bfd != NULL)
+ arch_info = bfd_get_arch_info (current_bfd);
+ fileoff = SIZEOF_AR_FILE_HDR_BIG;
+ i = 0;
+ while (current_bfd != NULL && i < orl_count)
+ {
+ while (map[i].u.abfd == current_bfd)
+ {
+ if (arch_info->bits_per_address == 32)
+ {
+ bfd_h_put_64 (abfd, fileoff, st);
+ st += 8;
+ }
+ i++;
+ }
+ string_length = strlen (normalize_filename (current_bfd));
+ string_length += string_length & 1;
+ fileoff += (SIZEOF_AR_HDR_BIG
+ + string_length
+ + SXCOFFARFMAG
+ + arelt_size (current_bfd));
+ fileoff += fileoff & 1;
+ current_bfd = current_bfd->next;
+ if (current_bfd != NULL)
+ arch_info = bfd_get_arch_info (current_bfd);
+ }
- return true;
-}
+ /* loop over the 32 bit symbol names */
+ current_bfd = abfd->archive_head;
+ if (current_bfd != NULL)
+ arch_info = bfd_get_arch_info (current_bfd);
+ i = 0;
+ while (current_bfd != NULL && i < orl_count)
+ {
+ while (map[i].u.abfd == current_bfd)
+ {
+ if (arch_info->bits_per_address == 32)
+ {
+ string_length = sprintf (st, "%s", *map[i].name);
+ st += string_length + 1;
+ }
+ i++;
+ }
+ current_bfd = current_bfd->next;
+ if (current_bfd != NULL)
+ arch_info = bfd_get_arch_info (current_bfd);
+ }
-static boolean
-xcoff_write_armap_big (abfd, elength, map, orl_count, stridx)
- bfd *abfd;
- unsigned int elength ATTRIBUTE_UNUSED;
- struct orl *map;
- unsigned int orl_count;
- int stridx;
-{
- unsigned int i;
- unsigned int orl_count_32, orl_count_64;
- unsigned int stridx_32, stridx_64;
- const bfd_arch_info_type *arch_info = NULL;
- bfd *object_bfd;
+ bfd_bwrite (symbol_table, symbol_table_size, abfd);
- /* First, we look through the symbols and work out which are
- from 32-bit objects and which from 64-bit ones. */
- orl_count_32 = 0;
- orl_count_64 = 0;
- stridx_32 = 0;
- stridx_64 = 0;
- object_bfd = NULL;
- for (i = 0; i < orl_count; i++)
+ free (symbol_table);
+ symbol_table = NULL;
+
+ prevoff = nextoff;
+ nextoff = nextoff + symbol_table_size;
+ }
+ else
+ PRINT20 (fhdr->symoff, 0);
+
+ if (sym_64)
{
- bfd *ob = (bfd *)map[i].pos;
- unsigned int len;
- if (ob != object_bfd)
- arch_info = bfd_get_arch_info (ob);
- len = strlen (*map[i].name) + 1;
- if (arch_info && arch_info->bits_per_address == 64)
+ struct xcoff_ar_hdr_big *hdr;
+ bfd_byte *symbol_table;
+ bfd_byte *st;
+ file_ptr fileoff;
+
+ bfd_vma symbol_table_size =
+ SIZEOF_AR_HDR_BIG
+ + SXCOFFARFMAG
+ + 8
+ + 8 * sym_64
+ + str_64 + (str_64 & 1);
+
+ symbol_table = NULL;
+ symbol_table = (bfd_byte *) bfd_malloc (symbol_table_size);
+ if (symbol_table == NULL)
+ return false;
+ memset (symbol_table, 0, symbol_table_size);
+
+ hdr = (struct xcoff_ar_hdr_big *) symbol_table;
+
+ PRINT20 (hdr->size, 8 + 8 * sym_64 + str_64 + (str_64 & 1));
+ PRINT20 (hdr->nextoff, 0);
+ PRINT20 (hdr->prevoff, prevoff);
+ PRINT12 (hdr->date, 0);
+ PRINT12 (hdr->uid, 0);
+ PRINT12 (hdr->gid, 0);
+ PRINT12 (hdr->mode, 0);
+ PRINT4 (hdr->namlen, 0);
+
+ st = symbol_table + SIZEOF_AR_HDR_BIG;
+ memcpy (st, XCOFFARFMAG, SXCOFFARFMAG);
+ st += SXCOFFARFMAG;
+
+ bfd_h_put_64 (abfd, sym_64, st);
+ st += 8;
+
+ /* loop over the 64 bit offsets */
+ current_bfd = abfd->archive_head;
+ if (current_bfd != NULL)
+ arch_info = bfd_get_arch_info (current_bfd);
+ fileoff = SIZEOF_AR_FILE_HDR_BIG;
+ i = 0;
+ while (current_bfd != NULL && i < orl_count)
{
- orl_count_64++;
- stridx_64 += len;
+ while (map[i].u.abfd == current_bfd)
+ {
+ if (arch_info->bits_per_address == 64)
+ {
+ bfd_h_put_64 (abfd, fileoff, st);
+ st += 8;
+ }
+ i++;
+ }
+ string_length = strlen (normalize_filename (current_bfd));
+ string_length += string_length & 1;
+ fileoff += (SIZEOF_AR_HDR_BIG
+ + string_length
+ + SXCOFFARFMAG
+ + arelt_size (current_bfd));
+ fileoff += fileoff & 1;
+ current_bfd = current_bfd->next;
+ if (current_bfd != NULL)
+ arch_info = bfd_get_arch_info (current_bfd);
}
- else
+
+ /* loop over the 64 bit symbol names */
+ current_bfd = abfd->archive_head;
+ if (current_bfd != NULL)
+ arch_info = bfd_get_arch_info (current_bfd);
+ i = 0;
+ while (current_bfd != NULL && i < orl_count)
{
- orl_count_32++;
- stridx_32 += len;
+ while (map[i].u.abfd == current_bfd)
+ {
+ if (arch_info->bits_per_address == 64)
+ {
+ string_length = sprintf (st, "%s", *map[i].name);
+ st += string_length + 1;
+ }
+ i++;
+ }
+ current_bfd = current_bfd->next;
+ if (current_bfd != NULL)
+ arch_info = bfd_get_arch_info (current_bfd);
}
- object_bfd = ob;
- }
- /* A quick sanity check... */
- BFD_ASSERT (orl_count_64 + orl_count_32 == orl_count);
- BFD_ASSERT (stridx_64 + stridx_32 == stridx);
-
- /* Now write out each map. */
- if (! xcoff_write_one_armap_big (abfd, map, orl_count, orl_count_32,
- stridx_32, false,
- xcoff_ardata_big (abfd)->memoff,
- xcoff_ardata_big (abfd)->symoff))
- return false;
- if (! xcoff_write_one_armap_big (abfd, map, orl_count, orl_count_64,
- stridx_64, true,
- xcoff_ardata_big (abfd)->symoff,
- xcoff_ardata_big (abfd)->symoff64))
- return false;
+ bfd_bwrite (symbol_table, symbol_table_size, abfd);
+
+ free (symbol_table);
+ symbol_table = NULL;
+
+ PRINT20 (fhdr->symoff64, nextoff);
+ }
+ else
+ PRINT20 (fhdr->symoff64, 0);
+
return true;
}
@@ -1820,18 +1864,18 @@ xcoff_write_archive_contents_old (abfd)
bfd *abfd;
{
struct xcoff_ar_file_hdr fhdr;
- size_t count;
- size_t total_namlen;
+ bfd_size_type count;
+ bfd_size_type total_namlen;
file_ptr *offsets;
boolean makemap;
boolean hasobjects;
- file_ptr prevoff, nextoff;
+ ufile_ptr prevoff, nextoff;
bfd *sub;
- unsigned int i;
+ size_t i;
struct xcoff_ar_hdr ahdr;
bfd_size_type size;
char *p;
- char decbuf[13];
+ char decbuf[XCOFFARMAG_ELEMENT_SIZE + 1];
memset (&fhdr, 0, sizeof fhdr);
strncpy (fhdr.magic, XCOFFARMAG, SXCOFFARMAG);
@@ -1849,7 +1893,7 @@ xcoff_write_archive_contents_old (abfd)
if (offsets == NULL)
return false;
- if (bfd_seek (abfd, SIZEOF_AR_FILE_HDR, SEEK_SET) != 0)
+ if (bfd_seek (abfd, (file_ptr) SIZEOF_AR_FILE_HDR, SEEK_SET) != 0)
return false;
makemap = bfd_has_map (abfd);
@@ -1859,7 +1903,7 @@ xcoff_write_archive_contents_old (abfd)
for (sub = abfd->archive_head, i = 0; sub != NULL; sub = sub->next, i++)
{
const char *name;
- size_t namlen;
+ bfd_size_type namlen;
struct xcoff_ar_hdr *ahdrp;
bfd_size_type remaining;
@@ -1897,7 +1941,8 @@ xcoff_write_archive_contents_old (abfd)
if (sub->arelt_data == NULL)
{
- sub->arelt_data = bfd_alloc (sub, sizeof (struct areltdata));
+ size = sizeof (struct areltdata);
+ sub->arelt_data = bfd_alloc (sub, size);
if (sub->arelt_data == NULL)
return false;
}
@@ -1910,7 +1955,7 @@ xcoff_write_archive_contents_old (abfd)
/* If the length of the name is odd, we write out the null byte
after the name as well. */
- namlen = (namlen + 1) &~ 1;
+ namlen = (namlen + 1) &~ (bfd_size_type) 1;
remaining = arelt_size (sub);
size = (SIZEOF_AR_HDR
@@ -1932,9 +1977,10 @@ xcoff_write_archive_contents_old (abfd)
if (*p == '\0')
*p = ' ';
- if (bfd_write ((PTR) ahdrp, 1, SIZEOF_AR_HDR, abfd) != SIZEOF_AR_HDR
- || bfd_write ((PTR) name, 1, namlen, abfd) != namlen
- || (bfd_write ((PTR) XCOFFARFMAG, 1, SXCOFFARFMAG, abfd)
+ if ((bfd_bwrite ((PTR) ahdrp, (bfd_size_type) SIZEOF_AR_HDR, abfd)
+ != SIZEOF_AR_HDR)
+ || (bfd_bwrite ((PTR) name, namlen, abfd) != namlen)
+ || (bfd_bwrite ((PTR) XCOFFARFMAG, (bfd_size_type) SXCOFFARFMAG, abfd)
!= SXCOFFARFMAG))
return false;
@@ -1948,8 +1994,8 @@ xcoff_write_archive_contents_old (abfd)
amt = sizeof buffer;
if (amt > remaining)
amt = remaining;
- if (bfd_read (buffer, 1, amt, sub) != amt
- || bfd_write (buffer, 1, amt, abfd) != amt)
+ if (bfd_bread (buffer, amt, sub) != amt
+ || bfd_bwrite (buffer, amt, abfd) != amt)
return false;
remaining -= amt;
}
@@ -1959,7 +2005,7 @@ xcoff_write_archive_contents_old (abfd)
bfd_byte b;
b = '\0';
- if (bfd_write (&b, 1, 1, abfd) != 1)
+ if (bfd_bwrite (&b, (bfd_size_type) 1, abfd) != 1)
return false;
}
}
@@ -1972,7 +2018,9 @@ xcoff_write_archive_contents_old (abfd)
sprintf (fhdr.memoff, "%ld", (long) nextoff);
memset (&ahdr, 0, sizeof ahdr);
- sprintf (ahdr.size, "%ld", (long) (12 + count * 12 + total_namlen));
+ sprintf (ahdr.size, "%ld", (long) (XCOFFARMAG_ELEMENT_SIZE +
+ count * XCOFFARMAG_ELEMENT_SIZE +
+ total_namlen));
sprintf (ahdr.prevoff, "%ld", (long) prevoff);
sprintf (ahdr.date, "%d", 0);
sprintf (ahdr.uid, "%d", 0);
@@ -1981,8 +2029,8 @@ xcoff_write_archive_contents_old (abfd)
sprintf (ahdr.namlen, "%d", 0);
size = (SIZEOF_AR_HDR
- + 12
- + count * 12
+ + XCOFFARMAG_ELEMENT_SIZE
+ + count * XCOFFARMAG_ELEMENT_SIZE
+ total_namlen
+ SXCOFFARFMAG);
@@ -1999,28 +2047,31 @@ xcoff_write_archive_contents_old (abfd)
if (*p == '\0')
*p = ' ';
- if (bfd_write ((PTR) &ahdr, 1, SIZEOF_AR_HDR, abfd) != SIZEOF_AR_HDR
- || (bfd_write ((PTR) XCOFFARFMAG, 1, SXCOFFARFMAG, abfd)
+ if ((bfd_bwrite ((PTR) &ahdr, (bfd_size_type) SIZEOF_AR_HDR, abfd)
+ != SIZEOF_AR_HDR)
+ || (bfd_bwrite ((PTR) XCOFFARFMAG, (bfd_size_type) SXCOFFARFMAG, abfd)
!= SXCOFFARFMAG))
return false;
sprintf (decbuf, "%-12ld", (long) count);
- if (bfd_write ((PTR) decbuf, 1, 12, abfd) != 12)
+ if (bfd_bwrite ((PTR) decbuf, (bfd_size_type) XCOFFARMAG_ELEMENT_SIZE, abfd)
+ != XCOFFARMAG_ELEMENT_SIZE)
return false;
- for (i = 0; i < count; i++)
+ for (i = 0; i < (size_t) count; i++)
{
sprintf (decbuf, "%-12ld", (long) offsets[i]);
- if (bfd_write ((PTR) decbuf, 1, 12, abfd) != 12)
+ if (bfd_bwrite ((PTR) decbuf, (bfd_size_type) XCOFFARMAG_ELEMENT_SIZE,
+ abfd) != XCOFFARMAG_ELEMENT_SIZE)
return false;
}
for (sub = abfd->archive_head; sub != NULL; sub = sub->next)
{
const char *name;
- size_t namlen;
+ bfd_size_type namlen;
name = normalize_filename (sub);
namlen = strlen (name);
- if (bfd_write ((PTR) name, 1, namlen + 1, abfd) != namlen + 1)
+ if (bfd_bwrite ((PTR) name, namlen + 1, abfd) != namlen + 1)
return false;
}
if ((size & 1) != 0)
@@ -2028,12 +2079,11 @@ xcoff_write_archive_contents_old (abfd)
bfd_byte b;
b = '\0';
- if (bfd_write ((PTR) &b, 1, 1, abfd) != 1)
+ if (bfd_bwrite ((PTR) &b, (bfd_size_type) 1, abfd) != 1)
return false;
}
/* Write out the armap, if appropriate. */
-
if (! makemap || ! hasobjects)
sprintf (fhdr.symoff, "%d", 0);
else
@@ -2053,8 +2103,8 @@ xcoff_write_archive_contents_old (abfd)
*p = ' ';
if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0
- || (bfd_write ((PTR) &fhdr, SIZEOF_AR_FILE_HDR, 1, abfd) !=
- SIZEOF_AR_FILE_HDR))
+ || (bfd_bwrite ((PTR) &fhdr, (bfd_size_type) SIZEOF_AR_FILE_HDR, abfd)
+ != SIZEOF_AR_FILE_HDR))
return false;
return true;
@@ -2065,60 +2115,63 @@ xcoff_write_archive_contents_big (abfd)
bfd *abfd;
{
struct xcoff_ar_file_hdr_big fhdr;
- size_t count;
- size_t total_namlen;
+ bfd_size_type count;
+ bfd_size_type total_namlen;
file_ptr *offsets;
boolean makemap;
boolean hasobjects;
- file_ptr prevoff, nextoff;
- bfd *sub;
- unsigned int i;
- struct xcoff_ar_hdr_big ahdr;
+ ufile_ptr prevoff, nextoff;
+ bfd *current_bfd;
+ size_t i;
+ struct xcoff_ar_hdr_big *hdr, ahdr;
bfd_size_type size;
- char *p;
- char decbuf[13];
+ bfd_byte *member_table, *mt;
+ bfd_vma member_table_size;
- memset (&fhdr, 0, sizeof fhdr);
- strncpy (fhdr.magic, XCOFFARMAGBIG, SXCOFFARMAG);
- sprintf (fhdr.firstmemoff, "%d", SIZEOF_AR_FILE_HDR_BIG);
- sprintf (fhdr.freeoff, "%d", 0);
+ memcpy (fhdr.magic, XCOFFARMAGBIG, SXCOFFARMAG);
+ PRINT20 (fhdr.firstmemoff, SIZEOF_AR_FILE_HDR_BIG);
+ PRINT20 (fhdr.freeoff, 0);
- count = 0;
- total_namlen = 0;
- for (sub = abfd->archive_head; sub != NULL; sub = sub->next)
+ /* Calculate count and total_namlen */
+ for (current_bfd = abfd->archive_head, count = 0, total_namlen = 0;
+ current_bfd != NULL;
+ current_bfd = current_bfd->next, count++)
+ total_namlen += strlen (normalize_filename (current_bfd)) + 1;
+
+ offsets = NULL;
+ if (count)
{
- ++count;
- total_namlen += strlen (normalize_filename (sub)) + 1;
+ offsets = (file_ptr *) bfd_malloc (count * sizeof (file_ptr));
+ if (offsets == NULL)
+ return false;
}
- offsets = (file_ptr *) bfd_alloc (abfd, count * sizeof (file_ptr));
- if (offsets == NULL)
- return false;
-
- if (bfd_seek (abfd, SIZEOF_AR_FILE_HDR_BIG, SEEK_SET) != 0)
+ if (bfd_seek (abfd, (file_ptr) SIZEOF_AR_FILE_HDR_BIG, SEEK_SET) != 0)
return false;
makemap = bfd_has_map (abfd);
hasobjects = false;
prevoff = 0;
nextoff = SIZEOF_AR_FILE_HDR_BIG;
- for (sub = abfd->archive_head, i = 0; sub != NULL; sub = sub->next, i++)
+ for (current_bfd = abfd->archive_head, i = 0;
+ current_bfd != NULL;
+ current_bfd = current_bfd->next, i++)
{
const char *name;
- size_t namlen;
+ bfd_size_type namlen;
struct xcoff_ar_hdr_big *ahdrp;
bfd_size_type remaining;
if (makemap && ! hasobjects)
{
- if (bfd_check_format (sub, bfd_object))
+ if (bfd_check_format (current_bfd, bfd_object))
hasobjects = true;
}
- name = normalize_filename (sub);
+ name = normalize_filename (current_bfd);
namlen = strlen (name);
- if (sub->arelt_data != NULL)
- ahdrp = arch_xhdr_big (sub);
+ if (current_bfd->arelt_data != NULL)
+ ahdrp = arch_xhdr_big (current_bfd);
else
ahdrp = NULL;
@@ -2126,46 +2179,41 @@ xcoff_write_archive_contents_big (abfd)
{
struct stat s;
- memset (&ahdr, 0, sizeof ahdr);
ahdrp = &ahdr;
/* XXX This should actually be a call to stat64 (at least on
- 32-bit machines). */
- if (stat (bfd_get_filename (sub), &s) != 0)
+ 32-bit machines).
+ XXX This call will fail if the original object is not found. */
+ if (stat (bfd_get_filename (current_bfd), &s) != 0)
{
bfd_set_error (bfd_error_system_call);
return false;
}
- /* XXX This call actually should use %lld (at least on 32-bit
- machines) since the fields's width is 20 and there numbers with
- more than 32 bits can be represented. */
- sprintf (ahdrp->size, "%ld", (long) s.st_size);
- sprintf (ahdrp->date, "%ld", (long) s.st_mtime);
- sprintf (ahdrp->uid, "%ld", (long) s.st_uid);
- sprintf (ahdrp->gid, "%ld", (long) s.st_gid);
- sprintf (ahdrp->mode, "%o", (unsigned int) s.st_mode);
+ PRINT20 (ahdrp->size, s.st_size);
+ PRINT12 (ahdrp->date, s.st_mtime);
+ PRINT12 (ahdrp->uid, s.st_uid);
+ PRINT12 (ahdrp->gid, s.st_gid);
+ PRINT12_OCTAL (ahdrp->mode, s.st_mode);
- if (sub->arelt_data == NULL)
+ if (current_bfd->arelt_data == NULL)
{
- sub->arelt_data = bfd_alloc (sub, sizeof (struct areltdata));
- if (sub->arelt_data == NULL)
+ size = sizeof (struct areltdata);
+ current_bfd->arelt_data = bfd_alloc (current_bfd, size);
+ if (current_bfd->arelt_data == NULL)
return false;
}
- arch_eltdata (sub)->parsed_size = s.st_size;
+ arch_eltdata (current_bfd)->parsed_size = s.st_size;
}
- /* XXX These calls actually should use %lld (at least on 32-bit
- machines) since the fields's width is 20 and there numbers with
- more than 32 bits can be represented. */
- sprintf (ahdrp->prevoff, "%ld", (long) prevoff);
- sprintf (ahdrp->namlen, "%ld", (long) namlen);
+ PRINT20 (ahdrp->prevoff, prevoff);
+ PRINT4 (ahdrp->namlen, namlen);
/* If the length of the name is odd, we write out the null byte
after the name as well. */
- namlen = (namlen + 1) &~ 1;
+ namlen = (namlen + 1) &~ (bfd_size_type) 1;
- remaining = arelt_size (sub);
+ remaining = arelt_size (current_bfd);
size = (SIZEOF_AR_HDR_BIG
+ namlen
+ SXCOFFARFMAG
@@ -2178,21 +2226,16 @@ xcoff_write_archive_contents_big (abfd)
prevoff = nextoff;
nextoff += size + (size & 1);
- sprintf (ahdrp->nextoff, "%ld", (long) nextoff);
+ PRINT20 (ahdrp->nextoff, nextoff);
- /* We need spaces, not null bytes, in the header. */
- for (p = (char *) ahdrp; p < (char *) ahdrp + SIZEOF_AR_HDR_BIG; p++)
- if (*p == '\0')
- *p = ' ';
-
- if (bfd_write ((PTR) ahdrp, 1, SIZEOF_AR_HDR_BIG, abfd)
- != SIZEOF_AR_HDR_BIG
- || bfd_write ((PTR) name, 1, namlen, abfd) != namlen
- || (bfd_write ((PTR) XCOFFARFMAG, 1, SXCOFFARFMAG, abfd)
- != SXCOFFARFMAG))
+ if ((bfd_bwrite ((PTR) ahdrp, (bfd_size_type) SIZEOF_AR_HDR_BIG, abfd)
+ != SIZEOF_AR_HDR_BIG)
+ || bfd_bwrite ((PTR) name, (bfd_size_type) namlen, abfd) != namlen
+ || (bfd_bwrite ((PTR) XCOFFARFMAG, (bfd_size_type) SXCOFFARFMAG,
+ abfd) != SXCOFFARFMAG))
return false;
- if (bfd_seek (sub, (file_ptr) 0, SEEK_SET) != 0)
+ if (bfd_seek (current_bfd, (file_ptr) 0, SEEK_SET) != 0)
return false;
while (remaining != 0)
{
@@ -2202,8 +2245,8 @@ xcoff_write_archive_contents_big (abfd)
amt = sizeof buffer;
if (amt > remaining)
amt = remaining;
- if (bfd_read (buffer, 1, amt, sub) != amt
- || bfd_write (buffer, 1, amt, abfd) != amt)
+ if (bfd_bread (buffer, amt, current_bfd) != amt
+ || bfd_bwrite (buffer, amt, abfd) != amt)
return false;
remaining -= amt;
}
@@ -2213,101 +2256,116 @@ xcoff_write_archive_contents_big (abfd)
bfd_byte b;
b = '\0';
- if (bfd_write (&b, 1, 1, abfd) != 1)
+ if (bfd_bwrite (&b, (bfd_size_type) 1, abfd) != 1)
return false;
}
}
- /* XXX This call actually should use %lld (at least on 32-bit
- machines) since the fields's width is 20 and there numbers with
- more than 32 bits can be represented. */
- sprintf (fhdr.lastmemoff, "%ld", (long) prevoff);
-
- /* Write out the member table. */
+ PRINT20 (fhdr.lastmemoff, prevoff);
+
+ /* Write out the member table.
+ Layout :
+
+ standard big archive header
+ 0x0000 ar_size [0x14]
+ 0x0014 ar_nxtmem [0x14]
+ 0x0028 ar_prvmem [0x14]
+ 0x003C ar_date [0x0C]
+ 0x0048 ar_uid [0x0C]
+ 0x0054 ar_gid [0x0C]
+ 0x0060 ar_mod [0x0C]
+ 0x006C ar_namelen[0x04]
+ 0x0070 ar_fmag [0x02]
+
+ Member table
+ 0x0072 count [0x14]
+ 0x0086 offsets [0x14 * counts]
+ 0x0086 + 0x14 * counts names [??]
+ ?? pad to even bytes.
+ */
BFD_ASSERT (nextoff == bfd_tell (abfd));
- /* XXX This call actually should use %lld (at least on 32-bit
- machines) since the fields's width is 20 and there numbers with
- more than 32 bits can be represented. */
- sprintf (fhdr.memoff, "%ld", (long) nextoff);
- memset (&ahdr, 0, sizeof ahdr);
- /* XXX The next two calls actually should use %lld (at least on 32-bit
- machines) since the fields's width is 20 and there numbers with
- more than 32 bits can be represented. */
- sprintf (ahdr.size, "%ld", (long) (12 + count * 12 + total_namlen));
- sprintf (ahdr.prevoff, "%ld", (long) prevoff);
- sprintf (ahdr.date, "%d", 0);
- sprintf (ahdr.uid, "%d", 0);
- sprintf (ahdr.gid, "%d", 0);
- sprintf (ahdr.mode, "%d", 0);
- sprintf (ahdr.namlen, "%d", 0);
+ member_table_size = (SIZEOF_AR_HDR_BIG
+ + SXCOFFARFMAG
+ + XCOFFARMAGBIG_ELEMENT_SIZE
+ + count * XCOFFARMAGBIG_ELEMENT_SIZE
+ + total_namlen);
- size = (SIZEOF_AR_HDR_BIG
- + 12
- + count * 12
- + total_namlen
- + SXCOFFARFMAG);
+ member_table_size += member_table_size & 1;
+ member_table = NULL;
+ member_table = (bfd_byte *) bfd_malloc (member_table_size);
+ if (member_table == NULL)
+ return false;
+ memset (member_table, 0, member_table_size);
- prevoff = nextoff;
- nextoff += size + (size & 1);
+ hdr = (struct xcoff_ar_hdr_big *) member_table;
- if (makemap && hasobjects)
- /* XXX This call actually should use %lld (at least on 32-bit
- machines) since the fields's width is 20 and there numbers with
- more than 32 bits can be represented. */
- sprintf (ahdr.nextoff, "%ld", (long) nextoff);
+ PRINT20 (hdr->size, (XCOFFARMAGBIG_ELEMENT_SIZE +
+ count * XCOFFARMAGBIG_ELEMENT_SIZE +
+ total_namlen + (total_namlen & 1)));
+ if (makemap && hasobjects)
+ PRINT20 (hdr->nextoff, nextoff + member_table_size);
else
- sprintf (ahdr.nextoff, "%d", 0);
-
- /* We need spaces, not null bytes, in the header. */
- for (p = (char *) &ahdr; p < (char *) &ahdr + SIZEOF_AR_HDR_BIG; p++)
- if (*p == '\0')
- *p = ' ';
-
- if (bfd_write ((PTR) &ahdr, 1, SIZEOF_AR_HDR_BIG, abfd) != SIZEOF_AR_HDR_BIG
- || (bfd_write ((PTR) XCOFFARFMAG, 1, SXCOFFARFMAG, abfd)
- != SXCOFFARFMAG))
- return false;
+ PRINT20 (hdr->nextoff, 0);
+ PRINT20 (hdr->prevoff, prevoff);
+ PRINT12 (hdr->date, 0);
+ PRINT12 (hdr->uid, 0);
+ PRINT12 (hdr->gid, 0);
+ PRINT12 (hdr->mode, 0);
+ PRINT4 (hdr->namlen, 0);
+
+ mt = member_table + SIZEOF_AR_HDR_BIG;
+ memcpy (mt, XCOFFARFMAG, SXCOFFARFMAG);
+ mt += SXCOFFARFMAG;
+
+ PRINT20 (mt, count);
+ mt += XCOFFARMAGBIG_ELEMENT_SIZE;
+ for (i = 0; i < (size_t) count; i++)
+ {
+ PRINT20 (mt, offsets[i]);
+ mt += XCOFFARMAGBIG_ELEMENT_SIZE;
+ }
- sprintf (decbuf, "%-12ld", (long) count);
- if (bfd_write ((PTR) decbuf, 1, 12, abfd) != 12)
- return false;
- for (i = 0; i < count; i++)
+ if (count)
{
- sprintf (decbuf, "%-12ld", (long) offsets[i]);
- if (bfd_write ((PTR) decbuf, 1, 12, abfd) != 12)
- return false;
+ free (offsets);
+ offsets = NULL;
}
- for (sub = abfd->archive_head; sub != NULL; sub = sub->next)
+
+ for (current_bfd = abfd->archive_head; current_bfd != NULL;
+ current_bfd = current_bfd->next)
{
const char *name;
size_t namlen;
- name = normalize_filename (sub);
- namlen = strlen (name);
- if (bfd_write ((PTR) name, 1, namlen + 1, abfd) != namlen + 1)
- return false;
+ name = normalize_filename (current_bfd);
+ namlen = sprintf(mt, "%s", name);
+ mt += namlen + 1;
}
- if ((size & 1) != 0)
- {
- bfd_byte b;
+
+ if (bfd_bwrite (member_table, member_table_size, abfd) != member_table_size)
+ return false;
- b = '\0';
- if (bfd_write ((PTR) &b, 1, 1, abfd) != 1)
- return false;
- }
+ free (member_table);
+ member_table = NULL;
+
+ PRINT20 (fhdr.memoff, nextoff);
+
+ prevoff = nextoff;
+ nextoff += member_table_size;
/* Write out the armap, if appropriate. */
- if (! makemap || ! hasobjects)
- sprintf (fhdr.symoff, "%d", 0);
+ if (! makemap || ! hasobjects)
+ PRINT20 (fhdr.symoff, 0);
else
{
BFD_ASSERT (nextoff == bfd_tell (abfd));
- /* XXX This call actually should use %lld (at least on 32-bit
- machines) since the fields's width is 20 and there numbers with
- more than 32 bits can be represented. */
+
+ /* Save nextoff in fhdr.symoff so the armap routine can use it. */
+ PRINT20 (fhdr.symoff, nextoff);
+
bfd_ardata (abfd)->tdata = (PTR) &fhdr;
if (! _bfd_compute_and_write_armap (abfd, 0))
return false;
@@ -2315,16 +2373,11 @@ xcoff_write_archive_contents_big (abfd)
/* Write out the archive file header. */
- /* We need spaces, not null bytes, in the header. */
- for (p = (char *) &fhdr; p < (char *) &fhdr + SIZEOF_AR_FILE_HDR_BIG; p++)
- if (*p == '\0')
- *p = ' ';
-
if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0
- || (bfd_write ((PTR) &fhdr, SIZEOF_AR_FILE_HDR_BIG, 1, abfd) !=
- SIZEOF_AR_FILE_HDR_BIG))
+ || (bfd_bwrite ((PTR) &fhdr, (bfd_size_type) SIZEOF_AR_FILE_HDR_BIG,
+ abfd) != SIZEOF_AR_FILE_HDR_BIG))
return false;
-
+
return true;
}
@@ -2356,3 +2409,1443 @@ _bfd_xcoff_sizeof_headers (abfd, reloc)
size += abfd->section_count * SCNHSZ;
return size;
}
+
+/* Routines to swap information in the XCOFF .loader section. If we
+ ever need to write an XCOFF loader, this stuff will need to be
+ moved to another file shared by the linker (which XCOFF calls the
+ ``binder'') and the loader. */
+
+/* Swap in the ldhdr structure. */
+
+static void
+xcoff_swap_ldhdr_in (abfd, s, dst)
+ bfd *abfd;
+ const PTR s;
+ struct internal_ldhdr *dst;
+{
+ const struct external_ldhdr *src = (const struct external_ldhdr *) s;
+
+ dst->l_version = bfd_get_32 (abfd, src->l_version);
+ dst->l_nsyms = bfd_get_32 (abfd, src->l_nsyms);
+ dst->l_nreloc = bfd_get_32 (abfd, src->l_nreloc);
+ dst->l_istlen = bfd_get_32 (abfd, src->l_istlen);
+ dst->l_nimpid = bfd_get_32 (abfd, src->l_nimpid);
+ dst->l_impoff = bfd_get_32 (abfd, src->l_impoff);
+ dst->l_stlen = bfd_get_32 (abfd, src->l_stlen);
+ dst->l_stoff = bfd_get_32 (abfd, src->l_stoff);
+}
+
+/* Swap out the ldhdr structure. */
+
+static void
+xcoff_swap_ldhdr_out (abfd, src, d)
+ bfd *abfd;
+ const struct internal_ldhdr *src;
+ PTR d;
+{
+ struct external_ldhdr *dst = (struct external_ldhdr *) d;
+
+ bfd_put_32 (abfd, (bfd_vma) src->l_version, dst->l_version);
+ bfd_put_32 (abfd, src->l_nsyms, dst->l_nsyms);
+ bfd_put_32 (abfd, src->l_nreloc, dst->l_nreloc);
+ bfd_put_32 (abfd, src->l_istlen, dst->l_istlen);
+ bfd_put_32 (abfd, src->l_nimpid, dst->l_nimpid);
+ bfd_put_32 (abfd, src->l_impoff, dst->l_impoff);
+ bfd_put_32 (abfd, src->l_stlen, dst->l_stlen);
+ bfd_put_32 (abfd, src->l_stoff, dst->l_stoff);
+}
+
+/* Swap in the ldsym structure. */
+
+static void
+xcoff_swap_ldsym_in (abfd, s, dst)
+ bfd *abfd;
+ const PTR s;
+ struct internal_ldsym *dst;
+{
+ const struct external_ldsym *src = (const struct external_ldsym *) s;
+
+ if (bfd_get_32 (abfd, src->_l._l_l._l_zeroes) != 0) {
+ memcpy (dst->_l._l_name, src->_l._l_name, SYMNMLEN);
+ } else {
+ dst->_l._l_l._l_zeroes = 0;
+ dst->_l._l_l._l_offset = bfd_get_32 (abfd, src->_l._l_l._l_offset);
+ }
+ dst->l_value = bfd_get_32 (abfd, src->l_value);
+ dst->l_scnum = bfd_get_16 (abfd, src->l_scnum);
+ dst->l_smtype = bfd_get_8 (abfd, src->l_smtype);
+ dst->l_smclas = bfd_get_8 (abfd, src->l_smclas);
+ dst->l_ifile = bfd_get_32 (abfd, src->l_ifile);
+ dst->l_parm = bfd_get_32 (abfd, src->l_parm);
+}
+
+/* Swap out the ldsym structure. */
+
+static void
+xcoff_swap_ldsym_out (abfd, src, d)
+ bfd *abfd;
+ const struct internal_ldsym *src;
+ PTR d;
+{
+ struct external_ldsym *dst = (struct external_ldsym *) d;
+
+ if (src->_l._l_l._l_zeroes != 0)
+ memcpy (dst->_l._l_name, src->_l._l_name, SYMNMLEN);
+ else
+ {
+ bfd_put_32 (abfd, (bfd_vma) 0, dst->_l._l_l._l_zeroes);
+ bfd_put_32 (abfd, (bfd_vma) src->_l._l_l._l_offset,
+ dst->_l._l_l._l_offset);
+ }
+ bfd_put_32 (abfd, src->l_value, dst->l_value);
+ bfd_put_16 (abfd, (bfd_vma) src->l_scnum, dst->l_scnum);
+ bfd_put_8 (abfd, src->l_smtype, dst->l_smtype);
+ bfd_put_8 (abfd, src->l_smclas, dst->l_smclas);
+ bfd_put_32 (abfd, src->l_ifile, dst->l_ifile);
+ bfd_put_32 (abfd, src->l_parm, dst->l_parm);
+}
+
+/* Swap in the ldrel structure. */
+
+static void
+xcoff_swap_ldrel_in (abfd, s, dst)
+ bfd *abfd;
+ const PTR s;
+ struct internal_ldrel *dst;
+{
+ const struct external_ldrel *src = (const struct external_ldrel *) s;
+
+ dst->l_vaddr = bfd_get_32 (abfd, src->l_vaddr);
+ dst->l_symndx = bfd_get_32 (abfd, src->l_symndx);
+ dst->l_rtype = bfd_get_16 (abfd, src->l_rtype);
+ dst->l_rsecnm = bfd_get_16 (abfd, src->l_rsecnm);
+}
+
+/* Swap out the ldrel structure. */
+
+static void
+xcoff_swap_ldrel_out (abfd, src, d)
+ bfd *abfd;
+ const struct internal_ldrel *src;
+ PTR d;
+{
+ struct external_ldrel *dst = (struct external_ldrel *) d;
+
+ bfd_put_32 (abfd, src->l_vaddr, dst->l_vaddr);
+ bfd_put_32 (abfd, src->l_symndx, dst->l_symndx);
+ bfd_put_16 (abfd, (bfd_vma) src->l_rtype, dst->l_rtype);
+ bfd_put_16 (abfd, (bfd_vma) src->l_rsecnm, dst->l_rsecnm);
+}
+
+
+
+/* This is the relocation function for the RS/6000/POWER/PowerPC.
+ This is currently the only processor which uses XCOFF; I hope that
+ will never change. */
+
+static boolean
+xcoff_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;
+
+ rel = relocs;
+ relend = rel + input_section->reloc_count;
+
+ for (; rel < relend; rel++)
+ {
+ long symndx;
+ struct xcoff_link_hash_entry *h;
+ struct internal_syment *sym;
+ bfd_vma addend;
+ bfd_vma val;
+ struct reloc_howto_struct howto;
+ bfd_reloc_status_type rstat;
+
+ /* Relocation type R_REF is a special relocation type which is
+ merely used to prevent garbage collection from occurring for
+ the csect including the symbol which it references. */
+ if (rel->r_type == R_REF)
+ continue;
+
+ symndx = rel->r_symndx;
+
+ if (symndx == -1)
+ {
+ h = NULL;
+ sym = NULL;
+ addend = 0;
+ }
+ else
+ {
+ h = obj_xcoff_sym_hashes (input_bfd)[symndx];
+ sym = syms + symndx;
+ addend = - sym->n_value;
+
+ }
+
+ /* We build the howto information on the fly. */
+
+ howto.type = rel->r_type;
+ howto.rightshift = 0;
+ howto.size = 2;
+ howto.bitsize = (rel->r_size & 0x1f) + 1;
+ howto.pc_relative = false;
+ howto.bitpos = 0;
+ if ((rel->r_size & 0x80) != 0)
+ howto.complain_on_overflow = complain_overflow_signed;
+ else
+ howto.complain_on_overflow = complain_overflow_bitfield;
+ howto.special_function = NULL;
+ howto.name = "internal";
+ howto.partial_inplace = true;
+ if (howto.bitsize == 32)
+ howto.src_mask = howto.dst_mask = 0xffffffff;
+ else
+ {
+ howto.src_mask = howto.dst_mask = (1 << howto.bitsize) - 1;
+ if (howto.bitsize == 16)
+ howto.size = 1;
+ }
+ howto.pcrel_offset = false;
+
+ val = 0;
+
+ if (h == NULL)
+ {
+ asection *sec;
+
+ if (symndx == -1)
+ {
+ sec = bfd_abs_section_ptr;
+ val = 0;
+ }
+ else
+ {
+ sec = sections[symndx];
+ /* Hack to make sure we use the right TOC anchor value
+ if this reloc is against the TOC anchor. */
+
+ if (sec->name[3] == '0'
+ && strcmp (sec->name, ".tc0") == 0)
+ {
+ val = xcoff_data (output_bfd)->toc;
+ }
+ else
+ {
+ val = (sec->output_section->vma
+ + sec->output_offset
+ + sym->n_value
+ - 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 (h->root.type == bfd_link_hash_common)
+ {
+ asection *sec;
+
+ sec = h->root.u.c.p->section;
+ val = (sec->output_section->vma
+ + sec->output_offset);
+ }
+ else if ((h->flags & XCOFF_DEF_DYNAMIC) != 0
+ || (h->flags & XCOFF_IMPORT) != 0)
+ {
+ /* Every symbol in a shared object is defined somewhere. */
+ val = 0;
+ }
+ 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;
+
+ /* Don't try to process the reloc. It can't help, and
+ it may generate another error. */
+ continue;
+ }
+ }
+
+ /* I took the relocation type definitions from two documents:
+ the PowerPC AIX Version 4 Application Binary Interface, First
+ Edition (April 1992), and the PowerOpen ABI, Big-Endian
+ 32-Bit Hardware Implementation (June 30, 1994). Differences
+ between the documents are noted below. */
+
+ switch (rel->r_type)
+ {
+ case R_RTB:
+ case R_RRTBI:
+ case R_RRTBA:
+ /* These relocs are defined by the PowerPC ABI to be
+ relative branches which use half of the difference
+ between the symbol and the program counter. I can't
+ quite figure out when this is useful. These relocs are
+ not defined by the PowerOpen ABI. */
+ default:
+ (*_bfd_error_handler)
+ (_("%s: unsupported relocation type 0x%02x"),
+ bfd_archive_filename (input_bfd), (unsigned int) rel->r_type);
+ bfd_set_error (bfd_error_bad_value);
+ return false;
+ case R_POS:
+ /* Simple positive relocation. */
+ break;
+ case R_NEG:
+ /* Simple negative relocation. */
+ val = - val;
+ break;
+ case R_REL:
+ /* Simple PC relative relocation. */
+ howto.pc_relative = true;
+ break;
+ case R_TOC:
+ /* TOC relative relocation. The value in the instruction in
+ the input file is the offset from the input file TOC to
+ the desired location. We want the offset from the final
+ TOC to the desired location. We have:
+ isym = iTOC + in
+ iinsn = in + o
+ osym = oTOC + on
+ oinsn = on + o
+ so we must change insn by on - in.
+ */
+ case R_GL:
+ /* Global linkage relocation. The value of this relocation
+ is the address of the entry in the TOC section. */
+ case R_TCL:
+ /* Local object TOC address. I can't figure out the
+ difference between this and case R_GL. */
+ case R_TRL:
+ /* TOC relative relocation. A TOC relative load instruction
+ which may be changed to a load address instruction.
+ FIXME: We don't currently implement this optimization. */
+ case R_TRLA:
+ /* TOC relative relocation. This is a TOC relative load
+ address instruction which may be changed to a load
+ instruction. FIXME: I don't know if this is the correct
+ implementation. */
+ if (h != NULL && h->smclas != XMC_TD)
+ {
+ if (h->toc_section == NULL)
+ {
+ (*_bfd_error_handler)
+ (_("%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry"),
+ bfd_archive_filename (input_bfd), rel->r_vaddr,
+ h->root.root.string);
+ bfd_set_error (bfd_error_bad_value);
+ return false;
+ }
+
+ BFD_ASSERT ((h->flags & XCOFF_SET_TOC) == 0);
+ val = (h->toc_section->output_section->vma
+ + h->toc_section->output_offset);
+ }
+
+ val = ((val - xcoff_data (output_bfd)->toc)
+ - (sym->n_value - xcoff_data (input_bfd)->toc));
+ addend = 0;
+ break;
+ case R_BA:
+ /* Absolute branch. We don't want to mess with the lower
+ two bits of the instruction. */
+ case R_CAI:
+ /* The PowerPC ABI defines this as an absolute call which
+ may be modified to become a relative call. The PowerOpen
+ ABI does not define this relocation type. */
+ case R_RBA:
+ /* Absolute branch which may be modified to become a
+ relative branch. */
+ case R_RBAC:
+ /* The PowerPC ABI defines this as an absolute branch to a
+ fixed address which may be modified to an absolute branch
+ to a symbol. The PowerOpen ABI does not define this
+ relocation type. */
+ case R_RBRC:
+ /* The PowerPC ABI defines this as an absolute branch to a
+ fixed address which may be modified to a relative branch.
+ The PowerOpen ABI does not define this relocation type. */
+ howto.src_mask &= ~3;
+ howto.dst_mask = howto.src_mask;
+ break;
+ case R_BR:
+ /* Relative branch. We don't want to mess with the lower
+ two bits of the instruction. */
+ case R_CREL:
+ /* The PowerPC ABI defines this as a relative call which may
+ be modified to become an absolute call. The PowerOpen
+ ABI does not define this relocation type. */
+ case R_RBR:
+ /* A relative branch which may be modified to become an
+ absolute branch. FIXME: We don't implement this,
+ although we should for symbols of storage mapping class
+ XMC_XO. */
+ howto.pc_relative = true;
+ howto.src_mask &= ~3;
+ howto.dst_mask = howto.src_mask;
+ break;
+ case R_RL:
+ /* The PowerPC AIX ABI describes this as a load which may be
+ changed to a load address. The PowerOpen ABI says this
+ is the same as case R_POS. */
+ break;
+ case R_RLA:
+ /* The PowerPC AIX ABI describes this as a load address
+ which may be changed to a load. The PowerOpen ABI says
+ this is the same as R_POS. */
+ break;
+ }
+
+ /* If we see an R_BR or R_RBR reloc which is jumping to global
+ linkage code, and it is followed by an appropriate cror nop
+ instruction, we replace the cror with lwz r2,20(r1). This
+ restores the TOC after the glink code. Contrariwise, if the
+ call is followed by a lwz r2,20(r1), but the call is not
+ going to global linkage code, we can replace the load with a
+ cror. */
+ if ((rel->r_type == R_BR || rel->r_type == R_RBR)
+ && h != NULL
+ && h->root.type == bfd_link_hash_defined
+ && (rel->r_vaddr - input_section->vma + 8
+ <= input_section->_cooked_size))
+ {
+ bfd_byte *pnext;
+ unsigned long next;
+
+ pnext = contents + (rel->r_vaddr - input_section->vma) + 4;
+ next = bfd_get_32 (input_bfd, pnext);
+
+ /* The _ptrgl function is magic. It is used by the AIX
+ compiler to call a function through a pointer. */
+ if (h->smclas == XMC_GL
+ || strcmp (h->root.root.string, "._ptrgl") == 0)
+ {
+ if (next == 0x4def7b82 /* cror 15,15,15 */
+ || next == 0x4ffffb82 /* cror 31,31,31 */
+ || next == 0x60000000) /* ori r0,r0,0 */
+ bfd_put_32 (input_bfd,
+ (bfd_vma) 0x80410014, /* lwz r1,20(r1) */
+ pnext);
+ }
+ else
+ {
+ if (next == 0x80410014) /* lwz r1,20(r1) */
+ bfd_put_32 (input_bfd,
+ (bfd_vma) 0x60000000, /* ori r0,r0,0 */
+ pnext);
+ }
+ }
+
+ /* A PC relative reloc includes the section address. */
+ if (howto.pc_relative)
+ addend += input_section->vma;
+
+ rstat = _bfd_final_link_relocate (&howto, input_bfd, input_section,
+ contents,
+ rel->r_vaddr - input_section->vma,
+ val, addend);
+
+ switch (rstat)
+ {
+ default:
+ abort ();
+ case bfd_reloc_ok:
+ break;
+ case bfd_reloc_overflow:
+ {
+ const char *name;
+ char buf[SYMNMLEN + 1];
+ char howto_name[10];
+
+ 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;
+ }
+ sprintf (howto_name, "0x%02x", rel->r_type);
+
+ 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;
+}
+
+static boolean
+_bfd_xcoff_put_ldsymbol_name (abfd, ldinfo, ldsym, name)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ struct xcoff_loader_info *ldinfo;
+ struct internal_ldsym *ldsym;
+ const char *name;
+{
+ size_t len;
+ len = strlen (name);
+
+ if (len <= SYMNMLEN)
+ strncpy (ldsym->_l._l_name, name, SYMNMLEN);
+ else
+ {
+ if (ldinfo->string_size + len + 3 > ldinfo->string_alc)
+ {
+ bfd_size_type newalc;
+ bfd_byte *newstrings;
+
+ newalc = ldinfo->string_alc * 2;
+ if (newalc == 0)
+ newalc = 32;
+ while (ldinfo->string_size + len + 3 > newalc)
+ newalc *= 2;
+
+ newstrings = ((bfd_byte *)
+ bfd_realloc ((PTR) ldinfo->strings, newalc));
+ if (newstrings == NULL)
+ {
+ ldinfo->failed = true;
+ return false;
+ }
+ ldinfo->string_alc = newalc;
+ ldinfo->strings = newstrings;
+ }
+
+ bfd_put_16 (ldinfo->output_bfd, (bfd_vma) (len + 1),
+ ldinfo->strings + ldinfo->string_size);
+ strcpy (ldinfo->strings + ldinfo->string_size + 2, name);
+ ldsym->_l._l_l._l_zeroes = 0;
+ ldsym->_l._l_l._l_offset = ldinfo->string_size + 2;
+ ldinfo->string_size += len + 3;
+ }
+
+ return true;
+}
+
+static boolean
+_bfd_xcoff_put_symbol_name (bfd *abfd, struct bfd_strtab_hash *strtab,
+ struct internal_syment *sym,
+ const char *name)
+{
+ if (strlen (name) <= SYMNMLEN)
+ {
+ strncpy (sym->_n._n_name, name, SYMNMLEN);
+ }
+ else
+ {
+ boolean hash;
+ bfd_size_type indx;
+
+ hash = true;
+ if ((abfd->flags & BFD_TRADITIONAL_FORMAT) != 0)
+ hash = false;
+ indx = _bfd_stringtab_add (strtab, name, hash, false);
+ if (indx == (bfd_size_type) -1)
+ return false;
+ sym->_n._n_n._n_zeroes = 0;
+ sym->_n._n_n._n_offset = STRING_SIZE_SIZE + indx;
+ }
+ return true;
+}
+
+static asection *
+xcoff_create_csect_from_smclas (abfd, aux, symbol_name)
+ bfd *abfd;
+ union internal_auxent *aux;
+ const char *symbol_name;
+{
+ asection *return_value = NULL;
+
+ /* .sv64 = x_smclas == 17
+ This is an invalid csect for 32 bit apps. */
+ static const char *names[19] =
+ {
+ ".pr", ".ro", ".db", ".tc", ".ua", ".rw", ".gl", ".xo",
+ ".sv", ".bs", ".ds", ".uc", ".ti", ".tb", NULL, ".tc0",
+ ".td", NULL, ".sv3264"
+ };
+
+ if ((19 >= aux->x_csect.x_smclas) &&
+ (NULL != names[aux->x_csect.x_smclas]))
+ {
+ return_value = bfd_make_section_anyway
+ (abfd, names[aux->x_csect.x_smclas]);
+ }
+ else
+ {
+ (*_bfd_error_handler)
+ (_("%s: symbol `%s' has unrecognized smclas %d"),
+ bfd_archive_filename (abfd), symbol_name, aux->x_csect.x_smclas);
+ bfd_set_error (bfd_error_bad_value);
+ }
+
+ return return_value;
+}
+
+static boolean
+xcoff_is_lineno_count_overflow (abfd, value)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ bfd_vma value;
+{
+ if (0xffff <= value)
+ return true;
+
+ return false;
+}
+
+static boolean
+xcoff_is_reloc_count_overflow (abfd, value)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ bfd_vma value;
+{
+ if (0xffff <= value)
+ return true;
+
+ return false;
+}
+
+static bfd_vma
+xcoff_loader_symbol_offset (abfd, ldhdr)
+ bfd *abfd;
+ struct internal_ldhdr *ldhdr ATTRIBUTE_UNUSED;
+{
+ return bfd_xcoff_ldhdrsz(abfd);
+}
+
+static bfd_vma
+xcoff_loader_reloc_offset (abfd, ldhdr)
+ bfd *abfd;
+ struct internal_ldhdr *ldhdr;
+{
+ return bfd_xcoff_ldhdrsz(abfd) +
+ (ldhdr->l_nsyms * bfd_xcoff_ldsymsz(abfd));
+}
+
+static boolean
+xcoff_generate_rtinit (abfd, init, fini)
+ bfd *abfd;
+ const char *init;
+ const char *fini;
+{
+ bfd_byte filehdr_ext[FILHSZ];
+ bfd_byte scnhdr_ext[SCNHSZ];
+ bfd_byte syment_ext[SYMESZ * 8];
+ bfd_byte reloc_ext[RELSZ * 2];
+ bfd_byte *data_buffer;
+ bfd_size_type data_buffer_size;
+ bfd_byte *string_table, *st_tmp;
+ bfd_size_type string_table_size;
+ bfd_vma val;
+ size_t initsz, finisz;
+ struct internal_filehdr filehdr;
+ struct internal_scnhdr scnhdr;
+ struct internal_syment syment;
+ union internal_auxent auxent;
+ struct internal_reloc reloc;
+
+ char *data_name = ".data";
+ char *rtinit_name = "__rtinit";
+
+ if (! bfd_xcoff_rtinit_size (abfd)
+ || (init == NULL && fini == NULL))
+ return false;
+
+ initsz = (init == NULL ? 0 : 1 + strlen (init));
+ finisz = (fini == NULL ? 0 : 1 + strlen (fini));
+
+ /* file header */
+ memset (filehdr_ext, 0, FILHSZ);
+ memset (&filehdr, 0, sizeof (struct internal_filehdr));
+ filehdr.f_magic = bfd_xcoff_magic_number (abfd);
+ filehdr.f_nscns = 1;
+ filehdr.f_timdat = 0;
+ filehdr.f_nsyms = 0; /* at least 6, no more than 8 */
+ filehdr.f_symptr = 0; /* set below */
+ filehdr.f_opthdr = 0;
+ filehdr.f_flags = 0;
+
+ /* section header */
+ memset (scnhdr_ext, 0, SCNHSZ);
+ memset (&scnhdr, 0, sizeof (struct internal_scnhdr));
+ memcpy (scnhdr.s_name, data_name, strlen (data_name));
+ scnhdr.s_paddr = 0;
+ scnhdr.s_vaddr = 0;
+ scnhdr.s_size = 0; /* set below */
+ scnhdr.s_scnptr = FILHSZ + SCNHSZ;
+ scnhdr.s_relptr = 0; /* set below */
+ scnhdr.s_lnnoptr = 0;
+ scnhdr.s_nreloc = 0; /* either 1 or 2 */
+ scnhdr.s_nlnno = 0;
+ scnhdr.s_flags = STYP_DATA;
+
+ /* .data
+ 0x0000 0x00000000 : rtl
+ 0x0004 0x00000010 : offset to init, or 0
+ 0x0008 0x00000028 : offset to fini, or 0
+ 0x000C 0x0000000C : size of descriptor
+ 0x0010 0x00000000 : init, needs a reloc
+ 0x0014 0x00000040 : offset to init name
+ 0x0018 0x00000000 : flags, padded to a word
+ 0x001C 0x00000000 : empty init
+ 0x0020 0x00000000 :
+ 0x0024 0x00000000 :
+ 0x0028 0x00000000 : fini, needs a reloc
+ 0x002C 0x00000??? : offset to fini name
+ 0x0030 0x00000000 : flags, padded to a word
+ 0x0034 0x00000000 : empty fini
+ 0x0038 0x00000000 :
+ 0x003C 0x00000000 :
+ 0x0040 init name
+ 0x0040 + initsz fini name */
+
+ data_buffer_size = 0x0040 + initsz + finisz;
+ data_buffer_size += (data_buffer_size & 7) ? 8 - (data_buffer_size & 7) : 0;
+ data_buffer = NULL;
+ data_buffer = (bfd_byte *) bfd_malloc (data_buffer_size);
+ if (data_buffer == NULL)
+ return false;
+
+ memset (data_buffer, 0, data_buffer_size);
+
+ if (initsz)
+ {
+ val = 0x10;
+ bfd_h_put_32 (abfd, val, &data_buffer[0x04]);
+ val = 0x40;
+ bfd_h_put_32 (abfd, val, &data_buffer[0x14]);
+ memcpy (&data_buffer[val], init, initsz);
+ }
+
+ if (finisz)
+ {
+ val = 0x28;
+ bfd_h_put_32 (abfd, val, &data_buffer[0x08]);
+ val = 0x40 + initsz;
+ bfd_h_put_32 (abfd, val, &data_buffer[0x2C]);
+ memcpy (&data_buffer[val], fini, finisz);
+ }
+
+ val = 0x0C;
+ bfd_h_put_32 (abfd, val, &data_buffer[0x0C]);
+
+ scnhdr.s_size = data_buffer_size;
+
+ /* string table */
+ string_table_size = 0;
+ if (initsz > 9)
+ string_table_size += initsz;
+ if (finisz > 9)
+ string_table_size += finisz;
+ if (string_table_size)
+ {
+ string_table_size += 4;
+ string_table = (bfd_byte *)bfd_malloc (string_table_size);
+ memset (string_table, 0, string_table_size);
+ val = string_table_size;
+ bfd_h_put_32 (abfd, val, &string_table[0]);
+ st_tmp = string_table + 4;
+ }
+
+ /* symbols
+ 0. .data csect
+ 2. __rtinit
+ 4. init function
+ 6. fini function */
+ memset (syment_ext, 0, 8 * SYMESZ);
+ memset (reloc_ext, 0, 2 * RELSZ);
+
+ /* .data csect */
+ memset (&syment, 0, sizeof (struct internal_syment));
+ memset (&auxent, 0, sizeof (union internal_auxent));
+ memcpy (syment._n._n_name, data_name, strlen (data_name));
+ syment.n_scnum = 1;
+ syment.n_sclass = C_HIDEXT;
+ syment.n_numaux = 1;
+ auxent.x_csect.x_scnlen.l = data_buffer_size;
+ auxent.x_csect.x_smtyp = 3 << 3 | XTY_SD;
+ auxent.x_csect.x_smclas = XMC_RW;
+ bfd_coff_swap_sym_out (abfd, &syment,
+ &syment_ext[filehdr.f_nsyms * SYMESZ]);
+ bfd_coff_swap_aux_out (abfd, &auxent, syment.n_type, syment.n_sclass, 0,
+ syment.n_numaux,
+ &syment_ext[(filehdr.f_nsyms + 1) * SYMESZ]);
+ filehdr.f_nsyms += 2;
+
+ /* __rtinit */
+ memset (&syment, 0, sizeof (struct internal_syment));
+ memset (&auxent, 0, sizeof (union internal_auxent));
+ memcpy (syment._n._n_name, rtinit_name, strlen (rtinit_name));
+ syment.n_scnum = 1;
+ syment.n_sclass = C_EXT;
+ syment.n_numaux = 1;
+ auxent.x_csect.x_smtyp = XTY_LD;
+ auxent.x_csect.x_smclas = XMC_RW;
+ bfd_coff_swap_sym_out (abfd, &syment,
+ &syment_ext[filehdr.f_nsyms * SYMESZ]);
+ bfd_coff_swap_aux_out (abfd, &auxent, syment.n_type, syment.n_sclass, 0,
+ syment.n_numaux,
+ &syment_ext[(filehdr.f_nsyms + 1) * SYMESZ]);
+ filehdr.f_nsyms += 2;
+
+ /* init */
+ if (initsz)
+ {
+ memset (&syment, 0, sizeof (struct internal_syment));
+ memset (&auxent, 0, sizeof (union internal_auxent));
+
+ if (initsz > 9)
+ {
+ syment._n._n_n._n_offset = st_tmp - string_table;
+ memcpy (st_tmp, init, initsz);
+ st_tmp += initsz;
+ }
+ else
+ memcpy (syment._n._n_name, init, initsz - 1);
+
+ syment.n_sclass = C_EXT;
+ syment.n_numaux = 1;
+ bfd_coff_swap_sym_out (abfd, &syment,
+ &syment_ext[filehdr.f_nsyms * SYMESZ]);
+ bfd_coff_swap_aux_out (abfd, &auxent, syment.n_type, syment.n_sclass, 0,
+ syment.n_numaux,
+ &syment_ext[(filehdr.f_nsyms + 1) * SYMESZ]);
+
+ /* reloc */
+ memset (&reloc, 0, sizeof (struct internal_reloc));
+ reloc.r_vaddr = 0x0010;
+ reloc.r_symndx = filehdr.f_nsyms;
+ reloc.r_type = R_POS;
+ reloc.r_size = 31;
+ bfd_coff_swap_reloc_out (abfd, &reloc, &reloc_ext[0]);
+
+ filehdr.f_nsyms += 2;
+ scnhdr.s_nreloc += 1;
+ }
+
+ /* fini */
+ if (finisz)
+ {
+ memset (&syment, 0, sizeof (struct internal_syment));
+ memset (&auxent, 0, sizeof (union internal_auxent));
+
+ if (finisz > 9)
+ {
+ syment._n._n_n._n_offset = st_tmp - string_table;
+ memcpy (st_tmp, fini, finisz);
+ st_tmp += finisz;
+ }
+ else
+ memcpy (syment._n._n_name, fini, finisz - 1);
+
+ syment.n_sclass = C_EXT;
+ syment.n_numaux = 1;
+ bfd_coff_swap_sym_out (abfd, &syment,
+ &syment_ext[filehdr.f_nsyms * SYMESZ]);
+ bfd_coff_swap_aux_out (abfd, &auxent, syment.n_type, syment.n_sclass, 0,
+ syment.n_numaux,
+ &syment_ext[(filehdr.f_nsyms + 1) * SYMESZ]);
+
+ /* reloc */
+ memset (&reloc, 0, sizeof (struct internal_reloc));
+ reloc.r_vaddr = 0x0028;
+ reloc.r_symndx = filehdr.f_nsyms;
+ reloc.r_type = R_POS;
+ reloc.r_size = 31;
+ bfd_coff_swap_reloc_out (abfd, &reloc,
+ &reloc_ext[scnhdr.s_nreloc * RELSZ]);
+
+ filehdr.f_nsyms += 2;
+ scnhdr.s_nreloc += 1;
+ }
+
+ scnhdr.s_relptr = scnhdr.s_scnptr + data_buffer_size;
+ filehdr.f_symptr = scnhdr.s_relptr + scnhdr.s_nreloc * RELSZ;
+
+ bfd_coff_swap_filehdr_out (abfd, &filehdr, filehdr_ext);
+ bfd_bwrite (filehdr_ext, FILHSZ, abfd);
+ bfd_coff_swap_scnhdr_out (abfd, &scnhdr, scnhdr_ext);
+ bfd_bwrite (scnhdr_ext, SCNHSZ, abfd);
+ bfd_bwrite (data_buffer, data_buffer_size, abfd);
+ bfd_bwrite (reloc_ext, scnhdr.s_nreloc * RELSZ, abfd);
+ bfd_bwrite (syment_ext, filehdr.f_nsyms * SYMESZ, abfd);
+ bfd_bwrite (string_table, string_table_size, abfd);
+
+ free (data_buffer);
+ data_buffer = NULL;
+
+ return true;
+}
+
+
+static reloc_howto_type xcoff_dynamic_reloc =
+HOWTO (0, /* 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 */
+ "R_POS", /* name */
+ true, /* partial_inplace */
+ 0xffffffff, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false); /* pcrel_offset */
+
+/* glink
+
+ The first word of global linkage code must be modified by filling in
+ the correct TOC offset. */
+
+static unsigned long xcoff_glink_code[9] =
+ {
+ 0x81820000, /* lwz r12,0(r2) */
+ 0x90410014, /* stw r2,20(r1) */
+ 0x800c0000, /* lwz r0,0(r12) */
+ 0x804c0004, /* lwz r2,4(r12) */
+ 0x7c0903a6, /* mtctr r0 */
+ 0x4e800420, /* bctr */
+ 0x00000000, /* start of traceback table */
+ 0x000c8000, /* traceback table */
+ 0x00000000, /* traceback table */
+ };
+
+
+static const struct xcoff_backend_data_rec bfd_xcoff_backend_data =
+ {
+ { /* COFF backend, defined in libcoff.h. */
+ _bfd_xcoff_swap_aux_in, /* _bfd_coff_swap_aux_in */
+ _bfd_xcoff_swap_sym_in, /* _bfd_coff_swap_sym_in */
+ coff_swap_lineno_in, /* _bfd_coff_swap_lineno_in */
+ _bfd_xcoff_swap_aux_out, /* _bfd_swap_aux_out */
+ _bfd_xcoff_swap_sym_out, /* _bfd_swap_sym_out */
+ coff_swap_lineno_out, /* _bfd_swap_lineno_out */
+ coff_swap_reloc_out, /* _bfd_swap_reloc_out */
+ coff_swap_filehdr_out, /* _bfd_swap_filehdr_out */
+ coff_swap_aouthdr_out, /* _bfd_swap_aouthdr_out */
+ coff_swap_scnhdr_out, /* _bfd_swap_scnhdr_out */
+ FILHSZ, /* _bfd_filhsz */
+ AOUTSZ, /* _bfd_aoutsz */
+ SCNHSZ, /* _bfd_scnhsz */
+ SYMESZ, /* _bfd_symesz */
+ AUXESZ, /* _bfd_auxesz */
+ RELSZ, /* _bfd_relsz */
+ LINESZ, /* _bfd_linesz */
+ FILNMLEN, /* _bfd_filnmlen */
+ true, /* _bfd_coff_long_filenames */
+ false, /* _bfd_coff_long_section_names */
+ (3), /* _bfd_coff_default_section_alignment_power */
+ false, /* _bfd_coff_force_symnames_in_strings */
+ 2, /* _bfd_coff_debug_string_prefix_length */
+ coff_swap_filehdr_in, /* _bfd_coff_swap_filehdr_in */
+ coff_swap_aouthdr_in, /* _bfd_swap_aouthdr_in */
+ coff_swap_scnhdr_in, /* _bfd_swap_scnhdr_in */
+ coff_swap_reloc_in, /* _bfd_reloc_in */
+ coff_bad_format_hook, /* _bfd_bad_format_hook */
+ coff_set_arch_mach_hook, /* _bfd_set_arch_mach_hook */
+ coff_mkobject_hook, /* _bfd_mkobject_hook */
+ styp_to_sec_flags, /* _bfd_syp_to_sec_flags */
+ coff_set_alignment_hook, /* _bfd_set_alignment_hook */
+ coff_slurp_symbol_table, /* _bfd_coff_slurp_symbol_table */
+ symname_in_debug_hook, /* _coff_symname_in_debug_hook */
+ coff_pointerize_aux_hook, /* _bfd_coff_pointerize_aux_hook */
+ coff_print_aux, /* bfd_coff_print_aux */
+ dummy_reloc16_extra_cases, /* _bfd_coff_reloc16_extra_cases */
+ dummy_reloc16_estimate, /* _bfd_coff_reloc16_estimate */
+ NULL, /* bfd_coff_sym_is_global */
+ coff_compute_section_file_positions, /* _bfd_coff_compute_section_file_positions */
+ NULL, /* _bfd_coff_start_final_link */
+ xcoff_ppc_relocate_section, /* _bfd_coff_relocate_section */
+ coff_rtype_to_howto, /* _bfd_coff_rtype_to_howto */
+ NULL, /* _bfd_coff_addust_symndx */
+ _bfd_generic_link_add_one_symbol, /* _bfd_coff_add_one_symbol */
+ coff_link_output_has_begun, /* _bfd_coff_link_output_has_begun */
+ coff_final_link_postscript /* _bfd_coff_final_link_postscript */
+ },
+
+ 0x01DF, /* magic number */
+ bfd_arch_rs6000, /* architecture */
+ bfd_mach_rs6k, /* machine */
+
+ /* Function pointers to xcoff specific swap routines. */
+ xcoff_swap_ldhdr_in, /* _xcoff_swap_ldhdr_in */
+ xcoff_swap_ldhdr_out, /* _xcoff_swap_ldhdr_out */
+ xcoff_swap_ldsym_in, /* _xcoff_swap_ldsym_in */
+ xcoff_swap_ldsym_out, /* _xcoff_swap_ldsym_out */
+ xcoff_swap_ldrel_in, /* _xcoff_swap_ldrel_in */
+ xcoff_swap_ldrel_out, /* _xcoff_swap_ldrel_out */
+
+ /* Sizes. */
+ LDHDRSZ, /* _xcoff_ldhdrsz */
+ LDSYMSZ, /* _xcoff_ldsymsz */
+ LDRELSZ, /* _xcoff_ldrelsz */
+ 12, /* _xcoff_function_descriptor_size */
+ SMALL_AOUTSZ, /* _xcoff_small_aout_header_size */
+
+ /* Versions. */
+ 1, /* _xcoff_ldhdr_version */
+
+ /* Xcoff vs xcoff64 putting symbol names. */
+ _bfd_xcoff_put_symbol_name, /* _xcoff_put_symbol_name */
+ _bfd_xcoff_put_ldsymbol_name, /* _xcoff_put_ldsymbol_name */
+
+ & xcoff_dynamic_reloc, /* dynamic reloc howto */
+
+ xcoff_create_csect_from_smclas, /* _xcoff_create_csect_from_smclas */
+
+ /* Lineno and reloc count overflow. */
+ xcoff_is_lineno_count_overflow,
+ xcoff_is_reloc_count_overflow,
+
+ xcoff_loader_symbol_offset,
+ xcoff_loader_reloc_offset,
+
+ /* glink. */
+ & xcoff_glink_code[0],
+ (36), /* _xcoff_glink_size */
+
+ /* rtinit */
+ 64, /* _xcoff_rtinit_size */
+ xcoff_generate_rtinit, /* _xcoff_generate_rtinit */
+};
+
+/* The transfer vector that leads the outside world to all of the above. */
+const bfd_target rs6000coff_vec =
+{
+ "aixcoff-rs6000",
+ bfd_target_xcoff_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 | DYNAMIC |
+ HAS_SYMS | HAS_LOCALS | WP_TEXT),
+
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
+ 0, /* leading char */
+ '/', /* ar_pad_char */
+ 15, /* ar_max_namelen??? FIXMEmgo */
+
+ /* data */
+ bfd_getb64, /* bfd_getx64 */
+ bfd_getb_signed_64, /* bfd_getx_signed_64 */
+ bfd_putb64, /* bfd_putx64 */
+ bfd_getb32, /* bfd_getx32 */
+ bfd_getb_signed_32, /* bfd_getx_signed_32 */
+ bfd_putb32, /* bfd_putx32 */
+ bfd_getb16, /* bfd_getx16 */
+ bfd_getb_signed_16, /* bfd_getx_signed_16 */
+ bfd_putb16, /* bfd_putx16 */
+
+ /* hdrs */
+ bfd_getb64, /* bfd_h_getx64 */
+ bfd_getb_signed_64, /* bfd_h_getx_signed_64 */
+ bfd_putb64, /* bfd_h_putx64 */
+ bfd_getb32, /* bfd_h_getx32 */
+ bfd_getb_signed_32, /* bfd_h_getx_signed_32 */
+ bfd_putb32, /* bfd_h_putx32 */
+ bfd_getb16, /* bfd_h_getx16 */
+ bfd_getb_signed_16, /* bfd_h_getx_signed_16 */
+ bfd_putb16, /* bfd_h_putx16 */
+
+ { /* bfd_check_format */
+ _bfd_dummy_target,
+ coff_object_p,
+ _bfd_xcoff_archive_p,
+ CORE_FILE_P
+ },
+
+ { /* bfd_set_format */
+ bfd_false,
+ coff_mkobject,
+ _bfd_generic_mkarchive,
+ bfd_false
+ },
+
+ {/* bfd_write_contents */
+ bfd_false,
+ coff_write_object_contents,
+ _bfd_xcoff_write_archive_contents,
+ bfd_false
+ },
+
+ /* Generic */
+ bfd_true, /* _close_and_cleanup */
+ bfd_true, /* _bfd_free_cached_info */
+ coff_new_section_hook, /* _new_section_hook */
+ _bfd_generic_get_section_contents, /* _bfd_get_section_contents */
+ /* _bfd_get_section_contents_in_window */
+ _bfd_generic_get_section_contents_in_window,
+
+ /* Copy */
+ _bfd_xcoff_copy_private_bfd_data, /* _bfd_copy_private_bfd */
+ /* _bfd_merge_private_bfd_data */
+ ((boolean (*) (bfd *, bfd *)) bfd_true),
+ /* _bfd_copy_pivate_section_data */
+ ((boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true),
+ /* _bfd_copy_private_symbol_data */
+ ((boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true),
+ ((boolean (*) (bfd *, flagword)) bfd_true), /* _bfd_set_private_flags */
+ ((boolean (*) (bfd *, void * )) bfd_true), /* _bfd_print_private_bfd_data */
+
+ /* Core */
+ coff_core_file_failing_command, /* _core_file_failing_command */
+ coff_core_file_failing_signal, /* _core_file_failing_signal */
+ /* _core_file_matches_executable_p */
+ coff_core_file_matches_executable_p,
+
+ /* Archive */
+ _bfd_xcoff_slurp_armap, /* _slurp_armap */
+ /* XCOFF archives do not have
+ anything which corresponds to
+ an extended name table. */
+ bfd_false, /* _slurp_extended_name_table */
+ /* _construct_extended_name_table */
+ ((boolean (*) (bfd *, char **, bfd_size_type *, const char **)) bfd_false),
+ bfd_dont_truncate_arname, /* _truncate_arname */
+ _bfd_xcoff_write_armap, /* _write_armap */
+ _bfd_xcoff_read_ar_hdr, /* _read_ar_hdr */
+ _bfd_xcoff_openr_next_archived_file, /* _openr_next_archived_file */
+ _bfd_generic_get_elt_at_index, /* _get_elt_at_index */
+ _bfd_xcoff_generic_stat_arch_elt, /* _generic_dtat_arch_elt */
+ /* XCOFF archives do not have
+ a timestamp. */
+ bfd_true, /* _update_armap_timestamp */
+
+ /* Symbols */
+ coff_get_symtab_upper_bound, /* _get_symtab_upper_bound */
+ coff_get_symtab, /* _get_symtab */
+ coff_make_empty_symbol, /* _make_empty_symbol */
+ coff_print_symbol, /* _print_symbol */
+ coff_get_symbol_info, /* _get_symbol_info */
+ _bfd_xcoff_is_local_label_name, /* _bfd_is_local_label_name */
+ coff_get_lineno, /* _get_lineno */
+ coff_find_nearest_line, /* _find_nearest_line */
+ coff_bfd_make_debug_symbol, /* _bfd_make_debug_symbol */
+ _bfd_generic_read_minisymbols, /* _read_minisymbols */
+ _bfd_generic_minisymbol_to_symbol, /* _minsymbol_to_symbol */
+
+ /* Reloc */
+ coff_get_reloc_upper_bound, /* _get_reloc_upper_bound */
+ coff_canonicalize_reloc, /* _cononicalize_reloc */
+ _bfd_xcoff_reloc_type_lookup, /* _bfd_reloc_type_lookup */
+
+ /* Write */
+ coff_set_arch_mach, /* _set_arch_mach */
+ coff_set_section_contents, /* _set_section_contents */
+
+ /* Link */
+ _bfd_xcoff_sizeof_headers, /* _sizeof_headers */
+ /* _bfd_get_relocated_section_contents */
+ bfd_generic_get_relocated_section_contents,
+ bfd_generic_relax_section, /* _bfd_relax_section */
+ _bfd_xcoff_bfd_link_hash_table_create, /* _bfd_link_hash_table_create */
+ _bfd_xcoff_bfd_link_add_symbols, /* _bfd_link_add_symbols */
+ _bfd_xcoff_bfd_final_link, /* _bfd_filnal_link */
+ _bfd_generic_link_split_section, /* _bfd_link_split_section */
+ bfd_generic_gc_sections, /* _bfd_gc_sections */
+ bfd_generic_merge_sections, /* _bfd_merge_sections */
+
+ /* Dynamic */
+ /* _get_dynamic_symtab_upper_bound */
+ _bfd_xcoff_get_dynamic_symtab_upper_bound,
+ _bfd_xcoff_canonicalize_dynamic_symtab, /* _cononicalize_dynamic_symtab */
+ _bfd_xcoff_get_dynamic_reloc_upper_bound,/* _get_dynamic_reloc_upper_bound */
+ _bfd_xcoff_canonicalize_dynamic_reloc, /* _cononicalize_dynamic_reloc */
+
+ /* Opposite endian version, none exists */
+ NULL,
+
+ /* back end data */
+ (void *) &bfd_xcoff_backend_data,
+};
+
+/*
+ * xcoff-powermac target
+ * Old target.
+ * Only difference between this target and the rs6000 target is the
+ * the default architecture and machine type used in coffcode.h
+ *
+ * PowerPC Macs use the same magic numbers as RS/6000
+ * (because that's how they were bootstrapped originally),
+ * but they are always PowerPC architecture.
+ */
+static const struct xcoff_backend_data_rec bfd_pmac_xcoff_backend_data =
+{
+ { /* COFF backend, defined in libcoff.h */
+ _bfd_xcoff_swap_aux_in, /* _bfd_coff_swap_aux_in */
+ _bfd_xcoff_swap_sym_in, /* _bfd_coff_swap_sym_in */
+ coff_swap_lineno_in, /* _bfd_coff_swap_lineno_in */
+ _bfd_xcoff_swap_aux_out, /* _bfd_swap_aux_out */
+ _bfd_xcoff_swap_sym_out, /* _bfd_swap_sym_out */
+ coff_swap_lineno_out, /* _bfd_swap_lineno_out */
+ coff_swap_reloc_out, /* _bfd_swap_reloc_out */
+ coff_swap_filehdr_out, /* _bfd_swap_filehdr_out */
+ coff_swap_aouthdr_out, /* _bfd_swap_aouthdr_out */
+ coff_swap_scnhdr_out, /* _bfd_swap_scnhdr_out */
+ FILHSZ, /* _bfd_filhsz */
+ AOUTSZ, /* _bfd_aoutsz */
+ SCNHSZ, /* _bfd_scnhsz */
+ SYMESZ, /* _bfd_symesz */
+ AUXESZ, /* _bfd_auxesz */
+ RELSZ, /* _bfd_relsz */
+ LINESZ, /* _bfd_linesz */
+ FILNMLEN, /* _bfd_filnmlen */
+ true, /* _bfd_coff_long_filenames */
+ false, /* _bfd_coff_long_section_names */
+ (3), /* _bfd_coff_default_section_alignment_power */
+ false, /* _bfd_coff_force_symnames_in_strings */
+ 2, /* _bfd_coff_debug_string_prefix_length */
+ coff_swap_filehdr_in, /* _bfd_coff_swap_filehdr_in */
+ coff_swap_aouthdr_in, /* _bfd_swap_aouthdr_in */
+ coff_swap_scnhdr_in, /* _bfd_swap_scnhdr_in */
+ coff_swap_reloc_in, /* _bfd_reloc_in */
+ coff_bad_format_hook, /* _bfd_bad_format_hook */
+ coff_set_arch_mach_hook, /* _bfd_set_arch_mach_hook */
+ coff_mkobject_hook, /* _bfd_mkobject_hook */
+ styp_to_sec_flags, /* _bfd_syp_to_sec_flags */
+ coff_set_alignment_hook, /* _bfd_set_alignment_hook */
+ coff_slurp_symbol_table, /* _bfd_coff_slurp_symbol_table */
+ symname_in_debug_hook, /* _coff_symname_in_debug_hook */
+ coff_pointerize_aux_hook, /* _bfd_coff_pointerize_aux_hook */
+ coff_print_aux, /* bfd_coff_print_aux */
+ dummy_reloc16_extra_cases, /* _bfd_coff_reloc16_extra_cases */
+ dummy_reloc16_estimate, /* _bfd_coff_reloc16_estimate */
+ NULL, /* bfd_coff_sym_is_global */
+ /* _bfd_coff_compute_section_file_positions */
+ coff_compute_section_file_positions,
+ NULL, /* _bfd_coff_start_final_link */
+ xcoff_ppc_relocate_section, /* _bfd_coff_relocate_section */
+ coff_rtype_to_howto, /* _bfd_coff_rtype_to_howto */
+ NULL, /* _bfd_coff_addust_symndx */
+ _bfd_generic_link_add_one_symbol, /* _bfd_coff_add_one_symbol */
+ coff_link_output_has_begun, /* _bfd_coff_link_output_has_begun */
+ coff_final_link_postscript /* _bfd_coff_final_link_postscript */
+ },
+
+ 0x01DF, /* magic number */
+ bfd_arch_powerpc, /* architecture */
+ bfd_mach_ppc, /* machine */
+
+ /* function pointers to xcoff specific swap routines */
+ xcoff_swap_ldhdr_in, /* _xcoff_swap_ldhdr_in */
+ xcoff_swap_ldhdr_out, /* _xcoff_swap_ldhdr_out */
+ xcoff_swap_ldsym_in, /* _xcoff_swap_ldsym_in */
+ xcoff_swap_ldsym_out, /* _xcoff_swap_ldsym_out */
+ xcoff_swap_ldrel_in, /* _xcoff_swap_ldrel_in */
+ xcoff_swap_ldrel_out, /* _xcoff_swap_ldrel_out */
+
+ /* sizes */
+ LDHDRSZ, /* _xcoff_ldhdrsz */
+ LDSYMSZ, /* _xcoff_ldsymsz */
+ LDRELSZ, /* _xcoff_ldrelsz */
+ 12, /* _xcoff_function_descriptor_size */
+ SMALL_AOUTSZ, /* _xcoff_small_aout_header_size */
+
+ /* versions */
+ 1, /* _xcoff_ldhdr_version */
+
+ /* xcoff vs xcoff64 putting symbol names */
+ _bfd_xcoff_put_symbol_name, /* _xcoff_put_symbol_name */
+ _bfd_xcoff_put_ldsymbol_name, /* _xcoff_put_ldsymbol_name */
+
+ &xcoff_dynamic_reloc, /* dynamic reloc howto */
+
+ xcoff_create_csect_from_smclas, /* _xcoff_create_csect_from_smclas */
+
+ /* lineno and reloc count overflow */
+ xcoff_is_lineno_count_overflow,
+ xcoff_is_reloc_count_overflow,
+
+ xcoff_loader_symbol_offset,
+ xcoff_loader_reloc_offset,
+
+ /* glink */
+ &xcoff_glink_code[0],
+ (36), /* _xcoff_glink_size */
+
+ /* rtinit */
+ 0, /* _xcoff_rtinit_size */
+ xcoff_generate_rtinit, /* _xcoff_generate_rtinit */
+
+};
+
+/* The transfer vector that leads the outside world to all of the above. */
+const bfd_target pmac_xcoff_vec =
+{
+ "xcoff-powermac",
+ bfd_target_xcoff_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 | DYNAMIC |
+ HAS_SYMS | HAS_LOCALS | WP_TEXT),
+
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
+ 0, /* leading char */
+ '/', /* ar_pad_char */
+ 15, /* ar_max_namelen??? FIXMEmgo */
+
+ /* data */
+ bfd_getb64, /* bfd_getx64 */
+ bfd_getb_signed_64, /* bfd_getx_signed_64 */
+ bfd_putb64, /* bfd_putx64 */
+ bfd_getb32, /* bfd_getx32 */
+ bfd_getb_signed_32, /* bfd_getx_signed_32 */
+ bfd_putb32, /* bfd_putx32 */
+ bfd_getb16, /* bfd_getx16 */
+ bfd_getb_signed_16, /* bfd_getx_signed_16 */
+ bfd_putb16, /* bfd_putx16 */
+
+ /* hdrs */
+ bfd_getb64, /* bfd_h_getx64 */
+ bfd_getb_signed_64, /* bfd_h_getx_signed_64 */
+ bfd_putb64, /* bfd_h_putx64 */
+ bfd_getb32, /* bfd_h_getx32 */
+ bfd_getb_signed_32, /* bfd_h_getx_signed_32 */
+ bfd_putb32, /* bfd_h_putx32 */
+ bfd_getb16, /* bfd_h_getx16 */
+ bfd_getb_signed_16, /* bfd_h_getx_signed_16 */
+ bfd_putb16, /* bfd_h_putx16 */
+
+ { /* bfd_check_format */
+ _bfd_dummy_target,
+ coff_object_p,
+ _bfd_xcoff_archive_p,
+ CORE_FILE_P
+ },
+
+ { /* bfd_set_format */
+ bfd_false,
+ coff_mkobject,
+ _bfd_generic_mkarchive,
+ bfd_false
+ },
+
+ {/* bfd_write_contents */
+ bfd_false,
+ coff_write_object_contents,
+ _bfd_xcoff_write_archive_contents,
+ bfd_false
+ },
+
+ /* Generic */
+ bfd_true, /* _close_and_cleanup */
+ bfd_true, /* _bfd_free_cached_info */
+ coff_new_section_hook, /* _new_section_hook */
+ _bfd_generic_get_section_contents, /* _bfd_get_section_contents */
+ /* _bfd_get_section_contents_in_window */
+ _bfd_generic_get_section_contents_in_window,
+
+ /* Copy */
+ _bfd_xcoff_copy_private_bfd_data, /* _bfd_copy_private_bfd */
+ /* _bfd_merge_private_bfd_data */
+ ((boolean (*) (bfd *, bfd *)) bfd_true),
+ /* _bfd_copy_pivate_section_data */
+ ((boolean (*) (bfd *, asection *, bfd *, asection *)) bfd_true),
+ /* _bfd_copy_private_symbol_data */
+ ((boolean (*) (bfd *, asymbol *, bfd *, asymbol *)) bfd_true),
+ ((boolean (*) (bfd *, flagword)) bfd_true), /* _bfd_set_private_flags */
+ ((boolean (*) (bfd *, void * )) bfd_true), /* _bfd_print_private_bfd_data */
+
+ /* Core */
+ coff_core_file_failing_command, /* _core_file_failing_command */
+ coff_core_file_failing_signal, /* _core_file_failing_signal */
+ /* _core_file_matches_executable_p */
+ coff_core_file_matches_executable_p,
+
+ /* Archive */
+ _bfd_xcoff_slurp_armap, /* _slurp_armap */
+ /* XCOFF archives do not have
+ anything which corresponds to
+ an extended name table. */
+ bfd_false, /* _slurp_extended_name_table */
+ /* _construct_extended_name_table */
+ ((boolean (*) (bfd *, char **, bfd_size_type *, const char **)) bfd_false),
+ bfd_dont_truncate_arname, /* _truncate_arname */
+ _bfd_xcoff_write_armap, /* _write_armap */
+ _bfd_xcoff_read_ar_hdr, /* _read_ar_hdr */
+ _bfd_xcoff_openr_next_archived_file, /* _openr_next_archived_file */
+ _bfd_generic_get_elt_at_index, /* _get_elt_at_index */
+ _bfd_xcoff_generic_stat_arch_elt, /* _generic_dtat_arch_elt */
+ /* XCOFF archives do not have
+ a timestamp. */
+ bfd_true, /* _update_armap_timestamp */
+
+ /* Symbols */
+ coff_get_symtab_upper_bound, /* _get_symtab_upper_bound */
+ coff_get_symtab, /* _get_symtab */
+ coff_make_empty_symbol, /* _make_empty_symbol */
+ coff_print_symbol, /* _print_symbol */
+ coff_get_symbol_info, /* _get_symbol_info */
+ _bfd_xcoff_is_local_label_name, /* _bfd_is_local_label_name */
+ coff_get_lineno, /* _get_lineno */
+ coff_find_nearest_line, /* _find_nearest_line */
+ coff_bfd_make_debug_symbol, /* _bfd_make_debug_symbol */
+ _bfd_generic_read_minisymbols, /* _read_minisymbols */
+ _bfd_generic_minisymbol_to_symbol, /* _minsymbol_to_symbol */
+
+ /* Reloc */
+ coff_get_reloc_upper_bound, /* _get_reloc_upper_bound */
+ coff_canonicalize_reloc, /* _cononicalize_reloc */
+ _bfd_xcoff_reloc_type_lookup, /* _bfd_reloc_type_lookup */
+
+ /* Write */
+ coff_set_arch_mach, /* _set_arch_mach */
+ coff_set_section_contents, /* _set_section_contents */
+
+ /* Link */
+ _bfd_xcoff_sizeof_headers, /* _sizeof_headers */
+ /* _bfd_get_relocated_section_contents */
+ bfd_generic_get_relocated_section_contents,
+ bfd_generic_relax_section, /* _bfd_relax_section */
+ _bfd_xcoff_bfd_link_hash_table_create, /* _bfd_link_hash_table_create */
+ _bfd_xcoff_bfd_link_add_symbols, /* _bfd_link_add_symbols */
+ _bfd_xcoff_bfd_final_link, /* _bfd_filnal_link */
+ _bfd_generic_link_split_section, /* _bfd_link_split_section */
+ bfd_generic_gc_sections, /* _bfd_gc_sections */
+ bfd_generic_merge_sections, /* _bfd_merge_sections */
+
+ /* Dynamic */
+ /* _get_dynamic_symtab_upper_bound */
+ _bfd_xcoff_get_dynamic_symtab_upper_bound,
+ _bfd_xcoff_canonicalize_dynamic_symtab, /* _cononicalize_dynamic_symtab */
+ _bfd_xcoff_get_dynamic_reloc_upper_bound,/* _get_dynamic_reloc_upper_bound */
+ _bfd_xcoff_canonicalize_dynamic_reloc, /* _cononicalize_dynamic_reloc */
+
+ /* Opposite endian version, none exists */
+ NULL,
+
+ /* back end data */
+ (void *) &bfd_pmac_xcoff_backend_data,
+};
diff --git a/contrib/binutils/bfd/coff-sparc.c b/contrib/binutils/bfd/coff-sparc.c
index 0f592de..35c23df 100644
--- a/contrib/binutils/bfd/coff-sparc.c
+++ b/contrib/binutils/bfd/coff-sparc.c
@@ -1,5 +1,5 @@
/* BFD back-end for Sparc COFF files.
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2001
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -33,6 +33,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* The page size is a guess based on ELF. */
#define COFF_PAGE_SIZE 0x10000
+
+static reloc_howto_type *coff_sparc_reloc_type_lookup
+ PARAMS ((bfd *, bfd_reloc_code_real_type));
+static void rtype2howto PARAMS ((arelent *, struct internal_reloc *));
+
enum reloc_type
{
R_SPARC_NONE = 0,
@@ -52,7 +57,7 @@ enum reloc_type
};
#if 0
-static CONST char *CONST reloc_type_names[] =
+static const char *const reloc_type_names[] =
{
"R_SPARC_NONE",
"R_SPARC_8", "R_SPARC_16", "R_SPARC_32",
@@ -129,7 +134,7 @@ struct coff_reloc_map {
unsigned char coff_reloc_val;
};
-static CONST struct coff_reloc_map sparc_reloc_map[] =
+static const struct coff_reloc_map sparc_reloc_map[] =
{
{ BFD_RELOC_NONE, R_SPARC_NONE, },
{ BFD_RELOC_16, R_SPARC_16, },
@@ -183,8 +188,8 @@ rtype2howto (cache_ptr, dst)
#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 SWAP_IN_RELOC_OFFSET H_GET_32
+#define SWAP_OUT_RELOC_OFFSET H_PUT_32
#define CALC_ADDEND(abfd, ptr, reloc, cache_ptr) \
cache_ptr->addend = reloc.r_offset;
diff --git a/contrib/binutils/bfd/coffcode.h b/contrib/binutils/bfd/coffcode.h
index 2cdc137..0b185a5 100644
--- a/contrib/binutils/bfd/coffcode.h
+++ b/contrib/binutils/bfd/coffcode.h
@@ -1,6 +1,6 @@
/* Support for the generic parts of most COFF variants, for BFD.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001
+ 2000, 2001, 2002
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -248,39 +248,37 @@ CODE_FRAGMENT
.
.typedef struct coff_ptr_struct
.{
+. {* Remembers the offset from the first symbol in the file for
+. this symbol. Generated by coff_renumber_symbols. *}
+. unsigned int offset;
.
-. {* Remembers the offset from the first symbol in the file for
-. this symbol. Generated by coff_renumber_symbols. *}
-.unsigned int offset;
+. {* Should the value of this symbol be renumbered. Used for
+. XCOFF C_BSTAT symbols. Set by coff_slurp_symbol_table. *}
+. unsigned int fix_value : 1;
.
-. {* Should the value of this symbol be renumbered. Used for
-. XCOFF C_BSTAT symbols. Set by coff_slurp_symbol_table. *}
-.unsigned int fix_value : 1;
+. {* Should the tag field of this symbol be renumbered.
+. Created by coff_pointerize_aux. *}
+. unsigned int fix_tag : 1;
.
-. {* Should the tag field of this symbol be renumbered.
-. Created by coff_pointerize_aux. *}
-.unsigned int fix_tag : 1;
+. {* Should the endidx field of this symbol be renumbered.
+. Created by coff_pointerize_aux. *}
+. unsigned int fix_end : 1;
.
-. {* Should the endidx field of this symbol be renumbered.
-. Created by coff_pointerize_aux. *}
-.unsigned int fix_end : 1;
+. {* Should the x_csect.x_scnlen field be renumbered.
+. Created by coff_pointerize_aux. *}
+. unsigned int fix_scnlen : 1;
.
-. {* Should the x_csect.x_scnlen field be renumbered.
-. Created by coff_pointerize_aux. *}
-.unsigned int fix_scnlen : 1;
+. {* Fix up an XCOFF C_BINCL/C_EINCL symbol. The value is the
+. index into the line number entries. Set by coff_slurp_symbol_table. *}
+. unsigned int fix_line : 1;
.
-. {* Fix up an XCOFF C_BINCL/C_EINCL symbol. The value is the
-. index into the line number entries. Set by
-. coff_slurp_symbol_table. *}
-.unsigned int fix_line : 1;
-.
-. {* The container for the symbol structure as read and translated
-. from the file. *}
-.
-.union {
-. union internal_auxent auxent;
-. struct internal_syment syment;
-. } u;
+. {* The container for the symbol structure as read and translated
+. from the file. *}
+. union
+. {
+. union internal_auxent auxent;
+. struct internal_syment syment;
+. } u;
.} combined_entry_type;
.
.
@@ -288,17 +286,17 @@ CODE_FRAGMENT
.
.typedef struct coff_symbol_struct
.{
-. {* The actual symbol which the rest of BFD works with *}
-.asymbol symbol;
+. {* The actual symbol which the rest of BFD works with *}
+. asymbol symbol;
.
-. {* A pointer to the hidden information for this symbol *}
-.combined_entry_type *native;
+. {* A pointer to the hidden information for this symbol *}
+. combined_entry_type *native;
.
-. {* A pointer to the linenumber information for this symbol *}
-.struct lineno_cache_entry *lineno;
+. {* A pointer to the linenumber information for this symbol *}
+. struct lineno_cache_entry *lineno;
.
-. {* Have the line numbers been relocated yet ? *}
-.boolean done_lineno;
+. {* Have the line numbers been relocated yet ? *}
+. boolean done_lineno;
.} coff_symbol_type;
*/
@@ -312,8 +310,8 @@ 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 *, asection *));
+static boolean styp_to_sec_flags
+ PARAMS ((bfd *, PTR, const char *, asection *, flagword *));
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 *,
@@ -324,12 +322,12 @@ static boolean coff_write_relocs PARAMS ((bfd *, int));
static boolean coff_set_flags
PARAMS ((bfd *, unsigned int *, unsigned short *));
static boolean coff_set_arch_mach
- PARAMS ((bfd *, enum bfd_architecture, unsigned long));
+ PARAMS ((bfd *, enum bfd_architecture, unsigned long)) ATTRIBUTE_UNUSED;
static boolean coff_compute_section_file_positions PARAMS ((bfd *));
-static boolean coff_write_object_contents PARAMS ((bfd *));
+static boolean coff_write_object_contents PARAMS ((bfd *)) ATTRIBUTE_UNUSED;
static boolean coff_set_section_contents
PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
-static PTR buy_and_read PARAMS ((bfd *, file_ptr, int, size_t));
+static PTR buy_and_read PARAMS ((bfd *, file_ptr, bfd_size_type));
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
@@ -368,7 +366,7 @@ static flagword handle_COMDAT PARAMS ((bfd *, flagword, PTR, const char *, asect
static long
sec_to_styp_flags (sec_name, sec_flags)
- CONST char *sec_name;
+ const char *sec_name;
flagword sec_flags;
{
long styp_flags = 0;
@@ -430,6 +428,14 @@ sec_to_styp_flags (sec_name, sec_flags)
{
styp_flags = STYP_LOADER;
}
+ else if (!strcmp (sec_name, _EXCEPT))
+ {
+ styp_flags = STYP_EXCEPT;
+ }
+ else if (!strcmp (sec_name, _TYPCHK))
+ {
+ styp_flags = STYP_TYPCHK;
+ }
#endif
/* Try and figure out what it should be */
else if (sec_flags & SEC_CODE)
@@ -508,7 +514,7 @@ sec_to_styp_flags (sec_name, sec_flags)
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 constRUCTOR */
/* skip CONTENTS */
#ifdef STYP_NOLOAD
if ((sec_flags & (SEC_NEVER_LOAD | SEC_COFF_SHARED_LIBRARY)) != 0)
@@ -553,12 +559,13 @@ sec_to_styp_flags (sec_name, sec_flags)
#ifndef COFF_WITH_PE
-static flagword
-styp_to_sec_flags (abfd, hdr, name, section)
+static boolean
+styp_to_sec_flags (abfd, hdr, name, section, flags_ptr)
bfd *abfd ATTRIBUTE_UNUSED;
PTR hdr;
const char *name;
asection *section ATTRIBUTE_UNUSED;
+ flagword *flags_ptr;
{
struct internal_scnhdr *internal_s = (struct internal_scnhdr *) hdr;
long styp_flags = internal_s->s_flags;
@@ -566,19 +573,17 @@ styp_to_sec_flags (abfd, hdr, name, section)
#ifdef STYP_BLOCK
if (styp_flags & STYP_BLOCK)
- sec_flags |= SEC_BLOCK;
+ sec_flags |= SEC_BLOCK;
#endif
#ifdef STYP_CLINK
if (styp_flags & STYP_CLINK)
- sec_flags |= SEC_CLINK;
+ sec_flags |= SEC_CLINK;
#endif
#ifdef STYP_NOLOAD
if (styp_flags & STYP_NOLOAD)
- {
- sec_flags |= SEC_NEVER_LOAD;
- }
+ sec_flags |= SEC_NEVER_LOAD;
#endif /* STYP_NOLOAD */
/* For 386 COFF, at least, an unloadable text or data section is
@@ -619,9 +624,7 @@ styp_to_sec_flags (abfd, hdr, name, section)
#endif
}
else if (styp_flags & STYP_PAD)
- {
- sec_flags = 0;
- }
+ sec_flags = 0;
else if (strcmp (name, _TEXT) == 0)
{
if (sec_flags & SEC_NEVER_LOAD)
@@ -664,26 +667,19 @@ styp_to_sec_flags (abfd, hdr, name, section)
#endif
#ifdef _LIT
else if (strcmp (name, _LIT) == 0)
- {
- sec_flags = SEC_LOAD | SEC_ALLOC | SEC_READONLY;
- }
+ sec_flags = SEC_LOAD | SEC_ALLOC | SEC_READONLY;
#endif
else
- {
- sec_flags |= SEC_ALLOC | SEC_LOAD;
- }
+ sec_flags |= SEC_ALLOC | SEC_LOAD;
#ifdef STYP_LIT /* A29k readonly text/data section type */
if ((styp_flags & STYP_LIT) == STYP_LIT)
- {
- sec_flags = (SEC_LOAD | SEC_ALLOC | SEC_READONLY);
- }
+ sec_flags = (SEC_LOAD | SEC_ALLOC | SEC_READONLY);
#endif /* STYP_LIT */
+
#ifdef STYP_OTHER_LOAD /* Other loaded sections */
if (styp_flags & STYP_OTHER_LOAD)
- {
- sec_flags = (SEC_LOAD | SEC_ALLOC);
- }
+ sec_flags = (SEC_LOAD | SEC_ALLOC);
#endif /* STYP_SDATA */
#if defined (COFF_LONG_SECTION_NAMES) && defined (COFF_SUPPORT_GNU_LINKONCE)
@@ -697,7 +693,11 @@ styp_to_sec_flags (abfd, hdr, name, section)
sec_flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD;
#endif
- return sec_flags;
+ if (flags_ptr == NULL)
+ return false;
+
+ * flags_ptr = sec_flags;
+ return true;
}
#else /* COFF_WITH_PE */
@@ -736,7 +736,7 @@ handle_COMDAT (abfd, sec_flags, hdr, name, section)
if (! _bfd_coff_get_external_symbols (abfd))
return sec_flags;
-
+
esymstart = esym = (bfd_byte *) obj_coff_external_syms (abfd);
esymend = esym + obj_raw_syment_count (abfd) * bfd_coff_symesz (abfd);
@@ -923,21 +923,23 @@ handle_COMDAT (abfd, sec_flags, hdr, name, section)
drop through from the above). */
{
char *newname;
+ bfd_size_type amt;
- /* This must the the second symbol with the
+ /* This must 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));
+ amt = sizeof (struct bfd_comdat_info);
+ section->comdat = bfd_alloc (abfd, amt);
if (section->comdat == NULL)
abort ();
section->comdat->symbol =
(esym - esymstart) / bfd_coff_symesz (abfd);
- newname = bfd_alloc (abfd, strlen (symname) + 1);
+ amt = strlen (symname) + 1;
+ newname = bfd_alloc (abfd, amt);
if (newname == NULL)
abort ();
@@ -966,16 +968,18 @@ handle_COMDAT (abfd, sec_flags, hdr, name, section)
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)
+static boolean
+styp_to_sec_flags (abfd, hdr, name, section, flags_ptr)
bfd *abfd;
PTR hdr;
const char *name;
asection *section;
+ flagword *flags_ptr;
{
struct internal_scnhdr *internal_s = (struct internal_scnhdr *) hdr;
long styp_flags = internal_s->s_flags;
flagword sec_flags;
+ boolean result = true;
/* Assume read only unless IMAGE_SCN_MEM_WRITE is specified. */
sec_flags = SEC_READONLY;
@@ -985,7 +989,7 @@ styp_to_sec_flags (abfd, hdr, name, section)
{
long flag = styp_flags & - styp_flags;
char * unhandled = NULL;
-
+
styp_flags &= ~ flag;
/* We infer from the distinct read/write/execute bits the settings
@@ -1010,7 +1014,7 @@ styp_to_sec_flags (abfd, hdr, name, section)
case STYP_NOLOAD:
sec_flags |= SEC_NEVER_LOAD;
break;
-#endif
+#endif
case IMAGE_SCN_MEM_READ:
/* Ignored, assume it always to be true. */
break;
@@ -1067,17 +1071,17 @@ styp_to_sec_flags (abfd, hdr, name, section)
break;
default:
/* Silently ignore for now. */
- break;
+ break;
}
- /* If the section flag was not handled, report it here. This will allow
- users of the BFD library to report a problem but continue executing.
- Tools which need to be aware of these problems (such as the linker)
- can override the default bfd_error_handler to intercept these reports. */
+ /* If the section flag was not handled, report it here. */
if (unhandled != NULL)
- (*_bfd_error_handler)
- (_("%s (%s): Section flag %s (0x%x) ignored"),
- bfd_get_filename (abfd), name, unhandled, flag);
+ {
+ (*_bfd_error_handler)
+ (_("%s (%s): Section flag %s (0x%x) ignored"),
+ bfd_archive_filename (abfd), name, unhandled, flag);
+ result = false;
+ }
}
#if defined (COFF_LONG_SECTION_NAMES) && defined (COFF_SUPPORT_GNU_LINKONCE)
@@ -1091,7 +1095,10 @@ styp_to_sec_flags (abfd, hdr, name, section)
sec_flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_DISCARD;
#endif
- return sec_flags;
+ if (flags_ptr)
+ * flags_ptr = sec_flags;
+
+ return result;
}
#endif /* COFF_WITH_PE */
@@ -1123,234 +1130,166 @@ CODE_FRAGMENT
Special entry points for gdb to swap in coff symbol table parts:
.typedef struct
.{
-. void (*_bfd_coff_swap_aux_in) PARAMS ((
-. bfd *abfd,
-. PTR ext,
-. int type,
-. int class,
-. int indaux,
-. int numaux,
-. PTR in));
+. void (*_bfd_coff_swap_aux_in)
+. PARAMS ((bfd *, PTR, int, int, int, int, PTR));
.
-. void (*_bfd_coff_swap_sym_in) PARAMS ((
-. bfd *abfd ,
-. PTR ext,
-. PTR in));
+. void (*_bfd_coff_swap_sym_in)
+. PARAMS ((bfd *, PTR, PTR));
.
-. void (*_bfd_coff_swap_lineno_in) PARAMS ((
-. bfd *abfd,
-. PTR ext,
-. PTR in));
+. void (*_bfd_coff_swap_lineno_in)
+. PARAMS ((bfd *, PTR, PTR));
.
-
-Special entry points for gas to swap out coff parts:
-
-. unsigned int (*_bfd_coff_swap_aux_out) PARAMS ((
-. bfd *abfd,
-. PTR in,
-. int type,
-. int class,
-. int indaux,
-. int numaux,
-. PTR ext));
+. unsigned int (*_bfd_coff_swap_aux_out)
+. PARAMS ((bfd *, PTR, int, int, int, int, PTR));
.
-. unsigned int (*_bfd_coff_swap_sym_out) PARAMS ((
-. bfd *abfd,
-. PTR in,
-. PTR ext));
+. unsigned int (*_bfd_coff_swap_sym_out)
+. PARAMS ((bfd *, PTR, PTR));
.
-. unsigned int (*_bfd_coff_swap_lineno_out) PARAMS ((
-. bfd *abfd,
-. PTR in,
-. PTR ext));
+. unsigned int (*_bfd_coff_swap_lineno_out)
+. PARAMS ((bfd *, PTR, PTR));
.
-. unsigned int (*_bfd_coff_swap_reloc_out) PARAMS ((
-. bfd *abfd,
-. PTR src,
-. PTR dst));
+. unsigned int (*_bfd_coff_swap_reloc_out)
+. PARAMS ((bfd *, PTR, PTR));
.
-. unsigned int (*_bfd_coff_swap_filehdr_out) PARAMS ((
-. bfd *abfd,
-. PTR in,
-. PTR out));
+. unsigned int (*_bfd_coff_swap_filehdr_out)
+. PARAMS ((bfd *, PTR, PTR));
.
-. unsigned int (*_bfd_coff_swap_aouthdr_out) PARAMS ((
-. bfd *abfd,
-. PTR in,
-. PTR out));
+. unsigned int (*_bfd_coff_swap_aouthdr_out)
+. PARAMS ((bfd *, PTR, PTR));
.
-. unsigned int (*_bfd_coff_swap_scnhdr_out) PARAMS ((
-. bfd *abfd,
-. PTR in,
-. PTR out));
+. unsigned int (*_bfd_coff_swap_scnhdr_out)
+. PARAMS ((bfd *, PTR, PTR));
.
-
-Special entry points for generic COFF routines to call target
-dependent COFF routines:
-
-. unsigned int _bfd_filhsz;
-. unsigned int _bfd_aoutsz;
-. unsigned int _bfd_scnhsz;
-. unsigned int _bfd_symesz;
-. 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;
-. boolean _bfd_coff_force_symnames_in_strings;
-. unsigned int _bfd_coff_debug_string_prefix_length;
-. void (*_bfd_coff_swap_filehdr_in) PARAMS ((
-. bfd *abfd,
-. PTR ext,
-. PTR in));
-. void (*_bfd_coff_swap_aouthdr_in) PARAMS ((
-. bfd *abfd,
-. PTR ext,
-. PTR in));
-. void (*_bfd_coff_swap_scnhdr_in) PARAMS ((
-. bfd *abfd,
-. PTR ext,
-. PTR in));
-. void (*_bfd_coff_swap_reloc_in) PARAMS ((
-. bfd *abfd,
-. PTR ext,
-. PTR in));
-. boolean (*_bfd_coff_bad_format_hook) PARAMS ((
-. bfd *abfd,
-. PTR internal_filehdr));
-. boolean (*_bfd_coff_set_arch_mach_hook) PARAMS ((
-. bfd *abfd,
-. PTR internal_filehdr));
-. PTR (*_bfd_coff_mkobject_hook) PARAMS ((
-. bfd *abfd,
-. PTR internal_filehdr,
-. PTR internal_aouthdr));
-. flagword (*_bfd_styp_to_sec_flags_hook) PARAMS ((
-. bfd *abfd,
-. PTR internal_scnhdr,
-. const char *name,
-. asection *section));
-. void (*_bfd_set_alignment_hook) PARAMS ((
-. bfd *abfd,
-. asection *sec,
-. PTR internal_scnhdr));
-. boolean (*_bfd_coff_slurp_symbol_table) PARAMS ((
-. bfd *abfd));
-. boolean (*_bfd_coff_symname_in_debug) PARAMS ((
-. bfd *abfd,
-. struct internal_syment *sym));
-. boolean (*_bfd_coff_pointerize_aux_hook) PARAMS ((
-. bfd *abfd,
-. combined_entry_type *table_base,
-. combined_entry_type *symbol,
-. unsigned int indaux,
-. combined_entry_type *aux));
-. boolean (*_bfd_coff_print_aux) PARAMS ((
-. bfd *abfd,
-. FILE *file,
-. combined_entry_type *table_base,
-. combined_entry_type *symbol,
-. combined_entry_type *aux,
-. unsigned int indaux));
-. void (*_bfd_coff_reloc16_extra_cases) PARAMS ((
-. 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));
-. int (*_bfd_coff_reloc16_estimate) PARAMS ((
-. bfd *abfd,
-. asection *input_section,
-. arelent *r,
-. unsigned int shrink,
-. struct bfd_link_info *link_info));
-. enum coff_symbol_classification (*_bfd_coff_classify_symbol) PARAMS ((
-. bfd *abfd,
-. struct internal_syment *));
-. boolean (*_bfd_coff_compute_section_file_positions) PARAMS ((
-. bfd *abfd));
-. boolean (*_bfd_coff_start_final_link) PARAMS ((
-. bfd *output_bfd,
-. struct bfd_link_info *info));
-. boolean (*_bfd_coff_relocate_section) PARAMS ((
-. 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));
-. reloc_howto_type *(*_bfd_coff_rtype_to_howto) PARAMS ((
-. bfd *abfd,
-. asection *sec,
-. struct internal_reloc *rel,
-. struct coff_link_hash_entry *h,
-. struct internal_syment *sym,
-. bfd_vma *addendp));
-. boolean (*_bfd_coff_adjust_symndx) PARAMS ((
-. bfd *obfd,
-. struct bfd_link_info *info,
-. bfd *ibfd,
-. asection *sec,
-. struct internal_reloc *reloc,
-. boolean *adjustedp));
-. boolean (*_bfd_coff_link_add_one_symbol) PARAMS ((
-. 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));
+. unsigned int _bfd_filhsz;
+. unsigned int _bfd_aoutsz;
+. unsigned int _bfd_scnhsz;
+. unsigned int _bfd_symesz;
+. 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;
+. boolean _bfd_coff_force_symnames_in_strings;
+. unsigned int _bfd_coff_debug_string_prefix_length;
+.
+. void (*_bfd_coff_swap_filehdr_in)
+. PARAMS ((bfd *, PTR, PTR));
+.
+. void (*_bfd_coff_swap_aouthdr_in)
+. PARAMS ((bfd *, PTR, PTR));
+.
+. void (*_bfd_coff_swap_scnhdr_in)
+. PARAMS ((bfd *, PTR, PTR));
+.
+. void (*_bfd_coff_swap_reloc_in)
+. PARAMS ((bfd *abfd, PTR, PTR));
+.
+. boolean (*_bfd_coff_bad_format_hook)
+. PARAMS ((bfd *, PTR));
+.
+. boolean (*_bfd_coff_set_arch_mach_hook)
+. PARAMS ((bfd *, PTR));
+.
+. PTR (*_bfd_coff_mkobject_hook)
+. PARAMS ((bfd *, PTR, PTR));
+.
+. boolean (*_bfd_styp_to_sec_flags_hook)
+. PARAMS ((bfd *, PTR, const char *, asection *, flagword *));
+.
+. void (*_bfd_set_alignment_hook)
+. PARAMS ((bfd *, asection *, PTR));
+.
+. boolean (*_bfd_coff_slurp_symbol_table)
+. PARAMS ((bfd *));
+.
+. boolean (*_bfd_coff_symname_in_debug)
+. PARAMS ((bfd *, struct internal_syment *));
+.
+. boolean (*_bfd_coff_pointerize_aux_hook)
+. PARAMS ((bfd *, combined_entry_type *, combined_entry_type *,
+. unsigned int, combined_entry_type *));
+.
+. boolean (*_bfd_coff_print_aux)
+. PARAMS ((bfd *, FILE *, combined_entry_type *, combined_entry_type *,
+. combined_entry_type *, unsigned int));
+.
+. void (*_bfd_coff_reloc16_extra_cases)
+. PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *, arelent *,
+. bfd_byte *, unsigned int *, unsigned int *));
+.
+. int (*_bfd_coff_reloc16_estimate)
+. PARAMS ((bfd *, asection *, arelent *, unsigned int,
+. struct bfd_link_info *));
+.
+. enum coff_symbol_classification (*_bfd_coff_classify_symbol)
+. PARAMS ((bfd *, struct internal_syment *));
+.
+. boolean (*_bfd_coff_compute_section_file_positions)
+. PARAMS ((bfd *));
+.
+. boolean (*_bfd_coff_start_final_link)
+. PARAMS ((bfd *, struct bfd_link_info *));
.
-. boolean (*_bfd_coff_link_output_has_begun) PARAMS ((
-. bfd * abfd,
-. struct coff_final_link_info * pfinfo));
-. boolean (*_bfd_coff_final_link_postscript) PARAMS ((
-. bfd * abfd,
-. struct coff_final_link_info * pfinfo));
+. boolean (*_bfd_coff_relocate_section)
+. PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
+. struct internal_reloc *, struct internal_syment *, asection **));
+.
+. reloc_howto_type *(*_bfd_coff_rtype_to_howto)
+. PARAMS ((bfd *, asection *, struct internal_reloc *,
+. struct coff_link_hash_entry *, struct internal_syment *,
+. bfd_vma *));
+.
+. boolean (*_bfd_coff_adjust_symndx)\
+. PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *,
+. struct internal_reloc *, boolean *));
+.
+. boolean (*_bfd_coff_link_add_one_symbol)
+. PARAMS ((struct bfd_link_info *, bfd *, const char *, flagword,
+. asection *, bfd_vma, const char *, boolean, boolean,
+. struct bfd_link_hash_entry **));
+.
+. boolean (*_bfd_coff_link_output_has_begun)
+. PARAMS ((bfd *, struct coff_final_link_info *));
+.
+. boolean (*_bfd_coff_final_link_postscript)
+. PARAMS ((bfd *, struct coff_final_link_info *));
.
.} bfd_coff_backend_data;
.
-.#define coff_backend_info(abfd) ((bfd_coff_backend_data *) (abfd)->xvec->backend_data)
+.#define coff_backend_info(abfd) \
+. ((bfd_coff_backend_data *) (abfd)->xvec->backend_data)
.
.#define bfd_coff_swap_aux_in(a,e,t,c,ind,num,i) \
-. ((coff_backend_info (a)->_bfd_coff_swap_aux_in) (a,e,t,c,ind,num,i))
+. ((coff_backend_info (a)->_bfd_coff_swap_aux_in) (a,e,t,c,ind,num,i))
.
.#define bfd_coff_swap_sym_in(a,e,i) \
-. ((coff_backend_info (a)->_bfd_coff_swap_sym_in) (a,e,i))
+. ((coff_backend_info (a)->_bfd_coff_swap_sym_in) (a,e,i))
.
.#define bfd_coff_swap_lineno_in(a,e,i) \
-. ((coff_backend_info ( a)->_bfd_coff_swap_lineno_in) (a,e,i))
+. ((coff_backend_info ( a)->_bfd_coff_swap_lineno_in) (a,e,i))
.
.#define bfd_coff_swap_reloc_out(abfd, i, o) \
-. ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_out) (abfd, i, o))
+. ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_out) (abfd, i, o))
.
.#define bfd_coff_swap_lineno_out(abfd, i, o) \
-. ((coff_backend_info (abfd)->_bfd_coff_swap_lineno_out) (abfd, i, o))
+. ((coff_backend_info (abfd)->_bfd_coff_swap_lineno_out) (abfd, i, o))
.
.#define bfd_coff_swap_aux_out(a,i,t,c,ind,num,o) \
-. ((coff_backend_info (a)->_bfd_coff_swap_aux_out) (a,i,t,c,ind,num,o))
+. ((coff_backend_info (a)->_bfd_coff_swap_aux_out) (a,i,t,c,ind,num,o))
.
.#define bfd_coff_swap_sym_out(abfd, i,o) \
-. ((coff_backend_info (abfd)->_bfd_coff_swap_sym_out) (abfd, i, o))
+. ((coff_backend_info (abfd)->_bfd_coff_swap_sym_out) (abfd, i, o))
.
.#define bfd_coff_swap_scnhdr_out(abfd, i,o) \
-. ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_out) (abfd, i, o))
+. ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_out) (abfd, i, o))
.
.#define bfd_coff_swap_filehdr_out(abfd, i,o) \
-. ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_out) (abfd, i, o))
+. ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_out) (abfd, i, o))
.
.#define bfd_coff_swap_aouthdr_out(abfd, i,o) \
-. ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_out) (abfd, i, o))
+. ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_out) (abfd, i, o))
.
.#define bfd_coff_filhsz(abfd) (coff_backend_info (abfd)->_bfd_filhsz)
.#define bfd_coff_aoutsz(abfd) (coff_backend_info (abfd)->_bfd_aoutsz)
@@ -1360,90 +1299,91 @@ dependent COFF routines:
.#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_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)
+. (coff_backend_info (abfd)->_bfd_coff_long_section_names)
.#define bfd_coff_default_section_alignment_power(abfd) \
-. (coff_backend_info (abfd)->_bfd_coff_default_section_alignment_power)
+. (coff_backend_info (abfd)->_bfd_coff_default_section_alignment_power)
.#define bfd_coff_swap_filehdr_in(abfd, i,o) \
-. ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_in) (abfd, i, o))
+. ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_in) (abfd, i, o))
.
.#define bfd_coff_swap_aouthdr_in(abfd, i,o) \
-. ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_in) (abfd, i, o))
+. ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_in) (abfd, i, o))
.
.#define bfd_coff_swap_scnhdr_in(abfd, i,o) \
-. ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_in) (abfd, i, o))
+. ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_in) (abfd, i, o))
.
.#define bfd_coff_swap_reloc_in(abfd, i, o) \
-. ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_in) (abfd, i, o))
+. ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_in) (abfd, i, o))
.
.#define bfd_coff_bad_format_hook(abfd, filehdr) \
-. ((coff_backend_info (abfd)->_bfd_coff_bad_format_hook) (abfd, filehdr))
+. ((coff_backend_info (abfd)->_bfd_coff_bad_format_hook) (abfd, filehdr))
.
.#define bfd_coff_set_arch_mach_hook(abfd, filehdr)\
-. ((coff_backend_info (abfd)->_bfd_coff_set_arch_mach_hook) (abfd, filehdr))
+. ((coff_backend_info (abfd)->_bfd_coff_set_arch_mach_hook) (abfd, filehdr))
.#define bfd_coff_mkobject_hook(abfd, filehdr, aouthdr)\
-. ((coff_backend_info (abfd)->_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, section)\
-. ((coff_backend_info (abfd)->_bfd_styp_to_sec_flags_hook)\
-. (abfd, scnhdr, name, section))
+.#define bfd_coff_styp_to_sec_flags_hook(abfd, scnhdr, name, section, flags_ptr)\
+. ((coff_backend_info (abfd)->_bfd_styp_to_sec_flags_hook)\
+. (abfd, scnhdr, name, section, flags_ptr))
.
.#define bfd_coff_set_alignment_hook(abfd, sec, scnhdr)\
-. ((coff_backend_info (abfd)->_bfd_set_alignment_hook) (abfd, sec, scnhdr))
+. ((coff_backend_info (abfd)->_bfd_set_alignment_hook) (abfd, sec, scnhdr))
.
.#define bfd_coff_slurp_symbol_table(abfd)\
-. ((coff_backend_info (abfd)->_bfd_coff_slurp_symbol_table) (abfd))
+. ((coff_backend_info (abfd)->_bfd_coff_slurp_symbol_table) (abfd))
.
.#define bfd_coff_symname_in_debug(abfd, sym)\
-. ((coff_backend_info (abfd)->_bfd_coff_symname_in_debug) (abfd, sym))
+. ((coff_backend_info (abfd)->_bfd_coff_symname_in_debug) (abfd, sym))
.
.#define bfd_coff_force_symnames_in_strings(abfd)\
-. (coff_backend_info (abfd)->_bfd_coff_force_symnames_in_strings)
+. (coff_backend_info (abfd)->_bfd_coff_force_symnames_in_strings)
.
.#define bfd_coff_debug_string_prefix_length(abfd)\
-. (coff_backend_info (abfd)->_bfd_coff_debug_string_prefix_length)
+. (coff_backend_info (abfd)->_bfd_coff_debug_string_prefix_length)
.
.#define bfd_coff_print_aux(abfd, file, base, symbol, aux, indaux)\
-. ((coff_backend_info (abfd)->_bfd_coff_print_aux)\
-. (abfd, file, base, symbol, aux, indaux))
+. ((coff_backend_info (abfd)->_bfd_coff_print_aux)\
+. (abfd, file, base, symbol, aux, indaux))
.
.#define bfd_coff_reloc16_extra_cases(abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr)\
-. ((coff_backend_info (abfd)->_bfd_coff_reloc16_extra_cases)\
-. (abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr))
+. ((coff_backend_info (abfd)->_bfd_coff_reloc16_extra_cases)\
+. (abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr))
.
.#define bfd_coff_reloc16_estimate(abfd, section, reloc, shrink, link_info)\
-. ((coff_backend_info (abfd)->_bfd_coff_reloc16_estimate)\
-. (abfd, section, reloc, shrink, link_info))
+. ((coff_backend_info (abfd)->_bfd_coff_reloc16_estimate)\
+. (abfd, section, reloc, shrink, link_info))
.
.#define bfd_coff_classify_symbol(abfd, sym)\
-. ((coff_backend_info (abfd)->_bfd_coff_classify_symbol)\
-. (abfd, sym))
+. ((coff_backend_info (abfd)->_bfd_coff_classify_symbol)\
+. (abfd, sym))
.
.#define bfd_coff_compute_section_file_positions(abfd)\
-. ((coff_backend_info (abfd)->_bfd_coff_compute_section_file_positions)\
-. (abfd))
+. ((coff_backend_info (abfd)->_bfd_coff_compute_section_file_positions)\
+. (abfd))
.
.#define bfd_coff_start_final_link(obfd, info)\
-. ((coff_backend_info (obfd)->_bfd_coff_start_final_link)\
-. (obfd, info))
+. ((coff_backend_info (obfd)->_bfd_coff_start_final_link)\
+. (obfd, info))
.#define bfd_coff_relocate_section(obfd,info,ibfd,o,con,rel,isyms,secs)\
-. ((coff_backend_info (ibfd)->_bfd_coff_relocate_section)\
-. (obfd, info, ibfd, o, con, rel, isyms, secs))
+. ((coff_backend_info (ibfd)->_bfd_coff_relocate_section)\
+. (obfd, info, ibfd, o, con, rel, isyms, secs))
.#define bfd_coff_rtype_to_howto(abfd, sec, rel, h, sym, addendp)\
-. ((coff_backend_info (abfd)->_bfd_coff_rtype_to_howto)\
-. (abfd, sec, rel, h, sym, addendp))
+. ((coff_backend_info (abfd)->_bfd_coff_rtype_to_howto)\
+. (abfd, sec, rel, h, sym, addendp))
.#define bfd_coff_adjust_symndx(obfd, info, ibfd, sec, rel, adjustedp)\
-. ((coff_backend_info (abfd)->_bfd_coff_adjust_symndx)\
-. (obfd, info, ibfd, sec, rel, adjustedp))
+. ((coff_backend_info (abfd)->_bfd_coff_adjust_symndx)\
+. (obfd, info, ibfd, sec, rel, adjustedp))
.#define bfd_coff_link_add_one_symbol(info,abfd,name,flags,section,value,string,cp,coll,hashp)\
-. ((coff_backend_info (abfd)->_bfd_coff_link_add_one_symbol)\
-. (info, abfd, name, flags, section, value, string, cp, coll, hashp))
+. ((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,p) \
-. ((coff_backend_info (a)->_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))
+. ((coff_backend_info (a)->_bfd_coff_final_link_postscript) (a,p))
.
*/
@@ -1506,7 +1446,10 @@ coff_set_custom_section_alignment (abfd, section, alignment_table, table_size)
return;
if (alignment_table[i].default_alignment_max != COFF_ALIGNMENT_FIELD_EMPTY
- && default_alignment > alignment_table[i].default_alignment_max)
+#if COFF_DEFAULT_SECTION_ALIGNMENT_POWER != 0
+ && default_alignment > alignment_table[i].default_alignment_max
+#endif
+ )
return;
section->alignment_power = alignment_table[i].alignment_power;
@@ -1545,6 +1488,7 @@ coff_new_section_hook (abfd, section)
asection * section;
{
combined_entry_type *native;
+ bfd_size_type amt;
section->alignment_power = COFF_DEFAULT_SECTION_ALIGNMENT_POWER;
@@ -1562,8 +1506,8 @@ coff_new_section_hook (abfd, section)
@@ The 10 is a guess at a plausible maximum number of aux entries
(but shouldn't be a constant). */
- native = ((combined_entry_type *)
- bfd_zalloc (abfd, sizeof (combined_entry_type) * 10));
+ amt = sizeof (combined_entry_type) * 10;
+ native = (combined_entry_type *) bfd_zalloc (abfd, amt);
if (native == NULL)
return false;
@@ -1645,6 +1589,7 @@ coff_set_alignment_hook (abfd, section, scnhdr)
PTR scnhdr;
{
struct internal_scnhdr *hdr = (struct internal_scnhdr *) scnhdr;
+ bfd_size_type amt;
ALIGN_SET (hdr->s_flags, IMAGE_SCN_ALIGN_64BYTES, 6)
ELIFALIGN_SET (hdr->s_flags, IMAGE_SCN_ALIGN_32BYTES, 5)
@@ -1660,8 +1605,8 @@ coff_set_alignment_hook (abfd, section, scnhdr)
mapped onto a generic BFD section bit. */
if (coff_section_data (abfd, section) == NULL)
{
- section->used_by_bfd =
- (PTR) bfd_zalloc (abfd, sizeof (struct coff_section_tdata));
+ amt = sizeof (struct coff_section_tdata);
+ section->used_by_bfd = (PTR) bfd_zalloc (abfd, amt);
if (section->used_by_bfd == NULL)
{
/* FIXME: Return error. */
@@ -1670,8 +1615,8 @@ coff_set_alignment_hook (abfd, section, scnhdr)
}
if (pei_section_data (abfd, section) == NULL)
{
- coff_section_data (abfd, section)->tdata =
- (PTR) bfd_zalloc (abfd, sizeof (struct pei_section_tdata));
+ amt = sizeof (struct pei_section_tdata);
+ coff_section_data (abfd, section)->tdata = (PTR) bfd_zalloc (abfd, amt);
if (coff_section_data (abfd, section)->tdata == NULL)
{
/* FIXME: Return error. */
@@ -1688,16 +1633,15 @@ coff_set_alignment_hook (abfd, section, scnhdr)
{
struct external_reloc dst;
struct internal_reloc n;
- int oldpos = bfd_tell (abfd);
- bfd_seek (abfd, hdr->s_relptr, 0);
- if (bfd_read ((PTR) & dst, 1, bfd_coff_relsz (abfd), abfd)
+ file_ptr oldpos = bfd_tell (abfd);
+ bfd_seek (abfd, (file_ptr) hdr->s_relptr, 0);
+ if (bfd_bread ((PTR) &dst, (bfd_size_type) bfd_coff_relsz (abfd), abfd)
!= bfd_coff_relsz (abfd))
return;
coff_swap_reloc_in (abfd, &dst, &n);
bfd_seek (abfd, oldpos, 0);
- section->reloc_count =
- hdr->s_nreloc = n.r_vaddr;
+ section->reloc_count = hdr->s_nreloc = n.r_vaddr;
}
}
#undef ALIGN_SET
@@ -1725,7 +1669,7 @@ coff_set_alignment_hook (abfd, section, scnhdr)
if ((hdr->s_flags & STYP_OVRFLO) == 0)
return;
- real_sec = coff_section_from_bfd_index (abfd, hdr->s_nreloc);
+ real_sec = coff_section_from_bfd_index (abfd, (int) hdr->s_nreloc);
if (real_sec == NULL)
return;
@@ -1736,7 +1680,7 @@ coff_set_alignment_hook (abfd, section, scnhdr)
{
if (*ps == section)
{
- *ps = (*ps)->next;
+ bfd_section_list_remove (abfd, ps);
--abfd->section_count;
break;
}
@@ -1761,8 +1705,9 @@ coff_mkobject (abfd)
bfd * abfd;
{
coff_data_type *coff;
+ bfd_size_type amt = sizeof (coff_data_type);
- abfd->tdata.coff_obj_data = (struct coff_tdata *) bfd_zalloc (abfd, sizeof (coff_data_type));
+ abfd->tdata.coff_obj_data = (struct coff_tdata *) bfd_zalloc (abfd, amt);
if (abfd->tdata.coff_obj_data == 0)
return false;
coff = coff_data (abfd);
@@ -1870,7 +1815,7 @@ coff_set_arch_mach_hook (abfd, filehdr)
bfd *abfd;
PTR filehdr;
{
- long machine;
+ unsigned long machine;
enum bfd_architecture arch;
struct internal_filehdr *internal_f = (struct internal_filehdr *) filehdr;
@@ -2030,11 +1975,11 @@ coff_set_arch_mach_hook (abfd, filehdr)
{
bfd_byte *buf;
struct internal_syment sym;
+ bfd_size_type amt = bfd_coff_symesz (abfd);
- buf = (bfd_byte *) bfd_malloc (bfd_coff_symesz (abfd));
+ buf = (bfd_byte *) bfd_malloc (amt);
if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0
- || (bfd_read (buf, 1, bfd_coff_symesz (abfd), abfd)
- != bfd_coff_symesz (abfd)))
+ || bfd_bread (buf, amt, abfd) != amt)
{
free (buf);
return false;
@@ -2053,21 +1998,8 @@ coff_set_arch_mach_hook (abfd, filehdr)
{
default:
case 0:
-#ifdef POWERMAC
- /* PowerPC Macs use the same magic numbers as RS/6000
- (because that's how they were bootstrapped originally),
- but they are always PowerPC architecture. */
- arch = bfd_arch_powerpc;
- machine = bfd_mach_ppc;
-#else
-#ifdef XCOFF64
- arch = bfd_arch_powerpc;
- machine = bfd_mach_ppc_620;
-#else
- arch = bfd_arch_rs6000;
- machine = bfd_mach_rs6k;
-#endif
-#endif /* POWERMAC */
+ arch = bfd_xcoff_architecture (abfd);
+ machine = bfd_xcoff_machine (abfd);
break;
case 1:
@@ -2338,13 +2270,21 @@ coff_print_aux (abfd, file, table_base, symbol, aux, indaux)
if (SMTYP_SMTYP (aux->u.auxent.x_csect.x_smtyp) != XTY_LD)
{
BFD_ASSERT (! aux->fix_scnlen);
- fprintf (file, "val %5ld", aux->u.auxent.x_csect.x_scnlen.l);
+#ifdef XCOFF64
+ fprintf (file, "val %5lld", aux->u.auxent.x_csect.x_scnlen.l);
+#else
+ fprintf (file, "val %5ld", (long) aux->u.auxent.x_csect.x_scnlen.l);
+#endif
}
else
{
fprintf (file, "indx ");
if (! aux->fix_scnlen)
- fprintf (file, "%4ld", aux->u.auxent.x_csect.x_scnlen.l);
+#ifdef XCOFF64
+ fprintf (file, "%4lld", aux->u.auxent.x_csect.x_scnlen.l);
+#else
+ fprintf (file, "%4ld", (long) aux->u.auxent.x_csect.x_scnlen.l);
+#endif
else
fprintf (file, "%4ld",
(long) (aux->u.auxent.x_csect.x_scnlen.p - table_base));
@@ -2418,12 +2358,18 @@ coff_write_relocs (abfd, first_undef)
#ifndef TARG_AUX
p = s->orelocation;
#else
- /* sort relocations before we write them out */
- p = (arelent **) bfd_malloc (s->reloc_count * sizeof (arelent *));
- if (p == NULL && s->reloc_count > 0)
- return false;
- memcpy (p, s->orelocation, s->reloc_count * sizeof (arelent *));
- qsort (p, s->reloc_count, sizeof (arelent *), compare_arelent_ptr);
+ {
+ /* sort relocations before we write them out */
+ bfd_size_type amt;
+
+ amt = s->reloc_count;
+ amt *= sizeof (arelent *);
+ p = (arelent **) bfd_malloc (amt);
+ if (p == NULL && s->reloc_count > 0)
+ return false;
+ memcpy (p, s->orelocation, (size_t) amt);
+ qsort (p, s->reloc_count, sizeof (arelent *), compare_arelent_ptr);
+ }
#endif
if (bfd_seek (abfd, s->rel_filepos, SEEK_SET) != 0)
@@ -2438,8 +2384,8 @@ coff_write_relocs (abfd, first_undef)
/* add one to count *this* reloc (grr) */
n.r_vaddr = s->reloc_count + 1;
coff_swap_reloc_out (abfd, &n, &dst);
- if (bfd_write ((PTR) & dst, 1, bfd_coff_relsz (abfd), abfd)
- != bfd_coff_relsz (abfd))
+ if (bfd_bwrite ((PTR) & dst, (bfd_size_type) bfd_coff_relsz (abfd),
+ abfd) != bfd_coff_relsz (abfd))
return false;
}
#endif
@@ -2462,15 +2408,15 @@ coff_write_relocs (abfd, first_undef)
if (q->sym_ptr_ptr[0]->the_bfd != abfd)
{
- int i;
+ int j;
const char *sname = q->sym_ptr_ptr[0]->name;
asymbol **outsyms = abfd->outsymbols;
- for (i = first_undef; outsyms[i]; i++)
+ for (j = first_undef; outsyms[j]; j++)
{
- const char *intable = outsyms[i]->name;
+ const char *intable = outsyms[j]->name;
if (strcmp (intable, sname) == 0) {
/* got a hit, so repoint the reloc */
- q->sym_ptr_ptr = outsyms + i;
+ q->sym_ptr_ptr = outsyms + j;
break;
}
}
@@ -2517,8 +2463,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, bfd_coff_relsz (abfd), abfd)
- != bfd_coff_relsz (abfd))
+ if (bfd_bwrite ((PTR) & dst, (bfd_size_type) bfd_coff_relsz (abfd),
+ abfd) != bfd_coff_relsz (abfd))
return false;
}
@@ -2994,17 +2940,19 @@ coff_compute_section_file_positions (abfd)
right order in the image file itself, but we do need to get the
target_index values right. */
- int count;
+ unsigned int count;
asection **section_list;
- int i;
+ unsigned int i;
int target_index;
+ bfd_size_type amt;
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));
+ amt = sizeof (struct asection *) * (count + 1);
+ section_list = bfd_malloc (amt);
if (section_list == NULL)
return false;
@@ -3068,15 +3016,16 @@ coff_compute_section_file_positions (abfd)
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));
+ bfd_size_type amt = sizeof (struct coff_section_tdata);
+ current->used_by_bfd = (PTR) bfd_zalloc (abfd, amt);
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));
+ bfd_size_type amt = sizeof (struct pei_section_tdata);
+ coff_section_data (abfd, current)->tdata
+ = (PTR) bfd_zalloc (abfd, amt);
if (coff_section_data (abfd, current)->tdata == NULL)
return false;
}
@@ -3105,7 +3054,36 @@ coff_compute_section_file_positions (abfd)
padding the previous section up if necessary */
old_sofar = sofar;
- sofar = BFD_ALIGN (sofar, 1 << current->alignment_power);
+#ifdef RS6000COFF_C
+ /* AIX loader checks the text section alignment of (vma - filepos)
+ So even though the filepos may be aligned wrt the o_algntext, for
+ AIX executables, this check fails. This shows up when an native
+ AIX executable is stripped with gnu strip because the default vma
+ of native is 0x10000150 but default for gnu is 0x10000140. Gnu
+ stripped gnu excutable passes this check because the filepos is
+ 0x0140. */
+ if (!strcmp (current->name, _TEXT))
+ {
+ bfd_vma pad;
+ bfd_vma align;
+
+ sofar = BFD_ALIGN (sofar, 1 << current->alignment_power);
+
+ align = 1 << current->alignment_power;
+ pad = abs (current->vma - sofar) % align;
+
+ if (pad)
+ {
+ pad = align - pad;
+ sofar += pad;
+ }
+ }
+ else
+#else
+ {
+ sofar = BFD_ALIGN (sofar, 1 << current->alignment_power);
+ }
+#endif
if (previous != (asection *) NULL)
{
previous->_raw_size += sofar - old_sofar;
@@ -3181,7 +3159,7 @@ coff_compute_section_file_positions (abfd)
b = 0;
if (bfd_seek (abfd, sofar - 1, SEEK_SET) != 0
- || bfd_write (&b, 1, 1, abfd) != 1)
+ || bfd_bwrite (&b, (bfd_size_type) 1, abfd) != 1)
return false;
}
@@ -3214,11 +3192,12 @@ coff_add_missing_symbols (abfd)
asymbol **sympp2;
unsigned int i;
int need_text = 1, need_data = 1, need_bss = 1, need_file = 1;
+ bfd_size_type amt;
for (i = 0; i < nsyms; i++)
{
coff_symbol_type *csym = coff_symbol_from (abfd, sympp[i]);
- CONST char *name;
+ const char *name;
if (csym)
{
/* only do this if there is a coff representation of the input
@@ -3250,7 +3229,9 @@ coff_add_missing_symbols (abfd)
if (!need_text && !need_data && !need_bss && !need_file)
return true;
nsyms += need_text + need_data + need_bss + need_file;
- sympp2 = (asymbol **) bfd_alloc (abfd, nsyms * sizeof (asymbol *));
+ amt = nsyms;
+ amt *= sizeof (asymbol *);
+ sympp2 = (asymbol **) bfd_alloc (abfd, amt);
if (!sympp2)
return false;
memcpy (sympp2, sympp, i * sizeof (asymbol *));
@@ -3370,11 +3351,13 @@ coff_write_object_contents (abfd)
{
scn_base = bfd_coff_filhsz (abfd);
#ifdef RS6000COFF_C
+#ifndef XCOFF64
if (xcoff_data (abfd)->full_aouthdr)
scn_base += bfd_coff_aoutsz (abfd);
else
scn_base += SMALL_AOUTSZ;
#endif
+#endif
}
if (bfd_seek (abfd, scn_base, SEEK_SET) != 0)
@@ -3523,9 +3506,10 @@ coff_write_object_contents (abfd)
#endif
{
SCNHDR buff;
+ bfd_size_type amt = bfd_coff_scnhsz (abfd);
+
if (coff_swap_scnhdr_out (abfd, &section, &buff) == 0
- || bfd_write ((PTR) (&buff), 1, bfd_coff_scnhsz (abfd), abfd)
- != bfd_coff_scnhsz (abfd))
+ || bfd_bwrite ((PTR) &buff, amt, abfd) != amt)
return false;
}
@@ -3625,6 +3609,7 @@ coff_write_object_contents (abfd)
}
#ifdef RS6000COFF_C
+#ifndef XCOFF64
/* XCOFF handles overflows in the reloc and line number count fields
by creating a new section header to hold the correct values. */
for (current = abfd->sections; current != NULL; current = current->next)
@@ -3633,6 +3618,7 @@ coff_write_object_contents (abfd)
{
struct internal_scnhdr scnhdr;
SCNHDR buff;
+ bfd_size_type amt;
internal_f.f_nscns++;
strncpy (&(scnhdr.s_name[0]), current->name, 8);
@@ -3645,13 +3631,14 @@ coff_write_object_contents (abfd)
scnhdr.s_nreloc = current->target_index;
scnhdr.s_nlnno = current->target_index;
scnhdr.s_flags = STYP_OVRFLO;
+ amt = bfd_coff_scnhsz (abfd);
if (coff_swap_scnhdr_out (abfd, &scnhdr, &buff) == 0
- || bfd_write ((PTR) &buff, 1, bfd_coff_scnhsz (abfd), abfd)
- != bfd_coff_scnhsz (abfd))
+ || bfd_bwrite ((PTR) &buff, amt, abfd) != amt)
return false;
}
}
#endif
+#endif
/* OK, now set up the filehdr... */
@@ -3673,11 +3660,13 @@ coff_write_object_contents (abfd)
{
internal_f.f_opthdr = 0;
#ifdef RS6000COFF_C
+#ifndef XCOFF64
if (xcoff_data (abfd)->full_aouthdr)
internal_f.f_opthdr = bfd_coff_aoutsz (abfd);
else
internal_f.f_opthdr = SMALL_AOUTSZ;
#endif
+#endif
}
if (!hasrelocs)
@@ -3890,9 +3879,9 @@ coff_write_object_contents (abfd)
rounded up to the page size. */
b = 0;
if (bfd_seek (abfd,
- BFD_ALIGN (sym_base, COFF_PAGE_SIZE) - 1,
+ (file_ptr) BFD_ALIGN (sym_base, COFF_PAGE_SIZE) - 1,
SEEK_SET) != 0
- || bfd_write (&b, 1, 1, abfd) != 1)
+ || bfd_bwrite (&b, (bfd_size_type) 1, abfd) != 1)
return false;
}
#endif
@@ -4016,14 +4005,14 @@ coff_write_object_contents (abfd)
{
char * buff;
- bfd_size_type amount;
+ bfd_size_type amount = bfd_coff_filhsz (abfd);
- buff = bfd_malloc (bfd_coff_filhsz (abfd));
+ buff = bfd_malloc (amount);
if (buff == NULL)
return false;
- bfd_coff_swap_filehdr_out (abfd, (PTR) & internal_f, (PTR) buff);
- amount = bfd_write ((PTR) buff, 1, bfd_coff_filhsz (abfd), abfd);
+ bfd_coff_swap_filehdr_out (abfd, (PTR) &internal_f, (PTR) buff);
+ amount = bfd_bwrite ((PTR) buff, amount, abfd);
free (buff);
@@ -4036,14 +4025,14 @@ coff_write_object_contents (abfd)
/* Note that peicode.h fills in a PEAOUTHDR, not an AOUTHDR.
include/coff/pe.h sets AOUTSZ == sizeof (PEAOUTHDR)) */
char * buff;
- bfd_size_type amount;
+ bfd_size_type amount = bfd_coff_aoutsz (abfd);
- buff = bfd_malloc (bfd_coff_aoutsz (abfd));
+ buff = bfd_malloc (amount);
if (buff == NULL)
return false;
- coff_swap_aouthdr_out (abfd, (PTR) & internal_a, (PTR) buff);
- amount = bfd_write ((PTR) buff, 1, bfd_coff_aoutsz (abfd), abfd);
+ coff_swap_aouthdr_out (abfd, (PTR) &internal_a, (PTR) buff);
+ amount = bfd_bwrite ((PTR) buff, amount, abfd);
free (buff);
@@ -4062,7 +4051,7 @@ coff_write_object_contents (abfd)
size = bfd_coff_aoutsz (abfd);
else
size = SMALL_AOUTSZ;
- if (bfd_write ((PTR) &buff, 1, size, abfd) != size)
+ if (bfd_bwrite ((PTR) &buff, (bfd_size_type) size, abfd) != size)
return false;
}
#endif
@@ -4129,14 +4118,13 @@ coff_set_section_contents (abfd, section, location, offset, count)
if (section->filepos == 0)
return true;
- if (bfd_seek (abfd, (file_ptr) (section->filepos + offset), SEEK_SET) != 0)
+ if (bfd_seek (abfd, section->filepos + offset, SEEK_SET) != 0)
return false;
- if (count != 0)
- {
- return (bfd_write (location, 1, count, abfd) == count) ? true : false;
- }
- return true;
+ if (count == 0)
+ return true;
+
+ return bfd_bwrite (location, count, abfd) == count;
}
#if 0
static boolean
@@ -4166,17 +4154,16 @@ coff_close_and_cleanup (abfd)
#endif
static PTR
-buy_and_read (abfd, where, seek_direction, size)
+buy_and_read (abfd, where, size)
bfd *abfd;
file_ptr where;
- int seek_direction;
- size_t size;
+ bfd_size_type size;
{
PTR area = (PTR) bfd_alloc (abfd, size);
if (!area)
return (NULL);
- if (bfd_seek (abfd, where, seek_direction) != 0
- || bfd_read (area, 1, size, abfd) != size)
+ if (bfd_seek (abfd, where, SEEK_SET) != 0
+ || bfd_bread (area, size, abfd) != size)
return (NULL);
return (area);
} /* buy_and_read() */
@@ -4212,16 +4199,14 @@ coff_slurp_line_table (abfd, asect)
{
LINENO *native_lineno;
alent *lineno_cache;
+ bfd_size_type amt;
BFD_ASSERT (asect->lineno == (alent *) NULL);
- native_lineno = (LINENO *) buy_and_read (abfd,
- asect->line_filepos,
- SEEK_SET,
- (size_t) (bfd_coff_linesz (abfd) *
- asect->lineno_count));
- lineno_cache =
- (alent *) bfd_alloc (abfd, (size_t) ((asect->lineno_count + 1) * sizeof (alent)));
+ amt = (bfd_size_type) bfd_coff_linesz (abfd) * asect->lineno_count;
+ native_lineno = (LINENO *) buy_and_read (abfd, asect->line_filepos, amt);
+ amt = ((bfd_size_type) asect->lineno_count + 1) * sizeof (alent);
+ lineno_cache = (alent *) bfd_alloc (abfd, amt);
if (lineno_cache == NULL)
return false;
else
@@ -4239,17 +4224,17 @@ coff_slurp_line_table (abfd, asect)
if (cache_ptr->line_number == 0)
{
boolean warned;
- long symndx;
+ bfd_signed_vma symndx;
coff_symbol_type *sym;
warned = false;
symndx = dst.l_addr.l_symndx;
if (symndx < 0
- || (unsigned long) symndx >= obj_raw_syment_count (abfd))
+ || (bfd_vma) symndx >= obj_raw_syment_count (abfd))
{
(*_bfd_error_handler)
(_("%s: warning: illegal symbol index %ld in line numbers"),
- bfd_get_filename (abfd), dst.l_addr.l_symndx);
+ bfd_archive_filename (abfd), dst.l_addr.l_symndx);
symndx = 0;
warned = true;
}
@@ -4263,7 +4248,7 @@ coff_slurp_line_table (abfd, asect)
{
(*_bfd_error_handler)
(_("%s: warning: duplicate line number information for `%s'"),
- bfd_get_filename (abfd),
+ bfd_archive_filename (abfd),
bfd_asymbol_name (&sym->symbol));
}
sym->lineno = cache_ptr;
@@ -4297,6 +4282,7 @@ coff_slurp_symbol_table (abfd)
combined_entry_type *native_symbols;
coff_symbol_type *cached_area;
unsigned int *table_ptr;
+ bfd_size_type amt;
unsigned int number_of_symbols = 0;
@@ -4310,17 +4296,15 @@ coff_slurp_symbol_table (abfd)
} /* on error */
/* Allocate enough room for all the symbols in cached form */
- cached_area = ((coff_symbol_type *)
- bfd_alloc (abfd,
- (obj_raw_syment_count (abfd)
- * sizeof (coff_symbol_type))));
-
+ amt = obj_raw_syment_count (abfd);
+ amt *= sizeof (coff_symbol_type);
+ cached_area = (coff_symbol_type *) bfd_alloc (abfd, amt);
if (cached_area == NULL)
return false;
- table_ptr = ((unsigned int *)
- bfd_alloc (abfd,
- (obj_raw_syment_count (abfd)
- * sizeof (unsigned int))));
+
+ amt = obj_raw_syment_count (abfd);
+ amt *= sizeof (unsigned int);
+ table_ptr = (unsigned int *) bfd_alloc (abfd, amt);
if (table_ptr == NULL)
return false;
@@ -4623,7 +4607,7 @@ coff_slurp_symbol_table (abfd)
default:
(*_bfd_error_handler)
(_("%s: Unrecognized storage class %d for %s symbol `%s'"),
- bfd_get_filename (abfd), src->u.syment.n_sclass,
+ bfd_archive_filename (abfd), src->u.syment.n_sclass,
dst->symbol.section->name, dst->symbol.name);
dst->symbol.flags = BSF_DEBUGGING;
dst->symbol.value = (src->u.syment.n_value);
@@ -4754,7 +4738,7 @@ coff_classify_symbol (abfd, syment)
(*_bfd_error_handler)
(_("warning: %s: local symbol `%s' has no section"),
- bfd_get_filename (abfd),
+ bfd_archive_filename (abfd),
_bfd_coff_internal_syment_name (abfd, syment, buf));
}
@@ -4818,8 +4802,8 @@ coff_slurp_reloc_table (abfd, asect, symbols)
RELOC *native_relocs;
arelent *reloc_cache;
arelent *cache_ptr;
-
unsigned int idx;
+ bfd_size_type amt;
if (asect->relocation)
return true;
@@ -4829,14 +4813,10 @@ coff_slurp_reloc_table (abfd, asect, symbols)
return true;
if (!coff_slurp_symbol_table (abfd))
return false;
- native_relocs =
- (RELOC *) buy_and_read (abfd,
- asect->rel_filepos,
- SEEK_SET,
- (size_t) (bfd_coff_relsz (abfd) *
- asect->reloc_count));
- reloc_cache = (arelent *)
- bfd_alloc (abfd, (size_t) (asect->reloc_count * sizeof (arelent)));
+ amt = (bfd_size_type) bfd_coff_relsz (abfd) * asect->reloc_count;
+ native_relocs = (RELOC *) buy_and_read (abfd, asect->rel_filepos, amt);
+ amt = (bfd_size_type) asect->reloc_count * sizeof (arelent);
+ reloc_cache = (arelent *) bfd_alloc (abfd, amt);
if (reloc_cache == NULL)
return false;
@@ -4865,7 +4845,7 @@ coff_slurp_reloc_table (abfd, asect, symbols)
{
(*_bfd_error_handler)
(_("%s: warning: illegal symbol index %ld in relocs"),
- bfd_get_filename (abfd), dst.r_symndx);
+ bfd_archive_filename (abfd), dst.r_symndx);
cache_ptr->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr;
ptr = NULL;
}
@@ -4903,7 +4883,7 @@ coff_slurp_reloc_table (abfd, asect, symbols)
{
(*_bfd_error_handler)
(_("%s: illegal relocation type %d at address 0x%lx"),
- bfd_get_filename (abfd), dst.r_type, (long) dst.r_vaddr);
+ bfd_archive_filename (abfd), dst.r_type, (long) dst.r_vaddr);
bfd_set_error (bfd_error_bad_value);
return false;
}
@@ -5258,6 +5238,10 @@ static const bfd_coff_backend_data bfd_coff_std_swap_table =
#define coff_bfd_gc_sections bfd_generic_gc_sections
#endif
+#ifndef coff_bfd_merge_sections
+#define coff_bfd_merge_sections bfd_generic_merge_sections
+#endif
+
#define CREATE_BIG_COFF_TARGET_VEC(VAR, NAME, EXTRA_O_FLAGS, EXTRA_S_FLAGS, UNDER, ALTERNATIVE) \
const bfd_target VAR = \
{ \
diff --git a/contrib/binutils/bfd/coffgen.c b/contrib/binutils/bfd/coffgen.c
index 82bfdc8..88591f1 100644
--- a/contrib/binutils/bfd/coffgen.c
+++ b/contrib/binutils/bfd/coffgen.c
@@ -47,13 +47,13 @@ static void coff_fix_symbol_name
PARAMS ((bfd *, asymbol *, combined_entry_type *, bfd_size_type *,
asection **, bfd_size_type *));
static boolean coff_write_symbol
- PARAMS ((bfd *, asymbol *, combined_entry_type *, unsigned int *,
+ PARAMS ((bfd *, asymbol *, combined_entry_type *, bfd_vma *,
bfd_size_type *, asection **, bfd_size_type *));
static boolean coff_write_alien_symbol
- PARAMS ((bfd *, asymbol *, unsigned int *, bfd_size_type *,
+ PARAMS ((bfd *, asymbol *, bfd_vma *, bfd_size_type *,
asection **, bfd_size_type *));
static boolean coff_write_native_symbol
- PARAMS ((bfd *, coff_symbol_type *, unsigned int *, bfd_size_type *,
+ PARAMS ((bfd *, coff_symbol_type *, bfd_vma *, bfd_size_type *,
asection **, bfd_size_type *));
static void coff_pointerize_aux
PARAMS ((bfd *, combined_entry_type *, combined_entry_type *,
@@ -68,7 +68,7 @@ static void fixup_symbol_value
static char *build_debug_section
PARAMS ((bfd *));
static char *copy_name
- PARAMS ((bfd *, char *, int));
+ PARAMS ((bfd *, char *, size_t));
#define STRING_SIZE_SIZE (4)
@@ -82,6 +82,8 @@ make_a_section_from_file (abfd, hdr, target_index)
{
asection *return_section;
char *name;
+ boolean result = true;
+ flagword flags;
name = NULL;
@@ -106,7 +108,7 @@ make_a_section_from_file (abfd, hdr, target_index)
strindex does not run us past the end, but right now we
don't know the length of the string table. */
strings += strindex;
- name = bfd_alloc (abfd, strlen (strings) + 1);
+ name = bfd_alloc (abfd, (bfd_size_type) strlen (strings) + 1);
if (name == NULL)
return false;
strcpy (name, strings);
@@ -116,7 +118,7 @@ make_a_section_from_file (abfd, hdr, target_index)
if (name == NULL)
{
/* Assorted wastage to null-terminate the name, thanks AT&T! */
- name = bfd_alloc (abfd, sizeof (hdr->s_name) + 1);
+ name = bfd_alloc (abfd, (bfd_size_type) sizeof (hdr->s_name) + 1);
if (name == NULL)
return false;
strncpy (name, (char *) &hdr->s_name[0], sizeof (hdr->s_name));
@@ -142,8 +144,12 @@ make_a_section_from_file (abfd, hdr, target_index)
return_section->userdata = NULL;
return_section->next = (asection *) NULL;
return_section->target_index = target_index;
- return_section->flags = bfd_coff_styp_to_sec_flags_hook (abfd, hdr, name,
- return_section);
+
+ if (! bfd_coff_styp_to_sec_flags_hook (abfd, hdr, name, return_section,
+ & flags))
+ result = false;
+
+ return_section->flags = flags;
/* At least on i386-coff, the line number count for a shared library
section must be ignored. */
@@ -155,7 +161,8 @@ make_a_section_from_file (abfd, hdr, target_index)
/* FIXME: should this check 'hdr->s_size > 0' */
if (hdr->s_scnptr != 0)
return_section->flags |= SEC_HAS_CONTENTS;
- return true;
+
+ return result;
}
/* Read in a COFF object and make it into a BFD. This is used by
@@ -171,7 +178,7 @@ coff_real_object_p (abfd, nscns, internal_f, internal_a)
flagword oflags = abfd->flags;
bfd_vma ostart = bfd_get_start_address (abfd);
PTR tdata;
- size_t readsize; /* length of file_info */
+ bfd_size_type readsize; /* length of file_info */
unsigned int scnhsz;
char *external_sections;
@@ -204,12 +211,12 @@ coff_real_object_p (abfd, nscns, internal_f, internal_a)
return 0;
scnhsz = bfd_coff_scnhsz (abfd);
- readsize = nscns * scnhsz;
+ readsize = (bfd_size_type) nscns * scnhsz;
external_sections = (char *) bfd_alloc (abfd, readsize);
if (!external_sections)
goto fail;
- if (bfd_read ((PTR) external_sections, 1, readsize, abfd) != readsize)
+ if (bfd_bread ((PTR) external_sections, readsize, abfd) != readsize)
goto fail;
/* Set the arch/mach *before* swapping in sections; section header swapping
@@ -250,9 +257,9 @@ const bfd_target *
coff_object_p (abfd)
bfd *abfd;
{
- unsigned int filhsz;
- unsigned int aoutsz;
- int nscns;
+ bfd_size_type filhsz;
+ bfd_size_type aoutsz;
+ unsigned int nscns;
PTR filehdr;
struct internal_filehdr internal_f;
struct internal_aouthdr internal_a;
@@ -264,7 +271,7 @@ coff_object_p (abfd)
filehdr = bfd_alloc (abfd, filhsz);
if (filehdr == NULL)
return 0;
- if (bfd_read (filehdr, 1, filhsz, abfd) != filhsz)
+ if (bfd_bread (filehdr, filhsz, abfd) != filhsz)
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
@@ -273,7 +280,16 @@ coff_object_p (abfd)
bfd_coff_swap_filehdr_in (abfd, filehdr, &internal_f);
bfd_release (abfd, filehdr);
- if (bfd_coff_bad_format_hook (abfd, &internal_f) == false)
+ /* The XCOFF format has two sizes for the f_opthdr. SMALL_AOUTSZ
+ (less than aoutsz) used in object files and AOUTSZ (equal to
+ aoutsz) in executables. The bfd_coff_swap_aouthdr_in function
+ expects this header to be aoutsz bytes in length, so we use that
+ value in the call to bfd_alloc below. But we must be careful to
+ only read in f_opthdr bytes in the call to bfd_bread. We should
+ also attempt to catch corrupt or non-COFF binaries with a strange
+ value for f_opthdr. */
+ if (bfd_coff_bad_format_hook (abfd, &internal_f) == false
+ || internal_f.f_opthdr > aoutsz)
{
bfd_set_error (bfd_error_wrong_format);
return 0;
@@ -286,8 +302,8 @@ coff_object_p (abfd)
opthdr = bfd_alloc (abfd, aoutsz);
if (opthdr == NULL)
- return 0;;
- if (bfd_read (opthdr, 1, internal_f.f_opthdr, abfd)
+ return 0;
+ if (bfd_bread (opthdr, (bfd_size_type) internal_f.f_opthdr, abfd)
!= internal_f.f_opthdr)
{
return 0;
@@ -424,6 +440,7 @@ _bfd_coff_read_internal_relocs (abfd, sec, cache, external_relocs,
bfd_byte *erel;
bfd_byte *erel_end;
struct internal_reloc *irel;
+ bfd_size_type amt;
if (coff_section_data (abfd, sec) != NULL
&& coff_section_data (abfd, sec)->relocs != NULL)
@@ -437,24 +454,24 @@ _bfd_coff_read_internal_relocs (abfd, sec, cache, external_relocs,
relsz = bfd_coff_relsz (abfd);
+ amt = sec->reloc_count * relsz;
if (external_relocs == NULL)
{
- free_external = (bfd_byte *) bfd_malloc (sec->reloc_count * relsz);
+ free_external = (bfd_byte *) bfd_malloc (amt);
if (free_external == NULL && sec->reloc_count > 0)
goto error_return;
external_relocs = free_external;
}
if (bfd_seek (abfd, sec->rel_filepos, SEEK_SET) != 0
- || (bfd_read (external_relocs, relsz, sec->reloc_count, abfd)
- != relsz * sec->reloc_count))
+ || bfd_bread (external_relocs, amt, abfd) != amt)
goto error_return;
if (internal_relocs == NULL)
{
- free_internal = ((struct internal_reloc *)
- bfd_malloc (sec->reloc_count
- * sizeof (struct internal_reloc)));
+ amt = sec->reloc_count;
+ amt *= sizeof (struct internal_reloc);
+ free_internal = (struct internal_reloc *) bfd_malloc (amt);
if (free_internal == NULL && sec->reloc_count > 0)
goto error_return;
internal_relocs = free_internal;
@@ -477,9 +494,8 @@ _bfd_coff_read_internal_relocs (abfd, sec, cache, external_relocs,
{
if (coff_section_data (abfd, sec) == NULL)
{
- sec->used_by_bfd =
- (PTR) bfd_zalloc (abfd,
- sizeof (struct coff_section_tdata));
+ amt = sizeof (struct coff_section_tdata);
+ sec->used_by_bfd = (PTR) bfd_zalloc (abfd, amt);
if (sec->used_by_bfd == NULL)
goto error_return;
coff_section_data (abfd, sec)->contents = NULL;
@@ -539,15 +555,18 @@ coff_count_linenumbers (abfd)
section's linenumber count. */
alent *l = q->lineno;
- ++q->symbol.section->output_section->lineno_count;
- ++total;
- ++l;
- while (l->line_number != 0)
+ do
{
+ asection * sec = q->symbol.section->output_section;
+
+ /* Do not try to update fields in read-only sections. */
+ if (! bfd_is_const_section (sec))
+ sec->lineno_count ++;
+
++total;
- ++q->symbol.section->output_section->lineno_count;
++l;
}
+ while (l->line_number != 0);
}
}
}
@@ -654,9 +673,10 @@ coff_renumber_symbols (bfd_ptr, first_undef)
{
asymbol **newsyms;
unsigned int i;
+ bfd_size_type amt;
- newsyms = (asymbol **) bfd_alloc (bfd_ptr,
- sizeof (asymbol *) * (symbol_count + 1));
+ amt = sizeof (asymbol *) * ((bfd_size_type) symbol_count + 1);
+ newsyms = (asymbol **) bfd_alloc (bfd_ptr, amt);
if (!newsyms)
return false;
bfd_ptr->outsymbols = newsyms;
@@ -750,7 +770,8 @@ coff_mangle_symbols (bfd_ptr)
{
/* FIXME: We should use a union here. */
s->u.syment.n_value =
- ((combined_entry_type *) s->u.syment.n_value)->offset;
+ (bfd_vma)((combined_entry_type *)
+ ((unsigned long) s->u.syment.n_value))->offset;
s->fix_value = 0;
}
if (s->fix_line)
@@ -868,7 +889,7 @@ coff_fix_symbol_name (abfd, symbol, native, string_size_p,
}
else
{
- long filepos;
+ file_ptr filepos;
bfd_byte buf[4];
int prefix_len = bfd_coff_debug_string_prefix_length (abfd);
@@ -881,9 +902,9 @@ coff_fix_symbol_name (abfd, symbol, native, string_size_p,
*debug_string_section_p = bfd_get_section_by_name (abfd, ".debug");
filepos = bfd_tell (abfd);
if (prefix_len == 4)
- bfd_put_32 (abfd, name_length + 1, buf);
+ bfd_put_32 (abfd, (bfd_vma) (name_length + 1), buf);
else
- bfd_put_16 (abfd, name_length + 1, buf);
+ bfd_put_16 (abfd, (bfd_vma) (name_length + 1), buf);
if (!bfd_set_section_contents (abfd,
*debug_string_section_p,
@@ -893,8 +914,8 @@ coff_fix_symbol_name (abfd, symbol, native, string_size_p,
|| !bfd_set_section_contents (abfd,
*debug_string_section_p,
(PTR) symbol->name,
- ((file_ptr) *debug_string_size_p
- + prefix_len),
+ (file_ptr) (*debug_string_size_p
+ + prefix_len),
(bfd_size_type) name_length + 1))
abort ();
if (bfd_seek (abfd, filepos, SEEK_SET) != 0)
@@ -921,7 +942,7 @@ coff_write_symbol (abfd, symbol, native, written, string_size_p,
bfd *abfd;
asymbol *symbol;
combined_entry_type *native;
- unsigned int *written;
+ bfd_vma *written;
bfd_size_type *string_size_p;
asection **debug_string_section_p;
bfd_size_type *debug_string_size_p;
@@ -962,7 +983,7 @@ coff_write_symbol (abfd, symbol, native, written, string_size_p,
if (!buf)
return false;
bfd_coff_swap_sym_out (abfd, &native->u.syment, buf);
- if (bfd_write (buf, 1, symesz, abfd) != symesz)
+ if (bfd_bwrite (buf, symesz, abfd) != symesz)
return false;
bfd_release (abfd, buf);
@@ -981,10 +1002,10 @@ coff_write_symbol (abfd, symbol, native, written, string_size_p,
&((native + j + 1)->u.auxent),
type,
class,
- j,
+ (int) j,
native->u.syment.n_numaux,
buf);
- if (bfd_write (buf, 1, auxesz, abfd) != auxesz)
+ if (bfd_bwrite (buf, auxesz, abfd) != auxesz)
return false;
}
bfd_release (abfd, buf);
@@ -1006,7 +1027,7 @@ coff_write_alien_symbol (abfd, symbol, written, string_size_p,
debug_string_section_p, debug_string_size_p)
bfd *abfd;
asymbol *symbol;
- unsigned int *written;
+ bfd_vma *written;
bfd_size_type *string_size_p;
asection **debug_string_section_p;
bfd_size_type *debug_string_size_p;
@@ -1045,7 +1066,7 @@ coff_write_alien_symbol (abfd, symbol, written, string_size_p,
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.
+ /* Copy the any flags from the file header into the symbol.
FIXME: Why? */
{
coff_symbol_type *c = coff_symbol_from (abfd, symbol);
@@ -1074,7 +1095,7 @@ coff_write_native_symbol (abfd, symbol, written, string_size_p,
debug_string_section_p, debug_string_size_p)
bfd *abfd;
coff_symbol_type *symbol;
- unsigned int *written;
+ bfd_vma *written;
bfd_size_type *string_size_p;
asection **debug_string_section_p;
bfd_size_type *debug_string_size_p;
@@ -1127,8 +1148,9 @@ coff_write_native_symbol (abfd, symbol, written, string_size_p,
}
symbol->done_lineno = true;
- symbol->symbol.section->output_section->moving_line_filepos +=
- count * bfd_coff_linesz (abfd);
+ if (! bfd_is_const_section (symbol->symbol.section->output_section))
+ symbol->symbol.section->output_section->moving_line_filepos +=
+ count * bfd_coff_linesz (abfd);
}
return coff_write_symbol (abfd, &(symbol->symbol), native, written,
@@ -1147,7 +1169,7 @@ coff_write_symbols (abfd)
bfd_size_type debug_string_size;
unsigned int i;
unsigned int limit = bfd_get_symcount (abfd);
- unsigned int written = 0;
+ bfd_signed_vma written = 0;
asymbol **p;
string_size = 0;
@@ -1211,11 +1233,12 @@ coff_write_symbols (abfd)
bfd_byte buffer[STRING_SIZE_SIZE];
#if STRING_SIZE_SIZE == 4
- bfd_h_put_32 (abfd, size, buffer);
+ H_PUT_32 (abfd, size, buffer);
#else
- #error Change bfd_h_put_32
+ #error Change H_PUT_32
#endif
- if (bfd_write ((PTR) buffer, 1, sizeof (buffer), abfd) != sizeof (buffer))
+ if (bfd_bwrite ((PTR) buffer, (bfd_size_type) sizeof (buffer), abfd)
+ != sizeof (buffer))
return false;
/* Handle long section names. This code must handle section
@@ -1231,7 +1254,8 @@ coff_write_symbols (abfd)
len = strlen (o->name);
if (len > SCNNMLEN)
{
- if (bfd_write (o->name, 1, len + 1, abfd) != len + 1)
+ if (bfd_bwrite (o->name, (bfd_size_type) (len + 1), abfd)
+ != len + 1)
return false;
}
}
@@ -1271,7 +1295,10 @@ coff_write_symbols (abfd)
&& c_symbol->native->u.syment.n_numaux > 0)
{
if (bfd_coff_force_symnames_in_strings (abfd))
- bfd_write (".file", 1, 6, abfd);
+ {
+ if (bfd_bwrite (".file", (bfd_size_type) 6, abfd) != 6)
+ return false;
+ }
maxlen = bfd_coff_filnmlen (abfd);
}
else
@@ -1279,8 +1306,8 @@ coff_write_symbols (abfd)
if (name_length > maxlen)
{
- if (bfd_write ((PTR) (q->name), 1, name_length + 1, abfd)
- != name_length + 1)
+ if (bfd_bwrite ((PTR) (q->name), (bfd_size_type) name_length + 1,
+ abfd) != name_length + 1)
return false;
}
}
@@ -1294,11 +1321,11 @@ coff_write_symbols (abfd)
bfd_byte buffer[STRING_SIZE_SIZE];
#if STRING_SIZE_SIZE == 4
- bfd_h_put_32 (abfd, size, buffer);
+ H_PUT_32 (abfd, size, buffer);
#else
- #error Change bfd_h_put_32
+ #error Change H_PUT_32
#endif
- if (bfd_write ((PTR) buffer, 1, STRING_SIZE_SIZE, abfd)
+ if (bfd_bwrite ((PTR) buffer, (bfd_size_type) STRING_SIZE_SIZE, abfd)
!= STRING_SIZE_SIZE)
return false;
}
@@ -1353,7 +1380,8 @@ coff_write_linenumbers (abfd)
out.l_lnno = 0;
out.l_addr.l_symndx = l->u.offset;
bfd_coff_swap_lineno_out (abfd, &out, buff);
- if (bfd_write (buff, 1, linesz, abfd) != linesz)
+ if (bfd_bwrite (buff, (bfd_size_type) linesz, abfd)
+ != linesz)
return false;
l++;
while (l->line_number)
@@ -1361,7 +1389,8 @@ coff_write_linenumbers (abfd)
out.l_lnno = l->line_number;
out.l_addr.l_symndx = l->u.offset;
bfd_coff_swap_lineno_out (abfd, &out, buff);
- if (bfd_write (buff, 1, linesz, abfd) != linesz)
+ if (bfd_bwrite (buff, (bfd_size_type) linesz, abfd)
+ != linesz)
return false;
l++;
}
@@ -1409,7 +1438,7 @@ coff_section_symbol (abfd, name)
combined_entry_type e[10];
};
struct foo *f;
- f = (struct foo *) bfd_alloc (abfd, sizeof (*f));
+ f = (struct foo *) bfd_alloc (abfd, (bfd_size_type) sizeof (*f));
if (!f)
{
bfd_set_error (bfd_error_no_error);
@@ -1492,7 +1521,8 @@ build_debug_section (abfd)
bfd *abfd;
{
char *debug_section;
- long position;
+ file_ptr position;
+ bfd_size_type sec_size;
asection *sect = bfd_get_section_by_name (abfd, ".debug");
@@ -1502,8 +1532,8 @@ build_debug_section (abfd)
return NULL;
}
- debug_section = (PTR) bfd_alloc (abfd,
- bfd_get_section_size_before_reloc (sect));
+ sec_size = bfd_get_section_size_before_reloc (sect);
+ debug_section = (PTR) bfd_alloc (abfd, sec_size);
if (debug_section == NULL)
return NULL;
@@ -1513,9 +1543,7 @@ build_debug_section (abfd)
position = bfd_tell (abfd);
if (bfd_seek (abfd, sect->filepos, SEEK_SET) != 0
- || (bfd_read (debug_section,
- bfd_get_section_size_before_reloc (sect), 1, abfd)
- != bfd_get_section_size_before_reloc (sect))
+ || bfd_bread (debug_section, sec_size, abfd) != sec_size
|| bfd_seek (abfd, position, SEEK_SET) != 0)
return NULL;
return debug_section;
@@ -1528,9 +1556,9 @@ static char *
copy_name (abfd, name, maxlen)
bfd *abfd;
char *name;
- int maxlen;
+ size_t maxlen;
{
- int len;
+ size_t len;
char *newname;
for (len = 0; len < maxlen; ++len)
@@ -1541,7 +1569,7 @@ copy_name (abfd, name, maxlen)
}
}
- if ((newname = (PTR) bfd_alloc (abfd, len + 1)) == NULL)
+ if ((newname = (PTR) bfd_alloc (abfd, (bfd_size_type) len + 1)) == NULL)
return (NULL);
strncpy (newname, name, len);
newname[len] = '\0';
@@ -1555,7 +1583,7 @@ _bfd_coff_get_external_symbols (abfd)
bfd *abfd;
{
bfd_size_type symesz;
- size_t size;
+ bfd_size_type size;
PTR syms;
if (obj_coff_external_syms (abfd) != NULL)
@@ -1570,7 +1598,7 @@ _bfd_coff_get_external_symbols (abfd)
return false;
if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0
- || bfd_read (syms, size, 1, abfd) != size)
+ || bfd_bread (syms, size, abfd) != size)
{
if (syms != NULL)
free (syms);
@@ -1591,8 +1619,9 @@ _bfd_coff_read_string_table (abfd)
bfd *abfd;
{
char extstrsize[STRING_SIZE_SIZE];
- size_t strsize;
+ bfd_size_type strsize;
char *strings;
+ file_ptr pos;
if (obj_coff_strings (abfd) != NULL)
return obj_coff_strings (abfd);
@@ -1603,13 +1632,13 @@ _bfd_coff_read_string_table (abfd)
return NULL;
}
- if (bfd_seek (abfd,
- (obj_sym_filepos (abfd)
- + obj_raw_syment_count (abfd) * bfd_coff_symesz (abfd)),
- SEEK_SET) != 0)
+ pos = obj_sym_filepos (abfd);
+ pos += obj_raw_syment_count (abfd) * bfd_coff_symesz (abfd);
+ if (bfd_seek (abfd, pos, SEEK_SET) != 0)
return NULL;
- if (bfd_read (extstrsize, sizeof extstrsize, 1, abfd) != sizeof extstrsize)
+ if (bfd_bread (extstrsize, (bfd_size_type) sizeof extstrsize, abfd)
+ != sizeof extstrsize)
{
if (bfd_get_error () != bfd_error_file_truncated)
return NULL;
@@ -1620,16 +1649,16 @@ _bfd_coff_read_string_table (abfd)
else
{
#if STRING_SIZE_SIZE == 4
- strsize = bfd_h_get_32 (abfd, (bfd_byte *) extstrsize);
+ strsize = H_GET_32 (abfd, extstrsize);
#else
- #error Change bfd_h_get_32
+ #error Change H_GET_32
#endif
}
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_archive_filename (abfd),
(unsigned long) strsize);
bfd_set_error (bfd_error_bad_value);
return NULL;
@@ -1639,8 +1668,7 @@ _bfd_coff_read_string_table (abfd)
if (strings == NULL)
return NULL;
- if (bfd_read (strings + STRING_SIZE_SIZE,
- strsize - STRING_SIZE_SIZE, 1, abfd)
+ if (bfd_bread (strings + STRING_SIZE_SIZE, strsize - STRING_SIZE_SIZE, abfd)
!= strsize - STRING_SIZE_SIZE)
{
free (strings);
@@ -1686,12 +1714,12 @@ coff_get_normalized_symtab (abfd)
combined_entry_type *internal_ptr;
combined_entry_type *symbol_ptr;
combined_entry_type *internal_end;
- bfd_size_type symesz;
+ size_t symesz;
char *raw_src;
char *raw_end;
const char *string_table = NULL;
char *debug_section = NULL;
- unsigned long size;
+ bfd_size_type size;
if (obj_raw_syments (abfd) != NULL)
return obj_raw_syments (abfd);
@@ -1734,7 +1762,7 @@ coff_get_normalized_symtab (abfd)
bfd_coff_swap_aux_in (abfd, (PTR) raw_src,
symbol_ptr->u.syment.n_type,
symbol_ptr->u.syment.n_sclass,
- i, symbol_ptr->u.syment.n_numaux,
+ (int) i, symbol_ptr->u.syment.n_numaux,
&(internal_ptr->u.auxent));
coff_pointerize_aux (abfd, internal, symbol_ptr, i,
internal_ptr);
@@ -1789,7 +1817,7 @@ coff_get_normalized_symtab (abfd)
((long)
copy_name (abfd,
(internal_ptr + 1)->u.auxent.x_file.x_fname,
- bfd_coff_filnmlen (abfd)));
+ (size_t) bfd_coff_filnmlen (abfd)));
}
}
}
@@ -1798,23 +1826,20 @@ coff_get_normalized_symtab (abfd)
if (internal_ptr->u.syment._n._n_n._n_zeroes != 0)
{
/* This is a "short" name. Make it long. */
- unsigned long i = 0;
- char *newstring = NULL;
+ size_t i;
+ char *newstring;
/* find the length of this string without walking into memory
that isn't ours. */
for (i = 0; i < 8; ++i)
- {
- if (internal_ptr->u.syment._n._n_name[i] == '\0')
- {
- break;
- } /* if end of string */
- } /* possible lengths of this string. */
+ if (internal_ptr->u.syment._n._n_name[i] == '\0')
+ break;
- if ((newstring = (PTR) bfd_alloc (abfd, ++i)) == NULL)
+ newstring = (PTR) bfd_alloc (abfd, (bfd_size_type) (i + 1));
+ if (newstring == NULL)
return (NULL);
- memset (newstring, 0, i);
- strncpy (newstring, internal_ptr->u.syment._n._n_name, i - 1);
+ memset (newstring, 0, i + 1);
+ strncpy (newstring, internal_ptr->u.syment._n._n_name, i);
internal_ptr->u.syment._n._n_n._n_offset = (long int) newstring;
internal_ptr->u.syment._n._n_n._n_zeroes = 0;
}
@@ -1871,7 +1896,8 @@ asymbol *
coff_make_empty_symbol (abfd)
bfd *abfd;
{
- coff_symbol_type *new = (coff_symbol_type *) bfd_alloc (abfd, sizeof (coff_symbol_type));
+ bfd_size_type amt = sizeof (coff_symbol_type);
+ coff_symbol_type *new = (coff_symbol_type *) bfd_alloc (abfd, amt);
if (new == NULL)
return (NULL);
memset (new, 0, sizeof *new);
@@ -1891,12 +1917,14 @@ coff_bfd_make_debug_symbol (abfd, ptr, sz)
PTR ptr ATTRIBUTE_UNUSED;
unsigned long sz ATTRIBUTE_UNUSED;
{
- coff_symbol_type *new = (coff_symbol_type *) bfd_alloc (abfd, sizeof (coff_symbol_type));
+ bfd_size_type amt = sizeof (coff_symbol_type);
+ coff_symbol_type *new = (coff_symbol_type *) bfd_alloc (abfd, amt);
if (new == NULL)
return (NULL);
/* @@ The 10 is a guess at a plausible maximum number of aux entries
(but shouldn't be a constant). */
- new->native = (combined_entry_type *) bfd_zalloc (abfd, sizeof (combined_entry_type) * 10);
+ amt = sizeof (combined_entry_type) * 10;
+ new->native = (combined_entry_type *) bfd_zalloc (abfd, amt);
if (!new->native)
return (NULL);
new->symbol.section = bfd_abs_section_ptr;
@@ -1917,11 +1945,8 @@ coff_get_symbol_info (abfd, symbol, ret)
if (coffsymbol (symbol)->native != NULL
&& coffsymbol (symbol)->native->fix_value)
{
- combined_entry_type *psym;
-
- psym = ((combined_entry_type *)
- coffsymbol (symbol)->native->u.syment.n_value);
- ret->value = (bfd_vma) (psym - obj_raw_syments (abfd));
+ ret->value = coffsymbol (symbol)->native->u.syment.n_value -
+ (unsigned long) obj_raw_syments (abfd);
}
}
@@ -1945,8 +1970,8 @@ bfd_coff_get_syment (abfd, symbol, psyment)
*psyment = csym->native->u.syment;
if (csym->native->fix_value)
- psyment->n_value = ((combined_entry_type *) psyment->n_value
- - obj_raw_syments (abfd));
+ psyment->n_value = psyment->n_value -
+ (unsigned long) obj_raw_syments (abfd);
/* FIXME: We should handle fix_line here. */
@@ -2023,7 +2048,7 @@ coff_print_symbol (abfd, filep, symbol, how)
case bfd_print_symbol_all:
if (coffsymbol (symbol)->native)
{
- unsigned long val;
+ bfd_vma val;
unsigned int aux;
combined_entry_type *combined = coffsymbol (symbol)->native;
combined_entry_type *root = obj_raw_syments (abfd);
@@ -2032,12 +2057,11 @@ coff_print_symbol (abfd, filep, symbol, how)
fprintf (file, "[%3ld]", (long) (combined - root));
if (! combined->fix_value)
- val = (unsigned long) combined->u.syment.n_value;
+ val = (bfd_vma) combined->u.syment.n_value;
else
- val = ((unsigned long)
- ((combined_entry_type *) combined->u.syment.n_value
- - root));
+ val = combined->u.syment.n_value - (unsigned long) root;
+#ifndef XCOFF64
fprintf (file,
"(sec %2d)(fl 0x%02x)(ty %3x)(scl %3d) (nx %d) 0x%08lx %s",
combined->u.syment.n_scnum,
@@ -2045,8 +2069,20 @@ coff_print_symbol (abfd, filep, symbol, how)
combined->u.syment.n_type,
combined->u.syment.n_sclass,
combined->u.syment.n_numaux,
+ (unsigned long) val,
+ symbol->name);
+#else
+ /* Print out the wide, 64 bit, symbol value */
+ fprintf (file,
+ "(sec %2d)(fl 0x%02x)(ty %3x)(scl %3d) (nx %d) 0x%016llx %s",
+ combined->u.syment.n_scnum,
+ combined->u.syment.n_flags,
+ combined->u.syment.n_type,
+ combined->u.syment.n_sclass,
+ combined->u.syment.n_numaux,
val,
symbol->name);
+#endif
for (aux = 0; aux < combined->u.syment.n_numaux; aux++)
{
@@ -2090,16 +2126,18 @@ coff_print_symbol (abfd, filep, symbol, how)
case C_EXT:
if (ISFCN (combined->u.syment.n_type))
{
+ long next, llnos;
+
+ if (auxp->fix_end)
+ next = (auxp->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.p
+ - root);
+ else
+ next = auxp->u.auxent.x_sym.x_fcnary.x_fcn.x_endndx.l;
+ llnos = auxp->u.auxent.x_sym.x_fcnary.x_fcn.x_lnnoptr;
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));
+ "AUX tagndx %ld ttlsiz 0x%lx lnnos %ld next %ld",
+ tagndx, auxp->u.auxent.x_sym.x_misc.x_fsize,
+ llnos, next);
break;
}
/* else fall through */
@@ -2133,7 +2171,7 @@ coff_print_symbol (abfd, filep, symbol, how)
}
else
{
- bfd_print_symbol_vandf ((PTR) file, symbol);
+ bfd_print_symbol_vandf (abfd, (PTR) file, symbol);
fprintf (file, " %-5s %s %s %s",
symbol->section->name,
coffsymbol (symbol)->native ? "n" : "g",
@@ -2167,8 +2205,8 @@ coff_find_nearest_line (abfd, section, symbols, offset, filename_ptr,
asection *section;
asymbol **symbols;
bfd_vma offset;
- CONST char **filename_ptr;
- CONST char **functionname_ptr;
+ const char **filename_ptr;
+ const char **functionname_ptr;
unsigned int *line_ptr;
{
boolean found;
@@ -2180,6 +2218,7 @@ coff_find_nearest_line (abfd, section, symbols, offset, filename_ptr,
combined_entry_type *pend;
alent *l;
struct coff_section_tdata *sec_data;
+ bfd_size_type amt;
/* Before looking through the symbol table, try to use a .stab
section to find the information. */
@@ -2264,7 +2303,7 @@ coff_find_nearest_line (abfd, section, symbols, offset, filename_ptr,
/* Avoid endless loops on erroneous files by ensuring that
we always move forward in the file. */
- if (p - cof->raw_syments >= p->u.syment.n_value)
+ if (p >= cof->raw_syments + p->u.syment.n_value)
break;
p = cof->raw_syments + p->u.syment.n_value;
@@ -2354,9 +2393,8 @@ coff_find_nearest_line (abfd, section, symbols, offset, filename_ptr,
/* Cache the results for the next call. */
if (sec_data == NULL && section->owner == abfd)
{
- section->used_by_bfd =
- ((PTR) bfd_zalloc (abfd,
- sizeof (struct coff_section_tdata)));
+ amt = sizeof (struct coff_section_tdata);
+ section->used_by_bfd = (PTR) bfd_zalloc (abfd, amt);
sec_data = (struct coff_section_tdata *) section->used_by_bfd;
}
if (sec_data != NULL)
@@ -2413,8 +2451,9 @@ bfd_coff_set_symbol_class (abfd, symbol, class)
coff_write_alien_symbol(). */
combined_entry_type * native;
+ bfd_size_type amt = sizeof (* native);
- native = (combined_entry_type *) bfd_alloc (abfd, sizeof (* native));
+ native = (combined_entry_type *) bfd_alloc (abfd, amt);
if (native == NULL)
return false;
@@ -2442,7 +2481,7 @@ bfd_coff_set_symbol_class (abfd, symbol, class)
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.
+ /* Copy the any flags from the file header into the symbol.
FIXME: Why? */
native->u.syment.n_flags = bfd_asymbol_bfd (& csym->symbol)->flags;
}
diff --git a/contrib/binutils/bfd/cofflink.c b/contrib/binutils/bfd/cofflink.c
index 96b005b..00a5289 100644
--- a/contrib/binutils/bfd/cofflink.c
+++ b/contrib/binutils/bfd/cofflink.c
@@ -117,9 +117,9 @@ _bfd_coff_link_hash_table_create (abfd)
bfd *abfd;
{
struct coff_link_hash_table *ret;
+ bfd_size_type amt = sizeof (struct coff_link_hash_table);
- ret = ((struct coff_link_hash_table *)
- bfd_alloc (abfd, sizeof (struct coff_link_hash_table)));
+ ret = (struct coff_link_hash_table *) bfd_alloc (abfd, amt);
if (ret == NULL)
return NULL;
if (! _bfd_coff_link_hash_table_init (ret, abfd,
@@ -277,6 +277,16 @@ coff_link_check_ar_symbols (abfd, info, pneeded)
return false;
h = bfd_link_hash_lookup (info->hash, name, false, false, true);
+ /* auto import */
+ if (!h && info->pei386_auto_import)
+ {
+ if (!strncmp (name,"__imp_", 6))
+ {
+ h =
+ bfd_link_hash_lookup (info->hash, name + 6, false, false,
+ true);
+ }
+ }
/* We are only interested in symbols that are currently
undefined. If a symbol is currently known to be common,
COFF linkers do not bring in an object file which defines
@@ -315,6 +325,7 @@ coff_link_add_symbols (abfd, info)
bfd_size_type symesz;
bfd_byte *esym;
bfd_byte *esym_end;
+ bfd_size_type amt;
/* Keep the symbols during this function, in case the linker needs
to read the generic symbols in order to report an error message. */
@@ -330,10 +341,8 @@ coff_link_add_symbols (abfd, info)
/* We keep a list of the linker hash table entries that correspond
to particular symbols. */
- sym_hash = ((struct coff_link_hash_entry **)
- bfd_alloc (abfd,
- ((size_t) symcount
- * sizeof (struct coff_link_hash_entry *))));
+ amt = symcount * sizeof (struct coff_link_hash_entry *);
+ sym_hash = (struct coff_link_hash_entry **) bfd_alloc (abfd, amt);
if (sym_hash == NULL && symcount != 0)
goto error_return;
obj_coff_sym_hashes (abfd) = sym_hash;
@@ -433,7 +442,7 @@ coff_link_add_symbols (abfd, info)
/* 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
+ relying on 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
@@ -526,7 +535,7 @@ coff_link_add_symbols (abfd, info)
(*_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));
+ bfd_archive_filename (abfd));
/* We don't want to change from a meaningful
base type to a null one, but if we know
@@ -554,8 +563,8 @@ coff_link_add_symbols (abfd, info)
i < sym.n_numaux;
i++, eaux += symesz, iaux++)
bfd_coff_swap_aux_in (abfd, (PTR) eaux, sym.n_type,
- sym.n_sclass, i, sym.n_numaux,
- (PTR) iaux);
+ sym.n_sclass, (int) i,
+ sym.n_numaux, (PTR) iaux);
(*sym_hash)->aux = alloc;
}
}
@@ -608,9 +617,8 @@ coff_link_add_symbols (abfd, info)
secdata = coff_section_data (abfd, stab);
if (secdata == NULL)
{
- stab->used_by_bfd =
- (PTR) bfd_zalloc (abfd,
- sizeof (struct coff_section_tdata));
+ amt = sizeof (struct coff_section_tdata);
+ stab->used_by_bfd = (PTR) bfd_zalloc (abfd, amt);
if (stab->used_by_bfd == NULL)
goto error_return;
secdata = coff_section_data (abfd, stab);
@@ -648,11 +656,11 @@ _bfd_coff_final_link (abfd, info)
boolean long_section_names;
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;
+ bfd_size_type max_sym_count;
+ bfd_size_type max_lineno_count;
+ bfd_size_type max_reloc_count;
+ bfd_size_type max_output_reloc_count;
+ bfd_size_type max_contents_size;
file_ptr rel_filepos;
unsigned int relsz;
file_ptr line_filepos;
@@ -660,6 +668,7 @@ _bfd_coff_final_link (abfd, info)
bfd *sub;
bfd_byte *external_relocs = NULL;
char strbuf[STRING_SIZE_SIZE];
+ bfd_size_type amt;
symesz = bfd_coff_symesz (abfd);
@@ -775,10 +784,9 @@ _bfd_coff_final_link (abfd, info)
/* 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)));
+ amt = abfd->section_count + 1;
+ amt *= sizeof (struct coff_link_section_info);
+ finfo.section_info = (struct coff_link_section_info *) bfd_malloc (amt);
if (finfo.section_info == NULL)
goto error_return;
for (i = 0; i <= abfd->section_count; i++)
@@ -819,13 +827,14 @@ _bfd_coff_final_link (abfd, info)
but only when doing a relocateable link, which is not the
common case. */
BFD_ASSERT (info->relocateable);
+ amt = o->reloc_count;
+ amt *= sizeof (struct internal_reloc);
finfo.section_info[o->target_index].relocs =
- ((struct internal_reloc *)
- bfd_malloc (o->reloc_count * sizeof (struct internal_reloc)));
+ (struct internal_reloc *) bfd_malloc (amt);
+ amt = o->reloc_count;
+ amt *= sizeof (struct coff_link_hash_entry *);
finfo.section_info[o->target_index].rel_hashes =
- ((struct coff_link_hash_entry **)
- bfd_malloc (o->reloc_count
- * sizeof (struct coff_link_hash_entry *)));
+ (struct coff_link_hash_entry **) bfd_malloc (amt);
if (finfo.section_info[o->target_index].relocs == NULL
|| finfo.section_info[o->target_index].rel_hashes == NULL)
goto error_return;
@@ -857,22 +866,23 @@ _bfd_coff_final_link (abfd, info)
}
/* 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));
+ amt = max_sym_count * sizeof (struct internal_syment);
+ finfo.internal_syms = (struct internal_syment *) bfd_malloc (amt);
+ amt = max_sym_count * sizeof (asection *);
+ finfo.sec_ptrs = (asection **) bfd_malloc (amt);
+ amt = max_sym_count * sizeof (long);
+ finfo.sym_indices = (long *) bfd_malloc (amt);
+ finfo.outsyms = (bfd_byte *) bfd_malloc ((max_sym_count + 1) * symesz);
+ amt = max_lineno_count * bfd_coff_linesz (abfd);
+ finfo.linenos = (bfd_byte *) bfd_malloc (amt);
finfo.contents = (bfd_byte *) bfd_malloc (max_contents_size);
- finfo.external_relocs = (bfd_byte *) bfd_malloc (max_reloc_count * relsz);
+ amt = max_reloc_count * relsz;
+ finfo.external_relocs = (bfd_byte *) bfd_malloc (amt);
if (! info->relocateable)
- finfo.internal_relocs = ((struct internal_reloc *)
- bfd_malloc (max_reloc_count
- * sizeof (struct internal_reloc)));
+ {
+ amt = max_reloc_count * sizeof (struct internal_reloc);
+ finfo.internal_relocs = (struct internal_reloc *) bfd_malloc (amt);
+ }
if ((finfo.internal_syms == NULL && max_sym_count > 0)
|| (finfo.sec_ptrs == NULL && max_sym_count > 0)
|| (finfo.sym_indices == NULL && max_sym_count > 0)
@@ -977,14 +987,15 @@ _bfd_coff_final_link (abfd, info)
if (finfo.last_file_index != -1
&& (unsigned int) finfo.last_file.n_value != obj_raw_syment_count (abfd))
{
+ file_ptr pos;
+
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)
+
+ pos = obj_sym_filepos (abfd) + finfo.last_file_index * symesz;
+ if (bfd_seek (abfd, pos, SEEK_SET) != 0
+ || bfd_bwrite (finfo.outsyms, symesz, abfd) != symesz)
return false;
}
@@ -1019,8 +1030,8 @@ _bfd_coff_final_link (abfd, info)
/* 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));
+ amt = max_output_reloc_count * relsz;
+ external_relocs = (bfd_byte *) bfd_malloc (amt);
if (external_relocs == NULL)
goto error_return;
@@ -1049,8 +1060,9 @@ _bfd_coff_final_link (abfd, info)
}
if (bfd_seek (abfd, o->rel_filepos, SEEK_SET) != 0
- || bfd_write ((PTR) external_relocs, relsz, o->reloc_count,
- abfd) != relsz * o->reloc_count)
+ || (bfd_bwrite ((PTR) external_relocs,
+ (bfd_size_type) relsz * o->reloc_count, abfd)
+ != (bfd_size_type) relsz * o->reloc_count))
goto error_return;
}
@@ -1084,21 +1096,22 @@ _bfd_coff_final_link (abfd, info)
/* Write out the string table. */
if (obj_raw_syment_count (abfd) != 0 || long_section_names)
{
- if (bfd_seek (abfd,
- (obj_sym_filepos (abfd)
- + obj_raw_syment_count (abfd) * symesz),
- SEEK_SET) != 0)
+ file_ptr pos;
+
+ pos = obj_sym_filepos (abfd) + obj_raw_syment_count (abfd) * symesz;
+ if (bfd_seek (abfd, pos, 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);
+ H_PUT_32 (abfd,
+ _bfd_stringtab_size (finfo.strtab) + STRING_SIZE_SIZE,
+ strbuf);
#else
- #error Change bfd_h_put_32
+ #error Change H_PUT_32 above
#endif
- if (bfd_write (strbuf, 1, STRING_SIZE_SIZE, abfd) != STRING_SIZE_SIZE)
+ if (bfd_bwrite (strbuf, (bfd_size_type) STRING_SIZE_SIZE, abfd)
+ != STRING_SIZE_SIZE)
return false;
if (! _bfd_stringtab_emit (abfd, finfo.strtab))
@@ -1166,17 +1179,17 @@ dores_com (ptr, output_bfd, heap)
{
int val = strtoul (ptr, &ptr, 0);
if (heap)
- pe_data(output_bfd)->pe_opthdr.SizeOfHeapReserve =val;
+ pe_data(output_bfd)->pe_opthdr.SizeOfHeapReserve = val;
else
- pe_data(output_bfd)->pe_opthdr.SizeOfStackReserve =val;
+ pe_data(output_bfd)->pe_opthdr.SizeOfStackReserve = val;
if (ptr[0] == ',')
{
- int val = strtoul (ptr+1, &ptr, 0);
+ val = strtoul (ptr+1, &ptr, 0);
if (heap)
- pe_data(output_bfd)->pe_opthdr.SizeOfHeapCommit =val;
+ pe_data(output_bfd)->pe_opthdr.SizeOfHeapCommit = val;
else
- pe_data(output_bfd)->pe_opthdr.SizeOfStackCommit =val;
+ pe_data(output_bfd)->pe_opthdr.SizeOfStackCommit = val;
}
}
return ptr;
@@ -1210,10 +1223,10 @@ process_embedded_commands (output_bfd, info, abfd)
if (!sec)
return 1;
- copy = bfd_malloc ((size_t) sec->_raw_size);
+ copy = bfd_malloc (sec->_raw_size);
if (!copy)
return 0;
- if (! bfd_get_section_contents(abfd, sec, copy, 0, sec->_raw_size))
+ if (! bfd_get_section_contents(abfd, sec, copy, (bfd_vma) 0, sec->_raw_size))
{
free (copy);
return 0;
@@ -1501,6 +1514,19 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
}
}
+#ifndef COFF_WITH_PE
+ /* Skip section symbols for sections which are not going to be
+ emitted. */
+ if (!skip
+ && isym.n_sclass == C_STAT
+ && isym.n_type == T_NULL
+ && isym.n_numaux > 0)
+ {
+ if ((*secpp)->output_section == bfd_abs_section_ptr)
+ skip = true;
+ }
+#endif
+
/* If we stripping debugging symbols, and this is a debugging
symbol, then skip it. FIXME: gas sets the section to N_ABS
for some types of debugging symbols; I don't know if this is
@@ -1561,6 +1587,7 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
struct coff_debug_merge_element **epp;
bfd_byte *esl, *eslend;
struct internal_syment *islp;
+ bfd_size_type amt;
name = _bfd_coff_internal_syment_name (input_bfd, &isym, buf);
if (name == NULL)
@@ -1581,9 +1608,8 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
/* Allocate memory to hold type information. If this turns
out to be a duplicate, we pass this address to
bfd_release. */
- mt = ((struct coff_debug_merge_type *)
- bfd_alloc (input_bfd,
- sizeof (struct coff_debug_merge_type)));
+ amt = sizeof (struct coff_debug_merge_type);
+ mt = (struct coff_debug_merge_type *) bfd_alloc (input_bfd, amt);
if (mt == NULL)
return false;
mt->class = isym.n_sclass;
@@ -1609,9 +1635,9 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
bfd_coff_swap_sym_in (input_bfd, (PTR) esl, (PTR) islp);
+ amt = sizeof (struct coff_debug_merge_element);
*epp = ((struct coff_debug_merge_element *)
- bfd_alloc (input_bfd,
- sizeof (struct coff_debug_merge_element)));
+ bfd_alloc (input_bfd, amt));
if (*epp == NULL)
return false;
@@ -1620,8 +1646,8 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
if (elename == NULL)
return false;
- name_copy = (char *) bfd_alloc (input_bfd,
- strlen (elename) + 1);
+ amt = strlen (elename) + 1;
+ name_copy = (char *) bfd_alloc (input_bfd, amt);
if (name_copy == NULL)
return false;
strcpy (name_copy, elename);
@@ -1804,7 +1830,7 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
have to write the symbol out twice. */
if (finfo->last_file_index != -1
- && finfo->last_file.n_value != (long) output_index)
+ && finfo->last_file.n_value != (bfd_vma) output_index)
{
/* We must correct the value of the last C_FILE
entry. */
@@ -1821,18 +1847,18 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
}
else
{
+ file_ptr pos;
+
/* We have already written out the last C_FILE
symbol. We need to write it out again. We
borrow *outsym temporarily. */
bfd_coff_swap_sym_out (output_bfd,
(PTR) &finfo->last_file,
(PTR) outsym);
- if (bfd_seek (output_bfd,
- (obj_sym_filepos (output_bfd)
- + finfo->last_file_index * osymesz),
- SEEK_SET) != 0
- || (bfd_write (outsym, osymesz, 1, output_bfd)
- != osymesz))
+ pos = obj_sym_filepos (output_bfd);
+ pos += finfo->last_file_index * osymesz;
+ if (bfd_seek (output_bfd, pos, SEEK_SET) != 0
+ || bfd_bwrite (outsym, osymesz, output_bfd) != osymesz)
return false;
}
}
@@ -2054,6 +2080,8 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
}
else
{
+ file_ptr pos;
+
/* We have already written out the last
.bf aux entry. We need to write it
out again. We borrow *outsym
@@ -2065,12 +2093,11 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
isymp->n_sclass,
0, isymp->n_numaux,
(PTR) outsym);
- if (bfd_seek (output_bfd,
- (obj_sym_filepos (output_bfd)
- + finfo->last_bf_index * osymesz),
- SEEK_SET) != 0
- || bfd_write (outsym, osymesz, 1,
- output_bfd) != osymesz)
+ pos = obj_sym_filepos (output_bfd);
+ pos += finfo->last_bf_index * osymesz;
+ if (bfd_seek (output_bfd, pos, SEEK_SET) != 0
+ || (bfd_bwrite (outsym, osymesz, output_bfd)
+ != osymesz))
return false;
}
}
@@ -2118,6 +2145,8 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
bfd_byte *elineend;
bfd_byte *oeline;
boolean skipping;
+ file_ptr pos;
+ bfd_size_type amt;
/* FIXME: If SEC_HAS_CONTENTS is not for the section, then
build_link_order in ldwrite.c will not have created a
@@ -2133,7 +2162,7 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
continue;
if (bfd_seek (input_bfd, o->line_filepos, SEEK_SET) != 0
- || bfd_read (finfo->linenos, linesz, o->lineno_count,
+ || bfd_bread (finfo->linenos, linesz * o->lineno_count,
input_bfd) != linesz * o->lineno_count)
return false;
@@ -2221,17 +2250,14 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
}
}
- if (bfd_seek (output_bfd,
- (o->output_section->line_filepos
- + o->output_section->lineno_count * linesz),
- SEEK_SET) != 0
- || (bfd_write (finfo->linenos, 1, oeline - finfo->linenos,
- output_bfd)
- != (bfd_size_type) (oeline - finfo->linenos)))
+ pos = o->output_section->line_filepos;
+ pos += o->output_section->lineno_count * linesz;
+ amt = oeline - finfo->linenos;
+ if (bfd_seek (output_bfd, pos, SEEK_SET) != 0
+ || bfd_bwrite (finfo->linenos, amt, output_bfd) != amt)
return false;
- o->output_section->lineno_count +=
- (oeline - finfo->linenos) / linesz;
+ o->output_section->lineno_count += amt / linesz;
}
}
@@ -2252,12 +2278,13 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
/* Write the modified symbols to the output file. */
if (outsym > finfo->outsyms)
{
- if (bfd_seek (output_bfd,
- obj_sym_filepos (output_bfd) + syment_base * osymesz,
- SEEK_SET) != 0
- || (bfd_write (finfo->outsyms, outsym - finfo->outsyms, 1,
- output_bfd)
- != (bfd_size_type) (outsym - finfo->outsyms)))
+ file_ptr pos;
+ bfd_size_type amt;
+
+ pos = obj_sym_filepos (output_bfd) + syment_base * osymesz;
+ amt = outsym - finfo->outsyms;
+ if (bfd_seek (output_bfd, pos, SEEK_SET) != 0
+ || bfd_bwrite (finfo->outsyms, amt, output_bfd) != amt)
return false;
BFD_ASSERT ((obj_raw_syment_count (output_bfd)
@@ -2288,7 +2315,7 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
{
((*_bfd_error_handler)
(_("%s: relocs in section `%s', but it has no contents"),
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
bfd_get_section_name (input_bfd, o)));
bfd_set_error (bfd_error_no_contents);
return false;
@@ -2429,14 +2456,11 @@ _bfd_coff_link_input_bfd (finfo, input_bfd)
/* Write out the modified section contents. */
if (secdata == NULL || secdata->stab_info == NULL)
{
+ file_ptr loc = o->output_offset * bfd_octets_per_byte (output_bfd);
+ bfd_size_type amt = (o->_cooked_size != 0
+ ? o->_cooked_size : o->_raw_size);
if (! bfd_set_section_contents (output_bfd, o->output_section,
- contents,
- (file_ptr)
- (o->output_offset *
- bfd_octets_per_byte (output_bfd)),
- (o->_cooked_size != 0
- ? o->_cooked_size
- : o->_raw_size)))
+ contents, loc, amt))
return false;
}
else
@@ -2469,6 +2493,7 @@ _bfd_coff_write_global_sym (h, data)
struct internal_syment isym;
bfd_size_type symesz;
unsigned int i;
+ file_ptr pos;
output_bfd = finfo->output_bfd;
@@ -2577,11 +2602,10 @@ _bfd_coff_write_global_sym (h, data)
symesz = bfd_coff_symesz (output_bfd);
- if (bfd_seek (output_bfd,
- (obj_sym_filepos (output_bfd)
- + obj_raw_syment_count (output_bfd) * symesz),
- SEEK_SET) != 0
- || bfd_write (finfo->outsyms, symesz, 1, output_bfd) != symesz)
+ pos = obj_sym_filepos (output_bfd);
+ pos += obj_raw_syment_count (output_bfd) * symesz;
+ if (bfd_seek (output_bfd, pos, SEEK_SET) != 0
+ || bfd_bwrite (finfo->outsyms, symesz, output_bfd) != symesz)
{
finfo->failed = true;
return false;
@@ -2649,9 +2673,9 @@ _bfd_coff_write_global_sym (h, data)
}
bfd_coff_swap_aux_out (output_bfd, (PTR) auxp, isym.n_type,
- isym.n_sclass, i, isym.n_numaux,
+ isym.n_sclass, (int) i, isym.n_numaux,
(PTR) finfo->outsyms);
- if (bfd_write (finfo->outsyms, symesz, 1, output_bfd) != symesz)
+ if (bfd_bwrite (finfo->outsyms, symesz, output_bfd) != symesz)
{
finfo->failed = true;
return false;
@@ -2719,6 +2743,7 @@ _bfd_coff_reloc_link_order (output_bfd, finfo, output_section, link_order)
bfd_byte *buf;
bfd_reloc_status_type rstat;
boolean ok;
+ file_ptr loc;
size = bfd_get_reloc_size (howto);
buf = (bfd_byte *) bfd_zmalloc (size);
@@ -2726,7 +2751,8 @@ _bfd_coff_reloc_link_order (output_bfd, finfo, output_section, link_order)
return false;
rstat = _bfd_relocate_contents (howto, output_bfd,
- link_order->u.reloc.p->addend, buf);
+ (bfd_vma) link_order->u.reloc.p->addend,\
+ buf);
switch (rstat)
{
case bfd_reloc_ok:
@@ -2749,10 +2775,9 @@ _bfd_coff_reloc_link_order (output_bfd, finfo, output_section, link_order)
}
break;
}
+ loc = link_order->offset * bfd_octets_per_byte (output_bfd);
ok = bfd_set_section_contents (output_bfd, output_section, (PTR) buf,
- (file_ptr)
- (link_order->offset *
- bfd_octets_per_byte (output_bfd)), size);
+ loc, size);
free (buf);
if (! ok)
return false;
@@ -2868,7 +2893,7 @@ _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,
{
(*_bfd_error_handler)
("%s: illegal symbol index %ld in relocs",
- bfd_get_filename (input_bfd), symndx);
+ bfd_archive_filename (input_bfd), symndx);
return false;
}
else
@@ -2990,7 +3015,7 @@ _bfd_coff_generic_relocate_section (output_bfd, info, input_bfd,
case bfd_reloc_outofrange:
(*_bfd_error_handler)
(_("%s: bad reloc address 0x%lx in section `%s'"),
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
(unsigned long) rel->r_vaddr,
bfd_get_section_name (input_bfd, input_section));
return false;
diff --git a/contrib/binutils/bfd/coffswap.h b/contrib/binutils/bfd/coffswap.h
index 2ff0a32..454e686 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, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1999, 2000,
+ 2001
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -27,174 +28,186 @@ 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. */
-#define PUTWORD bfd_h_put_32
-#define PUTHALF bfd_h_put_16
-#define PUTBYTE bfd_h_put_8
-
#ifndef GET_FCN_LNNOPTR
-#define GET_FCN_LNNOPTR(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_sym.x_fcnary.x_fcn.x_lnnoptr)
+#define GET_FCN_LNNOPTR(abfd, ext) \
+ H_GET_32 (abfd, ext->x_sym.x_fcnary.x_fcn.x_lnnoptr)
#endif
#ifndef GET_FCN_ENDNDX
-#define GET_FCN_ENDNDX(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_sym.x_fcnary.x_fcn.x_endndx)
+#define GET_FCN_ENDNDX(abfd, ext) \
+ H_GET_32 (abfd, ext->x_sym.x_fcnary.x_fcn.x_endndx)
#endif
#ifndef PUT_FCN_LNNOPTR
-#define PUT_FCN_LNNOPTR(abfd, in, ext) PUTWORD(abfd, in, (bfd_byte *) ext->x_sym.x_fcnary.x_fcn.x_lnnoptr)
+#define PUT_FCN_LNNOPTR(abfd, in, ext) \
+ H_PUT_32 (abfd, in, ext->x_sym.x_fcnary.x_fcn.x_lnnoptr)
#endif
#ifndef PUT_FCN_ENDNDX
-#define PUT_FCN_ENDNDX(abfd, in, ext) PUTWORD(abfd, in, (bfd_byte *) ext->x_sym.x_fcnary.x_fcn.x_endndx)
+#define PUT_FCN_ENDNDX(abfd, in, ext) \
+ H_PUT_32 (abfd, in, ext->x_sym.x_fcnary.x_fcn.x_endndx)
#endif
#ifndef GET_LNSZ_LNNO
-#define GET_LNSZ_LNNO(abfd, ext) bfd_h_get_16(abfd, (bfd_byte *) ext->x_sym.x_misc.x_lnsz.x_lnno)
+#define GET_LNSZ_LNNO(abfd, ext) \
+ H_GET_16 (abfd, ext->x_sym.x_misc.x_lnsz.x_lnno)
#endif
#ifndef GET_LNSZ_SIZE
-#define GET_LNSZ_SIZE(abfd, ext) bfd_h_get_16(abfd, (bfd_byte *) ext->x_sym.x_misc.x_lnsz.x_size)
+#define GET_LNSZ_SIZE(abfd, ext) \
+ H_GET_16 (abfd, ext->x_sym.x_misc.x_lnsz.x_size)
#endif
#ifndef PUT_LNSZ_LNNO
-#define PUT_LNSZ_LNNO(abfd, in, ext) bfd_h_put_16(abfd, in, (bfd_byte *)ext->x_sym.x_misc.x_lnsz.x_lnno)
+#define PUT_LNSZ_LNNO(abfd, in, ext) \
+ H_PUT_16 (abfd, in, ext->x_sym.x_misc.x_lnsz.x_lnno)
#endif
#ifndef PUT_LNSZ_SIZE
-#define PUT_LNSZ_SIZE(abfd, in, ext) bfd_h_put_16(abfd, in, (bfd_byte*) ext->x_sym.x_misc.x_lnsz.x_size)
+#define PUT_LNSZ_SIZE(abfd, in, ext) \
+ H_PUT_16 (abfd, in, ext->x_sym.x_misc.x_lnsz.x_size)
#endif
#ifndef GET_SCN_SCNLEN
-#define GET_SCN_SCNLEN(abfd, ext) bfd_h_get_32(abfd, (bfd_byte *) ext->x_scn.x_scnlen)
+#define GET_SCN_SCNLEN(abfd, ext) \
+ H_GET_32 (abfd, ext->x_scn.x_scnlen)
#endif
#ifndef GET_SCN_NRELOC
-#define GET_SCN_NRELOC(abfd, ext) bfd_h_get_16(abfd, (bfd_byte *)ext->x_scn.x_nreloc)
+#define GET_SCN_NRELOC(abfd, ext) \
+ H_GET_16 (abfd, ext->x_scn.x_nreloc)
#endif
#ifndef GET_SCN_NLINNO
-#define GET_SCN_NLINNO(abfd, ext) bfd_h_get_16(abfd, (bfd_byte *)ext->x_scn.x_nlinno)
+#define GET_SCN_NLINNO(abfd, ext) \
+ H_GET_16 (abfd, ext->x_scn.x_nlinno)
#endif
#ifndef PUT_SCN_SCNLEN
-#define PUT_SCN_SCNLEN(abfd,in, ext) bfd_h_put_32(abfd, in, (bfd_byte *) ext->x_scn.x_scnlen)
+#define PUT_SCN_SCNLEN(abfd, in, ext) \
+ H_PUT_32 (abfd, in, ext->x_scn.x_scnlen)
#endif
#ifndef PUT_SCN_NRELOC
-#define PUT_SCN_NRELOC(abfd,in, ext) bfd_h_put_16(abfd, in, (bfd_byte *)ext->x_scn.x_nreloc)
+#define PUT_SCN_NRELOC(abfd, in, ext) \
+ H_PUT_16 (abfd, in, ext->x_scn.x_nreloc)
#endif
#ifndef PUT_SCN_NLINNO
-#define PUT_SCN_NLINNO(abfd,in, ext) bfd_h_put_16(abfd,in, (bfd_byte *) ext->x_scn.x_nlinno)
+#define PUT_SCN_NLINNO(abfd, in, ext) \
+ H_PUT_16 (abfd, in, ext->x_scn.x_nlinno)
#endif
#ifndef GET_LINENO_LNNO
-#define GET_LINENO_LNNO(abfd, ext) bfd_h_get_16(abfd, (bfd_byte *) (ext->l_lnno));
+#define GET_LINENO_LNNO(abfd, ext) \
+ H_GET_16 (abfd, ext->l_lnno);
#endif
#ifndef PUT_LINENO_LNNO
-#define PUT_LINENO_LNNO(abfd,val, ext) bfd_h_put_16(abfd,val, (bfd_byte *) (ext->l_lnno));
+#define PUT_LINENO_LNNO(abfd, val, ext) \
+ H_PUT_16 (abfd, val, ext->l_lnno);
#endif
/* The f_symptr field in the filehdr is sometimes 64 bits. */
#ifndef GET_FILEHDR_SYMPTR
-#define GET_FILEHDR_SYMPTR bfd_h_get_32
+#define GET_FILEHDR_SYMPTR H_GET_32
#endif
#ifndef PUT_FILEHDR_SYMPTR
-#define PUT_FILEHDR_SYMPTR bfd_h_put_32
+#define PUT_FILEHDR_SYMPTR H_PUT_32
#endif
/* Some fields in the aouthdr are sometimes 64 bits. */
#ifndef GET_AOUTHDR_TSIZE
-#define GET_AOUTHDR_TSIZE bfd_h_get_32
+#define GET_AOUTHDR_TSIZE H_GET_32
#endif
#ifndef PUT_AOUTHDR_TSIZE
-#define PUT_AOUTHDR_TSIZE bfd_h_put_32
+#define PUT_AOUTHDR_TSIZE H_PUT_32
#endif
#ifndef GET_AOUTHDR_DSIZE
-#define GET_AOUTHDR_DSIZE bfd_h_get_32
+#define GET_AOUTHDR_DSIZE H_GET_32
#endif
#ifndef PUT_AOUTHDR_DSIZE
-#define PUT_AOUTHDR_DSIZE bfd_h_put_32
+#define PUT_AOUTHDR_DSIZE H_PUT_32
#endif
#ifndef GET_AOUTHDR_BSIZE
-#define GET_AOUTHDR_BSIZE bfd_h_get_32
+#define GET_AOUTHDR_BSIZE H_GET_32
#endif
#ifndef PUT_AOUTHDR_BSIZE
-#define PUT_AOUTHDR_BSIZE bfd_h_put_32
+#define PUT_AOUTHDR_BSIZE H_PUT_32
#endif
#ifndef GET_AOUTHDR_ENTRY
-#define GET_AOUTHDR_ENTRY bfd_h_get_32
+#define GET_AOUTHDR_ENTRY H_GET_32
#endif
#ifndef PUT_AOUTHDR_ENTRY
-#define PUT_AOUTHDR_ENTRY bfd_h_put_32
+#define PUT_AOUTHDR_ENTRY H_PUT_32
#endif
#ifndef GET_AOUTHDR_TEXT_START
-#define GET_AOUTHDR_TEXT_START bfd_h_get_32
+#define GET_AOUTHDR_TEXT_START H_GET_32
#endif
#ifndef PUT_AOUTHDR_TEXT_START
-#define PUT_AOUTHDR_TEXT_START bfd_h_put_32
+#define PUT_AOUTHDR_TEXT_START H_PUT_32
#endif
#ifndef GET_AOUTHDR_DATA_START
-#define GET_AOUTHDR_DATA_START bfd_h_get_32
+#define GET_AOUTHDR_DATA_START H_GET_32
#endif
#ifndef PUT_AOUTHDR_DATA_START
-#define PUT_AOUTHDR_DATA_START bfd_h_put_32
+#define PUT_AOUTHDR_DATA_START H_PUT_32
#endif
/* Some fields in the scnhdr are sometimes 64 bits. */
#ifndef GET_SCNHDR_PADDR
-#define GET_SCNHDR_PADDR bfd_h_get_32
+#define GET_SCNHDR_PADDR H_GET_32
#endif
#ifndef PUT_SCNHDR_PADDR
-#define PUT_SCNHDR_PADDR bfd_h_put_32
+#define PUT_SCNHDR_PADDR H_PUT_32
#endif
#ifndef GET_SCNHDR_VADDR
-#define GET_SCNHDR_VADDR bfd_h_get_32
+#define GET_SCNHDR_VADDR H_GET_32
#endif
#ifndef PUT_SCNHDR_VADDR
-#define PUT_SCNHDR_VADDR bfd_h_put_32
+#define PUT_SCNHDR_VADDR H_PUT_32
#endif
#ifndef GET_SCNHDR_SIZE
-#define GET_SCNHDR_SIZE bfd_h_get_32
+#define GET_SCNHDR_SIZE H_GET_32
#endif
#ifndef PUT_SCNHDR_SIZE
-#define PUT_SCNHDR_SIZE bfd_h_put_32
+#define PUT_SCNHDR_SIZE H_PUT_32
#endif
#ifndef GET_SCNHDR_SCNPTR
-#define GET_SCNHDR_SCNPTR bfd_h_get_32
+#define GET_SCNHDR_SCNPTR H_GET_32
#endif
#ifndef PUT_SCNHDR_SCNPTR
-#define PUT_SCNHDR_SCNPTR bfd_h_put_32
+#define PUT_SCNHDR_SCNPTR H_PUT_32
#endif
#ifndef GET_SCNHDR_RELPTR
-#define GET_SCNHDR_RELPTR bfd_h_get_32
+#define GET_SCNHDR_RELPTR H_GET_32
#endif
#ifndef PUT_SCNHDR_RELPTR
-#define PUT_SCNHDR_RELPTR bfd_h_put_32
+#define PUT_SCNHDR_RELPTR H_PUT_32
#endif
#ifndef GET_SCNHDR_LNNOPTR
-#define GET_SCNHDR_LNNOPTR bfd_h_get_32
+#define GET_SCNHDR_LNNOPTR H_GET_32
#endif
#ifndef PUT_SCNHDR_LNNOPTR
-#define PUT_SCNHDR_LNNOPTR bfd_h_put_32
+#define PUT_SCNHDR_LNNOPTR H_PUT_32
#endif
#ifndef GET_SCNHDR_NRELOC
-#define GET_SCNHDR_NRELOC bfd_h_get_16
+#define GET_SCNHDR_NRELOC H_GET_16
#endif
#ifndef MAX_SCNHDR_NRELOC
#define MAX_SCNHDR_NRELOC 0xffff
#endif
#ifndef PUT_SCNHDR_NRELOC
-#define PUT_SCNHDR_NRELOC bfd_h_put_16
+#define PUT_SCNHDR_NRELOC H_PUT_16
#endif
#ifndef GET_SCNHDR_NLNNO
-#define GET_SCNHDR_NLNNO bfd_h_get_16
+#define GET_SCNHDR_NLNNO H_GET_16
#endif
#ifndef MAX_SCNHDR_NLNNO
#define MAX_SCNHDR_NLNNO 0xffff
#endif
#ifndef PUT_SCNHDR_NLNNO
-#define PUT_SCNHDR_NLNNO bfd_h_put_16
+#define PUT_SCNHDR_NLNNO H_PUT_16
#endif
#ifndef GET_SCNHDR_FLAGS
-#define GET_SCNHDR_FLAGS bfd_h_get_32
+#define GET_SCNHDR_FLAGS H_GET_32
#endif
#ifndef PUT_SCNHDR_FLAGS
-#define PUT_SCNHDR_FLAGS bfd_h_put_32
+#define PUT_SCNHDR_FLAGS H_PUT_32
#endif
#ifndef GET_RELOC_VADDR
-#define GET_RELOC_VADDR bfd_h_get_32
+#define GET_RELOC_VADDR H_GET_32
#endif
#ifndef PUT_RELOC_VADDR
-#define PUT_RELOC_VADDR bfd_h_put_32
+#define PUT_RELOC_VADDR H_PUT_32
#endif
static void coff_swap_aouthdr_in PARAMS ((bfd *, PTR, PTR));
@@ -229,48 +242,44 @@ coff_swap_reloc_in (abfd, src, dst)
RELOC *reloc_src = (RELOC *) src;
struct internal_reloc *reloc_dst = (struct internal_reloc *) dst;
- reloc_dst->r_vaddr = GET_RELOC_VADDR (abfd, (bfd_byte *)reloc_src->r_vaddr);
- reloc_dst->r_symndx = bfd_h_get_signed_32(abfd, (bfd_byte *) reloc_src->r_symndx);
+ reloc_dst->r_vaddr = GET_RELOC_VADDR (abfd, reloc_src->r_vaddr);
+ reloc_dst->r_symndx = H_GET_S32 (abfd, reloc_src->r_symndx);
#ifdef RS6000COFF_C
- reloc_dst->r_type = bfd_h_get_8(abfd, reloc_src->r_type);
- reloc_dst->r_size = bfd_h_get_8(abfd, reloc_src->r_size);
+ reloc_dst->r_type = H_GET_8 (abfd, reloc_src->r_type);
+ reloc_dst->r_size = H_GET_8 (abfd, reloc_src->r_size);
#else
- reloc_dst->r_type = bfd_h_get_16(abfd, (bfd_byte *) reloc_src->r_type);
+ reloc_dst->r_type = H_GET_16 (abfd, reloc_src->r_type);
#endif
#ifdef SWAP_IN_RELOC_OFFSET
- reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET(abfd,
- (bfd_byte *) reloc_src->r_offset);
+ reloc_dst->r_offset = SWAP_IN_RELOC_OFFSET (abfd, reloc_src->r_offset);
#endif
}
static unsigned int
coff_swap_reloc_out (abfd, src, dst)
- bfd *abfd;
- PTR src;
- PTR dst;
+ bfd *abfd;
+ PTR src;
+ PTR dst;
{
- struct internal_reloc *reloc_src = (struct internal_reloc *)src;
- struct external_reloc *reloc_dst = (struct external_reloc *)dst;
- PUT_RELOC_VADDR (abfd, reloc_src->r_vaddr, (bfd_byte *) reloc_dst->r_vaddr);
- bfd_h_put_32(abfd, reloc_src->r_symndx, (bfd_byte *) reloc_dst->r_symndx);
+ struct internal_reloc *reloc_src = (struct internal_reloc *) src;
+ struct external_reloc *reloc_dst = (struct external_reloc *) dst;
+ PUT_RELOC_VADDR (abfd, reloc_src->r_vaddr, reloc_dst->r_vaddr);
+ H_PUT_32 (abfd, reloc_src->r_symndx, reloc_dst->r_symndx);
#ifdef RS6000COFF_C
- bfd_h_put_8 (abfd, reloc_src->r_type, (bfd_byte *) reloc_dst->r_type);
- bfd_h_put_8 (abfd, reloc_src->r_size, (bfd_byte *) reloc_dst->r_size);
+ H_PUT_8 (abfd, reloc_src->r_type, reloc_dst->r_type);
+ H_PUT_8 (abfd, reloc_src->r_size, reloc_dst->r_size);
#else
- bfd_h_put_16(abfd, reloc_src->r_type, (bfd_byte *)
- reloc_dst->r_type);
+ H_PUT_16 (abfd, reloc_src->r_type, reloc_dst->r_type);
#endif
#ifdef SWAP_OUT_RELOC_OFFSET
- SWAP_OUT_RELOC_OFFSET(abfd,
- reloc_src->r_offset,
- (bfd_byte *) reloc_dst->r_offset);
+ SWAP_OUT_RELOC_OFFSET (abfd, reloc_src->r_offset, reloc_dst->r_offset);
#endif
#ifdef SWAP_OUT_RELOC_EXTRA
- SWAP_OUT_RELOC_EXTRA(abfd,reloc_src, reloc_dst);
+ SWAP_OUT_RELOC_EXTRA (abfd, reloc_src, reloc_dst);
#endif
return bfd_coff_relsz (abfd);
@@ -280,9 +289,9 @@ coff_swap_reloc_out (abfd, src, dst)
static void
coff_swap_filehdr_in (abfd, src, dst)
- bfd *abfd;
- PTR src;
- PTR dst;
+ bfd *abfd;
+ PTR src;
+ PTR dst;
{
FILHDR *filehdr_src = (FILHDR *) src;
struct internal_filehdr *filehdr_dst = (struct internal_filehdr *) dst;
@@ -290,16 +299,15 @@ coff_swap_filehdr_in (abfd, src, dst)
#ifdef COFF_ADJUST_FILEHDR_IN_PRE
COFF_ADJUST_FILEHDR_IN_PRE (abfd, src, dst);
#endif
- filehdr_dst->f_magic = bfd_h_get_16(abfd, (bfd_byte *) filehdr_src->f_magic);
- filehdr_dst->f_nscns = bfd_h_get_16(abfd, (bfd_byte *)filehdr_src-> f_nscns);
- filehdr_dst->f_timdat = bfd_h_get_32(abfd, (bfd_byte *)filehdr_src-> f_timdat);
- filehdr_dst->f_symptr =
- GET_FILEHDR_SYMPTR (abfd, (bfd_byte *) filehdr_src->f_symptr);
- 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);
+ filehdr_dst->f_magic = H_GET_16 (abfd, filehdr_src->f_magic);
+ filehdr_dst->f_nscns = H_GET_16 (abfd, filehdr_src->f_nscns);
+ filehdr_dst->f_timdat = H_GET_32 (abfd, filehdr_src->f_timdat);
+ filehdr_dst->f_symptr = GET_FILEHDR_SYMPTR (abfd, filehdr_src->f_symptr);
+ filehdr_dst->f_nsyms = H_GET_32 (abfd, filehdr_src->f_nsyms);
+ filehdr_dst->f_opthdr = H_GET_16 (abfd, filehdr_src->f_opthdr);
+ filehdr_dst->f_flags = H_GET_16 (abfd, 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);
+ filehdr_dst->f_target_id = H_GET_16 (abfd, filehdr_src->f_target_id);
#endif
#ifdef COFF_ADJUST_FILEHDR_IN_POST
@@ -309,26 +317,25 @@ coff_swap_filehdr_in (abfd, src, dst)
static unsigned int
coff_swap_filehdr_out (abfd, in, out)
- bfd *abfd;
- PTR in;
- PTR out;
+ bfd *abfd;
+ PTR in;
+ PTR out;
{
- struct internal_filehdr *filehdr_in = (struct internal_filehdr *)in;
- FILHDR *filehdr_out = (FILHDR *)out;
+ struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
+ FILHDR *filehdr_out = (FILHDR *) out;
#ifdef COFF_ADJUST_FILEHDR_OUT_PRE
COFF_ADJUST_FILEHDR_OUT_PRE (abfd, in, out);
#endif
- bfd_h_put_16(abfd, filehdr_in->f_magic, (bfd_byte *) filehdr_out->f_magic);
- bfd_h_put_16(abfd, filehdr_in->f_nscns, (bfd_byte *) filehdr_out->f_nscns);
- bfd_h_put_32(abfd, filehdr_in->f_timdat, (bfd_byte *) filehdr_out->f_timdat);
- PUT_FILEHDR_SYMPTR (abfd, (bfd_vma) filehdr_in->f_symptr,
- (bfd_byte *) filehdr_out->f_symptr);
- bfd_h_put_32(abfd, filehdr_in->f_nsyms, (bfd_byte *) filehdr_out->f_nsyms);
- bfd_h_put_16(abfd, filehdr_in->f_opthdr, (bfd_byte *) filehdr_out->f_opthdr);
- bfd_h_put_16(abfd, filehdr_in->f_flags, (bfd_byte *) filehdr_out->f_flags);
+ H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
+ H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
+ H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
+ PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
+ H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
+ H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
+ H_PUT_16 (abfd, filehdr_in->f_flags, 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);
+ H_PUT_16 (abfd, filehdr_in->f_target_id, filehdr_out->f_target_id);
#endif
#ifdef COFF_ADJUST_FILEHDR_OUT_POST
@@ -341,34 +348,38 @@ coff_swap_filehdr_out (abfd, in, out)
static void
coff_swap_sym_in (abfd, ext1, in1)
- bfd *abfd;
+ bfd *abfd;
PTR ext1;
PTR in1;
{
- SYMENT *ext = (SYMENT *)ext1;
- struct internal_syment *in = (struct internal_syment *)in1;
-
- if( ext->e.e_name[0] == 0) {
- in->_n._n_n._n_zeroes = 0;
- in->_n._n_n._n_offset = bfd_h_get_32(abfd, (bfd_byte *) ext->e.e.e_offset);
- }
- else {
+ SYMENT *ext = (SYMENT *) ext1;
+ struct internal_syment *in = (struct internal_syment *) in1;
+
+ if (ext->e.e_name[0] == 0)
+ {
+ in->_n._n_n._n_zeroes = 0;
+ in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
+ }
+ else
+ {
#if SYMNMLEN != E_SYMNMLEN
- -> Error, we need to cope with truncating or extending SYMNMLEN!;
+ -> Error, we need to cope with truncating or extending SYMNMLEN!;
#else
- memcpy(in->_n._n_name, ext->e.e_name, SYMNMLEN);
-#endif
- }
- in->n_value = bfd_h_get_32(abfd, (bfd_byte *) ext->e_value);
- in->n_scnum = bfd_h_get_16(abfd, (bfd_byte *) ext->e_scnum);
- if (sizeof (ext->e_type) == 2){
- in->n_type = bfd_h_get_16(abfd, (bfd_byte *) ext->e_type);
- }
- else {
- in->n_type = bfd_h_get_32(abfd, (bfd_byte *) ext->e_type);
- }
- in->n_sclass = bfd_h_get_8(abfd, ext->e_sclass);
- in->n_numaux = bfd_h_get_8(abfd, ext->e_numaux);
+ memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
+#endif
+ }
+ in->n_value = H_GET_32 (abfd, ext->e_value);
+ in->n_scnum = H_GET_16 (abfd, ext->e_scnum);
+ if (sizeof (ext->e_type) == 2)
+ {
+ in->n_type = H_GET_16 (abfd, ext->e_type);
+ }
+ else
+ {
+ in->n_type = H_GET_32 (abfd, ext->e_type);
+ }
+ in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
+ in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
#ifdef COFF_ADJUST_SYM_IN_POST
COFF_ADJUST_SYM_IN_POST (abfd, ext1, in1);
#endif
@@ -376,35 +387,37 @@ coff_swap_sym_in (abfd, ext1, in1)
static unsigned int
coff_swap_sym_out (abfd, inp, extp)
- bfd *abfd;
- PTR inp;
- PTR extp;
+ bfd *abfd;
+ PTR inp;
+ PTR extp;
{
- struct internal_syment *in = (struct internal_syment *)inp;
- SYMENT *ext =(SYMENT *)extp;
- if(in->_n._n_name[0] == 0) {
- bfd_h_put_32(abfd, 0, (bfd_byte *) ext->e.e.e_zeroes);
- bfd_h_put_32(abfd, in->_n._n_n._n_offset, (bfd_byte *) ext->e.e.e_offset);
- }
- else {
+ struct internal_syment *in = (struct internal_syment *) inp;
+ SYMENT *ext =(SYMENT *) extp;
+ if(in->_n._n_name[0] == 0)
+ {
+ H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
+ H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
+ }
+ else
+ {
#if SYMNMLEN != E_SYMNMLEN
- -> Error, we need to cope with truncating or extending SYMNMLEN!;
+ -> Error, we need to cope with truncating or extending SYMNMLEN!;
#else
- memcpy(ext->e.e_name, in->_n._n_name, SYMNMLEN);
+ memcpy(ext->e.e_name, in->_n._n_name, SYMNMLEN);
#endif
- }
- bfd_h_put_32(abfd, in->n_value , (bfd_byte *) ext->e_value);
- bfd_h_put_16(abfd, in->n_scnum , (bfd_byte *) ext->e_scnum);
+ }
+ H_PUT_32 (abfd, in->n_value, ext->e_value);
+ H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
if (sizeof (ext->e_type) == 2)
- {
- bfd_h_put_16(abfd, in->n_type , (bfd_byte *) ext->e_type);
- }
+ {
+ H_PUT_16 (abfd, in->n_type, ext->e_type);
+ }
else
- {
- bfd_h_put_32(abfd, in->n_type , (bfd_byte *) ext->e_type);
- }
- bfd_h_put_8(abfd, in->n_sclass , ext->e_sclass);
- bfd_h_put_8(abfd, in->n_numaux , ext->e_numaux);
+ {
+ H_PUT_32 (abfd, in->n_type, ext->e_type);
+ }
+ H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
+ 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
@@ -413,42 +426,45 @@ coff_swap_sym_out (abfd, inp, extp)
static void
coff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
- bfd *abfd;
- PTR ext1;
- int type;
- int class;
- int indx;
- int numaux;
- PTR in1;
+ bfd *abfd;
+ PTR ext1;
+ int type;
+ int class;
+ int indx;
+ int numaux;
+ PTR in1;
{
- AUXENT *ext = (AUXENT *)ext1;
- union internal_auxent *in = (union internal_auxent *)in1;
+ AUXENT *ext = (AUXENT *) ext1;
+ union internal_auxent *in = (union internal_auxent *) in1;
#ifdef COFF_ADJUST_AUX_IN_PRE
COFF_ADJUST_AUX_IN_PRE (abfd, ext1, type, class, indx, numaux, in1);
#endif
- switch (class) {
+ switch (class)
+ {
case C_FILE:
- if (ext->x_file.x_fname[0] == 0) {
+ if (ext->x_file.x_fname[0] == 0)
+ {
in->x_file.x_n.x_zeroes = 0;
- in->x_file.x_n.x_offset =
- bfd_h_get_32(abfd, (bfd_byte *) ext->x_file.x_n.x_offset);
- } else {
+ in->x_file.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
+ }
+ else
+ {
#if FILNMLEN != E_FILNMLEN
- -> Error, we need to cope with truncating or extending FILNMLEN!;
+ -> Error, we need to cope with truncating or extending FILNMLEN!;
#else
- 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
- }
+ 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;
case C_STAT:
@@ -456,10 +472,11 @@ coff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
case C_LEAFSTAT:
#endif
case C_HIDDEN:
- if (type == T_NULL) {
- in->x_scn.x_scnlen = GET_SCN_SCNLEN(abfd, ext);
- in->x_scn.x_nreloc = GET_SCN_NRELOC(abfd, ext);
- in->x_scn.x_nlinno = GET_SCN_NLINNO(abfd, ext);
+ if (type == T_NULL)
+ {
+ in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
+ in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
+ in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
/* PE defines some extra fields; we zero them out for
safety. */
@@ -472,9 +489,9 @@ coff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
break;
}
- in->x_sym.x_tagndx.l = bfd_h_get_32(abfd, (bfd_byte *) ext->x_sym.x_tagndx);
+ in->x_sym.x_tagndx.l = H_GET_32 (abfd, ext->x_sym.x_tagndx);
#ifndef NO_TVNDX
- in->x_sym.x_tvndx = bfd_h_get_16(abfd, (bfd_byte *) ext->x_sym.x_tvndx);
+ in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
#endif
if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class))
@@ -485,29 +502,29 @@ coff_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
else
{
#if DIMNUM != E_DIMNUM
- #error we need to cope with truncating or extending DIMNUM
+#error we need to cope with truncating or extending DIMNUM
#endif
in->x_sym.x_fcnary.x_ary.x_dimen[0] =
- bfd_h_get_16 (abfd, (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
+ H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
in->x_sym.x_fcnary.x_ary.x_dimen[1] =
- bfd_h_get_16 (abfd, (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
+ H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
in->x_sym.x_fcnary.x_ary.x_dimen[2] =
- bfd_h_get_16 (abfd, (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
+ H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
in->x_sym.x_fcnary.x_ary.x_dimen[3] =
- bfd_h_get_16 (abfd, (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
+ H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
}
- if (ISFCN(type)) {
- in->x_sym.x_misc.x_fsize = bfd_h_get_32(abfd, (bfd_byte *) ext->x_sym.x_misc.x_fsize);
- }
- else {
- in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO(abfd, ext);
- in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE(abfd, ext);
- }
+ if (ISFCN(type))
+ {
+ in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
+ }
+ else
+ {
+ in->x_sym.x_misc.x_lnsz.x_lnno = GET_LNSZ_LNNO (abfd, ext);
+ in->x_sym.x_misc.x_lnsz.x_size = GET_LNSZ_SIZE (abfd, ext);
+ }
-end: ;
- /* the semicolon is because MSVC doesn't like labels at
- end of block. */
+ end: ;
#ifdef COFF_ADJUST_AUX_IN_POST
COFF_ADJUST_AUX_IN_POST (abfd, ext1, type, class, indx, numaux, in1);
@@ -516,87 +533,88 @@ end: ;
static unsigned int
coff_swap_aux_out (abfd, inp, type, class, indx, numaux, extp)
- bfd *abfd;
- PTR inp;
- int type;
- int class;
- int indx ATTRIBUTE_UNUSED;
- int numaux ATTRIBUTE_UNUSED;
- PTR extp;
+ bfd *abfd;
+ PTR inp;
+ int type;
+ int class;
+ int indx ATTRIBUTE_UNUSED;
+ int numaux ATTRIBUTE_UNUSED;
+ PTR extp;
{
- union internal_auxent *in = (union internal_auxent *)inp;
- AUXENT *ext = (AUXENT *)extp;
+ union internal_auxent *in = (union internal_auxent *) inp;
+ AUXENT *ext = (AUXENT *) extp;
#ifdef COFF_ADJUST_AUX_OUT_PRE
COFF_ADJUST_AUX_OUT_PRE (abfd, inp, type, class, indx, numaux, extp);
#endif
memset((PTR)ext, 0, AUXESZ);
- switch (class) {
- case C_FILE:
- if (in->x_file.x_fname[0] == 0) {
- PUTWORD(abfd, 0, (bfd_byte *) ext->x_file.x_n.x_zeroes);
- PUTWORD(abfd,
- in->x_file.x_n.x_offset,
- (bfd_byte *) ext->x_file.x_n.x_offset);
- }
- else {
+ switch (class)
+ {
+ case C_FILE:
+ if (in->x_file.x_fname[0] == 0)
+ {
+ H_PUT_32 (abfd, 0, ext->x_file.x_n.x_zeroes);
+ H_PUT_32 (abfd, in->x_file.x_n.x_offset, ext->x_file.x_n.x_offset);
+ }
+ else
+ {
#if FILNMLEN != E_FILNMLEN
- -> Error, we need to cope with truncating or extending FILNMLEN!;
+ -> Error, we need to cope with truncating or extending FILNMLEN!;
#else
- memcpy (ext->x_file.x_fname, in->x_file.x_fname, FILNMLEN);
+ memcpy (ext->x_file.x_fname, in->x_file.x_fname, FILNMLEN);
#endif
- }
- goto end;
+ }
+ goto end;
- case C_STAT:
+ case C_STAT:
#ifdef C_LEAFSTAT
- case C_LEAFSTAT:
+ case C_LEAFSTAT:
#endif
- case C_HIDDEN:
- if (type == T_NULL) {
- PUT_SCN_SCNLEN(abfd, in->x_scn.x_scnlen, ext);
- PUT_SCN_NRELOC(abfd, in->x_scn.x_nreloc, ext);
- PUT_SCN_NLINNO(abfd, in->x_scn.x_nlinno, ext);
- goto end;
+ case C_HIDDEN:
+ if (type == T_NULL)
+ {
+ PUT_SCN_SCNLEN (abfd, in->x_scn.x_scnlen, ext);
+ PUT_SCN_NRELOC (abfd, in->x_scn.x_nreloc, ext);
+ PUT_SCN_NLINNO (abfd, in->x_scn.x_nlinno, ext);
+ goto end;
+ }
+ break;
}
- break;
- }
- PUTWORD(abfd, in->x_sym.x_tagndx.l, (bfd_byte *) ext->x_sym.x_tagndx);
+ H_PUT_32 (abfd, in->x_sym.x_tagndx.l, ext->x_sym.x_tagndx);
#ifndef NO_TVNDX
- bfd_h_put_16(abfd, in->x_sym.x_tvndx , (bfd_byte *) ext->x_sym.x_tvndx);
+ H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
#endif
if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class))
{
- PUT_FCN_LNNOPTR(abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
- PUT_FCN_ENDNDX(abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.l, ext);
+ PUT_FCN_LNNOPTR (abfd, in->x_sym.x_fcnary.x_fcn.x_lnnoptr, ext);
+ PUT_FCN_ENDNDX (abfd, in->x_sym.x_fcnary.x_fcn.x_endndx.l, ext);
}
else
{
#if DIMNUM != E_DIMNUM
- #error we need to cope with truncating or extending DIMNUM
-#endif
- bfd_h_put_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
- (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
- bfd_h_put_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
- (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
- bfd_h_put_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
- (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
- bfd_h_put_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
- (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
+#error we need to cope with truncating or extending DIMNUM
+#endif
+ H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
+ ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
+ H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
+ ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
+ H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
+ ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
+ H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
+ ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
}
if (ISFCN (type))
- PUTWORD (abfd, in->x_sym.x_misc.x_fsize,
- (bfd_byte *) ext->x_sym.x_misc.x_fsize);
+ H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
else
{
PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
PUT_LNSZ_SIZE (abfd, in->x_sym.x_misc.x_lnsz.x_size, ext);
}
-end:
+ end:
#ifdef COFF_ADJUST_AUX_OUT_POST
COFF_ADJUST_AUX_OUT_POST (abfd, inp, type, class, indx, numaux, extp);
#endif
@@ -609,27 +627,26 @@ end:
static void
coff_swap_lineno_in (abfd, ext1, in1)
- bfd *abfd;
+ bfd *abfd;
PTR ext1;
PTR in1;
{
- LINENO *ext = (LINENO *)ext1;
- struct internal_lineno *in = (struct internal_lineno *)in1;
+ LINENO *ext = (LINENO *) ext1;
+ struct internal_lineno *in = (struct internal_lineno *) in1;
- in->l_addr.l_symndx = bfd_h_get_32(abfd, (bfd_byte *) ext->l_addr.l_symndx);
- in->l_lnno = GET_LINENO_LNNO(abfd, ext);
+ in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
+ in->l_lnno = GET_LINENO_LNNO (abfd, ext);
}
static unsigned int
coff_swap_lineno_out (abfd, inp, outp)
- bfd *abfd;
- PTR inp;
- PTR outp;
+ bfd *abfd;
+ PTR inp;
+ PTR outp;
{
- struct internal_lineno *in = (struct internal_lineno *)inp;
- struct external_lineno *ext = (struct external_lineno *)outp;
- PUTWORD(abfd, in->l_addr.l_symndx, (bfd_byte *)
- ext->l_addr.l_symndx);
+ struct internal_lineno *in = (struct internal_lineno *) inp;
+ struct external_lineno *ext = (struct external_lineno *) outp;
+ H_PUT_32 (abfd, in->l_addr.l_symndx, ext->l_addr.l_symndx);
PUT_LINENO_LNNO (abfd, in->l_lnno, ext);
return LINESZ;
@@ -639,128 +656,126 @@ coff_swap_lineno_out (abfd, inp, outp)
static void
coff_swap_aouthdr_in (abfd, aouthdr_ext1, aouthdr_int1)
- bfd *abfd;
+ bfd *abfd;
PTR aouthdr_ext1;
PTR aouthdr_int1;
{
- AOUTHDR *aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
- struct internal_aouthdr *aouthdr_int = (struct internal_aouthdr *)aouthdr_int1;
-
- aouthdr_int->magic = bfd_h_get_16(abfd, (bfd_byte *) aouthdr_ext->magic);
- aouthdr_int->vstamp = bfd_h_get_16(abfd, (bfd_byte *) aouthdr_ext->vstamp);
- aouthdr_int->tsize =
- GET_AOUTHDR_TSIZE (abfd, (bfd_byte *) aouthdr_ext->tsize);
- aouthdr_int->dsize =
- GET_AOUTHDR_DSIZE (abfd, (bfd_byte *) aouthdr_ext->dsize);
- aouthdr_int->bsize =
- GET_AOUTHDR_BSIZE (abfd, (bfd_byte *) aouthdr_ext->bsize);
- aouthdr_int->entry =
- GET_AOUTHDR_ENTRY (abfd, (bfd_byte *) aouthdr_ext->entry);
+ AOUTHDR *aouthdr_ext;
+ struct internal_aouthdr *aouthdr_int;
+
+ aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
+ aouthdr_int = (struct internal_aouthdr *) aouthdr_int1;
+ aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
+ aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
+ aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
+ aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
+ aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
+ aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
aouthdr_int->text_start =
- GET_AOUTHDR_TEXT_START (abfd, (bfd_byte *) aouthdr_ext->text_start);
+ GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
aouthdr_int->data_start =
- GET_AOUTHDR_DATA_START (abfd, (bfd_byte *) aouthdr_ext->data_start);
+ GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
#ifdef I960
- aouthdr_int->tagentries = bfd_h_get_32(abfd, (bfd_byte *) aouthdr_ext->tagentries);
+ aouthdr_int->tagentries = H_GET_32 (abfd, aouthdr_ext->tagentries);
#endif
#ifdef APOLLO_M68
- bfd_h_put_32(abfd, aouthdr_int->o_inlib, (bfd_byte *) aouthdr_ext->o_inlib);
- bfd_h_put_32(abfd, aouthdr_int->o_sri, (bfd_byte *) aouthdr_ext->o_sri);
- bfd_h_put_32(abfd, aouthdr_int->vid[0], (bfd_byte *) aouthdr_ext->vid);
- bfd_h_put_32(abfd, aouthdr_int->vid[1], (bfd_byte *) aouthdr_ext->vid + 4);
+ H_PUT_32 (abfd, aouthdr_int->o_inlib, aouthdr_ext->o_inlib);
+ H_PUT_32 (abfd, aouthdr_int->o_sri, aouthdr_ext->o_sri);
+ H_PUT_32 (abfd, aouthdr_int->vid[0], aouthdr_ext->vid);
+ H_PUT_32 (abfd, aouthdr_int->vid[1], aouthdr_ext->vid + 4);
#endif
#ifdef RS6000COFF_C
#ifdef XCOFF64
- aouthdr_int->o_toc = bfd_h_get_64(abfd, aouthdr_ext->o_toc);
+ aouthdr_int->o_toc = H_GET_64 (abfd, aouthdr_ext->o_toc);
#else
- aouthdr_int->o_toc = bfd_h_get_32(abfd, aouthdr_ext->o_toc);
-#endif
- aouthdr_int->o_snentry = bfd_h_get_16(abfd, aouthdr_ext->o_snentry);
- aouthdr_int->o_sntext = bfd_h_get_16(abfd, aouthdr_ext->o_sntext);
- aouthdr_int->o_sndata = bfd_h_get_16(abfd, aouthdr_ext->o_sndata);
- aouthdr_int->o_sntoc = bfd_h_get_16(abfd, aouthdr_ext->o_sntoc);
- aouthdr_int->o_snloader = bfd_h_get_16(abfd, aouthdr_ext->o_snloader);
- aouthdr_int->o_snbss = bfd_h_get_16(abfd, aouthdr_ext->o_snbss);
- aouthdr_int->o_algntext = bfd_h_get_16(abfd, aouthdr_ext->o_algntext);
- aouthdr_int->o_algndata = bfd_h_get_16(abfd, aouthdr_ext->o_algndata);
- aouthdr_int->o_modtype = bfd_h_get_16(abfd, aouthdr_ext->o_modtype);
- aouthdr_int->o_cputype = bfd_h_get_16(abfd, aouthdr_ext->o_cputype);
+ aouthdr_int->o_toc = H_GET_32 (abfd, aouthdr_ext->o_toc);
+#endif
+ aouthdr_int->o_snentry = H_GET_16 (abfd, aouthdr_ext->o_snentry);
+ aouthdr_int->o_sntext = H_GET_16 (abfd, aouthdr_ext->o_sntext);
+ aouthdr_int->o_sndata = H_GET_16 (abfd, aouthdr_ext->o_sndata);
+ aouthdr_int->o_sntoc = H_GET_16 (abfd, aouthdr_ext->o_sntoc);
+ aouthdr_int->o_snloader = H_GET_16 (abfd, aouthdr_ext->o_snloader);
+ aouthdr_int->o_snbss = H_GET_16 (abfd, aouthdr_ext->o_snbss);
+ aouthdr_int->o_algntext = H_GET_16 (abfd, aouthdr_ext->o_algntext);
+ aouthdr_int->o_algndata = H_GET_16 (abfd, aouthdr_ext->o_algndata);
+ aouthdr_int->o_modtype = H_GET_16 (abfd, aouthdr_ext->o_modtype);
+ aouthdr_int->o_cputype = H_GET_16 (abfd, aouthdr_ext->o_cputype);
#ifdef XCOFF64
- aouthdr_int->o_maxstack = bfd_h_get_64(abfd, aouthdr_ext->o_maxstack);
- aouthdr_int->o_maxdata = bfd_h_get_64(abfd, aouthdr_ext->o_maxdata);
+ aouthdr_int->o_maxstack = H_GET_64 (abfd, aouthdr_ext->o_maxstack);
+ aouthdr_int->o_maxdata = H_GET_64 (abfd, aouthdr_ext->o_maxdata);
#else
- aouthdr_int->o_maxstack = bfd_h_get_32(abfd, aouthdr_ext->o_maxstack);
- aouthdr_int->o_maxdata = bfd_h_get_32(abfd, aouthdr_ext->o_maxdata);
+ aouthdr_int->o_maxstack = H_GET_32 (abfd, aouthdr_ext->o_maxstack);
+ aouthdr_int->o_maxdata = H_GET_32 (abfd, aouthdr_ext->o_maxdata);
#endif
#endif
#ifdef MIPSECOFF
- aouthdr_int->bss_start = bfd_h_get_32(abfd, aouthdr_ext->bss_start);
- aouthdr_int->gp_value = bfd_h_get_32(abfd, aouthdr_ext->gp_value);
- aouthdr_int->gprmask = bfd_h_get_32(abfd, aouthdr_ext->gprmask);
- aouthdr_int->cprmask[0] = bfd_h_get_32(abfd, aouthdr_ext->cprmask[0]);
- aouthdr_int->cprmask[1] = bfd_h_get_32(abfd, aouthdr_ext->cprmask[1]);
- aouthdr_int->cprmask[2] = bfd_h_get_32(abfd, aouthdr_ext->cprmask[2]);
- aouthdr_int->cprmask[3] = bfd_h_get_32(abfd, aouthdr_ext->cprmask[3]);
+ aouthdr_int->bss_start = H_GET_32 (abfd, aouthdr_ext->bss_start);
+ aouthdr_int->gp_value = H_GET_32 (abfd, aouthdr_ext->gp_value);
+ aouthdr_int->gprmask = H_GET_32 (abfd, aouthdr_ext->gprmask);
+ aouthdr_int->cprmask[0] = H_GET_32 (abfd, aouthdr_ext->cprmask[0]);
+ aouthdr_int->cprmask[1] = H_GET_32 (abfd, aouthdr_ext->cprmask[1]);
+ aouthdr_int->cprmask[2] = H_GET_32 (abfd, aouthdr_ext->cprmask[2]);
+ aouthdr_int->cprmask[3] = H_GET_32 (abfd, aouthdr_ext->cprmask[3]);
#endif
#ifdef ALPHAECOFF
- aouthdr_int->bss_start = bfd_h_get_64(abfd, aouthdr_ext->bss_start);
- aouthdr_int->gp_value = bfd_h_get_64(abfd, aouthdr_ext->gp_value);
- aouthdr_int->gprmask = bfd_h_get_32(abfd, aouthdr_ext->gprmask);
- aouthdr_int->fprmask = bfd_h_get_32(abfd, aouthdr_ext->fprmask);
+ aouthdr_int->bss_start = H_GET_64 (abfd, aouthdr_ext->bss_start);
+ aouthdr_int->gp_value = H_GET_64 (abfd, aouthdr_ext->gp_value);
+ aouthdr_int->gprmask = H_GET_32 (abfd, aouthdr_ext->gprmask);
+ aouthdr_int->fprmask = H_GET_32 (abfd, aouthdr_ext->fprmask);
#endif
}
static unsigned int
coff_swap_aouthdr_out (abfd, in, out)
- bfd *abfd;
- PTR in;
- PTR out;
+ bfd *abfd;
+ PTR in;
+ PTR out;
{
- struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *)in;
- AOUTHDR *aouthdr_out = (AOUTHDR *)out;
-
- bfd_h_put_16(abfd, aouthdr_in->magic, (bfd_byte *) aouthdr_out->magic);
- bfd_h_put_16(abfd, aouthdr_in->vstamp, (bfd_byte *) aouthdr_out->vstamp);
- PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, (bfd_byte *) aouthdr_out->tsize);
- PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, (bfd_byte *) aouthdr_out->dsize);
- PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, (bfd_byte *) aouthdr_out->bsize);
- PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, (bfd_byte *) aouthdr_out->entry);
+ struct internal_aouthdr *aouthdr_in = (struct internal_aouthdr *) in;
+ AOUTHDR *aouthdr_out = (AOUTHDR *) out;
+
+ H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->magic);
+ H_PUT_16 (abfd, aouthdr_in->vstamp, aouthdr_out->vstamp);
+ PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->tsize);
+ PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->dsize);
+ PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->bsize);
+ PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->entry);
PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
- (bfd_byte *) aouthdr_out->text_start);
+ aouthdr_out->text_start);
PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
- (bfd_byte *) aouthdr_out->data_start);
+ aouthdr_out->data_start);
#ifdef I960
- bfd_h_put_32(abfd, aouthdr_in->tagentries, (bfd_byte *) aouthdr_out->tagentries);
+ H_PUT_32 (abfd, aouthdr_in->tagentries, aouthdr_out->tagentries);
#endif
#ifdef RS6000COFF_C
#ifdef XCOFF64
- bfd_h_put_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
+ H_PUT_64 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
#else
- bfd_h_put_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
-#endif
- bfd_h_put_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
- bfd_h_put_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
- bfd_h_put_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
- bfd_h_put_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
- bfd_h_put_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
- bfd_h_put_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
- bfd_h_put_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
- bfd_h_put_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
- bfd_h_put_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
- bfd_h_put_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
+ H_PUT_32 (abfd, aouthdr_in->o_toc, aouthdr_out->o_toc);
+#endif
+ H_PUT_16 (abfd, aouthdr_in->o_snentry, aouthdr_out->o_snentry);
+ H_PUT_16 (abfd, aouthdr_in->o_sntext, aouthdr_out->o_sntext);
+ H_PUT_16 (abfd, aouthdr_in->o_sndata, aouthdr_out->o_sndata);
+ H_PUT_16 (abfd, aouthdr_in->o_sntoc, aouthdr_out->o_sntoc);
+ H_PUT_16 (abfd, aouthdr_in->o_snloader, aouthdr_out->o_snloader);
+ H_PUT_16 (abfd, aouthdr_in->o_snbss, aouthdr_out->o_snbss);
+ H_PUT_16 (abfd, aouthdr_in->o_algntext, aouthdr_out->o_algntext);
+ H_PUT_16 (abfd, aouthdr_in->o_algndata, aouthdr_out->o_algndata);
+ H_PUT_16 (abfd, aouthdr_in->o_modtype, aouthdr_out->o_modtype);
+ H_PUT_16 (abfd, aouthdr_in->o_cputype, aouthdr_out->o_cputype);
#ifdef XCOFF64
- bfd_h_put_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
- bfd_h_put_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
+ H_PUT_64 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
+ H_PUT_64 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
#else
- bfd_h_put_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
- bfd_h_put_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
+ H_PUT_32 (abfd, aouthdr_in->o_maxstack, aouthdr_out->o_maxstack);
+ H_PUT_32 (abfd, aouthdr_in->o_maxdata, aouthdr_out->o_maxdata);
#endif
memset (aouthdr_out->o_resv2, 0, sizeof aouthdr_out->o_resv2);
#ifdef XCOFF64
@@ -770,23 +785,23 @@ coff_swap_aouthdr_out (abfd, in, out)
#endif
#ifdef MIPSECOFF
- bfd_h_put_32(abfd, aouthdr_in->bss_start, (bfd_byte *) aouthdr_out->bss_start);
- bfd_h_put_32(abfd, aouthdr_in->gp_value, (bfd_byte *) aouthdr_out->gp_value);
- bfd_h_put_32(abfd, aouthdr_in->gprmask, (bfd_byte *) aouthdr_out->gprmask);
- bfd_h_put_32(abfd, aouthdr_in->cprmask[0], (bfd_byte *) aouthdr_out->cprmask[0]);
- bfd_h_put_32(abfd, aouthdr_in->cprmask[1], (bfd_byte *) aouthdr_out->cprmask[1]);
- bfd_h_put_32(abfd, aouthdr_in->cprmask[2], (bfd_byte *) aouthdr_out->cprmask[2]);
- bfd_h_put_32(abfd, aouthdr_in->cprmask[3], (bfd_byte *) aouthdr_out->cprmask[3]);
+ H_PUT_32 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
+ H_PUT_32 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
+ H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
+ H_PUT_32 (abfd, aouthdr_in->cprmask[0], aouthdr_out->cprmask[0]);
+ H_PUT_32 (abfd, aouthdr_in->cprmask[1], aouthdr_out->cprmask[1]);
+ H_PUT_32 (abfd, aouthdr_in->cprmask[2], aouthdr_out->cprmask[2]);
+ H_PUT_32 (abfd, aouthdr_in->cprmask[3], aouthdr_out->cprmask[3]);
#endif
#ifdef ALPHAECOFF
/* FIXME: What does bldrev mean? */
- bfd_h_put_16(abfd, (bfd_vma) 2, (bfd_byte *) aouthdr_out->bldrev);
- bfd_h_put_16(abfd, (bfd_vma) 0, (bfd_byte *) aouthdr_out->padding);
- bfd_h_put_64(abfd, aouthdr_in->bss_start, (bfd_byte *) aouthdr_out->bss_start);
- bfd_h_put_64(abfd, aouthdr_in->gp_value, (bfd_byte *) aouthdr_out->gp_value);
- bfd_h_put_32(abfd, aouthdr_in->gprmask, (bfd_byte *) aouthdr_out->gprmask);
- bfd_h_put_32(abfd, aouthdr_in->fprmask, (bfd_byte *) aouthdr_out->fprmask);
+ H_PUT_16 (abfd, 2, aouthdr_out->bldrev);
+ H_PUT_16 (abfd, 0, aouthdr_out->padding);
+ H_PUT_64 (abfd, aouthdr_in->bss_start, aouthdr_out->bss_start);
+ H_PUT_64 (abfd, aouthdr_in->gp_value, aouthdr_out->gp_value);
+ H_PUT_32 (abfd, aouthdr_in->gprmask, aouthdr_out->gprmask);
+ H_PUT_32 (abfd, aouthdr_in->fprmask, aouthdr_out->fprmask);
#endif
return AOUTSZ;
@@ -794,9 +809,9 @@ coff_swap_aouthdr_out (abfd, in, out)
static void
coff_swap_scnhdr_in (abfd, ext, in)
- bfd *abfd;
- PTR ext;
- PTR in;
+ bfd *abfd;
+ PTR ext;
+ PTR in;
{
SCNHDR *scnhdr_ext = (SCNHDR *) ext;
struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
@@ -805,28 +820,18 @@ coff_swap_scnhdr_in (abfd, ext, in)
COFF_ADJUST_SCNHDR_IN_PRE (abfd, ext, in);
#endif
memcpy(scnhdr_int->s_name, scnhdr_ext->s_name, sizeof (scnhdr_int->s_name));
- scnhdr_int->s_vaddr =
- GET_SCNHDR_VADDR (abfd, (bfd_byte *) scnhdr_ext->s_vaddr);
- scnhdr_int->s_paddr =
- GET_SCNHDR_PADDR (abfd, (bfd_byte *) scnhdr_ext->s_paddr);
- scnhdr_int->s_size =
- GET_SCNHDR_SIZE (abfd, (bfd_byte *) scnhdr_ext->s_size);
-
- scnhdr_int->s_scnptr =
- GET_SCNHDR_SCNPTR (abfd, (bfd_byte *) scnhdr_ext->s_scnptr);
- scnhdr_int->s_relptr =
- GET_SCNHDR_RELPTR (abfd, (bfd_byte *) scnhdr_ext->s_relptr);
- scnhdr_int->s_lnnoptr =
- GET_SCNHDR_LNNOPTR (abfd, (bfd_byte *) scnhdr_ext->s_lnnoptr);
- scnhdr_int->s_flags =
- GET_SCNHDR_FLAGS (abfd, (bfd_byte *) scnhdr_ext->s_flags);
- scnhdr_int->s_nreloc =
- GET_SCNHDR_NRELOC (abfd, (bfd_byte *) scnhdr_ext->s_nreloc);
- scnhdr_int->s_nlnno =
- GET_SCNHDR_NLNNO (abfd, (bfd_byte *) scnhdr_ext->s_nlnno);
+ scnhdr_int->s_vaddr = GET_SCNHDR_VADDR (abfd, scnhdr_ext->s_vaddr);
+ scnhdr_int->s_paddr = GET_SCNHDR_PADDR (abfd, scnhdr_ext->s_paddr);
+ scnhdr_int->s_size = GET_SCNHDR_SIZE (abfd, scnhdr_ext->s_size);
+
+ scnhdr_int->s_scnptr = GET_SCNHDR_SCNPTR (abfd, scnhdr_ext->s_scnptr);
+ scnhdr_int->s_relptr = GET_SCNHDR_RELPTR (abfd, scnhdr_ext->s_relptr);
+ scnhdr_int->s_lnnoptr = GET_SCNHDR_LNNOPTR (abfd, scnhdr_ext->s_lnnoptr);
+ scnhdr_int->s_flags = GET_SCNHDR_FLAGS (abfd, scnhdr_ext->s_flags);
+ scnhdr_int->s_nreloc = GET_SCNHDR_NRELOC (abfd, scnhdr_ext->s_nreloc);
+ scnhdr_int->s_nlnno = GET_SCNHDR_NLNNO (abfd, scnhdr_ext->s_nlnno);
#ifdef I960
- scnhdr_int->s_align =
- GET_SCNHDR_ALIGN (abfd, (bfd_byte *) scnhdr_ext->s_align);
+ scnhdr_int->s_align = GET_SCNHDR_ALIGN (abfd, scnhdr_ext->s_align);
#endif
#ifdef COFF_ADJUST_SCNHDR_IN_POST
COFF_ADJUST_SCNHDR_IN_POST (abfd, ext, in);
@@ -835,42 +840,32 @@ coff_swap_scnhdr_in (abfd, ext, in)
static unsigned int
coff_swap_scnhdr_out (abfd, in, out)
- bfd *abfd;
- PTR in;
- PTR out;
+ bfd *abfd;
+ PTR in;
+ PTR out;
{
- struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *)in;
- SCNHDR *scnhdr_ext = (SCNHDR *)out;
+ struct internal_scnhdr *scnhdr_int = (struct internal_scnhdr *) in;
+ SCNHDR *scnhdr_ext = (SCNHDR *) out;
unsigned int ret = bfd_coff_scnhsz (abfd);
#ifdef COFF_ADJUST_SCNHDR_OUT_PRE
COFF_ADJUST_SCNHDR_OUT_PRE (abfd, in, out);
#endif
- memcpy(scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
-
- PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr,
- (bfd_byte *) scnhdr_ext->s_vaddr);
-
- PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr,
- (bfd_byte *) scnhdr_ext->s_paddr);
- PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size,
- (bfd_byte *) scnhdr_ext->s_size);
+ memcpy (scnhdr_ext->s_name, scnhdr_int->s_name, sizeof (scnhdr_int->s_name));
- PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr,
- (bfd_byte *) scnhdr_ext->s_scnptr);
- PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr,
- (bfd_byte *) scnhdr_ext->s_relptr);
- PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr,
- (bfd_byte *) scnhdr_ext->s_lnnoptr);
- PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags,
- (bfd_byte *) scnhdr_ext->s_flags);
+ PUT_SCNHDR_VADDR (abfd, scnhdr_int->s_vaddr, scnhdr_ext->s_vaddr);
+ PUT_SCNHDR_PADDR (abfd, scnhdr_int->s_paddr, scnhdr_ext->s_paddr);
+ PUT_SCNHDR_SIZE (abfd, scnhdr_int->s_size, scnhdr_ext->s_size);
+ PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr, scnhdr_ext->s_scnptr);
+ PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr, scnhdr_ext->s_relptr);
+ PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr, scnhdr_ext->s_lnnoptr);
+ PUT_SCNHDR_FLAGS (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
#if defined(M88)
- PUTWORD(abfd, scnhdr_int->s_nlnno, (bfd_byte *) scnhdr_ext->s_nlnno);
- PUTWORD(abfd, scnhdr_int->s_nreloc, (bfd_byte *) scnhdr_ext->s_nreloc);
+ H_PUT_32 (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno);
+ H_PUT_32 (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc);
#else
if (scnhdr_int->s_nlnno <= MAX_SCNHDR_NLNNO)
- PUT_SCNHDR_NLNNO(abfd, scnhdr_int->s_nlnno,
- (bfd_byte *) scnhdr_ext->s_nlnno);
+ PUT_SCNHDR_NLNNO (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno);
else
{
char buf[sizeof (scnhdr_int->s_name) + 1];
@@ -881,11 +876,10 @@ coff_swap_scnhdr_out (abfd, in, out)
(_("%s: warning: %s: line number overflow: 0x%lx > 0xffff"),
bfd_get_filename (abfd),
buf, scnhdr_int->s_nlnno);
- PUT_SCNHDR_NLNNO(abfd, 0xffff, (bfd_byte *) scnhdr_ext->s_nlnno);
+ PUT_SCNHDR_NLNNO (abfd, 0xffff, scnhdr_ext->s_nlnno);
}
if (scnhdr_int->s_nreloc <= MAX_SCNHDR_NRELOC)
- PUT_SCNHDR_NRELOC(abfd, scnhdr_int->s_nreloc,
- (bfd_byte *) scnhdr_ext->s_nreloc);
+ PUT_SCNHDR_NRELOC (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc);
else
{
char buf[sizeof (scnhdr_int->s_name) + 1];
@@ -896,13 +890,13 @@ coff_swap_scnhdr_out (abfd, in, out)
bfd_get_filename (abfd),
buf, scnhdr_int->s_nreloc);
bfd_set_error (bfd_error_file_truncated);
- PUT_SCNHDR_NRELOC(abfd, 0xffff, (bfd_byte *) scnhdr_ext->s_nreloc);
+ PUT_SCNHDR_NRELOC (abfd, 0xffff, scnhdr_ext->s_nreloc);
ret = 0;
}
#endif
#ifdef I960
- PUT_SCNHDR_ALIGN (abfd, scnhdr_int->s_align, (bfd_byte *) scnhdr_ext->s_align);
+ PUT_SCNHDR_ALIGN (abfd, scnhdr_int->s_align, scnhdr_ext->s_align);
#endif
#ifdef COFF_ADJUST_SCNHDR_OUT_POST
COFF_ADJUST_SCNHDR_OUT_POST (abfd, in, out);
diff --git a/contrib/binutils/bfd/config.bfd b/contrib/binutils/bfd/config.bfd
index 56025ac..0fe7464 100755
--- a/contrib/binutils/bfd/config.bfd
+++ b/contrib/binutils/bfd/config.bfd
@@ -5,6 +5,8 @@
# Sets the following shell variables:
# targ_defvec Default vector for this target
# targ_selvecs Vectors to build for this target
+# targ64_selvecs Vectors to build if --enable-64-bit-bfd is given
+# or if host is 64 bit.
# targ_archs Architectures for this target
# targ_cflags $(CFLAGS) for this target (FIXME: pretty bogus)
# targ_underscore Whether underscores are used: yes or no
@@ -23,34 +25,38 @@
targ_defvec=
targ_selvecs=
+targ64_selvecs=
targ_cflags=
targ_underscore=no
targ_cpu=`echo $targ | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
case "${targ_cpu}" in
-alpha*) targ_archs=bfd_alpha_arch ;;
-arm*) targ_archs=bfd_arm_arch ;;
-strongarm*) targ_archs=bfd_arm_arch ;;
-thumb*) targ_archs=bfd_arm_arch ;;
-xscale*) targ_archs=bfd_arm_arch ;;
-c30*) targ_archs=bfd_tic30_arch ;;
-c54x*) targ_archs=bfd_tic54x_arch ;;
-hppa*) targ_archs=bfd_hppa_arch ;;
-x86_64) targ_archs=bfd_i386_arch ;;
-i[3456]86) targ_archs=bfd_i386_arch ;;
-i370) targ_archs=bfd_i370_arch ;;
+alpha*) targ_archs=bfd_alpha_arch ;;
+arm*) targ_archs=bfd_arm_arch ;;
+c30*) targ_archs=bfd_tic30_arch ;;
+c54x*) targ_archs=bfd_tic54x_arch ;;
+hppa*) targ_archs=bfd_hppa_arch ;;
+i[3456]86) targ_archs=bfd_i386_arch ;;
+i370) targ_archs=bfd_i370_arch ;;
m6811*|m68hc11*) targ_archs="bfd_m68hc11_arch bfd_m68hc12_arch" ;;
m6812*|m68hc12*) targ_archs="bfd_m68hc12_arch bfd_m68hc11_arch" ;;
-m68*) targ_archs=bfd_m68k_arch ;;
-m88*) targ_archs=bfd_m88k_arch ;;
-mips*) targ_archs=bfd_mips_arch ;;
-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 ;;
-v850*) targ_archs=bfd_v850_arch ;;
-z8k*) targ_archs=bfd_z8k_arch ;;
-*) targ_archs=bfd_${targ_cpu}_arch ;;
+m68*) targ_archs=bfd_m68k_arch ;;
+m88*) targ_archs=bfd_m88k_arch ;;
+mips*) targ_archs=bfd_mips_arch ;;
+pdp11*) targ_archs=bfd_pdp11_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" ;;
+s390*) targ_archs=bfd_s390_arch ;;
+sh*) targ_archs=bfd_sh_arch ;;
+sparc*) targ_archs=bfd_sparc_arch ;;
+strongarm*) targ_archs=bfd_arm_arch ;;
+thumb*) targ_archs=bfd_arm_arch ;;
+v850*) targ_archs=bfd_v850_arch ;;
+x86_64) targ_archs=bfd_i386_arch ;;
+xscale*) targ_archs=bfd_arm_arch ;;
+z8k*) targ_archs=bfd_z8k_arch ;;
+*) targ_archs=bfd_${targ_cpu}_arch ;;
esac
@@ -84,13 +90,17 @@ case "${targ}" in
alpha*-*-*)
targ_defvec=ecoffalpha_little_vec
;;
- ia64*-*-freebsd* | ia64*-*-linux-gnu* | ia64*-*-elf*)
+ ia64*-*-aix*)
+ targ_defvec=bfd_elf64_ia64_aix_little_vec
+ targ_selvecs="bfd_elf64_ia64_aix_big_vec bfd_efi_app_ia64_vec"
+ ;;
+ ia64*-*-freebsd* | ia64*-*-netbsd* | ia64*-*-linux-gnu* | ia64*-*-elf*)
targ_defvec=bfd_elf64_ia64_little_vec
targ_selvecs="bfd_elf64_ia64_big_vec bfd_efi_app_ia64_vec"
;;
ia64*-*-hpux*)
- targ_defvec=bfd_elf64_ia64_big_vec
- targ_selvecs="bfd_elf32_ia64_big_vec"
+ targ_defvec=bfd_elf32_ia64_hpux_big_vec
+ targ_selvecs="bfd_elf64_ia64_hpux_big_vec"
;;
sparc64-*-freebsd* | sparc64-*-netbsd*)
targ_defvec=bfd_elf64_sparc_vec
@@ -103,7 +113,11 @@ case "${targ}" in
targ_selvecs=bfd_elf32_bigarc_vec
;;
- arm-*-netbsd*)
+ arm-*-netbsdelf*)
+ targ_defvec=bfd_elf32_littlearm_vec
+ targ_selvecs="bfd_elf32_bigarm_vec armnetbsd_vec"
+ ;;
+ arm-*-netbsd* | arm-*-openbsd*)
targ_defvec=armnetbsd_vec
targ_underscore=yes
;;
@@ -114,6 +128,7 @@ case "${targ}" in
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
+ targ_cflags=-DARM_COFF_BUGFIX
;;
arm-wince-pe | arm-*-wince)
targ_defvec=armpe_little_vec
@@ -134,16 +149,16 @@ case "${targ}" in
targ_defvec=aout_arm_big_vec
targ_selvecs=aout_arm_little_vec
;;
- arm-*-coff)
+ arm-*-vxworks*)
targ_defvec=armcoff_little_vec
targ_selvecs=armcoff_big_vec
targ_underscore=yes
+ targ_cflags=-DARM_COFF_BUGFIX
;;
- arm-*-vxworks*)
+ arm-*-coff)
targ_defvec=armcoff_little_vec
targ_selvecs=armcoff_big_vec
targ_underscore=yes
- targ_cflags=-DVXWORKS
;;
arm-*-rtems*)
targ_defvec=bfd_elf32_littlearm_vec
@@ -157,6 +172,10 @@ case "${targ}" in
targ_defvec=bfd_elf32_littlearm_vec
targ_selvecs=bfd_elf32_bigarm_vec
;;
+ arm9e-*-elf)
+ 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
@@ -251,6 +270,11 @@ case "${targ}" in
;;
+ h8300*-*-elf)
+ targ_defvec=bfd_elf32_h8300_vec
+ targ_underscore=yes
+ ;;
+
h8300*-*-*)
targ_defvec=h8300coff_vec
targ_underscore=yes
@@ -369,11 +393,15 @@ case "${targ}" in
targ_defvec=bfd_elf32_i386_vec
targ_selvecs="i386linux_vec bfd_efi_app_ia32_vec"
;;
-#ifdef BFD64
+#ifdef BFD64
x86_64-*-freebsd*)
targ_defvec=bfd_elf64_x86_64_vec
targ_selvecs="bfd_elf32_i386_vec i386coff_vec bfd_efi_app_ia32_vec"
;;
+ x86_64-*-netbsd*)
+ targ_defvec=bfd_elf64_x86_64_vec
+ targ_selvecs="bfd_elf32_i386_vec i386netbsd_vec i386coff_vec bfd_efi_app_ia32_vec"
+ ;;
x86_64-*-linux-gnu*)
targ_defvec=bfd_elf64_x86_64_vec
targ_selvecs="bfd_elf32_i386_vec i386linux_vec bfd_efi_app_ia32_vec"
@@ -544,7 +572,16 @@ case "${targ}" in
targ_selvecs="m68knetbsd_vec hp300bsd_vec sunos_big_vec"
targ_underscore=yes
;;
- m68*-*-netbsd* | m68*-*-openbsd*)
+ m68*-*-netbsdelf*)
+ targ_defvec=bfd_elf32_m68k_vec
+ targ_selvecs="m68knetbsd_vec m68k4knetbsd_vec hp300bsd_vec sunos_big_vec"
+ ;;
+ m68*-*-netbsdaout* | m68*-*-netbsd*)
+ targ_defvec=m68knetbsd_vec
+ targ_selvecs="m68k4knetbsd_vec bfd_elf32_m68k_vec hp300bsd_vec sunos_big_vec"
+ targ_underscore=yes
+ ;;
+ m68*-*-openbsd*)
targ_defvec=m68knetbsd_vec
targ_selvecs="m68k4knetbsd_vec hp300bsd_vec sunos_big_vec"
targ_underscore=yes
@@ -598,11 +635,11 @@ case "${targ}" in
targ_defvec=ecoff_big_vec
targ_selvecs=ecoff_little_vec
;;
- mips-dec-netbsd* | mips*el*-*-netbsd*)
+ mips*el-*-netbsd*)
targ_defvec=bfd_elf32_littlemips_vec
targ_selvecs="bfd_elf32_bigmips_vec ecoff_little_vec ecoff_big_vec"
;;
- mips*-*-netbsd*)
+ mips*-*-netbsd*)
targ_defvec=bfd_elf32_bigmips_vec
targ_selvecs="bfd_elf32_littlemips_vec ecoff_big_vec ecoff_little_vec"
;;
@@ -622,10 +659,12 @@ case "${targ}" in
targ_defvec=ecoff_big_vec
targ_selvecs=ecoff_little_vec
;;
+#ifdef BFD64
mips*-*-irix6*)
targ_defvec=bfd_elf32_bigmips_vec
targ_selvecs="bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec"
;;
+#endif
mips*-*-irix5*)
targ_defvec=bfd_elf32_bigmips_vec
targ_selvecs="bfd_elf32_littlemips_vec ecoff_big_vec ecoff_little_vec"
@@ -667,23 +706,38 @@ case "${targ}" in
targ_defvec=bfd_elf32_bigmips_vec
targ_selvecs="bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec"
;;
- mips*el*-*-openbsd*)
+ mips*el-*-openbsd*)
targ_defvec=bfd_elf32_littlemips_vec
targ_selvecs="bfd_elf32_bigmips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec ecoff_little_vec ecoff_big_vec"
;;
- mips*el*-*-linux-gnu*)
- targ_defvec=bfd_elf32_tradlittlemips_vec
- targ_selvecs="bfd_elf32_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf64_tradbigmips_vec ecoff_little_vec ecoff_big_vec"
- ;;
mips*-*-openbsd*)
targ_defvec=bfd_elf32_bigmips_vec
targ_selvecs="bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec ecoff_big_vec ecoff_little_vec"
;;
- mips*-*-linux-gnu*)
+#ifdef BFD64
+ mips64*el-*-linux*)
+ targ_defvec=bfd_elf32_tradlittlemips_vec
+ targ_selvecs="bfd_elf32_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf64_tradbigmips_vec"
+ ;;
+ mips64*-*-linux*)
+ targ_defvec=bfd_elf32_tradbigmips_vec
+ targ_selvecs="bfd_elf32_tradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec"
+ ;;
+#endif
+ mips*el-*-linux*)
+ targ_defvec=bfd_elf32_tradlittlemips_vec
+ targ_selvecs="bfd_elf32_tradbigmips_vec bfd_elf64_tradlittlemips_vec bfd_elf64_tradbigmips_vec ecoff_little_vec ecoff_big_vec"
+ ;;
+ mips*-*-linux*)
targ_defvec=bfd_elf32_tradbigmips_vec
targ_selvecs="bfd_elf32_tradlittlemips_vec bfd_elf64_tradbigmips_vec bfd_elf64_tradlittlemips_vec ecoff_big_vec ecoff_little_vec"
;;
-
+#ifdef BFD64
+ mmix-*-*)
+ targ_defvec=bfd_elf64_mmix_vec
+ targ_selvecs=bfd_mmo_vec
+ ;;
+#endif
mn10200-*-*)
targ_defvec=bfd_elf32_mn10200_vec
;;
@@ -701,6 +755,15 @@ case "${targ}" in
targ_underscore=yes
;;
+ openrisc-*-elf)
+ targ_defvec=bfd_elf32_openrisc_vec
+ ;;
+
+ pdp11-*-*)
+ targ_defvec=pdp11_aout_vec
+ targ_underscore=yes
+ ;;
+
pj-*-*)
targ_defvec=bfd_elf32_pj_vec
targ_selvecs="bfd_elf32_pj_vec bfd_elf32_pjl_vec"
@@ -711,15 +774,34 @@ case "${targ}" in
targ_selvecs="bfd_elf32_pjl_vec bfd_elf32_pj_vec bfd_elf32_i386_vec"
;;
- powerpc-*-aix* | powerpc-*-beos*)
+ powerpc-*-aix* | powerpc-*-beos* | rs6000-*-*)
targ_defvec=rs6000coff_vec
- targ_selvecs="rs6000coff64_vec"
+ targ64_selvecs=rs6000coff64_vec
+ case "${targ}" in
+ *-*-aix4.[3456789]* | *-*-aix[56789]*)
+ want64=true;;
+ esac
+ ;;
+#ifdef BFD64
+ powerpc64-*-aix*)
+ targ_defvec=rs6000coff64_vec
+ targ_selvecs=rs6000coff_vec
+ ;;
+ powerpc64-*-elf* | powerpc-*-elf64* | powerpc64-*-linux*)
+ targ_defvec=bfd_elf64_powerpc_vec
+ targ_selvecs="bfd_elf64_powerpcle_vec bfd_elf32_powerpc_vec bfd_elf32_powerpcle_vec rs6000coff_vec rs6000coff64_vec"
+ ;;
+ powerpc64le-*-elf* | powerpcle-*-elf64*)
+ targ_defvec=bfd_elf64_powerpcle_vec
+ targ_selvecs="bfd_elf64_powerpc_vec bfd_elf32_powerpcle_vec bfd_elf32_powerpc_vec rs6000coff_vec rs6000coff64_vec"
;;
+#endif
powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \
powerpc-*-solaris2* | powerpc-*-linux-gnu* | powerpc-*-rtems* | \
powerpc-*-chorus* | powerpc-*-vxworks*)
targ_defvec=bfd_elf32_powerpc_vec
targ_selvecs="rs6000coff_vec bfd_elf32_powerpcle_vec ppcboot_vec"
+ targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec"
;;
powerpc-*-macos* | powerpc-*-mpw*)
targ_defvec=pmac_xcoff_vec
@@ -733,6 +815,7 @@ case "${targ}" in
powerpcle-*-rtems*)
targ_defvec=bfd_elf32_powerpcle_vec
targ_selvecs="rs6000coff_vec bfd_elf32_powerpc_vec ppcboot_vec"
+ targ64_selvecs="bfd_elf64_powerpc_vec bfd_elf64_powerpcle_vec"
;;
powerpcle-*-pe | powerpcle-*-winnt* | powerpcle-*-cygwin*)
@@ -740,14 +823,34 @@ case "${targ}" in
targ_selvecs="bfd_powerpcle_pei_vec bfd_powerpc_pei_vec bfd_powerpcle_pe_vec bfd_powerpc_pe_vec"
;;
- rs6000-*-*)
- targ_defvec=rs6000coff_vec
+ s390-*-linux*)
+ targ_defvec=bfd_elf32_s390_vec
+ ;;
+#ifdef BFD64
+ s390x-*-linux*)
+ targ_defvec=bfd_elf64_s390_vec
;;
+#endif
sh-*-linux*)
targ_defvec=bfd_elf32_shblin_vec
targ_selvecs=bfd_elf32_shlin_vec
;;
+ sh*eb-*-linux*)
+ targ_defvec=bfd_elf32_shblin_vec
+ ;;
+ sh*-*-linux*)
+ targ_defvec=bfd_elf32_shlin_vec
+ ;;
+
+ sh*le-*-netbsdelf*)
+ targ_defvec=bfd_elf32_shlnbsd_vec
+ targ_selvecs="bfd_elf32_shnbsd_vec shcoff_vec shlcoff_vec"
+ ;;
+ sh*-*-netbsdelf*)
+ targ_defvec=bfd_elf32_shnbsd_vec
+ targ_selvecs="bfd_elf32_shlnbsd_vec shcoff_vec shlcoff_vec"
+ ;;
sh-*-elf* | sh-*-rtemself*)
targ_defvec=bfd_elf32_sh_vec
@@ -895,6 +998,10 @@ case "${targ}" in
targ_defvec=w65_vec
;;
+ xstormy16-*-elf)
+ targ_defvec=bfd_elf32_xstormy16_vec
+ ;;
+
z8k*-*-*)
targ_defvec=z8kcoff_vec
targ_underscore=yes
@@ -926,6 +1033,12 @@ case "${targ}" in
;;
esac
+case "${host64}${want64}" in
+ *true*)
+ targ_selvecs="${targ_selvecs} ${targ64_selvecs}"
+ ;;
+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
diff --git a/contrib/binutils/bfd/configure b/contrib/binutils/bfd/configure
index 75270e2..2176f31 100755
--- a/contrib/binutils/bfd/configure
+++ b/contrib/binutils/bfd/configure
@@ -57,7 +57,6 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
-sitefile=
srcdir=
target=NONE
verbose=
@@ -172,7 +171,6 @@ 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
@@ -343,11 +341,6 @@ 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=*)
@@ -513,16 +506,12 @@ fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
-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
+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
-else
- CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
@@ -561,12 +550,12 @@ else
fi
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:565: checking for Cygwin environment" >&5
+echo "configure:554: 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 570 "configure"
+#line 559 "configure"
#include "confdefs.h"
int main() {
@@ -577,7 +566,7 @@ int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
@@ -594,19 +583,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:598: checking for mingw32 environment" >&5
+echo "configure:587: 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 603 "configure"
+#line 592 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:610: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:599: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
@@ -671,7 +660,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:675: checking host system type" >&5
+echo "configure:664: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -692,7 +681,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:696: checking target system type" >&5
+echo "configure:685: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -710,7 +699,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:714: checking build system type" >&5
+echo "configure:703: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -735,7 +724,7 @@ 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:739: checking for $ac_word" >&5
+echo "configure:728: 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
@@ -765,7 +754,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:769: checking for $ac_word" >&5
+echo "configure:758: 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
@@ -816,7 +805,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:820: checking for $ac_word" >&5
+echo "configure:809: 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
@@ -848,7 +837,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:852: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:841: 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.
@@ -859,12 +848,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 863 "configure"
+#line 852 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:857: \"$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
@@ -890,12 +879,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:894: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:883: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:899: checking whether we are using GNU C" >&5
+echo "configure:888: 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
@@ -904,7 +893,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:908: \"$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:897: \"$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
@@ -923,7 +912,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:927: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:916: 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
@@ -955,7 +944,7 @@ else
fi
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:959: checking for POSIXized ISC" >&5
+echo "configure:948: 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
@@ -988,7 +977,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:992: checking for a BSD compatible install" >&5
+echo "configure:981: 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
@@ -1041,7 +1030,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:1045: checking whether build environment is sane" >&5
+echo "configure:1034: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
@@ -1098,7 +1087,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:1102: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:1091: 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
@@ -1127,7 +1116,7 @@ fi
PACKAGE=bfd
-VERSION=2.11.2
+VERSION=2.11.93
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; }
@@ -1144,7 +1133,7 @@ EOF
missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:1148: checking for working aclocal" >&5
+echo "configure:1137: 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.
@@ -1157,7 +1146,7 @@ else
fi
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1161: checking for working autoconf" >&5
+echo "configure:1150: 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.
@@ -1170,7 +1159,7 @@ else
fi
echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:1174: checking for working automake" >&5
+echo "configure:1163: 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.
@@ -1183,7 +1172,7 @@ else
fi
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1187: checking for working autoheader" >&5
+echo "configure:1176: 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.
@@ -1196,7 +1185,7 @@ else
fi
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1200: checking for working makeinfo" >&5
+echo "configure:1189: 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.
@@ -1209,6 +1198,19 @@ else
fi
+# Uncomment the next line to remove the date from the reported bfd version
+#is_release=y
+
+bfd_version=`echo "${VERSION}" | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$/\1\2\3\4\5/'`
+
+bfd_version_string="\"${VERSION}\""
+bfd_version_date=`sed -e 's/.*DATE //' < ${srcdir}/version.h`
+if test x${is_release} = x; then
+ bfd_version_string="\"${VERSION} ${bfd_version_date}\""
+fi
+
+
+
if test $host != $build; then
ac_tool_prefix=${host_alias}-
@@ -1219,7 +1221,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1223: checking for $ac_word" >&5
+echo "configure:1225: 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
@@ -1251,7 +1253,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1255: checking for $ac_word" >&5
+echo "configure:1257: 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
@@ -1283,7 +1285,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1287: checking for $ac_word" >&5
+echo "configure:1289: 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
@@ -1320,7 +1322,7 @@ fi
if test "${enable_shared+set}" = set; then
enableval="$enable_shared"
p=${PACKAGE-default}
-case "$enableval" in
+case $enableval in
yes) enable_shared=yes ;;
no) enable_shared=no ;;
*)
@@ -1344,7 +1346,7 @@ fi
if test "${enable_static+set}" = set; then
enableval="$enable_static"
p=${PACKAGE-default}
-case "$enableval" in
+case $enableval in
yes) enable_static=yes ;;
no) enable_static=no ;;
*)
@@ -1367,7 +1369,7 @@ fi
if test "${enable_fast_install+set}" = set; then
enableval="$enable_fast_install"
p=${PACKAGE-default}
-case "$enableval" in
+case $enableval in
yes) enable_fast_install=yes ;;
no) enable_fast_install=no ;;
*)
@@ -1395,10 +1397,10 @@ else
fi
ac_prog=ld
-if test "$ac_cv_prog_gcc" = yes; then
+if test "$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:1402: checking for ld used by GCC" >&5
+echo "configure:1404: checking for ld used by GCC" >&5
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
@@ -1406,7 +1408,7 @@ echo "configure:1402: checking for ld used by GCC" >&5
*)
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
esac
- case "$ac_prog" in
+ case $ac_prog in
# Accept absolute paths.
[\\/]* | [A-Za-z]:[\\/]*)
re_direlt='/[^/][^/]*/\.\./'
@@ -1428,12 +1430,12 @@ echo "configure:1402: 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:1432: checking for GNU ld" >&5
+echo "configure:1434: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1435: checking for non-GNU ld" >&5
+echo "configure:1437: checking for non-GNU ld" >&5
fi
-if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
+if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -z "$LD"; then
@@ -1441,11 +1443,11 @@ else
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- ac_cv_path_LD="$ac_dir/$ac_prog"
+ lt_cv_path_LD="$ac_dir/$ac_prog"
# Check to see if the program is GNU ld. I'd rather use --version,
# but apparently some GNU ld's only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
- if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+ if "$lt_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
@@ -1454,11 +1456,11 @@ else
done
IFS="$ac_save_ifs"
else
- ac_cv_path_LD="$LD" # Let the user override the test with a path.
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
fi
fi
-LD="$ac_cv_path_LD"
+LD="$lt_cv_path_LD"
if test -n "$LD"; then
echo "$ac_t""$LD" 1>&6
else
@@ -1466,24 +1468,24 @@ else
fi
test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1470: checking if the linker ($LD) is GNU ld" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
+echo "configure:1472: checking if the linker ($LD) is GNU ld" >&5
+if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# I'd rather use --version here, but apparently some GNU ld's only accept -v.
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
- ac_cv_prog_gnu_ld=yes
+ lt_cv_prog_gnu_ld=yes
else
- ac_cv_prog_gnu_ld=no
+ lt_cv_prog_gnu_ld=no
fi
fi
-echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
-with_gnu_ld=$ac_cv_prog_gnu_ld
+echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
+with_gnu_ld=$lt_cv_prog_gnu_ld
echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
-echo "configure:1487: checking for $LD option to reload object files" >&5
+echo "configure:1489: checking for $LD option to reload object files" >&5
if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1495,13 +1497,13 @@ reload_flag=$lt_cv_ld_reload_flag
test -n "$reload_flag" && reload_flag=" $reload_flag"
echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1499: checking for BSD-compatible nm" >&5
-if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
+echo "configure:1501: checking for BSD-compatible nm" >&5
+if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$NM"; then
# Let the user override the test.
- ac_cv_path_NM="$NM"
+ lt_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
@@ -1513,27 +1515,27 @@ else
# nm: unknown option "B" ignored
# Tru64's nm complains that /dev/null is an invalid object file
if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
- ac_cv_path_NM="$tmp_nm -B"
+ lt_cv_path_NM="$tmp_nm -B"
break
elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$tmp_nm -p"
+ lt_cv_path_NM="$tmp_nm -p"
break
else
- ac_cv_path_NM=${ac_cv_path_NM="$tmp_nm"} # keep the first match, but
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
continue # so that we can try to find one that supports BSD flags
fi
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
+ test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
fi
fi
-NM="$ac_cv_path_NM"
+NM="$lt_cv_path_NM"
echo "$ac_t""$NM" 1>&6
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1537: checking whether ln -s works" >&5
+echo "configure:1539: 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
@@ -1554,7 +1556,7 @@ else
fi
echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
-echo "configure:1558: checking how to recognise dependant libraries" >&5
+echo "configure:1560: checking how to recognise dependant libraries" >&5
if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1572,8 +1574,8 @@ lt_cv_deplibs_check_method='unknown'
# If you have `file' or equivalent on your system and you're not sure
# whether `pass_all' will *always* work, you probably want this one.
-case "$host_os" in
-aix4*)
+case $host_os in
+aix*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -1582,8 +1584,8 @@ beos*)
;;
bsdi4*)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
lt_cv_file_magic_test_file=/shlib/libc.so
;;
@@ -1592,14 +1594,27 @@ cygwin* | mingw* |pw32*)
lt_cv_file_magic_cmd='$OBJDUMP -f'
;;
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ case "$host_os" in
+ rhapsody* | darwin1.012)
+ lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
+ ;;
+ *) # Darwin 1.3 on
+ lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
+ ;;
+ esac
+ ;;
+
freebsd* )
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- case "$host_cpu" in
+ case $host_cpu in
i*86 )
# Not sure whether the presence of OpenBSD here was a mistake.
# Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
;;
esac
@@ -1612,29 +1627,28 @@ gnu*)
lt_cv_deplibs_check_method=pass_all
;;
-hpux10.20*)
- # TODO: Does this work for hpux-11 too?
- lt_cv_deplibs_check_method='file_magic (s0-90-90-9|PA-RISC0-9.0-9) shared library'
+hpux10.20*|hpux11*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=/usr/lib/libc.sl
;;
irix5* | irix6*)
- case "$host_os" in
+ case $host_os in
irix5*)
# this will be overridden with pass_all, but let us keep it just in case
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
;;
*)
- case "$LD" in
+ case $LD in
*-32|*"-32 ") libmagic=32-bit;;
*-n32|*"-n32 ") libmagic=N32;;
*-64|*"-64 ") libmagic=64-bit;;
*) libmagic=never-match;;
esac
# this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
- ;;
+ lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
+ ;;
esac
lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
lt_cv_deplibs_check_method=pass_all
@@ -1642,25 +1656,30 @@ irix5* | irix6*)
# This must be Linux ELF.
linux-gnu*)
- case "$host_cpu" in
- alpha* | i*86 | powerpc* | sparc* | ia64* )
+ case $host_cpu in
+ alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
lt_cv_deplibs_check_method=pass_all ;;
*)
# glibc up to 2.1.1 does not perform some relocations on ARM
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
- esac
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
+ esac
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
;;
netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then :
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
else
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
fi
;;
+newsos6)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
+ ;;
+
osf3* | osf4* | osf5*)
# this will be overridden with pass_all, but let us keep it just in case
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
@@ -1677,14 +1696,18 @@ solaris*)
lt_cv_file_magic_test_file=/lib/libc.so
;;
+sysv5uw[78]* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- case "$host_vendor" in
+ case $host_vendor in
ncr)
lt_cv_deplibs_check_method=pass_all
;;
motorola)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
;;
esac
;;
@@ -1697,13 +1720,13 @@ file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:1701: checking for object suffix" >&5
+echo "configure:1724: checking for object suffix" >&5
if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftest*
echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:1707: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1730: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
for ac_file in conftest.*; do
case $ac_file in
*.c) ;;
@@ -1723,7 +1746,7 @@ ac_objext=$ac_cv_objext
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1727: checking for executable suffix" >&5
+echo "configure:1750: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1733,10 +1756,10 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:1737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:1760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
- *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+ *.c | *.o | *.obj) ;;
*) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
esac
done
@@ -1756,15 +1779,15 @@ ac_exeext=$EXEEXT
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
# Only perform the check for file, if the check method requires it
-case "$deplibs_check_method" in
+case $deplibs_check_method in
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
-echo "configure:1764: checking for ${ac_tool_prefix}file" >&5
+echo "configure:1787: checking for ${ac_tool_prefix}file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- case "$MAGIC_CMD" in
+ case $MAGIC_CMD in
/*)
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
;;
@@ -1780,7 +1803,7 @@ else
if test -f $ac_dir/${ac_tool_prefix}file; then
lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
if test -n "$file_magic_test_file"; then
- case "$deplibs_check_method" in
+ case $deplibs_check_method in
"file_magic "*)
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
@@ -1822,11 +1845,11 @@ fi
if test -z "$lt_cv_path_MAGIC_CMD"; then
if test -n "$ac_tool_prefix"; then
echo $ac_n "checking for file""... $ac_c" 1>&6
-echo "configure:1826: checking for file" >&5
+echo "configure:1849: checking for file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- case "$MAGIC_CMD" in
+ case $MAGIC_CMD in
/*)
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
;;
@@ -1842,7 +1865,7 @@ else
if test -f $ac_dir/file; then
lt_cv_path_MAGIC_CMD="$ac_dir/file"
if test -n "$file_magic_test_file"; then
- case "$deplibs_check_method" in
+ case $deplibs_check_method in
"file_magic "*)
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
@@ -1893,7 +1916,7 @@ esac
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1897: checking for $ac_word" >&5
+echo "configure:1920: 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
@@ -1925,7 +1948,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1929: checking for $ac_word" >&5
+echo "configure:1952: 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
@@ -1960,7 +1983,7 @@ fi
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1964: checking for $ac_word" >&5
+echo "configure:1987: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1992,7 +2015,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1996: checking for $ac_word" >&5
+echo "configure:2019: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2030,8 +2053,8 @@ libtool_flags="--cache-file=$cache_file"
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
-test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
-test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
+test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
+test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
@@ -2056,12 +2079,12 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
# Some flags need to be propagated to the compiler or linker for good
# libtool support.
-case "$host" in
+case $host in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 2063 "configure"' > conftest.$ac_ext
- if { (eval echo configure:2064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- case "`/usr/bin/file conftest.o`" in
+ echo '#line 2086 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:2087: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ case `/usr/bin/file conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -32"
;;
@@ -2081,7 +2104,7 @@ case "$host" in
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:2085: checking whether the C compiler needs -belf" >&5
+echo "configure:2108: 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
@@ -2094,14 +2117,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 2098 "configure"
+#line 2121 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:2105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2128: \"$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
@@ -2211,7 +2234,6 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
# clobbered by the next message.
exec 5>>./config.log
-
@@ -2260,7 +2282,7 @@ else
want_mmap=false
fi
-build_warnings="-W -Wall"
+build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
# Check whether --enable-build-warnings or --disable-build-warnings was given.
if test "${enable_build_warnings+set}" = set; then
enableval="$enable_build_warnings"
@@ -2290,28 +2312,9 @@ fi
if test -z "$target" ; then
{ echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
fi
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
- 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"
-
-# sed with no file args requires a program.
-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:2315: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:2318: 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"
@@ -2336,7 +2339,7 @@ fi
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:2340: checking for executable suffix" >&5
+echo "configure:2343: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2346,10 +2349,10 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:2350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:2353: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
- *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+ *.c | *.o | *.obj) ;;
*) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
esac
done
@@ -2369,13 +2372,14 @@ ac_exeext=$EXEEXT
host64=false
target64=false
+bfd_default_target_size=32
# host stuff:
# 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:2379: checking for $ac_word" >&5
+echo "configure:2383: 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
@@ -2405,7 +2409,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2409: checking for $ac_word" >&5
+echo "configure:2413: 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
@@ -2456,7 +2460,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2460: checking for $ac_word" >&5
+echo "configure:2464: 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
@@ -2488,7 +2492,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2492: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2496: 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.
@@ -2499,12 +2503,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 2503 "configure"
+#line 2507 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:2508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2512: \"$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
@@ -2530,12 +2534,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2534: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2538: 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:2539: checking whether we are using GNU C" >&5
+echo "configure:2543: 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
@@ -2544,7 +2548,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2552: \"$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
@@ -2563,7 +2567,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2567: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2571: 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
@@ -2595,9 +2599,9 @@ else
fi
-ALL_LINGUAS=
+ALL_LINGUAS="fr tr ja es sv"
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2601: checking how to run the C preprocessor" >&5
+echo "configure:2605: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -2612,13 +2616,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 2616 "configure"
+#line 2620 "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:2622: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2626: \"$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
:
@@ -2629,13 +2633,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 2633 "configure"
+#line 2637 "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:2639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2643: \"$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
:
@@ -2646,13 +2650,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 2650 "configure"
+#line 2654 "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:2656: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2660: \"$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
:
@@ -2679,7 +2683,7 @@ echo "$ac_t""$CPP" 1>&6
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2683: checking for $ac_word" >&5
+echo "configure:2687: 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
@@ -2707,12 +2711,12 @@ else
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2711: checking for ANSI C header files" >&5
+echo "configure:2715: 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 2716 "configure"
+#line 2720 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -2720,7 +2724,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2728: \"$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*
@@ -2737,7 +2741,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2741 "configure"
+#line 2745 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -2755,7 +2759,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2759 "configure"
+#line 2763 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -2776,7 +2780,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 2780 "configure"
+#line 2784 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -2787,7 +2791,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:2791: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -2811,12 +2815,12 @@ EOF
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2815: checking for working const" >&5
+echo "configure:2819: 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 2820 "configure"
+#line 2824 "configure"
#include "confdefs.h"
int main() {
@@ -2865,7 +2869,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:2869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -2886,21 +2890,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:2890: checking for inline" >&5
+echo "configure:2894: 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 2897 "configure"
+#line 2901 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:2904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -2926,12 +2930,12 @@ EOF
esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:2930: checking for off_t" >&5
+echo "configure:2934: 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 2935 "configure"
+#line 2939 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -2959,12 +2963,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:2963: checking for size_t" >&5
+echo "configure:2967: 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 2968 "configure"
+#line 2972 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -2994,19 +2998,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:2998: checking for working alloca.h" >&5
+echo "configure:3002: 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 3003 "configure"
+#line 3007 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:3010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3014: \"$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
@@ -3027,12 +3031,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:3031: checking for alloca" >&5
+echo "configure:3035: 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 3036 "configure"
+#line 3040 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -3060,7 +3064,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:3064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3068: \"$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
@@ -3092,12 +3096,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:3096: checking whether alloca needs Cray hooks" >&5
+echo "configure:3100: 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 3101 "configure"
+#line 3105 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -3122,12 +3126,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:3126: checking for $ac_func" >&5
+echo "configure:3130: 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 3131 "configure"
+#line 3135 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3150,7 +3154,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3158: \"$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
@@ -3177,7 +3181,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:3181: checking stack direction for C alloca" >&5
+echo "configure:3185: 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
@@ -3185,7 +3189,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 3189 "configure"
+#line 3193 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -3204,7 +3208,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:3208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3212: \"$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
@@ -3229,17 +3233,17 @@ for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3233: checking for $ac_hdr" >&5
+echo "configure:3237: 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 3238 "configure"
+#line 3242 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3243: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3247: \"$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*
@@ -3268,12 +3272,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3272: checking for $ac_func" >&5
+echo "configure:3276: 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 3277 "configure"
+#line 3281 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3296,7 +3300,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3304: \"$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
@@ -3321,7 +3325,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:3325: checking for working mmap" >&5
+echo "configure:3329: 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
@@ -3329,7 +3333,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 3333 "configure"
+#line 3337 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -3469,7 +3473,7 @@ main()
}
EOF
-if { (eval echo configure:3473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3477: \"$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
@@ -3497,17 +3501,17 @@ unistd.h values.h sys/param.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3501: checking for $ac_hdr" >&5
+echo "configure:3505: 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 3506 "configure"
+#line 3510 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3511: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3515: \"$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*
@@ -3537,12 +3541,12 @@ done
__argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3541: checking for $ac_func" >&5
+echo "configure:3545: 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 3546 "configure"
+#line 3550 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3565,7 +3569,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3573: \"$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
@@ -3594,12 +3598,12 @@ done
for ac_func in stpcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3598: checking for $ac_func" >&5
+echo "configure:3602: 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 3603 "configure"
+#line 3607 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3622,7 +3626,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3630: \"$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
@@ -3656,19 +3660,19 @@ EOF
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:3660: checking for LC_MESSAGES" >&5
+echo "configure:3664: 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 3665 "configure"
+#line 3669 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:3672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3676: \"$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
@@ -3689,7 +3693,7 @@ EOF
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:3693: checking whether NLS is requested" >&5
+echo "configure:3697: 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"
@@ -3709,7 +3713,7 @@ fi
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:3713: checking whether included gettext is requested" >&5
+echo "configure:3717: 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"
@@ -3728,17 +3732,17 @@ fi
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:3732: checking for libintl.h" >&5
+echo "configure:3736: 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 3737 "configure"
+#line 3741 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3742: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3746: \"$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*
@@ -3755,19 +3759,19 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:3759: checking for gettext in libc" >&5
+echo "configure:3763: 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 3764 "configure"
+#line 3768 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:3771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3775: \"$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
@@ -3783,7 +3787,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
if test "$gt_cv_func_gettext_libc" != "yes"; then
echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:3787: checking for bindtextdomain in -lintl" >&5
+echo "configure:3791: 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
@@ -3791,7 +3795,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3795 "configure"
+#line 3799 "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
@@ -3802,7 +3806,7 @@ int main() {
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:3806: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3810: \"$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
@@ -3818,19 +3822,19 @@ fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:3822: checking for gettext in libintl" >&5
+echo "configure:3826: 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 3827 "configure"
+#line 3831 "configure"
#include "confdefs.h"
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:3834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3838: \"$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
@@ -3858,7 +3862,7 @@ EOF
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3862: checking for $ac_word" >&5
+echo "configure:3866: 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
@@ -3892,12 +3896,12 @@ fi
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3896: checking for $ac_func" >&5
+echo "configure:3900: 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 3901 "configure"
+#line 3905 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3920,7 +3924,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -3947,7 +3951,7 @@ done
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3951: checking for $ac_word" >&5
+echo "configure:3955: 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
@@ -3983,7 +3987,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3987: checking for $ac_word" >&5
+echo "configure:3991: 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
@@ -4015,7 +4019,7 @@ else
fi
cat > conftest.$ac_ext <<EOF
-#line 4019 "configure"
+#line 4023 "configure"
#include "confdefs.h"
int main() {
@@ -4023,7 +4027,7 @@ extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:4027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
CATOBJEXT=.gmo
DATADIRNAME=share
@@ -4055,7 +4059,7 @@ fi
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4059: checking for $ac_word" >&5
+echo "configure:4063: 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
@@ -4089,7 +4093,7 @@ fi
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4093: checking for $ac_word" >&5
+echo "configure:4097: 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
@@ -4125,7 +4129,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4129: checking for $ac_word" >&5
+echo "configure:4133: 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
@@ -4215,7 +4219,7 @@ fi
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:4219: checking for catalogs to be installed" >&5
+echo "configure:4223: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
@@ -4243,17 +4247,17 @@ echo "configure:4219: checking for catalogs to be installed" >&5
if test "$CATOBJEXT" = ".cat"; then
ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:4247: checking for linux/version.h" >&5
+echo "configure:4251: 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 4252 "configure"
+#line 4256 "configure"
#include "confdefs.h"
#include <linux/version.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4261: \"$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*
@@ -4298,7 +4302,7 @@ fi
l=
- if test -d $srcdir/po; then
+ if test -f $srcdir/po/POTFILES.in; then
test -d po || mkdir po
if test "x$srcdir" != "x."; then
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
@@ -4331,7 +4335,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:4335: checking for a BSD compatible install" >&5
+echo "configure:4339: 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
@@ -4414,7 +4418,7 @@ if test "x$cross_compiling" = "xno"; then
EXEEXT_FOR_BUILD='$(EXEEXT)'
else
echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6
-echo "configure:4418: checking for build system executable suffix" >&5
+echo "configure:4422: 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
@@ -4442,17 +4446,17 @@ for ac_hdr in stddef.h string.h strings.h stdlib.h time.h unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4446: checking for $ac_hdr" >&5
+echo "configure:4450: 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 4451 "configure"
+#line 4455 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4456: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4460: \"$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*
@@ -4482,17 +4486,17 @@ for ac_hdr in fcntl.h sys/file.h sys/time.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4486: checking for $ac_hdr" >&5
+echo "configure:4490: 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 4491 "configure"
+#line 4495 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4496: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4500: \"$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*
@@ -4519,12 +4523,12 @@ fi
done
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:4523: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:4527: 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 4528 "configure"
+#line 4532 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@@ -4533,7 +4537,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:4537: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
@@ -4558,12 +4562,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:4562: checking for $ac_hdr that defines DIR" >&5
+echo "configure:4566: 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 4567 "configure"
+#line 4571 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
@@ -4571,7 +4575,7 @@ int main() {
DIR *dirp = 0;
; return 0; }
EOF
-if { (eval echo configure:4575: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
@@ -4596,7 +4600,7 @@ done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:4600: checking for opendir in -ldir" >&5
+echo "configure:4604: 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
@@ -4604,7 +4608,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4608 "configure"
+#line 4612 "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
@@ -4615,7 +4619,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:4619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4623: \"$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
@@ -4637,7 +4641,7 @@ fi
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:4641: checking for opendir in -lx" >&5
+echo "configure:4645: 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
@@ -4645,7 +4649,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4649 "configure"
+#line 4653 "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
@@ -4656,7 +4660,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:4660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4664: \"$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
@@ -4681,12 +4685,12 @@ fi
for ac_func in fcntl getpagesize setitimer sysconf fdopen getuid getgid
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4685: checking for $ac_func" >&5
+echo "configure:4689: 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 4690 "configure"
+#line 4694 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4709,7 +4713,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4717: \"$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
@@ -4744,12 +4748,12 @@ EOF
esac
echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:4748: checking whether strstr must be declared" >&5
+echo "configure:4752: 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 4753 "configure"
+#line 4757 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4770,7 +4774,7 @@ int main() {
char *(*pfn) = (char *(*)) strstr
; return 0; }
EOF
-if { (eval echo configure:4774: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strstr=no
else
@@ -4791,12 +4795,12 @@ EOF
fi
echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
-echo "configure:4795: checking whether malloc must be declared" >&5
+echo "configure:4799: 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 4800 "configure"
+#line 4804 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4817,7 +4821,7 @@ int main() {
char *(*pfn) = (char *(*)) malloc
; return 0; }
EOF
-if { (eval echo configure:4821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4825: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_malloc=no
else
@@ -4838,12 +4842,12 @@ EOF
fi
echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
-echo "configure:4842: checking whether realloc must be declared" >&5
+echo "configure:4846: 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 4847 "configure"
+#line 4851 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4864,7 +4868,7 @@ int main() {
char *(*pfn) = (char *(*)) realloc
; return 0; }
EOF
-if { (eval echo configure:4868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_realloc=no
else
@@ -4885,12 +4889,12 @@ EOF
fi
echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
-echo "configure:4889: checking whether free must be declared" >&5
+echo "configure:4893: 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 4894 "configure"
+#line 4898 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4911,7 +4915,7 @@ int main() {
char *(*pfn) = (char *(*)) free
; return 0; }
EOF
-if { (eval echo configure:4915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_free=no
else
@@ -4932,12 +4936,12 @@ EOF
fi
echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
-echo "configure:4936: checking whether getenv must be declared" >&5
+echo "configure:4940: 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 4941 "configure"
+#line 4945 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4958,7 +4962,7 @@ int main() {
char *(*pfn) = (char *(*)) getenv
; return 0; }
EOF
-if { (eval echo configure:4962: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_getenv=no
else
@@ -4995,13 +4999,14 @@ if test "${target}" = "${host}"; then
alpha*-*-netbsd*) COREFILE=netbsd-core.lo ;;
alpha*-*-*) COREFILE=osf-core.lo ;;
arm-*-freebsd*) COREFILE='' ;;
+ arm-*-netbsd*) COREFILE=netbsd-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-*-*)
+ i370-*-*)
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/i370linux.h"'
;;
@@ -5015,6 +5020,9 @@ if test "${target}" = "${host}"; then
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/symmetry.h"'
;;
+ i[3456]86-*-bsdi)
+ COREFILE=
+ ;;
i[3456]86-*-bsd* | i[34567]86-*-freebsd[1234] | i[34567]86-*-freebsd[1234]\.* | i[34567]86-*-freebsd*aout*)
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/i386bsd.h"'
@@ -5136,6 +5144,8 @@ if test "${target}" = "${host}"; then
powerpc-*-freebsd*) COREFILE='' ;;
powerpc-*-netbsd*) COREFILE=netbsd-core.lo ;;
powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;;
+ s390*-*-*) COREFILE=trad-core.lo ;;
+ sh*-*-netbsd*) COREFILE=netbsd-core.lo ;;
sparc-*-netbsd* | sparc-*-openbsd*)
COREFILE=netbsd-core.lo
;;
@@ -5155,6 +5165,7 @@ if test "${target}" = "${host}"; then
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/vaxbsd.h"'
;;
+ x86_64-*-netbsd*) COREFILE=netbsd-core.lo ;;
esac
case "$COREFILE" in
@@ -5177,17 +5188,17 @@ if test "${target}" = "${host}"; then
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:5181: checking for $ac_hdr" >&5
+echo "configure:5192: 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 5186 "configure"
+#line 5197 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5191: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5202: \"$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*
@@ -5215,12 +5226,12 @@ done
if test "$ac_cv_header_sys_procfs_h" = yes; then
echo $ac_n "checking for prstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5219: checking for prstatus_t in sys/procfs.h" >&5
+echo "configure:5230: 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 5224 "configure"
+#line 5235 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5229,7 +5240,7 @@ int main() {
prstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5244: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prstatus_t=yes
else
@@ -5251,12 +5262,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus_t" 1>&6
echo $ac_n "checking for prstatus32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5255: checking for prstatus32_t in sys/procfs.h" >&5
+echo "configure:5266: checking for prstatus32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prstatus32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5260 "configure"
+#line 5271 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5265,7 +5276,7 @@ int main() {
prstatus32_t avar
; return 0; }
EOF
-if { (eval echo configure:5269: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5280: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prstatus32_t=yes
else
@@ -5287,12 +5298,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prstatus32_t" 1>&6
echo $ac_n "checking for prstatus_t.pr_who in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5291: checking for prstatus_t.pr_who in sys/procfs.h" >&5
+echo "configure:5302: 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 5296 "configure"
+#line 5307 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5301,7 +5312,7 @@ int main() {
prstatus_t avar; void* aref = (void*) &avar.pr_who
; return 0; }
EOF
-if { (eval echo configure:5305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5316: \"$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
@@ -5323,12 +5334,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus_t_pr_who" 1>&6
echo $ac_n "checking for prstatus32_t.pr_who in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5327: checking for prstatus32_t.pr_who in sys/procfs.h" >&5
+echo "configure:5338: checking for prstatus32_t.pr_who in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5332 "configure"
+#line 5343 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5337,7 +5348,7 @@ int main() {
prstatus32_t avar; void* aref = (void*) &avar.pr_who
; return 0; }
EOF
-if { (eval echo configure:5341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5352: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who=yes
else
@@ -5359,12 +5370,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_prstatus32_t_pr_who" 1>&6
echo $ac_n "checking for pstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5363: checking for pstatus_t in sys/procfs.h" >&5
+echo "configure:5374: 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 5368 "configure"
+#line 5379 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5373,7 +5384,7 @@ int main() {
pstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5377: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pstatus_t=yes
else
@@ -5395,12 +5406,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus_t" 1>&6
echo $ac_n "checking for pxstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5399: checking for pxstatus_t in sys/procfs.h" >&5
+echo "configure:5410: checking for pxstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pxstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5404 "configure"
+#line 5415 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5409,7 +5420,7 @@ int main() {
pxstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pxstatus_t=yes
else
@@ -5431,12 +5442,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pxstatus_t" 1>&6
echo $ac_n "checking for pstatus32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5435: checking for pstatus32_t in sys/procfs.h" >&5
+echo "configure:5446: checking for pstatus32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_pstatus32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5440 "configure"
+#line 5451 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5445,7 +5456,7 @@ int main() {
pstatus32_t avar
; return 0; }
EOF
-if { (eval echo configure:5449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5460: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_pstatus32_t=yes
else
@@ -5467,12 +5478,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_pstatus32_t" 1>&6
echo $ac_n "checking for prpsinfo_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5471: checking for prpsinfo_t in sys/procfs.h" >&5
+echo "configure:5482: 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 5476 "configure"
+#line 5487 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5481,7 +5492,7 @@ int main() {
prpsinfo_t avar
; return 0; }
EOF
-if { (eval echo configure:5485: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5496: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prpsinfo_t=yes
else
@@ -5503,12 +5514,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo_t" 1>&6
echo $ac_n "checking for prpsinfo32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5507: checking for prpsinfo32_t in sys/procfs.h" >&5
+echo "configure:5518: checking for prpsinfo32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_prpsinfo32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5512 "configure"
+#line 5523 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5517,7 +5528,7 @@ int main() {
prpsinfo32_t avar
; return 0; }
EOF
-if { (eval echo configure:5521: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5532: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_prpsinfo32_t=yes
else
@@ -5539,12 +5550,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_prpsinfo32_t" 1>&6
echo $ac_n "checking for psinfo_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5543: checking for psinfo_t in sys/procfs.h" >&5
+echo "configure:5554: 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 5548 "configure"
+#line 5559 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5553,7 +5564,7 @@ int main() {
psinfo_t avar
; return 0; }
EOF
-if { (eval echo configure:5557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_psinfo_t=yes
else
@@ -5575,12 +5586,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo_t" 1>&6
echo $ac_n "checking for psinfo32_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5579: checking for psinfo32_t in sys/procfs.h" >&5
+echo "configure:5590: checking for psinfo32_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_psinfo32_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5584 "configure"
+#line 5595 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5589,7 +5600,7 @@ int main() {
psinfo32_t avar
; return 0; }
EOF
-if { (eval echo configure:5593: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_psinfo32_t=yes
else
@@ -5611,12 +5622,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_psinfo32_t" 1>&6
echo $ac_n "checking for lwpstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5615: checking for lwpstatus_t in sys/procfs.h" >&5
+echo "configure:5626: 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 5620 "configure"
+#line 5631 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5625,7 +5636,7 @@ int main() {
lwpstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_lwpstatus_t=yes
else
@@ -5647,12 +5658,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpstatus_t" 1>&6
echo $ac_n "checking for lwpxstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5651: checking for lwpxstatus_t in sys/procfs.h" >&5
+echo "configure:5662: checking for lwpxstatus_t in sys/procfs.h" >&5
if eval "test \"`echo '$''{'bfd_cv_have_sys_procfs_type_lwpxstatus_t'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5656 "configure"
+#line 5667 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5661,7 +5672,7 @@ int main() {
lwpxstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5676: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_lwpxstatus_t=yes
else
@@ -5683,12 +5694,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_lwpxstatus_t" 1>&6
echo $ac_n "checking for lwpstatus_t.pr_context in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5687: checking for lwpstatus_t.pr_context in sys/procfs.h" >&5
+echo "configure:5698: 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 5692 "configure"
+#line 5703 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5697,7 +5708,7 @@ int main() {
lwpstatus_t avar; void* aref = (void*) &avar.pr_context
; return 0; }
EOF
-if { (eval echo configure:5701: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5712: \"$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
@@ -5719,12 +5730,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_context" 1>&6
echo $ac_n "checking for lwpstatus_t.pr_reg in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5723: checking for lwpstatus_t.pr_reg in sys/procfs.h" >&5
+echo "configure:5734: 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 5728 "configure"
+#line 5739 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5733,7 +5744,7 @@ int main() {
lwpstatus_t avar; void* aref = (void*) &avar.pr_reg
; return 0; }
EOF
-if { (eval echo configure:5737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5748: \"$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
@@ -5755,12 +5766,12 @@ EOF
echo "$ac_t""$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" 1>&6
echo $ac_n "checking for win32_pstatus_t in sys/procfs.h""... $ac_c" 1>&6
-echo "configure:5759: checking for win32_pstatus_t in sys/procfs.h" >&5
+echo "configure:5770: 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 5764 "configure"
+#line 5775 "configure"
#include "confdefs.h"
#define _SYSCALL32
@@ -5769,7 +5780,7 @@ int main() {
win32_pstatus_t avar
; return 0; }
EOF
-if { (eval echo configure:5773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5784: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_have_sys_procfs_type_win32_pstatus_t=yes
else
@@ -5811,6 +5822,25 @@ case "${host}" in
WIN32LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32"
fi
;;
+*-*-linux*)
+ # We borrow WIN32LIBADD so that the shared libbfd won't depend on
+ # libiberty.a.
+ case "${host}" in
+ mips*-*-linux*)
+ # Linux/MIPS uses PIC by default.
+ if test "$enable_shared" = "yes"; then
+ WIN32LIBADD="-L../libiberty -liberty"
+ fi
+ ;;
+ *)
+ PICFLAG=
+ eval `grep "^[ ]*PICFLAG[ ]*=" ../libiberty/Makefile | sed -e "s/[ ]*//g"`
+ if test -n "$PICFLAG"; then
+ WIN32LIBADD="-L../libiberty/pic -liberty"
+ fi
+ ;;
+ esac
+ ;;
esac
@@ -5883,76 +5913,63 @@ selarchs="$f"
# Target backend .o files.
tb=
-elf="elf.lo elflink.lo dwarf1.lo"
+elf="elf.lo elflink.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo"
for vec in $selvecs
do
+ target_size=32
case "$vec" in
# This list is alphabetized to make it easy to compare
- # with the two vector lists in targets.c.
+ # with the two vector lists in targets.c. For the same reason,
+ # use one entry per line, even though this leads to long lines.
a29kcoff_big_vec) tb="$tb coff-a29k.lo cofflink.lo" ;;
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 " ;;
- 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" ;;
aout_mips_big_vec) tb="$tb mipsbsd.lo aout32.lo" ;;
aout_mips_little_vec) tb="$tb mipsbsd.lo aout32.lo" ;;
apollocoff_vec) tb="$tb coff-apollo.lo" ;;
+ arm_epoc_pe_big_vec) tb="$tb epoc-pe-arm.lo peigen.lo cofflink.lo " ;;
+ arm_epoc_pe_little_vec) tb="$tb epoc-pe-arm.lo peigen.lo cofflink.lo " ;;
+ arm_epoc_pei_big_vec) tb="$tb epoc-pei-arm.lo peigen.lo cofflink.lo " ;;
+ arm_epoc_pei_little_vec) tb="$tb epoc-pei-arm.lo peigen.lo cofflink.lo " ;;
+ armcoff_big_vec) tb="$tb coff-arm.lo cofflink.lo " ;;
+ armcoff_little_vec) tb="$tb coff-arm.lo cofflink.lo " ;;
+ armnetbsd_vec) tb="$tb armnetbsd.lo aout32.lo" ;;
+ armpe_big_vec) tb="$tb pe-arm.lo peigen.lo cofflink.lo " ;;
+ armpe_little_vec) tb="$tb pe-arm.lo peigen.lo cofflink.lo " ;;
+ armpei_big_vec) tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;;
+ armpei_little_vec) tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;;
b_out_vec_big_host) tb="$tb bout.lo aout32.lo" ;;
b_out_vec_little_host) tb="$tb bout.lo aout32.lo" ;;
bfd_efi_app_ia32_vec) tb="$tb efi-app-ia32.lo peigen.lo cofflink.lo" ;;
- bfd_efi_app_ia64_vec) tb="$tb efi-app-ia64.lo pepigen.lo cofflink.lo"
- target64=true ;;
- bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"
- target64=true ;;
- bfd_elf64_hppa_vec | bfd_elf64_hppa_linux_vec)
- tb="$tb elf64-hppa.lo elf64.lo $elf"
- target64=true ;;
- bfd_elf64_ia64_little_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"
- target64=true ;;
- bfd_elf64_ia64_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"
- target64=true ;;
- bfd_elf32_ia64_big_vec) tb="$tb elf32-ia64.lo elf32.lo $elf" ;;
+ bfd_efi_app_ia64_vec) tb="$tb efi-app-ia64.lo pepigen.lo cofflink.lo"; target_size=64 ;;
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_big_generic_vec) tb="$tb elf32-gen.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_bigarm_vec) tb="$tb elfarm-nabi.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_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
- bfd_elf32_us_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
bfd_elf32_d30v_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;;
bfd_elf32_fr30_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;;
- bfd_elf32_hppa_vec | bfd_elf32_hppa_linux_vec)
- tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
+ bfd_elf32_h8300_vec) tb="$tb elf32-h8300.lo elf32.lo $elf" ;;
+ bfd_elf32_hppa_linux_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
+ bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;;
bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;;
- bfd_elf64_x86_64_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf"
- target64=true ;;
- bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
bfd_elf32_i860_little_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
+ bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
bfd_elf32_i960_vec) tb="$tb elf32-i960.lo elf32.lo $elf" ;;
+ bfd_elf32_ia64_big_vec) tb="$tb elf32-ia64.lo elf32.lo $elf" ;;
+ bfd_elf32_ia64_hpux_big_vec) tb="$tb elf32-ia64.lo elf32.lo $elf";;
bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
+ bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
+ bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
+ bfd_elf32_littlearm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
- bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"
- target64=true ;;
bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
bfd_elf32_m68hc11_vec) tb="$tb elf32-m68hc11.lo elf32.lo $elf" ;;
bfd_elf32_m68hc12_vec) tb="$tb elf32-m68hc12.lo elf32.lo $elf" ;;
@@ -5962,38 +5979,57 @@ do
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_openrisc_vec) tb="$tb elf32-openrisc.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_s390_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;;
bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
+ bfd_elf32_shblin_vec) tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
bfd_elf32_shlin_vec) tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
- bfd_elf32_shblin_vec) tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
+ bfd_elf32_shlnbsd_vec) tb="$tb elf32-sh-nbsd.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
+ bfd_elf32_shnbsd_vec) tb="$tb elf32-sh-nbsd.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;;
bfd_elf32_tradbigmips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
+ bfd_elf32_us_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
bfd_elf32_v850_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;;
- bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"
- target64=true ;;
- bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"
- target64=true ;;
- bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elf64.lo $elf"
- target64=true ;;
- bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo"
- target64=true ;;
- bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo"
- target64=true ;;
+ bfd_elf32_xstormy16_vec) tb="$tb elf32-xstormy16.lo elf32.lo $elf" ;;
+ bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+ bfd_elf64_hppa_linux_vec) tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_hppa_vec) tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_ia64_aix_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_ia64_aix_little_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_ia64_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_ia64_hpux_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_ia64_little_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+ bfd_elf64_mmix_vec) tb="$tb elf64-mmix.lo elf64.lo $elf" target_size=64 ;;
+ bfd_elf64_powerpc_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_powerpcle_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
+ bfd_elf64_s390_vec) tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo"; target_size=64 ;;
+ bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo"; target_size=64 ;;
+ bfd_elf64_x86_64_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_mmo_vec) tb="$tb mmo.lo" target_size=64 ;;
+ bfd_powerpc_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;;
+ bfd_powerpc_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;
+ bfd_powerpcle_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;;
+ bfd_powerpcle_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;
cisco_core_big_vec) tb="$tb cisco-core.lo" ;;
cisco_core_little_vec) tb="$tb cisco-core.lo" ;;
cris_aout_vec) tb="$tb aout-cris.lo" ;;
- demo_64_vec) tb="$tb demo64.lo aout64.lo"
- target64=true ;;
+ demo_64_vec) tb="$tb demo64.lo aout64.lo"; target_size=64 ;;
ecoff_big_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
- ecoff_little_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
ecoff_biglittle_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
- ecoffalpha_little_vec) tb="$tb coff-alpha.lo ecoff.lo ecofflink.lo"
- target64=true ;;
+ ecoff_little_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
+ ecoffalpha_little_vec) tb="$tb coff-alpha.lo ecoff.lo ecofflink.lo"; target_size=64 ;;
go32coff_vec) tb="$tb coff-go32.lo cofflink.lo" ;;
go32stubbedcoff_vec) tb="$tb coff-stgo32.lo cofflink.lo" ;;
h8300coff_vec) tb="$tb coff-h8300.lo reloc16.lo" ;;
@@ -6006,82 +6042,76 @@ do
i386coff_vec) tb="$tb coff-i386.lo cofflink.lo" ;;
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 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" ;;
i386mach3_vec) tb="$tb i386mach3.lo aout32.lo" ;;
+ i386msdos_vec) tb="$tb i386msdos.lo" ;;
i386netbsd_vec) tb="$tb i386netbsd.lo aout32.lo" ;;
i386os9k_vec) tb="$tb i386os9k.lo aout32.lo" ;;
+ i386pe_vec) tb="$tb pe-i386.lo peigen.lo cofflink.lo" ;;
+ i386pei_vec) tb="$tb pei-i386.lo peigen.lo cofflink.lo" ;;
i860coff_vec) tb="$tb coff-i860.lo cofflink.lo" ;;
icoff_big_vec) tb="$tb coff-i960.lo cofflink.lo" ;;
icoff_little_vec) tb="$tb coff-i960.lo cofflink.lo" ;;
ieee_vec) tb="$tb ieee.lo" ;;
+ m68k4knetbsd_vec) tb="$tb m68k4knetbsd.lo aout32.lo" ;;
+ m68kaux_coff_vec) tb="$tb coff-aux.lo coff-m68k.lo cofflink.lo" ;;
m68kcoff_vec) tb="$tb coff-m68k.lo cofflink.lo" ;;
m68kcoffun_vec) tb="$tb coff-u68k.lo coff-m68k.lo cofflink.lo" ;;
m68klinux_vec) tb="$tb m68klinux.lo aout32.lo" ;;
m68klynx_aout_vec) tb="$tb m68klynx.lo lynx-core.lo aout32.lo" ;;
m68klynx_coff_vec) tb="$tb cf-m68klynx.lo coff-m68k.lo cofflink.lo lynx-core.lo" ;;
m68knetbsd_vec) tb="$tb m68knetbsd.lo aout32.lo" ;;
- m68k4knetbsd_vec) tb="$tb m68k4knetbsd.lo aout32.lo" ;;
- 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 peigen.lo cofflink.lo" ;;
- mipslpei_vec) tb="$tb pei-mips.lo peigen.lo cofflink.lo" ;;
mcore_pe_big_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;;
mcore_pe_little_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;;
mcore_pei_big_vec) tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;;
mcore_pei_little_vec) tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;;
+ mipslpe_vec) tb="$tb pe-mips.lo peigen.lo cofflink.lo" ;;
+ mipslpei_vec) tb="$tb pei-mips.lo peigen.lo cofflink.lo" ;;
newsos3_vec) tb="$tb newsos3.lo aout32.lo" ;;
+ nlm32_alpha_vec) tb="$tb nlm32-alpha.lo nlm32.lo nlm.lo"; target_size=64 ;;
nlm32_i386_vec) tb="$tb nlm32-i386.lo nlm32.lo nlm.lo" ;;
- rs6000coff64_vec) tb="$tb coff64-rs6000.lo xcofflink.lo"
- target64=true ;;
- nlm32_sparc_vec) tb="$tb nlm32-sparc.lo nlm32.lo nlm.lo" ;;
- nlm32_alpha_vec) tb="$tb nlm32-alpha.lo nlm32.lo nlm.lo"
- target64=true ;;
- riscix_vec) tb="$tb aout32.lo riscix.lo" ;;
nlm32_powerpc_vec) tb="$tb nlm32-ppc.lo nlm32.lo nlm.lo" ;;
- pc532netbsd_vec) tb="$tb ns32knetbsd.lo aout-ns32k.lo" ;;
+ nlm32_sparc_vec) tb="$tb nlm32-sparc.lo nlm32.lo nlm.lo" ;;
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 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" ;;
+ pc532netbsd_vec) tb="$tb ns32knetbsd.lo aout-ns32k.lo" ;;
+ pdp11_aout_vec) tb="$tb pdp11.lo" ;;
+ pmac_xcoff_vec) tb="$tb coff-rs6000.lo xcofflink.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" ;;
+ riscix_vec) tb="$tb aout32.lo riscix.lo" ;;
+ rs6000coff64_vec) tb="$tb coff64-rs6000.lo xcofflink.lo"; target_size=64 ;;
+ rs6000coff_vec) tb="$tb coff-rs6000.lo xcofflink.lo" ;;
shcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
+ shcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
shlcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
+ shlcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
shlpe_vec) tb="$tb pe-sh.lo coff-sh.lo peigen.lo cofflink.lo" ;;
shlpei_vec) tb="$tb pei-sh.lo coff-sh.lo peigen.lo cofflink.lo" ;;
som_vec) tb="$tb som.lo" ;;
+ sparccoff_vec) tb="$tb coff-sparc.lo" ;;
sparcle_aout_vec) tb="$tb aout-sparcle.lo aout32.lo" ;;
sparclinux_vec) tb="$tb sparclinux.lo aout32.lo" ;;
sparclynx_aout_vec) tb="$tb sparclynx.lo lynx-core.lo aout32.lo" ;;
sparclynx_coff_vec) tb="$tb cf-sparclynx.lo lynx-core.lo" ;;
sparcnetbsd_vec) tb="$tb sparcnetbsd.lo aout32.lo" ;;
- sparccoff_vec) tb="$tb coff-sparc.lo" ;;
srec_vec) tb="$tb srec.lo" ;;
sunos_big_vec) tb="$tb sunos.lo aout32.lo" ;;
symbolsrec_vec) tb="$tb srec.lo" ;;
tekhex_vec) tb="$tb tekhex.lo" ;;
tic30_aout_vec) tb="$tb aout-tic30.lo" ;;
tic30_coff_vec) tb="$tb coff-tic30.lo" ;;
- tic54x_coff0_vec) tb="$tb coff-tic54x.lo" ;;
tic54x_coff0_beh_vec) tb="$tb coff-tic54x.lo" ;;
- tic54x_coff1_vec) tb="$tb coff-tic54x.lo" ;;
+ tic54x_coff0_vec) tb="$tb coff-tic54x.lo" ;;
tic54x_coff1_beh_vec) tb="$tb coff-tic54x.lo" ;;
- tic54x_coff2_vec) tb="$tb coff-tic54x.lo" ;;
+ tic54x_coff1_vec) tb="$tb coff-tic54x.lo" ;;
tic54x_coff2_beh_vec) tb="$tb coff-tic54x.lo" ;;
+ tic54x_coff2_vec) tb="$tb coff-tic54x.lo" ;;
tic80coff_vec) tb="$tb coff-tic80.lo cofflink.lo" ;;
versados_vec) tb="$tb versados.lo" ;;
- vms_alpha_vec) tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo"
- target64=true ;;
+ vms_alpha_vec) tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo"; target_size=64 ;;
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" ;;
@@ -6090,6 +6120,13 @@ do
"") ;;
*) { echo "configure: error: *** unknown target vector $vec" 1>&2; exit 1; } ;;
esac
+
+ if test ${target_size} = 64; then
+ target64=true
+ fi
+ if test x"${vec}" = x"${defvec}"; then
+ bfd_default_target_size=${target_size}
+ fi
done
# Target architecture .o files.
@@ -6139,14 +6176,41 @@ fi # all_targets is true
case ${host64}-${target64}-${want64} in
*true*)
wordsize=64
+ bfd_libs='$(BFD64_LIBS) $(BFD32_LIBS)'
all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)'
if test -z "$GCC" && test "$BFD_HOST_64BIT_LONG" = "0" && test "$BFD_HOST_64_BIT_DEFINED" = "0"; then
echo "configure: warning: You have requested a 64 bit BFD configuration, but" 1>&2
echo "configure: warning: your compiler may not have a 64 bit integral type" 1>&2
fi
+ if test -n "$GCC" ; then
+ bad_64bit_gcc=no;
+ echo $ac_n "checking for gcc version with buggy 64-bit support""... $ac_c" 1>&6
+echo "configure:6189: checking for gcc version with buggy 64-bit support" >&5
+ # Add more tests for gcc versions with non-working 64-bit support here.
+ cat > conftest.$ac_ext <<EOF
+#line 6192 "configure"
+#include "confdefs.h"
+:__GNUC__:__GNUC_MINOR__:__i386__:
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ egrep ": 2 : 91 : 1 :" >/dev/null 2>&1; then
+ rm -rf conftest*
+ bad_64bit_gcc=yes;
+ echo "$ac_t""yes: egcs-1.1.2 on ix86 spotted" 1>&6
+else
+ rm -rf conftest*
+ echo "$ac_t""no" 1>&6
+fi
+rm -f conftest*
+
+ if test $bad_64bit_gcc = yes ; then
+ { echo "configure: error: A newer version of gcc is needed for the requested 64-bit BFD configuration" 1>&2; exit 1; }
+ fi
+ fi
;;
false-false-false)
wordsize=32
+ bfd_libs='$(BFD32_LIBS)'
all_backends='$(BFD32_BACKENDS)'
;;
esac
@@ -6156,6 +6220,8 @@ esac
+
+
tdefaults=""
test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}"
test -n "${selvecs}" && tdefaults="${tdefaults} -DSELECT_VECS='${selvecs}'"
@@ -6167,17 +6233,17 @@ for ac_hdr in unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:6171: checking for $ac_hdr" >&5
+echo "configure:6237: 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 6176 "configure"
+#line 6242 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:6181: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:6247: \"$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*
@@ -6206,12 +6272,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6210: checking for $ac_func" >&5
+echo "configure:6276: 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 6215 "configure"
+#line 6281 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6234,7 +6300,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6304: \"$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
@@ -6259,7 +6325,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:6263: checking for working mmap" >&5
+echo "configure:6329: 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
@@ -6267,7 +6333,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 6271 "configure"
+#line 6337 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -6407,7 +6473,7 @@ main()
}
EOF
-if { (eval echo configure:6411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:6477: \"$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
@@ -6432,12 +6498,12 @@ fi
for ac_func in madvise mprotect
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:6436: checking for $ac_func" >&5
+echo "configure:6502: 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 6441 "configure"
+#line 6507 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -6460,7 +6526,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:6464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:6530: \"$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
@@ -6652,6 +6718,9 @@ s%@AUTOMAKE@%$AUTOMAKE%g
s%@AUTOHEADER@%$AUTOHEADER%g
s%@MAKEINFO@%$MAKEINFO%g
s%@SET_MAKE@%$SET_MAKE%g
+s%@bfd_version@%$bfd_version%g
+s%@bfd_version_date@%$bfd_version_date%g
+s%@bfd_version_string@%$bfd_version_string%g
s%@AR@%$AR%g
s%@RANLIB@%$RANLIB%g
s%@LN_S@%$LN_S%g
@@ -6698,9 +6767,11 @@ s%@WIN32LDFLAGS@%$WIN32LDFLAGS%g
s%@WIN32LIBADD@%$WIN32LIBADD%g
s%@TDEFINES@%$TDEFINES%g
s%@wordsize@%$wordsize%g
+s%@bfd_libs@%$bfd_libs%g
s%@all_backends@%$all_backends%g
s%@bfd_backends@%$bfd_backends%g
s%@bfd_machines@%$bfd_machines%g
+s%@bfd_default_target_size@%$bfd_default_target_size%g
s%@tdefaults@%$tdefaults%g
CEOF
diff --git a/contrib/binutils/bfd/configure.host b/contrib/binutils/bfd/configure.host
index c72a4b3..207e4c0 100644
--- a/contrib/binutils/bfd/configure.host
+++ b/contrib/binutils/bfd/configure.host
@@ -21,19 +21,23 @@ case "${host}" in
alpha*-*-*) host64=true; HOST_64BIT_TYPE=long ;;
+hppa*64*-*-hpux*) HDEFINES=-DHOST_HPPAHPUX;
+ host64=true; HOST_64BIT_TYPE=long ;;
hppa*-*-hpux*) HDEFINES=-DHOST_HPPAHPUX ;;
hppa*-*-hiux*) HDEFINES=-DHOST_HPPAHPUX ;;
+hppa*64*-*-linux*) host64=true; HOST_64BIT_TYPE=long ;;
hppa*-*-mpeix*) HDEFINES=-DHOST_HPPAMPEIX ;;
hppa*-*-bsd*) HDEFINES=-DHOST_HPPABSD ;;
hppa*-*-osf*) HDEFINES=-DHOST_HPPAOSF ;;
ia64-*-linux*) host64=true; HOST_64BIT_TYPE=long ;;
+ia64-*-aix*) host64=true; HOST_64BIT_TYPE=long ;;
i[3456]86-sequent-bsd*) HDEFINES=-Dshared=genshared ;;
i[3456]86-sequent-sysv4*) ;;
i[3456]86-sequent-sysv*) HDEFINES=-Dshared=genshared ;;
-mips*-dec-netbsd*) ;;
+mips*-*-netbsd*) ;;
mips*-*-openbsd*) ;;
mips*-dec-*) HDEFINES="-G 4" ;;
mips*-sgi-irix3*) HDEFINES="-G 4" ;;
@@ -42,6 +46,10 @@ mips*-sgi-irix6*) host64=true
HOST_64BIT_TYPE="long long";
HOST_U_64BIT_TYPE="unsigned long long";
;;
+mips64*-*-linux*) host64=true
+ HOST_64BIT_TYPE="long long";
+ HOST_U_64BIT_TYPE="unsigned long long";
+ ;;
mips*-*-sysv4*) ;;
mips*-*-sysv*) HDEFINES="-G 4" ;;
mips*-*-riscos*) HDEFINES="-G 4" ;;
diff --git a/contrib/binutils/bfd/configure.in b/contrib/binutils/bfd/configure.in
index b639e3b..239bde8 100644
--- a/contrib/binutils/bfd/configure.in
+++ b/contrib/binutils/bfd/configure.in
@@ -7,7 +7,27 @@ AC_INIT(libbfd.c)
AC_CANONICAL_SYSTEM
AC_ISC_POSIX
-AM_INIT_AUTOMAKE(bfd, 2.11.2)
+AM_INIT_AUTOMAKE(bfd, 2.11.93)
+# Uncomment the next line to remove the date from the reported bfd version
+#is_release=y
+
+changequote(,)dnl
+bfd_version=`echo "${VERSION}" | sed -e 's/\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\)\.*\([^\.]*\).*/\1.00\2.00\3.00\4.00\5/' -e 's/\([^\.]*\)\..*\(..\)\..*\(..\)\..*\(..\)\..*\(..\)$/\1\2\3\4\5/'`
+changequote([,])dnl
+
+bfd_version_string="\"${VERSION}\""
+bfd_version_date=`sed -e 's/.*DATE //' < ${srcdir}/version.h`
+if test x${is_release} = x; then
+dnl Sad, but we can't use XSTRING here to pick up the date from version.h
+dnl because traditional C doesn't allow it.
+ bfd_version_string="\"${VERSION} ${bfd_version_date}\""
+fi
+dnl Since we need to edit bfd-in3.h to get the date for bfd_version_string,
+dnl we may as well substitute for bfd_version_date too. That way we don't
+dnl need to #include version.h
+AC_SUBST(bfd_version)
+AC_SUBST(bfd_version_date)
+AC_SUBST(bfd_version_string)
dnl These must be called before AM_PROG_LIBTOOL, because it may want
dnl to call AC_CHECK_PROG.
@@ -50,7 +70,7 @@ AC_ARG_WITH(mmap,
*) AC_MSG_ERROR(bad value ${withval} for BFD with-mmap option) ;;
esac],[want_mmap=false])dnl
-build_warnings="-W -Wall"
+build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
AC_ARG_ENABLE(build-warnings,
[ --enable-build-warnings Enable build-time compiler warnings if gcc is used],
[case "${enableval}" in
@@ -76,19 +96,19 @@ AM_CONFIG_HEADER(config.h:config.in)
if test -z "$target" ; then
AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
fi
-AC_ARG_PROGRAM
AM_MAINTAINER_MODE
AC_EXEEXT
host64=false
target64=false
+bfd_default_target_size=32
# host stuff:
AC_PROG_CC
-ALL_LINGUAS=
+ALL_LINGUAS="fr tr ja es sv"
CY_GNU_GETTEXT
# Permit host specific settings.
@@ -145,13 +165,14 @@ if test "${target}" = "${host}"; then
alpha*-*-netbsd*) COREFILE=netbsd-core.lo ;;
alpha*-*-*) COREFILE=osf-core.lo ;;
arm-*-freebsd*) COREFILE='' ;;
+ arm-*-netbsd*) COREFILE=netbsd-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-*-*)
+ i370-*-*)
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/i370linux.h"'
;;
@@ -170,6 +191,11 @@ changequote([,])dnl
TRAD_HEADER='"hosts/symmetry.h"'
;;
changequote(,)dnl
+ i[3456]86-*-bsdi)
+changequote([,])dnl
+ COREFILE=
+ ;;
+changequote(,)dnl
i[3456]86-*-bsd* | i[34567]86-*-freebsd[1234] | i[34567]86-*-freebsd[1234]\.* | i[34567]86-*-freebsd*aout*)
changequote([,])dnl
COREFILE=trad-core.lo
@@ -310,6 +336,8 @@ changequote([,])dnl
powerpc-*-freebsd*) COREFILE='' ;;
powerpc-*-netbsd*) COREFILE=netbsd-core.lo ;;
powerpc-*-*bsd*) COREFILE=netbsd-core.lo ;;
+ s390*-*-*) COREFILE=trad-core.lo ;;
+ sh*-*-netbsd*) COREFILE=netbsd-core.lo ;;
sparc-*-netbsd* | sparc-*-openbsd*)
COREFILE=netbsd-core.lo
;;
@@ -329,6 +357,7 @@ changequote([,])dnl
COREFILE=trad-core.lo
TRAD_HEADER='"hosts/vaxbsd.h"'
;;
+ x86_64-*-netbsd*) COREFILE=netbsd-core.lo ;;
esac
case "$COREFILE" in
@@ -384,6 +413,27 @@ case "${host}" in
WIN32LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl -lcygwin -lkernel32"
fi
;;
+*-*-linux*)
+ # We borrow WIN32LIBADD so that the shared libbfd won't depend on
+ # libiberty.a.
+ case "${host}" in
+ mips*-*-linux*)
+ # Linux/MIPS uses PIC by default.
+ if test "$enable_shared" = "yes"; then
+ WIN32LIBADD="-L../libiberty -liberty"
+ fi
+ ;;
+ *)
+ PICFLAG=
+ changequote(,)dnl
+ eval `grep "^[ ]*PICFLAG[ ]*=" ../libiberty/Makefile | sed -e "s/[ ]*//g"`
+ changequote([,])dnl
+ if test -n "$PICFLAG"; then
+ WIN32LIBADD="-L../libiberty/pic -liberty"
+ fi
+ ;;
+ esac
+ ;;
esac
AC_SUBST(WIN32LDFLAGS)
AC_SUBST(WIN32LIBADD)
@@ -456,76 +506,63 @@ selarchs="$f"
# Target backend .o files.
tb=
-elf="elf.lo elflink.lo dwarf1.lo"
+elf="elf.lo elflink.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo"
for vec in $selvecs
do
+ target_size=32
case "$vec" in
# This list is alphabetized to make it easy to compare
- # with the two vector lists in targets.c.
+ # with the two vector lists in targets.c. For the same reason,
+ # use one entry per line, even though this leads to long lines.
a29kcoff_big_vec) tb="$tb coff-a29k.lo cofflink.lo" ;;
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 " ;;
- 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" ;;
aout_mips_big_vec) tb="$tb mipsbsd.lo aout32.lo" ;;
aout_mips_little_vec) tb="$tb mipsbsd.lo aout32.lo" ;;
apollocoff_vec) tb="$tb coff-apollo.lo" ;;
+ arm_epoc_pe_big_vec) tb="$tb epoc-pe-arm.lo peigen.lo cofflink.lo " ;;
+ arm_epoc_pe_little_vec) tb="$tb epoc-pe-arm.lo peigen.lo cofflink.lo " ;;
+ arm_epoc_pei_big_vec) tb="$tb epoc-pei-arm.lo peigen.lo cofflink.lo " ;;
+ arm_epoc_pei_little_vec) tb="$tb epoc-pei-arm.lo peigen.lo cofflink.lo " ;;
+ armcoff_big_vec) tb="$tb coff-arm.lo cofflink.lo " ;;
+ armcoff_little_vec) tb="$tb coff-arm.lo cofflink.lo " ;;
+ armnetbsd_vec) tb="$tb armnetbsd.lo aout32.lo" ;;
+ armpe_big_vec) tb="$tb pe-arm.lo peigen.lo cofflink.lo " ;;
+ armpe_little_vec) tb="$tb pe-arm.lo peigen.lo cofflink.lo " ;;
+ armpei_big_vec) tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;;
+ armpei_little_vec) tb="$tb pei-arm.lo peigen.lo cofflink.lo " ;;
b_out_vec_big_host) tb="$tb bout.lo aout32.lo" ;;
b_out_vec_little_host) tb="$tb bout.lo aout32.lo" ;;
bfd_efi_app_ia32_vec) tb="$tb efi-app-ia32.lo peigen.lo cofflink.lo" ;;
- bfd_efi_app_ia64_vec) tb="$tb efi-app-ia64.lo pepigen.lo cofflink.lo"
- target64=true ;;
- bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"
- target64=true ;;
- bfd_elf64_hppa_vec | bfd_elf64_hppa_linux_vec)
- tb="$tb elf64-hppa.lo elf64.lo $elf"
- target64=true ;;
- bfd_elf64_ia64_little_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"
- target64=true ;;
- bfd_elf64_ia64_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"
- target64=true ;;
- bfd_elf32_ia64_big_vec) tb="$tb elf32-ia64.lo elf32.lo $elf" ;;
+ bfd_efi_app_ia64_vec) tb="$tb efi-app-ia64.lo pepigen.lo cofflink.lo"; target_size=64 ;;
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_big_generic_vec) tb="$tb elf32-gen.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_bigarm_vec) tb="$tb elfarm-nabi.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_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
- bfd_elf32_us_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
bfd_elf32_d10v_vec) tb="$tb elf32-d10v.lo elf32.lo $elf" ;;
bfd_elf32_d30v_vec) tb="$tb elf32-d30v.lo elf32.lo $elf" ;;
bfd_elf32_fr30_vec) tb="$tb elf32-fr30.lo elf32.lo $elf" ;;
- bfd_elf32_hppa_vec | bfd_elf32_hppa_linux_vec)
- tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
+ bfd_elf32_h8300_vec) tb="$tb elf32-h8300.lo elf32.lo $elf" ;;
+ bfd_elf32_hppa_linux_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
+ bfd_elf32_hppa_vec) tb="$tb elf32-hppa.lo elf32.lo $elf" ;;
bfd_elf32_i370_vec) tb="$tb elf32-i370.lo elf32.lo $elf" ;;
bfd_elf32_i386_vec) tb="$tb elf32-i386.lo elf32.lo $elf" ;;
- bfd_elf64_x86_64_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf"
- target64=true ;;
- bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
bfd_elf32_i860_little_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
+ bfd_elf32_i860_vec) tb="$tb elf32-i860.lo elf32.lo $elf" ;;
bfd_elf32_i960_vec) tb="$tb elf32-i960.lo elf32.lo $elf" ;;
+ bfd_elf32_ia64_big_vec) tb="$tb elf32-ia64.lo elf32.lo $elf" ;;
+ bfd_elf32_ia64_hpux_big_vec) tb="$tb elf32-ia64.lo elf32.lo $elf";;
bfd_elf32_little_generic_vec) tb="$tb elf32-gen.lo elf32.lo $elf" ;;
+ bfd_elf32_littlearc_vec) tb="$tb elf32-arc.lo elf32.lo $elf" ;;
+ bfd_elf32_littlearm_oabi_vec) tb="$tb elfarm-oabi.lo elf32.lo $elf" ;;
+ bfd_elf32_littlearm_vec) tb="$tb elfarm-nabi.lo elf32.lo $elf" ;;
bfd_elf32_littlemips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
- bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"
- target64=true ;;
bfd_elf32_m32r_vec) tb="$tb elf32-m32r.lo elf32.lo $elf" ;;
bfd_elf32_m68hc11_vec) tb="$tb elf32-m68hc11.lo elf32.lo $elf" ;;
bfd_elf32_m68hc12_vec) tb="$tb elf32-m68hc12.lo elf32.lo $elf" ;;
@@ -535,38 +572,57 @@ do
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_openrisc_vec) tb="$tb elf32-openrisc.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_s390_vec) tb="$tb elf32-s390.lo elf32.lo $elf" ;;
bfd_elf32_sh_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
+ bfd_elf32_shblin_vec) tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
bfd_elf32_shl_vec) tb="$tb elf32-sh.lo elf32.lo $elf coff-sh.lo" ;;
bfd_elf32_shlin_vec) tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
- bfd_elf32_shblin_vec) tb="$tb elf32-sh-lin.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
+ bfd_elf32_shlnbsd_vec) tb="$tb elf32-sh-nbsd.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
+ bfd_elf32_shnbsd_vec) tb="$tb elf32-sh-nbsd.lo elf32.lo $elf coff-sh.lo cofflink.lo" ;;
bfd_elf32_sparc_vec) tb="$tb elf32-sparc.lo elf32.lo $elf" ;;
bfd_elf32_tradbigmips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
bfd_elf32_tradlittlemips_vec) tb="$tb elf32-mips.lo elf32.lo $elf ecofflink.lo" ;;
+ bfd_elf32_us_cris_vec) tb="$tb elf32-cris.lo elf32.lo $elf" ;;
bfd_elf32_v850_vec) tb="$tb elf32-v850.lo elf32.lo $elf" ;;
- bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"
- target64=true ;;
- bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"
- target64=true ;;
- bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elf64.lo $elf"
- target64=true ;;
- bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo"
- target64=true ;;
- bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo"
- target64=true ;;
+ bfd_elf32_xstormy16_vec) tb="$tb elf32-xstormy16.lo elf32.lo $elf" ;;
+ bfd_elf64_alpha_vec) tb="$tb elf64-alpha.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_big_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_bigmips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+ bfd_elf64_hppa_linux_vec) tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_hppa_vec) tb="$tb elf64-hppa.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_ia64_aix_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_ia64_aix_little_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_ia64_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_ia64_hpux_big_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_ia64_little_vec) tb="$tb elf64-ia64.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_little_generic_vec) tb="$tb elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_littlemips_vec) tb="$tb elf64-mips.lo elf64.lo elf32-mips.lo elf32.lo $elf ecofflink.lo"; target_size=64 ;;
+ bfd_elf64_mmix_vec) tb="$tb elf64-mmix.lo elf64.lo $elf" target_size=64 ;;
+ bfd_elf64_powerpc_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_powerpcle_vec) tb="$tb elf64-ppc.lo elf64-gen.lo elf64.lo $elf" target_size=64 ;;
+ bfd_elf64_s390_vec) tb="$tb elf64-s390.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_sparc_vec) tb="$tb elf64-sparc.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_elf64_tradbigmips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo"; target_size=64 ;;
+ bfd_elf64_tradlittlemips_vec) tb="$tb elf64-mips.lo elf64.lo $elf ecofflink.lo"; target_size=64 ;;
+ bfd_elf64_x86_64_vec) tb="$tb elf64-x86-64.lo elf64.lo $elf"; target_size=64 ;;
+ bfd_mmo_vec) tb="$tb mmo.lo" target_size=64 ;;
+ bfd_powerpc_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;;
+ bfd_powerpc_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;
+ bfd_powerpcle_pe_vec) tb="$tb pe-ppc.lo peigen.lo cofflink.lo" ;;
+ bfd_powerpcle_pei_vec) tb="$tb pei-ppc.lo peigen.lo cofflink.lo" ;;
cisco_core_big_vec) tb="$tb cisco-core.lo" ;;
cisco_core_little_vec) tb="$tb cisco-core.lo" ;;
cris_aout_vec) tb="$tb aout-cris.lo" ;;
- demo_64_vec) tb="$tb demo64.lo aout64.lo"
- target64=true ;;
+ demo_64_vec) tb="$tb demo64.lo aout64.lo"; target_size=64 ;;
ecoff_big_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
- ecoff_little_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
ecoff_biglittle_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
- ecoffalpha_little_vec) tb="$tb coff-alpha.lo ecoff.lo ecofflink.lo"
- target64=true ;;
+ ecoff_little_vec) tb="$tb coff-mips.lo ecoff.lo ecofflink.lo" ;;
+ ecoffalpha_little_vec) tb="$tb coff-alpha.lo ecoff.lo ecofflink.lo"; target_size=64 ;;
go32coff_vec) tb="$tb coff-go32.lo cofflink.lo" ;;
go32stubbedcoff_vec) tb="$tb coff-stgo32.lo cofflink.lo" ;;
h8300coff_vec) tb="$tb coff-h8300.lo reloc16.lo" ;;
@@ -579,82 +635,76 @@ do
i386coff_vec) tb="$tb coff-i386.lo cofflink.lo" ;;
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 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" ;;
i386mach3_vec) tb="$tb i386mach3.lo aout32.lo" ;;
+ i386msdos_vec) tb="$tb i386msdos.lo" ;;
i386netbsd_vec) tb="$tb i386netbsd.lo aout32.lo" ;;
i386os9k_vec) tb="$tb i386os9k.lo aout32.lo" ;;
+ i386pe_vec) tb="$tb pe-i386.lo peigen.lo cofflink.lo" ;;
+ i386pei_vec) tb="$tb pei-i386.lo peigen.lo cofflink.lo" ;;
i860coff_vec) tb="$tb coff-i860.lo cofflink.lo" ;;
icoff_big_vec) tb="$tb coff-i960.lo cofflink.lo" ;;
icoff_little_vec) tb="$tb coff-i960.lo cofflink.lo" ;;
ieee_vec) tb="$tb ieee.lo" ;;
+ m68k4knetbsd_vec) tb="$tb m68k4knetbsd.lo aout32.lo" ;;
+ m68kaux_coff_vec) tb="$tb coff-aux.lo coff-m68k.lo cofflink.lo" ;;
m68kcoff_vec) tb="$tb coff-m68k.lo cofflink.lo" ;;
m68kcoffun_vec) tb="$tb coff-u68k.lo coff-m68k.lo cofflink.lo" ;;
m68klinux_vec) tb="$tb m68klinux.lo aout32.lo" ;;
m68klynx_aout_vec) tb="$tb m68klynx.lo lynx-core.lo aout32.lo" ;;
m68klynx_coff_vec) tb="$tb cf-m68klynx.lo coff-m68k.lo cofflink.lo lynx-core.lo" ;;
m68knetbsd_vec) tb="$tb m68knetbsd.lo aout32.lo" ;;
- m68k4knetbsd_vec) tb="$tb m68k4knetbsd.lo aout32.lo" ;;
- 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 peigen.lo cofflink.lo" ;;
- mipslpei_vec) tb="$tb pei-mips.lo peigen.lo cofflink.lo" ;;
mcore_pe_big_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;;
mcore_pe_little_vec) tb="$tb pe-mcore.lo peigen.lo cofflink.lo" ;;
mcore_pei_big_vec) tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;;
mcore_pei_little_vec) tb="$tb pei-mcore.lo peigen.lo cofflink.lo" ;;
+ mipslpe_vec) tb="$tb pe-mips.lo peigen.lo cofflink.lo" ;;
+ mipslpei_vec) tb="$tb pei-mips.lo peigen.lo cofflink.lo" ;;
newsos3_vec) tb="$tb newsos3.lo aout32.lo" ;;
+ nlm32_alpha_vec) tb="$tb nlm32-alpha.lo nlm32.lo nlm.lo"; target_size=64 ;;
nlm32_i386_vec) tb="$tb nlm32-i386.lo nlm32.lo nlm.lo" ;;
- rs6000coff64_vec) tb="$tb coff64-rs6000.lo xcofflink.lo"
- target64=true ;;
- nlm32_sparc_vec) tb="$tb nlm32-sparc.lo nlm32.lo nlm.lo" ;;
- nlm32_alpha_vec) tb="$tb nlm32-alpha.lo nlm32.lo nlm.lo"
- target64=true ;;
- riscix_vec) tb="$tb aout32.lo riscix.lo" ;;
nlm32_powerpc_vec) tb="$tb nlm32-ppc.lo nlm32.lo nlm.lo" ;;
- pc532netbsd_vec) tb="$tb ns32knetbsd.lo aout-ns32k.lo" ;;
+ nlm32_sparc_vec) tb="$tb nlm32-sparc.lo nlm32.lo nlm.lo" ;;
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 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" ;;
+ pc532netbsd_vec) tb="$tb ns32knetbsd.lo aout-ns32k.lo" ;;
+ pdp11_aout_vec) tb="$tb pdp11.lo" ;;
+ pmac_xcoff_vec) tb="$tb coff-rs6000.lo xcofflink.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" ;;
+ riscix_vec) tb="$tb aout32.lo riscix.lo" ;;
+ rs6000coff64_vec) tb="$tb coff64-rs6000.lo xcofflink.lo"; target_size=64 ;;
+ rs6000coff_vec) tb="$tb coff-rs6000.lo xcofflink.lo" ;;
shcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
+ shcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
shlcoff_small_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
+ shlcoff_vec) tb="$tb coff-sh.lo cofflink.lo" ;;
shlpe_vec) tb="$tb pe-sh.lo coff-sh.lo peigen.lo cofflink.lo" ;;
shlpei_vec) tb="$tb pei-sh.lo coff-sh.lo peigen.lo cofflink.lo" ;;
som_vec) tb="$tb som.lo" ;;
+ sparccoff_vec) tb="$tb coff-sparc.lo" ;;
sparcle_aout_vec) tb="$tb aout-sparcle.lo aout32.lo" ;;
sparclinux_vec) tb="$tb sparclinux.lo aout32.lo" ;;
sparclynx_aout_vec) tb="$tb sparclynx.lo lynx-core.lo aout32.lo" ;;
sparclynx_coff_vec) tb="$tb cf-sparclynx.lo lynx-core.lo" ;;
sparcnetbsd_vec) tb="$tb sparcnetbsd.lo aout32.lo" ;;
- sparccoff_vec) tb="$tb coff-sparc.lo" ;;
srec_vec) tb="$tb srec.lo" ;;
sunos_big_vec) tb="$tb sunos.lo aout32.lo" ;;
symbolsrec_vec) tb="$tb srec.lo" ;;
tekhex_vec) tb="$tb tekhex.lo" ;;
tic30_aout_vec) tb="$tb aout-tic30.lo" ;;
tic30_coff_vec) tb="$tb coff-tic30.lo" ;;
- tic54x_coff0_vec) tb="$tb coff-tic54x.lo" ;;
tic54x_coff0_beh_vec) tb="$tb coff-tic54x.lo" ;;
- tic54x_coff1_vec) tb="$tb coff-tic54x.lo" ;;
+ tic54x_coff0_vec) tb="$tb coff-tic54x.lo" ;;
tic54x_coff1_beh_vec) tb="$tb coff-tic54x.lo" ;;
- tic54x_coff2_vec) tb="$tb coff-tic54x.lo" ;;
+ tic54x_coff1_vec) tb="$tb coff-tic54x.lo" ;;
tic54x_coff2_beh_vec) tb="$tb coff-tic54x.lo" ;;
+ tic54x_coff2_vec) tb="$tb coff-tic54x.lo" ;;
tic80coff_vec) tb="$tb coff-tic80.lo cofflink.lo" ;;
versados_vec) tb="$tb versados.lo" ;;
- vms_alpha_vec) tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo"
- target64=true ;;
+ vms_alpha_vec) tb="$tb vms.lo vms-hdr.lo vms-gsd.lo vms-tir.lo vms-misc.lo"; target_size=64 ;;
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" ;;
@@ -663,6 +713,13 @@ do
"") ;;
*) AC_MSG_ERROR(*** unknown target vector $vec) ;;
esac
+
+ if test ${target_size} = 64; then
+ target64=true
+ fi
+ if test x"${vec}" = x"${defvec}"; then
+ bfd_default_target_size=${target_size}
+ fi
done
# Target architecture .o files.
@@ -712,22 +769,38 @@ fi # all_targets is true
case ${host64}-${target64}-${want64} in
*true*)
wordsize=64
+ bfd_libs='$(BFD64_LIBS) $(BFD32_LIBS)'
all_backends='$(BFD64_BACKENDS) $(BFD32_BACKENDS)'
if test -z "$GCC" && test "$BFD_HOST_64BIT_LONG" = "0" && test "$BFD_HOST_64_BIT_DEFINED" = "0"; then
AC_MSG_WARN([You have requested a 64 bit BFD configuration, but])
AC_MSG_WARN([your compiler may not have a 64 bit integral type])
fi
+ if test -n "$GCC" ; then
+ bad_64bit_gcc=no;
+ AC_MSG_CHECKING([for gcc version with buggy 64-bit support])
+ # Add more tests for gcc versions with non-working 64-bit support here.
+ AC_EGREP_CPP([: 2 : 91 : 1 :],[:__GNUC__:__GNUC_MINOR__:__i386__:],
+ bad_64bit_gcc=yes;
+ AC_MSG_RESULT([yes: egcs-1.1.2 on ix86 spotted]),
+ AC_MSG_RESULT(no))
+ if test $bad_64bit_gcc = yes ; then
+ AC_ERROR([A newer version of gcc is needed for the requested 64-bit BFD configuration])
+ fi
+ fi
;;
false-false-false)
wordsize=32
+ bfd_libs='$(BFD32_LIBS)'
all_backends='$(BFD32_BACKENDS)'
;;
esac
AC_SUBST(wordsize)
+AC_SUBST(bfd_libs)
AC_SUBST(all_backends)
AC_SUBST(bfd_backends)
AC_SUBST(bfd_machines)
+AC_SUBST(bfd_default_target_size)
tdefaults=""
test -n "${defvec}" && tdefaults="${tdefaults} -DDEFAULT_VECTOR=${defvec}"
diff --git a/contrib/binutils/bfd/corefile.c b/contrib/binutils/bfd/corefile.c
index 3ce0785..609c4e6 100644
--- a/contrib/binutils/bfd/corefile.c
+++ b/contrib/binutils/bfd/corefile.c
@@ -1,5 +1,5 @@
/* Core file generic interface routines for BFD.
- Copyright 1990, 1991, 1992, 1993, 1994, 2000
+ Copyright 1990, 1991, 1992, 1993, 1994, 2000, 2001
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -36,7 +36,7 @@ FUNCTION
bfd_core_file_failing_command
SYNOPSIS
- CONST char *bfd_core_file_failing_command(bfd *abfd);
+ const char *bfd_core_file_failing_command(bfd *abfd);
DESCRIPTION
Return a read-only string explaining which program was running
diff --git a/contrib/binutils/bfd/cpu-arc.c b/contrib/binutils/bfd/cpu-arc.c
index 2904ae3..204eb48 100644
--- a/contrib/binutils/bfd/cpu-arc.c
+++ b/contrib/binutils/bfd/cpu-arc.c
@@ -55,6 +55,8 @@ const bfd_arch_info_type bfd_arc_arch =
/* Given cpu type NAME, return its bfd_mach_arc_xxx value.
Returns -1 if not found. */
+int arc_get_mach PARAMS ((char *));
+
int
arc_get_mach (name)
char *name;
diff --git a/contrib/binutils/bfd/cpu-i386.c b/contrib/binutils/bfd/cpu-i386.c
index 860d91a..8619fbf 100644
--- a/contrib/binutils/bfd/cpu-i386.c
+++ b/contrib/binutils/bfd/cpu-i386.c
@@ -44,8 +44,8 @@ const bfd_arch_info_type bfd_x86_64_arch_intel_syntax =
8, /* 8 bits in a byte */
bfd_arch_i386,
bfd_mach_x86_64_intel_syntax,
- "x86_64:intel",
- "x86_64:intel",
+ "x86-64:intel",
+ "x86-64:intel",
3,
true,
bfd_default_compatible,
@@ -75,8 +75,8 @@ const bfd_arch_info_type bfd_x86_64_arch =
8, /* 8 bits in a byte */
bfd_arch_i386,
bfd_mach_x86_64,
- "x86_64",
- "x86_64",
+ "x86-64",
+ "x86-64",
3,
true,
bfd_default_compatible,
diff --git a/contrib/binutils/bfd/cpu-ia64-opc.c b/contrib/binutils/bfd/cpu-ia64-opc.c
index 8c22942..a228b1c 100644
--- a/contrib/binutils/bfd/cpu-ia64-opc.c
+++ b/contrib/binutils/bfd/cpu-ia64-opc.c
@@ -19,7 +19,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Logically, this code should be part of libopcode but since some of
the operand insertion/extraction functions help bfd to implement
- relocations, this code is included as part of elf64-ia64.c. This
+ relocations, this code is included as part of cpu-ia64.c. This
avoids circular dependencies between libopcode and libbfd and also
obviates the need for applications to link in libopcode when all
they really want is libbfd.
diff --git a/contrib/binutils/bfd/cpu-powerpc.c b/contrib/binutils/bfd/cpu-powerpc.c
index 235ec29..3e7a51c 100644
--- a/contrib/binutils/bfd/cpu-powerpc.c
+++ b/contrib/binutils/bfd/cpu-powerpc.c
@@ -1,5 +1,5 @@
/* BFD PowerPC CPU definition
- Copyright 1994, 1995, 1996, 2000 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1996, 2000, 2001 Free Software Foundation, Inc.
Contributed by Ian Lance Taylor, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -128,7 +128,7 @@ static const bfd_arch_info_type arch_info_struct[] =
"powerpc",
"powerpc:620",
3,
- false, /* not the default */
+ BFD_DEFAULT_TARGET_SIZE == 64, /* default for 64 bit target */
powerpc_compatible,
bfd_default_scan,
&arch_info_struct[6]
@@ -229,7 +229,7 @@ const bfd_arch_info_type bfd_powerpc_arch =
"powerpc",
"powerpc:common",
3,
- true, /* the default */
+ BFD_DEFAULT_TARGET_SIZE != 64, /* default for 32 bit target */
powerpc_compatible,
bfd_default_scan,
&arch_info_struct[0]
diff --git a/contrib/binutils/bfd/demo64.c b/contrib/binutils/bfd/demo64.c
index b64499b..a8c0b32 100644
--- a/contrib/binutils/bfd/demo64.c
+++ b/contrib/binutils/bfd/demo64.c
@@ -1,5 +1,6 @@
/* BFD backend for demonstration 64-bit a.out binaries.
- Copyright 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1993, 1994, 2001
+ Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -19,6 +20,11 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define ARCH_SIZE 64
-#define MY(OP) CAT(demo_64_,OP)
+
+/* Do not "beautify" the CONCAT* macro args. Traditional C will not
+ remove whitespace added here, and thus will fail to concatenate
+ the tokens. */
+#define MY(OP) CONCAT2 (demo_64_,OP)
+
#define TARGETNAME "demo64"
#include "aoutf1.h"
diff --git a/contrib/binutils/bfd/dep-in.sed b/contrib/binutils/bfd/dep-in.sed
index c3781f2..4a706aa 100644
--- a/contrib/binutils/bfd/dep-in.sed
+++ b/contrib/binutils/bfd/dep-in.sed
@@ -9,12 +9,13 @@ s!@INCDIR@!$(INCDIR)!g
s!@SRCDIR@/../opcodes!$(srcdir)/../opcodes!g
s!@SRCDIR@/!!g
s! hosts/[^ ]*\.h! !g
-s/ sysdep.h//g
+s! sysdep.h!!g
s! \.\./bfd/sysdep.h!!g
-s/ libbfd.h//g
-s/ config.h//g
+s! libbfd.h!!g
+s! config.h!!g
s! \$(INCDIR)/fopen-[^ ]*\.h!!g
s! \$(INCDIR)/ansidecl\.h!!g
+s! \$(INCDIR)/symcat\.h!!g
s/\\\n */ /g
diff --git a/contrib/binutils/bfd/doc/ChangeLog b/contrib/binutils/bfd/doc/ChangeLog
index 363ea91..2f3db6f 100644
--- a/contrib/binutils/bfd/doc/ChangeLog
+++ b/contrib/binutils/bfd/doc/ChangeLog
@@ -1,7 +1,57 @@
-2001-06-11 Alan Modra <amodra@bigpond.net.au>
+2001-10-30 Hans-Peter Nilsson <hp@bitrange.com>
- * bfdint.texi (BFD target vector miscellaneous): --oformat, not
- -oformat.
+ * doc/bfdint.texi (BFD target vector miscellaneous): Add
+ bfd_target_mmo_flavour.
+ * doc/bfd.texinfo (BFD back ends): Add entry for mmo.
+ * doc/Makefile.am (DOCFILES): Add mmo.texi.
+ (SRCDOC): Add mmo.c.
+ (s-mmo, mmo.texi): New rules.
+
+2001-10-29 Kazu Hirata <kazu@hxi.com>
+
+ * bfdsumm.texi: Fix a typo.
+
+2001-10-26 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * bfd.texinfo: Change footer to refer to FSF. Change subtitle
+ to refer to original creation date.
+
+2001-10-03 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am (BFD_H_DEP): Add ../version.h.
+ * Makefile.in: Regenerate.
+
+2001-10-02 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.in: Regenerate.
+
+2001-10-01 Alan Modra <amodra@bigpond.net.au>
+
+ * header.sed: New file, adds header to generated files.
+ * Makefile.am: Rewrite rules generating libbfd.h, libcoff.h and
+ bfd.h, using above. Add missing elf.c dependecy for libbfd.h.
+ * Makefile.in: Regenerate.
+
+2001-09-21 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.in: Regenerate.
+
+2001-09-18 Alan Modra <amodra@bigpond.net.au>
+
+ * bfdint.texi: Replace reference to bfd_read with bfd_bread.
+ Likewise for bfd_write.
+
+2001-07-24 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.in: Regenerate.
+
+2001-06-21 Hans-Peter Nilsson <hp@axis.com>
+
+ * bfdint.texi (BFD relocation functions) <different formats>:
+ Mention that the GNU linker is aware of input-output format
+ restrictions when generating relocatable output. Make new
+ paragraph for final-link case.
+ (BFD target vector swap): Fix typo.
2001-01-25 Kazu Hirata <kazu@hxi.com>
@@ -240,7 +290,7 @@ Fri Sep 2 13:33:44 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
Wed Jan 12 18:37:12 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
* bfd.texinfo: Added Linker Functions node.
- * doc/Makefile.in (DOCFILES): Added linker.texi.
+ * Makefile.in (DOCFILES): Added linker.texi.
(SRCDOC): Added linker.c.
(linker.texi): New target.
@@ -355,9 +405,9 @@ Thu Nov 5 03:13:55 1992 John Gilmore (gnu@cygnus.com)
Cleanup: Replace all uses of EXFUN in the BFD sources, with PARAMS.
- * doc/chew.c (exfunstuff): Eliminate.
+ * chew.c (exfunstuff): Eliminate.
(paramstuff): Replace exfunstuff with function to generate PARAMS.
- * doc/proto.str: Use paramstuff rather than exfunstuff.
+ * proto.str: Use paramstuff rather than exfunstuff.
Mon Aug 17 12:40:32 1992 Steve Chamberlain (sac@thepub.cygnus.com)
diff --git a/contrib/binutils/bfd/doc/Makefile.am b/contrib/binutils/bfd/doc/Makefile.am
index 0d5268e..075c9f3 100644
--- a/contrib/binutils/bfd/doc/Makefile.am
+++ b/contrib/binutils/bfd/doc/Makefile.am
@@ -6,7 +6,8 @@ DOCFILES = aoutx.texi archive.texi archures.texi \
bfdt.texi cache.texi coffcode.texi \
core.texi elf.texi elfcode.texi format.texi libbfd.texi \
opncls.texi reloc.texi section.texi \
- syms.texi targets.texi init.texi hash.texi linker.texi
+ syms.texi targets.texi init.texi hash.texi linker.texi \
+ mmo.texi
PROTOS = archive.p archures.p bfd.p \
core.p format.p \
@@ -27,7 +28,8 @@ SRCDOC = $(srcdir)/../aoutx.h $(srcdir)/../archive.c \
$(srcdir)/../libbfd.c $(srcdir)/../opncls.c \
$(srcdir)/../reloc.c $(srcdir)/../section.c \
$(srcdir)/../syms.c $(srcdir)/../targets.c \
- $(srcdir)/../hash.c $(srcdir)/../linker.c
+ $(srcdir)/../hash.c $(srcdir)/../linker.c \
+ $(srcdir)/../mmo.c
SRCPROT = $(srcdir)/../archive.c $(srcdir)/../archures.c \
$(srcdir)/../bfd.c $(srcdir)/../coffcode.h $(srcdir)/../corefile.c \
@@ -123,6 +125,12 @@ s-elfcode: $(MKDOC) $(srcdir)/../elfcode.h $(srcdir)/doc.str
touch s-elfcode
elfcode.texi: s-elfcode
+s-mmo: $(MKDOC) $(srcdir)/../mmo.c $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../mmo.c >mmo.tmp
+ $(srcdir)/../../move-if-change mmo.tmp mmo.texi
+ touch s-mmo
+mmo.texi: s-mmo
+
s-format: $(MKDOC) $(srcdir)/../format.c $(srcdir)/doc.str
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../format.c >format.tmp
$(srcdir)/../../move-if-change format.tmp format.texi
@@ -183,30 +191,47 @@ s-linker: $(MKDOC) $(srcdir)/../linker.c $(srcdir)/doc.str
touch s-linker
linker.texi: s-linker
-libbfd.h: $(srcdir)/../libbfd-in.h \
+LIBBFD_H_DEP = \
+ $(srcdir)/../libbfd-in.h \
$(srcdir)/../init.c \
$(srcdir)/../libbfd.c \
$(srcdir)/../cache.c \
$(srcdir)/../reloc.c \
$(srcdir)/../archures.c \
+ $(srcdir)/../elf.c \
+ $(srcdir)/header.sed \
$(srcdir)/proto.str \
$(MKDOC)
- cat $(srcdir)/../libbfd-in.h >libbfd.h
- ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../init.c >>libbfd.h
- ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../libbfd.c >>libbfd.h
- ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../cache.c >>libbfd.h
- ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../reloc.c >>libbfd.h
- ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../archures.c >>libbfd.h
- ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../elf.c >>libbfd.h
-
-libcoff.h: $(srcdir)/../libcoff-in.h \
+
+libbfd.h: $(LIBBFD_H_DEP)
+ echo "$(LIBBFD_H_DEP)" | sed -f $(srcdir)/header.sed > $@
+ for file in $(LIBBFD_H_DEP); do \
+ case $$file in \
+ *-in.h) cat $$file >> $@ ;; \
+ */header.sed) break ;; \
+ *) ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \
+ esac; \
+ done
+
+LIBCOFF_H_DEP = \
+ $(srcdir)/../libcoff-in.h \
$(srcdir)/../coffcode.h \
+ $(srcdir)/header.sed \
$(srcdir)/proto.str \
$(MKDOC)
- cat $(srcdir)/../libcoff-in.h >libcoff.h
- ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../coffcode.h >>libcoff.h
-bfd.h: $(srcdir)/../bfd-in.h \
+libcoff.h: $(LIBCOFF_H_DEP)
+ echo "$(LIBCOFF_H_DEP)" | sed -f $(srcdir)/header.sed > $@
+ for file in $(LIBCOFF_H_DEP); do \
+ case $$file in \
+ *-in.h) cat $$file >> $@ ;; \
+ */header.sed) break ;; \
+ *) ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \
+ esac; \
+ done
+
+BFD_H_DEP = \
+ $(srcdir)/../bfd-in.h \
$(srcdir)/../init.c \
$(srcdir)/../opncls.c \
$(srcdir)/../libbfd.c \
@@ -219,25 +244,24 @@ bfd.h: $(srcdir)/../bfd-in.h \
$(srcdir)/../corefile.c \
$(srcdir)/../targets.c \
$(srcdir)/../format.c \
+ $(srcdir)/header.sed \
$(srcdir)/proto.str \
+ $(srcdir)/../version.h \
$(MKDOC)
- cat $(srcdir)/../bfd-in.h >bfd.h
- ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../init.c >>bfd.h
- ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../opncls.c >>bfd.h
- ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../libbfd.c >>bfd.h
- ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../section.c >>bfd.h
- ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../archures.c >>bfd.h
- ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../reloc.c >>bfd.h
- ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../syms.c >>bfd.h
- ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../bfd.c >>bfd.h
- ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../archive.c >>bfd.h
- ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../corefile.c >>bfd.h
- ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../targets.c >>bfd.h
- ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../format.c >>bfd.h
- echo "#ifdef __cplusplus" >>bfd.h
- echo "}" >>bfd.h
- echo "#endif" >>bfd.h
- echo "#endif" >>bfd.h
+
+bfd.h: $(BFD_H_DEP)
+ echo "$(BFD_H_DEP)" | sed -f $(srcdir)/header.sed > $@
+ for file in $(BFD_H_DEP); do \
+ case $$file in \
+ *-in.h) cat $$file >> $@ ;; \
+ */header.sed) break ;; \
+ *) ./$(MKDOC) -f $(srcdir)/proto.str < $$file >> $@ ;; \
+ esac; \
+ done
+ echo "#ifdef __cplusplus" >> $@
+ echo "}" >> $@
+ echo "#endif" >> $@
+ echo "#endif" >> $@
noinst_TEXINFOS = bfdint.texi
diff --git a/contrib/binutils/bfd/doc/Makefile.in b/contrib/binutils/bfd/doc/Makefile.in
index d4c30a6..dc85d4b 100644
--- a/contrib/binutils/bfd/doc/Makefile.in
+++ b/contrib/binutils/bfd/doc/Makefile.in
@@ -115,7 +115,11 @@ WIN32LDFLAGS = @WIN32LDFLAGS@
WIN32LIBADD = @WIN32LIBADD@
all_backends = @all_backends@
bfd_backends = @bfd_backends@
+bfd_default_target_size = @bfd_default_target_size@
bfd_machines = @bfd_machines@
+bfd_version = @bfd_version@
+bfd_version_date = @bfd_version_date@
+bfd_version_string = @bfd_version_string@
l = @l@
tdefaults = @tdefaults@
wordsize = @wordsize@
@@ -126,7 +130,8 @@ DOCFILES = aoutx.texi archive.texi archures.texi \
bfdt.texi cache.texi coffcode.texi \
core.texi elf.texi elfcode.texi format.texi libbfd.texi \
opncls.texi reloc.texi section.texi \
- syms.texi targets.texi init.texi hash.texi linker.texi
+ syms.texi targets.texi init.texi hash.texi linker.texi \
+ mmo.texi
PROTOS = archive.p archures.p bfd.p \
@@ -149,7 +154,8 @@ SRCDOC = $(srcdir)/../aoutx.h $(srcdir)/../archive.c \
$(srcdir)/../libbfd.c $(srcdir)/../opncls.c \
$(srcdir)/../reloc.c $(srcdir)/../section.c \
$(srcdir)/../syms.c $(srcdir)/../targets.c \
- $(srcdir)/../hash.c $(srcdir)/../linker.c
+ $(srcdir)/../hash.c $(srcdir)/../linker.c \
+ $(srcdir)/../mmo.c
SRCPROT = $(srcdir)/../archive.c $(srcdir)/../archures.c \
@@ -172,6 +178,47 @@ info_TEXINFOS = bfd.texinfo
MKDOC = chew$(EXEEXT_FOR_BUILD)
+LIBBFD_H_DEP = \
+ $(srcdir)/../libbfd-in.h \
+ $(srcdir)/../init.c \
+ $(srcdir)/../libbfd.c \
+ $(srcdir)/../cache.c \
+ $(srcdir)/../reloc.c \
+ $(srcdir)/../archures.c \
+ $(srcdir)/../elf.c \
+ $(srcdir)/header.sed \
+ $(srcdir)/proto.str \
+ $(MKDOC)
+
+
+LIBCOFF_H_DEP = \
+ $(srcdir)/../libcoff-in.h \
+ $(srcdir)/../coffcode.h \
+ $(srcdir)/header.sed \
+ $(srcdir)/proto.str \
+ $(MKDOC)
+
+
+BFD_H_DEP = \
+ $(srcdir)/../bfd-in.h \
+ $(srcdir)/../init.c \
+ $(srcdir)/../opncls.c \
+ $(srcdir)/../libbfd.c \
+ $(srcdir)/../section.c \
+ $(srcdir)/../archures.c \
+ $(srcdir)/../reloc.c \
+ $(srcdir)/../syms.c \
+ $(srcdir)/../bfd.c \
+ $(srcdir)/../archive.c \
+ $(srcdir)/../corefile.c \
+ $(srcdir)/../targets.c \
+ $(srcdir)/../format.c \
+ $(srcdir)/header.sed \
+ $(srcdir)/proto.str \
+ $(srcdir)/../version.h \
+ $(MKDOC)
+
+
noinst_TEXINFOS = bfdint.texi
MOSTLYCLEANFILES = $(MKDOC) *.o
@@ -194,7 +241,7 @@ DIST_COMMON = ChangeLog Makefile.am Makefile.in
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-TAR = tar
+TAR = gtar
GZIP_ENV = --best
all: all-redirect
.SUFFIXES:
@@ -484,6 +531,12 @@ s-elfcode: $(MKDOC) $(srcdir)/../elfcode.h $(srcdir)/doc.str
touch s-elfcode
elfcode.texi: s-elfcode
+s-mmo: $(MKDOC) $(srcdir)/../mmo.c $(srcdir)/doc.str
+ ./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../mmo.c >mmo.tmp
+ $(srcdir)/../../move-if-change mmo.tmp mmo.texi
+ touch s-mmo
+mmo.texi: s-mmo
+
s-format: $(MKDOC) $(srcdir)/../format.c $(srcdir)/doc.str
./$(MKDOC) -f $(srcdir)/doc.str <$(srcdir)/../format.c >format.tmp
$(srcdir)/../../move-if-change format.tmp format.texi
@@ -544,61 +597,39 @@ s-linker: $(MKDOC) $(srcdir)/../linker.c $(srcdir)/doc.str
touch s-linker
linker.texi: s-linker
-libbfd.h: $(srcdir)/../libbfd-in.h \
- $(srcdir)/../init.c \
- $(srcdir)/../libbfd.c \
- $(srcdir)/../cache.c \
- $(srcdir)/../reloc.c \
- $(srcdir)/../archures.c \
- $(srcdir)/proto.str \
- $(MKDOC)
- cat $(srcdir)/../libbfd-in.h >libbfd.h
- ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../init.c >>libbfd.h
- ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../libbfd.c >>libbfd.h
- ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../cache.c >>libbfd.h
- ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../reloc.c >>libbfd.h
- ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../archures.c >>libbfd.h
- ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../elf.c >>libbfd.h
-
-libcoff.h: $(srcdir)/../libcoff-in.h \
- $(srcdir)/../coffcode.h \
- $(srcdir)/proto.str \
- $(MKDOC)
- cat $(srcdir)/../libcoff-in.h >libcoff.h
- ./$(MKDOC) -i -f $(srcdir)/proto.str < $(srcdir)/../coffcode.h >>libcoff.h
+libbfd.h: $(LIBBFD_H_DEP)
+ echo "$(LIBBFD_H_DEP)" | sed -f $(srcdir)/header.sed > $@
+ for file in $(LIBBFD_H_DEP); do \
+ case $$file in \
+ *-in.h) cat $$file >> $@ ;; \
+ */header.sed) break ;; \
+ *) ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \
+ esac; \
+ done
-bfd.h: $(srcdir)/../bfd-in.h \
- $(srcdir)/../init.c \
- $(srcdir)/../opncls.c \
- $(srcdir)/../libbfd.c \
- $(srcdir)/../section.c \
- $(srcdir)/../archures.c \
- $(srcdir)/../reloc.c \
- $(srcdir)/../syms.c \
- $(srcdir)/../bfd.c \
- $(srcdir)/../archive.c \
- $(srcdir)/../corefile.c \
- $(srcdir)/../targets.c \
- $(srcdir)/../format.c \
- $(srcdir)/proto.str \
- $(MKDOC)
- cat $(srcdir)/../bfd-in.h >bfd.h
- ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../init.c >>bfd.h
- ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../opncls.c >>bfd.h
- ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../libbfd.c >>bfd.h
- ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../section.c >>bfd.h
- ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../archures.c >>bfd.h
- ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../reloc.c >>bfd.h
- ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../syms.c >>bfd.h
- ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../bfd.c >>bfd.h
- ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../archive.c >>bfd.h
- ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../corefile.c >>bfd.h
- ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../targets.c >>bfd.h
- ./$(MKDOC) -f $(srcdir)/proto.str<$(srcdir)/../format.c >>bfd.h
- echo "#ifdef __cplusplus" >>bfd.h
- echo "}" >>bfd.h
- echo "#endif" >>bfd.h
- echo "#endif" >>bfd.h
+libcoff.h: $(LIBCOFF_H_DEP)
+ echo "$(LIBCOFF_H_DEP)" | sed -f $(srcdir)/header.sed > $@
+ for file in $(LIBCOFF_H_DEP); do \
+ case $$file in \
+ *-in.h) cat $$file >> $@ ;; \
+ */header.sed) break ;; \
+ *) ./$(MKDOC) -i -f $(srcdir)/proto.str < $$file >> $@ ;; \
+ esac; \
+ done
+
+bfd.h: $(BFD_H_DEP)
+ echo "$(BFD_H_DEP)" | sed -f $(srcdir)/header.sed > $@
+ for file in $(BFD_H_DEP); do \
+ case $$file in \
+ *-in.h) cat $$file >> $@ ;; \
+ */header.sed) break ;; \
+ *) ./$(MKDOC) -f $(srcdir)/proto.str < $$file >> $@ ;; \
+ esac; \
+ done
+ echo "#ifdef __cplusplus" >> $@
+ echo "}" >> $@
+ echo "#endif" >> $@
+ echo "#endif" >> $@
# 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/bfd/doc/bfd.texinfo b/contrib/binutils/bfd/doc/bfd.texinfo
index bcc9c38..380501e 100644
--- a/contrib/binutils/bfd/doc/bfd.texinfo
+++ b/contrib/binutils/bfd/doc/bfd.texinfo
@@ -30,7 +30,7 @@ END-INFO-DIR-ENTRY
@ifinfo
This file documents the BFD library.
-Copyright (C) 1991, 2000 Free Software Foundation, Inc.
+Copyright (C) 1991, 2000, 2001 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1
@@ -56,18 +56,18 @@ notice identical to this one except for the removal of this paragraph
@title{libbfd}
@subtitle{The Binary File Descriptor Library}
@sp 1
-@subtitle First Edition---BFD version < 3.0
-@subtitle April 1991
+@subtitle First Edition---BFD version < 3.0 % Since no product is stable berfore version 3.0 :-)
+@subtitle Original Document Created: April 1991
@author {Steve Chamberlain}
@author {Cygnus Support}
@page
@tex
\def\$#1${{#1}} % Kluge: collect RCS revision info without $...$
-\xdef\manvers{\$Revision: 1.2.2.1 $} % For use in headers, footers too
+\xdef\manvers{\$Revision: 1.5 $} % For use in headers, footers too
{\parskip=0pt
-\hfill Cygnus Support\par
-\hfill sac\@cygnus.com\par
+\hfill Free Software Foundation\par
+\hfill sac\@www.gnu.org\par
\hfill {\it BFD}, \manvers\par
\hfill \TeX{}info \texinfoversion\par
}
@@ -75,7 +75,7 @@ notice identical to this one except for the removal of this paragraph
@end tex
@vskip 0pt plus 1filll
-Copyright @copyright{} 1991 Free Software Foundation, Inc.
+Copyright @copyright{} 1991, 2001 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.1
@@ -298,6 +298,7 @@ structures.
* aout :: a.out backends
* coff :: coff backends
* elf :: elf backends
+* mmo :: mmo backend
@ignore
* oasys :: oasys backends
* ieee :: ieee backend
@@ -313,11 +314,14 @@ All of BFD lives in one directory.
@node coff, elf, aout, BFD back ends
@include coffcode.texi
-@node elf, , coff, BFD back ends
+@node elf, mmo, coff, BFD back ends
@include elf.texi
@c Leave this out until the file has some actual contents...
@c @include elfcode.texi
+@node mmo, , elf, BFD back ends
+@include mmo.texi
+
@node GNU Free Documentation License, Index, BFD back ends, Top
@chapter GNU Free Documentation License
@cindex GNU Free Documentation License
diff --git a/contrib/binutils/bfd/doc/bfdint.texi b/contrib/binutils/bfd/doc/bfdint.texi
index 5aa8ed3..76fd832 100644
--- a/contrib/binutils/bfd/doc/bfdint.texi
+++ b/contrib/binutils/bfd/doc/bfdint.texi
@@ -1,6 +1,6 @@
\input texinfo
@c Copyright 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998,
-@c 2000
+@c 2000, 2001
@c Free Software Foundation, Inc.
@setfilename bfdint.info
@@ -335,6 +335,8 @@ VERSAdos.
MS-DOS.
@item bfd_target_evax_flavour
openVMS.
+@item bfd_target_mmo_flavour
+Donald Knuth's MMIXware object format.
@end table
@item byteorder
@@ -379,7 +381,7 @@ vectors which use the same sets of functions.
@node BFD target vector swap
@subsection Swapping functions
-Every target vector has fuction pointers used for swapping information
+Every target vector has function 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
@@ -503,7 +505,7 @@ corresponds to an actual section in an actual BFD.
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
+based on the section's @samp{filepos} field and a @samp{bfd_bread}. The
corresponding field in the target vector is named
@samp{_bfd_get_section_contents}.
@@ -636,7 +638,7 @@ 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}.
+Write out the archive symbol table using calls to @samp{bfd_bwrite}.
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).
@@ -1291,10 +1293,13 @@ 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.
+have to worry about that. The GNU linker makes sure to stop that from
+happening when an input file in a different format has relocations.
+
+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
diff --git a/contrib/binutils/bfd/doc/bfdsumm.texi b/contrib/binutils/bfd/doc/bfdsumm.texi
index 844531a..77a5f09 100644
--- a/contrib/binutils/bfd/doc/bfdsumm.texi
+++ b/contrib/binutils/bfd/doc/bfdsumm.texi
@@ -4,7 +4,7 @@ the format of the input object file. They then build a descriptor in
memory with pointers to routines that will be used to access elements of
the object file's data structures.
-As different information from the the object files is required,
+As different information from the object files is required,
BFD reads from different sections of the file and processes them.
For example, a very common operation for the linker is processing symbol
tables. Each BFD back end provides a routine for converting
diff --git a/contrib/binutils/bfd/doc/header.sed b/contrib/binutils/bfd/doc/header.sed
new file mode 100644
index 0000000..ed27040
--- /dev/null
+++ b/contrib/binutils/bfd/doc/header.sed
@@ -0,0 +1,12 @@
+s|\(.*\) [^ ]*header.sed.*|\1|
+s|[^ ]*/||g
+s|^ *|"|
+s| |", "|g
+s|$|"|
+s|, \([^ ]*\)$| and \1|
+s|^|/* DO NOT EDIT! -*- buffer-read-only: t -*- This file is automatically generated from |
+s|\(.\{60\}[^ ]* \)|\1\
+ |g
+s|$|.\
+ Run "make headers" in your build bfd/ to regenerate. */\
+|
diff --git a/contrib/binutils/bfd/dwarf1.c b/contrib/binutils/bfd/dwarf1.c
index 2fef2ef..6531986 100644
--- a/contrib/binutils/bfd/dwarf1.c
+++ b/contrib/binutils/bfd/dwarf1.c
@@ -1,5 +1,5 @@
/* DWARF 1 find nearest line (_bfd_dwarf1_find_nearest_line).
- Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
Written by Gavin Romig-Koch of Cygnus Solutions (gavin@cygnus.com).
@@ -126,6 +126,18 @@ struct linenumber {
/* Find the form of an attr, from the attr field. */
#define FORM_FROM_ATTR(attr) ((attr) & 0xF) /* Implicitly specified */
+static struct dwarf1_unit *alloc_dwarf1_unit PARAMS ((struct dwarf1_debug *));
+static struct dwarf1_func *alloc_dwarf1_func
+ PARAMS ((struct dwarf1_debug *, struct dwarf1_unit *));
+static boolean parse_die PARAMS ((bfd *, struct die_info *, char *, char *));
+static boolean parse_line_table
+ PARAMS ((struct dwarf1_debug *, struct dwarf1_unit *));
+static boolean parse_functions_in_unit
+ PARAMS ((struct dwarf1_debug *, struct dwarf1_unit *));
+static boolean dwarf1_unit_find_nearest_line
+ PARAMS ((struct dwarf1_debug *, struct dwarf1_unit *, unsigned long,
+ const char **, const char **, unsigned int *));
+
/* Return a newly allocated dwarf1_unit. It should be cleared and
then attached into the 'stash' at 'stash->lastUnit'. */
@@ -133,9 +145,9 @@ 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));
+ bfd_size_type amt = sizeof (struct dwarf1_unit);
+
+ struct dwarf1_unit* x = (struct dwarf1_unit*) bfd_zalloc (stash->abfd, amt);
x->prev = stash->lastUnit;
stash->lastUnit = x;
@@ -150,9 +162,9 @@ 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));
+ bfd_size_type amt = sizeof (struct dwarf1_func);
+
+ struct dwarf1_func* x = (struct dwarf1_func*) bfd_zalloc (stash->abfd, amt);
x->prev = aUnit->func_list;
aUnit->func_list = x;
@@ -167,10 +179,11 @@ alloc_dwarf1_func (stash, aUnit)
Return false if the die is invalidly formatted; true otherwise. */
static boolean
-parse_die (abfd, aDieInfo, aDiePtr)
+parse_die (abfd, aDieInfo, aDiePtr, aDiePtrEnd)
bfd* abfd;
struct die_info* aDieInfo;
char* aDiePtr;
+ char* aDiePtrEnd;
{
char* this_die = aDiePtr;
char* xptr = this_die;
@@ -180,7 +193,8 @@ parse_die (abfd, aDieInfo, aDiePtr)
/* First comes the length. */
aDieInfo->length = bfd_get_32 (abfd, (bfd_byte *) xptr);
xptr += 4;
- if (aDieInfo->length == 0)
+ if (aDieInfo->length == 0
+ || (this_die + aDieInfo->length) >= aDiePtrEnd)
return false;
if (aDieInfo->length < 6)
{
@@ -263,7 +277,7 @@ parse_line_table (stash, aUnit)
if (stash->line_section == 0)
{
asection *msec;
- unsigned long size;
+ bfd_size_type size;
msec = bfd_get_section_by_name (stash->abfd, ".line");
if (! msec)
@@ -275,7 +289,8 @@ parse_line_table (stash, aUnit)
if (! stash->line_section)
return false;
- if (! bfd_get_section_contents (stash->abfd, msec, stash->line_section, 0, size))
+ if (! bfd_get_section_contents (stash->abfd, msec, stash->line_section,
+ (bfd_vma) 0, size))
{
stash->line_section = 0;
return false;
@@ -288,9 +303,9 @@ parse_line_table (stash, aUnit)
if (xptr < stash->line_section_end)
{
unsigned long eachLine;
-
- char* tblend;
+ char *tblend;
unsigned long base;
+ bfd_size_type amt;
/* First comes the length. */
tblend = bfd_get_32 (stash->abfd, (bfd_byte *) xptr) + xptr;
@@ -305,9 +320,9 @@ parse_line_table (stash, aUnit)
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);
+ amt = sizeof (struct linenumber) * aUnit->line_count;
+ aUnit->linenumber_table = ((struct linenumber *)
+ bfd_alloc (stash->abfd, amt));
for (eachLine = 0; eachLine < aUnit->line_count; eachLine++)
{
@@ -348,7 +363,8 @@ parse_functions_in_unit (stash, aUnit)
{
struct die_info eachDieInfo;
- if (! parse_die (stash->abfd, &eachDieInfo, eachDie))
+ if (! parse_die (stash->abfd, &eachDieInfo, eachDie,
+ stash->debug_section_end))
return false;
if (eachDieInfo.tag == TAG_global_subroutine
@@ -467,10 +483,10 @@ _bfd_dwarf1_find_nearest_line (abfd, section, symbols, offset,
if (! stash)
{
asection *msec;
- unsigned long size;
+ bfd_size_type size = sizeof (struct dwarf1_debug);
- stash = elf_tdata (abfd)->dwarf1_find_line_info =
- (struct dwarf1_debug*) bfd_zalloc (abfd, sizeof (struct dwarf1_debug));
+ stash = elf_tdata (abfd)->dwarf1_find_line_info
+ = (struct dwarf1_debug *) bfd_zalloc (abfd, size);
if (! stash)
return false;
@@ -490,7 +506,8 @@ _bfd_dwarf1_find_nearest_line (abfd, section, symbols, offset,
if (! stash->debug_section)
return false;
- if (! bfd_get_section_contents (abfd, msec, stash->debug_section, 0, size))
+ if (! bfd_get_section_contents (abfd, msec, stash->debug_section,
+ (bfd_vma) 0, size))
{
stash->debug_section = 0;
return false;
@@ -522,7 +539,8 @@ _bfd_dwarf1_find_nearest_line (abfd, section, symbols, offset,
{
struct die_info aDieInfo;
- if (! parse_die (stash->abfd, &aDieInfo, stash->currentDie))
+ if (! parse_die (stash->abfd, &aDieInfo, stash->currentDie,
+ stash->debug_section_end))
return false;
if (aDieInfo.tag == TAG_compile_unit)
diff --git a/contrib/binutils/bfd/dwarf2.c b/contrib/binutils/bfd/dwarf2.c
index 2161846..6398d4e 100644
--- a/contrib/binutils/bfd/dwarf2.c
+++ b/contrib/binutils/bfd/dwarf2.c
@@ -40,7 +40,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
struct line_head
{
- unsigned int total_length;
+ bfd_vma total_length;
unsigned short version;
unsigned int prologue_length;
unsigned char minimum_instruction_length;
@@ -96,6 +96,14 @@ struct dwarf2_debug
/* Pointer to the end of the .debug_info section memory buffer. */
char* info_ptr_end;
+ /* Pointer to the section and address of the beginning of the
+ section. */
+ asection* sec;
+ char* sec_info_ptr;
+
+ /* Pointer to the symbol table. */
+ asymbol** syms;
+
/* Pointer to the .debug_abbrev section loaded into memory. */
char* dwarf_abbrev_buffer;
@@ -107,6 +115,12 @@ struct dwarf2_debug
/* Length of the loaded .debug_line section. */
unsigned long dwarf_line_size;
+
+ /* Pointer to the .debug_str section loaded into memory. */
+ char* dwarf_str_buffer;
+
+ /* Length of the loaded .debug_str section. */
+ unsigned long dwarf_str_size;
};
struct arange
@@ -161,10 +175,86 @@ struct comp_unit
/* A list of the functions found in this comp. unit. */
struct funcinfo* function_table;
+ /* Pointer to dwarf2_debug structure. */
+ struct dwarf2_debug *stash;
+
/* Address size for this unit - from unit header. */
unsigned char addr_size;
+
+ /* Offset size for this unit - from unit header. */
+ unsigned char offset_size;
+};
+
+/* This data structure holds the information of an abbrev. */
+struct abbrev_info
+{
+ unsigned int number; /* Number identifying abbrev. */
+ enum dwarf_tag tag; /* DWARF tag. */
+ int has_children; /* Boolean. */
+ unsigned int num_attrs; /* Number of attributes. */
+ struct attr_abbrev *attrs; /* An array of attribute descriptions. */
+ struct abbrev_info *next; /* Next in chain. */
+};
+
+struct attr_abbrev
+{
+ enum dwarf_attribute name;
+ enum dwarf_form form;
};
+#ifndef ABBREV_HASH_SIZE
+#define ABBREV_HASH_SIZE 121
+#endif
+#ifndef ATTR_ALLOC_CHUNK
+#define ATTR_ALLOC_CHUNK 4
+#endif
+
+static unsigned int read_1_byte PARAMS ((bfd *, char *));
+static int read_1_signed_byte PARAMS ((bfd *, char *));
+static unsigned int read_2_bytes PARAMS ((bfd *, char *));
+static unsigned int read_4_bytes PARAMS ((bfd *, char *));
+static bfd_vma read_8_bytes PARAMS ((bfd *, char *));
+static char *read_n_bytes PARAMS ((bfd *, char *, unsigned int));
+static char *read_string PARAMS ((bfd *, char *, unsigned int *));
+static char *read_indirect_string PARAMS ((struct comp_unit *, char *, unsigned int *));
+static unsigned int read_unsigned_leb128
+ PARAMS ((bfd *, char *, unsigned int *));
+static int read_signed_leb128
+ PARAMS ((bfd *, char *, unsigned int *));
+static bfd_vma read_address PARAMS ((struct comp_unit *, char *));
+static struct abbrev_info *lookup_abbrev
+ PARAMS ((unsigned int, struct abbrev_info **));
+static struct abbrev_info **read_abbrevs
+ PARAMS ((bfd *, unsigned int, struct dwarf2_debug *));
+static char *read_attribute
+ PARAMS ((struct attribute *, struct attr_abbrev *,
+ struct comp_unit *, char *));
+static char *read_attribute_value
+ PARAMS ((struct attribute *, unsigned,
+ struct comp_unit *, char *));
+static void add_line_info
+ PARAMS ((struct line_info_table *, bfd_vma, char *,
+ unsigned int, unsigned int, int));
+static char *concat_filename PARAMS ((struct line_info_table *, unsigned int));
+static void arange_add PARAMS ((struct comp_unit *, bfd_vma, bfd_vma));
+static struct line_info_table *decode_line_info
+ PARAMS ((struct comp_unit *, struct dwarf2_debug *));
+static boolean lookup_address_in_line_info_table
+ PARAMS ((struct line_info_table *, bfd_vma, const char **, unsigned int *));
+static boolean lookup_address_in_function_table
+ PARAMS ((struct funcinfo *, bfd_vma, const char **));
+static boolean scan_unit_for_functions PARAMS ((struct comp_unit *));
+static bfd_vma find_rela_addend
+ PARAMS ((bfd *, asection *, bfd_size_type, asymbol**));
+static struct comp_unit *parse_comp_unit
+ PARAMS ((bfd *, struct dwarf2_debug *, bfd_vma, unsigned int));
+static boolean comp_unit_contains_address
+ PARAMS ((struct comp_unit *, bfd_vma));
+static boolean comp_unit_find_nearest_line
+ PARAMS ((struct comp_unit *, bfd_vma, const char **, const char **,
+ unsigned int *, struct dwarf2_debug *));
+static asection *find_debug_info PARAMS ((bfd *, asection *));
+
/* VERBATIM
The following function up to the END VERBATIM mark are
copied directly from dwarf2read.c. */
@@ -227,7 +317,7 @@ read_4_signed_bytes (abfd, buf)
#endif
-static unsigned int
+static bfd_vma
read_8_bytes (abfd, buf)
bfd *abfd;
char *buf;
@@ -253,9 +343,7 @@ read_string (abfd, buf, bytes_read_ptr)
char *buf;
unsigned int *bytes_read_ptr;
{
- /* If the size of a host char is 8 bits, we can return a pointer
- to the string, otherwise we have to copy the string to a buffer
- allocated on the temporary obstack. */
+ /* Return a pointer to the embedded string. */
if (*buf == '\0')
{
*bytes_read_ptr = 1;
@@ -266,6 +354,59 @@ read_string (abfd, buf, bytes_read_ptr)
return buf;
}
+static char *
+read_indirect_string (unit, buf, bytes_read_ptr)
+ struct comp_unit* unit;
+ char *buf;
+ unsigned int *bytes_read_ptr;
+{
+ bfd_vma offset;
+ struct dwarf2_debug *stash = unit->stash;
+
+ if (unit->offset_size == 4)
+ offset = read_4_bytes (unit->abfd, buf);
+ else
+ offset = read_8_bytes (unit->abfd, buf);
+ *bytes_read_ptr = unit->offset_size;
+
+ if (! stash->dwarf_str_buffer)
+ {
+ asection *msec;
+ bfd *abfd = unit->abfd;
+
+ msec = bfd_get_section_by_name (abfd, ".debug_str");
+ if (! msec)
+ {
+ (*_bfd_error_handler)
+ (_("Dwarf Error: Can't find .debug_str section."));
+ bfd_set_error (bfd_error_bad_value);
+ return NULL;
+ }
+
+ stash->dwarf_str_size = msec->_raw_size;
+ stash->dwarf_str_buffer = (char*) bfd_alloc (abfd, msec->_raw_size);
+ if (! stash->dwarf_abbrev_buffer)
+ return NULL;
+
+ if (! bfd_get_section_contents (abfd, msec, stash->dwarf_str_buffer,
+ (bfd_vma) 0, msec->_raw_size))
+ return NULL;
+ }
+
+ if (offset >= stash->dwarf_str_size)
+ {
+ (*_bfd_error_handler) (_("Dwarf Error: DW_FORM_strp offset (%u) greater than or equal to .debug_str size (%u)."),
+ offset, stash->dwarf_str_size );
+ bfd_set_error (bfd_error_bad_value);
+ return NULL;
+ }
+
+ buf = stash->dwarf_str_buffer + offset;
+ if (*buf == '\0')
+ return NULL;
+ return buf;
+}
+
static unsigned int
read_unsigned_leb128 (abfd, buf, bytes_read_ptr)
bfd *abfd ATTRIBUTE_UNUSED;
@@ -349,30 +490,6 @@ read_address (unit, buf)
}
}
-/* This data structure holds the information of an abbrev. */
-struct abbrev_info
-{
- unsigned int number; /* Number identifying abbrev. */
- enum dwarf_tag tag; /* DWARF tag. */
- int has_children; /* Boolean. */
- unsigned int num_attrs; /* Number of attributes. */
- struct attr_abbrev *attrs; /* An array of attribute descriptions. */
- struct abbrev_info *next; /* Next in chain. */
-};
-
-struct attr_abbrev
-{
- enum dwarf_attribute name;
- enum dwarf_form form;
-};
-
-#ifndef ABBREV_HASH_SIZE
-#define ABBREV_HASH_SIZE 121
-#endif
-#ifndef ATTR_ALLOC_CHUNK
-#define ATTR_ALLOC_CHUNK 4
-#endif
-
/* Lookup an abbrev_info structure in the abbrev hash table. */
static struct abbrev_info *
@@ -413,6 +530,7 @@ read_abbrevs (abfd, offset, stash)
struct abbrev_info *cur_abbrev;
unsigned int abbrev_number, bytes_read, abbrev_name;
unsigned int abbrev_form, hash_number;
+ bfd_size_type amt;
if (! stash->dwarf_abbrev_buffer)
{
@@ -427,13 +545,12 @@ read_abbrevs (abfd, offset, stash)
}
stash->dwarf_abbrev_size = msec->_raw_size;
- stash->dwarf_abbrev_buffer = (char*) bfd_alloc (abfd, stash->dwarf_abbrev_size);
+ stash->dwarf_abbrev_buffer = (char*) bfd_alloc (abfd, msec->_raw_size);
if (! stash->dwarf_abbrev_buffer)
return 0;
- if (! bfd_get_section_contents (abfd, msec,
- stash->dwarf_abbrev_buffer, 0,
- stash->dwarf_abbrev_size))
+ if (! bfd_get_section_contents (abfd, msec, stash->dwarf_abbrev_buffer,
+ (bfd_vma) 0, msec->_raw_size))
return 0;
}
@@ -445,7 +562,8 @@ read_abbrevs (abfd, offset, stash)
return 0;
}
- abbrevs = (struct abbrev_info**) bfd_zalloc (abfd, sizeof (struct abbrev_info*) * ABBREV_HASH_SIZE);
+ amt = sizeof (struct abbrev_info*) * ABBREV_HASH_SIZE;
+ abbrevs = (struct abbrev_info**) bfd_zalloc (abfd, amt);
abbrev_ptr = stash->dwarf_abbrev_buffer + offset;
abbrev_number = read_unsigned_leb128 (abfd, abbrev_ptr, &bytes_read);
@@ -454,7 +572,8 @@ read_abbrevs (abfd, offset, stash)
/* Loop until we reach an abbrev number of 0. */
while (abbrev_number)
{
- cur_abbrev = (struct abbrev_info*)bfd_zalloc (abfd, sizeof (struct abbrev_info));
+ amt = sizeof (struct abbrev_info);
+ cur_abbrev = (struct abbrev_info *) bfd_zalloc (abfd, amt);
/* Read in abbrev header. */
cur_abbrev->number = abbrev_number;
@@ -473,10 +592,10 @@ read_abbrevs (abfd, offset, stash)
{
if ((cur_abbrev->num_attrs % ATTR_ALLOC_CHUNK) == 0)
{
- cur_abbrev->attrs = (struct attr_abbrev *)
- bfd_realloc (cur_abbrev->attrs,
- (cur_abbrev->num_attrs + ATTR_ALLOC_CHUNK)
- * sizeof (struct attr_abbrev));
+ amt = cur_abbrev->num_attrs + ATTR_ALLOC_CHUNK;
+ amt *= sizeof (struct attr_abbrev);
+ cur_abbrev->attrs = ((struct attr_abbrev *)
+ bfd_realloc (cur_abbrev->attrs, amt));
if (! cur_abbrev->attrs)
return 0;
}
@@ -512,31 +631,33 @@ read_abbrevs (abfd, offset, stash)
return abbrevs;
}
-/* Read an attribute described by an abbreviated attribute. */
+/* Read an attribute value described by an attribute form. */
static char *
-read_attribute (attr, abbrev, unit, info_ptr)
+read_attribute_value (attr, form, unit, info_ptr)
struct attribute *attr;
- struct attr_abbrev *abbrev;
+ unsigned form;
struct comp_unit *unit;
char *info_ptr;
{
bfd *abfd = unit->abfd;
unsigned int bytes_read;
struct dwarf_block *blk;
+ bfd_size_type amt;
- attr->name = abbrev->name;
- attr->form = abbrev->form;
+ attr->form = form;
- switch (abbrev->form)
+ switch (form)
{
case DW_FORM_addr:
+ /* FIXME: DWARF3 draft sais DW_FORM_ref_addr is offset_size. */
case DW_FORM_ref_addr:
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));
+ amt = sizeof (struct dwarf_block);
+ blk = (struct dwarf_block *) bfd_alloc (abfd, amt);
blk->size = read_2_bytes (abfd, info_ptr);
info_ptr += 2;
blk->data = read_n_bytes (abfd, info_ptr, blk->size);
@@ -544,7 +665,8 @@ read_attribute (attr, abbrev, unit, info_ptr)
DW_BLOCK (attr) = blk;
break;
case DW_FORM_block4:
- blk = (struct dwarf_block *) bfd_alloc (abfd, sizeof (struct dwarf_block));
+ amt = sizeof (struct dwarf_block);
+ blk = (struct dwarf_block *) bfd_alloc (abfd, amt);
blk->size = read_4_bytes (abfd, info_ptr);
info_ptr += 4;
blk->data = read_n_bytes (abfd, info_ptr, blk->size);
@@ -567,8 +689,13 @@ read_attribute (attr, abbrev, unit, info_ptr)
DW_STRING (attr) = read_string (abfd, info_ptr, &bytes_read);
info_ptr += bytes_read;
break;
+ case DW_FORM_strp:
+ DW_STRING (attr) = read_indirect_string (unit, info_ptr, &bytes_read);
+ info_ptr += bytes_read;
+ break;
case DW_FORM_block:
- blk = (struct dwarf_block *) bfd_alloc (abfd, sizeof (struct dwarf_block));
+ amt = sizeof (struct dwarf_block);
+ blk = (struct dwarf_block *) bfd_alloc (abfd, amt);
blk->size = read_unsigned_leb128 (abfd, info_ptr, &bytes_read);
info_ptr += bytes_read;
blk->data = read_n_bytes (abfd, info_ptr, blk->size);
@@ -576,7 +703,8 @@ read_attribute (attr, abbrev, unit, info_ptr)
DW_BLOCK (attr) = blk;
break;
case DW_FORM_block1:
- blk = (struct dwarf_block *) bfd_alloc (abfd, sizeof (struct dwarf_block));
+ amt = sizeof (struct dwarf_block);
+ blk = (struct dwarf_block *) bfd_alloc (abfd, amt);
blk->size = read_1_byte (abfd, info_ptr);
info_ptr += 1;
blk->data = read_n_bytes (abfd, info_ptr, blk->size);
@@ -619,16 +747,33 @@ read_attribute (attr, abbrev, unit, info_ptr)
DW_UNSND (attr) = read_unsigned_leb128 (abfd, info_ptr, &bytes_read);
info_ptr += bytes_read;
break;
- case DW_FORM_strp:
case DW_FORM_indirect:
+ form = read_unsigned_leb128 (abfd, info_ptr, &bytes_read);
+ info_ptr += bytes_read;
+ info_ptr = read_attribute_value (attr, form, unit, info_ptr);
+ break;
default:
(*_bfd_error_handler) (_("Dwarf Error: Invalid or unhandled FORM value: %d."),
- abbrev->form);
+ form);
bfd_set_error (bfd_error_bad_value);
}
return info_ptr;
}
+/* Read an attribute described by an abbreviated attribute. */
+
+static char *
+read_attribute (attr, abbrev, unit, info_ptr)
+ struct attribute *attr;
+ struct attr_abbrev *abbrev;
+ struct comp_unit *unit;
+ char *info_ptr;
+{
+ attr->name = abbrev->name;
+ info_ptr = read_attribute_value (attr, abbrev->form, unit, info_ptr);
+ return info_ptr;
+}
+
/* Source line information table routines. */
#define FILE_ALLOC_CHUNK 5
@@ -672,8 +817,8 @@ add_line_info (table, address, filename, line, column, end_sequence)
unsigned int column;
int end_sequence;
{
- struct line_info* info = (struct line_info*)
- bfd_alloc (table->abfd, sizeof (struct line_info));
+ bfd_size_type amt = sizeof (struct line_info);
+ struct line_info* info = (struct line_info*) bfd_alloc (table->abfd, amt);
info->prev_line = table->last_line;
table->last_line = info;
@@ -749,7 +894,7 @@ arange_add (unit, low_pc, high_pc)
}
/* Need to allocate a new arange and insert it into the arange list. */
- arange = bfd_zalloc (unit->abfd, sizeof (*arange));
+ arange = bfd_zalloc (unit->abfd, (bfd_size_type) sizeof (*arange));
arange->low = low_pc;
arange->high = high_pc;
@@ -769,9 +914,10 @@ decode_line_info (unit, stash)
char *line_ptr;
char *line_end;
struct line_head lh;
- unsigned int i, bytes_read;
+ unsigned int i, bytes_read, offset_size;
char *cur_file, *cur_dir;
unsigned char op_code, extended_op, adj_opcode;
+ bfd_size_type amt;
if (! stash->dwarf_line_buffer)
{
@@ -786,13 +932,12 @@ decode_line_info (unit, stash)
}
stash->dwarf_line_size = msec->_raw_size;
- stash->dwarf_line_buffer = (char *) bfd_alloc (abfd, stash->dwarf_line_size);
+ stash->dwarf_line_buffer = (char *) bfd_alloc (abfd, msec->_raw_size);
if (! stash->dwarf_line_buffer)
return 0;
- if (! bfd_get_section_contents (abfd, msec,
- stash->dwarf_line_buffer, 0,
- stash->dwarf_line_size))
+ if (! bfd_get_section_contents (abfd, msec, stash->dwarf_line_buffer,
+ (bfd_vma) 0, msec->_raw_size))
return 0;
/* FIXME: We ought to apply the relocs against this section before
@@ -810,8 +955,8 @@ decode_line_info (unit, stash)
return 0;
}
- table = (struct line_info_table*) bfd_alloc (abfd,
- sizeof (struct line_info_table));
+ amt = sizeof (struct line_info_table);
+ table = (struct line_info_table*) bfd_alloc (abfd, amt);
table->abfd = abfd;
table->comp_dir = unit->comp_dir;
@@ -829,11 +974,21 @@ decode_line_info (unit, stash)
/* Read in the prologue. */
lh.total_length = read_4_bytes (abfd, line_ptr);
line_ptr += 4;
+ offset_size = 4;
+ if (lh.total_length == 0xffffffff)
+ {
+ lh.total_length = read_8_bytes (abfd, line_ptr);
+ line_ptr += 8;
+ offset_size = 8;
+ }
line_end = line_ptr + lh.total_length;
lh.version = read_2_bytes (abfd, line_ptr);
line_ptr += 2;
- lh.prologue_length = read_4_bytes (abfd, line_ptr);
- line_ptr += 4;
+ if (offset_size == 4)
+ lh.prologue_length = read_4_bytes (abfd, line_ptr);
+ else
+ lh.prologue_length = read_8_bytes (abfd, line_ptr);
+ line_ptr += offset_size;
lh.minimum_instruction_length = read_1_byte (abfd, line_ptr);
line_ptr += 1;
lh.default_is_stmt = read_1_byte (abfd, line_ptr);
@@ -844,8 +999,8 @@ decode_line_info (unit, stash)
line_ptr += 1;
lh.opcode_base = read_1_byte (abfd, line_ptr);
line_ptr += 1;
- lh.standard_opcode_lengths = (unsigned char *)
- bfd_alloc (abfd, lh.opcode_base * sizeof (unsigned char));
+ amt = lh.opcode_base * sizeof (unsigned char);
+ lh.standard_opcode_lengths = (unsigned char *) bfd_alloc (abfd, amt);
lh.standard_opcode_lengths[0] = 1;
@@ -862,9 +1017,9 @@ decode_line_info (unit, stash)
if ((table->num_dirs % DIR_ALLOC_CHUNK) == 0)
{
- table->dirs = (char **)
- bfd_realloc (table->dirs,
- (table->num_dirs + DIR_ALLOC_CHUNK) * sizeof (char *));
+ amt = table->num_dirs + DIR_ALLOC_CHUNK;
+ amt *= sizeof (char *);
+ table->dirs = (char **) bfd_realloc (table->dirs, amt);
if (! table->dirs)
return 0;
}
@@ -881,10 +1036,9 @@ decode_line_info (unit, stash)
if ((table->num_files % FILE_ALLOC_CHUNK) == 0)
{
- table->files = (struct fileinfo *)
- bfd_realloc (table->files,
- (table->num_files + FILE_ALLOC_CHUNK)
- * sizeof (struct fileinfo));
+ amt = table->num_files + FILE_ALLOC_CHUNK;
+ amt *= sizeof (struct fileinfo);
+ table->files = (struct fileinfo *) bfd_realloc (table->files, amt);
if (! table->files)
return 0;
}
@@ -923,7 +1077,22 @@ decode_line_info (unit, stash)
op_code = read_1_byte (abfd, line_ptr);
line_ptr += 1;
- switch (op_code)
+ if (op_code >= lh.opcode_base)
+ { /* Special operand. */
+ adj_opcode = op_code - lh.opcode_base;
+ address += (adj_opcode / lh.line_range)
+ * lh.minimum_instruction_length;
+ line += lh.line_base + (adj_opcode % lh.line_range);
+ /* Append row to matrix using current values. */
+ add_line_info (table, address, filename, line, column, 0);
+ basic_block = 1;
+ if (need_low_pc)
+ {
+ need_low_pc = 0;
+ low_pc = address;
+ }
+ }
+ else switch (op_code)
{
case DW_LNS_extended_op:
line_ptr += 1; /* Ignore length. */
@@ -951,10 +1120,10 @@ decode_line_info (unit, stash)
line_ptr += bytes_read;
if ((table->num_files % FILE_ALLOC_CHUNK) == 0)
{
- table->files = (struct fileinfo *)
- bfd_realloc (table->files,
- (table->num_files + FILE_ALLOC_CHUNK)
- * sizeof (struct fileinfo));
+ amt = table->num_files + FILE_ALLOC_CHUNK;
+ amt *= sizeof (struct fileinfo);
+ table->files =
+ (struct fileinfo *) bfd_realloc (table->files, amt);
if (! table->files)
return 0;
}
@@ -1023,19 +1192,15 @@ decode_line_info (unit, stash)
address += read_2_bytes (abfd, line_ptr);
line_ptr += 2;
break;
- default: /* Special operand. */
- adj_opcode = op_code - lh.opcode_base;
- address += (adj_opcode / lh.line_range)
- * lh.minimum_instruction_length;
- line += lh.line_base + (adj_opcode % lh.line_range);
- /* Append row to matrix using current values. */
- add_line_info (table, address, filename, line, column, 0);
- basic_block = 1;
- if (need_low_pc)
- {
- need_low_pc = 0;
- low_pc = address;
- }
+ default:
+ { /* Unknown standard opcode, ignore it. */
+ int i;
+ for (i = 0; i < lh.standard_opcode_lengths[op_code]; i++)
+ {
+ (void) read_unsigned_leb128 (abfd, line_ptr, &bytes_read);
+ line_ptr += bytes_read;
+ }
+ }
}
}
}
@@ -1158,7 +1323,8 @@ scan_unit_for_functions (unit)
if (abbrev->tag == DW_TAG_subprogram)
{
- func = (struct funcinfo*) bfd_zalloc (abfd, sizeof (struct funcinfo));
+ bfd_size_type amt = sizeof (struct funcinfo);
+ func = (struct funcinfo *) bfd_zalloc (abfd, amt);
func->prev_func = unit->function_table;
unit->function_table = func;
}
@@ -1219,22 +1385,75 @@ scan_unit_for_functions (unit)
return true;
}
+/* Look for a RELA relocation to be applied on OFFSET of section SEC,
+ and return the addend if such a relocation is found. Since this is
+ only used to find relocations referring to the .debug_abbrev
+ section, we make sure the relocation refers to this section, but
+ this is not strictly necessary, and it can probably be safely
+ removed if needed. However, it is important to note that this
+ function only returns the addend, it doesn't serve the purpose of
+ applying a generic relocation.
+
+ If no suitable relocation is found, or if it is not a real RELA
+ relocation, this function returns 0. */
+
+static bfd_vma
+find_rela_addend (abfd, sec, offset, syms)
+ bfd* abfd;
+ asection* sec;
+ bfd_size_type offset;
+ asymbol** syms;
+{
+ long reloc_size = bfd_get_reloc_upper_bound (abfd, sec);
+ arelent **relocs = NULL;
+ long reloc_count, relc;
+
+ if (reloc_size <= 0)
+ return 0;
+
+ relocs = (arelent **) bfd_malloc ((bfd_size_type) reloc_size);
+ if (relocs == NULL)
+ return 0;
+
+ reloc_count = bfd_canonicalize_reloc (abfd, sec, relocs, syms);
+
+ if (reloc_count <= 0)
+ {
+ free (relocs);
+ return 0;
+ }
+
+ for (relc = 0; relc < reloc_count; relc++)
+ if (relocs[relc]->address == offset
+ && (*relocs[relc]->sym_ptr_ptr)->flags & BSF_SECTION_SYM
+ && strcmp ((*relocs[relc]->sym_ptr_ptr)->name,
+ ".debug_abbrev") == 0)
+ {
+ bfd_vma addend = (relocs[relc]->howto->partial_inplace
+ ? 0 : relocs[relc]->addend);
+ free (relocs);
+ return addend;
+ }
+
+ free (relocs);
+ return 0;
+}
+
/* 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.
+ OFFSET_SIZE is the size of DWARF2 offsets (either 4 or 8 bytes).
This routine does not read the whole compilation unit; only enough
to get to the line number information for the compilation unit. */
static struct comp_unit *
-parse_comp_unit (abfd, stash, unit_length, abbrev_length)
+parse_comp_unit (abfd, stash, unit_length, offset_size)
bfd* abfd;
struct dwarf2_debug *stash;
bfd_vma unit_length;
- unsigned int abbrev_length;
+ unsigned int offset_size;
{
struct comp_unit* unit;
@@ -1249,17 +1468,23 @@ parse_comp_unit (abfd, stash, unit_length, abbrev_length)
char *info_ptr = stash->info_ptr;
char *end_ptr = info_ptr + unit_length;
+ bfd_size_type amt;
+ bfd_size_type off;
version = read_2_bytes (abfd, info_ptr);
info_ptr += 2;
- BFD_ASSERT (abbrev_length == 0
- || abbrev_length == 4
- || abbrev_length == 8);
- if (abbrev_length == 0 || abbrev_length == 4)
+ BFD_ASSERT (offset_size == 4 || offset_size == 8);
+ if (offset_size == 4)
abbrev_offset = read_4_bytes (abfd, info_ptr);
- else if (abbrev_length == 8)
+ else
abbrev_offset = read_8_bytes (abfd, info_ptr);
- info_ptr += abbrev_length;
+ /* The abbrev offset is generally a relocation pointing to
+ .debug_abbrev+offset. On RELA targets, we have to find the
+ relocation and extract the addend to obtain the actual
+ abbrev_offset, so do it here. */
+ off = info_ptr - stash->sec_info_ptr;
+ abbrev_offset += find_rela_addend (abfd, stash->sec, off, stash->syms);
+ info_ptr += offset_size;
addr_size = read_1_byte (abfd, info_ptr);
info_ptr += 1;
@@ -1310,11 +1535,14 @@ parse_comp_unit (abfd, stash, unit_length, abbrev_length)
return 0;
}
- unit = (struct comp_unit*) bfd_zalloc (abfd, sizeof (struct comp_unit));
+ amt = sizeof (struct comp_unit);
+ unit = (struct comp_unit*) bfd_zalloc (abfd, amt);
unit->abfd = abfd;
unit->addr_size = addr_size;
+ unit->offset_size = offset_size;
unit->abbrevs = abbrevs;
unit->end_ptr = end_ptr;
+ unit->stash = stash;
for (i = 0; i < abbrev->num_attrs; ++i)
{
@@ -1499,7 +1727,7 @@ _bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
addr_size, pinfo)
bfd *abfd;
asection *section;
- asymbol **symbols ATTRIBUTE_UNUSED;
+ asymbol **symbols;
bfd_vma offset;
const char **filename_ptr;
const char **functionname_ptr;
@@ -1535,11 +1763,11 @@ _bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
if (! stash)
{
- unsigned long total_size;
+ bfd_size_type total_size;
asection *msec;
+ bfd_size_type amt = sizeof (struct dwarf2_debug);
- stash =
- (struct dwarf2_debug*) bfd_zalloc (abfd, sizeof (struct dwarf2_debug));
+ stash = (struct dwarf2_debug*) bfd_zalloc (abfd, amt);
if (! stash)
return false;
@@ -1570,8 +1798,8 @@ _bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
msec;
msec = find_debug_info (abfd, msec))
{
- unsigned long size;
- unsigned long start;
+ bfd_size_type size;
+ bfd_size_type start;
size = msec->_raw_size;
if (size == 0)
@@ -1579,13 +1807,18 @@ _bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
start = stash->info_ptr_end - stash->info_ptr;
- if (! bfd_get_section_contents (abfd, msec, stash->info_ptr + start, 0, size))
+ if (! bfd_get_section_contents (abfd, msec, stash->info_ptr + start,
+ (bfd_vma) 0, size))
continue;
stash->info_ptr_end = stash->info_ptr + start + size;
}
- BFD_ASSERT (stash->info_ptr_end = stash->info_ptr + total_size);
+ BFD_ASSERT (stash->info_ptr_end == stash->info_ptr + total_size);
+
+ stash->sec = find_debug_info (abfd, NULL);
+ stash->sec_info_ptr = stash->info_ptr;
+ stash->syms = symbols;
}
/* FIXME: There is a problem with the contents of the
@@ -1618,21 +1851,36 @@ _bfd_dwarf2_find_nearest_line (abfd, section, symbols, offset,
/* Read each remaining comp. units checking each as they are read. */
while (stash->info_ptr < stash->info_ptr_end)
{
- struct comp_unit* each;
bfd_vma length;
boolean found;
+ unsigned int offset_size = addr_size;
if (addr_size == 4)
- length = read_4_bytes (abfd, stash->info_ptr);
+ {
+ length = read_4_bytes (abfd, stash->info_ptr);
+ if (length == 0xffffffff)
+ {
+ offset_size = 8;
+ length = read_8_bytes (abfd, stash->info_ptr + 4);
+ stash->info_ptr += 8;
+ }
+ }
else
length = read_8_bytes (abfd, stash->info_ptr);
stash->info_ptr += addr_size;
if (length > 0)
{
- each = parse_comp_unit (abfd, stash, length, addr_size);
+ each = parse_comp_unit (abfd, stash, length, offset_size);
stash->info_ptr += length;
+ if ((bfd_vma) (stash->info_ptr - stash->sec_info_ptr)
+ == stash->sec->_raw_size)
+ {
+ stash->sec = find_debug_info (abfd, stash->sec);
+ stash->sec_info_ptr = stash->info_ptr;
+ }
+
if (each)
{
each->next_unit = stash->all_comp_units;
diff --git a/contrib/binutils/bfd/ecoff.c b/contrib/binutils/bfd/ecoff.c
index db60638..1e3b6a9 100644
--- a/contrib/binutils/bfd/ecoff.c
+++ b/contrib/binutils/bfd/ecoff.c
@@ -65,7 +65,7 @@ static boolean ecoff_compute_section_file_positions PARAMS ((bfd *abfd));
static bfd_size_type ecoff_compute_reloc_file_positions PARAMS ((bfd *abfd));
static boolean ecoff_get_extr PARAMS ((asymbol *, EXTR *));
static void ecoff_set_index PARAMS ((asymbol *, bfd_size_type));
-static unsigned int ecoff_armap_hash PARAMS ((CONST char *s,
+static unsigned int ecoff_armap_hash PARAMS ((const char *s,
unsigned int *rehash,
unsigned int size,
unsigned int hlog));
@@ -78,7 +78,7 @@ static asection bfd_debug_section =
"*DEBUG*", 0, 0, NULL, 0, 0, 0,
/* linker_mark, linker_has_input, gc_mark, segment_mark, */
0, 0, 0, 0,
- /* vma, lma, _cooked_size, _raw_size, */
+ /* vma, lma, _cooked_size, _raw_size, */
0, 0, 0, 0,
/* output_offset, output_section, alignment_power, */
0, NULL, 0,
@@ -86,8 +86,8 @@ static asection bfd_debug_section =
NULL, NULL, 0, 0, 0,
/* line_filepos, userdata, contents, lineno, lineno_count, */
0, NULL, NULL, NULL, 0,
- /* comdat, kept_section, moving_line_filepos, */
- NULL, NULL, 0,
+ /* entsize, comdat, moving_line_filepos, */
+ 0, NULL, 0,
/* target_index, used_by_bfd, constructor_chain, owner, */
0, NULL, NULL, NULL,
/* symbol, */
@@ -104,8 +104,8 @@ boolean
_bfd_ecoff_mkobject (abfd)
bfd *abfd;
{
- abfd->tdata.ecoff_obj_data = ((struct ecoff_tdata *)
- bfd_zalloc (abfd, sizeof (ecoff_data_type)));
+ bfd_size_type amt = sizeof (ecoff_data_type);
+ abfd->tdata.ecoff_obj_data = (struct ecoff_tdata *) bfd_zalloc (abfd, amt);
if (abfd->tdata.ecoff_obj_data == NULL)
return false;
@@ -371,16 +371,17 @@ ecoff_sec_to_styp_flags (name, flags)
/* Get the BFD flags to use for a section. */
-flagword
-_bfd_ecoff_styp_to_sec_flags (abfd, hdr, name, section)
+boolean
+_bfd_ecoff_styp_to_sec_flags (abfd, hdr, name, section, flags_ptr)
bfd *abfd ATTRIBUTE_UNUSED;
PTR hdr;
const char *name ATTRIBUTE_UNUSED;
asection *section ATTRIBUTE_UNUSED;
+ flagword * flags_ptr;
{
struct internal_scnhdr *internal_s = (struct internal_scnhdr *) hdr;
long styp_flags = internal_s->s_flags;
- flagword sec_flags=0;
+ flagword sec_flags = 0;
if (styp_flags & STYP_NOLOAD)
sec_flags |= SEC_NEVER_LOAD;
@@ -422,29 +423,20 @@ _bfd_ecoff_styp_to_sec_flags (abfd, hdr, name, section)
}
else if ((styp_flags & STYP_BSS)
|| (styp_flags & STYP_SBSS))
- {
- sec_flags |= SEC_ALLOC;
- }
+ sec_flags |= SEC_ALLOC;
else if ((styp_flags & STYP_INFO) || styp_flags == STYP_COMMENT)
- {
- sec_flags |= SEC_NEVER_LOAD;
- }
+ sec_flags |= SEC_NEVER_LOAD;
else if ((styp_flags & STYP_LITA)
|| (styp_flags & STYP_LIT8)
|| (styp_flags & STYP_LIT4))
- {
- sec_flags |= SEC_DATA | SEC_LOAD | SEC_ALLOC | SEC_READONLY;
- }
+ sec_flags |= SEC_DATA | SEC_LOAD | SEC_ALLOC | SEC_READONLY;
else if (styp_flags & STYP_ECOFF_LIB)
- {
- sec_flags |= SEC_COFF_SHARED_LIBRARY;
- }
+ sec_flags |= SEC_COFF_SHARED_LIBRARY;
else
- {
- sec_flags |= SEC_ALLOC | SEC_LOAD;
- }
+ sec_flags |= SEC_ALLOC | SEC_LOAD;
- return sec_flags;
+ * flags_ptr = sec_flags;
+ return true;
}
/* Read in the symbolic header for an ECOFF object file. */
@@ -482,13 +474,12 @@ ecoff_slurp_symbolic_header (abfd)
}
/* Read the symbolic information header. */
- raw = (PTR) bfd_malloc ((size_t) external_hdr_size);
+ raw = (PTR) bfd_malloc (external_hdr_size);
if (raw == NULL)
goto error_return;
- if (bfd_seek (abfd, ecoff_data (abfd)->sym_filepos, SEEK_SET) == -1
- || (bfd_read (raw, external_hdr_size, 1, abfd)
- != external_hdr_size))
+ if (bfd_seek (abfd, ecoff_data (abfd)->sym_filepos, SEEK_SET) != 0
+ || bfd_bread (raw, external_hdr_size, abfd) != external_hdr_size)
goto error_return;
internal_symhdr = &ecoff_data (abfd)->debug_info.symbolic_header;
(*backend->debug_swap.swap_hdr_in) (abfd, raw, internal_symhdr);
@@ -533,6 +524,8 @@ _bfd_ecoff_slurp_symbolic_info (abfd, ignore, debug)
struct fdr *fdr_ptr;
bfd_size_type raw_end;
bfd_size_type cb_end;
+ bfd_size_type amt;
+ file_ptr pos;
BFD_ASSERT (debug == &ecoff_data (abfd)->debug_info);
@@ -591,11 +584,11 @@ _bfd_ecoff_slurp_symbolic_info (abfd, ignore, debug)
raw = (PTR) bfd_alloc (abfd, raw_size);
if (raw == NULL)
return false;
- if (bfd_seek (abfd,
- (ecoff_data (abfd)->sym_filepos
- + backend->debug_swap.external_hdr_size),
- SEEK_SET) != 0
- || bfd_read (raw, raw_size, 1, abfd) != raw_size)
+
+ pos = ecoff_data (abfd)->sym_filepos;
+ pos += backend->debug_swap.external_hdr_size;
+ if (bfd_seek (abfd, pos, SEEK_SET) != 0
+ || bfd_bread (raw, raw_size, abfd) != raw_size)
{
bfd_release (abfd, raw);
return false;
@@ -632,9 +625,9 @@ _bfd_ecoff_slurp_symbolic_info (abfd, ignore, debug)
We need to look at the fdr to deal with a lot of information in
the symbols, so we swap them here. */
- debug->fdr = (struct fdr *) bfd_alloc (abfd,
- (internal_symhdr->ifdMax *
- sizeof (struct fdr)));
+ amt = internal_symhdr->ifdMax;
+ amt *= sizeof (struct fdr);
+ debug->fdr = (struct fdr *) bfd_alloc (abfd, amt);
if (debug->fdr == NULL)
return false;
external_fdr_size = backend->debug_swap.external_fdr_size;
@@ -666,8 +659,9 @@ _bfd_ecoff_make_empty_symbol (abfd)
bfd *abfd;
{
ecoff_symbol_type *new;
+ bfd_size_type amt = sizeof (ecoff_symbol_type);
- new = (ecoff_symbol_type *) bfd_alloc (abfd, sizeof (ecoff_symbol_type));
+ new = (ecoff_symbol_type *) bfd_alloc (abfd, amt);
if (new == (ecoff_symbol_type *) NULL)
return (asymbol *) NULL;
memset ((PTR) new, 0, sizeof *new);
@@ -866,6 +860,7 @@ ecoff_set_symbol_info (abfd, ecoff_sym, asym, ext, weak)
asection *section;
arelent_chain *reloc_chain;
unsigned int bitsize;
+ bfd_size_type amt;
/* Get a section with the same name as the symbol (usually
__CTOR_LIST__ or __DTOR_LIST__). FIXME: gcc uses the
@@ -885,7 +880,8 @@ ecoff_set_symbol_info (abfd, ecoff_sym, asym, ext, weak)
{
char *copy;
- copy = (char *) bfd_alloc (abfd, strlen (name) + 1);
+ amt = strlen (name) + 1;
+ copy = (char *) bfd_alloc (abfd, amt);
if (!copy)
return false;
strcpy (copy, name);
@@ -893,8 +889,8 @@ ecoff_set_symbol_info (abfd, ecoff_sym, asym, ext, weak)
}
/* Build a reloc pointing to this constructor. */
- reloc_chain =
- (arelent_chain *) bfd_alloc (abfd, sizeof (arelent_chain));
+ amt = sizeof (arelent_chain);
+ reloc_chain = (arelent_chain *) bfd_alloc (abfd, amt);
if (!reloc_chain)
return false;
reloc_chain->relent.sym_ptr_ptr =
@@ -966,7 +962,8 @@ _bfd_ecoff_slurp_symbol_table (abfd)
if (bfd_get_symcount (abfd) == 0)
return true;
- internal_size = bfd_get_symcount (abfd) * sizeof (ecoff_symbol_type);
+ internal_size = bfd_get_symcount (abfd);
+ internal_size *= sizeof (ecoff_symbol_type);
internal = (ecoff_symbol_type *) bfd_alloc (abfd, internal_size);
if (internal == NULL)
return false;
@@ -1671,7 +1668,7 @@ ecoff_slurp_reloc_table (abfd, section, symbols)
const struct ecoff_backend_data * const backend = ecoff_backend (abfd);
arelent *internal_relocs;
bfd_size_type external_reloc_size;
- bfd_size_type external_relocs_size;
+ bfd_size_type amt;
char *external_relocs;
arelent *rptr;
unsigned int i;
@@ -1684,19 +1681,19 @@ ecoff_slurp_reloc_table (abfd, section, symbols)
if (_bfd_ecoff_slurp_symbol_table (abfd) == false)
return false;
- internal_relocs = (arelent *) bfd_alloc (abfd,
- (sizeof (arelent)
- * section->reloc_count));
+ amt = section->reloc_count;
+ amt *= sizeof (arelent);
+ internal_relocs = (arelent *) bfd_alloc (abfd, amt);
+
external_reloc_size = backend->external_reloc_size;
- external_relocs_size = external_reloc_size * section->reloc_count;
- external_relocs = (char *) bfd_alloc (abfd, external_relocs_size);
+ amt = external_reloc_size * section->reloc_count;
+ external_relocs = (char *) bfd_alloc (abfd, amt);
if (internal_relocs == (arelent *) NULL
|| external_relocs == (char *) NULL)
return false;
if (bfd_seek (abfd, section->rel_filepos, SEEK_SET) != 0)
return false;
- if (bfd_read (external_relocs, 1, external_relocs_size, abfd)
- != external_relocs_size)
+ if (bfd_bread (external_relocs, amt, abfd) != amt)
return false;
for (i = 0, rptr = internal_relocs; i < section->reloc_count; i++, rptr++)
@@ -1725,7 +1722,7 @@ ecoff_slurp_reloc_table (abfd, section, symbols)
}
else
{
- CONST char *sec_name;
+ const char *sec_name;
asection *sec;
/* r_symndx is a section key. */
@@ -1822,8 +1819,8 @@ _bfd_ecoff_find_nearest_line (abfd, section, ignore_symbols, offset,
asection *section;
asymbol **ignore_symbols ATTRIBUTE_UNUSED;
bfd_vma offset;
- CONST char **filename_ptr;
- CONST char **functionname_ptr;
+ const char **filename_ptr;
+ const char **functionname_ptr;
unsigned int *retline_ptr;
{
const struct ecoff_debug_swap * const debug_swap
@@ -1838,9 +1835,9 @@ _bfd_ecoff_find_nearest_line (abfd, section, ignore_symbols, offset,
if (ecoff_data (abfd)->find_line_info == NULL)
{
- ecoff_data (abfd)->find_line_info =
- ((struct ecoff_find_line *)
- bfd_zalloc (abfd, sizeof (struct ecoff_find_line)));
+ bfd_size_type amt = sizeof (struct ecoff_find_line);
+ ecoff_data (abfd)->find_line_info
+ = (struct ecoff_find_line *) bfd_zalloc (abfd, amt);
if (ecoff_data (abfd)->find_line_info == NULL)
return false;
}
@@ -2065,13 +2062,15 @@ ecoff_compute_section_file_positions (abfd)
boolean rdata_in_text;
boolean first_data, first_nonalloc;
const bfd_vma round = ecoff_backend (abfd)->round;
+ bfd_size_type amt;
sofar = _bfd_ecoff_sizeof_headers (abfd, false);
file_sofar = sofar;
/* Sort the sections by VMA. */
- sorted_hdrs = (asection **) bfd_malloc (abfd->section_count
- * sizeof (asection *));
+ amt = abfd->section_count;
+ amt *= sizeof (asection *);
+ sorted_hdrs = (asection **) bfd_malloc (amt);
if (sorted_hdrs == NULL)
return false;
for (current = abfd->sections, i = 0;
@@ -2265,6 +2264,8 @@ _bfd_ecoff_set_section_contents (abfd, section, location, offset, count)
file_ptr offset;
bfd_size_type count;
{
+ file_ptr pos;
+
/* This must be done first, because bfd_set_section_contents is
going to set output_has_begun to true. */
if (abfd->output_has_begun == false)
@@ -2293,8 +2294,9 @@ _bfd_ecoff_set_section_contents (abfd, section, location, offset, count)
if (count == 0)
return true;
- if (bfd_seek (abfd, (file_ptr) (section->filepos + offset), SEEK_SET) != 0
- || bfd_write (location, 1, count, abfd) != count)
+ pos = section->filepos + offset;
+ if (bfd_seek (abfd, pos, SEEK_SET) != 0
+ || bfd_bwrite (location, count, abfd) != count)
return false;
return true;
@@ -2521,7 +2523,7 @@ _bfd_ecoff_write_object_contents (abfd)
siz = filhsz;
if (siz < aoutsz)
siz = aoutsz;
- buff = (PTR) bfd_malloc ((size_t) siz);
+ buff = (PTR) bfd_malloc (siz);
if (buff == NULL)
goto error_return;
}
@@ -2581,7 +2583,7 @@ _bfd_ecoff_write_object_contents (abfd)
current->flags);
if (bfd_coff_swap_scnhdr_out (abfd, (PTR) &section, buff) == 0
- || bfd_write (buff, 1, scnhsz, abfd) != scnhsz)
+ || bfd_bwrite (buff, scnhsz, abfd) != scnhsz)
goto error_return;
if ((section.s_flags & STYP_TEXT) != 0
@@ -2732,11 +2734,11 @@ _bfd_ecoff_write_object_contents (abfd)
goto error_return;
bfd_coff_swap_filehdr_out (abfd, (PTR) &internal_f, buff);
- if (bfd_write (buff, 1, filhsz, abfd) != filhsz)
+ if (bfd_bwrite (buff, filhsz, abfd) != filhsz)
goto error_return;
bfd_coff_swap_aouthdr_out (abfd, (PTR) &internal_a, buff);
- if (bfd_write (buff, 1, aoutsz, abfd) != aoutsz)
+ if (bfd_bwrite (buff, aoutsz, abfd) != aoutsz)
goto error_return;
/* Build the external symbol information. This must be done before
@@ -2764,12 +2766,13 @@ _bfd_ecoff_write_object_contents (abfd)
arelent **reloc_ptr_ptr;
arelent **reloc_end;
char *out_ptr;
+ bfd_size_type amt;
if (current->reloc_count == 0)
continue;
- reloc_buff =
- bfd_alloc (abfd, current->reloc_count * external_reloc_size);
+ amt = current->reloc_count * external_reloc_size;
+ reloc_buff = bfd_alloc (abfd, amt);
if (reloc_buff == NULL)
goto error_return;
@@ -2800,7 +2803,7 @@ _bfd_ecoff_write_object_contents (abfd)
}
else
{
- CONST char *name;
+ const char *name;
name = bfd_get_section_name (abfd, bfd_get_section (sym));
if (strcmp (name, ".text") == 0)
@@ -2845,9 +2848,8 @@ _bfd_ecoff_write_object_contents (abfd)
if (bfd_seek (abfd, current->rel_filepos, SEEK_SET) != 0)
goto error_return;
- if (bfd_write (reloc_buff,
- external_reloc_size, current->reloc_count, abfd)
- != external_reloc_size * current->reloc_count)
+ amt = current->reloc_count * external_reloc_size;
+ if (bfd_bwrite (reloc_buff, amt, abfd) != amt)
goto error_return;
bfd_release (abfd, reloc_buff);
reloc_buff = NULL;
@@ -2877,12 +2879,12 @@ _bfd_ecoff_write_object_contents (abfd)
if (bfd_seek (abfd, (file_ptr) ecoff_data (abfd)->sym_filepos - 1,
SEEK_SET) != 0)
goto error_return;
- if (bfd_read (&c, 1, 1, abfd) == 0)
+ if (bfd_bread (&c, (bfd_size_type) 1, abfd) == 0)
c = 0;
if (bfd_seek (abfd, (file_ptr) ecoff_data (abfd)->sym_filepos - 1,
SEEK_SET) != 0)
goto error_return;
- if (bfd_write (&c, 1, 1, abfd) != 1)
+ if (bfd_bwrite (&c, (bfd_size_type) 1, abfd) != 1)
goto error_return;
}
@@ -2950,7 +2952,7 @@ _bfd_ecoff_write_object_contents (abfd)
static unsigned int
ecoff_armap_hash (s, rehash, size, hlog)
- CONST char *s;
+ const char *s;
unsigned int *rehash;
unsigned int size;
unsigned int hlog;
@@ -2983,9 +2985,10 @@ _bfd_ecoff_slurp_armap (abfd)
char *raw_ptr;
struct symdef *symdef_ptr;
char *stringbase;
+ bfd_size_type amt;
/* Get the name of the first element. */
- i = bfd_read ((PTR) nextname, 1, 16, abfd);
+ i = bfd_bread ((PTR) nextname, (bfd_size_type) 16, abfd);
if (i == 0)
return true;
if (i != 16)
@@ -3040,7 +3043,7 @@ _bfd_ecoff_slurp_armap (abfd)
if (raw_armap == (char *) NULL)
return false;
- if (bfd_read ((PTR) raw_armap, 1, parsed_size, abfd) != parsed_size)
+ if (bfd_bread ((PTR) raw_armap, parsed_size, abfd) != parsed_size)
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_malformed_archive);
@@ -3050,7 +3053,7 @@ _bfd_ecoff_slurp_armap (abfd)
ardata->tdata = (PTR) raw_armap;
- count = bfd_h_get_32 (abfd, (PTR) raw_armap);
+ count = H_GET_32 (abfd, raw_armap);
ardata->symdef_count = 0;
ardata->cache = (struct ar_cache *) NULL;
@@ -3077,8 +3080,8 @@ _bfd_ecoff_slurp_armap (abfd)
unsigned int name_offset, file_offset;
unsigned int hash, rehash, srch;
- name_offset = bfd_h_get_32 (abfd, (PTR) raw_ptr);
- file_offset = bfd_h_get_32 (abfd, (PTR) (raw_ptr + 4));
+ name_offset = H_GET_32 (abfd, raw_ptr);
+ file_offset = H_GET_32 (abfd, (raw_ptr + 4));
if (file_offset == 0)
continue;
hash = ecoff_armap_hash (stringbase + name_offset, &rehash, count,
@@ -3090,8 +3093,7 @@ _bfd_ecoff_slurp_armap (abfd)
for (srch = (hash + rehash) & (count - 1);
srch != hash && srch != i;
srch = (srch + rehash) & (count - 1))
- BFD_ASSERT (bfd_h_get_32 (abfd, (PTR) (raw_armap + 8 + srch * 8))
- != 0);
+ BFD_ASSERT (H_GET_32 (abfd, (raw_armap + 8 + srch * 8)) != 0);
BFD_ASSERT (srch == i);
}
}
@@ -3100,12 +3102,12 @@ _bfd_ecoff_slurp_armap (abfd)
raw_ptr = raw_armap + 4;
for (i = 0; i < count; i++, raw_ptr += 8)
- if (bfd_h_get_32 (abfd, (PTR) (raw_ptr + 4)) != 0)
+ if (H_GET_32 (abfd, (raw_ptr + 4)) != 0)
++ardata->symdef_count;
- symdef_ptr = ((struct symdef *)
- bfd_alloc (abfd,
- ardata->symdef_count * sizeof (struct symdef)));
+ amt = ardata->symdef_count;
+ amt *= sizeof (struct symdef);
+ symdef_ptr = (struct symdef *) bfd_alloc (abfd, amt);
if (!symdef_ptr)
return false;
@@ -3116,10 +3118,10 @@ _bfd_ecoff_slurp_armap (abfd)
{
unsigned int name_offset, file_offset;
- file_offset = bfd_h_get_32 (abfd, (PTR) (raw_ptr + 4));
+ file_offset = H_GET_32 (abfd, (raw_ptr + 4));
if (file_offset == 0)
continue;
- name_offset = bfd_h_get_32 (abfd, (PTR) raw_ptr);
+ name_offset = H_GET_32 (abfd, raw_ptr);
symdef_ptr->s.name = stringbase + name_offset;
symdef_ptr->file_offset = file_offset;
++symdef_ptr;
@@ -3145,7 +3147,7 @@ _bfd_ecoff_write_armap (abfd, elength, map, orl_count, stridx)
int stridx;
{
unsigned int hashsize, hashlog;
- unsigned int symdefsize;
+ bfd_size_type symdefsize;
int padit;
unsigned int stringsize;
unsigned int mapsize;
@@ -3218,12 +3220,12 @@ _bfd_ecoff_write_armap (abfd, elength, map, orl_count, stridx)
if (((char *) (&hdr))[i] == '\0')
(((char *) (&hdr))[i]) = ' ';
- if (bfd_write ((PTR) &hdr, 1, sizeof (struct ar_hdr), abfd)
+ if (bfd_bwrite ((PTR) &hdr, (bfd_size_type) sizeof (struct ar_hdr), abfd)
!= sizeof (struct ar_hdr))
return false;
- bfd_h_put_32 (abfd, (bfd_vma) hashsize, temp);
- if (bfd_write ((PTR) temp, 1, 4, abfd) != 4)
+ H_PUT_32 (abfd, hashsize, temp);
+ if (bfd_bwrite ((PTR) temp, (bfd_size_type) 4, abfd) != 4)
return false;
hashtable = (bfd_byte *) bfd_zalloc (abfd, symdefsize);
@@ -3238,7 +3240,7 @@ _bfd_ecoff_write_armap (abfd, elength, map, orl_count, stridx)
/* Advance firstreal to the file position of this archive
element. */
- if (((bfd *) map[i].pos) != last_elt)
+ if (map[i].u.abfd != last_elt)
{
do
{
@@ -3246,13 +3248,13 @@ _bfd_ecoff_write_armap (abfd, elength, map, orl_count, stridx)
firstreal += firstreal % 2;
current = current->next;
}
- while (current != (bfd *) map[i].pos);
+ while (current != map[i].u.abfd);
}
last_elt = current;
hash = ecoff_armap_hash (*map[i].name, &rehash, hashsize, hashlog);
- if (bfd_h_get_32 (abfd, (PTR) (hashtable + (hash * 8) + 4)) != 0)
+ if (H_GET_32 (abfd, (hashtable + (hash * 8) + 4)) != 0)
{
unsigned int srch;
@@ -3260,7 +3262,7 @@ _bfd_ecoff_write_armap (abfd, elength, map, orl_count, stridx)
for (srch = (hash + rehash) & (hashsize - 1);
srch != hash;
srch = (srch + rehash) & (hashsize - 1))
- if (bfd_h_get_32 (abfd, (PTR) (hashtable + (srch * 8) + 4)) == 0)
+ if (H_GET_32 (abfd, (hashtable + (srch * 8) + 4)) == 0)
break;
BFD_ASSERT (srch != hash);
@@ -3268,27 +3270,25 @@ _bfd_ecoff_write_armap (abfd, elength, map, orl_count, stridx)
hash = srch;
}
- bfd_h_put_32 (abfd, (bfd_vma) map[i].namidx,
- (PTR) (hashtable + hash * 8));
- bfd_h_put_32 (abfd, (bfd_vma) firstreal,
- (PTR) (hashtable + hash * 8 + 4));
+ H_PUT_32 (abfd, map[i].namidx, (hashtable + hash * 8));
+ H_PUT_32 (abfd, firstreal, (hashtable + hash * 8 + 4));
}
- if (bfd_write ((PTR) hashtable, 1, symdefsize, abfd) != symdefsize)
+ if (bfd_bwrite ((PTR) hashtable, symdefsize, abfd) != symdefsize)
return false;
bfd_release (abfd, hashtable);
/* Now write the strings. */
- bfd_h_put_32 (abfd, (bfd_vma) stringsize, temp);
- if (bfd_write ((PTR) temp, 1, 4, abfd) != 4)
+ H_PUT_32 (abfd, stringsize, temp);
+ if (bfd_bwrite ((PTR) temp, (bfd_size_type) 4, abfd) != 4)
return false;
for (i = 0; i < orl_count; i++)
{
bfd_size_type len;
len = strlen (*map[i].name) + 1;
- if (bfd_write ((PTR) (*map[i].name), 1, len, abfd) != len)
+ if (bfd_bwrite ((PTR) (*map[i].name), len, abfd) != len)
return false;
}
@@ -3296,7 +3296,7 @@ _bfd_ecoff_write_armap (abfd, elength, map, orl_count, stridx)
bug-compatible for DECstation ar we use a null. */
if (padit)
{
- if (bfd_write ("", 1, 1, abfd) != 1)
+ if (bfd_bwrite ("", (bfd_size_type) 1, abfd) != 1)
return false;
}
@@ -3312,10 +3312,11 @@ _bfd_ecoff_archive_p (abfd)
{
struct artdata *tdata_hold;
char armag[SARMAG + 1];
+ bfd_size_type amt;
tdata_hold = abfd->tdata.aout_ar_data;
- if (bfd_read ((PTR) armag, 1, SARMAG, abfd) != SARMAG)
+ if (bfd_bread ((PTR) armag, (bfd_size_type) SARMAG, abfd) != SARMAG)
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
@@ -3331,8 +3332,8 @@ _bfd_ecoff_archive_p (abfd)
/* We are setting bfd_ardata(abfd) here, but since bfd_ardata
involves a cast, we can't do it as the left operand of
assignment. */
- abfd->tdata.aout_ar_data =
- (struct artdata *) bfd_zalloc (abfd, sizeof (struct artdata));
+ amt = sizeof (struct artdata);
+ abfd->tdata.aout_ar_data = (struct artdata *) bfd_zalloc (abfd, amt);
if (bfd_ardata (abfd) == (struct artdata *) NULL)
{
@@ -3449,9 +3450,9 @@ _bfd_ecoff_bfd_link_hash_table_create (abfd)
bfd *abfd;
{
struct ecoff_link_hash_table *ret;
+ bfd_size_type amt = sizeof (struct ecoff_link_hash_table);
- ret = ((struct ecoff_link_hash_table *)
- bfd_alloc (abfd, sizeof (struct ecoff_link_hash_table)));
+ ret = (struct ecoff_link_hash_table *) bfd_alloc (abfd, amt);
if (ret == NULL)
return NULL;
if (! _bfd_link_hash_table_init (&ret->root, abfd,
@@ -3541,7 +3542,7 @@ ecoff_link_add_archive_symbols (abfd, info)
return (_bfd_generic_link_add_archive_symbols
(abfd, info, ecoff_link_check_archive_element));
- armap_count = bfd_h_get_32 (abfd, raw_armap);
+ armap_count = H_GET_32 (abfd, raw_armap);
armap_log = 0;
for (i = 1; i < armap_count; i <<= 1)
@@ -3594,7 +3595,7 @@ ecoff_link_add_archive_symbols (abfd, info)
hash = ecoff_armap_hash (h->root.string, &rehash, armap_count,
armap_log);
- file_offset = bfd_h_get_32 (abfd, hashtable + (hash * 8) + 4);
+ file_offset = H_GET_32 (abfd, hashtable + (hash * 8) + 4);
if (file_offset == 0)
{
/* Nothing in this slot. */
@@ -3602,7 +3603,7 @@ ecoff_link_add_archive_symbols (abfd, info)
continue;
}
- name = stringbase + bfd_h_get_32 (abfd, hashtable + (hash * 8));
+ name = stringbase + H_GET_32 (abfd, hashtable + (hash * 8));
if (name[0] != h->root.string[0]
|| strcmp (name, h->root.string) != 0)
{
@@ -3615,10 +3616,10 @@ ecoff_link_add_archive_symbols (abfd, info)
srch != hash;
srch = (srch + rehash) & (armap_count - 1))
{
- file_offset = bfd_h_get_32 (abfd, hashtable + (srch * 8) + 4);
+ file_offset = H_GET_32 (abfd, hashtable + (srch * 8) + 4);
if (file_offset == 0)
break;
- name = stringbase + bfd_h_get_32 (abfd, hashtable + (srch * 8));
+ name = stringbase + H_GET_32 (abfd, hashtable + (srch * 8));
if (name[0] == h->root.string[0]
&& strcmp (name, h->root.string) == 0)
{
@@ -3636,7 +3637,7 @@ ecoff_link_add_archive_symbols (abfd, info)
hash = srch;
}
- element = (*backend->get_elt_at_filepos) (abfd, file_offset);
+ element = (*backend->get_elt_at_filepos) (abfd, (file_ptr) file_offset);
if (element == (bfd *) NULL)
return false;
@@ -3672,7 +3673,7 @@ ecoff_link_check_archive_element (abfd, info, pneeded)
HDRR *symhdr;
bfd_size_type external_ext_size;
PTR external_ext = NULL;
- size_t esize;
+ bfd_size_type esize;
char *ssext = NULL;
char *ext_ptr;
char *ext_end;
@@ -3695,17 +3696,17 @@ ecoff_link_check_archive_element (abfd, info, pneeded)
if (external_ext == NULL && esize != 0)
goto error_return;
- if (bfd_seek (abfd, symhdr->cbExtOffset, SEEK_SET) != 0
- || bfd_read (external_ext, 1, esize, abfd) != esize)
+ if (bfd_seek (abfd, (file_ptr) symhdr->cbExtOffset, SEEK_SET) != 0
+ || bfd_bread (external_ext, esize, abfd) != esize)
goto error_return;
- ssext = (char *) bfd_malloc (symhdr->issExtMax);
+ ssext = (char *) bfd_malloc ((bfd_size_type) symhdr->issExtMax);
if (ssext == NULL && symhdr->issExtMax != 0)
goto error_return;
- if (bfd_seek (abfd, symhdr->cbSsExtOffset, SEEK_SET) != 0
- || (bfd_read (ssext, 1, symhdr->issExtMax, abfd) !=
- (bfd_size_type) symhdr->issExtMax))
+ if (bfd_seek (abfd, (file_ptr) symhdr->cbSsExtOffset, SEEK_SET) != 0
+ || (bfd_bread (ssext, (bfd_size_type) symhdr->issExtMax, abfd)
+ != (bfd_size_type) symhdr->issExtMax))
goto error_return;
/* Look through the external symbols to see if they define some
@@ -3795,7 +3796,7 @@ ecoff_link_add_object_symbols (abfd, info)
HDRR *symhdr;
bfd_size_type external_ext_size;
PTR external_ext = NULL;
- size_t esize;
+ bfd_size_type esize;
char *ssext = NULL;
boolean result;
@@ -3815,16 +3816,16 @@ ecoff_link_add_object_symbols (abfd, info)
if (external_ext == NULL && esize != 0)
goto error_return;
- if (bfd_seek (abfd, symhdr->cbExtOffset, SEEK_SET) != 0
- || bfd_read (external_ext, 1, esize, abfd) != esize)
+ if (bfd_seek (abfd, (file_ptr) symhdr->cbExtOffset, SEEK_SET) != 0
+ || bfd_bread (external_ext, esize, abfd) != esize)
goto error_return;
- ssext = (char *) bfd_malloc (symhdr->issExtMax);
+ ssext = (char *) bfd_malloc ((bfd_size_type) symhdr->issExtMax);
if (ssext == NULL && symhdr->issExtMax != 0)
goto error_return;
- if (bfd_seek (abfd, symhdr->cbSsExtOffset, SEEK_SET) != 0
- || (bfd_read (ssext, 1, symhdr->issExtMax, abfd)
+ if (bfd_seek (abfd, (file_ptr) symhdr->cbSsExtOffset, SEEK_SET) != 0
+ || (bfd_bread (ssext, (bfd_size_type) symhdr->issExtMax, abfd)
!= (bfd_size_type) symhdr->issExtMax))
goto error_return;
@@ -3865,12 +3866,13 @@ ecoff_link_add_externals (abfd, info, external_ext, ssext)
struct ecoff_link_hash_entry **sym_hash;
char *ext_ptr;
char *ext_end;
+ bfd_size_type amt;
ext_count = ecoff_data (abfd)->debug_info.symbolic_header.iextMax;
- sym_hash = ((struct ecoff_link_hash_entry **)
- bfd_alloc (abfd,
- ext_count * sizeof (struct bfd_link_hash_entry *)));
+ amt = ext_count;
+ amt *= sizeof (struct bfd_link_hash_entry *);
+ sym_hash = (struct ecoff_link_hash_entry **) bfd_alloc (abfd, amt);
if (!sym_hash)
return false;
ecoff_data (abfd)->sym_hashes = sym_hash;
@@ -4007,7 +4009,7 @@ ecoff_link_add_externals (abfd, info, external_ext, ssext)
h = NULL;
if (! (_bfd_generic_link_add_one_symbol
(info, abfd, name,
- esym.weakext ? BSF_WEAK : BSF_GLOBAL,
+ (flagword) (esym.weakext ? BSF_WEAK : BSF_GLOBAL),
section, value, (const char *) NULL, true, true,
(struct bfd_link_hash_entry **) &h)))
return false;
@@ -4296,25 +4298,24 @@ ecoff_final_link_debug_accumulate (output_bfd, input_bfd, info, handle)
HDRR *symhdr = &debug->symbolic_header;
boolean ret;
-#define READ(ptr, offset, count, size, type) \
- if (symhdr->count == 0) \
- debug->ptr = NULL; \
- else \
- { \
- debug->ptr = (type) bfd_malloc ((size_t) (size * symhdr->count)); \
- if (debug->ptr == NULL) \
- { \
- ret = false; \
- goto return_something; \
- } \
- if ((bfd_seek (input_bfd, (file_ptr) symhdr->offset, SEEK_SET) \
- != 0) \
- || (bfd_read (debug->ptr, size, symhdr->count, \
- input_bfd) != size * symhdr->count)) \
- { \
- ret = false; \
- goto return_something; \
- } \
+#define READ(ptr, offset, count, size, type) \
+ if (symhdr->count == 0) \
+ debug->ptr = NULL; \
+ else \
+ { \
+ bfd_size_type amt = (bfd_size_type) size * symhdr->count; \
+ debug->ptr = (type) bfd_malloc (amt); \
+ if (debug->ptr == NULL) \
+ { \
+ ret = false; \
+ goto return_something; \
+ } \
+ if (bfd_seek (input_bfd, (file_ptr) symhdr->offset, SEEK_SET) != 0 \
+ || bfd_bread (debug->ptr, amt, input_bfd) != amt) \
+ { \
+ ret = false; \
+ goto return_something; \
+ } \
}
/* If raw_syments is not NULL, then the data was already by read by
@@ -4536,6 +4537,7 @@ ecoff_indirect_link_order (output_bfd, info, output_section, link_order)
bfd_size_type external_reloc_size;
bfd_size_type external_relocs_size;
PTR external_relocs = NULL;
+ bfd_size_type amt;
BFD_ASSERT ((output_section->flags & SEC_HAS_CONTENTS) != 0);
@@ -4557,10 +4559,9 @@ ecoff_indirect_link_order (output_bfd, info, output_section, link_order)
/* Get the section contents. We allocate memory for the larger of
the size before relocating and the size after relocating. */
- contents = (bfd_byte *) bfd_malloc (raw_size >= cooked_size
- ? (size_t) raw_size
- : (size_t) cooked_size);
- if (contents == NULL && raw_size != 0)
+ amt = raw_size >= cooked_size ? raw_size : cooked_size;
+ contents = (bfd_byte *) bfd_malloc (amt);
+ if (contents == NULL && amt != 0)
goto error_return;
/* If we are relaxing, the contents may have already been read into
@@ -4587,12 +4588,12 @@ ecoff_indirect_link_order (output_bfd, info, output_section, link_order)
external_relocs = section_tdata->external_relocs;
else
{
- external_relocs = (PTR) bfd_malloc ((size_t) external_relocs_size);
+ external_relocs = (PTR) bfd_malloc (external_relocs_size);
if (external_relocs == NULL && external_relocs_size != 0)
goto error_return;
if (bfd_seek (input_bfd, input_section->rel_filepos, SEEK_SET) != 0
- || (bfd_read (external_relocs, 1, external_relocs_size, input_bfd)
+ || (bfd_bread (external_relocs, external_relocs_size, input_bfd)
!= external_relocs_size))
goto error_return;
}
@@ -4607,7 +4608,7 @@ ecoff_indirect_link_order (output_bfd, info, output_section, link_order)
if (! bfd_set_section_contents (output_bfd,
output_section,
(PTR) contents,
- input_section->output_offset,
+ (file_ptr) input_section->output_offset,
cooked_size))
goto error_return;
@@ -4617,11 +4618,10 @@ ecoff_indirect_link_order (output_bfd, info, output_section, link_order)
have output so far. */
if (info->relocateable)
{
- if (bfd_seek (output_bfd,
- (output_section->rel_filepos +
- output_section->reloc_count * external_reloc_size),
- SEEK_SET) != 0
- || (bfd_write (external_relocs, 1, external_relocs_size, output_bfd)
+ file_ptr pos = (output_section->rel_filepos
+ + output_section->reloc_count * external_reloc_size);
+ if (bfd_seek (output_bfd, pos, SEEK_SET) != 0
+ || (bfd_bwrite (external_relocs, external_relocs_size, output_bfd)
!= external_relocs_size))
goto error_return;
output_section->reloc_count += input_section->reloc_count;
@@ -4661,6 +4661,7 @@ ecoff_reloc_link_order (output_bfd, info, output_section, link_order)
bfd_size_type external_reloc_size;
bfd_byte *rbuf;
boolean ok;
+ file_ptr pos;
type = link_order->type;
section = NULL;
@@ -4720,13 +4721,13 @@ ecoff_reloc_link_order (output_bfd, info, output_section, link_order)
bfd_size_type size;
bfd_reloc_status_type rstat;
bfd_byte *buf;
- boolean ok;
size = bfd_get_reloc_size (rel.howto);
buf = (bfd_byte *) bfd_zmalloc (size);
if (buf == (bfd_byte *) NULL)
return false;
- rstat = _bfd_relocate_contents (rel.howto, output_bfd, addend, buf);
+ rstat = _bfd_relocate_contents (rel.howto, output_bfd,
+ (bfd_vma) addend, buf);
switch (rstat)
{
case bfd_reloc_ok:
@@ -4757,7 +4758,7 @@ ecoff_reloc_link_order (output_bfd, info, output_section, link_order)
rel.addend = 0;
- /* Move the information into a internal_reloc structure. */
+ /* Move the information into an internal_reloc structure. */
in.r_vaddr = (rel.address
+ bfd_get_section_vma (output_bfd, output_section));
in.r_type = rel.howto->type;
@@ -4785,7 +4786,7 @@ ecoff_reloc_link_order (output_bfd, info, output_section, link_order)
}
else
{
- CONST char *name;
+ const char *name;
name = bfd_get_section_name (output_bfd, section);
if (strcmp (name, ".text") == 0)
@@ -4828,17 +4829,16 @@ ecoff_reloc_link_order (output_bfd, info, output_section, link_order)
/* Get some memory and swap out the reloc. */
external_reloc_size = ecoff_backend (output_bfd)->external_reloc_size;
- rbuf = (bfd_byte *) bfd_malloc ((size_t) external_reloc_size);
+ rbuf = (bfd_byte *) bfd_malloc (external_reloc_size);
if (rbuf == (bfd_byte *) NULL)
return false;
(*ecoff_backend (output_bfd)->swap_reloc_out) (output_bfd, &in, (PTR) rbuf);
- ok = (bfd_seek (output_bfd,
- (output_section->rel_filepos +
- output_section->reloc_count * external_reloc_size),
- SEEK_SET) == 0
- && (bfd_write ((PTR) rbuf, 1, external_reloc_size, output_bfd)
+ pos = (output_section->rel_filepos
+ + output_section->reloc_count * external_reloc_size);
+ ok = (bfd_seek (output_bfd, pos, SEEK_SET) == 0
+ && (bfd_bwrite ((PTR) rbuf, external_reloc_size, output_bfd)
== external_reloc_size));
if (ok)
diff --git a/contrib/binutils/bfd/ecofflink.c b/contrib/binutils/bfd/ecofflink.c
index 37b3538..53d6544 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, 1994, 1995, 1996, 1997, 2000
+ Copyright 1993, 1994, 1995, 1996, 1997, 2000, 2001
Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support, <ian@cygnus.com>.
@@ -272,7 +272,7 @@ ecoff_add_bytes (buf, bufend, need)
if (want < ALLOC_SIZE)
want = ALLOC_SIZE;
}
- newbuf = (char *) bfd_realloc (*buf, have + want);
+ newbuf = (char *) bfd_realloc (*buf, (bfd_size_type) have + want);
if (newbuf == NULL)
return false;
*buf = newbuf;
@@ -497,8 +497,9 @@ bfd_ecoff_debug_init (output_bfd, output_debug, output_swap, info)
struct bfd_link_info *info;
{
struct accumulate *ainfo;
+ bfd_size_type amt = sizeof (struct accumulate);
- ainfo = (struct accumulate *) bfd_malloc (sizeof (struct accumulate));
+ ainfo = (struct accumulate *) bfd_malloc (amt);
if (!ainfo)
return NULL;
if (! bfd_hash_table_init_n (&ainfo->fdr_hash.table, string_hash_newfunc,
@@ -621,6 +622,7 @@ bfd_ecoff_debug_accumulate (handle, output_bfd, output_debug, output_swap,
long newrfdbase = 0;
long oldrfdbase = 0;
bfd_byte *fdr_out;
+ bfd_size_type amt;
/* Use section_adjust to hold the value to add to a symbol in a
particular section. */
@@ -661,9 +663,9 @@ bfd_ecoff_debug_accumulate (handle, output_bfd, output_debug, output_swap,
}
fdr_end = fdr_start + input_symhdr->ifdMax * fdr_add;
- input_debug->ifdmap = (RFDT *) bfd_alloc (input_bfd,
- (input_symhdr->ifdMax
- * sizeof (RFDT)));
+ amt = input_symhdr->ifdMax;
+ amt *= sizeof (RFDT);
+ input_debug->ifdmap = (RFDT *) bfd_alloc (input_bfd, amt);
sz = (input_symhdr->crfd + input_symhdr->ifdMax) * external_rfd_size;
rfd_out = (bfd_byte *) objalloc_alloc (ainfo->memory, sz);
@@ -712,7 +714,7 @@ bfd_ecoff_debug_accumulate (handle, output_bfd, output_debug, output_swap,
merged. */
name = input_debug->ss + fdr.issBase + fdr.rss;
- lookup = (char *) bfd_malloc (strlen (name) + 20);
+ lookup = (char *) bfd_malloc ((bfd_size_type) strlen (name) + 20);
if (lookup == NULL)
return false;
sprintf (lookup, "%s %lx %lx", name, fdr.csym, fdr.caux);
@@ -937,10 +939,9 @@ bfd_ecoff_debug_accumulate (handle, output_bfd, output_debug, output_swap,
stabs are adjusted correctly. */
if (fdr.cbLine > 0)
{
+ file_ptr pos = input_symhdr->cbLineOffset + fdr.cbLineOffset;
if (!add_file_shuffle (ainfo, &ainfo->line, &ainfo->line_end,
- input_bfd,
- input_symhdr->cbLineOffset + fdr.cbLineOffset,
- fdr.cbLine))
+ input_bfd, pos, (unsigned long) fdr.cbLine))
return false;
fdr.ilineBase = output_symhdr->ilineMax;
fdr.cbLineOffset = output_symhdr->cbLine;
@@ -949,10 +950,10 @@ bfd_ecoff_debug_accumulate (handle, output_bfd, output_debug, output_swap,
}
if (fdr.caux > 0)
{
+ file_ptr pos = (input_symhdr->cbAuxOffset
+ + fdr.iauxBase * sizeof (union aux_ext));
if (!add_file_shuffle (ainfo, &ainfo->aux, &ainfo->aux_end,
- input_bfd,
- (input_symhdr->cbAuxOffset
- + fdr.iauxBase * sizeof (union aux_ext)),
+ input_bfd, pos,
fdr.caux * sizeof (union aux_ext)))
return false;
fdr.iauxBase = output_symhdr->iauxMax;
@@ -970,10 +971,9 @@ bfd_ecoff_debug_accumulate (handle, output_bfd, output_debug, output_swap,
}
else if (fdr.cbSs > 0)
{
+ file_ptr pos = input_symhdr->cbSsOffset + fdr.issBase;
if (!add_file_shuffle (ainfo, &ainfo->ss, &ainfo->ss_end,
- input_bfd,
- input_symhdr->cbSsOffset + fdr.issBase,
- fdr.cbSs))
+ input_bfd, pos, (unsigned long) fdr.cbSs))
return false;
fdr.issBase = output_symhdr->issMax;
output_symhdr->issMax += fdr.cbSs;
@@ -989,21 +989,21 @@ bfd_ecoff_debug_accumulate (handle, output_bfd, output_debug, output_swap,
BFD_ASSERT (external_pdr_size == input_swap->external_pdr_size);
if (fdr.cpd > 0)
{
+ file_ptr pos = (input_symhdr->cbPdOffset
+ + fdr.ipdFirst * external_pdr_size);
+ unsigned long size = fdr.cpd * external_pdr_size;
if (!add_file_shuffle (ainfo, &ainfo->pdr, &ainfo->pdr_end,
- input_bfd,
- (input_symhdr->cbPdOffset
- + fdr.ipdFirst * external_pdr_size),
- fdr.cpd * external_pdr_size))
+ input_bfd, pos, size))
return false;
}
BFD_ASSERT (external_opt_size == input_swap->external_opt_size);
if (fdr.copt > 0)
{
+ file_ptr pos = (input_symhdr->cbOptOffset
+ + fdr.ioptBase * external_opt_size);
+ unsigned long size = fdr.copt * external_opt_size;
if (!add_file_shuffle (ainfo, &ainfo->opt, &ainfo->opt_end,
- input_bfd,
- (input_symhdr->cbOptOffset
- + fdr.ioptBase * external_opt_size),
- fdr.copt * external_opt_size))
+ input_bfd, pos, size))
return false;
}
}
@@ -1201,7 +1201,7 @@ bfd_ecoff_debug_accumulate_other (handle, output_bfd, output_debug,
fdr.issBase = output_symhdr->issMax;
fdr.cbSs = 0;
fdr.rss = ecoff_add_string (ainfo, info, output_debug, &fdr,
- bfd_get_filename (input_bfd));
+ bfd_archive_filename (input_bfd));
if (fdr.rss == -1)
return false;
fdr.isymBase = output_symhdr->isymMax;
@@ -1210,7 +1210,7 @@ bfd_ecoff_debug_accumulate_other (handle, output_bfd, output_debug,
symsize = bfd_get_symtab_upper_bound (input_bfd);
if (symsize < 0)
return false;
- symbols = (asymbol **) bfd_alloc (output_bfd, symsize);
+ symbols = (asymbol **) bfd_alloc (output_bfd, (bfd_size_type) symsize);
if (symbols == (asymbol **) NULL)
return false;
symcount = bfd_canonicalize_symtab (input_bfd, symbols);
@@ -1254,7 +1254,8 @@ bfd_ecoff_debug_accumulate_other (handle, output_bfd, output_debug,
}
(*swap_sym_out) (output_bfd, &internal_sym, external_sym);
add_memory_shuffle (ainfo, &ainfo->sym, &ainfo->sym_end,
- external_sym, output_swap->external_sym_size);
+ external_sym,
+ (unsigned long) output_swap->external_sym_size);
++fdr.csym;
++output_symhdr->isymMax;
}
@@ -1274,7 +1275,8 @@ bfd_ecoff_debug_accumulate_other (handle, output_bfd, output_debug,
}
(*output_swap->swap_fdr_out) (output_bfd, &fdr, external_fdr);
add_memory_shuffle (ainfo, &ainfo->fdr, &ainfo->fdr_end,
- external_fdr, output_swap->external_fdr_size);
+ external_fdr,
+ (unsigned long) output_swap->external_fdr_size);
++output_symhdr->ifdMax;
@@ -1386,7 +1388,7 @@ bfd_ecoff_debug_one_external (abfd, debug, swap, name, esym)
{
if (ecoff_add_bytes ((char **) &debug->external_ext,
(char **) &debug->external_ext_end,
- (symhdr->iextMax + 1) * external_ext_size)
+ (symhdr->iextMax + 1) * (size_t) external_ext_size)
== false)
return false;
}
@@ -1546,12 +1548,12 @@ ecoff_write_symhdr (abfd, debug, swap, where)
SET (cbExtOffset, iextMax, swap->external_ext_size);
#undef SET
- buff = (PTR) bfd_malloc ((size_t) swap->external_hdr_size);
+ buff = (PTR) bfd_malloc (swap->external_hdr_size);
if (buff == NULL && swap->external_hdr_size != 0)
goto error_return;
(*swap->swap_hdr_out) (abfd, symhdr, buff);
- if (bfd_write (buff, 1, swap->external_hdr_size, abfd)
+ if (bfd_bwrite (buff, swap->external_hdr_size, abfd)
!= swap->external_hdr_size)
goto error_return;
@@ -1585,7 +1587,7 @@ bfd_ecoff_write_debug (abfd, debug, swap, where)
#define WRITE(ptr, count, size, offset) \
BFD_ASSERT (symhdr->offset == 0 \
|| (bfd_vma) bfd_tell (abfd) == symhdr->offset); \
- if (bfd_write ((PTR) debug->ptr, size, symhdr->count, abfd) \
+ if (bfd_bwrite ((PTR) debug->ptr, (bfd_size_type) size * symhdr->count, abfd)\
!= size * symhdr->count) \
return false;
@@ -1594,7 +1596,8 @@ bfd_ecoff_write_debug (abfd, debug, swap, where)
WRITE (external_pdr, ipdMax, swap->external_pdr_size, cbPdOffset);
WRITE (external_sym, isymMax, swap->external_sym_size, cbSymOffset);
WRITE (external_opt, ioptMax, swap->external_opt_size, cbOptOffset);
- WRITE (external_aux, iauxMax, sizeof (union aux_ext), cbAuxOffset);
+ WRITE (external_aux, iauxMax, (bfd_size_type) sizeof (union aux_ext),
+ cbAuxOffset);
WRITE (ss, issMax, sizeof (char), cbSsOffset);
WRITE (ssext, issExtMax, sizeof (char), cbSsExtOffset);
WRITE (external_fdr, ifdMax, swap->external_fdr_size, cbFdOffset);
@@ -1626,14 +1629,16 @@ ecoff_write_shuffle (abfd, swap, shuffle, space)
{
if (! l->filep)
{
- if (bfd_write (l->u.memory, 1, l->size, abfd) != l->size)
+ if (bfd_bwrite (l->u.memory, (bfd_size_type) l->size, abfd)
+ != l->size)
return false;
}
else
{
if (bfd_seek (l->u.file.input_bfd, l->u.file.offset, SEEK_SET) != 0
- || bfd_read (space, 1, l->size, l->u.file.input_bfd) != l->size
- || bfd_write (space, 1, l->size, abfd) != l->size)
+ || bfd_bread (space, (bfd_size_type) l->size,
+ l->u.file.input_bfd) != l->size
+ || bfd_bwrite (space, (bfd_size_type) l->size, abfd) != l->size)
return false;
}
total += l->size;
@@ -1645,12 +1650,12 @@ ecoff_write_shuffle (abfd, swap, shuffle, space)
bfd_byte *s;
i = swap->debug_align - (total & (swap->debug_align - 1));
- s = (bfd_byte *) bfd_malloc (i);
+ s = (bfd_byte *) bfd_malloc ((bfd_size_type) i);
if (s == NULL && i != 0)
return false;
memset ((PTR) s, 0, i);
- if (bfd_write ((PTR) s, 1, i, abfd) != i)
+ if (bfd_bwrite ((PTR) s, (bfd_size_type) i, abfd) != i)
{
free (s);
return false;
@@ -1675,11 +1680,13 @@ bfd_ecoff_write_accumulated_debug (handle, abfd, debug, swap, info, where)
{
struct accumulate *ainfo = (struct accumulate *) handle;
PTR space = NULL;
+ bfd_size_type amt;
if (! ecoff_write_symhdr (abfd, debug, swap, where))
goto error_return;
- space = (PTR) bfd_malloc (ainfo->largest_file_shuffle);
+ amt = ainfo->largest_file_shuffle;
+ space = (PTR) bfd_malloc (amt);
if (space == NULL && ainfo->largest_file_shuffle != 0)
goto error_return;
@@ -1706,7 +1713,7 @@ bfd_ecoff_write_accumulated_debug (handle, abfd, debug, swap, info, where)
BFD_ASSERT (ainfo->ss == (struct shuffle *) NULL);
null = 0;
- if (bfd_write ((PTR) &null, 1, 1, abfd) != 1)
+ if (bfd_bwrite ((PTR) &null, (bfd_size_type) 1, abfd) != 1)
goto error_return;
total = 1;
BFD_ASSERT (ainfo->ss_hash == NULL || ainfo->ss_hash->val == 1);
@@ -1717,7 +1724,8 @@ bfd_ecoff_write_accumulated_debug (handle, abfd, debug, swap, info, where)
size_t len;
len = strlen (sh->root.string);
- if (bfd_write ((PTR) sh->root.string, 1, len + 1, abfd) != len + 1)
+ amt = len + 1;
+ if (bfd_bwrite ((PTR) sh->root.string, amt, abfd) != amt)
goto error_return;
total += len + 1;
}
@@ -1728,11 +1736,11 @@ bfd_ecoff_write_accumulated_debug (handle, abfd, debug, swap, info, where)
bfd_byte *s;
i = swap->debug_align - (total & (swap->debug_align - 1));
- s = (bfd_byte *) bfd_malloc (i);
+ s = (bfd_byte *) bfd_malloc ((bfd_size_type) i);
if (s == NULL && i != 0)
goto error_return;
memset ((PTR) s, 0, i);
- if (bfd_write ((PTR) s, 1, i, abfd) != i)
+ if (bfd_bwrite ((PTR) s, (bfd_size_type) i, abfd) != i)
{
free (s);
goto error_return;
@@ -1743,8 +1751,8 @@ bfd_ecoff_write_accumulated_debug (handle, abfd, debug, swap, info, where)
/* The external strings and symbol are not converted over to using
shuffles. FIXME: They probably should be. */
- if (bfd_write (debug->ssext, 1, debug->symbolic_header.issExtMax, abfd)
- != (bfd_size_type) debug->symbolic_header.issExtMax)
+ amt = debug->symbolic_header.issExtMax;
+ if (bfd_bwrite (debug->ssext, amt, abfd) != amt)
goto error_return;
if ((debug->symbolic_header.issExtMax & (swap->debug_align - 1)) != 0)
{
@@ -1753,11 +1761,11 @@ bfd_ecoff_write_accumulated_debug (handle, abfd, debug, swap, info, where)
i = (swap->debug_align
- (debug->symbolic_header.issExtMax & (swap->debug_align - 1)));
- s = (bfd_byte *) bfd_malloc (i);
+ s = (bfd_byte *) bfd_malloc ((bfd_size_type) i);
if (s == NULL && i != 0)
goto error_return;
memset ((PTR) s, 0, i);
- if (bfd_write ((PTR) s, 1, i, abfd) != i)
+ if (bfd_bwrite ((PTR) s, (bfd_size_type) i, abfd) != i)
{
free (s);
goto error_return;
@@ -1773,9 +1781,8 @@ bfd_ecoff_write_accumulated_debug (handle, abfd, debug, swap, info, where)
|| (debug->symbolic_header.cbExtOffset
== (bfd_vma) bfd_tell (abfd)));
- if (bfd_write (debug->external_ext, swap->external_ext_size,
- debug->symbolic_header.iextMax, abfd)
- != debug->symbolic_header.iextMax * swap->external_ext_size)
+ amt = debug->symbolic_header.iextMax * swap->external_ext_size;
+ if (bfd_bwrite (debug->external_ext, amt, abfd) != amt)
goto error_return;
if (space != NULL)
@@ -1829,6 +1836,7 @@ mk_fdrtab (abfd, debug_info, debug_swap, line_info)
FDR *fdr_end;
boolean stabs;
long len;
+ bfd_size_type amt;
fdr_start = debug_info->fdr;
fdr_end = fdr_start + debug_info->symbolic_header.ifdMax;
@@ -1843,9 +1851,8 @@ mk_fdrtab (abfd, debug_info, debug_swap, line_info)
/* Now, create and fill in the table: */
- line_info->fdrtab = ((struct ecoff_fdrtab_entry*)
- bfd_zalloc (abfd,
- len * sizeof (struct ecoff_fdrtab_entry)));
+ amt = (bfd_size_type) len * sizeof (struct ecoff_fdrtab_entry);
+ line_info->fdrtab = (struct ecoff_fdrtab_entry*) bfd_zalloc (abfd, amt);
if (line_info->fdrtab == NULL)
return false;
line_info->fdrtab_len = len;
@@ -1902,7 +1909,7 @@ mk_fdrtab (abfd, debug_info, debug_swap, line_info)
The table is mostly sorted already, but there are cases (e.g.,
static functions in include files), where this does not hold.
Use "odump -PFv" to verify... */
- qsort ((PTR) line_info->fdrtab, len,
+ qsort ((PTR) line_info->fdrtab, (size_t) len,
sizeof (struct ecoff_fdrtab_entry), cmp_fdrtab_entry);
return true;
@@ -2004,7 +2011,7 @@ lookup_line (abfd, debug_info, debug_swap, line_info)
char *pdr_ptr;
char *best_pdr = NULL;
FDR *best_fdr;
- bfd_vma best_dist = ~0;
+ bfd_vma best_dist = ~(bfd_vma) 0;
PDR pdr;
unsigned char *line_ptr;
unsigned char *line_end;
@@ -2330,7 +2337,7 @@ lookup_line (abfd, debug_info, debug_swap, line_info)
{
if (line_info->find_buffer != NULL)
free (line_info->find_buffer);
- buffer = (char *) bfd_malloc (len);
+ buffer = (char *) bfd_malloc ((bfd_size_type) len);
if (buffer == NULL)
return false;
line_info->find_buffer = buffer;
@@ -2429,7 +2436,8 @@ ecoff_collect_shuffle (l, buff)
else
{
if (bfd_seek (l->u.file.input_bfd, l->u.file.offset, SEEK_SET) != 0
- || bfd_read (buff, 1, l->size, l->u.file.input_bfd) != l->size)
+ || (bfd_bread (buff, (bfd_size_type) l->size, l->u.file.input_bfd)
+ != l->size))
return false;
}
total += l->size;
diff --git a/contrib/binutils/bfd/ecoffswap.h b/contrib/binutils/bfd/ecoffswap.h
index dd6fa6f..24627d0 100644
--- a/contrib/binutils/bfd/ecoffswap.h
+++ b/contrib/binutils/bfd/ecoffswap.h
@@ -45,20 +45,20 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
with the proper byte sex and such. */
#ifdef ECOFF_32
-#define ecoff_get_off bfd_h_get_32
-#define ecoff_put_off bfd_h_put_32
+#define ECOFF_GET_OFF H_GET_32
+#define ECOFF_PUT_OFF H_PUT_32
#endif
#ifdef ECOFF_64
-#define ecoff_get_off bfd_h_get_64
-#define ecoff_put_off bfd_h_put_64
+#define ECOFF_GET_OFF H_GET_64
+#define ECOFF_PUT_OFF H_PUT_64
#endif
#ifdef ECOFF_SIGNED_32
-#define ecoff_get_off bfd_h_get_signed_32
-#define ecoff_put_off bfd_h_put_signed_32
+#define ECOFF_GET_OFF H_GET_S32
+#define ECOFF_PUT_OFF H_PUT_S32
#endif
#ifdef ECOFF_SIGNED_64
-#define ecoff_get_off bfd_h_get_signed_64
-#define ecoff_put_off bfd_h_put_signed_64
+#define ECOFF_GET_OFF H_GET_S64
+#define ECOFF_PUT_OFF H_PUT_S64
#endif
/* ECOFF auxiliary information swapping routines. These are the same
@@ -104,31 +104,31 @@ ecoff_swap_hdr_in (abfd, ext_copy, intern)
*ext = *(struct hdr_ext *) ext_copy;
- intern->magic = bfd_h_get_signed_16 (abfd, (bfd_byte *)ext->h_magic);
- intern->vstamp = bfd_h_get_signed_16 (abfd, (bfd_byte *)ext->h_vstamp);
- intern->ilineMax = bfd_h_get_32 (abfd, (bfd_byte *)ext->h_ilineMax);
- intern->cbLine = ecoff_get_off (abfd, (bfd_byte *)ext->h_cbLine);
- intern->cbLineOffset = ecoff_get_off (abfd, (bfd_byte *)ext->h_cbLineOffset);
- intern->idnMax = bfd_h_get_32 (abfd, (bfd_byte *)ext->h_idnMax);
- intern->cbDnOffset = ecoff_get_off (abfd, (bfd_byte *)ext->h_cbDnOffset);
- intern->ipdMax = bfd_h_get_32 (abfd, (bfd_byte *)ext->h_ipdMax);
- intern->cbPdOffset = ecoff_get_off (abfd, (bfd_byte *)ext->h_cbPdOffset);
- intern->isymMax = bfd_h_get_32 (abfd, (bfd_byte *)ext->h_isymMax);
- intern->cbSymOffset = ecoff_get_off (abfd, (bfd_byte *)ext->h_cbSymOffset);
- intern->ioptMax = bfd_h_get_32 (abfd, (bfd_byte *)ext->h_ioptMax);
- intern->cbOptOffset = ecoff_get_off (abfd, (bfd_byte *)ext->h_cbOptOffset);
- intern->iauxMax = bfd_h_get_32 (abfd, (bfd_byte *)ext->h_iauxMax);
- intern->cbAuxOffset = ecoff_get_off (abfd, (bfd_byte *)ext->h_cbAuxOffset);
- intern->issMax = bfd_h_get_32 (abfd, (bfd_byte *)ext->h_issMax);
- intern->cbSsOffset = ecoff_get_off (abfd, (bfd_byte *)ext->h_cbSsOffset);
- intern->issExtMax = bfd_h_get_32 (abfd, (bfd_byte *)ext->h_issExtMax);
- intern->cbSsExtOffset = ecoff_get_off (abfd, (bfd_byte *)ext->h_cbSsExtOffset);
- intern->ifdMax = bfd_h_get_32 (abfd, (bfd_byte *)ext->h_ifdMax);
- intern->cbFdOffset = ecoff_get_off (abfd, (bfd_byte *)ext->h_cbFdOffset);
- intern->crfd = bfd_h_get_32 (abfd, (bfd_byte *)ext->h_crfd);
- intern->cbRfdOffset = ecoff_get_off (abfd, (bfd_byte *)ext->h_cbRfdOffset);
- intern->iextMax = bfd_h_get_32 (abfd, (bfd_byte *)ext->h_iextMax);
- intern->cbExtOffset = ecoff_get_off (abfd, (bfd_byte *)ext->h_cbExtOffset);
+ intern->magic = H_GET_S16 (abfd, ext->h_magic);
+ intern->vstamp = H_GET_S16 (abfd, ext->h_vstamp);
+ intern->ilineMax = H_GET_32 (abfd, ext->h_ilineMax);
+ intern->cbLine = ECOFF_GET_OFF (abfd, ext->h_cbLine);
+ intern->cbLineOffset = ECOFF_GET_OFF (abfd, ext->h_cbLineOffset);
+ intern->idnMax = H_GET_32 (abfd, ext->h_idnMax);
+ intern->cbDnOffset = ECOFF_GET_OFF (abfd, ext->h_cbDnOffset);
+ intern->ipdMax = H_GET_32 (abfd, ext->h_ipdMax);
+ intern->cbPdOffset = ECOFF_GET_OFF (abfd, ext->h_cbPdOffset);
+ intern->isymMax = H_GET_32 (abfd, ext->h_isymMax);
+ intern->cbSymOffset = ECOFF_GET_OFF (abfd, ext->h_cbSymOffset);
+ intern->ioptMax = H_GET_32 (abfd, ext->h_ioptMax);
+ intern->cbOptOffset = ECOFF_GET_OFF (abfd, ext->h_cbOptOffset);
+ intern->iauxMax = H_GET_32 (abfd, ext->h_iauxMax);
+ intern->cbAuxOffset = ECOFF_GET_OFF (abfd, ext->h_cbAuxOffset);
+ intern->issMax = H_GET_32 (abfd, ext->h_issMax);
+ intern->cbSsOffset = ECOFF_GET_OFF (abfd, ext->h_cbSsOffset);
+ intern->issExtMax = H_GET_32 (abfd, ext->h_issExtMax);
+ intern->cbSsExtOffset = ECOFF_GET_OFF (abfd, ext->h_cbSsExtOffset);
+ intern->ifdMax = H_GET_32 (abfd, ext->h_ifdMax);
+ intern->cbFdOffset = ECOFF_GET_OFF (abfd, ext->h_cbFdOffset);
+ intern->crfd = H_GET_32 (abfd, ext->h_crfd);
+ intern->cbRfdOffset = ECOFF_GET_OFF (abfd, ext->h_cbRfdOffset);
+ intern->iextMax = H_GET_32 (abfd, ext->h_iextMax);
+ intern->cbExtOffset = ECOFF_GET_OFF (abfd, ext->h_cbExtOffset);
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
@@ -149,34 +149,34 @@ ecoff_swap_hdr_out (abfd, intern_copy, ext_ptr)
*intern = *intern_copy;
- bfd_h_put_signed_16 (abfd, intern->magic, (bfd_byte *)ext->h_magic);
- bfd_h_put_signed_16 (abfd, intern->vstamp, (bfd_byte *)ext->h_vstamp);
- bfd_h_put_32 (abfd, intern->ilineMax, (bfd_byte *)ext->h_ilineMax);
- ecoff_put_off (abfd, intern->cbLine, (bfd_byte *)ext->h_cbLine);
- ecoff_put_off (abfd, intern->cbLineOffset, (bfd_byte *)ext->h_cbLineOffset);
- bfd_h_put_32 (abfd, intern->idnMax, (bfd_byte *)ext->h_idnMax);
- ecoff_put_off (abfd, intern->cbDnOffset, (bfd_byte *)ext->h_cbDnOffset);
- bfd_h_put_32 (abfd, intern->ipdMax, (bfd_byte *)ext->h_ipdMax);
- ecoff_put_off (abfd, intern->cbPdOffset, (bfd_byte *)ext->h_cbPdOffset);
- bfd_h_put_32 (abfd, intern->isymMax, (bfd_byte *)ext->h_isymMax);
- ecoff_put_off (abfd, intern->cbSymOffset, (bfd_byte *)ext->h_cbSymOffset);
- bfd_h_put_32 (abfd, intern->ioptMax, (bfd_byte *)ext->h_ioptMax);
- ecoff_put_off (abfd, intern->cbOptOffset, (bfd_byte *)ext->h_cbOptOffset);
- bfd_h_put_32 (abfd, intern->iauxMax, (bfd_byte *)ext->h_iauxMax);
- ecoff_put_off (abfd, intern->cbAuxOffset, (bfd_byte *)ext->h_cbAuxOffset);
- bfd_h_put_32 (abfd, intern->issMax, (bfd_byte *)ext->h_issMax);
- ecoff_put_off (abfd, intern->cbSsOffset, (bfd_byte *)ext->h_cbSsOffset);
- bfd_h_put_32 (abfd, intern->issExtMax, (bfd_byte *)ext->h_issExtMax);
- ecoff_put_off (abfd, intern->cbSsExtOffset, (bfd_byte *)ext->h_cbSsExtOffset);
- bfd_h_put_32 (abfd, intern->ifdMax, (bfd_byte *)ext->h_ifdMax);
- ecoff_put_off (abfd, intern->cbFdOffset, (bfd_byte *)ext->h_cbFdOffset);
- bfd_h_put_32 (abfd, intern->crfd, (bfd_byte *)ext->h_crfd);
- ecoff_put_off (abfd, intern->cbRfdOffset, (bfd_byte *)ext->h_cbRfdOffset);
- bfd_h_put_32 (abfd, intern->iextMax, (bfd_byte *)ext->h_iextMax);
- ecoff_put_off (abfd, intern->cbExtOffset, (bfd_byte *)ext->h_cbExtOffset);
+ H_PUT_S16 (abfd, intern->magic, ext->h_magic);
+ H_PUT_S16 (abfd, intern->vstamp, ext->h_vstamp);
+ H_PUT_32 (abfd, intern->ilineMax, ext->h_ilineMax);
+ ECOFF_PUT_OFF (abfd, intern->cbLine, ext->h_cbLine);
+ ECOFF_PUT_OFF (abfd, intern->cbLineOffset, ext->h_cbLineOffset);
+ H_PUT_32 (abfd, intern->idnMax, ext->h_idnMax);
+ ECOFF_PUT_OFF (abfd, intern->cbDnOffset, ext->h_cbDnOffset);
+ H_PUT_32 (abfd, intern->ipdMax, ext->h_ipdMax);
+ ECOFF_PUT_OFF (abfd, intern->cbPdOffset, ext->h_cbPdOffset);
+ H_PUT_32 (abfd, intern->isymMax, ext->h_isymMax);
+ ECOFF_PUT_OFF (abfd, intern->cbSymOffset, ext->h_cbSymOffset);
+ H_PUT_32 (abfd, intern->ioptMax, ext->h_ioptMax);
+ ECOFF_PUT_OFF (abfd, intern->cbOptOffset, ext->h_cbOptOffset);
+ H_PUT_32 (abfd, intern->iauxMax, ext->h_iauxMax);
+ ECOFF_PUT_OFF (abfd, intern->cbAuxOffset, ext->h_cbAuxOffset);
+ H_PUT_32 (abfd, intern->issMax, ext->h_issMax);
+ ECOFF_PUT_OFF (abfd, intern->cbSsOffset, ext->h_cbSsOffset);
+ H_PUT_32 (abfd, intern->issExtMax, ext->h_issExtMax);
+ ECOFF_PUT_OFF (abfd, intern->cbSsExtOffset, ext->h_cbSsExtOffset);
+ H_PUT_32 (abfd, intern->ifdMax, ext->h_ifdMax);
+ ECOFF_PUT_OFF (abfd, intern->cbFdOffset, ext->h_cbFdOffset);
+ H_PUT_32 (abfd, intern->crfd, ext->h_crfd);
+ ECOFF_PUT_OFF (abfd, intern->cbRfdOffset, ext->h_cbRfdOffset);
+ H_PUT_32 (abfd, intern->iextMax, ext->h_iextMax);
+ ECOFF_PUT_OFF (abfd, intern->cbExtOffset, ext->h_cbExtOffset);
#ifdef TEST
- if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
+ if (memcmp ((char *) ext, (char *) intern, sizeof (*intern)) != 0)
abort ();
#endif
}
@@ -193,55 +193,58 @@ ecoff_swap_fdr_in (abfd, ext_copy, intern)
*ext = *(struct fdr_ext *) ext_copy;
- intern->adr = ecoff_get_off (abfd, (bfd_byte *)ext->f_adr);
- intern->rss = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_rss);
+ intern->adr = ECOFF_GET_OFF (abfd, ext->f_adr);
+ intern->rss = H_GET_32 (abfd, ext->f_rss);
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
if (intern->rss == (signed long) 0xffffffff)
intern->rss = -1;
#endif
- intern->issBase = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_issBase);
- intern->cbSs = ecoff_get_off (abfd, (bfd_byte *)ext->f_cbSs);
- intern->isymBase = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_isymBase);
- intern->csym = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_csym);
- intern->ilineBase = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_ilineBase);
- intern->cline = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_cline);
- intern->ioptBase = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_ioptBase);
- intern->copt = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_copt);
+ intern->issBase = H_GET_32 (abfd, ext->f_issBase);
+ intern->cbSs = ECOFF_GET_OFF (abfd, ext->f_cbSs);
+ intern->isymBase = H_GET_32 (abfd, ext->f_isymBase);
+ intern->csym = H_GET_32 (abfd, ext->f_csym);
+ intern->ilineBase = H_GET_32 (abfd, ext->f_ilineBase);
+ intern->cline = H_GET_32 (abfd, ext->f_cline);
+ intern->ioptBase = H_GET_32 (abfd, ext->f_ioptBase);
+ intern->copt = H_GET_32 (abfd, ext->f_copt);
#if defined (ECOFF_32) || defined (ECOFF_SIGNED_32)
- intern->ipdFirst = bfd_h_get_16 (abfd, (bfd_byte *)ext->f_ipdFirst);
- intern->cpd = bfd_h_get_16 (abfd, (bfd_byte *)ext->f_cpd);
+ intern->ipdFirst = H_GET_16 (abfd, ext->f_ipdFirst);
+ intern->cpd = H_GET_16 (abfd, ext->f_cpd);
#endif
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
- intern->ipdFirst = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_ipdFirst);
- intern->cpd = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_cpd);
+ intern->ipdFirst = H_GET_32 (abfd, ext->f_ipdFirst);
+ intern->cpd = H_GET_32 (abfd, ext->f_cpd);
#endif
- intern->iauxBase = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_iauxBase);
- intern->caux = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_caux);
- intern->rfdBase = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_rfdBase);
- intern->crfd = bfd_h_get_32 (abfd, (bfd_byte *)ext->f_crfd);
+ intern->iauxBase = H_GET_32 (abfd, ext->f_iauxBase);
+ intern->caux = H_GET_32 (abfd, ext->f_caux);
+ intern->rfdBase = H_GET_32 (abfd, ext->f_rfdBase);
+ intern->crfd = H_GET_32 (abfd, ext->f_crfd);
/* now the fun stuff... */
- if (bfd_header_big_endian (abfd)) {
- intern->lang = (ext->f_bits1[0] & FDR_BITS1_LANG_BIG)
- >> FDR_BITS1_LANG_SH_BIG;
- intern->fMerge = 0 != (ext->f_bits1[0] & FDR_BITS1_FMERGE_BIG);
- intern->fReadin = 0 != (ext->f_bits1[0] & FDR_BITS1_FREADIN_BIG);
- intern->fBigendian = 0 != (ext->f_bits1[0] & FDR_BITS1_FBIGENDIAN_BIG);
- intern->glevel = (ext->f_bits2[0] & FDR_BITS2_GLEVEL_BIG)
- >> FDR_BITS2_GLEVEL_SH_BIG;
- } else {
- intern->lang = (ext->f_bits1[0] & FDR_BITS1_LANG_LITTLE)
- >> FDR_BITS1_LANG_SH_LITTLE;
- intern->fMerge = 0 != (ext->f_bits1[0] & FDR_BITS1_FMERGE_LITTLE);
- intern->fReadin = 0 != (ext->f_bits1[0] & FDR_BITS1_FREADIN_LITTLE);
- intern->fBigendian = 0 != (ext->f_bits1[0] & FDR_BITS1_FBIGENDIAN_LITTLE);
- intern->glevel = (ext->f_bits2[0] & FDR_BITS2_GLEVEL_LITTLE)
- >> FDR_BITS2_GLEVEL_SH_LITTLE;
- }
+ if (bfd_header_big_endian (abfd))
+ {
+ intern->lang = ((ext->f_bits1[0] & FDR_BITS1_LANG_BIG)
+ >> FDR_BITS1_LANG_SH_BIG);
+ intern->fMerge = 0 != (ext->f_bits1[0] & FDR_BITS1_FMERGE_BIG);
+ intern->fReadin = 0 != (ext->f_bits1[0] & FDR_BITS1_FREADIN_BIG);
+ intern->fBigendian = 0 != (ext->f_bits1[0] & FDR_BITS1_FBIGENDIAN_BIG);
+ intern->glevel = ((ext->f_bits2[0] & FDR_BITS2_GLEVEL_BIG)
+ >> FDR_BITS2_GLEVEL_SH_BIG);
+ }
+ else
+ {
+ intern->lang = ((ext->f_bits1[0] & FDR_BITS1_LANG_LITTLE)
+ >> FDR_BITS1_LANG_SH_LITTLE);
+ intern->fMerge = 0 != (ext->f_bits1[0] & FDR_BITS1_FMERGE_LITTLE);
+ intern->fReadin = 0 != (ext->f_bits1[0] & FDR_BITS1_FREADIN_LITTLE);
+ intern->fBigendian = 0 != (ext->f_bits1[0] & FDR_BITS1_FBIGENDIAN_LITTLE);
+ intern->glevel = ((ext->f_bits2[0] & FDR_BITS2_GLEVEL_LITTLE)
+ >> FDR_BITS2_GLEVEL_SH_LITTLE);
+ }
intern->reserved = 0;
- intern->cbLineOffset = ecoff_get_off (abfd, (bfd_byte *)ext->f_cbLineOffset);
- intern->cbLine = ecoff_get_off (abfd, (bfd_byte *)ext->f_cbLine);
+ intern->cbLineOffset = ECOFF_GET_OFF (abfd, ext->f_cbLineOffset);
+ intern->cbLine = ECOFF_GET_OFF (abfd, ext->f_cbLine);
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
@@ -262,54 +265,57 @@ ecoff_swap_fdr_out (abfd, intern_copy, ext_ptr)
*intern = *intern_copy; /* Make it reasonable to do in-place. */
- ecoff_put_off (abfd, intern->adr, (bfd_byte *)ext->f_adr);
- bfd_h_put_32 (abfd, intern->rss, (bfd_byte *)ext->f_rss);
- bfd_h_put_32 (abfd, intern->issBase, (bfd_byte *)ext->f_issBase);
- ecoff_put_off (abfd, intern->cbSs, (bfd_byte *)ext->f_cbSs);
- bfd_h_put_32 (abfd, intern->isymBase, (bfd_byte *)ext->f_isymBase);
- bfd_h_put_32 (abfd, intern->csym, (bfd_byte *)ext->f_csym);
- bfd_h_put_32 (abfd, intern->ilineBase, (bfd_byte *)ext->f_ilineBase);
- bfd_h_put_32 (abfd, intern->cline, (bfd_byte *)ext->f_cline);
- bfd_h_put_32 (abfd, intern->ioptBase, (bfd_byte *)ext->f_ioptBase);
- bfd_h_put_32 (abfd, intern->copt, (bfd_byte *)ext->f_copt);
+ ECOFF_PUT_OFF (abfd, intern->adr, ext->f_adr);
+ H_PUT_32 (abfd, intern->rss, ext->f_rss);
+ H_PUT_32 (abfd, intern->issBase, ext->f_issBase);
+ ECOFF_PUT_OFF (abfd, intern->cbSs, ext->f_cbSs);
+ H_PUT_32 (abfd, intern->isymBase, ext->f_isymBase);
+ H_PUT_32 (abfd, intern->csym, ext->f_csym);
+ H_PUT_32 (abfd, intern->ilineBase, ext->f_ilineBase);
+ H_PUT_32 (abfd, intern->cline, ext->f_cline);
+ H_PUT_32 (abfd, intern->ioptBase, ext->f_ioptBase);
+ H_PUT_32 (abfd, intern->copt, ext->f_copt);
#if defined (ECOFF_32) || defined (ECOFF_SIGNED_32)
- bfd_h_put_16 (abfd, intern->ipdFirst, (bfd_byte *)ext->f_ipdFirst);
- bfd_h_put_16 (abfd, intern->cpd, (bfd_byte *)ext->f_cpd);
+ H_PUT_16 (abfd, intern->ipdFirst, ext->f_ipdFirst);
+ H_PUT_16 (abfd, intern->cpd, ext->f_cpd);
#endif
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
- bfd_h_put_32 (abfd, intern->ipdFirst, (bfd_byte *)ext->f_ipdFirst);
- bfd_h_put_32 (abfd, intern->cpd, (bfd_byte *)ext->f_cpd);
+ H_PUT_32 (abfd, intern->ipdFirst, ext->f_ipdFirst);
+ H_PUT_32 (abfd, intern->cpd, ext->f_cpd);
#endif
- bfd_h_put_32 (abfd, intern->iauxBase, (bfd_byte *)ext->f_iauxBase);
- bfd_h_put_32 (abfd, intern->caux, (bfd_byte *)ext->f_caux);
- bfd_h_put_32 (abfd, intern->rfdBase, (bfd_byte *)ext->f_rfdBase);
- bfd_h_put_32 (abfd, intern->crfd, (bfd_byte *)ext->f_crfd);
+ H_PUT_32 (abfd, intern->iauxBase, ext->f_iauxBase);
+ H_PUT_32 (abfd, intern->caux, ext->f_caux);
+ H_PUT_32 (abfd, intern->rfdBase, ext->f_rfdBase);
+ H_PUT_32 (abfd, intern->crfd, ext->f_crfd);
/* now the fun stuff... */
- if (bfd_header_big_endian (abfd)) {
- ext->f_bits1[0] = (((intern->lang << FDR_BITS1_LANG_SH_BIG)
- & FDR_BITS1_LANG_BIG)
- | (intern->fMerge ? FDR_BITS1_FMERGE_BIG : 0)
- | (intern->fReadin ? FDR_BITS1_FREADIN_BIG : 0)
- | (intern->fBigendian ? FDR_BITS1_FBIGENDIAN_BIG : 0));
- ext->f_bits2[0] = ((intern->glevel << FDR_BITS2_GLEVEL_SH_BIG)
- & FDR_BITS2_GLEVEL_BIG);
- ext->f_bits2[1] = 0;
- ext->f_bits2[2] = 0;
- } else {
- ext->f_bits1[0] = (((intern->lang << FDR_BITS1_LANG_SH_LITTLE)
- & FDR_BITS1_LANG_LITTLE)
- | (intern->fMerge ? FDR_BITS1_FMERGE_LITTLE : 0)
- | (intern->fReadin ? FDR_BITS1_FREADIN_LITTLE : 0)
- | (intern->fBigendian ? FDR_BITS1_FBIGENDIAN_LITTLE : 0));
- ext->f_bits2[0] = ((intern->glevel << FDR_BITS2_GLEVEL_SH_LITTLE)
- & FDR_BITS2_GLEVEL_LITTLE);
- ext->f_bits2[1] = 0;
- ext->f_bits2[2] = 0;
- }
+ if (bfd_header_big_endian (abfd))
+ {
+ ext->f_bits1[0] = (((intern->lang << FDR_BITS1_LANG_SH_BIG)
+ & FDR_BITS1_LANG_BIG)
+ | (intern->fMerge ? FDR_BITS1_FMERGE_BIG : 0)
+ | (intern->fReadin ? FDR_BITS1_FREADIN_BIG : 0)
+ | (intern->fBigendian ? FDR_BITS1_FBIGENDIAN_BIG : 0));
+ ext->f_bits2[0] = ((intern->glevel << FDR_BITS2_GLEVEL_SH_BIG)
+ & FDR_BITS2_GLEVEL_BIG);
+ ext->f_bits2[1] = 0;
+ ext->f_bits2[2] = 0;
+ }
+ else
+ {
+ ext->f_bits1[0] = (((intern->lang << FDR_BITS1_LANG_SH_LITTLE)
+ & FDR_BITS1_LANG_LITTLE)
+ | (intern->fMerge ? FDR_BITS1_FMERGE_LITTLE : 0)
+ | (intern->fReadin ? FDR_BITS1_FREADIN_LITTLE : 0)
+ | (intern->fBigendian ? FDR_BITS1_FBIGENDIAN_LITTLE : 0));
+ ext->f_bits2[0] = ((intern->glevel << FDR_BITS2_GLEVEL_SH_LITTLE)
+ & FDR_BITS2_GLEVEL_LITTLE);
+ ext->f_bits2[1] = 0;
+ ext->f_bits2[2] = 0;
+ }
- ecoff_put_off (abfd, intern->cbLineOffset, (bfd_byte *)ext->f_cbLineOffset);
- ecoff_put_off (abfd, intern->cbLine, (bfd_byte *)ext->f_cbLine);
+ ECOFF_PUT_OFF (abfd, intern->cbLineOffset, ext->f_cbLineOffset);
+ ECOFF_PUT_OFF (abfd, intern->cbLine, ext->f_cbLine);
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
@@ -333,26 +339,23 @@ ecoff_swap_pdr_in (abfd, ext_copy, intern)
memset ((PTR) intern, 0, sizeof (*intern));
- intern->adr = ecoff_get_off (abfd, (bfd_byte *)ext->p_adr);
- intern->isym = bfd_h_get_32 (abfd, (bfd_byte *)ext->p_isym);
- intern->iline = bfd_h_get_32 (abfd, (bfd_byte *)ext->p_iline);
- intern->regmask = bfd_h_get_32 (abfd, (bfd_byte *)ext->p_regmask);
- intern->regoffset = bfd_h_get_signed_32 (abfd,
- (bfd_byte *)ext->p_regoffset);
- intern->iopt = bfd_h_get_signed_32 (abfd, (bfd_byte *)ext->p_iopt);
- intern->fregmask = bfd_h_get_32 (abfd, (bfd_byte *)ext->p_fregmask);
- intern->fregoffset = bfd_h_get_signed_32 (abfd,
- (bfd_byte *)ext->p_fregoffset);
- intern->frameoffset = bfd_h_get_signed_32 (abfd,
- (bfd_byte *)ext->p_frameoffset);
- intern->framereg = bfd_h_get_16 (abfd, (bfd_byte *)ext->p_framereg);
- intern->pcreg = bfd_h_get_16 (abfd, (bfd_byte *)ext->p_pcreg);
- intern->lnLow = bfd_h_get_32 (abfd, (bfd_byte *)ext->p_lnLow);
- intern->lnHigh = bfd_h_get_32 (abfd, (bfd_byte *)ext->p_lnHigh);
- intern->cbLineOffset = ecoff_get_off (abfd, (bfd_byte *)ext->p_cbLineOffset);
+ intern->adr = ECOFF_GET_OFF (abfd, ext->p_adr);
+ intern->isym = H_GET_32 (abfd, ext->p_isym);
+ intern->iline = H_GET_32 (abfd, ext->p_iline);
+ intern->regmask = H_GET_32 (abfd, ext->p_regmask);
+ intern->regoffset = H_GET_S32 (abfd, ext->p_regoffset);
+ intern->iopt = H_GET_S32 (abfd, ext->p_iopt);
+ intern->fregmask = H_GET_32 (abfd, ext->p_fregmask);
+ intern->fregoffset = H_GET_S32 (abfd, ext->p_fregoffset);
+ intern->frameoffset = H_GET_S32 (abfd, ext->p_frameoffset);
+ intern->framereg = H_GET_16 (abfd, ext->p_framereg);
+ intern->pcreg = H_GET_16 (abfd, ext->p_pcreg);
+ intern->lnLow = H_GET_32 (abfd, ext->p_lnLow);
+ intern->lnHigh = H_GET_32 (abfd, ext->p_lnHigh);
+ intern->cbLineOffset = ECOFF_GET_OFF (abfd, ext->p_cbLineOffset);
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
- intern->gp_prologue = bfd_h_get_8 (abfd, (bfd_byte *) ext->p_gp_prologue);
+ intern->gp_prologue = H_GET_8 (abfd, ext->p_gp_prologue);
if (bfd_header_big_endian (abfd))
{
intern->gp_used = 0 != (ext->p_bits1[0] & PDR_BITS1_GP_USED_BIG);
@@ -373,7 +376,7 @@ ecoff_swap_pdr_in (abfd, ext_copy, intern)
| ((ext->p_bits2[0] & PDR_BITS2_RESERVED_LITTLE)
<< PDR_BITS2_RESERVED_SH_LEFT_LITTLE));
}
- intern->localoff = bfd_h_get_8 (abfd, (bfd_byte *) ext->p_localoff);
+ intern->localoff = H_GET_8 (abfd, ext->p_localoff);
#endif
#ifdef TEST
@@ -395,23 +398,24 @@ ecoff_swap_pdr_out (abfd, intern_copy, ext_ptr)
*intern = *intern_copy; /* Make it reasonable to do in-place. */
- ecoff_put_off (abfd, intern->adr, (bfd_byte *)ext->p_adr);
- bfd_h_put_32 (abfd, intern->isym, (bfd_byte *)ext->p_isym);
- bfd_h_put_32 (abfd, intern->iline, (bfd_byte *)ext->p_iline);
- bfd_h_put_32 (abfd, intern->regmask, (bfd_byte *)ext->p_regmask);
- bfd_h_put_32 (abfd, intern->regoffset, (bfd_byte *)ext->p_regoffset);
- bfd_h_put_32 (abfd, intern->iopt, (bfd_byte *)ext->p_iopt);
- bfd_h_put_32 (abfd, intern->fregmask, (bfd_byte *)ext->p_fregmask);
- bfd_h_put_32 (abfd, intern->fregoffset, (bfd_byte *)ext->p_fregoffset);
- bfd_h_put_32 (abfd, intern->frameoffset, (bfd_byte *)ext->p_frameoffset);
- bfd_h_put_16 (abfd, intern->framereg, (bfd_byte *)ext->p_framereg);
- bfd_h_put_16 (abfd, intern->pcreg, (bfd_byte *)ext->p_pcreg);
- bfd_h_put_32 (abfd, intern->lnLow, (bfd_byte *)ext->p_lnLow);
- bfd_h_put_32 (abfd, intern->lnHigh, (bfd_byte *)ext->p_lnHigh);
- ecoff_put_off (abfd, intern->cbLineOffset, (bfd_byte *)ext->p_cbLineOffset);
+ ECOFF_PUT_OFF (abfd, intern->adr, ext->p_adr);
+ H_PUT_32 (abfd, intern->isym, ext->p_isym);
+ H_PUT_32 (abfd, intern->iline, ext->p_iline);
+ H_PUT_32 (abfd, intern->regmask, ext->p_regmask);
+ H_PUT_32 (abfd, intern->regoffset, ext->p_regoffset);
+ H_PUT_32 (abfd, intern->iopt, ext->p_iopt);
+ H_PUT_32 (abfd, intern->fregmask, ext->p_fregmask);
+ H_PUT_32 (abfd, intern->fregoffset, ext->p_fregoffset);
+ H_PUT_32 (abfd, intern->frameoffset, ext->p_frameoffset);
+ H_PUT_16 (abfd, intern->framereg, ext->p_framereg);
+ H_PUT_16 (abfd, intern->pcreg, ext->p_pcreg);
+ H_PUT_32 (abfd, intern->lnLow, ext->p_lnLow);
+ H_PUT_32 (abfd, intern->lnHigh, ext->p_lnHigh);
+ ECOFF_PUT_OFF (abfd, intern->cbLineOffset, ext->p_cbLineOffset);
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
- bfd_h_put_8 (abfd, intern->gp_prologue, (bfd_byte *) ext->p_gp_prologue);
+ H_PUT_8 (abfd, intern->gp_prologue, ext->p_gp_prologue);
+
if (bfd_header_big_endian (abfd))
{
ext->p_bits1[0] = ((intern->gp_used ? PDR_BITS1_GP_USED_BIG : 0)
@@ -434,7 +438,7 @@ ecoff_swap_pdr_out (abfd, intern_copy, ext_ptr)
PDR_BITS2_RESERVED_SH_LEFT_LITTLE)
& PDR_BITS2_RESERVED_LITTLE);
}
- bfd_h_put_8 (abfd, intern->localoff, (bfd_byte *) ext->p_localoff);
+ H_PUT_8 (abfd, intern->localoff, ext->p_localoff);
#endif
#ifdef TEST
@@ -458,23 +462,20 @@ ecoff_swap_pdr_in (abfd, ext_copy, intern)
*ext = *(struct pdr_ext *) ext_copy;
- intern->adr = ecoff_get_off (abfd, (bfd_byte *)ext->p_adr);
- intern->isym = bfd_h_get_32 (abfd, (bfd_byte *)ext->p_isym);
- intern->iline = bfd_h_get_32 (abfd, (bfd_byte *)ext->p_iline);
- intern->regmask = bfd_h_get_32 (abfd, (bfd_byte *)ext->p_regmask);
- intern->regoffset = bfd_h_get_signed_32 (abfd,
- (bfd_byte *)ext->p_regoffset);
- intern->iopt = bfd_h_get_signed_32 (abfd, (bfd_byte *)ext->p_iopt);
- intern->fregmask = bfd_h_get_32 (abfd, (bfd_byte *)ext->p_fregmask);
- intern->fregoffset = bfd_h_get_signed_32 (abfd,
- (bfd_byte *)ext->p_fregoffset);
- intern->frameoffset = bfd_h_get_signed_32 (abfd,
- (bfd_byte *)ext->p_frameoffset);
- intern->framereg = bfd_h_get_16 (abfd, (bfd_byte *)ext->p_framereg);
- intern->pcreg = bfd_h_get_16 (abfd, (bfd_byte *)ext->p_pcreg);
- intern->lnLow = bfd_h_get_32 (abfd, (bfd_byte *)ext->p_lnLow);
- intern->lnHigh = bfd_h_get_32 (abfd, (bfd_byte *)ext->p_lnHigh);
- intern->cbLineOffset = ecoff_get_off (abfd, (bfd_byte *)ext->p_cbLineOffset);
+ intern->adr = ECOFF_GET_OFF (abfd, ext->p_adr);
+ intern->isym = H_GET_32 (abfd, ext->p_isym);
+ intern->iline = H_GET_32 (abfd, ext->p_iline);
+ intern->regmask = H_GET_32 (abfd, ext->p_regmask);
+ intern->regoffset = H_GET_S32 (abfd, ext->p_regoffset);
+ intern->iopt = H_GET_S32 (abfd, ext->p_iopt);
+ intern->fregmask = H_GET_32 (abfd, ext->p_fregmask);
+ intern->fregoffset = H_GET_S32 (abfd, ext->p_fregoffset);
+ intern->frameoffset = H_GET_S32 (abfd, ext->p_frameoffset);
+ intern->framereg = H_GET_16 (abfd, ext->p_framereg);
+ intern->pcreg = H_GET_16 (abfd, ext->p_pcreg);
+ intern->lnLow = H_GET_32 (abfd, ext->p_lnLow);
+ intern->lnHigh = H_GET_32 (abfd, ext->p_lnHigh);
+ intern->cbLineOffset = ECOFF_GET_OFF (abfd, ext->p_cbLineOffset);
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
@@ -495,20 +496,20 @@ ecoff_swap_pdr_out (abfd, intern_copy, ext_ptr)
*intern = *intern_copy; /* Make it reasonable to do in-place. */
- ecoff_put_off (abfd, intern->adr, (bfd_byte *)ext->p_adr);
- bfd_h_put_32 (abfd, intern->isym, (bfd_byte *)ext->p_isym);
- bfd_h_put_32 (abfd, intern->iline, (bfd_byte *)ext->p_iline);
- bfd_h_put_32 (abfd, intern->regmask, (bfd_byte *)ext->p_regmask);
- bfd_h_put_32 (abfd, intern->regoffset, (bfd_byte *)ext->p_regoffset);
- bfd_h_put_32 (abfd, intern->iopt, (bfd_byte *)ext->p_iopt);
- bfd_h_put_32 (abfd, intern->fregmask, (bfd_byte *)ext->p_fregmask);
- bfd_h_put_32 (abfd, intern->fregoffset, (bfd_byte *)ext->p_fregoffset);
- bfd_h_put_32 (abfd, intern->frameoffset, (bfd_byte *)ext->p_frameoffset);
- bfd_h_put_16 (abfd, intern->framereg, (bfd_byte *)ext->p_framereg);
- bfd_h_put_16 (abfd, intern->pcreg, (bfd_byte *)ext->p_pcreg);
- bfd_h_put_32 (abfd, intern->lnLow, (bfd_byte *)ext->p_lnLow);
- bfd_h_put_32 (abfd, intern->lnHigh, (bfd_byte *)ext->p_lnHigh);
- ecoff_put_off (abfd, intern->cbLineOffset, (bfd_byte *)ext->p_cbLineOffset);
+ ECOFF_PUT_OFF (abfd, intern->adr, ext->p_adr);
+ H_PUT_32 (abfd, intern->isym, ext->p_isym);
+ H_PUT_32 (abfd, intern->iline, ext->p_iline);
+ H_PUT_32 (abfd, intern->regmask, ext->p_regmask);
+ H_PUT_32 (abfd, intern->regoffset, ext->p_regoffset);
+ H_PUT_32 (abfd, intern->iopt, ext->p_iopt);
+ H_PUT_32 (abfd, intern->fregmask, ext->p_fregmask);
+ H_PUT_32 (abfd, intern->fregoffset, ext->p_fregoffset);
+ H_PUT_32 (abfd, intern->frameoffset, ext->p_frameoffset);
+ H_PUT_16 (abfd, intern->framereg, ext->p_framereg);
+ H_PUT_16 (abfd, intern->pcreg, ext->p_pcreg);
+ H_PUT_32 (abfd, intern->lnLow, ext->p_lnLow);
+ H_PUT_32 (abfd, intern->lnHigh, ext->p_lnHigh);
+ ECOFF_PUT_OFF (abfd, intern->cbLineOffset, ext->p_cbLineOffset);
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
@@ -529,8 +530,8 @@ ecoff_swap_sym_in (abfd, ext_copy, intern)
*ext = *(struct sym_ext *) ext_copy;
- intern->iss = bfd_h_get_32 (abfd, (bfd_byte *)ext->s_iss);
- intern->value = ecoff_get_off (abfd, (bfd_byte *)ext->s_value);
+ intern->iss = H_GET_32 (abfd, ext->s_iss);
+ intern->value = ECOFF_GET_OFF (abfd, ext->s_value);
/* now the fun stuff... */
if (bfd_header_big_endian (abfd)) {
@@ -579,8 +580,8 @@ ecoff_swap_sym_out (abfd, intern_copy, ext_ptr)
*intern = *intern_copy; /* Make it reasonable to do in-place. */
- bfd_h_put_32 (abfd, intern->iss, (bfd_byte *)ext->s_iss);
- ecoff_put_off (abfd, intern->value, (bfd_byte *)ext->s_value);
+ H_PUT_32 (abfd, intern->iss, ext->s_iss);
+ ECOFF_PUT_OFF (abfd, intern->value, ext->s_value);
/* now the fun stuff... */
if (bfd_header_big_endian (abfd)) {
@@ -640,10 +641,10 @@ ecoff_swap_ext_in (abfd, ext_copy, intern)
intern->reserved = 0;
#if defined (ECOFF_32) || defined (ECOFF_SIGNED_32)
- intern->ifd = bfd_h_get_signed_16 (abfd, (bfd_byte *)ext->es_ifd);
+ intern->ifd = H_GET_S16 (abfd, ext->es_ifd);
#endif
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
- intern->ifd = bfd_h_get_signed_32 (abfd, (bfd_byte *)ext->es_ifd);
+ intern->ifd = H_GET_S32 (abfd, ext->es_ifd);
#endif
ecoff_swap_sym_in (abfd, &ext->es_asym, &intern->asym);
@@ -689,10 +690,10 @@ ecoff_swap_ext_out (abfd, intern_copy, ext_ptr)
}
#if defined (ECOFF_32) || defined (ECOFF_SIGNED_32)
- bfd_h_put_signed_16 (abfd, intern->ifd, (bfd_byte *)ext->es_ifd);
+ H_PUT_S16 (abfd, intern->ifd, ext->es_ifd);
#endif
#if defined (ECOFF_64) || defined (ECOFF_SIGNED_64)
- bfd_h_put_signed_32 (abfd, intern->ifd, (bfd_byte *)ext->es_ifd);
+ H_PUT_S32 (abfd, intern->ifd, ext->es_ifd);
#endif
ecoff_swap_sym_out (abfd, &intern->asym, &ext->es_asym);
@@ -713,7 +714,7 @@ ecoff_swap_rfd_in (abfd, ext_ptr, intern)
{
struct rfd_ext *ext = (struct rfd_ext *) ext_ptr;
- *intern = bfd_h_get_32 (abfd, (bfd_byte *)ext->rfd);
+ *intern = H_GET_32 (abfd, ext->rfd);
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
@@ -731,7 +732,7 @@ ecoff_swap_rfd_out (abfd, intern, ext_ptr)
{
struct rfd_ext *ext = (struct rfd_ext *) ext_ptr;
- bfd_h_put_32 (abfd, *intern, (bfd_byte *)ext->rfd);
+ H_PUT_32 (abfd, *intern, ext->rfd);
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
@@ -772,7 +773,7 @@ ecoff_swap_opt_in (abfd, ext_copy, intern)
_bfd_ecoff_swap_rndx_in (bfd_header_big_endian (abfd),
&ext->o_rndx, &intern->rndx);
- intern->offset = bfd_h_get_32 (abfd, (bfd_byte *) ext->o_offset);
+ intern->offset = H_GET_32 (abfd, ext->o_offset);
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
@@ -811,7 +812,7 @@ ecoff_swap_opt_out (abfd, intern_copy, ext_ptr)
_bfd_ecoff_swap_rndx_out (bfd_header_big_endian (abfd),
&intern->rndx, &ext->o_rndx);
- bfd_h_put_32 (abfd, intern->value, (bfd_byte *) ext->o_offset);
+ H_PUT_32 (abfd, intern->value, ext->o_offset);
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
@@ -831,8 +832,8 @@ ecoff_swap_dnr_in (abfd, ext_copy, intern)
*ext = *(struct dnr_ext *) ext_copy;
- intern->rfd = bfd_h_get_32 (abfd, (bfd_byte *) ext->d_rfd);
- intern->index = bfd_h_get_32 (abfd, (bfd_byte *) ext->d_index);
+ intern->rfd = H_GET_32 (abfd, ext->d_rfd);
+ intern->index = H_GET_32 (abfd, ext->d_index);
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
@@ -853,8 +854,8 @@ ecoff_swap_dnr_out (abfd, intern_copy, ext_ptr)
*intern = *intern_copy; /* Make it reasonable to do in-place. */
- bfd_h_put_32 (abfd, intern->rfd, (bfd_byte *) ext->d_rfd);
- bfd_h_put_32 (abfd, intern->index, (bfd_byte *) ext->d_index);
+ H_PUT_32 (abfd, intern->rfd, ext->d_rfd);
+ H_PUT_32 (abfd, intern->index, ext->d_index);
#ifdef TEST
if (memcmp ((char *)ext, (char *)intern, sizeof (*intern)) != 0)
diff --git a/contrib/binutils/bfd/elf-bfd.h b/contrib/binutils/bfd/elf-bfd.h
index b162290..0bd559f 100644
--- a/contrib/binutils/bfd/elf-bfd.h
+++ b/contrib/binutils/bfd/elf-bfd.h
@@ -1,6 +1,6 @@
/* BFD back-end data structures for ELF files.
- Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
- Free Software Foundation, Inc.
+ Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+ 2002 Free Software Foundation, Inc.
Written by Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -28,22 +28,25 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfdlink.h"
/* The number of entries in a section is its size divided by the size
- of a single entry. This is normally only applicaable to reloc and
+ of a single entry. This is normally only applicable to reloc and
symbol table sections. */
#define NUM_SHDR_ENTRIES(shdr) ((shdr)->sh_size / (shdr)->sh_entsize)
/* If size isn't specified as 64 or 32, NAME macro should fail. */
+/* Do not "beautify" the CONCAT* macro args. Traditional C will not
+ remove whitespace added here, and thus will fail to concatenate
+ the tokens. */
#ifndef NAME
#if ARCH_SIZE==64
-#define NAME(x,y) CAT4(x,64,_,y)
+#define NAME(x,y) CONCAT4 (x,64,_,y)
#endif
#if ARCH_SIZE==32
-#define NAME(x,y) CAT4(x,32,_,y)
+#define NAME(x,y) CONCAT4 (x,32,_,y)
#endif
#endif
#ifndef NAME
-#define NAME(x,y) CAT4(x,NOSIZE,_,y)
+#define NAME(x,y) CONCAT4 (x,NOSIZE,_,y)
#endif
#define ElfNAME(X) NAME(Elf,X)
@@ -76,6 +79,8 @@ typedef struct
} elf_symbol_type;
+struct elf_strtab_hash;
+
/* ELF linker hash table entries. */
struct elf_link_hash_entry
@@ -86,9 +91,6 @@ struct elf_link_hash_entry
set to -2 if the symbol is used by a reloc. */
long indx;
- /* Symbol size. */
- bfd_size_type size;
-
/* 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
@@ -106,31 +108,14 @@ struct elf_link_hash_entry
/* String table index in .dynstr if this is a dynamic symbol. */
unsigned long dynstr_index;
+ /* Hash value of the name computed using the ELF hash function. */
+ unsigned long elf_hash_value;
+
/* If this is a weak defined symbol from a dynamic object, this
field points to a defined symbol with the same value, if there is
one. Otherwise it is NULL. */
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 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
from the beginning of the section. */
@@ -159,15 +144,35 @@ struct elf_link_hash_entry
/* Virtual table derivation info. */
struct elf_link_hash_entry *vtable_parent;
+ /* If this symbol requires an entry in the global offset table, the
+ 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;
+
+ /* Symbol size. */
+ bfd_size_type size;
+
/* Symbol type (STT_NOTYPE, STT_OBJECT, etc.). */
char type;
/* 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. */
@@ -218,36 +223,65 @@ struct elf_link_local_dynamic_entry
Elf_Internal_Sym isym;
};
+enum elf_link_info_type
+{
+ ELF_INFO_TYPE_NONE,
+ ELF_INFO_TYPE_STABS,
+ ELF_INFO_TYPE_MERGE,
+ ELF_INFO_TYPE_EH_FRAME,
+ ELF_INFO_TYPE_EH_FRAME_HDR,
+ ELF_INFO_TYPE_LAST
+};
+
/* ELF linker hash table. */
struct elf_link_hash_table
{
struct bfd_link_hash_table root;
+
/* Whether we have created the special dynamic sections required
when linking against or generating a shared object. */
boolean dynamic_sections_created;
+
/* The BFD used to hold special sections created by the linker.
This will be the first BFD found which requires these sections to
be created. */
bfd *dynobj;
+
+ /* The value to use when initialising got.refcount/offset and
+ plt.refcount/offset in an elf_link_hash_entry. Set to zero when
+ the values are refcounts. Set to -1 in size_dynamic_sections
+ when the values may be offsets. */
+ bfd_signed_vma init_refcount;
+
/* The number of symbols found in the link which must be put into
the .dynsym section. */
bfd_size_type dynsymcount;
+
/* The string table of dynamic symbols, which becomes the .dynstr
section. */
- struct bfd_strtab_hash *dynstr;
+ struct elf_strtab_hash *dynstr;
+
/* The number of buckets in the hash table in the .hash section.
This is based on the number of dynamic symbols. */
bfd_size_type bucketcount;
+
/* A linked list of DT_NEEDED names found in dynamic objects
included in the link. */
struct bfd_link_needed_list *needed;
+
/* The _GLOBAL_OFFSET_TABLE_ symbol. */
struct elf_link_hash_entry *hgot;
+
/* A pointer to information used to link stabs in sections. */
PTR stab_info;
+
+ /* A pointer to information used to merge SEC_MERGE sections. */
+ PTR merge_info;
+
/* A linked list of local symbols to be added to .dynsym. */
struct elf_link_local_dynamic_entry *dynlocal;
+
/* A linked list of DT_RPATH/DT_RUNPATH names found in dynamic
objects included in the link. */
struct bfd_link_needed_list *runpath;
@@ -271,6 +305,20 @@ struct elf_link_hash_table
/* Get the ELF linker hash table from a link_info structure. */
#define elf_hash_table(p) ((struct elf_link_hash_table *) ((p)->hash))
+
+/* Returns true if the hash table is a struct elf_link_hash_table. */
+#define is_elf_hash_table(p) \
+ ((p)->hash->type == bfd_link_elf_hash_table)
+
+/* Used by bfd_section_from_r_symndx to cache a small number of local
+ symbol to section mappings. */
+#define LOCAL_SYM_CACHE_SIZE 32
+struct sym_sec_cache
+{
+ bfd *abfd;
+ unsigned long indx[LOCAL_SYM_CACHE_SIZE];
+ asection *sec[LOCAL_SYM_CACHE_SIZE];
+};
/* Constant information held for an ELF backend. */
@@ -287,15 +335,22 @@ struct elf_size_info {
unsigned char arch_size, file_align;
unsigned char elfclass, ev_current;
- int (*write_out_phdrs) PARAMS ((bfd *, const Elf_Internal_Phdr *, int));
- boolean (*write_shdrs_and_ehdr) PARAMS ((bfd *));
- void (*write_relocs) PARAMS ((bfd *, asection *, PTR));
- void (*swap_symbol_out) PARAMS ((bfd *, const Elf_Internal_Sym *, PTR));
+ int (*write_out_phdrs)
+ PARAMS ((bfd *, const Elf_Internal_Phdr *, unsigned int));
+ boolean (*write_shdrs_and_ehdr)
+ PARAMS ((bfd *));
+ void (*write_relocs)
+ PARAMS ((bfd *, asection *, PTR));
+ void (*swap_symbol_out)
+ PARAMS ((bfd *, const Elf_Internal_Sym *, PTR, PTR));
boolean (*slurp_reloc_table)
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));
+ 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
@@ -329,6 +384,25 @@ struct elf_size_info {
? (elf_symbol_type *) (S) \
: 0)
+enum elf_reloc_type_class {
+ reloc_class_normal,
+ reloc_class_relative,
+ reloc_class_plt,
+ reloc_class_copy
+};
+
+struct elf_reloc_cookie
+{
+ Elf_Internal_Rela *rels, *rel, *relend;
+ PTR locsyms;
+ PTR locsym_shndx;
+ bfd *abfd;
+ size_t locsymcount;
+ size_t extsymoff;
+ struct elf_link_hash_entry **sym_hashes;
+ boolean bad_symtab;
+};
+
struct elf_backend_data
{
/* The architecture for this backend. */
@@ -342,20 +416,21 @@ struct elf_backend_data
/* A function to translate an ELF RELA relocation to a BFD arelent
structure. */
- void (*elf_info_to_howto) PARAMS ((bfd *, arelent *,
- Elf_Internal_Rela *));
+ void (*elf_info_to_howto)
+ PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
/* A function to translate an ELF REL relocation to a BFD arelent
structure. */
- void (*elf_info_to_howto_rel) PARAMS ((bfd *, arelent *,
- Elf_Internal_Rel *));
+ void (*elf_info_to_howto_rel)
+ PARAMS ((bfd *, arelent *, Elf_Internal_Rel *));
/* A function to determine whether a symbol is global when
partitioning the symbol table into local and global symbols.
This should be NULL for most targets, in which case the correct
thing will be done. MIPS ELF, at least on the Irix 5, has
special requirements. */
- boolean (*elf_backend_sym_is_global) PARAMS ((bfd *, asymbol *));
+ boolean (*elf_backend_sym_is_global)
+ PARAMS ((bfd *, asymbol *));
/* The remaining functions are hooks which are called only if they
are not NULL. */
@@ -366,59 +441,59 @@ struct elf_backend_data
this is called elf_elfheader is set, but anything else should be
used with caution. If this returns false, the check_format
routine will return a bfd_error_wrong_format error. */
- boolean (*elf_backend_object_p) PARAMS ((bfd *));
+ boolean (*elf_backend_object_p)
+ PARAMS ((bfd *));
/* A function to do additional symbol processing when reading the
ELF symbol table. This is where any processor-specific special
section indices are handled. */
- void (*elf_backend_symbol_processing) PARAMS ((bfd *, asymbol *));
+ void (*elf_backend_symbol_processing)
+ PARAMS ((bfd *, asymbol *));
/* A function to do additional symbol processing after reading the
entire ELF symbol table. */
- boolean (*elf_backend_symbol_table_processing) PARAMS ((bfd *,
- elf_symbol_type *,
- unsigned int));
+ boolean (*elf_backend_symbol_table_processing)
+ PARAMS ((bfd *, 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));
+ 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
unusual sections. */
- boolean (*elf_backend_section_processing) PARAMS ((bfd *,
- Elf32_Internal_Shdr *));
+ boolean (*elf_backend_section_processing)
+ PARAMS ((bfd *, Elf32_Internal_Shdr *));
/* A function to handle unusual section types when creating BFD
sections from ELF sections. */
- boolean (*elf_backend_section_from_shdr) PARAMS ((bfd *,
- Elf32_Internal_Shdr *,
- char *));
+ boolean (*elf_backend_section_from_shdr)
+ PARAMS ((bfd *, Elf32_Internal_Shdr *, char *));
/* A function to convert machine dependent section header flags to
BFD internal section header flags. */
- boolean (*elf_backend_section_flags) PARAMS ((flagword *,
- Elf32_Internal_Shdr *));
+ boolean (*elf_backend_section_flags)
+ PARAMS ((flagword *, Elf32_Internal_Shdr *));
/* A function to handle unusual program segment types when creating BFD
sections from ELF program segments. */
- boolean (*elf_backend_section_from_phdr) PARAMS ((bfd *,
- Elf32_Internal_Phdr *,
- int));
+ 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. */
- boolean (*elf_backend_fake_sections) PARAMS ((bfd *, Elf32_Internal_Shdr *,
- asection *));
+ boolean (*elf_backend_fake_sections)
+ PARAMS ((bfd *, Elf32_Internal_Shdr *, asection *));
/* A function to get the ELF section index for a BFD section. If
this returns true, the section was found. If it is a normal ELF
section, *RETVAL should be left unchanged. If it is not a normal
ELF section *RETVAL should be set to the SHN_xxxx index. */
boolean (*elf_backend_section_from_bfd_section)
- PARAMS ((bfd *, Elf32_Internal_Shdr *, asection *, int *retval));
+ PARAMS ((bfd *, asection *, int *retval));
/* If this field is not NULL, it is called by the add_symbols phase
of a link just before adding a symbol to the global linker hash
@@ -565,11 +640,13 @@ struct elf_backend_data
/* This function is called by get_program_header_size. It should
return the number of additional program segments which this BFD
will need. It should return -1 on error. */
- int (*elf_backend_additional_program_headers) PARAMS ((bfd *));
+ int (*elf_backend_additional_program_headers)
+ PARAMS ((bfd *));
/* This function is called to modify an existing segment map in a
backend specific fashion. */
- boolean (*elf_backend_modify_segment_map) PARAMS ((bfd *));
+ 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
@@ -603,18 +680,65 @@ struct elf_backend_data
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 *))));
+ boolean (*) (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. */
+ /* Copy any information related to dynamic linking from a pre-existing
+ symbol to a newly created symbol. Also called to copy flags and
+ other back-end info to a weakdef, in which case the symbol is not
+ newly created and plt/got refcounts and dynamic indices should not
+ be copied. */
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 bfd_link_info *, struct elf_link_hash_entry *));
+ PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *, boolean));
+
+ /* Emit relocations. Overrides default routine for emitting relocs,
+ except during a relocatable link, or if all relocs are being emitted. */
+ void (*elf_backend_emit_relocs)
+ PARAMS ((bfd *, asection *, Elf_Internal_Shdr *, Elf_Internal_Rela *));
+
+ /* Count relocations. Not called for relocatable links
+ or if all relocs are being preserved in the output. */
+ unsigned int (*elf_backend_count_relocs)
+ PARAMS ((asection *, Elf_Internal_Rela *));
+
+ /* This function, if defined, is called when an NT_PRSTATUS note is found
+ in a core file. */
+ boolean (*elf_backend_grok_prstatus)
+ PARAMS ((bfd *, Elf_Internal_Note *));
+
+ /* This function, if defined, is called when an NT_PSINFO or NT_PRPSINFO
+ note is found in a core file. */
+ boolean (*elf_backend_grok_psinfo)
+ PARAMS ((bfd *, Elf_Internal_Note *));
+
+ /* Functions to print VMAs. Special code to handle 64 bit ELF files. */
+ void (* elf_backend_sprintf_vma)
+ PARAMS ((bfd *, char *, bfd_vma));
+ void (* elf_backend_fprintf_vma)
+ PARAMS ((bfd *, PTR, bfd_vma));
+
+ /* This function returns class of a reloc type. */
+ enum elf_reloc_type_class (*elf_backend_reloc_type_class)
+ PARAMS ((const Elf_Internal_Rela *));
+
+ /* This function, if defined, removes information about discarded functions
+ from other sections which mention them. */
+ boolean (*elf_backend_discard_info)
+ PARAMS ((bfd *, struct elf_reloc_cookie *, struct bfd_link_info *));
+
+ /* This function, if defined, signals that the function above has removed
+ the discarded relocations for this section. */
+ boolean (*elf_backend_ignore_discarded_relocs)
+ PARAMS ((asection *));
+
+ /* This function, if defined, may write out the given section.
+ Returns true if it did so and false if the caller should. */
+ boolean (*elf_backend_write_section)
+ PARAMS ((bfd *, asection *, bfd_byte *));
/* The swapping table to use when dealing with ECOFF information.
Used for the MIPS ELF .mdebug section. */
@@ -674,6 +798,8 @@ struct elf_backend_data
unsigned plt_not_loaded : 1;
unsigned plt_alignment : 4;
unsigned can_gc_sections : 1;
+ unsigned can_refcount : 1;
+ unsigned want_got_sym : 1;
unsigned want_dynbss : 1;
};
@@ -684,46 +810,84 @@ struct bfd_elf_section_data
{
/* The ELF header for this section. */
Elf_Internal_Shdr this_hdr;
+
/* The ELF header for the reloc section associated with this
section, if any. */
Elf_Internal_Shdr rel_hdr;
+
/* 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;
+
+ /* A pointer to a linked list tracking dynamic relocs copied for
+ local symbols. */
+ PTR local_dynrel;
+
+ /* A pointer to the bfd section used for dynamic relocs. */
+ asection *sreloc;
+
/* The ELF section number of this section. Only used for an output
file. */
int this_idx;
+
/* 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;
+
/* A pointer to the swapped relocs. If the section uses REL relocs,
rather than RELA, all the r_addend fields will be zero. This
pointer may be NULL. It is used by the backend linker. */
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. 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 used for various section optimizations. */
+ PTR sec_info;
+
+ /* Type of that information. */
+ enum elf_link_info_type sec_info_type;
+
+ /* Group name, if this section is part of a group. */
+ const char *group_name;
+
+ /* A linked list of sections in the group. Circular when used by
+ the linker. */
+ asection *next_in_group;
+
/* 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)
+#define elf_group_name(sec) (elf_section_data(sec)->group_name)
+#define elf_next_in_group(sec) (elf_section_data(sec)->next_in_group)
+
+/* Return true if section has been discarded. */
+#define elf_discarded_section(sec) \
+ (!bfd_is_abs_section(sec) \
+ && bfd_is_abs_section((sec)->output_section) \
+ && elf_section_data (sec)->sec_info_type != ELF_INFO_TYPE_MERGE)
#define get_elf_backend_data(abfd) \
((struct elf_backend_data *) (abfd)->xvec->backend_data)
@@ -769,7 +933,7 @@ typedef struct elf_linker_section_pointers
{
struct elf_linker_section_pointers *next; /* next allocated pointer for this symbol */
bfd_vma offset; /* offset of pointer from beginning of section */
- bfd_signed_vma addend; /* addend used */
+ bfd_vma addend; /* addend used */
elf_linker_section_enum_t which; /* which linker section this is */
boolean written_address_p; /* whether address was written yet */
} elf_linker_section_pointers_t;
@@ -783,9 +947,11 @@ struct elf_obj_tdata
Elf_Internal_Shdr **elf_sect_ptr;
Elf_Internal_Phdr *phdr;
struct elf_segment_map *segment_map;
- struct bfd_strtab_hash *strtab_ptr;
+ struct elf_strtab_hash *strtab_ptr;
int num_locals;
int num_globals;
+ unsigned int num_elf_sections; /* elf_sect_ptr size */
+ int num_section_syms;
asymbol **section_syms; /* STT_SECTION symbols for each section */
Elf_Internal_Shdr symtab_hdr;
Elf_Internal_Shdr shstrtab_hdr;
@@ -795,8 +961,10 @@ struct elf_obj_tdata
Elf_Internal_Shdr dynversym_hdr;
Elf_Internal_Shdr dynverref_hdr;
Elf_Internal_Shdr dynverdef_hdr;
+ Elf_Internal_Shdr symtab_shndx_hdr;
unsigned int symtab_section, shstrtab_section;
unsigned int strtab_section, dynsymtab_section;
+ unsigned int symtab_shndx_section;
unsigned int dynversym_section, dynverdef_section, dynverref_section;
file_ptr next_file_pos;
#if 0
@@ -805,8 +973,11 @@ struct elf_obj_tdata
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) */
+ bfd_vma gp; /* The gp value */
+ unsigned int gp_size; /* The gp size */
+
+ Elf_Internal_Shdr **group_sect_ptr;
+ int num_group;
/* Information grabbed from an elf core file. */
int core_signal;
@@ -892,6 +1063,10 @@ struct elf_obj_tdata
/* Used to determine if the e_flags field has been initialized */
boolean flags_init;
+ /* Used to determine if PT_GNU_EH_FRAME segment header should be
+ created. */
+ boolean eh_frame_hdr;
+
/* Number of symbol version definitions we are about to emit. */
unsigned int cverdefs;
@@ -918,8 +1093,10 @@ struct elf_obj_tdata
#define elf_tdata(bfd) ((bfd) -> tdata.elf_obj_data)
#define elf_elfheader(bfd) (elf_tdata(bfd) -> elf_header)
#define elf_elfsections(bfd) (elf_tdata(bfd) -> elf_sect_ptr)
+#define elf_numsections(bfd) (elf_tdata(bfd) -> num_elf_sections)
#define elf_shstrtab(bfd) (elf_tdata(bfd) -> strtab_ptr)
#define elf_onesymtab(bfd) (elf_tdata(bfd) -> symtab_section)
+#define elf_symtab_shndx(bfd) (elf_tdata(bfd) -> symtab_shndx_section)
#define elf_dynsymtab(bfd) (elf_tdata(bfd) -> dynsymtab_section)
#define elf_dynversym(bfd) (elf_tdata(bfd) -> dynversym_section)
#define elf_dynverdef(bfd) (elf_tdata(bfd) -> dynverdef_section)
@@ -927,6 +1104,7 @@ struct elf_obj_tdata
#define elf_num_locals(bfd) (elf_tdata(bfd) -> num_locals)
#define elf_num_globals(bfd) (elf_tdata(bfd) -> num_globals)
#define elf_section_syms(bfd) (elf_tdata(bfd) -> section_syms)
+#define elf_num_section_syms(bfd) (elf_tdata(bfd) -> num_section_syms)
#define core_prpsinfo(bfd) (elf_tdata(bfd) -> prpsinfo)
#define core_prstatus(bfd) (elf_tdata(bfd) -> prstatus)
#define elf_gp(bfd) (elf_tdata(bfd) -> gp)
@@ -962,36 +1140,56 @@ extern void _bfd_elf_swap_versym_in
extern void _bfd_elf_swap_versym_out
PARAMS ((bfd *, const Elf_Internal_Versym *, Elf_External_Versym *));
-extern int _bfd_elf_section_from_bfd_section PARAMS ((bfd *, asection *));
+extern int _bfd_elf_section_from_bfd_section
+ PARAMS ((bfd *, asection *));
extern char *bfd_elf_string_from_elf_section
PARAMS ((bfd *, unsigned, unsigned));
-extern char *bfd_elf_get_str_section PARAMS ((bfd *, unsigned));
+extern char *bfd_elf_get_str_section
+ PARAMS ((bfd *, unsigned));
+
+extern boolean _bfd_elf_copy_private_bfd_data
+ PARAMS ((bfd *, bfd *));
+extern boolean _bfd_elf_print_private_bfd_data
+ PARAMS ((bfd *, PTR));
+extern void bfd_elf_print_symbol
+ PARAMS ((bfd *, PTR, asymbol *, bfd_print_symbol_type));
-extern boolean _bfd_elf_print_private_bfd_data PARAMS ((bfd *, PTR));
-extern void bfd_elf_print_symbol PARAMS ((bfd *, PTR, asymbol *,
- bfd_print_symbol_type));
-#define elf_string_from_elf_strtab(abfd,strindex) \
- bfd_elf_string_from_elf_section(abfd,elf_elfheader(abfd)->e_shstrndx,strindex)
+#define elf_string_from_elf_strtab(abfd, strindex) \
+ bfd_elf_string_from_elf_section(abfd, elf_elfheader(abfd)->e_shstrndx, \
+ strindex)
#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 char *));
-
-extern bfd_reloc_status_type bfd_elf_generic_reloc PARAMS ((bfd *,
- arelent *,
- asymbol *,
- PTR,
- asection *,
- 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 void _bfd_elf_sprintf_vma
+ PARAMS ((bfd *, char *, bfd_vma));
+extern void _bfd_elf_fprintf_vma
+ PARAMS ((bfd *, PTR, bfd_vma));
+
+extern enum elf_reloc_type_class _bfd_elf_reloc_type_class
+ PARAMS ((const Elf_Internal_Rela *));
+extern bfd_vma _bfd_elf_rela_local_sym
+ PARAMS ((bfd *, Elf_Internal_Sym *, asection *, Elf_Internal_Rela *));
+extern bfd_vma _bfd_elf_rel_local_sym
+ PARAMS ((bfd *, Elf_Internal_Sym *, asection **, bfd_vma));
+extern bfd_vma _bfd_elf_section_offset
+ PARAMS ((bfd *, struct bfd_link_info *, asection *, bfd_vma));
+
+extern unsigned long bfd_elf_hash
+ PARAMS ((const char *));
+
+extern bfd_reloc_status_type bfd_elf_generic_reloc
+ PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, 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));
+ PARAMS ((bfd *, Elf_Internal_Shdr *, const char *));
extern boolean _bfd_elf_make_section_from_phdr
- PARAMS ((bfd *abfd, Elf_Internal_Phdr *hdr, int index, const char *typename));
+ PARAMS ((bfd *, Elf_Internal_Phdr *, int, const char *));
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
@@ -999,147 +1197,187 @@ extern struct bfd_link_hash_table *_bfd_elf_link_hash_table_create
extern void _bfd_elf_link_hash_copy_indirect
PARAMS ((struct elf_link_hash_entry *, struct elf_link_hash_entry *));
extern void _bfd_elf_link_hash_hide_symbol
- PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
+ PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *, boolean));
extern boolean _bfd_elf_link_hash_table_init
PARAMS ((struct elf_link_hash_table *, bfd *,
struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
struct bfd_hash_table *,
const char *)));
-extern boolean _bfd_elf_slurp_version_tables PARAMS ((bfd *));
+extern boolean _bfd_elf_slurp_version_tables
+ PARAMS ((bfd *));
+
+extern boolean _bfd_elf_merge_sections
+ PARAMS ((bfd *, struct bfd_link_info *));
extern boolean _bfd_elf_copy_private_symbol_data
PARAMS ((bfd *, asymbol *, bfd *, asymbol *));
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));
-extern long _bfd_elf_get_symtab_upper_bound PARAMS ((bfd *));
-extern long _bfd_elf_get_symtab PARAMS ((bfd *, asymbol **));
-extern long _bfd_elf_get_dynamic_symtab_upper_bound PARAMS ((bfd *));
-extern long _bfd_elf_canonicalize_dynamic_symtab PARAMS ((bfd *, asymbol **));
-extern long _bfd_elf_get_reloc_upper_bound PARAMS ((bfd *, sec_ptr));
-extern long _bfd_elf_canonicalize_reloc PARAMS ((bfd *, sec_ptr,
- arelent **, asymbol **));
-extern long _bfd_elf_get_dynamic_reloc_upper_bound PARAMS ((bfd *));
-extern long _bfd_elf_canonicalize_dynamic_reloc PARAMS ((bfd *, arelent **,
- asymbol **));
-extern asymbol *_bfd_elf_make_empty_symbol PARAMS ((bfd *));
-extern void _bfd_elf_get_symbol_info PARAMS ((bfd *, asymbol *,
- symbol_info *));
-extern boolean _bfd_elf_is_local_label_name PARAMS ((bfd *, const char *));
-extern alent *_bfd_elf_get_lineno PARAMS ((bfd *, asymbol *));
-extern boolean _bfd_elf_set_arch_mach PARAMS ((bfd *, enum bfd_architecture,
- unsigned long));
-extern boolean _bfd_elf_find_nearest_line PARAMS ((bfd *, asection *,
- asymbol **,
- bfd_vma, const char **,
- const char **,
- unsigned int *));
+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));
+extern long _bfd_elf_get_symtab_upper_bound
+ PARAMS ((bfd *));
+extern long _bfd_elf_get_symtab
+ PARAMS ((bfd *, asymbol **));
+extern long _bfd_elf_get_dynamic_symtab_upper_bound
+ PARAMS ((bfd *));
+extern long _bfd_elf_canonicalize_dynamic_symtab
+ PARAMS ((bfd *, asymbol **));
+extern long _bfd_elf_get_reloc_upper_bound
+ PARAMS ((bfd *, sec_ptr));
+extern long _bfd_elf_canonicalize_reloc
+ PARAMS ((bfd *, sec_ptr, arelent **, asymbol **));
+extern long _bfd_elf_get_dynamic_reloc_upper_bound
+ PARAMS ((bfd *));
+extern long _bfd_elf_canonicalize_dynamic_reloc
+ PARAMS ((bfd *, arelent **, asymbol **));
+extern asymbol *_bfd_elf_make_empty_symbol
+ PARAMS ((bfd *));
+extern void _bfd_elf_get_symbol_info
+ PARAMS ((bfd *, asymbol *, symbol_info *));
+extern boolean _bfd_elf_is_local_label_name
+ PARAMS ((bfd *, const char *));
+extern alent *_bfd_elf_get_lineno
+ PARAMS ((bfd *, asymbol *));
+extern boolean _bfd_elf_set_arch_mach
+ PARAMS ((bfd *, enum bfd_architecture, unsigned long));
+extern boolean _bfd_elf_find_nearest_line
+ PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
+ const char **, unsigned int *));
#define _bfd_elf_read_minisymbols _bfd_generic_read_minisymbols
#define _bfd_elf_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
-extern int _bfd_elf_sizeof_headers PARAMS ((bfd *, boolean));
-extern boolean _bfd_elf_new_section_hook PARAMS ((bfd *, asection *));
+extern 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 *,
- Elf_Internal_Rela *));
-
-extern boolean bfd_section_from_shdr PARAMS ((bfd *, unsigned int shindex));
-extern boolean bfd_section_from_phdr PARAMS ((bfd *, Elf_Internal_Phdr *, int));
-
-extern int _bfd_elf_symbol_from_bfd_symbol PARAMS ((bfd *, asymbol **));
-
-asection *bfd_section_from_elf_index PARAMS ((bfd *, unsigned int));
-boolean _bfd_elf_create_dynamic_sections PARAMS ((bfd *,
- struct bfd_link_info *));
-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 *));
-void _bfd_elf_assign_file_positions_for_relocs PARAMS ((bfd *));
-file_ptr _bfd_elf_assign_file_position_for_section PARAMS ((Elf_Internal_Shdr *,
- file_ptr,
- boolean));
-
-extern boolean _bfd_elf_validate_reloc PARAMS ((bfd *, arelent *));
-
-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,
- struct bfd_link_info *info,
- enum elf_linker_section_enum,
- elf_linker_section_t *defaults));
-
-elf_linker_section_pointers_t *_bfd_elf_find_pointer_linker_section
- PARAMS ((elf_linker_section_pointers_t *linker_pointers,
- bfd_signed_vma addend,
- elf_linker_section_enum_t which));
-
-boolean bfd_elf32_create_pointer_linker_section
- PARAMS ((bfd *abfd,
- struct bfd_link_info *info,
- elf_linker_section_t *lsect,
- struct elf_link_hash_entry *h,
- const Elf32_Internal_Rela *rel));
-
-bfd_vma bfd_elf32_finish_pointer_linker_section
- PARAMS ((bfd *output_abfd,
- bfd *input_bfd,
- struct bfd_link_info *info,
- elf_linker_section_t *lsect,
- struct elf_link_hash_entry *h,
- bfd_vma relocation,
- const Elf32_Internal_Rela *rel,
- int relative_reloc));
-
-boolean bfd_elf64_create_pointer_linker_section
- PARAMS ((bfd *abfd,
- struct bfd_link_info *info,
- elf_linker_section_t *lsect,
- struct elf_link_hash_entry *h,
- const Elf64_Internal_Rela *rel));
-
-bfd_vma bfd_elf64_finish_pointer_linker_section
- PARAMS ((bfd *output_abfd,
- bfd *input_bfd,
- struct bfd_link_info *info,
- elf_linker_section_t *lsect,
- struct elf_link_hash_entry *h,
- bfd_vma relocation,
- const Elf64_Internal_Rela *rel,
- int relative_reloc));
-
-boolean _bfd_elf_make_linker_section_rela
- PARAMS ((bfd *dynobj,
- elf_linker_section_t *lsect,
- int alignment));
-
-boolean _bfd_elfcore_section_from_phdr
+extern void _bfd_elf_no_info_to_howto
+ PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
+
+extern boolean bfd_section_from_shdr
+ PARAMS ((bfd *, unsigned int shindex));
+extern boolean bfd_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 *));
-extern int bfd_elf32_core_file_failing_signal PARAMS ((bfd *));
-extern boolean bfd_elf32_core_file_matches_executable_p PARAMS ((bfd *,
- bfd *));
+extern int _bfd_elf_symbol_from_bfd_symbol
+ PARAMS ((bfd *, asymbol **));
+
+extern asection *bfd_section_from_r_symndx
+ PARAMS ((bfd *, struct sym_sec_cache *, asection *, unsigned long));
+extern asection *bfd_section_from_elf_index
+ PARAMS ((bfd *, unsigned int));
+extern boolean _bfd_elf_create_dynamic_sections
+ PARAMS ((bfd *, struct bfd_link_info *));
+extern struct bfd_strtab_hash *_bfd_elf_stringtab_init
+ PARAMS ((void));
+
+extern struct elf_strtab_hash * _bfd_elf_strtab_init
+ PARAMS ((void));
+extern void _bfd_elf_strtab_free
+ PARAMS ((struct elf_strtab_hash *));
+extern bfd_size_type _bfd_elf_strtab_add
+ PARAMS ((struct elf_strtab_hash *, const char *, boolean));
+extern void _bfd_elf_strtab_addref
+ PARAMS ((struct elf_strtab_hash *, bfd_size_type));
+extern void _bfd_elf_strtab_delref
+ PARAMS ((struct elf_strtab_hash *, bfd_size_type));
+extern void _bfd_elf_strtab_clear_all_refs
+ PARAMS ((struct elf_strtab_hash *));
+extern bfd_size_type _bfd_elf_strtab_size
+ PARAMS ((struct elf_strtab_hash *));
+extern bfd_size_type _bfd_elf_strtab_offset
+ PARAMS ((struct elf_strtab_hash *, bfd_size_type));
+extern boolean _bfd_elf_strtab_emit
+ PARAMS ((bfd *, struct elf_strtab_hash *));
+extern void _bfd_elf_strtab_finalize
+ PARAMS ((struct elf_strtab_hash *));
+
+extern boolean _bfd_elf_discard_section_eh_frame
+ PARAMS ((bfd *, struct bfd_link_info *, asection *, asection *,
+ boolean (*) (bfd_vma, PTR), struct elf_reloc_cookie *));
+extern boolean _bfd_elf_discard_section_eh_frame_hdr
+ PARAMS ((bfd *, struct bfd_link_info *, asection *));
+extern bfd_vma _bfd_elf_eh_frame_section_offset
+ PARAMS ((bfd *, asection *, bfd_vma));
+extern boolean _bfd_elf_write_section_eh_frame
+ PARAMS ((bfd *, asection *, asection *, bfd_byte *));
+extern boolean _bfd_elf_write_section_eh_frame_hdr
+ PARAMS ((bfd *, asection *));
+extern boolean _bfd_elf_maybe_strip_eh_frame_hdr
+ PARAMS ((struct bfd_link_info *));
+
+extern boolean _bfd_elf_link_record_dynamic_symbol
+ PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
+extern long _bfd_elf_link_lookup_local_dynindx
+ PARAMS ((struct bfd_link_info *, bfd *, long));
+extern boolean _bfd_elf_compute_section_file_positions
+ PARAMS ((bfd *, struct bfd_link_info *));
+extern void _bfd_elf_assign_file_positions_for_relocs
+ PARAMS ((bfd *));
+extern file_ptr _bfd_elf_assign_file_position_for_section
+ PARAMS ((Elf_Internal_Shdr *, file_ptr, boolean));
+
+extern boolean _bfd_elf_validate_reloc
+ PARAMS ((bfd *, arelent *));
+
+extern boolean _bfd_elf_create_dynamic_sections
+ PARAMS ((bfd *, struct bfd_link_info *));
+extern boolean _bfd_elf_create_got_section
+ PARAMS ((bfd *, struct bfd_link_info *));
+extern unsigned long _bfd_elf_link_renumber_dynsyms
+ PARAMS ((bfd *, struct bfd_link_info *));
+
+extern boolean _bfd_elfcore_make_pseudosection
+ PARAMS ((bfd *, char *, size_t, ufile_ptr));
+extern char *_bfd_elfcore_strndup
+ PARAMS ((bfd *, char *, size_t));
+
+extern elf_linker_section_t *_bfd_elf_create_linker_section
+ PARAMS ((bfd *, struct bfd_link_info *, enum elf_linker_section_enum,
+ elf_linker_section_t *));
+
+extern elf_linker_section_pointers_t *_bfd_elf_find_pointer_linker_section
+ PARAMS ((elf_linker_section_pointers_t *, bfd_vma,
+ elf_linker_section_enum_t));
+
+extern boolean bfd_elf32_create_pointer_linker_section
+ PARAMS ((bfd *, struct bfd_link_info *, elf_linker_section_t *,
+ struct elf_link_hash_entry *, const Elf32_Internal_Rela *));
+
+extern bfd_vma bfd_elf32_finish_pointer_linker_section
+ PARAMS ((bfd *, bfd *, struct bfd_link_info *, elf_linker_section_t *,
+ struct elf_link_hash_entry *, bfd_vma,
+ const Elf32_Internal_Rela *, int));
+
+extern boolean bfd_elf64_create_pointer_linker_section
+ PARAMS ((bfd *, struct bfd_link_info *, elf_linker_section_t *,
+ struct elf_link_hash_entry *, const Elf64_Internal_Rela *));
+
+extern bfd_vma bfd_elf64_finish_pointer_linker_section
+ PARAMS ((bfd *, bfd *, struct bfd_link_info *, elf_linker_section_t *,
+ struct elf_link_hash_entry *, bfd_vma,
+ const Elf64_Internal_Rela *, int));
+
+extern boolean _bfd_elf_make_linker_section_rela
+ PARAMS ((bfd *, elf_linker_section_t *, 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 *));
+extern int bfd_elf32_core_file_failing_signal
+ PARAMS ((bfd *));
+extern boolean bfd_elf32_core_file_matches_executable_p
+ PARAMS ((bfd *, bfd *));
extern boolean bfd_elf32_bfd_link_add_symbols
PARAMS ((bfd *, struct bfd_link_info *));
@@ -1147,9 +1385,10 @@ extern boolean bfd_elf32_bfd_final_link
PARAMS ((bfd *, struct bfd_link_info *));
extern void bfd_elf32_swap_symbol_in
- PARAMS ((bfd *, const Elf32_External_Sym *, Elf_Internal_Sym *));
+ PARAMS ((bfd *, const Elf32_External_Sym *, const Elf_External_Sym_Shndx *,
+ Elf_Internal_Sym *));
extern void bfd_elf32_swap_symbol_out
- PARAMS ((bfd *, const Elf_Internal_Sym *, PTR));
+ PARAMS ((bfd *, const Elf_Internal_Sym *, PTR, PTR));
extern void bfd_elf32_swap_reloc_in
PARAMS ((bfd *, const Elf32_External_Rel *, Elf_Internal_Rel *));
extern void bfd_elf32_swap_reloc_out
@@ -1168,9 +1407,10 @@ extern void bfd_elf32_swap_dyn_out
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 *));
+extern boolean bfd_elf32_write_shdrs_and_ehdr
+ PARAMS ((bfd *));
extern int bfd_elf32_write_out_phdrs
- PARAMS ((bfd *, const Elf_Internal_Phdr *, int));
+ PARAMS ((bfd *, const Elf_Internal_Phdr *, unsigned int));
extern void bfd_elf32_write_relocs
PARAMS ((bfd *, asection *, PTR));
extern boolean bfd_elf32_slurp_reloc_table
@@ -1182,21 +1422,26 @@ extern boolean bfd_elf32_link_create_dynamic_sections
extern Elf_Internal_Rela *_bfd_elf32_link_read_relocs
PARAMS ((bfd *, asection *, PTR, Elf_Internal_Rela *, boolean));
-extern const bfd_target *bfd_elf64_object_p PARAMS ((bfd *));
-extern const bfd_target *bfd_elf64_core_file_p PARAMS ((bfd *));
-extern char *bfd_elf64_core_file_failing_command PARAMS ((bfd *));
-extern int bfd_elf64_core_file_failing_signal PARAMS ((bfd *));
-extern boolean bfd_elf64_core_file_matches_executable_p PARAMS ((bfd *,
- bfd *));
+extern const bfd_target *bfd_elf64_object_p
+ PARAMS ((bfd *));
+extern const bfd_target *bfd_elf64_core_file_p
+ PARAMS ((bfd *));
+extern char *bfd_elf64_core_file_failing_command
+ PARAMS ((bfd *));
+extern int bfd_elf64_core_file_failing_signal
+ PARAMS ((bfd *));
+extern boolean bfd_elf64_core_file_matches_executable_p
+ PARAMS ((bfd *, bfd *));
extern boolean bfd_elf64_bfd_link_add_symbols
PARAMS ((bfd *, struct bfd_link_info *));
extern boolean bfd_elf64_bfd_final_link
PARAMS ((bfd *, struct bfd_link_info *));
extern void bfd_elf64_swap_symbol_in
- PARAMS ((bfd *, const Elf64_External_Sym *, Elf_Internal_Sym *));
+ PARAMS ((bfd *, const Elf64_External_Sym *, const Elf_External_Sym_Shndx *,
+ Elf_Internal_Sym *));
extern void bfd_elf64_swap_symbol_out
- PARAMS ((bfd *, const Elf_Internal_Sym *, PTR));
+ PARAMS ((bfd *, const Elf_Internal_Sym *, PTR, PTR));
extern void bfd_elf64_swap_reloc_in
PARAMS ((bfd *, const Elf64_External_Rel *, Elf_Internal_Rel *));
extern void bfd_elf64_swap_reloc_out
@@ -1215,9 +1460,10 @@ extern void bfd_elf64_swap_dyn_out
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 *));
+extern boolean bfd_elf64_write_shdrs_and_ehdr
+ PARAMS ((bfd *));
extern int bfd_elf64_write_out_phdrs
- PARAMS ((bfd *, const Elf_Internal_Phdr *, int));
+ PARAMS ((bfd *, const Elf_Internal_Phdr *, unsigned int));
extern void bfd_elf64_write_relocs
PARAMS ((bfd *, asection *, PTR));
extern boolean bfd_elf64_slurp_reloc_table
@@ -1234,53 +1480,76 @@ extern Elf_Internal_Rela *_bfd_elf64_link_read_relocs
#define bfd_elf64_link_record_dynamic_symbol \
_bfd_elf_link_record_dynamic_symbol
-boolean _bfd_elf32_link_record_local_dynamic_symbol
+extern boolean _bfd_elf32_link_record_local_dynamic_symbol
PARAMS ((struct bfd_link_info *, bfd *, long));
-boolean _bfd_elf64_link_record_local_dynamic_symbol
+extern 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 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
+extern boolean _bfd_elf32_gc_sections
+ PARAMS ((bfd *, struct bfd_link_info *));
+extern boolean _bfd_elf32_gc_common_finalize_got_offsets
+ PARAMS ((bfd *, struct bfd_link_info *));
+extern boolean _bfd_elf32_gc_common_final_link
PARAMS ((bfd *, struct bfd_link_info *));
-boolean _bfd_elf32_gc_record_vtinherit
+extern boolean _bfd_elf32_gc_record_vtinherit
PARAMS ((bfd *, asection *, struct elf_link_hash_entry *, bfd_vma));
-boolean _bfd_elf32_gc_record_vtentry
+extern 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
+extern boolean _bfd_elf64_gc_sections
+ PARAMS ((bfd *, struct bfd_link_info *));
+extern boolean _bfd_elf64_gc_common_finalize_got_offsets
+ PARAMS ((bfd *, struct bfd_link_info *));
+extern boolean _bfd_elf64_gc_common_final_link
PARAMS ((bfd *, struct bfd_link_info *));
-boolean _bfd_elf64_gc_record_vtinherit
+extern boolean _bfd_elf64_gc_record_vtinherit
PARAMS ((bfd *, asection *, struct elf_link_hash_entry *, bfd_vma));
-boolean _bfd_elf64_gc_record_vtentry
+extern boolean _bfd_elf64_gc_record_vtentry
PARAMS ((bfd *, asection *, struct elf_link_hash_entry *, bfd_vma));
+extern boolean _bfd_elf32_reloc_symbol_deleted_p
+ PARAMS ((bfd_vma, PTR));
+extern boolean _bfd_elf64_reloc_symbol_deleted_p
+ PARAMS ((bfd_vma, PTR));
+
+/* Exported interface for writing elf corefile notes. */
+extern char *elfcore_write_note
+ PARAMS ((bfd *, char *, int *, char *, int, void *, int));
+extern char *elfcore_write_prpsinfo
+ PARAMS ((bfd *, char *, int *, char *, char *));
+extern char *elfcore_write_prstatus
+ PARAMS ((bfd *, char *, int *, long, int, void *));
+extern char * elfcore_write_pstatus
+ PARAMS ((bfd *, char *, int *, long, int, void *));
+extern char *elfcore_write_prfpreg
+ PARAMS ((bfd *, char *, int *, void *, int));
+extern char *elfcore_write_prxfpreg
+ PARAMS ((bfd *, char *, int *, void *, int));
+
/* MIPS ELF specific routines. */
-extern boolean _bfd_mips_elf_object_p PARAMS ((bfd *));
+extern boolean _bfd_mips_elf_object_p
+ PARAMS ((bfd *));
extern boolean _bfd_mips_elf_section_from_shdr
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
- PARAMS ((bfd *, Elf_Internal_Shdr *, asection *, int *));
+ PARAMS ((bfd *, asection *, int *));
extern boolean _bfd_mips_elf_section_processing
PARAMS ((bfd *, Elf_Internal_Shdr *));
-extern void _bfd_mips_elf_symbol_processing PARAMS ((bfd *, asymbol *));
+extern void _bfd_mips_elf_symbol_processing
+ PARAMS ((bfd *, asymbol *));
extern boolean _bfd_mips_elf_read_ecoff_info
PARAMS ((bfd *, asection *, struct ecoff_debug_info *));
-extern void _bfd_mips_elf_final_write_processing PARAMS ((bfd *, boolean));
+extern void _bfd_mips_elf_final_write_processing
+ PARAMS ((bfd *, boolean));
extern bfd_reloc_status_type _bfd_mips_elf_hi16_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
extern bfd_reloc_status_type _bfd_mips_elf_lo16_reloc
@@ -1291,9 +1560,10 @@ extern bfd_reloc_status_type _bfd_mips_elf_got16_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
extern bfd_reloc_status_type _bfd_mips_elf_gprel32_reloc
PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
-extern boolean _bfd_mips_elf_set_private_flags PARAMS ((bfd *, flagword));
-extern boolean _bfd_mips_elf_copy_private_bfd_data PARAMS ((bfd *, bfd *));
-extern boolean _bfd_mips_elf_merge_private_bfd_data PARAMS ((bfd *, bfd *));
+extern boolean _bfd_mips_elf_set_private_flags
+ PARAMS ((bfd *, flagword));
+extern boolean _bfd_mips_elf_merge_private_bfd_data
+ PARAMS ((bfd *, bfd *));
extern boolean _bfd_mips_elf_find_nearest_line
PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
const char **, unsigned int *));
@@ -1333,14 +1603,17 @@ extern boolean _bfd_mips_elf_link_output_symbol_hook
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 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 *));
+extern boolean _sh_elf_set_mach_from_flags
+ PARAMS ((bfd *));
#endif /* _LIBELF_H_ */
diff --git a/contrib/binutils/bfd/elf-eh-frame.c b/contrib/binutils/bfd/elf-eh-frame.c
new file mode 100644
index 0000000..b479c00
--- /dev/null
+++ b/contrib/binutils/bfd/elf-eh-frame.c
@@ -0,0 +1,1212 @@
+/* .eh_frame section optimization.
+ Copyright 2001, 2002 Free Software Foundation, Inc.
+ Written by Jakub Jelinek <jakub@redhat.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. */
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "libbfd.h"
+#include "elf-bfd.h"
+#include "elf/dwarf2.h"
+
+#define EH_FRAME_HDR_SIZE 8
+
+struct cie_header
+{
+ unsigned int length;
+ unsigned int id;
+};
+
+struct cie
+{
+ struct cie_header hdr;
+ unsigned char version;
+ unsigned char augmentation[20];
+ unsigned int code_align;
+ int data_align;
+ unsigned int ra_column;
+ unsigned int augmentation_size;
+ struct elf_link_hash_entry *personality;
+ unsigned char per_encoding;
+ unsigned char lsda_encoding;
+ unsigned char fde_encoding;
+ unsigned char initial_insn_length;
+ unsigned char make_relative;
+ unsigned char make_lsda_relative;
+ unsigned char initial_instructions[50];
+};
+
+struct eh_cie_fde
+{
+ unsigned int offset;
+ unsigned int size;
+ asection *sec;
+ unsigned int new_offset;
+ unsigned char fde_encoding;
+ unsigned char lsda_encoding;
+ unsigned char lsda_offset;
+ unsigned char cie : 1;
+ unsigned char removed : 1;
+ unsigned char make_relative : 1;
+ unsigned char make_lsda_relative : 1;
+};
+
+struct eh_frame_sec_info
+{
+ unsigned int count;
+ unsigned int alloced;
+ struct eh_cie_fde entry[1];
+};
+
+struct eh_frame_array_ent
+{
+ bfd_vma initial_loc;
+ bfd_vma fde;
+};
+
+struct eh_frame_hdr_info
+{
+ struct cie last_cie;
+ asection *last_cie_sec;
+ unsigned int last_cie_offset;
+ unsigned int fde_count, array_count;
+ struct eh_frame_array_ent *array;
+ /* TRUE if .eh_frame_hdr should contain the sorted search table.
+ We build it if we successfully read all .eh_frame input sections
+ and recognize them. */
+ boolean table;
+ boolean strip;
+};
+
+static bfd_vma read_unsigned_leb128
+ PARAMS ((bfd *, char *, unsigned int *));
+static bfd_signed_vma read_signed_leb128
+ PARAMS ((bfd *, char *, unsigned int *));
+static int get_DW_EH_PE_width
+ PARAMS ((int, int));
+static bfd_vma read_value
+ PARAMS ((bfd *, bfd_byte *, int));
+static void write_value
+ PARAMS ((bfd *, bfd_byte *, bfd_vma, int));
+static int cie_compare
+ PARAMS ((struct cie *, struct cie *));
+static int vma_compare
+ PARAMS ((const PTR a, const PTR b));
+
+/* Helper function for reading uleb128 encoded data. */
+
+static bfd_vma
+read_unsigned_leb128 (abfd, buf, bytes_read_ptr)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ char *buf;
+ unsigned int *bytes_read_ptr;
+{
+ bfd_vma result;
+ unsigned int num_read;
+ int shift;
+ unsigned char byte;
+
+ result = 0;
+ shift = 0;
+ num_read = 0;
+ do
+ {
+ byte = bfd_get_8 (abfd, (bfd_byte *) buf);
+ buf ++;
+ num_read ++;
+ result |= (((bfd_vma) byte & 0x7f) << shift);
+ shift += 7;
+ }
+ while (byte & 0x80);
+ * bytes_read_ptr = num_read;
+ return result;
+}
+
+/* Helper function for reading sleb128 encoded data. */
+
+static bfd_signed_vma
+read_signed_leb128 (abfd, buf, bytes_read_ptr)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ char *buf;
+ unsigned int * bytes_read_ptr;
+{
+ bfd_vma result;
+ int shift;
+ int num_read;
+ unsigned char byte;
+
+ result = 0;
+ shift = 0;
+ num_read = 0;
+ do
+ {
+ byte = bfd_get_8 (abfd, (bfd_byte *) buf);
+ buf ++;
+ num_read ++;
+ result |= (((bfd_vma) byte & 0x7f) << shift);
+ shift += 7;
+ }
+ while (byte & 0x80);
+ if (byte & 0x40)
+ result |= (((bfd_vma) -1) << (shift - 7)) << 7;
+ * bytes_read_ptr = num_read;
+ return result;
+}
+
+#define read_uleb128(VAR, BUF) \
+do \
+ { \
+ (VAR) = read_unsigned_leb128 (abfd, buf, &leb128_tmp); \
+ (BUF) += leb128_tmp; \
+ } \
+while (0)
+
+#define read_sleb128(VAR, BUF) \
+do \
+ { \
+ (VAR) = read_signed_leb128 (abfd, buf, &leb128_tmp); \
+ (BUF) += leb128_tmp; \
+ } \
+while (0)
+
+/* Return 0 if either encoding is variable width, or not yet known to bfd. */
+
+static
+int get_DW_EH_PE_width (encoding, ptr_size)
+ int encoding, ptr_size;
+{
+ /* DW_EH_PE_ values of 0x60 and 0x70 weren't defined at the time .eh_frame
+ was added to bfd. */
+ if ((encoding & 0x60) == 0x60)
+ return 0;
+
+ switch (encoding & 7)
+ {
+ case DW_EH_PE_udata2: return 2;
+ case DW_EH_PE_udata4: return 4;
+ case DW_EH_PE_udata8: return 8;
+ case DW_EH_PE_absptr: return ptr_size;
+ default:
+ break;
+ }
+
+ return 0;
+}
+
+/* Read a width sized value from memory. */
+
+static bfd_vma
+read_value (abfd, buf, width)
+ bfd *abfd;
+ bfd_byte *buf;
+ int width;
+{
+ bfd_vma value;
+
+ switch (width)
+ {
+ case 2: value = bfd_get_16 (abfd, buf); break;
+ case 4: value = bfd_get_32 (abfd, buf); break;
+ case 8: value = bfd_get_64 (abfd, buf); break;
+ default: BFD_FAIL (); return 0;
+ }
+
+ return value;
+}
+
+/* Store a width sized value to memory. */
+
+static void
+write_value (abfd, buf, value, width)
+ bfd *abfd;
+ bfd_byte *buf;
+ bfd_vma value;
+ int width;
+{
+ switch (width)
+ {
+ case 2: bfd_put_16 (abfd, value, buf); break;
+ case 4: bfd_put_32 (abfd, value, buf); break;
+ case 8: bfd_put_64 (abfd, value, buf); break;
+ default: BFD_FAIL ();
+ }
+}
+
+/* Return zero if C1 and C2 CIEs can be merged. */
+
+static
+int cie_compare (c1, c2)
+ struct cie *c1, *c2;
+{
+ if (c1->hdr.length == c2->hdr.length
+ && c1->version == c2->version
+ && strcmp (c1->augmentation, c2->augmentation) == 0
+ && strcmp (c1->augmentation, "eh") != 0
+ && c1->code_align == c2->code_align
+ && c1->data_align == c2->data_align
+ && c1->ra_column == c2->ra_column
+ && c1->augmentation_size == c2->augmentation_size
+ && c1->personality == c2->personality
+ && c1->per_encoding == c2->per_encoding
+ && c1->lsda_encoding == c2->lsda_encoding
+ && c1->fde_encoding == c2->fde_encoding
+ && (c1->initial_insn_length
+ == c2->initial_insn_length)
+ && memcmp (c1->initial_instructions,
+ c2->initial_instructions,
+ c1->initial_insn_length) == 0)
+ return 0;
+
+ return 1;
+}
+
+/* This function is called for each input file before the .eh_frame
+ section is relocated. It discards duplicate CIEs and FDEs for discarded
+ functions. The function returns true iff any entries have been
+ deleted. */
+
+boolean
+_bfd_elf_discard_section_eh_frame (abfd, info, sec, ehdrsec,
+ reloc_symbol_deleted_p, cookie)
+ bfd *abfd;
+ struct bfd_link_info *info;
+ asection *sec, *ehdrsec;
+ boolean (*reloc_symbol_deleted_p) (bfd_vma, PTR);
+ struct elf_reloc_cookie *cookie;
+{
+ bfd_byte *ehbuf = NULL, *buf;
+ bfd_byte *last_cie, *last_fde;
+ struct cie_header hdr;
+ struct cie cie;
+ struct eh_frame_hdr_info *hdr_info;
+ struct eh_frame_sec_info *sec_info = NULL;
+ unsigned int leb128_tmp;
+ unsigned int cie_usage_count, last_cie_ndx, i, offset;
+ unsigned int make_relative, make_lsda_relative;
+ Elf_Internal_Rela *rel;
+ bfd_size_type new_size;
+ unsigned int ptr_size;
+
+ if (sec->_raw_size == 0)
+ {
+ /* This file does not contain .eh_frame information. */
+ return false;
+ }
+
+ if ((sec->output_section != NULL
+ && bfd_is_abs_section (sec->output_section)))
+ {
+ /* At least one of the sections is being discarded from the
+ link, so we should just ignore them. */
+ return false;
+ }
+
+ BFD_ASSERT (elf_section_data (ehdrsec)->sec_info_type
+ == ELF_INFO_TYPE_EH_FRAME_HDR);
+ hdr_info = (struct eh_frame_hdr_info *)
+ elf_section_data (ehdrsec)->sec_info;
+
+ /* Read the frame unwind information from abfd. */
+
+ ehbuf = (bfd_byte *) bfd_malloc (sec->_raw_size);
+ if (ehbuf == NULL)
+ goto free_no_table;
+
+ if (! bfd_get_section_contents (abfd, sec, ehbuf, (bfd_vma) 0,
+ sec->_raw_size))
+ goto free_no_table;
+
+ if (sec->_raw_size >= 4
+ && bfd_get_32 (abfd, ehbuf) == 0
+ && cookie->rel == cookie->relend)
+ {
+ /* Empty .eh_frame section. */
+ free (ehbuf);
+ return false;
+ }
+
+ /* If .eh_frame section size doesn't fit into int, we cannot handle
+ it (it would need to use 64-bit .eh_frame format anyway). */
+ if (sec->_raw_size != (unsigned int) sec->_raw_size)
+ goto free_no_table;
+
+ ptr_size = (elf_elfheader (abfd)->e_ident[EI_CLASS]
+ == ELFCLASS64) ? 8 : 4;
+ buf = ehbuf;
+ last_cie = NULL;
+ last_cie_ndx = 0;
+ memset (&cie, 0, sizeof (cie));
+ cie_usage_count = 0;
+ new_size = sec->_raw_size;
+ make_relative = hdr_info->last_cie.make_relative;
+ make_lsda_relative = hdr_info->last_cie.make_lsda_relative;
+ sec_info = bfd_zmalloc (sizeof (struct eh_frame_sec_info)
+ + 99 * sizeof (struct eh_cie_fde));
+ if (sec_info == NULL)
+ goto free_no_table;
+ sec_info->alloced = 100;
+
+#define ENSURE_NO_RELOCS(buf) \
+ if (cookie->rel < cookie->relend \
+ && (cookie->rel->r_offset \
+ < (bfd_size_type) ((buf) - ehbuf))) \
+ goto free_no_table
+
+#define SKIP_RELOCS(buf) \
+ while (cookie->rel < cookie->relend \
+ && (cookie->rel->r_offset \
+ < (bfd_size_type) ((buf) - ehbuf))) \
+ cookie->rel++
+
+#define GET_RELOC(buf) \
+ ((cookie->rel < cookie->relend \
+ && (cookie->rel->r_offset \
+ == (bfd_size_type) ((buf) - ehbuf))) \
+ ? cookie->rel : NULL)
+
+ for (;;)
+ {
+ unsigned char *aug;
+
+ if (sec_info->count == sec_info->alloced)
+ {
+ sec_info = bfd_realloc (sec_info,
+ sizeof (struct eh_frame_sec_info)
+ + (sec_info->alloced + 99)
+ * sizeof (struct eh_cie_fde));
+ if (sec_info == NULL)
+ goto free_no_table;
+
+ memset (&sec_info->entry[sec_info->alloced], 0,
+ 100 * sizeof (struct eh_cie_fde));
+ sec_info->alloced += 100;
+ }
+
+ last_fde = buf;
+ /* If we are at the end of the section, we still need to decide
+ on whether to output or discard last encountered CIE (if any). */
+ if ((bfd_size_type) (buf - ehbuf) == sec->_raw_size)
+ hdr.id = (unsigned int) -1;
+ else
+ {
+ if ((bfd_size_type) (buf + 4 - ehbuf) > sec->_raw_size)
+ /* No space for CIE/FDE header length. */
+ goto free_no_table;
+
+ hdr.length = bfd_get_32 (abfd, buf);
+ if (hdr.length == 0xffffffff)
+ /* 64-bit .eh_frame is not supported. */
+ goto free_no_table;
+ buf += 4;
+ if ((buf - ehbuf) + hdr.length > sec->_raw_size)
+ /* CIE/FDE not contained fully in this .eh_frame input section. */
+ goto free_no_table;
+
+ sec_info->entry[sec_info->count].offset = last_fde - ehbuf;
+ sec_info->entry[sec_info->count].size = 4 + hdr.length;
+
+ if (hdr.length == 0)
+ {
+ /* CIE with length 0 must be only the last in the section. */
+ if ((bfd_size_type) (buf - ehbuf) < sec->_raw_size)
+ goto free_no_table;
+ ENSURE_NO_RELOCS (buf);
+ sec_info->count++;
+ /* Now just finish last encountered CIE processing and break
+ the loop. */
+ hdr.id = (unsigned int) -1;
+ }
+ else
+ {
+ hdr.id = bfd_get_32 (abfd, buf);
+ buf += 4;
+ if (hdr.id == (unsigned int) -1)
+ goto free_no_table;
+ }
+ }
+
+ if (hdr.id == 0 || hdr.id == (unsigned int) -1)
+ {
+ unsigned int initial_insn_length;
+
+ /* CIE */
+ if (last_cie != NULL)
+ {
+ /* Now check if this CIE is identical to last CIE, in which case
+ we can remove it, provided we adjust all FDEs.
+ Also, it can be removed if we have removed all FDEs using
+ that. */
+ if (cie_compare (&cie, &hdr_info->last_cie) == 0
+ || cie_usage_count == 0)
+ {
+ new_size -= cie.hdr.length + 4;
+ sec_info->entry[last_cie_ndx].removed = 1;
+ sec_info->entry[last_cie_ndx].sec = hdr_info->last_cie_sec;
+ sec_info->entry[last_cie_ndx].new_offset
+ = hdr_info->last_cie_offset;
+ }
+ else
+ {
+ hdr_info->last_cie = cie;
+ hdr_info->last_cie_sec = sec;
+ hdr_info->last_cie_offset = last_cie - ehbuf;
+ sec_info->entry[last_cie_ndx].make_relative
+ = cie.make_relative;
+ sec_info->entry[last_cie_ndx].make_lsda_relative
+ = cie.make_lsda_relative;
+ }
+ }
+
+ if (hdr.id == (unsigned int) -1)
+ break;
+
+ last_cie_ndx = sec_info->count;
+ sec_info->entry[sec_info->count].cie = 1;
+
+ cie_usage_count = 0;
+ memset (&cie, 0, sizeof (cie));
+ cie.hdr = hdr;
+ cie.version = *buf++;
+
+ /* Cannot handle unknown versions. */
+ if (cie.version != 1)
+ goto free_no_table;
+ if (strlen (buf) > sizeof (cie.augmentation) - 1)
+ goto free_no_table;
+
+ strcpy (cie.augmentation, buf);
+ buf = strchr (buf, '\0') + 1;
+ ENSURE_NO_RELOCS (buf);
+ if (buf[0] == 'e' && buf[1] == 'h')
+ {
+ /* GCC < 3.0 .eh_frame CIE */
+ /* We cannot merge "eh" CIEs because __EXCEPTION_TABLE__
+ is private to each CIE, so we don't need it for anything.
+ Just skip it. */
+ buf += ptr_size;
+ SKIP_RELOCS (buf);
+ }
+ read_uleb128 (cie.code_align, buf);
+ read_sleb128 (cie.data_align, buf);
+ read_uleb128 (cie.ra_column, buf);
+ ENSURE_NO_RELOCS (buf);
+ cie.lsda_encoding = DW_EH_PE_omit;
+ cie.fde_encoding = DW_EH_PE_omit;
+ cie.per_encoding = DW_EH_PE_omit;
+ aug = cie.augmentation;
+ if (aug[0] != 'e' || aug[1] != 'h')
+ {
+ if (*aug == 'z')
+ {
+ aug++;
+ read_uleb128 (cie.augmentation_size, buf);
+ ENSURE_NO_RELOCS (buf);
+ }
+
+ while (*aug != '\0')
+ switch (*aug++)
+ {
+ case 'L':
+ cie.lsda_encoding = *buf++;
+ ENSURE_NO_RELOCS (buf);
+ if (get_DW_EH_PE_width (cie.lsda_encoding, ptr_size) == 0)
+ goto free_no_table;
+ break;
+ case 'R':
+ cie.fde_encoding = *buf++;
+ ENSURE_NO_RELOCS (buf);
+ if (get_DW_EH_PE_width (cie.fde_encoding, ptr_size) == 0)
+ goto free_no_table;
+ break;
+ case 'P':
+ {
+ int per_width;
+
+ cie.per_encoding = *buf++;
+ per_width = get_DW_EH_PE_width (cie.per_encoding,
+ ptr_size);
+ if (per_width == 0)
+ goto free_no_table;
+ if ((cie.per_encoding & 0xf0) == DW_EH_PE_aligned)
+ buf = (ehbuf
+ + ((buf - ehbuf + per_width - 1)
+ & ~((bfd_size_type) per_width - 1)));
+ ENSURE_NO_RELOCS (buf);
+ rel = GET_RELOC (buf);
+ /* Ensure we have a reloc here, against
+ a global symbol. */
+ if (rel != NULL)
+ {
+ unsigned long r_symndx;
+
+#ifdef BFD64
+ if (ptr_size == 8)
+ r_symndx = ELF64_R_SYM (cookie->rel->r_info);
+ else
+#endif
+ r_symndx = ELF32_R_SYM (cookie->rel->r_info);
+ if (r_symndx >= cookie->locsymcount)
+ {
+ struct elf_link_hash_entry *h;
+
+ r_symndx -= cookie->extsymoff;
+ h = cookie->sym_hashes[r_symndx];
+
+ 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;
+
+ cie.personality = h;
+ }
+ cookie->rel++;
+ }
+ buf += per_width;
+ }
+ break;
+ default:
+ /* Unrecognized augmentation. Better bail out. */
+ goto free_no_table;
+ }
+ }
+
+ /* For shared libraries, try to get rid of as many RELATIVE relocs
+ as possible.
+ FIXME: For this to work, ELF backends need to perform the
+ relocation if omitting dynamic relocs, not skip it. */
+ if (0
+ && info->shared
+ && (cie.fde_encoding & 0xf0) == DW_EH_PE_absptr)
+ cie.make_relative = 1;
+
+ if (0
+ && info->shared
+ && (cie.lsda_encoding & 0xf0) == DW_EH_PE_absptr)
+ cie.make_lsda_relative = 1;
+
+ /* If FDE encoding was not specified, it defaults to
+ DW_EH_absptr. */
+ if (cie.fde_encoding == DW_EH_PE_omit)
+ cie.fde_encoding = DW_EH_PE_absptr;
+
+ initial_insn_length = cie.hdr.length - (buf - last_fde - 4);
+ if (initial_insn_length <= 50)
+ {
+ cie.initial_insn_length = initial_insn_length;
+ memcpy (cie.initial_instructions, buf, initial_insn_length);
+ }
+ buf += initial_insn_length;
+ ENSURE_NO_RELOCS (buf);
+ last_cie = last_fde;
+ }
+ else
+ {
+ /* Ensure this FDE uses the last CIE encountered. */
+ if (last_cie == NULL
+ || hdr.id != (unsigned int) (buf - 4 - last_cie))
+ goto free_no_table;
+
+ ENSURE_NO_RELOCS (buf);
+ rel = GET_RELOC (buf);
+ if (rel == NULL)
+ /* This should not happen. */
+ goto free_no_table;
+ if ((*reloc_symbol_deleted_p) (buf - ehbuf, cookie))
+ {
+ cookie->rel = rel;
+ /* This is a FDE against discarded section, it should
+ be deleted. */
+ new_size -= hdr.length + 4;
+ sec_info->entry[sec_info->count].removed = 1;
+ }
+ else
+ {
+ cie_usage_count++;
+ hdr_info->fde_count++;
+ }
+ cookie->rel = rel;
+ if (cie.lsda_encoding != DW_EH_PE_omit)
+ {
+ unsigned int dummy;
+
+ aug = buf;
+ buf += 2 * get_DW_EH_PE_width (cie.fde_encoding, ptr_size);
+ if (cie.augmentation[0] == 'z')
+ read_uleb128 (dummy, buf);
+ /* If some new augmentation data is added before LSDA
+ in FDE augmentation area, this need to be adjusted. */
+ sec_info->entry[sec_info->count].lsda_offset = (buf - aug);
+ }
+ buf = last_fde + 4 + hdr.length;
+ SKIP_RELOCS (buf);
+ }
+
+ sec_info->entry[sec_info->count].fde_encoding = cie.fde_encoding;
+ sec_info->entry[sec_info->count].lsda_encoding = cie.lsda_encoding;
+ sec_info->count++;
+ }
+
+ elf_section_data (sec)->sec_info = sec_info;
+ elf_section_data (sec)->sec_info_type = ELF_INFO_TYPE_EH_FRAME;
+
+ /* Ok, now we can assign new offsets. */
+ offset = 0;
+ last_cie_ndx = 0;
+ for (i = 0; i < sec_info->count; i++)
+ {
+ if (! sec_info->entry[i].removed)
+ {
+ sec_info->entry[i].new_offset = offset;
+ offset += sec_info->entry[i].size;
+ if (sec_info->entry[i].cie)
+ {
+ last_cie_ndx = i;
+ make_relative = sec_info->entry[i].make_relative;
+ make_lsda_relative = sec_info->entry[i].make_lsda_relative;
+ }
+ else
+ {
+ sec_info->entry[i].make_relative = make_relative;
+ sec_info->entry[i].make_lsda_relative = make_lsda_relative;
+ }
+ }
+ else if (sec_info->entry[i].cie && sec_info->entry[i].sec == sec)
+ {
+ /* Need to adjust new_offset too. */
+ BFD_ASSERT (sec_info->entry[last_cie_ndx].offset
+ == sec_info->entry[i].new_offset);
+ sec_info->entry[i].new_offset
+ = sec_info->entry[last_cie_ndx].new_offset;
+ }
+ }
+ if (hdr_info->last_cie_sec == sec)
+ {
+ BFD_ASSERT (sec_info->entry[last_cie_ndx].offset
+ == hdr_info->last_cie_offset);
+ hdr_info->last_cie_offset = sec_info->entry[last_cie_ndx].new_offset;
+ }
+
+ /* FIXME: Currently it is not possible to shrink sections to zero size at
+ this point, so build a fake minimal CIE. */
+ if (new_size == 0)
+ new_size = 16;
+
+ /* Shrink the sec as needed. */
+ sec->_cooked_size = new_size;
+ if (sec->_cooked_size == 0)
+ sec->flags |= SEC_EXCLUDE;
+
+ free (ehbuf);
+ return new_size != sec->_raw_size;
+
+free_no_table:
+ if (ehbuf)
+ free (ehbuf);
+ if (sec_info)
+ free (sec_info);
+ hdr_info->table = false;
+ hdr_info->last_cie.hdr.length = 0;
+ return false;
+}
+
+/* This function is called for .eh_frame_hdr section after
+ _bfd_elf_discard_section_eh_frame has been called on all .eh_frame
+ input sections. It finalizes the size of .eh_frame_hdr section. */
+
+boolean
+_bfd_elf_discard_section_eh_frame_hdr (abfd, info, sec)
+ bfd *abfd;
+ struct bfd_link_info *info;
+ asection *sec;
+{
+ struct eh_frame_hdr_info *hdr_info;
+ unsigned int ptr_size;
+
+ ptr_size = (elf_elfheader (abfd)->e_ident[EI_CLASS]
+ == ELFCLASS64) ? 8 : 4;
+
+ if ((elf_section_data (sec)->sec_info_type
+ != ELF_INFO_TYPE_EH_FRAME_HDR)
+ || ! info->eh_frame_hdr)
+ {
+ _bfd_strip_section_from_output (info, sec);
+ return false;
+ }
+
+ hdr_info = (struct eh_frame_hdr_info *)
+ elf_section_data (sec)->sec_info;
+ if (hdr_info->strip)
+ return false;
+ sec->_cooked_size = EH_FRAME_HDR_SIZE;
+ if (hdr_info->table)
+ sec->_cooked_size += 4 + hdr_info->fde_count * 8;
+
+ /* Request program headers to be recalculated. */
+ elf_tdata (abfd)->program_header_size = 0;
+ elf_tdata (abfd)->eh_frame_hdr = true;
+ return true;
+}
+
+/* This function is called from size_dynamic_sections.
+ It needs to decide whether .eh_frame_hdr should be output or not,
+ because later on it is too late for calling _bfd_strip_section_from_output,
+ since dynamic symbol table has been sized. */
+
+boolean
+_bfd_elf_maybe_strip_eh_frame_hdr (info)
+ struct bfd_link_info *info;
+{
+ asection *sec, *o;
+ bfd *abfd;
+ struct eh_frame_hdr_info *hdr_info;
+
+ sec = bfd_get_section_by_name (elf_hash_table (info)->dynobj, ".eh_frame_hdr");
+ if (sec == NULL)
+ return true;
+
+ hdr_info
+ = bfd_zmalloc (sizeof (struct eh_frame_hdr_info));
+ if (hdr_info == NULL)
+ return false;
+
+ elf_section_data (sec)->sec_info = hdr_info;
+ elf_section_data (sec)->sec_info_type = ELF_INFO_TYPE_EH_FRAME_HDR;
+
+ abfd = NULL;
+ if (info->eh_frame_hdr)
+ for (abfd = info->input_bfds; abfd != NULL; abfd = abfd->link_next)
+ {
+ /* Count only sections which have at least a single CIE or FDE.
+ There cannot be any CIE or FDE <= 8 bytes. */
+ o = bfd_get_section_by_name (abfd, ".eh_frame");
+ if (o && o->_raw_size > 8)
+ break;
+ }
+
+ if (abfd == NULL)
+ {
+ _bfd_strip_section_from_output (info, sec);
+ hdr_info->strip = true;
+ }
+ else
+ hdr_info->table = true;
+ return true;
+}
+
+/* Adjust an address in the .eh_frame section. Given OFFSET within
+ SEC, this returns the new offset in the adjusted .eh_frame section,
+ or -1 if the address refers to a CIE/FDE which has been removed
+ or to offset with dynamic relocation which is no longer needed. */
+
+bfd_vma
+_bfd_elf_eh_frame_section_offset (output_bfd, sec, offset)
+ bfd *output_bfd ATTRIBUTE_UNUSED;
+ asection *sec;
+ bfd_vma offset;
+{
+ struct eh_frame_sec_info *sec_info;
+ unsigned int lo, hi, mid;
+
+ if (elf_section_data (sec)->sec_info_type != ELF_INFO_TYPE_EH_FRAME)
+ return offset;
+ sec_info = (struct eh_frame_sec_info *)
+ elf_section_data (sec)->sec_info;
+
+ if (offset >= sec->_raw_size)
+ return offset - (sec->_cooked_size - sec->_raw_size);
+
+ lo = 0;
+ hi = sec_info->count;
+ mid = 0;
+ while (lo < hi)
+ {
+ mid = (lo + hi) / 2;
+ if (offset < sec_info->entry[mid].offset)
+ hi = mid;
+ else if (offset
+ >= sec_info->entry[mid].offset + sec_info->entry[mid].size)
+ lo = mid + 1;
+ else
+ break;
+ }
+
+ BFD_ASSERT (lo < hi);
+
+ /* FDE or CIE was removed. */
+ if (sec_info->entry[mid].removed)
+ return (bfd_vma) -1;
+
+ /* If converting to DW_EH_PE_pcrel, there will be no need for run-time
+ relocation against FDE's initial_location field. */
+ if (sec_info->entry[mid].make_relative
+ && ! sec_info->entry[mid].cie
+ && offset == sec_info->entry[mid].offset + 8)
+ return (bfd_vma) -1;
+
+ /* If converting LSDA pointers to DW_EH_PE_pcrel, there will be no need
+ for run-time relocation against LSDA field. */
+ if (sec_info->entry[mid].make_lsda_relative
+ && ! sec_info->entry[mid].cie
+ && (offset
+ == (sec_info->entry[mid].offset + 8
+ + sec_info->entry[mid].lsda_offset)))
+ return (bfd_vma) -1;
+
+ return (offset + sec_info->entry[mid].new_offset
+ - sec_info->entry[mid].offset);
+}
+
+/* Write out .eh_frame section. This is called with the relocated
+ contents. */
+
+boolean
+_bfd_elf_write_section_eh_frame (abfd, sec, ehdrsec, contents)
+ bfd *abfd;
+ asection *sec, *ehdrsec;
+ bfd_byte *contents;
+{
+ struct eh_frame_sec_info *sec_info;
+ struct eh_frame_hdr_info *hdr_info;
+ unsigned int i;
+ bfd_byte *p, *buf;
+ unsigned int leb128_tmp;
+ unsigned int cie_offset = 0;
+ unsigned int ptr_size;
+
+ ptr_size = (elf_elfheader (sec->owner)->e_ident[EI_CLASS]
+ == ELFCLASS64) ? 8 : 4;
+
+ if (elf_section_data (sec)->sec_info_type != ELF_INFO_TYPE_EH_FRAME)
+ return bfd_set_section_contents (abfd, sec->output_section,
+ contents,
+ (file_ptr) sec->output_offset,
+ sec->_raw_size);
+ sec_info = (struct eh_frame_sec_info *)
+ elf_section_data (sec)->sec_info;
+ hdr_info = NULL;
+ if (ehdrsec
+ && (elf_section_data (ehdrsec)->sec_info_type
+ == ELF_INFO_TYPE_EH_FRAME_HDR))
+ {
+ hdr_info = (struct eh_frame_hdr_info *)
+ elf_section_data (ehdrsec)->sec_info;
+ if (hdr_info->table && hdr_info->array == NULL)
+ hdr_info->array
+ = bfd_malloc (hdr_info->fde_count * sizeof(*hdr_info->array));
+ if (hdr_info->array == NULL)
+ hdr_info = NULL;
+ }
+
+ p = contents;
+ for (i = 0; i < sec_info->count; ++i)
+ {
+ if (sec_info->entry[i].removed)
+ {
+ if (sec_info->entry[i].cie)
+ {
+ /* If CIE is removed due to no remaining FDEs referencing it
+ and there were no CIEs kept before it, sec_info->entry[i].sec
+ will be zero. */
+ if (sec_info->entry[i].sec == NULL)
+ cie_offset = 0;
+ else
+ {
+ cie_offset = sec_info->entry[i].new_offset;
+ cie_offset += (sec_info->entry[i].sec->output_section->vma
+ + sec_info->entry[i].sec->output_offset
+ - sec->output_section->vma
+ - sec->output_offset);
+ }
+ }
+ continue;
+ }
+
+ if (sec_info->entry[i].cie)
+ {
+ /* CIE */
+ cie_offset = sec_info->entry[i].new_offset;
+ if (sec_info->entry[i].make_relative
+ || sec_info->entry[i].make_lsda_relative)
+ {
+ unsigned char *aug;
+ unsigned int action;
+ unsigned int dummy, per_width, per_encoding;
+
+ /* Need to find 'R' or 'L' augmentation's argument and modify
+ DW_EH_PE_* value. */
+ action = (sec_info->entry[i].make_relative ? 1 : 0)
+ | (sec_info->entry[i].make_lsda_relative ? 2 : 0);
+ buf = contents + sec_info->entry[i].offset;
+ /* Skip length, id and version. */
+ buf += 9;
+ aug = buf;
+ buf = strchr (buf, '\0') + 1;
+ read_uleb128 (dummy, buf);
+ read_sleb128 (dummy, buf);
+ read_uleb128 (dummy, buf);
+ if (*aug == 'z')
+ {
+ read_uleb128 (dummy, buf);
+ aug++;
+ }
+
+ while (action)
+ switch (*aug++)
+ {
+ case 'L':
+ if (action & 2)
+ {
+ BFD_ASSERT (*buf == sec_info->entry[i].lsda_encoding);
+ *buf |= DW_EH_PE_pcrel;
+ action &= ~2;
+ }
+ buf++;
+ break;
+ case 'P':
+ per_encoding = *buf++;
+ per_width = get_DW_EH_PE_width (per_encoding,
+ ptr_size);
+ BFD_ASSERT (per_width != 0);
+ if ((per_encoding & 0xf0) == DW_EH_PE_aligned)
+ buf = (contents
+ + ((buf - contents + per_width - 1)
+ & ~((bfd_size_type) per_width - 1)));
+ buf += per_width;
+ break;
+ case 'R':
+ if (action & 1)
+ {
+ BFD_ASSERT (*buf == sec_info->entry[i].fde_encoding);
+ *buf |= DW_EH_PE_pcrel;
+ action &= ~1;
+ }
+ buf++;
+ break;
+ default:
+ BFD_FAIL ();
+ }
+ }
+ }
+ else
+ {
+ /* FDE */
+ bfd_vma value = 0, address;
+ unsigned int width;
+
+ buf = contents + sec_info->entry[i].offset;
+ /* Skip length. */
+ buf += 4;
+ bfd_put_32 (abfd,
+ sec_info->entry[i].new_offset + 4 - cie_offset, buf);
+ buf += 4;
+ width = get_DW_EH_PE_width (sec_info->entry[i].fde_encoding,
+ ptr_size);
+ address = value = read_value (abfd, buf, width);
+ if (value)
+ {
+ switch (sec_info->entry[i].fde_encoding & 0xf0)
+ {
+ case DW_EH_PE_indirect:
+ case DW_EH_PE_textrel:
+ BFD_ASSERT (hdr_info == NULL);
+ break;
+ case DW_EH_PE_datarel:
+ {
+ asection *got = bfd_get_section_by_name (abfd, ".got");
+
+ BFD_ASSERT (got != NULL);
+ address += got->vma;
+ }
+ break;
+ case DW_EH_PE_pcrel:
+ value += (sec_info->entry[i].offset
+ - sec_info->entry[i].new_offset);
+ address += (sec->output_section->vma + sec->output_offset
+ + sec_info->entry[i].offset + 8);
+ break;
+ }
+ if (sec_info->entry[i].make_relative)
+ value -= (sec->output_section->vma + sec->output_offset
+ + sec_info->entry[i].new_offset + 8);
+ write_value (abfd, buf, value, width);
+ }
+
+ if (hdr_info)
+ {
+ hdr_info->array[hdr_info->array_count].initial_loc = address;
+ hdr_info->array[hdr_info->array_count++].fde
+ = (sec->output_section->vma + sec->output_offset
+ + sec_info->entry[i].new_offset);
+ }
+
+ if ((sec_info->entry[i].lsda_encoding & 0xf0) == DW_EH_PE_pcrel
+ || sec_info->entry[i].make_lsda_relative)
+ {
+ buf += sec_info->entry[i].lsda_offset;
+ width = get_DW_EH_PE_width (sec_info->entry[i].lsda_encoding,
+ ptr_size);
+ value = read_value (abfd, buf, width);
+ if (value)
+ {
+ if ((sec_info->entry[i].lsda_encoding & 0xf0)
+ == DW_EH_PE_pcrel)
+ value += (sec_info->entry[i].offset
+ - sec_info->entry[i].new_offset);
+ else if (sec_info->entry[i].make_lsda_relative)
+ value -= (sec->output_section->vma + sec->output_offset
+ + sec_info->entry[i].new_offset + 8
+ + sec_info->entry[i].lsda_offset);
+ write_value (abfd, buf, value, width);
+ }
+ }
+ }
+
+ BFD_ASSERT (p == contents + sec_info->entry[i].new_offset);
+ memmove (p, contents + sec_info->entry[i].offset,
+ sec_info->entry[i].size);
+ p += sec_info->entry[i].size;
+ }
+
+ /* FIXME: Once _bfd_elf_discard_section_eh_frame will be able to
+ shrink sections to zero size, this won't be needed any more. */
+ if (p == contents && sec->_cooked_size == 16)
+ {
+ bfd_put_32 (abfd, 12, p); /* Fake CIE length */
+ bfd_put_32 (abfd, 0, p + 4); /* Fake CIE id */
+ p[8] = 1; /* Fake CIE version */
+ memset (p + 9, 0, 7); /* Fake CIE augmentation, 3xleb128
+ and 3xDW_CFA_nop as pad */
+ p += 16;
+ }
+
+ BFD_ASSERT ((bfd_size_type) (p - contents) == sec->_cooked_size);
+
+ return bfd_set_section_contents (abfd, sec->output_section,
+ contents, (file_ptr) sec->output_offset,
+ sec->_cooked_size);
+}
+
+/* Helper function used to sort .eh_frame_hdr search table by increasing
+ VMA of FDE initial location. */
+
+static int
+vma_compare (a, b)
+ const PTR a;
+ const PTR b;
+{
+ struct eh_frame_array_ent *p = (struct eh_frame_array_ent *) a;
+ struct eh_frame_array_ent *q = (struct eh_frame_array_ent *) b;
+ if (p->initial_loc > q->initial_loc)
+ return 1;
+ if (p->initial_loc < q->initial_loc)
+ return -1;
+ return 0;
+}
+
+/* Write out .eh_frame_hdr section. This must be called after
+ _bfd_elf_write_section_eh_frame has been called on all input
+ .eh_frame sections.
+ .eh_frame_hdr format:
+ ubyte version (currently 1)
+ ubyte eh_frame_ptr_enc (DW_EH_PE_* encoding of pointer to start of
+ .eh_frame section)
+ ubyte fde_count_enc (DW_EH_PE_* encoding of total FDE count
+ number (or DW_EH_PE_omit if there is no
+ binary search table computed))
+ ubyte table_enc (DW_EH_PE_* encoding of binary search table,
+ or DW_EH_PE_omit if not present.
+ DW_EH_PE_datarel is using address of
+ .eh_frame_hdr section start as base)
+ [encoded] eh_frame_ptr (pointer to start of .eh_frame section)
+ optionally followed by:
+ [encoded] fde_count (total number of FDEs in .eh_frame section)
+ fde_count x [encoded] initial_loc, fde
+ (array of encoded pairs containing
+ FDE initial_location field and FDE address,
+ sorted by increasing initial_loc) */
+
+boolean
+_bfd_elf_write_section_eh_frame_hdr (abfd, sec)
+ bfd *abfd;
+ asection *sec;
+{
+ struct eh_frame_hdr_info *hdr_info;
+ unsigned int ptr_size;
+ bfd_byte *contents;
+ asection *eh_frame_sec;
+ bfd_size_type size;
+
+ ptr_size = (elf_elfheader (sec->owner)->e_ident[EI_CLASS]
+ == ELFCLASS64) ? 8 : 4;
+
+ BFD_ASSERT (elf_section_data (sec)->sec_info_type
+ == ELF_INFO_TYPE_EH_FRAME_HDR);
+ hdr_info = (struct eh_frame_hdr_info *)
+ elf_section_data (sec)->sec_info;
+ if (hdr_info->strip)
+ return true;
+
+ size = EH_FRAME_HDR_SIZE;
+ if (hdr_info->array && hdr_info->array_count == hdr_info->fde_count)
+ size += 4 + hdr_info->fde_count * 8;
+ contents = bfd_malloc (size);
+ if (contents == NULL)
+ return false;
+
+ eh_frame_sec = bfd_get_section_by_name (abfd, ".eh_frame");
+ if (eh_frame_sec == NULL)
+ return false;
+
+ memset (contents, 0, EH_FRAME_HDR_SIZE);
+ contents[0] = 1; /* Version */
+ contents[1] = DW_EH_PE_pcrel | DW_EH_PE_sdata4; /* .eh_frame offset */
+ if (hdr_info->array && hdr_info->array_count == hdr_info->fde_count)
+ {
+ contents[2] = DW_EH_PE_udata4; /* FDE count encoding */
+ contents[3] = DW_EH_PE_datarel | DW_EH_PE_sdata4; /* search table enc */
+ }
+ else
+ {
+ contents[2] = DW_EH_PE_omit;
+ contents[3] = DW_EH_PE_omit;
+ }
+ bfd_put_32 (abfd, eh_frame_sec->vma - sec->output_section->vma - 4,
+ contents + 4);
+ if (contents[2] != DW_EH_PE_omit)
+ {
+ unsigned int i;
+
+ bfd_put_32 (abfd, hdr_info->fde_count, contents + EH_FRAME_HDR_SIZE);
+ qsort (hdr_info->array, hdr_info->fde_count, sizeof (*hdr_info->array),
+ vma_compare);
+ for (i = 0; i < hdr_info->fde_count; i++)
+ {
+ bfd_put_32 (abfd,
+ hdr_info->array[i].initial_loc
+ - sec->output_section->vma,
+ contents + EH_FRAME_HDR_SIZE + i * 8 + 4);
+ bfd_put_32 (abfd,
+ hdr_info->array[i].fde - sec->output_section->vma,
+ contents + EH_FRAME_HDR_SIZE + i * 8 + 8);
+ }
+ }
+
+ return bfd_set_section_contents (abfd, sec->output_section,
+ contents, (file_ptr) sec->output_offset,
+ sec->_cooked_size);
+}
diff --git a/contrib/binutils/bfd/elf-strtab.c b/contrib/binutils/bfd/elf-strtab.c
new file mode 100644
index 0000000..ff7d9a4
--- /dev/null
+++ b/contrib/binutils/bfd/elf-strtab.c
@@ -0,0 +1,449 @@
+/* ELF strtab with GC and suffix merging support.
+ Copyright 2001 Free Software Foundation, Inc.
+ Written by Jakub Jelinek <jakub@redhat.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. */
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "libbfd.h"
+#include "elf-bfd.h"
+#include "hashtab.h"
+
+/* An entry in the strtab hash table. */
+
+struct elf_strtab_hash_entry
+{
+ struct bfd_hash_entry root;
+ /* Length of this entry. */
+ unsigned int len;
+ unsigned int refcount;
+ union {
+ /* Index within the merged section. */
+ bfd_size_type index;
+ /* Entry this is a suffix of (if len is 0). */
+ struct elf_strtab_hash_entry *suffix;
+ struct elf_strtab_hash_entry *next;
+ } u;
+};
+
+/* The strtab hash table. */
+
+struct elf_strtab_hash
+{
+ struct bfd_hash_table table;
+ /* Next available index. */
+ bfd_size_type size;
+ /* Number of array entries alloced. */
+ bfd_size_type alloced;
+ /* Final strtab size. */
+ bfd_size_type sec_size;
+ /* Array of pointers to strtab entries. */
+ struct elf_strtab_hash_entry **array;
+};
+
+static struct bfd_hash_entry *elf_strtab_hash_newfunc
+ PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
+static int cmplengthentry PARAMS ((const PTR, const PTR));
+static int last4_eq PARAMS ((const PTR, const PTR));
+
+/* Routine to create an entry in a section merge hashtab. */
+
+static struct bfd_hash_entry *
+elf_strtab_hash_newfunc (entry, table, string)
+ struct bfd_hash_entry *entry;
+ struct bfd_hash_table *table;
+ const char *string;
+{
+ struct elf_strtab_hash_entry *ret = (struct elf_strtab_hash_entry *) entry;
+
+ /* Allocate the structure if it has not already been allocated by a
+ subclass. */
+ if (ret == (struct elf_strtab_hash_entry *) NULL)
+ ret = ((struct elf_strtab_hash_entry *)
+ bfd_hash_allocate (table, sizeof (struct elf_strtab_hash_entry)));
+ if (ret == (struct elf_strtab_hash_entry *) NULL)
+ return NULL;
+
+ /* Call the allocation method of the superclass. */
+ ret = ((struct elf_strtab_hash_entry *)
+ bfd_hash_newfunc ((struct bfd_hash_entry *) ret, table, string));
+
+ if (ret)
+ {
+ /* Initialize the local fields. */
+ ret->u.index = -1;
+ ret->refcount = 0;
+ ret->len = 0;
+ }
+
+ return (struct bfd_hash_entry *)ret;
+}
+
+/* Create a new hash table. */
+
+struct elf_strtab_hash *
+_bfd_elf_strtab_init ()
+{
+ struct elf_strtab_hash *table;
+ bfd_size_type amt = sizeof (struct elf_strtab_hash);
+
+ table = (struct elf_strtab_hash *) bfd_malloc (amt);
+ if (table == NULL)
+ return NULL;
+
+ if (! bfd_hash_table_init (&table->table, elf_strtab_hash_newfunc))
+ {
+ free (table);
+ return NULL;
+ }
+
+ table->sec_size = 0;
+ table->size = 1;
+ table->alloced = 64;
+ amt = sizeof (struct elf_strtab_hasn_entry *);
+ table->array = (struct elf_strtab_hash_entry **)
+ bfd_malloc (table->alloced * amt);
+ if (table->array == NULL)
+ {
+ free (table);
+ return NULL;
+ }
+
+ table->array[0] = NULL;
+
+ return table;
+}
+
+/* Free a strtab. */
+
+void
+_bfd_elf_strtab_free (tab)
+ struct elf_strtab_hash *tab;
+{
+ bfd_hash_table_free (&tab->table);
+ free (tab->array);
+ free (tab);
+}
+
+/* Get the index of an entity in a hash table, adding it if it is not
+ already present. */
+
+bfd_size_type
+_bfd_elf_strtab_add (tab, str, copy)
+ struct elf_strtab_hash *tab;
+ const char *str;
+ boolean copy;
+{
+ register struct elf_strtab_hash_entry *entry;
+
+ /* We handle this specially, since we don't want to do refcounting
+ on it. */
+ if (*str == '\0')
+ return 0;
+
+ BFD_ASSERT (tab->sec_size == 0);
+ entry = (struct elf_strtab_hash_entry *)
+ bfd_hash_lookup (&tab->table, str, true, copy);
+
+ if (entry == NULL)
+ return (bfd_size_type) -1;
+
+ entry->refcount++;
+ if (entry->len == 0)
+ {
+ entry->len = strlen (str) + 1;
+ if (tab->size == tab->alloced)
+ {
+ bfd_size_type amt = sizeof (struct elf_strtab_hash_entry *);
+ tab->alloced *= 2;
+ tab->array = (struct elf_strtab_hash_entry **)
+ bfd_realloc (tab->array, tab->alloced * amt);
+ if (tab->array == NULL)
+ return (bfd_size_type) -1;
+ }
+
+ entry->u.index = tab->size++;
+ tab->array[entry->u.index] = entry;
+ }
+ return entry->u.index;
+}
+
+void
+_bfd_elf_strtab_addref (tab, idx)
+ struct elf_strtab_hash *tab;
+ bfd_size_type idx;
+{
+ if (idx == 0 || idx == (bfd_size_type) -1)
+ return;
+ BFD_ASSERT (tab->sec_size == 0);
+ BFD_ASSERT (idx < tab->size);
+ ++tab->array[idx]->refcount;
+}
+
+void
+_bfd_elf_strtab_delref (tab, idx)
+ struct elf_strtab_hash *tab;
+ bfd_size_type idx;
+{
+ if (idx == 0 || idx == (bfd_size_type) -1)
+ return;
+ BFD_ASSERT (tab->sec_size == 0);
+ BFD_ASSERT (idx < tab->size);
+ BFD_ASSERT (tab->array[idx]->refcount > 0);
+ --tab->array[idx]->refcount;
+}
+
+void
+_bfd_elf_strtab_clear_all_refs (tab)
+ struct elf_strtab_hash *tab;
+{
+ bfd_size_type idx;
+
+ for (idx = 1; idx < tab->size; ++idx)
+ tab->array[idx]->refcount = 0;
+}
+
+bfd_size_type
+_bfd_elf_strtab_size (tab)
+ struct elf_strtab_hash *tab;
+{
+ return tab->sec_size ? tab->sec_size : tab->size;
+}
+
+bfd_size_type
+_bfd_elf_strtab_offset (tab, idx)
+ struct elf_strtab_hash *tab;
+ bfd_size_type idx;
+{
+ struct elf_strtab_hash_entry *entry;
+
+ if (idx == 0)
+ return 0;
+ BFD_ASSERT (idx < tab->size);
+ BFD_ASSERT (tab->sec_size);
+ entry = tab->array[idx];
+ BFD_ASSERT (entry->refcount > 0);
+ entry->refcount--;
+ return tab->array[idx]->u.index;
+}
+
+boolean
+_bfd_elf_strtab_emit (abfd, tab)
+ register bfd *abfd;
+ struct elf_strtab_hash *tab;
+{
+ bfd_size_type off = 1, i;
+
+ if (bfd_bwrite ("", 1, abfd) != 1)
+ return false;
+
+ for (i = 1; i < tab->size; ++i)
+ {
+ register const char *str;
+ register size_t len;
+
+ str = tab->array[i]->root.string;
+ len = tab->array[i]->len;
+ BFD_ASSERT (tab->array[i]->refcount == 0);
+ if (len == 0)
+ continue;
+
+ if (bfd_bwrite ((PTR) str, (bfd_size_type) len, abfd) != len)
+ return false;
+
+ off += len;
+ }
+
+ BFD_ASSERT (off == tab->sec_size);
+ return true;
+}
+
+/* Compare two elf_strtab_hash_entry structures. This is called via qsort. */
+
+static int
+cmplengthentry (a, b)
+ const PTR a;
+ const PTR b;
+{
+ struct elf_strtab_hash_entry * A = *(struct elf_strtab_hash_entry **) a;
+ struct elf_strtab_hash_entry * B = *(struct elf_strtab_hash_entry **) b;
+
+ if (A->len < B->len)
+ return 1;
+ else if (A->len > B->len)
+ return -1;
+
+ return memcmp (A->root.string, B->root.string, A->len);
+}
+
+static int
+last4_eq (a, b)
+ const PTR a;
+ const PTR b;
+{
+ struct elf_strtab_hash_entry * A = (struct elf_strtab_hash_entry *) a;
+ struct elf_strtab_hash_entry * B = (struct elf_strtab_hash_entry *) b;
+
+ if (memcmp (A->root.string + A->len - 5, B->root.string + B->len - 5, 4)
+ != 0)
+ /* This was a hashtable collision. */
+ return 0;
+
+ if (A->len <= B->len)
+ /* B cannot be a suffix of A unless A is equal to B, which is guaranteed
+ not to be equal by the hash table. */
+ return 0;
+
+ return memcmp (A->root.string + (A->len - B->len),
+ B->root.string, B->len - 5) == 0;
+}
+
+/* This function assigns final string table offsets for used strings,
+ merging strings matching suffixes of longer strings if possible. */
+
+void
+_bfd_elf_strtab_finalize (tab)
+ struct elf_strtab_hash *tab;
+{
+ struct elf_strtab_hash_entry **array, **a, **end, *e;
+ htab_t last4tab = NULL;
+ bfd_size_type size, amt;
+ struct elf_strtab_hash_entry *last[256], **last_ptr[256];
+
+ /* GCC 2.91.66 (egcs-1.1.2) on i386 miscompiles this function when i is
+ a 64-bit bfd_size_type: a 64-bit target or --enable-64-bit-bfd.
+ Besides, indexing with a long long wouldn't give anything but extra
+ cycles. */
+ size_t i;
+
+ /* Now sort the strings by length, longest first. */
+ array = NULL;
+ amt = tab->size * sizeof (struct elf_strtab_hash_entry *);
+ array = (struct elf_strtab_hash_entry **) bfd_malloc (amt);
+ if (array == NULL)
+ goto alloc_failure;
+
+ memset (last, 0, sizeof (last));
+ for (i = 0; i < 256; ++i)
+ last_ptr[i] = &last[i];
+ for (i = 1, a = array; i < tab->size; ++i)
+ if (tab->array[i]->refcount)
+ *a++ = tab->array[i];
+ else
+ tab->array[i]->len = 0;
+
+ size = a - array;
+
+ qsort (array, size, sizeof (struct elf_strtab_hash_entry *), cmplengthentry);
+
+ last4tab = htab_create (size * 4, NULL, last4_eq, NULL);
+ if (last4tab == NULL)
+ goto alloc_failure;
+
+ /* Now insert the strings into hash tables (strings with last 4 characters
+ and strings with last character equal), look for longer strings which
+ we're suffix of. */
+ for (a = array, end = array + size; a < end; a++)
+ {
+ register hashval_t hash;
+ unsigned int c;
+ unsigned int j;
+ const unsigned char *s;
+ PTR *p;
+
+ e = *a;
+ if (e->len > 4)
+ {
+ s = e->root.string + e->len - 1;
+ hash = 0;
+ for (j = 0; j < 4; j++)
+ {
+ c = *--s;
+ hash += c + (c << 17);
+ hash ^= hash >> 2;
+ }
+ p = htab_find_slot_with_hash (last4tab, e, hash, INSERT);
+ if (p == NULL)
+ goto alloc_failure;
+ if (*p)
+ {
+ struct elf_strtab_hash_entry *ent;
+
+ ent = (struct elf_strtab_hash_entry *) *p;
+ e->u.suffix = ent;
+ e->len = 0;
+ continue;
+ }
+ else
+ *p = (PTR) e;
+ }
+ else
+ {
+ struct elf_strtab_hash_entry *tem;
+
+ c = e->root.string[e->len - 2] & 0xff;
+
+ for (tem = last[c]; tem; tem = tem->u.next)
+ if (tem->len > e->len
+ && memcmp (tem->root.string + (tem->len - e->len),
+ e->root.string, e->len - 1) == 0)
+ break;
+ if (tem)
+ {
+ e->u.suffix = tem;
+ e->len = 0;
+ continue;
+ }
+ }
+
+ c = e->root.string[e->len - 2] & 0xff;
+ /* Put longest strings first. */
+ *last_ptr[c] = e;
+ last_ptr[c] = &e->u.next;
+ e->u.next = NULL;
+ }
+
+alloc_failure:
+ if (array)
+ free (array);
+ if (last4tab)
+ htab_delete (last4tab);
+
+ /* Now assign positions to the strings we want to keep. */
+ size = 1;
+ for (i = 1; i < tab->size; ++i)
+ {
+ e = tab->array[i];
+ if (e->refcount && e->len)
+ {
+ e->u.index = size;
+ size += e->len;
+ }
+ }
+
+ tab->sec_size = size;
+
+ /* And now adjust the rest. */
+ for (i = 1; i < tab->size; ++i)
+ {
+ e = tab->array[i];
+ if (e->refcount && ! e->len)
+ e->u.index = e->u.suffix->u.index
+ + (e->u.suffix->len - strlen (e->root.string) - 1);
+ }
+}
diff --git a/contrib/binutils/bfd/elf32-arc.c b/contrib/binutils/bfd/elf32-arc.c
index 82b6104..ad7247a 100644
--- a/contrib/binutils/bfd/elf32-arc.c
+++ b/contrib/binutils/bfd/elf32-arc.c
@@ -23,6 +23,7 @@
#include "libbfd.h"
#include "elf-bfd.h"
#include "elf/arc.h"
+#include "libiberty.h"
static reloc_howto_type *bfd_elf32_bfd_reloc_type_lookup
PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));
@@ -32,6 +33,8 @@ static boolean arc_elf_object_p
PARAMS ((bfd *));
static void arc_elf_final_write_processing
PARAMS ((bfd *, boolean));
+static bfd_reloc_status_type arc_elf_b22_pcrel
+ PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
/* 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). */
@@ -50,7 +53,7 @@ static reloc_howto_type elf_arc_howto_table[] =
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARC_NONE", /* name */
- false, /* partial_inplace */
+ true, /* partial_inplace */
0, /* src_mask */
0, /* dst_mask */
false), /* pcrel_offset */
@@ -65,7 +68,7 @@ static reloc_howto_type elf_arc_howto_table[] =
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARC_32", /* name */
- false, /* partial_inplace */
+ true, /* partial_inplace */
0xffffffff, /* src_mask */
0xffffffff, /* dst_mask */
false), /* pcrel_offset */
@@ -80,7 +83,7 @@ static reloc_howto_type elf_arc_howto_table[] =
complain_overflow_bitfield, /* complain_on_overflow */
bfd_elf_generic_reloc, /* special_function */
"R_ARC_B26", /* name */
- false, /* partial_inplace */
+ true, /* partial_inplace */
0x00ffffff, /* src_mask */
0x00ffffff, /* dst_mask */
false), /* pcrel_offset */
@@ -93,13 +96,12 @@ static reloc_howto_type elf_arc_howto_table[] =
true, /* pc_relative */
7, /* bitpos */
complain_overflow_signed, /* complain_on_overflow */
- bfd_elf_generic_reloc, /* special_function */
+ arc_elf_b22_pcrel, /* special_function */
"R_ARC_B22_PCREL", /* name */
- false, /* partial_inplace */
+ true, /* partial_inplace */
0x07ffff80, /* src_mask */
0x07ffff80, /* dst_mask */
- true), /* pcrel_offset */
-
+ false), /* pcrel_offset */
};
/* Map BFD reloc types to ARC ELF reloc types. */
@@ -126,11 +128,10 @@ bfd_elf32_bfd_reloc_type_lookup (abfd, code)
{
unsigned int i;
- for (i = 0; i < sizeof (arc_reloc_map) / sizeof (struct arc_reloc_map); i++)
- {
- if (arc_reloc_map[i].bfd_reloc_val == code)
- return &elf_arc_howto_table[arc_reloc_map[i].elf_reloc_val];
- }
+ for (i = ARRAY_SIZE (arc_reloc_map); i--;)
+ if (arc_reloc_map[i].bfd_reloc_val == code)
+ return elf_arc_howto_table + arc_reloc_map[i].elf_reloc_val;
+
return NULL;
}
@@ -155,7 +156,7 @@ static boolean
arc_elf_object_p (abfd)
bfd *abfd;
{
- int mach = bfd_mach_arc_6;
+ unsigned int mach = bfd_mach_arc_6;
if (elf_elfheader(abfd)->e_machine == EM_ARC)
{
@@ -207,11 +208,34 @@ arc_elf_final_write_processing (abfd, linker)
val = E_ARC_MACH_ARC8;
break;
}
- elf_elfheader (abfd)->e_machine = EM_ARC;
elf_elfheader (abfd)->e_flags &=~ EF_ARC_MACH;
elf_elfheader (abfd)->e_flags |= val;
}
+bfd_reloc_status_type
+arc_elf_b22_pcrel (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;
+{
+ /* If linking, back up the final symbol address by the address of the
+ reloc. This cannot be accomplished by setting the pcrel_offset
+ field to true, as bfd_install_relocation will detect this and refuse
+ to install the offset in the first place, but bfd_perform_relocation
+ will still insist on removing it. */
+ if (output_bfd == (bfd *) NULL)
+ reloc_entry->addend -= reloc_entry->address;
+
+ /* Fall through to the default elf reloc handler. */
+ return bfd_elf_generic_reloc (abfd, reloc_entry, symbol, data,
+ input_section, output_bfd, error_message);
+}
+
#define TARGET_LITTLE_SYM bfd_elf32_littlearc_vec
#define TARGET_LITTLE_NAME "elf32-littlearc"
#define TARGET_BIG_SYM bfd_elf32_bigarc_vec
diff --git a/contrib/binutils/bfd/elf32-arm.h b/contrib/binutils/bfd/elf32-arm.h
index d628f1d..ab8a6b3 100644
--- a/contrib/binutils/bfd/elf32-arm.h
+++ b/contrib/binutils/bfd/elf32-arm.h
@@ -1,5 +1,5 @@
/* 32-bit ELF support for ARM
- Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -35,13 +35,13 @@ static struct bfd_link_hash_table *elf32_arm_link_hash_table_create
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 *));
+ const char *, int, 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 *));
+ 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 *));
+ 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
@@ -54,8 +54,47 @@ static int elf32_arm_to_thumb_stub
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));
+static boolean elf32_arm_relocate_section
+ PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
+ Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
+static asection * elf32_arm_gc_mark_hook
+ PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *,
+ struct elf_link_hash_entry *, Elf_Internal_Sym *));
+static boolean elf32_arm_gc_sweep_hook
+ PARAMS ((bfd *, struct bfd_link_info *, asection *,
+ const Elf_Internal_Rela *));
+static boolean elf32_arm_check_relocs
+ PARAMS ((bfd *, struct bfd_link_info *, asection *,
+ const Elf_Internal_Rela *));
+static boolean elf32_arm_find_nearest_line
+ PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
+ const char **, unsigned int *));
+static boolean elf32_arm_adjust_dynamic_symbol
+ PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
+static boolean elf32_arm_size_dynamic_sections
+ PARAMS ((bfd *, struct bfd_link_info *));
+static boolean elf32_arm_finish_dynamic_symbol
+ PARAMS ((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
+ Elf_Internal_Sym *));
+static boolean elf32_arm_finish_dynamic_sections
+ PARAMS ((bfd *, struct bfd_link_info *));
+static struct bfd_hash_entry * elf32_arm_link_hash_newfunc
+ PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
+#ifdef USE_REL
+static void arm_add_to_rel
+ PARAMS ((bfd *, bfd_byte *, reloc_howto_type *, bfd_signed_vma));
+#endif
-#define INTERWORK_FLAG(abfd) (elf_elfheader (abfd)->e_flags & EF_INTERWORK)
+boolean bfd_elf32_arm_allocate_interworking_sections
+ PARAMS ((struct bfd_link_info *));
+boolean bfd_elf32_arm_get_bfd_for_interworking
+ PARAMS ((bfd *, struct bfd_link_info *));
+boolean bfd_elf32_arm_process_before_allocation
+ PARAMS ((bfd *, struct bfd_link_info *, int));
+static enum elf_reloc_type_class elf32_arm_reloc_type_class
+ PARAMS ((const Elf_Internal_Rela *));
+
+#define INTERWORK_FLAG(abfd) (elf_elfheader (abfd)->e_flags & EF_ARM_INTERWORK)
/* The linker script knows the section names for placement.
The entry_names are used to do simple name mangling on the stubs.
@@ -78,23 +117,23 @@ static int elf32_thumb_to_arm_stub
this. It is set up so that any shared library function that is
called before the relocation has been set up calls the dynamic
linker first. */
-static const unsigned long elf32_arm_plt0_entry [PLT_ENTRY_SIZE / 4] =
-{
- 0xe52de004, /* str lr, [sp, #-4]! */
- 0xe59fe010, /* ldr lr, [pc, #16] */
- 0xe08fe00e, /* add lr, pc, lr */
- 0xe5bef008 /* ldr pc, [lr, #8]! */
-};
+static const bfd_vma elf32_arm_plt0_entry [PLT_ENTRY_SIZE / 4] =
+ {
+ 0xe52de004, /* str lr, [sp, #-4]! */
+ 0xe59fe010, /* ldr lr, [pc, #16] */
+ 0xe08fe00e, /* add lr, pc, lr */
+ 0xe5bef008 /* ldr pc, [lr, #8]! */
+ };
/* Subsequent entries in a procedure linkage table look like
this. */
-static const unsigned long elf32_arm_plt_entry [PLT_ENTRY_SIZE / 4] =
-{
- 0xe59fc004, /* ldr ip, [pc, #4] */
- 0xe08fc00c, /* add ip, pc, ip */
- 0xe59cf000, /* ldr pc, [ip] */
- 0x00000000 /* offset to symbol in got */
-};
+static const bfd_vma elf32_arm_plt_entry [PLT_ENTRY_SIZE / 4] =
+ {
+ 0xe59fc004, /* ldr ip, [pc, #4] */
+ 0xe08fc00c, /* add ip, pc, ip */
+ 0xe59cf000, /* ldr pc, [ip] */
+ 0x00000000 /* offset to symbol in got */
+ };
/* The ARM linker needs to keep track of the number of relocs that it
decides to copy in check_relocs for each symbol. This is so that
@@ -105,23 +144,23 @@ static const unsigned long elf32_arm_plt_entry [PLT_ENTRY_SIZE / 4] =
/* 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;
-};
+ {
+ /* 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;
+ {
+ struct elf_link_hash_entry root;
- /* Number of PC relative relocs copied for this symbol. */
- struct elf32_arm_pcrel_relocs_copied * pcrel_relocs_copied;
-};
+ /* 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
@@ -140,23 +179,23 @@ static boolean elf32_arm_discard_copies
/* ARM ELF linker hash table. */
struct elf32_arm_link_hash_table
-{
- /* The main hash table. */
- struct elf_link_hash_table root;
+ {
+ /* 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 Thumb-to-ARM glue. */
+ bfd_size_type thumb_glue_size;
- /* The size in bytes of the section containg the ARM-to-Thumb glue. */
- long int arm_glue_size;
+ /* The size in bytes of the section containg the ARM-to-Thumb glue. */
+ bfd_size_type arm_glue_size;
- /* An arbitary input BFD chosen to hold the glue sections. */
- bfd * bfd_of_glue_owner;
+ /* 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;
-};
+ /* 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. */
@@ -195,9 +234,9 @@ elf32_arm_link_hash_table_create (abfd)
bfd *abfd;
{
struct elf32_arm_link_hash_table *ret;
+ bfd_size_type amt = sizeof (struct elf32_arm_link_hash_table);
- ret = ((struct elf32_arm_link_hash_table *)
- bfd_alloc (abfd, sizeof (struct elf32_arm_link_hash_table)));
+ ret = (struct elf32_arm_link_hash_table *) bfd_alloc (abfd, amt);
if (ret == (struct elf32_arm_link_hash_table *) NULL)
return NULL;
@@ -221,7 +260,7 @@ elf32_arm_link_hash_table_create (abfd)
static struct elf_link_hash_entry *
find_thumb_glue (link_info, name, input_bfd)
struct bfd_link_info *link_info;
- CONST char *name;
+ const char *name;
bfd *input_bfd;
{
char *tmp_name;
@@ -231,8 +270,8 @@ find_thumb_glue (link_info, name, input_bfd)
/* We need a pointer to the armelf specific hash table. */
hash_table = elf32_arm_hash_table (link_info);
- tmp_name = ((char *)
- bfd_malloc (strlen (name) + strlen (THUMB2ARM_GLUE_ENTRY_NAME) + 1));
+ tmp_name = (char *) bfd_malloc ((bfd_size_type) strlen (name)
+ + strlen (THUMB2ARM_GLUE_ENTRY_NAME) + 1);
BFD_ASSERT (tmp_name);
@@ -243,8 +282,8 @@ find_thumb_glue (link_info, name, input_bfd)
if (hash == NULL)
/* xgettext:c-format */
- _bfd_error_handler (_("%s: unable to find THUMB glue '%s' for `%s'"),
- bfd_get_filename (input_bfd), tmp_name, name);
+ (*_bfd_error_handler) (_("%s: unable to find THUMB glue '%s' for `%s'"),
+ bfd_archive_filename (input_bfd), tmp_name, name);
free (tmp_name);
@@ -256,7 +295,7 @@ find_thumb_glue (link_info, name, input_bfd)
static struct elf_link_hash_entry *
find_arm_glue (link_info, name, input_bfd)
struct bfd_link_info *link_info;
- CONST char *name;
+ const char *name;
bfd *input_bfd;
{
char *tmp_name;
@@ -266,8 +305,8 @@ find_arm_glue (link_info, name, input_bfd)
/* 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));
+ tmp_name = (char *) bfd_malloc ((bfd_size_type) strlen (name)
+ + strlen (ARM2THUMB_GLUE_ENTRY_NAME) + 1);
BFD_ASSERT (tmp_name);
@@ -278,8 +317,8 @@ find_arm_glue (link_info, name, input_bfd)
if (myh == NULL)
/* xgettext:c-format */
- _bfd_error_handler (_("%s: unable to find ARM glue '%s' for `%s'"),
- bfd_get_filename (input_bfd), tmp_name, name);
+ (*_bfd_error_handler) (_("%s: unable to find ARM glue '%s' for `%s'"),
+ bfd_archive_filename (input_bfd), tmp_name, name);
free (tmp_name);
@@ -344,13 +383,13 @@ bfd_elf32_arm_allocate_interworking_sections (info)
{
BFD_ASSERT (globals->bfd_of_glue_owner != NULL);
- s = bfd_get_section_by_name
- (globals->bfd_of_glue_owner, ARM2THUMB_GLUE_SECTION_NAME);
+ 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);
+ 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;
@@ -365,8 +404,8 @@ bfd_elf32_arm_allocate_interworking_sections (info)
BFD_ASSERT (s != NULL);
- foo = (bfd_byte *) bfd_alloc
- (globals->bfd_of_glue_owner, globals->thumb_glue_size);
+ 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;
@@ -381,10 +420,11 @@ record_arm_to_thumb_glue (link_info, h)
struct elf_link_hash_entry * h;
{
const char * name = h->root.root.string;
- register asection * s;
+ asection * s;
char * tmp_name;
struct elf_link_hash_entry * myh;
struct elf32_arm_link_hash_table * globals;
+ bfd_vma val;
globals = elf32_arm_hash_table (link_info);
@@ -396,8 +436,8 @@ record_arm_to_thumb_glue (link_info, h)
BFD_ASSERT (s != NULL);
- tmp_name = ((char *)
- bfd_malloc (strlen (name) + strlen (ARM2THUMB_GLUE_ENTRY_NAME) + 1));
+ tmp_name = (char *) bfd_malloc ((bfd_size_type) strlen (name)
+ + strlen (ARM2THUMB_GLUE_ENTRY_NAME) + 1);
BFD_ASSERT (tmp_name);
@@ -416,9 +456,9 @@ record_arm_to_thumb_glue (link_info, h)
/* 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,
+ val = globals->arm_glue_size + 1;
+ _bfd_generic_link_add_one_symbol (link_info, globals->bfd_of_glue_owner,
+ tmp_name, BSF_GLOBAL, s, val,
NULL, true, false,
(struct bfd_link_hash_entry **) &myh);
@@ -435,11 +475,12 @@ record_thumb_to_arm_glue (link_info, h)
struct elf_link_hash_entry *h;
{
const char *name = h->root.root.string;
- register asection *s;
+ asection *s;
char *tmp_name;
struct elf_link_hash_entry *myh;
struct elf32_arm_link_hash_table *hash_table;
char bind;
+ bfd_vma val;
hash_table = elf32_arm_hash_table (link_info);
@@ -451,7 +492,8 @@ record_thumb_to_arm_glue (link_info, h)
BFD_ASSERT (s != NULL);
- tmp_name = (char *) bfd_malloc (strlen (name) + strlen (THUMB2ARM_GLUE_ENTRY_NAME) + 1);
+ tmp_name = (char *) bfd_malloc ((bfd_size_type) strlen (name)
+ + strlen (THUMB2ARM_GLUE_ENTRY_NAME) + 1);
BFD_ASSERT (tmp_name);
@@ -467,8 +509,9 @@ record_thumb_to_arm_glue (link_info, h)
return;
}
- _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,
+ val = hash_table->thumb_glue_size + 1;
+ _bfd_generic_link_add_one_symbol (link_info, hash_table->bfd_of_glue_owner,
+ tmp_name, BSF_GLOBAL, s, val,
NULL, true, false,
(struct bfd_link_hash_entry **) &myh);
@@ -482,7 +525,8 @@ record_thumb_to_arm_glue (link_info, h)
#define BACK_FROM_ARM "__%s_back_from_arm"
/* Allocate another symbol to mark where we switch to Arm mode. */
- tmp_name = (char *) bfd_malloc (strlen (name) + strlen (CHANGE_TO_ARM) + 1);
+ tmp_name = (char *) bfd_malloc ((bfd_size_type) strlen (name)
+ + strlen (CHANGE_TO_ARM) + 1);
BFD_ASSERT (tmp_name);
@@ -490,8 +534,9 @@ record_thumb_to_arm_glue (link_info, h)
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,
+ val = hash_table->thumb_glue_size + 4,
+ _bfd_generic_link_add_one_symbol (link_info, hash_table->bfd_of_glue_owner,
+ tmp_name, BSF_LOCAL, s, val,
NULL, true, false,
(struct bfd_link_hash_entry **) &myh);
@@ -616,7 +661,7 @@ bfd_elf32_arm_process_before_allocation (abfd, link_info, no_pipeline_knowledge)
/* Load the relocs. */
irel = (_bfd_elf32_link_read_relocs (abfd, sec, (PTR) NULL,
- (Elf_Internal_Rela *) NULL, false));
+ (Elf_Internal_Rela *) NULL, false));
BFD_ASSERT (irel != 0);
@@ -652,7 +697,7 @@ bfd_elf32_arm_process_before_allocation (abfd, link_info, no_pipeline_knowledge)
free_contents = contents;
if (!bfd_get_section_contents (abfd, sec, contents,
- (file_ptr) 0, sec->_raw_size))
+ (file_ptr) 0, sec->_raw_size))
goto error_return;
}
}
@@ -674,7 +719,7 @@ bfd_elf32_arm_process_before_allocation (abfd, link_info, no_pipeline_knowledge)
free_extsyms = extsyms;
if (bfd_seek (abfd, symtab_hdr->sh_offset, SEEK_SET) != 0
- || (bfd_read (extsyms, 1, symtab_hdr->sh_size, abfd)
+ || (bfd_bread (extsyms, symtab_hdr->sh_size, abfd)
!= symtab_hdr->sh_size))
goto error_return;
}
@@ -807,7 +852,7 @@ elf32_thumb_to_arm_stub (info, name, input_bfd, output_bfd, input_section,
bfd_vma val;
{
asection * s = 0;
- long int my_offset;
+ bfd_vma my_offset;
unsigned long int tmp;
long int ret_offset;
struct elf_link_hash_entry * myh;
@@ -837,12 +882,12 @@ elf32_thumb_to_arm_stub (info, name, input_bfd, output_bfd, input_section,
&& sym_sec->owner != NULL
&& !INTERWORK_FLAG (sym_sec->owner))
{
- _bfd_error_handler
+ (*_bfd_error_handler)
(_("%s(%s): warning: interworking not enabled."),
- bfd_get_filename (sym_sec->owner), name);
- _bfd_error_handler
+ bfd_archive_filename (sym_sec->owner), name);
+ (*_bfd_error_handler)
(_(" first occurrence: %s: thumb call to arm"),
- bfd_get_filename (input_bfd));
+ bfd_archive_filename (input_bfd));
return false;
}
@@ -850,10 +895,10 @@ elf32_thumb_to_arm_stub (info, name, input_bfd, output_bfd, input_section,
--my_offset;
myh->root.u.def.value = my_offset;
- bfd_put_16 (output_bfd, t2a1_bx_pc_insn,
+ bfd_put_16 (output_bfd, (bfd_vma) t2a1_bx_pc_insn,
s->contents + my_offset);
- bfd_put_16 (output_bfd, t2a2_noop_insn,
+ bfd_put_16 (output_bfd, (bfd_vma) t2a2_noop_insn,
s->contents + my_offset + 2);
ret_offset =
@@ -872,7 +917,7 @@ elf32_thumb_to_arm_stub (info, name, input_bfd, output_bfd, input_section,
+ 8);
bfd_put_32 (output_bfd,
- t2a3_b_insn | ((ret_offset >> 2) & 0x00FFFFFF),
+ (bfd_vma) t2a3_b_insn | ((ret_offset >> 2) & 0x00FFFFFF),
s->contents + my_offset + 4);
}
@@ -880,18 +925,17 @@ elf32_thumb_to_arm_stub (info, name, input_bfd, output_bfd, input_section,
/* 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;
+ 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),
+ (bfd_vma) insert_thumb_branch (tmp, ret_offset),
hit_data - input_section->vma);
return true;
@@ -914,7 +958,7 @@ elf32_arm_to_thumb_stub (info, name, input_bfd, output_bfd, input_section,
bfd_vma val;
{
unsigned long int tmp;
- long int my_offset;
+ bfd_vma my_offset;
asection * s;
long int ret_offset;
struct elf_link_hash_entry * myh;
@@ -942,21 +986,21 @@ elf32_arm_to_thumb_stub (info, name, input_bfd, output_bfd, input_section,
&& sym_sec->owner != NULL
&& !INTERWORK_FLAG (sym_sec->owner))
{
- _bfd_error_handler
+ (*_bfd_error_handler)
(_("%s(%s): warning: interworking not enabled."),
- bfd_get_filename (sym_sec->owner), name);
- _bfd_error_handler
+ bfd_archive_filename (sym_sec->owner), name);
+ (*_bfd_error_handler)
(_(" first occurrence: %s: arm call to thumb"),
- bfd_get_filename (input_bfd));
+ bfd_archive_filename (input_bfd));
}
--my_offset;
myh->root.u.def.value = my_offset;
- bfd_put_32 (output_bfd, a2t1_ldr_insn,
+ bfd_put_32 (output_bfd, (bfd_vma) a2t1_ldr_insn,
s->contents + my_offset);
- bfd_put_32 (output_bfd, a2t2_bx_r12_insn,
+ bfd_put_32 (output_bfd, (bfd_vma) a2t2_bx_r12_insn,
s->contents + my_offset + 4);
/* It's a thumb address. Add the low order bit. */
@@ -970,18 +1014,17 @@ elf32_arm_to_thumb_stub (info, name, input_bfd, output_bfd, input_section,
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;
+ 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);
+ bfd_put_32 (output_bfd, (bfd_vma) tmp, hit_data - input_section->vma);
return true;
}
@@ -1002,7 +1045,7 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
struct bfd_link_info * info;
asection * sym_sec;
const char * sym_name;
- unsigned char sym_flags;
+ int sym_flags;
struct elf_link_hash_entry * h;
{
unsigned long r_type = howto->type;
@@ -1022,7 +1065,7 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
/* If the start address has been set, then set the EF_ARM_HASENTRY
flag. Setting this more than once is redundant, but the cost is
not too high, and it keeps the code simple.
-
+
The test is done here, rather than somewhere else, because the
start address is only set just before the final link commences.
@@ -1030,7 +1073,7 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
flag will not be set. */
if (bfd_get_start_address (output_bfd) != 0)
elf_elfheader (output_bfd)->e_flags |= EF_ARM_HASENTRY;
-
+
globals = elf32_arm_hash_table (info);
dynobj = elf_hash_table (info)->dynobj;
@@ -1073,8 +1116,9 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
/* When generating a shared object, these relocations are copied
into the output file to be resolved at run time. */
if (info->shared
+ && r_symndx != 0
&& (r_type != R_ARM_PC24
- || (h != NULL
+ || (h != NULL
&& h->dynindx != -1
&& (! info->symbolic
|| (h->elf_link_hash_flags
@@ -1105,22 +1149,11 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
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 =
+ _bfd_elf_section_offset (output_bfd, info, input_section,
+ rel->r_offset);
+ if (outrel.r_offset == (bfd_vma) -1)
+ skip = true;
outrel.r_offset += (input_section->output_section->vma
+ input_section->output_offset);
@@ -1188,10 +1221,10 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
/* FIXME: Should we translate the instruction into a BL
instruction instead ? */
if (sym_flags != STT_ARM_TFUNC)
- _bfd_error_handler (_("\
+ (*_bfd_error_handler) (_("\
%s: Warning: Arm BLX instruction targets Arm function '%s'."),
- bfd_get_filename (input_bfd),
- h ? h->root.root.string : "(local)");
+ bfd_archive_filename (input_bfd),
+ h ? h->root.root.string : "(local)");
}
else
#endif
@@ -1384,10 +1417,10 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
/* FIXME: Should we translate the instruction into a BL
instruction instead ? */
if (sym_flags == STT_ARM_TFUNC)
- _bfd_error_handler (_("\
+ (*_bfd_error_handler) (_("\
%s: Warning: Thumb BLX instruction targets thumb function '%s'."),
- bfd_get_filename (input_bfd),
- h ? h->root.root.string : "(local)");
+ bfd_archive_filename (input_bfd),
+ h ? h->root.root.string : "(local)");
}
else
#endif
@@ -1457,7 +1490,7 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
corresponding bit one in the target address will be set from bit
one of the source address. */
lower_insn &= ~1;
-#endif
+#endif
/* Put the relocated value back in the object file: */
bfd_put_16 (input_bfd, upper_insn, hit_data);
bfd_put_16 (input_bfd, lower_insn, hit_data + 2);
@@ -1466,6 +1499,47 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
}
break;
+ case R_ARM_THM_PC11:
+ /* Thumb B (branch) instruction). */
+ {
+ bfd_vma relocation;
+ 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 addend. */
+ addend = bfd_get_16 (input_bfd, hit_data) & howto->src_mask;
+ /* ??? Need to determine shift amount from operand size. */
+ addend >>= howto->rightshift;
+#endif
+ relocation = value + addend;
+
+ relocation -= (input_section->output_section->vma
+ + input_section->output_offset
+ + rel->r_offset);
+
+ 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);
+
+ relocation |= (bfd_get_16 (input_bfd, hit_data) & (~ howto->dst_mask));
+
+ bfd_put_16 (input_bfd, relocation, hit_data);
+
+ /* Assumes two's complement. */
+ if (signed_check > reloc_signed_max || signed_check < reloc_signed_min)
+ return bfd_reloc_overflow;
+
+ return bfd_reloc_ok;
+ }
+
case R_ARM_GNU_VTINHERIT:
case R_ARM_GNU_VTENTRY:
return bfd_reloc_ok;
@@ -1497,8 +1571,8 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
calculation. */
value -= sgot->output_section->vma;
return _bfd_final_link_relocate (howto, input_bfd, input_section,
- contents, rel->r_offset, value,
- (bfd_vma) 0);
+ contents, rel->r_offset, value,
+ (bfd_vma) 0);
case R_ARM_GOTPC:
/* Use global offset table as symbol value. */
@@ -1509,8 +1583,8 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
value = sgot->output_section->vma;
return _bfd_final_link_relocate (howto, input_bfd, input_section,
- contents, rel->r_offset, value,
- (bfd_vma) 0);
+ contents, rel->r_offset, value,
+ (bfd_vma) 0);
case R_ARM_GOT32:
/* Relocation is to the entry for this symbol in the
@@ -1593,8 +1667,8 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
}
return _bfd_final_link_relocate (howto, input_bfd, input_section,
- contents, rel->r_offset, value,
- (bfd_vma) 0);
+ contents, rel->r_offset, value,
+ (bfd_vma) 0);
case R_ARM_PLT32:
/* Relocation is to the entry for this symbol in the
@@ -1604,8 +1678,8 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
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);
+ 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
@@ -1623,8 +1697,8 @@ elf32_arm_final_link_relocate (howto, input_bfd, output_bfd,
+ splt->output_offset
+ h->plt.offset);
return _bfd_final_link_relocate (howto, input_bfd, input_section,
- contents, rel->r_offset, value,
- (bfd_vma) 0);
+ contents, rel->r_offset, value,
+ (bfd_vma) 0);
case R_ARM_SBREL32:
return bfd_reloc_notsupported;
@@ -1683,8 +1757,8 @@ arm_add_to_rel (abfd, address, howto, increment)
upper_insn = (upper_insn & 0xf800) | ((addend >> 11) & 0x7ff);
lower_insn = (lower_insn & 0xf800) | (addend & 0x7ff);
- bfd_put_16 (abfd, upper_insn, address);
- bfd_put_16 (abfd, lower_insn, address + 2);
+ bfd_put_16 (abfd, (bfd_vma) upper_insn, address);
+ bfd_put_16 (abfd, (bfd_vma) lower_insn, address + 2);
}
else
{
@@ -1712,7 +1786,7 @@ arm_add_to_rel (abfd, address, howto, increment)
case R_ARM_PC24:
addend <<= howto->size;
- addend += increment;
+ addend += increment;
/* Should we check for overflow here ? */
@@ -1771,7 +1845,12 @@ elf32_arm_relocate_section (output_bfd, info, input_bfd, input_section,
|| r_type == R_ARM_GNU_VTINHERIT)
continue;
+#ifdef USE_REL
+ elf32_arm_info_to_howto (input_bfd, & bfd_reloc,
+ (Elf_Internal_Rel *) rel);
+#else
elf32_arm_info_to_howto (input_bfd, & bfd_reloc, rel);
+#endif
howto = bfd_reloc.howto;
if (info->relocateable)
@@ -1788,10 +1867,11 @@ elf32_arm_relocate_section (output_bfd, info, input_bfd, input_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);
+ howto,
+ (bfd_signed_vma) (sec->output_offset
+ + sym->st_value));
#else
- rel->r_addend += (sec->output_offset + sym->st_value)
- >> howto->rightshift;
+ rel->r_addend += (sec->output_offset + sym->st_value);
#endif
}
}
@@ -1808,9 +1888,49 @@ elf32_arm_relocate_section (output_bfd, info, input_bfd, input_section,
{
sym = local_syms + r_symndx;
sec = local_sections[r_symndx];
+#ifdef USE_REL
relocation = (sec->output_section->vma
+ sec->output_offset
+ sym->st_value);
+ if ((sec->flags & SEC_MERGE)
+ && ELF_ST_TYPE (sym->st_info) == STT_SECTION)
+ {
+ asection *msec;
+ bfd_vma addend, value;
+
+ if (howto->rightshift)
+ {
+ (*_bfd_error_handler)
+ (_("%s(%s+0x%lx): %s relocation against SEC_MERGE section"),
+ bfd_archive_filename (input_bfd),
+ bfd_get_section_name (input_bfd, input_section),
+ (long) rel->r_offset, howto->name);
+ return false;
+ }
+
+ value = bfd_get_32 (input_bfd, contents + rel->r_offset);
+
+ /* Get the (signed) value from the instruction. */
+ addend = value & howto->src_mask;
+ if (addend & ((howto->src_mask + 1) >> 1))
+ {
+ bfd_signed_vma mask;
+
+ mask = -1;
+ mask &= ~ howto->src_mask;
+ addend |= mask;
+ }
+ msec = sec;
+ addend =
+ _bfd_elf_rel_local_sym (output_bfd, sym, &msec, addend)
+ - relocation;
+ addend += msec->output_section->vma + msec->output_offset;
+ value = (value & ~ howto->dst_mask) | (addend & howto->dst_mask);
+ bfd_put_32 (input_bfd, value, contents + rel->r_offset);
+ }
+#else
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+#endif
}
else
{
@@ -1834,9 +1954,10 @@ elf32_arm_relocate_section (output_bfd, info, input_bfd, input_section,
{
case R_ARM_PC24:
case R_ARM_ABS32:
+ case R_ARM_THM_PC22:
if (info->shared
&& (
- (!info->symbolic && h->dynindx != -1)
+ (!info->symbolic && h->dynindx != -1)
|| (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0
)
&& ((input_section->flags & SEC_ALLOC) != 0
@@ -1874,8 +1995,10 @@ elf32_arm_relocate_section (output_bfd, info, input_bfd, input_section,
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,
+ (_("%s: warning: unresolvable relocation %d against symbol `%s' from %s section"),
+ bfd_archive_filename (input_bfd),
+ r_type,
+ h->root.root.string,
bfd_get_section_name (input_bfd, input_section));
relocation_needed = 0;
}
@@ -1987,14 +2110,14 @@ elf32_arm_set_private_flags (abfd, flags)
{
if (EF_ARM_EABI_VERSION (flags) == EF_ARM_EABI_UNKNOWN)
{
- if (flags & EF_INTERWORK)
- _bfd_error_handler (_("\
+ if (flags & EF_ARM_INTERWORK)
+ (*_bfd_error_handler) (_("\
Warning: Not setting interwork flag of %s since it has already been specified as non-interworking"),
- bfd_get_filename (abfd));
+ bfd_archive_filename (abfd));
else
_bfd_error_handler (_("\
Warning: Clearing the interwork flag of %s due to outside request"),
- bfd_get_filename (abfd));
+ bfd_archive_filename (abfd));
}
}
else
@@ -2028,28 +2151,29 @@ elf32_arm_copy_private_bfd_data (ibfd, obfd)
&& in_flags != out_flags)
{
/* Cannot mix APCS26 and APCS32 code. */
- if ((in_flags & EF_APCS_26) != (out_flags & EF_APCS_26))
+ if ((in_flags & EF_ARM_APCS_26) != (out_flags & EF_ARM_APCS_26))
return false;
/* Cannot mix float APCS and non-float APCS code. */
- if ((in_flags & EF_APCS_FLOAT) != (out_flags & EF_APCS_FLOAT))
+ if ((in_flags & EF_ARM_APCS_FLOAT) != (out_flags & EF_ARM_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 ((in_flags & EF_ARM_INTERWORK) != (out_flags & EF_ARM_INTERWORK))
{
- if (out_flags & EF_INTERWORK)
+ if (out_flags & EF_ARM_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));
+ bfd_get_filename (obfd),
+ bfd_archive_filename (ibfd));
- in_flags &= ~EF_INTERWORK;
+ in_flags &= ~EF_ARM_INTERWORK;
}
/* Likewise for PIC, though don't warn for this case. */
- if ((in_flags & EF_PIC) != (out_flags & EF_PIC))
- in_flags &= ~EF_PIC;
+ if ((in_flags & EF_ARM_PIC) != (out_flags & EF_ARM_PIC))
+ in_flags &= ~EF_ARM_PIC;
}
elf_elfheader (obfd)->e_flags = in_flags;
@@ -2136,59 +2260,104 @@ elf32_arm_merge_private_bfd_data (ibfd, obfd)
{
_bfd_error_handler (_("\
Error: %s compiled for EABI version %d, whereas %s is compiled for version %d"),
- bfd_get_filename (ibfd),
- (in_flags & EF_ARM_EABIMASK) >> 24,
- bfd_get_filename (obfd),
- (out_flags & EF_ARM_EABIMASK) >> 24);
+ bfd_archive_filename (ibfd),
+ (in_flags & EF_ARM_EABIMASK) >> 24,
+ bfd_get_filename (obfd),
+ (out_flags & EF_ARM_EABIMASK) >> 24);
return false;
}
/* Not sure what needs to be checked for EABI versions >= 1. */
if (EF_ARM_EABI_VERSION (in_flags) == EF_ARM_EABI_UNKNOWN)
{
- if ((in_flags & EF_APCS_26) != (out_flags & EF_APCS_26))
+ if ((in_flags & EF_ARM_APCS_26) != (out_flags & EF_ARM_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);
+ bfd_archive_filename (ibfd),
+ in_flags & EF_ARM_APCS_26 ? 26 : 32,
+ bfd_get_filename (obfd),
+ out_flags & EF_ARM_APCS_26 ? 26 : 32);
flags_compatible = false;
}
- if ((in_flags & EF_APCS_FLOAT) != (out_flags & EF_APCS_FLOAT))
+ if ((in_flags & EF_ARM_APCS_FLOAT) != (out_flags & EF_ARM_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_ARM_APCS_FLOAT)
+ _bfd_error_handler (_("\
+Error: %s passes floats in FP registers, whereas %s passes them in integer registers"),
+ bfd_archive_filename (ibfd),
+ bfd_get_filename (obfd));
+ else
+ _bfd_error_handler (_("\
+Error: %s passes floats in integer registers, whereas %s passes them in FP registers"),
+ bfd_archive_filename (ibfd),
+ bfd_get_filename (obfd));
+
flags_compatible = false;
}
-#ifdef EF_SOFT_FLOAT
- if ((in_flags & EF_SOFT_FLOAT) != (out_flags & EF_SOFT_FLOAT))
+ if ((in_flags & EF_ARM_VFP_FLOAT) != (out_flags & EF_ARM_VFP_FLOAT))
{
- _bfd_error_handler (_ ("\
-Error: %s uses %s floating point, whereas %s uses %s floating point"),
- bfd_get_filename (ibfd),
- in_flags & EF_SOFT_FLOAT ? _("soft") : _("hard"),
- bfd_get_filename (obfd),
- out_flags & EF_SOFT_FLOAT ? _("soft") : _("hard"));
+ if (in_flags & EF_ARM_VFP_FLOAT)
+ _bfd_error_handler (_("\
+Error: %s uses VFP instructions, whereas %s FPA instructions"),
+ bfd_archive_filename (ibfd),
+ bfd_get_filename (obfd));
+ else
+ _bfd_error_handler (_("\
+Error: %s uses FPA instructions, whereas %s VFP instructions"),
+ bfd_archive_filename (ibfd),
+ bfd_get_filename (obfd));
+
flags_compatible = false;
}
+
+#ifdef EF_ARM_SOFT_FLOAT
+ if ((in_flags & EF_ARM_SOFT_FLOAT) != (out_flags & EF_ARM_SOFT_FLOAT))
+ {
+ /* We can allow interworking between code that is VFP format
+ layout, and uses either soft float or integer regs for
+ passing floating point arguments and results. We already
+ know that the APCS_FLOAT flags match; similarly for VFP
+ flags. */
+ if ((in_flags & EF_ARM_APCS_FLOAT) != 0
+ || (in_flags & EF_ARM_VFP_FLOAT) == 0)
+ {
+ if (in_flags & EF_ARM_SOFT_FLOAT)
+ _bfd_error_handler (_ ("\
+Error: %s uses software FP, whereas %s uses hardware FP"),
+ bfd_archive_filename (ibfd),
+ bfd_get_filename (obfd));
+ else
+ _bfd_error_handler (_ ("\
+Error: %s uses hardware FP, whereas %s uses software FP"),
+ bfd_archive_filename (ibfd),
+ bfd_get_filename (obfd));
+
+ flags_compatible = false;
+ }
+ }
#endif
/* 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") : _("does not"));
+ if ((in_flags & EF_ARM_INTERWORK) != (out_flags & EF_ARM_INTERWORK))
+ {
+ if (in_flags & EF_ARM_INTERWORK)
+ {
+ _bfd_error_handler (_("\
+Warning: %s supports interworking, whereas %s does not"),
+ bfd_archive_filename (ibfd),
+ bfd_get_filename (obfd));
+ }
+ else
+ {
+ _bfd_error_handler (_("\
+Warning: %s does not support interworking, whereas %s does"),
+ bfd_archive_filename (ibfd),
+ bfd_get_filename (obfd));
+ }
+ }
}
return flags_compatible;
@@ -2222,31 +2391,37 @@ elf32_arm_print_private_bfd_data (abfd, ptr)
/* The following flag bits are GNU extenstions and not part of the
official ARM ELF extended ABI. Hence they are only decoded if
the EABI version is not set. */
- if (flags & EF_INTERWORK)
+ if (flags & EF_ARM_INTERWORK)
fprintf (file, _(" [interworking enabled]"));
- if (flags & EF_APCS_26)
+ if (flags & EF_ARM_APCS_26)
fprintf (file, _(" [APCS-26]"));
else
fprintf (file, _(" [APCS-32]"));
- if (flags & EF_APCS_FLOAT)
+ if (flags & EF_ARM_VFP_FLOAT)
+ fprintf (file, _(" [VFP float format]"));
+ else
+ fprintf (file, _(" [FPA float format]"));
+
+ if (flags & EF_ARM_APCS_FLOAT)
fprintf (file, _(" [floats passed in float registers]"));
- if (flags & EF_PIC)
+ if (flags & EF_ARM_PIC)
fprintf (file, _(" [position independent]"));
- if (flags & EF_NEW_ABI)
+ if (flags & EF_ARM_NEW_ABI)
fprintf (file, _(" [new ABI]"));
- if (flags & EF_OLD_ABI)
+ if (flags & EF_ARM_OLD_ABI)
fprintf (file, _(" [old ABI]"));
- if (flags & EF_SOFT_FLOAT)
+ if (flags & EF_ARM_SOFT_FLOAT)
fprintf (file, _(" [software FP]"));
- flags &= ~(EF_INTERWORK | EF_APCS_26 | EF_APCS_FLOAT | EF_PIC
- | EF_NEW_ABI | EF_OLD_ABI | EF_SOFT_FLOAT);
+ flags &= ~(EF_ARM_INTERWORK | EF_ARM_APCS_26 | EF_ARM_APCS_FLOAT
+ | EF_ARM_PIC | EF_ARM_NEW_ABI | EF_ARM_OLD_ABI
+ | EF_ARM_SOFT_FLOAT | EF_ARM_VFP_FLOAT);
break;
case EF_ARM_EABI_VER1:
@@ -2260,6 +2435,24 @@ elf32_arm_print_private_bfd_data (abfd, ptr)
flags &= ~ EF_ARM_SYMSARESORTED;
break;
+ case EF_ARM_EABI_VER2:
+ fprintf (file, _(" [Version2 EABI]"));
+
+ if (flags & EF_ARM_SYMSARESORTED)
+ fprintf (file, _(" [sorted symbol table]"));
+ else
+ fprintf (file, _(" [unsorted symbol table]"));
+
+ if (flags & EF_ARM_DYNSYMSUSESEGIDX)
+ fprintf (file, _(" [dynamic symbols use segment index]"));
+
+ if (flags & EF_ARM_MAPSYMSFIRST)
+ fprintf (file, _(" [mapping symbols precede others]"));
+
+ flags &= ~(EF_ARM_SYMSARESORTED | EF_ARM_DYNSYMSUSESEGIDX
+ | EF_ARM_MAPSYMSFIRST);
+ break;
+
default:
fprintf (file, _(" <EABI version unrecognised>"));
break;
@@ -2342,14 +2535,9 @@ elf32_arm_gc_mark_hook (abfd, info, rel, h, sym)
}
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 bfd_section_from_elf_index (abfd, sym->st_shndx);
+ }
+
return NULL;
}
@@ -2452,7 +2640,7 @@ elf32_arm_check_relocs (abfd, info, sec, relocs)
srelgot = bfd_make_section (dynobj, ".rel.got");
if (srelgot == NULL
|| ! bfd_set_section_flags (dynobj, srelgot,
- (SEC_ALLOC
+ (SEC_ALLOC
| SEC_LOAD
| SEC_HAS_CONTENTS
| SEC_IN_MEMORY
@@ -2480,14 +2668,15 @@ elf32_arm_check_relocs (abfd, info, sec, relocs)
}
else
{
- /* This is a global offset table entry for a local
+ /* This is a global offset table entry for a local
symbol. */
if (local_got_offsets == NULL)
{
- size_t size;
- register unsigned int i;
+ bfd_size_type size;
+ unsigned int i;
- size = symtab_hdr->sh_info * sizeof (bfd_vma);
+ size = symtab_hdr->sh_info;
+ size *= sizeof (bfd_vma);
local_got_offsets = (bfd_vma *) bfd_alloc (abfd, size);
if (local_got_offsets == NULL)
return false;
@@ -2512,7 +2701,7 @@ elf32_arm_check_relocs (abfd, info, sec, relocs)
sgot->_raw_size += 4;
break;
- case R_ARM_PLT32:
+ 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
@@ -2565,7 +2754,7 @@ elf32_arm_check_relocs (abfd, info, sec, relocs)
return false;
BFD_ASSERT (strncmp (name, ".rel", 4) == 0
- && strcmp (bfd_get_section_name (abfd, sec),
+ && strcmp (bfd_get_section_name (abfd, sec),
name + 4) == 0);
sreloc = bfd_get_section_by_name (dynobj, name);
@@ -2583,6 +2772,8 @@ elf32_arm_check_relocs (abfd, info, sec, relocs)
|| ! bfd_set_section_alignment (dynobj, sreloc, 2))
return false;
}
+ if (sec->flags & SEC_READONLY)
+ info->flags |= DF_TEXTREL;
}
sreloc->_raw_size += sizeof (Elf32_External_Rel);
@@ -2609,8 +2800,7 @@ elf32_arm_check_relocs (abfd, info, sec, relocs)
if (p == NULL)
{
p = ((struct elf32_arm_pcrel_relocs_copied *)
- bfd_alloc (dynobj, sizeof * p));
-
+ bfd_alloc (dynobj, (bfd_size_type) sizeof * p));
if (p == NULL)
return false;
p->next = eh->pcrel_relocs_copied;
@@ -2654,8 +2844,8 @@ elf32_arm_find_nearest_line
asection * section;
asymbol ** symbols;
bfd_vma offset;
- CONST char ** filename_ptr;
- CONST char ** functionname_ptr;
+ const char ** filename_ptr;
+ const char ** functionname_ptr;
unsigned int * line_ptr;
{
boolean found;
@@ -2897,14 +3087,13 @@ elf32_arm_adjust_dynamic_symbol (info, h)
static boolean
elf32_arm_size_dynamic_sections (output_bfd, info)
- bfd * output_bfd;
+ bfd * output_bfd ATTRIBUTE_UNUSED;
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);
@@ -2946,7 +3135,6 @@ elf32_arm_size_dynamic_sections (output_bfd, info)
memory for them. */
plt = false;
relocs = false;
- reltext = false;
for (s = dynobj->sections; s != NULL; s = s->next)
{
const char * name;
@@ -2992,30 +3180,10 @@ elf32_arm_size_dynamic_sections (output_bfd, info)
}
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;
- }
+ relocs = true;
/* We use the reloc_count field as a counter if we need
to copy relocs into the output file. */
@@ -3033,12 +3201,16 @@ elf32_arm_size_dynamic_sections (output_bfd, info)
asection ** spp;
for (spp = &s->output_section->owner->sections;
- *spp != s->output_section;
+ *spp != NULL;
spp = &(*spp)->next)
- ;
- *spp = s->output_section->next;
- --s->output_section->owner->section_count;
-
+ {
+ if (*spp == s->output_section)
+ {
+ bfd_section_list_remove (s->output_section->owner, spp);
+ --s->output_section->owner->section_count;
+ break;
+ }
+ }
continue;
}
@@ -3055,37 +3227,40 @@ elf32_arm_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. */
- if (! info->shared)
+#define add_dynamic_entry(TAG, VAL) \
+ bfd_elf32_add_dynamic_entry (info, (bfd_vma) (TAG), (bfd_vma) (VAL))
+
+ if (!info->shared)
{
- if (! bfd_elf32_add_dynamic_entry (info, DT_DEBUG, 0))
+ if (!add_dynamic_entry (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))
+ if ( !add_dynamic_entry (DT_PLTGOT, 0)
+ || !add_dynamic_entry (DT_PLTRELSZ, 0)
+ || !add_dynamic_entry (DT_PLTREL, DT_REL)
+ || !add_dynamic_entry (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)))
+ if ( !add_dynamic_entry (DT_REL, 0)
+ || !add_dynamic_entry (DT_RELSZ, 0)
+ || !add_dynamic_entry (DT_RELENT, sizeof (Elf32_External_Rel)))
return false;
}
- if (reltext)
+ if ((info->flags & DF_TEXTREL) != 0)
{
- if (! bfd_elf32_add_dynamic_entry (info, DT_TEXTREL, 0))
+ if (!add_dynamic_entry (DT_TEXTREL, 0))
return false;
info->flags |= DF_TEXTREL;
}
}
+#undef add_synamic_entry
return true;
}
@@ -3218,7 +3393,7 @@ elf32_arm_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 &~ (bfd_vma) 1));
/* If this is a -Bsymbolic link, and the symbol is defined
locally, we just want to emit a RELATIVE reloc. The entry in
@@ -3403,29 +3578,48 @@ elf32_arm_post_process_headers (abfd, link_info)
i_ehdrp->e_ident[EI_ABIVERSION] = ARM_ELF_ABI_VERSION;
}
+static enum elf_reloc_type_class
+elf32_arm_reloc_type_class (rela)
+ const Elf_Internal_Rela *rela;
+{
+ switch ((int) ELF32_R_TYPE (rela->r_info))
+ {
+ case R_ARM_RELATIVE:
+ return reloc_class_relative;
+ case R_ARM_JUMP_SLOT:
+ return reloc_class_plt;
+ case R_ARM_COPY:
+ return reloc_class_copy;
+ default:
+ return reloc_class_normal;
+ }
+}
+
+
#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_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_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_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_reloc_type_class elf32_arm_reloc_type_class
#define elf_backend_can_gc_sections 1
#define elf_backend_plt_readonly 1
diff --git a/contrib/binutils/bfd/elf32-gen.c b/contrib/binutils/bfd/elf32-gen.c
index 7a39f47..58b5fc6 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, 1995, 1998, 1999 Free Software Foundation, Inc.
+ Copyright 1993, 1995, 1998, 1999, 2001 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -40,6 +40,13 @@ static reloc_howto_type dummy =
0, /* dst_mask */
false); /* pcrel_offset */
+static void elf_generic_info_to_howto
+ PARAMS ((bfd *, arelent *, Elf32_Internal_Rela *));
+static void elf_generic_info_to_howto_rel
+ PARAMS ((bfd *, arelent *, Elf32_Internal_Rel *));
+static boolean elf32_generic_link_add_symbols
+ PARAMS ((bfd *, struct bfd_link_info *));
+
static void
elf_generic_info_to_howto (abfd, bfd_reloc, elf_reloc)
bfd *abfd ATTRIBUTE_UNUSED;
@@ -58,7 +65,7 @@ elf_generic_info_to_howto_rel (abfd, bfd_reloc, elf_reloc)
bfd_reloc->howto = &dummy;
}
-static boolean
+static boolean
elf32_generic_link_add_symbols (abfd, info)
bfd *abfd;
struct bfd_link_info *info;
@@ -72,15 +79,9 @@ elf32_generic_link_add_symbols (abfd, info)
Elf_Internal_Ehdr *ehdrp;
ehdrp = elf_elfheader (abfd);
- if (abfd->my_archive)
- (*_bfd_error_handler) (_("%s(%s): Relocations in generic ELF (EM: %d)"),
- bfd_get_filename (abfd->my_archive),
- bfd_get_filename (abfd),
- ehdrp->e_machine);
- else
- (*_bfd_error_handler) (_("%s: Relocations in generic ELF (EM: %d)"),
- bfd_get_filename (abfd),
- ehdrp->e_machine);
+ (*_bfd_error_handler) (_("%s: Relocations in generic ELF (EM: %d)"),
+ bfd_archive_filename (abfd),
+ ehdrp->e_machine);
bfd_set_error (bfd_error_wrong_format);
return false;
diff --git a/contrib/binutils/bfd/elf32-ppc.c b/contrib/binutils/bfd/elf32-ppc.c
index ab803f4..4c9ff82 100644
--- a/contrib/binutils/bfd/elf32-ppc.c
+++ b/contrib/binutils/bfd/elf32-ppc.c
@@ -38,10 +38,12 @@ static reloc_howto_type *ppc_elf_reloc_type_lookup
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 int ppc_elf_sort_rela PARAMS ((const PTR, const PTR));
+static boolean ppc_elf_relax_section
+ PARAMS ((bfd *, asection *, struct bfd_link_info *, boolean *));
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 *));
@@ -105,6 +107,12 @@ static boolean ppc_elf_finish_dynamic_symbol PARAMS ((bfd *,
Elf_Internal_Sym *));
static boolean ppc_elf_finish_dynamic_sections PARAMS ((bfd *, struct bfd_link_info *));
+static enum elf_reloc_type_class ppc_elf_reloc_type_class
+ PARAMS ((const Elf_Internal_Rela *));
+static boolean ppc_elf_grok_prstatus
+ PARAMS ((bfd *abfd, Elf_Internal_Note *note));
+static boolean ppc_elf_grok_psinfo
+ PARAMS ((bfd *abfd, Elf_Internal_Note *note));
#define BRANCH_PREDICT_BIT 0x200000 /* branch prediction bit for branch taken relocs */
#define RA_REGISTER_MASK 0x001f0000 /* mask to set RA in memory instructions */
@@ -989,8 +997,8 @@ ppc_elf_howto_init ()
static int
ppc_elf_sort_rela (arg1, arg2)
- const void *arg1;
- const void *arg2;
+ const PTR arg1;
+ const PTR arg2;
{
const Elf_Internal_Rela **rela1 = (const Elf_Internal_Rela**) arg1;
const Elf_Internal_Rela **rela2 = (const Elf_Internal_Rela**) arg2;
@@ -1051,6 +1059,7 @@ ppc_elf_relax_section (abfd, isec, link_info, again)
if (isec->reloc_count)
{
unsigned n;
+ bfd_size_type amt;
/* Get a copy of the native relocations. */
internal_relocs = _bfd_elf32_link_read_relocs (
@@ -1062,8 +1071,9 @@ ppc_elf_relax_section (abfd, isec, link_info, again)
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*));
+ amt = isec->reloc_count;
+ amt *= sizeof (Elf_Internal_Rela*);
+ rela_comb = (Elf_Internal_Rela**) bfd_malloc (amt);
if (rela_comb == NULL)
goto error_return;
for (n = 0; n < isec->reloc_count; ++n)
@@ -1192,7 +1202,7 @@ ppc_elf_relax_section (abfd, isec, link_info, again)
#undef BO4
if (modified)
{
- bfd_put_32 (abfd, insn, contents + isec_offset);
+ bfd_put_32 (abfd, (bfd_vma) insn, contents + isec_offset);
section_modified = true;
}
}
@@ -1383,24 +1393,6 @@ ppc_elf_set_private_flags (abfd, flags)
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
@@ -1442,7 +1434,7 @@ ppc_elf_merge_private_bfd_data (ibfd, obfd)
error = true;
(*_bfd_error_handler)
(_("%s: compiled with -mrelocatable and linked with modules compiled normally"),
- bfd_get_filename (ibfd));
+ bfd_archive_filename (ibfd));
}
else if ((new_flags & (EF_PPC_RELOCATABLE | EF_PPC_RELOCATABLE_LIB)) == 0
&& (old_flags & EF_PPC_RELOCATABLE) != 0)
@@ -1450,7 +1442,7 @@ ppc_elf_merge_private_bfd_data (ibfd, obfd)
error = true;
(*_bfd_error_handler)
(_("%s: compiled normally and linked with modules compiled with -mrelocatable"),
- bfd_get_filename (ibfd));
+ bfd_archive_filename (ibfd));
}
/* The output is -mrelocatable-lib iff both the input files are. */
@@ -1476,7 +1468,7 @@ ppc_elf_merge_private_bfd_data (ibfd, obfd)
error = true;
(*_bfd_error_handler)
(_("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
- bfd_get_filename (ibfd), (long) new_flags, (long) old_flags);
+ bfd_archive_filename (ibfd), (long) new_flags, (long) old_flags);
}
if (error)
@@ -1786,6 +1778,8 @@ ppc_elf_adjust_dynamic_symbol (info, h)
return true;
}
+ else
+ h->plt.offset = (bfd_vma) -1;
/* If this is a weak symbol, and there is a real definition, the
processor independent code will have arranged for us to see the
@@ -1875,14 +1869,13 @@ ppc_elf_adjust_dynamic_symbol (info, h)
static boolean
ppc_elf_size_dynamic_sections (output_bfd, info)
- bfd *output_bfd;
+ bfd *output_bfd ATTRIBUTE_UNUSED;
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");
@@ -1927,7 +1920,6 @@ ppc_elf_size_dynamic_sections (output_bfd, info)
memory for them. */
plt = false;
relocs = false;
- reltext = false;
for (s = dynobj->sections; s != NULL; s = s->next)
{
const char *name;
@@ -1973,22 +1965,9 @@ ppc_elf_size_dynamic_sections (output_bfd, info)
}
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;
@@ -2021,37 +2000,40 @@ ppc_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. */
- if (! info->shared)
+#define add_dynamic_entry(TAG, VAL) \
+ bfd_elf32_add_dynamic_entry (info, (bfd_vma) (TAG), (bfd_vma) (VAL))
+
+ if (!info->shared)
{
- if (! bfd_elf32_add_dynamic_entry (info, DT_DEBUG, 0))
+ if (!add_dynamic_entry (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))
+ if (!add_dynamic_entry (DT_PLTGOT, 0)
+ || !add_dynamic_entry (DT_PLTRELSZ, 0)
+ || !add_dynamic_entry (DT_PLTREL, DT_RELA)
+ || !add_dynamic_entry (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)))
+ if (!add_dynamic_entry (DT_RELA, 0)
+ || !add_dynamic_entry (DT_RELASZ, 0)
+ || !add_dynamic_entry (DT_RELAENT, sizeof (Elf32_External_Rela)))
return false;
}
- if (reltext)
+ if ((info->flags & DF_TEXTREL) != 0)
{
- if (! bfd_elf32_add_dynamic_entry (info, DT_TEXTREL, 0))
+ if (!add_dynamic_entry (DT_TEXTREL, 0))
return false;
info->flags |= DF_TEXTREL;
}
}
+#undef add_dynamic_entry
return true;
}
@@ -2085,7 +2067,7 @@ ppc_elf_check_relocs (abfd, info, sec, relocs)
#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));
+ bfd_archive_filename (abfd));
#endif
/* Create the linker generated sections all the time so that the
@@ -2185,7 +2167,7 @@ ppc_elf_check_relocs (abfd, info, sec, relocs)
if (h != NULL)
{
- if (h->got.refcount == -1)
+ if (h->got.refcount == 0)
{
/* Make sure this symbol is output as a dynamic symbol. */
if (h->dynindx == -1)
@@ -2196,28 +2178,25 @@ ppc_elf_check_relocs (abfd, info, sec, relocs)
sgot->_raw_size += 4;
/* Allocate relocation space. */
srelgot->_raw_size += sizeof (Elf32_External_Rela);
-
- h->got.refcount = 1;
}
- else
- h->got.refcount++;
+ h->got.refcount++;
}
else
{
/* This is a global offset table entry for a local symbol. */
if (local_got_refcounts == NULL)
{
- size_t size;
+ bfd_size_type size;
- size = symtab_hdr->sh_info * sizeof (bfd_signed_vma);
- local_got_refcounts = (bfd_signed_vma *)
- bfd_alloc (abfd, size);
+ size = symtab_hdr->sh_info;
+ size *= sizeof (bfd_signed_vma);
+ local_got_refcounts
+ = (bfd_signed_vma *) bfd_zalloc (abfd, size);
if (local_got_refcounts == NULL)
return false;
elf_local_got_refcounts (abfd) = local_got_refcounts;
- memset (local_got_refcounts, -1, size);
}
- if (local_got_refcounts[r_symndx] == -1)
+ if (local_got_refcounts[r_symndx] == 0)
{
sgot->_raw_size += 4;
@@ -2226,11 +2205,8 @@ ppc_elf_check_relocs (abfd, info, sec, relocs)
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]++;
+ local_got_refcounts[r_symndx]++;
}
break;
@@ -2240,7 +2216,7 @@ ppc_elf_check_relocs (abfd, info, sec, relocs)
{
((*_bfd_error_handler)
(_("%s: relocation %s cannot be used when making a shared object"),
- bfd_get_filename (abfd), "R_PPC_EMB_SDAI16"));
+ bfd_archive_filename (abfd), "R_PPC_EMB_SDAI16"));
return false;
}
@@ -2274,7 +2250,7 @@ ppc_elf_check_relocs (abfd, info, sec, relocs)
{
((*_bfd_error_handler)
(_("%s: relocation %s cannot be used when making a shared object"),
- bfd_get_filename (abfd), "R_PPC_EMB_SDA2I16"));
+ bfd_archive_filename (abfd), "R_PPC_EMB_SDA2I16"));
return false;
}
@@ -2309,7 +2285,7 @@ ppc_elf_check_relocs (abfd, info, sec, relocs)
{
((*_bfd_error_handler)
(_("%s: relocation %s cannot be used when making a shared object"),
- bfd_get_filename (abfd),
+ bfd_archive_filename (abfd),
ppc_elf_howto_table[(int) ELF32_R_TYPE (rel->r_info)]->name));
return false;
}
@@ -2343,13 +2319,8 @@ ppc_elf_check_relocs (abfd, info, sec, relocs)
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++;
+ h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
+ h->plt.refcount++;
break;
/* The following relocations don't need to propagate the
@@ -2430,6 +2401,8 @@ ppc_elf_check_relocs (abfd, info, sec, relocs)
|| ! bfd_set_section_alignment (dynobj, sreloc, 2))
return false;
}
+ if (sec->flags & SEC_READONLY)
+ info->flags |= DF_TEXTREL;
}
sreloc->_raw_size += sizeof (Elf32_External_Rela);
@@ -2485,13 +2458,7 @@ ppc_elf_gc_mark_hook (abfd, info, rel, h, sym)
}
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 bfd_section_from_elf_index (abfd, sym->st_shndx);
}
return NULL;
@@ -2575,7 +2542,7 @@ ppc_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
{
if (sym->st_shndx == SHN_COMMON
&& !info->relocateable
- && sym->st_size <= (bfd_vma) bfd_get_gp_size (abfd))
+ && sym->st_size <= elf_gp_size (abfd))
{
/* Common symbols less than or equal to -G nn bytes are automatically
put into .sdata. */
@@ -2584,21 +2551,24 @@ ppc_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
if (!sdata->bss_section)
{
+ bfd_size_type amt;
+
/* 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)));
+ amt = sizeof (asection);
+ sdata->bss_section = (asection *) bfd_zalloc (abfd, amt);
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));
+ amt = sizeof (asymbol);
+ sdata->bss_section->symbol = (asymbol *) bfd_zalloc (abfd, amt);
+ amt = sizeof (asymbol *);
sdata->bss_section->symbol_ptr_ptr =
- (asymbol **) bfd_zalloc (abfd, sizeof (asymbol *));
+ (asymbol **) bfd_zalloc (abfd, amt);
if (sdata->bss_section->symbol == NULL
|| sdata->bss_section->symbol_ptr_ptr == NULL)
return false;
@@ -2702,7 +2672,7 @@ ppc_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 &~ (bfd_vma) 1));
/* If this is a -Bsymbolic link, and the symbol is defined
locally, we just want to emit a RELATIVE reloc. The entry in
@@ -2847,7 +2817,7 @@ ppc_elf_finish_dynamic_sections (output_bfd, info)
if (sgot)
{
unsigned char *contents = sgot->contents;
- bfd_put_32 (output_bfd, 0x4e800021 /* blrl */, contents);
+ bfd_put_32 (output_bfd, (bfd_vma) 0x4e800021 /* blrl */, contents);
if (sdyn == NULL)
bfd_put_32 (output_bfd, (bfd_vma) 0, contents+4);
@@ -2919,7 +2889,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
#ifdef DEBUG
fprintf (stderr, "ppc_elf_relocate_section called for %s section %s, %ld relocations%s\n",
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
bfd_section_name(input_bfd, input_section),
(long) input_section->reloc_count,
(info->relocateable) ? " (relocatable)" : "");
@@ -2958,7 +2928,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|| !ppc_elf_howto_table[(int) r_type])
{
(*_bfd_error_handler) (_("%s: unknown relocation type %d"),
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
(int) r_type);
bfd_set_error (bfd_error_bad_value);
@@ -3003,9 +2973,8 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
sec = local_sections[r_symndx];
sym_name = "<local symbol>";
- relocation = (sec->output_section->vma
- + sec->output_offset
- + sym->st_value);
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+ addend = rel->r_addend;
/* Relocs to local symbols are always resolved. */
will_become_local = 1;
}
@@ -3091,7 +3060,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
(*_bfd_error_handler)
(_("%s: warning: unresolvable relocation against symbol `%s' from %s section"),
- bfd_get_filename (input_bfd), h->root.root.string,
+ bfd_archive_filename (input_bfd), h->root.root.string,
bfd_get_section_name (input_bfd, input_section));
relocation = 0;
}
@@ -3102,7 +3071,9 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
}
else if (h->root.type == bfd_link_hash_undefweak)
relocation = 0;
- else if (info->shared && !info->symbolic && !info->no_undefined
+ else if (info->shared
+ && (!info->symbolic || info->allow_shlib_undefined)
+ && !info->no_undefined
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
relocation = 0;
else
@@ -3124,13 +3095,16 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
default:
(*_bfd_error_handler) (_("%s: unknown relocation type %d for symbol %s"),
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
(int) r_type, sym_name);
bfd_set_error (bfd_error_bad_value);
ret = false;
continue;
+ case (int) R_PPC_NONE:
+ continue;
+
/* Relocations that need no special processing. */
case (int) R_PPC_LOCAL24PC:
/* It makes no sense to point a local relocation
@@ -3166,7 +3140,6 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
/* 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:
@@ -3176,7 +3149,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
case (int) R_PPC_ADDR14:
case (int) R_PPC_UADDR32:
case (int) R_PPC_UADDR16:
- if (info->shared)
+ if (info->shared && r_symndx != 0)
{
Elf_Internal_Rela outrel;
boolean skip;
@@ -3212,22 +3185,11 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
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 =
+ _bfd_elf_section_offset (output_bfd, info, input_section,
+ rel->r_offset);
+ if (outrel.r_offset == (bfd_vma) -1)
+ skip = true;
outrel.r_offset += (input_section->output_section->vma
+ input_section->output_offset);
@@ -3325,7 +3287,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
insn &= ~BRANCH_PREDICT_BIT;
else
insn |= BRANCH_PREDICT_BIT;
- bfd_put_32 (output_bfd, insn, contents + offset);
+ bfd_put_32 (output_bfd, (bfd_vma) insn, contents + offset);
break;
/* branch not taken predicition relocations */
@@ -3336,7 +3298,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
insn |= BRANCH_PREDICT_BIT;
else
insn &= ~BRANCH_PREDICT_BIT;
- bfd_put_32 (output_bfd, insn, contents + offset);
+ bfd_put_32 (output_bfd, (bfd_vma) insn, contents + offset);
break;
/* GOT16 relocations */
@@ -3488,7 +3450,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
&& 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),
+ bfd_archive_filename (input_bfd),
sym_name,
ppc_elf_howto_table[(int) r_type]->name,
name);
@@ -3509,7 +3471,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_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),
+ bfd_archive_filename (input_bfd),
sym_name,
ppc_elf_howto_table[(int) r_type]->name,
name);
@@ -3559,7 +3521,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
else
{
(*_bfd_error_handler) (_("%s: The target (%s) of a %s relocation is in the wrong output section (%s)"),
- bfd_get_filename (input_bfd),
+ bfd_archive_filename (input_bfd),
sym_name,
ppc_elf_howto_table[(int) r_type]->name,
name);
@@ -3573,7 +3535,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{ /* 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);
+ bfd_put_32 (output_bfd, (bfd_vma) insn, contents + offset);
}
}
break;
@@ -3625,7 +3587,7 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
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),
+ bfd_archive_filename (input_bfd),
ppc_elf_howto_table[(int) r_type]->name,
sym_name);
@@ -3709,6 +3671,90 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
return ret;
}
+
+static enum elf_reloc_type_class
+ppc_elf_reloc_type_class (rela)
+ const Elf_Internal_Rela *rela;
+{
+ switch ((int) ELF32_R_TYPE (rela->r_info))
+ {
+ case R_PPC_RELATIVE:
+ return reloc_class_relative;
+ case R_PPC_REL24:
+ case R_PPC_ADDR24:
+ case R_PPC_JMP_SLOT:
+ return reloc_class_plt;
+ case R_PPC_COPY:
+ return reloc_class_copy;
+ default:
+ return reloc_class_normal;
+ }
+}
+
+/* Support for core dump NOTE sections */
+static boolean
+ppc_elf_grok_prstatus (abfd, note)
+ bfd *abfd;
+ Elf_Internal_Note *note;
+{
+ int offset;
+ unsigned int raw_size;
+
+ switch (note->descsz)
+ {
+ default:
+ return false;
+
+ case 268: /* Linux/PPC */
+ /* pr_cursig */
+ elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
+
+ /* pr_pid */
+ elf_tdata (abfd)->core_pid = bfd_get_32 (abfd, note->descdata + 24);
+
+ /* pr_reg */
+ offset = 72;
+ raw_size = 192;
+
+ break;
+ }
+
+ /* Make a ".reg/999" section. */
+ return _bfd_elfcore_make_pseudosection (abfd, ".reg",
+ raw_size, note->descpos + offset);
+}
+
+static boolean
+ppc_elf_grok_psinfo (abfd, note)
+ bfd *abfd;
+ Elf_Internal_Note *note;
+{
+ switch (note->descsz)
+ {
+ default:
+ return false;
+
+ case 128: /* Linux/PPC elf_prpsinfo */
+ elf_tdata (abfd)->core_program
+ = _bfd_elfcore_strndup (abfd, note->descdata + 32, 16);
+ elf_tdata (abfd)->core_command
+ = _bfd_elfcore_strndup (abfd, note->descdata + 48, 80);
+ }
+
+ /* 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;
+}
#define TARGET_LITTLE_SYM bfd_elf32_powerpcle_vec
#define TARGET_LITTLE_NAME "elf32-powerpcle"
@@ -3730,10 +3776,10 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
#define elf_backend_plt_not_loaded 1
#define elf_backend_got_symbol_offset 4
#define elf_backend_can_gc_sections 1
+#define elf_backend_can_refcount 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
@@ -3754,5 +3800,8 @@ ppc_elf_relocate_section (output_bfd, info, input_bfd, input_section,
#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
+#define elf_backend_grok_prstatus ppc_elf_grok_prstatus
+#define elf_backend_grok_psinfo ppc_elf_grok_psinfo
+#define elf_backend_reloc_type_class ppc_elf_reloc_type_class
#include "elf32-target.h"
diff --git a/contrib/binutils/bfd/elf32-sparc.c b/contrib/binutils/bfd/elf32-sparc.c
index 091cd39..f0f9746 100644
--- a/contrib/binutils/bfd/elf32-sparc.c
+++ b/contrib/binutils/bfd/elf32-sparc.c
@@ -52,6 +52,14 @@ static boolean elf32_sparc_object_p
PARAMS ((bfd *));
static void elf32_sparc_final_write_processing
PARAMS ((bfd *, boolean));
+static enum elf_reloc_type_class elf32_sparc_reloc_type_class
+ PARAMS ((const Elf_Internal_Rela *));
+static asection * elf32_sparc_gc_mark_hook
+ PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *,
+ struct elf_link_hash_entry *, Elf_Internal_Sym *));
+static boolean elf32_sparc_gc_sweep_hook
+ PARAMS ((bfd *, struct bfd_link_info *, asection *,
+ const Elf_Internal_Rela *));
/* The relocation "howto" table. */
@@ -68,7 +76,7 @@ reloc_howto_type _bfd_sparc_elf_howto_table[] =
HOWTO(R_SPARC_32, 0,2,32,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_32", false,0,0xffffffff,true),
HOWTO(R_SPARC_DISP8, 0,0, 8,true, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_DISP8", false,0,0x000000ff,true),
HOWTO(R_SPARC_DISP16, 0,1,16,true, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_DISP16", false,0,0x0000ffff,true),
- HOWTO(R_SPARC_DISP32, 0,2,32,true, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_DISP32", false,0,0x00ffffff,true),
+ HOWTO(R_SPARC_DISP32, 0,2,32,true, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_DISP32", false,0,0xffffffff,true),
HOWTO(R_SPARC_WDISP30, 2,2,30,true, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_WDISP30", false,0,0x3fffffff,true),
HOWTO(R_SPARC_WDISP22, 2,2,22,true, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_WDISP22", false,0,0x003fffff,true),
HOWTO(R_SPARC_HI22, 10,2,22,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_HI22", false,0,0x003fffff,true),
@@ -86,7 +94,7 @@ reloc_howto_type _bfd_sparc_elf_howto_table[] =
HOWTO(R_SPARC_JMP_SLOT, 0,0,00,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_JMP_SLOT",false,0,0x00000000,true),
HOWTO(R_SPARC_RELATIVE, 0,0,00,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_RELATIVE",false,0,0x00000000,true),
HOWTO(R_SPARC_UA32, 0,2,32,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_UA32", false,0,0xffffffff,true),
- HOWTO(R_SPARC_PLT32, 0,0,00,false,0,complain_overflow_dont, sparc_elf_notsupported_reloc, "R_SPARC_PLT32", false,0,0x00000000,true),
+ HOWTO(R_SPARC_PLT32, 0,0,00,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_PLT32", false,0,0xffffffff,true),
HOWTO(R_SPARC_HIPLT22, 0,0,00,false,0,complain_overflow_dont, sparc_elf_notsupported_reloc, "R_SPARC_HIPLT22", false,0,0x00000000,true),
HOWTO(R_SPARC_LOPLT10, 0,0,00,false,0,complain_overflow_dont, sparc_elf_notsupported_reloc, "R_SPARC_LOPLT10", false,0,0x00000000,true),
HOWTO(R_SPARC_PCPLT32, 0,0,00,false,0,complain_overflow_dont, sparc_elf_notsupported_reloc, "R_SPARC_PCPLT32", false,0,0x00000000,true),
@@ -120,7 +128,7 @@ reloc_howto_type _bfd_sparc_elf_howto_table[] =
HOWTO(R_SPARC_NONE, 0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", false,0,0x00000000,true),
HOWTO(R_SPARC_NONE, 0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", false,0,0x00000000,true),
HOWTO(R_SPARC_NONE, 0,0, 0,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_NONE", false,0,0x00000000,true),
- HOWTO(R_SPARC_UA64, 0,4,64,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_UA64", false,0,(~ (bfd_vma)0), true),
+ HOWTO(R_SPARC_UA64, 0,0, 0,false,0,complain_overflow_dont, sparc_elf_notsupported_reloc, "R_SPARC_UA64", false,0,0x00000000,true),
HOWTO(R_SPARC_UA16, 0,1,16,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_UA16", false,0,0x0000ffff,true),
HOWTO(R_SPARC_REV32, 0,2,32,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_REV32", false,0,0xffffffff,true),
};
@@ -134,10 +142,11 @@ struct elf_reloc_map {
unsigned char elf_reloc_val;
};
-static CONST struct elf_reloc_map sparc_reloc_map[] =
+static const struct elf_reloc_map sparc_reloc_map[] =
{
{ BFD_RELOC_NONE, R_SPARC_NONE, },
{ BFD_RELOC_16, R_SPARC_16, },
+ { BFD_RELOC_16_PCREL, R_SPARC_DISP16 },
{ BFD_RELOC_8, R_SPARC_8 },
{ BFD_RELOC_8_PCREL, R_SPARC_DISP8 },
{ BFD_RELOC_CTOR, R_SPARC_32 },
@@ -146,6 +155,7 @@ static CONST struct elf_reloc_map sparc_reloc_map[] =
{ BFD_RELOC_HI22, R_SPARC_HI22 },
{ BFD_RELOC_LO10, R_SPARC_LO10, },
{ BFD_RELOC_32_PCREL_S2, R_SPARC_WDISP30 },
+ { BFD_RELOC_SPARC_PLT32, R_SPARC_PLT32 },
{ BFD_RELOC_SPARC22, R_SPARC_22 },
{ BFD_RELOC_SPARC13, R_SPARC_13 },
{ BFD_RELOC_SPARC_GOT10, R_SPARC_GOT10 },
@@ -447,10 +457,11 @@ elf32_sparc_check_relocs (abfd, info, sec, relocs)
symbol. */
if (local_got_offsets == NULL)
{
- size_t size;
+ bfd_size_type size;
register unsigned int i;
- size = symtab_hdr->sh_info * sizeof (bfd_vma);
+ size = symtab_hdr->sh_info;
+ size *= sizeof (bfd_vma);
local_got_offsets = (bfd_vma *) bfd_alloc (abfd, size);
if (local_got_offsets == NULL)
return false;
@@ -485,6 +496,7 @@ elf32_sparc_check_relocs (abfd, info, sec, relocs)
break;
+ case R_SPARC_PLT32:
case R_SPARC_WPLT30:
/* This symbol requires a procedure linkage table entry. We
actually build the entry in adjust_dynamic_symbol,
@@ -498,6 +510,8 @@ elf32_sparc_check_relocs (abfd, info, sec, relocs)
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 (ELF32_R_TYPE (rel->r_info) != R_SPARC_WPLT30)
+ goto r_sparc_plt32;
break;
}
@@ -510,6 +524,8 @@ elf32_sparc_check_relocs (abfd, info, sec, relocs)
h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
+ if (ELF32_R_TYPE (rel->r_info) != R_SPARC_WPLT30)
+ goto r_sparc_plt32;
break;
case R_SPARC_PC10:
@@ -554,11 +570,11 @@ elf32_sparc_check_relocs (abfd, info, sec, relocs)
case R_SPARC_LO10:
case R_SPARC_UA16:
case R_SPARC_UA32:
- case R_SPARC_UA64:
if (h != NULL)
h->elf_link_hash_flags |= ELF_LINK_NON_GOT_REF;
- if (info->shared)
+ r_sparc_plt32:
+ if (info->shared && (sec->flags & SEC_ALLOC))
{
/* When creating a shared object, we must copy these
relocs into the output file. We create a reloc
@@ -593,6 +609,8 @@ elf32_sparc_check_relocs (abfd, info, sec, relocs)
|| ! bfd_set_section_alignment (dynobj, sreloc, 2))
return false;
}
+ if (sec->flags & SEC_READONLY)
+ info->flags |= DF_TEXTREL;
}
sreloc->_raw_size += sizeof (Elf32_External_Rela);
@@ -652,14 +670,8 @@ elf32_sparc_gc_mark_hook (abfd, info, rel, h, sym)
}
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 bfd_section_from_elf_index (abfd, sym->st_shndx);
+ }
return NULL;
}
@@ -910,12 +922,11 @@ elf32_sparc_adjust_dynamic_symbol (info, h)
static boolean
elf32_sparc_size_dynamic_sections (output_bfd, info)
- bfd *output_bfd;
+ bfd *output_bfd ATTRIBUTE_UNUSED;
struct bfd_link_info *info;
{
bfd *dynobj;
asection *s;
- boolean reltext;
boolean relplt;
dynobj = elf_hash_table (info)->dynobj;
@@ -953,7 +964,6 @@ elf32_sparc_size_dynamic_sections (output_bfd, info)
/* The check_relocs and adjust_dynamic_symbol entry points have
determined the sizes of the various dynamic sections. Allocate
memory for them. */
- reltext = false;
relplt = false;
for (s = dynobj->sections; s != NULL; s = s->next)
{
@@ -986,19 +996,6 @@ elf32_sparc_size_dynamic_sections (output_bfd, info)
}
else
{
- const char *outname;
- asection *target;
-
- /* 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;
-
if (strcmp (name, ".rela.plt") == 0)
relplt = true;
@@ -1038,34 +1035,36 @@ elf32_sparc_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. */
- if (! info->shared)
+#define add_dynamic_entry(TAG, VAL) \
+ bfd_elf32_add_dynamic_entry (info, (bfd_vma) (TAG), (bfd_vma) (VAL))
+
+ if (!info->shared)
{
- if (! bfd_elf32_add_dynamic_entry (info, DT_DEBUG, 0))
+ if (!add_dynamic_entry (DT_DEBUG, 0))
return false;
}
if (relplt)
{
- 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))
+ if (!add_dynamic_entry (DT_PLTGOT, 0)
+ || !add_dynamic_entry (DT_PLTRELSZ, 0)
+ || !add_dynamic_entry (DT_PLTREL, DT_RELA)
+ || !add_dynamic_entry (DT_JMPREL, 0))
return false;
}
- 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)))
+ if (!add_dynamic_entry (DT_RELA, 0)
+ || !add_dynamic_entry (DT_RELASZ, 0)
+ || !add_dynamic_entry (DT_RELAENT, sizeof (Elf32_External_Rela)))
return false;
- if (reltext)
+ if (info->flags & DF_TEXTREL)
{
- if (! bfd_elf32_add_dynamic_entry (info, DT_TEXTREL, 0))
+ if (!add_dynamic_entry (DT_TEXTREL, 0))
return false;
- info->flags |= DF_TEXTREL;
}
}
+#undef add_dynamic_entry
return true;
}
@@ -1136,6 +1135,7 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
asection *sec;
bfd_vma relocation;
bfd_reloc_status_type r;
+ boolean is_plt = false;
r_type = ELF32_R_TYPE (rel->r_info);
@@ -1179,9 +1179,7 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
{
sym = local_syms + r_symndx;
sec = local_sections[r_symndx];
- relocation = (sec->output_section->vma
- + sec->output_offset
- + sym->st_value);
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
}
else
{
@@ -1193,7 +1191,8 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
|| h->root.type == bfd_link_hash_defweak)
{
sec = h->root.u.def.section;
- if ((r_type == R_SPARC_WPLT30
+ if (((r_type == R_SPARC_WPLT30
+ || r_type == R_SPARC_PLT32)
&& h->plt.offset != (bfd_vma) -1)
|| ((r_type == R_SPARC_GOT10
|| r_type == R_SPARC_GOT13
@@ -1223,11 +1222,18 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
|| r_type == R_SPARC_LO10
|| r_type == R_SPARC_UA16
|| r_type == R_SPARC_UA32
- || r_type == R_SPARC_UA64
|| ((r_type == R_SPARC_PC10
|| r_type == R_SPARC_PC22)
&& strcmp (h->root.root.string,
- "_GLOBAL_OFFSET_TABLE_") != 0))))
+ "_GLOBAL_OFFSET_TABLE_") != 0))
+ && ((input_section->flags & SEC_ALLOC) != 0
+ /* DWARF will emit R_SPARC_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
+ && (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_DYNAMIC) != 0))))
{
/* In these cases, we don't need the relocation
value. We check specially because in some
@@ -1241,7 +1247,8 @@ 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->allow_shlib_undefined)
&& !info->no_undefined
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
relocation = 0;
@@ -1354,6 +1361,13 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
break;
+ case R_SPARC_PLT32:
+ if (h == NULL || h->plt.offset == (bfd_vma) -1)
+ {
+ r_type = R_SPARC_32;
+ goto r_sparc_plt32;
+ }
+ /* Fall through. */
case R_SPARC_WPLT30:
/* Relocation is to the entry for this symbol in the
procedure linkage table. */
@@ -1382,6 +1396,12 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
relocation = (splt->output_section->vma
+ splt->output_offset
+ h->plt.offset);
+ if (r_type == R_SPARC_PLT32)
+ {
+ r_type = R_SPARC_32;
+ is_plt = true;
+ goto r_sparc_plt32;
+ }
break;
case R_SPARC_PC10:
@@ -1412,8 +1432,10 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
case R_SPARC_LO10:
case R_SPARC_UA16:
case R_SPARC_UA32:
- case R_SPARC_UA64:
- if (info->shared)
+ r_sparc_plt32:
+ if (info->shared
+ && r_symndx != 0
+ && (input_section->flags & SEC_ALLOC))
{
Elf_Internal_Rela outrel;
boolean skip;
@@ -1444,30 +1466,41 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
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 =
+ _bfd_elf_section_offset (output_bfd, info, input_section,
+ rel->r_offset);
+ if (outrel.r_offset == (bfd_vma) -1)
+ skip = true;
outrel.r_offset += (input_section->output_section->vma
+ input_section->output_offset);
+ /* Optimize unaligned reloc usage now that we know where
+ it finally resides. */
+ switch (r_type)
+ {
+ case R_SPARC_16:
+ if (outrel.r_offset & 1)
+ r_type = R_SPARC_UA16;
+ break;
+ case R_SPARC_UA16:
+ if (!(outrel.r_offset & 1))
+ r_type = R_SPARC_16;
+ break;
+ case R_SPARC_32:
+ if (outrel.r_offset & 3)
+ r_type = R_SPARC_UA32;
+ break;
+ case R_SPARC_UA32:
+ if (!(outrel.r_offset & 3))
+ r_type = R_SPARC_32;
+ break;
+ }
+
if (skip)
memset (&outrel, 0, sizeof outrel);
/* h->dynindx may be -1 if the symbol was marked to
become local. */
- else if (h != NULL
+ else if (h != NULL && ! is_plt
&& ((! info->symbolic && h->dynindx != -1)
|| (h->elf_link_hash_flags
& ELF_LINK_HASH_DEF_REGULAR) == 0))
@@ -1487,7 +1520,9 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
{
long indx;
- if (h == NULL)
+ if (is_plt)
+ sec = splt;
+ else if (h == NULL)
sec = local_sections[r_symndx];
else
{
@@ -1517,7 +1552,7 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
BFD_FAIL ();
(*_bfd_error_handler)
(_("%s: probably compiled without -fPIC?"),
- bfd_get_filename (input_bfd));
+ bfd_archive_filename (input_bfd));
bfd_set_error (bfd_error_bad_value);
return false;
}
@@ -1535,12 +1570,8 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
++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_SPARC_RELATIVE)
- continue;
+ need to do anything now. */
+ continue;
}
break;
@@ -1661,7 +1692,7 @@ elf32_sparc_relocate_section (output_bfd, info, input_bfd, input_section,
|| reg == G0 || reg == O7)
break;
- bfd_put_32 (input_bfd, INSN_NOP,
+ bfd_put_32 (input_bfd, (bfd_vma) INSN_NOP,
contents + rel->r_offset + 4);
}
@@ -1748,7 +1779,7 @@ elf32_sparc_finish_dynamic_symbol (output_bfd, info, h, sym)
(PLT_ENTRY_WORD1
+ (((- (h->plt.offset + 4)) >> 2) & 0x3fffff)),
splt->contents + h->plt.offset + 4);
- bfd_put_32 (output_bfd, PLT_ENTRY_WORD2,
+ bfd_put_32 (output_bfd, (bfd_vma) PLT_ENTRY_WORD2,
splt->contents + h->plt.offset + 8);
/* Fill in the entry in the .rela.plt section. */
@@ -1791,7 +1822,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 &~ (bfd_vma) 1));
/* If this is a -Bsymbolic link, and the symbol is defined
locally, we just want to emit a RELATIVE reloc. Likewise if
@@ -1917,7 +1948,7 @@ elf32_sparc_finish_dynamic_sections (output_bfd, info)
if (splt->_raw_size > 0)
{
memset (splt->contents, 0, 4 * PLT_ENTRY_SIZE);
- bfd_put_32 (output_bfd, SPARC_NOP,
+ bfd_put_32 (output_bfd, (bfd_vma) SPARC_NOP,
splt->contents + splt->_raw_size - 4);
}
@@ -1974,7 +2005,7 @@ 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"),
- bfd_get_filename (ibfd));
+ bfd_archive_filename (ibfd));
}
else if ((ibfd->flags & DYNAMIC) == 0)
{
@@ -1988,7 +2019,7 @@ elf32_sparc_merge_private_bfd_data (ibfd, obfd)
{
(*_bfd_error_handler)
(_("%s: linking little endian files with big endian files"),
- bfd_get_filename (ibfd));
+ bfd_archive_filename (ibfd));
error = true;
}
previous_ibfd_e_flags = elf_elfheader (ibfd)->e_flags & EF_SPARC_LEDATA;
@@ -2024,7 +2055,7 @@ elf32_sparc_object_p (abfd)
}
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);
+ bfd_mach_sparc_sparclite_le);
else
return bfd_default_set_arch_mach (abfd, bfd_arch_sparc, bfd_mach_sparc);
}
@@ -2066,6 +2097,23 @@ elf32_sparc_final_write_processing (abfd, linker)
break;
}
}
+
+static enum elf_reloc_type_class
+elf32_sparc_reloc_type_class (rela)
+ const Elf_Internal_Rela *rela;
+{
+ switch ((int) ELF32_R_TYPE (rela->r_info))
+ {
+ case R_SPARC_RELATIVE:
+ return reloc_class_relative;
+ case R_SPARC_JMP_SLOT:
+ return reloc_class_plt;
+ case R_SPARC_COPY:
+ return reloc_class_copy;
+ default:
+ return reloc_class_normal;
+ }
+}
#define TARGET_BIG_SYM bfd_elf32_sparc_vec
#define TARGET_BIG_NAME "elf32-sparc"
@@ -2096,6 +2144,7 @@ elf32_sparc_final_write_processing (abfd, linker)
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_reloc_type_class elf32_sparc_reloc_type_class
#define elf_backend_can_gc_sections 1
#define elf_backend_want_got_plt 0
diff --git a/contrib/binutils/bfd/elf64-gen.c b/contrib/binutils/bfd/elf64-gen.c
index db68a07..a58f6ac 100644
--- a/contrib/binutils/bfd/elf64-gen.c
+++ b/contrib/binutils/bfd/elf64-gen.c
@@ -40,6 +40,13 @@ static reloc_howto_type dummy =
0, /* dst_mask */
false); /* pcrel_offset */
+static void elf_generic_info_to_howto
+ PARAMS ((bfd *, arelent *, Elf64_Internal_Rela *));
+static void elf_generic_info_to_howto_rel
+ PARAMS ((bfd *, arelent *, Elf64_Internal_Rel *));
+static boolean elf64_generic_link_add_symbols
+ PARAMS ((bfd *, struct bfd_link_info *));
+
static void
elf_generic_info_to_howto (abfd, bfd_reloc, elf_reloc)
bfd *abfd ATTRIBUTE_UNUSED;
@@ -72,15 +79,9 @@ elf64_generic_link_add_symbols (abfd, info)
Elf_Internal_Ehdr *ehdrp;
ehdrp = elf_elfheader (abfd);
- if (abfd->my_archive)
- (*_bfd_error_handler) (_("%s(%s): Relocations in generic ELF (EM: %d)"),
- bfd_get_filename (abfd->my_archive),
- bfd_get_filename (abfd),
- ehdrp->e_machine);
- else
- (*_bfd_error_handler) (_("%s: Relocations in generic ELF (EM: %d)"),
- bfd_get_filename (abfd),
- ehdrp->e_machine);
+ (*_bfd_error_handler) (_("%s: Relocations in generic ELF (EM: %d)"),
+ bfd_archive_filename (abfd),
+ ehdrp->e_machine);
bfd_set_error (bfd_error_wrong_format);
return false;
diff --git a/contrib/binutils/bfd/elf64-ppc.c b/contrib/binutils/bfd/elf64-ppc.c
new file mode 100644
index 0000000..da339bb
--- /dev/null
+++ b/contrib/binutils/bfd/elf64-ppc.c
@@ -0,0 +1,4463 @@
+/* PowerPC64-specific support for 64-bit ELF.
+ Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Written by Linus Nordberg, Swox AB <info@swox.com>,
+ based on elf32-ppc.c by Ian Lance Taylor.
+
+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 the 64-bit PowerPC ELF ABI. It is also based
+ on the file elf32-ppc.c. */
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "bfdlink.h"
+#include "libbfd.h"
+#include "elf-bfd.h"
+#include "elf/ppc.h"
+#include "elf64-ppc.h"
+
+#define USE_RELA /* we want RELA relocations, not REL. */
+
+
+static void ppc_howto_init
+ PARAMS ((void));
+static reloc_howto_type *ppc64_elf_reloc_type_lookup
+ PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));
+static void ppc64_elf_info_to_howto
+ PARAMS ((bfd *abfd, arelent *cache_ptr, Elf64_Internal_Rela *dst));
+static bfd_reloc_status_type ppc64_elf_addr16_ha_reloc
+ PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+static boolean ppc64_elf_set_private_flags
+ PARAMS ((bfd *, flagword));
+static boolean ppc64_elf_merge_private_bfd_data
+ PARAMS ((bfd *, bfd *));
+static boolean ppc64_elf_section_from_shdr
+ PARAMS ((bfd *, Elf64_Internal_Shdr *, char *));
+static struct bfd_hash_entry *link_hash_newfunc
+ PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
+static struct bfd_link_hash_table *ppc64_elf_link_hash_table_create
+ PARAMS ((bfd *));
+static boolean create_got_section
+ PARAMS ((bfd *, struct bfd_link_info *));
+static boolean ppc64_elf_create_dynamic_sections
+ PARAMS ((bfd *, struct bfd_link_info *));
+static void ppc64_elf_copy_indirect_symbol
+ PARAMS ((struct elf_link_hash_entry *, struct elf_link_hash_entry *));
+static boolean ppc64_elf_check_relocs
+ PARAMS ((bfd *, struct bfd_link_info *, asection *,
+ const Elf_Internal_Rela *));
+static asection * ppc64_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 ppc64_elf_gc_sweep_hook
+ PARAMS ((bfd *abfd, struct bfd_link_info *info, asection *sec,
+ const Elf_Internal_Rela *relocs));
+static boolean func_desc_adjust
+ PARAMS ((struct elf_link_hash_entry *, PTR));
+static boolean ppc64_elf_func_desc_adjust
+ PARAMS ((bfd *, struct bfd_link_info *));
+static boolean ppc64_elf_adjust_dynamic_symbol
+ PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
+static void ppc64_elf_hide_symbol
+ PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *, boolean));
+static boolean allocate_dynrelocs
+ PARAMS ((struct elf_link_hash_entry *, PTR));
+static boolean readonly_dynrelocs
+ PARAMS ((struct elf_link_hash_entry *, PTR));
+static enum elf_reloc_type_class ppc64_elf_reloc_type_class
+ PARAMS ((const Elf_Internal_Rela *));
+static boolean ppc64_elf_size_dynamic_sections
+ PARAMS ((bfd *, struct bfd_link_info *));
+static bfd_byte *build_plt_stub
+ PARAMS ((bfd *, bfd_byte *, int, int));
+static boolean build_one_stub
+ PARAMS ((struct elf_link_hash_entry *, PTR));
+static boolean ppc64_elf_fake_sections
+ PARAMS ((bfd *, Elf64_Internal_Shdr *, asection *));
+static boolean ppc64_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 ppc64_elf_finish_dynamic_symbol
+ PARAMS ((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
+ Elf_Internal_Sym *));
+static boolean ppc64_elf_finish_dynamic_sections
+ PARAMS ((bfd *, struct bfd_link_info *));
+
+
+/* Mask to set RA in memory instructions. */
+#define RA_REGISTER_MASK 0x001f0000
+
+/* Value to shift register by to insert RA. */
+#define RA_REGISTER_SHIFT 16
+
+/* 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 24
+
+/* The initial size of the plt reserved for the dynamic linker. */
+#define PLT_INITIAL_ENTRY_SIZE PLT_ENTRY_SIZE
+
+/* TOC base pointers offset from start of TOC. */
+#define TOC_BASE_OFF (0x8000)
+
+/* .plt call stub instructions. */
+#define ADDIS_R12_R2 0x3d820000 /* addis %r12,%r2,xxx@ha */
+#define STD_R2_40R1 0xf8410028 /* std %r2,40(%r1) */
+#define LD_R11_0R12 0xe96c0000 /* ld %r11,xxx+0@l(%r12) */
+#define LD_R2_0R12 0xe84c0000 /* ld %r2,xxx+8@l(%r12) */
+#define MTCTR_R11 0x7d6903a6 /* mtctr %r11 */
+ /* ld %r11,xxx+16@l(%r12) */
+#define BCTR 0x4e800420 /* bctr */
+
+/* The normal stub is this size. */
+#define PLT_CALL_STUB_SIZE (7*4)
+
+/* But sometimes the .plt entry crosses a 64k boundary, and we need
+ to adjust the high word with this insn. */
+#define ADDIS_R12_R12_1 0x3d8c0001 /* addis %r12,%r12,1 */
+
+/* The .glink fixup call stub is the same as the .plt call stub, but
+ the first instruction restores r2, and the std is omitted. */
+#define LD_R2_40R1 0xe8410028 /* ld %r2,40(%r1) */
+
+/* Always allow this much space. */
+#define GLINK_CALL_STUB_SIZE (8*4)
+
+/* Pad with this. */
+#define NOP 0x60000000
+
+/* .glink entries for the first 32k functions are two instructions. */
+#define LI_R0_0 0x38000000 /* li %r0,0 */
+#define B_DOT 0x48000000 /* b . */
+
+/* After that, we need two instructions to load the index, followed by
+ a branch. */
+#define LIS_R0_0 0x3c000000 /* lis %r0,0 */
+#define ORI_R0_R0_0 0x60000000 /* ori %r0,%r0,0 */
+
+/* Since .opd is an array of descriptors and each entry will end up
+ with identical R_PPC64_RELATIVE relocs, there is really no need to
+ propagate .opd relocs; The dynamic linker should be taught to
+ relocate .opd without reloc entries. FIXME: the dynamic linker
+ will need to know where and how large .opd is via a couple of new
+ DT_PPC64_* tags, or perhaps just with one reloc that specifies the
+ start of .opd via its offset and the size via its addend. Also,
+ .opd should be trimmed of unused values. */
+#ifndef NO_OPD_RELOCS
+#define NO_OPD_RELOCS 0
+#endif
+
+/* Relocation HOWTO's. */
+static reloc_howto_type *ppc64_elf_howto_table[(int) R_PPC_max];
+
+static reloc_howto_type ppc64_elf_howto_raw[] = {
+ /* This reloc does nothing. */
+ HOWTO (R_PPC64_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_PPC64_NONE", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* A standard 32 bit relocation. */
+ HOWTO (R_PPC64_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_PPC64_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_PPC64_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_PPC64_ADDR24", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0x3fffffc, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* A standard 16 bit relocation. */
+ HOWTO (R_PPC64_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_PPC64_ADDR16", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* A 16 bit relocation without overflow. */
+ HOWTO (R_PPC64_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_PPC64_ADDR16_LO", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Bits 16-31 of an address. */
+ HOWTO (R_PPC64_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_PPC64_ADDR16_HI", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Bits 16-31 of an address, plus 1 if the contents of the low 16
+ bits, treated as a signed number, is negative. */
+ HOWTO (R_PPC64_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 */
+ ppc64_elf_addr16_ha_reloc, /* special_function */
+ "R_PPC64_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_PPC64_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_PPC64_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_PPC64_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_PPC64_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_PPC64_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_PPC64_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_PPC64_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_PPC64_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_PPC64_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_PPC64_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_PPC64_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_PPC64_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_PPC64_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_PPC64_REL14_BRNTAKEN",/* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xfffc, /* dst_mask */
+ true), /* pcrel_offset */
+
+ /* Like R_PPC64_ADDR16, but referring to the GOT table entry for the
+ symbol. */
+ HOWTO (R_PPC64_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_PPC64_GOT16", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Like R_PPC64_ADDR16_LO, but referring to the GOT table entry for
+ the symbol. */
+ HOWTO (R_PPC64_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_PPC64_GOT16_LO", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Like R_PPC64_ADDR16_HI, but referring to the GOT table entry for
+ the symbol. */
+ HOWTO (R_PPC64_GOT16_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_PPC64_GOT16_HI", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Like R_PPC64_ADDR16_HA, but referring to the GOT table entry for
+ the symbol. */
+ HOWTO (R_PPC64_GOT16_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 */
+ ppc64_elf_addr16_ha_reloc, /* special_function */
+ "R_PPC64_GOT16_HA", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* 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_PPC64_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_PPC64_COPY", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Like R_PPC64_ADDR64, but used when setting global offset table
+ entries. */
+ HOWTO (R_PPC64_GLOB_DAT, /* type */
+ 0, /* rightshift */
+ 4, /* size (0=byte, 1=short, 2=long, 4=64 bits) */
+ 64, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC64_GLOB_DAT", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffffffffffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Created by the link editor. Marks a procedure linkage table
+ entry for a symbol. */
+ HOWTO (R_PPC64_JMP_SLOT, /* 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_PPC64_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
+ doubleword64 is set to the load address of the object, plus the
+ addend. */
+ HOWTO (R_PPC64_RELATIVE, /* type */
+ 0, /* rightshift */
+ 4, /* size (0=byte, 1=short, 2=long, 4=64 bits) */
+ 64, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC64_RELATIVE", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffffffffffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Like R_PPC64_ADDR32, but may be unaligned. */
+ HOWTO (R_PPC64_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_PPC64_UADDR32", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Like R_PPC64_ADDR16, but may be unaligned. */
+ HOWTO (R_PPC64_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_PPC64_UADDR16", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* 32-bit PC relative. */
+ HOWTO (R_PPC64_REL32, /* type */
+ 0, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 32, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
+ /* FIXME: Verify. Was complain_overflow_bitfield. */
+ complain_overflow_signed, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC64_REL32", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffffffff, /* dst_mask */
+ true), /* pcrel_offset */
+
+ /* 32-bit relocation to the symbol's procedure linkage table. */
+ HOWTO (R_PPC64_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_PPC64_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: R_PPC64_PLTREL32 not supported. */
+ HOWTO (R_PPC64_PLTREL32, /* 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_PPC64_PLTREL32", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ true), /* pcrel_offset */
+
+ /* Like R_PPC64_ADDR16_LO, but referring to the PLT table entry for
+ the symbol. */
+ HOWTO (R_PPC64_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_PPC64_PLT16_LO", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Like R_PPC64_ADDR16_HI, but referring to the PLT table entry for
+ the symbol. */
+ HOWTO (R_PPC64_PLT16_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_PPC64_PLT16_HI", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Like R_PPC64_ADDR16_HA, but referring to the PLT table entry for
+ the symbol. */
+ HOWTO (R_PPC64_PLT16_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 */
+ ppc64_elf_addr16_ha_reloc, /* special_function */
+ "R_PPC64_PLT16_HA", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* 32-bit section relative relocation. */
+ /* FIXME: Verify R_PPC64_SECTOFF. Seems strange with size=2 and
+ dst_mask=0. */
+ HOWTO (R_PPC64_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_PPC64_SECTOFF", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ true), /* pcrel_offset */
+
+ /* 16-bit lower half section relative relocation. */
+ HOWTO (R_PPC64_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_PPC64_SECTOFF_LO", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* 16-bit upper half section relative relocation. */
+ HOWTO (R_PPC64_SECTOFF_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_PPC64_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_PPC64_SECTOFF_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 */
+ ppc64_elf_addr16_ha_reloc, /* special_function */
+ "R_PPC64_SECTOFF_HA", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Like R_PPC64_REL24 without touching the two least significant
+ bits. */
+ /* FIXME: Verify R_PPC64_ADDR30. */
+ HOWTO (R_PPC64_ADDR30, /* type */
+ 2, /* rightshift */
+ 2, /* size (0 = byte, 1 = short, 2 = long) */
+ 30, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC64_ADDR30", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xfffffffc, /* dst_mask */
+ true), /* pcrel_offset */
+
+ /* Relocs in the 64-bit PowerPC ELF ABI, not in the 32-bit ABI. */
+
+ /* A standard 64-bit relocation. */
+ HOWTO (R_PPC64_ADDR64, /* type */
+ 0, /* rightshift */
+ 4, /* size (0=byte, 1=short, 2=long, 4=64 bits) */
+ 64, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC64_ADDR64", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffffffffffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* The bits 32-47 of an address. */
+ HOWTO (R_PPC64_ADDR16_HIGHER, /* type */
+ 32, /* 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_PPC64_ADDR16_HIGHER", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* The bits 32-47 of an address, plus 1 if the contents of the low
+ 16 bits, treated as a signed number, is negative. */
+ HOWTO (R_PPC64_ADDR16_HIGHERA, /* type */
+ 32, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ ppc64_elf_addr16_ha_reloc, /* special_function */
+ "R_PPC64_ADDR16_HIGHERA", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* The bits 48-63 of an address. */
+ HOWTO (R_PPC64_ADDR16_HIGHEST,/* type */
+ 48, /* 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_PPC64_ADDR16_HIGHEST", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* The bits 48-63 of an address, plus 1 if the contents of the low
+ 16 bits, treated as a signed number, is negative. */
+ HOWTO (R_PPC64_ADDR16_HIGHESTA,/* type */
+ 48, /* rightshift */
+ 1, /* size (0 = byte, 1 = short, 2 = long) */
+ 16, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ ppc64_elf_addr16_ha_reloc, /* special_function */
+ "R_PPC64_ADDR16_HIGHESTA", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Like ADDR64, but may be unaligned. */
+ HOWTO (R_PPC64_UADDR64, /* type */
+ 0, /* rightshift */
+ 4, /* size (0=byte, 1=short, 2=long, 4=64 bits) */
+ 64, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC64_UADDR64", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffffffffffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* 64-bit relative relocation. */
+ HOWTO (R_PPC64_REL64, /* type */
+ 0, /* rightshift */
+ 4, /* size (0=byte, 1=short, 2=long, 4=64 bits) */
+ 64, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC64_REL64", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffffffffffffffff, /* dst_mask */
+ true), /* pcrel_offset */
+
+ /* 64-bit relocation to the symbol's procedure linkage table. */
+ HOWTO (R_PPC64_PLT64, /* type */
+ 0, /* rightshift */
+ 4, /* size (0=byte, 1=short, 2=long, 4=64 bits) */
+ 64, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC64_PLT64", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* 64-bit PC relative relocation to the symbol's procedure linkage
+ table. */
+ /* FIXME: R_PPC64_PLTREL64 not supported. */
+ HOWTO (R_PPC64_PLTREL64, /* type */
+ 0, /* rightshift */
+ 4, /* size (0=byte, 1=short, 2=long, 4=64 bits) */
+ 64, /* bitsize */
+ true, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_dont, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC64_PLTREL64", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ true), /* pcrel_offset */
+
+ /* 16 bit TOC-relative relocation. */
+
+ /* R_PPC64_TOC16 47 half16* S + A - .TOC. */
+ HOWTO (R_PPC64_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_PPC64_TOC16", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* 16 bit TOC-relative relocation without overflow. */
+
+ /* R_PPC64_TOC16_LO 48 half16 #lo (S + A - .TOC.) */
+ HOWTO (R_PPC64_TOC16_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_PPC64_TOC16_LO", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* 16 bit TOC-relative relocation, high 16 bits. */
+
+ /* R_PPC64_TOC16_HI 49 half16 #hi (S + A - .TOC.) */
+ HOWTO (R_PPC64_TOC16_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_PPC64_TOC16_HI", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* 16 bit TOC-relative relocation, high 16 bits, plus 1 if the
+ contents of the low 16 bits, treated as a signed number, is
+ negative. */
+
+ /* R_PPC64_TOC16_HA 50 half16 #ha (S + A - .TOC.) */
+ HOWTO (R_PPC64_TOC16_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 */
+ ppc64_elf_addr16_ha_reloc, /* special_function */
+ "R_PPC64_TOC16_HA", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* 64-bit relocation; insert value of TOC base (.TOC.). */
+
+ /* R_PPC64_TOC 51 doubleword64 .TOC. */
+ HOWTO (R_PPC64_TOC, /* type */
+ 0, /* rightshift */
+ 4, /* size (0=byte, 1=short, 2=long, 4=64 bits) */
+ 64, /* bitsize */
+ false, /* pc_relative */
+ 0, /* bitpos */
+ complain_overflow_bitfield, /* complain_on_overflow */
+ bfd_elf_generic_reloc, /* special_function */
+ "R_PPC64_TOC", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffffffffffffffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Like R_PPC64_GOT16, but also informs the link editor that the
+ value to relocate may (!) refer to a PLT entry which the link
+ editor (a) may replace with the symbol value. If the link editor
+ is unable to fully resolve the symbol, it may (b) create a PLT
+ entry and store the address to the new PLT entry in the GOT.
+ This permits lazy resolution of function symbols at run time.
+ The link editor may also skip all of this and just (c) emit a
+ R_PPC64_GLOB_DAT to tie the symbol to the GOT entry. */
+ /* FIXME: R_PPC64_PLTGOT16 not implemented. */
+ HOWTO (R_PPC64_PLTGOT16, /* 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_PPC64_PLTGOT16", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Like R_PPC64_PLTGOT16, but without overflow. */
+ /* FIXME: R_PPC64_PLTGOT16_LO not implemented. */
+ HOWTO (R_PPC64_PLTGOT16_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_PPC64_PLTGOT16_LO", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Like R_PPC64_PLT_GOT16, but using bits 16-31 of the address. */
+ /* FIXME: R_PPC64_PLTGOT16_HI not implemented. */
+ HOWTO (R_PPC64_PLTGOT16_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_PPC64_PLTGOT16_HI", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Like R_PPC64_PLT_GOT16, but using bits 16-31 of the address, plus
+ 1 if the contents of the low 16 bits, treated as a signed number,
+ is negative. */
+ /* FIXME: R_PPC64_PLTGOT16_HA not implemented. */
+ HOWTO (R_PPC64_PLTGOT16_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 */
+ ppc64_elf_addr16_ha_reloc, /* special_function */
+ "R_PPC64_PLTGOT16_HA", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xffff, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Like R_PPC64_ADDR16, but for instructions with a DS field. */
+ HOWTO (R_PPC64_ADDR16_DS, /* 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_PPC64_ADDR16_DS", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xfffc, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Like R_PPC64_ADDR16_LO, but for instructions with a DS field. */
+ HOWTO (R_PPC64_ADDR16_LO_DS, /* 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_PPC64_ADDR16_LO_DS",/* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xfffc, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Like R_PPC64_GOT16, but for instructions with a DS field. */
+ HOWTO (R_PPC64_GOT16_DS, /* 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_PPC64_GOT16_DS", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xfffc, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Like R_PPC64_GOT16_LO, but for instructions with a DS field. */
+ HOWTO (R_PPC64_GOT16_LO_DS, /* 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_PPC64_GOT16_LO_DS", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xfffc, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Like R_PPC64_PLT16_LO, but for instructions with a DS field. */
+ HOWTO (R_PPC64_PLT16_LO_DS, /* 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_PPC64_PLT16_LO_DS", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xfffc, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Like R_PPC64_SECTOFF, but for instructions with a DS field. */
+ /* FIXME: Verify R_PPC64_SECTOFF. Seems strange with size=2 and
+ dst_mask=0. */
+ HOWTO (R_PPC64_SECTOFF_DS, /* 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_PPC64_SECTOFF_DS", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ true), /* pcrel_offset */
+
+ /* Like R_PPC64_SECTOFF_LO, but for instructions with a DS field. */
+ HOWTO (R_PPC64_SECTOFF_LO_DS, /* 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_PPC64_SECTOFF_LO_DS",/* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xfffc, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Like R_PPC64_TOC16, but for instructions with a DS field. */
+ HOWTO (R_PPC64_TOC16_DS, /* 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_PPC64_TOC16_DS", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xfffc, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Like R_PPC64_TOC16_LO, but for instructions with a DS field. */
+ HOWTO (R_PPC64_TOC16_LO_DS, /* 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_PPC64_TOC16_LO_DS", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xfffc, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Like R_PPC64_PLTGOT16, but for instructions with a DS field. */
+ /* FIXME: R_PPC64_PLTGOT16_DS not implemented. */
+ HOWTO (R_PPC64_PLTGOT16_DS, /* 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_PPC64_PLTGOT16_DS", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xfffc, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* Like R_PPC64_PLTGOT16_LO, but for instructions with a DS field. */
+ /* FIXME: R_PPC64_PLTGOT16_LO not implemented. */
+ HOWTO (R_PPC64_PLTGOT16_LO_DS,/* 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_PPC64_PLTGOT16_LO_DS",/* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0xfffc, /* dst_mask */
+ false), /* pcrel_offset */
+
+ /* GNU extension to record C++ vtable hierarchy. */
+ HOWTO (R_PPC64_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_PPC64_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_PPC64_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_PPC64_GNU_VTENTRY", /* name */
+ false, /* partial_inplace */
+ 0, /* src_mask */
+ 0, /* dst_mask */
+ false), /* pcrel_offset */
+};
+
+
+/* Initialize the ppc64_elf_howto_table, so that linear accesses can
+ be done. */
+
+static void
+ppc_howto_init ()
+{
+ unsigned int i, type;
+
+ for (i = 0;
+ i < sizeof (ppc64_elf_howto_raw) / sizeof (ppc64_elf_howto_raw[0]);
+ i++)
+ {
+ type = ppc64_elf_howto_raw[i].type;
+ BFD_ASSERT (type < (sizeof (ppc64_elf_howto_table)
+ / sizeof (ppc64_elf_howto_table[0])));
+ ppc64_elf_howto_table[type] = &ppc64_elf_howto_raw[i];
+ }
+}
+
+static reloc_howto_type *
+ppc64_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 (!ppc64_elf_howto_table[R_PPC64_ADDR32])
+ /* Initialize howto table if needed. */
+ ppc_howto_init ();
+
+ switch ((int) code)
+ {
+ default:
+ return (reloc_howto_type *) NULL;
+
+ case BFD_RELOC_NONE: ppc_reloc = R_PPC64_NONE;
+ break;
+ case BFD_RELOC_32: ppc_reloc = R_PPC64_ADDR32;
+ break;
+ case BFD_RELOC_PPC_BA26: ppc_reloc = R_PPC64_ADDR24;
+ break;
+ case BFD_RELOC_16: ppc_reloc = R_PPC64_ADDR16;
+ break;
+ case BFD_RELOC_LO16: ppc_reloc = R_PPC64_ADDR16_LO;
+ break;
+ case BFD_RELOC_HI16: ppc_reloc = R_PPC64_ADDR16_HI;
+ break;
+ case BFD_RELOC_HI16_S: ppc_reloc = R_PPC64_ADDR16_HA;
+ break;
+ case BFD_RELOC_PPC_BA16: ppc_reloc = R_PPC64_ADDR14;
+ break;
+ case BFD_RELOC_PPC_BA16_BRTAKEN: ppc_reloc = R_PPC64_ADDR14_BRTAKEN;
+ break;
+ case BFD_RELOC_PPC_BA16_BRNTAKEN: ppc_reloc = R_PPC64_ADDR14_BRNTAKEN;
+ break;
+ case BFD_RELOC_PPC_B26: ppc_reloc = R_PPC64_REL24;
+ break;
+ case BFD_RELOC_PPC_B16: ppc_reloc = R_PPC64_REL14;
+ break;
+ case BFD_RELOC_PPC_B16_BRTAKEN: ppc_reloc = R_PPC64_REL14_BRTAKEN;
+ break;
+ case BFD_RELOC_PPC_B16_BRNTAKEN: ppc_reloc = R_PPC64_REL14_BRNTAKEN;
+ break;
+ case BFD_RELOC_16_GOTOFF: ppc_reloc = R_PPC64_GOT16;
+ break;
+ case BFD_RELOC_LO16_GOTOFF: ppc_reloc = R_PPC64_GOT16_LO;
+ break;
+ case BFD_RELOC_HI16_GOTOFF: ppc_reloc = R_PPC64_GOT16_HI;
+ break;
+ case BFD_RELOC_HI16_S_GOTOFF: ppc_reloc = R_PPC64_GOT16_HA;
+ break;
+ case BFD_RELOC_PPC_COPY: ppc_reloc = R_PPC64_COPY;
+ break;
+ case BFD_RELOC_PPC_GLOB_DAT: ppc_reloc = R_PPC64_GLOB_DAT;
+ break;
+ case BFD_RELOC_32_PCREL: ppc_reloc = R_PPC64_REL32;
+ break;
+ case BFD_RELOC_32_PLTOFF: ppc_reloc = R_PPC64_PLT32;
+ break;
+ case BFD_RELOC_32_PLT_PCREL: ppc_reloc = R_PPC64_PLTREL32;
+ break;
+ case BFD_RELOC_LO16_PLTOFF: ppc_reloc = R_PPC64_PLT16_LO;
+ break;
+ case BFD_RELOC_HI16_PLTOFF: ppc_reloc = R_PPC64_PLT16_HI;
+ break;
+ case BFD_RELOC_HI16_S_PLTOFF: ppc_reloc = R_PPC64_PLT16_HA;
+ break;
+ case BFD_RELOC_32_BASEREL: ppc_reloc = R_PPC64_SECTOFF;
+ break;
+ case BFD_RELOC_LO16_BASEREL: ppc_reloc = R_PPC64_SECTOFF_LO;
+ break;
+ case BFD_RELOC_HI16_BASEREL: ppc_reloc = R_PPC64_SECTOFF_HI;
+ break;
+ case BFD_RELOC_HI16_S_BASEREL: ppc_reloc = R_PPC64_SECTOFF_HA;
+ break;
+ case BFD_RELOC_CTOR: ppc_reloc = R_PPC64_ADDR64;
+ break;
+ case BFD_RELOC_64: ppc_reloc = R_PPC64_ADDR64;
+ break;
+ case BFD_RELOC_PPC64_HIGHER: ppc_reloc = R_PPC64_ADDR16_HIGHER;
+ break;
+ case BFD_RELOC_PPC64_HIGHER_S: ppc_reloc = R_PPC64_ADDR16_HIGHERA;
+ break;
+ case BFD_RELOC_PPC64_HIGHEST: ppc_reloc = R_PPC64_ADDR16_HIGHEST;
+ break;
+ case BFD_RELOC_PPC64_HIGHEST_S: ppc_reloc = R_PPC64_ADDR16_HIGHESTA;
+ break;
+ case BFD_RELOC_64_PCREL: ppc_reloc = R_PPC64_REL64;
+ break;
+ case BFD_RELOC_64_PLTOFF: ppc_reloc = R_PPC64_PLT64;
+ break;
+ case BFD_RELOC_64_PLT_PCREL: ppc_reloc = R_PPC64_PLTREL64;
+ break;
+ case BFD_RELOC_PPC_TOC16: ppc_reloc = R_PPC64_TOC16;
+ break;
+ case BFD_RELOC_PPC64_TOC16_LO: ppc_reloc = R_PPC64_TOC16_LO;
+ break;
+ case BFD_RELOC_PPC64_TOC16_HI: ppc_reloc = R_PPC64_TOC16_HI;
+ break;
+ case BFD_RELOC_PPC64_TOC16_HA: ppc_reloc = R_PPC64_TOC16_HA;
+ break;
+ case BFD_RELOC_PPC64_TOC: ppc_reloc = R_PPC64_TOC;
+ break;
+ case BFD_RELOC_PPC64_PLTGOT16: ppc_reloc = R_PPC64_PLTGOT16;
+ break;
+ case BFD_RELOC_PPC64_PLTGOT16_LO: ppc_reloc = R_PPC64_PLTGOT16_LO;
+ break;
+ case BFD_RELOC_PPC64_PLTGOT16_HI: ppc_reloc = R_PPC64_PLTGOT16_HI;
+ break;
+ case BFD_RELOC_PPC64_PLTGOT16_HA: ppc_reloc = R_PPC64_PLTGOT16_HA;
+ break;
+ case BFD_RELOC_PPC64_ADDR16_DS: ppc_reloc = R_PPC64_ADDR16_DS;
+ break;
+ case BFD_RELOC_PPC64_ADDR16_LO_DS: ppc_reloc = R_PPC64_ADDR16_LO_DS;
+ break;
+ case BFD_RELOC_PPC64_GOT16_DS: ppc_reloc = R_PPC64_GOT16_DS;
+ break;
+ case BFD_RELOC_PPC64_GOT16_LO_DS: ppc_reloc = R_PPC64_GOT16_LO_DS;
+ break;
+ case BFD_RELOC_PPC64_PLT16_LO_DS: ppc_reloc = R_PPC64_PLT16_LO_DS;
+ break;
+ case BFD_RELOC_PPC64_SECTOFF_DS: ppc_reloc = R_PPC64_SECTOFF_DS;
+ break;
+ case BFD_RELOC_PPC64_SECTOFF_LO_DS: ppc_reloc = R_PPC64_SECTOFF_LO_DS;
+ break;
+ case BFD_RELOC_PPC64_TOC16_DS: ppc_reloc = R_PPC64_TOC16_DS;
+ break;
+ case BFD_RELOC_PPC64_TOC16_LO_DS: ppc_reloc = R_PPC64_TOC16_LO_DS;
+ break;
+ case BFD_RELOC_PPC64_PLTGOT16_DS: ppc_reloc = R_PPC64_PLTGOT16_DS;
+ break;
+ case BFD_RELOC_PPC64_PLTGOT16_LO_DS: ppc_reloc = R_PPC64_PLTGOT16_LO_DS;
+ break;
+ case BFD_RELOC_VTABLE_INHERIT: ppc_reloc = R_PPC64_GNU_VTINHERIT;
+ break;
+ case BFD_RELOC_VTABLE_ENTRY: ppc_reloc = R_PPC64_GNU_VTENTRY;
+ break;
+ }
+
+ return ppc64_elf_howto_table[(int) ppc_reloc];
+};
+
+/* Set the howto pointer for a PowerPC ELF reloc. */
+
+static void
+ppc64_elf_info_to_howto (abfd, cache_ptr, dst)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ arelent *cache_ptr;
+ Elf64_Internal_Rela *dst;
+{
+ unsigned int type;
+
+ if (!ppc64_elf_howto_table[R_PPC64_ADDR32])
+ /* Initialize howto table if needed. */
+ ppc_howto_init ();
+
+ type = ELF64_R_TYPE (dst->r_info);
+ BFD_ASSERT (type < (sizeof (ppc64_elf_howto_table)
+ / sizeof (ppc64_elf_howto_table[0])));
+ cache_ptr->howto = ppc64_elf_howto_table[type];
+}
+
+/* Handle the R_PPC_ADDR16_HA and similar relocs. */
+
+static bfd_reloc_status_type
+ppc64_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
+ppc64_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;
+}
+
+/* Merge backend specific data from an object file to the output
+ object file when linking. */
+static boolean
+ppc64_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_archive_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_archive_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_archive_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_archive_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
+ppc64_elf_section_from_shdr (abfd, hdr, name)
+ bfd *abfd;
+ Elf64_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;
+}
+
+/* The following functions are specific to the ELF linker, while
+ functions above are used generally. Those named ppc64_elf_* are
+ called by the main ELF linker code. They appear in this file more
+ or less in the order in which they are called. eg.
+ ppc64_elf_check_relocs is called early in the link process,
+ ppc64_elf_finish_dynamic_sections is one of the last functions
+ called.
+
+ PowerPC64-ELF uses a similar scheme to PowerPC64-XCOFF in that
+ functions have both a function code symbol and a function descriptor
+ symbol. A call to foo in a relocatable object file looks like:
+
+ . .text
+ . x:
+ . bl .foo
+ . nop
+
+ The function definition in another object file might be:
+
+ . .section .opd
+ . foo: .quad .foo
+ . .quad .TOC.@tocbase
+ . .quad 0
+ .
+ . .text
+ . .foo: blr
+
+ When the linker resolves the call during a static link, the branch
+ unsurprisingly just goes to .foo and the .opd information is unused.
+ If the function definition is in a shared library, things are a little
+ different: The call goes via a plt call stub, the opd information gets
+ copied to the plt, and the linker patches the nop.
+
+ . x:
+ . bl .foo_stub
+ . ld 2,40(1)
+ .
+ .
+ . .foo_stub:
+ . addis 12,2,Lfoo@toc@ha # in practice, the call stub
+ . addi 12,12,Lfoo@toc@l # is slightly optimised, but
+ . std 2,40(1) # this is the general idea
+ . ld 11,0(12)
+ . ld 2,8(12)
+ . mtctr 11
+ . ld 11,16(12)
+ . bctr
+ .
+ . .section .plt
+ . Lfoo: reloc (R_PPC64_JMP_SLOT, foo)
+
+ The "reloc ()" notation is supposed to indicate that the linker emits
+ an R_PPC64_JMP_SLOT reloc against foo. The dynamic linker does the opd
+ copying.
+
+ What are the difficulties here? Well, firstly, the relocations
+ examined by the linker in check_relocs are against the function code
+ sym .foo, while the dynamic relocation in the plt is emitted against
+ the function descriptor symbol, foo. Somewhere along the line, we need
+ to carefully copy dynamic link information from one symbol to the other.
+ Secondly, the generic part of the elf linker will make .foo a dynamic
+ symbol as is normal for most other backends. We need foo dynamic
+ instead, at least for an application final link. However, when
+ creating a shared library containing foo, we need to have both symbols
+ dynamic so that references to .foo are satisfied during the early
+ stages of linking. Otherwise the linker might decide to pull in a
+ definition from some other object, eg. a static library. */
+
+/* The linker needs to keep track of the number of relocs that it
+ decides to copy as dynamic relocs in check_relocs for each symbol.
+ This is so that it can later discard them if they are found to be
+ unnecessary. We store the information in a field extending the
+ regular ELF linker hash table. */
+
+struct ppc_dyn_relocs
+{
+ struct ppc_dyn_relocs *next;
+
+ /* The input section of the reloc. */
+ asection *sec;
+
+ /* Total number of relocs copied for the input section. */
+ bfd_size_type count;
+
+ /* Number of pc-relative relocs copied for the input section. */
+ bfd_size_type pc_count;
+};
+
+/* Of those relocs that might be copied as dynamic relocs, this macro
+ selects between relative and absolute types. */
+
+#define IS_ABSOLUTE_RELOC(RTYPE) \
+ ((RTYPE) != R_PPC64_REL14 \
+ && (RTYPE) != R_PPC64_REL14_BRNTAKEN \
+ && (RTYPE) != R_PPC64_REL14_BRTAKEN \
+ && (RTYPE) != R_PPC64_REL24 \
+ && (RTYPE) != R_PPC64_REL32 \
+ && (RTYPE) != R_PPC64_REL64)
+
+/* ppc64 ELF linker hash entry. */
+
+struct ppc_link_hash_entry
+{
+ struct elf_link_hash_entry elf;
+
+ /* Track dynamic relocs copied for this symbol. */
+ struct ppc_dyn_relocs *dyn_relocs;
+
+ /* Flag function code and descriptor symbols. */
+ unsigned int is_func:1;
+ unsigned int is_func_descriptor:1;
+};
+
+/* ppc64 ELF linker hash table. */
+
+struct ppc_link_hash_table
+{
+ struct elf_link_hash_table elf;
+
+ /* Short-cuts to get to dynamic linker sections. */
+ asection *sgot;
+ asection *srelgot;
+ asection *splt;
+ asection *srelplt;
+ asection *sdynbss;
+ asection *srelbss;
+ asection *sstub;
+ asection *sglink;
+
+ /* Set on error. */
+ int plt_overflow;
+
+ /* Small local sym to section mapping cache. */
+ struct sym_sec_cache sym_sec;
+};
+
+/* Get the ppc64 ELF linker hash table from a link_info structure. */
+
+#define ppc_hash_table(p) \
+ ((struct ppc_link_hash_table *) ((p)->hash))
+
+/* Create an entry in a ppc64 ELF linker hash table. */
+
+static struct bfd_hash_entry *
+link_hash_newfunc (entry, table, string)
+ struct bfd_hash_entry *entry;
+ struct bfd_hash_table *table;
+ const char *string;
+{
+ /* Allocate the structure if it has not already been allocated by a
+ subclass. */
+ if (entry == NULL)
+ {
+ entry = bfd_hash_allocate (table, sizeof (struct ppc_link_hash_entry));
+ if (entry == NULL)
+ return entry;
+ }
+
+ /* Call the allocation method of the superclass. */
+ entry = _bfd_elf_link_hash_newfunc (entry, table, string);
+ if (entry != NULL)
+ {
+ struct ppc_link_hash_entry *eh = (struct ppc_link_hash_entry *) entry;
+
+ eh->dyn_relocs = NULL;
+ eh->is_func = 0;
+ eh->is_func_descriptor = 0;
+ }
+
+ return entry;
+}
+
+/* Create a ppc64 ELF linker hash table. */
+
+static struct bfd_link_hash_table *
+ppc64_elf_link_hash_table_create (abfd)
+ bfd *abfd;
+{
+ struct ppc_link_hash_table *htab;
+ bfd_size_type amt = sizeof (struct ppc_link_hash_table);
+
+ htab = (struct ppc_link_hash_table *) bfd_alloc (abfd, amt);
+ if (htab == NULL)
+ return NULL;
+
+ if (! _bfd_elf_link_hash_table_init (&htab->elf, abfd, link_hash_newfunc))
+ {
+ bfd_release (abfd, htab);
+ return NULL;
+ }
+
+ htab->sgot = NULL;
+ htab->srelgot = NULL;
+ htab->splt = NULL;
+ htab->srelplt = NULL;
+ htab->sdynbss = NULL;
+ htab->srelbss = NULL;
+ htab->sstub = NULL;
+ htab->sglink = NULL;
+ htab->plt_overflow = 0;
+ htab->sym_sec.abfd = NULL;
+
+ return &htab->elf.root;
+}
+
+/* Create .got and .rela.got sections in DYNOBJ, and set up
+ shortcuts to them in our hash table. */
+
+static boolean
+create_got_section (dynobj, info)
+ bfd *dynobj;
+ struct bfd_link_info *info;
+{
+ struct ppc_link_hash_table *htab;
+
+ if (! _bfd_elf_create_got_section (dynobj, info))
+ return false;
+
+ htab = ppc_hash_table (info);
+ htab->sgot = bfd_get_section_by_name (dynobj, ".got");
+ if (!htab->sgot)
+ abort ();
+
+ htab->srelgot = bfd_make_section (dynobj, ".rela.got");
+ if (!htab->srelgot
+ || ! bfd_set_section_flags (dynobj, htab->srelgot,
+ (SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS
+ | SEC_IN_MEMORY | SEC_LINKER_CREATED
+ | SEC_READONLY))
+ || ! bfd_set_section_alignment (dynobj, htab->srelgot, 3))
+ return false;
+ return true;
+}
+
+/* Create the .stub and .glink sections as well as the ordinary
+ dynamic sections. */
+
+static boolean
+ppc64_elf_create_dynamic_sections (dynobj, info)
+ bfd *dynobj;
+ struct bfd_link_info *info;
+{
+ struct ppc_link_hash_table *htab;
+ flagword flags;
+
+ htab = ppc_hash_table (info);
+ if (!htab->sgot && !create_got_section (dynobj, info))
+ return false;
+
+ if (!_bfd_elf_create_dynamic_sections (dynobj, info))
+ return false;
+
+ htab->splt = bfd_get_section_by_name (dynobj, ".plt");
+ htab->srelplt = bfd_get_section_by_name (dynobj, ".rela.plt");
+ htab->sdynbss = bfd_get_section_by_name (dynobj, ".dynbss");
+ if (!info->shared)
+ htab->srelbss = bfd_get_section_by_name (dynobj, ".rela.bss");
+
+ if (!htab->splt || !htab->srelplt || !htab->sdynbss
+ || (!info->shared && !htab->srelbss))
+ abort ();
+
+ /* Create .stub and .glink for global linkage functions. */
+ flags = (SEC_ALLOC | SEC_LOAD | SEC_CODE | SEC_READONLY
+ | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_LINKER_CREATED);
+ htab->sstub = bfd_make_section (dynobj, ".stub");
+ if (htab->sstub == NULL
+ || ! bfd_set_section_flags (dynobj, htab->sstub, flags)
+ || ! bfd_set_section_alignment (dynobj, htab->sstub, 2))
+ return false;
+ htab->sglink = bfd_make_section (dynobj, ".glink");
+ if (htab->sglink == NULL
+ || ! bfd_set_section_flags (dynobj, htab->sglink, flags)
+ || ! bfd_set_section_alignment (dynobj, htab->sglink, 3))
+ return false;
+
+ return true;
+}
+
+/* Copy the extra info we tack onto an elf_link_hash_entry. */
+
+static void
+ppc64_elf_copy_indirect_symbol (dir, ind)
+ struct elf_link_hash_entry *dir, *ind;
+{
+ struct ppc_link_hash_entry *edir, *eind;
+
+ edir = (struct ppc_link_hash_entry *) dir;
+ eind = (struct ppc_link_hash_entry *) ind;
+
+ if (eind->dyn_relocs != NULL)
+ {
+ if (edir->dyn_relocs != NULL)
+ {
+ struct ppc_dyn_relocs **pp;
+ struct ppc_dyn_relocs *p;
+
+ if (ind->root.type == bfd_link_hash_indirect)
+ abort ();
+
+ /* Add reloc counts against the weak sym to the strong sym
+ list. Merge any entries against the same section. */
+ for (pp = &eind->dyn_relocs; (p = *pp) != NULL; )
+ {
+ struct ppc_dyn_relocs *q;
+
+ for (q = edir->dyn_relocs; q != NULL; q = q->next)
+ if (q->sec == p->sec)
+ {
+ q->pc_count += p->pc_count;
+ q->count += p->count;
+ *pp = p->next;
+ break;
+ }
+ if (q == NULL)
+ pp = &p->next;
+ }
+ *pp = edir->dyn_relocs;
+ }
+
+ edir->dyn_relocs = eind->dyn_relocs;
+ eind->dyn_relocs = NULL;
+ }
+
+ edir->is_func |= eind->is_func;
+ edir->is_func_descriptor |= eind->is_func_descriptor;
+
+ _bfd_elf_link_hash_copy_indirect (dir, ind);
+}
+
+/* Look through the relocs for a section during the first phase, and
+ calculate needed space in the global offset table, procedure
+ linkage table, and dynamic reloc sections. */
+
+static boolean
+ppc64_elf_check_relocs (abfd, info, sec, relocs)
+ bfd *abfd;
+ struct bfd_link_info *info;
+ asection *sec;
+ const Elf_Internal_Rela *relocs;
+{
+ struct ppc_link_hash_table *htab;
+ 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;
+ asection *sreloc;
+ boolean is_opd;
+
+ if (info->relocateable)
+ return true;
+
+ htab = ppc_hash_table (info);
+ symtab_hdr = &elf_tdata (abfd)->symtab_hdr;
+
+ sym_hashes = elf_sym_hashes (abfd);
+ sym_hashes_end = (sym_hashes
+ + symtab_hdr->sh_size / sizeof (Elf64_External_Sym));
+ if (!elf_bad_symtab (abfd))
+ sym_hashes_end -= symtab_hdr->sh_info;
+
+ sreloc = NULL;
+ is_opd = strcmp (bfd_get_section_name (abfd, sec), ".opd") == 0;
+
+ rel_end = relocs + sec->reloc_count;
+ for (rel = relocs; rel < rel_end; rel++)
+ {
+ unsigned long r_symndx;
+ struct elf_link_hash_entry *h;
+ enum elf_ppc_reloc_type r_type;
+
+ r_symndx = ELF64_R_SYM (rel->r_info);
+ if (r_symndx < symtab_hdr->sh_info)
+ h = NULL;
+ else
+ h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+
+ r_type = (enum elf_ppc_reloc_type) ELF64_R_TYPE (rel->r_info);
+ switch (r_type)
+ {
+ /* GOT16 relocations */
+ case R_PPC64_GOT16:
+ case R_PPC64_GOT16_DS:
+ case R_PPC64_GOT16_HA:
+ case R_PPC64_GOT16_HI:
+ case R_PPC64_GOT16_LO:
+ case R_PPC64_GOT16_LO_DS:
+
+ /* This symbol requires a global offset table entry. */
+ if (htab->sgot == NULL)
+ {
+ if (htab->elf.dynobj == NULL)
+ htab->elf.dynobj = abfd;
+ if (!create_got_section (htab->elf.dynobj, info))
+ return false;
+ }
+
+ if (h != NULL)
+ {
+ h->got.refcount += 1;
+ }
+ else
+ {
+ bfd_signed_vma *local_got_refcounts;
+
+ /* This is a global offset table entry for a local symbol. */
+ local_got_refcounts = elf_local_got_refcounts (abfd);
+ if (local_got_refcounts == NULL)
+ {
+ bfd_size_type size;
+
+ size = symtab_hdr->sh_info;
+ size *= sizeof (bfd_signed_vma);
+ local_got_refcounts = ((bfd_signed_vma *)
+ bfd_zalloc (abfd, size));
+ if (local_got_refcounts == NULL)
+ return false;
+ elf_local_got_refcounts (abfd) = local_got_refcounts;
+ }
+ local_got_refcounts[r_symndx] += 1;
+ }
+ break;
+
+ case R_PPC64_PLT16_HA:
+ case R_PPC64_PLT16_HI:
+ case R_PPC64_PLT16_LO:
+ case R_PPC64_PLT32:
+ case R_PPC64_PLT64:
+ /* 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;
+ }
+
+ h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
+ h->plt.refcount += 1;
+ ((struct ppc_link_hash_entry *) h)->is_func = 1;
+ break;
+
+ /* The following relocations don't need to propagate the
+ relocation if linking a shared object since they are
+ section relative. */
+ case R_PPC64_SECTOFF:
+ case R_PPC64_SECTOFF_LO:
+ case R_PPC64_SECTOFF_HI:
+ case R_PPC64_SECTOFF_HA:
+ case R_PPC64_SECTOFF_DS:
+ case R_PPC64_SECTOFF_LO_DS:
+ case R_PPC64_TOC16:
+ case R_PPC64_TOC16_LO:
+ case R_PPC64_TOC16_HI:
+ case R_PPC64_TOC16_HA:
+ case R_PPC64_TOC16_DS:
+ case R_PPC64_TOC16_LO_DS:
+ break;
+
+ /* This relocation describes the C++ object vtable hierarchy.
+ Reconstruct it for later use during GC. */
+ case R_PPC64_GNU_VTINHERIT:
+ if (!_bfd_elf64_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_PPC64_GNU_VTENTRY:
+ if (!_bfd_elf64_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+ return false;
+ break;
+
+ case R_PPC64_REL24:
+ if (h != NULL
+ && h->root.root.string[0] == '.'
+ && h->root.root.string[1] != 0)
+ {
+ /* We may need a .plt entry if the function this reloc
+ refers to is in a shared lib. */
+ h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
+ h->plt.refcount += 1;
+ ((struct ppc_link_hash_entry *) h)->is_func = 1;
+ }
+ break;
+
+ case R_PPC64_ADDR64:
+ if (is_opd
+ && h != NULL
+ && h->root.root.string[0] == '.'
+ && h->root.root.string[1] != 0)
+ {
+ struct elf_link_hash_entry *fdh;
+
+ fdh = elf_link_hash_lookup (&htab->elf, h->root.root.string + 1,
+ false, false, false);
+ if (fdh != NULL)
+ {
+ /* Ensure the function descriptor symbol string is
+ part of the code symbol string. We aren't
+ changing the name here, just allowing some tricks
+ in ppc64_elf_hide_symbol. */
+ fdh->root.root.string = h->root.root.string + 1;
+ ((struct ppc_link_hash_entry *) fdh)->is_func_descriptor = 1;
+ ((struct ppc_link_hash_entry *) h)->is_func = 1;
+ }
+ }
+ /* Fall through. */
+
+ case R_PPC64_REL64:
+ case R_PPC64_REL32:
+ case R_PPC64_REL14:
+ case R_PPC64_REL14_BRTAKEN:
+ case R_PPC64_REL14_BRNTAKEN:
+ case R_PPC64_ADDR14:
+ case R_PPC64_ADDR14_BRNTAKEN:
+ case R_PPC64_ADDR14_BRTAKEN:
+ case R_PPC64_ADDR16:
+ case R_PPC64_ADDR16_DS:
+ case R_PPC64_ADDR16_HA:
+ case R_PPC64_ADDR16_HI:
+ case R_PPC64_ADDR16_HIGHER:
+ case R_PPC64_ADDR16_HIGHERA:
+ case R_PPC64_ADDR16_HIGHEST:
+ case R_PPC64_ADDR16_HIGHESTA:
+ case R_PPC64_ADDR16_LO:
+ case R_PPC64_ADDR16_LO_DS:
+ case R_PPC64_ADDR24:
+ case R_PPC64_ADDR30:
+ case R_PPC64_ADDR32:
+ case R_PPC64_UADDR16:
+ case R_PPC64_UADDR32:
+ case R_PPC64_UADDR64:
+ case R_PPC64_TOC:
+ /* Don't propagate .opd relocs. */
+ if (NO_OPD_RELOCS && is_opd)
+ break;
+
+ /* 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). In case of a weak definition,
+ DEF_REGULAR may be cleared later by a strong definition in
+ a shared library. We account for that possibility below by
+ storing information in the relocs_copied field of the hash
+ table entry. A similar situation occurs when creating
+ shared libraries and symbol visibility changes render the
+ symbol local.
+
+ If on the other hand, we are creating an executable, we
+ may need to keep relocations for symbols satisfied by a
+ dynamic library if we manage to avoid copy relocs for the
+ symbol. */
+ if ((info->shared
+ && (sec->flags & SEC_ALLOC) != 0
+ && (IS_ABSOLUTE_RELOC (r_type)
+ || (h != NULL
+ && (! info->symbolic
+ || h->root.type == bfd_link_hash_defweak
+ || (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) == 0))))
+ || (!info->shared
+ && (sec->flags & SEC_ALLOC) != 0
+ && h != NULL
+ && (h->root.type == bfd_link_hash_defweak
+ || (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) == 0)))
+ {
+ struct ppc_dyn_relocs *p;
+ struct ppc_dyn_relocs **head;
+
+ /* We must copy these reloc types into the output file.
+ Create a reloc section in dynobj and make room for
+ this reloc. */
+ if (sreloc == NULL)
+ {
+ const char *name;
+ bfd *dynobj;
+
+ 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;
+
+ if (strncmp (name, ".rela", 5) != 0
+ || strcmp (bfd_get_section_name (abfd, sec),
+ name + 5) != 0)
+ {
+ (*_bfd_error_handler)
+ (_("%s: bad relocation section name `%s\'"),
+ bfd_archive_filename (abfd), name);
+ bfd_set_error (bfd_error_bad_value);
+ }
+
+ if (htab->elf.dynobj == NULL)
+ htab->elf.dynobj = abfd;
+
+ dynobj = htab->elf.dynobj;
+ 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, 3))
+ return false;
+ }
+ elf_section_data (sec)->sreloc = sreloc;
+ }
+
+ /* If this is a global symbol, we count the number of
+ relocations we need for this symbol. */
+ if (h != NULL)
+ {
+ head = &((struct ppc_link_hash_entry *) h)->dyn_relocs;
+ }
+ else
+ {
+ /* Track dynamic relocs needed for local syms too.
+ We really need local syms available to do this
+ easily. Oh well. */
+
+ asection *s;
+ s = bfd_section_from_r_symndx (abfd, &htab->sym_sec,
+ sec, r_symndx);
+ if (s == NULL)
+ return false;
+
+ head = ((struct ppc_dyn_relocs **)
+ &elf_section_data (s)->local_dynrel);
+ }
+
+ p = *head;
+ if (p == NULL || p->sec != sec)
+ {
+ p = ((struct ppc_dyn_relocs *)
+ bfd_alloc (htab->elf.dynobj,
+ (bfd_size_type) sizeof *p));
+ if (p == NULL)
+ return false;
+ p->next = *head;
+ *head = p;
+ p->sec = sec;
+ p->count = 0;
+ p->pc_count = 0;
+ }
+
+ p->count += 1;
+ if (!IS_ABSOLUTE_RELOC (r_type))
+ p->pc_count += 1;
+ }
+ break;
+
+ default:
+ }
+ }
+
+ return true;
+}
+
+/* Return the section that should be marked against GC for a given
+ relocation. */
+
+static asection *
+ppc64_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)
+ {
+ enum elf_ppc_reloc_type r_type;
+
+ r_type = (enum elf_ppc_reloc_type) ELF64_R_TYPE (rel->r_info);
+ switch (r_type)
+ {
+ case R_PPC64_GNU_VTINHERIT:
+ case R_PPC64_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
+ {
+ return bfd_section_from_elf_index (abfd, sym->st_shndx);
+ }
+
+ return NULL;
+}
+
+/* Update the .got, .plt. and dynamic reloc reference counts for the
+ section being removed. */
+
+static boolean
+ppc64_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;
+
+ elf_section_data (sec)->local_dynrel = NULL;
+
+ 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++)
+ {
+ unsigned long r_symndx;
+ enum elf_ppc_reloc_type r_type;
+ struct elf_link_hash_entry *h;
+
+ r_symndx = ELF64_R_SYM (rel->r_info);
+ r_type = (enum elf_ppc_reloc_type) ELF64_R_TYPE (rel->r_info);
+ switch (r_type)
+ {
+ case R_PPC64_GOT16:
+ case R_PPC64_GOT16_DS:
+ case R_PPC64_GOT16_HA:
+ case R_PPC64_GOT16_HI:
+ case R_PPC64_GOT16_LO:
+ case R_PPC64_GOT16_LO_DS:
+ 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_PPC64_PLT16_HA:
+ case R_PPC64_PLT16_HI:
+ case R_PPC64_PLT16_LO:
+ case R_PPC64_PLT32:
+ case R_PPC64_PLT64:
+ 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;
+
+ case R_PPC64_REL24:
+ 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;
+
+ case R_PPC64_REL14:
+ case R_PPC64_REL14_BRNTAKEN:
+ case R_PPC64_REL14_BRTAKEN:
+ case R_PPC64_REL32:
+ case R_PPC64_REL64:
+ if (r_symndx >= symtab_hdr->sh_info)
+ {
+ struct ppc_link_hash_entry *eh;
+ struct ppc_dyn_relocs **pp;
+ struct ppc_dyn_relocs *p;
+
+ h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+ eh = (struct ppc_link_hash_entry *) h;
+
+ for (pp = &eh->dyn_relocs; (p = *pp) != NULL; pp = &p->next)
+ if (p->sec == sec)
+ {
+ p->pc_count -= 1;
+ p->count -= 1;
+ if (p->count == 0)
+ *pp = p->next;
+ break;
+ }
+ }
+ break;
+
+ case R_PPC64_ADDR14:
+ case R_PPC64_ADDR14_BRNTAKEN:
+ case R_PPC64_ADDR14_BRTAKEN:
+ case R_PPC64_ADDR16:
+ case R_PPC64_ADDR16_DS:
+ case R_PPC64_ADDR16_HA:
+ case R_PPC64_ADDR16_HI:
+ case R_PPC64_ADDR16_HIGHER:
+ case R_PPC64_ADDR16_HIGHERA:
+ case R_PPC64_ADDR16_HIGHEST:
+ case R_PPC64_ADDR16_HIGHESTA:
+ case R_PPC64_ADDR16_LO:
+ case R_PPC64_ADDR16_LO_DS:
+ case R_PPC64_ADDR24:
+ case R_PPC64_ADDR30:
+ case R_PPC64_ADDR32:
+ case R_PPC64_ADDR64:
+ case R_PPC64_UADDR16:
+ case R_PPC64_UADDR32:
+ case R_PPC64_UADDR64:
+ case R_PPC64_TOC:
+ if (r_symndx >= symtab_hdr->sh_info)
+ {
+ struct ppc_link_hash_entry *eh;
+ struct ppc_dyn_relocs **pp;
+ struct ppc_dyn_relocs *p;
+
+ h = sym_hashes[r_symndx - symtab_hdr->sh_info];
+ eh = (struct ppc_link_hash_entry *) h;
+
+ for (pp = &eh->dyn_relocs; (p = *pp) != NULL; pp = &p->next)
+ if (p->sec == sec)
+ {
+ p->count -= 1;
+ if (p->count == 0)
+ *pp = p->next;
+ break;
+ }
+ }
+ break;
+
+ default:
+ break;
+ }
+ }
+ return true;
+}
+
+/* Called via elf_link_hash_traverse to transfer dynamic linking
+ information on function code symbol entries to their corresponding
+ function descriptor symbol entries. */
+static boolean
+func_desc_adjust (h, inf)
+ struct elf_link_hash_entry *h;
+ PTR inf;
+{
+ struct bfd_link_info *info;
+ struct ppc_link_hash_table *htab;
+
+ if (h->root.type == bfd_link_hash_indirect
+ || h->root.type == bfd_link_hash_warning)
+ return true;
+
+ info = (struct bfd_link_info *) inf;
+ htab = ppc_hash_table (info);
+
+ /* If this is a function code symbol, transfer dynamic linking
+ information to the function descriptor symbol. */
+ if (!((struct ppc_link_hash_entry *) h)->is_func)
+ return true;
+
+ if (h->plt.refcount > 0
+ && h->root.root.string[0] == '.'
+ && h->root.root.string[1] != '\0')
+ {
+ struct elf_link_hash_entry *fdh;
+ boolean force_local;
+
+ /* Find the corresponding function descriptor symbol. Create it
+ as undefined if necessary. */
+
+ fdh = elf_link_hash_lookup (&htab->elf, h->root.root.string + 1,
+ false, false, true);
+
+ if (fdh == NULL && info->shared)
+ {
+ bfd *abfd;
+ asymbol *newsym;
+
+ /* Create it as undefined. */
+ if (h->root.type == bfd_link_hash_undefined
+ || h->root.type == bfd_link_hash_undefweak)
+ abfd = h->root.u.undef.abfd;
+ else if (h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)
+ abfd = h->root.u.def.section->owner;
+ else
+ abort ();
+ newsym = bfd_make_empty_symbol (abfd);
+ newsym->name = h->root.root.string + 1;
+ newsym->section = bfd_und_section_ptr;
+ newsym->value = 0;
+ newsym->flags = BSF_OBJECT;
+ if (h->root.type == bfd_link_hash_undefweak)
+ newsym->flags |= BSF_WEAK;
+
+ if ( !(_bfd_generic_link_add_one_symbol
+ (info, abfd, newsym->name, newsym->flags,
+ newsym->section, newsym->value, NULL, false, false,
+ (struct bfd_link_hash_entry **) &fdh)))
+ {
+ return false;
+ }
+ }
+
+ if (fdh != NULL
+ && (fdh->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0
+ && (info->shared
+ || (fdh->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0
+ || (fdh->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) != 0))
+ {
+ if (fdh->dynindx == -1)
+ if (! bfd_elf64_link_record_dynamic_symbol (info, fdh))
+ return false;
+ fdh->plt.refcount = h->plt.refcount;
+ fdh->elf_link_hash_flags |= (h->elf_link_hash_flags
+ & (ELF_LINK_HASH_REF_REGULAR
+ | ELF_LINK_HASH_REF_DYNAMIC
+ | ELF_LINK_HASH_REF_REGULAR_NONWEAK
+ | ELF_LINK_NON_GOT_REF));
+ fdh->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
+ ((struct ppc_link_hash_entry *) fdh)->is_func_descriptor = 1;
+ fdh->root.root.string = h->root.root.string + 1;
+ }
+
+ /* Now that the info is on the function descriptor, clear the
+ function code sym info. Any function code syms for which we
+ don't have a definition in a regular file, we force local.
+ This prevents a shared library from exporting syms that have
+ been imported from another library. Function code syms that
+ are really in the library we must leave global to prevent the
+ linker dragging a definition in from a static library. */
+ force_local = (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0;
+ _bfd_elf_link_hash_hide_symbol (info, h, force_local);
+ }
+
+ return true;
+}
+
+/* Called near the start of bfd_elf_size_dynamic_sections. We use
+ this hook to transfer dynamic linking information gathered so far
+ on function code symbol entries, to their corresponding function
+ descriptor symbol entries. */
+static boolean
+ppc64_elf_func_desc_adjust (obfd, info)
+ bfd *obfd ATTRIBUTE_UNUSED;
+ struct bfd_link_info *info;
+{
+ struct ppc_link_hash_table *htab;
+
+ htab = ppc_hash_table (info);
+ elf_link_hash_traverse (&htab->elf, func_desc_adjust, (PTR) info);
+ 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
+ppc64_elf_adjust_dynamic_symbol (info, h)
+ struct bfd_link_info *info;
+ struct elf_link_hash_entry *h;
+{
+ struct ppc_link_hash_table *htab;
+ struct ppc_link_hash_entry * eh;
+ struct ppc_dyn_relocs *p;
+ asection *s;
+ unsigned int power_of_two;
+
+ htab = ppc_hash_table (info);
+
+ /* Deal with function syms. */
+ if (h->type == STT_FUNC
+ || (h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT) != 0)
+ {
+ /* Clear procedure linkage table information for any symbol that
+ won't need a .plt entry. */
+ if (!((struct ppc_link_hash_entry *) h)->is_func_descriptor
+ || h->plt.refcount <= 0
+ || (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0
+ || (! info->shared
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) == 0
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_REF_DYNAMIC) == 0))
+ {
+ h->plt.offset = (bfd_vma) -1;
+ h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ }
+ return true;
+ }
+ else
+ h->plt.offset = (bfd_vma) -1;
+
+ /* 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;
+
+ /* 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;
+
+ eh = (struct ppc_link_hash_entry *) h;
+ for (p = eh->dyn_relocs; p != NULL; p = p->next)
+ {
+ s = p->sec->output_section;
+ if (s != NULL && (s->flags & SEC_READONLY) != 0)
+ break;
+ }
+
+ /* If we didn't find any dynamic relocs in read-only sections, then
+ we'll be keeping the dynamic relocs and avoiding the copy reloc. */
+ if (p == NULL)
+ {
+ h->elf_link_hash_flags &= ~ELF_LINK_NON_GOT_REF;
+ 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. */
+
+ /* 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)
+ {
+ htab->srelbss->_raw_size += sizeof (Elf64_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 = htab->sdynbss;
+ s->_raw_size = BFD_ALIGN (s->_raw_size, (bfd_size_type) (1 << power_of_two));
+ if (power_of_two > bfd_get_section_alignment (htab->elf.dynobj, s))
+ {
+ if (! bfd_set_section_alignment (htab->elf.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;
+}
+
+/* If given a function descriptor symbol, hide both the function code
+ sym and the descriptor. */
+static void
+ppc64_elf_hide_symbol (info, h, force_local)
+ struct bfd_link_info *info;
+ struct elf_link_hash_entry *h;
+ boolean force_local;
+{
+ _bfd_elf_link_hash_hide_symbol (info, h, force_local);
+
+ if (((struct ppc_link_hash_entry *) h)->is_func_descriptor)
+ {
+ const char *name;
+ struct elf_link_hash_entry *fh;
+ struct ppc_link_hash_table *htab;
+
+ name = h->root.root.string - 1;
+ htab = ppc_hash_table (info);
+ fh = elf_link_hash_lookup (&htab->elf, name, false, false, false);
+ if (fh != NULL)
+ _bfd_elf_link_hash_hide_symbol (info, fh, force_local);
+ }
+}
+
+/* This is the condition under which ppc64_elf_finish_dynamic_symbol
+ will be called from elflink.h. If elflink.h doesn't call our
+ finish_dynamic_symbol routine, we'll need to do something about
+ initializing any .plt and .got entries in ppc64_elf_relocate_section. */
+#define WILL_CALL_FINISH_DYNAMIC_SYMBOL(DYN, INFO, H) \
+ ((DYN) \
+ && ((INFO)->shared \
+ || ((H)->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0) \
+ && ((H)->dynindx != -1 \
+ || ((H)->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0))
+
+/* Allocate space in .plt, .got and associated reloc sections for
+ dynamic relocs. */
+
+static boolean
+allocate_dynrelocs (h, inf)
+ struct elf_link_hash_entry *h;
+ PTR inf;
+{
+ struct bfd_link_info *info;
+ struct ppc_link_hash_table *htab;
+ asection *s;
+ struct ppc_link_hash_entry *eh;
+ struct ppc_dyn_relocs *p;
+
+ if (h->root.type == bfd_link_hash_indirect
+ || h->root.type == bfd_link_hash_warning)
+ return true;
+
+ info = (struct bfd_link_info *) inf;
+ htab = ppc_hash_table (info);
+
+ if (htab->elf.dynamic_sections_created
+ && h->plt.refcount > 0
+ && h->dynindx != -1)
+ {
+ BFD_ASSERT (((struct ppc_link_hash_entry *) h)->is_func_descriptor);
+
+ if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (1, info, h))
+ {
+ /* If this is the first .plt entry, make room for the special
+ first entry. */
+ s = htab->splt;
+ if (s->_raw_size == 0)
+ s->_raw_size += PLT_INITIAL_ENTRY_SIZE;
+
+ h->plt.offset = s->_raw_size;
+
+ /* Make room for this entry. */
+ s->_raw_size += PLT_ENTRY_SIZE;
+
+ /* Make room for the .stub and .glink code. */
+ s = htab->sstub;
+ s->_raw_size += PLT_CALL_STUB_SIZE;
+
+ s = htab->sglink;
+ if (s->_raw_size == 0)
+ s->_raw_size += GLINK_CALL_STUB_SIZE;
+ /* We need bigger stubs past index 32767. */
+ if (s->_raw_size >= GLINK_CALL_STUB_SIZE + 32768*2*4)
+ s->_raw_size += 4;
+ s->_raw_size += 2*4;
+
+ /* We also need to make an entry in the .rela.plt section. */
+ s = htab->srelplt;
+ s->_raw_size += sizeof (Elf64_External_Rela);
+ }
+ else
+ {
+ h->plt.offset = (bfd_vma) -1;
+ h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ }
+ }
+ else
+ {
+ h->plt.offset = (bfd_vma) -1;
+ h->elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
+ }
+
+ if (h->got.refcount > 0)
+ {
+ boolean dyn;
+
+ /* Make sure this symbol is output as a dynamic symbol.
+ Undefined weak syms won't yet be marked as dynamic. */
+ if (h->dynindx == -1
+ && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
+ {
+ if (! bfd_elf64_link_record_dynamic_symbol (info, h))
+ return false;
+ }
+
+ s = htab->sgot;
+ h->got.offset = s->_raw_size;
+ s->_raw_size += 8;
+ dyn = htab->elf.dynamic_sections_created;
+ if (WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info, h))
+ htab->srelgot->_raw_size += sizeof (Elf64_External_Rela);
+ }
+ else
+ h->got.offset = (bfd_vma) -1;
+
+ eh = (struct ppc_link_hash_entry *) h;
+ if (eh->dyn_relocs == NULL)
+ return true;
+
+ /* In the shared -Bsymbolic case, discard space allocated for
+ dynamic pc-relative relocs against symbols which turn out to be
+ defined in regular objects. For the normal shared case, discard
+ space for relocs that have become local due to symbol visibility
+ changes. */
+
+ if (info->shared)
+ {
+ if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) != 0
+ && ((h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0
+ || info->symbolic))
+ {
+ struct ppc_dyn_relocs **pp;
+
+ for (pp = &eh->dyn_relocs; (p = *pp) != NULL; )
+ {
+ p->count -= p->pc_count;
+ p->pc_count = 0;
+ if (p->count == 0)
+ *pp = p->next;
+ else
+ pp = &p->next;
+ }
+ }
+ }
+ else
+ {
+ /* For the non-shared case, discard space for relocs against
+ symbols which turn out to need copy relocs or are not
+ dynamic. */
+
+ if ((h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0
+ && (((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ || (htab->elf.dynamic_sections_created
+ && (h->root.type == bfd_link_hash_undefweak
+ || h->root.type == bfd_link_hash_undefined))))
+ {
+ /* Make sure this symbol is output as a dynamic symbol.
+ Undefined weak syms won't yet be marked as dynamic. */
+ if (h->dynindx == -1
+ && (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) == 0)
+ {
+ if (! bfd_elf64_link_record_dynamic_symbol (info, h))
+ return false;
+ }
+
+ /* If that succeeded, we know we'll be keeping all the
+ relocs. */
+ if (h->dynindx != -1)
+ goto keep;
+ }
+
+ eh->dyn_relocs = NULL;
+
+ keep: ;
+ }
+
+ /* Finally, allocate space. */
+ for (p = eh->dyn_relocs; p != NULL; p = p->next)
+ {
+ asection *sreloc = elf_section_data (p->sec)->sreloc;
+ sreloc->_raw_size += p->count * sizeof (Elf64_External_Rela);
+ }
+
+ return true;
+}
+
+/* Find any dynamic relocs that apply to read-only sections. */
+
+static boolean
+readonly_dynrelocs (h, inf)
+ struct elf_link_hash_entry *h;
+ PTR inf;
+{
+ struct ppc_link_hash_entry *eh;
+ struct ppc_dyn_relocs *p;
+
+ eh = (struct ppc_link_hash_entry *) h;
+ for (p = eh->dyn_relocs; p != NULL; p = p->next)
+ {
+ asection *s = p->sec->output_section;
+
+ if (s != NULL && (s->flags & SEC_READONLY) != 0)
+ {
+ struct bfd_link_info *info = (struct bfd_link_info *) inf;
+
+ info->flags |= DF_TEXTREL;
+
+ /* Not an error, just cut short the traversal. */
+ return false;
+ }
+ }
+ return true;
+}
+
+/* Set the sizes of the dynamic sections. */
+
+static boolean
+ppc64_elf_size_dynamic_sections (output_bfd, info)
+ bfd *output_bfd ATTRIBUTE_UNUSED;
+ struct bfd_link_info *info;
+{
+ struct ppc_link_hash_table *htab;
+ bfd *dynobj;
+ asection *s;
+ boolean relocs;
+ bfd *ibfd;
+
+ htab = ppc_hash_table (info);
+ dynobj = htab->elf.dynobj;
+ if (dynobj == NULL)
+ abort ();
+
+ if (htab->elf.dynamic_sections_created)
+ {
+ /* Set the contents of the .interp section to the interpreter. */
+ if (! info->shared)
+ {
+ s = bfd_get_section_by_name (dynobj, ".interp");
+ if (s == NULL)
+ abort ();
+ s->_raw_size = sizeof ELF_DYNAMIC_INTERPRETER;
+ s->contents = (unsigned char *) ELF_DYNAMIC_INTERPRETER;
+ }
+ }
+
+ /* Set up .got offsets for local syms, and space for local dynamic
+ relocs. */
+ for (ibfd = info->input_bfds; ibfd != NULL; ibfd = ibfd->link_next)
+ {
+ bfd_signed_vma *local_got;
+ bfd_signed_vma *end_local_got;
+ bfd_size_type locsymcount;
+ Elf_Internal_Shdr *symtab_hdr;
+ asection *srel;
+
+ if (bfd_get_flavour (ibfd) != bfd_target_elf_flavour)
+ continue;
+
+ for (s = ibfd->sections; s != NULL; s = s->next)
+ {
+ struct ppc_dyn_relocs *p;
+
+ for (p = *((struct ppc_dyn_relocs **)
+ &elf_section_data (s)->local_dynrel);
+ p != NULL;
+ p = p->next)
+ {
+ if (!bfd_is_abs_section (p->sec)
+ && bfd_is_abs_section (p->sec->output_section))
+ {
+ /* Input section has been discarded, either because
+ it is a copy of a linkonce section or due to
+ linker script /DISCARD/, so we'll be discarding
+ the relocs too. */
+ }
+ else
+ {
+ srel = elf_section_data (p->sec)->sreloc;
+ srel->_raw_size += p->count * sizeof (Elf64_External_Rela);
+ }
+ }
+ }
+
+ local_got = elf_local_got_refcounts (ibfd);
+ if (!local_got)
+ continue;
+
+ symtab_hdr = &elf_tdata (ibfd)->symtab_hdr;
+ locsymcount = symtab_hdr->sh_info;
+ end_local_got = local_got + locsymcount;
+ s = htab->sgot;
+ srel = htab->srelgot;
+ for (; local_got < end_local_got; ++local_got)
+ {
+ if (*local_got > 0)
+ {
+ *local_got = s->_raw_size;
+ s->_raw_size += 8;
+ if (info->shared)
+ srel->_raw_size += sizeof (Elf64_External_Rela);
+ }
+ else
+ *local_got = (bfd_vma) -1;
+ }
+ }
+
+ /* Allocate global sym .plt and .got entries, and space for global
+ sym dynamic relocs. */
+ elf_link_hash_traverse (&htab->elf, allocate_dynrelocs, (PTR) info);
+
+ /* We now have determined the sizes of the various dynamic sections.
+ Allocate memory for them. */
+ relocs = false;
+ for (s = dynobj->sections; s != NULL; s = s->next)
+ {
+ bfd_vma size;
+
+ if ((s->flags & SEC_LINKER_CREATED) == 0)
+ continue;
+
+ if (s == htab->splt
+ || s == htab->sgot
+ || s == htab->sstub
+ || s == htab->sglink)
+ {
+ /* Strip this section if we don't need it; see the
+ comment below. */
+ }
+ else if (strncmp (bfd_get_section_name (dynobj, s), ".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. */
+ }
+ else
+ {
+ if (s != htab->srelplt)
+ relocs = 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
+ {
+ /* It's not one of our sections, so don't allocate space. */
+ continue;
+ }
+
+ if (s->_raw_size == 0)
+ {
+ _bfd_strip_section_from_output (info, s);
+ continue;
+ }
+
+ /* Allocate memory for the section contents. We use bfd_zalloc
+ here in case unused entries are not reclaimed before the
+ section's contents are written out. This should not happen,
+ but this way if it does, we get a R_PPC64_NONE reloc instead
+ of garbage. */
+ size = s->_raw_size;
+ if (s == htab->sstub)
+ {
+ /* .stub may grow. Allocate enough for the maximum growth. */
+ size += (size + 65536 + 65535) / 65536 * 4;
+ }
+ s->contents = (bfd_byte *) bfd_zalloc (dynobj, size);
+ if (s->contents == NULL)
+ return false;
+ }
+
+ if (htab->elf.dynamic_sections_created)
+ {
+ /* Add some entries to the .dynamic section. We fill in the
+ values later, in ppc64_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. */
+#define add_dynamic_entry(TAG, VAL) \
+ bfd_elf64_add_dynamic_entry (info, (bfd_vma) (TAG), (bfd_vma) (VAL))
+
+ if (!info->shared)
+ {
+ if (!add_dynamic_entry (DT_DEBUG, 0))
+ return false;
+ }
+
+ if (htab->splt->_raw_size != 0)
+ {
+ if (!add_dynamic_entry (DT_PLTGOT, 0)
+ || !add_dynamic_entry (DT_PLTRELSZ, 0)
+ || !add_dynamic_entry (DT_PLTREL, DT_RELA)
+ || !add_dynamic_entry (DT_JMPREL, 0)
+ || !add_dynamic_entry (DT_PPC64_GLINK, 0))
+ return false;
+ }
+
+ if (relocs)
+ {
+ if (!add_dynamic_entry (DT_RELA, 0)
+ || !add_dynamic_entry (DT_RELASZ, 0)
+ || !add_dynamic_entry (DT_RELAENT, sizeof (Elf64_External_Rela)))
+ return false;
+
+ /* If any dynamic relocs apply to a read-only section,
+ then we need a DT_TEXTREL entry. */
+ elf_link_hash_traverse (&htab->elf, readonly_dynrelocs, (PTR) info);
+
+ if ((info->flags & DF_TEXTREL) != 0)
+ {
+ if (!add_dynamic_entry (DT_TEXTREL, 0))
+ return false;
+ }
+ }
+ }
+#undef add_dynamic_entry
+
+ return true;
+}
+
+/* Called after we have seen all the input files/sections, but before
+ final symbol resolution and section placement has been determined.
+
+ We use this hook to provide a value for TOCstart, which we store in
+ the output bfd elf_gp. */
+
+boolean
+ppc64_elf_set_toc (obfd, info)
+ bfd *obfd;
+ struct bfd_link_info *info;
+{
+ if (!info->relocateable)
+ {
+ asection *s;
+ bfd_vma TOCstart;
+
+ /* The TOC consists of sections .got, .toc, .tocbss, .plt in that
+ order. The TOC starts where the first of these sections starts. */
+ s = bfd_get_section_by_name (obfd, ".got");
+ if (s == NULL)
+ s = bfd_get_section_by_name (obfd, ".toc");
+ if (s == NULL)
+ s = bfd_get_section_by_name (obfd, ".tocbss");
+ if (s == NULL)
+ s = bfd_get_section_by_name (obfd, ".plt");
+ if (s == NULL)
+ {
+ /* This may happen for
+ o references to TOC base (SYM@toc / TOC[tc0]) without a
+ .toc directive
+ o bad linker script
+ o --gc-sections and empty TOC sections
+
+ FIXME: Warn user? */
+
+ /* Look for a likely section. We probably won't even be
+ using TOCstart. */
+ for (s = obfd->sections; s != NULL; s = s->next)
+ if ((s->flags & (SEC_ALLOC | SEC_SMALL_DATA | SEC_READONLY))
+ == (SEC_ALLOC | SEC_SMALL_DATA))
+ break;
+ if (s == NULL)
+ for (s = obfd->sections; s != NULL; s = s->next)
+ if ((s->flags & (SEC_ALLOC | SEC_SMALL_DATA))
+ == (SEC_ALLOC | SEC_SMALL_DATA))
+ break;
+ if (s == NULL)
+ for (s = obfd->sections; s != NULL; s = s->next)
+ if ((s->flags & (SEC_ALLOC | SEC_READONLY)) == SEC_ALLOC)
+ break;
+ if (s == NULL)
+ for (s = obfd->sections; s != NULL; s = s->next)
+ if ((s->flags & SEC_ALLOC) == SEC_ALLOC)
+ break;
+ }
+
+ TOCstart = 0;
+ if (s != NULL)
+ TOCstart = s->output_section->vma + s->output_offset;
+
+ elf_gp (obfd) = TOCstart;
+ }
+ return true;
+}
+
+/* PowerPC64 .plt entries are 24 bytes long, which doesn't divide
+ evenly into 64k. Sometimes with a large enough .plt, we'll need to
+ use offsets differing in the high 16 bits when accessing a .plt
+ entry from a .plt call stub. This function adjusts the size of
+ .stub to accommodate the extra stub instruction needed in such
+ cases. */
+
+boolean
+ppc64_elf_size_stubs (obfd, info, changed)
+ bfd *obfd;
+ struct bfd_link_info *info;
+ int *changed;
+{
+ struct ppc_link_hash_table *htab = ppc_hash_table (info);
+ bfd_vma plt_offset, next_64k;
+ long base, num, extra;
+
+ /* .plt and .stub should be both present, or both absent. */
+ if ((htab->splt == NULL || htab->splt->_raw_size == 0)
+ != (htab->sstub == NULL || htab->sstub->_raw_size == 0))
+ abort ();
+
+ /* If no .plt, then nothing to do. */
+ if (htab->splt == NULL || htab->splt->_raw_size == 0)
+ return true;
+
+ plt_offset = (htab->splt->output_section->vma
+ + htab->splt->output_offset
+ - elf_gp (obfd));
+ next_64k = (plt_offset + 65535) & -65536;
+
+ /* If the .plt doesn't have any entries crossing a 64k boundary,
+ then there is no need for bigger stubs. */
+ if (next_64k <= plt_offset + htab->splt->_raw_size)
+ return true;
+
+ /* OK, so we have at least one transition. Since .plt entries are
+ 24 bytes long, we'll strike it lucky every 3*64k, with the 64k
+ boundary between .plt entries. */
+ base = next_64k / 65536;
+ num = (plt_offset + htab->splt->_raw_size - next_64k) / 65536;
+ extra = (base % 3 + num + 1) * 2 / 3;
+
+ /* Allow one extra instruction for each EXTRA. The change in .stub
+ may change the location of .toc and .plt. .toc and .plt ought to
+ move as a group, but someone might be playing with eg. .plt
+ alignment, so don't allow .stub size to decrease. */
+ if (htab->sstub->_cooked_size < htab->sstub->_raw_size + extra * 4)
+ {
+ htab->sstub->_cooked_size = htab->sstub->_raw_size + extra * 4;
+ *changed = true;
+ }
+ return true;
+}
+
+/* Build a .plt call stub. */
+
+static bfd_byte *
+build_plt_stub (obfd, p, offset, glink)
+ bfd *obfd;
+ bfd_byte *p;
+ int offset;
+ int glink;
+{
+#define PPC_LO(v) ((v) & 0xffff)
+#define PPC_HI(v) (((v) >> 16) & 0xffff)
+#define PPC_HA(v) PPC_HI ((v) + 0x8000)
+
+ if (glink)
+ bfd_put_32 (obfd, LD_R2_40R1, p), p += 4;
+ bfd_put_32 (obfd, ADDIS_R12_R2 | PPC_HA (offset), p), p += 4;
+ if (!glink)
+ bfd_put_32 (obfd, STD_R2_40R1, p), p += 4;
+ bfd_put_32 (obfd, LD_R11_0R12 | PPC_LO (offset), p), p += 4;
+ if (PPC_HA (offset + 8) != PPC_HA (offset))
+ bfd_put_32 (obfd, ADDIS_R12_R12_1, p), p += 4;
+ offset += 8;
+ bfd_put_32 (obfd, LD_R2_0R12 | PPC_LO (offset), p), p += 4;
+ if (PPC_HA (offset + 8) != PPC_HA (offset))
+ bfd_put_32 (obfd, ADDIS_R12_R12_1, p), p += 4;
+ offset += 8;
+ bfd_put_32 (obfd, MTCTR_R11, p), p += 4;
+ bfd_put_32 (obfd, LD_R11_0R12 | PPC_LO (offset), p), p += 4;
+ bfd_put_32 (obfd, BCTR, p), p += 4;
+ return p;
+}
+
+/* Build the stubs for one function call. */
+
+static boolean
+build_one_stub (h, inf)
+ struct elf_link_hash_entry *h;
+ PTR inf;
+{
+ struct bfd_link_info *info;
+ struct ppc_link_hash_table *htab;
+
+ if (h->root.type == bfd_link_hash_indirect
+ || h->root.type == bfd_link_hash_warning)
+ return true;
+
+ info = (struct bfd_link_info *) inf;
+ htab = ppc_hash_table (info);
+
+ if (htab->elf.dynamic_sections_created
+ && h->plt.offset != (bfd_vma) -1
+ && ((struct ppc_link_hash_entry *) h)->is_func_descriptor)
+ {
+ struct elf_link_hash_entry *fh;
+ asection *s;
+ bfd_vma plt_r2;
+ bfd_byte *p;
+ unsigned int indx;
+
+ fh = elf_link_hash_lookup (&htab->elf, h->root.root.string - 1,
+ false, false, true);
+
+ if (fh == NULL)
+ abort ();
+
+ BFD_ASSERT (((struct ppc_link_hash_entry *) fh)->is_func);
+
+ /* Build the .plt call stub. */
+ plt_r2 = (htab->splt->output_section->vma
+ + htab->splt->output_offset
+ + h->plt.offset
+ - elf_gp (htab->splt->output_section->owner)
+ - TOC_BASE_OFF);
+
+ if (plt_r2 + 0x80000000 > 0xffffffff
+ || (plt_r2 & 3) != 0)
+ {
+ (*_bfd_error_handler)
+ (_("linkage table error against `%s'"),
+ h->root.root.string);
+ bfd_set_error (bfd_error_bad_value);
+ htab->plt_overflow = true;
+ return false;
+ }
+
+ s = htab->sstub;
+ /* Steal plt.offset to store the stub offset. */
+ fh->plt.offset = s->_cooked_size;
+ p = s->contents + s->_cooked_size;
+ p = build_plt_stub (s->owner, p, (int) plt_r2, 0);
+ s->_cooked_size = p - s->contents;
+
+ /* Build the .glink lazy link call stub. */
+ s = htab->sglink;
+ p = s->contents + s->_cooked_size;
+ indx = s->reloc_count;
+ if (indx < 0x8000)
+ {
+ bfd_put_32 (s->owner, LI_R0_0 | indx, p);
+ p += 4;
+ }
+ else
+ {
+ bfd_put_32 (s->owner, LIS_R0_0 | PPC_HI (indx), p);
+ p += 4;
+ bfd_put_32 (s->owner, ORI_R0_R0_0 | PPC_LO (indx), p);
+ p += 4;
+ }
+ bfd_put_32 (s->owner, B_DOT | ((s->contents - p) & 0x3fffffc), p);
+ p += 4;
+ s->_cooked_size = p - s->contents;
+ s->reloc_count += 1;
+ }
+ return true;
+}
+
+boolean
+ppc64_elf_build_stubs (obfd, info)
+ bfd *obfd;
+ struct bfd_link_info *info;
+{
+ struct ppc_link_hash_table *htab = ppc_hash_table (info);
+ bfd_vma old_stub_size;
+ bfd_vma plt_r2;
+ bfd_byte *p;
+
+ /* If no .plt stubs, then nothing to do. */
+ if (htab->sstub == NULL || htab->sstub->_raw_size == 0)
+ return true;
+
+ old_stub_size = htab->sstub->_cooked_size;
+ htab->sstub->_cooked_size = 0;
+
+ /* Build the .glink plt call stub. */
+ plt_r2 = (htab->splt->output_section->vma
+ + htab->splt->output_offset
+ - elf_gp (obfd)
+ - TOC_BASE_OFF);
+ p = htab->sglink->contents;
+ p = build_plt_stub (htab->sglink->owner, p, (int) plt_r2, 1);
+ while (p - htab->sglink->contents < GLINK_CALL_STUB_SIZE)
+ {
+ bfd_put_32 (htab->sglink->owner, NOP, p);
+ p += 4;
+ }
+ htab->sglink->_cooked_size = p - htab->sglink->contents;
+
+ /* Use reloc_count to count entries. */
+ htab->sglink->reloc_count = 0;
+
+ elf_link_hash_traverse (&htab->elf, build_one_stub, (PTR) info);
+ htab->sglink->reloc_count = 0;
+
+ if (htab->plt_overflow)
+ return false;
+
+ if (old_stub_size != htab->sstub->_cooked_size
+ || htab->sglink->_raw_size != htab->sglink->_cooked_size)
+ {
+ (*_bfd_error_handler)
+ (_("stub section size doesn't match calculated size"));
+ bfd_set_error (bfd_error_bad_value);
+ return false;
+ }
+ return true;
+}
+
+/* Set up any other section flags and such that may be necessary. */
+
+static boolean
+ppc64_elf_fake_sections (abfd, shdr, asect)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ Elf64_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;
+}
+
+/* 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
+ppc64_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;
+{
+ struct ppc_link_hash_table *htab;
+ Elf_Internal_Shdr *symtab_hdr;
+ struct elf_link_hash_entry **sym_hashes;
+ Elf_Internal_Rela *rel;
+ Elf_Internal_Rela *relend;
+ bfd_vma *local_got_offsets;
+ bfd_vma TOCstart;
+ boolean ret = true;
+ boolean is_opd;
+
+ /* Initialize howto table if needed. */
+ if (!ppc64_elf_howto_table[R_PPC64_ADDR32])
+ ppc_howto_init ();
+
+ htab = ppc_hash_table (info);
+ local_got_offsets = elf_local_got_offsets (input_bfd);
+ TOCstart = elf_gp (output_bfd);
+ symtab_hdr = &elf_tdata (input_bfd)->symtab_hdr;
+ sym_hashes = elf_sym_hashes (input_bfd);
+ is_opd = strcmp (bfd_get_section_name (abfd, input_section), ".opd") == 0;
+
+ rel = relocs;
+ relend = relocs + input_section->reloc_count;
+ for (; rel < relend; rel++)
+ {
+ enum elf_ppc_reloc_type r_type;
+ bfd_vma offset;
+ bfd_vma addend;
+ bfd_reloc_status_type r;
+ Elf_Internal_Sym *sym;
+ asection *sec;
+ struct elf_link_hash_entry *h;
+ const char *sym_name;
+ unsigned long r_symndx;
+ bfd_vma relocation;
+ boolean unresolved_reloc;
+ boolean has_nop;
+ long insn;
+
+ r_type = (enum elf_ppc_reloc_type) ELF64_R_TYPE (rel->r_info);
+ r_symndx = ELF64_R_SYM (rel->r_info);
+
+ if (info->relocateable)
+ {
+ /* This is a relocatable 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];
+ rel->r_addend += sec->output_offset + sym->st_value;
+ }
+ }
+ continue;
+ }
+
+ /* This is a final link. */
+
+ offset = rel->r_offset;
+ addend = rel->r_addend;
+ r = bfd_reloc_other;
+ sym = (Elf_Internal_Sym *) 0;
+ sec = (asection *) 0;
+ h = (struct elf_link_hash_entry *) 0;
+ sym_name = (const char *) 0;
+ unresolved_reloc = false;
+
+ if (r_type == R_PPC64_TOC)
+ {
+ /* Relocation value is TOC base. Symbol is ignored. */
+ relocation = TOCstart + TOC_BASE_OFF;
+ }
+ else if (r_symndx < symtab_hdr->sh_info)
+ {
+ /* It's a local symbol. */
+ sym = local_syms + r_symndx;
+ sec = local_sections[r_symndx];
+ sym_name = "<local symbol>";
+
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
+ addend = rel->r_addend;
+ }
+ else
+ {
+ /* It's a global symbol. */
+ 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;
+ relocation = 0;
+ 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)
+ /* Set a flag that will be cleared later if we find a
+ relocation value for this symbol. output_section
+ is typically NULL for symbols satisfied by a shared
+ library. */
+ unresolved_reloc = true;
+ else
+ relocation = (h->root.u.def.value
+ + sec->output_section->vma
+ + sec->output_offset);
+ }
+ else if (h->root.type == bfd_link_hash_undefweak)
+ ;
+ else if (info->shared
+ && (!info->symbolic || info->allow_shlib_undefined)
+ && !info->no_undefined
+ && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
+ ;
+ else
+ {
+ if (! ((*info->callbacks->undefined_symbol)
+ (info, h->root.root.string, input_bfd, input_section,
+ offset, (!info->shared
+ || info->no_undefined
+ || ELF_ST_VISIBILITY (h->other)))))
+ return false;
+ }
+ }
+
+ /* First handle relocations that tweak non-addend part of insn. */
+ insn = 0;
+ switch (r_type)
+ {
+ default:
+ break;
+
+ /* Branch taken prediction relocations. */
+ case R_PPC64_ADDR14_BRTAKEN:
+ case R_PPC64_REL14_BRTAKEN:
+ insn = 0x01 << 21; /* Set 't' bit, lowest bit of BO field. */
+ /* Fall thru. */
+
+ /* Branch not taken prediction relocations. */
+ case R_PPC64_ADDR14_BRNTAKEN:
+ case R_PPC64_REL14_BRNTAKEN:
+ insn |= bfd_get_32 (output_bfd, contents + offset) & ~(0x01 << 21);
+ /* Set 'a' bit. This is 0b00010 in BO field for branch on CR(BI)
+ insns (BO == 001at or 011at), and 0b01000 for branch on CTR
+ insns (BO == 1a00t or 1a01t). */
+ if ((insn & (0x14 << 21)) == (0x04 << 21))
+ insn |= 0x02 << 21;
+ else if ((insn & (0x14 << 21)) == (0x10 << 21))
+ insn |= 0x08 << 21;
+ else
+ break;
+
+ bfd_put_32 (output_bfd, (bfd_vma) insn, contents + offset);
+ break;
+
+ case R_PPC64_REL24:
+ case R_PPC64_ADDR24:
+ /* An ADDR24 or REL24 branching to a linkage function may be
+ followed by a nop that we have to replace with a ld in
+ order to restore the TOC base pointer. Only calls to
+ shared objects need to alter the TOC base. These are
+ recognized by their need for a PLT entry. */
+ has_nop = 0;
+ if (h != NULL
+ && h->plt.offset != (bfd_vma) -1
+ && htab->sstub != NULL)
+ {
+ /* plt.offset here is the offset into the stub section. */
+ relocation = (htab->sstub->output_section->vma
+ + htab->sstub->output_offset
+ + h->plt.offset);
+ unresolved_reloc = false;
+
+ /* Make sure that there really is an instruction after
+ the branch that we can decode. */
+ if (offset + 8 <= input_section->_cooked_size)
+ {
+ bfd_byte *pnext;
+
+ pnext = contents + offset + 4;
+ insn = bfd_get_32 (input_bfd, pnext);
+
+ if (insn == 0x60000000 /* nop (ori r0,r0,0) */
+ || insn == 0x4def7b82 /* cror 15,15,15 */
+ || insn == 0x4ffffb82) /* cror 31,31,31 */
+ {
+ bfd_put_32 (input_bfd,
+ (bfd_vma) 0xe8410028, /* ld r2,40(r1) */
+ pnext);
+ has_nop = 1;
+ }
+ }
+ }
+
+ if (h != NULL
+ && h->root.type == bfd_link_hash_undefweak
+ && r_type == R_PPC64_REL24
+ && addend == 0
+ && relocation == 0)
+ {
+ /* Tweak calls to undefined weak functions to behave as
+ if the "called" function immediately returns. We can
+ thus call to a weak function without first checking
+ whether the function is defined. */
+ relocation = 4;
+ if (has_nop)
+ relocation = 8;
+ }
+ break;
+ }
+
+ /* Set `addend'. */
+ switch (r_type)
+ {
+ default:
+ (*_bfd_error_handler)
+ (_("%s: unknown relocation type %d for symbol %s"),
+ bfd_archive_filename (input_bfd), (int) r_type, sym_name);
+
+ bfd_set_error (bfd_error_bad_value);
+ ret = false;
+ continue;
+
+ case R_PPC64_NONE:
+ case R_PPC_GNU_VTINHERIT:
+ case R_PPC_GNU_VTENTRY:
+ continue;
+
+ /* GOT16 relocations. Like an ADDR16 using the symbol's
+ address in the GOT as relocation value instead of the
+ symbols value itself. Also, create a GOT entry for the
+ symbol and put the symbol value there. */
+ case R_PPC64_GOT16:
+ case R_PPC64_GOT16_LO:
+ case R_PPC64_GOT16_HI:
+ case R_PPC64_GOT16_HA:
+ case R_PPC64_GOT16_DS:
+ case R_PPC64_GOT16_LO_DS:
+ {
+ /* Relocation is to the entry for this symbol in the global
+ offset table. */
+ bfd_vma off;
+
+ if (htab->sgot == NULL)
+ abort ();
+
+ if (h != NULL)
+ {
+ boolean dyn;
+
+ off = h->got.offset;
+ dyn = htab->elf.dynamic_sections_created;
+ if (! WILL_CALL_FINISH_DYNAMIC_SYMBOL (dyn, info, h)
+ || (info->shared
+ && (info->symbolic
+ || h->dynindx == -1
+ || (h->elf_link_hash_flags
+ & ELF_LINK_FORCED_LOCAL))
+ && (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, or the symbol was forced to be local
+ because of a version file. We must initialize
+ this entry in the global offset table. Since the
+ offset must always be a multiple of 8, we use the
+ least significant bit to record whether we have
+ initialized it already.
+
+ When doing a dynamic link, we create a .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_64 (output_bfd, relocation,
+ htab->sgot->contents + off);
+ h->got.offset |= 1;
+ }
+ }
+ else
+ unresolved_reloc = false;
+ }
+ else
+ {
+ if (local_got_offsets == NULL)
+ abort ();
+
+ off = local_got_offsets[r_symndx];
+
+ /* The offset must always be a multiple of 8. We use
+ the least significant bit to record whether we have
+ already processed this entry. */
+ if ((off & 1) != 0)
+ off &= ~1;
+ else
+ {
+ bfd_put_64 (output_bfd, relocation,
+ htab->sgot->contents + off);
+
+ if (info->shared)
+ {
+ Elf_Internal_Rela outrel;
+ Elf64_External_Rela *loc;
+
+ /* We need to generate a R_PPC64_RELATIVE reloc
+ for the dynamic linker. */
+ outrel.r_offset = (htab->sgot->output_section->vma
+ + htab->sgot->output_offset
+ + off);
+ outrel.r_info = ELF64_R_INFO (0, R_PPC64_RELATIVE);
+ outrel.r_addend = relocation;
+ loc = (Elf64_External_Rela *) htab->srelgot->contents;
+ loc += htab->srelgot->reloc_count++;
+ bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc);
+ }
+
+ local_got_offsets[r_symndx] |= 1;
+ }
+ }
+
+ if (off >= (bfd_vma) -2)
+ abort ();
+
+ relocation = htab->sgot->output_offset + off;
+
+ /* TOC base (r2) is TOC start plus 0x8000. */
+ addend -= TOC_BASE_OFF;
+ }
+ break;
+
+ case R_PPC64_PLT16_HA:
+ case R_PPC64_PLT16_HI:
+ case R_PPC64_PLT16_LO:
+ case R_PPC64_PLT32:
+ case R_PPC64_PLT64:
+ /* Relocation is to the entry for this symbol in the
+ procedure linkage table. */
+
+ /* Resolve a PLT reloc against a local symbol directly,
+ without using the procedure linkage table. */
+ if (h == NULL)
+ break;
+
+ if (h->plt.offset == (bfd_vma) -1
+ || htab->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 = (htab->splt->output_section->vma
+ + htab->splt->output_offset
+ + h->plt.offset);
+ unresolved_reloc = false;
+ break;
+
+ /* TOC16 relocs. We want the offset relative to the TOC base,
+ which is the address of the start of the TOC plus 0x8000.
+ The TOC consists of sections .got, .toc, .tocbss, and .plt,
+ in this order. */
+ case R_PPC64_TOC16:
+ case R_PPC64_TOC16_LO:
+ case R_PPC64_TOC16_HI:
+ case R_PPC64_TOC16_DS:
+ case R_PPC64_TOC16_LO_DS:
+ case R_PPC64_TOC16_HA:
+ addend -= TOCstart + TOC_BASE_OFF;
+ break;
+
+ /* Relocate against the beginning of the section. */
+ case R_PPC64_SECTOFF:
+ case R_PPC64_SECTOFF_LO:
+ case R_PPC64_SECTOFF_HI:
+ case R_PPC64_SECTOFF_DS:
+ case R_PPC64_SECTOFF_LO_DS:
+ case R_PPC64_SECTOFF_HA:
+ if (sec != (asection *) 0)
+ addend -= sec->output_section->vma;
+ break;
+
+ case R_PPC64_REL24:
+ break;
+
+ /* Relocations that may need to be propagated if this is a
+ dynamic object. */
+ case R_PPC64_REL14:
+ case R_PPC64_REL14_BRNTAKEN:
+ case R_PPC64_REL14_BRTAKEN:
+ case R_PPC64_REL32:
+ case R_PPC64_REL64:
+ case R_PPC64_ADDR14:
+ case R_PPC64_ADDR14_BRNTAKEN:
+ case R_PPC64_ADDR14_BRTAKEN:
+ case R_PPC64_ADDR16:
+ case R_PPC64_ADDR16_DS:
+ case R_PPC64_ADDR16_HA:
+ case R_PPC64_ADDR16_HI:
+ case R_PPC64_ADDR16_HIGHER:
+ case R_PPC64_ADDR16_HIGHERA:
+ case R_PPC64_ADDR16_HIGHEST:
+ case R_PPC64_ADDR16_HIGHESTA:
+ case R_PPC64_ADDR16_LO:
+ case R_PPC64_ADDR16_LO_DS:
+ case R_PPC64_ADDR24:
+ case R_PPC64_ADDR30:
+ case R_PPC64_ADDR32:
+ case R_PPC64_ADDR64:
+ case R_PPC64_UADDR16:
+ case R_PPC64_UADDR32:
+ case R_PPC64_UADDR64:
+ /* r_symndx will be zero only for relocs against symbols
+ from removed linkonce sections, or sections discarded by
+ a linker script. */
+ if (r_symndx == 0)
+ break;
+ /* Fall thru. */
+
+ case R_PPC64_TOC:
+ if ((input_section->flags & SEC_ALLOC) == 0)
+ break;
+
+ if (NO_OPD_RELOCS && is_opd)
+ break;
+
+ if ((info->shared
+ && (IS_ABSOLUTE_RELOC (r_type)
+ || (h != NULL
+ && h->dynindx != -1
+ && (! info->symbolic
+ || (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) == 0))))
+ || (!info->shared
+ && h != NULL
+ && h->dynindx != -1
+ && (h->elf_link_hash_flags & ELF_LINK_NON_GOT_REF) == 0
+ && (((h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_DYNAMIC) != 0
+ && (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) == 0)
+ || h->root.type == bfd_link_hash_undefweak
+ || h->root.type == bfd_link_hash_undefined)))
+ {
+ Elf_Internal_Rela outrel;
+ boolean skip, relocate;
+ asection *sreloc;
+ Elf64_External_Rela *loc;
+
+ /* When generating a dynamic object, these relocations
+ are copied into the output file to be resolved at run
+ time. */
+
+ skip = false;
+
+ outrel.r_offset =
+ _bfd_elf_section_offset (output_bfd, info, input_section,
+ rel->r_offset);
+ if (outrel.r_offset == (bfd_vma) -1)
+ skip = true;
+
+ outrel.r_offset += (input_section->output_section->vma
+ + input_section->output_offset);
+ outrel.r_addend = addend;
+
+ if (skip)
+ {
+ relocate = false;
+ memset (&outrel, 0, sizeof outrel);
+ }
+ else if (h != NULL
+ && h->dynindx != -1
+ && !is_opd
+ && (!IS_ABSOLUTE_RELOC (r_type)
+ || !info->shared
+ || !info->symbolic
+ || (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_REGULAR) == 0))
+ {
+ relocate = false;
+ outrel.r_info = ELF64_R_INFO (h->dynindx, r_type);
+ }
+ else
+ {
+ /* This symbol is local, or marked to become local,
+ or this is an opd section reloc which must point
+ at a local function. */
+ outrel.r_addend += relocation;
+ relocate = true;
+ if (r_type == R_PPC64_ADDR64 || r_type == R_PPC64_TOC)
+ {
+ outrel.r_info = ELF64_R_INFO (0, R_PPC64_RELATIVE);
+ }
+ else
+ {
+ long indx = 0;
+
+ if (bfd_is_abs_section (sec))
+ ;
+ 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;
+
+ /* We are turning this relocation into one
+ against a section symbol, so subtract out
+ the output section's address but not the
+ offset of the input section in the output
+ section. */
+ outrel.r_addend -= osec->vma;
+ }
+
+ outrel.r_info = ELF64_R_INFO (indx, r_type);
+ }
+ }
+
+ sreloc = elf_section_data (input_section)->sreloc;
+ if (sreloc == NULL)
+ abort ();
+
+ loc = (Elf64_External_Rela *) sreloc->contents;
+ loc += sreloc->reloc_count++;
+ bfd_elf64_swap_reloca_out (output_bfd, &outrel, loc);
+
+ /* If this reloc is against an external symbol, it will
+ be computed at runtime, so there's no need to do
+ anything now. */
+ if (! relocate)
+ continue;
+ }
+ break;
+
+ case R_PPC64_COPY:
+ case R_PPC64_GLOB_DAT:
+ case R_PPC64_JMP_SLOT:
+ case R_PPC64_RELATIVE:
+ /* We shouldn't ever see these dynamic relocs in relocatable
+ files. */
+ /* Fall thru */
+
+ case R_PPC64_PLTGOT16:
+ case R_PPC64_PLTGOT16_DS:
+ case R_PPC64_PLTGOT16_HA:
+ case R_PPC64_PLTGOT16_HI:
+ case R_PPC64_PLTGOT16_LO:
+ case R_PPC64_PLTGOT16_LO_DS:
+ case R_PPC64_PLTREL32:
+ case R_PPC64_PLTREL64:
+ /* These ones haven't been implemented yet. */
+
+ (*_bfd_error_handler)
+ (_("%s: Relocation %s is not supported for symbol %s."),
+ bfd_archive_filename (input_bfd),
+ ppc64_elf_howto_table[(int) r_type]->name, sym_name);
+
+ bfd_set_error (bfd_error_invalid_operation);
+ ret = false;
+ continue;
+ }
+
+ /* Do any further special processing. */
+ switch (r_type)
+ {
+ default:
+ break;
+
+ case R_PPC64_ADDR16_HA:
+ case R_PPC64_ADDR16_HIGHERA:
+ case R_PPC64_ADDR16_HIGHESTA:
+ case R_PPC64_PLT16_HA:
+ case R_PPC64_TOC16_HA:
+ case R_PPC64_SECTOFF_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). */
+ if (sec != NULL)
+ /* Add 0x10000 if sign bit in 0:15 is set. */
+ addend += ((relocation + addend) & 0x8000) << 1;
+ break;
+
+ case R_PPC64_ADDR16_DS:
+ case R_PPC64_ADDR16_LO_DS:
+ case R_PPC64_GOT16_DS:
+ case R_PPC64_GOT16_LO_DS:
+ case R_PPC64_PLT16_LO_DS:
+ case R_PPC64_SECTOFF_DS:
+ case R_PPC64_SECTOFF_LO_DS:
+ case R_PPC64_TOC16_DS:
+ case R_PPC64_TOC16_LO_DS:
+ case R_PPC64_PLTGOT16_DS:
+ case R_PPC64_PLTGOT16_LO_DS:
+ if (((relocation + addend) & 3) != 0)
+ {
+ (*_bfd_error_handler)
+ (_("%s: error: relocation %s not a multiple of 4"),
+ bfd_archive_filename (input_bfd),
+ ppc64_elf_howto_table[(int) r_type]->name);
+ bfd_set_error (bfd_error_bad_value);
+ ret = false;
+ continue;
+ }
+ break;
+ }
+
+ /* FIXME: Why do we allow debugging sections to escape this error?
+ More importantly, why do we not emit dynamic relocs above in
+ debugging sections (which are ! SEC_ALLOC)? If we had
+ emitted the dynamic reloc, we could remove the fudge here. */
+ if (unresolved_reloc
+ && !(info->shared
+ && (input_section->flags & SEC_DEBUGGING) != 0
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_DYNAMIC) != 0))
+ (*_bfd_error_handler)
+ (_("%s(%s+0x%lx): unresolvable relocation against symbol `%s'"),
+ bfd_archive_filename (input_bfd),
+ bfd_get_section_name (input_bfd, input_section),
+ (long) rel->r_offset,
+ h->root.root.string);
+
+ r = _bfd_final_link_relocate (ppc64_elf_howto_table[(int) r_type],
+ 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
+ && ppc64_elf_howto_table[(int) r_type]->pc_relative)
+ {
+ /* Assume this is a call protected by other code that
+ detects 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, ppc64_elf_howto_table[(int) r_type]->name,
+ (bfd_vma) 0, input_bfd, input_section, offset)))
+ return false;
+ }
+ else
+ ret = false;
+ }
+
+ return ret;
+}
+
+/* Finish up dynamic symbol handling. We set the contents of various
+ dynamic sections here. */
+
+static boolean
+ppc64_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;
+{
+ struct ppc_link_hash_table *htab;
+ bfd *dynobj;
+
+ htab = ppc_hash_table (info);
+ dynobj = htab->elf.dynobj;
+
+ if (h->plt.offset != (bfd_vma) -1
+ && ((struct ppc_link_hash_entry *) h)->is_func_descriptor)
+ {
+ Elf_Internal_Rela rela;
+ Elf64_External_Rela *loc;
+
+ /* This symbol has an entry in the procedure linkage table. Set
+ it up. */
+
+ if (htab->splt == NULL
+ || htab->srelplt == NULL
+ || htab->sglink == NULL)
+ abort ();
+
+ /* Create a JMP_SLOT reloc to inform the dynamic linker to
+ fill in the PLT entry. */
+
+ rela.r_offset = (htab->splt->output_section->vma
+ + htab->splt->output_offset
+ + h->plt.offset);
+ rela.r_info = ELF64_R_INFO (h->dynindx, R_PPC64_JMP_SLOT);
+ rela.r_addend = 0;
+
+ loc = (Elf64_External_Rela *) htab->srelplt->contents;
+ loc += (h->plt.offset - PLT_INITIAL_ENTRY_SIZE) / PLT_ENTRY_SIZE;
+ bfd_elf64_swap_reloca_out (output_bfd, &rela, loc);
+ }
+
+ if (h->got.offset != (bfd_vma) -1)
+ {
+ Elf_Internal_Rela rela;
+ Elf64_External_Rela *loc;
+
+ /* This symbol has an entry in the global offset table. Set it
+ up. */
+
+ if (htab->sgot == NULL || htab->srelgot == NULL)
+ abort ();
+
+ rela.r_offset = (htab->sgot->output_section->vma
+ + htab->sgot->output_offset
+ + (h->got.offset &~ (bfd_vma) 1));
+
+ /* If this is a static link, or it is a -Bsymbolic link and the
+ symbol is defined locally or was forced to be local because
+ of a version file, we just want to emit a RELATIVE reloc.
+ The entry in the global offset table will already have been
+ initialized in the relocate_section function. */
+ if (info->shared
+ && (info->symbolic
+ || h->dynindx == -1
+ || (h->elf_link_hash_flags & ELF_LINK_FORCED_LOCAL))
+ && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR))
+ {
+ BFD_ASSERT((h->got.offset & 1) != 0);
+ rela.r_info = ELF64_R_INFO (0, R_PPC64_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_64 (output_bfd, (bfd_vma) 0,
+ htab->sgot->contents + h->got.offset);
+ rela.r_info = ELF64_R_INFO (h->dynindx, R_PPC64_GLOB_DAT);
+ rela.r_addend = 0;
+ }
+
+ loc = (Elf64_External_Rela *) htab->srelgot->contents;
+ loc += htab->srelgot->reloc_count++;
+ bfd_elf64_swap_reloca_out (output_bfd, &rela, loc);
+ }
+
+ if ((h->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_COPY) != 0)
+ {
+ Elf_Internal_Rela rela;
+ Elf64_External_Rela *loc;
+
+ /* This symbol needs a copy reloc. Set it up. */
+
+ if (h->dynindx == -1
+ || (h->root.type != bfd_link_hash_defined
+ && h->root.type != bfd_link_hash_defweak)
+ || htab->srelbss == NULL)
+ abort ();
+
+ 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 = ELF64_R_INFO (h->dynindx, R_PPC64_COPY);
+ rela.r_addend = 0;
+ loc = (Elf64_External_Rela *) htab->srelbss->contents;
+ loc += htab->srelbss->reloc_count++;
+ bfd_elf64_swap_reloca_out (output_bfd, &rela, loc);
+ }
+
+ /* Mark some specially defined symbols as absolute. */
+ if (strcmp (h->root.root.string, "_DYNAMIC") == 0)
+ sym->st_shndx = SHN_ABS;
+
+ return true;
+}
+
+/* Used to decide how to sort relocs in an optimal manner for the
+ dynamic linker, before writing them out. */
+
+static enum elf_reloc_type_class
+ppc64_elf_reloc_type_class (rela)
+ const Elf_Internal_Rela *rela;
+{
+ enum elf_ppc_reloc_type r_type;
+
+ r_type = (enum elf_ppc_reloc_type) ELF64_R_TYPE (rela->r_info);
+ switch (r_type)
+ {
+ case R_PPC64_RELATIVE:
+ return reloc_class_relative;
+ case R_PPC64_JMP_SLOT:
+ return reloc_class_plt;
+ case R_PPC64_COPY:
+ return reloc_class_copy;
+ default:
+ return reloc_class_normal;
+ }
+}
+
+/* Finish up the dynamic sections. */
+
+static boolean
+ppc64_elf_finish_dynamic_sections (output_bfd, info)
+ bfd *output_bfd;
+ struct bfd_link_info *info;
+{
+ struct ppc_link_hash_table *htab;
+ bfd *dynobj;
+ asection *sdyn;
+
+ htab = ppc_hash_table (info);
+ dynobj = htab->elf.dynobj;
+ sdyn = bfd_get_section_by_name (dynobj, ".dynamic");
+
+ if (htab->elf.dynamic_sections_created)
+ {
+ Elf64_External_Dyn *dyncon, *dynconend;
+
+ if (sdyn == NULL || htab->sgot == NULL)
+ abort ();
+
+ dyncon = (Elf64_External_Dyn *) sdyn->contents;
+ dynconend = (Elf64_External_Dyn *) (sdyn->contents + sdyn->_raw_size);
+ for (; dyncon < dynconend; dyncon++)
+ {
+ Elf_Internal_Dyn dyn;
+
+ bfd_elf64_swap_dyn_in (dynobj, dyncon, &dyn);
+
+ switch (dyn.d_tag)
+ {
+ default:
+ continue;
+
+ case DT_PPC64_GLINK:
+ dyn.d_un.d_ptr = (htab->sglink->output_section->vma
+ + htab->sglink->output_offset);
+ break;
+
+ case DT_PLTGOT:
+ dyn.d_un.d_ptr = (htab->splt->output_section->vma
+ + htab->splt->output_offset);
+ break;
+
+ case DT_JMPREL:
+ dyn.d_un.d_ptr = (htab->srelplt->output_section->vma
+ + htab->srelplt->output_offset);
+ break;
+
+ case DT_PLTRELSZ:
+ dyn.d_un.d_val = htab->srelplt->_raw_size;
+ break;
+
+ case DT_RELASZ:
+ /* Don't count procedure linkage table relocs in the
+ overall reloc count. */
+ if (htab->srelplt != NULL)
+ dyn.d_un.d_val -= htab->srelplt->_raw_size;
+ break;
+ }
+
+ bfd_elf64_swap_dyn_out (output_bfd, &dyn, dyncon);
+ }
+ }
+
+ if (htab->sgot != NULL && htab->sgot->_raw_size != 0)
+ {
+ /* Fill in the first entry in the global offset table.
+ We use it to hold the link-time TOCbase. */
+ bfd_put_64 (output_bfd,
+ elf_gp (output_bfd) + TOC_BASE_OFF,
+ htab->sgot->contents);
+
+ /* Set .got entry size. */
+ elf_section_data (htab->sgot->output_section)->this_hdr.sh_entsize = 8;
+ }
+
+ if (htab->splt != NULL && htab->splt->_raw_size != 0)
+ {
+ /* Set .plt entry size. */
+ elf_section_data (htab->splt->output_section)->this_hdr.sh_entsize
+ = PLT_ENTRY_SIZE;
+ }
+
+ return true;
+}
+
+#define TARGET_LITTLE_SYM bfd_elf64_powerpcle_vec
+#define TARGET_LITTLE_NAME "elf64-powerpcle"
+#define TARGET_BIG_SYM bfd_elf64_powerpc_vec
+#define TARGET_BIG_NAME "elf64-powerpc"
+#define ELF_ARCH bfd_arch_powerpc
+#define ELF_MACHINE_CODE EM_PPC64
+#define ELF_MAXPAGESIZE 0x10000
+#define elf_info_to_howto ppc64_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_want_got_sym 0
+#define elf_backend_want_plt_sym 0
+#define elf_backend_plt_alignment 3
+#define elf_backend_plt_not_loaded 1
+#define elf_backend_got_symbol_offset 0
+#define elf_backend_got_header_size 8
+#define elf_backend_plt_header_size PLT_INITIAL_ENTRY_SIZE
+#define elf_backend_can_gc_sections 1
+#define elf_backend_can_refcount 1
+
+#define bfd_elf64_bfd_reloc_type_lookup ppc64_elf_reloc_type_lookup
+#define bfd_elf64_bfd_set_private_flags ppc64_elf_set_private_flags
+#define bfd_elf64_bfd_merge_private_bfd_data ppc64_elf_merge_private_bfd_data
+#define bfd_elf64_bfd_link_hash_table_create ppc64_elf_link_hash_table_create
+
+#define elf_backend_section_from_shdr ppc64_elf_section_from_shdr
+#define elf_backend_create_dynamic_sections ppc64_elf_create_dynamic_sections
+#define elf_backend_copy_indirect_symbol ppc64_elf_copy_indirect_symbol
+#define elf_backend_check_relocs ppc64_elf_check_relocs
+#define elf_backend_gc_mark_hook ppc64_elf_gc_mark_hook
+#define elf_backend_gc_sweep_hook ppc64_elf_gc_sweep_hook
+#define elf_backend_adjust_dynamic_symbol ppc64_elf_adjust_dynamic_symbol
+#define elf_backend_hide_symbol ppc64_elf_hide_symbol
+#define elf_backend_always_size_sections ppc64_elf_func_desc_adjust
+#define elf_backend_size_dynamic_sections ppc64_elf_size_dynamic_sections
+#define elf_backend_fake_sections ppc64_elf_fake_sections
+#define elf_backend_relocate_section ppc64_elf_relocate_section
+#define elf_backend_finish_dynamic_symbol ppc64_elf_finish_dynamic_symbol
+#define elf_backend_reloc_type_class ppc64_elf_reloc_type_class
+#define elf_backend_finish_dynamic_sections ppc64_elf_finish_dynamic_sections
+
+#include "elf64-target.h"
diff --git a/contrib/binutils/bfd/elf64-ppc.h b/contrib/binutils/bfd/elf64-ppc.h
new file mode 100644
index 0000000..b261a58
--- /dev/null
+++ b/contrib/binutils/bfd/elf64-ppc.h
@@ -0,0 +1,22 @@
+/* PowerPC64-specific support for 64-bit ELF.
+ Copyright 2002 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. */
+
+boolean ppc64_elf_set_toc PARAMS ((bfd *, struct bfd_link_info *));
+boolean ppc64_elf_size_stubs PARAMS ((bfd *, struct bfd_link_info *, int *));
+boolean ppc64_elf_build_stubs PARAMS ((bfd *, struct bfd_link_info *));
diff --git a/contrib/binutils/bfd/elf64-sparc.c b/contrib/binutils/bfd/elf64-sparc.c
index bd32b6e..07c78bc 100644
--- a/contrib/binutils/bfd/elf64-sparc.c
+++ b/contrib/binutils/bfd/elf64-sparc.c
@@ -35,44 +35,55 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define MINUS_ONE (~ (bfd_vma) 0)
static struct bfd_link_hash_table * sparc64_elf_bfd_link_hash_table_create
- PARAMS((bfd *));
+ PARAMS ((bfd *));
+static bfd_reloc_status_type init_insn_reloc
+ PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *,
+ bfd *, bfd_vma *, bfd_vma *));
static reloc_howto_type *sparc64_elf_reloc_type_lookup
PARAMS ((bfd *, bfd_reloc_code_real_type));
static void sparc64_elf_info_to_howto
PARAMS ((bfd *, arelent *, Elf_Internal_Rela *));
static void sparc64_elf_build_plt
- PARAMS((bfd *, unsigned char *, int));
+ PARAMS ((bfd *, unsigned char *, int));
static bfd_vma sparc64_elf_plt_entry_offset
- PARAMS((int));
+ PARAMS ((bfd_vma));
static bfd_vma sparc64_elf_plt_ptr_offset
- PARAMS((int, int));
+ PARAMS ((bfd_vma, bfd_vma));
static boolean sparc64_elf_check_relocs
- PARAMS((bfd *, struct bfd_link_info *, asection *sec,
- const Elf_Internal_Rela *));
+ PARAMS ((bfd *, struct bfd_link_info *, asection *sec,
+ const Elf_Internal_Rela *));
static boolean sparc64_elf_adjust_dynamic_symbol
- PARAMS((struct bfd_link_info *, struct elf_link_hash_entry *));
+ PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *));
static boolean sparc64_elf_size_dynamic_sections
- PARAMS((bfd *, struct bfd_link_info *));
+ PARAMS ((bfd *, struct bfd_link_info *));
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 *));
+ const char **, flagword *, asection **, bfd_vma *));
+static boolean sparc64_elf_output_arch_syms
+ PARAMS ((bfd *, struct bfd_link_info *, PTR,
+ boolean (*) (PTR, const char *, Elf_Internal_Sym *, asection *)));
static void sparc64_elf_symbol_processing
PARAMS ((bfd *, asymbol *));
-static boolean sparc64_elf_copy_private_bfd_data
- PARAMS ((bfd *, bfd *));
static boolean sparc64_elf_merge_private_bfd_data
PARAMS ((bfd *, bfd *));
+static const char *sparc64_elf_print_symbol_all
+ PARAMS ((bfd *, PTR, asymbol *));
static boolean sparc64_elf_relax_section
PARAMS ((bfd *, asection *, struct bfd_link_info *, boolean *));
static boolean sparc64_elf_relocate_section
PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
Elf_Internal_Rela *, Elf_Internal_Sym *, asection **));
+static boolean sparc64_elf_finish_dynamic_symbol
+ PARAMS ((bfd *, struct bfd_link_info *, struct elf_link_hash_entry *,
+ Elf_Internal_Sym *));
+static boolean sparc64_elf_finish_dynamic_sections
+ PARAMS ((bfd *, struct bfd_link_info *));
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 *));
@@ -83,6 +94,8 @@ static boolean sparc64_elf_slurp_reloc_table
static long sparc64_elf_canonicalize_dynamic_reloc
PARAMS ((bfd *, arelent **, asymbol **));
static void sparc64_elf_write_relocs PARAMS ((bfd *, asection *, PTR));
+static enum elf_reloc_type_class sparc64_elf_reloc_type_class
+ PARAMS ((const Elf_Internal_Rela *));
/* The relocation "howto" table. */
@@ -103,7 +116,7 @@ static reloc_howto_type sparc64_elf_howto_table[] =
HOWTO(R_SPARC_32, 0,2,32,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_32", false,0,0xffffffff,true),
HOWTO(R_SPARC_DISP8, 0,0, 8,true, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_DISP8", false,0,0x000000ff,true),
HOWTO(R_SPARC_DISP16, 0,1,16,true, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_DISP16", false,0,0x0000ffff,true),
- HOWTO(R_SPARC_DISP32, 0,2,32,true, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_DISP32", false,0,0x00ffffff,true),
+ HOWTO(R_SPARC_DISP32, 0,2,32,true, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_DISP32", false,0,0xffffffff,true),
HOWTO(R_SPARC_WDISP30, 2,2,30,true, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_WDISP30", false,0,0x3fffffff,true),
HOWTO(R_SPARC_WDISP22, 2,2,22,true, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_WDISP22", false,0,0x003fffff,true),
HOWTO(R_SPARC_HI22, 10,2,22,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_HI22", false,0,0x003fffff,true),
@@ -122,8 +135,8 @@ static reloc_howto_type sparc64_elf_howto_table[] =
HOWTO(R_SPARC_RELATIVE, 0,0,00,false,0,complain_overflow_dont, bfd_elf_generic_reloc, "R_SPARC_RELATIVE",false,0,0x00000000,true),
HOWTO(R_SPARC_UA32, 0,2,32,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_UA32", false,0,0xffffffff,true),
#ifndef SPARC64_OLD_RELOCS
+ HOWTO(R_SPARC_PLT32, 0,2,32,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_PLT32", false,0,0xffffffff,true),
/* These aren't implemented yet. */
- HOWTO(R_SPARC_PLT32, 0,0,00,false,0,complain_overflow_dont, sparc_elf_notsup_reloc, "R_SPARC_PLT32", false,0,0x00000000,true),
HOWTO(R_SPARC_HIPLT22, 0,0,00,false,0,complain_overflow_dont, sparc_elf_notsup_reloc, "R_SPARC_HIPLT22", false,0,0x00000000,true),
HOWTO(R_SPARC_LOPLT10, 0,0,00,false,0,complain_overflow_dont, sparc_elf_notsup_reloc, "R_SPARC_LOPLT10", false,0,0x00000000,true),
HOWTO(R_SPARC_PCPLT32, 0,0,00,false,0,complain_overflow_dont, sparc_elf_notsup_reloc, "R_SPARC_PCPLT32", false,0,0x00000000,true),
@@ -147,7 +160,7 @@ static reloc_howto_type sparc64_elf_howto_table[] =
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_DISP64, 0,4,64,true, 0,complain_overflow_signed, bfd_elf_generic_reloc, "R_SPARC_DISP64", false,0,MINUS_ONE, true),
- HOWTO(R_SPARC_PLT64, 0,4,64,false,0,complain_overflow_bitfield,sparc_elf_notsup_reloc, "R_SPARC_PLT64", false,0,MINUS_ONE, false),
+ HOWTO(R_SPARC_PLT64, 0,4,64,false,0,complain_overflow_bitfield,bfd_elf_generic_reloc, "R_SPARC_PLT64", false,0,MINUS_ONE, true),
HOWTO(R_SPARC_HIX22, 0,4, 0,false,0,complain_overflow_bitfield,sparc_elf_hix22_reloc, "R_SPARC_HIX22", false,0,MINUS_ONE, false),
HOWTO(R_SPARC_LOX10, 0,4, 0,false,0,complain_overflow_dont, sparc_elf_lox10_reloc, "R_SPARC_LOX10", false,0,MINUS_ONE, false),
HOWTO(R_SPARC_H44, 22,2,22,false,0,complain_overflow_unsigned,bfd_elf_generic_reloc, "R_SPARC_H44", false,0,0x003fffff,false),
@@ -163,10 +176,11 @@ struct elf_reloc_map {
unsigned char elf_reloc_val;
};
-static CONST struct elf_reloc_map sparc_reloc_map[] =
+static const struct elf_reloc_map sparc_reloc_map[] =
{
{ BFD_RELOC_NONE, R_SPARC_NONE, },
{ BFD_RELOC_16, R_SPARC_16, },
+ { BFD_RELOC_16_PCREL, R_SPARC_DISP16 },
{ BFD_RELOC_8, R_SPARC_8 },
{ BFD_RELOC_8_PCREL, R_SPARC_DISP8 },
{ BFD_RELOC_CTOR, R_SPARC_64 },
@@ -175,6 +189,7 @@ static CONST struct elf_reloc_map sparc_reloc_map[] =
{ BFD_RELOC_HI22, R_SPARC_HI22 },
{ BFD_RELOC_LO10, R_SPARC_LO10, },
{ BFD_RELOC_32_PCREL_S2, R_SPARC_WDISP30 },
+ { BFD_RELOC_64_PCREL, R_SPARC_DISP64 },
{ BFD_RELOC_SPARC22, R_SPARC_22 },
{ BFD_RELOC_SPARC13, R_SPARC_13 },
{ BFD_RELOC_SPARC_GOT10, R_SPARC_GOT10 },
@@ -207,6 +222,9 @@ static CONST struct elf_reloc_map sparc_reloc_map[] =
{ BFD_RELOC_SPARC_5, R_SPARC_5 },
{ BFD_RELOC_SPARC_6, R_SPARC_6 },
{ BFD_RELOC_SPARC_DISP64, R_SPARC_DISP64 },
+#ifndef SPARC64_OLD_RELOCS
+ { BFD_RELOC_SPARC_PLT32, R_SPARC_PLT32 },
+#endif
{ BFD_RELOC_SPARC_PLT64, R_SPARC_PLT64 },
{ BFD_RELOC_SPARC_HIX22, R_SPARC_HIX22 },
{ BFD_RELOC_SPARC_LOX10, R_SPARC_LOX10 },
@@ -280,13 +298,12 @@ sparc64_elf_slurp_one_reloc_table (abfd, asect, rel_hdr, symbols, dynamic)
bfd_size_type count;
arelent *relents;
- allocated = (PTR) bfd_malloc ((size_t) rel_hdr->sh_size);
+ allocated = (PTR) bfd_malloc (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))
+ || bfd_bread (allocated, rel_hdr->sh_size, abfd) != rel_hdr->sh_size)
goto error_return;
native_relocs = (bfd_byte *) allocated;
@@ -371,6 +388,7 @@ sparc64_elf_slurp_reloc_table (abfd, asect, symbols, 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 amt;
if (asect->relocation != NULL)
return true;
@@ -401,9 +419,9 @@ sparc64_elf_slurp_reloc_table (abfd, asect, symbols, dynamic)
rel_hdr2 = NULL;
}
- asect->relocation = ((arelent *)
- bfd_alloc (abfd,
- asect->reloc_count * 2 * sizeof (arelent)));
+ amt = asect->reloc_count;
+ amt *= 2 * sizeof (arelent);
+ asect->relocation = (arelent *) bfd_alloc (abfd, amt);
if (asect->relocation == NULL)
return false;
@@ -639,9 +657,9 @@ sparc64_elf_bfd_link_hash_table_create (abfd)
bfd *abfd;
{
struct sparc64_elf_link_hash_table *ret;
+ bfd_size_type amt = sizeof (struct sparc64_elf_link_hash_table);
- ret = ((struct sparc64_elf_link_hash_table *)
- bfd_zalloc (abfd, sizeof (struct sparc64_elf_link_hash_table)));
+ ret = (struct sparc64_elf_link_hash_table *) bfd_zalloc (abfd, amt);
if (ret == (struct sparc64_elf_link_hash_table *) NULL)
return NULL;
@@ -759,8 +777,8 @@ sparc_elf_wdisp16_reloc (abfd, reloc_entry, symbol, data, input_section,
if (status != bfd_reloc_other)
return status;
- insn = (insn & ~0x303fff) | ((((relocation >> 2) & 0xc000) << 6)
- | ((relocation >> 2) & 0x3fff));
+ insn &= ~ (bfd_vma) 0x303fff;
+ insn |= (((relocation >> 2) & 0xc000) << 6) | ((relocation >> 2) & 0x3fff);
bfd_put_32 (abfd, insn, (bfd_byte *) data + reloc_entry->address);
if ((bfd_signed_vma) relocation < - 0x40000
@@ -798,7 +816,7 @@ sparc_elf_hix22_reloc (abfd,
return status;
relocation ^= MINUS_ONE;
- insn = (insn & ~0x3fffff) | ((relocation >> 10) & 0x3fffff);
+ insn = (insn &~ (bfd_vma) 0x3fffff) | ((relocation >> 10) & 0x3fffff);
bfd_put_32 (abfd, insn, (bfd_byte *) data + reloc_entry->address);
if ((relocation & ~ (bfd_vma) 0xffffffff) != 0)
@@ -834,7 +852,7 @@ sparc_elf_lox10_reloc (abfd,
if (status != bfd_reloc_other)
return status;
- insn = (insn & ~0x1fff) | 0x1c00 | (relocation & 0x3ff);
+ insn = (insn &~ (bfd_vma) 0x1fff) | 0x1c00 | (relocation & 0x3ff);
bfd_put_32 (abfd, insn, (bfd_byte *) data + reloc_entry->address);
return bfd_reloc_ok;
@@ -865,7 +883,7 @@ sparc64_elf_build_plt (output_bfd, contents, nentries)
We fill them with `illtrap 0' to force ld.so to do something. */
for (i = 0; i < PLT_HEADER_SIZE/4; ++i)
- bfd_put_32 (output_bfd, 0, contents+i*4);
+ bfd_put_32 (output_bfd, (bfd_vma) 0, contents+i*4);
/* The first 32768 entries are close enough to plt1 to get there via
a straight branch. */
@@ -881,14 +899,14 @@ sparc64_elf_build_plt (output_bfd, contents, nentries)
/* 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);
- bfd_put_32 (output_bfd, nop, entry+8);
- bfd_put_32 (output_bfd, nop, entry+12);
- bfd_put_32 (output_bfd, nop, entry+16);
- bfd_put_32 (output_bfd, nop, entry+20);
- bfd_put_32 (output_bfd, nop, entry+24);
- bfd_put_32 (output_bfd, nop, entry+28);
+ bfd_put_32 (output_bfd, (bfd_vma) sethi, entry);
+ bfd_put_32 (output_bfd, (bfd_vma) ba, entry + 4);
+ bfd_put_32 (output_bfd, (bfd_vma) nop, entry + 8);
+ bfd_put_32 (output_bfd, (bfd_vma) nop, entry + 12);
+ bfd_put_32 (output_bfd, (bfd_vma) nop, entry + 16);
+ bfd_put_32 (output_bfd, (bfd_vma) nop, entry + 20);
+ bfd_put_32 (output_bfd, (bfd_vma) nop, entry + 24);
+ bfd_put_32 (output_bfd, (bfd_vma) nop, entry + 28);
}
/* Now the tricky bit. Entries 32768 and higher are grouped in blocks of
@@ -906,17 +924,23 @@ sparc64_elf_build_plt (output_bfd, contents, nentries)
entry = contents + i*PLT_ENTRY_SIZE + j*4*6;
ptr = contents + i*PLT_ENTRY_SIZE + block*4*6 + j*8;
- /* ldx [%o7 + ptr - entry+4], %g1 */
- ldx = 0xc25be000 | ((ptr - entry+4) & 0x1fff);
-
- bfd_put_32 (output_bfd, 0x8a10000f, entry); /* mov %o7,%g5 */
- bfd_put_32 (output_bfd, 0x40000002, entry+4); /* call .+8 */
- bfd_put_32 (output_bfd, nop, entry+8); /* nop */
- bfd_put_32 (output_bfd, ldx, entry+12); /* ldx [%o7+P],%g1 */
- 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);
+ /* ldx [%o7 + ptr - (entry+4)], %g1 */
+ ldx = 0xc25be000 | ((ptr - (entry+4)) & 0x1fff);
+
+ /* mov %o7,%g5
+ call .+8
+ nop
+ ldx [%o7+P],%g1
+ jmpl %o7+%g1,%g1
+ mov %g5,%o7 */
+ bfd_put_32 (output_bfd, (bfd_vma) 0x8a10000f, entry);
+ bfd_put_32 (output_bfd, (bfd_vma) 0x40000002, entry + 4);
+ bfd_put_32 (output_bfd, (bfd_vma) nop, entry + 8);
+ bfd_put_32 (output_bfd, (bfd_vma) ldx, entry + 12);
+ bfd_put_32 (output_bfd, (bfd_vma) 0x83c3c001, entry + 16);
+ bfd_put_32 (output_bfd, (bfd_vma) 0x9e100005, entry + 20);
+
+ bfd_put_64 (output_bfd, (bfd_vma) (contents - (entry + 4)), ptr);
}
}
}
@@ -925,9 +949,9 @@ sparc64_elf_build_plt (output_bfd, contents, nentries)
static bfd_vma
sparc64_elf_plt_entry_offset (index)
- int index;
+ bfd_vma index;
{
- int block, ofs;
+ bfd_vma block, ofs;
if (index < LARGE_PLT_THRESHOLD)
return index * PLT_ENTRY_SIZE;
@@ -937,22 +961,21 @@ sparc64_elf_plt_entry_offset (index)
block = (index - LARGE_PLT_THRESHOLD) / 160;
ofs = (index - LARGE_PLT_THRESHOLD) % 160;
- return ((bfd_vma) (LARGE_PLT_THRESHOLD + block*160) * PLT_ENTRY_SIZE
- + ofs * 6*4);
+ return (LARGE_PLT_THRESHOLD + block * 160) * PLT_ENTRY_SIZE + ofs * 6 * 4;
}
static bfd_vma
sparc64_elf_plt_ptr_offset (index, max)
- int index, max;
+ bfd_vma index;
+ bfd_vma max;
{
- int block, ofs, last;
+ bfd_vma block, ofs, last;
BFD_ASSERT(index >= LARGE_PLT_THRESHOLD);
/* See above for details. */
- block = (((index - LARGE_PLT_THRESHOLD) / 160) * 160)
- + LARGE_PLT_THRESHOLD;
+ block = (((index - LARGE_PLT_THRESHOLD) / 160) * 160) + LARGE_PLT_THRESHOLD;
ofs = index - block;
if (block + 160 > max)
last = (max - LARGE_PLT_THRESHOLD) % 160;
@@ -1073,10 +1096,11 @@ sparc64_elf_check_relocs (abfd, info, sec, relocs)
symbol. */
if (local_got_offsets == NULL)
{
- size_t size;
+ bfd_size_type size;
register unsigned int i;
- size = symtab_hdr->sh_info * sizeof (bfd_vma);
+ size = symtab_hdr->sh_info;
+ size *= sizeof (bfd_vma);
local_got_offsets = (bfd_vma *) bfd_alloc (abfd, size);
if (local_got_offsets == NULL)
return false;
@@ -1148,8 +1172,10 @@ sparc64_elf_check_relocs (abfd, info, sec, relocs)
}
h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
- break;
-
+ if (ELF64_R_TYPE_ID (rel->r_info) != R_SPARC_PLT32
+ && ELF64_R_TYPE_ID (rel->r_info) != R_SPARC_PLT64)
+ break;
+ /* Fall through. */
case R_SPARC_PC10:
case R_SPARC_PC22:
case R_SPARC_PC_HH22:
@@ -1235,6 +1261,8 @@ sparc64_elf_check_relocs (abfd, info, sec, relocs)
|| ! bfd_set_section_alignment (dynobj, sreloc, 3))
return false;
}
+ if (sec->flags & SEC_READONLY)
+ info->flags |= DF_TEXTREL;
}
sreloc->_raw_size += sizeof (Elf64_External_Rela);
@@ -1247,7 +1275,7 @@ sparc64_elf_check_relocs (abfd, info, sec, relocs)
default:
(*_bfd_error_handler) (_("%s: check_relocs: unhandled reloc type %d"),
- bfd_get_filename(abfd),
+ bfd_archive_filename (abfd),
ELF64_R_TYPE_ID (rel->r_info));
return false;
}
@@ -1269,7 +1297,7 @@ sparc64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
asection **secp ATTRIBUTE_UNUSED;
bfd_vma *valp ATTRIBUTE_UNUSED;
{
- static char *stt_types[] = { "NOTYPE", "OBJECT", "FUNCTION" };
+ static const char *const stt_types[] = { "NOTYPE", "OBJECT", "FUNCTION" };
if (ELF_ST_TYPE (sym->st_info) == STT_REGISTER)
{
@@ -1284,7 +1312,7 @@ sparc64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
default:
(*_bfd_error_handler)
(_("%s: Only registers %%g[2367] can be declared using STT_REGISTER"),
- bfd_get_filename (abfd));
+ bfd_archive_filename (abfd));
return false;
}
@@ -1303,11 +1331,12 @@ sparc64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
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");
+ (_("Register %%g%d used incompatibly: %s in %s"),
+ (int) sym->st_value,
+ **namep ? *namep : "#scratch", bfd_archive_filename (abfd));
+ (*_bfd_error_handler)
+ (_(" previously %s in %s"),
+ *p->name ? p->name : "#scratch", bfd_archive_filename (p->abfd));
return false;
}
@@ -1324,11 +1353,14 @@ sparc64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
{
unsigned char type = h->type;
- if (type > STT_FUNC) type = 0;
+ if (type > STT_FUNC)
+ type = 0;
+ (*_bfd_error_handler)
+ (_("Symbol `%s' has differing types: %s in %s"),
+ *namep, "REGISTER", bfd_archive_filename (abfd));
(*_bfd_error_handler)
- (_("Symbol `%s' has differing types: "
- "previously %s, REGISTER in %s"),
- *namep, stt_types [type], bfd_get_filename (abfd));
+ (_(" previously %s in %s"),
+ stt_types[type], bfd_archive_filename (p->abfd));
return false;
}
@@ -1370,12 +1402,14 @@ sparc64_elf_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
{
unsigned char type = ELF_ST_TYPE (sym->st_info);
- if (type > STT_FUNC) type = 0;
+ if (type > STT_FUNC)
+ type = 0;
+ (*_bfd_error_handler)
+ (_("Symbol `%s' has differing types: %s in %s"),
+ *namep, stt_types[type], bfd_archive_filename (abfd));
(*_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));
+ (_(" previously %s in %s"),
+ "REGISTER", bfd_archive_filename (p->abfd));
return false;
}
}
@@ -1653,7 +1687,6 @@ sparc64_elf_size_dynamic_sections (output_bfd, info)
{
bfd *dynobj;
asection *s;
- boolean reltext;
boolean relplt;
dynobj = elf_hash_table (info)->dynobj;
@@ -1685,7 +1718,6 @@ sparc64_elf_size_dynamic_sections (output_bfd, info)
/* The check_relocs and adjust_dynamic_symbol entry points have
determined the sizes of the various dynamic sections. Allocate
memory for them. */
- reltext = false;
relplt = false;
for (s = dynobj->sections; s != NULL; s = s->next)
{
@@ -1718,18 +1750,6 @@ sparc64_elf_size_dynamic_sections (output_bfd, info)
}
else
{
- const char *outname;
- asection *target;
-
- /* 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)
- reltext = true;
-
if (strcmp (name, ".rela.plt") == 0)
relplt = true;
@@ -1766,37 +1786,38 @@ 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. */
+#define add_dynamic_entry(TAG, VAL) \
+ bfd_elf64_add_dynamic_entry (info, (bfd_vma) (TAG), (bfd_vma) (VAL))
+
int reg;
struct sparc64_elf_app_reg * app_regs;
- struct bfd_strtab_hash *dynstr;
+ struct elf_strtab_hash *dynstr;
struct elf_link_hash_table *eht = elf_hash_table (info);
- if (! info->shared)
+ if (!info->shared)
{
- if (! bfd_elf64_add_dynamic_entry (info, DT_DEBUG, 0))
+ if (!add_dynamic_entry (DT_DEBUG, 0))
return false;
}
if (relplt)
{
- 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))
+ if (!add_dynamic_entry (DT_PLTGOT, 0)
+ || !add_dynamic_entry (DT_PLTRELSZ, 0)
+ || !add_dynamic_entry (DT_PLTREL, DT_RELA)
+ || !add_dynamic_entry (DT_JMPREL, 0))
return false;
}
- if (! bfd_elf64_add_dynamic_entry (info, DT_RELA, 0)
- || ! bfd_elf64_add_dynamic_entry (info, DT_RELASZ, 0)
- || ! bfd_elf64_add_dynamic_entry (info, DT_RELAENT,
- sizeof (Elf64_External_Rela)))
+ if (!add_dynamic_entry (DT_RELA, 0)
+ || !add_dynamic_entry (DT_RELASZ, 0)
+ || !add_dynamic_entry (DT_RELAENT, sizeof (Elf64_External_Rela)))
return false;
- if (reltext)
+ if (info->flags & DF_TEXTREL)
{
- if (! bfd_elf64_add_dynamic_entry (info, DT_TEXTREL, 0))
+ if (!add_dynamic_entry (DT_TEXTREL, 0))
return false;
- info->flags |= DF_TEXTREL;
}
/* Add dynamic STT_REGISTER symbols and corresponding DT_SPARC_REGISTER
@@ -1809,7 +1830,7 @@ sparc64_elf_size_dynamic_sections (output_bfd, info)
{
struct elf_link_local_dynamic_entry *entry, *e;
- if (! bfd_elf64_add_dynamic_entry (info, DT_SPARC_REGISTER, 0))
+ if (!add_dynamic_entry (DT_SPARC_REGISTER, 0))
return false;
entry = (struct elf_link_local_dynamic_entry *)
@@ -1824,7 +1845,7 @@ sparc64_elf_size_dynamic_sections (output_bfd, info)
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);
+ = _bfd_elf_strtab_add (dynstr, app_regs[reg].name, false);
else
entry->isym.st_name = 0;
entry->isym.st_other = 0;
@@ -1846,6 +1867,7 @@ sparc64_elf_size_dynamic_sections (output_bfd, info)
eht->dynsymcount++;
}
}
+#undef add_dynamic_entry
return true;
}
@@ -1914,6 +1936,7 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
asection *sec;
bfd_vma relocation;
bfd_reloc_status_type r;
+ boolean is_plt = false;
r_type = ELF64_R_TYPE_ID (rel->r_info);
if (r_type < 0 || r_type >= (int) R_SPARC_max_std)
@@ -1952,9 +1975,7 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
sym = local_syms + r_symndx;
sec = local_sections[r_symndx];
- relocation = (sec->output_section->vma
- + sec->output_offset
- + sym->st_value);
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rel);
}
else
{
@@ -2038,7 +2059,15 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
if (info->shared
&& ((!info->symbolic && h->dynindx != -1)
|| !(h->elf_link_hash_flags
- & ELF_LINK_HASH_DEF_REGULAR)))
+ & ELF_LINK_HASH_DEF_REGULAR))
+ && ((input_section->flags & SEC_ALLOC) != 0
+ /* DWARF will emit R_SPARC_{32,64} 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
+ && (h->elf_link_hash_flags
+ & ELF_LINK_HASH_DEF_DYNAMIC) != 0)))
skip_it = true;
break;
}
@@ -2059,7 +2088,8 @@ 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->allow_shlib_undefined)
&& !info->no_undefined
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
relocation = 0;
@@ -2083,9 +2113,10 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
}
}
+do_dynreloc:
/* When generating a shared object, these relocations are copied
into the output file to be resolved at run time. */
- if (info->shared && (input_section->flags & SEC_ALLOC))
+ if (info->shared && r_symndx != 0 && (input_section->flags & SEC_ALLOC))
{
switch (r_type)
{
@@ -2160,21 +2191,11 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
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 == MINUS_ONE)
- skip = true;
- outrel.r_offset = off;
- }
+ outrel.r_offset =
+ _bfd_elf_section_offset (output_bfd, info, input_section,
+ rel->r_offset);
+ if (outrel.r_offset == (bfd_vma) -1)
+ skip = true;
outrel.r_offset += (input_section->output_section->vma
+ input_section->output_offset);
@@ -2207,7 +2228,7 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
memset (&outrel, 0, sizeof outrel);
/* h->dynindx may be -1 if the symbol was marked to
become local. */
- else if (h != NULL
+ else if (h != NULL && ! is_plt
&& ((! info->symbolic && h->dynindx != -1)
|| (h->elf_link_hash_flags
& ELF_LINK_HASH_DEF_REGULAR) == 0))
@@ -2231,7 +2252,9 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
long indx;
- if (h == NULL)
+ if (is_plt)
+ sec = splt;
+ else if (h == NULL)
sec = local_sections[r_symndx];
else
{
@@ -2261,7 +2284,7 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
BFD_FAIL ();
(*_bfd_error_handler)
(_("%s: probably compiled without -fPIC?"),
- bfd_get_filename (input_bfd));
+ bfd_archive_filename (input_bfd));
bfd_set_error (bfd_error_bad_value);
return false;
}
@@ -2283,12 +2306,8 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
++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
- || ELF64_R_TYPE_ID (outrel.r_info) != R_SPARC_RELATIVE)
- continue;
+ need to do anything now. */
+ continue;
}
break;
}
@@ -2368,7 +2387,8 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
Note this is different behaviour to the
32-bit linker, which both adds the contents
and ignores the addend. So clear the location. */
- bfd_put_64 (output_bfd, 0, sgot->contents + off);
+ bfd_put_64 (output_bfd, (bfd_vma) 0,
+ sgot->contents + off);
/* We need to generate a R_SPARC_RELATIVE reloc
for the dynamic linker. */
@@ -2424,6 +2444,12 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
+ sparc64_elf_plt_entry_offset (h->plt.offset));
if (r_type == R_SPARC_WPLT30)
goto do_wplt30;
+ if (r_type == R_SPARC_PLT32 || r_type == R_SPARC_PLT64)
+ {
+ r_type = r_type == R_SPARC_PLT32 ? R_SPARC_32 : R_SPARC_64;
+ is_plt = true;
+ goto do_dynreloc;
+ }
goto do_default;
case R_SPARC_OLO10:
@@ -2434,7 +2460,7 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
relocation = (relocation & 0x3ff) + ELF64_R_TYPE_DATA (rel->r_info);
x = bfd_get_32 (input_bfd, contents + rel->r_offset);
- x = (x & ~0x1fff) | (relocation & 0x1fff);
+ x = (x & ~(bfd_vma) 0x1fff) | (relocation & 0x1fff);
bfd_put_32 (input_bfd, x, contents + rel->r_offset);
r = bfd_check_overflow (howto->complain_on_overflow,
@@ -2455,8 +2481,9 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
relocation -= rel->r_offset;
x = bfd_get_32 (input_bfd, contents + rel->r_offset);
- x = (x & ~0x303fff) | ((((relocation >> 2) & 0xc000) << 6)
- | ((relocation >> 2) & 0x3fff));
+ x &= ~(bfd_vma) 0x303fff;
+ x |= ((((relocation >> 2) & 0xc000) << 6)
+ | ((relocation >> 2) & 0x3fff));
bfd_put_32 (input_bfd, x, contents + rel->r_offset);
r = bfd_check_overflow (howto->complain_on_overflow,
@@ -2474,7 +2501,7 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
relocation = relocation ^ MINUS_ONE;
x = bfd_get_32 (input_bfd, contents + rel->r_offset);
- x = (x & ~0x3fffff) | ((relocation >> 10) & 0x3fffff);
+ x = (x & ~(bfd_vma) 0x3fffff) | ((relocation >> 10) & 0x3fffff);
bfd_put_32 (input_bfd, x, contents + rel->r_offset);
r = bfd_check_overflow (howto->complain_on_overflow,
@@ -2492,7 +2519,7 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
relocation = (relocation & 0x3ff) | 0x1c00;
x = bfd_get_32 (input_bfd, contents + rel->r_offset);
- x = (x & ~0x1fff) | relocation;
+ x = (x & ~(bfd_vma) 0x1fff) | relocation;
bfd_put_32 (input_bfd, x, contents + rel->r_offset);
r = bfd_reloc_ok;
@@ -2581,7 +2608,7 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
|| reg == G0 || reg == O7)
break;
- bfd_put_32 (input_bfd, INSN_NOP,
+ bfd_put_32 (input_bfd, (bfd_vma) INSN_NOP,
contents + rel->r_offset + 4);
}
break;
@@ -2611,6 +2638,16 @@ sparc64_elf_relocate_section (output_bfd, info, input_bfd, input_section,
{
const char *name;
+ /* The Solaris native linker silently disregards
+ overflows. We don't, but this breaks stabs debugging
+ info, whose relocations are only 32-bits wide. Ignore
+ overflows in this case. */
+ if (r_type == R_SPARC_32
+ && (input_section->flags & SEC_DEBUGGING) != 0
+ && strcmp (bfd_section_name (input_bfd, input_section),
+ ".stab") == 0)
+ break;
+
if (h != NULL)
{
if (h->root.type == bfd_link_hash_undefweak
@@ -2686,7 +2723,7 @@ sparc64_elf_finish_dynamic_symbol (output_bfd, info, h, sym)
}
else
{
- int max = splt->_raw_size / PLT_ENTRY_SIZE;
+ bfd_vma 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)
-(splt->output_section->vma + splt->output_offset);
@@ -2732,7 +2769,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 &~ (bfd_vma) 1));
/* If this is a -Bsymbolic link, and the symbol is defined
locally, we just want to emit a RELATIVE reloc. Likewise if
@@ -2874,8 +2911,8 @@ sparc64_elf_finish_dynamic_sections (output_bfd, info)
/* Initialize the contents of the .plt section. */
if (splt->_raw_size > 0)
{
- sparc64_elf_build_plt(output_bfd, splt->contents,
- splt->_raw_size / PLT_ENTRY_SIZE);
+ sparc64_elf_build_plt (output_bfd, splt->contents,
+ (int) (splt->_raw_size / PLT_ENTRY_SIZE));
}
elf_section_data (splt->output_section)->this_hdr.sh_entsize =
@@ -2900,26 +2937,25 @@ sparc64_elf_finish_dynamic_sections (output_bfd, info)
return true;
}
-
-/* Functions for dealing with the e_flags field. */
-/* Copy backend specific data from one object module to another */
-static boolean
-sparc64_elf_copy_private_bfd_data (ibfd, obfd)
- bfd *ibfd, *obfd;
+static enum elf_reloc_type_class
+sparc64_elf_reloc_type_class (rela)
+ const Elf_Internal_Rela *rela;
{
- 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;
+ switch ((int) ELF64_R_TYPE (rela->r_info))
+ {
+ case R_SPARC_RELATIVE:
+ return reloc_class_relative;
+ case R_SPARC_JMP_SLOT:
+ return reloc_class_plt;
+ case R_SPARC_COPY:
+ return reloc_class_copy;
+ default:
+ return reloc_class_normal;
+ }
}
+
+/* Functions for dealing with the e_flags field. */
/* Merge backend specific data from an object file to the output
object file when linking. */
@@ -2976,7 +3012,7 @@ sparc64_elf_merge_private_bfd_data (ibfd, obfd)
error = true;
(*_bfd_error_handler)
(_("%s: linking UltraSPARC specific with HAL specific code"),
- bfd_get_filename (ibfd));
+ bfd_archive_filename (ibfd));
}
/* Choose the most restrictive memory ordering. */
old_mm = (old_flags & EF_SPARCV9_MM);
@@ -2995,7 +3031,7 @@ sparc64_elf_merge_private_bfd_data (ibfd, obfd)
error = true;
(*_bfd_error_handler)
(_("%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"),
- bfd_get_filename (ibfd), (long)new_flags, (long)old_flags);
+ bfd_archive_filename (ibfd), (long) new_flags, (long) old_flags);
}
elf_elfheader (obfd)->e_flags = old_flags;
@@ -3029,8 +3065,8 @@ sparc64_elf_print_symbol_all (abfd, filep, symbol)
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' : ' ');
+ : (type & BSF_GLOBAL) ? 'g' : ' '),
+ (type & BSF_WEAK) ? 'w' : ' ');
if (symbol->name == NULL || symbol->name [0] == '\0')
return "#scratch";
else
@@ -3142,8 +3178,6 @@ const struct elf_size_info sparc64_elf_size_info =
sparc64_elf_print_symbol_all
#define elf_backend_output_arch_syms \
sparc64_elf_output_arch_syms
-#define bfd_elf64_bfd_copy_private_bfd_data \
- sparc64_elf_copy_private_bfd_data
#define bfd_elf64_bfd_merge_private_bfd_data \
sparc64_elf_merge_private_bfd_data
@@ -3151,6 +3185,8 @@ const struct elf_size_info sparc64_elf_size_info =
sparc64_elf_size_info
#define elf_backend_object_p \
sparc64_elf_object_p
+#define elf_backend_reloc_type_class \
+ sparc64_elf_reloc_type_class
#define elf_backend_want_got_plt 0
#define elf_backend_plt_readonly 0
diff --git a/contrib/binutils/bfd/elf64-x86-64.c b/contrib/binutils/bfd/elf64-x86-64.c
index 6153468..4bbbb08 100644
--- a/contrib/binutils/bfd/elf64-x86-64.c
+++ b/contrib/binutils/bfd/elf64-x86-64.c
@@ -79,7 +79,16 @@ static reloc_howto_type x86_64_elf_howto_table[] =
HOWTO(R_X86_64_8, 0, 0, 8, false, 0, complain_overflow_signed,
bfd_elf_generic_reloc, "R_X86_64_8", false, 0xff, 0xff, false),
HOWTO(R_X86_64_PC8, 0, 0, 8, true, 0, complain_overflow_signed,
- bfd_elf_generic_reloc, "R_X86_64_PC8", false, 0xff, 0xff, true)
+ bfd_elf_generic_reloc, "R_X86_64_PC8", false, 0xff, 0xff, true),
+
+/* GNU extension to record C++ vtable hierarchy. */
+ HOWTO (R_X86_64_GNU_VTINHERIT, 0, 4, 0, false, 0, complain_overflow_dont,
+ NULL, "R_X86_64_GNU_VTINHERIT", false, 0, 0, false),
+
+/* GNU extension to record C++ vtable member usage. */
+ HOWTO (R_X86_64_GNU_VTENTRY, 0, 4, 0, false, 0, complain_overflow_dont,
+ _bfd_elf_rel_vtable_reloc_fn, "R_X86_64_GNU_VTENTRY", false, 0, 0,
+ false)
};
/* Map BFD relocs to the x86_64 elf relocs. */
@@ -89,7 +98,7 @@ struct elf_reloc_map
unsigned char elf_reloc_val;
};
-static CONST struct elf_reloc_map x86_64_reloc_map[] =
+static const struct elf_reloc_map x86_64_reloc_map[] =
{
{ BFD_RELOC_NONE, R_X86_64_NONE, },
{ BFD_RELOC_64, R_X86_64_64, },
@@ -107,6 +116,8 @@ static CONST struct elf_reloc_map x86_64_reloc_map[] =
{ BFD_RELOC_16_PCREL, R_X86_64_PC16, },
{ BFD_RELOC_8, R_X86_64_8, },
{ BFD_RELOC_8_PCREL, R_X86_64_PC8, },
+ { BFD_RELOC_VTABLE_INHERIT, R_X86_64_GNU_VTINHERIT, },
+ { BFD_RELOC_VTABLE_ENTRY, R_X86_64_GNU_VTENTRY, },
};
static reloc_howto_type *elf64_x86_64_reloc_type_lookup
@@ -115,6 +126,17 @@ static void elf64_x86_64_info_to_howto
PARAMS ((bfd *, arelent *, Elf64_Internal_Rela *));
static struct bfd_link_hash_table *elf64_x86_64_link_hash_table_create
PARAMS ((bfd *));
+static boolean elf64_x86_64_elf_object_p PARAMS ((bfd *abfd));
+static boolean elf64_x86_64_check_relocs
+ PARAMS ((bfd *, struct bfd_link_info *, asection *sec,
+ const Elf_Internal_Rela *));
+static asection *elf64_x86_64_gc_mark_hook
+ PARAMS ((bfd *, struct bfd_link_info *, Elf_Internal_Rela *,
+ struct elf_link_hash_entry *, Elf_Internal_Sym *));
+
+static boolean elf64_x86_64_gc_sweep_hook
+ PARAMS ((bfd *, struct bfd_link_info *, asection *,
+ const Elf_Internal_Rela *));
static struct bfd_hash_entry *elf64_x86_64_link_hash_newfunc
PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
@@ -131,6 +153,8 @@ static boolean elf64_x86_64_finish_dynamic_symbol
Elf_Internal_Sym *sym));
static boolean elf64_x86_64_finish_dynamic_sections
PARAMS ((bfd *, struct bfd_link_info *));
+static enum elf_reloc_type_class elf64_x86_64_reloc_type_class
+ PARAMS ((const Elf_Internal_Rela *));
/* Given a BFD reloc type, return a HOWTO structure. */
static reloc_howto_type *
@@ -143,8 +167,7 @@ elf64_x86_64_reloc_type_lookup (abfd, code)
i++)
{
if (x86_64_reloc_map[i].bfd_reloc_val == code)
- return &x86_64_elf_howto_table[(int)
- x86_64_reloc_map[i].elf_reloc_val];
+ return &x86_64_elf_howto_table[i];
}
return 0;
}
@@ -157,11 +180,20 @@ elf64_x86_64_info_to_howto (abfd, cache_ptr, dst)
arelent *cache_ptr;
Elf64_Internal_Rela *dst;
{
- unsigned r_type;
+ unsigned r_type, i;
r_type = ELF64_R_TYPE (dst->r_info);
- BFD_ASSERT (r_type < (unsigned int) R_X86_64_max);
- cache_ptr->howto = &x86_64_elf_howto_table[r_type];
+ if (r_type < (unsigned int) R_X86_64_GNU_VTINHERIT)
+ {
+ BFD_ASSERT (r_type <= (unsigned int) R_X86_64_PC8);
+ i = r_type;
+ }
+ else
+ {
+ BFD_ASSERT (r_type < (unsigned int) R_X86_64_max);
+ i = r_type - ((unsigned int) R_X86_64_GNU_VTINHERIT - R_X86_64_PC8 - 1);
+ }
+ cache_ptr->howto = &x86_64_elf_howto_table[i];
BFD_ASSERT (r_type == cache_ptr->howto->type);
}
@@ -295,9 +327,9 @@ elf64_x86_64_link_hash_table_create (abfd)
bfd *abfd;
{
struct elf64_x86_64_link_hash_table *ret;
+ bfd_size_type amt = sizeof (struct elf64_x86_64_link_hash_table);
- ret = ((struct elf64_x86_64_link_hash_table *)
- bfd_alloc (abfd, sizeof (struct elf64_x86_64_link_hash_table)));
+ ret = ((struct elf64_x86_64_link_hash_table *) bfd_alloc (abfd, amt));
if (ret == (struct elf64_x86_64_link_hash_table *) NULL)
return NULL;
@@ -311,7 +343,7 @@ elf64_x86_64_link_hash_table_create (abfd)
return &ret->root.root;
}
-boolean
+static boolean
elf64_x86_64_elf_object_p (abfd)
bfd *abfd;
{
@@ -409,10 +441,8 @@ elf64_x86_64_check_relocs (abfd, info, sec, relocs)
if (h != NULL)
{
- if (h->got.refcount == -1)
+ if (h->got.refcount == 0)
{
- h->got.refcount = 1;
-
/* Make sure this symbol is output as a dynamic symbol. */
if (h->dynindx == -1)
{
@@ -423,28 +453,25 @@ elf64_x86_64_check_relocs (abfd, info, sec, relocs)
sgot->_raw_size += GOT_ENTRY_SIZE;
srelgot->_raw_size += sizeof (Elf64_External_Rela);
}
- else
- h->got.refcount += 1;
+ h->got.refcount += 1;
}
else
{
/* This is a global offset table entry for a local symbol. */
if (local_got_refcounts == NULL)
{
- size_t size;
+ bfd_size_type size;
- size = symtab_hdr->sh_info * sizeof (bfd_signed_vma);
+ size = symtab_hdr->sh_info;
+ size *= sizeof (bfd_signed_vma);
local_got_refcounts = ((bfd_signed_vma *)
- bfd_alloc (abfd, size));
+ bfd_zalloc (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)
+ if (local_got_refcounts[r_symndx] == 0)
{
- local_got_refcounts[r_symndx] = 1;
-
sgot->_raw_size += GOT_ENTRY_SIZE;
if (info->shared)
{
@@ -454,8 +481,7 @@ elf64_x86_64_check_relocs (abfd, info, sec, relocs)
srelgot->_raw_size += sizeof (Elf64_External_Rela);
}
}
- else
- local_got_refcounts[r_symndx] += 1;
+ local_got_refcounts[r_symndx] += 1;
}
break;
@@ -473,10 +499,7 @@ elf64_x86_64_check_relocs (abfd, info, sec, relocs)
continue;
h->elf_link_hash_flags |= ELF_LINK_HASH_NEEDS_PLT;
- if (h->plt.refcount == -1)
- h->plt.refcount = 1;
- else
- h->plt.refcount += 1;
+ h->plt.refcount += 1;
break;
case R_X86_64_8:
@@ -545,6 +568,8 @@ elf64_x86_64_check_relocs (abfd, info, sec, relocs)
|| ! bfd_set_section_alignment (dynobj, sreloc, 3))
return false;
}
+ if (sec->flags & SEC_READONLY)
+ info->flags |= DF_TEXTREL;
}
sreloc->_raw_size += sizeof (Elf64_External_Rela);
@@ -572,7 +597,7 @@ elf64_x86_64_check_relocs (abfd, info, sec, relocs)
if (p == NULL)
{
p = ((struct elf64_x86_64_pcrel_relocs_copied *)
- bfd_alloc (dynobj, sizeof *p));
+ bfd_alloc (dynobj, (bfd_size_type) sizeof *p));
if (p == NULL)
return false;
p->next = eh->pcrel_relocs_copied;
@@ -585,6 +610,20 @@ elf64_x86_64_check_relocs (abfd, info, sec, relocs)
}
}
break;
+
+ /* This relocation describes the C++ object vtable hierarchy.
+ Reconstruct it for later use during GC. */
+ case R_X86_64_GNU_VTINHERIT:
+ if (!_bfd_elf64_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_X86_64_GNU_VTENTRY:
+ if (!_bfd_elf64_gc_record_vtentry (abfd, sec, h, rel->r_addend))
+ return false;
+ break;
}
}
@@ -604,28 +643,30 @@ elf64_x86_64_gc_mark_hook (abfd, info, rel, h, sym)
{
if (h != NULL)
{
- switch (h->root.type)
+ switch (ELF64_R_TYPE (rel->r_info))
{
- 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;
+ case R_X86_64_GNU_VTINHERIT:
+ case R_X86_64_GNU_VTENTRY:
+ break;
default:
- break;
+ 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 bfd_section_from_elf_index (abfd, sym->st_shndx);
}
return NULL;
@@ -807,6 +848,8 @@ elf64_x86_64_adjust_dynamic_symbol (info, h)
return true;
}
+ else
+ h->plt.offset = (bfd_vma) -1;
/* If this is a weak symbol, and there is a real definition, the
processor independent code will have arranged for us to see the
@@ -893,14 +936,13 @@ elf64_x86_64_adjust_dynamic_symbol (info, h)
static boolean
elf64_x86_64_size_dynamic_sections (output_bfd, info)
- bfd *output_bfd;
+ bfd *output_bfd ATTRIBUTE_UNUSED;
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);
@@ -940,7 +982,7 @@ elf64_x86_64_size_dynamic_sections (output_bfd, info)
/* The check_relocs and adjust_dynamic_symbol entry points have
determined the sizes of the various dynamic sections. Allocate
memory for them. */
- plt = relocs = reltext = false;
+ plt = relocs = false;
for (s = dynobj->sections; s != NULL; s = s->next)
{
const char *name;
@@ -985,29 +1027,8 @@ elf64_x86_64_size_dynamic_sections (output_bfd, info)
}
else
{
- asection *target;
-
- /* Remember whether there are any reloc sections other
- than .rela.plt. */
if (strcmp (name, ".rela.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 .rela.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 + 5);
- if (target != NULL
- && (target->flags & SEC_READONLY) != 0
- && (target->flags & SEC_ALLOC) != 0)
- reltext = true;
- }
+ relocs = true;
/* We use the reloc_count field as a counter if we need
to copy relocs into the output file. */
@@ -1043,37 +1064,39 @@ elf64_x86_64_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. */
+#define add_dynamic_entry(TAG, VAL) \
+ bfd_elf64_add_dynamic_entry (info, (bfd_vma) (TAG), (bfd_vma) (VAL))
+
if (! info->shared)
{
- if (! bfd_elf64_add_dynamic_entry (info, DT_DEBUG, 0))
+ if (!add_dynamic_entry (DT_DEBUG, 0))
return false;
}
if (plt)
{
- 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))
+ if (!add_dynamic_entry (DT_PLTGOT, 0)
+ || !add_dynamic_entry (DT_PLTRELSZ, 0)
+ || !add_dynamic_entry (DT_PLTREL, DT_RELA)
+ || !add_dynamic_entry (DT_JMPREL, 0))
return false;
}
if (relocs)
{
- if (! bfd_elf64_add_dynamic_entry (info, DT_RELA, 0)
- || ! bfd_elf64_add_dynamic_entry (info, DT_RELASZ, 0)
- || ! bfd_elf64_add_dynamic_entry (info, DT_RELAENT,
- sizeof (Elf64_External_Rela)))
+ if (!add_dynamic_entry (DT_RELA, 0)
+ || !add_dynamic_entry (DT_RELASZ, 0)
+ || !add_dynamic_entry (DT_RELAENT, sizeof (Elf64_External_Rela)))
return false;
}
- if (reltext)
+ if ((info->flags & DF_TEXTREL) != 0)
{
- if (! bfd_elf64_add_dynamic_entry (info, DT_TEXTREL, 0))
+ if (!add_dynamic_entry (DT_TEXTREL, 0))
return false;
- info->flags |= DF_TEXTREL;
}
}
+#undef add_dynamic_entry
return true;
}
@@ -1160,6 +1183,9 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section,
unsigned int indx;
r_type = ELF64_R_TYPE (rela->r_info);
+ if (r_type == (int) R_X86_64_GNU_VTINHERIT
+ || r_type == (int) R_X86_64_GNU_VTENTRY)
+ continue;
if ((indx = (unsigned) r_type) >= R_X86_64_max)
{
@@ -1197,9 +1223,7 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section,
{
sym = local_syms + r_symndx;
sec = local_sections[r_symndx];
- relocation = (sec->output_section->vma
- + sec->output_offset
- + sym->st_value);
+ relocation = _bfd_elf_rela_local_sym (output_bfd, sym, sec, rela);
}
else
{
@@ -1249,7 +1273,7 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section,
{
(*_bfd_error_handler)
(_("%s: warning: unresolvable relocation against symbol `%s' from %s section"),
- bfd_get_filename (input_bfd), h->root.root.string,
+ bfd_archive_filename (input_bfd), h->root.root.string,
bfd_get_section_name (input_bfd, input_section));
relocation = 0;
}
@@ -1260,7 +1284,9 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section,
}
else if (h->root.type == bfd_link_hash_undefweak)
relocation = 0;
- else if (info->shared && !info->symbolic && !info->no_undefined
+ else if (info->shared
+ && (!info->symbolic || info->allow_shlib_undefined)
+ && !info->no_undefined
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
relocation = 0;
else
@@ -1408,7 +1434,9 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section,
case R_X86_64_64:
/* FIXME: The ABI says the linker should make sure the value is
the same when it's zeroextended to 64 bit. */
- if (info->shared && (input_section->flags & SEC_ALLOC) != 0)
+ if (info->shared
+ && r_symndx != 0
+ && (input_section->flags & SEC_ALLOC) != 0)
{
Elf_Internal_Rela outrel;
boolean skip, relocate;
@@ -1439,21 +1467,11 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section,
skip = false;
- if (elf_section_data (input_section)->stab_info == NULL)
- outrel.r_offset = rela->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,
- rela->r_offset));
- if (off == (bfd_vma) -1)
- skip = true;
- outrel.r_offset = off;
- }
+ outrel.r_offset =
+ _bfd_elf_section_offset (output_bfd, info, input_section,
+ rela->r_offset);
+ if (outrel.r_offset == (bfd_vma) -1)
+ skip = true;
outrel.r_offset += (input_section->output_section->vma
+ input_section->output_offset);
@@ -1485,7 +1503,7 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section,
}
else
{
- long indx;
+ long sindx;
if (h == NULL)
sec = local_sections[r_symndx];
@@ -1497,7 +1515,7 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section,
sec = h->root.u.def.section;
}
if (sec != NULL && bfd_is_abs_section (sec))
- indx = 0;
+ sindx = 0;
else if (sec == NULL || sec->owner == NULL)
{
bfd_set_error (bfd_error_bad_value);
@@ -1508,12 +1526,12 @@ elf64_x86_64_relocate_section (output_bfd, info, input_bfd, input_section,
asection *osec;
osec = sec->output_section;
- indx = elf_section_data (osec)->dynindx;
- BFD_ASSERT (indx > 0);
+ sindx = elf_section_data (osec)->dynindx;
+ BFD_ASSERT (sindx > 0);
}
relocate = false;
- outrel.r_info = ELF64_R_INFO (indx, r_type);
+ outrel.r_info = ELF64_R_INFO (sindx, r_type);
outrel.r_addend = relocation + rela->r_addend;
}
@@ -1694,7 +1712,7 @@ elf64_x86_64_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 &~ (bfd_vma) 1));
/* If this is a static link, or it is a -Bsymbolic link and the
symbol is defined locally or was forced to be local because
@@ -1893,6 +1911,22 @@ elf64_x86_64_finish_dynamic_sections (output_bfd, info)
return true;
}
+static enum elf_reloc_type_class
+elf64_x86_64_reloc_type_class (rela)
+ const Elf_Internal_Rela *rela;
+{
+ switch ((int) ELF64_R_TYPE (rela->r_info))
+ {
+ case R_X86_64_RELATIVE:
+ return reloc_class_relative;
+ case R_X86_64_JUMP_SLOT:
+ return reloc_class_plt;
+ case R_X86_64_COPY:
+ return reloc_class_copy;
+ default:
+ return reloc_class_normal;
+ }
+}
#define TARGET_LITTLE_SYM bfd_elf64_x86_64_vec
#define TARGET_LITTLE_NAME "elf64-x86-64"
@@ -1901,6 +1935,7 @@ elf64_x86_64_finish_dynamic_sections (output_bfd, info)
#define ELF_MAXPAGESIZE 0x100000
#define elf_backend_can_gc_sections 1
+#define elf_backend_can_refcount 1
#define elf_backend_want_got_plt 1
#define elf_backend_plt_readonly 1
#define elf_backend_want_plt_sym 0
@@ -1925,5 +1960,6 @@ elf64_x86_64_finish_dynamic_sections (output_bfd, info)
#define elf_backend_relocate_section elf64_x86_64_relocate_section
#define elf_backend_size_dynamic_sections elf64_x86_64_size_dynamic_sections
#define elf_backend_object_p elf64_x86_64_elf_object_p
+#define elf_backend_reloc_type_class elf64_x86_64_reloc_type_class
#include "elf64-target.h"
diff --git a/contrib/binutils/bfd/elfarm-nabi.c b/contrib/binutils/bfd/elfarm-nabi.c
index ee91e36..7ced680 100644
--- a/contrib/binutils/bfd/elfarm-nabi.c
+++ b/contrib/binutils/bfd/elfarm-nabi.c
@@ -42,6 +42,10 @@
static reloc_howto_type * elf32_arm_reloc_type_lookup
PARAMS ((bfd * abfd, bfd_reloc_code_real_type code));
+static boolean elf32_arm_nabi_grok_prstatus
+ PARAMS ((bfd *abfd, Elf_Internal_Note *note));
+static boolean elf32_arm_nabi_grok_psinfo
+ PARAMS ((bfd *abfd, Elf_Internal_Note *note));
/* Note: code such as elf32_arm_reloc_type_lookup expect to use e.g.
R_ARM_PC24 as an index into this, and find the R_ARM_PC24 HOWTO
@@ -578,6 +582,9 @@ static reloc_howto_type elf32_arm_thm_pc9_howto =
0x000000ff, /* dst_mask */
true); /* pcrel_offset */
+static void elf32_arm_info_to_howto
+ PARAMS ((bfd *, arelent *, Elf32_Internal_Rel *));
+
static void
elf32_arm_info_to_howto (abfd, bfd_reloc, elf_reloc)
bfd * abfd ATTRIBUTE_UNUSED;
@@ -622,27 +629,27 @@ struct elf32_arm_reloc_map
};
static const struct elf32_arm_reloc_map elf32_arm_reloc_map[] =
-{
- {BFD_RELOC_NONE, R_ARM_NONE},
- {BFD_RELOC_ARM_PCREL_BRANCH, R_ARM_PC24},
- {BFD_RELOC_ARM_PCREL_BLX, R_ARM_XPC25},
- {BFD_RELOC_THUMB_PCREL_BLX, R_ARM_THM_XPC22},
- {BFD_RELOC_32, R_ARM_ABS32},
- {BFD_RELOC_32_PCREL, R_ARM_REL32},
- {BFD_RELOC_8, R_ARM_ABS8},
- {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}
-};
+ {
+ {BFD_RELOC_NONE, R_ARM_NONE},
+ {BFD_RELOC_ARM_PCREL_BRANCH, R_ARM_PC24},
+ {BFD_RELOC_ARM_PCREL_BLX, R_ARM_XPC25},
+ {BFD_RELOC_THUMB_PCREL_BLX, R_ARM_THM_XPC22},
+ {BFD_RELOC_32, R_ARM_ABS32},
+ {BFD_RELOC_32_PCREL, R_ARM_REL32},
+ {BFD_RELOC_8, R_ARM_ABS8},
+ {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)
@@ -674,4 +681,72 @@ elf32_arm_reloc_type_lookup (abfd, code)
}
}
+/* Support for core dump NOTE sections */
+static boolean
+elf32_arm_nabi_grok_prstatus (abfd, note)
+ bfd *abfd;
+ Elf_Internal_Note *note;
+{
+ int offset;
+ size_t raw_size;
+
+ switch (note->descsz)
+ {
+ default:
+ return false;
+
+ case 148: /* Linux/ARM 32-bit*/
+ /* pr_cursig */
+ elf_tdata (abfd)->core_signal = bfd_get_16 (abfd, note->descdata + 12);
+
+ /* pr_pid */
+ elf_tdata (abfd)->core_pid = bfd_get_32 (abfd, note->descdata + 24);
+
+ /* pr_reg */
+ offset = 72;
+ raw_size = 72;
+
+ break;
+ }
+
+ /* Make a ".reg/999" section. */
+ return _bfd_elfcore_make_pseudosection (abfd, ".reg",
+ raw_size, note->descpos + offset);
+}
+
+static boolean
+elf32_arm_nabi_grok_psinfo (abfd, note)
+ bfd *abfd;
+ Elf_Internal_Note *note;
+{
+ switch (note->descsz)
+ {
+ default:
+ return false;
+
+ case 124: /* Linux/ARM elf_prpsinfo */
+ elf_tdata (abfd)->core_program
+ = _bfd_elfcore_strndup (abfd, note->descdata + 28, 16);
+ elf_tdata (abfd)->core_command
+ = _bfd_elfcore_strndup (abfd, note->descdata + 44, 80);
+ }
+
+ /* 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;
+}
+
+#define elf_backend_grok_prstatus elf32_arm_nabi_grok_prstatus
+#define elf_backend_grok_psinfo elf32_arm_nabi_grok_psinfo
+
#include "elf32-arm.h"
diff --git a/contrib/binutils/bfd/elfarm-oabi.c b/contrib/binutils/bfd/elfarm-oabi.c
index b4f93f0..25c4d89 100644
--- a/contrib/binutils/bfd/elfarm-oabi.c
+++ b/contrib/binutils/bfd/elfarm-oabi.c
@@ -42,305 +42,310 @@
#define ARM_ELF_ABI_VERSION 0
#define ARM_ELF_OS_ABI_VERSION 0
+static reloc_howto_type * find_howto PARAMS ((unsigned int));
+static void elf32_arm_info_to_howto PARAMS ((bfd *, arelent *, Elf32_Internal_Rela *));
+static reloc_howto_type * elf32_arm_reloc_type_lookup PARAMS ((bfd *, bfd_reloc_code_real_type));
+
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 */
-};
+ {
+ /* 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;
@@ -377,23 +382,23 @@ struct elf32_arm_reloc_map
};
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 }
-};
+ {
+ {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)
diff --git a/contrib/binutils/bfd/elfcode.h b/contrib/binutils/bfd/elfcode.h
index b02a399..203323c 100644
--- a/contrib/binutils/bfd/elfcode.h
+++ b/contrib/binutils/bfd/elfcode.h
@@ -66,6 +66,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfd.h"
#include "sysdep.h"
+#include "libiberty.h"
#include "bfdlink.h"
#include "libbfd.h"
#include "elf-bfd.h"
@@ -122,6 +123,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define elf_slurp_reloc_table NAME(bfd_elf,slurp_reloc_table)
#define elf_link_create_dynamic_sections \
NAME(bfd_elf,link_create_dynamic_sections)
+#define elf_bfd_discard_info NAME(bfd_elf,discard_info)
+#define elf_reloc_symbol_deleted_p NAME(_bfd_elf,reloc_symbol_deleted_p)
#define elf_link_record_dynamic_symbol _bfd_elf_link_record_dynamic_symbol
#define elf_bfd_final_link NAME(bfd_elf,bfd_final_link)
#define elf_create_pointer_linker_section NAME(bfd_elf,create_pointer_linker_section)
@@ -184,56 +187,73 @@ static char *elf_symbol_flags PARAMS ((flagword));
/* Should perhaps use put_offset, put_word, etc. For now, the two versions
can be handled by explicitly specifying 32 bits or "the long type". */
#if ARCH_SIZE == 64
-#define put_word bfd_h_put_64
-#define put_signed_word bfd_h_put_signed_64
-#define get_word bfd_h_get_64
-#define get_signed_word bfd_h_get_signed_64
+#define H_PUT_WORD H_PUT_64
+#define H_PUT_SIGNED_WORD H_PUT_S64
+#define H_GET_WORD H_GET_64
+#define H_GET_SIGNED_WORD H_GET_S64
#endif
#if ARCH_SIZE == 32
-#define put_word bfd_h_put_32
-#define put_signed_word bfd_h_put_signed_32
-#define get_word bfd_h_get_32
-#define get_signed_word bfd_h_get_signed_32
+#define H_PUT_WORD H_PUT_32
+#define H_PUT_SIGNED_WORD H_PUT_S32
+#define H_GET_WORD H_GET_32
+#define H_GET_SIGNED_WORD H_GET_S32
#endif
/* Translate an ELF symbol in external format into an ELF symbol in internal
format. */
void
-elf_swap_symbol_in (abfd, src, dst)
+elf_swap_symbol_in (abfd, src, shndx, dst)
bfd *abfd;
const Elf_External_Sym *src;
+ const Elf_External_Sym_Shndx *shndx;
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_name = H_GET_32 (abfd, src->st_name);
if (signed_vma)
- dst->st_value = get_signed_word (abfd, (bfd_byte *) src->st_value);
+ dst->st_value = H_GET_SIGNED_WORD (abfd, 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);
- dst->st_shndx = bfd_h_get_16 (abfd, (bfd_byte *) src->st_shndx);
+ dst->st_value = H_GET_WORD (abfd, src->st_value);
+ dst->st_size = H_GET_WORD (abfd, src->st_size);
+ dst->st_info = H_GET_8 (abfd, src->st_info);
+ dst->st_other = H_GET_8 (abfd, src->st_other);
+ dst->st_shndx = H_GET_16 (abfd, src->st_shndx);
+ if (dst->st_shndx == SHN_XINDEX)
+ {
+ if (shndx == NULL)
+ abort ();
+ dst->st_shndx = H_GET_32 (abfd, shndx->est_shndx);
+ }
}
/* Translate an ELF symbol in internal format into an ELF symbol in external
format. */
void
-elf_swap_symbol_out (abfd, src, cdst)
+elf_swap_symbol_out (abfd, src, cdst, shndx)
bfd *abfd;
const Elf_Internal_Sym *src;
PTR cdst;
+ PTR shndx;
{
+ unsigned int tmp;
Elf_External_Sym *dst = (Elf_External_Sym *) cdst;
- bfd_h_put_32 (abfd, src->st_name, dst->st_name);
- put_word (abfd, src->st_value, dst->st_value);
- put_word (abfd, src->st_size, dst->st_size);
- bfd_h_put_8 (abfd, src->st_info, dst->st_info);
- bfd_h_put_8 (abfd, src->st_other, dst->st_other);
- bfd_h_put_16 (abfd, src->st_shndx, dst->st_shndx);
+ H_PUT_32 (abfd, src->st_name, dst->st_name);
+ H_PUT_WORD (abfd, src->st_value, dst->st_value);
+ H_PUT_WORD (abfd, src->st_size, dst->st_size);
+ H_PUT_8 (abfd, src->st_info, dst->st_info);
+ H_PUT_8 (abfd, src->st_other, dst->st_other);
+ tmp = src->st_shndx;
+ if (tmp > SHN_HIRESERVE)
+ {
+ if (shndx == NULL)
+ abort ();
+ H_PUT_32 (abfd, tmp, shndx);
+ tmp = SHN_XINDEX;
+ }
+ H_PUT_16 (abfd, tmp, dst->st_shndx);
}
/* Translate an ELF file header in external format into an ELF file header in
@@ -247,22 +267,22 @@ elf_swap_ehdr_in (abfd, src, dst)
{
int signed_vma = get_elf_backend_data (abfd)->sign_extend_vma;
memcpy (dst->e_ident, src->e_ident, EI_NIDENT);
- dst->e_type = bfd_h_get_16 (abfd, (bfd_byte *) src->e_type);
- dst->e_machine = bfd_h_get_16 (abfd, (bfd_byte *) src->e_machine);
- dst->e_version = bfd_h_get_32 (abfd, (bfd_byte *) src->e_version);
+ dst->e_type = H_GET_16 (abfd, src->e_type);
+ dst->e_machine = H_GET_16 (abfd, src->e_machine);
+ dst->e_version = H_GET_32 (abfd, src->e_version);
if (signed_vma)
- dst->e_entry = get_signed_word (abfd, (bfd_byte *) src->e_entry);
+ dst->e_entry = H_GET_SIGNED_WORD (abfd, src->e_entry);
else
- dst->e_entry = get_word (abfd, (bfd_byte *) src->e_entry);
- dst->e_phoff = get_word (abfd, (bfd_byte *) src->e_phoff);
- dst->e_shoff = get_word (abfd, (bfd_byte *) src->e_shoff);
- dst->e_flags = bfd_h_get_32 (abfd, (bfd_byte *) src->e_flags);
- dst->e_ehsize = bfd_h_get_16 (abfd, (bfd_byte *) src->e_ehsize);
- dst->e_phentsize = bfd_h_get_16 (abfd, (bfd_byte *) src->e_phentsize);
- dst->e_phnum = bfd_h_get_16 (abfd, (bfd_byte *) src->e_phnum);
- dst->e_shentsize = bfd_h_get_16 (abfd, (bfd_byte *) src->e_shentsize);
- dst->e_shnum = bfd_h_get_16 (abfd, (bfd_byte *) src->e_shnum);
- dst->e_shstrndx = bfd_h_get_16 (abfd, (bfd_byte *) src->e_shstrndx);
+ dst->e_entry = H_GET_WORD (abfd, src->e_entry);
+ dst->e_phoff = H_GET_WORD (abfd, src->e_phoff);
+ dst->e_shoff = H_GET_WORD (abfd, src->e_shoff);
+ dst->e_flags = H_GET_32 (abfd, src->e_flags);
+ dst->e_ehsize = H_GET_16 (abfd, src->e_ehsize);
+ dst->e_phentsize = H_GET_16 (abfd, src->e_phentsize);
+ dst->e_phnum = H_GET_16 (abfd, src->e_phnum);
+ dst->e_shentsize = H_GET_16 (abfd, src->e_shentsize);
+ dst->e_shnum = H_GET_16 (abfd, src->e_shnum);
+ dst->e_shstrndx = H_GET_16 (abfd, src->e_shstrndx);
}
/* Translate an ELF file header in internal format into an ELF file header in
@@ -274,25 +294,32 @@ elf_swap_ehdr_out (abfd, src, dst)
const Elf_Internal_Ehdr *src;
Elf_External_Ehdr *dst;
{
+ unsigned int tmp;
int signed_vma = get_elf_backend_data (abfd)->sign_extend_vma;
memcpy (dst->e_ident, src->e_ident, EI_NIDENT);
/* note that all elements of dst are *arrays of unsigned char* already... */
- bfd_h_put_16 (abfd, src->e_type, dst->e_type);
- bfd_h_put_16 (abfd, src->e_machine, dst->e_machine);
- bfd_h_put_32 (abfd, src->e_version, dst->e_version);
+ H_PUT_16 (abfd, src->e_type, dst->e_type);
+ H_PUT_16 (abfd, src->e_machine, dst->e_machine);
+ H_PUT_32 (abfd, src->e_version, dst->e_version);
if (signed_vma)
- put_signed_word (abfd, src->e_entry, dst->e_entry);
+ H_PUT_SIGNED_WORD (abfd, src->e_entry, dst->e_entry);
else
- put_word (abfd, src->e_entry, dst->e_entry);
- put_word (abfd, src->e_phoff, dst->e_phoff);
- put_word (abfd, src->e_shoff, dst->e_shoff);
- bfd_h_put_32 (abfd, src->e_flags, dst->e_flags);
- bfd_h_put_16 (abfd, src->e_ehsize, dst->e_ehsize);
- bfd_h_put_16 (abfd, src->e_phentsize, dst->e_phentsize);
- bfd_h_put_16 (abfd, src->e_phnum, dst->e_phnum);
- bfd_h_put_16 (abfd, src->e_shentsize, dst->e_shentsize);
- bfd_h_put_16 (abfd, src->e_shnum, dst->e_shnum);
- bfd_h_put_16 (abfd, src->e_shstrndx, dst->e_shstrndx);
+ H_PUT_WORD (abfd, src->e_entry, dst->e_entry);
+ H_PUT_WORD (abfd, src->e_phoff, dst->e_phoff);
+ H_PUT_WORD (abfd, src->e_shoff, dst->e_shoff);
+ H_PUT_32 (abfd, src->e_flags, dst->e_flags);
+ H_PUT_16 (abfd, src->e_ehsize, dst->e_ehsize);
+ H_PUT_16 (abfd, src->e_phentsize, dst->e_phentsize);
+ H_PUT_16 (abfd, src->e_phnum, dst->e_phnum);
+ H_PUT_16 (abfd, src->e_shentsize, dst->e_shentsize);
+ tmp = src->e_shnum;
+ if (tmp >= SHN_LORESERVE)
+ tmp = SHN_UNDEF;
+ H_PUT_16 (abfd, tmp, dst->e_shnum);
+ tmp = src->e_shstrndx;
+ if (tmp >= SHN_LORESERVE)
+ tmp = SHN_XINDEX;
+ H_PUT_16 (abfd, tmp, dst->e_shstrndx);
}
/* Translate an ELF section header table entry in external format into an
@@ -306,19 +333,19 @@ elf_swap_shdr_in (abfd, src, 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_name = H_GET_32 (abfd, src->sh_name);
+ dst->sh_type = H_GET_32 (abfd, src->sh_type);
+ dst->sh_flags = H_GET_WORD (abfd, src->sh_flags);
if (signed_vma)
- dst->sh_addr = get_signed_word (abfd, (bfd_byte *) src->sh_addr);
+ dst->sh_addr = H_GET_SIGNED_WORD (abfd, 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);
- dst->sh_info = bfd_h_get_32 (abfd, (bfd_byte *) src->sh_info);
- dst->sh_addralign = get_word (abfd, (bfd_byte *) src->sh_addralign);
- dst->sh_entsize = get_word (abfd, (bfd_byte *) src->sh_entsize);
+ dst->sh_addr = H_GET_WORD (abfd, src->sh_addr);
+ dst->sh_offset = H_GET_WORD (abfd, src->sh_offset);
+ dst->sh_size = H_GET_WORD (abfd, src->sh_size);
+ dst->sh_link = H_GET_32 (abfd, src->sh_link);
+ dst->sh_info = H_GET_32 (abfd, src->sh_info);
+ dst->sh_addralign = H_GET_WORD (abfd, src->sh_addralign);
+ dst->sh_entsize = H_GET_WORD (abfd, src->sh_entsize);
dst->bfd_section = NULL;
dst->contents = NULL;
}
@@ -333,16 +360,16 @@ elf_swap_shdr_out (abfd, src, dst)
Elf_External_Shdr *dst;
{
/* note that all elements of dst are *arrays of unsigned char* already... */
- bfd_h_put_32 (abfd, src->sh_name, dst->sh_name);
- bfd_h_put_32 (abfd, src->sh_type, dst->sh_type);
- put_word (abfd, src->sh_flags, dst->sh_flags);
- put_word (abfd, src->sh_addr, dst->sh_addr);
- put_word (abfd, src->sh_offset, dst->sh_offset);
- put_word (abfd, src->sh_size, dst->sh_size);
- bfd_h_put_32 (abfd, src->sh_link, dst->sh_link);
- bfd_h_put_32 (abfd, src->sh_info, dst->sh_info);
- put_word (abfd, src->sh_addralign, dst->sh_addralign);
- put_word (abfd, src->sh_entsize, dst->sh_entsize);
+ H_PUT_32 (abfd, src->sh_name, dst->sh_name);
+ H_PUT_32 (abfd, src->sh_type, dst->sh_type);
+ H_PUT_WORD (abfd, src->sh_flags, dst->sh_flags);
+ H_PUT_WORD (abfd, src->sh_addr, dst->sh_addr);
+ H_PUT_WORD (abfd, src->sh_offset, dst->sh_offset);
+ H_PUT_WORD (abfd, src->sh_size, dst->sh_size);
+ H_PUT_32 (abfd, src->sh_link, dst->sh_link);
+ H_PUT_32 (abfd, src->sh_info, dst->sh_info);
+ H_PUT_WORD (abfd, src->sh_addralign, dst->sh_addralign);
+ H_PUT_WORD (abfd, src->sh_entsize, dst->sh_entsize);
}
/* Translate an ELF program header table entry in external format into an
@@ -356,22 +383,22 @@ elf_swap_phdr_in (abfd, src, 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_type = H_GET_32 (abfd, src->p_type);
+ dst->p_flags = H_GET_32 (abfd, src->p_flags);
+ dst->p_offset = H_GET_WORD (abfd, src->p_offset);
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);
+ dst->p_vaddr = H_GET_SIGNED_WORD (abfd, src->p_vaddr);
+ dst->p_paddr = H_GET_SIGNED_WORD (abfd, 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_vaddr = H_GET_WORD (abfd, src->p_vaddr);
+ dst->p_paddr = H_GET_WORD (abfd, 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);
+ dst->p_filesz = H_GET_WORD (abfd, src->p_filesz);
+ dst->p_memsz = H_GET_WORD (abfd, src->p_memsz);
+ dst->p_align = H_GET_WORD (abfd, src->p_align);
}
void
@@ -381,14 +408,14 @@ elf_swap_phdr_out (abfd, src, dst)
Elf_External_Phdr *dst;
{
/* note that all elements of dst are *arrays of unsigned char* already... */
- bfd_h_put_32 (abfd, src->p_type, dst->p_type);
- put_word (abfd, src->p_offset, dst->p_offset);
- put_word (abfd, src->p_vaddr, dst->p_vaddr);
- put_word (abfd, src->p_paddr, dst->p_paddr);
- put_word (abfd, src->p_filesz, dst->p_filesz);
- put_word (abfd, src->p_memsz, dst->p_memsz);
- bfd_h_put_32 (abfd, src->p_flags, dst->p_flags);
- put_word (abfd, src->p_align, dst->p_align);
+ H_PUT_32 (abfd, src->p_type, dst->p_type);
+ H_PUT_WORD (abfd, src->p_offset, dst->p_offset);
+ H_PUT_WORD (abfd, src->p_vaddr, dst->p_vaddr);
+ H_PUT_WORD (abfd, src->p_paddr, dst->p_paddr);
+ H_PUT_WORD (abfd, src->p_filesz, dst->p_filesz);
+ H_PUT_WORD (abfd, src->p_memsz, dst->p_memsz);
+ H_PUT_32 (abfd, src->p_flags, dst->p_flags);
+ H_PUT_WORD (abfd, src->p_align, dst->p_align);
}
/* Translate an ELF reloc from external format to internal format. */
@@ -398,8 +425,8 @@ elf_swap_reloc_in (abfd, src, dst)
const Elf_External_Rel *src;
Elf_Internal_Rel *dst;
{
- dst->r_offset = get_word (abfd, (bfd_byte *) src->r_offset);
- dst->r_info = get_word (abfd, (bfd_byte *) src->r_info);
+ dst->r_offset = H_GET_WORD (abfd, src->r_offset);
+ dst->r_info = H_GET_WORD (abfd, src->r_info);
}
INLINE void
@@ -408,9 +435,9 @@ elf_swap_reloca_in (abfd, src, dst)
const Elf_External_Rela *src;
Elf_Internal_Rela *dst;
{
- dst->r_offset = get_word (abfd, (bfd_byte *) src->r_offset);
- dst->r_info = get_word (abfd, (bfd_byte *) src->r_info);
- dst->r_addend = get_signed_word (abfd, (bfd_byte *) src->r_addend);
+ dst->r_offset = H_GET_WORD (abfd, src->r_offset);
+ dst->r_info = H_GET_WORD (abfd, src->r_info);
+ dst->r_addend = H_GET_SIGNED_WORD (abfd, src->r_addend);
}
/* Translate an ELF reloc from internal format to external format. */
@@ -420,8 +447,8 @@ elf_swap_reloc_out (abfd, src, dst)
const Elf_Internal_Rel *src;
Elf_External_Rel *dst;
{
- put_word (abfd, src->r_offset, dst->r_offset);
- put_word (abfd, src->r_info, dst->r_info);
+ H_PUT_WORD (abfd, src->r_offset, dst->r_offset);
+ H_PUT_WORD (abfd, src->r_info, dst->r_info);
}
INLINE void
@@ -430,9 +457,9 @@ elf_swap_reloca_out (abfd, src, dst)
const Elf_Internal_Rela *src;
Elf_External_Rela *dst;
{
- put_word (abfd, src->r_offset, dst->r_offset);
- put_word (abfd, src->r_info, dst->r_info);
- put_signed_word (abfd, src->r_addend, dst->r_addend);
+ H_PUT_WORD (abfd, src->r_offset, dst->r_offset);
+ H_PUT_WORD (abfd, src->r_info, dst->r_info);
+ H_PUT_SIGNED_WORD (abfd, src->r_addend, dst->r_addend);
}
INLINE void
@@ -443,8 +470,8 @@ elf_swap_dyn_in (abfd, p, dst)
{
const Elf_External_Dyn *src = (const Elf_External_Dyn *) p;
- dst->d_tag = get_word (abfd, src->d_tag);
- dst->d_un.d_val = get_word (abfd, src->d_un.d_val);
+ dst->d_tag = H_GET_WORD (abfd, src->d_tag);
+ dst->d_un.d_val = H_GET_WORD (abfd, src->d_un.d_val);
}
INLINE void
@@ -455,8 +482,8 @@ elf_swap_dyn_out (abfd, src, 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);
+ H_PUT_WORD (abfd, src->d_tag, dst->d_tag);
+ H_PUT_WORD (abfd, src->d_un.d_val, dst->d_un.d_val);
}
/* ELF .o/exec file reading */
@@ -476,6 +503,16 @@ elf_file_p (x_ehdrp)
&& (x_ehdrp->e_ident[EI_MAG3] == ELFMAG3));
}
+struct bfd_preserve
+{
+ const struct bfd_arch_info *arch_info;
+ struct elf_obj_tdata *tdata;
+ struct bfd_hash_table section_htab;
+ struct sec *sections;
+ struct sec **section_tail;
+ unsigned int section_count;
+};
+
/* Check to see if the file associated with ABFD matches the target vector
that ABFD points to.
@@ -491,26 +528,22 @@ elf_object_p (abfd)
Elf_External_Ehdr x_ehdr; /* Elf file header, external form */
Elf_Internal_Ehdr *i_ehdrp; /* Elf file header, internal form */
Elf_External_Shdr x_shdr; /* Section header table entry, external form */
- Elf_Internal_Shdr *i_shdrp = NULL; /* Section header table, internal form */
+ Elf_Internal_Shdr i_shdr;
+ Elf_Internal_Shdr *i_shdrp; /* Section header table, internal form */
unsigned int shindex;
char *shstrtab; /* Internal copy of section header stringtab */
struct elf_backend_data *ebd;
- struct elf_obj_tdata *preserved_tdata = elf_tdata (abfd);
- struct sec *preserved_sections = abfd->sections;
- unsigned int preserved_section_count = abfd->section_count;
- enum bfd_architecture previous_arch = bfd_get_arch (abfd);
- unsigned long previous_mach = bfd_get_mach (abfd);
+ struct bfd_preserve preserve;
struct elf_obj_tdata *new_tdata = NULL;
asection *s;
+ bfd_size_type amt;
- /* Clear section information, since there might be a recognized bfd that
- we now check if we can replace, and we don't want to append to it. */
- abfd->sections = NULL;
- abfd->section_count = 0;
+ preserve.arch_info = abfd->arch_info;
/* Read in the ELF header in external format. */
- if (bfd_read ((PTR) & x_ehdr, sizeof (x_ehdr), 1, abfd) != sizeof (x_ehdr))
+ if (bfd_bread ((PTR) & x_ehdr, (bfd_size_type) sizeof (x_ehdr), abfd)
+ != sizeof (x_ehdr))
{
if (bfd_get_error () != bfd_error_system_call)
goto got_wrong_format_error;
@@ -548,12 +581,25 @@ elf_object_p (abfd)
/* Allocate an instance of the elf_obj_tdata structure and hook it up to
the tdata pointer in the bfd. */
- new_tdata = ((struct elf_obj_tdata *)
- bfd_zalloc (abfd, sizeof (struct elf_obj_tdata)));
+ amt = sizeof (struct elf_obj_tdata);
+ new_tdata = (struct elf_obj_tdata *) bfd_zalloc (abfd, amt);
if (new_tdata == NULL)
goto got_no_match;
+ preserve.tdata = elf_tdata (abfd);
elf_tdata (abfd) = new_tdata;
+ /* Clear section information, since there might be a recognized bfd that
+ we now check if we can replace, and we don't want to append to it. */
+ preserve.sections = abfd->sections;
+ preserve.section_tail = abfd->section_tail;
+ preserve.section_count = abfd->section_count;
+ preserve.section_htab = abfd->section_htab;
+ abfd->sections = NULL;
+ abfd->section_tail = &abfd->sections;
+ abfd->section_count = 0;
+ if (!bfd_hash_table_init (&abfd->section_htab, bfd_section_hash_newfunc))
+ goto got_no_match;
+
/* Now that we know the byte order, swap in the rest of the header */
i_ehdrp = elf_elfheader (abfd);
elf_swap_ehdr_in (abfd, &x_ehdr, i_ehdrp);
@@ -565,14 +611,15 @@ elf_object_p (abfd)
if (i_ehdrp->e_type == ET_CORE)
goto got_wrong_format_error;
- /* If there is no section header table, we're hosed. */
- if (i_ehdrp->e_shoff == 0)
+ /* If this is a relocatable file and there is no section header
+ table, then we're hosed. */
+ if (i_ehdrp->e_shoff == 0 && i_ehdrp->e_type == ET_REL)
goto got_wrong_format_error;
/* As a simple sanity check, verify that the what BFD thinks is the
size of each section header table entry actually matches the size
- recorded in the file. */
- if (i_ehdrp->e_shentsize != sizeof (x_shdr))
+ recorded in the file, but only if there are any sections. */
+ if (i_ehdrp->e_shentsize != sizeof (x_shdr) && i_ehdrp->e_shnum != 0)
goto got_wrong_format_error;
ebd = get_elf_backend_data (abfd);
@@ -628,34 +675,80 @@ elf_object_p (abfd)
/* Remember the entry point specified in the ELF file header. */
bfd_set_start_address (abfd, i_ehdrp->e_entry);
- /* Allocate space for a copy of the section header table in
- internal form, seek to the section header table in the file,
- read it in, and convert it to internal form. */
- i_shdrp = ((Elf_Internal_Shdr *)
- bfd_alloc (abfd, sizeof (*i_shdrp) * i_ehdrp->e_shnum));
- elf_elfsections (abfd) = ((Elf_Internal_Shdr **)
- bfd_alloc (abfd,
- sizeof (i_shdrp) * i_ehdrp->e_shnum));
- if (!i_shdrp || !elf_elfsections (abfd))
+ /* Seek to the section header table in the file. */
+ if (bfd_seek (abfd, (file_ptr) i_ehdrp->e_shoff, SEEK_SET) != 0)
goto got_no_match;
- if (bfd_seek (abfd, i_ehdrp->e_shoff, SEEK_SET) != 0)
+
+ /* Read the first section header at index 0, and convert to internal
+ form. */
+ if (bfd_bread ((PTR) & x_shdr, (bfd_size_type) sizeof x_shdr, abfd)
+ != sizeof (x_shdr))
goto got_no_match;
- for (shindex = 0; shindex < i_ehdrp->e_shnum; shindex++)
+ elf_swap_shdr_in (abfd, &x_shdr, &i_shdr);
+
+ /* If the section count is zero, the actual count is in the first
+ section header. */
+ if (i_ehdrp->e_shnum == SHN_UNDEF)
+ i_ehdrp->e_shnum = i_shdr.sh_size;
+
+ /* And similarly for the string table index. */
+ if (i_ehdrp->e_shstrndx == SHN_XINDEX)
+ i_ehdrp->e_shstrndx = i_shdr.sh_link;
+
+ /* Allocate space for a copy of the section header table in
+ internal form. */
+ if (i_ehdrp->e_shnum != 0)
{
- if (bfd_read ((PTR) & x_shdr, sizeof x_shdr, 1, abfd) != sizeof (x_shdr))
+ Elf_Internal_Shdr *shdrp;
+ unsigned int num_sec;
+
+ amt = sizeof (*i_shdrp) * i_ehdrp->e_shnum;
+ i_shdrp = (Elf_Internal_Shdr *) bfd_alloc (abfd, amt);
+ if (!i_shdrp)
goto got_no_match;
- elf_swap_shdr_in (abfd, &x_shdr, i_shdrp + shindex);
- elf_elfsections (abfd)[shindex] = i_shdrp + shindex;
-
- /* If the section is loaded, but not page aligned, clear
- D_PAGED. */
- if ((i_shdrp[shindex].sh_flags & SHF_ALLOC) != 0
- && i_shdrp[shindex].sh_type != SHT_NOBITS
- && (((i_shdrp[shindex].sh_addr - i_shdrp[shindex].sh_offset)
- % ebd->maxpagesize)
- != 0))
- abfd->flags &= ~D_PAGED;
+ num_sec = i_ehdrp->e_shnum;
+ if (num_sec > SHN_LORESERVE)
+ num_sec += SHN_HIRESERVE + 1 - SHN_LORESERVE;
+ elf_numsections (abfd) = num_sec;
+ amt = sizeof (i_shdrp) * num_sec;
+ elf_elfsections (abfd) = (Elf_Internal_Shdr **) bfd_alloc (abfd, amt);
+ if (!elf_elfsections (abfd))
+ goto got_no_match;
+
+ memcpy (i_shdrp, &i_shdr, sizeof (*i_shdrp));
+ shdrp = i_shdrp;
+ shindex = 0;
+ if (num_sec > SHN_LORESERVE)
+ {
+ for ( ; shindex < SHN_LORESERVE; shindex++)
+ elf_elfsections (abfd)[shindex] = shdrp++;
+ for ( ; shindex < SHN_HIRESERVE + 1; shindex++)
+ elf_elfsections (abfd)[shindex] = i_shdrp;
+ }
+ for ( ; shindex < num_sec; shindex++)
+ elf_elfsections (abfd)[shindex] = shdrp++;
+
+ /* Read in the rest of the section header table and convert it
+ to internal form. */
+ for (shindex = 1; shindex < i_ehdrp->e_shnum; shindex++)
+ {
+ if (bfd_bread ((PTR) & x_shdr, (bfd_size_type) sizeof x_shdr, abfd)
+ != sizeof (x_shdr))
+ goto got_no_match;
+ elf_swap_shdr_in (abfd, &x_shdr, i_shdrp + shindex);
+
+ /* If the section is loaded, but not page aligned, clear
+ D_PAGED. */
+ if (i_shdrp[shindex].sh_size != 0
+ && (i_shdrp[shindex].sh_flags & SHF_ALLOC) != 0
+ && i_shdrp[shindex].sh_type != SHT_NOBITS
+ && (((i_shdrp[shindex].sh_addr - i_shdrp[shindex].sh_offset)
+ % ebd->maxpagesize)
+ != 0))
+ abfd->flags &= ~D_PAGED;
+ }
}
+
if (i_ehdrp->e_shstrndx)
{
if (! bfd_section_from_shdr (abfd, i_ehdrp->e_shstrndx))
@@ -670,20 +763,18 @@ elf_object_p (abfd)
Elf_Internal_Phdr *i_phdr;
unsigned int i;
- elf_tdata (abfd)->phdr = ((Elf_Internal_Phdr *)
- bfd_alloc (abfd,
- (i_ehdrp->e_phnum
- * sizeof (Elf_Internal_Phdr))));
+ amt = i_ehdrp->e_phnum * sizeof (Elf_Internal_Phdr);
+ elf_tdata (abfd)->phdr = (Elf_Internal_Phdr *) bfd_alloc (abfd, amt);
if (elf_tdata (abfd)->phdr == NULL)
goto got_no_match;
- if (bfd_seek (abfd, i_ehdrp->e_phoff, SEEK_SET) != 0)
+ if (bfd_seek (abfd, (file_ptr) i_ehdrp->e_phoff, SEEK_SET) != 0)
goto got_no_match;
i_phdr = elf_tdata (abfd)->phdr;
for (i = 0; i < i_ehdrp->e_phnum; i++, i_phdr++)
{
Elf_External_Phdr x_phdr;
- if (bfd_read ((PTR) &x_phdr, sizeof x_phdr, 1, abfd)
+ if (bfd_bread ((PTR) &x_phdr, (bfd_size_type) sizeof x_phdr, abfd)
!= sizeof x_phdr)
goto got_no_match;
elf_swap_phdr_in (abfd, &x_phdr, i_phdr);
@@ -696,18 +787,25 @@ elf_object_p (abfd)
bfd_section_from_shdr with it (since this particular strtab is
used to find all of the ELF section names.) */
- shstrtab = bfd_elf_get_str_section (abfd, i_ehdrp->e_shstrndx);
- if (!shstrtab)
- goto got_no_match;
-
- /* Once all of the section headers have been read and converted, we
- can start processing them. Note that the first section header is
- a dummy placeholder entry, so we ignore it. */
-
- for (shindex = 1; shindex < i_ehdrp->e_shnum; shindex++)
+ if (i_ehdrp->e_shstrndx != 0)
{
- if (! bfd_section_from_shdr (abfd, shindex))
+ unsigned int num_sec;
+
+ shstrtab = bfd_elf_get_str_section (abfd, i_ehdrp->e_shstrndx);
+ if (!shstrtab)
goto got_no_match;
+
+ /* Once all of the section headers have been read and converted, we
+ can start processing them. Note that the first section header is
+ a dummy placeholder entry, so we ignore it. */
+ num_sec = elf_numsections (abfd);
+ for (shindex = 1; shindex < num_sec; shindex++)
+ {
+ if (! bfd_section_from_shdr (abfd, shindex))
+ goto got_no_match;
+ if (shindex == SHN_LORESERVE - 1)
+ shindex += SHN_HIRESERVE + 1 - SHN_LORESERVE;
+ }
}
/* Let the backend double check the format and override global
@@ -737,6 +835,10 @@ elf_object_p (abfd)
}
}
+ /* It would be nice to be able to free more memory here, eg. old
+ elf_elfsections, old tdata, but that's not possible since these
+ blocks are sitting inside obj_alloc'd memory. */
+ bfd_hash_table_free (&preserve.section_htab);
return (abfd->xvec);
got_wrong_format_error:
@@ -749,20 +851,22 @@ elf_object_p (abfd)
target-specific elf_backend_object_p function. Note that saving the
whole bfd here and restoring it would be even worse; the first thing
you notice is that the cached bfd file position gets out of sync. */
- bfd_default_set_arch_mach (abfd, previous_arch, previous_mach);
bfd_set_error (bfd_error_wrong_format);
+
got_no_match:
- if (new_tdata != NULL
- && new_tdata->elf_sect_ptr != NULL)
- bfd_release (abfd, new_tdata->elf_sect_ptr);
- if (i_shdrp != NULL)
- bfd_release (abfd, i_shdrp);
+ abfd->arch_info = preserve.arch_info;
if (new_tdata != NULL)
- bfd_release (abfd, new_tdata);
- elf_tdata (abfd) = preserved_tdata;
- abfd->sections = preserved_sections;
- abfd->section_count = preserved_section_count;
- return (NULL);
+ {
+ /* bfd_release frees all memory more recently bfd_alloc'd than
+ its arg, as well as its arg. */
+ bfd_release (abfd, new_tdata);
+ elf_tdata (abfd) = preserve.tdata;
+ abfd->section_htab = preserve.section_htab;
+ abfd->sections = preserve.sections;
+ abfd->section_tail = preserve.section_tail;
+ abfd->section_count = preserve.section_count;
+ }
+ return NULL;
}
/* ELF .o/exec file writing */
@@ -935,14 +1039,14 @@ int
elf_write_out_phdrs (abfd, phdr, count)
bfd *abfd;
const Elf_Internal_Phdr *phdr;
- int count;
+ unsigned int count;
{
while (count--)
{
Elf_External_Phdr extphdr;
elf_swap_phdr_out (abfd, phdr, &extphdr);
- if (bfd_write (&extphdr, sizeof (Elf_External_Phdr), 1, abfd)
- != sizeof (Elf_External_Phdr))
+ if (bfd_bwrite (&extphdr, (bfd_size_type) sizeof (Elf_External_Phdr),
+ abfd) != sizeof (Elf_External_Phdr))
return -1;
phdr++;
}
@@ -960,6 +1064,7 @@ elf_write_shdrs_and_ehdr (abfd)
Elf_External_Shdr *x_shdrp; /* Section header table, external form */
Elf_Internal_Shdr **i_shdrp; /* Section header table, internal form */
unsigned int count;
+ bfd_size_type amt;
i_ehdrp = elf_elfheader (abfd);
i_shdrp = elf_elfsections (abfd);
@@ -970,27 +1075,37 @@ elf_write_shdrs_and_ehdr (abfd)
elf_debug_file (i_ehdrp);
#endif
elf_swap_ehdr_out (abfd, i_ehdrp, &x_ehdr);
+ amt = sizeof (x_ehdr);
if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0
- || (bfd_write ((PTR) & x_ehdr, sizeof (x_ehdr), 1, abfd)
- != sizeof (x_ehdr)))
+ || bfd_bwrite ((PTR) & x_ehdr, amt, abfd) != amt)
return false;
+ /* Some fields in the first section header handle overflow of ehdr
+ fields. */
+ if (i_ehdrp->e_shnum >= SHN_LORESERVE)
+ i_shdrp[0]->sh_size = i_ehdrp->e_shnum;
+ if (i_ehdrp->e_shstrndx >= SHN_LORESERVE)
+ i_shdrp[0]->sh_link = i_ehdrp->e_shstrndx;
+
/* at this point we've concocted all the ELF sections... */
- x_shdrp = (Elf_External_Shdr *)
- bfd_alloc (abfd, sizeof (*x_shdrp) * (i_ehdrp->e_shnum));
+ amt = i_ehdrp->e_shnum;
+ amt *= sizeof (*x_shdrp);
+ x_shdrp = (Elf_External_Shdr *) bfd_alloc (abfd, amt);
if (!x_shdrp)
return false;
- for (count = 0; count < i_ehdrp->e_shnum; count++)
+ for (count = 0; count < i_ehdrp->e_shnum; i_shdrp++, count++)
{
#if DEBUG & 2
- elf_debug_section (count, i_shdrp[count]);
+ elf_debug_section (count, *i_shdrp);
#endif
- elf_swap_shdr_out (abfd, i_shdrp[count], x_shdrp + count);
+ elf_swap_shdr_out (abfd, *i_shdrp, x_shdrp + count);
+
+ if (count == SHN_LORESERVE - 1)
+ i_shdrp += SHN_HIRESERVE + 1 - SHN_LORESERVE;
}
if (bfd_seek (abfd, (file_ptr) i_ehdrp->e_shoff, SEEK_SET) != 0
- || (bfd_write ((PTR) x_shdrp, sizeof (*x_shdrp), i_ehdrp->e_shnum, abfd)
- != sizeof (*x_shdrp) * i_ehdrp->e_shnum))
+ || bfd_bwrite ((PTR) x_shdrp, amt, abfd) != amt)
return false;
/* need to dump the string table too... */
@@ -1011,7 +1126,9 @@ elf_slurp_symbol_table (abfd, symptrs, dynamic)
elf_symbol_type *symbase; /* Buffer for generated bfd symbols */
Elf_Internal_Sym i_sym;
Elf_External_Sym *x_symp = NULL;
+ Elf_External_Sym_Shndx *x_shndx = NULL;
Elf_External_Versym *x_versymp = NULL;
+ bfd_size_type amt;
/* Read each raw ELF symbol, converting from external ELF form to
internal ELF form, and then using the information to create a
@@ -1025,8 +1142,24 @@ elf_slurp_symbol_table (abfd, symptrs, dynamic)
if (! dynamic)
{
+ Elf_Internal_Shdr *shndx_hdr;
+
hdr = &elf_tdata (abfd)->symtab_hdr;
+ shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
verhdr = NULL;
+
+ /* If we have a SHT_SYMTAB_SHNDX section for the symbol table,
+ read the raw contents. */
+ if (elf_elfsections (abfd) != NULL
+ && elf_elfsections (abfd)[shndx_hdr->sh_link] == hdr)
+ {
+ amt = shndx_hdr->sh_size;
+ x_shndx = (Elf_External_Sym_Shndx *) bfd_malloc (amt);
+ if (x_shndx == NULL
+ || bfd_seek (abfd, shndx_hdr->sh_offset, SEEK_SET) != 0
+ || bfd_bread ((PTR) x_shndx, amt, abfd) != amt)
+ goto error_return;
+ }
}
else
{
@@ -1045,8 +1178,8 @@ elf_slurp_symbol_table (abfd, symptrs, dynamic)
}
}
- if (bfd_seek (abfd, hdr->sh_offset, SEEK_SET) == -1)
- return -1;
+ if (bfd_seek (abfd, hdr->sh_offset, SEEK_SET) != 0)
+ goto error_return;
symcount = hdr->sh_size / sizeof (Elf_External_Sym);
@@ -1056,23 +1189,24 @@ elf_slurp_symbol_table (abfd, symptrs, dynamic)
{
unsigned long i;
- if (bfd_seek (abfd, hdr->sh_offset, SEEK_SET) == -1)
- return -1;
+ if (bfd_seek (abfd, hdr->sh_offset, SEEK_SET) != 0)
+ goto error_return;
- symbase = ((elf_symbol_type *)
- bfd_zalloc (abfd, symcount * sizeof (elf_symbol_type)));
+ amt = symcount;
+ amt *= sizeof (elf_symbol_type);
+ symbase = (elf_symbol_type *) bfd_zalloc (abfd, amt);
if (symbase == (elf_symbol_type *) NULL)
- return -1;
+ goto error_return;
sym = symbase;
/* Temporarily allocate room for the raw ELF symbols. */
- x_symp = ((Elf_External_Sym *)
- bfd_malloc (symcount * sizeof (Elf_External_Sym)));
- if (x_symp == NULL && symcount != 0)
+ amt = symcount;
+ amt *= sizeof (Elf_External_Sym);
+ x_symp = (Elf_External_Sym *) bfd_malloc (amt);
+ if (x_symp == NULL)
goto error_return;
- if (bfd_read ((PTR) x_symp, sizeof (Elf_External_Sym), symcount, abfd)
- != symcount * sizeof (Elf_External_Sym))
+ if (bfd_bread ((PTR) x_symp, amt, abfd) != amt)
goto error_return;
/* Read the raw ELF version symbol information. */
@@ -1100,7 +1234,7 @@ elf_slurp_symbol_table (abfd, symptrs, dynamic)
if (x_versymp == NULL && verhdr->sh_size != 0)
goto error_return;
- if (bfd_read ((PTR) x_versymp, 1, verhdr->sh_size, abfd)
+ if (bfd_bread ((PTR) x_versymp, verhdr->sh_size, abfd)
!= verhdr->sh_size)
goto error_return;
}
@@ -1108,7 +1242,8 @@ elf_slurp_symbol_table (abfd, symptrs, dynamic)
/* Skip first symbol, which is a null dummy. */
for (i = 1; i < symcount; i++)
{
- elf_swap_symbol_in (abfd, x_symp + i, &i_sym);
+ elf_swap_symbol_in (abfd, x_symp + i,
+ x_shndx + (x_shndx != NULL ? i : 0), &i_sym);
memcpy (&sym->internal_elf_sym, &i_sym, sizeof (Elf_Internal_Sym));
#ifdef ELF_KEEP_EXTSYM
memcpy (&sym->native_elf_sym, x_symp + i, sizeof (Elf_External_Sym));
@@ -1121,7 +1256,12 @@ elf_slurp_symbol_table (abfd, symptrs, dynamic)
sym->symbol.value = i_sym.st_value;
- if (i_sym.st_shndx > 0 && i_sym.st_shndx < SHN_LORESERVE)
+ if (i_sym.st_shndx == SHN_UNDEF)
+ {
+ sym->symbol.section = bfd_und_section_ptr;
+ }
+ else if (i_sym.st_shndx < SHN_LORESERVE
+ || i_sym.st_shndx > SHN_HIRESERVE)
{
sym->symbol.section = section_from_elf_index (abfd,
i_sym.st_shndx);
@@ -1146,10 +1286,6 @@ elf_slurp_symbol_table (abfd, symptrs, dynamic)
moment) about the alignment. */
sym->symbol.value = i_sym.st_size;
}
- else if (i_sym.st_shndx == SHN_UNDEF)
- {
- sym->symbol.section = bfd_und_section_ptr;
- }
else
sym->symbol.section = bfd_abs_section_ptr;
@@ -1236,12 +1372,17 @@ elf_slurp_symbol_table (abfd, symptrs, dynamic)
*symptrs = 0; /* Final null pointer */
}
+ if (x_shndx != NULL)
+ free (x_shndx);
if (x_versymp != NULL)
free (x_versymp);
if (x_symp != NULL)
free (x_symp);
return symcount;
+
error_return:
+ if (x_shndx != NULL)
+ free (x_shndx);
if (x_versymp != NULL)
free (x_versymp);
if (x_symp != NULL)
@@ -1270,12 +1411,12 @@ elf_slurp_reloc_table_from_section (abfd, asect, rel_hdr, reloc_count,
unsigned int i;
int entsize;
- allocated = (PTR) bfd_malloc ((size_t) rel_hdr->sh_size);
+ allocated = (PTR) bfd_malloc (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)
+ || (bfd_bread (allocated, rel_hdr->sh_size, abfd)
!= rel_hdr->sh_size))
goto error_return;
@@ -1361,6 +1502,7 @@ elf_slurp_reloc_table (abfd, asect, symbols, dynamic)
bfd_size_type reloc_count;
bfd_size_type reloc_count2;
arelent *relents;
+ bfd_size_type amt;
if (asect->relocation != NULL)
return true;
@@ -1396,9 +1538,8 @@ elf_slurp_reloc_table (abfd, asect, symbols, dynamic)
reloc_count2 = 0;
}
- relents = ((arelent *)
- bfd_alloc (abfd,
- (reloc_count + reloc_count2) * sizeof (arelent)));
+ amt = (reloc_count + reloc_count2) * sizeof (arelent);
+ relents = (arelent *) bfd_alloc (abfd, amt);
if (relents == NULL)
return false;
diff --git a/contrib/binutils/bfd/elfcore.h b/contrib/binutils/bfd/elfcore.h
index ef71762..2a795a9 100644
--- a/contrib/binutils/bfd/elfcore.h
+++ b/contrib/binutils/bfd/elfcore.h
@@ -81,14 +81,18 @@ elf_core_file_p (abfd)
{
Elf_External_Ehdr x_ehdr; /* Elf file header, external form */
Elf_Internal_Ehdr *i_ehdrp; /* Elf file header, internal form */
- Elf_Internal_Phdr *i_phdrp = NULL; /* Elf program header, internal form */
+ Elf_Internal_Phdr *i_phdrp; /* Elf program header, internal form */
unsigned int phindex;
struct elf_backend_data *ebd;
- struct elf_obj_tdata *preserved_tdata = elf_tdata (abfd);
+ struct bfd_preserve preserve;
struct elf_obj_tdata *new_tdata = NULL;
+ bfd_size_type amt;
+
+ preserve.arch_info = abfd->arch_info;
/* Read in the ELF header in external format. */
- if (bfd_read ((PTR) & x_ehdr, sizeof (x_ehdr), 1, abfd) != sizeof (x_ehdr))
+ if (bfd_bread ((PTR) &x_ehdr, (bfd_size_type) sizeof (x_ehdr), abfd)
+ != sizeof (x_ehdr))
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
@@ -121,12 +125,25 @@ elf_core_file_p (abfd)
}
/* Give abfd an elf_obj_tdata. */
- new_tdata =
- (struct elf_obj_tdata *) bfd_zalloc (abfd, sizeof (struct elf_obj_tdata));
+ amt = sizeof (struct elf_obj_tdata);
+ new_tdata = (struct elf_obj_tdata *) bfd_zalloc (abfd, amt);
if (new_tdata == NULL)
return NULL;
+ preserve.tdata = elf_tdata (abfd);
elf_tdata (abfd) = new_tdata;
+ /* Clear section information, since there might be a recognized bfd that
+ we now check if we can replace, and we don't want to append to it. */
+ preserve.sections = abfd->sections;
+ preserve.section_tail = abfd->section_tail;
+ preserve.section_count = abfd->section_count;
+ preserve.section_htab = abfd->section_htab;
+ abfd->sections = NULL;
+ abfd->section_tail = &abfd->sections;
+ abfd->section_count = 0;
+ if (!bfd_hash_table_init (&abfd->section_htab, bfd_section_hash_newfunc))
+ goto fail;
+
/* 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);
@@ -181,12 +198,12 @@ elf_core_file_p (abfd)
goto wrong;
/* Move to the start of the program headers. */
- if (bfd_seek (abfd, i_ehdrp->e_phoff, SEEK_SET) != 0)
+ if (bfd_seek (abfd, (file_ptr) i_ehdrp->e_phoff, SEEK_SET) != 0)
goto wrong;
/* Allocate space for the program headers. */
- i_phdrp = (Elf_Internal_Phdr *)
- bfd_alloc (abfd, sizeof (*i_phdrp) * i_ehdrp->e_phnum);
+ amt = sizeof (*i_phdrp) * i_ehdrp->e_phnum;
+ i_phdrp = (Elf_Internal_Phdr *) bfd_alloc (abfd, amt);
if (!i_phdrp)
goto fail;
@@ -196,7 +213,7 @@ elf_core_file_p (abfd)
for (phindex = 0; phindex < i_ehdrp->e_phnum; ++phindex)
{
Elf_External_Phdr x_phdr;
- if (bfd_read ((PTR) &x_phdr, sizeof (x_phdr), 1, abfd)
+ if (bfd_bread ((PTR) &x_phdr, (bfd_size_type) sizeof (x_phdr), abfd)
!= sizeof (x_phdr))
goto fail;
@@ -206,7 +223,7 @@ elf_core_file_p (abfd)
/* Process each program header. */
for (phindex = 0; phindex < i_ehdrp->e_phnum; ++phindex)
{
- if (!_bfd_elfcore_section_from_phdr (abfd, i_phdrp + phindex, phindex))
+ if (! bfd_section_from_phdr (abfd, i_phdrp + phindex, (int) phindex))
goto fail;
}
@@ -229,15 +246,33 @@ elf_core_file_p (abfd)
goto wrong;
}
+ bfd_hash_table_free (&preserve.section_htab);
return abfd->xvec;
wrong:
+ /* There is way too much undoing of half-known state here. The caller,
+ bfd_check_format_matches, really shouldn't iterate on live bfd's to
+ check match/no-match like it does. We have to rely on that a call to
+ bfd_default_set_arch_mach with the previously known mach, undoes what
+ was done by the first bfd_default_set_arch_mach (with mach 0) here.
+ For this to work, only elf-data and the mach may be changed by the
+ target-specific elf_backend_object_p function. Note that saving the
+ whole bfd here and restoring it would be even worse; the first thing
+ you notice is that the cached bfd file position gets out of sync. */
bfd_set_error (bfd_error_wrong_format);
+
fail:
- if (i_phdrp != NULL)
- bfd_release (abfd, i_phdrp);
+ abfd->arch_info = preserve.arch_info;
if (new_tdata != NULL)
- bfd_release (abfd, new_tdata);
- elf_tdata (abfd) = preserved_tdata;
+ {
+ /* bfd_release frees all memory more recently bfd_alloc'd than
+ its arg, as well as its arg. */
+ bfd_release (abfd, new_tdata);
+ elf_tdata (abfd) = preserve.tdata;
+ abfd->section_htab = preserve.section_htab;
+ abfd->sections = preserve.sections;
+ abfd->section_tail = preserve.section_tail;
+ abfd->section_count = preserve.section_count;
+ }
return NULL;
}
diff --git a/contrib/binutils/bfd/elflink.c b/contrib/binutils/bfd/elflink.c
index b971311..2032efa 100644
--- a/contrib/binutils/bfd/elflink.c
+++ b/contrib/binutils/bfd/elflink.c
@@ -73,24 +73,27 @@ _bfd_elf_create_got_section (abfd, info)
return false;
}
- /* Define the symbol _GLOBAL_OFFSET_TABLE_ at the start of the .got
- (or .got.plt) section. We don't do this in the linker script
- because we don't want to define the symbol if we are not creating
- a global offset table. */
- h = NULL;
- if (!(_bfd_generic_link_add_one_symbol
- (info, abfd, "_GLOBAL_OFFSET_TABLE_", BSF_GLOBAL, s,
- bed->got_symbol_offset, (const char *) NULL, false,
- bed->collect, (struct bfd_link_hash_entry **) &h)))
- return false;
- h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
- h->type = STT_OBJECT;
+ if (bed->want_got_sym)
+ {
+ /* Define the symbol _GLOBAL_OFFSET_TABLE_ at the start of the .got
+ (or .got.plt) section. We don't do this in the linker script
+ because we don't want to define the symbol if we are not creating
+ a global offset table. */
+ h = NULL;
+ if (!(_bfd_generic_link_add_one_symbol
+ (info, abfd, "_GLOBAL_OFFSET_TABLE_", BSF_GLOBAL, s,
+ bed->got_symbol_offset, (const char *) NULL, false,
+ bed->collect, (struct bfd_link_hash_entry **) &h)))
+ return false;
+ h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
+ h->type = STT_OBJECT;
- if (info->shared
- && ! _bfd_elf_link_record_dynamic_symbol (info, h))
- return false;
+ if (info->shared
+ && ! _bfd_elf_link_record_dynamic_symbol (info, h))
+ return false;
- elf_hash_table (info)->hgot = h;
+ elf_hash_table (info)->hgot = h;
+ }
/* The first bit of the global offset table is the header. */
s->_raw_size += bed->got_header_size + bed->got_symbol_offset;
@@ -134,7 +137,7 @@ _bfd_elf_create_dynamic_sections (abfd, info)
pltflags = flags;
pltflags |= SEC_CODE;
if (bed->plt_not_loaded)
- pltflags &= ~ (SEC_LOAD | SEC_HAS_CONTENTS);
+ pltflags &= ~ (SEC_CODE | SEC_LOAD | SEC_HAS_CONTENTS);
if (bed->plt_readonly)
pltflags |= SEC_READONLY;
@@ -227,7 +230,7 @@ _bfd_elf_link_record_dynamic_symbol (info, h)
{
if (h->dynindx == -1)
{
- struct bfd_strtab_hash *dynstr;
+ struct elf_strtab_hash *dynstr;
char *p, *alc;
const char *name;
boolean copy;
@@ -259,7 +262,7 @@ _bfd_elf_link_record_dynamic_symbol (info, h)
if (dynstr == NULL)
{
/* Create a strtab to hold the dynamic symbol names. */
- elf_hash_table (info)->dynstr = dynstr = _bfd_elf_stringtab_init ();
+ elf_hash_table (info)->dynstr = dynstr = _bfd_elf_strtab_init ();
if (dynstr == NULL)
return false;
}
@@ -275,16 +278,16 @@ _bfd_elf_link_record_dynamic_symbol (info, h)
}
else
{
- alc = bfd_malloc (p - name + 1);
+ alc = bfd_malloc ((bfd_size_type) (p - name + 1));
if (alc == NULL)
return false;
- strncpy (alc, name, p - name);
+ strncpy (alc, name, (size_t) (p - name));
alc[p - name] = '\0';
name = alc;
copy = true;
}
- indx = _bfd_stringtab_add (dynstr, name, true, copy);
+ indx = _bfd_elf_strtab_add (dynstr, name, copy);
if (alc != NULL)
free (alc);
@@ -394,9 +397,9 @@ _bfd_elf_create_linker_section (abfd, info, which, defaults)
if (!lsect)
{
asection *s;
+ bfd_size_type amt = sizeof (elf_linker_section_t);
- lsect = (elf_linker_section_t *)
- bfd_alloc (dynobj, sizeof (elf_linker_section_t));
+ lsect = (elf_linker_section_t *) bfd_alloc (dynobj, amt);
*lsect = *defaults;
elf_linker_section (dynobj, which) = lsect;
@@ -428,10 +431,10 @@ _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 too large to add hole of %ld bytes"),
bfd_get_filename (abfd),
lsect->name,
- (long)lsect->hole_size);
+ (long) lsect->hole_size);
bfd_set_error (bfd_error_bad_value);
return (elf_linker_section_t *)0;
@@ -503,7 +506,7 @@ _bfd_elf_create_linker_section (abfd, info, which, defaults)
elf_linker_section_pointers_t *
_bfd_elf_find_pointer_linker_section (linker_pointers, addend, which)
elf_linker_section_pointers_t *linker_pointers;
- bfd_signed_vma addend;
+ bfd_vma addend;
elf_linker_section_enum_t which;
{
for ( ; linker_pointers != NULL; linker_pointers = linker_pointers->next)
diff --git a/contrib/binutils/bfd/elfxx-ia64.c b/contrib/binutils/bfd/elfxx-ia64.c
index ee69168..7c4e139 100644
--- a/contrib/binutils/bfd/elfxx-ia64.c
+++ b/contrib/binutils/bfd/elfxx-ia64.c
@@ -1,5 +1,5 @@
/* IA-64 support for 64-bit ELF
- Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of BFD, the Binary File Descriptor library.
@@ -111,6 +111,10 @@ struct elfNN_ia64_local_hash_entry
{
struct bfd_hash_entry root;
struct elfNN_ia64_dyn_sym_info *info;
+
+ /* True if this hash entry's addends was translated for
+ SHF_MERGE optimization. */
+ unsigned sec_merge_done : 1;
};
struct elfNN_ia64_local_hash_table
@@ -138,6 +142,7 @@ struct elfNN_ia64_link_hash_table
asection *rel_pltoff_sec; /* dynamic relocation section for same */
bfd_size_type minplt_entries; /* number of minplt entries */
+ unsigned reltext : 1; /* are there relocs against readonly sections? */
struct elfNN_ia64_local_hash_table loc_hash_table;
};
@@ -158,9 +163,11 @@ static boolean elfNN_ia64_relax_section
PARAMS((bfd *abfd, asection *sec, struct bfd_link_info *link_info,
boolean *again));
static boolean is_unwind_section_name
- PARAMS ((const char *));
+ PARAMS ((bfd *abfd, const char *));
static boolean elfNN_ia64_section_from_shdr
PARAMS ((bfd *, ElfNN_Internal_Shdr *, char *));
+static boolean elfNN_ia64_section_flags
+ PARAMS ((flagword *, ElfNN_Internal_Shdr *));
static boolean elfNN_ia64_fake_sections
PARAMS ((bfd *abfd, ElfNN_Internal_Shdr *hdr, asection *sec));
static void elfNN_ia64_final_write_processing
@@ -169,8 +176,18 @@ static boolean elfNN_ia64_add_symbol_hook
PARAMS ((bfd *abfd, struct bfd_link_info *info, const Elf_Internal_Sym *sym,
const char **namep, flagword *flagsp, asection **secp,
bfd_vma *valp));
+static boolean elfNN_ia64_aix_vec
+ PARAMS ((const bfd_target *vec));
+static boolean elfNN_ia64_aix_add_symbol_hook
+ PARAMS ((bfd *abfd, struct bfd_link_info *info, const Elf_Internal_Sym *sym,
+ const char **namep, flagword *flagsp, asection **secp,
+ bfd_vma *valp));
+static boolean elfNN_ia64_aix_link_add_symbols
+ PARAMS ((bfd *abfd, struct bfd_link_info *info));
static int elfNN_ia64_additional_program_headers
PARAMS ((bfd *abfd));
+static boolean elfNN_ia64_modify_segment_map
+ PARAMS ((bfd *));
static boolean elfNN_ia64_is_local_label_name
PARAMS ((bfd *abfd, const char *name));
static boolean elfNN_ia64_dynamic_symbol_p
@@ -184,17 +201,28 @@ static struct bfd_hash_entry *elfNN_ia64_new_loc_hash_entry
static struct bfd_hash_entry *elfNN_ia64_new_elf_hash_entry
PARAMS ((struct bfd_hash_entry *entry, struct bfd_hash_table *table,
const char *string));
+static void elfNN_ia64_hash_copy_indirect
+ PARAMS ((struct elf_link_hash_entry *, struct elf_link_hash_entry *));
+static void elfNN_ia64_hash_hide_symbol
+ PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *, boolean));
static struct bfd_link_hash_table *elfNN_ia64_hash_table_create
PARAMS ((bfd *abfd));
static struct elfNN_ia64_local_hash_entry *elfNN_ia64_local_hash_lookup
PARAMS ((struct elfNN_ia64_local_hash_table *table, const char *string,
boolean create, boolean copy));
+static boolean elfNN_ia64_global_dyn_sym_thunk
+ PARAMS ((struct bfd_hash_entry *, PTR));
+static boolean elfNN_ia64_local_dyn_sym_thunk
+ PARAMS ((struct bfd_hash_entry *, PTR));
static void elfNN_ia64_dyn_sym_traverse
PARAMS ((struct elfNN_ia64_link_hash_table *ia64_info,
boolean (*func) (struct elfNN_ia64_dyn_sym_info *, PTR),
PTR info));
static boolean elfNN_ia64_create_dynamic_sections
PARAMS ((bfd *abfd, struct bfd_link_info *info));
+static struct elfNN_ia64_local_hash_entry * get_local_sym_hash
+ PARAMS ((struct elfNN_ia64_link_hash_table *ia64_info,
+ bfd *abfd, const Elf_Internal_Rela *rel, boolean create));
static struct elfNN_ia64_dyn_sym_info * get_dyn_sym_info
PARAMS ((struct elfNN_ia64_link_hash_table *ia64_info,
struct elf_link_hash_entry *h,
@@ -219,7 +247,7 @@ static boolean elfNN_ia64_check_relocs
const Elf_Internal_Rela *relocs));
static boolean elfNN_ia64_adjust_dynamic_symbol
PARAMS ((struct bfd_link_info *info, struct elf_link_hash_entry *h));
-static unsigned long global_sym_index
+static long global_sym_index
PARAMS ((struct elf_link_hash_entry *h));
static boolean allocate_fptr
PARAMS ((struct elfNN_ia64_dyn_sym_info *dyn_i, PTR data));
@@ -257,6 +285,8 @@ static bfd_vma set_pltoff_entry
PARAMS ((bfd *abfd, struct bfd_link_info *info,
struct elfNN_ia64_dyn_sym_info *dyn_i,
bfd_vma value, boolean));
+static int elfNN_ia64_unwind_entry_compare
+ PARAMS ((const PTR, const PTR));
static boolean elfNN_ia64_final_link
PARAMS ((bfd *abfd, struct bfd_link_info *info));
static boolean elfNN_ia64_relocate_section
@@ -271,12 +301,18 @@ static boolean elfNN_ia64_finish_dynamic_sections
PARAMS ((bfd *abfd, struct bfd_link_info *info));
static boolean elfNN_ia64_set_private_flags
PARAMS ((bfd *abfd, flagword flags));
-static boolean elfNN_ia64_copy_private_bfd_data
- PARAMS ((bfd *ibfd, bfd *obfd));
static boolean elfNN_ia64_merge_private_bfd_data
PARAMS ((bfd *ibfd, bfd *obfd));
static boolean elfNN_ia64_print_private_bfd_data
PARAMS ((bfd *abfd, PTR ptr));
+static enum elf_reloc_type_class elfNN_ia64_reloc_type_class
+ PARAMS ((const Elf_Internal_Rela *));
+static boolean elfNN_ia64_hpux_vec
+ PARAMS ((const bfd_target *vec));
+static void elfNN_hpux_post_process_headers
+ PARAMS ((bfd *abfd, struct bfd_link_info *info));
+boolean elfNN_hpux_backend_section_from_bfd_section
+ PARAMS ((bfd *abfd, asection *sec, int *retval));
/* ia64-specific relocation */
@@ -352,6 +388,8 @@ static reloc_howto_type ia64_howto_table[] =
IA64_HOWTO (R_IA64_LTOFF_FPTR22, "LTOFF_FPTR22", 0, false, true),
IA64_HOWTO (R_IA64_LTOFF_FPTR64I, "LTOFF_FPTR64I", 0, false, true),
+ IA64_HOWTO (R_IA64_LTOFF_FPTR32MSB, "LTOFF_FPTR32MSB", 2, false, true),
+ IA64_HOWTO (R_IA64_LTOFF_FPTR32LSB, "LTOFF_FPTR32LSB", 2, false, true),
IA64_HOWTO (R_IA64_LTOFF_FPTR64MSB, "LTOFF_FPTR64MSB", 4, false, true),
IA64_HOWTO (R_IA64_LTOFF_FPTR64LSB, "LTOFF_FPTR64LSB", 4, false, true),
@@ -472,6 +510,8 @@ elfNN_ia64_reloc_type_lookup (abfd, bfd_code)
case BFD_RELOC_IA64_LTOFF_FPTR22: rtype = R_IA64_LTOFF_FPTR22; break;
case BFD_RELOC_IA64_LTOFF_FPTR64I: rtype = R_IA64_LTOFF_FPTR64I; break;
+ case BFD_RELOC_IA64_LTOFF_FPTR32MSB: rtype = R_IA64_LTOFF_FPTR32MSB; break;
+ case BFD_RELOC_IA64_LTOFF_FPTR32LSB: rtype = R_IA64_LTOFF_FPTR32LSB; break;
case BFD_RELOC_IA64_LTOFF_FPTR64MSB: rtype = R_IA64_LTOFF_FPTR64MSB; break;
case BFD_RELOC_IA64_LTOFF_FPTR64LSB: rtype = R_IA64_LTOFF_FPTR64LSB; break;
@@ -519,7 +559,8 @@ elfNN_ia64_info_to_howto (abfd, bfd_reloc, elf_reloc)
arelent *bfd_reloc;
ElfNN_Internal_Rela *elf_reloc;
{
- bfd_reloc->howto = lookup_howto (ELFNN_R_TYPE (elf_reloc->r_info));
+ bfd_reloc->howto
+ = lookup_howto ((unsigned int) ELFNN_R_TYPE (elf_reloc->r_info));
}
#define PLT_HEADER_SIZE (3 * 16)
@@ -558,6 +599,9 @@ static const bfd_byte plt_full_entry[PLT_FULL_ENTRY_SIZE] =
};
#define ELF_DYNAMIC_INTERPRETER "/usr/lib/ld.so.1"
+#define AIX_DYNAMIC_INTERPRETER "/usr/lib/ia64l64/libc.so.1"
+#define DYNAMIC_INTERPRETER(abfd) \
+ (elfNN_ia64_aix_vec (abfd->xvec) ? AIX_DYNAMIC_INTERPRETER : ELF_DYNAMIC_INTERPRETER)
/* Select out of range branch fixup type. Note that Itanium does
not support brl, and so it gets emulated by the kernel. */
@@ -604,6 +648,7 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
};
Elf_Internal_Shdr *symtab_hdr;
+ Elf_Internal_Shdr *shndx_hdr;
Elf_Internal_Rela *internal_relocs;
Elf_Internal_Rela *free_relocs = NULL;
Elf_Internal_Rela *irel, *irelend;
@@ -611,6 +656,7 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
bfd_byte *free_contents = NULL;
ElfNN_External_Sym *extsyms;
ElfNN_External_Sym *free_extsyms = NULL;
+ Elf_External_Sym_Shndx *shndx_buf = NULL;
struct elfNN_ia64_link_hash_table *ia64_info;
struct one_fixup *fixups = NULL;
boolean changed_contents = false;
@@ -672,18 +718,34 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
goto error_return;
}
- /* Read this BFD's symbols. */
+ /* Read this BFD's local symbols. */
if (symtab_hdr->contents != NULL)
extsyms = (ElfNN_External_Sym *) symtab_hdr->contents;
else
{
- extsyms = (ElfNN_External_Sym *) bfd_malloc (symtab_hdr->sh_size);
+ bfd_size_type amt;
+
+ amt = symtab_hdr->sh_info * sizeof (ElfNN_External_Sym);
+ extsyms = (ElfNN_External_Sym *) bfd_malloc (amt);
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))
+ || bfd_bread (extsyms, amt, abfd) != amt)
+ goto error_return;
+ }
+
+ shndx_hdr = &elf_tdata (abfd)->symtab_shndx_hdr;
+ if (shndx_hdr->sh_size != 0)
+ {
+ bfd_size_type amt;
+
+ amt = symtab_hdr->sh_info * sizeof (Elf_External_Sym_Shndx);
+ shndx_buf = (Elf_External_Sym_Shndx *) bfd_malloc (amt);
+ if (shndx_buf == NULL)
+ goto error_return;
+ if (bfd_seek (abfd, shndx_hdr->sh_offset, SEEK_SET) != 0
+ || bfd_bread (shndx_buf, amt, abfd) != amt)
goto error_return;
}
@@ -693,6 +755,7 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
Elf_Internal_Sym isym;
asection *tsec;
struct one_fixup *f;
+ bfd_size_type amt;
if (ELFNN_R_TYPE (irel->r_info) != (int) R_IA64_PCREL21B)
continue;
@@ -700,20 +763,23 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
/* Get the value of the symbol referred to by the reloc. */
if (ELFNN_R_SYM (irel->r_info) < symtab_hdr->sh_info)
{
+ ElfNN_External_Sym *esym;
+ Elf_External_Sym_Shndx *shndx;
+
/* A local symbol. */
- bfd_elfNN_swap_symbol_in (abfd,
- extsyms + ELFNN_R_SYM (irel->r_info),
- &isym);
+ esym = extsyms + ELFNN_R_SYM (irel->r_info);
+ shndx = shndx_buf + (shndx_buf ? ELFNN_R_SYM (irel->r_info) : 0);
+ bfd_elfNN_swap_symbol_in (abfd, esym, shndx, &isym);
if (isym.st_shndx == SHN_UNDEF)
continue; /* We can't do anthing with undefined symbols. */
else if (isym.st_shndx == SHN_ABS)
tsec = bfd_abs_section_ptr;
else if (isym.st_shndx == SHN_COMMON)
tsec = bfd_com_section_ptr;
- else if (isym.st_shndx > 0 && isym.st_shndx < SHN_LORESERVE)
- tsec = bfd_section_from_elf_index (abfd, isym.st_shndx);
+ else if (isym.st_shndx == SHN_IA_64_ANSI_COMMON)
+ tsec = bfd_com_section_ptr;
else
- continue; /* who knows. */
+ tsec = bfd_section_from_elf_index (abfd, isym.st_shndx);
toff = isym.st_value;
}
@@ -760,7 +826,7 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
roff = irel->r_offset;
reladdr = (sec->output_section->vma
+ sec->output_offset
- + roff) & -4;
+ + roff) & (bfd_vma) -4;
/* If the branch is in range, no need to do anything. */
if ((bfd_signed_vma) (symaddr - reladdr) >= -0x1000000
@@ -784,7 +850,7 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
make a copy of the FULL_PLT entry. Otherwise, we'll have
to use a `brl' insn to get where we're going. */
- int size;
+ size_t size;
if (tsec == ia64_info->plt_sec)
size = sizeof (plt_full_entry);
@@ -798,11 +864,12 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
}
/* Resize the current section to make room for the new branch. */
- trampoff = (sec->_cooked_size + 15) & -16;
- contents = (bfd_byte *) bfd_realloc (contents, trampoff + size);
+ trampoff = (sec->_cooked_size + 15) & (bfd_vma) -16;
+ amt = trampoff + size;
+ contents = (bfd_byte *) bfd_realloc (contents, amt);
if (contents == NULL)
goto error_return;
- sec->_cooked_size = trampoff + size;
+ sec->_cooked_size = amt;
if (tsec == ia64_info->plt_sec)
{
@@ -830,7 +897,7 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
}
/* Record the fixup so we don't do it again this section. */
- f = (struct one_fixup *) bfd_malloc (sizeof (*f));
+ f = (struct one_fixup *) bfd_malloc ((bfd_size_type) sizeof (*f));
f->next = fixups;
f->tsec = tsec;
f->toff = toff;
@@ -846,7 +913,7 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
/* Fix up the existing branch to hit the trampoline. Hope like
hell this doesn't overflow too. */
if (elfNN_ia64_install_value (abfd, contents + roff,
- f->trampoff - (roff & -4),
+ f->trampoff - (roff & (bfd_vma) -4),
R_IA64_PCREL21B) != bfd_reloc_ok)
goto error_return;
@@ -880,6 +947,9 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
}
}
+ if (shndx_buf != NULL)
+ free (shndx_buf);
+
if (free_extsyms != NULL)
{
if (! link_info->keep_memory)
@@ -887,7 +957,7 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
else
{
/* Cache the symbols for elf_link_input_bfd. */
- symtab_hdr->contents = extsyms;
+ symtab_hdr->contents = (unsigned char *) extsyms;
}
}
@@ -899,6 +969,8 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
free (free_relocs);
if (free_contents != NULL)
free (free_contents);
+ if (shndx_buf != NULL)
+ free (shndx_buf);
if (free_extsyms != NULL)
free (free_extsyms);
return false;
@@ -907,11 +979,16 @@ elfNN_ia64_relax_section (abfd, sec, link_info, again)
/* Return true if NAME is an unwind table section name. */
static inline boolean
-is_unwind_section_name (name)
+is_unwind_section_name (abfd, name)
+ bfd *abfd;
const char *name;
{
size_t len1, len2, len3;
+ if (elfNN_ia64_hpux_vec (abfd->xvec)
+ && !strcmp (name, ELF_STRING_ia64_unwind_hdr))
+ return false;
+
len1 = sizeof (ELF_STRING_ia64_unwind) - 1;
len2 = sizeof (ELF_STRING_ia64_unwind_info) - 1;
len3 = sizeof (ELF_STRING_ia64_unwind_once) - 1;
@@ -939,6 +1016,10 @@ elfNN_ia64_section_from_shdr (abfd, hdr, name)
switch (hdr->sh_type)
{
case SHT_IA_64_UNWIND:
+ case SHT_INIT_ARRAY:
+ case SHT_FINI_ARRAY:
+ case SHT_PREINIT_ARRAY:
+ case SHT_IA_64_HP_OPT_ANOT:
break;
case SHT_IA_64_EXT:
@@ -986,7 +1067,7 @@ elfNN_ia64_fake_sections (abfd, hdr, sec)
name = bfd_get_section_name (abfd, sec);
- if (is_unwind_section_name (name))
+ if (is_unwind_section_name (abfd, name))
{
/* We don't have the sections numbered at this point, so sh_info
is set later, in elfNN_ia64_final_write_processing. */
@@ -995,6 +1076,14 @@ elfNN_ia64_fake_sections (abfd, hdr, sec)
}
else if (strcmp (name, ELF_STRING_ia64_archext) == 0)
hdr->sh_type = SHT_IA_64_EXT;
+ else if (strcmp (name, ".init_array") == 0)
+ hdr->sh_type = SHT_INIT_ARRAY;
+ else if (strcmp (name, ".fini_array") == 0)
+ hdr->sh_type = SHT_FINI_ARRAY;
+ else if (strcmp (name, ".preinit_array") == 0)
+ hdr->sh_type = SHT_PREINIT_ARRAY;
+ else if (strcmp (name, ".HP.opt_annot") == 0)
+ hdr->sh_type = SHT_IA_64_HP_OPT_ANOT;
else if (strcmp (name, ".reloc") == 0)
/*
* This is an ugly, but unfortunately necessary hack that is
@@ -1062,11 +1151,29 @@ elfNN_ia64_final_write_processing (abfd, linker)
{
/* .gnu.linkonce.ia64unw.FOO -> .gnu.linkonce.t.FOO */
size_t len2 = sizeof (".gnu.linkonce.t.") - 1;
- char *once_name = alloca (len2 + strlen (sname) - len + 1);
+ char *once_name = bfd_malloc (len2 + strlen (sname + len) + 1);
- memcpy (once_name, ".gnu.linkonce.t.", len2);
- strcpy (once_name + len2, sname + len);
- text_sect = bfd_get_section_by_name (abfd, once_name);
+ if (once_name != NULL)
+ {
+ memcpy (once_name, ".gnu.linkonce.t.", len2);
+ strcpy (once_name + len2, sname + len);
+ text_sect = bfd_get_section_by_name (abfd, once_name);
+ free (once_name);
+ }
+ else
+ /* Should only happen if we run out of memory, in
+ which case we're probably toast anyway. Try to
+ cope by finding the section the slow way. */
+ for (text_sect = abfd->sections;
+ text_sect != NULL;
+ text_sect = text_sect->next)
+ {
+ if (strncmp (bfd_section_name (abfd, text_sect),
+ ".gnu.linkonce.t.", len2) == 0
+ && strcmp (bfd_section_name (abfd, text_sect) + len2,
+ sname + len) == 0)
+ break;
+ }
}
else
/* last resort: fall back on .text */
@@ -1101,7 +1208,7 @@ elfNN_ia64_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
{
if (sym->st_shndx == SHN_COMMON
&& !info->relocateable
- && sym->st_size <= (unsigned) bfd_get_gp_size (abfd))
+ && sym->st_size <= elf_gp_size (abfd))
{
/* Common symbols less than or equal to -G nn bytes are
automatically put into .sbss. */
@@ -1125,6 +1232,112 @@ elfNN_ia64_add_symbol_hook (abfd, info, sym, namep, flagsp, secp, valp)
return true;
}
+static boolean
+elfNN_ia64_aix_vec (const bfd_target *vec)
+{
+ extern const bfd_target bfd_elfNN_ia64_aix_little_vec;
+ extern const bfd_target bfd_elfNN_ia64_aix_big_vec;
+
+ return (/**/vec == & bfd_elfNN_ia64_aix_little_vec
+ || vec == & bfd_elfNN_ia64_aix_big_vec);
+}
+
+/* Hook called by the linker routine which adds symbols from an object
+ file. We use it to handle OS-specific symbols. */
+
+static boolean
+elfNN_ia64_aix_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;
+{
+ if (strcmp (*namep, "__GLOB_DATA_PTR") == 0)
+ {
+ /* Define __GLOB_DATA_PTR when it is encountered. This is expected to
+ be a linker-defined symbol by the Aix C runtime startup code. IBM sez
+ no one else should use it b/c it is undocumented. */
+ struct elf_link_hash_entry *h;
+
+ h = elf_link_hash_lookup (elf_hash_table (info), *namep,
+ false, false, false);
+ if (h == NULL)
+ {
+ struct elf_backend_data *bed;
+ struct elfNN_ia64_link_hash_table *ia64_info;
+
+ bed = get_elf_backend_data (abfd);
+ ia64_info = elfNN_ia64_hash_table (info);
+
+ if (!(_bfd_generic_link_add_one_symbol
+ (info, abfd, *namep, BSF_GLOBAL,
+ bfd_get_section_by_name (abfd, ".bss"),
+ bed->got_symbol_offset, (const char *) NULL, false,
+ bed->collect, (struct bfd_link_hash_entry **) &h)))
+ return false;
+
+ h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
+ h->type = STT_OBJECT;
+
+ if (! _bfd_elf_link_record_dynamic_symbol (info, h))
+ return false;
+ }
+
+ return true;
+ }
+ else if (sym->st_shndx == SHN_LOOS)
+ {
+ unsigned int i;
+
+ /* SHN_AIX_SYSCALL: Treat this as any other symbol. The special symbol
+ is only relevant when compiling code for extended system calls.
+ Replace the "special" section with .text, if possible.
+ Note that these symbols are always assumed to be in .text. */
+ for (i = 1; i < elf_numsections (abfd); i++)
+ {
+ asection * sec = bfd_section_from_elf_index (abfd, i);
+
+ if (sec && strcmp (sec->name, ".text") == 0)
+ {
+ *secp = sec;
+ break;
+ }
+ }
+
+ if (*secp == NULL)
+ *secp = bfd_abs_section_ptr;
+
+ *valp = sym->st_size;
+
+ return true;
+ }
+ else
+ {
+ return elfNN_ia64_add_symbol_hook (abfd, info, sym,
+ namep, flagsp, secp, valp);
+ }
+}
+
+boolean
+elfNN_ia64_aix_link_add_symbols (abfd, info)
+ bfd *abfd;
+ struct bfd_link_info *info;
+{
+ /* Make sure dynamic sections are always created. */
+ if (! elf_hash_table (info)->dynamic_sections_created
+ && abfd->xvec == info->hash->creator)
+ {
+ if (! bfd_elfNN_link_create_dynamic_sections (abfd, info))
+ return false;
+ }
+
+ /* Now do the standard call. */
+ return bfd_elfNN_bfd_link_add_symbols (abfd, info);
+}
+
/* Return the number of additional phdrs we will need. */
static int
@@ -1141,7 +1354,7 @@ elfNN_ia64_additional_program_headers (abfd)
/* Count how many PT_IA_64_UNWIND segments we need. */
for (s = abfd->sections; s; s = s->next)
- if (is_unwind_section_name(s->name) && (s->flags & SEC_LOAD))
+ if (is_unwind_section_name (abfd, s->name) && (s->flags & SEC_LOAD))
++ret;
return ret;
@@ -1154,6 +1367,8 @@ elfNN_ia64_modify_segment_map (abfd)
struct elf_segment_map *m, **pm;
Elf_Internal_Shdr *hdr;
asection *s;
+ boolean unwind_found;
+ asection *unwind_sec;
/* If we need a PT_IA_64_ARCHEXT segment, it must come before
all PT_LOAD segments. */
@@ -1165,7 +1380,8 @@ elfNN_ia64_modify_segment_map (abfd)
break;
if (m == NULL)
{
- m = (struct elf_segment_map *) bfd_zalloc (abfd, sizeof *m);
+ m = ((struct elf_segment_map *)
+ bfd_zalloc (abfd, (bfd_size_type) sizeof *m));
if (m == NULL)
return false;
@@ -1195,12 +1411,29 @@ elfNN_ia64_modify_segment_map (abfd)
if (s && (s->flags & SEC_LOAD))
{
for (m = elf_tdata (abfd)->segment_map; m != NULL; m = m->next)
- if (m->p_type == PT_IA_64_UNWIND && m->sections[0] == s)
- break;
+ if (m->p_type == PT_IA_64_UNWIND)
+ {
+ /* Look through all sections in the unwind segment
+ for a match since there may be multiple sections
+ to a segment. */
+
+ unwind_sec = m->sections[0];
+ unwind_found = false;
+ while (unwind_sec != NULL && !unwind_found)
+ {
+ if (unwind_sec == s)
+ unwind_found = true;
+ else
+ unwind_sec = unwind_sec -> next;
+ }
+ if (unwind_found)
+ break;
+ }
if (m == NULL)
{
- m = (struct elf_segment_map *) bfd_zalloc (abfd, sizeof *m);
+ m = ((struct elf_segment_map *)
+ bfd_zalloc (abfd, (bfd_size_type) sizeof *m));
if (m == NULL)
return false;
@@ -1287,7 +1520,7 @@ elfNN_ia64_dynamic_symbol_p (h, info)
|| h->root.type == bfd_link_hash_defweak)
return true;
- if ((info->shared && !info->symbolic)
+ if ((info->shared && (!info->symbolic || info->allow_shlib_undefined))
|| ((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)))
@@ -1369,8 +1602,8 @@ elfNN_ia64_hash_copy_indirect (xdir, xind)
{
struct elfNN_ia64_link_hash_entry *dir, *ind;
- dir = (struct elfNN_ia64_link_hash_entry *)xdir;
- ind = (struct elfNN_ia64_link_hash_entry *)xind;
+ dir = (struct elfNN_ia64_link_hash_entry *) xdir;
+ ind = (struct elfNN_ia64_link_hash_entry *) xind;
/* Copy down any references that we may have already seen to the
symbol which just became indirect. */
@@ -1381,6 +1614,9 @@ elfNN_ia64_hash_copy_indirect (xdir, xind)
| ELF_LINK_HASH_REF_REGULAR
| ELF_LINK_HASH_REF_REGULAR_NONWEAK));
+ if (ind->root.root.type != bfd_link_hash_indirect)
+ return;
+
/* Copy over the got and plt data. This would have been done
by check_relocs. */
@@ -1410,18 +1646,17 @@ elfNN_ia64_hash_copy_indirect (xdir, xind)
}
static void
-elfNN_ia64_hash_hide_symbol (info, xh)
- struct bfd_link_info *info ATTRIBUTE_UNUSED;
+elfNN_ia64_hash_hide_symbol (info, xh, force_local)
+ struct bfd_link_info *info;
struct elf_link_hash_entry *xh;
+ boolean force_local;
{
struct elfNN_ia64_link_hash_entry *h;
struct elfNN_ia64_dyn_sym_info *dyn_i;
h = (struct elfNN_ia64_link_hash_entry *)xh;
- h->root.elf_link_hash_flags &= ~ELF_LINK_HASH_NEEDS_PLT;
- if ((h->root.elf_link_hash_flags & ELF_LINK_FORCED_LOCAL) != 0)
- h->root.dynindx = -1;
+ _bfd_elf_link_hash_hide_symbol (info, &h->root, force_local);
for (dyn_i = h->info; dyn_i; dyn_i = dyn_i->next)
dyn_i->want_plt2 = 0;
@@ -1437,7 +1672,7 @@ elfNN_ia64_hash_table_create (abfd)
{
struct elfNN_ia64_link_hash_table *ret;
- ret = bfd_zalloc (abfd, sizeof (*ret));
+ ret = bfd_zalloc (abfd, (bfd_size_type) sizeof (*ret));
if (!ret)
return 0;
if (!_bfd_elf_link_hash_table_init (&ret->root, abfd,
@@ -1573,6 +1808,37 @@ elfNN_ia64_create_dynamic_sections (abfd, info)
return true;
}
+/* Find and/or create a hash entry for local symbol. */
+static struct elfNN_ia64_local_hash_entry *
+get_local_sym_hash (ia64_info, abfd, rel, create)
+ struct elfNN_ia64_link_hash_table *ia64_info;
+ bfd *abfd;
+ const Elf_Internal_Rela *rel;
+ boolean create;
+{
+ char *addr_name;
+ size_t len;
+ struct elfNN_ia64_local_hash_entry *ret;
+
+ /* Construct a string for use in the elfNN_ia64_local_hash_table.
+ name describes what was once anonymous memory. */
+
+ len = sizeof (void*)*2 + 1 + sizeof (bfd_vma)*4 + 1 + 1;
+ len += 10; /* %p slop */
+
+ addr_name = bfd_malloc (len);
+ if (addr_name == NULL)
+ return 0;
+ sprintf (addr_name, "%p:%lx",
+ (void *) abfd, (unsigned long) ELFNN_R_SYM (rel->r_info));
+
+ /* Collect the canonical entry data for this address. */
+ ret = elfNN_ia64_local_hash_lookup (&ia64_info->loc_hash_table,
+ addr_name, create, create);
+ free (addr_name);
+ return ret;
+}
+
/* Find and/or create a descriptor for dynamic symbol info. This will
vary based on global or local symbol, and the addend to the reloc. */
@@ -1593,21 +1859,8 @@ get_dyn_sym_info (ia64_info, h, abfd, rel, create)
else
{
struct elfNN_ia64_local_hash_entry *loc_h;
- char *addr_name;
- size_t len;
-
- /* Construct a string for use in the elfNN_ia64_local_hash_table.
- The name describes what was once anonymous memory. */
- len = sizeof (void*)*2 + 1 + sizeof (bfd_vma)*4 + 1 + 1;
- len += 10; /* %p slop */
-
- addr_name = alloca (len);
- sprintf (addr_name, "%p:%lx", (void *) abfd, ELFNN_R_SYM (rel->r_info));
-
- /* Collect the canonical entry data for this address. */
- loc_h = elfNN_ia64_local_hash_lookup (&ia64_info->loc_hash_table,
- addr_name, create, create);
+ loc_h = get_local_sym_hash (ia64_info, abfd, rel, create);
BFD_ASSERT (loc_h);
pp = &loc_h->info;
@@ -1618,8 +1871,8 @@ get_dyn_sym_info (ia64_info, h, abfd, rel, create)
if (dyn_i == NULL && create)
{
- dyn_i = (struct elfNN_ia64_dyn_sym_info *)
- bfd_zalloc (abfd, sizeof *dyn_i);
+ dyn_i = ((struct elfNN_ia64_dyn_sym_info *)
+ bfd_zalloc (abfd, (bfd_size_type) sizeof *dyn_i));
*pp = dyn_i;
dyn_i->addend = addend;
}
@@ -1781,6 +2034,9 @@ get_reloc_section (abfd, ia64_info, sec, create)
return NULL;
}
+ if (sec->flags & SEC_READONLY)
+ ia64_info->reltext = 1;
+
return srel;
}
@@ -1799,8 +2055,8 @@ count_dyn_reloc (abfd, dyn_i, srel, type)
if (!rent)
{
- rent = (struct elfNN_ia64_dyn_reloc_entry *)
- bfd_alloc (abfd, sizeof (*rent));
+ rent = ((struct elfNN_ia64_dyn_reloc_entry *)
+ bfd_alloc (abfd, (bfd_size_type) sizeof (*rent)));
if (!rent)
return false;
@@ -1874,9 +2130,11 @@ elfNN_ia64_check_relocs (abfd, info, sec, relocs)
have yet been processed. Do something with what we know, as
this may help reduce memory usage and processing time later. */
maybe_dynamic = false;
- if (h && ((info->shared && ! info->symbolic)
+ if (h && ((info->shared
+ && (!info->symbolic || info->allow_shlib_undefined))
|| ! (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR)
- || h->root.type == bfd_link_hash_defweak))
+ || h->root.type == bfd_link_hash_defweak
+ || elfNN_ia64_aix_vec (abfd->xvec)))
maybe_dynamic = true;
need_entry = 0;
@@ -1890,6 +2148,8 @@ elfNN_ia64_check_relocs (abfd, info, sec, relocs)
case R_IA64_LTOFF_FPTR22:
case R_IA64_LTOFF_FPTR64I:
+ case R_IA64_LTOFF_FPTR32MSB:
+ case R_IA64_LTOFF_FPTR32LSB:
case R_IA64_LTOFF_FPTR64MSB:
case R_IA64_LTOFF_FPTR64LSB:
need_entry = NEED_FPTR | NEED_GOT | NEED_LTOFF_FPTR;
@@ -1900,7 +2160,7 @@ elfNN_ia64_check_relocs (abfd, info, sec, relocs)
case R_IA64_FPTR32LSB:
case R_IA64_FPTR64MSB:
case R_IA64_FPTR64LSB:
- if (info->shared || h)
+ if (info->shared || h || elfNN_ia64_aix_vec (abfd->xvec))
need_entry = NEED_FPTR | NEED_DYNREL;
else
need_entry = NEED_FPTR;
@@ -1927,7 +2187,7 @@ elfNN_ia64_check_relocs (abfd, info, sec, relocs)
{
(*info->callbacks->warning)
(info, _("@pltoff reloc against local symbol"), 0,
- abfd, 0, 0);
+ abfd, 0, (bfd_vma) 0);
}
break;
@@ -1949,7 +2209,10 @@ elfNN_ia64_check_relocs (abfd, info, sec, relocs)
case R_IA64_DIR64MSB:
case R_IA64_DIR64LSB:
/* Shared objects will always need at least a REL relocation. */
- if (info->shared || maybe_dynamic)
+ if (info->shared || maybe_dynamic
+ || (elfNN_ia64_aix_vec (abfd->xvec)
+ && (!h || strcmp (h->root.root.string,
+ "__GLOB_DATA_PTR") != 0)))
need_entry = NEED_DYNREL;
dynrel_type = R_IA64_DIR64LSB;
break;
@@ -1982,7 +2245,7 @@ elfNN_ia64_check_relocs (abfd, info, sec, relocs)
{
(*info->callbacks->warning)
(info, _("non-zero addend in @fptr reloc"), 0,
- abfd, 0, 0);
+ abfd, 0, (bfd_vma) 0);
}
dyn_i = get_dyn_sym_info (ia64_info, h, abfd, rel, true);
@@ -2013,10 +2276,12 @@ elfNN_ia64_check_relocs (abfd, info, sec, relocs)
/* FPTRs for shared libraries are allocated by the dynamic
linker. Make sure this local symbol will appear in the
dynamic symbol table. */
- if (!h && info->shared)
+ if (!h && (info->shared
+ /* AIX also needs one */
+ || elfNN_ia64_aix_vec (abfd->xvec)))
{
if (! (_bfd_elfNN_link_record_local_dynamic_symbol
- (info, abfd, r_symndx)))
+ (info, abfd, (long) r_symndx)))
return false;
}
@@ -2069,7 +2334,10 @@ allocate_global_data_got (dyn_i, data)
if (dyn_i->want_got
&& ! dyn_i->want_fptr
- && elfNN_ia64_dynamic_symbol_p (dyn_i->h, x->info))
+ && (elfNN_ia64_dynamic_symbol_p (dyn_i->h, x->info)
+ || (elfNN_ia64_aix_vec (x->info->hash->creator)
+ && (!dyn_i->h || strcmp (dyn_i->h->root.root.string,
+ "__GLOB_DATA_PTR") != 0))))
{
dyn_i->got_offset = x->ofs;
x->ofs += 8;
@@ -2088,7 +2356,8 @@ allocate_global_fptr_got (dyn_i, data)
if (dyn_i->want_got
&& dyn_i->want_fptr
- && elfNN_ia64_dynamic_symbol_p (dyn_i->h, x->info))
+ && (elfNN_ia64_dynamic_symbol_p (dyn_i->h, x->info)
+ || elfNN_ia64_aix_vec (x->info->hash->creator)))
{
dyn_i->got_offset = x->ofs;
x->ofs += 8;
@@ -2106,7 +2375,8 @@ allocate_local_got (dyn_i, data)
struct elfNN_ia64_allocate_data *x = (struct elfNN_ia64_allocate_data *)data;
if (dyn_i->want_got
- && ! elfNN_ia64_dynamic_symbol_p (dyn_i->h, x->info))
+ && ! (elfNN_ia64_dynamic_symbol_p (dyn_i->h, x->info)
+ || elfNN_ia64_aix_vec (x->info->hash->creator)))
{
dyn_i->got_offset = x->ofs;
x->ofs += 8;
@@ -2116,7 +2386,7 @@ allocate_local_got (dyn_i, data)
/* Search for the index of a global symbol in it's defining object file. */
-static unsigned long
+static long
global_sym_index (h)
struct elf_link_hash_entry *h;
{
@@ -2152,7 +2422,12 @@ allocate_fptr (dyn_i, data)
|| h->root.type == bfd_link_hash_warning)
h = (struct elf_link_hash_entry *) h->root.u.i.link;
- if (x->info->shared)
+ if (x->info->shared
+ /* AIX needs an FPTR in this case. */
+ || (elfNN_ia64_aix_vec (x->info->hash->creator)
+ && (!h
+ || h->root.type == bfd_link_hash_defined
+ || h->root.type == bfd_link_hash_defweak)))
{
if (h && h->dynindx == -1)
{
@@ -2275,7 +2550,11 @@ allocate_dynrel_entries (dyn_i, data)
boolean dynamic_symbol, shared;
ia64_info = elfNN_ia64_hash_table (x->info);
- dynamic_symbol = elfNN_ia64_dynamic_symbol_p (dyn_i->h, x->info);
+ dynamic_symbol = elfNN_ia64_dynamic_symbol_p (dyn_i->h, x->info)
+ || (elfNN_ia64_aix_vec (x->info->hash->creator)
+ /* Don't allocate an entry for __GLOB_DATA_PTR */
+ && (!dyn_i->h || strcmp (dyn_i->h->root.root.string,
+ "__GLOB_DATA_PTR") != 0));
shared = x->info->shared;
/* Take care of the normal data relocations. */
@@ -2378,7 +2657,6 @@ elfNN_ia64_size_dynamic_sections (output_bfd, info)
struct elfNN_ia64_link_hash_table *ia64_info;
asection *sec;
bfd *dynobj;
- boolean reltext = false;
boolean relplt = false;
dynobj = elf_hash_table(info)->dynobj;
@@ -2392,8 +2670,8 @@ elfNN_ia64_size_dynamic_sections (output_bfd, info)
{
sec = bfd_get_section_by_name (dynobj, ".interp");
BFD_ASSERT (sec != NULL);
- sec->contents = (bfd_byte *) ELF_DYNAMIC_INTERPRETER;
- sec->_raw_size = strlen (ELF_DYNAMIC_INTERPRETER) + 1;
+ sec->contents = (bfd_byte *) DYNAMIC_INTERPRETER (output_bfd);
+ sec->_raw_size = strlen (DYNAMIC_INTERPRETER (output_bfd)) + 1;
}
/* Allocate the GOT entries. */
@@ -2432,7 +2710,7 @@ elfNN_ia64_size_dynamic_sections (output_bfd, info)
}
/* Align the pointer for the plt2 entries. */
- data.ofs = (data.ofs + 31) & -32;
+ data.ofs = (data.ofs + 31) & (bfd_vma) -32;
elfNN_ia64_dyn_sym_traverse (ia64_info, allocate_plt2_entries, &data);
if (data.ofs != 0)
@@ -2535,24 +2813,6 @@ elfNN_ia64_size_dynamic_sections (output_bfd, info)
{
if (!strip)
{
- const char *outname;
- asection *target;
-
- /* 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,
- sec->output_section);
- if (outname[4] == 'a')
- outname += 5;
- else
- outname += 4;
-
- target = bfd_get_section_by_name (output_bfd, outname);
- 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. */
sec->reloc_count = 0;
@@ -2567,7 +2827,7 @@ elfNN_ia64_size_dynamic_sections (output_bfd, info)
else
{
/* Allocate memory for the section contents. */
- sec->contents = (bfd_byte *) bfd_zalloc(dynobj, sec->_raw_size);
+ sec->contents = (bfd_byte *) bfd_zalloc (dynobj, sec->_raw_size);
if (sec->contents == NULL && sec->_raw_size != 0)
return false;
}
@@ -2583,32 +2843,34 @@ elfNN_ia64_size_dynamic_sections (output_bfd, info)
{
/* The DT_DEBUG entry is filled in by the dynamic linker and used
by the debugger. */
- if (!bfd_elfNN_add_dynamic_entry (info, DT_DEBUG, 0))
+#define add_dynamic_entry(TAG, VAL) \
+ bfd_elfNN_add_dynamic_entry (info, (bfd_vma) (TAG), (bfd_vma) (VAL))
+
+ if (!add_dynamic_entry (DT_DEBUG, 0))
return false;
}
- if (! bfd_elfNN_add_dynamic_entry (info, DT_IA_64_PLT_RESERVE, 0))
+ if (!add_dynamic_entry (DT_IA_64_PLT_RESERVE, 0))
return false;
- if (! bfd_elfNN_add_dynamic_entry (info, DT_PLTGOT, 0))
+ if (!add_dynamic_entry (DT_PLTGOT, 0))
return false;
if (relplt)
{
- if (! bfd_elfNN_add_dynamic_entry (info, DT_PLTRELSZ, 0)
- || ! bfd_elfNN_add_dynamic_entry (info, DT_PLTREL, DT_RELA)
- || ! bfd_elfNN_add_dynamic_entry (info, DT_JMPREL, 0))
+ if (!add_dynamic_entry (DT_PLTRELSZ, 0)
+ || !add_dynamic_entry (DT_PLTREL, DT_RELA)
+ || !add_dynamic_entry (DT_JMPREL, 0))
return false;
}
- if (! bfd_elfNN_add_dynamic_entry (info, DT_RELA, 0)
- || ! bfd_elfNN_add_dynamic_entry (info, DT_RELASZ, 0)
- || ! bfd_elfNN_add_dynamic_entry (info, DT_RELAENT,
- sizeof (ElfNN_External_Rela)))
+ if (!add_dynamic_entry (DT_RELA, 0)
+ || !add_dynamic_entry (DT_RELASZ, 0)
+ || !add_dynamic_entry (DT_RELAENT, sizeof (ElfNN_External_Rela)))
return false;
- if (reltext)
+ if (ia64_info->reltext)
{
- if (! bfd_elfNN_add_dynamic_entry (info, DT_TEXTREL, 0))
+ if (!add_dynamic_entry (DT_TEXTREL, 0))
return false;
info->flags |= DF_TEXTREL;
}
@@ -2620,10 +2882,10 @@ elfNN_ia64_size_dynamic_sections (output_bfd, info)
}
static bfd_reloc_status_type
-elfNN_ia64_install_value (abfd, hit_addr, val, r_type)
+elfNN_ia64_install_value (abfd, hit_addr, v, r_type)
bfd *abfd;
bfd_byte *hit_addr;
- bfd_vma val;
+ bfd_vma v;
unsigned int r_type;
{
const struct ia64_operand *op;
@@ -2632,6 +2894,11 @@ elfNN_ia64_install_value (abfd, hit_addr, val, r_type)
enum ia64_opnd opnd;
const char *err;
size_t size = 8;
+#ifdef BFD_HOST_U_64_BIT
+ BFD_HOST_U_64_BIT val = (BFD_HOST_U_64_BIT) v;
+#else
+ bfd_vma val = v;
+#endif
opnd = IA64_OPND_NIL;
switch (r_type)
@@ -2678,6 +2945,7 @@ elfNN_ia64_install_value (abfd, hit_addr, val, r_type)
case R_IA64_GPREL32MSB:
case R_IA64_FPTR32MSB:
case R_IA64_PCREL32MSB:
+ case R_IA64_LTOFF_FPTR32MSB:
case R_IA64_SEGREL32MSB:
case R_IA64_SECREL32MSB:
case R_IA64_LTV32MSB:
@@ -2688,6 +2956,7 @@ elfNN_ia64_install_value (abfd, hit_addr, val, r_type)
case R_IA64_GPREL32LSB:
case R_IA64_FPTR32LSB:
case R_IA64_PCREL32LSB:
+ case R_IA64_LTOFF_FPTR32LSB:
case R_IA64_SEGREL32LSB:
case R_IA64_SECREL32LSB:
case R_IA64_LTV32LSB:
@@ -2791,7 +3060,7 @@ elfNN_ia64_install_value (abfd, hit_addr, val, r_type)
insn = (dword >> shift) & 0x1ffffffffffLL;
op = elf64_ia64_operands + opnd;
- err = (*op->insert) (op, val, &insn);
+ err = (*op->insert) (op, val, (ia64_insn *)& insn);
if (err)
return bfd_reloc_overflow;
@@ -2832,33 +3101,19 @@ elfNN_ia64_install_dyn_reloc (abfd, info, sec, srel, offset, type,
{
Elf_Internal_Rela outrel;
- outrel.r_offset = (sec->output_section->vma
- + sec->output_offset
- + offset);
+ offset += sec->output_section->vma + sec->output_offset;
BFD_ASSERT (dynindx != -1);
outrel.r_info = ELFNN_R_INFO (dynindx, type);
outrel.r_addend = addend;
-
- if (elf_section_data (sec)->stab_info != NULL)
+ outrel.r_offset = _bfd_elf_section_offset (abfd, info, sec, offset);
+ if (outrel.r_offset == (bfd_vma) -1)
{
- /* This may be NULL for linker-generated relocations, as it is
- inconvenient to pass all the bits around. And this shouldn't
- happen. */
- BFD_ASSERT (info != NULL);
-
- offset = (_bfd_stab_section_offset
- (abfd, &elf_hash_table (info)->stab_info, sec,
- &elf_section_data (sec)->stab_info, offset));
- if (offset == (bfd_vma) -1)
- {
- /* Run for the hills. We shouldn't be outputting a relocation
- for this. So do what everyone else does and output a no-op. */
- outrel.r_info = ELFNN_R_INFO (0, R_IA64_NONE);
- outrel.r_addend = 0;
- offset = 0;
- }
- outrel.r_offset = offset;
+ /* Run for the hills. We shouldn't be outputting a relocation
+ for this. So do what everyone else does and output a no-op. */
+ outrel.r_info = ELFNN_R_INFO (0, R_IA64_NONE);
+ outrel.r_addend = 0;
+ outrel.r_offset = 0;
}
bfd_elfNN_swap_reloca_out (abfd, &outrel,
@@ -2899,6 +3154,7 @@ set_got_entry (abfd, info, dyn_i, dynindx, addend, value, dyn_r_type)
/* Install a dynamic relocation if needed. */
if (info->shared
|| elfNN_ia64_dynamic_symbol_p (dyn_i->h, info)
+ || elfNN_ia64_aix_vec (abfd->xvec)
|| (dynindx != -1 && dyn_r_type == R_IA64_FPTR64LSB))
{
if (dynindx == -1)
@@ -3043,8 +3299,8 @@ static bfd *elfNN_ia64_unwind_entry_compare_bfd;
static int
elfNN_ia64_unwind_entry_compare (a, b)
- PTR a;
- PTR b;
+ const PTR a;
+ const PTR b;
{
bfd_vma av, bv;
@@ -3205,11 +3461,13 @@ elfNN_ia64_final_link (abfd, info)
if (unwind_output_sec)
{
elfNN_ia64_unwind_entry_compare_bfd = abfd;
- qsort (unwind_output_sec->contents, unwind_output_sec->_raw_size / 24,
- 24, elfNN_ia64_unwind_entry_compare);
+ qsort (unwind_output_sec->contents,
+ (size_t) (unwind_output_sec->_raw_size / 24),
+ 24,
+ elfNN_ia64_unwind_entry_compare);
if (! bfd_set_section_contents (abfd, unwind_output_sec,
- unwind_output_sec->contents, 0,
+ unwind_output_sec->contents, (bfd_vma) 0,
unwind_output_sec->_raw_size))
return false;
}
@@ -3277,7 +3535,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
{
(*_bfd_error_handler)
(_("%s: unknown relocation type %d"),
- bfd_get_filename (input_bfd), (int)r_type);
+ bfd_archive_filename (input_bfd), (int)r_type);
bfd_set_error (bfd_error_bad_value);
ret_val = false;
continue;
@@ -3315,9 +3573,39 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
/* Reloc against local symbol. */
sym = local_syms + r_symndx;
sym_sec = local_sections[r_symndx];
- value = (sym_sec->output_section->vma
- + sym_sec->output_offset
- + sym->st_value);
+ value = _bfd_elf_rela_local_sym (output_bfd, sym, sym_sec, rel);
+ if ((sym_sec->flags & SEC_MERGE)
+ && ELF_ST_TYPE (sym->st_info) == STT_SECTION
+ && (elf_section_data (sym_sec)->sec_info_type
+ == ELF_INFO_TYPE_MERGE))
+ {
+ struct elfNN_ia64_local_hash_entry *loc_h;
+
+ loc_h = get_local_sym_hash (ia64_info, input_bfd, rel, false);
+ if (loc_h && ! loc_h->sec_merge_done)
+ {
+ struct elfNN_ia64_dyn_sym_info *dynent;
+ asection *msec;
+
+ for (dynent = loc_h->info; dynent; dynent = dynent->next)
+ {
+ msec = sym_sec;
+ dynent->addend =
+ _bfd_merged_section_offset (output_bfd, &msec,
+ elf_section_data (msec)->
+ sec_info,
+ sym->st_value
+ + dynent->addend,
+ (bfd_vma) 0);
+ dynent->addend -= sym->st_value;
+ dynent->addend += msec->output_section->vma
+ + msec->output_offset
+ - sym_sec->output_section->vma
+ - sym_sec->output_offset;
+ }
+ loc_h->sec_merge_done = 1;
+ }
+ }
}
else
{
@@ -3353,7 +3641,8 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
}
else if (h->root.type == bfd_link_hash_undefweak)
undef_weak_ref = true;
- else if (info->shared && !info->symbolic
+ else if (info->shared
+ && (!info->symbolic || info->allow_shlib_undefined)
&& !info->no_undefined
&& ELF_ST_VISIBILITY (h->other) == STV_DEFAULT)
;
@@ -3388,7 +3677,12 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
case R_IA64_DIR64MSB:
case R_IA64_DIR64LSB:
/* Install a dynamic relocation for this reloc. */
- if ((dynamic_symbol_p || info->shared)
+ if ((dynamic_symbol_p || info->shared
+ || (elfNN_ia64_aix_vec (info->hash->creator)
+ /* Don't emit relocs for __GLOB_DATA_PTR on AIX. */
+ && (!h || strcmp (h->root.root.string,
+ "__GLOB_DATA_PTR") != 0)))
+ && r_symndx != 0
&& (input_section->flags & SEC_ALLOC) != 0)
{
unsigned int dyn_r_type;
@@ -3432,7 +3726,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
shared libraries. Hork. */
(*_bfd_error_handler)
(_("%s: linking non-pic code in a shared library"),
- bfd_get_filename (input_bfd));
+ bfd_archive_filename (input_bfd));
ret_val = false;
continue;
}
@@ -3440,6 +3734,8 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
addend = value;
}
+ if (elfNN_ia64_aix_vec (info->hash->creator))
+ rel->r_addend = value;
elfNN_ia64_install_dyn_reloc (output_bfd, info, input_section,
srel, rel->r_offset, dyn_r_type,
dynindx, addend);
@@ -3463,7 +3759,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
{
(*_bfd_error_handler)
(_("%s: @gprel relocation against dynamic symbol %s"),
- bfd_get_filename (input_bfd), h->root.root.string);
+ bfd_archive_filename (input_bfd), h->root.root.string);
ret_val = false;
continue;
}
@@ -3521,7 +3817,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
else
{
dynindx = (_bfd_elf_link_lookup_local_dynindx
- (info, input_bfd, r_symndx));
+ (info, input_bfd, (long) r_symndx));
}
elfNN_ia64_install_dyn_reloc (output_bfd, info, input_section,
@@ -3535,6 +3831,8 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
case R_IA64_LTOFF_FPTR22:
case R_IA64_LTOFF_FPTR64I:
+ case R_IA64_LTOFF_FPTR32MSB:
+ case R_IA64_LTOFF_FPTR32LSB:
case R_IA64_LTOFF_FPTR64MSB:
case R_IA64_LTOFF_FPTR64LSB:
{
@@ -3563,7 +3861,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
}
else
dynindx = (_bfd_elf_link_lookup_local_dynindx
- (info, input_bfd, r_symndx));
+ (info, input_bfd, (long) r_symndx));
value = 0;
}
@@ -3579,7 +3877,9 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
case R_IA64_PCREL64MSB:
case R_IA64_PCREL64LSB:
/* Install a dynamic relocation for this reloc. */
- if (dynamic_symbol_p)
+ if ((dynamic_symbol_p
+ || elfNN_ia64_aix_vec (info->hash->creator))
+ && r_symndx != 0)
{
BFD_ASSERT (srel != NULL);
@@ -3598,7 +3898,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
{
(*_bfd_error_handler)
(_("%s: dynamic relocation against speculation fixup"),
- bfd_get_filename (input_bfd));
+ bfd_archive_filename (input_bfd));
ret_val = false;
continue;
}
@@ -3606,7 +3906,7 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
{
(*_bfd_error_handler)
(_("%s: speculation fixup against undefined weak symbol"),
- bfd_get_filename (input_bfd));
+ bfd_archive_filename (input_bfd));
ret_val = false;
continue;
}
@@ -3657,47 +3957,48 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
case R_IA64_SEGREL32LSB:
case R_IA64_SEGREL64MSB:
case R_IA64_SEGREL64LSB:
- {
- struct elf_segment_map *m;
- Elf_Internal_Phdr *p;
-
- /* Find the segment that contains the output_section. */
- for (m = elf_tdata (output_bfd)->segment_map,
- p = elf_tdata (output_bfd)->phdr;
- m != NULL;
- m = m->next, p++)
- {
- int i;
- for (i = m->count - 1; i >= 0; i--)
- if (m->sections[i] == sym_sec->output_section)
+ if (r_symndx == 0)
+ {
+ /* If the input section was discarded from the output, then
+ do nothing. */
+ r = bfd_reloc_ok;
+ }
+ else
+ {
+ struct elf_segment_map *m;
+ Elf_Internal_Phdr *p;
+
+ /* Find the segment that contains the output_section. */
+ for (m = elf_tdata (output_bfd)->segment_map,
+ p = elf_tdata (output_bfd)->phdr;
+ m != NULL;
+ m = m->next, p++)
+ {
+ int i;
+ for (i = m->count - 1; i >= 0; i--)
+ if (m->sections[i] == sym_sec->output_section)
+ break;
+ if (i >= 0)
break;
- if (i >= 0)
- break;
- }
-
- if (m == NULL)
- {
- /* If the input section was discarded from the output, then
- do nothing. */
+ }
- if (bfd_is_abs_section (sym_sec->output_section))
- r = bfd_reloc_ok;
- else
+ if (m == NULL)
+ {
r = bfd_reloc_notsupported;
- }
- else
- {
- /* The VMA of the segment is the vaddr of the associated
- program header. */
- if (value > p->p_vaddr)
- value -= p->p_vaddr;
- else
- value = 0;
- r = elfNN_ia64_install_value (output_bfd, hit_addr, value,
- r_type);
- }
- break;
- }
+ }
+ else
+ {
+ /* The VMA of the segment is the vaddr of the associated
+ program header. */
+ if (value > p->p_vaddr)
+ value -= p->p_vaddr;
+ else
+ value = 0;
+ r = elfNN_ia64_install_value (output_bfd, hit_addr, value,
+ r_type);
+ }
+ break;
+ }
case R_IA64_SECREL32MSB:
case R_IA64_SECREL32LSB:
@@ -3816,7 +4117,8 @@ elfNN_ia64_relocate_section (output_bfd, info, input_bfd, input_section,
name = bfd_section_name (input_bfd, input_section);
}
if (!(*info->callbacks->reloc_overflow) (info, name,
- howto->name, 0,
+ howto->name,
+ (bfd_vma) 0,
input_bfd,
input_section,
rel->r_offset))
@@ -4023,24 +4325,6 @@ elfNN_ia64_set_private_flags (abfd, flags)
return true;
}
-/* Copy backend specific data from one object module to another */
-static boolean
-elfNN_ia64_copy_private_bfd_data (ibfd, obfd)
- bfd *ibfd, *obfd;
-{
- if ( bfd_get_flavour (ibfd) != bfd_target_elf_flavour
- || bfd_get_flavour (obfd) != bfd_target_elf_flavour)
- return true;
-
- BFD_ASSERT (!elf_flags_init (obfd)
- || (elf_elfheader (obfd)->e_flags
- == elf_elfheader (ibfd)->e_flags));
-
- elf_elfheader (obfd)->e_flags = elf_elfheader (ibfd)->e_flags;
- elf_flags_init (obfd) = true;
- return true;
-}
-
/* Merge backend specific data from an object file to the output
object file when linking. */
static boolean
@@ -4086,7 +4370,7 @@ elfNN_ia64_merge_private_bfd_data (ibfd, obfd)
{
(*_bfd_error_handler)
(_("%s: linking trap-on-NULL-dereference with non-trapping files"),
- bfd_get_filename (ibfd));
+ bfd_archive_filename (ibfd));
bfd_set_error (bfd_error_bad_value);
ok = false;
@@ -4095,7 +4379,7 @@ elfNN_ia64_merge_private_bfd_data (ibfd, obfd)
{
(*_bfd_error_handler)
(_("%s: linking big-endian files with little-endian files"),
- bfd_get_filename (ibfd));
+ bfd_archive_filename (ibfd));
bfd_set_error (bfd_error_bad_value);
ok = false;
@@ -4104,7 +4388,7 @@ elfNN_ia64_merge_private_bfd_data (ibfd, obfd)
{
(*_bfd_error_handler)
(_("%s: linking 64-bit files with 32-bit files"),
- bfd_get_filename (ibfd));
+ bfd_archive_filename (ibfd));
bfd_set_error (bfd_error_bad_value);
ok = false;
@@ -4113,7 +4397,7 @@ elfNN_ia64_merge_private_bfd_data (ibfd, obfd)
{
(*_bfd_error_handler)
(_("%s: linking constant-gp files with non-constant-gp files"),
- bfd_get_filename (ibfd));
+ bfd_archive_filename (ibfd));
bfd_set_error (bfd_error_bad_value);
ok = false;
@@ -4123,7 +4407,7 @@ elfNN_ia64_merge_private_bfd_data (ibfd, obfd)
{
(*_bfd_error_handler)
(_("%s: linking auto-pic files with non-auto-pic files"),
- bfd_get_filename (ibfd));
+ bfd_archive_filename (ibfd));
bfd_set_error (bfd_error_bad_value);
ok = false;
@@ -4155,6 +4439,59 @@ elfNN_ia64_print_private_bfd_data (abfd, ptr)
_bfd_elf_print_private_bfd_data (abfd, ptr);
return true;
}
+
+static enum elf_reloc_type_class
+elfNN_ia64_reloc_type_class (rela)
+ const Elf_Internal_Rela *rela;
+{
+ switch ((int) ELFNN_R_TYPE (rela->r_info))
+ {
+ case R_IA64_REL32MSB:
+ case R_IA64_REL32LSB:
+ case R_IA64_REL64MSB:
+ case R_IA64_REL64LSB:
+ return reloc_class_relative;
+ case R_IA64_IPLTMSB:
+ case R_IA64_IPLTLSB:
+ return reloc_class_plt;
+ case R_IA64_COPY:
+ return reloc_class_copy;
+ default:
+ return reloc_class_normal;
+ }
+}
+
+static boolean
+elfNN_ia64_hpux_vec (const bfd_target *vec)
+{
+ extern const bfd_target bfd_elfNN_ia64_hpux_big_vec;
+ return (vec == & bfd_elfNN_ia64_hpux_big_vec);
+}
+
+static void
+elfNN_hpux_post_process_headers (abfd, info)
+ bfd *abfd;
+ struct bfd_link_info *info ATTRIBUTE_UNUSED;
+{
+ Elf_Internal_Ehdr *i_ehdrp = elf_elfheader (abfd);
+
+ i_ehdrp->e_ident[EI_OSABI] = ELFOSABI_HPUX;
+ i_ehdrp->e_ident[EI_ABIVERSION] = 1;
+}
+
+boolean
+elfNN_hpux_backend_section_from_bfd_section (abfd, sec, retval)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *sec;
+ int *retval;
+{
+ if (bfd_is_com_section (sec))
+ {
+ *retval = SHN_IA_64_ANSI_COMMON;
+ return true;
+ }
+ return false;
+}
#define TARGET_LITTLE_SYM bfd_elfNN_ia64_little_vec
#define TARGET_LITTLE_NAME "elfNN-ia64-little"
@@ -4210,8 +4547,6 @@ elfNN_ia64_print_private_bfd_data (abfd, ptr)
#define bfd_elfNN_bfd_final_link \
elfNN_ia64_final_link
-#define bfd_elfNN_bfd_copy_private_bfd_data \
- elfNN_ia64_copy_private_bfd_data
#define bfd_elfNN_bfd_merge_private_bfd_data \
elfNN_ia64_merge_private_bfd_data
#define bfd_elfNN_bfd_set_private_flags \
@@ -4231,5 +4566,60 @@ elfNN_ia64_print_private_bfd_data (abfd, ptr)
#define elf_backend_want_dynbss 0
#define elf_backend_copy_indirect_symbol elfNN_ia64_hash_copy_indirect
#define elf_backend_hide_symbol elfNN_ia64_hash_hide_symbol
+#define elf_backend_reloc_type_class elfNN_ia64_reloc_type_class
+
+#include "elfNN-target.h"
+
+/* AIX-specific vectors. */
+
+#undef TARGET_LITTLE_SYM
+#define TARGET_LITTLE_SYM bfd_elfNN_ia64_aix_little_vec
+#undef TARGET_LITTLE_NAME
+#define TARGET_LITTLE_NAME "elfNN-ia64-aix-little"
+#undef TARGET_BIG_SYM
+#define TARGET_BIG_SYM bfd_elfNN_ia64_aix_big_vec
+#undef TARGET_BIG_NAME
+#define TARGET_BIG_NAME "elfNN-ia64-aix-big"
+
+#undef elf_backend_add_symbol_hook
+#define elf_backend_add_symbol_hook elfNN_ia64_aix_add_symbol_hook
+
+#undef bfd_elfNN_bfd_link_add_symbols
+#define bfd_elfNN_bfd_link_add_symbols elfNN_ia64_aix_link_add_symbols
+
+#define elfNN_bed elfNN_ia64_aix_bed
+
+#include "elfNN-target.h"
+
+/* HPUX-specific vectors. */
+
+#undef TARGET_LITTLE_SYM
+#undef TARGET_LITTLE_NAME
+#undef TARGET_BIG_SYM
+#define TARGET_BIG_SYM bfd_elfNN_ia64_hpux_big_vec
+#undef TARGET_BIG_NAME
+#define TARGET_BIG_NAME "elfNN-ia64-hpux-big"
+
+/* We need to undo the AIX specific functions. */
+
+#undef elf_backend_add_symbol_hook
+#define elf_backend_add_symbol_hook elfNN_ia64_add_symbol_hook
+
+#undef bfd_elfNN_bfd_link_add_symbols
+#define bfd_elfNN_bfd_link_add_symbols _bfd_generic_link_add_symbols
+
+/* These are HP-UX specific functions. */
+
+#undef elf_backend_post_process_headers
+#define elf_backend_post_process_headers elfNN_hpux_post_process_headers
+
+#undef elf_backend_section_from_bfd_section
+#define elf_backend_section_from_bfd_section elfNN_hpux_backend_section_from_bfd_section
+
+#undef ELF_MAXPAGESIZE
+#define ELF_MAXPAGESIZE 0x1000 /* 1K */
+
+#undef elfNN_bed
+#define elfNN_bed elfNN_ia64_hpux_bed
#include "elfNN-target.h"
diff --git a/contrib/binutils/bfd/elfxx-target.h b/contrib/binutils/bfd/elfxx-target.h
index 3ec9820..fda0f0d 100644
--- a/contrib/binutils/bfd/elfxx-target.h
+++ b/contrib/binutils/bfd/elfxx-target.h
@@ -66,6 +66,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef elf_backend_got_symbol_offset
#define elf_backend_got_symbol_offset (bfd_vma) 0
#endif
+#ifndef elf_backend_can_refcount
+#define elf_backend_can_refcount 0
+#endif
#ifndef elf_backend_want_got_plt
#define elf_backend_want_got_plt 0
#endif
@@ -87,7 +90,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define bfd_elfNN_bfd_debug_info_start bfd_void
#define bfd_elfNN_bfd_debug_info_end bfd_void
-#define bfd_elfNN_bfd_debug_info_accumulate (PROTO(void,(*),(bfd*, struct sec *))) bfd_void
+#define bfd_elfNN_bfd_debug_info_accumulate \
+ (void (*) PARAMS ((bfd*, struct sec *))) bfd_void
#ifndef bfd_elfNN_bfd_get_relocated_section_contents
#define bfd_elfNN_bfd_get_relocated_section_contents \
@@ -101,6 +105,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef elf_backend_can_gc_sections
#define elf_backend_can_gc_sections 0
#endif
+#ifndef elf_backend_can_refcount
+#define elf_backend_can_refcount 0
+#endif
+#ifndef elf_backend_want_got_sym
+#define elf_backend_want_got_sym 1
+#endif
#ifndef elf_backend_gc_mark_hook
#define elf_backend_gc_mark_hook NULL
#endif
@@ -111,6 +121,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define bfd_elfNN_bfd_gc_sections _bfd_elfNN_gc_sections
#endif
+#ifndef bfd_elfNN_bfd_merge_sections
+#define bfd_elfNN_bfd_merge_sections \
+ _bfd_elf_merge_sections
+#endif
+
#ifndef bfd_elfNN_bfd_make_debug_symbol
#define bfd_elfNN_bfd_make_debug_symbol \
((asymbol *(*) PARAMS ((bfd *, void *, unsigned long))) bfd_nullvoidptr)
@@ -127,7 +142,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#endif
#ifndef bfd_elfNN_bfd_copy_private_bfd_data
#define bfd_elfNN_bfd_copy_private_bfd_data \
- ((boolean (*) PARAMS ((bfd *, bfd *))) bfd_true)
+ _bfd_elf_copy_private_bfd_data
#endif
#ifndef bfd_elfNN_bfd_print_private_bfd_data
#define bfd_elfNN_bfd_print_private_bfd_data \
@@ -159,7 +174,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define bfd_elfNN_bfd_link_hash_table_create _bfd_elf_link_hash_table_create
#endif
#else /* ! defined (elf_backend_relocate_section) */
-/* If no backend relocate_section routine, use the generic linker. */
+/* If no backend relocate_section routine, use the generic linker.
+ Note - this will prevent the port from being able to use some of
+ the other features of the ELF linker, because the generic hash structure
+ does not have the fields needed by the ELF linker. In particular it
+ means that linking directly to S-records will not work. */
#ifndef bfd_elfNN_bfd_link_hash_table_create
#define bfd_elfNN_bfd_link_hash_table_create \
_bfd_generic_link_hash_table_create
@@ -318,6 +337,36 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef elf_backend_hide_symbol
#define elf_backend_hide_symbol _bfd_elf_link_hash_hide_symbol
#endif
+#ifndef elf_backend_emit_relocs
+#define elf_backend_emit_relocs NULL
+#endif
+#ifndef elf_backend_count_relocs
+#define elf_backend_count_relocs NULL
+#endif
+#ifndef elf_backend_grok_prstatus
+#define elf_backend_grok_prstatus NULL
+#endif
+#ifndef elf_backend_grok_psinfo
+#define elf_backend_grok_psinfo NULL
+#endif
+#ifndef elf_backend_sprintf_vma
+#define elf_backend_sprintf_vma _bfd_elf_sprintf_vma
+#endif
+#ifndef elf_backend_fprintf_vma
+#define elf_backend_fprintf_vma _bfd_elf_fprintf_vma
+#endif
+#ifndef elf_backend_reloc_type_class
+#define elf_backend_reloc_type_class _bfd_elf_reloc_type_class
+#endif
+#ifndef elf_backend_discard_info
+#define elf_backend_discard_info NULL
+#endif
+#ifndef elf_backend_ignore_discarded_relocs
+#define elf_backend_ignore_discarded_relocs NULL
+#endif
+#ifndef elf_backend_write_section
+#define elf_backend_write_section NULL
+#endif
/* Previously, backends could only use SHT_REL or SHT_RELA relocation
sections, but not both. They defined USE_REL to indicate SHT_REL
@@ -360,7 +409,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
extern const struct elf_size_info _bfd_elfNN_size_info;
#ifndef INCLUDED_TARGET_FILE
-static CONST struct elf_backend_data elfNN_bed =
+static const struct elf_backend_data elfNN_bed =
{
ELF_ARCH, /* arch */
ELF_MACHINE_CODE, /* elf_machine_code */
@@ -399,6 +448,16 @@ static CONST struct elf_backend_data elfNN_bed =
elf_backend_output_arch_syms,
elf_backend_copy_indirect_symbol,
elf_backend_hide_symbol,
+ elf_backend_emit_relocs,
+ elf_backend_count_relocs,
+ elf_backend_grok_prstatus,
+ elf_backend_grok_psinfo,
+ elf_backend_sprintf_vma,
+ elf_backend_fprintf_vma,
+ elf_backend_reloc_type_class,
+ elf_backend_discard_info,
+ elf_backend_ignore_discarded_relocs,
+ elf_backend_write_section,
elf_backend_ecoff_debug_swap,
ELF_MACHINE_ALT1,
ELF_MACHINE_ALT2,
@@ -418,6 +477,8 @@ static CONST struct elf_backend_data elfNN_bed =
elf_backend_plt_not_loaded,
elf_backend_plt_alignment,
elf_backend_can_gc_sections,
+ elf_backend_can_refcount,
+ elf_backend_want_got_sym,
elf_backend_want_dynbss
};
#endif
@@ -443,12 +504,13 @@ const bfd_target TARGET_BIG_SYM =
BFD_ENDIAN_BIG,
/* object_flags: mask of all file flags */
- (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS |
- DYNAMIC | WP_TEXT | D_PAGED),
+ (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS
+ | DYNAMIC | WP_TEXT | D_PAGED),
/* section_flags: mask of all section flags */
- (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY |
- SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_EXCLUDE | SEC_SORT_ENTRIES),
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY
+ | SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_EXCLUDE | SEC_SORT_ENTRIES
+ | SEC_ARCH_BIT_0 | SEC_SMALL_DATA | SEC_MERGE | SEC_STRINGS | SEC_GROUP),
/* leading_symbol_char: is the first char of a user symbol
predictable, and if so what is it */
@@ -538,12 +600,13 @@ const bfd_target TARGET_LITTLE_SYM =
BFD_ENDIAN_LITTLE,
/* object_flags: mask of all file flags */
- (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS |
- DYNAMIC | WP_TEXT | D_PAGED),
+ (HAS_RELOC | EXEC_P | HAS_LINENO | HAS_DEBUG | HAS_SYMS | HAS_LOCALS
+ | DYNAMIC | WP_TEXT | D_PAGED),
/* section_flags: mask of all section flags */
- (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY |
- SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_EXCLUDE | SEC_SORT_ENTRIES),
+ (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC | SEC_READONLY
+ | SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_EXCLUDE | SEC_SORT_ENTRIES
+ | SEC_ARCH_BIT_0 | SEC_SMALL_DATA | SEC_MERGE | SEC_STRINGS | SEC_GROUP),
/* leading_symbol_char: is the first char of a user symbol
predictable, and if so what is it */
diff --git a/contrib/binutils/bfd/format.c b/contrib/binutils/bfd/format.c
index 6afcb60..f60f0ca 100644
--- a/contrib/binutils/bfd/format.c
+++ b/contrib/binutils/bfd/format.c
@@ -119,38 +119,40 @@ bfd_check_format_matches (abfd, format, matching)
char ***matching;
{
extern const bfd_target binary_vec;
- const bfd_target * const *target, *save_targ, *right_targ;
+ const bfd_target * const *target, *save_targ, *right_targ, *ar_right_targ;
char **matching_vector = NULL;
int match_count;
+ int ar_match_index;
- if (!bfd_read_p (abfd) ||
- ((int)(abfd->format) < (int)bfd_unknown) ||
- ((int)(abfd->format) >= (int)bfd_type_end))
+ if (!bfd_read_p (abfd)
+ || (unsigned int) abfd->format >= (unsigned int) bfd_type_end)
{
bfd_set_error (bfd_error_invalid_operation);
return false;
}
if (abfd->format != bfd_unknown)
- return (abfd->format == format)? true: false;
+ return abfd->format == format;
/* Since the target type was defaulted, check them
all in the hope that one will be uniquely recognized. */
save_targ = abfd->xvec;
match_count = 0;
+ ar_match_index = _bfd_target_vector_entries;
if (matching)
{
- matching_vector =
- (char **) bfd_malloc (sizeof (char *) *
- (_bfd_target_vector_entries + 1));
+ bfd_size_type amt;
+
+ *matching = NULL;
+ amt = sizeof (char *) * 2 * _bfd_target_vector_entries;
+ matching_vector = (char **) bfd_malloc (amt);
if (!matching_vector)
return false;
- matching_vector[0] = NULL;
- *matching = matching_vector;
}
right_targ = 0;
+ ar_right_targ = 0;
/* Presume the answer is yes. */
abfd->format = format;
@@ -158,7 +160,7 @@ bfd_check_format_matches (abfd, format, matching)
/* If the target type was explicitly specified, just check that target. */
if (!abfd->target_defaulted)
{
- if (bfd_seek (abfd, (file_ptr)0, SEEK_SET) != 0) /* rewind! */
+ if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0) /* rewind! */
return false;
right_targ = BFD_SEND_FMT (abfd, _bfd_check_format, (abfd));
@@ -202,13 +204,14 @@ bfd_check_format_matches (abfd, format, matching)
for (target = bfd_target_vector; *target != NULL; target++)
{
const bfd_target *temp;
+ bfd_error_type err;
if (*target == &binary_vec)
continue;
abfd->xvec = *target; /* Change BFD's target temporarily */
- if (bfd_seek (abfd, (file_ptr)0, SEEK_SET) != 0)
+ if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
return false;
/* If _bfd_check_format neglects to set bfd_error, assume
@@ -223,27 +226,20 @@ bfd_check_format_matches (abfd, format, matching)
{ /* This format checks out as ok! */
right_targ = temp;
- if (matching)
- {
- matching_vector[match_count] = temp->name;
- matching_vector[match_count + 1] = NULL;
- }
-
- match_count++;
-
/* If this is the default target, accept it, even if other
targets might match. People who want those other targets
have to set the GNUTARGET variable. */
if (temp == bfd_default_vector[0])
{
- if (matching)
- {
- matching_vector[0] = temp->name;
- matching_vector[1] = NULL;
- }
match_count = 1;
break;
}
+
+ if (matching)
+ matching_vector[match_count] = temp->name;
+
+ match_count++;
+
#ifdef GNU960
/* Big- and little-endian b.out archives look the same, but it
doesn't matter: there is no difference in their headers, and
@@ -254,19 +250,50 @@ bfd_check_format_matches (abfd, format, matching)
break;
#endif
}
- else if (bfd_get_error () != bfd_error_wrong_format)
+ else if ((err = bfd_get_error ()) == bfd_error_wrong_object_format
+ || err == bfd_error_file_ambiguously_recognized)
+ {
+ /* An archive with objects of the wrong type, or an
+ ambiguous match. We want this target to match if we get
+ no better matches. */
+ if (ar_right_targ != bfd_default_vector[0])
+ ar_right_targ = *target;
+ if (matching)
+ matching_vector[ar_match_index] = (*target)->name;
+ ar_match_index++;
+ }
+ else if (err != bfd_error_wrong_format)
{
abfd->xvec = save_targ;
abfd->format = bfd_unknown;
- if (matching && bfd_get_error ()
- != bfd_error_file_ambiguously_recognized)
+ if (matching)
free (matching_vector);
return false;
}
}
+ if (match_count == 0)
+ {
+ /* Try partial matches. */
+ right_targ = ar_right_targ;
+ if (right_targ == bfd_default_vector[0])
+ {
+ match_count = 1;
+ }
+ else
+ {
+ match_count = ar_match_index - _bfd_target_vector_entries;
+ if (matching && match_count > 1)
+ {
+ memcpy (matching_vector,
+ matching_vector + _bfd_target_vector_entries,
+ sizeof (char *) * match_count);
+ }
+ }
+ }
+
if (match_count == 1)
{
abfd->xvec = right_targ; /* Change BFD's target permanently. */
@@ -288,7 +315,15 @@ bfd_check_format_matches (abfd, format, matching)
free (matching_vector);
}
else
- bfd_set_error (bfd_error_file_ambiguously_recognized);
+ {
+ bfd_set_error (bfd_error_file_ambiguously_recognized);
+
+ if (matching)
+ {
+ *matching = matching_vector;
+ matching_vector[match_count] = NULL;
+ }
+ }
return false;
}
@@ -312,9 +347,8 @@ bfd_set_format (abfd, format)
bfd *abfd;
bfd_format format;
{
- if (bfd_read_p (abfd) ||
- ((int)abfd->format < (int)bfd_unknown) ||
- ((int)abfd->format >= (int)bfd_type_end))
+ if (bfd_read_p (abfd)
+ || (unsigned int) abfd->format >= (unsigned int) bfd_type_end)
{
bfd_set_error (bfd_error_invalid_operation);
return false;
@@ -340,7 +374,7 @@ FUNCTION
bfd_format_string
SYNOPSIS
- CONST char *bfd_format_string(bfd_format format);
+ const char *bfd_format_string(bfd_format format);
DESCRIPTION
Return a pointer to a const string
@@ -348,7 +382,7 @@ DESCRIPTION
depending upon the value of @var{format}.
*/
-CONST char *
+const char *
bfd_format_string (format)
bfd_format format;
{
diff --git a/contrib/binutils/bfd/gen-aout.c b/contrib/binutils/bfd/gen-aout.c
index 088fc09..1bba14a 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 1990, 1991, 1992, 1993, 1994, 1995
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 2001
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -87,9 +87,12 @@ main (argc, argv)
fprintf (stderr, _(" fix DEFAULT_ARCH in the output file yourself\n"));
arch = "unknown";
}
- printf("#define DEFAULT_ARCH bfd_arch_%s\n", arch);
+ printf("#define DEFAULT_ARCH bfd_arch_%s\n\n", arch);
- printf("\n#define MY(OP) CAT(%s_,OP)\n", target);
+ printf("/* Do not \"beautify\" the CONCAT* macro args. Traditional C will not");
+ printf(" remove whitespace added here, and thus will fail to concatenate");
+ printf(" the tokens. */");
+ printf("\n#define MY(OP) CONCAT2 (%s_,OP)\n\n", target);
printf("#define TARGETNAME \"a.out-%s\"\n\n", target);
printf("#include \"bfd.h\"\n");
diff --git a/contrib/binutils/bfd/hash.c b/contrib/binutils/bfd/hash.c
index 11d54fd..9766eaf 100644
--- a/contrib/binutils/bfd/hash.c
+++ b/contrib/binutils/bfd/hash.c
@@ -582,9 +582,9 @@ struct bfd_strtab_hash *
_bfd_stringtab_init ()
{
struct bfd_strtab_hash *table;
+ bfd_size_type amt = sizeof (struct bfd_strtab_hash);
- table = ((struct bfd_strtab_hash *)
- bfd_malloc (sizeof (struct bfd_strtab_hash)));
+ table = (struct bfd_strtab_hash *) bfd_malloc (amt);
if (table == NULL)
return NULL;
@@ -711,8 +711,8 @@ _bfd_stringtab_emit (abfd, tab)
for (entry = tab->first; entry != NULL; entry = entry->next)
{
- register const char *str;
- register size_t len;
+ const char *str;
+ size_t len;
str = entry->root.string;
len = strlen (str) + 1;
@@ -722,12 +722,12 @@ _bfd_stringtab_emit (abfd, tab)
bfd_byte buf[2];
/* The output length includes the null byte. */
- bfd_put_16 (abfd, len, buf);
- if (bfd_write ((PTR) buf, 1, 2, abfd) != 2)
+ bfd_put_16 (abfd, (bfd_vma) len, buf);
+ if (bfd_bwrite ((PTR) buf, (bfd_size_type) 2, abfd) != 2)
return false;
}
- if (bfd_write ((PTR) str, 1, len, abfd) != len)
+ if (bfd_bwrite ((PTR) str, (bfd_size_type) len, abfd) != len)
return false;
}
diff --git a/contrib/binutils/bfd/host-aout.c b/contrib/binutils/bfd/host-aout.c
index a53cf09..5cbb5df 100644
--- a/contrib/binutils/bfd/host-aout.c
+++ b/contrib/binutils/bfd/host-aout.c
@@ -1,5 +1,6 @@
/* BFD backend for local host's a.out binaries
- Copyright 1990, 1991, 1992, 1994, 1995 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1994, 1995, 2001
+ Free Software Foundation, Inc.
Written by Cygnus Support. Probably John Gilmore's fault.
This file is part of BFD, the Binary File Descriptor library.
@@ -77,7 +78,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#endif
#endif /* HOST_MACHINE_ARCH */
-#define MY(OP) CAT(host_aout_,OP)
+/* Do not "beautify" the CONCAT* macro args. Traditional C will not
+ remove whitespace added here, and thus will fail to concatenate
+ the tokens. */
+#define MY(OP) CONCAT2 (host_aout_,OP)
#define TARGETNAME "a.out"
#include "aout-target.h"
diff --git a/contrib/binutils/bfd/i386aout.c b/contrib/binutils/bfd/i386aout.c
index 1192dd4..c68dbec 100644
--- a/contrib/binutils/bfd/i386aout.c
+++ b/contrib/binutils/bfd/i386aout.c
@@ -1,5 +1,5 @@
/* BFD back-end for i386 a.out binaries.
- Copyright 1990, 1991, 1992, 1994, 1996, 1997
+ Copyright 1990, 1991, 1992, 1994, 1996, 1997, 2001
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-/* The only 386 aout system we have here is GO32 from DJ.
+/* The only 386 aout system we have here is GO32 from DJ.
These numbers make BFD work with that. If your aout 386 system
doesn't work with these, we'll have to split them into different
files. Send me (sac@cygnus.com) the runes to make it work on your
@@ -41,7 +41,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define SEGMENT_SIZE 0x400000
#define DEFAULT_ARCH bfd_arch_i386
-#define MY(OP) CAT(i386aout_,OP)
+/* Do not "beautify" the CONCAT* macro args. Traditional C will not
+ remove whitespace added here, and thus will fail to concatenate
+ the tokens. */
+#define MY(OP) CONCAT2 (i386aout_,OP)
#define TARGETNAME "a.out-i386"
#define NO_WRITE_HEADER_KLUDGE 1
@@ -51,6 +54,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "aout/aout64.h"
#include "libaout.h"
+static boolean i386aout_write_object_contents PARAMS ((bfd *));
+static boolean MY (set_sizes) PARAMS ((bfd *));
+
/* Set the machine type correctly. */
static boolean
@@ -71,9 +77,8 @@ i386aout_write_object_contents (abfd)
#define MY_write_object_contents i386aout_write_object_contents
-static boolean MY(set_sizes)();
#define MY_backend_data &MY(backend_data)
-static CONST struct aout_backend_data MY(backend_data) = {
+static const struct aout_backend_data MY(backend_data) = {
0, /* zmagic contiguous */
1, /* text incl header */
0, /* entry is text address */
diff --git a/contrib/binutils/bfd/i386bsd.c b/contrib/binutils/bfd/i386bsd.c
index 98c48cd..e21a9ca 100644
--- a/contrib/binutils/bfd/i386bsd.c
+++ b/contrib/binutils/bfd/i386bsd.c
@@ -1,5 +1,6 @@
/* BFD back-end for i386 a.out binaries under BSD.
- Copyright 1990, 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1993, 1994, 2001
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -35,7 +36,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define DEFAULT_ARCH bfd_arch_i386
#define MACHTYPE_OK(mtype) ((mtype) == M_386 || (mtype) == M_UNKNOWN)
-#define MY(OP) CAT(i386bsd_,OP)
+/* Do not "beautify" the CONCAT* macro args. Traditional C will not
+ remove whitespace added here, and thus will fail to concatenate
+ the tokens. */
+#define MY(OP) CONCAT2 (i386bsd_,OP)
#define TARGETNAME "a.out-i386-bsd"
#include "bfd.h"
diff --git a/contrib/binutils/bfd/i386freebsd.c b/contrib/binutils/bfd/i386freebsd.c
index f9684e4..73fa0ca 100644
--- a/contrib/binutils/bfd/i386freebsd.c
+++ b/contrib/binutils/bfd/i386freebsd.c
@@ -1,5 +1,5 @@
/* BFD back-end for FreeBSD/386 a.out-ish binaries.
- Copyright 1990, 1991, 1992, 1996 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1996, 2001 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -26,7 +26,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define DEFAULT_ARCH bfd_arch_i386
#define MACHTYPE_OK(mtype) ((mtype) == M_386_NETBSD || (mtype) == M_UNKNOWN)
-#define MY(OP) CAT(i386freebsd_,OP)
+/* Do not "beautify" the CONCAT* macro args. Traditional C will not
+ remove whitespace added here, and thus will fail to concatenate
+ the tokens. */
+#define MY(OP) CONCAT2 (i386freebsd_,OP)
+
/* This needs to start with a.out so GDB knows it is an a.out variant. */
#define TARGETNAME "a.out-i386-freebsd"
diff --git a/contrib/binutils/bfd/i386linux.c b/contrib/binutils/bfd/i386linux.c
index 5fee098..bb93650 100644
--- a/contrib/binutils/bfd/i386linux.c
+++ b/contrib/binutils/bfd/i386linux.c
@@ -1,5 +1,5 @@
/* BFD back-end for linux flavored i386 a.out binaries.
- Copyright 1992, 1993, 1994, 1995, 1996, 1997
+ Copyright 1992, 1993, 1994, 1995, 1996, 1997, 2001
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -36,7 +36,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "libaout.h" /* BFD a.out internal data structures */
#define DEFAULT_ARCH bfd_arch_i386
-#define MY(OP) CAT(i386linux_,OP)
+
+/* Do not "beautify" the CONCAT* macro args. Traditional C will not
+ remove whitespace added here, and thus will fail to concatenate
+ the tokens. */
+#define MY(OP) CONCAT2 (i386linux_,OP)
#define TARGETNAME "a.out-i386-linux"
extern const bfd_target MY(vec);
@@ -223,9 +227,9 @@ linux_link_hash_table_create (abfd)
bfd *abfd;
{
struct linux_link_hash_table *ret;
+ bfd_size_type amt = sizeof (struct linux_link_hash_table);
- ret = ((struct linux_link_hash_table *)
- bfd_alloc (abfd, sizeof (struct linux_link_hash_table)));
+ ret = (struct linux_link_hash_table *) bfd_alloc (abfd, amt);
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,
@@ -405,7 +409,8 @@ linux_add_one_symbol (info, abfd, name, flags, section, value, string,
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)))
+ BSF_GLOBAL | BSF_CONSTRUCTOR, s, (bfd_vma) 0, NULL,
+ false, false, NULL)))
return false;
}
@@ -444,7 +449,7 @@ linux_tally_symbols (h, data)
name = h->root.root.root.string + sizeof NEEDS_SHRLIB - 1;
p = strrchr (name, '_');
if (p != NULL)
- alloc = (char *) bfd_malloc (strlen (name) + 1);
+ alloc = (char *) bfd_malloc ((bfd_size_type) strlen (name) + 1);
if (p == NULL || alloc == NULL)
(*_bfd_error_handler) (_("Output file requires shared library `%s'\n"),
@@ -476,7 +481,7 @@ linux_tally_symbols (h, data)
+ sizeof PLT_REF_PREFIX - 1),
false, false, true);
/* h2 does not follow indirect symbols. */
- h2 = linux_link_hash_lookup (linux_hash_table (info),
+ h2 = linux_link_hash_lookup (linux_hash_table (info),
(h->root.root.root.string
+ sizeof PLT_REF_PREFIX - 1),
false, false, false);
@@ -587,7 +592,8 @@ bfd_i386linux_size_dynamic_sections (output_bfd, info)
".linux-dynamic");
if (s != NULL)
{
- s->_raw_size = 8 + linux_hash_table (info)->fixup_count * 8;
+ s->_raw_size = linux_hash_table (info)->fixup_count + 1;
+ s->_raw_size *= 8;
s->contents = (bfd_byte *) bfd_alloc (output_bfd, s->_raw_size);
if (s->contents == NULL)
return false;
@@ -624,13 +630,14 @@ linux_finish_dynamic_link (output_bfd, info)
fixups_written = 0;
#ifdef LINUX_LINK_DEBUG
- printf ("Fixup table file offset: %x VMA: %x\n",
+ 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);
+ bfd_put_32 (output_bfd,
+ (bfd_vma) linux_hash_table (info)->fixup_count, fixup_table);
fixup_table += 4;
/* Fill in fixup table. */
@@ -660,15 +667,15 @@ linux_finish_dynamic_link (output_bfd, info)
if (f->jump)
{
/* Relative address */
- new_addr = new_addr - (f->value + 5);
- bfd_put_32 (output_bfd, new_addr, fixup_table);
+ new_addr = new_addr - (f->value + 5);
+ bfd_put_32 (output_bfd, (bfd_vma) 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);
+ bfd_put_32 (output_bfd, (bfd_vma) new_addr, fixup_table);
fixup_table += 4;
bfd_put_32 (output_bfd, f->value, fixup_table);
fixup_table += 4;
@@ -679,9 +686,9 @@ linux_finish_dynamic_link (output_bfd, info)
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);
+ bfd_put_32 (output_bfd, (bfd_vma) 0, fixup_table);
fixup_table += 4;
- bfd_put_32 (output_bfd, 0, fixup_table);
+ bfd_put_32 (output_bfd, (bfd_vma) 0, fixup_table);
fixup_table += 4;
++fixups_written;
for (f = linux_hash_table (info)->fixup_list; f != NULL; f = f->next)
@@ -707,7 +714,7 @@ linux_finish_dynamic_link (output_bfd, info)
new_addr, f->value);
#endif
- bfd_put_32 (output_bfd, new_addr, fixup_table);
+ bfd_put_32 (output_bfd, (bfd_vma) new_addr, fixup_table);
fixup_table += 4;
bfd_put_32 (output_bfd, f->value, fixup_table);
fixup_table += 4;
@@ -720,15 +727,15 @@ linux_finish_dynamic_link (output_bfd, info)
(*_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);
+ bfd_put_32 (output_bfd, (bfd_vma) 0, fixup_table);
fixup_table += 4;
- bfd_put_32 (output_bfd, 0, fixup_table);
+ bfd_put_32 (output_bfd, (bfd_vma) 0, fixup_table);
fixup_table += 4;
++fixups_written;
}
}
- h = linux_link_hash_lookup (linux_hash_table (info),
+ h = linux_link_hash_lookup (linux_hash_table (info),
"__BUILTIN_FIXUPS__",
false, false, false);
@@ -744,16 +751,16 @@ linux_finish_dynamic_link (output_bfd, info)
printf ("Builtin fixup table at %x\n", new_addr);
#endif
- bfd_put_32 (output_bfd, new_addr, fixup_table);
+ bfd_put_32 (output_bfd, (bfd_vma) new_addr, fixup_table);
}
else
- bfd_put_32 (output_bfd, 0, fixup_table);
+ bfd_put_32 (output_bfd, (bfd_vma) 0, fixup_table);
- if (bfd_seek (output_bfd, os->filepos + s->output_offset, SEEK_SET) != 0)
+ if (bfd_seek (output_bfd, (file_ptr) (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)
+ if (bfd_bwrite ((PTR) s->contents, s->_raw_size, output_bfd) != s->_raw_size)
return false;
return true;
diff --git a/contrib/binutils/bfd/i386netbsd.c b/contrib/binutils/bfd/i386netbsd.c
index 0e01763..26fa30e 100644
--- a/contrib/binutils/bfd/i386netbsd.c
+++ b/contrib/binutils/bfd/i386netbsd.c
@@ -1,5 +1,5 @@
/* BFD back-end for NetBSD/386 a.out-ish binaries.
- Copyright 1990, 1991, 1992, 1994, 1995, 1996, 1998
+ Copyright 1990, 1991, 1992, 1994, 1995, 1996, 1998, 2001
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -27,7 +27,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define DEFAULT_ARCH bfd_arch_i386
#define DEFAULT_MID M_386_NETBSD
-#define MY(OP) CAT(i386netbsd_,OP)
+/* Do not "beautify" the CONCAT* macro args. Traditional C will not
+ remove whitespace added here, and thus will fail to concatenate
+ the tokens. */
+#define MY(OP) CONCAT2 (i386netbsd_,OP)
+
/* This needs to start with a.out so GDB knows it is an a.out variant. */
#define TARGETNAME "a.out-i386-netbsd"
diff --git a/contrib/binutils/bfd/ieee.c b/contrib/binutils/bfd/ieee.c
index 8414424..546f12c 100644
--- a/contrib/binutils/bfd/ieee.c
+++ b/contrib/binutils/bfd/ieee.c
@@ -32,29 +32,96 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "libbfd.h"
#include "ieee.h"
#include "libieee.h"
+#include "safe-ctype.h"
-#include <ctype.h>
+struct output_buffer_struct
+{
+ unsigned char *ptrp;
+ int buffer;
+};
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));
static boolean ieee_write_id PARAMS ((bfd *, const char *));
+static unsigned short read_2bytes PARAMS ((common_header_type *));
+static void bfd_get_string PARAMS ((common_header_type *, char *, size_t));
+static char *read_id PARAMS ((common_header_type *));
static boolean ieee_write_expression
PARAMS ((bfd *, bfd_vma, asymbol *, boolean, unsigned int));
static void ieee_write_int5 PARAMS ((bfd_byte *, bfd_vma));
static boolean ieee_write_int5_out PARAMS ((bfd *, bfd_vma));
+static boolean parse_int PARAMS ((common_header_type *, bfd_vma *));
+static int parse_i PARAMS ((common_header_type *, boolean *));
+static bfd_vma must_parse_int PARAMS ((common_header_type *));
+static void parse_expression
+ PARAMS ((ieee_data_type *, bfd_vma *, ieee_symbol_index_type *,
+ boolean *, unsigned int *, asection **));
+static file_ptr ieee_part_after PARAMS ((ieee_data_type *, file_ptr));
+static ieee_symbol_type *get_symbol
+ PARAMS ((bfd *, ieee_data_type *, ieee_symbol_type *, unsigned int *,
+ ieee_symbol_type ***, unsigned int *, int));
+static boolean ieee_slurp_external_symbols PARAMS ((bfd *));
+static boolean ieee_slurp_symbol_table PARAMS ((bfd *));
+static long ieee_get_symtab_upper_bound PARAMS ((bfd *));
+static long ieee_get_symtab PARAMS ((bfd *, asymbol **));
+static asection *get_section_entry
+ PARAMS ((bfd *, ieee_data_type *i, unsigned int));
+static void ieee_slurp_sections PARAMS ((bfd *));
+static boolean ieee_slurp_debug PARAMS ((bfd *));
+const bfd_target *ieee_archive_p PARAMS ((bfd *));
+const bfd_target *ieee_object_p PARAMS ((bfd *));
+static void ieee_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *));
+static void ieee_print_symbol
+ PARAMS ((bfd *, PTR, asymbol *, bfd_print_symbol_type));
+static boolean do_one
+ PARAMS ((ieee_data_type *, ieee_per_section_type *, unsigned char *,
+ asection *, int));
+static boolean ieee_slurp_section_data PARAMS ((bfd *));
+static boolean ieee_new_section_hook PARAMS ((bfd *, asection *));
+static long ieee_get_reloc_upper_bound PARAMS ((bfd *, sec_ptr));
+static boolean ieee_get_section_contents
+ PARAMS ((bfd *, sec_ptr, PTR, file_ptr, bfd_size_type));
+static long ieee_canonicalize_reloc
+ PARAMS ((bfd *, sec_ptr, arelent **, asymbol **));
+static int comp PARAMS ((const PTR, const PTR));
static boolean ieee_write_section_part PARAMS ((bfd *));
static boolean do_with_relocs PARAMS ((bfd *, asection *));
static boolean do_as_repeat PARAMS ((bfd *, asection *));
static boolean do_without_relocs PARAMS ((bfd *, asection *));
-static boolean ieee_write_external_part PARAMS ((bfd *));
-static boolean ieee_write_data_part PARAMS ((bfd *));
+static boolean ieee_mkobject PARAMS ((bfd *));
+static void fill PARAMS ((void));
+static void flush PARAMS ((void));
+static void write_int PARAMS ((int));
+static void copy_id PARAMS ((void));
+static void copy_expression PARAMS ((void));
+static void fill_int PARAMS ((struct output_buffer_struct *));
+static void drop_int PARAMS ((struct output_buffer_struct *));
+static void copy_int PARAMS ((void));
+static void f1_record PARAMS ((void));
+static void f0_record PARAMS ((void));
+static void copy_till_end PARAMS ((void));
+static void f2_record PARAMS ((void));
+static void f8_record PARAMS ((void));
+static void e2_record PARAMS ((void));
+static void block PARAMS ((void));
+static void relocate_debug PARAMS ((bfd *, bfd *));
static boolean ieee_write_debug_part PARAMS ((bfd *));
+static boolean ieee_write_data_part PARAMS ((bfd *));
+static boolean init_for_output PARAMS ((bfd *));
+static boolean ieee_set_section_contents
+ PARAMS ((bfd *, sec_ptr, PTR, file_ptr, bfd_size_type));
+static boolean ieee_write_external_part PARAMS ((bfd *));
static boolean ieee_write_me_part PARAMS ((bfd *));
static boolean ieee_write_processor PARAMS ((bfd *));
-
-static boolean ieee_slurp_debug PARAMS ((bfd *));
-static boolean ieee_slurp_section_data PARAMS ((bfd *));
+static boolean ieee_write_object_contents PARAMS ((bfd *));
+static asymbol *ieee_make_empty_symbol PARAMS ((bfd *));
+static bfd *ieee_openr_next_archived_file PARAMS ((bfd *, bfd *));
+static boolean ieee_find_nearest_line
+ PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
+ const char **, unsigned int *));
+static int ieee_generic_stat_arch_elt PARAMS ((bfd *, struct stat *));
+static int ieee_sizeof_headers PARAMS ((bfd *, boolean));
/* Functions for writing to ieee files in the strange way that the
standard requires. */
@@ -67,7 +134,7 @@ ieee_write_byte (abfd, barg)
bfd_byte byte;
byte = barg;
- if (bfd_write ((PTR) &byte, 1, 1, abfd) != 1)
+ if (bfd_bwrite ((PTR) &byte, (bfd_size_type) 1, abfd) != 1)
return false;
return true;
}
@@ -81,7 +148,7 @@ ieee_write_2bytes (abfd, bytes)
buffer[0] = bytes >> 8;
buffer[1] = bytes & 0xff;
- if (bfd_write ((PTR) buffer, 1, 2, abfd) != 2)
+ if (bfd_bwrite ((PTR) buffer, (bfd_size_type) 2, abfd) != 2)
return false;
return true;
}
@@ -171,7 +238,7 @@ ieee_write_id (abfd, id)
return false;
}
- if (bfd_write ((PTR) id, 1, length, abfd) != length)
+ if (bfd_bwrite ((PTR) id, (bfd_size_type) length, abfd) != length)
return false;
return true;
}
@@ -230,7 +297,7 @@ read_id (ieee)
length = (length * 256) + this_byte_and_next (ieee);
}
/* Buy memory and read string */
- string = bfd_alloc (ieee->abfd, length + 1);
+ string = bfd_alloc (ieee->abfd, (bfd_size_type) length + 1);
if (!string)
return NULL;
bfd_get_string (ieee, string, length);
@@ -316,7 +383,7 @@ ieee_write_expression (abfd, value, symbol, pcrel, index)
/* Handle the degenerate case of a 0 address. */
if (term_count == 0)
{
- if (! ieee_write_int (abfd, 0))
+ if (! ieee_write_int (abfd, (bfd_vma) 0))
return false;
}
@@ -355,7 +422,7 @@ ieee_write_int5_out (abfd, value)
bfd_byte b[5];
ieee_write_int5 (b, value);
- if (bfd_write ((PTR) b, 1, 5, abfd) != 5)
+ if (bfd_bwrite ((PTR) b, (bfd_size_type) 5, abfd) != 5)
return false;
return true;
}
@@ -543,8 +610,9 @@ parse_expression (ieee, value, symbol, pcrel, extra, section)
#define PUSH(x,y,z) TOS.symbol=x;TOS.section=y;TOS.value=z;INC;
#define POP(x,y,z) DEC;x=TOS.symbol;y=TOS.section;z=TOS.value;
ieee_value_type *sp = stack;
+ asection *dummy;
- while (loop)
+ while (loop && ieee->h.input_p < ieee->h.last_byte)
{
switch (this_byte (&(ieee->h)))
{
@@ -637,70 +705,85 @@ parse_expression (ieee, value, symbol, pcrel, extra, section)
}
else
{
- /*
- Thats all that we can understand. As far as I can see
- there is a bug in the Microtec IEEE output which I'm
- using to scan, whereby the comma operator is omitted
- sometimes in an expression, giving expressions with too
- many terms. We can tell if that's the case by ensuring
- that sp == stack here. If not, then we've pushed
- something too far, so we keep adding. */
-
- while (sp != stack + 1)
- {
- asection *section1;
- ieee_symbol_index_type sy1;
- POP (sy1, section1, *extra);
- }
- {
- asection *dummy;
-
- POP (*symbol, dummy, *value);
- if (section)
- *section = dummy;
- }
-
+ /* Thats all that we can understand. */
loop = false;
}
}
}
}
+
+ /* As far as I can see there is a bug in the Microtec IEEE output
+ which I'm using to scan, whereby the comma operator is omitted
+ sometimes in an expression, giving expressions with too many
+ terms. We can tell if that's the case by ensuring that
+ sp == stack here. If not, then we've pushed something too far,
+ so we keep adding. */
+
+ while (sp != stack + 1)
+ {
+ asection *section1;
+ ieee_symbol_index_type sy1;
+ POP (sy1, section1, *extra);
+ }
+
+ POP (*symbol, dummy, *value);
+ if (section)
+ *section = dummy;
}
-#define ieee_seek(abfd, offset) \
- IEEE_DATA(abfd)->h.input_p = IEEE_DATA(abfd)->h.first_byte + offset
+#define ieee_seek(ieee, offset) \
+ do \
+ { \
+ ieee->h.input_p = ieee->h.first_byte + offset; \
+ ieee->h.last_byte = (ieee->h.first_byte \
+ + ieee_part_after (ieee, offset)); \
+ } \
+ while (0)
+
+#define ieee_pos(ieee) \
+ (ieee->h.input_p - ieee->h.first_byte)
+
+/* Find the first part of the ieee file after HERE. */
-#define ieee_pos(abfd) \
- (IEEE_DATA(abfd)->h.input_p - IEEE_DATA(abfd)->h.first_byte)
+static file_ptr
+ieee_part_after (ieee, here)
+ ieee_data_type *ieee;
+ file_ptr here;
+{
+ int part;
+ file_ptr after = ieee->w.r.me_record;
+
+ /* File parts can come in any order, except that module end is
+ guaranteed to be last (and the header first). */
+ for (part = 0; part < N_W_VARIABLES; part++)
+ if (ieee->w.offset[part] > here && after > ieee->w.offset[part])
+ after = ieee->w.offset[part];
+
+ return after;
+}
static unsigned int last_index;
static char last_type; /* is the index for an X or a D */
static ieee_symbol_type *
-get_symbol (abfd,
- ieee,
- last_symbol,
- symbol_count,
- pptr,
- max_index,
- this_type
-)
+get_symbol (abfd, ieee, last_symbol, symbol_count, pptr, max_index, this_type)
bfd *abfd ATTRIBUTE_UNUSED;
ieee_data_type *ieee;
ieee_symbol_type *last_symbol;
unsigned int *symbol_count;
ieee_symbol_type ***pptr;
unsigned int *max_index;
- char this_type
- ;
+ int this_type;
{
/* Need a new symbol */
unsigned int new_index = must_parse_int (&(ieee->h));
if (new_index != last_index || this_type != last_type)
{
- ieee_symbol_type *new_symbol = (ieee_symbol_type *) bfd_alloc (ieee->h.abfd,
- sizeof (ieee_symbol_type));
+ ieee_symbol_type *new_symbol;
+ bfd_size_type amt = sizeof (ieee_symbol_type);
+
+ new_symbol = (ieee_symbol_type *) bfd_alloc (ieee->h.abfd, amt);
if (!new_symbol)
return NULL;
@@ -735,7 +818,7 @@ ieee_slurp_external_symbols (abfd)
last_index = 0xffffff;
ieee->symbol_table_full = true;
- ieee_seek (abfd, offset);
+ ieee_seek (ieee, offset);
while (loop)
{
@@ -777,7 +860,7 @@ ieee_slurp_external_symbols (abfd)
unsigned int symbol_type_index;
unsigned int symbol_attribute_def;
bfd_vma value;
- switch (read_2bytes (ieee))
+ switch (read_2bytes (&ieee->h))
{
case ieee_attribute_record_enum:
symbol_name_index = must_parse_int (&(ieee->h));
@@ -792,7 +875,7 @@ ieee_slurp_external_symbols (abfd)
default:
(*_bfd_error_handler)
(_("%s: unimplemented ATI record %u for symbol %u"),
- bfd_get_filename (abfd), symbol_attribute_def,
+ bfd_archive_filename (abfd), symbol_attribute_def,
symbol_name_index);
bfd_set_error (bfd_error_bad_value);
return false;
@@ -817,7 +900,7 @@ ieee_slurp_external_symbols (abfd)
{
(*_bfd_error_handler)
(_("%s: unexpected ATN type %d in external part"),
- bfd_get_filename (abfd), (int) value);
+ bfd_archive_filename (abfd), (int) value);
bfd_set_error (bfd_error_bad_value);
return false;
}
@@ -829,7 +912,7 @@ ieee_slurp_external_symbols (abfd)
--value;
- switch (read_2bytes (ieee))
+ switch (read_2bytes (&ieee->h))
{
case ieee_asn_record_enum:
parse_int (&ieee->h, &val1);
@@ -839,7 +922,7 @@ ieee_slurp_external_symbols (abfd)
default:
(*_bfd_error_handler)
(_("%s: unexpected type after ATN"),
- bfd_get_filename (abfd));
+ bfd_archive_filename (abfd));
bfd_set_error (bfd_error_bad_value);
return false;
}
@@ -984,7 +1067,7 @@ ieee_slurp_symbol_table (abfd)
return true;
}
-long
+static long
ieee_get_symtab_upper_bound (abfd)
bfd *abfd;
{
@@ -1002,7 +1085,7 @@ symbol index order
extern const bfd_target ieee_vec;
-long
+static long
ieee_get_symtab (abfd, location)
bfd *abfd;
asymbol **location;
@@ -1079,6 +1162,7 @@ get_section_entry (abfd, ieee, index)
{
unsigned int c, i;
asection **n;
+ bfd_size_type amt;
c = ieee->section_table_size;
if (c == 0)
@@ -1086,8 +1170,9 @@ get_section_entry (abfd, ieee, index)
while (c <= index)
c *= 2;
- n = ((asection **)
- bfd_realloc (ieee->section_table, c * sizeof (asection *)));
+ amt = c;
+ amt *= sizeof (asection *);
+ n = (asection **) bfd_realloc (ieee->section_table, amt);
if (n == NULL)
return NULL;
@@ -1100,7 +1185,7 @@ get_section_entry (abfd, ieee, index)
if (ieee->section_table[index] == (asection *) NULL)
{
- char *tmp = bfd_alloc (abfd, 11);
+ char *tmp = bfd_alloc (abfd, (bfd_size_type) 11);
asection *section;
if (!tmp)
@@ -1121,19 +1206,19 @@ ieee_slurp_sections (abfd)
{
ieee_data_type *ieee = IEEE_DATA (abfd);
file_ptr offset = ieee->w.r.section_part;
- asection *section = (asection *) NULL;
char *name;
if (offset != 0)
{
bfd_byte section_type[3];
- ieee_seek (abfd, offset);
+ ieee_seek (ieee, offset);
while (true)
{
switch (this_byte (&(ieee->h)))
{
case ieee_section_type_enum:
{
+ asection *section;
unsigned int section_index;
next_byte (&(ieee->h));
section_index = must_parse_int (&(ieee->h));
@@ -1233,8 +1318,10 @@ ieee_slurp_sections (abfd)
break;
case ieee_e2_first_byte_enum:
{
- ieee_record_enum_type t = (ieee_record_enum_type) (read_2bytes (&(ieee->h)));
+ asection *section;
+ ieee_record_enum_type t;
+ t = (ieee_record_enum_type) (read_2bytes (&(ieee->h)));
switch (t)
{
case ieee_section_size_enum:
@@ -1301,11 +1388,7 @@ ieee_slurp_debug (abfd)
sec->flags |= SEC_DEBUGGING | SEC_HAS_CONTENTS;
sec->filepos = 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;
+ debug_end = ieee_part_after (ieee, ieee->w.r.debug_information_part);
sec->_raw_size = debug_end - ieee->w.r.debug_information_part;
return true;
@@ -1325,18 +1408,18 @@ ieee_archive_p (abfd)
file_ptr buffer_offset = 0;
ieee_ar_data_type *save = abfd->tdata.ieee_ar_data;
ieee_ar_data_type *ieee;
- unsigned int alc_elts;
+ bfd_size_type alc_elts;
ieee_ar_obstack_type *elts = NULL;
+ bfd_size_type amt = sizeof (ieee_ar_data_type);
- abfd->tdata.ieee_ar_data =
- (ieee_ar_data_type *) bfd_alloc (abfd, sizeof (ieee_ar_data_type));
+ abfd->tdata.ieee_ar_data = (ieee_ar_data_type *) bfd_alloc (abfd, amt);
if (!abfd->tdata.ieee_ar_data)
goto error_return;
ieee = IEEE_AR_DATA (abfd);
- /* FIXME: Check return value. I'm not sure whether it needs to read
- the entire buffer or not. */
- bfd_read ((PTR) buffer, 1, sizeof (buffer), abfd);
+ /* Ignore the return value here. It doesn't matter if we don't read
+ the entire buffer. We might have a very small ieee file. */
+ bfd_bread ((PTR) buffer, (bfd_size_type) sizeof (buffer), abfd);
ieee->h.first_byte = buffer;
ieee->h.input_p = buffer;
@@ -1396,29 +1479,27 @@ ieee_archive_p (abfd)
t->abfd = (bfd *) NULL;
/* Make sure that we don't go over the end of the buffer. */
- if ((size_t) ieee_pos (abfd) > sizeof (buffer) / 2)
+ if ((size_t) ieee_pos (IEEE_DATA (abfd)) > sizeof (buffer) / 2)
{
/* Past half way, reseek and reprime. */
- buffer_offset += ieee_pos (abfd);
+ buffer_offset += ieee_pos (IEEE_DATA (abfd));
if (bfd_seek (abfd, buffer_offset, SEEK_SET) != 0)
goto error_return;
- /* FIXME: Check return value. I'm not sure whether it needs
- to read the entire buffer or not. */
- bfd_read ((PTR) buffer, 1, sizeof (buffer), abfd);
+ /* Again ignore return value of bfd_bread. */
+ bfd_bread ((PTR) buffer, (bfd_size_type) sizeof (buffer), abfd);
ieee->h.first_byte = buffer;
ieee->h.input_p = buffer;
}
}
- ieee->elements = ((ieee_ar_obstack_type *)
- bfd_alloc (abfd,
- ieee->element_count * sizeof *ieee->elements));
+ amt = ieee->element_count;
+ amt *= sizeof *ieee->elements;
+ ieee->elements = (ieee_ar_obstack_type *) bfd_alloc (abfd, amt);
if (ieee->elements == NULL)
goto error_return;
- memcpy (ieee->elements, elts,
- ieee->element_count * sizeof *ieee->elements);
+ memcpy (ieee->elements, elts, (size_t) amt);
free (elts);
elts = NULL;
@@ -1428,16 +1509,15 @@ ieee_archive_p (abfd)
if (bfd_seek (abfd, ieee->elements[i].file_offset, SEEK_SET) != 0)
goto error_return;
- /* FIXME: Check return value. I'm not sure whether it needs to
- read the entire buffer or not. */
- bfd_read ((PTR) buffer, 1, sizeof (buffer), abfd);
+ /* Again ignore return value of bfd_bread. */
+ bfd_bread ((PTR) buffer, (bfd_size_type) sizeof (buffer), abfd);
ieee->h.first_byte = buffer;
ieee->h.input_p = buffer;
next_byte (&(ieee->h)); /* Drop F8. */
next_byte (&(ieee->h)); /* Drop 14. */
must_parse_int (&(ieee->h)); /* Drop size of block. */
-
+
if (must_parse_int (&(ieee->h)) != 0)
/* This object has been deleted. */
ieee->elements[i].file_offset = 0;
@@ -1461,14 +1541,6 @@ ieee_archive_p (abfd)
return NULL;
}
-static boolean
-ieee_mkobject (abfd)
- bfd *abfd;
-{
- abfd->tdata.ieee_data = (ieee_data_type *) bfd_zalloc (abfd, sizeof (ieee_data_type));
- return abfd->tdata.ieee_data ? true : false;
-}
-
const bfd_target *
ieee_object_p (abfd)
bfd *abfd;
@@ -1478,6 +1550,7 @@ ieee_object_p (abfd)
ieee_data_type *ieee;
unsigned char buffer[300];
ieee_data_type *save = IEEE_DATA (abfd);
+ bfd_size_type amt;
abfd->tdata.ieee_data = 0;
ieee_mkobject (abfd);
@@ -1485,10 +1558,9 @@ ieee_object_p (abfd)
ieee = IEEE_DATA (abfd);
if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
goto fail;
- /* Read the first few bytes in to see if it makes sense */
- /* FIXME: Check return value. I'm not sure whether it needs to read
- the entire buffer or not. */
- bfd_read ((PTR) buffer, 1, sizeof (buffer), abfd);
+ /* Read the first few bytes in to see if it makes sense. Ignore
+ bfd_bread return value; The file might be very small. */
+ bfd_bread ((PTR) buffer, (bfd_size_type) sizeof (buffer), abfd);
ieee->h.input_p = buffer;
if (this_byte_and_next (&(ieee->h)) != Module_Beginning)
@@ -1509,7 +1581,7 @@ ieee_object_p (abfd)
if (strcmp (processor, "LIBRARY") == 0)
goto got_wrong_format;
ieee->mb.module_name = read_id (&(ieee->h));
- if (abfd->filename == (CONST char *) NULL)
+ if (abfd->filename == (const char *) NULL)
{
abfd->filename = ieee->mb.module_name;
}
@@ -1553,12 +1625,12 @@ ieee_object_p (abfd)
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')))
+ 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);
@@ -1633,16 +1705,17 @@ ieee_object_p (abfd)
quickly. We can work out how big the file is from the trailer
record */
+ amt = ieee->w.r.me_record + 1;
IEEE_DATA (abfd)->h.first_byte =
- (unsigned char *) bfd_alloc (ieee->h.abfd, ieee->w.r.me_record + 1);
+ (unsigned char *) bfd_alloc (ieee->h.abfd, amt);
if (!IEEE_DATA (abfd)->h.first_byte)
goto fail;
if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
goto fail;
/* FIXME: Check return value. I'm not sure whether it needs to read
the entire buffer or not. */
- bfd_read ((PTR) (IEEE_DATA (abfd)->h.first_byte), 1,
- ieee->w.r.me_record + 1, abfd);
+ bfd_bread ((PTR) (IEEE_DATA (abfd)->h.first_byte),
+ (bfd_size_type) ieee->w.r.me_record + 1, abfd);
ieee_slurp_sections (abfd);
@@ -1654,7 +1727,7 @@ ieee_object_p (abfd)
if (! ieee_slurp_section_data (abfd))
goto fail;
-
+
return abfd->xvec;
got_wrong_format:
bfd_set_error (bfd_error_wrong_format);
@@ -1664,7 +1737,7 @@ fail:
return (const bfd_target *) NULL;
}
-void
+static void
ieee_get_symbol_info (ignore_abfd, symbol, ret)
bfd *ignore_abfd ATTRIBUTE_UNUSED;
asymbol *symbol;
@@ -1677,9 +1750,9 @@ ieee_get_symbol_info (ignore_abfd, symbol, ret)
ret->type = (symbol->flags & BSF_LOCAL) ? 'a' : 'A';
}
-void
-ieee_print_symbol (ignore_abfd, afile, symbol, how)
- bfd *ignore_abfd ATTRIBUTE_UNUSED;
+static void
+ieee_print_symbol (abfd, afile, symbol, how)
+ bfd *abfd;
PTR afile;
asymbol *symbol;
bfd_print_symbol_type how;
@@ -1710,7 +1783,7 @@ ieee_print_symbol (ignore_abfd, afile, symbol, how)
}
else
{
- bfd_print_symbol_vandf ((PTR) file, symbol);
+ bfd_print_symbol_vandf (abfd, (PTR) file, symbol);
fprintf (file, " %-5s %04x %02x %s",
section_name,
@@ -1765,9 +1838,10 @@ do_one (ieee, current_map, location_ptr, s, iterations)
unsigned int extra = 4;
boolean pcrel = false;
asection *section;
- ieee_reloc_type *r =
- (ieee_reloc_type *) bfd_alloc (ieee->h.abfd,
- sizeof (ieee_reloc_type));
+ ieee_reloc_type *r;
+ bfd_size_type amt = sizeof (ieee_reloc_type);
+
+ r = (ieee_reloc_type *) bfd_alloc (ieee->h.abfd, amt);
if (!r)
return false;
@@ -1824,21 +1898,20 @@ do_one (ieee, current_map, location_ptr, s, iterations)
if (pcrel == true)
{
#if KEEPMINUSPCININST
- bfd_put_32 (ieee->h.abfd, -current_map->pc, location_ptr +
- current_map->pc);
+ bfd_put_32 (ieee->h.abfd, -current_map->pc,
+ location_ptr + current_map->pc);
r->relent.howto = &rel32_howto;
- r->relent.addend -=
- current_map->pc;
+ r->relent.addend -= current_map->pc;
#else
- bfd_put_32 (ieee->h.abfd, 0, location_ptr +
+ bfd_put_32 (ieee->h.abfd, (bfd_vma) 0, location_ptr +
current_map->pc);
r->relent.howto = &rel32_howto;
#endif
}
else
{
- bfd_put_32 (ieee->h.abfd, 0, location_ptr +
- current_map->pc);
+ bfd_put_32 (ieee->h.abfd, (bfd_vma) 0,
+ location_ptr + current_map->pc);
r->relent.howto = &abs32_howto;
}
current_map->pc += 4;
@@ -1847,19 +1920,22 @@ do_one (ieee, current_map, location_ptr, s, iterations)
if (pcrel == true)
{
#if KEEPMINUSPCININST
- bfd_put_16 (ieee->h.abfd, (int) (-current_map->pc), location_ptr + current_map->pc);
+ bfd_put_16 (ieee->h.abfd, (bfd_vma) -current_map->pc,
+ location_ptr + current_map->pc);
r->relent.addend -= current_map->pc;
r->relent.howto = &rel16_howto;
#else
- bfd_put_16 (ieee->h.abfd, 0, location_ptr + current_map->pc);
+ bfd_put_16 (ieee->h.abfd, (bfd_vma) 0,
+ location_ptr + current_map->pc);
r->relent.howto = &rel16_howto;
#endif
}
else
{
- bfd_put_16 (ieee->h.abfd, 0, location_ptr + current_map->pc);
+ bfd_put_16 (ieee->h.abfd, (bfd_vma) 0,
+ location_ptr + current_map->pc);
r->relent.howto = &abs16_howto;
}
current_map->pc += 2;
@@ -1934,7 +2010,7 @@ ieee_slurp_section_data (abfd)
if (ieee->read_data == true)
return true;
ieee->read_data = true;
- ieee_seek (abfd, ieee->w.r.data_part);
+ ieee_seek (ieee, ieee->w.r.data_part);
/* Allocate enough space for all the section contents */
@@ -1983,7 +2059,7 @@ ieee_slurp_section_data (abfd)
unsigned int extra;
boolean pcrel;
next_byte (&(ieee->h));
- must_parse_int (&(ieee->h)); /* Thow away section #*/
+ must_parse_int (&(ieee->h)); /* Throw away section #*/
parse_expression (ieee, &value,
&symbol,
&pcrel, &extra,
@@ -2036,7 +2112,7 @@ ieee_slurp_section_data (abfd)
{
ieee->h.input_p = start;
if (!do_one (ieee, current_map, location_ptr, s,
- iterations))
+ (int) iterations))
return false;
iterations--;
}
@@ -2053,13 +2129,13 @@ ieee_slurp_section_data (abfd)
}
}
-boolean
+static boolean
ieee_new_section_hook (abfd, newsect)
bfd *abfd;
asection *newsect;
{
newsect->used_by_bfd = (PTR)
- bfd_alloc (abfd, sizeof (ieee_per_section_type));
+ bfd_alloc (abfd, (bfd_size_type) sizeof (ieee_per_section_type));
if (!newsect->used_by_bfd)
return false;
ieee_per_section (newsect)->data = (bfd_byte *) NULL;
@@ -2067,7 +2143,7 @@ ieee_new_section_hook (abfd, newsect)
return true;
}
-long
+static long
ieee_get_reloc_upper_bound (abfd, asect)
bfd *abfd;
sec_ptr asect;
@@ -2096,7 +2172,7 @@ ieee_get_section_contents (abfd, section, location, offset, count)
return true;
}
-long
+static long
ieee_canonicalize_reloc (abfd, section, relptr, symbols)
bfd *abfd;
sec_ptr section;
@@ -2141,8 +2217,8 @@ ieee_canonicalize_reloc (abfd, section, relptr, symbols)
static int
comp (ap, bp)
- CONST PTR ap;
- CONST PTR bp;
+ const PTR ap;
+ const PTR bp;
{
arelent *a = *((arelent **) ap);
arelent *b = *((arelent **) bp);
@@ -2215,7 +2291,7 @@ ieee_write_section_part (abfd)
|| ! ieee_write_byte (abfd,
(bfd_byte) (s->index
+ IEEE_SECTION_NUMBER_BASE))
- || ! ieee_write_int (abfd, 1 << s->alignment_power))
+ || ! ieee_write_int (abfd, (bfd_vma) 1 << s->alignment_power))
return false;
/* Size */
@@ -2269,6 +2345,7 @@ do_with_relocs (abfd, s)
|| ! ieee_write_byte (abfd,
(bfd_byte) (s->index + IEEE_SECTION_NUMBER_BASE)))
return false;
+
if ((abfd->flags & EXEC_P) != 0 && relocs_to_go == 0)
{
if (! ieee_write_int (abfd, s->lma))
@@ -2276,7 +2353,7 @@ do_with_relocs (abfd, s)
}
else
{
- if (! ieee_write_expression (abfd, 0, s->symbol, 0, 0))
+ if (! ieee_write_expression (abfd, (bfd_vma) 0, s->symbol, 0, 0))
return false;
}
@@ -2302,10 +2379,7 @@ do_with_relocs (abfd, s)
/* Output a stream of bytes */
if (! ieee_write_int (abfd, run))
return false;
- if (bfd_write ((PTR) (stream + current_byte_index),
- 1,
- run,
- abfd)
+ if (bfd_bwrite ((PTR) (stream + current_byte_index), run, abfd)
!= run)
return false;
current_byte_index += run;
@@ -2353,10 +2427,7 @@ do_with_relocs (abfd, s)
/* Output a stream of bytes */
if (! ieee_write_int (abfd, run))
return false;
- if (bfd_write ((PTR) (stream + current_byte_index),
- 1,
- run,
- abfd)
+ if (bfd_bwrite ((PTR) (stream + current_byte_index), run, abfd)
!= run)
return false;
current_byte_index += run;
@@ -2418,7 +2489,7 @@ do_with_relocs (abfd, s)
if (! ieee_write_expression (abfd, r->addend + ov,
*(r->sym_ptr_ptr),
r->howto->pc_relative,
- s->index))
+ (unsigned) s->index))
return false;
}
else
@@ -2426,15 +2497,15 @@ do_with_relocs (abfd, s)
if (! ieee_write_expression (abfd, r->addend + ov,
(asymbol *) NULL,
r->howto->pc_relative,
- s->index))
+ (unsigned) s->index))
return false;
}
if (number_of_maus_in_address
!= bfd_get_reloc_size (r->howto))
{
- if (! ieee_write_int (abfd,
- bfd_get_reloc_size (r->howto)))
+ bfd_vma rsize = bfd_get_reloc_size (r->howto);
+ if (! ieee_write_int (abfd, rsize))
return false;
}
if (! ieee_write_byte (abfd,
@@ -2471,9 +2542,21 @@ do_as_repeat (abfd, s)
|| ! ieee_write_byte (abfd, ieee_set_current_pc_enum & 0xff)
|| ! ieee_write_byte (abfd,
(bfd_byte) (s->index
- + IEEE_SECTION_NUMBER_BASE))
- || ! ieee_write_int (abfd, s->lma)
- || ! ieee_write_byte (abfd, ieee_repeat_data_enum)
+ + IEEE_SECTION_NUMBER_BASE)))
+ return false;
+
+ if ((abfd->flags & EXEC_P) != 0)
+ {
+ if (! ieee_write_int (abfd, s->lma))
+ return false;
+ }
+ else
+ {
+ if (! ieee_write_expression (abfd, (bfd_vma) 0, s->symbol, 0, 0))
+ return false;
+ }
+
+ if (! ieee_write_byte (abfd, ieee_repeat_data_enum)
|| ! ieee_write_int (abfd, s->_raw_size)
|| ! ieee_write_byte (abfd, ieee_load_constant_bytes_enum)
|| ! ieee_write_byte (abfd, 1)
@@ -2526,20 +2609,41 @@ static bfd *input_bfd;
static bfd *output_bfd;
static int output_buffer;
+static boolean
+ieee_mkobject (abfd)
+ bfd *abfd;
+{
+ bfd_size_type amt;
+
+ output_ptr_start = NULL;
+ output_ptr = NULL;
+ output_ptr_end = NULL;
+ input_ptr_start = NULL;
+ input_ptr = NULL;
+ input_ptr_end = NULL;
+ input_bfd = NULL;
+ output_bfd = NULL;
+ output_buffer = 0;
+ amt = sizeof (ieee_data_type);
+ abfd->tdata.ieee_data = (ieee_data_type *) bfd_zalloc (abfd, amt);
+ return abfd->tdata.ieee_data ? true : false;
+}
+
static void
fill ()
{
+ bfd_size_type amt = input_ptr_end - input_ptr_start;
/* FIXME: Check return value. I'm not sure whether it needs to read
the entire buffer or not. */
- bfd_read ((PTR) input_ptr_start, 1, input_ptr_end - input_ptr_start, input_bfd);
+ bfd_bread ((PTR) input_ptr_start, amt, input_bfd);
input_ptr = input_ptr_start;
}
+
static void
flush ()
{
- if (bfd_write ((PTR) (output_ptr_start), 1, output_ptr - output_ptr_start,
- output_bfd)
- != (bfd_size_type) (output_ptr - output_ptr_start))
+ bfd_size_type amt = output_ptr - output_ptr_start;
+ if (bfd_bwrite ((PTR) (output_ptr_start), amt, output_bfd) != amt)
abort ();
output_ptr = output_ptr_start;
output_buffer++;
@@ -2614,7 +2718,7 @@ copy_expression ()
{
int stack[10];
int *tos = stack;
- int value = 0;
+ int value;
while (1)
{
switch (THIS ())
@@ -2668,16 +2772,13 @@ copy_expression ()
}
*tos++ = THIS ();
NEXT ();
- value = 0;
break;
case 0xa5:
/* PLUS anything */
- {
- int value = *(--tos);
- value += *(--tos);
- *tos++ = value;
- NEXT ();
- }
+ value = *(--tos);
+ value += *(--tos);
+ *tos++ = value;
+ NEXT ();
break;
case VAR ('R'):
{
@@ -2690,17 +2791,11 @@ copy_expression ()
NEXT ();
ieee = IEEE_DATA (input_bfd);
s = ieee->section_table[section_number];
+ value = 0;
if (s->output_section)
- {
- value = s->output_section->lma;
- }
- else
- {
- value = 0;
- }
+ value = s->output_section->lma;
value += s->output_offset;
*tos++ = value;
- value = 0;
}
break;
case 0x90:
@@ -2709,22 +2804,14 @@ copy_expression ()
write_int (*(--tos));
OUT (0x90);
return;
-
}
}
}
-
}
/* Drop the int in the buffer, and copy a null into the gap, which we
will overwrite later */
-struct output_buffer_struct
-{
- unsigned char *ptrp;
- int buffer;
-};
-
static void
fill_int (buf)
struct output_buffer_struct *buf;
@@ -2812,7 +2899,6 @@ copy_int ()
#define ID copy_id()
#define INT copy_int()
#define EXP copy_expression()
-static void copy_till_end ();
#define INTn(q) copy_int()
#define EXPn(q) copy_expression()
@@ -2978,7 +3064,6 @@ f2_record ()
}
-static void block ();
static void
f8_record ()
{
@@ -3189,7 +3274,7 @@ relocate_debug (output, input)
input_bfd = input;
/* FIXME: Check return value. I'm not sure whether it needs to read
the entire buffer or not. */
- bfd_read ((PTR) input_ptr_start, 1, IBS, input);
+ bfd_bread ((PTR) input_ptr_start, (bfd_size_type) IBS, input);
block ();
}
@@ -3202,13 +3287,13 @@ ieee_write_debug_part (abfd)
{
ieee_data_type *ieee = IEEE_DATA (abfd);
bfd_chain_type *chain = ieee->chain_root;
- unsigned char output_buffer[OBS];
+ unsigned char obuff[OBS];
boolean some_debug = false;
file_ptr here = bfd_tell (abfd);
- output_ptr_start = output_ptr = output_buffer;
- output_ptr_end = output_buffer + OBS;
- output_ptr = output_buffer;
+ output_ptr_start = output_ptr = obuff;
+ output_ptr_end = obuff + OBS;
+ output_ptr = obuff;
output_bfd = abfd;
if (chain == (bfd_chain_type *) NULL)
@@ -3225,7 +3310,7 @@ ieee_write_debug_part (abfd)
}
ieee->w.r.debug_information_part = here;
- if (bfd_write (s->contents, 1, s->_raw_size, abfd) != s->_raw_size)
+ if (bfd_bwrite (s->contents, s->_raw_size, abfd) != s->_raw_size)
return false;
}
else
@@ -3237,8 +3322,7 @@ ieee_write_debug_part (abfd)
if (entry_ieee->w.r.debug_information_part)
{
if (bfd_seek (entry, entry_ieee->w.r.debug_information_part,
- SEEK_SET)
- != 0)
+ SEEK_SET) != 0)
return false;
relocate_debug (abfd, entry);
}
@@ -3305,7 +3389,8 @@ init_for_output (abfd)
continue;
if (s->_raw_size != 0)
{
- ieee_per_section (s)->data = (bfd_byte *) (bfd_alloc (abfd, s->_raw_size));
+ bfd_size_type size = s->_raw_size;
+ ieee_per_section (s)->data = (bfd_byte *) (bfd_alloc (abfd, size));
if (!ieee_per_section (s)->data)
return false;
}
@@ -3318,7 +3403,7 @@ init_for_output (abfd)
/* set section contents is complicated with IEEE since the format is
* not a byte image, but a record stream.
*/
-boolean
+static boolean
ieee_set_section_contents (abfd, section, location, offset, count)
bfd *abfd;
sec_ptr section;
@@ -3330,14 +3415,14 @@ ieee_set_section_contents (abfd, section, location, offset, count)
{
if (section->contents == NULL)
{
- section->contents = ((unsigned char *)
- bfd_alloc (abfd, section->_raw_size));
+ bfd_size_type size = section->_raw_size;
+ section->contents = (unsigned char *) bfd_alloc (abfd, size);
if (section->contents == NULL)
return false;
}
/* bfd_set_section_contents has already checked that everything
is within range. */
- memcpy (section->contents + offset, location, count);
+ memcpy (section->contents + offset, location, (size_t) count);
return true;
}
@@ -3378,7 +3463,7 @@ ieee_write_external_part (abfd)
{
/* This must be a symbol reference .. */
if (! ieee_write_byte (abfd, ieee_external_reference_enum)
- || ! ieee_write_int (abfd, reference_index)
+ || ! ieee_write_int (abfd, (bfd_vma) reference_index)
|| ! ieee_write_id (abfd, p->name))
return false;
p->value = reference_index;
@@ -3389,11 +3474,11 @@ ieee_write_external_part (abfd)
{
/* This is a weak reference */
if (! ieee_write_byte (abfd, ieee_external_reference_enum)
- || ! ieee_write_int (abfd, reference_index)
+ || ! ieee_write_int (abfd, (bfd_vma) reference_index)
|| ! ieee_write_id (abfd, p->name)
|| ! ieee_write_byte (abfd,
ieee_weak_external_reference_enum)
- || ! ieee_write_int (abfd, reference_index)
+ || ! ieee_write_int (abfd, (bfd_vma) reference_index)
|| ! ieee_write_int (abfd, p->value))
return false;
p->value = reference_index;
@@ -3405,10 +3490,10 @@ ieee_write_external_part (abfd)
/* This must be a symbol definition */
if (! ieee_write_byte (abfd, ieee_external_symbol_enum)
- || ! ieee_write_int (abfd, public_index)
+ || ! ieee_write_int (abfd, (bfd_vma) public_index)
|| ! ieee_write_id (abfd, p->name)
|| ! ieee_write_2bytes (abfd, ieee_attribute_record_enum)
- || ! ieee_write_int (abfd, public_index)
+ || ! ieee_write_int (abfd, (bfd_vma) public_index)
|| ! ieee_write_byte (abfd, 15) /* instruction address */
|| ! ieee_write_byte (abfd, 19) /* static symbol */
|| ! ieee_write_byte (abfd, 1)) /* one of them */
@@ -3416,7 +3501,7 @@ ieee_write_external_part (abfd)
/* Write out the value */
if (! ieee_write_2bytes (abfd, ieee_value_record_enum)
- || ! ieee_write_int (abfd, public_index))
+ || ! ieee_write_int (abfd, (bfd_vma) public_index))
return false;
if (! bfd_is_abs_section (p->section))
{
@@ -3467,7 +3552,7 @@ ieee_write_external_part (abfd)
}
-static CONST unsigned char exten[] =
+static const unsigned char exten[] =
{
0xf0, 0x20, 0x00,
0xf1, 0xce, 0x20, 0x00, 37, 3, 3, /* Set version 3 rev 3 */
@@ -3475,7 +3560,7 @@ static CONST unsigned char exten[] =
0xf1, 0xce, 0x20, 0x00, 38 /* set object type relocateable to x */
};
-static CONST unsigned char envi[] =
+static const unsigned char envi[] =
{
0xf0, 0x21, 0x00,
@@ -3597,7 +3682,7 @@ ieee_write_processor (abfd)
return true;
}
-boolean
+static boolean
ieee_write_object_contents (abfd)
bfd *abfd;
{
@@ -3632,7 +3717,8 @@ ieee_write_object_contents (abfd)
return false;
ieee->w.r.extension_record = bfd_tell (abfd);
- if (bfd_write ((char *) exten, 1, sizeof (exten), abfd) != sizeof (exten))
+ if (bfd_bwrite ((char *) exten, (bfd_size_type) sizeof (exten), abfd)
+ != sizeof (exten))
return false;
if (abfd->flags & EXEC_P)
{
@@ -3646,7 +3732,8 @@ ieee_write_object_contents (abfd)
}
ieee->w.r.environmental_record = bfd_tell (abfd);
- if (bfd_write ((char *) envi, 1, sizeof (envi), abfd) != sizeof (envi))
+ if (bfd_bwrite ((char *) envi, (bfd_size_type) sizeof (envi), abfd)
+ != sizeof (envi))
return false;
/* The HP emulator database requires a timestamp in the file. */
@@ -3660,12 +3747,12 @@ ieee_write_object_contents (abfd)
|| ! ieee_write_byte (abfd, 0x21)
|| ! ieee_write_byte (abfd, 0)
|| ! ieee_write_byte (abfd, 50)
- || ! ieee_write_int (abfd, t->tm_year + 1900)
- || ! ieee_write_int (abfd, t->tm_mon + 1)
- || ! ieee_write_int (abfd, t->tm_mday)
- || ! ieee_write_int (abfd, t->tm_hour)
- || ! ieee_write_int (abfd, t->tm_min)
- || ! ieee_write_int (abfd, t->tm_sec))
+ || ! ieee_write_int (abfd, (bfd_vma) (t->tm_year + 1900))
+ || ! ieee_write_int (abfd, (bfd_vma) (t->tm_mon + 1))
+ || ! ieee_write_int (abfd, (bfd_vma) t->tm_mday)
+ || ! ieee_write_int (abfd, (bfd_vma) t->tm_hour)
+ || ! ieee_write_int (abfd, (bfd_vma) t->tm_min)
+ || ! ieee_write_int (abfd, (bfd_vma) t->tm_sec))
return false;
}
@@ -3707,7 +3794,7 @@ ieee_write_object_contents (abfd)
{
if (! ieee_write_2bytes (abfd, ieee_assign_value_to_variable_enum)
|| ! ieee_write_byte (abfd, (bfd_byte) i)
- || ! ieee_write_int5_out (abfd, ieee->w.offset[i]))
+ || ! ieee_write_int5_out (abfd, (bfd_vma) ieee->w.offset[i]))
return false;
}
@@ -3720,12 +3807,12 @@ ieee_write_object_contents (abfd)
function exits. We read the strings into a buffer large enough to
hold them all plus all the cached symbol entries. */
-asymbol *
+static asymbol *
ieee_make_empty_symbol (abfd)
bfd *abfd;
{
- ieee_symbol_type *new =
- (ieee_symbol_type *) bfd_zalloc (abfd, sizeof (ieee_symbol_type));
+ bfd_size_type amt = sizeof (ieee_symbol_type);
+ ieee_symbol_type *new = (ieee_symbol_type *) bfd_zalloc (abfd, amt);
if (!new)
return NULL;
new->symbol.the_bfd = abfd;
@@ -3770,13 +3857,8 @@ ieee_openr_next_archived_file (arch, prev)
}
static boolean
-ieee_find_nearest_line (abfd,
- section,
- symbols,
- offset,
- filename_ptr,
- functionname_ptr,
- line_ptr)
+ieee_find_nearest_line (abfd, section, symbols, offset, filename_ptr,
+ functionname_ptr, line_ptr)
bfd *abfd ATTRIBUTE_UNUSED;
asection *section ATTRIBUTE_UNUSED;
asymbol **symbols ATTRIBUTE_UNUSED;
@@ -3872,7 +3954,8 @@ ieee_bfd_debug_info_accumulate (abfd, section)
/* Add to chain */
{
- bfd_chain_type *n = (bfd_chain_type *) bfd_alloc (abfd, sizeof (bfd_chain_type));
+ bfd_size_type amt = sizeof (bfd_chain_type);
+ bfd_chain_type *n = (bfd_chain_type *) bfd_alloc (abfd, amt);
if (!n)
abort (); /* FIXME */
n->this = section->owner;
@@ -3926,6 +4009,7 @@ ieee_bfd_debug_info_accumulate (abfd, section)
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_merge_sections bfd_generic_merge_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
@@ -3971,17 +4055,43 @@ const bfd_target ieee_vec =
bfd_false,
},
+ /* ieee_close_and_cleanup, ieee_bfd_free_cached_info, ieee_new_section_hook,
+ ieee_get_section_contents, ieee_get_section_contents_in_window */
BFD_JUMP_TABLE_GENERIC (ieee),
+
BFD_JUMP_TABLE_COPY (_bfd_generic),
BFD_JUMP_TABLE_CORE (_bfd_nocore),
+
+ /* ieee_slurp_armap, ieee_slurp_extended_name_table,
+ ieee_construct_extended_name_table, ieee_truncate_arname,
+ ieee_write_armap, ieee_read_ar_hdr, ieee_openr_next_archived_file,
+ ieee_get_elt_at_index, ieee_generic_stat_arch_elt,
+ ieee_update_armap_timestamp */
BFD_JUMP_TABLE_ARCHIVE (ieee),
+
+ /* ieee_get_symtab_upper_bound, ieee_get_symtab, ieee_make_empty_symbol,
+ ieee_print_symbol, ieee_get_symbol_info, ieee_bfd_is_local_label_name,
+ ieee_get_lineno, ieee_find_nearest_line, ieee_bfd_make_debug_symbol,
+ ieee_read_minisymbols, ieee_minisymbol_to_symbol */
BFD_JUMP_TABLE_SYMBOLS (ieee),
+
+ /* ieee_get_reloc_upper_bound, ieee_canonicalize_reloc,
+ ieee_bfd_reloc_type_lookup */
BFD_JUMP_TABLE_RELOCS (ieee),
+
+ /* ieee_set_arch_mach, ieee_set_section_contents */
BFD_JUMP_TABLE_WRITE (ieee),
+
+ /* ieee_sizeof_headers, ieee_bfd_get_relocated_section_contents,
+ ieee_bfd_relax_section, ieee_bfd_link_hash_table_create,
+ ieee_bfd_link_add_symbols, ieee_bfd_final_link,
+ ieee_bfd_link_split_section, ieee_bfd_gc_sections,
+ ieee_bfd_merge_sections */
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 738da81..8bb5134 100644
--- a/contrib/binutils/bfd/ihex.c
+++ b/contrib/binutils/bfd/ihex.c
@@ -1,5 +1,6 @@
/* BFD back-end for Intel Hex objects.
- Copyright 1995, 1996, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1998, 1999, 2000, 2001, 2002
+ 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.
@@ -122,8 +123,7 @@ The MRI compiler uses this, which is a repeat of type 5:
#include "sysdep.h"
#include "libbfd.h"
#include "libiberty.h"
-
-#include <ctype.h>
+#include "safe-ctype.h"
static void ihex_init PARAMS ((void));
static boolean ihex_mkobject PARAMS ((bfd *));
@@ -137,9 +137,8 @@ static boolean ihex_get_section_contents
static boolean ihex_set_section_contents
PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
static boolean ihex_write_record
- PARAMS ((bfd *, bfd_size_type, bfd_vma, unsigned int, bfd_byte *));
+ PARAMS ((bfd *, size_t, unsigned int, unsigned int, bfd_byte *));
static boolean ihex_write_object_contents PARAMS ((bfd *));
-static asymbol *ihex_make_empty_symbol PARAMS ((bfd *));
static boolean ihex_set_arch_mach
PARAMS ((bfd *, enum bfd_architecture, unsigned long));
static int ihex_sizeof_headers PARAMS ((bfd *, boolean));
@@ -197,9 +196,9 @@ ihex_mkobject (abfd)
if (abfd->tdata.ihex_data == NULL)
{
struct ihex_data_struct *tdata;
+ bfd_size_type amt = sizeof (struct ihex_data_struct);
- tdata = ((struct ihex_data_struct *)
- bfd_alloc (abfd, sizeof (struct ihex_data_struct)));
+ tdata = (struct ihex_data_struct *) bfd_alloc (abfd, amt);
if (tdata == NULL)
return false;
abfd->tdata.ihex_data = tdata;
@@ -220,7 +219,7 @@ ihex_get_byte (abfd, errorptr)
{
bfd_byte c;
- if (bfd_read (&c, 1, 1, abfd) != 1)
+ if (bfd_bread (&c, (bfd_size_type) 1, abfd) != 1)
{
if (bfd_get_error () != bfd_error_file_truncated)
*errorptr = true;
@@ -248,7 +247,7 @@ ihex_bad_byte (abfd, lineno, c, error)
{
char buf[10];
- if (! isprint (c))
+ if (! ISPRINT (c))
sprintf (buf, "\\%03o", (unsigned int) c);
else
{
@@ -257,7 +256,7 @@ ihex_bad_byte (abfd, lineno, c, error)
}
(*_bfd_error_handler)
(_("%s:%d: unexpected character `%s' in Intel Hex file\n"),
- bfd_get_filename (abfd), lineno, buf);
+ bfd_archive_filename (abfd), lineno, buf);
bfd_set_error (bfd_error_bad_value);
}
}
@@ -272,7 +271,7 @@ ihex_scan (abfd)
bfd_vma segbase;
bfd_vma extbase;
asection *sec;
- int lineno;
+ unsigned int lineno;
boolean error;
bfd_byte *buf = NULL;
size_t bufsize;
@@ -320,7 +319,7 @@ ihex_scan (abfd)
/* Read the header bytes. */
- if (bfd_read (hdr, 1, 8, abfd) != 8)
+ if (bfd_bread (hdr, (bfd_size_type) 8, abfd) != 8)
goto error_return;
for (i = 0; i < 8; i++)
@@ -341,13 +340,13 @@ ihex_scan (abfd)
chars = len * 2 + 2;
if (chars >= bufsize)
{
- buf = (bfd_byte *) bfd_realloc (buf, chars);
+ buf = (bfd_byte *) bfd_realloc (buf, (bfd_size_type) chars);
if (buf == NULL)
goto error_return;
bufsize = chars;
}
- if (bfd_read (buf, 1, chars, abfd) != chars)
+ if (bfd_bread (buf, (bfd_size_type) chars, abfd) != chars)
goto error_return;
for (i = 0; i < chars; i++)
@@ -366,8 +365,8 @@ 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)"),
- bfd_get_filename (abfd), lineno,
+ (_("%s:%u: bad checksum in Intel Hex file (expected %u, found %u)"),
+ bfd_archive_filename (abfd), lineno,
(- chksum) & 0xff, (unsigned int) HEX2 (buf + 2 * i));
bfd_set_error (bfd_error_bad_value);
goto error_return;
@@ -388,9 +387,11 @@ ihex_scan (abfd)
{
char secbuf[20];
char *secname;
+ bfd_size_type amt;
sprintf (secbuf, ".sec%d", bfd_count_sections (abfd) + 1);
- secname = (char *) bfd_alloc (abfd, strlen (secbuf) + 1);
+ amt = strlen (secbuf) + 1;
+ secname = (char *) bfd_alloc (abfd, amt);
if (secname == NULL)
goto error_return;
strcpy (secname, secbuf);
@@ -418,8 +419,8 @@ ihex_scan (abfd)
if (len != 2)
{
(*_bfd_error_handler)
- (_("%s:%d: bad extended address record length in Intel Hex file"),
- bfd_get_filename (abfd), lineno);
+ (_("%s:%u: bad extended address record length in Intel Hex file"),
+ bfd_archive_filename (abfd), lineno);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -435,8 +436,8 @@ ihex_scan (abfd)
if (len != 4)
{
(*_bfd_error_handler)
- (_("%s:%d: bad extended start address length in Intel Hex file"),
- bfd_get_filename (abfd), lineno);
+ (_("%s:%u: bad extended start address length in Intel Hex file"),
+ bfd_archive_filename (abfd), lineno);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -452,8 +453,8 @@ ihex_scan (abfd)
if (len != 2)
{
(*_bfd_error_handler)
- (_("%s:%d: bad extended linear address record length in Intel Hex file"),
- bfd_get_filename (abfd), lineno);
+ (_("%s:%u: bad extended linear address record length in Intel Hex file"),
+ bfd_archive_filename (abfd), lineno);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -469,8 +470,8 @@ ihex_scan (abfd)
if (len != 2 && len != 4)
{
(*_bfd_error_handler)
- (_("%s:%d: bad extended linear start address length in Intel Hex file"),
- bfd_get_filename (abfd), lineno);
+ (_("%s:%u: bad extended linear start address length in Intel Hex file"),
+ bfd_archive_filename (abfd), lineno);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -486,8 +487,8 @@ ihex_scan (abfd)
default:
(*_bfd_error_handler)
- (_("%s:%d: unrecognized ihex type %u in Intel Hex file\n"),
- bfd_get_filename (abfd), lineno, type);
+ (_("%s:%u: unrecognized ihex type %u in Intel Hex file\n"),
+ bfd_archive_filename (abfd), lineno, type);
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -522,7 +523,7 @@ ihex_object_p (abfd)
if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
return NULL;
- if (bfd_read (b, 1, 9, abfd) != 9)
+ if (bfd_bread (b, (bfd_size_type) 9, abfd) != 9)
{
if (bfd_get_error () == bfd_error_file_truncated)
bfd_set_error (bfd_error_wrong_format);
@@ -595,7 +596,7 @@ ihex_read_section (abfd, section, contents)
know the exact format. */
BFD_ASSERT (c == ':');
- if (bfd_read (hdr, 1, 8, abfd) != 8)
+ if (bfd_bread (hdr, (bfd_size_type) 8, abfd) != 8)
goto error_return;
len = HEX2 (hdr);
@@ -607,20 +608,20 @@ ihex_read_section (abfd, section, contents)
{
(*_bfd_error_handler)
(_("%s: internal error in ihex_read_section"),
- bfd_get_filename (abfd));
+ bfd_archive_filename (abfd));
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
if (len * 2 > bufsize)
{
- buf = (bfd_byte *) bfd_realloc (buf, len * 2);
+ buf = (bfd_byte *) bfd_realloc (buf, (bfd_size_type) len * 2);
if (buf == NULL)
goto error_return;
bufsize = len * 2;
}
- if (bfd_read (buf, 1, len * 2, abfd) != len * 2)
+ if (bfd_bread (buf, (bfd_size_type) len * 2, abfd) != len * 2)
goto error_return;
for (i = 0; i < len; i++)
@@ -634,7 +635,7 @@ ihex_read_section (abfd, section, contents)
}
/* Skip the checksum. */
- if (bfd_read (buf, 1, 2, abfd) != 2)
+ if (bfd_bread (buf, (bfd_size_type) 2, abfd) != 2)
goto error_return;
}
@@ -642,7 +643,7 @@ ihex_read_section (abfd, section, contents)
{
(*_bfd_error_handler)
(_("%s: bad section length in ihex_read_section"),
- bfd_get_filename (abfd));
+ bfd_archive_filename (abfd));
bfd_set_error (bfd_error_bad_value);
goto error_return;
}
@@ -696,14 +697,15 @@ ihex_set_section_contents (abfd, section, location, offset, count)
struct ihex_data_list *n;
bfd_byte *data;
struct ihex_data_struct *tdata;
+ bfd_size_type amt;
if (count == 0
|| (section->flags & SEC_ALLOC) == 0
|| (section->flags & SEC_LOAD) == 0)
return true;
- n = ((struct ihex_data_list *)
- bfd_alloc (abfd, sizeof (struct ihex_data_list)));
+ amt = sizeof (struct ihex_data_list);
+ n = (struct ihex_data_list *) bfd_alloc (abfd, amt);
if (n == NULL)
return false;
@@ -748,8 +750,8 @@ ihex_set_section_contents (abfd, section, location, offset, count)
static boolean
ihex_write_record (abfd, count, addr, type, data)
bfd *abfd;
- bfd_size_type count;
- bfd_vma addr;
+ size_t count;
+ unsigned int addr;
unsigned int type;
bfd_byte *data;
{
@@ -758,6 +760,7 @@ ihex_write_record (abfd, count, addr, type, data)
char *p;
unsigned int chksum;
unsigned int i;
+ size_t total;
#define TOHEX(buf, v) \
((buf)[0] = digs[((v) >> 4) & 0xf], (buf)[1] = digs[(v) & 0xf])
@@ -780,7 +783,8 @@ ihex_write_record (abfd, count, addr, type, data)
p[2] = '\r';
p[3] = '\n';
- if (bfd_write (buf, 1, 9 + count * 2 + 4, abfd) != 9 + count * 2 + 4)
+ total = 9 + count * 2 + 4;
+ if (bfd_bwrite (buf, (bfd_size_type) total, abfd) != total)
return false;
return true;
@@ -809,10 +813,11 @@ ihex_write_object_contents (abfd)
count = l->size;
while (count > 0)
{
- bfd_size_type now;
+ size_t now;
+ unsigned int rec_addr;
now = count;
- if (now > CHUNK)
+ if (count > CHUNK)
now = CHUNK;
if (where > segbase + extbase + 0xffff)
@@ -867,8 +872,8 @@ ihex_write_object_contents (abfd)
}
}
- if (! ihex_write_record (abfd, now, where - (extbase + segbase),
- 0, p))
+ rec_addr = where - (extbase + segbase);
+ if (! ihex_write_record (abfd, now, rec_addr, 0, p))
return false;
where += now;
@@ -910,21 +915,6 @@ ihex_write_object_contents (abfd)
return true;
}
-/* Make an empty symbol. This is required only because
- bfd_make_section_anyway wants to create a symbol for the section. */
-
-static asymbol *
-ihex_make_empty_symbol (abfd)
- bfd *abfd;
-{
- asymbol *new;
-
- new = (asymbol *) bfd_zalloc (abfd, sizeof (asymbol));
- if (new != NULL)
- new->the_bfd = abfd;
- return new;
-}
-
/* Set the architecture for the output file. The architecture is
irrelevant, so we ignore errors about unknown architectures. */
@@ -964,6 +954,7 @@ ihex_sizeof_headers (abfd, exec)
#define ihex_get_symtab_upper_bound bfd_0l
#define ihex_get_symtab \
((long (*) PARAMS ((bfd *, asymbol **))) bfd_0l)
+#define ihex_make_empty_symbol _bfd_generic_make_empty_symbol
#define ihex_print_symbol _bfd_nosymbols_print_symbol
#define ihex_get_symbol_info _bfd_nosymbols_get_symbol_info
#define ihex_bfd_is_local_label_name _bfd_nosymbols_bfd_is_local_label_name
@@ -983,6 +974,7 @@ ihex_sizeof_headers (abfd, exec)
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_merge_sections bfd_generic_merge_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
@@ -1038,6 +1030,6 @@ const bfd_target ihex_vec =
BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
NULL,
-
+
(PTR) 0
};
diff --git a/contrib/binutils/bfd/libaout.h b/contrib/binutils/bfd/libaout.h
index b3efdce..d7e5c71 100644
--- a/contrib/binutils/bfd/libaout.h
+++ b/contrib/binutils/bfd/libaout.h
@@ -29,27 +29,94 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfdlink.h"
+/* Macros for accessing components in an aout header. Saves cluttering
+ the source with (bfd_vma) and (bfd_byte *) casts. */
+
+#define H_PUT_64(abfd, val, where) \
+ bfd_h_put_64 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
+
+#define H_PUT_32(abfd, val, where) \
+ bfd_h_put_32 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
+
+#define H_PUT_16(abfd, val, where) \
+ bfd_h_put_16 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
+
+#define H_PUT_8 bfd_h_put_8
+
+#define H_PUT_S64(abfd, val, where) \
+ bfd_h_put_signed_64 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
+
+#define H_PUT_S32(abfd, val, where) \
+ bfd_h_put_signed_32 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
+
+#define H_PUT_S16(abfd, val, where) \
+ bfd_h_put_signed_16 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
+
+#define H_PUT_S8 bfd_h_put_signed_8
+
+#define H_GET_64(abfd, where) \
+ bfd_h_get_64 ((abfd), (bfd_byte *) (where))
+
+#define H_GET_32(abfd, where) \
+ bfd_h_get_32 ((abfd), (bfd_byte *) (where))
+
+#define H_GET_16(abfd, where) \
+ bfd_h_get_16 ((abfd), (bfd_byte *) (where))
+
+#define H_GET_8 bfd_h_get_8
+
+#define H_GET_S64(abfd, where) \
+ bfd_h_get_signed_64 ((abfd), (bfd_byte *) (where))
+
+#define H_GET_S32(abfd, where) \
+ bfd_h_get_signed_32 ((abfd), (bfd_byte *) (where))
+
+#define H_GET_S16(abfd, where) \
+ bfd_h_get_signed_16 ((abfd), (bfd_byte *) (where))
+
+#define H_GET_S8 bfd_h_get_signed_8
+
/* Parameterize the a.out code based on whether it is being built
for a 32-bit architecture or a 64-bit architecture. */
+/* Do not "beautify" the CONCAT* macro args. Traditional C will not
+ remove whitespace added here, and thus will fail to concatenate
+ the tokens. */
#if ARCH_SIZE==64
-#define GET_WORD bfd_h_get_64
-#define GET_SWORD bfd_h_get_signed_64
-#define PUT_WORD bfd_h_put_64
+#define GET_WORD H_GET_64
+#define GET_SWORD H_GET_S64
+#define GET_MAGIC H_GET_32
+#define PUT_WORD H_PUT_64
+#define PUT_MAGIC H_PUT_32
#ifndef NAME
-#define NAME(x,y) CAT3(x,_64_,y)
+#define NAME(x,y) CONCAT3 (x,_64_,y)
#endif
-#define JNAME(x) CAT(x,_64)
+#define JNAME(x) CONCAT2 (x,_64)
#define BYTES_IN_WORD 8
+#else
+#if ARCH_SIZE==16
+#define GET_WORD H_GET_16
+#define GET_SWORD H_GET_S16
+#define GET_MAGIC H_GET_16
+#define PUT_WORD H_PUT_16
+#define PUT_MAGIC H_PUT_16
+#ifndef NAME
+#define NAME(x,y) CONCAT3 (x,_16_,y)
+#endif
+#define JNAME(x) CONCAT2 (x,_16)
+#define BYTES_IN_WORD 2
#else /* ARCH_SIZE == 32 */
-#define GET_WORD bfd_h_get_32
-#define GET_SWORD bfd_h_get_signed_32
-#define PUT_WORD bfd_h_put_32
+#define GET_WORD H_GET_32
+#define GET_SWORD H_GET_S32
+#define GET_MAGIC H_GET_32
+#define PUT_WORD H_PUT_32
+#define PUT_MAGIC H_PUT_32
#ifndef NAME
-#define NAME(x,y) CAT3(x,_32_,y)
+#define NAME(x,y) CONCAT3 (x,_32_,y)
#endif
-#define JNAME(x) CAT(x,_32)
+#define JNAME(x) CONCAT2 (x,_32)
#define BYTES_IN_WORD 4
#endif /* ARCH_SIZE==32 */
+#endif /* ARCH_SIZE==64 */
/* Declare at file level, since used in parameter lists, which have
weird scope. */
@@ -126,7 +193,8 @@ struct aout_backend_data
/* Callback for setting the page and segment sizes, if they can't be
trivially determined from the architecture. */
- boolean (*set_sizes) PARAMS ((bfd *));
+ boolean (*set_sizes)
+ PARAMS ((bfd *));
/* zmagic files only. For go32, the length of the exec header contributes
to the size of the text section in the file for alignment purposes but
@@ -135,44 +203,43 @@ struct aout_backend_data
/* Callback from the add symbols phase of the linker code to handle
a dynamic object. */
- boolean (*add_dynamic_symbols) PARAMS ((bfd *, struct bfd_link_info *,
- struct external_nlist **,
- bfd_size_type *, char **));
+ boolean (*add_dynamic_symbols)
+ PARAMS ((bfd *, struct bfd_link_info *, struct external_nlist **,
+ bfd_size_type *, char **));
/* Callback from the add symbols phase of the linker code to handle
adding a single symbol to the global linker hash table. */
- boolean (*add_one_symbol) PARAMS ((struct bfd_link_info *, bfd *,
- const char *, flagword, asection *,
- bfd_vma, const char *, boolean,
- boolean,
- struct bfd_link_hash_entry **));
+ boolean (*add_one_symbol)
+ PARAMS ((struct bfd_link_info *, bfd *, const char *, flagword,
+ asection *, bfd_vma, const char *, boolean, boolean,
+ struct bfd_link_hash_entry **));
/* Called to handle linking a dynamic object. */
- boolean (*link_dynamic_object) PARAMS ((struct bfd_link_info *, bfd *));
+ boolean (*link_dynamic_object)
+ PARAMS ((struct bfd_link_info *, bfd *));
/* Called for each global symbol being written out by the linker.
This should write out the dynamic symbol information. */
- boolean (*write_dynamic_symbol) PARAMS ((bfd *, struct bfd_link_info *,
- struct aout_link_hash_entry *));
+ boolean (*write_dynamic_symbol)
+ PARAMS ((bfd *, struct bfd_link_info *, struct aout_link_hash_entry *));
/* If this callback is not NULL, the linker calls it for each reloc.
RELOC is a pointer to the unswapped reloc. If *SKIP is set to
true, the reloc will be skipped. *RELOCATION may be changed to
change the effects of the relocation. */
- boolean (*check_dynamic_reloc) PARAMS ((struct bfd_link_info *info,
- bfd *input_bfd,
- asection *input_section,
- struct aout_link_hash_entry *h,
- PTR reloc, bfd_byte *contents,
- boolean *skip,
- bfd_vma *relocation));
+ boolean (*check_dynamic_reloc)
+ PARAMS ((struct bfd_link_info *info, bfd *input_bfd,
+ asection *input_section, struct aout_link_hash_entry *h,
+ PTR reloc, bfd_byte *contents, boolean *skip,
+ bfd_vma *relocation));
/* Called at the end of a link to finish up any dynamic linking
information. */
- boolean (*finish_dynamic_link) PARAMS ((bfd *, struct bfd_link_info *));
+ boolean (*finish_dynamic_link)
+ PARAMS ((bfd *, struct bfd_link_info *));
};
#define aout_backend_info(abfd) \
- ((CONST struct aout_backend_data *)((abfd)->xvec->backend_data))
+ ((const struct aout_backend_data *)((abfd)->xvec->backend_data))
/* This is the layout in memory of a "struct exec" while we process it.
All 'lengths' are given as a number of bytes.
@@ -199,7 +266,7 @@ struct internal_exec
char a_relaxable; /* Enough info for linker relax */
};
-/* Magic number is written
+/* Magic number is written
< MSB >
3130292827262524232221201918171615141312111009080706050403020100
< FLAGS >< MACHINE TYPE >< MAGIC NUMBER >
@@ -273,7 +340,7 @@ enum machine_type {
#ifndef N_SET_DYNAMIC
# define N_SET_DYNAMIC(exec, dynamic) \
-((exec).a_info = (dynamic) ? ((exec).a_info | 0x80000000) : \
+((exec).a_info = (dynamic) ? (long) ((exec).a_info | 0x80000000) : \
((exec).a_info & 0x7fffffff))
#endif
@@ -308,7 +375,7 @@ typedef struct aout_symbol {
struct aoutdata {
struct internal_exec *hdr; /* exec file header */
aout_symbol_type *symbols; /* symtab for input bfd */
-
+
/* For ease, we do this */
asection *textsec;
asection *datasec;
@@ -423,151 +490,131 @@ struct aout_section_data_struct
/* Prototype declarations for functions defined in aoutx.h */
-boolean
-NAME(aout,squirt_out_relocs) PARAMS ((bfd *abfd, asection *section));
+extern boolean NAME(aout,squirt_out_relocs)
+ PARAMS ((bfd *, asection *));
-boolean
-NAME(aout,make_sections) PARAMS ((bfd *));
+extern boolean NAME(aout,make_sections)
+ PARAMS ((bfd *));
-const bfd_target *
-NAME(aout,some_aout_object_p) PARAMS ((bfd *abfd,
- struct internal_exec *execp,
- const bfd_target *(*callback)(bfd *)));
+extern const bfd_target * NAME(aout,some_aout_object_p)
+ PARAMS ((bfd *, struct internal_exec *, const bfd_target *(*) (bfd *)));
-boolean
-NAME(aout,mkobject) PARAMS ((bfd *abfd));
+extern boolean NAME(aout,mkobject)
+ PARAMS ((bfd *));
-enum machine_type
-NAME(aout,machine_type) PARAMS ((enum bfd_architecture arch,
- unsigned long machine,
- boolean *unknown));
+extern enum machine_type NAME(aout,machine_type)
+ PARAMS ((enum bfd_architecture, unsigned long, boolean *));
-boolean
-NAME(aout,set_arch_mach) PARAMS ((bfd *abfd, enum bfd_architecture arch,
- unsigned long machine));
+extern boolean NAME(aout,set_arch_mach)
+ PARAMS ((bfd *, enum bfd_architecture, unsigned long));
-boolean
-NAME(aout,new_section_hook) PARAMS ((bfd *abfd, asection *newsect));
+extern boolean NAME(aout,new_section_hook)
+ PARAMS ((bfd *, asection *));
-boolean
-NAME(aout,set_section_contents) PARAMS ((bfd *abfd, sec_ptr section,
- PTR location, file_ptr offset, bfd_size_type count));
+extern boolean NAME(aout,set_section_contents)
+ PARAMS ((bfd *, sec_ptr, PTR, file_ptr, bfd_size_type));
-asymbol *
-NAME(aout,make_empty_symbol) PARAMS ((bfd *abfd));
+extern asymbol * NAME(aout,make_empty_symbol)
+ PARAMS ((bfd *));
-boolean
-NAME(aout,translate_symbol_table) PARAMS ((bfd *, aout_symbol_type *,
- struct external_nlist *,
- bfd_size_type, char *,
- bfd_size_type,
- boolean dynamic));
+extern boolean NAME(aout,translate_symbol_table)
+ PARAMS ((bfd *, aout_symbol_type *, struct external_nlist *, bfd_size_type,
+ char *, bfd_size_type, boolean));
-boolean
-NAME(aout,slurp_symbol_table) PARAMS ((bfd *abfd));
+extern boolean NAME(aout,slurp_symbol_table)
+ PARAMS ((bfd *));
-boolean
-NAME(aout,write_syms) PARAMS ((bfd *abfd));
+extern boolean NAME(aout,write_syms)
+ PARAMS ((bfd *));
-void
-NAME(aout,reclaim_symbol_table) PARAMS ((bfd *abfd));
+extern void NAME(aout,reclaim_symbol_table)
+ PARAMS ((bfd *));
-long
-NAME(aout,get_symtab_upper_bound) PARAMS ((bfd *abfd));
+extern long NAME(aout,get_symtab_upper_bound)
+ PARAMS ((bfd *));
-long
-NAME(aout,get_symtab) PARAMS ((bfd *abfd, asymbol **location));
+extern long NAME(aout,get_symtab)
+ PARAMS ((bfd *, asymbol **));
-void
-NAME(aout,swap_ext_reloc_in) PARAMS ((bfd *, struct reloc_ext_external *,
- arelent *, asymbol **, bfd_size_type));
-void
-NAME(aout,swap_std_reloc_in) PARAMS ((bfd *, struct reloc_std_external *,
- arelent *, asymbol **, bfd_size_type));
+extern void NAME(aout,swap_ext_reloc_in)
+ PARAMS ((bfd *, struct reloc_ext_external *, arelent *, asymbol **,
+ bfd_size_type));
+extern void NAME(aout,swap_std_reloc_in)
+ PARAMS ((bfd *, struct reloc_std_external *, arelent *, asymbol **,
+ bfd_size_type));
-reloc_howto_type *
-NAME(aout,reloc_type_lookup) PARAMS ((bfd *abfd,
- bfd_reloc_code_real_type code));
+extern reloc_howto_type * NAME(aout,reloc_type_lookup)
+ PARAMS ((bfd *, bfd_reloc_code_real_type));
-boolean
-NAME(aout,slurp_reloc_table) PARAMS ((bfd *abfd, sec_ptr asect,
- asymbol **symbols));
+extern boolean NAME(aout,slurp_reloc_table)
+ PARAMS ((bfd *, sec_ptr, asymbol **));
-long
-NAME(aout,canonicalize_reloc) PARAMS ((bfd *abfd, sec_ptr section,
- arelent **relptr, asymbol **symbols));
+extern long NAME(aout,canonicalize_reloc)
+ PARAMS ((bfd *, sec_ptr, arelent **, asymbol **));
-long
-NAME(aout,get_reloc_upper_bound) PARAMS ((bfd *abfd, sec_ptr asect));
+extern long NAME(aout,get_reloc_upper_bound)
+ PARAMS ((bfd *, sec_ptr));
-void
-NAME(aout,reclaim_reloc) PARAMS ((bfd *ignore_abfd, sec_ptr ignore));
+extern void NAME(aout,reclaim_reloc)
+ PARAMS ((bfd *, sec_ptr));
-alent *
-NAME(aout,get_lineno) PARAMS ((bfd *ignore_abfd, asymbol *ignore_symbol));
+extern alent * NAME(aout,get_lineno)
+ PARAMS ((bfd *, asymbol *));
-void
-NAME(aout,print_symbol) PARAMS ((bfd *ignore_abfd, PTR file,
- asymbol *symbol, bfd_print_symbol_type how));
+extern void NAME(aout,print_symbol)
+ PARAMS ((bfd *, PTR, asymbol *, bfd_print_symbol_type));
-void
-NAME(aout,get_symbol_info) PARAMS ((bfd *ignore_abfd,
- asymbol *symbol, symbol_info *ret));
+extern void NAME(aout,get_symbol_info)
+ PARAMS ((bfd *, asymbol *, symbol_info *));
-boolean
-NAME(aout,find_nearest_line) PARAMS ((bfd *abfd, asection *section,
- asymbol **symbols, bfd_vma offset, CONST char **filename_ptr,
- CONST char **functionname_ptr, unsigned int *line_ptr));
+extern boolean NAME(aout,find_nearest_line)
+ PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
+ const char **, unsigned int *));
-long
-NAME(aout,read_minisymbols) PARAMS ((bfd *, boolean, PTR *, unsigned int *));
+extern long NAME(aout,read_minisymbols)
+ PARAMS ((bfd *, boolean, PTR *, unsigned int *));
-asymbol *
-NAME(aout,minisymbol_to_symbol) PARAMS ((bfd *, boolean, const PTR,
- asymbol *));
+extern asymbol * NAME(aout,minisymbol_to_symbol)
+ PARAMS ((bfd *, boolean, const PTR, asymbol *));
-int
-NAME(aout,sizeof_headers) PARAMS ((bfd *abfd, boolean exec));
+extern int NAME(aout,sizeof_headers)
+ PARAMS ((bfd *, boolean));
-boolean
-NAME(aout,adjust_sizes_and_vmas) PARAMS ((bfd *abfd,
- bfd_size_type *text_size, file_ptr *text_end));
+extern boolean NAME(aout,adjust_sizes_and_vmas)
+ PARAMS ((bfd *, bfd_size_type *, file_ptr *));
-void
-NAME(aout,swap_exec_header_in) PARAMS ((bfd *abfd,
- struct external_exec *raw_bytes, struct internal_exec *execp));
+extern void NAME(aout,swap_exec_header_in)
+ PARAMS ((bfd *, struct external_exec *, struct internal_exec *));
-void
-NAME(aout,swap_exec_header_out) PARAMS ((bfd *abfd,
- struct internal_exec *execp, struct external_exec *raw_bytes));
+extern void NAME(aout,swap_exec_header_out)
+ PARAMS ((bfd *, struct internal_exec *, struct external_exec *));
-struct bfd_hash_entry *
-NAME(aout,link_hash_newfunc)
+extern struct bfd_hash_entry * NAME(aout,link_hash_newfunc)
PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
-boolean
-NAME(aout,link_hash_table_init)
- PARAMS ((struct aout_link_hash_table *, bfd *,
- struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
- struct bfd_hash_table *,
- const char *)));
+extern boolean NAME(aout,link_hash_table_init)
+ PARAMS ((struct aout_link_hash_table *, bfd *,
+ struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
+ struct bfd_hash_table *,
+ const char *)));
-struct bfd_link_hash_table *
-NAME(aout,link_hash_table_create) PARAMS ((bfd *));
+extern struct bfd_link_hash_table * NAME(aout,link_hash_table_create)
+ PARAMS ((bfd *));
-boolean
-NAME(aout,link_add_symbols) PARAMS ((bfd *, struct bfd_link_info *));
+extern boolean NAME(aout,link_add_symbols)
+ PARAMS ((bfd *, struct bfd_link_info *));
-boolean
-NAME(aout,final_link) PARAMS ((bfd *, struct bfd_link_info *,
- void (*) (bfd *, file_ptr *, file_ptr *,
- file_ptr *)));
+extern boolean NAME(aout,final_link)
+ PARAMS ((bfd *, struct bfd_link_info *,
+ void (*) (bfd *, file_ptr *, file_ptr *, file_ptr *)));
-boolean
-NAME(aout,bfd_free_cached_info) PARAMS ((bfd *));
+extern boolean NAME(aout,bfd_free_cached_info)
+ PARAMS ((bfd *));
/* A.out uses the generic versions of these routines... */
+#define aout_16_get_section_contents _bfd_generic_get_section_contents
+
#define aout_32_get_section_contents _bfd_generic_get_section_contents
#define aout_64_get_section_contents _bfd_generic_get_section_contents
@@ -596,31 +643,32 @@ NAME(aout,bfd_free_cached_info) PARAMS ((bfd *));
obj_reloc_entry_size (abfd)); \
NAME(aout,swap_exec_header_out) (abfd, execp, &exec_bytes); \
\
- if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0) return false; \
- if (bfd_write ((PTR) &exec_bytes, 1, EXEC_BYTES_SIZE, abfd) \
- != EXEC_BYTES_SIZE) \
+ if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0 \
+ || bfd_bwrite ((PTR) &exec_bytes, (bfd_size_type) EXEC_BYTES_SIZE, \
+ abfd) != EXEC_BYTES_SIZE) \
return false; \
/* Now write out reloc info, followed by syms and strings */ \
\
if (bfd_get_outsymbols (abfd) != (asymbol **) NULL \
&& bfd_get_symcount (abfd) != 0) \
{ \
- if (bfd_seek (abfd, (file_ptr)(N_SYMOFF(*execp)), SEEK_SET) != 0) \
+ if (bfd_seek (abfd, (file_ptr) (N_SYMOFF(*execp)), SEEK_SET) != 0)\
return false; \
\
- if (! NAME(aout,write_syms)(abfd)) return false; \
+ if (! NAME(aout,write_syms) (abfd)) \
+ return false; \
} \
\
- if (bfd_seek (abfd, (file_ptr)(N_TRELOFF(*execp)), SEEK_SET) != 0) \
+ if (bfd_seek (abfd, (file_ptr) (N_TRELOFF(*execp)), SEEK_SET) != 0) \
return false; \
if (!NAME(aout,squirt_out_relocs) (abfd, obj_textsec (abfd))) \
return false; \
\
- if (bfd_seek (abfd, (file_ptr)(N_DRELOFF(*execp)), SEEK_SET) != 0) \
+ if (bfd_seek (abfd, (file_ptr) (N_DRELOFF(*execp)), SEEK_SET) != 0) \
return false; \
- if (!NAME(aout,squirt_out_relocs)(abfd, obj_datasec (abfd))) \
+ if (!NAME(aout,squirt_out_relocs) (abfd, obj_datasec (abfd))) \
return false; \
- }
+ }
#endif
#endif /* ! defined (LIBAOUT_H) */
diff --git a/contrib/binutils/bfd/libbfd-in.h b/contrib/binutils/bfd/libbfd-in.h
index dc2cd11..ed417ca 100644
--- a/contrib/binutils/bfd/libbfd-in.h
+++ b/contrib/binutils/bfd/libbfd-in.h
@@ -5,10 +5,6 @@
Free Software Foundation, Inc.
Written by Cygnus Support.
-** NOTE: libbfd.h is a GENERATED file. Don't change it; instead,
-** change libbfd-in.h or the other BFD source files processed to
-** generate this file.
-
This file is part of BFD, the Binary File Descriptor library.
This program is free software; you can redistribute it and/or modify
@@ -29,9 +25,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
E.g. align to an 8-byte boundary with argument of 8. Take care never
to wrap around if the address is within boundary-1 of the end of the
address space. */
-#define BFD_ALIGN(this, boundary) \
- ((((bfd_vma) (this) + (boundary) - 1) >= (bfd_vma) (this)) \
- ? (((bfd_vma) (this) + ((boundary) - 1)) & (~((boundary)-1))) \
+#define BFD_ALIGN(this, boundary) \
+ ((((bfd_vma) (this) + (boundary) - 1) >= (bfd_vma) (this)) \
+ ? (((bfd_vma) (this) + ((boundary) - 1)) & ~ (bfd_vma) ((boundary)-1)) \
: ~ (bfd_vma) 0)
/* If you want to read and write large blocks, you might want to do it
@@ -87,20 +83,20 @@ struct areltdata {
#define arelt_size(bfd) (((struct areltdata *)((bfd)->arelt_data))->parsed_size)
-extern PTR bfd_malloc PARAMS ((size_t));
-extern PTR bfd_realloc PARAMS ((PTR, size_t));
-extern PTR bfd_zmalloc PARAMS ((size_t));
+extern PTR bfd_malloc PARAMS ((bfd_size_type));
+extern PTR bfd_realloc PARAMS ((PTR, bfd_size_type));
+extern PTR bfd_zmalloc PARAMS ((bfd_size_type));
extern bfd_error_handler_type _bfd_error_handler;
/* These routines allocate and free things on the BFD's objalloc. */
-extern PTR bfd_alloc PARAMS ((bfd *, size_t));
-extern PTR bfd_zalloc PARAMS ((bfd *, size_t));
+extern PTR bfd_alloc PARAMS ((bfd *, bfd_size_type));
+extern PTR bfd_zalloc PARAMS ((bfd *, bfd_size_type));
extern void bfd_release PARAMS ((bfd *, PTR));
bfd * _bfd_create_empty_archive_element_shell PARAMS ((bfd *obfd));
-bfd * _bfd_look_for_bfd_in_cache PARAMS ((bfd *arch_bfd, file_ptr index));
+bfd * _bfd_look_for_bfd_in_cache PARAMS ((bfd *, file_ptr));
boolean _bfd_add_bfd_to_archive_cache PARAMS ((bfd *, file_ptr, bfd *));
boolean _bfd_generic_mkarchive PARAMS ((bfd *abfd));
const bfd_target *bfd_generic_archive_p PARAMS ((bfd *abfd));
@@ -116,6 +112,7 @@ boolean _bfd_compute_and_write_armap PARAMS ((bfd *, unsigned int elength));
bfd *_bfd_get_elt_at_filepos PARAMS ((bfd *archive, file_ptr filepos));
extern bfd *_bfd_generic_get_elt_at_index PARAMS ((bfd *, symindex));
bfd * _bfd_new_bfd PARAMS ((void));
+void _bfd_delete_bfd PARAMS ((bfd *));
boolean bfd_false PARAMS ((bfd *ignore));
boolean bfd_true PARAMS ((bfd *ignore));
@@ -162,8 +159,7 @@ int bfd_generic_stat_arch_elt PARAMS ((bfd *, struct stat *));
#define _bfd_generic_new_section_hook \
((boolean (*) PARAMS ((bfd *, asection *))) bfd_true)
extern boolean _bfd_generic_get_section_contents
- PARAMS ((bfd *, asection *, PTR location, file_ptr offset,
- bfd_size_type count));
+ PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
extern boolean _bfd_generic_get_section_contents_in_window
PARAMS ((bfd *, asection *, bfd_window *, file_ptr, bfd_size_type));
@@ -255,8 +251,7 @@ extern boolean _bfd_archive_coff_construct_extended_name_table
#define _bfd_nosymbols_get_symtab_upper_bound _bfd_n1
#define _bfd_nosymbols_get_symtab \
((long (*) PARAMS ((bfd *, asymbol **))) _bfd_n1)
-#define _bfd_nosymbols_make_empty_symbol \
- ((asymbol *(*) PARAMS ((bfd *))) bfd_nullvoidptr)
+#define _bfd_nosymbols_make_empty_symbol _bfd_generic_make_empty_symbol
#define _bfd_nosymbols_print_symbol \
((void (*) PARAMS ((bfd *, PTR, asymbol *, bfd_print_symbol_type))) bfd_void)
#define _bfd_nosymbols_get_symbol_info \
@@ -323,6 +318,10 @@ extern boolean _bfd_generic_set_section_contents
((boolean (*) \
PARAMS ((bfd *, struct bfd_link_info *))) \
bfd_false)
+#define _bfd_nolink_bfd_merge_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 \
@@ -369,6 +368,10 @@ extern boolean _bfd_dwarf2_find_nearest_line
const char **, unsigned int *, unsigned int,
PTR *));
+/* Create a new section entry. */
+extern struct bfd_hash_entry *bfd_section_hash_newfunc
+ PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
+
/* A routine to create entries for a bfd_link_hash_table. */
extern struct bfd_hash_entry *_bfd_link_hash_newfunc
PARAMS ((struct bfd_hash_entry *entry,
@@ -436,7 +439,7 @@ extern unsigned int _bfd_count_link_order_relocs
/* Final link relocation routine. */
extern bfd_reloc_status_type _bfd_final_link_relocate
PARAMS ((reloc_howto_type *, bfd *, asection *, bfd_byte *,
- bfd_vma address, bfd_vma value, bfd_vma addend));
+ bfd_vma, bfd_vma, bfd_vma));
/* Relocate a particular location by a howto and a value. */
extern bfd_reloc_status_type _bfd_relocate_contents
@@ -447,6 +450,11 @@ extern bfd_reloc_status_type _bfd_relocate_contents
extern boolean _bfd_link_section_stabs
PARAMS ((bfd *, PTR *, asection *, asection *, PTR *));
+/* Eliminate stabs for discarded functions and symbols. */
+extern boolean _bfd_discard_section_stabs
+ PARAMS ((bfd *, asection *, PTR,
+ boolean (*) (bfd_vma, PTR), PTR));
+
/* Write out the .stab section when linking stabs in sections. */
extern boolean _bfd_write_section_stabs
@@ -462,6 +470,26 @@ extern boolean _bfd_write_stab_strings PARAMS ((bfd *, PTR *));
extern bfd_vma _bfd_stab_section_offset
PARAMS ((bfd *, PTR *, asection *, PTR *, bfd_vma));
+/* Attempt to merge a SEC_MERGE section. */
+
+extern boolean _bfd_merge_section
+ PARAMS ((bfd *, PTR *, asection *, PTR *));
+
+/* Attempt to merge SEC_MERGE sections. */
+
+extern boolean _bfd_merge_sections
+ PARAMS ((bfd *, PTR, void (*)(bfd *, asection *)));
+
+/* Write out a merged section. */
+
+extern boolean _bfd_write_merged_section
+ PARAMS ((bfd *, asection *, PTR));
+
+/* Find an offset within a modified SEC_MERGE section. */
+
+extern bfd_vma _bfd_merged_section_offset
+ PARAMS ((bfd *, asection **, PTR, bfd_vma, bfd_vma));
+
/* Create a string table. */
extern struct bfd_strtab_hash *_bfd_stringtab_init PARAMS ((void));
diff --git a/contrib/binutils/bfd/libbfd.c b/contrib/binutils/bfd/libbfd.c
index 695df8d..5aa51ae 100644
--- a/contrib/binutils/bfd/libbfd.c
+++ b/contrib/binutils/bfd/libbfd.c
@@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define getpagesize() 2048
#endif
-static int real_read PARAMS ((PTR, size_t, size_t, FILE *));
+static size_t real_read PARAMS ((PTR, size_t, size_t, FILE *));
/*
SECTION
@@ -153,13 +153,20 @@ _bfd_dummy_target (ignore_abfd)
PTR
bfd_malloc (size)
- size_t size;
+ bfd_size_type size;
{
PTR ptr;
- ptr = (PTR) malloc (size);
- if (ptr == NULL && size != 0)
+ if (size != (size_t) size)
+ {
+ bfd_set_error (bfd_error_no_memory);
+ return NULL;
+ }
+
+ ptr = (PTR) malloc ((size_t) size);
+ if (ptr == NULL && (size_t) size != 0)
bfd_set_error (bfd_error_no_memory);
+
return ptr;
}
@@ -168,16 +175,22 @@ bfd_malloc (size)
PTR
bfd_realloc (ptr, size)
PTR ptr;
- size_t size;
+ bfd_size_type size;
{
PTR ret;
+ if (size != (size_t) size)
+ {
+ bfd_set_error (bfd_error_no_memory);
+ return NULL;
+ }
+
if (ptr == NULL)
- ret = malloc (size);
+ ret = malloc ((size_t) size);
else
- ret = realloc (ptr, size);
+ ret = realloc (ptr, (size_t) size);
- if (ret == NULL)
+ if (ret == NULL && (size_t) size != 0)
bfd_set_error (bfd_error_no_memory);
return ret;
@@ -187,18 +200,24 @@ bfd_realloc (ptr, size)
PTR
bfd_zmalloc (size)
- size_t size;
+ bfd_size_type size;
{
PTR ptr;
- ptr = (PTR) malloc (size);
+ if (size != (size_t) size)
+ {
+ bfd_set_error (bfd_error_no_memory);
+ return NULL;
+ }
- if (size != 0)
+ ptr = (PTR) malloc ((size_t) size);
+
+ if ((size_t) size != 0)
{
if (ptr == NULL)
bfd_set_error (bfd_error_no_memory);
else
- memset (ptr, 0, size);
+ memset (ptr, 0, (size_t) size);
}
return ptr;
@@ -213,8 +232,8 @@ bfd_zmalloc (size)
contents (0 for non-archive elements). For archive entries this is the
first octet in the file, NOT the beginning of the archive header. */
-static int
-real_read (where, a,b, file)
+static size_t
+real_read (where, a, b, file)
PTR where;
size_t a;
size_t b;
@@ -242,17 +261,15 @@ real_read (where, a,b, file)
#endif
}
-/* Return value is amount read (FIXME: how are errors and end of file dealt
- with? We never call bfd_set_error, which is probably a mistake). */
+/* Return value is amount read. */
bfd_size_type
-bfd_read (ptr, size, nitems, abfd)
+bfd_bread (ptr, size, abfd)
PTR ptr;
bfd_size_type size;
- bfd_size_type nitems;
bfd *abfd;
{
- int nread;
+ size_t nread;
if ((abfd->flags & BFD_IN_MEMORY) != 0)
{
@@ -260,7 +277,7 @@ bfd_read (ptr, size, nitems, abfd)
bfd_size_type get;
bim = (struct bfd_in_memory *) abfd->iostream;
- get = size * nitems;
+ get = size;
if (abfd->where + get > bim->size)
{
if (bim->size < (bfd_size_type) abfd->where)
@@ -269,13 +286,13 @@ bfd_read (ptr, size, nitems, abfd)
get = bim->size - abfd->where;
bfd_set_error (bfd_error_file_truncated);
}
- memcpy (ptr, bim->buffer + abfd->where, get);
+ memcpy (ptr, bim->buffer + abfd->where, (size_t) get);
abfd->where += get;
return get;
}
- nread = real_read (ptr, 1, (size_t) (size*nitems), bfd_cache_lookup(abfd));
- if (nread > 0)
+ nread = real_read (ptr, 1, (size_t) size, bfd_cache_lookup (abfd));
+ if (nread != (size_t) -1)
abfd->where += nread;
/* Set bfd_error if we did not read as much data as we expected.
@@ -285,7 +302,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 != size)
{
if (ferror (bfd_cache_lookup (abfd)))
bfd_set_error (bfd_error_system_call);
@@ -386,7 +403,7 @@ bfd_get_file_window (abfd, offset, size, windowp, writable)
{
static size_t pagesize;
bfd_window_internal *i = windowp->i;
- size_t size_to_alloc = size;
+ bfd_size_type size_to_alloc = size;
if (debug_windows)
fprintf (stderr, "bfd_get_file_window (%p, %6ld, %6ld, %p<%p,%lx,%p>, %d)",
@@ -402,7 +419,9 @@ bfd_get_file_window (abfd, offset, size, windowp, writable)
if (i == 0)
{
- windowp->i = i = (bfd_window_internal *) bfd_zmalloc (sizeof (bfd_window_internal));
+ i = ((bfd_window_internal *)
+ bfd_zmalloc ((bfd_size_type) sizeof (bfd_window_internal)));
+ windowp->i = i;
if (i == 0)
return false;
i->data = 0;
@@ -497,12 +516,11 @@ bfd_get_file_window (abfd, offset, size, windowp, writable)
{
if (size_to_alloc == 0)
return true;
- bfd_set_error (bfd_error_no_memory);
return false;
}
if (bfd_seek (abfd, offset, SEEK_SET) != 0)
return false;
- i->size = bfd_read (i->data, size, 1, abfd);
+ i->size = bfd_bread (i->data, size, abfd);
if (i->size != size)
return false;
i->mapped = 0;
@@ -523,24 +541,25 @@ bfd_get_file_window (abfd, offset, size, windowp, writable)
#endif /* USE_MMAP */
bfd_size_type
-bfd_write (ptr, size, nitems, abfd)
- CONST PTR ptr;
+bfd_bwrite (ptr, size, abfd)
+ const PTR ptr;
bfd_size_type size;
- bfd_size_type nitems;
bfd *abfd;
{
- long nwrote;
+ size_t nwrote;
if ((abfd->flags & BFD_IN_MEMORY) != 0)
{
struct bfd_in_memory *bim = (struct bfd_in_memory *) (abfd->iostream);
- size *= nitems;
+ size = (size_t) size;
if (abfd->where + size > bim->size)
{
- long newsize, oldsize = (bim->size + 127) & ~127;
+ bfd_size_type newsize, oldsize;
+
+ oldsize = (bim->size + 127) & ~(bfd_size_type) 127;
bim->size = abfd->where + size;
/* Round up to cut down on memory fragmentation */
- newsize = (bim->size + 127) & ~127;
+ newsize = (bim->size + 127) & ~(bfd_size_type) 127;
if (newsize > oldsize)
{
bim->buffer = bfd_realloc (bim->buffer, newsize);
@@ -551,20 +570,18 @@ bfd_write (ptr, size, nitems, abfd)
}
}
}
- memcpy (bim->buffer + abfd->where, ptr, size);
+ memcpy (bim->buffer + abfd->where, ptr, (size_t) size);
abfd->where += size;
return size;
}
- nwrote = fwrite (ptr, 1, (size_t) (size * nitems),
- bfd_cache_lookup (abfd));
- if (nwrote > 0)
+ nwrote = fwrite (ptr, 1, (size_t) size, bfd_cache_lookup (abfd));
+ if (nwrote != (size_t) -1)
abfd->where += nwrote;
- if ((bfd_size_type) nwrote != size * nitems)
+ if (nwrote != size)
{
#ifdef ENOSPC
- if (nwrote >= 0)
- errno = ENOSPC;
+ errno = ENOSPC;
#endif
bfd_set_error (bfd_error_system_call);
}
@@ -576,7 +593,7 @@ INTERNAL_FUNCTION
bfd_write_bigendian_4byte_int
SYNOPSIS
- void bfd_write_bigendian_4byte_int(bfd *abfd, int i);
+ void bfd_write_bigendian_4byte_int (bfd *, unsigned int);
DESCRIPTION
Write a 4 byte integer @var{i} to the output BFD @var{abfd}, in big
@@ -587,15 +604,15 @@ DESCRIPTION
void
bfd_write_bigendian_4byte_int (abfd, i)
bfd *abfd;
- int i;
+ unsigned int i;
{
bfd_byte buffer[4];
- bfd_putb32(i, buffer);
- if (bfd_write((PTR)buffer, 4, 1, abfd) != 4)
+ bfd_putb32 ((bfd_vma) i, buffer);
+ if (bfd_bwrite ((PTR) buffer, (bfd_size_type) 4, abfd) != 4)
abort ();
}
-long
+bfd_vma
bfd_tell (abfd)
bfd *abfd;
{
@@ -604,7 +621,7 @@ bfd_tell (abfd)
if ((abfd->flags & BFD_IN_MEMORY) != 0)
return abfd->where;
- ptr = ftell (bfd_cache_lookup(abfd));
+ ptr = ftell (bfd_cache_lookup (abfd));
if (abfd->my_archive)
ptr -= abfd->origin;
@@ -657,7 +674,7 @@ bfd_seek (abfd, position, direction)
{
int result;
FILE *f;
- file_ptr file_position;
+ long file_position;
/* For the time being, a BFD may not seek to it's end. The problem
is that we don't easily have a way to recognize the end of an
element in an archive. */
@@ -678,22 +695,22 @@ bfd_seek (abfd, position, direction)
else
abfd->where += position;
- if ((bfd_size_type) abfd->where > bim->size)
+ if (abfd->where > bim->size)
{
if ((abfd->direction == write_direction) ||
(abfd->direction == both_direction))
{
- long newsize, oldsize = (bim->size + 127) & ~127;
+ bfd_size_type newsize, oldsize;
+ oldsize = (bim->size + 127) & ~(bfd_size_type) 127;
bim->size = abfd->where;
/* Round up to cut down on memory fragmentation */
- newsize = (bim->size + 127) & ~127;
+ newsize = (bim->size + 127) & ~(bfd_size_type) 127;
if (newsize > oldsize)
{
bim->buffer = bfd_realloc (bim->buffer, newsize);
if (bim->buffer == 0)
{
bim->size = 0;
- bfd_set_error (bfd_error_no_memory);
return -1;
}
}
@@ -724,7 +741,7 @@ bfd_seek (abfd, position, direction)
if (where_am_i_now != abfd->where)
abort ();
#endif
- if (direction == SEEK_SET && position == abfd->where)
+ if (direction == SEEK_SET && (bfd_vma) position == abfd->where)
return 0;
}
else
@@ -819,9 +836,9 @@ DESCRIPTION
.#define bfd_put_signed_8 \
. bfd_put_8
.#define bfd_get_8(abfd, ptr) \
-. (*(unsigned char *) (ptr))
+. (*(unsigned char *) (ptr) & 0xff)
.#define bfd_get_signed_8(abfd, ptr) \
-. ((*(unsigned char *) (ptr) ^ 0x80) - 0x80)
+. (((*(unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80)
.
.#define bfd_put_16(abfd, val, ptr) \
. BFD_SEND(abfd, bfd_putx16, ((val),(ptr)))
@@ -851,14 +868,14 @@ DESCRIPTION
. BFD_SEND(abfd, bfd_getx_signed_64, (ptr))
.
.#define bfd_get(bits, abfd, ptr) \
-. ((bits) == 8 ? bfd_get_8 (abfd, ptr) \
+. ( (bits) == 8 ? (bfd_vma) 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) == 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) \
@@ -873,7 +890,7 @@ FUNCTION
DESCRIPTION
These macros have the same function as their <<bfd_get_x>>
- bretheren, except that they are used for removing information
+ brethren, except that they are used for removing information
for the header records of object files. Believe it or not,
some object files keep their header records in big endian
order and their data in little endian order.
@@ -881,42 +898,89 @@ DESCRIPTION
.{* Byte swapping macros for file header data. *}
.
.#define bfd_h_put_8(abfd, val, ptr) \
-. bfd_put_8 (abfd, val, ptr)
+. bfd_put_8 (abfd, val, ptr)
.#define bfd_h_put_signed_8(abfd, val, ptr) \
-. bfd_put_8 (abfd, val, ptr)
+. bfd_put_8 (abfd, val, ptr)
.#define bfd_h_get_8(abfd, ptr) \
-. bfd_get_8 (abfd, ptr)
+. bfd_get_8 (abfd, ptr)
.#define bfd_h_get_signed_8(abfd, ptr) \
-. bfd_get_signed_8 (abfd, ptr)
+. bfd_get_signed_8 (abfd, ptr)
.
.#define bfd_h_put_16(abfd, val, ptr) \
-. BFD_SEND(abfd, bfd_h_putx16,(val,ptr))
+. BFD_SEND (abfd, bfd_h_putx16, (val, ptr))
.#define bfd_h_put_signed_16 \
-. bfd_h_put_16
+. bfd_h_put_16
.#define bfd_h_get_16(abfd, ptr) \
-. BFD_SEND(abfd, bfd_h_getx16,(ptr))
+. BFD_SEND (abfd, bfd_h_getx16, (ptr))
.#define bfd_h_get_signed_16(abfd, ptr) \
-. BFD_SEND(abfd, bfd_h_getx_signed_16, (ptr))
+. BFD_SEND (abfd, bfd_h_getx_signed_16, (ptr))
.
.#define bfd_h_put_32(abfd, val, ptr) \
-. BFD_SEND(abfd, bfd_h_putx32,(val,ptr))
+. BFD_SEND (abfd, bfd_h_putx32, (val, ptr))
.#define bfd_h_put_signed_32 \
-. bfd_h_put_32
+. bfd_h_put_32
.#define bfd_h_get_32(abfd, ptr) \
-. BFD_SEND(abfd, bfd_h_getx32,(ptr))
+. BFD_SEND (abfd, bfd_h_getx32, (ptr))
.#define bfd_h_get_signed_32(abfd, ptr) \
-. BFD_SEND(abfd, bfd_h_getx_signed_32, (ptr))
+. BFD_SEND (abfd, bfd_h_getx_signed_32, (ptr))
.
.#define bfd_h_put_64(abfd, val, ptr) \
-. BFD_SEND(abfd, bfd_h_putx64,(val, ptr))
+. BFD_SEND (abfd, bfd_h_putx64, (val, ptr))
.#define bfd_h_put_signed_64 \
-. bfd_h_put_64
+. bfd_h_put_64
.#define bfd_h_get_64(abfd, ptr) \
-. BFD_SEND(abfd, bfd_h_getx64,(ptr))
+. BFD_SEND (abfd, bfd_h_getx64, (ptr))
.#define bfd_h_get_signed_64(abfd, ptr) \
-. BFD_SEND(abfd, bfd_h_getx_signed_64, (ptr))
+. BFD_SEND (abfd, bfd_h_getx_signed_64, (ptr))
.
-*/
+.{* Refinements on the above, which should eventually go away. Save
+. cluttering the source with (bfd_vma) and (bfd_byte *) casts. *}
+.
+.#define H_PUT_64(abfd, val, where) \
+. bfd_h_put_64 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
+.
+.#define H_PUT_32(abfd, val, where) \
+. bfd_h_put_32 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
+.
+.#define H_PUT_16(abfd, val, where) \
+. bfd_h_put_16 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
+.
+.#define H_PUT_8 bfd_h_put_8
+.
+.#define H_PUT_S64(abfd, val, where) \
+. bfd_h_put_signed_64 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
+.
+.#define H_PUT_S32(abfd, val, where) \
+. bfd_h_put_signed_32 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
+.
+.#define H_PUT_S16(abfd, val, where) \
+. bfd_h_put_signed_16 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
+.
+.#define H_PUT_S8 bfd_h_put_signed_8
+.
+.#define H_GET_64(abfd, where) \
+. bfd_h_get_64 ((abfd), (bfd_byte *) (where))
+.
+.#define H_GET_32(abfd, where) \
+. bfd_h_get_32 ((abfd), (bfd_byte *) (where))
+.
+.#define H_GET_16(abfd, where) \
+. bfd_h_get_16 ((abfd), (bfd_byte *) (where))
+.
+.#define H_GET_8 bfd_h_get_8
+.
+.#define H_GET_S64(abfd, where) \
+. bfd_h_get_signed_64 ((abfd), (bfd_byte *) (where))
+.
+.#define H_GET_S32(abfd, where) \
+. bfd_h_get_signed_32 ((abfd), (bfd_byte *) (where))
+.
+.#define H_GET_S16(abfd, where) \
+. bfd_h_get_signed_16 ((abfd), (bfd_byte *) (where))
+.
+.#define H_GET_S8 bfd_h_get_signed_8
+.
+.*/
/* Sign extension to bfd_signed_vma. */
#define COERCE16(x) (((bfd_signed_vma) (x) ^ 0x8000) - 0x8000)
@@ -1240,14 +1304,14 @@ _bfd_generic_get_section_contents (abfd, section, location, offset, count)
if (count == 0)
return true;
- if ((bfd_size_type) (offset + count) > section->_raw_size)
+ if (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)
+ || bfd_bread (location, count, abfd) != count)
return false;
return true;
@@ -1272,10 +1336,11 @@ _bfd_generic_get_section_contents_in_window (abfd, section, w, offset, count)
/* @@ FIXME : If the internal window has a refcount of 1 and was
allocated with malloc instead of mmap, just reuse it. */
bfd_free_window (w);
- w->i = (bfd_window_internal *) bfd_zmalloc (sizeof (bfd_window_internal));
+ w->i = ((bfd_window_internal *)
+ bfd_zmalloc ((bfd_size_type) sizeof (bfd_window_internal)));
if (w->i == NULL)
return false;
- w->i->data = (PTR) bfd_malloc ((size_t) count);
+ w->i->data = (PTR) bfd_malloc (count);
if (w->i->data == NULL)
{
free (w->i);
@@ -1288,7 +1353,7 @@ _bfd_generic_get_section_contents_in_window (abfd, section, w, offset, count)
w->data = w->i->data;
return bfd_get_section_contents (abfd, section, w->data, offset, count);
}
- if ((bfd_size_type) (offset+count) > section->_raw_size
+ if (offset + count > section->_raw_size
|| (bfd_get_file_window (abfd, section->filepos + offset, count, w, true)
== false))
return false;
@@ -1313,8 +1378,8 @@ _bfd_generic_set_section_contents (abfd, section, location, offset, count)
if (count == 0)
return true;
- if (bfd_seek (abfd, (file_ptr) (section->filepos + offset), SEEK_SET) == -1
- || bfd_write (location, (bfd_size_type) 1, count, abfd) != count)
+ if (bfd_seek (abfd, section->filepos + offset, SEEK_SET) != 0
+ || bfd_bwrite (location, count, abfd) != count)
return false;
return true;
@@ -1325,11 +1390,11 @@ INTERNAL_FUNCTION
bfd_log2
SYNOPSIS
- unsigned int bfd_log2(bfd_vma x);
+ unsigned int bfd_log2 (bfd_vma x);
DESCRIPTION
Return the log base 2 of the value supplied, rounded up. E.g., an
- @var{x} of 1025 returns 11.
+ @var{x} of 1025 returns 11. A @var{x} of 0 returns 0.
*/
unsigned int
@@ -1372,7 +1437,7 @@ _bfd_generic_verify_endian_match (ibfd, obfd)
else
msg = _("%s: compiled for a little endian system and target is big endian");
- (*_bfd_error_handler) (msg, bfd_get_filename (ibfd));
+ (*_bfd_error_handler) (msg, bfd_archive_filename (ibfd));
bfd_set_error (bfd_error_wrong_format);
return false;
@@ -1380,3 +1445,26 @@ _bfd_generic_verify_endian_match (ibfd, obfd)
return true;
}
+
+/* Give a warning at runtime if someone compiles code which calls
+ old routines. */
+void
+warn_deprecated (what, file, line, func)
+ const char *what;
+ const char *file;
+ int line;
+ const char *func;
+{
+ /* Poor man's tracking of functions we've already warned about. */
+ static size_t mask = 0;
+
+ if (~(size_t) func & ~mask)
+ {
+ fprintf (stderr, _("Deprecated %s called"), what);
+ if (func)
+ fprintf (stderr, _(" at %s line %d in %s\n"), file, line, func);
+ else
+ fprintf (stderr, "\n");
+ mask |= ~(size_t) func;
+ }
+}
diff --git a/contrib/binutils/bfd/libbfd.h b/contrib/binutils/bfd/libbfd.h
index 997856a..d055651 100644
--- a/contrib/binutils/bfd/libbfd.h
+++ b/contrib/binutils/bfd/libbfd.h
@@ -1,3 +1,8 @@
+/* DO NOT EDIT! -*- buffer-read-only: t -*- This file is automatically
+ generated from "libbfd-in.h", "init.c", "libbfd.c", "cache.c",
+ "reloc.c", "archures.c" and "elf.c".
+ Run "make headers" in your build bfd/ to regenerate. */
+
/* libbfd.h -- Declarations used by bfd library *implementation*.
(This include file is not for users of the library.)
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
@@ -5,10 +10,6 @@
Free Software Foundation, Inc.
Written by Cygnus Support.
-** NOTE: libbfd.h is a GENERATED file. Don't change it; instead,
-** change libbfd-in.h or the other BFD source files processed to
-** generate this file.
-
This file is part of BFD, the Binary File Descriptor library.
This program is free software; you can redistribute it and/or modify
@@ -29,9 +30,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
E.g. align to an 8-byte boundary with argument of 8. Take care never
to wrap around if the address is within boundary-1 of the end of the
address space. */
-#define BFD_ALIGN(this, boundary) \
- ((((bfd_vma) (this) + (boundary) - 1) >= (bfd_vma) (this)) \
- ? (((bfd_vma) (this) + ((boundary) - 1)) & (~((boundary)-1))) \
+#define BFD_ALIGN(this, boundary) \
+ ((((bfd_vma) (this) + (boundary) - 1) >= (bfd_vma) (this)) \
+ ? (((bfd_vma) (this) + ((boundary) - 1)) & ~ (bfd_vma) ((boundary)-1)) \
: ~ (bfd_vma) 0)
/* If you want to read and write large blocks, you might want to do it
@@ -87,20 +88,20 @@ struct areltdata {
#define arelt_size(bfd) (((struct areltdata *)((bfd)->arelt_data))->parsed_size)
-extern PTR bfd_malloc PARAMS ((size_t));
-extern PTR bfd_realloc PARAMS ((PTR, size_t));
-extern PTR bfd_zmalloc PARAMS ((size_t));
+extern PTR bfd_malloc PARAMS ((bfd_size_type));
+extern PTR bfd_realloc PARAMS ((PTR, bfd_size_type));
+extern PTR bfd_zmalloc PARAMS ((bfd_size_type));
extern bfd_error_handler_type _bfd_error_handler;
/* These routines allocate and free things on the BFD's objalloc. */
-extern PTR bfd_alloc PARAMS ((bfd *, size_t));
-extern PTR bfd_zalloc PARAMS ((bfd *, size_t));
+extern PTR bfd_alloc PARAMS ((bfd *, bfd_size_type));
+extern PTR bfd_zalloc PARAMS ((bfd *, bfd_size_type));
extern void bfd_release PARAMS ((bfd *, PTR));
bfd * _bfd_create_empty_archive_element_shell PARAMS ((bfd *obfd));
-bfd * _bfd_look_for_bfd_in_cache PARAMS ((bfd *arch_bfd, file_ptr index));
+bfd * _bfd_look_for_bfd_in_cache PARAMS ((bfd *, file_ptr));
boolean _bfd_add_bfd_to_archive_cache PARAMS ((bfd *, file_ptr, bfd *));
boolean _bfd_generic_mkarchive PARAMS ((bfd *abfd));
const bfd_target *bfd_generic_archive_p PARAMS ((bfd *abfd));
@@ -116,6 +117,7 @@ boolean _bfd_compute_and_write_armap PARAMS ((bfd *, unsigned int elength));
bfd *_bfd_get_elt_at_filepos PARAMS ((bfd *archive, file_ptr filepos));
extern bfd *_bfd_generic_get_elt_at_index PARAMS ((bfd *, symindex));
bfd * _bfd_new_bfd PARAMS ((void));
+void _bfd_delete_bfd PARAMS ((bfd *));
boolean bfd_false PARAMS ((bfd *ignore));
boolean bfd_true PARAMS ((bfd *ignore));
@@ -162,8 +164,7 @@ int bfd_generic_stat_arch_elt PARAMS ((bfd *, struct stat *));
#define _bfd_generic_new_section_hook \
((boolean (*) PARAMS ((bfd *, asection *))) bfd_true)
extern boolean _bfd_generic_get_section_contents
- PARAMS ((bfd *, asection *, PTR location, file_ptr offset,
- bfd_size_type count));
+ PARAMS ((bfd *, asection *, PTR, file_ptr, bfd_size_type));
extern boolean _bfd_generic_get_section_contents_in_window
PARAMS ((bfd *, asection *, bfd_window *, file_ptr, bfd_size_type));
@@ -255,8 +256,7 @@ extern boolean _bfd_archive_coff_construct_extended_name_table
#define _bfd_nosymbols_get_symtab_upper_bound _bfd_n1
#define _bfd_nosymbols_get_symtab \
((long (*) PARAMS ((bfd *, asymbol **))) _bfd_n1)
-#define _bfd_nosymbols_make_empty_symbol \
- ((asymbol *(*) PARAMS ((bfd *))) bfd_nullvoidptr)
+#define _bfd_nosymbols_make_empty_symbol _bfd_generic_make_empty_symbol
#define _bfd_nosymbols_print_symbol \
((void (*) PARAMS ((bfd *, PTR, asymbol *, bfd_print_symbol_type))) bfd_void)
#define _bfd_nosymbols_get_symbol_info \
@@ -323,6 +323,10 @@ extern boolean _bfd_generic_set_section_contents
((boolean (*) \
PARAMS ((bfd *, struct bfd_link_info *))) \
bfd_false)
+#define _bfd_nolink_bfd_merge_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 \
@@ -369,6 +373,10 @@ extern boolean _bfd_dwarf2_find_nearest_line
const char **, unsigned int *, unsigned int,
PTR *));
+/* Create a new section entry. */
+extern struct bfd_hash_entry *bfd_section_hash_newfunc
+ PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
+
/* A routine to create entries for a bfd_link_hash_table. */
extern struct bfd_hash_entry *_bfd_link_hash_newfunc
PARAMS ((struct bfd_hash_entry *entry,
@@ -436,7 +444,7 @@ extern unsigned int _bfd_count_link_order_relocs
/* Final link relocation routine. */
extern bfd_reloc_status_type _bfd_final_link_relocate
PARAMS ((reloc_howto_type *, bfd *, asection *, bfd_byte *,
- bfd_vma address, bfd_vma value, bfd_vma addend));
+ bfd_vma, bfd_vma, bfd_vma));
/* Relocate a particular location by a howto and a value. */
extern bfd_reloc_status_type _bfd_relocate_contents
@@ -447,6 +455,11 @@ extern bfd_reloc_status_type _bfd_relocate_contents
extern boolean _bfd_link_section_stabs
PARAMS ((bfd *, PTR *, asection *, asection *, PTR *));
+/* Eliminate stabs for discarded functions and symbols. */
+extern boolean _bfd_discard_section_stabs
+ PARAMS ((bfd *, asection *, PTR,
+ boolean (*) (bfd_vma, PTR), PTR));
+
/* Write out the .stab section when linking stabs in sections. */
extern boolean _bfd_write_section_stabs
@@ -462,6 +475,26 @@ extern boolean _bfd_write_stab_strings PARAMS ((bfd *, PTR *));
extern bfd_vma _bfd_stab_section_offset
PARAMS ((bfd *, PTR *, asection *, PTR *, bfd_vma));
+/* Attempt to merge a SEC_MERGE section. */
+
+extern boolean _bfd_merge_section
+ PARAMS ((bfd *, PTR *, asection *, PTR *));
+
+/* Attempt to merge SEC_MERGE sections. */
+
+extern boolean _bfd_merge_sections
+ PARAMS ((bfd *, PTR, void (*)(bfd *, asection *)));
+
+/* Write out a merged section. */
+
+extern boolean _bfd_write_merged_section
+ PARAMS ((bfd *, asection *, PTR));
+
+/* Find an offset within a modified SEC_MERGE section. */
+
+extern bfd_vma _bfd_merged_section_offset
+ PARAMS ((bfd *, asection **, PTR, bfd_vma, bfd_vma));
+
/* Create a string table. */
extern struct bfd_strtab_hash *_bfd_stringtab_init PARAMS ((void));
@@ -554,7 +587,7 @@ extern boolean _bfd_sh_align_load_span
/* And more follows */
void
-bfd_write_bigendian_4byte_int PARAMS ((bfd *abfd, int i));
+bfd_write_bigendian_4byte_int PARAMS ((bfd *, unsigned int));
unsigned int
bfd_log2 PARAMS ((bfd_vma x));
@@ -604,10 +637,12 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_HI16_GOTOFF",
"BFD_RELOC_HI16_S_GOTOFF",
"BFD_RELOC_8_GOTOFF",
+ "BFD_RELOC_64_PLT_PCREL",
"BFD_RELOC_32_PLT_PCREL",
"BFD_RELOC_24_PLT_PCREL",
"BFD_RELOC_16_PLT_PCREL",
"BFD_RELOC_8_PLT_PCREL",
+ "BFD_RELOC_64_PLTOFF",
"BFD_RELOC_32_PLTOFF",
"BFD_RELOC_16_PLTOFF",
"BFD_RELOC_LO16_PLTOFF",
@@ -666,6 +701,7 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_SPARC_7",
"BFD_RELOC_SPARC_6",
"BFD_RELOC_SPARC_5",
+ "BFD_RELOC_SPARC_PLT32",
"BFD_RELOC_SPARC_PLT64",
"BFD_RELOC_SPARC_HIX22",
"BFD_RELOC_SPARC_LOX10",
@@ -680,16 +716,11 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"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",
+ "BFD_RELOC_ALPHA_GPREL_HI16",
+ "BFD_RELOC_ALPHA_GPREL_LO16",
"BFD_RELOC_MIPS_JMP",
"BFD_RELOC_MIPS16_JMP",
"BFD_RELOC_MIPS16_GPREL",
@@ -749,6 +780,8 @@ 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_PDP11_DISP_8_PCREL",
+ "BFD_RELOC_PDP11_DISP_6_PCREL",
"BFD_RELOC_PJ_CODE_HI16",
"BFD_RELOC_PJ_CODE_LO16",
"BFD_RELOC_PJ_CODE_DIR16",
@@ -785,6 +818,29 @@ 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_PPC64_HIGHER",
+ "BFD_RELOC_PPC64_HIGHER_S",
+ "BFD_RELOC_PPC64_HIGHEST",
+ "BFD_RELOC_PPC64_HIGHEST_S",
+ "BFD_RELOC_PPC64_TOC16_LO",
+ "BFD_RELOC_PPC64_TOC16_HI",
+ "BFD_RELOC_PPC64_TOC16_HA",
+ "BFD_RELOC_PPC64_TOC",
+ "BFD_RELOC_PPC64_PLTGOT16",
+ "BFD_RELOC_PPC64_PLTGOT16_LO",
+ "BFD_RELOC_PPC64_PLTGOT16_HI",
+ "BFD_RELOC_PPC64_PLTGOT16_HA",
+ "BFD_RELOC_PPC64_ADDR16_DS",
+ "BFD_RELOC_PPC64_ADDR16_LO_DS",
+ "BFD_RELOC_PPC64_GOT16_DS",
+ "BFD_RELOC_PPC64_GOT16_LO_DS",
+ "BFD_RELOC_PPC64_PLT16_LO_DS",
+ "BFD_RELOC_PPC64_SECTOFF_DS",
+ "BFD_RELOC_PPC64_SECTOFF_LO_DS",
+ "BFD_RELOC_PPC64_TOC16_DS",
+ "BFD_RELOC_PPC64_TOC16_LO_DS",
+ "BFD_RELOC_PPC64_PLTGOT16_DS",
+ "BFD_RELOC_PPC64_PLTGOT16_LO_DS",
"BFD_RELOC_I370_D12",
"BFD_RELOC_CTOR",
"BFD_RELOC_ARM_PCREL_BRANCH",
@@ -908,6 +964,29 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_MCORE_PCREL_32",
"BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2",
"BFD_RELOC_MCORE_RVA",
+ "BFD_RELOC_MMIX_GETA",
+ "BFD_RELOC_MMIX_GETA_1",
+ "BFD_RELOC_MMIX_GETA_2",
+ "BFD_RELOC_MMIX_GETA_3",
+ "BFD_RELOC_MMIX_CBRANCH",
+ "BFD_RELOC_MMIX_CBRANCH_J",
+ "BFD_RELOC_MMIX_CBRANCH_1",
+ "BFD_RELOC_MMIX_CBRANCH_2",
+ "BFD_RELOC_MMIX_CBRANCH_3",
+ "BFD_RELOC_MMIX_PUSHJ",
+ "BFD_RELOC_MMIX_PUSHJ_1",
+ "BFD_RELOC_MMIX_PUSHJ_2",
+ "BFD_RELOC_MMIX_PUSHJ_3",
+ "BFD_RELOC_MMIX_JMP",
+ "BFD_RELOC_MMIX_JMP_1",
+ "BFD_RELOC_MMIX_JMP_2",
+ "BFD_RELOC_MMIX_JMP_3",
+ "BFD_RELOC_MMIX_ADDR19",
+ "BFD_RELOC_MMIX_ADDR27",
+ "BFD_RELOC_MMIX_REG_OR_BYTE",
+ "BFD_RELOC_MMIX_REG",
+ "BFD_RELOC_MMIX_BASE_PLUS_OFFSET",
+ "BFD_RELOC_MMIX_LOCAL",
"BFD_RELOC_AVR_7_PCREL",
"BFD_RELOC_AVR_13_PCREL",
"BFD_RELOC_AVR_16_PM",
@@ -924,6 +1003,23 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_AVR_HI8_LDI_PM_NEG",
"BFD_RELOC_AVR_HH8_LDI_PM_NEG",
"BFD_RELOC_AVR_CALL",
+ "BFD_RELOC_390_12",
+ "BFD_RELOC_390_GOT12",
+ "BFD_RELOC_390_PLT32",
+ "BFD_RELOC_390_COPY",
+ "BFD_RELOC_390_GLOB_DAT",
+ "BFD_RELOC_390_JMP_SLOT",
+ "BFD_RELOC_390_RELATIVE",
+ "BFD_RELOC_390_GOTPC",
+ "BFD_RELOC_390_GOT16",
+ "BFD_RELOC_390_PC16DBL",
+ "BFD_RELOC_390_PLT16DBL",
+ "BFD_RELOC_390_PC32DBL",
+ "BFD_RELOC_390_PLT32DBL",
+ "BFD_RELOC_390_GOTPCDBL",
+ "BFD_RELOC_390_GOT64",
+ "BFD_RELOC_390_PLT64",
+ "BFD_RELOC_390_GOTENT",
"BFD_RELOC_VTABLE_INHERIT",
"BFD_RELOC_VTABLE_ENTRY",
"BFD_RELOC_IA64_IMM14",
@@ -963,6 +1059,8 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_IA64_PCREL64LSB",
"BFD_RELOC_IA64_LTOFF_FPTR22",
"BFD_RELOC_IA64_LTOFF_FPTR64I",
+ "BFD_RELOC_IA64_LTOFF_FPTR32MSB",
+ "BFD_RELOC_IA64_LTOFF_FPTR32LSB",
"BFD_RELOC_IA64_LTOFF_FPTR64MSB",
"BFD_RELOC_IA64_LTOFF_FPTR64LSB",
"BFD_RELOC_IA64_SEGREL32MSB",
@@ -998,6 +1096,17 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_CRIS_SIGNED_6",
"BFD_RELOC_CRIS_UNSIGNED_6",
"BFD_RELOC_CRIS_UNSIGNED_4",
+ "BFD_RELOC_CRIS_COPY",
+ "BFD_RELOC_CRIS_GLOB_DAT",
+ "BFD_RELOC_CRIS_JUMP_SLOT",
+ "BFD_RELOC_CRIS_RELATIVE",
+ "BFD_RELOC_CRIS_32_GOT",
+ "BFD_RELOC_CRIS_16_GOT",
+ "BFD_RELOC_CRIS_32_GOTPLT",
+ "BFD_RELOC_CRIS_16_GOTPLT",
+ "BFD_RELOC_CRIS_32_GOTREL",
+ "BFD_RELOC_CRIS_32_PLT_GOTREL",
+ "BFD_RELOC_CRIS_32_PLT_PCREL",
"BFD_RELOC_860_COPY",
"BFD_RELOC_860_GLOB_DAT",
"BFD_RELOC_860_JUMP_SLOT",
@@ -1030,6 +1139,16 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@",
"BFD_RELOC_860_HIGH",
"BFD_RELOC_860_HIGOT",
"BFD_RELOC_860_HIGOTOFF",
+ "BFD_RELOC_OPENRISC_ABS_26",
+ "BFD_RELOC_OPENRISC_REL_26",
+ "BFD_RELOC_H8_DIR16A8",
+ "BFD_RELOC_H8_DIR16R8",
+ "BFD_RELOC_H8_DIR24A8",
+ "BFD_RELOC_H8_DIR24R8",
+ "BFD_RELOC_H8_DIR32A16",
+ "BFD_RELOC_XSTORMY16_REL_12",
+ "BFD_RELOC_XSTORMY16_24",
+ "BFD_RELOC_XSTORMY16_FPTR16",
"@@overflow: BFD_RELOC_UNUSED@@",
};
#endif
@@ -1046,6 +1165,9 @@ bfd_generic_relax_section PARAMS ((bfd *abfd,
boolean
bfd_generic_gc_sections PARAMS ((bfd *, struct bfd_link_info *));
+boolean
+bfd_generic_merge_sections PARAMS ((bfd *, struct bfd_link_info *));
+
bfd_byte *
bfd_generic_get_relocated_section_contents PARAMS ((bfd *abfd,
struct bfd_link_info *link_info,
diff --git a/contrib/binutils/bfd/libcoff-in.h b/contrib/binutils/bfd/libcoff-in.h
index 8368cc8..bbccbba 100644
--- a/contrib/binutils/bfd/libcoff-in.h
+++ b/contrib/binutils/bfd/libcoff-in.h
@@ -4,9 +4,6 @@
Free Software Foundation, Inc.
Written by Cygnus Support.
-** NOTE: libcoff.h is a GENERATED file. Don't change it; instead,
-** change libcoff-in.h or coffcode.h.
-
This file is part of BFD, the Binary File Descriptor library.
This program is free software; you can redistribute it and/or modify
@@ -176,7 +173,7 @@ struct xcoff_tdata
#define xcoff_data(abfd) ((abfd)->tdata.xcoff_obj_data)
-/* We take the address of the first element of a asymbol to ensure that the
+/* We take the address of the first element of an asymbol to ensure that the
* macro is only ever applied to an asymbol. */
#define coffsymbol(asymbol) ((coff_symbol_type *)(&((asymbol)->the_bfd)))
@@ -302,50 +299,64 @@ struct coff_link_hash_table
#define coff_hash_table(p) ((struct coff_link_hash_table *) ((p)->hash))
/* Functions in coffgen.c. */
-extern const bfd_target *coff_object_p PARAMS ((bfd *));
-extern struct sec *coff_section_from_bfd_index PARAMS ((bfd *, int));
-extern long coff_get_symtab_upper_bound PARAMS ((bfd *));
-extern long coff_get_symtab PARAMS ((bfd *, asymbol **));
-extern int coff_count_linenumbers PARAMS ((bfd *));
-extern struct coff_symbol_struct *coff_symbol_from PARAMS ((bfd *, asymbol *));
-extern boolean coff_renumber_symbols PARAMS ((bfd *, int *));
-extern void coff_mangle_symbols PARAMS ((bfd *));
-extern boolean coff_write_symbols PARAMS ((bfd *));
-extern boolean coff_write_linenumbers PARAMS ((bfd *));
-extern alent *coff_get_lineno PARAMS ((bfd *, asymbol *));
-extern asymbol *coff_section_symbol PARAMS ((bfd *, char *));
-extern boolean _bfd_coff_get_external_symbols PARAMS ((bfd *));
-extern const char *_bfd_coff_read_string_table PARAMS ((bfd *));
-extern boolean _bfd_coff_free_symbols PARAMS ((bfd *));
-extern struct coff_ptr_struct *coff_get_normalized_symtab PARAMS ((bfd *));
-extern long coff_get_reloc_upper_bound PARAMS ((bfd *, sec_ptr));
-extern asymbol *coff_make_empty_symbol PARAMS ((bfd *));
-extern void coff_print_symbol PARAMS ((bfd *, PTR filep, asymbol *,
- bfd_print_symbol_type how));
-extern void coff_get_symbol_info PARAMS ((bfd *, asymbol *,
- symbol_info *ret));
-extern boolean _bfd_coff_is_local_label_name PARAMS ((bfd *, const char *));
-extern asymbol *coff_bfd_make_debug_symbol PARAMS ((bfd *, PTR,
- unsigned long));
-extern boolean coff_find_nearest_line PARAMS ((bfd *,
- asection *,
- asymbol **,
- bfd_vma offset,
- CONST char **filename_ptr,
- CONST char **functionname_ptr,
- unsigned int *line_ptr));
-extern int coff_sizeof_headers PARAMS ((bfd *, boolean reloc));
+extern const bfd_target *coff_object_p
+ PARAMS ((bfd *));
+extern struct sec *coff_section_from_bfd_index
+ PARAMS ((bfd *, int));
+extern long coff_get_symtab_upper_bound
+ PARAMS ((bfd *));
+extern long coff_get_symtab
+ PARAMS ((bfd *, asymbol **));
+extern int coff_count_linenumbers
+ PARAMS ((bfd *));
+extern struct coff_symbol_struct *coff_symbol_from
+ PARAMS ((bfd *, asymbol *));
+extern boolean coff_renumber_symbols
+ PARAMS ((bfd *, int *));
+extern void coff_mangle_symbols
+ PARAMS ((bfd *));
+extern boolean coff_write_symbols
+ PARAMS ((bfd *));
+extern boolean coff_write_linenumbers
+ PARAMS ((bfd *));
+extern alent *coff_get_lineno
+ PARAMS ((bfd *, asymbol *));
+extern asymbol *coff_section_symbol
+ PARAMS ((bfd *, char *));
+extern boolean _bfd_coff_get_external_symbols
+ PARAMS ((bfd *));
+extern const char *_bfd_coff_read_string_table
+ PARAMS ((bfd *));
+extern boolean _bfd_coff_free_symbols
+ PARAMS ((bfd *));
+extern struct coff_ptr_struct *coff_get_normalized_symtab
+ PARAMS ((bfd *));
+extern long coff_get_reloc_upper_bound
+ PARAMS ((bfd *, sec_ptr));
+extern asymbol *coff_make_empty_symbol
+ PARAMS ((bfd *));
+extern void coff_print_symbol
+ PARAMS ((bfd *, PTR filep, asymbol *, bfd_print_symbol_type));
+extern void coff_get_symbol_info
+ PARAMS ((bfd *, asymbol *, symbol_info *ret));
+extern boolean _bfd_coff_is_local_label_name
+ PARAMS ((bfd *, const char *));
+extern asymbol *coff_bfd_make_debug_symbol
+ PARAMS ((bfd *, PTR, unsigned long));
+extern boolean coff_find_nearest_line
+ PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
+ const char **, unsigned int *));
+extern int coff_sizeof_headers
+ PARAMS ((bfd *, boolean));
extern boolean bfd_coff_reloc16_relax_section
PARAMS ((bfd *, asection *, struct bfd_link_info *, boolean *));
extern bfd_byte *bfd_coff_reloc16_get_relocated_section_contents
PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *,
- bfd_byte *, boolean relocateable, asymbol **));
-extern bfd_vma bfd_coff_reloc16_get_value PARAMS ((arelent *,
- struct bfd_link_info *,
- asection *));
-extern void bfd_perform_slip PARAMS ((bfd *abfd, unsigned int slip,
- asection *input_section,
- bfd_vma val));
+ bfd_byte *, boolean, asymbol **));
+extern bfd_vma bfd_coff_reloc16_get_value
+ PARAMS ((arelent *, struct bfd_link_info *, asection *));
+extern void bfd_perform_slip
+ PARAMS ((bfd *, unsigned int, asection *, bfd_vma));
/* Functions and types in cofflink.c. */
@@ -559,10 +570,12 @@ extern boolean _bfd_coff_reloc_link_order
/* Functions in xcofflink.c. */
-extern long _bfd_xcoff_get_dynamic_symtab_upper_bound PARAMS ((bfd *));
+extern long _bfd_xcoff_get_dynamic_symtab_upper_bound
+ PARAMS ((bfd *));
extern long _bfd_xcoff_canonicalize_dynamic_symtab
PARAMS ((bfd *, asymbol **));
-extern long _bfd_xcoff_get_dynamic_reloc_upper_bound PARAMS ((bfd *));
+extern long _bfd_xcoff_get_dynamic_reloc_upper_bound
+ PARAMS ((bfd *));
extern long _bfd_xcoff_canonicalize_dynamic_reloc
PARAMS ((bfd *, arelent **, asymbol **));
extern struct bfd_link_hash_table *_bfd_xcoff_bfd_link_hash_table_create
@@ -578,7 +591,8 @@ extern boolean _bfd_ppc_xcoff_relocate_section
/* Functions in coff-ppc.c. FIXME: These are called be pe.em in the
linker, and so should start with bfd and be declared in bfd.h. */
-extern boolean ppc_allocate_toc_section PARAMS ((struct bfd_link_info *));
+extern boolean ppc_allocate_toc_section
+ PARAMS ((struct bfd_link_info *));
extern boolean ppc_process_before_allocation
PARAMS ((bfd *, struct bfd_link_info *));
diff --git a/contrib/binutils/bfd/libcoff.h b/contrib/binutils/bfd/libcoff.h
index 34fed2d..f26a692 100644
--- a/contrib/binutils/bfd/libcoff.h
+++ b/contrib/binutils/bfd/libcoff.h
@@ -1,12 +1,13 @@
+/* DO NOT EDIT! -*- buffer-read-only: t -*- This file is automatically
+ generated from "libcoff-in.h" and "coffcode.h".
+ Run "make headers" in your build bfd/ to regenerate. */
+
/* BFD COFF object file private structure.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
2000, 2001
Free Software Foundation, Inc.
Written by Cygnus Support.
-** NOTE: libcoff.h is a GENERATED file. Don't change it; instead,
-** change libcoff-in.h or coffcode.h.
-
This file is part of BFD, the Binary File Descriptor library.
This program is free software; you can redistribute it and/or modify
@@ -176,7 +177,7 @@ struct xcoff_tdata
#define xcoff_data(abfd) ((abfd)->tdata.xcoff_obj_data)
-/* We take the address of the first element of a asymbol to ensure that the
+/* We take the address of the first element of an asymbol to ensure that the
* macro is only ever applied to an asymbol. */
#define coffsymbol(asymbol) ((coff_symbol_type *)(&((asymbol)->the_bfd)))
@@ -302,50 +303,64 @@ struct coff_link_hash_table
#define coff_hash_table(p) ((struct coff_link_hash_table *) ((p)->hash))
/* Functions in coffgen.c. */
-extern const bfd_target *coff_object_p PARAMS ((bfd *));
-extern struct sec *coff_section_from_bfd_index PARAMS ((bfd *, int));
-extern long coff_get_symtab_upper_bound PARAMS ((bfd *));
-extern long coff_get_symtab PARAMS ((bfd *, asymbol **));
-extern int coff_count_linenumbers PARAMS ((bfd *));
-extern struct coff_symbol_struct *coff_symbol_from PARAMS ((bfd *, asymbol *));
-extern boolean coff_renumber_symbols PARAMS ((bfd *, int *));
-extern void coff_mangle_symbols PARAMS ((bfd *));
-extern boolean coff_write_symbols PARAMS ((bfd *));
-extern boolean coff_write_linenumbers PARAMS ((bfd *));
-extern alent *coff_get_lineno PARAMS ((bfd *, asymbol *));
-extern asymbol *coff_section_symbol PARAMS ((bfd *, char *));
-extern boolean _bfd_coff_get_external_symbols PARAMS ((bfd *));
-extern const char *_bfd_coff_read_string_table PARAMS ((bfd *));
-extern boolean _bfd_coff_free_symbols PARAMS ((bfd *));
-extern struct coff_ptr_struct *coff_get_normalized_symtab PARAMS ((bfd *));
-extern long coff_get_reloc_upper_bound PARAMS ((bfd *, sec_ptr));
-extern asymbol *coff_make_empty_symbol PARAMS ((bfd *));
-extern void coff_print_symbol PARAMS ((bfd *, PTR filep, asymbol *,
- bfd_print_symbol_type how));
-extern void coff_get_symbol_info PARAMS ((bfd *, asymbol *,
- symbol_info *ret));
-extern boolean _bfd_coff_is_local_label_name PARAMS ((bfd *, const char *));
-extern asymbol *coff_bfd_make_debug_symbol PARAMS ((bfd *, PTR,
- unsigned long));
-extern boolean coff_find_nearest_line PARAMS ((bfd *,
- asection *,
- asymbol **,
- bfd_vma offset,
- CONST char **filename_ptr,
- CONST char **functionname_ptr,
- unsigned int *line_ptr));
-extern int coff_sizeof_headers PARAMS ((bfd *, boolean reloc));
+extern const bfd_target *coff_object_p
+ PARAMS ((bfd *));
+extern struct sec *coff_section_from_bfd_index
+ PARAMS ((bfd *, int));
+extern long coff_get_symtab_upper_bound
+ PARAMS ((bfd *));
+extern long coff_get_symtab
+ PARAMS ((bfd *, asymbol **));
+extern int coff_count_linenumbers
+ PARAMS ((bfd *));
+extern struct coff_symbol_struct *coff_symbol_from
+ PARAMS ((bfd *, asymbol *));
+extern boolean coff_renumber_symbols
+ PARAMS ((bfd *, int *));
+extern void coff_mangle_symbols
+ PARAMS ((bfd *));
+extern boolean coff_write_symbols
+ PARAMS ((bfd *));
+extern boolean coff_write_linenumbers
+ PARAMS ((bfd *));
+extern alent *coff_get_lineno
+ PARAMS ((bfd *, asymbol *));
+extern asymbol *coff_section_symbol
+ PARAMS ((bfd *, char *));
+extern boolean _bfd_coff_get_external_symbols
+ PARAMS ((bfd *));
+extern const char *_bfd_coff_read_string_table
+ PARAMS ((bfd *));
+extern boolean _bfd_coff_free_symbols
+ PARAMS ((bfd *));
+extern struct coff_ptr_struct *coff_get_normalized_symtab
+ PARAMS ((bfd *));
+extern long coff_get_reloc_upper_bound
+ PARAMS ((bfd *, sec_ptr));
+extern asymbol *coff_make_empty_symbol
+ PARAMS ((bfd *));
+extern void coff_print_symbol
+ PARAMS ((bfd *, PTR filep, asymbol *, bfd_print_symbol_type));
+extern void coff_get_symbol_info
+ PARAMS ((bfd *, asymbol *, symbol_info *ret));
+extern boolean _bfd_coff_is_local_label_name
+ PARAMS ((bfd *, const char *));
+extern asymbol *coff_bfd_make_debug_symbol
+ PARAMS ((bfd *, PTR, unsigned long));
+extern boolean coff_find_nearest_line
+ PARAMS ((bfd *, asection *, asymbol **, bfd_vma, const char **,
+ const char **, unsigned int *));
+extern int coff_sizeof_headers
+ PARAMS ((bfd *, boolean));
extern boolean bfd_coff_reloc16_relax_section
PARAMS ((bfd *, asection *, struct bfd_link_info *, boolean *));
extern bfd_byte *bfd_coff_reloc16_get_relocated_section_contents
PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *,
- bfd_byte *, boolean relocateable, asymbol **));
-extern bfd_vma bfd_coff_reloc16_get_value PARAMS ((arelent *,
- struct bfd_link_info *,
- asection *));
-extern void bfd_perform_slip PARAMS ((bfd *abfd, unsigned int slip,
- asection *input_section,
- bfd_vma val));
+ bfd_byte *, boolean, asymbol **));
+extern bfd_vma bfd_coff_reloc16_get_value
+ PARAMS ((arelent *, struct bfd_link_info *, asection *));
+extern void bfd_perform_slip
+ PARAMS ((bfd *, unsigned int, asection *, bfd_vma));
/* Functions and types in cofflink.c. */
@@ -559,10 +574,12 @@ extern boolean _bfd_coff_reloc_link_order
/* Functions in xcofflink.c. */
-extern long _bfd_xcoff_get_dynamic_symtab_upper_bound PARAMS ((bfd *));
+extern long _bfd_xcoff_get_dynamic_symtab_upper_bound
+ PARAMS ((bfd *));
extern long _bfd_xcoff_canonicalize_dynamic_symtab
PARAMS ((bfd *, asymbol **));
-extern long _bfd_xcoff_get_dynamic_reloc_upper_bound PARAMS ((bfd *));
+extern long _bfd_xcoff_get_dynamic_reloc_upper_bound
+ PARAMS ((bfd *));
extern long _bfd_xcoff_canonicalize_dynamic_reloc
PARAMS ((bfd *, arelent **, asymbol **));
extern struct bfd_link_hash_table *_bfd_xcoff_bfd_link_hash_table_create
@@ -578,7 +595,8 @@ extern boolean _bfd_ppc_xcoff_relocate_section
/* Functions in coff-ppc.c. FIXME: These are called be pe.em in the
linker, and so should start with bfd and be declared in bfd.h. */
-extern boolean ppc_allocate_toc_section PARAMS ((struct bfd_link_info *));
+extern boolean ppc_allocate_toc_section
+ PARAMS ((struct bfd_link_info *));
extern boolean ppc_process_before_allocation
PARAMS ((bfd *, struct bfd_link_info *));
@@ -586,39 +604,37 @@ extern boolean ppc_process_before_allocation
typedef struct coff_ptr_struct
{
-
- /* Remembers the offset from the first symbol in the file for
- this symbol. Generated by coff_renumber_symbols. */
-unsigned int offset;
-
- /* Should the value of this symbol be renumbered. Used for
- XCOFF C_BSTAT symbols. Set by coff_slurp_symbol_table. */
-unsigned int fix_value : 1;
-
- /* Should the tag field of this symbol be renumbered.
- Created by coff_pointerize_aux. */
-unsigned int fix_tag : 1;
-
- /* Should the endidx field of this symbol be renumbered.
- Created by coff_pointerize_aux. */
-unsigned int fix_end : 1;
-
- /* Should the x_csect.x_scnlen field be renumbered.
- Created by coff_pointerize_aux. */
-unsigned int fix_scnlen : 1;
-
- /* Fix up an XCOFF C_BINCL/C_EINCL symbol. The value is the
- index into the line number entries. Set by
- coff_slurp_symbol_table. */
-unsigned int fix_line : 1;
-
- /* The container for the symbol structure as read and translated
- from the file. */
-
-union {
- union internal_auxent auxent;
- struct internal_syment syment;
- } u;
+ /* Remembers the offset from the first symbol in the file for
+ this symbol. Generated by coff_renumber_symbols. */
+ unsigned int offset;
+
+ /* Should the value of this symbol be renumbered. Used for
+ XCOFF C_BSTAT symbols. Set by coff_slurp_symbol_table. */
+ unsigned int fix_value : 1;
+
+ /* Should the tag field of this symbol be renumbered.
+ Created by coff_pointerize_aux. */
+ unsigned int fix_tag : 1;
+
+ /* Should the endidx field of this symbol be renumbered.
+ Created by coff_pointerize_aux. */
+ unsigned int fix_end : 1;
+
+ /* Should the x_csect.x_scnlen field be renumbered.
+ Created by coff_pointerize_aux. */
+ unsigned int fix_scnlen : 1;
+
+ /* Fix up an XCOFF C_BINCL/C_EINCL symbol. The value is the
+ index into the line number entries. Set by coff_slurp_symbol_table. */
+ unsigned int fix_line : 1;
+
+ /* The container for the symbol structure as read and translated
+ from the file. */
+ union
+ {
+ union internal_auxent auxent;
+ struct internal_syment syment;
+ } u;
} combined_entry_type;
@@ -626,17 +642,17 @@ union {
typedef struct coff_symbol_struct
{
- /* The actual symbol which the rest of BFD works with */
-asymbol symbol;
+ /* The actual symbol which the rest of BFD works with */
+ asymbol symbol;
- /* A pointer to the hidden information for this symbol */
-combined_entry_type *native;
+ /* A pointer to the hidden information for this symbol */
+ combined_entry_type *native;
- /* A pointer to the linenumber information for this symbol */
-struct lineno_cache_entry *lineno;
+ /* A pointer to the linenumber information for this symbol */
+ struct lineno_cache_entry *lineno;
- /* Have the line numbers been relocated yet ? */
-boolean done_lineno;
+ /* Have the line numbers been relocated yet ? */
+ boolean done_lineno;
} coff_symbol_type;
/* COFF symbol classifications. */
@@ -656,227 +672,166 @@ enum coff_symbol_classification
typedef struct
{
- void (*_bfd_coff_swap_aux_in) PARAMS ((
- bfd *abfd,
- PTR ext,
- int type,
- int class,
- int indaux,
- int numaux,
- PTR in));
-
- void (*_bfd_coff_swap_sym_in) PARAMS ((
- bfd *abfd ,
- PTR ext,
- PTR in));
-
- void (*_bfd_coff_swap_lineno_in) PARAMS ((
- bfd *abfd,
- PTR ext,
- PTR in));
-
- unsigned int (*_bfd_coff_swap_aux_out) PARAMS ((
- bfd *abfd,
- PTR in,
- int type,
- int class,
- int indaux,
- int numaux,
- PTR ext));
-
- unsigned int (*_bfd_coff_swap_sym_out) PARAMS ((
- bfd *abfd,
- PTR in,
- PTR ext));
-
- unsigned int (*_bfd_coff_swap_lineno_out) PARAMS ((
- bfd *abfd,
- PTR in,
- PTR ext));
-
- unsigned int (*_bfd_coff_swap_reloc_out) PARAMS ((
- bfd *abfd,
- PTR src,
- PTR dst));
-
- unsigned int (*_bfd_coff_swap_filehdr_out) PARAMS ((
- bfd *abfd,
- PTR in,
- PTR out));
-
- unsigned int (*_bfd_coff_swap_aouthdr_out) PARAMS ((
- bfd *abfd,
- PTR in,
- PTR out));
-
- unsigned int (*_bfd_coff_swap_scnhdr_out) PARAMS ((
- bfd *abfd,
- PTR in,
- PTR out));
-
- unsigned int _bfd_filhsz;
- unsigned int _bfd_aoutsz;
- unsigned int _bfd_scnhsz;
- unsigned int _bfd_symesz;
- 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;
- boolean _bfd_coff_force_symnames_in_strings;
- unsigned int _bfd_coff_debug_string_prefix_length;
- void (*_bfd_coff_swap_filehdr_in) PARAMS ((
- bfd *abfd,
- PTR ext,
- PTR in));
- void (*_bfd_coff_swap_aouthdr_in) PARAMS ((
- bfd *abfd,
- PTR ext,
- PTR in));
- void (*_bfd_coff_swap_scnhdr_in) PARAMS ((
- bfd *abfd,
- PTR ext,
- PTR in));
- void (*_bfd_coff_swap_reloc_in) PARAMS ((
- bfd *abfd,
- PTR ext,
- PTR in));
- boolean (*_bfd_coff_bad_format_hook) PARAMS ((
- bfd *abfd,
- PTR internal_filehdr));
- boolean (*_bfd_coff_set_arch_mach_hook) PARAMS ((
- bfd *abfd,
- PTR internal_filehdr));
- PTR (*_bfd_coff_mkobject_hook) PARAMS ((
- bfd *abfd,
- PTR internal_filehdr,
- PTR internal_aouthdr));
- flagword (*_bfd_styp_to_sec_flags_hook) PARAMS ((
- bfd *abfd,
- PTR internal_scnhdr,
- const char *name,
- asection *section));
- void (*_bfd_set_alignment_hook) PARAMS ((
- bfd *abfd,
- asection *sec,
- PTR internal_scnhdr));
- boolean (*_bfd_coff_slurp_symbol_table) PARAMS ((
- bfd *abfd));
- boolean (*_bfd_coff_symname_in_debug) PARAMS ((
- bfd *abfd,
- struct internal_syment *sym));
- boolean (*_bfd_coff_pointerize_aux_hook) PARAMS ((
- bfd *abfd,
- combined_entry_type *table_base,
- combined_entry_type *symbol,
- unsigned int indaux,
- combined_entry_type *aux));
- boolean (*_bfd_coff_print_aux) PARAMS ((
- bfd *abfd,
- FILE *file,
- combined_entry_type *table_base,
- combined_entry_type *symbol,
- combined_entry_type *aux,
- unsigned int indaux));
- void (*_bfd_coff_reloc16_extra_cases) PARAMS ((
- 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));
- int (*_bfd_coff_reloc16_estimate) PARAMS ((
- bfd *abfd,
- asection *input_section,
- arelent *r,
- unsigned int shrink,
- struct bfd_link_info *link_info));
- enum coff_symbol_classification (*_bfd_coff_classify_symbol) PARAMS ((
- bfd *abfd,
- struct internal_syment *));
- boolean (*_bfd_coff_compute_section_file_positions) PARAMS ((
- bfd *abfd));
- boolean (*_bfd_coff_start_final_link) PARAMS ((
- bfd *output_bfd,
- struct bfd_link_info *info));
- boolean (*_bfd_coff_relocate_section) PARAMS ((
- 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));
- reloc_howto_type *(*_bfd_coff_rtype_to_howto) PARAMS ((
- bfd *abfd,
- asection *sec,
- struct internal_reloc *rel,
- struct coff_link_hash_entry *h,
- struct internal_syment *sym,
- bfd_vma *addendp));
- boolean (*_bfd_coff_adjust_symndx) PARAMS ((
- bfd *obfd,
- struct bfd_link_info *info,
- bfd *ibfd,
- asection *sec,
- struct internal_reloc *reloc,
- boolean *adjustedp));
- boolean (*_bfd_coff_link_add_one_symbol) PARAMS ((
- 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));
-
- boolean (*_bfd_coff_link_output_has_begun) PARAMS ((
- bfd * abfd,
- struct coff_final_link_info * pfinfo));
- boolean (*_bfd_coff_final_link_postscript) PARAMS ((
- bfd * abfd,
- struct coff_final_link_info * pfinfo));
+ void (*_bfd_coff_swap_aux_in)
+ PARAMS ((bfd *, PTR, int, int, int, int, PTR));
+
+ void (*_bfd_coff_swap_sym_in)
+ PARAMS ((bfd *, PTR, PTR));
+
+ void (*_bfd_coff_swap_lineno_in)
+ PARAMS ((bfd *, PTR, PTR));
+
+ unsigned int (*_bfd_coff_swap_aux_out)
+ PARAMS ((bfd *, PTR, int, int, int, int, PTR));
+
+ unsigned int (*_bfd_coff_swap_sym_out)
+ PARAMS ((bfd *, PTR, PTR));
+
+ unsigned int (*_bfd_coff_swap_lineno_out)
+ PARAMS ((bfd *, PTR, PTR));
+
+ unsigned int (*_bfd_coff_swap_reloc_out)
+ PARAMS ((bfd *, PTR, PTR));
+
+ unsigned int (*_bfd_coff_swap_filehdr_out)
+ PARAMS ((bfd *, PTR, PTR));
+
+ unsigned int (*_bfd_coff_swap_aouthdr_out)
+ PARAMS ((bfd *, PTR, PTR));
+
+ unsigned int (*_bfd_coff_swap_scnhdr_out)
+ PARAMS ((bfd *, PTR, PTR));
+
+ unsigned int _bfd_filhsz;
+ unsigned int _bfd_aoutsz;
+ unsigned int _bfd_scnhsz;
+ unsigned int _bfd_symesz;
+ 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;
+ boolean _bfd_coff_force_symnames_in_strings;
+ unsigned int _bfd_coff_debug_string_prefix_length;
+
+ void (*_bfd_coff_swap_filehdr_in)
+ PARAMS ((bfd *, PTR, PTR));
+
+ void (*_bfd_coff_swap_aouthdr_in)
+ PARAMS ((bfd *, PTR, PTR));
+
+ void (*_bfd_coff_swap_scnhdr_in)
+ PARAMS ((bfd *, PTR, PTR));
+
+ void (*_bfd_coff_swap_reloc_in)
+ PARAMS ((bfd *abfd, PTR, PTR));
+
+ boolean (*_bfd_coff_bad_format_hook)
+ PARAMS ((bfd *, PTR));
+
+ boolean (*_bfd_coff_set_arch_mach_hook)
+ PARAMS ((bfd *, PTR));
+
+ PTR (*_bfd_coff_mkobject_hook)
+ PARAMS ((bfd *, PTR, PTR));
+
+ boolean (*_bfd_styp_to_sec_flags_hook)
+ PARAMS ((bfd *, PTR, const char *, asection *, flagword *));
+
+ void (*_bfd_set_alignment_hook)
+ PARAMS ((bfd *, asection *, PTR));
+
+ boolean (*_bfd_coff_slurp_symbol_table)
+ PARAMS ((bfd *));
+
+ boolean (*_bfd_coff_symname_in_debug)
+ PARAMS ((bfd *, struct internal_syment *));
+
+ boolean (*_bfd_coff_pointerize_aux_hook)
+ PARAMS ((bfd *, combined_entry_type *, combined_entry_type *,
+ unsigned int, combined_entry_type *));
+
+ boolean (*_bfd_coff_print_aux)
+ PARAMS ((bfd *, FILE *, combined_entry_type *, combined_entry_type *,
+ combined_entry_type *, unsigned int));
+
+ void (*_bfd_coff_reloc16_extra_cases)
+ PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *, arelent *,
+ bfd_byte *, unsigned int *, unsigned int *));
+
+ int (*_bfd_coff_reloc16_estimate)
+ PARAMS ((bfd *, asection *, arelent *, unsigned int,
+ struct bfd_link_info *));
+
+ enum coff_symbol_classification (*_bfd_coff_classify_symbol)
+ PARAMS ((bfd *, struct internal_syment *));
+
+ boolean (*_bfd_coff_compute_section_file_positions)
+ PARAMS ((bfd *));
+
+ boolean (*_bfd_coff_start_final_link)
+ PARAMS ((bfd *, struct bfd_link_info *));
+
+ boolean (*_bfd_coff_relocate_section)
+ PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
+ struct internal_reloc *, struct internal_syment *, asection **));
+
+ reloc_howto_type *(*_bfd_coff_rtype_to_howto)
+ PARAMS ((bfd *, asection *, struct internal_reloc *,
+ struct coff_link_hash_entry *, struct internal_syment *,
+ bfd_vma *));
+
+ boolean (*_bfd_coff_adjust_symndx)\
+ PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *,
+ struct internal_reloc *, boolean *));
+
+ boolean (*_bfd_coff_link_add_one_symbol)
+ PARAMS ((struct bfd_link_info *, bfd *, const char *, flagword,
+ asection *, bfd_vma, const char *, boolean, boolean,
+ struct bfd_link_hash_entry **));
+
+ boolean (*_bfd_coff_link_output_has_begun)
+ PARAMS ((bfd *, struct coff_final_link_info *));
+
+ boolean (*_bfd_coff_final_link_postscript)
+ PARAMS ((bfd *, struct coff_final_link_info *));
} bfd_coff_backend_data;
-#define coff_backend_info(abfd) ((bfd_coff_backend_data *) (abfd)->xvec->backend_data)
+#define coff_backend_info(abfd) \
+ ((bfd_coff_backend_data *) (abfd)->xvec->backend_data)
#define bfd_coff_swap_aux_in(a,e,t,c,ind,num,i) \
- ((coff_backend_info (a)->_bfd_coff_swap_aux_in) (a,e,t,c,ind,num,i))
+ ((coff_backend_info (a)->_bfd_coff_swap_aux_in) (a,e,t,c,ind,num,i))
#define bfd_coff_swap_sym_in(a,e,i) \
- ((coff_backend_info (a)->_bfd_coff_swap_sym_in) (a,e,i))
+ ((coff_backend_info (a)->_bfd_coff_swap_sym_in) (a,e,i))
#define bfd_coff_swap_lineno_in(a,e,i) \
- ((coff_backend_info ( a)->_bfd_coff_swap_lineno_in) (a,e,i))
+ ((coff_backend_info ( a)->_bfd_coff_swap_lineno_in) (a,e,i))
#define bfd_coff_swap_reloc_out(abfd, i, o) \
- ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_out) (abfd, i, o))
+ ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_out) (abfd, i, o))
#define bfd_coff_swap_lineno_out(abfd, i, o) \
- ((coff_backend_info (abfd)->_bfd_coff_swap_lineno_out) (abfd, i, o))
+ ((coff_backend_info (abfd)->_bfd_coff_swap_lineno_out) (abfd, i, o))
#define bfd_coff_swap_aux_out(a,i,t,c,ind,num,o) \
- ((coff_backend_info (a)->_bfd_coff_swap_aux_out) (a,i,t,c,ind,num,o))
+ ((coff_backend_info (a)->_bfd_coff_swap_aux_out) (a,i,t,c,ind,num,o))
#define bfd_coff_swap_sym_out(abfd, i,o) \
- ((coff_backend_info (abfd)->_bfd_coff_swap_sym_out) (abfd, i, o))
+ ((coff_backend_info (abfd)->_bfd_coff_swap_sym_out) (abfd, i, o))
#define bfd_coff_swap_scnhdr_out(abfd, i,o) \
- ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_out) (abfd, i, o))
+ ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_out) (abfd, i, o))
#define bfd_coff_swap_filehdr_out(abfd, i,o) \
- ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_out) (abfd, i, o))
+ ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_out) (abfd, i, o))
#define bfd_coff_swap_aouthdr_out(abfd, i,o) \
- ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_out) (abfd, i, o))
+ ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_out) (abfd, i, o))
#define bfd_coff_filhsz(abfd) (coff_backend_info (abfd)->_bfd_filhsz)
#define bfd_coff_aoutsz(abfd) (coff_backend_info (abfd)->_bfd_aoutsz)
@@ -886,88 +841,89 @@ typedef struct
#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_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)
+ (coff_backend_info (abfd)->_bfd_coff_long_section_names)
#define bfd_coff_default_section_alignment_power(abfd) \
- (coff_backend_info (abfd)->_bfd_coff_default_section_alignment_power)
+ (coff_backend_info (abfd)->_bfd_coff_default_section_alignment_power)
#define bfd_coff_swap_filehdr_in(abfd, i,o) \
- ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_in) (abfd, i, o))
+ ((coff_backend_info (abfd)->_bfd_coff_swap_filehdr_in) (abfd, i, o))
#define bfd_coff_swap_aouthdr_in(abfd, i,o) \
- ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_in) (abfd, i, o))
+ ((coff_backend_info (abfd)->_bfd_coff_swap_aouthdr_in) (abfd, i, o))
#define bfd_coff_swap_scnhdr_in(abfd, i,o) \
- ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_in) (abfd, i, o))
+ ((coff_backend_info (abfd)->_bfd_coff_swap_scnhdr_in) (abfd, i, o))
#define bfd_coff_swap_reloc_in(abfd, i, o) \
- ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_in) (abfd, i, o))
+ ((coff_backend_info (abfd)->_bfd_coff_swap_reloc_in) (abfd, i, o))
#define bfd_coff_bad_format_hook(abfd, filehdr) \
- ((coff_backend_info (abfd)->_bfd_coff_bad_format_hook) (abfd, filehdr))
+ ((coff_backend_info (abfd)->_bfd_coff_bad_format_hook) (abfd, filehdr))
#define bfd_coff_set_arch_mach_hook(abfd, filehdr)\
- ((coff_backend_info (abfd)->_bfd_coff_set_arch_mach_hook) (abfd, filehdr))
+ ((coff_backend_info (abfd)->_bfd_coff_set_arch_mach_hook) (abfd, filehdr))
#define bfd_coff_mkobject_hook(abfd, filehdr, aouthdr)\
- ((coff_backend_info (abfd)->_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, section)\
- ((coff_backend_info (abfd)->_bfd_styp_to_sec_flags_hook)\
- (abfd, scnhdr, name, section))
+#define bfd_coff_styp_to_sec_flags_hook(abfd, scnhdr, name, section, flags_ptr)\
+ ((coff_backend_info (abfd)->_bfd_styp_to_sec_flags_hook)\
+ (abfd, scnhdr, name, section, flags_ptr))
#define bfd_coff_set_alignment_hook(abfd, sec, scnhdr)\
- ((coff_backend_info (abfd)->_bfd_set_alignment_hook) (abfd, sec, scnhdr))
+ ((coff_backend_info (abfd)->_bfd_set_alignment_hook) (abfd, sec, scnhdr))
#define bfd_coff_slurp_symbol_table(abfd)\
- ((coff_backend_info (abfd)->_bfd_coff_slurp_symbol_table) (abfd))
+ ((coff_backend_info (abfd)->_bfd_coff_slurp_symbol_table) (abfd))
#define bfd_coff_symname_in_debug(abfd, sym)\
- ((coff_backend_info (abfd)->_bfd_coff_symname_in_debug) (abfd, sym))
+ ((coff_backend_info (abfd)->_bfd_coff_symname_in_debug) (abfd, sym))
#define bfd_coff_force_symnames_in_strings(abfd)\
- (coff_backend_info (abfd)->_bfd_coff_force_symnames_in_strings)
+ (coff_backend_info (abfd)->_bfd_coff_force_symnames_in_strings)
#define bfd_coff_debug_string_prefix_length(abfd)\
- (coff_backend_info (abfd)->_bfd_coff_debug_string_prefix_length)
+ (coff_backend_info (abfd)->_bfd_coff_debug_string_prefix_length)
#define bfd_coff_print_aux(abfd, file, base, symbol, aux, indaux)\
- ((coff_backend_info (abfd)->_bfd_coff_print_aux)\
- (abfd, file, base, symbol, aux, indaux))
+ ((coff_backend_info (abfd)->_bfd_coff_print_aux)\
+ (abfd, file, base, symbol, aux, indaux))
#define bfd_coff_reloc16_extra_cases(abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr)\
- ((coff_backend_info (abfd)->_bfd_coff_reloc16_extra_cases)\
- (abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr))
+ ((coff_backend_info (abfd)->_bfd_coff_reloc16_extra_cases)\
+ (abfd, link_info, link_order, reloc, data, src_ptr, dst_ptr))
#define bfd_coff_reloc16_estimate(abfd, section, reloc, shrink, link_info)\
- ((coff_backend_info (abfd)->_bfd_coff_reloc16_estimate)\
- (abfd, section, reloc, shrink, link_info))
+ ((coff_backend_info (abfd)->_bfd_coff_reloc16_estimate)\
+ (abfd, section, reloc, shrink, link_info))
#define bfd_coff_classify_symbol(abfd, sym)\
- ((coff_backend_info (abfd)->_bfd_coff_classify_symbol)\
- (abfd, sym))
+ ((coff_backend_info (abfd)->_bfd_coff_classify_symbol)\
+ (abfd, sym))
#define bfd_coff_compute_section_file_positions(abfd)\
- ((coff_backend_info (abfd)->_bfd_coff_compute_section_file_positions)\
- (abfd))
+ ((coff_backend_info (abfd)->_bfd_coff_compute_section_file_positions)\
+ (abfd))
#define bfd_coff_start_final_link(obfd, info)\
- ((coff_backend_info (obfd)->_bfd_coff_start_final_link)\
- (obfd, info))
+ ((coff_backend_info (obfd)->_bfd_coff_start_final_link)\
+ (obfd, info))
#define bfd_coff_relocate_section(obfd,info,ibfd,o,con,rel,isyms,secs)\
- ((coff_backend_info (ibfd)->_bfd_coff_relocate_section)\
- (obfd, info, ibfd, o, con, rel, isyms, secs))
+ ((coff_backend_info (ibfd)->_bfd_coff_relocate_section)\
+ (obfd, info, ibfd, o, con, rel, isyms, secs))
#define bfd_coff_rtype_to_howto(abfd, sec, rel, h, sym, addendp)\
- ((coff_backend_info (abfd)->_bfd_coff_rtype_to_howto)\
- (abfd, sec, rel, h, sym, addendp))
+ ((coff_backend_info (abfd)->_bfd_coff_rtype_to_howto)\
+ (abfd, sec, rel, h, sym, addendp))
#define bfd_coff_adjust_symndx(obfd, info, ibfd, sec, rel, adjustedp)\
- ((coff_backend_info (abfd)->_bfd_coff_adjust_symndx)\
- (obfd, info, ibfd, sec, rel, adjustedp))
+ ((coff_backend_info (abfd)->_bfd_coff_adjust_symndx)\
+ (obfd, info, ibfd, sec, rel, adjustedp))
#define bfd_coff_link_add_one_symbol(info,abfd,name,flags,section,value,string,cp,coll,hashp)\
- ((coff_backend_info (abfd)->_bfd_coff_link_add_one_symbol)\
- (info, abfd, name, flags, section, value, string, cp, coll, hashp))
+ ((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,p) \
- ((coff_backend_info (a)->_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))
+ ((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 934ada1..5f9e016 100644
--- a/contrib/binutils/bfd/libecoff.h
+++ b/contrib/binutils/bfd/libecoff.h
@@ -1,5 +1,6 @@
/* BFD ECOFF object file private structure.
- Copyright 1993, 1994, 1995, 1996, 1999 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1996, 1999, 2001
+ Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -165,7 +166,7 @@ typedef struct ecoff_symbol_struct
PTR native;
} ecoff_symbol_type;
-/* We take the address of the first element of a asymbol to ensure that the
+/* We take the address of the first element of an asymbol to ensure that the
macro is only ever applied to an asymbol. */
#define ecoffsymbol(asymbol) ((ecoff_symbol_type *) (&((asymbol)->the_bfd)))
@@ -320,7 +321,7 @@ extern long _bfd_ecoff_canonicalize_reloc
/* ecoff_bfd_reloc_type_lookup defined by backend. */
extern boolean _bfd_ecoff_set_arch_mach
- PARAMS ((bfd *, enum bfd_architecture, unsigned long machine));
+ PARAMS ((bfd *, enum bfd_architecture, unsigned long));
extern boolean _bfd_ecoff_set_section_contents
PARAMS ((bfd *, asection *, PTR location, file_ptr, bfd_size_type));
@@ -340,8 +341,8 @@ extern PTR _bfd_ecoff_mkobject_hook PARAMS ((bfd *, PTR filehdr, PTR aouthdr));
#define _bfd_ecoff_set_alignment_hook \
((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, asection *section));
+extern boolean _bfd_ecoff_styp_to_sec_flags
+ PARAMS ((bfd *, PTR, const char *, asection *, flagword *));
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/libieee.h b/contrib/binutils/bfd/libieee.h
index aba9cb9..c48566c 100644
--- a/contrib/binutils/bfd/libieee.h
+++ b/contrib/binutils/bfd/libieee.h
@@ -1,5 +1,6 @@
/* IEEE-695 object file formats: definitions internal to BFD.
- Copyright 1990, 1991, 1992, 1994, 1996 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1994, 1996, 2001
+ Free Software Foundation, Inc.
Written by Cygnus Support. Mostly Steve Chamberlain's fault.
This file is part of BFD, the Binary File Descriptor library.
@@ -28,7 +29,7 @@ typedef struct ct {
struct ct *next;
} bfd_chain_type;
-typedef struct ieee_symbol
+typedef struct ieee_symbol
{
asymbol symbol;
struct ieee_symbol *next;
@@ -60,10 +61,11 @@ typedef struct ieee_per_section
} ieee_per_section_type;
#define ieee_per_section(x) ((ieee_per_section_type *)((x)->used_by_bfd))
-
+
typedef struct {
- unsigned char *input_p;
+ unsigned char *input_p;
unsigned char *first_byte;
+ unsigned char *last_byte;
bfd *abfd;
} common_header_type ;
@@ -71,7 +73,7 @@ typedef struct ieee_data_struct
{
common_header_type h;
boolean read_symbols;
- boolean read_data;
+ boolean read_data;
file_ptr output_cursor;
/* Map of section indexes to section ptrs */
asection **section_table;
@@ -79,31 +81,31 @@ typedef struct ieee_data_struct
ieee_address_descriptor_type ad;
ieee_module_begin_type mb;
ieee_w_variable_type w;
-
+
unsigned int section_count;
-
+
unsigned int map_idx;
/* List of GLOBAL EXPORT symbols */
ieee_symbol_type *external_symbols;
/* List of UNDEFINED symbols */
ieee_symbol_type *external_reference;
-
+
/* When the symbols have been canonicalized, they are in a
* special order, we remember various bases here.. */
unsigned int external_symbol_max_index;
unsigned int external_symbol_min_index;
unsigned int external_symbol_count;
int external_symbol_base_offset;
-
+
unsigned int external_reference_max_index;
unsigned int external_reference_min_index;
unsigned int external_reference_count;
int external_reference_base_offset;
-
+
boolean symbol_table_full;
-
+
boolean done_debug;
@@ -117,11 +119,11 @@ typedef struct {
bfd *abfd;
} ieee_ar_obstack_type;
-typedef struct ieee_ar_data_struct
+typedef struct ieee_ar_data_struct
{
common_header_type h;
ieee_ar_obstack_type *elements;
-
+
unsigned int element_index ;
unsigned int element_count;
diff --git a/contrib/binutils/bfd/linker.c b/contrib/binutils/bfd/linker.c
index 82805f9..e382895 100644
--- a/contrib/binutils/bfd/linker.c
+++ b/contrib/binutils/bfd/linker.c
@@ -445,28 +445,27 @@ _bfd_link_hash_newfunc (entry, table, string)
struct bfd_hash_table *table;
const char *string;
{
- struct bfd_link_hash_entry *ret = (struct bfd_link_hash_entry *) entry;
-
/* Allocate the structure if it has not already been allocated by a
subclass. */
- if (ret == (struct bfd_link_hash_entry *) NULL)
- ret = ((struct bfd_link_hash_entry *)
- bfd_hash_allocate (table, sizeof (struct bfd_link_hash_entry)));
- if (ret == (struct bfd_link_hash_entry *) NULL)
- return NULL;
+ if (entry == NULL)
+ {
+ entry = bfd_hash_allocate (table, sizeof (struct bfd_link_hash_entry));
+ if (entry == NULL)
+ return entry;
+ }
/* Call the allocation method of the superclass. */
- ret = ((struct bfd_link_hash_entry *)
- bfd_hash_newfunc ((struct bfd_hash_entry *) ret, table, string));
-
- if (ret)
+ entry = bfd_hash_newfunc (entry, table, string);
+ if (entry)
{
+ struct bfd_link_hash_entry *h = (struct bfd_link_hash_entry *) entry;
+
/* Initialize the local fields. */
- ret->type = bfd_link_hash_new;
- ret->next = NULL;
+ h->type = bfd_link_hash_new;
+ h->next = NULL;
}
- return (struct bfd_hash_entry *) ret;
+ return entry;
}
/* Initialize a link hash table. The BFD argument is the one
@@ -483,6 +482,8 @@ _bfd_link_hash_table_init (table, abfd, newfunc)
table->creator = abfd->xvec;
table->undefs = NULL;
table->undefs_tail = NULL;
+ table->type = bfd_link_generic_hash_table;
+
return bfd_hash_table_init (&table->table, newfunc);
}
@@ -526,6 +527,8 @@ bfd_wrapped_link_hash_lookup (abfd, info, string, create, copy, follow)
boolean copy;
boolean follow;
{
+ bfd_size_type amt;
+
if (info->wrap_hash != NULL)
{
const char *l;
@@ -545,7 +548,8 @@ bfd_wrapped_link_hash_lookup (abfd, info, string, create, copy, follow)
/* This symbol is being wrapped. We want to replace all
references to SYM with references to __wrap_SYM. */
- n = (char *) bfd_malloc (strlen (l) + sizeof WRAP + 1);
+ amt = strlen (l) + sizeof WRAP + 1;
+ n = (char *) bfd_malloc (amt);
if (n == NULL)
return NULL;
@@ -576,7 +580,8 @@ bfd_wrapped_link_hash_lookup (abfd, info, string, create, copy, follow)
wrapped. We want to replace all references to __real_SYM
with references to SYM. */
- n = (char *) bfd_malloc (strlen (l + sizeof REAL - 1) + 2);
+ amt = strlen (l + sizeof REAL - 1) + 2;
+ n = (char *) bfd_malloc (amt);
if (n == NULL)
return NULL;
@@ -636,30 +641,29 @@ _bfd_generic_link_hash_newfunc (entry, table, string)
struct bfd_hash_table *table;
const char *string;
{
- struct generic_link_hash_entry *ret =
- (struct generic_link_hash_entry *) entry;
-
/* Allocate the structure if it has not already been allocated by a
subclass. */
- if (ret == (struct generic_link_hash_entry *) NULL)
- ret = ((struct generic_link_hash_entry *)
- bfd_hash_allocate (table, sizeof (struct generic_link_hash_entry)));
- if (ret == (struct generic_link_hash_entry *) NULL)
- return NULL;
+ if (entry == NULL)
+ {
+ entry = bfd_hash_allocate (table,
+ sizeof (struct generic_link_hash_entry));
+ if (entry == NULL)
+ return entry;
+ }
/* Call the allocation method of the superclass. */
- ret = ((struct generic_link_hash_entry *)
- _bfd_link_hash_newfunc ((struct bfd_hash_entry *) ret,
- table, string));
-
- if (ret)
+ entry = _bfd_link_hash_newfunc (entry, table, string);
+ if (entry)
{
+ struct generic_link_hash_entry *ret;
+
/* Set local fields. */
+ ret = (struct generic_link_hash_entry *) entry;
ret->written = false;
ret->sym = NULL;
}
- return (struct bfd_hash_entry *) ret;
+ return entry;
}
/* Create an generic link hash table. */
@@ -669,9 +673,9 @@ _bfd_generic_link_hash_table_create (abfd)
bfd *abfd;
{
struct generic_link_hash_table *ret;
+ bfd_size_type amt = sizeof (struct generic_link_hash_table);
- ret = ((struct generic_link_hash_table *)
- bfd_alloc (abfd, sizeof (struct generic_link_hash_table)));
+ ret = (struct generic_link_hash_table *) bfd_alloc (abfd, amt);
if (ret == NULL)
return (struct bfd_link_hash_table *) NULL;
if (! _bfd_link_hash_table_init (&ret->root, abfd,
@@ -702,7 +706,8 @@ generic_link_read_symbols (abfd)
symsize = bfd_get_symtab_upper_bound (abfd);
if (symsize < 0)
return false;
- bfd_get_outsymbols (abfd) = (asymbol **) bfd_alloc (abfd, symsize);
+ bfd_get_outsymbols (abfd) =
+ (asymbol **) bfd_alloc (abfd, (bfd_size_type) symsize);
if (bfd_get_outsymbols (abfd) == NULL && symsize != 0)
return false;
symcount = bfd_canonicalize_symtab (abfd, bfd_get_outsymbols (abfd));
@@ -779,12 +784,14 @@ generic_link_add_object_symbols (abfd, info, collect)
struct bfd_link_info *info;
boolean collect;
{
+ bfd_size_type symcount;
+ struct symbol_cache_entry **outsyms;
+
if (! generic_link_read_symbols (abfd))
return false;
- return generic_link_add_symbol_list (abfd, info,
- _bfd_generic_link_get_symcount (abfd),
- _bfd_generic_link_get_symbols (abfd),
- collect);
+ symcount = _bfd_generic_link_get_symcount (abfd);
+ outsyms = _bfd_generic_link_get_symbols (abfd);
+ return generic_link_add_symbol_list (abfd, info, symcount, outsyms, collect);
}
/* We build a hash table of all symbols defined in an archive. */
@@ -795,7 +802,7 @@ generic_link_add_object_symbols (abfd, info, collect)
struct archive_list
{
struct archive_list *next;
- int indx;
+ unsigned int indx;
};
/* An entry in an archive hash table. */
@@ -924,7 +931,7 @@ _bfd_generic_link_add_archive_symbols (abfd, info, checkfn)
register carsym *arsym;
int pass;
struct archive_hash_table arsym_hash;
- int indx;
+ unsigned int indx;
struct bfd_link_hash_entry **pundef;
if (! bfd_has_map (abfd))
@@ -1003,10 +1010,25 @@ _bfd_generic_link_add_archive_symbols (abfd, info, checkfn)
arh = archive_hash_lookup (&arsym_hash, h->root.string, false, false);
if (arh == (struct archive_hash_entry *) NULL)
{
- pundef = &(*pundef)->next;
- continue;
- }
+ /* If we haven't found the exact symbol we're looking for,
+ let's look for its import thunk */
+ if (info->pei386_auto_import)
+ {
+ bfd_size_type amt = strlen (h->root.string) + 10;
+ char *buf = (char *) bfd_malloc (amt);
+ if (buf == NULL)
+ return false;
+ sprintf (buf, "__imp_%s", h->root.string);
+ arh = archive_hash_lookup (&arsym_hash, buf, false, false);
+ free(buf);
+ }
+ if (arh == (struct archive_hash_entry *) NULL)
+ {
+ pundef = &(*pundef)->next;
+ continue;
+ }
+ }
/* Look at all the objects which define this symbol. */
for (l = arh->defs; l != (struct archive_list *) NULL; l = l->next)
{
@@ -1395,7 +1417,7 @@ static const enum link_action link_action[8][8] =
/* UNDEFW_ROW */ {WEAK, NOACT, NOACT, REF, REF, NOACT, REFC, WARNC },
/* DEF_ROW */ {DEF, DEF, DEF, MDEF, DEF, CDEF, MDEF, CYCLE },
/* DEFW_ROW */ {DEFW, DEFW, DEFW, NOACT, NOACT, NOACT, NOACT, CYCLE },
- /* COMMON_ROW */ {COM, COM, COM, CREF, CREF, BIG, REFC, WARNC },
+ /* COMMON_ROW */ {COM, COM, COM, CREF, COM, BIG, REFC, WARNC },
/* INDR_ROW */ {IND, IND, IND, MDEF, IND, CIND, MIND, CYCLE },
/* WARN_ROW */ {MWARN, WARN, WARN, CWARN, CWARN, WARN, CWARN, MWARN },
/* SET_ROW */ {SET, SET, SET, SET, SET, SET, CYCLE, CYCLE }
@@ -1698,7 +1720,7 @@ _bfd_generic_link_add_one_symbol (info, abfd, name, flags, section, value,
case BIG:
/* We have found a common definition for a symbol which
already had a common definition. Use the maximum of the
- two sizes. */
+ two sizes, and use the section required by the larger symbol. */
BFD_ASSERT (h->type == bfd_link_hash_common);
if (! ((*info->callbacks->multiple_common)
(info, h->root.string,
@@ -1717,6 +1739,25 @@ _bfd_generic_link_add_one_symbol (info, abfd, name, flags, section, value,
if (power > 4)
power = 4;
h->u.c.p->alignment_power = power;
+
+ /* Some systems have special treatment for small commons,
+ hence we want to select the section used by the larger
+ symbol. This makes sure the symbol does not go in a
+ small common section if it is now too large. */
+ if (section == bfd_com_section_ptr)
+ {
+ h->u.c.p->section
+ = bfd_make_section_old_way (abfd, "COMMON");
+ h->u.c.p->section->flags = SEC_ALLOC;
+ }
+ else if (section->owner != abfd)
+ {
+ h->u.c.p->section
+ = bfd_make_section_old_way (abfd, section->name);
+ h->u.c.p->section->flags = SEC_ALLOC;
+ }
+ else
+ h->u.c.p->section = section;
}
break;
@@ -1805,8 +1846,8 @@ _bfd_generic_link_add_one_symbol (info, abfd, name, flags, section, value,
&& inh->u.i.link == h)
{
(*_bfd_error_handler)
- (_("%s: indirect symbol `%s' to `%s' is a loop"),
- bfd_get_filename (abfd), name, string);
+ (_("%s: indirect symbol `%s' to `%s' is a loop"),
+ bfd_archive_filename (abfd), name, string);
bfd_set_error (bfd_error_invalid_operation);
return false;
}
@@ -2004,7 +2045,7 @@ _bfd_generic_final_link (abfd, info)
input_section);
if (relsize < 0)
return false;
- relocs = (arelent **) bfd_malloc ((size_t) relsize);
+ relocs = (arelent **) bfd_malloc ((bfd_size_type) relsize);
if (!relocs && relsize != 0)
return false;
symbols = _bfd_generic_link_get_symbols (input_bfd);
@@ -2022,10 +2063,11 @@ _bfd_generic_final_link (abfd, info)
}
if (o->reloc_count > 0)
{
- o->orelocation = ((arelent **)
- bfd_alloc (abfd,
- (o->reloc_count
- * sizeof (arelent *))));
+ bfd_size_type amt;
+
+ amt = o->reloc_count;
+ amt *= sizeof (arelent *);
+ o->orelocation = (arelent **) bfd_alloc (abfd, amt);
if (!o->orelocation)
return false;
o->flags |= SEC_RELOC;
@@ -2078,13 +2120,15 @@ generic_add_output_symbol (output_bfd, psymalloc, sym)
if (bfd_get_symcount (output_bfd) >= *psymalloc)
{
asymbol **newsyms;
+ bfd_size_type amt;
if (*psymalloc == 0)
*psymalloc = 124;
else
*psymalloc *= 2;
- newsyms = (asymbol **) bfd_realloc (bfd_get_outsymbols (output_bfd),
- *psymalloc * sizeof (asymbol *));
+ amt = *psymalloc;
+ amt *= sizeof (asymbol *);
+ newsyms = (asymbol **) bfd_realloc (bfd_get_outsymbols (output_bfd), amt);
if (newsyms == (asymbol **) NULL)
return false;
bfd_get_outsymbols (output_bfd) = newsyms;
@@ -2288,6 +2332,12 @@ _bfd_generic_link_output_symbols (output_bfd, input_bfd, info, psymalloc)
case discard_all:
output = false;
break;
+ case discard_sec_merge:
+ output = true;
+ if (info->relocateable
+ || ! (sym->section->flags & SEC_MERGE))
+ break;
+ /* FALLTHROUGH */
case discard_l:
if (bfd_is_local_label (input_bfd, sym))
output = false;
@@ -2458,7 +2508,7 @@ _bfd_generic_reloc_link_order (abfd, info, sec, link_order)
if (sec->orelocation == (arelent **) NULL)
abort ();
- r = (arelent *) bfd_alloc (abfd, sizeof (arelent));
+ r = (arelent *) bfd_alloc (abfd, (bfd_size_type) sizeof (arelent));
if (r == (arelent *) NULL)
return false;
@@ -2504,13 +2554,15 @@ _bfd_generic_reloc_link_order (abfd, info, sec, link_order)
bfd_reloc_status_type rstat;
bfd_byte *buf;
boolean ok;
+ file_ptr loc;
size = bfd_get_reloc_size (r->howto);
buf = (bfd_byte *) bfd_zmalloc (size);
if (buf == (bfd_byte *) NULL)
return false;
rstat = _bfd_relocate_contents (r->howto, abfd,
- link_order->u.reloc.p->addend, buf);
+ (bfd_vma) link_order->u.reloc.p->addend,
+ buf);
switch (rstat)
{
case bfd_reloc_ok:
@@ -2532,10 +2584,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 *
- bfd_octets_per_byte (abfd)), size);
+ loc = link_order->offset * bfd_octets_per_byte (abfd);
+ ok = bfd_set_section_contents (abfd, sec, (PTR) buf, loc,
+ (bfd_size_type) size);
free (buf);
if (! ok)
return false;
@@ -2556,10 +2607,8 @@ bfd_new_link_order (abfd, section)
bfd *abfd;
asection *section;
{
- struct bfd_link_order *new;
-
- new = ((struct bfd_link_order *)
- bfd_alloc (abfd, sizeof (struct bfd_link_order)));
+ bfd_size_type amt = sizeof (struct bfd_link_order);
+ struct bfd_link_order *new = (struct bfd_link_order *) bfd_alloc (abfd, amt);
if (!new)
return NULL;
@@ -2588,6 +2637,8 @@ _bfd_default_link_order (abfd, info, sec, link_order)
asection *sec;
struct bfd_link_order *link_order;
{
+ file_ptr loc;
+
switch (link_order->type)
{
case bfd_undefined_link_order:
@@ -2601,12 +2652,10 @@ _bfd_default_link_order (abfd, info, sec, link_order)
case bfd_fill_link_order:
return default_fill_link_order (abfd, info, sec, link_order);
case bfd_data_link_order:
+ loc = link_order->offset * bfd_octets_per_byte (abfd);
return bfd_set_section_contents (abfd, sec,
(PTR) link_order->u.data.contents,
- (file_ptr)
- (link_order->offset *
- bfd_octets_per_byte (abfd)),
- link_order->size);
+ loc, link_order->size);
}
}
@@ -2619,29 +2668,36 @@ default_fill_link_order (abfd, info, sec, link_order)
asection *sec;
struct bfd_link_order *link_order;
{
- size_t size;
- char *space;
+ bfd_size_type size;
+ unsigned char *space;
size_t i;
- int fill;
+ unsigned int fill;
+ file_ptr loc;
boolean result;
BFD_ASSERT ((sec->flags & SEC_HAS_CONTENTS) != 0);
- size = (size_t) link_order->size;
- space = (char *) bfd_malloc (size);
- if (space == NULL && size != 0)
+ size = link_order->size;
+ if (size == 0)
+ return true;
+
+ space = (unsigned char *) bfd_malloc (size);
+ if (space == NULL)
return false;
fill = link_order->u.fill.value;
- for (i = 0; i < size; i += 2)
+ for (i = 0; i < size; i += 4)
+ space[i] = fill >> 24;
+ for (i = 1; i < size; i += 4)
+ space[i] = fill >> 16;
+ for (i = 2; i < size; i += 4)
space[i] = fill >> 8;
- for (i = 1; i < size; i += 2)
+ for (i = 3; i < size; i += 4)
space[i] = fill;
- result = bfd_set_section_contents (abfd, sec, space,
- (file_ptr)
- (link_order->offset *
- bfd_octets_per_byte (abfd)),
- link_order->size);
+
+ loc = link_order->offset * bfd_octets_per_byte (abfd);
+ result = bfd_set_section_contents (abfd, sec, space, loc, size);
+
free (space);
return result;
}
@@ -2661,6 +2717,8 @@ default_indirect_link_order (output_bfd, info, output_section, link_order,
bfd *input_bfd;
bfd_byte *contents = NULL;
bfd_byte *new_contents;
+ bfd_size_type sec_size;
+ file_ptr loc;
BFD_ASSERT ((output_section->flags & SEC_HAS_CONTENTS) != 0);
@@ -2744,9 +2802,9 @@ default_indirect_link_order (output_bfd, info, output_section, link_order,
}
/* Get and relocate the section contents. */
- contents = ((bfd_byte *)
- bfd_malloc (bfd_section_size (input_bfd, input_section)));
- if (contents == NULL && bfd_section_size (input_bfd, input_section) != 0)
+ sec_size = bfd_section_size (input_bfd, input_section);
+ contents = ((bfd_byte *) bfd_malloc (sec_size));
+ if (contents == NULL && sec_size != 0)
goto error_return;
new_contents = (bfd_get_relocated_section_contents
(output_bfd, info, link_order, contents, info->relocateable,
@@ -2755,12 +2813,9 @@ default_indirect_link_order (output_bfd, info, output_section, link_order,
goto error_return;
/* Output the section contents. */
+ loc = link_order->offset * bfd_octets_per_byte (output_bfd);
if (! bfd_set_section_contents (output_bfd, output_section,
- (PTR) new_contents,
- (file_ptr)
- (link_order->offset *
- bfd_octets_per_byte (output_bfd)),
- link_order->size))
+ (PTR) new_contents, loc, link_order->size))
goto error_return;
if (contents != NULL)
diff --git a/contrib/binutils/bfd/merge.c b/contrib/binutils/bfd/merge.c
new file mode 100644
index 0000000..7b06c10
--- /dev/null
+++ b/contrib/binutils/bfd/merge.c
@@ -0,0 +1,955 @@
+/* SEC_MERGE support.
+ Copyright 2001 Free Software Foundation, Inc.
+ Written by Jakub Jelinek <jakub@redhat.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 file contains support for merging duplicate entities within sections,
+ as used in ELF SHF_MERGE. */
+
+#include "bfd.h"
+#include "sysdep.h"
+#include "libbfd.h"
+#include "hashtab.h"
+
+struct sec_merge_sec_info;
+
+/* An entry in the section merge hash table. */
+
+struct sec_merge_hash_entry
+{
+ struct bfd_hash_entry root;
+ /* Length of this entry. */
+ unsigned int len;
+ /* Start of this string needs to be aligned to
+ alignment octets (not 1 << align). */
+ unsigned int alignment;
+ union {
+ /* Index within the merged section. */
+ bfd_size_type index;
+ /* Entity size (if present in suffix hash tables). */
+ unsigned int entsize;
+ /* Entry this is a suffix of (if alignment is 0). */
+ struct sec_merge_hash_entry *suffix;
+ } u;
+ /* Which section is it in. */
+ struct sec_merge_sec_info *secinfo;
+ /* Next entity in the hash table. */
+ struct sec_merge_hash_entry *next;
+};
+
+/* The section merge hash table. */
+
+struct sec_merge_hash
+{
+ struct bfd_hash_table table;
+ /* Next available index. */
+ bfd_size_type size;
+ /* First entity in the SEC_MERGE sections of this type. */
+ struct sec_merge_hash_entry *first;
+ /* Last entity in the SEC_MERGE sections of this type. */
+ struct sec_merge_hash_entry *last;
+ /* Entity size. */
+ unsigned int entsize;
+ /* Are entries fixed size or zero terminated strings? */
+ boolean strings;
+};
+
+struct sec_merge_info
+{
+ /* Chain of sec_merge_infos. */
+ struct sec_merge_info *next;
+ /* Chain of sec_merge_sec_infos. */
+ struct sec_merge_sec_info *chain;
+ /* A hash table used to hold section content. */
+ struct sec_merge_hash *htab;
+};
+
+struct sec_merge_sec_info
+{
+ /* Chain of sec_merge_sec_infos. */
+ struct sec_merge_sec_info *next;
+ /* The corresponding section. */
+ asection *sec;
+ /* Pointer to merge_info pointing to us. */
+ PTR *psecinfo;
+ /* A hash table used to hold section content. */
+ struct sec_merge_hash *htab;
+ /* First string in this section. */
+ struct sec_merge_hash_entry *first;
+ /* Original section content. */
+ unsigned char contents[1];
+};
+
+static struct bfd_hash_entry *sec_merge_hash_newfunc
+ PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *, const char *));
+static struct sec_merge_hash_entry *sec_merge_hash_lookup
+ PARAMS ((struct sec_merge_hash *, const char *, unsigned int, boolean));
+static struct sec_merge_hash *sec_merge_init
+ PARAMS ((unsigned int, boolean));
+static struct sec_merge_hash_entry *sec_merge_add
+ PARAMS ((struct sec_merge_hash *, const char *, unsigned int,
+ struct sec_merge_sec_info *));
+static boolean sec_merge_emit
+ PARAMS ((bfd *, struct sec_merge_hash_entry *));
+static int cmplengthentry PARAMS ((const PTR, const PTR));
+static int last4_eq PARAMS ((const PTR, const PTR));
+static int last_eq PARAMS ((const PTR, const PTR));
+static boolean record_section
+ PARAMS ((struct sec_merge_info *, struct sec_merge_sec_info *));
+static void merge_strings PARAMS ((struct sec_merge_info *));
+
+/* Routine to create an entry in a section merge hashtab. */
+
+static struct bfd_hash_entry *
+sec_merge_hash_newfunc (entry, table, string)
+ struct bfd_hash_entry *entry;
+ struct bfd_hash_table *table;
+ const char *string;
+{
+ struct sec_merge_hash_entry *ret = (struct sec_merge_hash_entry *) entry;
+
+ /* Allocate the structure if it has not already been allocated by a
+ subclass. */
+ if (ret == (struct sec_merge_hash_entry *) NULL)
+ ret = ((struct sec_merge_hash_entry *)
+ bfd_hash_allocate (table, sizeof (struct sec_merge_hash_entry)));
+ if (ret == (struct sec_merge_hash_entry *) NULL)
+ return NULL;
+
+ /* Call the allocation method of the superclass. */
+ ret = ((struct sec_merge_hash_entry *)
+ bfd_hash_newfunc ((struct bfd_hash_entry *) ret, table, string));
+
+ if (ret)
+ {
+ /* Initialize the local fields. */
+ ret->u.suffix = NULL;
+ ret->alignment = 0;
+ ret->secinfo = NULL;
+ ret->next = NULL;
+ }
+
+ return (struct bfd_hash_entry *)ret;
+}
+
+/* Look up an entry in a section merge hash table. */
+
+static struct sec_merge_hash_entry *
+sec_merge_hash_lookup (table, string, alignment, create)
+ struct sec_merge_hash *table;
+ const char *string;
+ unsigned int alignment;
+ boolean create;
+{
+ register const unsigned char *s;
+ register unsigned long hash;
+ register unsigned int c;
+ struct sec_merge_hash_entry *hashp;
+ unsigned int len, i;
+ unsigned int index;
+
+ hash = 0;
+ len = 0;
+ s = (const unsigned char *) string;
+ if (table->strings)
+ {
+ if (table->entsize == 1)
+ {
+ while ((c = *s++) != '\0')
+ {
+ hash += c + (c << 17);
+ hash ^= hash >> 2;
+ ++len;
+ }
+ hash += len + (len << 17);
+ }
+ else
+ {
+ for (;;)
+ {
+ for (i = 0; i < table->entsize; ++i)
+ if (s[i] != '\0')
+ break;
+ if (i == table->entsize)
+ break;
+ for (i = 0; i < table->entsize; ++i)
+ {
+ c = *s++;
+ hash += c + (c << 17);
+ hash ^= hash >> 2;
+ }
+ ++len;
+ }
+ hash += len + (len << 17);
+ len *= table->entsize;
+ }
+ hash ^= hash >> 2;
+ len += table->entsize;
+ }
+ else
+ {
+ for (i = 0; i < table->entsize; ++i)
+ {
+ c = *s++;
+ hash += c + (c << 17);
+ hash ^= hash >> 2;
+ }
+ len = table->entsize;
+ }
+
+ index = hash % table->table.size;
+ for (hashp = (struct sec_merge_hash_entry *) table->table.table[index];
+ hashp != (struct sec_merge_hash_entry *) NULL;
+ hashp = (struct sec_merge_hash_entry *) hashp->root.next)
+ {
+ if (hashp->root.hash == hash
+ && len == hashp->len
+ && memcmp (hashp->root.string, string, len) == 0)
+ {
+ /* If the string we found does not have at least the required
+ alignment, we need to insert another copy. */
+ if (hashp->alignment < alignment)
+ {
+ /* Mark the less aligned copy as deleted. */
+ hashp->len = 0;
+ hashp->alignment = 0;
+ break;
+ }
+ return hashp;
+ }
+ }
+
+ if (! create)
+ return (struct sec_merge_hash_entry *) NULL;
+
+ hashp = (struct sec_merge_hash_entry *)
+ sec_merge_hash_newfunc ((struct bfd_hash_entry *) NULL,
+ (struct bfd_hash_table *) table, string);
+ if (hashp == (struct sec_merge_hash_entry *) NULL)
+ return (struct sec_merge_hash_entry *) NULL;
+ hashp->root.string = string;
+ hashp->root.hash = hash;
+ hashp->len = len;
+ hashp->alignment = alignment;
+ hashp->root.next = table->table.table[index];
+ table->table.table[index] = (struct bfd_hash_entry *) hashp;
+
+ return hashp;
+}
+
+/* Create a new hash table. */
+
+static struct sec_merge_hash *
+sec_merge_init (entsize, strings)
+ unsigned int entsize;
+ boolean strings;
+{
+ struct sec_merge_hash *table;
+ bfd_size_type amt = sizeof (struct sec_merge_hash);
+
+ table = (struct sec_merge_hash *) bfd_malloc (amt);
+ if (table == NULL)
+ return NULL;
+
+ if (! bfd_hash_table_init (&table->table, sec_merge_hash_newfunc))
+ {
+ free (table);
+ return NULL;
+ }
+
+ table->size = 0;
+ table->first = NULL;
+ table->last = NULL;
+ table->entsize = entsize;
+ table->strings = strings;
+
+ return table;
+}
+
+/* Get the index of an entity in a hash table, adding it if it is not
+ already present. */
+
+static struct sec_merge_hash_entry *
+sec_merge_add (tab, str, alignment, secinfo)
+ struct sec_merge_hash *tab;
+ const char *str;
+ unsigned int alignment;
+ struct sec_merge_sec_info *secinfo;
+{
+ register struct sec_merge_hash_entry *entry;
+
+ entry = sec_merge_hash_lookup (tab, str, alignment, true);
+ if (entry == NULL)
+ return NULL;
+
+ if (entry->secinfo == NULL)
+ {
+ tab->size++;
+ entry->secinfo = secinfo;
+ if (tab->first == NULL)
+ tab->first = entry;
+ else
+ tab->last->next = entry;
+ tab->last = entry;
+ }
+
+ return entry;
+}
+
+static boolean
+sec_merge_emit (abfd, entry)
+ register bfd *abfd;
+ struct sec_merge_hash_entry *entry;
+{
+ struct sec_merge_sec_info *secinfo = entry->secinfo;
+ asection *sec = secinfo->sec;
+ char *pad = "";
+ bfd_size_type off = 0;
+ int alignment_power = bfd_get_section_alignment (abfd, sec->output_section);
+
+ if (alignment_power)
+ pad = bfd_zmalloc ((bfd_size_type) 1 << alignment_power);
+
+ for (; entry != NULL && entry->secinfo == secinfo; entry = entry->next)
+ {
+ register const char *str;
+ register size_t len;
+
+ len = off & (entry->alignment - 1);
+ if (len)
+ {
+ len = entry->alignment - len;
+ if (bfd_bwrite ((PTR) pad, (bfd_size_type) len, abfd) != len)
+ break;
+ off += len;
+ }
+
+ str = entry->root.string;
+ len = entry->len;
+
+ if (bfd_bwrite ((PTR) str, (bfd_size_type) len, abfd) != len)
+ break;
+
+ off += len;
+ }
+
+ if (alignment_power)
+ free (pad);
+
+ return entry == NULL || entry->secinfo != secinfo;
+}
+
+/* This function is called for each input file from the add_symbols
+ pass of the linker. */
+
+boolean
+_bfd_merge_section (abfd, psinfo, sec, psecinfo)
+ bfd *abfd;
+ PTR *psinfo;
+ asection *sec;
+ PTR *psecinfo;
+{
+ struct sec_merge_info *sinfo;
+ struct sec_merge_sec_info *secinfo;
+ unsigned int align;
+ bfd_size_type amt;
+
+ if (sec->_raw_size == 0
+ || (sec->flags & SEC_EXCLUDE)
+ || (sec->flags & SEC_MERGE) == 0
+ || sec->entsize == 0)
+ return true;
+
+ if ((sec->flags & SEC_RELOC) != 0)
+ {
+ /* We aren't prepared to handle relocations in merged sections. */
+ return true;
+ }
+
+ if (sec->output_section != NULL
+ && bfd_is_abs_section (sec->output_section))
+ {
+ /* The section is being discarded from the link, so we should
+ just ignore it. */
+ return true;
+ }
+
+ align = bfd_get_section_alignment (sec->owner, sec);
+ if ((sec->entsize < (unsigned int)(1 << align)
+ && ((sec->entsize & (sec->entsize - 1))
+ || !(sec->flags & SEC_STRINGS)))
+ || (sec->entsize > (unsigned int)(1 << align)
+ && (sec->entsize & ((1 << align) - 1))))
+ {
+ /* Sanity check. If string character size is smaller than
+ alignment, then we require character size to be a power
+ of 2, otherwise character size must be integer multiple
+ of alignment. For non-string constants, alignment must
+ be smaller than or equal to entity size and entity size
+ must be integer multiple of alignment. */
+ return true;
+ }
+
+ for (sinfo = (struct sec_merge_info *) *psinfo; sinfo; sinfo = sinfo->next)
+ if ((secinfo = sinfo->chain)
+ && ! ((secinfo->sec->flags ^ sec->flags) & (SEC_MERGE | SEC_STRINGS))
+ && secinfo->sec->entsize == sec->entsize
+ && ! strcmp (secinfo->sec->name, sec->name))
+ break;
+
+ if (sinfo == NULL)
+ {
+ /* Initialize the information we need to keep track of. */
+ sinfo = (struct sec_merge_info *)
+ bfd_alloc (abfd, (bfd_size_type) sizeof (struct sec_merge_info));
+ if (sinfo == NULL)
+ goto error_return;
+ sinfo->next = (struct sec_merge_info *) *psinfo;
+ sinfo->chain = NULL;
+ *psinfo = (PTR) sinfo;
+ sinfo->htab =
+ sec_merge_init (sec->entsize, (sec->flags & SEC_STRINGS));
+ if (sinfo->htab == NULL)
+ goto error_return;
+ }
+
+ /* Read the section from abfd. */
+
+ amt = sizeof (struct sec_merge_sec_info) + sec->_raw_size - 1;
+ *psecinfo = bfd_alloc (abfd, amt);
+ if (*psecinfo == NULL)
+ goto error_return;
+
+ secinfo = (struct sec_merge_sec_info *)*psecinfo;
+ if (sinfo->chain)
+ {
+ secinfo->next = sinfo->chain->next;
+ sinfo->chain->next = secinfo;
+ }
+ else
+ secinfo->next = secinfo;
+ sinfo->chain = secinfo;
+ secinfo->sec = sec;
+ secinfo->psecinfo = psecinfo;
+ secinfo->htab = sinfo->htab;
+ secinfo->first = NULL;
+
+ if (! bfd_get_section_contents (sec->owner, sec, secinfo->contents,
+ (bfd_vma) 0, sec->_raw_size))
+ goto error_return;
+
+ return true;
+
+ error_return:
+ *psecinfo = NULL;
+ return false;
+}
+
+/* Compare two sec_merge_hash_entry structures. This is called via qsort. */
+
+static int
+cmplengthentry (a, b)
+ const PTR a;
+ const PTR b;
+{
+ struct sec_merge_hash_entry * A = *(struct sec_merge_hash_entry **) a;
+ struct sec_merge_hash_entry * B = *(struct sec_merge_hash_entry **) b;
+
+ if (A->len < B->len)
+ return 1;
+ else if (A->len > B->len)
+ return -1;
+
+ return memcmp (A->root.string, B->root.string, A->len);
+}
+
+static int
+last4_eq (a, b)
+ const PTR a;
+ const PTR b;
+{
+ struct sec_merge_hash_entry * A = (struct sec_merge_hash_entry *) a;
+ struct sec_merge_hash_entry * B = (struct sec_merge_hash_entry *) b;
+
+ if (memcmp (A->root.string + A->len - 5 * A->u.entsize,
+ B->root.string + B->len - 5 * A->u.entsize,
+ 4 * A->u.entsize) != 0)
+ /* This was a hashtable collision. */
+ return 0;
+
+ if (A->len <= B->len)
+ /* B cannot be a suffix of A unless A is equal to B, which is guaranteed
+ not to be equal by the hash table. */
+ return 0;
+
+ if (A->alignment < B->alignment
+ || ((A->len - B->len) & (B->alignment - 1)))
+ /* The suffix is not sufficiently aligned. */
+ return 0;
+
+ return memcmp (A->root.string + (A->len - B->len),
+ B->root.string, B->len - 5 * A->u.entsize) == 0;
+}
+
+static int
+last_eq (a, b)
+ const PTR a;
+ const PTR b;
+{
+ struct sec_merge_hash_entry * A = (struct sec_merge_hash_entry *) a;
+ struct sec_merge_hash_entry * B = (struct sec_merge_hash_entry *) b;
+
+ if (B->len >= 5 * A->u.entsize)
+ /* Longer strings are just pushed into the hash table,
+ they'll be used when looking up for very short strings. */
+ return 0;
+
+ if (memcmp (A->root.string + A->len - 2 * A->u.entsize,
+ B->root.string + B->len - 2 * A->u.entsize,
+ A->u.entsize) != 0)
+ /* This was a hashtable collision. */
+ return 0;
+
+ if (A->len <= B->len)
+ /* B cannot be a suffix of A unless A is equal to B, which is guaranteed
+ not to be equal by the hash table. */
+ return 0;
+
+ if (A->alignment < B->alignment
+ || ((A->len - B->len) & (B->alignment - 1)))
+ /* The suffix is not sufficiently aligned. */
+ return 0;
+
+ return memcmp (A->root.string + (A->len - B->len),
+ B->root.string, B->len - 2 * A->u.entsize) == 0;
+}
+
+/* Record one section into the hash table. */
+static boolean
+record_section (sinfo, secinfo)
+ struct sec_merge_info *sinfo;
+ struct sec_merge_sec_info *secinfo;
+{
+ asection *sec = secinfo->sec;
+ struct sec_merge_hash_entry *entry;
+ boolean nul;
+ unsigned char *p, *end;
+ bfd_vma mask, eltalign;
+ unsigned int align, i;
+
+ align = bfd_get_section_alignment (sec->owner, sec);
+ end = secinfo->contents + sec->_raw_size;
+ nul = false;
+ mask = ((bfd_vma) 1 << align) - 1;
+ if (sec->flags & SEC_STRINGS)
+ {
+ for (p = secinfo->contents; p < end; )
+ {
+ eltalign = p - secinfo->contents;
+ eltalign = ((eltalign ^ (eltalign - 1)) + 1) >> 1;
+ if (!eltalign || eltalign > mask)
+ eltalign = mask + 1;
+ entry = sec_merge_add (sinfo->htab, p, (unsigned) eltalign, secinfo);
+ if (! entry)
+ goto error_return;
+ p += entry->len;
+ if (sec->entsize == 1)
+ {
+ while (p < end && *p == 0)
+ {
+ if (!nul && !((p - secinfo->contents) & mask))
+ {
+ nul = true;
+ entry = sec_merge_add (sinfo->htab, "",
+ (unsigned) mask + 1, secinfo);
+ if (! entry)
+ goto error_return;
+ }
+ p++;
+ }
+ }
+ else
+ {
+ while (p < end)
+ {
+ for (i = 0; i < sec->entsize; i++)
+ if (p[i] != '\0')
+ break;
+ if (i != sec->entsize)
+ break;
+ if (!nul && !((p - secinfo->contents) & mask))
+ {
+ nul = true;
+ entry = sec_merge_add (sinfo->htab, p,
+ (unsigned) mask + 1, secinfo);
+ if (! entry)
+ goto error_return;
+ }
+ p += sec->entsize;
+ }
+ }
+ }
+ }
+ else
+ {
+ for (p = secinfo->contents; p < end; p += sec->entsize)
+ {
+ entry = sec_merge_add (sinfo->htab, p, 1, secinfo);
+ if (! entry)
+ goto error_return;
+ }
+ }
+
+ return true;
+
+error_return:
+ for (secinfo = sinfo->chain; secinfo; secinfo = secinfo->next)
+ *secinfo->psecinfo = NULL;
+ return false;
+}
+
+/* This is a helper function for _bfd_merge_sections. It attempts to
+ merge strings matching suffixes of longer strings. */
+static void
+merge_strings (sinfo)
+ struct sec_merge_info *sinfo;
+{
+ struct sec_merge_hash_entry **array, **a, **end, *e;
+ struct sec_merge_sec_info *secinfo;
+ htab_t lasttab = NULL, last4tab = NULL;
+ bfd_size_type size, amt;
+
+ /* Now sort the strings by length, longest first. */
+ array = NULL;
+ amt = sinfo->htab->size * sizeof (struct sec_merge_hash_entry *);
+ array = (struct sec_merge_hash_entry **) bfd_malloc (amt);
+ if (array == NULL)
+ goto alloc_failure;
+
+ for (e = sinfo->htab->first, a = array; e; e = e->next)
+ if (e->alignment)
+ *a++ = e;
+
+ sinfo->htab->size = a - array;
+
+ qsort (array, (size_t) sinfo->htab->size,
+ sizeof (struct sec_merge_hash_entry *), cmplengthentry);
+
+ last4tab = htab_create ((size_t) sinfo->htab->size * 4, NULL, last4_eq, NULL);
+ lasttab = htab_create ((size_t) sinfo->htab->size * 4, NULL, last_eq, NULL);
+ if (lasttab == NULL || last4tab == NULL)
+ goto alloc_failure;
+
+ /* Now insert the strings into hash tables (strings with last 4 characters
+ and strings with last character equal), look for longer strings which
+ we're suffix of. */
+ for (a = array, end = array + sinfo->htab->size; a < end; a++)
+ {
+ register hashval_t hash;
+ unsigned int c;
+ unsigned int i;
+ const unsigned char *s;
+ PTR *p;
+
+ e = *a;
+ e->u.entsize = sinfo->htab->entsize;
+ if (e->len <= e->u.entsize)
+ break;
+ if (e->len > 4 * e->u.entsize)
+ {
+ s = e->root.string + e->len - e->u.entsize;
+ hash = 0;
+ for (i = 0; i < 4 * e->u.entsize; i++)
+ {
+ c = *--s;
+ hash += c + (c << 17);
+ hash ^= hash >> 2;
+ }
+ p = htab_find_slot_with_hash (last4tab, e, hash, INSERT);
+ if (p == NULL)
+ goto alloc_failure;
+ if (*p)
+ {
+ struct sec_merge_hash_entry *ent;
+
+ ent = (struct sec_merge_hash_entry *) *p;
+ e->u.suffix = ent;
+ e->alignment = 0;
+ continue;
+ }
+ else
+ *p = (PTR) e;
+ }
+ s = e->root.string + e->len - e->u.entsize;
+ hash = 0;
+ for (i = 0; i < e->u.entsize; i++)
+ {
+ c = *--s;
+ hash += c + (c << 17);
+ hash ^= hash >> 2;
+ }
+ p = htab_find_slot_with_hash (lasttab, e, hash, INSERT);
+ if (p == NULL)
+ goto alloc_failure;
+ if (*p)
+ {
+ struct sec_merge_hash_entry *ent;
+
+ ent = (struct sec_merge_hash_entry *) *p;
+ e->u.suffix = ent;
+ e->alignment = 0;
+ }
+ else
+ *p = (PTR) e;
+ }
+
+alloc_failure:
+ if (array)
+ free (array);
+ if (lasttab)
+ htab_delete (lasttab);
+ if (last4tab)
+ htab_delete (last4tab);
+
+ /* Now assign positions to the strings we want to keep. */
+ size = 0;
+ secinfo = sinfo->htab->first->secinfo;
+ for (e = sinfo->htab->first; e; e = e->next)
+ {
+ if (e->secinfo != secinfo)
+ {
+ secinfo->sec->_cooked_size = size;
+ secinfo = e->secinfo;
+ }
+ if (e->alignment)
+ {
+ if (e->secinfo->first == NULL)
+ {
+ e->secinfo->first = e;
+ size = 0;
+ }
+ size = (size + e->alignment - 1) & ~((bfd_vma) e->alignment - 1);
+ e->u.index = size;
+ size += e->len;
+ }
+ }
+ secinfo->sec->_cooked_size = size;
+
+ /* And now adjust the rest, removing them from the chain (but not hashtable)
+ at the same time. */
+ for (a = &sinfo->htab->first, e = *a; e; e = e->next)
+ if (e->alignment)
+ a = &e->next;
+ else
+ {
+ *a = e->next;
+ if (e->len)
+ {
+ e->secinfo = e->u.suffix->secinfo;
+ e->alignment = e->u.suffix->alignment;
+ e->u.index = e->u.suffix->u.index + (e->u.suffix->len - e->len);
+ }
+ }
+}
+
+/* This function is called once after all SEC_MERGE sections are registered
+ with _bfd_merge_section. */
+
+boolean
+_bfd_merge_sections (abfd, xsinfo, remove_hook)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ PTR xsinfo;
+ void (*remove_hook) PARAMS((bfd *, asection *));
+{
+ struct sec_merge_info *sinfo;
+
+ for (sinfo = (struct sec_merge_info *) xsinfo; sinfo; sinfo = sinfo->next)
+ {
+ struct sec_merge_sec_info * secinfo;
+
+ if (! sinfo->chain)
+ continue;
+
+ /* Move sinfo->chain to head of the chain, terminate it. */
+ secinfo = sinfo->chain;
+ sinfo->chain = secinfo->next;
+ secinfo->next = NULL;
+
+ /* Record the sections into the hash table. */
+ for (secinfo = sinfo->chain; secinfo; secinfo = secinfo->next)
+ if (secinfo->sec->flags & SEC_EXCLUDE)
+ {
+ *secinfo->psecinfo = NULL;
+ if (remove_hook)
+ (*remove_hook) (abfd, secinfo->sec);
+ }
+ else if (! record_section (sinfo, secinfo))
+ break;
+
+ if (secinfo)
+ continue;
+
+ if (sinfo->htab->strings)
+ merge_strings (sinfo);
+ else
+ {
+ struct sec_merge_hash_entry *e;
+ bfd_size_type size = 0;
+
+ /* Things are much simpler for non-strings.
+ Just assign them slots in the section. */
+ secinfo = NULL;
+ for (e = sinfo->htab->first; e; e = e->next)
+ {
+ if (e->secinfo->first == NULL)
+ {
+ if (secinfo)
+ secinfo->sec->_cooked_size = size;
+ e->secinfo->first = e;
+ size = 0;
+ }
+ size = (size + e->alignment - 1)
+ & ~((bfd_vma) e->alignment - 1);
+ e->u.index = size;
+ size += e->len;
+ secinfo = e->secinfo;
+ }
+ secinfo->sec->_cooked_size = size;
+ }
+
+ /* Finally shrink all input sections which have not made it into
+ the hash table at all. */
+ for (secinfo = sinfo->chain; secinfo; secinfo = secinfo->next)
+ if (secinfo->first == NULL)
+ {
+ secinfo->sec->_cooked_size = 0;
+ secinfo->sec->flags |= SEC_EXCLUDE;
+ }
+ }
+
+ return true;
+}
+
+/* Write out the merged section. */
+
+boolean
+_bfd_write_merged_section (output_bfd, sec, psecinfo)
+ bfd *output_bfd;
+ asection *sec;
+ PTR psecinfo;
+{
+ struct sec_merge_sec_info *secinfo;
+ file_ptr pos;
+
+ secinfo = (struct sec_merge_sec_info *) psecinfo;
+
+ if (!secinfo->first)
+ return true;
+
+ pos = sec->output_section->filepos + sec->output_offset;
+ if (bfd_seek (output_bfd, pos, SEEK_SET) != 0)
+ return false;
+
+ if (! sec_merge_emit (output_bfd, secinfo->first))
+ return false;
+
+ return true;
+}
+
+/* Adjust an address in the SEC_MERGE section. Given OFFSET within
+ *PSEC, this returns the new offset in the adjusted SEC_MERGE
+ section and writes the new section back into *PSEC. */
+
+bfd_vma
+_bfd_merged_section_offset (output_bfd, psec, psecinfo, offset, addend)
+ bfd *output_bfd ATTRIBUTE_UNUSED;
+ asection **psec;
+ PTR psecinfo;
+ bfd_vma offset, addend;
+{
+ struct sec_merge_sec_info *secinfo;
+ struct sec_merge_hash_entry *entry;
+ unsigned char *p;
+ asection *sec = *psec;
+
+ secinfo = (struct sec_merge_sec_info *) psecinfo;
+
+ if (offset + addend >= sec->_raw_size)
+ {
+ if (offset + addend > sec->_raw_size)
+ {
+ (*_bfd_error_handler)
+ (_("%s: access beyond end of merged section (%ld + %ld)"),
+ bfd_get_filename (sec->owner), (long) offset, (long) addend);
+ }
+ return (secinfo->first ? sec->_cooked_size : 0);
+ }
+
+ if (secinfo->htab->strings)
+ {
+ if (sec->entsize == 1)
+ {
+ p = secinfo->contents + offset + addend - 1;
+ while (*p && p >= secinfo->contents)
+ --p;
+ ++p;
+ }
+ else
+ {
+ p = secinfo->contents
+ + ((offset + addend) / sec->entsize) * sec->entsize;
+ p -= sec->entsize;
+ while (p >= secinfo->contents)
+ {
+ unsigned int i;
+
+ for (i = 0; i < sec->entsize; ++i)
+ if (p[i] != '\0')
+ break;
+ if (i == sec->entsize)
+ break;
+ p -= sec->entsize;
+ }
+ p += sec->entsize;
+ }
+ }
+ else
+ {
+ p = secinfo->contents
+ + ((offset + addend) / sec->entsize) * sec->entsize;
+ }
+ entry = sec_merge_hash_lookup (secinfo->htab, p, 0, false);
+ if (!entry)
+ {
+ if (! secinfo->htab->strings)
+ abort ();
+ /* This should only happen if somebody points into the padding
+ after a NUL character but before next entity. */
+ if (*p)
+ abort ();
+ if (! secinfo->htab->first)
+ abort ();
+ entry = secinfo->htab->first;
+ p = secinfo->contents
+ + ((offset + addend) / sec->entsize + 1) * sec->entsize
+ - entry->len;
+ }
+
+ *psec = entry->secinfo->sec;
+ return entry->u.index + (secinfo->contents + offset - p);
+}
diff --git a/contrib/binutils/bfd/netbsd-core.c b/contrib/binutils/bfd/netbsd-core.c
index c93d6a4..2787c46 100644
--- a/contrib/binutils/bfd/netbsd-core.c
+++ b/contrib/binutils/bfd/netbsd-core.c
@@ -1,5 +1,6 @@
/* BFD back end for NetBSD style core files
- Copyright 1988, 1989, 1991, 1992, 1993, 1996, 1998, 1999, 2000
+ Copyright 1988, 1989, 1991, 1992, 1993, 1996, 1998, 1999, 2000, 2001,
+ 2002
Free Software Foundation, Inc.
Written by Paul Kranenburg, EUR
@@ -39,12 +40,12 @@ struct netbsd_core_struct {
/* forward declarations */
-static const bfd_target * netbsd_core_file_p PARAMS ((bfd *abfd));
-static char * netbsd_core_file_failing_command PARAMS ((bfd *abfd));
-static int netbsd_core_file_failing_signal PARAMS ((bfd *abfd));
-static boolean netbsd_core_file_matches_executable_p
- PARAMS ((bfd *core_bfd, bfd *exec_bfd));
-static void swap_abort PARAMS ((void));
+static const bfd_target *netbsd_core_file_p PARAMS ((bfd *abfd));
+static char *netbsd_core_file_failing_command PARAMS ((bfd *abfd));
+static int netbsd_core_file_failing_signal PARAMS ((bfd *abfd));
+static boolean netbsd_core_file_matches_executable_p
+ PARAMS ((bfd *core_bfd, bfd *exec_bfd));
+static void swap_abort PARAMS ((void));
/* Handle NetBSD-style core dump file. */
@@ -54,117 +55,116 @@ netbsd_core_file_p (abfd)
bfd *abfd;
{
- int i, val, offset;
- asection *asect, *asect2;
- struct core core;
- struct coreseg coreseg;
-
- val = bfd_read ((void *)&core, 1, sizeof core, abfd);
- if (val != sizeof core) {
- /* Too small to be a core file */
- bfd_set_error(bfd_error_wrong_format);
- return 0;
+ int i, val;
+ file_ptr offset;
+ asection *asect, *asect2;
+ struct core core;
+ struct coreseg coreseg;
+ bfd_size_type amt = sizeof core;
+
+ val = bfd_bread ((void *) &core, amt, abfd);
+ if (val != sizeof core)
+ {
+ /* Too small to be a core file */
+ bfd_set_error (bfd_error_wrong_format);
+ return 0;
+ }
+
+ if (CORE_GETMAGIC (core) != COREMAGIC)
+ {
+ bfd_set_error (bfd_error_wrong_format);
+ return 0;
+ }
+
+ amt = sizeof (struct netbsd_core_struct);
+ rawptr = (struct netbsd_core_struct *) bfd_zalloc (abfd, amt);
+ if (rawptr == NULL)
+ return 0;
+
+ rawptr->core = core;
+ abfd->tdata.netbsd_core_data = rawptr;
+
+ offset = core.c_hdrsize;
+ for (i = 0; i < core.c_nseg; i++)
+ {
+ const char *sname;
+ flagword flags;
+
+ if (bfd_seek (abfd, offset, SEEK_SET) != 0)
+ goto punt;
+
+ val = bfd_bread ((void *) &coreseg, (bfd_size_type) sizeof coreseg, abfd);
+ if (val != sizeof coreseg)
+ {
+ bfd_set_error (bfd_error_file_truncated);
+ goto punt;
}
-
- if (CORE_GETMAGIC(core) != COREMAGIC) {
- bfd_set_error(bfd_error_wrong_format);
- return 0;
+ if (CORE_GETMAGIC (coreseg) != CORESEGMAGIC)
+ {
+ bfd_set_error (bfd_error_wrong_format);
+ goto punt;
}
- rawptr = (struct netbsd_core_struct *)
- bfd_zalloc (abfd, sizeof (struct netbsd_core_struct));
- if (rawptr == NULL) {
- bfd_set_error(bfd_error_no_memory);
- return 0;
+ offset += core.c_seghdrsize;
+
+ switch (CORE_GETFLAG (coreseg))
+ {
+ case CORE_CPU:
+ sname = ".reg";
+ flags = SEC_ALLOC + SEC_HAS_CONTENTS;
+ break;
+ case CORE_DATA:
+ sname = ".data";
+ flags = SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS;
+ break;
+ case CORE_STACK:
+ sname = ".stack";
+ flags = SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS;
+ break;
+ default:
+ sname = ".unknown";
+ flags = SEC_ALLOC + SEC_HAS_CONTENTS;
+ break;
}
+ asect = bfd_make_section_anyway (abfd, sname);
+ if (asect == NULL)
+ goto punt;
- rawptr->core = core;
- abfd->tdata.netbsd_core_data = rawptr;
-
- offset = core.c_hdrsize;
- for (i = 0; i < core.c_nseg; i++) {
-
- if (bfd_seek (abfd, offset, SEEK_SET) != 0)
- goto punt;
-
- val = bfd_read ((void *)&coreseg, 1, sizeof coreseg, abfd);
- if (val != sizeof coreseg) {
- bfd_set_error(bfd_error_file_truncated);
- goto punt;
- }
- if (CORE_GETMAGIC(coreseg) != CORESEGMAGIC) {
- bfd_set_error(bfd_error_wrong_format);
- goto punt;
- }
-
- offset += core.c_seghdrsize;
-
- asect = (asection *) bfd_zalloc (abfd, sizeof (asection));
- if (asect == NULL) {
- bfd_set_error(bfd_error_no_memory);
- goto punt;
- }
-
- asect->_raw_size = coreseg.c_size;
- asect->vma = coreseg.c_addr;
- asect->filepos = offset;
- asect->alignment_power = 2;
- asect->next = abfd->sections;
- abfd->sections = asect;
- abfd->section_count++;
- offset += coreseg.c_size;
-
- switch (CORE_GETFLAG(coreseg)) {
- case CORE_CPU:
- asect->name = ".reg";
- asect->flags = SEC_ALLOC + SEC_HAS_CONTENTS;
-#ifdef CORE_FPU_OFFSET
- /* Hackish... */
- asect->_raw_size = CORE_FPU_OFFSET;
- asect2 = (asection *)bfd_zalloc (abfd,
- sizeof (asection));
- if (asect2 == NULL) {
- bfd_set_error(bfd_error_no_memory);
- goto punt;
- }
- asect2->_raw_size = coreseg.c_size - CORE_FPU_OFFSET;
- asect2->vma = 0;
- asect2->filepos = asect->filepos + CORE_FPU_OFFSET;
- asect2->alignment_power = 2;
- asect2->next = abfd->sections;
- asect2->name = ".reg2";
- asect2->flags = SEC_ALLOC + SEC_HAS_CONTENTS;
- abfd->sections = asect2;
- abfd->section_count++;
-#endif
+ asect->flags = flags;
+ asect->_raw_size = coreseg.c_size;
+ asect->vma = coreseg.c_addr;
+ asect->filepos = offset;
+ asect->alignment_power = 2;
+
+ offset += coreseg.c_size;
- break;
- case CORE_DATA:
- asect->name = ".data";
- asect->flags = SEC_ALLOC+SEC_LOAD+SEC_HAS_CONTENTS;
- break;
- case CORE_STACK:
- asect->name = ".stack";
- asect->flags = SEC_ALLOC+SEC_LOAD+SEC_HAS_CONTENTS;
- break;
- }
+#ifdef CORE_FPU_OFFSET
+ switch (CORE_GETFLAG (coreseg))
+ {
+ case CORE_CPU:
+ /* Hackish... */
+ asect->_raw_size = CORE_FPU_OFFSET;
+ asect2 = bfd_make_section_anyway (abfd, ".reg2");
+ if (asect2 == NULL)
+ goto punt;
+ asect2->_raw_size = coreseg.c_size - CORE_FPU_OFFSET;
+ asect2->vma = 0;
+ asect2->filepos = asect->filepos + CORE_FPU_OFFSET;
+ asect2->alignment_power = 2;
+ asect2->flags = SEC_ALLOC + SEC_HAS_CONTENTS;
+ break;
}
+#endif
+ }
- /* OK, we believe you. You're a core file (sure, sure). */
- return abfd->xvec;
+ /* OK, we believe you. You're a core file (sure, sure). */
+ return abfd->xvec;
-punt: {
- asection *anext;
- for (asect = abfd->sections; asect; asect = anext) {
- anext = asect->next;
- free((void *)asect);
- }
- }
- free ((void *)rawptr);
- abfd->tdata.netbsd_core_data = NULL;
- abfd->sections = NULL;
- abfd->section_count = 0;
- return 0;
+ punt:
+ bfd_release (abfd, abfd->tdata.any);
+ abfd->tdata.any = NULL;
+ bfd_section_list_clear (abfd);
+ return 0;
}
static char*
@@ -187,7 +187,8 @@ netbsd_core_file_failing_signal (abfd)
/* ARGSUSED */
static boolean
netbsd_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 */
}
diff --git a/contrib/binutils/bfd/opncls.c b/contrib/binutils/bfd/opncls.c
index 0c3d2c9..0b285d4 100644
--- a/contrib/binutils/bfd/opncls.c
+++ b/contrib/binutils/bfd/opncls.c
@@ -49,7 +49,7 @@ _bfd_new_bfd ()
{
bfd *nbfd;
- nbfd = (bfd *) bfd_zmalloc (sizeof (bfd));
+ nbfd = (bfd *) bfd_zmalloc ((bfd_size_type) sizeof (bfd));
if (nbfd == NULL)
return NULL;
@@ -57,6 +57,7 @@ _bfd_new_bfd ()
if (nbfd->memory == NULL)
{
bfd_set_error (bfd_error_no_memory);
+ free (nbfd);
return NULL;
}
@@ -65,10 +66,16 @@ _bfd_new_bfd ()
nbfd->direction = no_direction;
nbfd->iostream = NULL;
nbfd->where = 0;
+ if (!bfd_hash_table_init (&nbfd->section_htab, bfd_section_hash_newfunc))
+ {
+ free (nbfd);
+ return NULL;
+ }
nbfd->sections = (asection *) NULL;
+ nbfd->section_tail = &nbfd->sections;
nbfd->format = bfd_unknown;
nbfd->my_archive = (bfd *) NULL;
- nbfd->origin = 0;
+ nbfd->origin = 0;
nbfd->opened_once = false;
nbfd->output_has_begun = false;
nbfd->section_count = 0;
@@ -96,6 +103,17 @@ _bfd_new_bfd_contained_in (obfd)
return nbfd;
}
+/* Delete a BFD. */
+
+void
+_bfd_delete_bfd (abfd)
+ bfd *abfd;
+{
+ bfd_hash_table_free (&abfd->section_htab);
+ objalloc_free ((struct objalloc *) abfd->memory);
+ free (abfd);
+}
+
/*
SECTION
Opening and closing BFDs
@@ -107,7 +125,7 @@ FUNCTION
bfd_openr
SYNOPSIS
- bfd *bfd_openr(CONST char *filename, CONST char *target);
+ bfd *bfd_openr(const char *filename, const char *target);
DESCRIPTION
Open the file @var{filename} (using <<fopen>>) with the target
@@ -122,8 +140,8 @@ DESCRIPTION
bfd *
bfd_openr (filename, target)
- CONST char *filename;
- CONST char *target;
+ const char *filename;
+ const char *target;
{
bfd *nbfd;
const bfd_target *target_vec;
@@ -135,9 +153,8 @@ bfd_openr (filename, target)
target_vec = bfd_find_target (target, nbfd);
if (target_vec == NULL)
{
- objalloc_free ((struct objalloc *) nbfd->memory);
- free (nbfd);
bfd_set_error (bfd_error_invalid_target);
+ _bfd_delete_bfd (nbfd);
return NULL;
}
@@ -148,8 +165,7 @@ bfd_openr (filename, target)
{
/* File didn't exist, or some such */
bfd_set_error (bfd_error_system_call);
- objalloc_free ((struct objalloc *) nbfd->memory);
- free (nbfd);
+ _bfd_delete_bfd (nbfd);
return NULL;
}
@@ -169,7 +185,7 @@ FUNCTION
bfd_fdopenr
SYNOPSIS
- bfd *bfd_fdopenr(CONST char *filename, CONST char *target, int fd);
+ bfd *bfd_fdopenr(const char *filename, const char *target, int fd);
DESCRIPTION
<<bfd_fdopenr>> is to <<bfd_fopenr>> much like <<fdopen>> is to <<fopen>>.
@@ -192,8 +208,8 @@ DESCRIPTION
bfd *
bfd_fdopenr (filename, target, fd)
- CONST char *filename;
- CONST char *target;
+ const char *filename;
+ const char *target;
int fd;
{
bfd *nbfd;
@@ -216,8 +232,7 @@ bfd_fdopenr (filename, target, fd)
if (target_vec == NULL)
{
bfd_set_error (bfd_error_invalid_target);
- objalloc_free ((struct objalloc *) nbfd->memory);
- free (nbfd);
+ _bfd_delete_bfd (nbfd);
return NULL;
}
@@ -236,8 +251,7 @@ bfd_fdopenr (filename, target, fd)
if (nbfd->iostream == NULL)
{
- objalloc_free ((struct objalloc *) nbfd->memory);
- free (nbfd);
+ _bfd_delete_bfd (nbfd);
return NULL;
}
@@ -259,8 +273,7 @@ bfd_fdopenr (filename, target, fd)
if (! bfd_cache_init (nbfd))
{
- objalloc_free ((struct objalloc *) nbfd->memory);
- free (nbfd);
+ _bfd_delete_bfd (nbfd);
return NULL;
}
nbfd->opened_once = true;
@@ -299,19 +312,17 @@ bfd_openstreamr (filename, target, streamarg)
if (target_vec == NULL)
{
bfd_set_error (bfd_error_invalid_target);
- objalloc_free ((struct objalloc *) nbfd->memory);
- free (nbfd);
+ _bfd_delete_bfd (nbfd);
return NULL;
}
nbfd->iostream = (PTR) stream;
nbfd->filename = filename;
nbfd->direction = read_direction;
-
+
if (! bfd_cache_init (nbfd))
{
- objalloc_free ((struct objalloc *) nbfd->memory);
- free (nbfd);
+ _bfd_delete_bfd (nbfd);
return NULL;
}
@@ -328,7 +339,7 @@ FUNCTION
bfd_openw
SYNOPSIS
- bfd *bfd_openw(CONST char *filename, CONST char *target);
+ bfd *bfd_openw(const char *filename, const char *target);
DESCRIPTION
Create a BFD, associated with file @var{filename}, using the
@@ -340,8 +351,8 @@ DESCRIPTION
bfd *
bfd_openw (filename, target)
- CONST char *filename;
- CONST char *target;
+ const char *filename;
+ const char *target;
{
bfd *nbfd;
const bfd_target *target_vec;
@@ -358,8 +369,7 @@ bfd_openw (filename, target)
target_vec = bfd_find_target (target, nbfd);
if (target_vec == NULL)
{
- objalloc_free ((struct objalloc *) nbfd->memory);
- free (nbfd);
+ _bfd_delete_bfd (nbfd);
return NULL;
}
@@ -369,8 +379,7 @@ bfd_openw (filename, target)
if (bfd_open_file (nbfd) == NULL)
{
bfd_set_error (bfd_error_system_call); /* File not writeable, etc */
- objalloc_free ((struct objalloc *) nbfd->memory);
- free (nbfd);
+ _bfd_delete_bfd (nbfd);
return NULL;
}
@@ -429,7 +438,7 @@ bfd_close (abfd)
if (stat (abfd->filename, &buf) == 0)
{
- int mask = umask (0);
+ unsigned int mask = umask (0);
umask (mask);
chmod (abfd->filename,
(0777
@@ -437,8 +446,7 @@ bfd_close (abfd)
}
}
- objalloc_free ((struct objalloc *) abfd->memory);
- free (abfd);
+ _bfd_delete_bfd (abfd);
return ret;
}
@@ -484,7 +492,7 @@ bfd_close_all_done (abfd)
if (stat (abfd->filename, &buf) == 0)
{
- int mask = umask (0);
+ unsigned int mask = umask (0);
umask (mask);
chmod (abfd->filename,
(0777
@@ -492,8 +500,7 @@ bfd_close_all_done (abfd)
}
}
- objalloc_free ((struct objalloc *) abfd->memory);
- free (abfd);
+ _bfd_delete_bfd (abfd);
return ret;
}
@@ -503,7 +510,7 @@ FUNCTION
bfd_create
SYNOPSIS
- bfd *bfd_create(CONST char *filename, bfd *templ);
+ bfd *bfd_create(const char *filename, bfd *templ);
DESCRIPTION
Create a new BFD in the manner of
@@ -515,7 +522,7 @@ DESCRIPTION
bfd *
bfd_create (filename, templ)
- CONST char *filename;
+ const char *filename;
bfd *templ;
{
bfd *nbfd;
@@ -560,9 +567,10 @@ bfd_make_writable(abfd)
return false;
}
- bim = (struct bfd_in_memory *) bfd_malloc (sizeof (struct bfd_in_memory));
+ bim = ((struct bfd_in_memory *)
+ bfd_malloc ((bfd_size_type) sizeof (struct bfd_in_memory)));
abfd->iostream = (PTR) bim;
- /* bfd_write will grow these as needed */
+ /* bfd_bwrite will grow these as needed */
bim->size = 0;
bim->buffer = 0;
@@ -613,7 +621,7 @@ bfd_make_readable(abfd)
abfd->sections = (asection *) NULL;
abfd->format = bfd_unknown;
abfd->my_archive = (bfd *) NULL;
- abfd->origin = 0;
+ abfd->origin = 0;
abfd->opened_once = false;
abfd->output_has_begun = false;
abfd->section_count = 0;
@@ -650,10 +658,16 @@ DESCRIPTION
PTR
bfd_alloc (abfd, size)
bfd *abfd;
- size_t size;
+ bfd_size_type size;
{
PTR ret;
+ if (size != (unsigned long) size)
+ {
+ bfd_set_error (bfd_error_no_memory);
+ return NULL;
+ }
+
ret = objalloc_alloc (abfd->memory, (unsigned long) size);
if (ret == NULL)
bfd_set_error (bfd_error_no_memory);
@@ -663,17 +677,18 @@ bfd_alloc (abfd, size)
PTR
bfd_zalloc (abfd, size)
bfd *abfd;
- size_t size;
+ bfd_size_type size;
{
PTR res;
res = bfd_alloc (abfd, size);
if (res)
- memset (res, 0, size);
+ memset (res, 0, (size_t) size);
return res;
}
-/* Free a block allocated for a BFD. */
+/* Free a block allocated for a BFD.
+ Note: Also frees all more recently allocated blocks! */
void
bfd_release (abfd, block)
diff --git a/contrib/binutils/bfd/osf-core.c b/contrib/binutils/bfd/osf-core.c
index c458ecf..edf5470 100644
--- a/contrib/binutils/bfd/osf-core.c
+++ b/contrib/binutils/bfd/osf-core.c
@@ -1,5 +1,6 @@
/* BFD back-end for OSF/1 core files.
- Copyright 1993, 1994, 1995, 1998, 1999 Free Software Foundation, Inc.
+ Copyright 1993, 1994, 1995, 1998, 1999, 2001, 2002
+ Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -29,25 +30,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* forward declarations */
-static asection *
-make_bfd_asection PARAMS ((bfd *, CONST char *, flagword, bfd_size_type,
- bfd_vma, file_ptr));
-static asymbol *
-osf_core_make_empty_symbol PARAMS ((bfd *));
-static const bfd_target *
-osf_core_core_file_p PARAMS ((bfd *));
-static char *
-osf_core_core_file_failing_command PARAMS ((bfd *));
-static int
-osf_core_core_file_failing_signal PARAMS ((bfd *));
-static boolean
-osf_core_core_file_matches_executable_p PARAMS ((bfd *, bfd *));
-static void
-swap_abort PARAMS ((void));
+static asection *make_bfd_asection
+ PARAMS ((bfd *, const char *, flagword, bfd_size_type, bfd_vma, file_ptr));
+static const bfd_target *osf_core_core_file_p PARAMS ((bfd *));
+static char *osf_core_core_file_failing_command PARAMS ((bfd *));
+static int osf_core_core_file_failing_signal PARAMS ((bfd *));
+static boolean osf_core_core_file_matches_executable_p PARAMS ((bfd *, bfd *));
+static void swap_abort PARAMS ((void));
/* These are stored in the bfd's tdata */
-struct osf_core_struct
+struct osf_core_struct
{
int sig;
char cmd[MAXCOMLEN + 1];
@@ -60,7 +53,7 @@ struct osf_core_struct
static asection *
make_bfd_asection (abfd, name, flags, _raw_size, vma, filepos)
bfd *abfd;
- CONST char *name;
+ const char *name;
flagword flags;
bfd_size_type _raw_size;
bfd_vma vma;
@@ -81,16 +74,6 @@ make_bfd_asection (abfd, name, flags, _raw_size, vma, filepos)
return asect;
}
-static asymbol *
-osf_core_make_empty_symbol (abfd)
- bfd *abfd;
-{
- asymbol *new = (asymbol *) bfd_zalloc (abfd, sizeof (asymbol));
- if (new)
- new->the_bfd = abfd;
- return new;
-}
-
static const bfd_target *
osf_core_core_file_p (abfd)
bfd *abfd;
@@ -99,8 +82,10 @@ osf_core_core_file_p (abfd)
int i;
char *secname;
struct core_filehdr core_header;
+ bfd_size_type amt;
- val = bfd_read ((PTR)&core_header, 1, sizeof core_header, abfd);
+ amt = sizeof core_header;
+ val = bfd_bread ((PTR) &core_header, amt, abfd);
if (val != sizeof core_header)
return NULL;
@@ -108,7 +93,7 @@ osf_core_core_file_p (abfd)
return NULL;
core_hdr (abfd) = (struct osf_core_struct *)
- bfd_zalloc (abfd, sizeof (struct osf_core_struct));
+ bfd_zalloc (abfd, (bfd_size_type) sizeof (struct osf_core_struct));
if (!core_hdr (abfd))
return NULL;
@@ -120,7 +105,8 @@ osf_core_core_file_p (abfd)
struct core_scnhdr core_scnhdr;
flagword flags;
- val = bfd_read ((PTR)&core_scnhdr, 1, sizeof core_scnhdr, abfd);
+ amt = sizeof core_scnhdr;
+ val = bfd_bread ((PTR) &core_scnhdr, amt, abfd);
if (val != sizeof core_scnhdr)
break;
@@ -152,12 +138,18 @@ osf_core_core_file_p (abfd)
(bfd_size_type) core_scnhdr.size,
(bfd_vma) core_scnhdr.vaddr,
(file_ptr) core_scnhdr.scnptr))
- return NULL;
+ goto fail;
}
/* OK, we believe you. You're a core file (sure, sure). */
return abfd->xvec;
+
+ fail:
+ bfd_release (abfd, core_hdr (abfd));
+ core_hdr (abfd) = NULL;
+ bfd_section_list_clear (abfd);
+ return NULL;
}
static char *
@@ -178,22 +170,12 @@ osf_core_core_file_failing_signal (abfd)
/* ARGSUSED */
static boolean
osf_core_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 */
}
-#define osf_core_get_symtab_upper_bound _bfd_nosymbols_get_symtab_upper_bound
-#define osf_core_get_symtab _bfd_nosymbols_get_symtab
-#define osf_core_print_symbol _bfd_nosymbols_print_symbol
-#define osf_core_get_symbol_info _bfd_nosymbols_get_symbol_info
-#define osf_core_bfd_is_local_label_name _bfd_nosymbols_bfd_is_local_label_name
-#define osf_core_get_lineno _bfd_nosymbols_get_lineno
-#define osf_core_find_nearest_line _bfd_nosymbols_find_nearest_line
-#define osf_core_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
-#define osf_core_read_minisymbols _bfd_nosymbols_read_minisymbols
-#define osf_core_minisymbol_to_symbol _bfd_nosymbols_minisymbol_to_symbol
-
/* If somebody calls any byte-swapping routines, shoot them. */
static void
swap_abort()
@@ -239,18 +221,18 @@ const bfd_target osf_core_vec =
bfd_false, bfd_false,
bfd_false, bfd_false
},
-
- BFD_JUMP_TABLE_GENERIC (_bfd_generic),
- BFD_JUMP_TABLE_COPY (_bfd_generic),
- BFD_JUMP_TABLE_CORE (osf_core),
- BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
- BFD_JUMP_TABLE_SYMBOLS (osf_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),
+
+ BFD_JUMP_TABLE_GENERIC (_bfd_generic),
+ BFD_JUMP_TABLE_COPY (_bfd_generic),
+ BFD_JUMP_TABLE_CORE (osf_core),
+ BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
+ BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols),
+ 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/peXXigen.c b/contrib/binutils/bfd/peXXigen.c
index a3141ba..37f4d1a 100644
--- a/contrib/binutils/bfd/peXXigen.c
+++ b/contrib/binutils/bfd/peXXigen.c
@@ -95,8 +95,9 @@ static void add_data_entry
PARAMS ((bfd *, struct internal_extra_pe_aouthdr *, int, char *, bfd_vma));
static boolean pe_print_pdata PARAMS ((bfd *, PTR));
static boolean pe_print_reloc PARAMS ((bfd *, PTR));
-
-/**********************************************************************/
+static boolean pe_print_idata PARAMS ((bfd *, PTR));
+static boolean pe_print_edata PARAMS ((bfd *, PTR));
+
void
_bfd_XXi_swap_sym_in (abfd, ext1, in1)
@@ -110,26 +111,21 @@ _bfd_XXi_swap_sym_in (abfd, ext1, in1)
if (ext->e.e_name[0] == 0)
{
in->_n._n_n._n_zeroes = 0;
- in->_n._n_n._n_offset =
- bfd_h_get_32 (abfd, (bfd_byte *) ext->e.e.e_offset);
+ in->_n._n_n._n_offset = H_GET_32 (abfd, ext->e.e.e_offset);
}
else
- {
- memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
- }
+ memcpy (in->_n._n_name, ext->e.e_name, SYMNMLEN);
+
+ in->n_value = H_GET_32 (abfd, ext->e_value);
+ in->n_scnum = H_GET_16 (abfd, ext->e_scnum);
- in->n_value = bfd_h_get_32 (abfd, (bfd_byte *) ext->e_value);
- in->n_scnum = bfd_h_get_16 (abfd, (bfd_byte *) ext->e_scnum);
if (sizeof (ext->e_type) == 2)
- {
- in->n_type = bfd_h_get_16 (abfd, (bfd_byte *) ext->e_type);
- }
+ in->n_type = H_GET_16 (abfd, ext->e_type);
else
- {
- in->n_type = bfd_h_get_32 (abfd, (bfd_byte *) ext->e_type);
- }
- in->n_sclass = bfd_h_get_8 (abfd, ext->e_sclass);
- in->n_numaux = bfd_h_get_8 (abfd, ext->e_numaux);
+ in->n_type = H_GET_32 (abfd, ext->e_type);
+
+ in->n_sclass = H_GET_8 (abfd, ext->e_sclass);
+ in->n_numaux = H_GET_8 (abfd, ext->e_numaux);
#ifndef STRICT_PE_FORMAT
/* This is for Gnu-created DLLs. */
@@ -166,6 +162,7 @@ _bfd_XXi_swap_sym_in (abfd, ext1, in1)
if (in->n_scnum == 0)
{
asection *sec;
+
for (sec = abfd->sections; sec; sec = sec->next)
{
if (strcmp (sec->name, in->n_name) == 0)
@@ -175,16 +172,18 @@ _bfd_XXi_swap_sym_in (abfd, ext1, in1)
}
}
}
+
if (in->n_scnum == 0)
{
int unused_section_number = 0;
asection *sec;
char *name;
+
for (sec = abfd->sections; sec; sec = sec->next)
if (unused_section_number <= sec->target_index)
unused_section_number = sec->target_index + 1;
- name = bfd_alloc (abfd, strlen (in->n_name) + 10);
+ name = bfd_alloc (abfd, (bfd_size_type) strlen (in->n_name) + 10);
if (name == NULL)
return;
strcpy (name, in->n_name);
@@ -229,28 +228,25 @@ _bfd_XXi_swap_sym_out (abfd, inp, extp)
{
struct internal_syment *in = (struct internal_syment *) inp;
SYMENT *ext = (SYMENT *) extp;
+
if (in->_n._n_name[0] == 0)
{
- bfd_h_put_32 (abfd, 0, (bfd_byte *) ext->e.e.e_zeroes);
- bfd_h_put_32 (abfd, in->_n._n_n._n_offset, (bfd_byte *) ext->e.e.e_offset);
+ H_PUT_32 (abfd, 0, ext->e.e.e_zeroes);
+ H_PUT_32 (abfd, in->_n._n_n._n_offset, ext->e.e.e_offset);
}
else
- {
- memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
- }
+ memcpy (ext->e.e_name, in->_n._n_name, SYMNMLEN);
+
+ H_PUT_32 (abfd, in->n_value, ext->e_value);
+ H_PUT_16 (abfd, in->n_scnum, ext->e_scnum);
- bfd_h_put_32 (abfd, in->n_value, (bfd_byte *) ext->e_value);
- bfd_h_put_16 (abfd, in->n_scnum, (bfd_byte *) ext->e_scnum);
if (sizeof (ext->e_type) == 2)
- {
- bfd_h_put_16 (abfd, in->n_type, (bfd_byte *) ext->e_type);
- }
+ H_PUT_16 (abfd, in->n_type, ext->e_type);
else
- {
- bfd_h_put_32 (abfd, in->n_type, (bfd_byte *) ext->e_type);
- }
- bfd_h_put_8 (abfd, in->n_sclass, ext->e_sclass);
- bfd_h_put_8 (abfd, in->n_numaux, ext->e_numaux);
+ H_PUT_32 (abfd, in->n_type, ext->e_type);
+
+ H_PUT_8 (abfd, in->n_sclass, ext->e_sclass);
+ H_PUT_8 (abfd, in->n_numaux, ext->e_numaux);
return SYMESZ;
}
@@ -274,13 +270,10 @@ _bfd_XXi_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
if (ext->x_file.x_fname[0] == 0)
{
in->x_file.x_n.x_zeroes = 0;
- in->x_file.x_n.x_offset =
- bfd_h_get_32 (abfd, (bfd_byte *) ext->x_file.x_n.x_offset);
+ in->x_file.x_n.x_offset = H_GET_32 (abfd, ext->x_file.x_n.x_offset);
}
else
- {
- memcpy (in->x_file.x_fname, ext->x_file.x_fname, FILNMLEN);
- }
+ memcpy (in->x_file.x_fname, ext->x_file.x_fname, FILNMLEN);
return;
case C_STAT:
@@ -291,19 +284,16 @@ _bfd_XXi_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
in->x_scn.x_scnlen = GET_SCN_SCNLEN (abfd, ext);
in->x_scn.x_nreloc = GET_SCN_NRELOC (abfd, ext);
in->x_scn.x_nlinno = GET_SCN_NLINNO (abfd, ext);
- in->x_scn.x_checksum =
- bfd_h_get_32 (abfd, (bfd_byte *) ext->x_scn.x_checksum);
- in->x_scn.x_associated =
- bfd_h_get_16 (abfd, (bfd_byte *) ext->x_scn.x_associated);
- in->x_scn.x_comdat =
- bfd_h_get_8 (abfd, (bfd_byte *) ext->x_scn.x_comdat);
+ in->x_scn.x_checksum = H_GET_32 (abfd, ext->x_scn.x_checksum);
+ in->x_scn.x_associated = H_GET_16 (abfd, ext->x_scn.x_associated);
+ in->x_scn.x_comdat = H_GET_8 (abfd, ext->x_scn.x_comdat);
return;
}
break;
}
- in->x_sym.x_tagndx.l = bfd_h_get_32 (abfd, (bfd_byte *) ext->x_sym.x_tagndx);
- in->x_sym.x_tvndx = bfd_h_get_16 (abfd, (bfd_byte *) ext->x_sym.x_tvndx);
+ in->x_sym.x_tagndx.l = H_GET_32 (abfd, ext->x_sym.x_tagndx);
+ in->x_sym.x_tvndx = H_GET_16 (abfd, ext->x_sym.x_tvndx);
if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class))
{
@@ -313,19 +303,18 @@ _bfd_XXi_swap_aux_in (abfd, ext1, type, class, indx, numaux, in1)
else
{
in->x_sym.x_fcnary.x_ary.x_dimen[0] =
- bfd_h_get_16 (abfd, (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
+ H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
in->x_sym.x_fcnary.x_ary.x_dimen[1] =
- bfd_h_get_16 (abfd, (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
+ H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
in->x_sym.x_fcnary.x_ary.x_dimen[2] =
- bfd_h_get_16 (abfd, (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
+ H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
in->x_sym.x_fcnary.x_ary.x_dimen[3] =
- bfd_h_get_16 (abfd, (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
+ H_GET_16 (abfd, ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
}
if (ISFCN (type))
{
- in->x_sym.x_misc.x_fsize =
- bfd_h_get_32 (abfd, (bfd_byte *) ext->x_sym.x_misc.x_fsize);
+ in->x_sym.x_misc.x_fsize = H_GET_32 (abfd, ext->x_sym.x_misc.x_fsize);
}
else
{
@@ -353,15 +342,12 @@ _bfd_XXi_swap_aux_out (abfd, inp, type, class, indx, numaux, extp)
case C_FILE:
if (in->x_file.x_fname[0] == 0)
{
- bfd_h_put_32 (abfd, 0, (bfd_byte *) ext->x_file.x_n.x_zeroes);
- bfd_h_put_32 (abfd,
- in->x_file.x_n.x_offset,
- (bfd_byte *) ext->x_file.x_n.x_offset);
+ H_PUT_32 (abfd, 0, ext->x_file.x_n.x_zeroes);
+ H_PUT_32 (abfd, in->x_file.x_n.x_offset, ext->x_file.x_n.x_offset);
}
else
- {
- memcpy (ext->x_file.x_fname, in->x_file.x_fname, FILNMLEN);
- }
+ memcpy (ext->x_file.x_fname, in->x_file.x_fname, FILNMLEN);
+
return AUXESZ;
case C_STAT:
@@ -372,19 +358,16 @@ _bfd_XXi_swap_aux_out (abfd, inp, type, class, indx, numaux, extp)
PUT_SCN_SCNLEN (abfd, in->x_scn.x_scnlen, ext);
PUT_SCN_NRELOC (abfd, in->x_scn.x_nreloc, ext);
PUT_SCN_NLINNO (abfd, in->x_scn.x_nlinno, ext);
- bfd_h_put_32 (abfd, in->x_scn.x_checksum,
- (bfd_byte *) ext->x_scn.x_checksum);
- bfd_h_put_16 (abfd, in->x_scn.x_associated,
- (bfd_byte *) ext->x_scn.x_associated);
- bfd_h_put_8 (abfd, in->x_scn.x_comdat,
- (bfd_byte *) ext->x_scn.x_comdat);
+ H_PUT_32 (abfd, in->x_scn.x_checksum, ext->x_scn.x_checksum);
+ H_PUT_16 (abfd, in->x_scn.x_associated, ext->x_scn.x_associated);
+ H_PUT_8 (abfd, in->x_scn.x_comdat, ext->x_scn.x_comdat);
return AUXESZ;
}
break;
}
- bfd_h_put_32 (abfd, in->x_sym.x_tagndx.l, (bfd_byte *) ext->x_sym.x_tagndx);
- bfd_h_put_16 (abfd, in->x_sym.x_tvndx, (bfd_byte *) ext->x_sym.x_tvndx);
+ H_PUT_32 (abfd, in->x_sym.x_tagndx.l, ext->x_sym.x_tagndx);
+ H_PUT_16 (abfd, in->x_sym.x_tvndx, ext->x_sym.x_tvndx);
if (class == C_BLOCK || class == C_FCN || ISFCN (type) || ISTAG (class))
{
@@ -393,19 +376,18 @@ _bfd_XXi_swap_aux_out (abfd, inp, type, class, indx, numaux, extp)
}
else
{
- bfd_h_put_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
- (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
- bfd_h_put_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
- (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
- bfd_h_put_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
- (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
- bfd_h_put_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
- (bfd_byte *) ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
+ H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[0],
+ ext->x_sym.x_fcnary.x_ary.x_dimen[0]);
+ H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[1],
+ ext->x_sym.x_fcnary.x_ary.x_dimen[1]);
+ H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[2],
+ ext->x_sym.x_fcnary.x_ary.x_dimen[2]);
+ H_PUT_16 (abfd, in->x_sym.x_fcnary.x_ary.x_dimen[3],
+ ext->x_sym.x_fcnary.x_ary.x_dimen[3]);
}
if (ISFCN (type))
- bfd_h_put_32 (abfd, in->x_sym.x_misc.x_fsize,
- (bfd_byte *) ext->x_sym.x_misc.x_fsize);
+ H_PUT_32 (abfd, in->x_sym.x_misc.x_fsize, ext->x_sym.x_misc.x_fsize);
else
{
PUT_LNSZ_LNNO (abfd, in->x_sym.x_misc.x_lnsz.x_lnno, ext);
@@ -424,7 +406,7 @@ _bfd_XXi_swap_lineno_in (abfd, ext1, in1)
LINENO *ext = (LINENO *) ext1;
struct internal_lineno *in = (struct internal_lineno *) in1;
- in->l_addr.l_symndx = bfd_h_get_32 (abfd, (bfd_byte *) ext->l_addr.l_symndx);
+ in->l_addr.l_symndx = H_GET_32 (abfd, ext->l_addr.l_symndx);
in->l_lnno = GET_LINENO_LNNO (abfd, ext);
}
@@ -436,8 +418,7 @@ _bfd_XXi_swap_lineno_out (abfd, inp, outp)
{
struct internal_lineno *in = (struct internal_lineno *) inp;
struct external_lineno *ext = (struct external_lineno *) outp;
- bfd_h_put_32 (abfd, in->l_addr.l_symndx, (bfd_byte *)
- ext->l_addr.l_symndx);
+ H_PUT_32 (abfd, in->l_addr.l_symndx, ext->l_addr.l_symndx);
PUT_LINENO_LNNO (abfd, in->l_lnno, ext);
return LINESZ;
@@ -454,63 +435,62 @@ _bfd_XXi_swap_aouthdr_in (abfd, aouthdr_ext1, aouthdr_int1)
AOUTHDR *aouthdr_ext = (AOUTHDR *) aouthdr_ext1;
struct internal_aouthdr *aouthdr_int = (struct internal_aouthdr *)aouthdr_int1;
- aouthdr_int->magic = bfd_h_get_16 (abfd, (bfd_byte *) aouthdr_ext->magic);
- aouthdr_int->vstamp = bfd_h_get_16 (abfd, (bfd_byte *) aouthdr_ext->vstamp);
- aouthdr_int->tsize =
- GET_AOUTHDR_TSIZE (abfd, (bfd_byte *) aouthdr_ext->tsize);
- aouthdr_int->dsize =
- GET_AOUTHDR_DSIZE (abfd, (bfd_byte *) aouthdr_ext->dsize);
- aouthdr_int->bsize =
- GET_AOUTHDR_BSIZE (abfd, (bfd_byte *) aouthdr_ext->bsize);
- aouthdr_int->entry =
- GET_AOUTHDR_ENTRY (abfd, (bfd_byte *) aouthdr_ext->entry);
+ aouthdr_int->magic = H_GET_16 (abfd, aouthdr_ext->magic);
+ aouthdr_int->vstamp = H_GET_16 (abfd, aouthdr_ext->vstamp);
+ aouthdr_int->tsize = GET_AOUTHDR_TSIZE (abfd, aouthdr_ext->tsize);
+ aouthdr_int->dsize = GET_AOUTHDR_DSIZE (abfd, aouthdr_ext->dsize);
+ aouthdr_int->bsize = GET_AOUTHDR_BSIZE (abfd, aouthdr_ext->bsize);
+ aouthdr_int->entry = GET_AOUTHDR_ENTRY (abfd, aouthdr_ext->entry);
aouthdr_int->text_start =
- GET_AOUTHDR_TEXT_START (abfd, (bfd_byte *) aouthdr_ext->text_start);
+ GET_AOUTHDR_TEXT_START (abfd, aouthdr_ext->text_start);
#ifndef COFF_WITH_pep
/* PE32+ does not have data_start member! */
aouthdr_int->data_start =
- GET_AOUTHDR_DATA_START (abfd, (bfd_byte *) aouthdr_ext->data_start);
+ GET_AOUTHDR_DATA_START (abfd, aouthdr_ext->data_start);
#endif
a = &aouthdr_int->pe;
- a->ImageBase = GET_OPTHDR_IMAGE_BASE (abfd, (bfd_byte *) src->ImageBase);
- a->SectionAlignment = bfd_h_get_32 (abfd, (bfd_byte *) src->SectionAlignment);
- a->FileAlignment = bfd_h_get_32 (abfd, (bfd_byte *) src->FileAlignment);
+ a->ImageBase = GET_OPTHDR_IMAGE_BASE (abfd, src->ImageBase);
+ a->SectionAlignment = H_GET_32 (abfd, src->SectionAlignment);
+ a->FileAlignment = H_GET_32 (abfd, src->FileAlignment);
a->MajorOperatingSystemVersion =
- bfd_h_get_16 (abfd, (bfd_byte *) src->MajorOperatingSystemVersion);
+ H_GET_16 (abfd, src->MajorOperatingSystemVersion);
a->MinorOperatingSystemVersion =
- bfd_h_get_16 (abfd, (bfd_byte *) src->MinorOperatingSystemVersion);
- a->MajorImageVersion = bfd_h_get_16 (abfd, (bfd_byte *) src->MajorImageVersion);
- a->MinorImageVersion = bfd_h_get_16 (abfd, (bfd_byte *) src->MinorImageVersion);
- a->MajorSubsystemVersion = bfd_h_get_16 (abfd, (bfd_byte *) src->MajorSubsystemVersion);
- a->MinorSubsystemVersion = bfd_h_get_16 (abfd, (bfd_byte *) src->MinorSubsystemVersion);
- a->Reserved1 = bfd_h_get_32 (abfd, (bfd_byte *) src->Reserved1);
- a->SizeOfImage = bfd_h_get_32 (abfd, (bfd_byte *) src->SizeOfImage);
- a->SizeOfHeaders = bfd_h_get_32 (abfd, (bfd_byte *) src->SizeOfHeaders);
- a->CheckSum = bfd_h_get_32 (abfd, (bfd_byte *) src->CheckSum);
- a->Subsystem = bfd_h_get_16 (abfd, (bfd_byte *) src->Subsystem);
- a->DllCharacteristics = bfd_h_get_16 (abfd, (bfd_byte *) src->DllCharacteristics);
- a->SizeOfStackReserve = GET_OPTHDR_SIZE_OF_STACK_RESERVE (abfd, (bfd_byte *) src->SizeOfStackReserve);
- a->SizeOfStackCommit = GET_OPTHDR_SIZE_OF_STACK_COMMIT (abfd, (bfd_byte *) src->SizeOfStackCommit);
- a->SizeOfHeapReserve = GET_OPTHDR_SIZE_OF_HEAP_RESERVE (abfd, (bfd_byte *) src->SizeOfHeapReserve);
- a->SizeOfHeapCommit = GET_OPTHDR_SIZE_OF_HEAP_COMMIT (abfd, (bfd_byte *) src->SizeOfHeapCommit);
- a->LoaderFlags = bfd_h_get_32 (abfd, (bfd_byte *) src->LoaderFlags);
- a->NumberOfRvaAndSizes = bfd_h_get_32 (abfd, (bfd_byte *) src->NumberOfRvaAndSizes);
+ H_GET_16 (abfd, src->MinorOperatingSystemVersion);
+ a->MajorImageVersion = H_GET_16 (abfd, src->MajorImageVersion);
+ a->MinorImageVersion = H_GET_16 (abfd, src->MinorImageVersion);
+ a->MajorSubsystemVersion = H_GET_16 (abfd, src->MajorSubsystemVersion);
+ a->MinorSubsystemVersion = H_GET_16 (abfd, src->MinorSubsystemVersion);
+ a->Reserved1 = H_GET_32 (abfd, src->Reserved1);
+ a->SizeOfImage = H_GET_32 (abfd, src->SizeOfImage);
+ a->SizeOfHeaders = H_GET_32 (abfd, src->SizeOfHeaders);
+ a->CheckSum = H_GET_32 (abfd, src->CheckSum);
+ a->Subsystem = H_GET_16 (abfd, src->Subsystem);
+ a->DllCharacteristics = H_GET_16 (abfd, src->DllCharacteristics);
+ a->SizeOfStackReserve =
+ GET_OPTHDR_SIZE_OF_STACK_RESERVE (abfd, src->SizeOfStackReserve);
+ a->SizeOfStackCommit =
+ GET_OPTHDR_SIZE_OF_STACK_COMMIT (abfd, src->SizeOfStackCommit);
+ a->SizeOfHeapReserve =
+ GET_OPTHDR_SIZE_OF_HEAP_RESERVE (abfd, src->SizeOfHeapReserve);
+ a->SizeOfHeapCommit =
+ GET_OPTHDR_SIZE_OF_HEAP_COMMIT (abfd, src->SizeOfHeapCommit);
+ a->LoaderFlags = H_GET_32 (abfd, src->LoaderFlags);
+ a->NumberOfRvaAndSizes = H_GET_32 (abfd, src->NumberOfRvaAndSizes);
{
int idx;
+
for (idx = 0; idx < 16; idx++)
{
/* If data directory is empty, rva also should be 0. */
int size =
- bfd_h_get_32 (abfd, (bfd_byte *) src->DataDirectory[idx][1]);
+ H_GET_32 (abfd, src->DataDirectory[idx][1]);
a->DataDirectory[idx].Size = size;
if (size)
- {
- a->DataDirectory[idx].VirtualAddress =
- bfd_h_get_32 (abfd, (bfd_byte *) src->DataDirectory[idx][0]);
- }
+ a->DataDirectory[idx].VirtualAddress =
+ H_GET_32 (abfd, src->DataDirectory[idx][0]);
else
a->DataDirectory[idx].VirtualAddress = 0;
}
@@ -523,6 +503,7 @@ _bfd_XXi_swap_aouthdr_in (abfd, aouthdr_ext1, aouthdr_int1)
aouthdr_int->entry &= 0xffffffff;
#endif
}
+
if (aouthdr_int->tsize)
{
aouthdr_int->text_start += a->ImageBase;
@@ -530,6 +511,7 @@ _bfd_XXi_swap_aouthdr_in (abfd, aouthdr_ext1, aouthdr_int1)
aouthdr_int->text_start &= 0xffffffff;
#endif
}
+
#ifndef COFF_WITH_pep
/* PE32+ does not have data_start member! */
if (aouthdr_int->dsize)
@@ -547,7 +529,6 @@ _bfd_XXi_swap_aouthdr_in (abfd, aouthdr_ext1, aouthdr_int1)
thunk_size = a->DataDirectory[12].Size;
import_table_size = a->DataDirectory[1].Size;
#endif
-
}
/* A support function for below. */
@@ -562,12 +543,12 @@ add_data_entry (abfd, aout, idx, name, base)
{
asection *sec = bfd_get_section_by_name (abfd, name);
- /* add import directory information if it exists */
+ /* Add import directory information if it exists. */
if ((sec != NULL)
&& (coff_section_data (abfd, sec) != NULL)
&& (pei_section_data (abfd, sec) != NULL))
{
- /* If data directory is empty, rva also should be 0 */
+ /* If data directory is empty, rva also should be 0. */
int size = pei_section_data (abfd, sec)->virt_size;
aout->DataDirectory[idx].Size = size;
@@ -614,6 +595,7 @@ _bfd_XXi_swap_aouthdr_out (abfd, in, out)
aouthdr_in->text_start &= 0xffffffff;
#endif
}
+
if (aouthdr_in->dsize)
{
aouthdr_in->data_start -= ib;
@@ -621,6 +603,7 @@ _bfd_XXi_swap_aouthdr_out (abfd, in, out)
aouthdr_in->data_start &= 0xffffffff;
#endif
}
+
if (aouthdr_in->entry)
{
aouthdr_in->entry -= ib;
@@ -691,79 +674,67 @@ _bfd_XXi_swap_aouthdr_out (abfd, in, out)
}
extra->SizeOfHeaders = abfd->sections->filepos;
- bfd_h_put_16 (abfd, aouthdr_in->magic, (bfd_byte *) aouthdr_out->standard.magic);
+ H_PUT_16 (abfd, aouthdr_in->magic, aouthdr_out->standard.magic);
#define LINKER_VERSION 256 /* That is, 2.56 */
/* This piece of magic sets the "linker version" field to
LINKER_VERSION. */
- bfd_h_put_16 (abfd,
- LINKER_VERSION / 100 + (LINKER_VERSION % 100) * 256,
- (bfd_byte *) aouthdr_out->standard.vstamp);
-
- PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, (bfd_byte *) aouthdr_out->standard.tsize);
- PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, (bfd_byte *) aouthdr_out->standard.dsize);
- PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, (bfd_byte *) aouthdr_out->standard.bsize);
- PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, (bfd_byte *) aouthdr_out->standard.entry);
+ H_PUT_16 (abfd, (LINKER_VERSION / 100 + (LINKER_VERSION % 100) * 256),
+ aouthdr_out->standard.vstamp);
+
+ PUT_AOUTHDR_TSIZE (abfd, aouthdr_in->tsize, aouthdr_out->standard.tsize);
+ PUT_AOUTHDR_DSIZE (abfd, aouthdr_in->dsize, aouthdr_out->standard.dsize);
+ PUT_AOUTHDR_BSIZE (abfd, aouthdr_in->bsize, aouthdr_out->standard.bsize);
+ PUT_AOUTHDR_ENTRY (abfd, aouthdr_in->entry, aouthdr_out->standard.entry);
PUT_AOUTHDR_TEXT_START (abfd, aouthdr_in->text_start,
- (bfd_byte *) aouthdr_out->standard.text_start);
+ aouthdr_out->standard.text_start);
#ifndef COFF_WITH_pep
/* PE32+ does not have data_start member! */
PUT_AOUTHDR_DATA_START (abfd, aouthdr_in->data_start,
- (bfd_byte *) aouthdr_out->standard.data_start);
+ aouthdr_out->standard.data_start);
#endif
- PUT_OPTHDR_IMAGE_BASE (abfd, extra->ImageBase,
- (bfd_byte *) aouthdr_out->ImageBase);
- bfd_h_put_32 (abfd, extra->SectionAlignment,
- (bfd_byte *) aouthdr_out->SectionAlignment);
- bfd_h_put_32 (abfd, extra->FileAlignment,
- (bfd_byte *) aouthdr_out->FileAlignment);
- bfd_h_put_16 (abfd, extra->MajorOperatingSystemVersion,
- (bfd_byte *) aouthdr_out->MajorOperatingSystemVersion);
- bfd_h_put_16 (abfd, extra->MinorOperatingSystemVersion,
- (bfd_byte *) aouthdr_out->MinorOperatingSystemVersion);
- bfd_h_put_16 (abfd, extra->MajorImageVersion,
- (bfd_byte *) aouthdr_out->MajorImageVersion);
- bfd_h_put_16 (abfd, extra->MinorImageVersion,
- (bfd_byte *) aouthdr_out->MinorImageVersion);
- bfd_h_put_16 (abfd, extra->MajorSubsystemVersion,
- (bfd_byte *) aouthdr_out->MajorSubsystemVersion);
- bfd_h_put_16 (abfd, extra->MinorSubsystemVersion,
- (bfd_byte *) aouthdr_out->MinorSubsystemVersion);
- bfd_h_put_32 (abfd, extra->Reserved1,
- (bfd_byte *) aouthdr_out->Reserved1);
- bfd_h_put_32 (abfd, extra->SizeOfImage,
- (bfd_byte *) aouthdr_out->SizeOfImage);
- bfd_h_put_32 (abfd, extra->SizeOfHeaders,
- (bfd_byte *) aouthdr_out->SizeOfHeaders);
- bfd_h_put_32 (abfd, extra->CheckSum,
- (bfd_byte *) aouthdr_out->CheckSum);
- bfd_h_put_16 (abfd, extra->Subsystem,
- (bfd_byte *) aouthdr_out->Subsystem);
- bfd_h_put_16 (abfd, extra->DllCharacteristics,
- (bfd_byte *) aouthdr_out->DllCharacteristics);
+ PUT_OPTHDR_IMAGE_BASE (abfd, extra->ImageBase, aouthdr_out->ImageBase);
+ H_PUT_32 (abfd, extra->SectionAlignment, aouthdr_out->SectionAlignment);
+ H_PUT_32 (abfd, extra->FileAlignment, aouthdr_out->FileAlignment);
+ H_PUT_16 (abfd, extra->MajorOperatingSystemVersion,
+ aouthdr_out->MajorOperatingSystemVersion);
+ H_PUT_16 (abfd, extra->MinorOperatingSystemVersion,
+ aouthdr_out->MinorOperatingSystemVersion);
+ H_PUT_16 (abfd, extra->MajorImageVersion, aouthdr_out->MajorImageVersion);
+ H_PUT_16 (abfd, extra->MinorImageVersion, aouthdr_out->MinorImageVersion);
+ H_PUT_16 (abfd, extra->MajorSubsystemVersion,
+ aouthdr_out->MajorSubsystemVersion);
+ H_PUT_16 (abfd, extra->MinorSubsystemVersion,
+ aouthdr_out->MinorSubsystemVersion);
+ H_PUT_32 (abfd, extra->Reserved1, aouthdr_out->Reserved1);
+ H_PUT_32 (abfd, extra->SizeOfImage, aouthdr_out->SizeOfImage);
+ H_PUT_32 (abfd, extra->SizeOfHeaders, aouthdr_out->SizeOfHeaders);
+ H_PUT_32 (abfd, extra->CheckSum, aouthdr_out->CheckSum);
+ H_PUT_16 (abfd, extra->Subsystem, aouthdr_out->Subsystem);
+ H_PUT_16 (abfd, extra->DllCharacteristics, aouthdr_out->DllCharacteristics);
PUT_OPTHDR_SIZE_OF_STACK_RESERVE (abfd, extra->SizeOfStackReserve,
- (bfd_byte *) aouthdr_out->SizeOfStackReserve);
+ aouthdr_out->SizeOfStackReserve);
PUT_OPTHDR_SIZE_OF_STACK_COMMIT (abfd, extra->SizeOfStackCommit,
- (bfd_byte *) aouthdr_out->SizeOfStackCommit);
+ aouthdr_out->SizeOfStackCommit);
PUT_OPTHDR_SIZE_OF_HEAP_RESERVE (abfd, extra->SizeOfHeapReserve,
- (bfd_byte *) aouthdr_out->SizeOfHeapReserve);
+ aouthdr_out->SizeOfHeapReserve);
PUT_OPTHDR_SIZE_OF_HEAP_COMMIT (abfd, extra->SizeOfHeapCommit,
- (bfd_byte *) aouthdr_out->SizeOfHeapCommit);
- bfd_h_put_32 (abfd, extra->LoaderFlags,
- (bfd_byte *) aouthdr_out->LoaderFlags);
- bfd_h_put_32 (abfd, extra->NumberOfRvaAndSizes,
- (bfd_byte *) aouthdr_out->NumberOfRvaAndSizes);
+ aouthdr_out->SizeOfHeapCommit);
+ H_PUT_32 (abfd, extra->LoaderFlags, aouthdr_out->LoaderFlags);
+ H_PUT_32 (abfd, extra->NumberOfRvaAndSizes,
+ aouthdr_out->NumberOfRvaAndSizes);
{
int idx;
+
for (idx = 0; idx < 16; idx++)
{
- bfd_h_put_32 (abfd, extra->DataDirectory[idx].VirtualAddress,
- (bfd_byte *) aouthdr_out->DataDirectory[idx][0]);
- bfd_h_put_32 (abfd, extra->DataDirectory[idx].Size,
- (bfd_byte *) aouthdr_out->DataDirectory[idx][1]);
+ H_PUT_32 (abfd, extra->DataDirectory[idx].VirtualAddress,
+ aouthdr_out->DataDirectory[idx][0]);
+ H_PUT_32 (abfd, extra->DataDirectory[idx].Size,
+ aouthdr_out->DataDirectory[idx][1]);
}
}
@@ -832,63 +803,51 @@ _bfd_XXi_only_swap_filehdr_out (abfd, in, out)
filehdr_in->pe.dos_message[15] = 0x0;
filehdr_in->pe.nt_signature = NT_SIGNATURE;
- bfd_h_put_16 (abfd, filehdr_in->f_magic, (bfd_byte *) filehdr_out->f_magic);
- bfd_h_put_16 (abfd, filehdr_in->f_nscns, (bfd_byte *) filehdr_out->f_nscns);
+ H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
+ H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
- bfd_h_put_32 (abfd, time (0), (bfd_byte *) filehdr_out->f_timdat);
- PUT_FILEHDR_SYMPTR (abfd, (bfd_vma) filehdr_in->f_symptr,
- (bfd_byte *) filehdr_out->f_symptr);
- bfd_h_put_32 (abfd, filehdr_in->f_nsyms, (bfd_byte *) filehdr_out->f_nsyms);
- bfd_h_put_16 (abfd, filehdr_in->f_opthdr, (bfd_byte *) filehdr_out->f_opthdr);
- bfd_h_put_16 (abfd, filehdr_in->f_flags, (bfd_byte *) filehdr_out->f_flags);
+ H_PUT_32 (abfd, time (0), filehdr_out->f_timdat);
+ PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr,
+ filehdr_out->f_symptr);
+ H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
+ H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
+ H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
- /* put in extra dos header stuff. This data remains essentially
+ /* Put in extra dos header stuff. This data remains essentially
constant, it just has to be tacked on to the beginning of all exes
- for NT */
- bfd_h_put_16 (abfd, filehdr_in->pe.e_magic, (bfd_byte *) filehdr_out->e_magic);
- bfd_h_put_16 (abfd, filehdr_in->pe.e_cblp, (bfd_byte *) filehdr_out->e_cblp);
- bfd_h_put_16 (abfd, filehdr_in->pe.e_cp, (bfd_byte *) filehdr_out->e_cp);
- bfd_h_put_16 (abfd, filehdr_in->pe.e_crlc, (bfd_byte *) filehdr_out->e_crlc);
- bfd_h_put_16 (abfd, filehdr_in->pe.e_cparhdr,
- (bfd_byte *) filehdr_out->e_cparhdr);
- bfd_h_put_16 (abfd, filehdr_in->pe.e_minalloc,
- (bfd_byte *) filehdr_out->e_minalloc);
- bfd_h_put_16 (abfd, filehdr_in->pe.e_maxalloc,
- (bfd_byte *) filehdr_out->e_maxalloc);
- bfd_h_put_16 (abfd, filehdr_in->pe.e_ss, (bfd_byte *) filehdr_out->e_ss);
- bfd_h_put_16 (abfd, filehdr_in->pe.e_sp, (bfd_byte *) filehdr_out->e_sp);
- bfd_h_put_16 (abfd, filehdr_in->pe.e_csum, (bfd_byte *) filehdr_out->e_csum);
- bfd_h_put_16 (abfd, filehdr_in->pe.e_ip, (bfd_byte *) filehdr_out->e_ip);
- bfd_h_put_16 (abfd, filehdr_in->pe.e_cs, (bfd_byte *) filehdr_out->e_cs);
- bfd_h_put_16 (abfd, filehdr_in->pe.e_lfarlc, (bfd_byte *) filehdr_out->e_lfarlc);
- bfd_h_put_16 (abfd, filehdr_in->pe.e_ovno, (bfd_byte *) filehdr_out->e_ovno);
- {
- int idx;
- for (idx = 0; idx < 4; idx++)
- bfd_h_put_16 (abfd, filehdr_in->pe.e_res[idx],
- (bfd_byte *) filehdr_out->e_res[idx]);
- }
- bfd_h_put_16 (abfd, filehdr_in->pe.e_oemid, (bfd_byte *) filehdr_out->e_oemid);
- bfd_h_put_16 (abfd, filehdr_in->pe.e_oeminfo,
- (bfd_byte *) filehdr_out->e_oeminfo);
- {
- int idx;
- for (idx = 0; idx < 10; idx++)
- bfd_h_put_16 (abfd, filehdr_in->pe.e_res2[idx],
- (bfd_byte *) filehdr_out->e_res2[idx]);
- }
- bfd_h_put_32 (abfd, filehdr_in->pe.e_lfanew, (bfd_byte *) filehdr_out->e_lfanew);
+ for NT. */
+ H_PUT_16 (abfd, filehdr_in->pe.e_magic, filehdr_out->e_magic);
+ H_PUT_16 (abfd, filehdr_in->pe.e_cblp, filehdr_out->e_cblp);
+ H_PUT_16 (abfd, filehdr_in->pe.e_cp, filehdr_out->e_cp);
+ H_PUT_16 (abfd, filehdr_in->pe.e_crlc, filehdr_out->e_crlc);
+ H_PUT_16 (abfd, filehdr_in->pe.e_cparhdr, filehdr_out->e_cparhdr);
+ H_PUT_16 (abfd, filehdr_in->pe.e_minalloc, filehdr_out->e_minalloc);
+ H_PUT_16 (abfd, filehdr_in->pe.e_maxalloc, filehdr_out->e_maxalloc);
+ H_PUT_16 (abfd, filehdr_in->pe.e_ss, filehdr_out->e_ss);
+ H_PUT_16 (abfd, filehdr_in->pe.e_sp, filehdr_out->e_sp);
+ H_PUT_16 (abfd, filehdr_in->pe.e_csum, filehdr_out->e_csum);
+ H_PUT_16 (abfd, filehdr_in->pe.e_ip, filehdr_out->e_ip);
+ H_PUT_16 (abfd, filehdr_in->pe.e_cs, filehdr_out->e_cs);
+ H_PUT_16 (abfd, filehdr_in->pe.e_lfarlc, filehdr_out->e_lfarlc);
+ H_PUT_16 (abfd, filehdr_in->pe.e_ovno, filehdr_out->e_ovno);
- {
- int idx;
- for (idx = 0; idx < 16; idx++)
- bfd_h_put_32 (abfd, filehdr_in->pe.dos_message[idx],
- (bfd_byte *) filehdr_out->dos_message[idx]);
- }
+ for (idx = 0; idx < 4; idx++)
+ H_PUT_16 (abfd, filehdr_in->pe.e_res[idx], filehdr_out->e_res[idx]);
+
+ H_PUT_16 (abfd, filehdr_in->pe.e_oemid, filehdr_out->e_oemid);
+ H_PUT_16 (abfd, filehdr_in->pe.e_oeminfo, filehdr_out->e_oeminfo);
+
+ for (idx = 0; idx < 10; idx++)
+ H_PUT_16 (abfd, filehdr_in->pe.e_res2[idx], filehdr_out->e_res2[idx]);
+
+ H_PUT_32 (abfd, filehdr_in->pe.e_lfanew, filehdr_out->e_lfanew);
+
+ for (idx = 0; idx < 16; idx++)
+ H_PUT_32 (abfd, filehdr_in->pe.dos_message[idx],
+ filehdr_out->dos_message[idx]);
/* Also put in the NT signature. */
- bfd_h_put_32 (abfd, filehdr_in->pe.nt_signature,
- (bfd_byte *) filehdr_out->nt_signature);
+ H_PUT_32 (abfd, filehdr_in->pe.nt_signature, filehdr_out->nt_signature);
return FILHSZ;
}
@@ -902,14 +861,13 @@ _bfd_XX_only_swap_filehdr_out (abfd, in, out)
struct internal_filehdr *filehdr_in = (struct internal_filehdr *) in;
FILHDR *filehdr_out = (FILHDR *) out;
- bfd_h_put_16 (abfd, filehdr_in->f_magic, (bfd_byte *) filehdr_out->f_magic);
- bfd_h_put_16 (abfd, filehdr_in->f_nscns, (bfd_byte *) filehdr_out->f_nscns);
- bfd_h_put_32 (abfd, filehdr_in->f_timdat, (bfd_byte *) filehdr_out->f_timdat);
- PUT_FILEHDR_SYMPTR (abfd, (bfd_vma) filehdr_in->f_symptr,
- (bfd_byte *) filehdr_out->f_symptr);
- bfd_h_put_32 (abfd, filehdr_in->f_nsyms, (bfd_byte *) filehdr_out->f_nsyms);
- bfd_h_put_16 (abfd, filehdr_in->f_opthdr, (bfd_byte *) filehdr_out->f_opthdr);
- bfd_h_put_16 (abfd, filehdr_in->f_flags, (bfd_byte *) filehdr_out->f_flags);
+ H_PUT_16 (abfd, filehdr_in->f_magic, filehdr_out->f_magic);
+ H_PUT_16 (abfd, filehdr_in->f_nscns, filehdr_out->f_nscns);
+ H_PUT_32 (abfd, filehdr_in->f_timdat, filehdr_out->f_timdat);
+ PUT_FILEHDR_SYMPTR (abfd, filehdr_in->f_symptr, filehdr_out->f_symptr);
+ H_PUT_32 (abfd, filehdr_in->f_nsyms, filehdr_out->f_nsyms);
+ H_PUT_16 (abfd, filehdr_in->f_opthdr, filehdr_out->f_opthdr);
+ H_PUT_16 (abfd, filehdr_in->f_flags, filehdr_out->f_flags);
return FILHSZ;
}
@@ -932,12 +890,11 @@ _bfd_XXi_swap_scnhdr_out (abfd, in, out)
((scnhdr_int->s_vaddr
- pe_data (abfd)->pe_opthdr.ImageBase)
& 0xffffffff),
- (bfd_byte *) scnhdr_ext->s_vaddr);
+ scnhdr_ext->s_vaddr);
/* NT wants the size data to be rounded up to the next
NT_FILE_ALIGNMENT, but zero if it has no content (as in .bss,
sometimes). */
-
if ((scnhdr_int->s_flags & IMAGE_SCN_CNT_UNINITIALIZED_DATA) != 0)
{
ps = scnhdr_int->s_size;
@@ -950,17 +907,17 @@ _bfd_XXi_swap_scnhdr_out (abfd, in, out)
}
PUT_SCNHDR_SIZE (abfd, ss,
- (bfd_byte *) scnhdr_ext->s_size);
+ scnhdr_ext->s_size);
/* s_paddr in PE is really the virtual size. */
- PUT_SCNHDR_PADDR (abfd, ps, (bfd_byte *) scnhdr_ext->s_paddr);
+ PUT_SCNHDR_PADDR (abfd, ps, scnhdr_ext->s_paddr);
PUT_SCNHDR_SCNPTR (abfd, scnhdr_int->s_scnptr,
- (bfd_byte *) scnhdr_ext->s_scnptr);
+ scnhdr_ext->s_scnptr);
PUT_SCNHDR_RELPTR (abfd, scnhdr_int->s_relptr,
- (bfd_byte *) scnhdr_ext->s_relptr);
+ scnhdr_ext->s_relptr);
PUT_SCNHDR_LNNOPTR (abfd, scnhdr_int->s_lnnoptr,
- (bfd_byte *) scnhdr_ext->s_lnnoptr);
+ scnhdr_ext->s_lnnoptr);
/* Extra flags must be set when dealing with NT. All sections should also
have the IMAGE_SCN_MEM_READ (0x40000000) flag set. In addition, the
@@ -978,7 +935,8 @@ _bfd_XXi_swap_scnhdr_out (abfd, in, out)
{
int flags = scnhdr_int->s_flags;
- bfd_h_put_32 (abfd, flags, (bfd_byte *) scnhdr_ext->s_flags);
+
+ H_PUT_32 (abfd, flags, scnhdr_ext->s_flags);
}
if (coff_data (abfd)->link_info
@@ -994,41 +952,37 @@ _bfd_XXi_swap_scnhdr_out (abfd, in, out)
executables, but the 17-th bit has been observed to be there.
Overflow is not an issue: a 4G-line program will overflow a
bunch of other fields long before this! */
- bfd_h_put_16 (abfd, scnhdr_int->s_nlnno & 0xffff,
- (bfd_byte *) scnhdr_ext->s_nlnno);
- bfd_h_put_16 (abfd, scnhdr_int->s_nlnno >> 16,
- (bfd_byte *) scnhdr_ext->s_nreloc);
+ H_PUT_16 (abfd, (scnhdr_int->s_nlnno & 0xffff), scnhdr_ext->s_nlnno);
+ H_PUT_16 (abfd, (scnhdr_int->s_nlnno >> 16), scnhdr_ext->s_nreloc);
}
else
{
if (scnhdr_int->s_nlnno <= 0xffff)
- bfd_h_put_16 (abfd, scnhdr_int->s_nlnno,
- (bfd_byte *) scnhdr_ext->s_nlnno);
+ H_PUT_16 (abfd, scnhdr_int->s_nlnno, scnhdr_ext->s_nlnno);
else
{
(*_bfd_error_handler) (_("%s: line number overflow: 0x%lx > 0xffff"),
bfd_get_filename (abfd),
scnhdr_int->s_nlnno);
bfd_set_error (bfd_error_file_truncated);
- bfd_h_put_16 (abfd, 0xffff, (bfd_byte *) scnhdr_ext->s_nlnno);
+ H_PUT_16 (abfd, 0xffff, scnhdr_ext->s_nlnno);
ret = 0;
}
+
if (scnhdr_int->s_nreloc <= 0xffff)
- bfd_h_put_16 (abfd, scnhdr_int->s_nreloc,
- (bfd_byte *) scnhdr_ext->s_nreloc);
+ H_PUT_16 (abfd, scnhdr_int->s_nreloc, scnhdr_ext->s_nreloc);
else
{
- /* PE can deal with large #s of relocs, but not here */
- bfd_h_put_16 (abfd, 0xffff, (bfd_byte *) scnhdr_ext->s_nreloc);
+ /* PE can deal with large #s of relocs, but not here. */
+ H_PUT_16 (abfd, 0xffff, scnhdr_ext->s_nreloc);
scnhdr_int->s_flags |= IMAGE_SCN_LNK_NRELOC_OVFL;
- bfd_h_put_32 (abfd, scnhdr_int->s_flags,
- (bfd_byte *) scnhdr_ext->s_flags);
+ H_PUT_32 (abfd, scnhdr_int->s_flags, scnhdr_ext->s_flags);
#if 0
(*_bfd_error_handler) (_("%s: reloc overflow 1: 0x%lx > 0xffff"),
bfd_get_filename (abfd),
scnhdr_int->s_nreloc);
bfd_set_error (bfd_error_file_truncated);
- bfd_h_put_16 (abfd, 0xffff, (bfd_byte *) scnhdr_ext->s_nreloc);
+ H_PUT_16 (abfd, 0xffff, scnhdr_ext->s_nreloc);
ret = 0;
#endif
}
@@ -1036,26 +990,26 @@ _bfd_XXi_swap_scnhdr_out (abfd, in, out)
return ret;
}
-static char * dir_names[IMAGE_NUMBEROF_DIRECTORY_ENTRIES] = {
- N_("Export Directory [.edata (or where ever we found it)]"),
- N_("Import Directory [parts of .idata]"),
- N_("Resource Directory [.rsrc]"),
- N_("Exception Directory [.pdata]"),
- N_("Security Directory"),
- N_("Base Relocation Directory [.reloc]"),
- N_("Debug Directory"),
- N_("Description Directory"),
- N_("Special Directory"),
- N_("Thread Storage Directory [.tls]"),
- N_("Load Configuration Directory"),
- N_("Bound Import Directory"),
- N_("Import Address Table Directory"),
- N_("Delay Import Directory"),
- N_("Reserved"),
- N_("Reserved")
-};
-
-/**********************************************************************/
+static char * dir_names[IMAGE_NUMBEROF_DIRECTORY_ENTRIES] =
+ {
+ N_("Export Directory [.edata (or where ever we found it)]"),
+ N_("Import Directory [parts of .idata]"),
+ N_("Resource Directory [.rsrc]"),
+ N_("Exception Directory [.pdata]"),
+ N_("Security Directory"),
+ N_("Base Relocation Directory [.reloc]"),
+ N_("Debug Directory"),
+ N_("Description Directory"),
+ N_("Special Directory"),
+ N_("Thread Storage Directory [.tls]"),
+ N_("Load Configuration Directory"),
+ N_("Bound Import Directory"),
+ N_("Import Address Table Directory"),
+ N_("Delay Import Directory"),
+ N_("Reserved"),
+ N_("Reserved")
+ };
+
#ifdef POWERPC_LE_PE
/* The code for the PPC really falls in the "architecture dependent"
category. However, it's not clear that anyone will ever care, so
@@ -1064,7 +1018,6 @@ static char * dir_names[IMAGE_NUMBEROF_DIRECTORY_ENTRIES] = {
PPC- specific code. */
#endif
-/**********************************************************************/
static boolean
pe_print_idata (abfd, vfile)
bfd *abfd;
@@ -1082,6 +1035,7 @@ pe_print_idata (abfd, vfile)
bfd_size_type datasize = 0;
bfd_size_type dataoff;
bfd_size_type i;
+ bfd_size_type amt;
int onaline = 20;
pe_data_type *pe = pe_data (abfd);
@@ -1143,15 +1097,13 @@ pe_print_idata (abfd, vfile)
bfd_byte *data = 0;
int offset;
- data = (bfd_byte *) bfd_malloc ((size_t) bfd_section_size (abfd,
- rel_section));
- if (data == NULL && bfd_section_size (abfd, rel_section) != 0)
+ amt = bfd_section_size (abfd, rel_section);
+ data = (bfd_byte *) bfd_malloc (amt);
+ if (data == NULL && amt != 0)
return false;
- bfd_get_section_contents (abfd,
- rel_section,
- (PTR) data, 0,
- bfd_section_size (abfd, rel_section));
+ bfd_get_section_contents (abfd, rel_section, (PTR) data, (bfd_vma) 0,
+ amt);
offset = abfd->start_address - rel_section->vma;
@@ -1181,13 +1133,13 @@ pe_print_idata (abfd, vfile)
fprintf (file,
_(" Table Stamp Chain Name Thunk\n"));
- data = (bfd_byte *) bfd_malloc (dataoff + datasize);
+ amt = dataoff + datasize;
+ data = (bfd_byte *) bfd_malloc (amt);
if (data == NULL)
return false;
/* Read the whole section. Some of the fields might be before dataoff. */
- if (! bfd_get_section_contents (abfd, section, (PTR) data,
- 0, dataoff + datasize))
+ if (! bfd_get_section_contents (abfd, section, (PTR) data, (bfd_vma) 0, amt))
return false;
adj = section->vma - extra->ImageBase;
@@ -1205,13 +1157,11 @@ pe_print_idata (abfd, vfile)
/* print (i + extra->DataDirectory[1].VirtualAddress) */
fprintf (file, " %08lx\t", (unsigned long) (i + adj + dataoff));
-
+#if 0
if (i + 20 > datasize)
- {
- /* Check stuff. */
- ;
- }
-
+ /* Check stuff. */
+ ;
+#endif
hint_addr = bfd_get_32 (abfd, data + i + dataoff);
time_stamp = bfd_get_32 (abfd, data + i + 4 + dataoff);
forward_chain = bfd_get_32 (abfd, data + i + 8 + dataoff);
@@ -1299,11 +1249,10 @@ pe_print_idata (abfd, vfile)
fprintf (file, _("\tvma: Hint/Ord Member-Name\n"));
differ = 1;
}
+
if (iat_member == 0)
- {
- fprintf (file,
- _("\t>>> Ran out of IAT members!\n"));
- }
+ fprintf (file,
+ _("\t>>> Ran out of IAT members!\n"));
else
{
ordinal = bfd_get_16 (abfd, data + iat_member - adj);
@@ -1318,15 +1267,13 @@ pe_print_idata (abfd, vfile)
if (hint_addr != 0 && hint_member == 0)
break;
}
+
if (differ == 0)
- {
- fprintf (file,
- _("\tThe Import Address Table is identical\n"));
- }
+ fprintf (file,
+ _("\tThe Import Address Table is identical\n"));
}
fprintf (file, "\n");
-
}
free (data);
@@ -1342,24 +1289,23 @@ pe_print_edata (abfd, vfile)
FILE *file = (FILE *) vfile;
bfd_byte *data;
asection *section;
-
bfd_size_type datasize = 0;
bfd_size_type dataoff;
bfd_size_type i;
-
bfd_signed_vma adj;
- struct EDT_type {
- long export_flags; /* reserved - should be zero */
+ struct EDT_type
+ {
+ long export_flags; /* reserved - should be zero */
long time_stamp;
short major_ver;
short minor_ver;
- bfd_vma name; /* rva - relative to image base */
- long base; /* ordinal base */
- unsigned long num_functions; /* Number in the export address table */
- unsigned long num_names; /* Number in the name pointer table */
- bfd_vma eat_addr; /* rva to the export address table */
- bfd_vma npt_addr; /* rva to the Export Name Pointer Table */
- bfd_vma ot_addr; /* rva to the Ordinal Table */
+ bfd_vma name; /* rva - relative to image base */
+ long base; /* ordinal base */
+ unsigned long num_functions;/* Number in the export address table */
+ unsigned long num_names; /* Number in the name pointer table */
+ bfd_vma eat_addr; /* rva to the export address table */
+ bfd_vma npt_addr; /* rva to the Export Name Pointer Table */
+ bfd_vma ot_addr; /* rva to the Ordinal Table */
} edt;
pe_data_type *pe = pe_data (abfd);
@@ -1384,9 +1330,11 @@ pe_print_edata (abfd, vfile)
else
{
addr += extra->ImageBase;
+
for (section = abfd->sections; section != NULL; section = section->next)
{
datasize = bfd_section_size (abfd, section);
+
if (addr >= section->vma && addr < section->vma + datasize)
break;
}
@@ -1409,8 +1357,8 @@ pe_print_edata (abfd, vfile)
if (data == NULL)
return false;
- if (! bfd_get_section_contents (abfd, section, (PTR) data, dataoff,
- datasize))
+ if (! bfd_get_section_contents (abfd, section, (PTR) data,
+ (file_ptr) dataoff, datasize))
return false;
/* Go get Export Directory Table. */
@@ -1428,7 +1376,7 @@ pe_print_edata (abfd, vfile)
adj = section->vma - extra->ImageBase + dataoff;
- /* Dump the EDT first first */
+ /* Dump the EDT first. */
fprintf (file,
_("\nThe Export Tables (interpreted %s section contents)\n\n"),
section->name);
@@ -1482,7 +1430,8 @@ pe_print_edata (abfd, vfile)
/* The next table to find is the Export Address Table. It's basically
a list of pointers that either locate a function in this dll, or
forward the call to another dll. Something like:
- typedef union {
+ typedef union
+ {
long export_rva;
long forwarder_rva;
} export_address_table_entry;
@@ -1596,18 +1545,16 @@ pe_print_pdata (abfd, vfile)
_(" \t\tAddress Address Handler Data Address Mask\n"));
#endif
- if (bfd_section_size (abfd, section) == 0)
+ datasize = bfd_section_size (abfd, section);
+ if (datasize == 0)
return true;
- data = (bfd_byte *) bfd_malloc ((size_t) bfd_section_size (abfd, section));
- datasize = bfd_section_size (abfd, section);
+ data = (bfd_byte *) bfd_malloc (datasize);
if (data == NULL && datasize != 0)
return false;
- bfd_get_section_contents (abfd,
- section,
- (PTR) data, 0,
- bfd_section_size (abfd, section));
+ bfd_get_section_contents (abfd, section, (PTR) data, (bfd_vma) 0,
+ datasize);
start = 0;
@@ -1631,10 +1578,8 @@ pe_print_pdata (abfd, vfile)
if (begin_addr == 0 && end_addr == 0 && eh_handler == 0
&& eh_data == 0 && prolog_end_addr == 0)
- {
- /* We are probably into the padding of the section now. */
- break;
- }
+ /* We are probably into the padding of the section now. */
+ break;
em_data = ((eh_handler & 0x1) << 2) | (prolog_end_addr & 0x3);
eh_handler &= ~(bfd_vma) 0x3;
@@ -1687,21 +1632,22 @@ pe_print_pdata (abfd, vfile)
}
#define IMAGE_REL_BASED_HIGHADJ 4
-static const char * const tbl[] = {
- "ABSOLUTE",
- "HIGH",
- "LOW",
- "HIGHLOW",
- "HIGHADJ",
- "MIPS_JMPADDR",
- "SECTION",
- "REL32",
- "RESERVED1",
- "MIPS_JMPADDR16",
- "DIR64",
- "HIGH3ADJ"
- "UNKNOWN", /* MUST be last */
-};
+static const char * const tbl[] =
+ {
+ "ABSOLUTE",
+ "HIGH",
+ "LOW",
+ "HIGHLOW",
+ "HIGHADJ",
+ "MIPS_JMPADDR",
+ "SECTION",
+ "REL32",
+ "RESERVED1",
+ "MIPS_JMPADDR16",
+ "DIR64",
+ "HIGH3ADJ"
+ "UNKNOWN", /* MUST be last */
+ };
static boolean
pe_print_reloc (abfd, vfile)
@@ -1711,7 +1657,7 @@ pe_print_reloc (abfd, vfile)
FILE *file = (FILE *) vfile;
bfd_byte *data = 0;
asection *section = bfd_get_section_by_name (abfd, ".reloc");
- bfd_size_type datasize = 0;
+ bfd_size_type datasize;
bfd_size_type i;
bfd_size_type start, stop;
@@ -1724,15 +1670,13 @@ pe_print_reloc (abfd, vfile)
fprintf (file,
_("\n\nPE File Base Relocations (interpreted .reloc section contents)\n"));
- data = (bfd_byte *) bfd_malloc ((size_t) bfd_section_size (abfd, section));
datasize = bfd_section_size (abfd, section);
+ data = (bfd_byte *) bfd_malloc (datasize);
if (data == NULL && datasize != 0)
return false;
- bfd_get_section_contents (abfd,
- section,
- (PTR) data, 0,
- bfd_section_size (abfd, section));
+ bfd_get_section_contents (abfd, section, (PTR) data, (bfd_vma) 0,
+ datasize);
start = 0;
@@ -1745,16 +1689,13 @@ pe_print_reloc (abfd, vfile)
long number, size;
/* The .reloc section is a sequence of blocks, with a header consisting
- of two 32 bit quantities, followed by a number of 16 bit entries */
-
+ of two 32 bit quantities, followed by a number of 16 bit entries. */
virtual_address = bfd_get_32 (abfd, data+i);
size = bfd_get_32 (abfd, data+i+4);
number = (size - 8) / 2;
if (size == 0)
- {
- break;
- }
+ break;
fprintf (file,
_("\nVirtual Address: %08lx Chunk size %ld (0x%lx) Number of fixups %ld\n"),
@@ -1785,6 +1726,7 @@ pe_print_reloc (abfd, vfile)
fprintf (file, "\n");
}
+
i += size;
}
@@ -1845,6 +1787,7 @@ _bfd_XX_print_private_bfd_data_common (abfd, vfile)
fprintf (file, "SizeOfImage\t\t%08lx\n", i->SizeOfImage);
fprintf (file, "SizeOfHeaders\t\t%08lx\n", i->SizeOfHeaders);
fprintf (file, "CheckSum\t\t%08lx\n", i->CheckSum);
+
switch (i->Subsystem)
{
case IMAGE_SUBSYSTEM_UNKNOWN:
@@ -1875,6 +1818,7 @@ _bfd_XX_print_private_bfd_data_common (abfd, vfile)
subsystem_name = "EFI runtime driver";
break;
}
+
fprintf (file, "Subsystem\t\t%08x", i->Subsystem);
if (subsystem_name)
fprintf (file, "\t(%s)", subsystem_name);
@@ -1922,7 +1866,7 @@ _bfd_XX_bfd_copy_private_bfd_data_common (ibfd, obfd)
pe_data (obfd)->pe_opthdr = pe_data (ibfd)->pe_opthdr;
pe_data (obfd)->dll = pe_data (ibfd)->dll;
- /* for strip: if we removed .reloc, we'll make a real mess of things
+ /* For strip: if we removed .reloc, we'll make a real mess of things
if we don't remove this entry as well. */
if (! pe_data (obfd)->has_reloc_section)
{
@@ -1933,6 +1877,7 @@ _bfd_XX_bfd_copy_private_bfd_data_common (ibfd, obfd)
}
/* Copy private section data. */
+
boolean
_bfd_XX_bfd_copy_private_section_data (ibfd, isec, obfd, osec)
bfd *ibfd;
@@ -1949,18 +1894,20 @@ _bfd_XX_bfd_copy_private_section_data (ibfd, isec, obfd, osec)
{
if (coff_section_data (obfd, osec) == NULL)
{
- osec->used_by_bfd =
- (PTR) bfd_zalloc (obfd, sizeof (struct coff_section_tdata));
+ bfd_size_type amt = sizeof (struct coff_section_tdata);
+ osec->used_by_bfd = (PTR) bfd_zalloc (obfd, amt);
if (osec->used_by_bfd == NULL)
return false;
}
+
if (pei_section_data (obfd, osec) == NULL)
{
- coff_section_data (obfd, osec)->tdata =
- (PTR) bfd_zalloc (obfd, sizeof (struct pei_section_tdata));
+ bfd_size_type amt = sizeof (struct pei_section_tdata);
+ coff_section_data (obfd, osec)->tdata = (PTR) bfd_zalloc (obfd, amt);
if (coff_section_data (obfd, osec)->tdata == NULL)
return false;
}
+
pei_section_data (obfd, osec)->virt_size =
pei_section_data (ibfd, isec)->virt_size;
pei_section_data (obfd, osec)->pe_flags =
diff --git a/contrib/binutils/bfd/po/Make-in b/contrib/binutils/bfd/po/Make-in
index 2414748..a288585 100644
--- a/contrib/binutils/bfd/po/Make-in
+++ b/contrib/binutils/bfd/po/Make-in
@@ -205,12 +205,12 @@ clean: mostlyclean
distclean: clean
rm -f Makefile Makefile.in *.mo *.msg *.cat *.cat.m
- rm -f SRC-POTFILES BLD-POTFILES SRC-POTFILES.in BLD-POTFILES.in
+ rm -f SRC-POTFILES BLD-POTFILES
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)
+ rm -f $(GMOFILES) SRC-POTFILES.in BLD-POTFILES.in
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
dist distdir: update-po $(DISTFILES)
diff --git a/contrib/binutils/bfd/po/SRC-POTFILES.in b/contrib/binutils/bfd/po/SRC-POTFILES.in
index ab40ed1..0ef9b4a 100644
--- a/contrib/binutils/bfd/po/SRC-POTFILES.in
+++ b/contrib/binutils/bfd/po/SRC-POTFILES.in
@@ -12,6 +12,7 @@ aout64.c
aoutf1.h
aoutx.h
archive.c
+archive64.c
archures.c
armnetbsd.c
bfd.c
@@ -36,7 +37,6 @@ coff-i960.c
coff-m68k.c
coff-m88k.c
coff-mips.c
-coff-pmac.c
coff-rs6000.c
coff-sh.c
coff-sparc.c
@@ -81,10 +81,14 @@ cpu-m68k.c
cpu-m88k.c
cpu-mcore.c
cpu-mips.c
+cpu-mmix.c
cpu-ns32k.c
+cpu-openrisc.c
+cpu-pdp11.c
cpu-pj.c
cpu-powerpc.c
cpu-rs6000.c
+cpu-s390.c
cpu-sh.c
cpu-sparc.c
cpu-tic30.c
@@ -94,6 +98,7 @@ cpu-v850.c
cpu-vax.c
cpu-w65.c
cpu-we32k.c
+cpu-xstormy16.c
cpu-z8k.c
demo64.c
dwarf1.c
@@ -104,9 +109,11 @@ ecoffswap.h
efi-app-ia32.c
efi-app-ia64.c
elf-bfd.h
+elf-eh-frame.c
elf-hppa.h
elf-m10200.c
elf-m10300.c
+elf-strtab.c
elf.c
elf32-arc.c
elf32-arm.h
@@ -116,6 +123,7 @@ elf32-d10v.c
elf32-d30v.c
elf32-fr30.c
elf32-gen.c
+elf32-h8300.c
elf32-hppa.c
elf32-hppa.h
elf32-i370.c
@@ -129,18 +137,25 @@ elf32-m68k.c
elf32-m88k.c
elf32-mcore.c
elf32-mips.c
+elf32-openrisc.c
elf32-pj.c
elf32-ppc.c
+elf32-s390.c
elf32-sh-lin.c
+elf32-sh-nbsd.c
elf32-sh.c
elf32-sparc.c
elf32-v850.c
+elf32-xstormy16.c
elf32.c
elf64-alpha.c
elf64-gen.c
elf64-hppa.c
elf64-hppa.h
elf64-mips.c
+elf64-mmix.c
+elf64-ppc.c
+elf64-s390.c
elf64-sparc.c
elf64-x86-64.c
elf64.c
@@ -184,6 +199,7 @@ libieee.h
libnlm.h
liboasys.h
libpei.h
+libxcoff.h
linker.c
lynx-core.c
m68k4knetbsd.c
@@ -191,7 +207,9 @@ m68klinux.c
m68klynx.c
m68knetbsd.c
m88kmach3.c
+merge.c
mipsbsd.c
+mmo.c
netbsd.h
newsos3.c
nlm-target.h
@@ -210,6 +228,7 @@ oasys.c
opncls.c
osf-core.c
pc532-mach.c
+pdp11.c
pe-arm.c
pe-i386.c
pe-mcore.c
@@ -244,6 +263,7 @@ tekhex.c
trad-core.c
vaxnetbsd.c
versados.c
+version.h
vms-gsd.c
vms-hdr.c
vms-misc.c
diff --git a/contrib/binutils/bfd/po/bfd.pot b/contrib/binutils/bfd/po/bfd.pot
index e77b05d..bb8a425 100644
--- a/contrib/binutils/bfd/po/bfd.pot
+++ b/contrib/binutils/bfd/po/bfd.pot
@@ -6,2016 +6,2092 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2001-01-11 11:54-0800\n"
+"POT-Creation-Date: 2002-01-17 12:55+0000\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"
+"Content-Transfer-Encoding: 8bit\n"
-#: aout-adobe.c:189
+#: aout-adobe.c:196
#, c-format
msgid "%s: Unknown section type in a.out.adobe file: %x\n"
msgstr ""
-#: aout-cris.c:205
+#: aout-cris.c:208
#, c-format
msgid "%s: Invalid relocation type exported: %d"
msgstr ""
-#: aout-cris.c:249
+#: aout-cris.c:252
#, c-format
msgid "%s: Invalid relocation type imported: %d"
msgstr ""
-#: aout-cris.c:260
+#: aout-cris.c:263
#, c-format
msgid "%s: Bad relocation record imported: %d"
msgstr ""
-#: aoutx.h:1259 aoutx.h:1673
+#: aoutx.h:1282 aoutx.h:1699
#, c-format
msgid "%s: can not represent section `%s' in a.out object file format"
msgstr ""
-#: aoutx.h:1643
+#: aoutx.h:1669
#, c-format
msgid ""
"%s: can not represent section for symbol `%s' in a.out object file format"
msgstr ""
-#: aoutx.h:1645
+#: aoutx.h:1671
msgid "*unknown*"
msgstr ""
-#: aoutx.h:3684
+#: aoutx.h:3735
#, c-format
msgid "%s: relocateable link from %s to %s not supported"
msgstr ""
-#: archive.c:1820
+#: archive.c:1826
msgid "Warning: writing archive was slow: rewriting timestamp\n"
msgstr ""
-#: archive.c:2086
+#: archive.c:2093
msgid "Reading archive file mod timestamp"
msgstr ""
#. FIXME: bfd can't call perror.
-#: archive.c:2113
+#: archive.c:2120
msgid "Writing updated armap timestamp"
msgstr ""
-#: bfd.c:273
+#: bfd.c:281
msgid "No error"
msgstr ""
-#: bfd.c:274
+#: bfd.c:282
msgid "System call error"
msgstr ""
-#: bfd.c:275
+#: bfd.c:283
msgid "Invalid bfd target"
msgstr ""
-#: bfd.c:276
+#: bfd.c:284
msgid "File in wrong format"
msgstr ""
-#: bfd.c:277
+#: bfd.c:285
+msgid "Archive object file in wrong format"
+msgstr ""
+
+#: bfd.c:286
msgid "Invalid operation"
msgstr ""
-#: bfd.c:278
+#: bfd.c:287
msgid "Memory exhausted"
msgstr ""
-#: bfd.c:279
+#: bfd.c:288
msgid "No symbols"
msgstr ""
-#: bfd.c:280
+#: bfd.c:289
msgid "Archive has no index; run ranlib to add one"
msgstr ""
-#: bfd.c:281
+#: bfd.c:290
msgid "No more archived files"
msgstr ""
-#: bfd.c:282
+#: bfd.c:291
msgid "Malformed archive"
msgstr ""
-#: bfd.c:283
+#: bfd.c:292
msgid "File format not recognized"
msgstr ""
-#: bfd.c:284
+#: bfd.c:293
msgid "File format is ambiguous"
msgstr ""
-#: bfd.c:285
+#: bfd.c:294
msgid "Section has no contents"
msgstr ""
-#: bfd.c:286
+#: bfd.c:295
msgid "Nonrepresentable section on output"
msgstr ""
-#: bfd.c:287
+#: bfd.c:296
msgid "Symbol needs debug section which does not exist"
msgstr ""
-#: bfd.c:288
+#: bfd.c:297
msgid "Bad value"
msgstr ""
-#: bfd.c:289
+#: bfd.c:298
msgid "File truncated"
msgstr ""
-#: bfd.c:290
+#: bfd.c:299
msgid "File too big"
msgstr ""
-#: bfd.c:291
+#: bfd.c:300
msgid "#<Invalid error code>"
msgstr ""
-#: bfd.c:675
+#: bfd.c:707
#, c-format
-msgid "bfd assertion fail %s:%d"
+msgid "BFD %s assertion fail %s:%d"
msgstr ""
-#: bfd.c:693
+#: bfd.c:726
#, c-format
-msgid "BFD internal error, aborting at %s line %d in %s\n"
+msgid "BFD %s internal error, aborting at %s line %d in %s\n"
msgstr ""
-#: bfd.c:697
+#: bfd.c:730
#, c-format
-msgid "BFD internal error, aborting at %s line %d\n"
+msgid "BFD %sinternal error, aborting at %s line %d\n"
msgstr ""
-#: bfd.c:699
+#: bfd.c:732
msgid "Please report this bug.\n"
msgstr ""
-#: binary.c:303
+#: binary.c:306
#, c-format
msgid "Warning: Writing section `%s' to huge (ie negative) file offset 0x%lx."
msgstr ""
-#: coff-a29k.c:122
+#: coff-a29k.c:119
msgid "Missing IHCONST"
msgstr ""
-#: coff-a29k.c:181
+#: coff-a29k.c:180
msgid "Missing IHIHALF"
msgstr ""
-#: coff-a29k.c:213
+#: coff-a29k.c:212
msgid "Unrecognized reloc"
msgstr ""
-#: coff-a29k.c:425
+#: coff-a29k.c:408
msgid "missing IHCONST reloc"
msgstr ""
-#: coff-a29k.c:516
+#: coff-a29k.c:498
msgid "missing IHIHALF reloc"
msgstr ""
-#: coff-alpha.c:880 coff-alpha.c:917
+#: coff-alpha.c:881 coff-alpha.c:918
msgid "GP relative relocation used when GP not defined"
msgstr ""
-#: coff-alpha.c:1486 elf64-alpha.c:4004
+#: coff-alpha.c:1485
msgid "using multiple gp values"
msgstr ""
-#: coff-alpha.c:1992 coff-mips.c:1434
+#: coff-alpha.c:1989 coff-mips.c:1433
msgid "GP relative relocation when GP not defined"
msgstr ""
-#: coff-arm.c:1018 elf32-arm.h:246
+#: coff-arm.c:1051 elf32-arm.h:285
#, c-format
msgid "%s: unable to find THUMB glue '%s' for `%s'"
msgstr ""
-#: coff-arm.c:1047 elf32-arm.h:281
+#: coff-arm.c:1080 elf32-arm.h:320
#, c-format
msgid "%s: unable to find ARM glue '%s' for `%s'"
msgstr ""
-#: coff-arm.c:1335 coff-arm.c:1430 elf32-arm.h:841 elf32-arm.h:946
+#: coff-arm.c:1375 coff-arm.c:1470 elf32-arm.h:886 elf32-arm.h:990
#, c-format
msgid "%s(%s): warning: interworking not enabled."
msgstr ""
-#: coff-arm.c:1339 elf32-arm.h:949
+#: coff-arm.c:1379 elf32-arm.h:993
#, c-format
msgid " first occurrence: %s: arm call to thumb"
msgstr ""
-#: coff-arm.c:1434 elf32-arm.h:844
+#: coff-arm.c:1474 elf32-arm.h:889
#, c-format
msgid " first occurrence: %s: thumb call to arm"
msgstr ""
-#: coff-arm.c:1437
+#: coff-arm.c:1477
msgid " consider relinking with --support-old-code enabled"
msgstr ""
-#: coff-arm.c:1726 coff-tic80.c:682 cofflink.c:2991
+#: coff-arm.c:1767 coff-tic80.c:686 cofflink.c:3017
#, c-format
msgid "%s: bad reloc address 0x%lx in section `%s'"
msgstr ""
-#: coff-arm.c:2063
+#: coff-arm.c:2107
#, c-format
msgid "%s: illegal symbol index in reloc: %d"
msgstr ""
-#: coff-arm.c:2191
+#: coff-arm.c:2235
#, c-format
msgid "%s: ERROR: compiled for APCS-%d whereas target %s uses APCS-%d"
msgstr ""
-#: coff-arm.c:2206
+#: coff-arm.c:2250
#, c-format
msgid ""
"%s: ERROR: passes floats in float registers whereas target %s uses integer "
"registers"
msgstr ""
-#: coff-arm.c:2209
+#: coff-arm.c:2253
#, c-format
msgid ""
"%s: ERROR: passes floats in integer registers whereas target %s uses float "
"registers"
msgstr ""
-#: coff-arm.c:2224
+#: coff-arm.c:2268
#, c-format
msgid ""
"%s: ERROR: compiled as position independent code, whereas target %s is "
"absolute position"
msgstr ""
-#: coff-arm.c:2227
+#: coff-arm.c:2271
#, c-format
msgid ""
"%s: ERROR: compiled as absolute position code, whereas target %s is position "
"independent"
msgstr ""
-#: coff-arm.c:2256
+#: coff-arm.c:2300
#, c-format
msgid "Warning: input file %s supports interworking, whereas %s does not."
msgstr ""
-#: coff-arm.c:2259
+#: coff-arm.c:2303
#, c-format
msgid "Warning: input file %s does not support interworking, whereas %s does."
msgstr ""
-#: coff-arm.c:2286
+#: coff-arm.c:2330
#, c-format
msgid "private flags = %x:"
msgstr ""
-#: coff-arm.c:2294 elf32-arm.h:2210
+#: coff-arm.c:2338 elf32-arm.h:2408
msgid " [floats passed in float registers]"
msgstr ""
-#: coff-arm.c:2296
+#: coff-arm.c:2340
msgid " [floats passed in integer registers]"
msgstr ""
-#: coff-arm.c:2299 elf32-arm.h:2213
+#: coff-arm.c:2343 elf32-arm.h:2411
msgid " [position independent]"
msgstr ""
-#: coff-arm.c:2301
+#: coff-arm.c:2345
msgid " [absolute position]"
msgstr ""
-#: coff-arm.c:2305
+#: coff-arm.c:2349
msgid " [interworking flag not initialised]"
msgstr ""
-#: coff-arm.c:2307
+#: coff-arm.c:2351
msgid " [interworking supported]"
msgstr ""
-#: coff-arm.c:2309
+#: coff-arm.c:2353
msgid " [interworking not supported]"
msgstr ""
-#: coff-arm.c:2357
+#: coff-arm.c:2401
#, c-format
msgid ""
"Warning: Not setting interworking flag of %s, since it has already been "
"specified as non-interworking"
msgstr ""
-#: coff-arm.c:2361
+#: coff-arm.c:2405
#, c-format
msgid "Warning: Clearing the interworking flag of %s due to outside request"
msgstr ""
-#: coffcode.h:2136
-#, c-format
-msgid "Unrecognized TI COFF target id '0x%x'"
+#: coff-i960.c:136 coff-i960.c:485
+msgid "uncertain calling convention for non-COFF symbol"
+msgstr ""
+
+#: coff-m68k.c:481 coff-mips.c:2431 elf32-m68k.c:2212
+msgid "unsupported reloc type"
+msgstr ""
+
+#: coff-mips.c:875 elf32-mips.c:1987 elf64-mips.c:1739
+msgid "GP relative relocation when _gp not defined"
+msgstr ""
+
+#. No other sections should appear in -membedded-pic
+#. code.
+#: coff-mips.c:2468
+msgid "reloc against unsupported section"
msgstr ""
-#: coffcode.h:4194
+#: coff-mips.c:2476
+msgid "reloc not properly aligned"
+msgstr ""
+
+#: coff-rs6000.c:2710 coff64-rs6000.c:1164
#, c-format
-msgid "%s: warning: illegal symbol index %ld in line numbers"
+msgid "%s: unsupported relocation type 0x%02x"
msgstr ""
-#: coffcode.h:4208
+#: coff-rs6000.c:2756 coff64-rs6000.c:1210
#, c-format
-msgid "%s: warning: duplicate line number information for `%s'"
+msgid "%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry"
msgstr ""
-#: coffcode.h:4568
+#: coff-rs6000.c:3006 coff64-rs6000.c:2060
#, c-format
-msgid "%s: Unrecognized storage class %d for %s symbol `%s'"
+msgid "%s: symbol `%s' has unrecognized smclas %d"
msgstr ""
-#: coffcode.h:4699
+#: coff-tic54x.c:279 coff-tic80.c:449
#, c-format
-msgid "warning: %s: local symbol `%s' has no section"
+msgid "Unrecognized reloc type 0x%x"
msgstr ""
-#: coff-tic54x.c:376 coffcode.h:4810
+#: coff-tic54x.c:390 coffcode.h:4847
#, c-format
msgid "%s: warning: illegal symbol index %ld in relocs"
msgstr ""
-#: coffcode.h:4848
+#: coff-w65.c:363
#, c-format
-msgid "%s: illegal relocation type %d at address 0x%lx"
+msgid "ignoring reloc %s\n"
msgstr ""
-#: coffgen.c:1631
+#: coffcode.h:1081
#, c-format
-msgid "%s: bad string table size %lu"
+msgid "%s (%s): Section flag %s (0x%x) ignored"
msgstr ""
-#: coffgen.c:2093
+#: coffcode.h:2125
#, c-format
-msgid "AUX tagndx %ld ttlsiz 0x%lx lnnos %ld next %ld"
+msgid "Unrecognized TI COFF target id '0x%x'"
msgstr ""
-#: coff-i960.c:136 coff-i960.c:485
-msgid "uncertain calling convention for non-COFF symbol"
+#: coffcode.h:4236
+#, c-format
+msgid "%s: warning: illegal symbol index %ld in line numbers"
msgstr ""
-#: cofflink.c:526 elflink.h:1648
+#: coffcode.h:4250
#, c-format
-msgid "Warning: type of symbol `%s' changed from %d to %d in %s"
+msgid "%s: warning: duplicate line number information for `%s'"
msgstr ""
-#: cofflink.c:2289
+#: coffcode.h:4609
#, c-format
-msgid "%s: relocs in section `%s', but it has no contents"
+msgid "%s: Unrecognized storage class %d for %s symbol `%s'"
msgstr ""
-#: cofflink.c:2628 coffswap.h:894
+#: coffcode.h:4740
#, c-format
-msgid "%s: %s: reloc overflow: 0x%lx > 0xffff"
+msgid "warning: %s: local symbol `%s' has no section"
msgstr ""
-#: cofflink.c:2637 coffswap.h:880
+#: coffcode.h:4885
#, c-format
-msgid "%s: warning: %s: line number overflow: 0x%lx > 0xffff"
+msgid "%s: illegal relocation type %d at address 0x%lx"
msgstr ""
-#: coff-m68k.c:475 coff-mips.c:2432 elf32-m68k.c:2265
-msgid "unsupported reloc type"
+#: coffgen.c:1661
+#, c-format
+msgid "%s: bad string table size %lu"
msgstr ""
-#: coff-mips.c:875 elf32-mips.c:1417
-msgid "GP relative relocation when _gp not defined"
+#: coffgen.c:2138
+#, c-format
+msgid "AUX tagndx %ld ttlsiz 0x%lx lnnos %ld next %ld"
msgstr ""
-#. No other sections should appear in -membedded-pic
-#. code.
-#: coff-mips.c:2469
-msgid "reloc against unsupported section"
+#: cofflink.c:536 elflink.h:1967
+#, c-format
+msgid "Warning: type of symbol `%s' changed from %d to %d in %s"
msgstr ""
-#: coff-mips.c:2477
-msgid "reloc not properly aligned"
+#: cofflink.c:2317
+#, c-format
+msgid "%s: relocs in section `%s', but it has no contents"
msgstr ""
-#: coff-tic54x.c:263 coff-tic80.c:445
+#: cofflink.c:2653 coffswap.h:889
#, c-format
-msgid "Unrecognized reloc type 0x%x"
+msgid "%s: %s: reloc overflow: 0x%lx > 0xffff"
msgstr ""
-#: coff-w65.c:369
+#: cofflink.c:2662 coffswap.h:876
#, c-format
-msgid "ignoring reloc %s\n"
+msgid "%s: warning: %s: line number overflow: 0x%lx > 0xffff"
+msgstr ""
+
+#: dwarf2.c:381
+msgid "Dwarf Error: Can't find .debug_str section."
+msgstr ""
+
+#: dwarf2.c:398
+#, c-format
+msgid ""
+"Dwarf Error: DW_FORM_strp offset (%u) greater than or equal to .debug_str "
+"size (%u)."
msgstr ""
-#: dwarf2.c:423
+#: dwarf2.c:542
msgid "Dwarf Error: Can't find .debug_abbrev section."
msgstr ""
-#: dwarf2.c:441
+#: dwarf2.c:559
#, c-format
-msgid "Dwarf Error: Abbrev offset (%u) bigger than abbrev size (%u)."
+msgid ""
+"Dwarf Error: Abbrev offset (%u) greater than or equal to abbrev size (%u)."
msgstr ""
-#: dwarf2.c:624
+#: dwarf2.c:756
#, c-format
msgid "Dwarf Error: Invalid or unhandled FORM value: %d."
msgstr ""
-#: dwarf2.c:697
+#: dwarf2.c:843
msgid "Dwarf Error: mangled line number section (bad file number)."
msgstr ""
-#: dwarf2.c:782
+#: dwarf2.c:929
msgid "Dwarf Error: Can't find .debug_line section."
msgstr ""
-#: dwarf2.c:806
+#: dwarf2.c:952
#, c-format
-msgid "Dwarf Error: Line offset (%u) bigger than line size (%u)."
+msgid "Dwarf Error: Line offset (%u) greater than or equal to line size (%u)."
msgstr ""
-#: dwarf2.c:973
+#: dwarf2.c:1143
msgid "Dwarf Error: mangled line number section."
msgstr ""
-#: dwarf2.c:1152 dwarf2.c:1306
+#: dwarf2.c:1318 dwarf2.c:1532
#, c-format
msgid "Dwarf Error: Could not find abbrev number %d."
msgstr ""
-#: dwarf2.c:1267
+#: dwarf2.c:1493
#, c-format
msgid ""
"Dwarf Error: found dwarf version '%hu', this reader only handles version 2 "
"information."
msgstr ""
-#: dwarf2.c:1274
+#: dwarf2.c:1500
#, c-format
msgid ""
"Dwarf Error: found address size '%u', this reader can not handle sizes "
"greater than '%u'."
msgstr ""
-#: dwarf2.c:1297
+#: dwarf2.c:1523
#, c-format
msgid "Dwarf Error: Bad abbrev number: %d."
msgstr ""
-#: ecoff.c:1323
+#: ecoff.c:1328
#, c-format
msgid "Unknown basic type %d"
msgstr ""
-#: ecoff.c:1592
+#: ecoff.c:1597
#, c-format
msgid ""
"\n"
" End+1 symbol: %ld"
msgstr ""
-#: ecoff.c:1599 ecoff.c:1602
+#: ecoff.c:1604 ecoff.c:1607
#, c-format
msgid ""
"\n"
" First symbol: %ld"
msgstr ""
-#: ecoff.c:1614
+#: ecoff.c:1619
#, c-format
msgid ""
"\n"
" End+1 symbol: %-7ld Type: %s"
msgstr ""
-#: ecoff.c:1621
+#: ecoff.c:1626
#, c-format
msgid ""
"\n"
" Local symbol: %ld"
msgstr ""
-#: ecoff.c:1629
+#: ecoff.c:1634
#, c-format
msgid ""
"\n"
" struct; End+1 symbol: %ld"
msgstr ""
-#: ecoff.c:1634
+#: ecoff.c:1639
#, c-format
msgid ""
"\n"
" union; End+1 symbol: %ld"
msgstr ""
-#: ecoff.c:1639
+#: ecoff.c:1644
#, c-format
msgid ""
"\n"
" enum; End+1 symbol: %ld"
msgstr ""
-#: ecoff.c:1645
+#: ecoff.c:1650
#, c-format
msgid ""
"\n"
" Type: %s"
msgstr ""
-#: elf32-arm.h:1179
+#: elf-hppa.h:1366 elf-hppa.h:1399 elf32-ppc.c:3062 elf32-sh.c:3201
+#: elf64-x86-64.c:1275
#, c-format
-msgid "%s: Warning: Arm BLX instruction targets Arm function '%s'."
+msgid ""
+"%s: warning: unresolvable relocation against symbol `%s' from %s section"
+msgstr ""
+
+#: elf-m10200.c:463 elf-m10300.c:673 elf32-arm.h:2074 elf32-avr.c:835
+#: elf32-cris.c:1392 elf32-d10v.c:482 elf32-fr30.c:653 elf32-h8300.c:547
+#: elf32-i860.c:1048 elf32-m32r.c:1281 elf32-openrisc.c:455 elf32-v850.c:1691
+#: elf64-mmix.c:1164
+msgid "internal error: out of range error"
+msgstr ""
+
+#: elf-m10200.c:467 elf-m10300.c:677 elf32-arm.h:2078 elf32-avr.c:839
+#: elf32-cris.c:1396 elf32-d10v.c:486 elf32-fr30.c:657 elf32-h8300.c:551
+#: elf32-i860.c:1052 elf32-m32r.c:1285 elf32-mips.c:7565 elf32-openrisc.c:459
+#: elf32-v850.c:1695 elf64-mips.c:4464 elf64-mmix.c:1168
+msgid "internal error: unsupported relocation error"
msgstr ""
-#: elf32-arm.h:1375
+#: elf-m10200.c:471 elf-m10300.c:681 elf32-arm.h:2082 elf32-d10v.c:490
+#: elf32-h8300.c:555 elf32-m32r.c:1289
+msgid "internal error: dangerous error"
+msgstr ""
+
+#: elf-m10200.c:475 elf-m10300.c:685 elf32-arm.h:2086 elf32-avr.c:847
+#: elf32-cris.c:1404 elf32-d10v.c:494 elf32-fr30.c:665 elf32-h8300.c:559
+#: elf32-i860.c:1060 elf32-m32r.c:1293 elf32-openrisc.c:467 elf32-v850.c:1715
+#: elf64-mmix.c:1176
+msgid "internal error: unknown error"
+msgstr ""
+
+#: elf.c:345
#, c-format
-msgid "%s: Warning: Thumb BLX instruction targets thumb function '%s'."
+msgid "%s: invalid string offset %u >= %lu for section `%s'"
+msgstr ""
+
+#: elf.c:450
+#, c-format
+msgid "%s: invalid SHT_GROUP entry"
msgstr ""
-#: elf-hppa.h:1369 elf-hppa.h:1402 elf32-arm.h:1853 elf32-i386.c:1428
-#: elf32-ppc.c:3096 elf32-sh.c:2997 elf64-x86-64.c:271
+#: elf.c:531
#, c-format
+msgid "%s: no group info for section %s"
+msgstr ""
+
+#: elf.c:842
msgid ""
-"%s: warning: unresolvable relocation against symbol `%s' from %s section"
+"\n"
+"Program Header:\n"
msgstr ""
-#: elf-m10200.c:455 elf-m10300.c:669 elf32-arm.h:1927 elf32-avr.c:842
-#: elf32-cris.c:431 elf32-d10v.c:478 elf32-fr30.c:651 elf32-i860.c:1051
-#: elf32-m32r.c:1265 elf32-v850.c:1672
-msgid "internal error: out of range error"
+#: elf.c:891
+msgid ""
+"\n"
+"Dynamic Section:\n"
msgstr ""
-#: elf-m10200.c:459 elf-m10300.c:673 elf32-arm.h:1931 elf32-avr.c:846
-#: elf32-cris.c:435 elf32-d10v.c:482 elf32-fr30.c:655 elf32-i860.c:1055
-#: elf32-m32r.c:1269 elf32-v850.c:1676
-msgid "internal error: unsupported relocation error"
+#: elf.c:1020
+msgid ""
+"\n"
+"Version definitions:\n"
msgstr ""
-#: elf-m10200.c:463 elf-m10300.c:677 elf32-arm.h:1935 elf32-d10v.c:486
-#: elf32-m32r.c:1273
-msgid "internal error: dangerous error"
+#: elf.c:1043
+msgid ""
+"\n"
+"Version References:\n"
msgstr ""
-#: elf-m10200.c:467 elf-m10300.c:681 elf32-arm.h:1939 elf32-avr.c:854
-#: elf32-cris.c:443 elf32-d10v.c:490 elf32-fr30.c:663 elf32-i860.c:1063
-#: elf32-m32r.c:1277 elf32-v850.c:1696
-msgid "internal error: unknown error"
+#: elf.c:1048
+#, c-format
+msgid " required from %s:\n"
+msgstr ""
+
+#: elf.c:1675
+#, c-format
+msgid "%s: invalid link %lu for reloc section %s (index %u)"
+msgstr ""
+
+#: elf.c:3289
+#, c-format
+msgid "%s: Not enough room for program headers (allocated %u, need %u)"
msgstr ""
-#: elf32-arm.h:1967
+#: elf.c:3393
+#, c-format
+msgid "%s: Not enough room for program headers, try linking with -N"
+msgstr ""
+
+#: elf.c:3518
#, c-format
msgid ""
-"Warning: Not setting interwork flag of %s since it has already been "
-"specified as non-interworking"
+"Error: First section in segment (%s) starts at 0x%x whereas the segment "
+"starts at 0x%x"
msgstr ""
-#: elf32-arm.h:1971
+#: elf.c:3804
#, c-format
-msgid "Warning: Clearing the interwork flag of %s due to outside request"
+msgid "%s: warning: allocated section `%s' not in segment"
msgstr ""
-#: elf32-arm.h:2019
+#: elf.c:4138
+#, c-format
+msgid "%s: symbol `%s' required but not present"
+msgstr ""
+
+#: elf.c:4147
#, c-format
msgid ""
-"Warning: Clearing the interwork flag in %s because non-interworking code in "
-"%s has been linked with it"
+"elf_symbol_from_bfd_symbol 0x%.8lx, name = %s, sym num = %d, flags = 0x%.8lx%"
+"s\n"
+msgstr ""
+
+#: elf.c:4391
+#, c-format
+msgid "%s: warning: Empty loadable segment detected\n"
+msgstr ""
+
+#: elf.c:5804
+#, c-format
+msgid "%s: unsupported relocation type %s"
+msgstr ""
+
+#: elf32-arm.h:1224
+#, c-format
+msgid "%s: Warning: Arm BLX instruction targets Arm function '%s'."
msgstr ""
-#: elf32-arm.h:2113
+#: elf32-arm.h:1420
+#, c-format
+msgid "%s: Warning: Thumb BLX instruction targets thumb function '%s'."
+msgstr ""
+
+#: elf32-arm.h:1904 elf32-i386.c:1776 elf32-sh.c:3133
+#, c-format
+msgid "%s(%s+0x%lx): %s relocation against SEC_MERGE section"
+msgstr ""
+
+#: elf32-arm.h:1998
#, c-format
msgid ""
-"Error: %s compiled for EABI version %d, whereas %s is compiled for version %d"
+"%s: warning: unresolvable relocation %d against symbol `%s' from %s section"
msgstr ""
-#: elf32-arm.h:2127
+#: elf32-arm.h:2114
#, c-format
-msgid "Error: %s compiled for APCS-%d, whereas %s is compiled for APCS-%d"
+msgid ""
+"Warning: Not setting interwork flag of %s since it has already been "
+"specified as non-interworking"
msgstr ""
-#: elf32-arm.h:2138
+#: elf32-arm.h:2118
+#, c-format
+msgid "Warning: Clearing the interwork flag of %s due to outside request"
+msgstr ""
+
+#: elf32-arm.h:2166
#, c-format
msgid ""
-"Error: %s passes floats in %s registers, whereas %s passes them in %s "
-"registers"
+"Warning: Clearing the interwork flag in %s because non-interworking code in %"
+"s has been linked with it"
msgstr ""
-#: elf32-arm.h:2141 elf32-arm.h:2143
-msgid "float"
+#: elf32-arm.h:2261
+#, c-format
+msgid ""
+"Error: %s compiled for EABI version %d, whereas %s is compiled for version %d"
msgstr ""
-#: elf32-arm.h:2141 elf32-arm.h:2143
-msgid "integer"
+#: elf32-arm.h:2275
+#, c-format
+msgid "Error: %s compiled for APCS-%d, whereas %s is compiled for APCS-%d"
msgstr ""
-#: elf32-arm.h:2150
+#: elf32-arm.h:2287
#, c-format
-msgid "Error: %s uses %s floating point, whereas %s uses %s floating point"
+msgid ""
+"Error: %s passes floats in FP registers, whereas %s passes them in integer "
+"registers"
msgstr ""
-#: elf32-arm.h:2153 elf32-arm.h:2155
-msgid "soft"
+#: elf32-arm.h:2292
+#, c-format
+msgid ""
+"Error: %s passes floats in integer registers, whereas %s passes them in FP "
+"registers"
msgstr ""
-#: elf32-arm.h:2153 elf32-arm.h:2155
-msgid "hard"
+#: elf32-arm.h:2303
+#, c-format
+msgid "Error: %s uses VFP instructions, whereas %s FPA instructions"
msgstr ""
-#: elf32-arm.h:2162
+#: elf32-arm.h:2308
#, c-format
-msgid "Warning: %s %s interworking, whereas %s %s"
+msgid "Error: %s uses FPA instructions, whereas %s VFP instructions"
msgstr ""
-#: elf32-arm.h:2165
-msgid "supports"
+#: elf32-arm.h:2328
+#, c-format
+msgid "Error: %s uses software FP, whereas %s uses hardware FP"
msgstr ""
-#: elf32-arm.h:2165
-msgid "does not support"
+#: elf32-arm.h:2333
+#, c-format
+msgid "Error: %s uses hardware FP, whereas %s uses software FP"
msgstr ""
-#: elf32-arm.h:2167
-msgid "does not"
+#: elf32-arm.h:2348
+#, c-format
+msgid "Warning: %s supports interworking, whereas %s does not"
msgstr ""
-#: elf32-arm.h:2167
-msgid "does"
+#: elf32-arm.h:2355
+#, c-format
+msgid "Warning: %s does not support interworking, whereas %s does"
msgstr ""
#. Ignore init flag - it may not be set, despite the flags field
#. containing valid data.
-#: elf32-arm.h:2193 elf32-cris.c:615 elf32-m68k.c:430 elf32-mips.c:2695
+#: elf32-arm.h:2386 elf32-cris.c:2970 elf32-m68k.c:410 elf32-mips.c:3232
#, c-format
msgid "private flags = %lx:"
msgstr ""
-#: elf32-arm.h:2202
+#: elf32-arm.h:2395
msgid " [interworking enabled]"
msgstr ""
-#: elf32-arm.h:2205
+#: elf32-arm.h:2398
msgid " [APCS-26]"
msgstr ""
-#: elf32-arm.h:2207
+#: elf32-arm.h:2400
msgid " [APCS-32]"
msgstr ""
-#: elf32-arm.h:2216
+#: elf32-arm.h:2403
+msgid " [VFP float format]"
+msgstr ""
+
+#: elf32-arm.h:2405
+msgid " [FPA float format]"
+msgstr ""
+
+#: elf32-arm.h:2414
msgid " [new ABI]"
msgstr ""
-#: elf32-arm.h:2219
+#: elf32-arm.h:2417
msgid " [old ABI]"
msgstr ""
-#: elf32-arm.h:2222
+#: elf32-arm.h:2420
msgid " [software FP]"
msgstr ""
-#: elf32-arm.h:2229
+#: elf32-arm.h:2428
msgid " [Version1 EABI]"
msgstr ""
-#: elf32-arm.h:2232
+#: elf32-arm.h:2431 elf32-arm.h:2442
msgid " [sorted symbol table]"
msgstr ""
-#: elf32-arm.h:2234
+#: elf32-arm.h:2433 elf32-arm.h:2444
msgid " [unsorted symbol table]"
msgstr ""
-#: elf32-arm.h:2240
+#: elf32-arm.h:2439
+msgid " [Version2 EABI]"
+msgstr ""
+
+#: elf32-arm.h:2447
+msgid " [dynamic symbols use segment index]"
+msgstr ""
+
+#: elf32-arm.h:2450
+msgid " [mapping symbols precede others]"
+msgstr ""
+
+#: elf32-arm.h:2457
msgid " <EABI version unrecognised>"
msgstr ""
-#: elf32-arm.h:2247
+#: elf32-arm.h:2464
msgid " [relocatable executable]"
msgstr ""
-#: elf32-arm.h:2250
+#: elf32-arm.h:2467
msgid " [has entry point]"
msgstr ""
-#: elf32-arm.h:2255
+#: elf32-arm.h:2472
msgid "<Unrecognised flag bits set>"
msgstr ""
-#: elf32-avr.c:850 elf32-cris.c:439 elf32-fr30.c:659 elf32-i860.c:1059
-#: elf32-v850.c:1680
+#: elf32-avr.c:843 elf32-cris.c:1400 elf32-fr30.c:661 elf32-i860.c:1056
+#: elf32-openrisc.c:463 elf32-v850.c:1699 elf64-mmix.c:1172
msgid "internal error: dangerous relocation"
msgstr ""
-#: elf32-cris.c:618
-msgid " [symbols have a _ prefix]"
+#: elf32-cris.c:949
+#, c-format
+msgid "%s: unresolvable relocation %s against symbol `%s' from %s section"
msgstr ""
-#: elf32-cris.c:657
+#: elf32-cris.c:1012
#, c-format
-msgid "%s: uses _-prefixed symbols, but writing file with non-prefixed symbols"
+msgid ""
+"%s: No PLT nor GOT for relocation %s against symbol `%s' from %s section"
+msgstr ""
+
+#: elf32-cris.c:1015 elf32-cris.c:1142
+msgid "[whose name is lost]"
msgstr ""
-#: elf32-cris.c:658
+#: elf32-cris.c:1131
#, c-format
-msgid "%s: uses non-prefixed symbols, but writing file with _-prefixed symbols"
+msgid ""
+"%s: relocation %s with non-zero addend %d against local symbol from %s "
+"section"
+msgstr ""
+
+#: elf32-cris.c:1138
+#, c-format
+msgid ""
+"%s: relocation %s with non-zero addend %d against symbol `%s' from %s section"
msgstr ""
-#: elf32-hppa.c:606
+#: elf32-cris.c:1156
#, c-format
-msgid "%s(%s+0x%lx): cannot find stub entry %s"
+msgid ""
+"%s: relocation %s is not allowed for global symbol: `%s' from %s section"
msgstr ""
-#: elf32-hppa.c:667
+#: elf32-cris.c:1275
#, c-format
-msgid "%s: cannot create stub entry %s"
+msgid "%s: Internal inconsistency; no relocation section %s"
msgstr ""
-#: elf32-hppa.c:859
+#: elf32-cris.c:2508
#, c-format
-msgid "%s(%s+0x%lx): cannot relocate %s, recompile with -ffunction-sections"
+msgid ""
+"%s, section %s:\n"
+" relocation %s should not be used in a shared object; recompile with -fPIC"
msgstr ""
-#: elf32-hppa.c:872 elf32-hppa.c:1568
+#: elf32-cris.c:2973
+msgid " [symbols have a _ prefix]"
+msgstr ""
+
+#: elf32-cris.c:3012
#, c-format
-msgid "Could not find relocation section for %s"
+msgid "%s: uses _-prefixed symbols, but writing file with non-prefixed symbols"
+msgstr ""
+
+#: elf32-cris.c:3013
+#, c-format
+msgid "%s: uses non-prefixed symbols, but writing file with _-prefixed symbols"
msgstr ""
-#: elf32-hppa.c:1011 elf32-hppa.c:3362
+#: elf32-gen.c:82 elf64-gen.c:82
+#, c-format
+msgid "%s: Relocations in generic ELF (EM: %d)"
+msgstr ""
+
+#: elf32-hppa.c:646
+#, c-format
+msgid "%s: cannot create stub entry %s"
+msgstr ""
+
+#: elf32-hppa.c:937 elf32-hppa.c:3540
#, c-format
msgid "%s(%s+0x%lx): cannot reach %s, recompile with -ffunction-sections"
msgstr ""
-#: elf32-hppa.c:1323
+#: elf32-hppa.c:1312
#, c-format
msgid ""
"%s: relocation %s can not be used when making a shared object; recompile "
"with -fPIC"
msgstr ""
-#: elf32-hppa.c:1343
+#: elf32-hppa.c:1332
#, c-format
msgid ""
"%s: relocation %s should not be used when making a shared object; recompile "
"with -fPIC"
msgstr ""
-#: elf32-hppa.c:2755
+#: elf32-hppa.c:1525
+#, c-format
+msgid "Could not find relocation section for %s"
+msgstr ""
+
+#: elf32-hppa.c:2862
#, c-format
msgid "%s: duplicate export stub %s"
msgstr ""
-#: elf32-hppa.c:3253
+#: elf32-hppa.c:3424
#, c-format
msgid "%s(%s+0x%lx): fixing %s"
msgstr ""
-#: elf32-hppa.c:3856
+#: elf32-hppa.c:4064
#, c-format
msgid "%s(%s+0x%lx): cannot handle %s for %s"
msgstr ""
-#: elf32-hppa.c:4173
+#: elf32-hppa.c:4403
msgid ".got section not immediately after .plt section"
msgstr ""
-#: elf32-i386.c:273
+#: elf32-i386.c:298
#, c-format
msgid "%s: invalid relocation type %d"
msgstr ""
-#: elf32-m32r.c:916
+#: elf32-i386.c:718 elf32-s390.c:636 elf64-s390.c:595
+#, c-format
+msgid "%s: bad symbol index: %d"
+msgstr ""
+
+#: elf32-i386.c:863 elf32-s390.c:790 elf64-ppc.c:2085 elf64-s390.c:759
+#, c-format
+msgid "%s: bad relocation section name `%s'"
+msgstr ""
+
+#: elf32-i386.c:2067 elf32-s390.c:1949 elf64-ppc.c:3908 elf64-s390.c:1953
+#, c-format
+msgid "%s(%s+0x%lx): unresolvable relocation against symbol `%s'"
+msgstr ""
+
+#: elf32-i386.c:2105 elf32-s390.c:1987 elf64-s390.c:1991
+#, c-format
+msgid "%s(%s+0x%lx): reloc against `%s': error %d"
+msgstr ""
+
+#: elf32-m32r.c:924
msgid "SDA relocation when _SDA_BASE_ not defined"
msgstr ""
-#: elf32-m32r.c:1000 elf32-ppc.c:2963
+#: elf32-ia64.c:3538 elf32-m32r.c:1008 elf32-ppc.c:2930 elf64-ia64.c:3538
#, c-format
msgid "%s: unknown relocation type %d"
msgstr ""
-#: elf32-m32r.c:1208
+#: elf32-m32r.c:1224
#, c-format
msgid "%s: The target (%s) of an %s relocation is in the wrong section (%s)"
msgstr ""
-#: elf32-m32r.c:2010
+#: elf32-m32r.c:2001
#, c-format
msgid "%s: Instruction set mismatch with previous modules"
msgstr ""
-#: elf32-m32r.c:2033
+#: elf32-m32r.c:2024
#, c-format
msgid "private flags = %lx"
msgstr ""
-#: elf32-m32r.c:2038
+#: elf32-m32r.c:2029
msgid ": m32r instructions"
msgstr ""
-#: elf32-m32r.c:2039
+#: elf32-m32r.c:2030
msgid ": m32rx instructions"
msgstr ""
-#: elf32-m68k.c:433
+#: elf32-m68k.c:413
msgid " [cpu32]"
msgstr ""
-#: elf32-mcore.c:366 elf32-mcore.c:493
+#: elf32-mcore.c:353 elf32-mcore.c:479
#, c-format
msgid "%s: Relocation %s (%d) is not currently supported.\n"
msgstr ""
-#: elf32-mcore.c:452
+#: elf32-mcore.c:438
#, c-format
msgid "%s: Unknown relocation type %d\n"
msgstr ""
-#: elf32-mips.c:1576
+#: elf32-mips.c:2146 elf64-mips.c:1972
msgid "32bits gp relative relocation occurs for an external symbol"
msgstr ""
-#: elf32-mips.c:1725
+#: elf32-mips.c:2295
#, c-format
msgid "Linking mips16 objects into %s format is not supported"
msgstr ""
-#: elf32-mips.c:2582
+#: elf32-mips.c:3119
#, c-format
msgid "%s: linking PIC files with non-PIC files"
msgstr ""
-#: elf32-mips.c:2592
+#: elf32-mips.c:3129
#, c-format
msgid "%s: linking abicalls files with non-abicalls files"
msgstr ""
-#: elf32-mips.c:2621
+#: elf32-mips.c:3158
#, c-format
msgid "%s: ISA mismatch (-mips%d) with previous modules (-mips%d)"
msgstr ""
-#: elf32-mips.c:2630
+#: elf32-mips.c:3167
#, c-format
msgid "%s: ISA mismatch (%d) with previous modules (%d)"
msgstr ""
-#: elf32-mips.c:2653
+#: elf32-mips.c:3190
#, c-format
msgid "%s: ABI mismatch: linking %s module with previous %s modules"
msgstr ""
-#: elf32-mips.c:2667 elf32-ppc.c:1477 elf64-sparc.c:2971
+#: elf32-mips.c:3204 elf32-ppc.c:1470 elf64-ppc.c:1538 elf64-sparc.c:3033
#, c-format
msgid "%s: uses different e_flags (0x%lx) fields than previous modules (0x%lx)"
msgstr ""
-#: elf32-mips.c:2698
+#: elf32-mips.c:3235
msgid " [abi=O32]"
msgstr ""
-#: elf32-mips.c:2700
+#: elf32-mips.c:3237
msgid " [abi=O64]"
msgstr ""
-#: elf32-mips.c:2702
+#: elf32-mips.c:3239
msgid " [abi=EABI32]"
msgstr ""
-#: elf32-mips.c:2704
+#: elf32-mips.c:3241
msgid " [abi=EABI64]"
msgstr ""
-#: elf32-mips.c:2706
+#: elf32-mips.c:3243
msgid " [abi unknown]"
msgstr ""
-#: elf32-mips.c:2708
+#: elf32-mips.c:3245
msgid " [abi=N32]"
msgstr ""
-#: elf32-mips.c:2710
+#: elf32-mips.c:3247
msgid " [abi=64]"
msgstr ""
-#: elf32-mips.c:2712
+#: elf32-mips.c:3249
msgid " [no abi set]"
msgstr ""
-#: elf32-mips.c:2715
+#: elf32-mips.c:3252
msgid " [mips1]"
msgstr ""
-#: elf32-mips.c:2717
+#: elf32-mips.c:3254
msgid " [mips2]"
msgstr ""
-#: elf32-mips.c:2719
+#: elf32-mips.c:3256
msgid " [mips3]"
msgstr ""
-#: elf32-mips.c:2721
+#: elf32-mips.c:3258
msgid " [mips4]"
msgstr ""
-#: elf32-mips.c:2723
+#: elf32-mips.c:3260
msgid " [mips5]"
msgstr ""
-#: elf32-mips.c:2725
+#: elf32-mips.c:3262
msgid " [mips32]"
msgstr ""
-#: elf32-mips.c:2727
+#: elf32-mips.c:3264
msgid " [mips64]"
msgstr ""
-#: elf32-mips.c:2729
+#: elf32-mips.c:3266
msgid " [unknown ISA]"
msgstr ""
-#: elf32-mips.c:2732
+#: elf32-mips.c:3269
msgid " [32bitmode]"
msgstr ""
-#: elf32-mips.c:2734
+#: elf32-mips.c:3271
msgid " [not 32bitmode]"
msgstr ""
-#: elf32-mips.c:4388
+#: elf32-mips.c:4947
msgid "static procedure (no name)"
msgstr ""
-#: elf32-mips.c:5005 elf64-alpha.c:4377
+#: elf32-mips.c:5565 elf64-mips.c:6694
#, c-format
msgid "%s: illegal section name `%s'"
msgstr ""
-#: elf32-mips.c:5570
+#: elf32-mips.c:6132 elf64-mips.c:3150
msgid "not enough GOT space for local GOT entries"
msgstr ""
-#: elf32-mips.c:6686
+#: elf32-mips.c:7238 elf64-mips.c:4203
#, c-format
msgid "%s: %s+0x%lx: jump to stub routine which is not jal"
msgstr ""
-#: elf32-mips.c:7673
+#: elf32-mips.c:8237 elf64-mips.c:5891
#, c-format
-msgid "Malformed reloc detected for section %s"
+msgid "%s: Malformed reloc detected for section %s"
msgstr ""
-#: elf32-mips.c:7750
+#: elf32-mips.c:8315 elf64-mips.c:5969
#, c-format
msgid "%s: CALL16 reloc at 0x%lx not against global symbol"
msgstr ""
-#: elf32-ppc.c:1443
+#: elf32-ppc.c:1436 elf64-ppc.c:1503
#, c-format
msgid ""
"%s: compiled with -mrelocatable and linked with modules compiled normally"
msgstr ""
-#: elf32-ppc.c:1451
+#: elf32-ppc.c:1444 elf64-ppc.c:1511
#, c-format
msgid ""
"%s: compiled normally and linked with modules compiled with -mrelocatable"
msgstr ""
-#: elf32-ppc.c:1578
+#: elf32-ppc.c:1568
#, c-format
msgid "%s: Unknown special linker type %d"
msgstr ""
-#: elf32-ppc.c:2245 elf32-ppc.c:2279 elf32-ppc.c:2314
+#: elf32-ppc.c:2218 elf32-ppc.c:2252 elf32-ppc.c:2287
#, c-format
msgid "%s: relocation %s cannot be used when making a shared object"
msgstr ""
-#: elf32-ppc.c:3129
+#: elf32-ppc.c:3097 elf64-ppc.c:3500
#, c-format
msgid "%s: unknown relocation type %d for symbol %s"
msgstr ""
-#: elf32-ppc.c:3493 elf32-ppc.c:3514 elf32-ppc.c:3564
+#: elf32-ppc.c:3452 elf32-ppc.c:3473 elf32-ppc.c:3523
#, c-format
msgid ""
"%s: The target (%s) of a %s relocation is in the wrong output section (%s)"
msgstr ""
-#: elf32-ppc.c:3630
+#: elf32-ppc.c:3589
#, c-format
msgid "%s: Relocation %s is not yet supported for symbol %s."
msgstr ""
-#: elf32-sh.c:1084
+#: elf32-sh.c:1101
#, c-format
msgid "%s: 0x%lx: warning: bad R_SH_USES offset"
msgstr ""
-#: elf32-sh.c:1096
+#: elf32-sh.c:1113
#, c-format
msgid "%s: 0x%lx: warning: R_SH_USES points to unrecognized insn 0x%x"
msgstr ""
-#: elf32-sh.c:1113
+#: elf32-sh.c:1130
#, c-format
msgid "%s: 0x%lx: warning: bad R_SH_USES load offset"
msgstr ""
-#: elf32-sh.c:1128
+#: elf32-sh.c:1145
#, c-format
msgid "%s: 0x%lx: warning: could not find expected reloc"
msgstr ""
-#: elf32-sh.c:1165
+#: elf32-sh.c:1202
#, c-format
msgid "%s: 0x%lx: warning: symbol in unexpected section"
msgstr ""
-#: elf32-sh.c:1287
+#: elf32-sh.c:1323
#, c-format
msgid "%s: 0x%lx: warning: could not find expected COUNT reloc"
msgstr ""
-#: elf32-sh.c:1296
+#: elf32-sh.c:1332
#, c-format
msgid "%s: 0x%lx: warning: bad count"
msgstr ""
-#: elf32-sh.c:1689 elf32-sh.c:2076
+#: elf32-sh.c:1741 elf32-sh.c:2132
#, c-format
msgid "%s: 0x%lx: fatal: reloc overflow while relaxing"
msgstr ""
-#: elf32-sparc.c:1512 elf64-sparc.c:2262
+#: elf32-sh.c:3267
+#, c-format
+msgid "%s: 0x%lx: fatal: unaligned branch target for relax-support relocation"
+msgstr ""
+
+#: elf32-sparc.c:1554 elf64-sparc.c:2286
#, c-format
msgid "%s: probably compiled without -fPIC?"
msgstr ""
-#: elf32-sparc.c:1962
+#: elf32-sparc.c:2007
#, c-format
msgid "%s: compiled for a 64 bit system and target is 32 bit"
msgstr ""
-#: elf32-sparc.c:1976
+#: elf32-sparc.c:2021
#, c-format
msgid "%s: linking little endian files with big endian files"
msgstr ""
-#: elf32-v850.c:677
+#: elf32-v850.c:682
#, c-format
msgid "Variable `%s' cannot occupy in multiple small data regions"
msgstr ""
-#: elf32-v850.c:680
+#: elf32-v850.c:685
#, c-format
msgid ""
"Variable `%s' can only be in one of the small, zero, and tiny data regions"
msgstr ""
-#: elf32-v850.c:683
+#: elf32-v850.c:688
#, c-format
msgid ""
"Variable `%s' cannot be in both small and zero data regions simultaneously"
msgstr ""
-#: elf32-v850.c:686
+#: elf32-v850.c:691
#, c-format
msgid ""
"Variable `%s' cannot be in both small and tiny data regions simultaneously"
msgstr ""
-#: elf32-v850.c:689
+#: elf32-v850.c:694
#, c-format
msgid ""
"Variable `%s' cannot be in both zero and tiny data regions simultaneously"
msgstr ""
-#: elf32-v850.c:1066
+#: elf32-v850.c:1072
msgid "FAILED to find previous HI16 reloc\n"
msgstr ""
-#: elf32-v850.c:1684
+#: elf32-v850.c:1703
msgid "could not locate special linker symbol __gp"
msgstr ""
-#: elf32-v850.c:1688
+#: elf32-v850.c:1707
msgid "could not locate special linker symbol __ep"
msgstr ""
-#: elf32-v850.c:1692
+#: elf32-v850.c:1711
msgid "could not locate special linker symbol __ctbp"
msgstr ""
-#: elf32-v850.c:1881
+#: elf32-v850.c:1877
#, c-format
msgid "%s: Architecture mismatch with previous modules"
msgstr ""
-#: elf32-v850.c:1900
+#: elf32-v850.c:1897
#, c-format
msgid "private flags = %lx: "
msgstr ""
-#: elf32-v850.c:1905
+#: elf32-v850.c:1902
msgid "v850 architecture"
msgstr ""
-#: elf32-v850.c:1906
+#: elf32-v850.c:1903
msgid "v850e architecture"
msgstr ""
-#: elf32-v850.c:1907
+#: elf32-v850.c:1904
msgid "v850ea architecture"
msgstr ""
-#: elf64-alpha.c:951
+#: elf64-alpha.c:858
msgid "GPDISP relocation did not find ldah and lda instructions"
msgstr ""
-#: elf64-alpha.c:3014
+#: elf64-alpha.c:2934
#, c-format
msgid "%s: .got subsegment exceeds 64K (size %d)"
msgstr ""
-#: elf64-sparc.c:1248
+#: elf64-alpha.c:3518 elf64-alpha.c:3530
#, c-format
-msgid "%s: check_relocs: unhandled reloc type %d"
+msgid "%s: gp-relative relocation against dynamic symbol %s"
msgstr ""
-#: elf64-sparc.c:1285
-msgid "%s: Only registers %%g[2367] can be declared using STT_REGISTER"
-msgstr ""
-
-#: elf64-sparc.c:1305
-msgid ""
-"Register %%g%d used incompatibly: previously declared in %s to %s, in %s "
-"redefined to %s"
-msgstr ""
-
-#: elf64-sparc.c:1328
+#: elf64-hppa.c:2070
#, c-format
-msgid "Symbol `%s' has differing types: previously %s, REGISTER in %s"
+msgid "stub entry for %s cannot load .plt, dp offset = %ld"
msgstr ""
-#: elf64-sparc.c:1374
+#: elf64-mmix.c:1268
#, c-format
-msgid "Symbol `%s' has differing types: REGISTER in %s, %s in %s"
+msgid "%s: register relocation against non-register symbol: %s in %s"
msgstr ""
-#: elf64-sparc.c:2952
-#, c-format
-msgid "%s: linking UltraSPARC specific with HAL specific code"
+#: elf64-mmix.c:1270
+msgid "(unknown)"
msgstr ""
-#: elf.c:325
+#: elf64-mmix.c:1305
#, c-format
-msgid "%s: invalid string offset %u >= %lu for section `%s'"
+msgid "%s: directive LOCAL valid only with a register or absolute value"
msgstr ""
-#: elf.c:566
+#: elf64-mmix.c:1333
+#, c-format
msgid ""
-"\n"
-"Program Header:\n"
+"%s: LOCAL directive: Register $%ld is not a local register. First global "
+"register is $%ld."
msgstr ""
-#: elf.c:614
+#: elf64-mmix.c:1609
+#, c-format
msgid ""
-"\n"
-"Dynamic Section:\n"
+"%s: Error: multiple definition of `%s'; start of %s is set in a earlier "
+"linked file\n"
msgstr ""
-#: elf.c:743
-msgid ""
-"\n"
-"Version definitions:\n"
+#: elf64-mmix.c:1668
+msgid "Register section has contents\n"
msgstr ""
-#: elf.c:766
-msgid ""
-"\n"
-"Version References:\n"
+#: elf64-ppc.c:1466 libbfd.c:1436
+#, c-format
+msgid "%s: compiled for a big endian system and target is little endian"
msgstr ""
-#: elf.c:771
+#: elf64-ppc.c:1468 libbfd.c:1438
#, c-format
-msgid " required from %s:\n"
+msgid "%s: compiled for a little endian system and target is big endian"
msgstr ""
-#: elf.c:1359
+#: elf64-ppc.c:3166
#, c-format
-msgid "%s: invalid link %lu for reloc section %s (index %u)"
+msgid "linkage table overflow against `%s'"
msgstr ""
-#: elf.c:2113
-#, c-format
-msgid ""
-"creating section symbol, name = %s, value = 0x%.8lx, index = %d, section = "
-"0x%.8lx\n"
+#: elf64-ppc.c:3244
+msgid "stub section size doesn't match calculated size"
msgstr ""
-#: elf.c:2716
+#: elf64-ppc.c:3845
#, c-format
-msgid "%s: Not enough room for program headers (allocated %u, need %u)"
+msgid "%s: Relocation %s is not supported for symbol %s."
msgstr ""
-#: elf.c:2815
+#: elf64-ppc.c:3889
#, c-format
-msgid "%s: Not enough room for program headers, try linking with -N"
+msgid "%s: error: relocation %s not a multiple of 4"
msgstr ""
-#: elf.c:2941
+#: elf64-sparc.c:1277
#, c-format
-msgid "Error: First section in segment (%s) starts at 0x%x"
+msgid "%s: check_relocs: unhandled reloc type %d"
msgstr ""
-#: elf.c:2944
+#: elf64-sparc.c:1314
#, c-format
-msgid " whereas segment starts at 0x%x"
+msgid "%s: Only registers %%g[2367] can be declared using STT_REGISTER"
msgstr ""
-#: elf.c:3217
+#: elf64-sparc.c:1334
#, c-format
-msgid "%s: warning: allocated section `%s' not in segment"
+msgid "Register %%g%d used incompatibly: %s in %s"
msgstr ""
-#: elf.c:3616
+#: elf64-sparc.c:1338 elf64-sparc.c:1362 elf64-sparc.c:1411
#, c-format
-msgid "%s: symbol `%s' required but not present"
+msgid " previously %s in %s"
msgstr ""
-#: elf.c:3625
+#: elf64-sparc.c:1359 elf64-sparc.c:1408
#, c-format
-msgid ""
-"elf_symbol_from_bfd_symbol 0x%.8lx, name = %s, sym num = %d, flags = "
-"0x%.8lx%s\n"
+msgid "Symbol `%s' has differing types: %s in %s"
msgstr ""
-#: elf.c:3866
+#: elf64-sparc.c:3014
#, c-format
-msgid "%s: warning: Empty loadable segment detected\n"
+msgid "%s: linking UltraSPARC specific with HAL specific code"
msgstr ""
-#: elf.c:5213
+#: elfcode.h:1218
#, c-format
-msgid "%s: unsupported relocation type %s"
+msgid "%s: version count (%ld) does not match symbol count (%ld)"
msgstr ""
-#: elfcode.h:1084
+#: elflink.c:434
#, c-format
-msgid "%s: version count (%ld) does not match symbol count (%ld)"
+msgid "%s: Section %s is too large to add hole of %ld bytes"
msgstr ""
-#: elflink.c:432
+#: elflink.h:1113
#, c-format
-msgid "%s: Section %s is already to large to put hole of %ld bytes in"
+msgid "%s: warning: unexpected redefinition of `%s'"
msgstr ""
-#: elflink.h:1465
+#: elflink.h:1784
#, c-format
msgid "%s: %s: invalid version %u (max %d)"
msgstr ""
-#: elflink.h:1506
+#: elflink.h:1825
#, c-format
msgid "%s: %s: invalid needed version %d"
msgstr ""
-#: elflink.h:1626
+#: elflink.h:1945
#, c-format
msgid "Warning: size of symbol `%s' changed from %lu to %lu in %s"
msgstr ""
-#: elflink.h:1872
-#, c-format
-msgid "%s: warning: unexpected redefinition of `%s'"
-msgstr ""
-
-#: elflink.h:3659
+#: elflink.h:4020
#, c-format
msgid "warning: type and size of dynamic symbol `%s' are not defined"
msgstr ""
-#: elflink.h:3931
+#: elflink.h:4329
#, c-format
msgid "%s: undefined versioned symbol name %s"
msgstr ""
-#: elflink.h:5180
+#: elflink.h:4559 elflink.h:4567 elflink.h:6218 elflink.h:7295
+msgid "Error: out of memory"
+msgstr ""
+
+#: elflink.h:4729
+msgid "Not enough memory to sort relocations"
+msgstr ""
+
+#: elflink.h:5995
#, c-format
msgid "%s: could not find output section %s for input section %s"
msgstr ""
-#: i386linux.c:450 m68klinux.c:454 sparclinux.c:452
+#: elflink.h:6568
+msgid "warning: relocation against removed section; zeroing"
+msgstr ""
+
+#: elflink.h:6598
+msgid "warning: relocation against removed section"
+msgstr ""
+
+#: elflink.h:6611
+#, c-format
+msgid "local symbols in discarded section %s"
+msgstr ""
+
+#: i386linux.c:455 m68klinux.c:459 sparclinux.c:456
#, c-format
msgid "Output file requires shared library `%s'\n"
msgstr ""
-#: i386linux.c:458 m68klinux.c:462 sparclinux.c:460
+#: i386linux.c:463 m68klinux.c:467 sparclinux.c:464
#, 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
+#: i386linux.c:653 i386linux.c:703 m68klinux.c:660 m68klinux.c:708
+#: sparclinux.c:655 sparclinux.c:705
#, c-format
msgid "Symbol %s not defined for fixups\n"
msgstr ""
-#: i386linux.c:720 m68klinux.c:725 sparclinux.c:723
+#: i386linux.c:727 m68klinux.c:732 sparclinux.c:729
msgid "Warning: fixup count mismatch\n"
msgstr ""
-#: ieee.c:167
+#: ieee.c:235
#, c-format
msgid "%s: string too long (%d chars, max 65535)"
msgstr ""
-#: ieee.c:297
+#: ieee.c:365
#, c-format
msgid "%s: unrecognized symbol `%s' flags 0x%x"
msgstr ""
-#: ieee.c:793
+#: ieee.c:877
#, c-format
msgid "%s: unimplemented ATI record %u for symbol %u"
msgstr ""
-#: ieee.c:818
+#: ieee.c:902
#, c-format
msgid "%s: unexpected ATN type %d in external part"
msgstr ""
-#: ieee.c:840
+#: ieee.c:924
#, c-format
msgid "%s: unexpected type after ATN"
msgstr ""
-#: ihex.c:259
+#: ihex.c:258
#, c-format
msgid "%s:%d: unexpected character `%s' in Intel Hex file\n"
msgstr ""
-#: ihex.c:369
+#: ihex.c:368
#, c-format
-msgid "%s:%d: bad checksum in Intel Hex file (expected %u, found %u)"
+msgid "%s:%u: bad checksum in Intel Hex file (expected %u, found %u)"
msgstr ""
-#: ihex.c:421
+#: ihex.c:422
#, c-format
-msgid "%s:%d: bad extended address record length in Intel Hex file"
+msgid "%s:%u: bad extended address record length in Intel Hex file"
msgstr ""
-#: ihex.c:438
+#: ihex.c:439
#, c-format
-msgid "%s:%d: bad extended start address length in Intel Hex file"
+msgid "%s:%u: bad extended start address length in Intel Hex file"
msgstr ""
-#: ihex.c:455
+#: ihex.c:456
#, c-format
-msgid "%s:%d: bad extended linear address record length in Intel Hex file"
+msgid "%s:%u: bad extended linear address record length in Intel Hex file"
msgstr ""
-#: ihex.c:472
+#: ihex.c:473
#, c-format
-msgid "%s:%d: bad extended linear start address length in Intel Hex file"
+msgid "%s:%u: bad extended linear start address length in Intel Hex file"
msgstr ""
-#: ihex.c:489
+#: ihex.c:490
#, c-format
-msgid "%s:%d: unrecognized ihex type %u in Intel Hex file\n"
+msgid "%s:%u: unrecognized ihex type %u in Intel Hex file\n"
msgstr ""
-#: ihex.c:609
+#: ihex.c:610
#, c-format
msgid "%s: internal error in ihex_read_section"
msgstr ""
-#: ihex.c:644
+#: ihex.c:645
#, c-format
msgid "%s: bad section length in ihex_read_section"
msgstr ""
-#: ihex.c:858
+#: ihex.c:863
#, c-format
msgid "%s: address 0x%s out of range for Intex Hex file"
msgstr ""
-#: libbfd.c:471
+#: libbfd.c:492
#, c-format
msgid "not mapping: data=%lx mapped=%d\n"
msgstr ""
-#: libbfd.c:474
+#: libbfd.c:495
msgid "not mapping: env var not set\n"
msgstr ""
-#: libbfd.c:1370
-#, c-format
-msgid "%s: compiled for a big endian system and target is little endian"
-msgstr ""
-
-#: libbfd.c:1372
+#: libbfd.c:1463
#, c-format
-msgid "%s: compiled for a little endian system and target is big endian"
+msgid "Deprecated %s called"
msgstr ""
-#: linker.c:2678
+#: libbfd.c:1465
#, c-format
-msgid "Attempt to do relocateable link with %s input and %s output"
+msgid " at %s line %d in %s\n"
msgstr ""
-#: oasys.c:1016
+#: linker.c:1849
#, c-format
-msgid "%s: can not represent section `%s' in oasys"
+msgid "%s: indirect symbol `%s' to `%s' is a loop"
msgstr ""
-#: osf-core.c:146
+#: linker.c:2745
#, c-format
-msgid "Unhandled OSF/1 core file section type %d\n"
+msgid "Attempt to do relocateable link with %s input and %s output"
msgstr ""
-#. XXX code yet to be written.
-#: peicode.h:807
+#: merge.c:897
#, c-format
-msgid "%s: Unhandled import type; %x"
+msgid "%s: access beyond end of merged section (%ld + %ld)"
msgstr ""
-#: peicode.h:812
+#: mmo.c:460
#, c-format
-msgid "%s: Unrecognised import type; %x"
+msgid "%s: No core to allocate section name %s\n"
msgstr ""
-#: peicode.h:826
+#: mmo.c:537
#, c-format
-msgid "%s: Unrecognised import name type; %x"
+msgid "%s: No core to allocate a symbol %d bytes long\n"
msgstr ""
-#: peicode.h:1183
+#: mmo.c:1190
#, c-format
-msgid "%s: Unrecognised machine type (0x%x) in Import Library Format archive"
+msgid "%s: invalid mmo file: initialization value for $255 is not `Main'\n"
msgstr ""
-#: peicode.h:1195
+#: mmo.c:1336
#, c-format
msgid ""
-"%s: Recognised but unhandled machine type (0x%x) in Import Library Format "
-"archive"
+"%s: unsupported wide character sequence 0x%02X 0x%02X after symbol name "
+"starting with `%s'\n"
msgstr ""
-#: peicode.h:1212
+#: mmo.c:1571
#, c-format
-msgid "%s: size field is zero in Import Library Format header"
+msgid "%s: invalid mmo file: unsupported lopcode `%d'\n"
msgstr ""
-#: peicode.h:1240
+#: mmo.c:1581
#, c-format
-msgid "%s: string not null terminated in ILF object file."
+msgid "%s: invalid mmo file: expected YZ = 1 got YZ = %d for lop_quote\n"
msgstr ""
-#: peigen.c:993
+#: mmo.c:1617
#, c-format
-msgid "%s: line number overflow: 0x%lx > 0xffff"
+msgid "%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_loc\n"
msgstr ""
-#: peigen.c:1011
+#: mmo.c:1663
#, c-format
-msgid "%s: reloc overflow 1: 0x%lx > 0xffff"
-msgstr ""
-
-#: peigen.c:1024
-msgid "Export Directory [.edata (or where ever we found it)]"
-msgstr ""
-
-#: peigen.c:1025
-msgid "Import Directory [parts of .idata]"
-msgstr ""
-
-#: peigen.c:1026
-msgid "Resource Directory [.rsrc]"
-msgstr ""
-
-#: peigen.c:1027
-msgid "Exception Directory [.pdata]"
-msgstr ""
-
-#: peigen.c:1028
-msgid "Security Directory"
-msgstr ""
-
-#: peigen.c:1029
-msgid "Base Relocation Directory [.reloc]"
-msgstr ""
-
-#: peigen.c:1030
-msgid "Debug Directory"
-msgstr ""
-
-#: peigen.c:1031
-msgid "Description Directory"
-msgstr ""
-
-#: peigen.c:1032
-msgid "Special Directory"
-msgstr ""
-
-#: peigen.c:1033
-msgid "Thread Storage Directory [.tls]"
-msgstr ""
-
-#: peigen.c:1034
-msgid "Load Configuration Directory"
-msgstr ""
-
-#: peigen.c:1035
-msgid "Bound Import Directory"
-msgstr ""
-
-#: peigen.c:1036
-msgid "Import Address Table Directory"
-msgstr ""
-
-#: peigen.c:1037
-msgid "Delay Import Directory"
-msgstr ""
-
-#: peigen.c:1038 peigen.c:1039
-msgid "Reserved"
-msgstr ""
-
-#: peigen.c:1103
msgid ""
-"\n"
-"There is an import table, but the section containing it could not be found\n"
+"%s: invalid mmo file: expected z = 1 or z = 2, got z = %d for lop_fixo\n"
msgstr ""
-#: peigen.c:1108
+#: mmo.c:1702
#, c-format
-msgid ""
-"\n"
-"There is an import table in %s at 0x%lx\n"
+msgid "%s: invalid mmo file: expected y = 0, got y = %d for lop_fixrx\n"
msgstr ""
-#: peigen.c:1147
+#: mmo.c:1711
#, c-format
msgid ""
-"\n"
-"Function descriptor located at the start address: %04lx\n"
+"%s: invalid mmo file: expected z = 16 or z = 24, got z = %d for lop_fixrx\n"
msgstr ""
-#: peigen.c:1150
+#: mmo.c:1734
#, c-format
-msgid "\tcode-base %08lx toc (loadable/actual) %08lx/%08lx\n"
-msgstr ""
-
-#: peigen.c:1156
msgid ""
-"\n"
-"No reldata section! Function descriptor not decoded.\n"
+"%s: invalid mmo file: leading byte of operand word must be 0 or 1, got %d "
+"for lop_fixrx\n"
msgstr ""
-#: peigen.c:1161
+#: mmo.c:1757
#, c-format
-msgid ""
-"\n"
-"The Import Tables (interpreted %s section contents)\n"
-msgstr ""
-
-#: peigen.c:1164
-msgid " vma: Hint Time Forward DLL First\n"
-msgstr ""
-
-#: peigen.c:1166
-msgid " Table Stamp Chain Name Thunk\n"
+msgid "%s: cannot allocate file name for file number %d, %d bytes\n"
msgstr ""
-#: peigen.c:1216
+#: mmo.c:1777
#, c-format
msgid ""
-"\n"
-"\tDLL Name: %s\n"
-msgstr ""
-
-#: peigen.c:1220 peigen.c:1283
-msgid "\tvma: Hint/Ord Member-Name\n"
-msgstr ""
-
-#: peigen.c:1282
-msgid "\tThe Import Address Table (difference found)\n"
-msgstr ""
-
-#: peigen.c:1289
-msgid "\t>>> Ran out of IAT members!\n"
-msgstr ""
-
-#: peigen.c:1308
-msgid "\tThe Import Address Table is identical\n"
-msgstr ""
-
-#: peigen.c:1381
-msgid ""
-"\n"
-"There is an export table, but the section containing it could not be found\n"
+"%s: invalid mmo file: file number %d `%s', was already entered as `%s'\n"
msgstr ""
-#: peigen.c:1386
+#: mmo.c:1790
#, c-format
msgid ""
-"\n"
-"There is an export table in %s at 0x%lx\n"
+"%s: invalid mmo file: file name for number %d was not specified before use\n"
msgstr ""
-#: peigen.c:1417
+#: mmo.c:1896
#, c-format
msgid ""
-"\n"
-"The Export Tables (interpreted %s section contents)\n"
-"\n"
+"%s: invalid mmo file: fields y and z of lop_stab non-zero, y: %d, z: %d\n"
msgstr ""
-#: peigen.c:1421
+#: mmo.c:1932
#, c-format
-msgid "Export Flags \t\t\t%lx\n"
+msgid "%s: invalid mmo file: lop_end not last item in file\n"
msgstr ""
-#: peigen.c:1424
+#: mmo.c:1945
#, c-format
-msgid "Time/Date stamp \t\t%lx\n"
+msgid ""
+"%s: invalid mmo file: YZ of lop_end (%ld) not equal to the number of tetras "
+"to the preceding lop_stab (%ld)\n"
msgstr ""
-#: peigen.c:1427
+#: mmo.c:2610
#, c-format
-msgid "Major/Minor \t\t\t%d/%d\n"
-msgstr ""
-
-#: peigen.c:1430
-msgid "Name \t\t\t\t"
+msgid "%s: invalid symbol table: duplicate symbol `%s'\n"
msgstr ""
-#: peigen.c:1436
+#: mmo.c:2898
#, c-format
-msgid "Ordinal Base \t\t\t%ld\n"
-msgstr ""
-
-#: peigen.c:1439
-msgid "Number in:\n"
+msgid ""
+"%s: Bad symbol definition: `Main' set to %s rather than the start address %"
+"s\n"
msgstr ""
-#: peigen.c:1442
+#: mmo.c:2932
#, c-format
-msgid "\tExport Address Table \t\t%08lx\n"
+msgid ""
+"%s: warning: symbol table too large for mmo, larger than 65535 32-bit words: "
+"%d. Only `Main' will be emitted.\n"
msgstr ""
-#: peigen.c:1446
+#: mmo.c:2977
#, c-format
-msgid "\t[Name Pointer/Ordinal] Table\t%08lx\n"
-msgstr ""
-
-#: peigen.c:1449
-msgid "Table Addresses\n"
-msgstr ""
-
-#: peigen.c:1452
-msgid "\tExport Address Table \t\t"
+msgid "%s: internal error, symbol table changed size from %d to %d words\n"
msgstr ""
-#: peigen.c:1457
-msgid "\tName Pointer Table \t\t"
-msgstr ""
-
-#: peigen.c:1462
-msgid "\tOrdinal Table \t\t\t"
-msgstr ""
-
-#: peigen.c:1476
+#: mmo.c:3032
#, c-format
-msgid ""
-"\n"
-"Export Address Table -- Ordinal Base %ld\n"
+msgid "%s: internal error, internal register section %s had contents\n"
msgstr ""
-#: peigen.c:1495
-msgid "Forwarder RVA"
-msgstr ""
-
-#: peigen.c:1506
-msgid "Export RVA"
-msgstr ""
-
-#: peigen.c:1513
-msgid ""
-"\n"
-"[Ordinal/Name Pointer] Table\n"
+#: mmo.c:3084
+#, c-format
+msgid "%s: no initialized registers; section length 0\n"
msgstr ""
-#: peigen.c:1568
+#: mmo.c:3090
#, c-format
-msgid "Warning, .pdata section size (%ld) is not a multiple of %d\n"
+msgid "%s: too many initialized registers; section length %ld\n"
msgstr ""
-#: peigen.c:1572
+#: mmo.c:3095
+#, c-format
msgid ""
-"\n"
-"The Function Table (interpreted .pdata section contents)\n"
-msgstr ""
-
-#: peigen.c:1575
-msgid " vma:\t\t\tBegin Address End Address Unwind Info\n"
+"%s: invalid start address for initialized registers of length %ld: 0x%lx%"
+"08lx\n"
msgstr ""
-#: peigen.c:1578
-msgid " vma:\t\tBegin End EH EH PrologEnd Exception\n"
+#: oasys.c:1036
+#, c-format
+msgid "%s: can not represent section `%s' in oasys"
msgstr ""
-#: peigen.c:1580
-msgid " \t\tAddress Address Handler Data Address Mask\n"
+#: osf-core.c:132
+#, c-format
+msgid "Unhandled OSF/1 core file section type %d\n"
msgstr ""
-#: peigen.c:1652
-msgid " Register save millicode"
+#: pe-mips.c:658
+#, c-format
+msgid "%s: `ld -r' not supported with PE MIPS objects\n"
msgstr ""
-#: peigen.c:1655
-msgid " Register restore millicode"
+#. OK, at this point the following variables are set up:
+#. src = VMA of the memory we're fixing up
+#. mem = pointer to memory we're fixing up
+#. val = VMA of what we need to refer to
+#.
+#: pe-mips.c:794
+#, c-format
+msgid "%s: unimplemented %s\n"
msgstr ""
-#: peigen.c:1658
-msgid " Glue code sequence"
+#: pe-mips.c:820
+#, c-format
+msgid "%s: jump too far away\n"
msgstr ""
-#: peigen.c:1709
-msgid ""
-"\n"
-"\n"
-"PE File Base Relocations (interpreted .reloc section contents)\n"
+#: pe-mips.c:847
+#, c-format
+msgid "%s: bad pair/reflo after refhi\n"
msgstr ""
-#: peigen.c:1744
+#. XXX code yet to be written.
+#: peicode.h:785
#, c-format
-msgid ""
-"\n"
-"Virtual Address: %08lx Chunk size %ld (0x%lx) Number of fixups %ld\n"
+msgid "%s: Unhandled import type; %x"
msgstr ""
-#: peigen.c:1757
+#: peicode.h:790
#, c-format
-msgid "\treloc %4d offset %4x [%4lx] %s"
+msgid "%s: Unrecognised import type; %x"
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:1796
+#: peicode.h:804
#, c-format
-msgid ""
-"\n"
-"Characteristics 0x%x\n"
+msgid "%s: Unrecognised import name type; %x"
msgstr ""
-#: pe-mips.c:653
+#: peicode.h:1162
#, c-format
-msgid "%s: `ld -r' not supported with PE MIPS objects\n"
+msgid "%s: Unrecognised machine type (0x%x) in Import Library Format archive"
msgstr ""
-#. OK, at this point the following variables are set up:
-#. src = VMA of the memory we're fixing up
-#. mem = pointer to memory we're fixing up
-#. val = VMA of what we need to refer to
-#.
-#: pe-mips.c:789
+#: peicode.h:1174
#, c-format
-msgid "%s: unimplemented %s\n"
+msgid ""
+"%s: Recognised but unhandled machine type (0x%x) in Import Library Format "
+"archive"
msgstr ""
-#: pe-mips.c:815
+#: peicode.h:1191
#, c-format
-msgid "%s: jump too far away\n"
+msgid "%s: size field is zero in Import Library Format header"
msgstr ""
-#: pe-mips.c:842
+#: peicode.h:1219
#, c-format
-msgid "%s: bad pair/reflo after refhi\n"
+msgid "%s: string not null terminated in ILF object file."
msgstr ""
-#: ppcboot.c:422
+#: ppcboot.c:416
msgid ""
"\n"
"ppcboot header:\n"
msgstr ""
-#: ppcboot.c:423
+#: ppcboot.c:417
#, c-format
msgid "Entry offset = 0x%.8lx (%ld)\n"
msgstr ""
-#: ppcboot.c:424
+#: ppcboot.c:418
#, c-format
msgid "Length = 0x%.8lx (%ld)\n"
msgstr ""
-#: ppcboot.c:427
+#: ppcboot.c:421
#, c-format
msgid "Flag field = 0x%.2x\n"
msgstr ""
-#: ppcboot.c:433
+#: ppcboot.c:427
#, c-format
msgid "Partition name = \"%s\"\n"
msgstr ""
-#: ppcboot.c:452
+#: ppcboot.c:446
#, c-format
msgid ""
"\n"
"Partition[%d] start = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
msgstr ""
-#: ppcboot.c:458
+#: ppcboot.c:452
#, c-format
msgid "Partition[%d] end = { 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x }\n"
msgstr ""
-#: ppcboot.c:464
+#: ppcboot.c:458
#, c-format
msgid "Partition[%d] sector = 0x%.8lx (%ld)\n"
msgstr ""
-#: ppcboot.c:465
+#: ppcboot.c:459
#, c-format
msgid "Partition[%d] length = 0x%.8lx (%ld)\n"
msgstr ""
-#: som.c:5355
+#: som.c:5402
msgid "som_sizeof_headers unimplemented"
msgstr ""
-#: srec.c:300
+#: srec.c:301
#, c-format
msgid "%s:%d: Unexpected character `%s' in S-record file\n"
msgstr ""
-#: syms.c:968
+#: syms.c:996
msgid "Unsupported .stab relocation"
msgstr ""
-#: vms-gsd.c:354
+#: vms-gsd.c:356
#, c-format
msgid "bfd_make_section (%s) failed"
msgstr ""
-#: vms-gsd.c:368
+#: vms-gsd.c:371
#, c-format
msgid "bfd_set_section_flags (%s, %x) failed"
msgstr ""
-#: vms-gsd.c:404
+#: vms-gsd.c:407
#, c-format
msgid "Size mismatch section %s=%lx, %s=%lx"
msgstr ""
-#: vms-gsd.c:699
+#: vms-gsd.c:704
#, c-format
msgid "unknown gsd/egsd subtype %d"
msgstr ""
-#: vms-hdr.c:403
+#: vms-hdr.c:406
msgid "Object module NOT error-free !\n"
msgstr ""
-#: vms-misc.c:539
+#: vms-misc.c:543
#, c-format
msgid "Stack overflow (%d) in _bfd_vms_push"
msgstr ""
-#: vms-misc.c:557
+#: vms-misc.c:561
msgid "Stack underflow in _bfd_vms_pop"
msgstr ""
-#: vms-misc.c:915
+#: vms-misc.c:919
msgid "_bfd_vms_output_counted called with zero bytes"
msgstr ""
-#: vms-misc.c:920
+#: vms-misc.c:924
msgid "_bfd_vms_output_counted called with too many bytes"
msgstr ""
-#: vms-misc.c:1051
+#: vms-misc.c:1055
#, c-format
msgid "Symbol %s replaced by %s\n"
msgstr ""
-#: vms-misc.c:1113
+#: vms-misc.c:1117
#, c-format
msgid "failed to enter %s"
msgstr ""
-#: vms-tir.c:68
+#: vms-tir.c:78
msgid "No Mem !"
msgstr ""
-#: vms-tir.c:302
+#: vms-tir.c:313
msgid "Bad section index in ETIR_S_C_STA_PQ"
msgstr ""
-#: vms-tir.c:317
+#: vms-tir.c:328
#, c-format
msgid "Unsupported STA cmd %d"
msgstr ""
-#: vms-tir.c:322 vms-tir.c:1274
+#: vms-tir.c:333 vms-tir.c:1301
#, c-format
msgid "Reserved STA cmd %d"
msgstr ""
-#: vms-tir.c:428
+#: vms-tir.c:443
#, c-format
msgid "ETIR_S_C_STO_GBL: no symbol \"%s\""
msgstr ""
-#: vms-tir.c:449
+#: vms-tir.c:465
#, c-format
msgid "ETIR_S_C_STO_CA: no symbol \"%s\""
msgstr ""
-#: vms-tir.c:462
+#: vms-tir.c:478
msgid "ETIR_S_C_STO_RB/AB: Not supported"
msgstr ""
-#: vms-tir.c:520
+#: vms-tir.c:538
msgid "ETIR_S_C_STO_LP_PSB: Not supported"
msgstr ""
-#: vms-tir.c:526
+#: vms-tir.c:544
msgid "ETIR_S_C_STO_HINT_GBL: not implemented"
msgstr ""
-#: vms-tir.c:532
+#: vms-tir.c:550
msgid "ETIR_S_C_STO_HINT_PS: not implemented"
msgstr ""
-#: vms-tir.c:536 vms-tir.c:1446
+#: vms-tir.c:554 vms-tir.c:1473
#, c-format
msgid "Reserved STO cmd %d"
msgstr ""
-#: vms-tir.c:649
+#: vms-tir.c:667
msgid "ETIR_S_C_OPR_INSV: Not supported"
msgstr ""
-#: vms-tir.c:667
+#: vms-tir.c:685
msgid "ETIR_S_C_OPR_USH: Not supported"
msgstr ""
-#: vms-tir.c:673
+#: vms-tir.c:691
msgid "ETIR_S_C_OPR_ROT: Not supported"
msgstr ""
-#: vms-tir.c:692
+#: vms-tir.c:710
msgid "ETIR_S_C_OPR_REDEF: Not supported"
msgstr ""
-#: vms-tir.c:698
+#: vms-tir.c:716
msgid "ETIR_S_C_OPR_DFLIT: Not supported"
msgstr ""
-#: vms-tir.c:702 vms-tir.c:1641
+#: vms-tir.c:720 vms-tir.c:1668
#, c-format
msgid "Reserved OPR cmd %d"
msgstr ""
-#: vms-tir.c:770 vms-tir.c:1710
+#: vms-tir.c:788 vms-tir.c:1737
#, c-format
msgid "Reserved CTL cmd %d"
msgstr ""
-#: vms-tir.c:798
+#: vms-tir.c:816
msgid "ETIR_S_C_STC_LP: not supported"
msgstr ""
-#: vms-tir.c:816
+#: vms-tir.c:834
msgid "ETIR_S_C_STC_GBL: not supported"
msgstr ""
-#: vms-tir.c:824
+#: vms-tir.c:842
msgid "ETIR_S_C_STC_GCA: not supported"
msgstr ""
-#: vms-tir.c:833
+#: vms-tir.c:851
msgid "ETIR_S_C_STC_PS: not supported"
msgstr ""
@@ -2024,11 +2100,11 @@ msgstr ""
#. * arg: -
#. *
#.
-#: vms-tir.c:1174
+#: vms-tir.c:1199
msgid "Stack-from-image not implemented"
msgstr ""
-#: vms-tir.c:1194
+#: vms-tir.c:1219
msgid "Stack-entry-mask not fully implemented"
msgstr ""
@@ -2041,171 +2117,526 @@ msgstr ""
#. * compare argument descriptor with symbol argument (ARG$V_PASSMECH)
#. * and stack TRUE (args match) or FALSE (args dont match) value
#.
-#: vms-tir.c:1210
+#: vms-tir.c:1235
msgid "PASSMECH not fully implemented"
msgstr ""
-#: vms-tir.c:1230
+#: vms-tir.c:1256
msgid "Stack-local-symbol not fully implemented"
msgstr ""
-#: vms-tir.c:1245
+#: vms-tir.c:1271
msgid "Stack-literal not fully implemented"
msgstr ""
-#: vms-tir.c:1267
+#: vms-tir.c:1294
msgid "Stack-local-symbol-entry-point-mask not fully implemented"
msgstr ""
-#: vms-tir.c:1442
+#: vms-tir.c:1469
#, c-format
msgid "Unimplemented STO cmd %d"
msgstr ""
-#: vms-tir.c:1581
+#: vms-tir.c:1608
msgid "TIR_S_C_OPR_ASH incomplete"
msgstr ""
-#: vms-tir.c:1595
+#: vms-tir.c:1622
msgid "TIR_S_C_OPR_USH incomplete"
msgstr ""
-#: vms-tir.c:1609
+#: vms-tir.c:1636
msgid "TIR_S_C_OPR_ROT incomplete"
msgstr ""
#.
#. * redefine symbol to current location
#.
-#: vms-tir.c:1630
+#: vms-tir.c:1657
msgid "TIR_S_C_OPR_REDEF not supported"
msgstr ""
#.
#. * define a literal
#.
-#: vms-tir.c:1637
+#: vms-tir.c:1664
msgid "TIR_S_C_OPR_DFLIT not supported"
msgstr ""
-#: vms-tir.c:1691
+#: vms-tir.c:1718
msgid "TIR_S_C_CTL_DFLOC not fully implemented"
msgstr ""
-#: vms-tir.c:1699
+#: vms-tir.c:1726
msgid "TIR_S_C_CTL_STLOC not fully implemented"
msgstr ""
-#: vms-tir.c:1707
+#: vms-tir.c:1734
msgid "TIR_S_C_CTL_STKDL not fully implemented"
msgstr ""
-#: vms-tir.c:1761
+#: vms-tir.c:1791
#, c-format
msgid "Obj code %d not found"
msgstr ""
-#: vms-tir.c:2102
+#: vms-tir.c:2137
#, c-format
msgid "SEC_RELOC with no relocs in section %s"
msgstr ""
-#: vms-tir.c:2376
+#: vms-tir.c:2424
#, c-format
msgid "Unhandled relocation %s"
msgstr ""
-#: xcofflink.c:1634
+#: xcofflink.c:1241
#, c-format
msgid "%s: `%s' has line numbers but no enclosing section"
msgstr ""
-#: xcofflink.c:1686
+#: xcofflink.c:1294
#, c-format
msgid "%s: class %d symbol `%s' has no aux entries"
msgstr ""
-#: xcofflink.c:1709
+#: xcofflink.c:1317
#, c-format
msgid "%s: symbol `%s' has unrecognized csect type %d"
msgstr ""
-#: xcofflink.c:1721
+#: xcofflink.c:1329
#, c-format
msgid "%s: bad XTY_ER symbol `%s': class %d scnum %d scnlen %d"
msgstr ""
-#: xcofflink.c:1760
+#: xcofflink.c:1365
#, c-format
msgid "%s: XMC_TC0 symbol `%s' is class %d scnlen %d"
msgstr ""
-#: xcofflink.c:1883
-#, c-format
-msgid "%s: symbol `%s' has unrecognized smclas %d"
-msgstr ""
-
-#: xcofflink.c:1902
+#: xcofflink.c:1517
#, c-format
msgid "%s: csect `%s' not in enclosing section"
msgstr ""
-#: xcofflink.c:2006
+#: xcofflink.c:1624
#, c-format
msgid "%s: misplaced XTY_LD `%s'"
msgstr ""
-#: xcofflink.c:2317
+#: xcofflink.c:1948
#, c-format
msgid "%s: reloc %s:%d not in csect"
msgstr ""
-#: xcofflink.c:2452
+#: xcofflink.c:2083
#, c-format
msgid "%s: XCOFF shared object when not producing XCOFF output"
msgstr ""
-#: xcofflink.c:2473
+#: xcofflink.c:2104
#, c-format
msgid "%s: dynamic object with no .loader section"
msgstr ""
-#: xcofflink.c:3113
+#: xcofflink.c:2749
#, c-format
msgid "%s: no such symbol"
msgstr ""
-#: xcofflink.c:3704
+#: xcofflink.c:2890
+msgid "error: undefined symbol __rtinit"
+msgstr ""
+
+#: xcofflink.c:3458
#, c-format
msgid "warning: attempt to export undefined symbol `%s'"
msgstr ""
-#: xcofflink.c:4698
+#: xcofflink.c:4452
#, c-format
msgid "TOC overflow: 0x%lx > 0x10000; try -mminimal-toc when compiling"
msgstr ""
-#: xcofflink.c:5523 xcofflink.c:5879 xcofflink.c:5916 xcofflink.c:6233
+#: xcofflink.c:5292 xcofflink.c:5754 xcofflink.c:5816 xcofflink.c:6117
#, c-format
msgid "%s: loader reloc in unrecognized section `%s'"
msgstr ""
-#: xcofflink.c:5545 xcofflink.c:6244
+#: xcofflink.c:5314 xcofflink.c:6128
#, c-format
msgid "%s: `%s' in loader reloc but not loader sym"
msgstr ""
-#: xcofflink.c:5560
+#: xcofflink.c:5329
#, c-format
msgid "%s: loader reloc in read-only section %s"
msgstr ""
-#: xcofflink.c:6440
+#: elf32-ia64.c:2190 elf64-ia64.c:2190
+msgid "@pltoff reloc against local symbol"
+msgstr ""
+
+#: elf32-ia64.c:2248 elf64-ia64.c:2248
+msgid "non-zero addend in @fptr reloc"
+msgstr ""
+
+#: elf32-ia64.c:3414 elf64-ia64.c:3414
#, c-format
-msgid "%s: unsupported relocation type 0x%02x"
+msgid "%s: short data segment overflowed (0x%lx >= 0x400000)"
msgstr ""
-#: xcofflink.c:6486
+#: elf32-ia64.c:3425 elf64-ia64.c:3425
#, c-format
-msgid "%s: TOC reloc at 0x%x to symbol `%s' with no TOC entry"
+msgid "%s: __gp does not cover short data segment"
+msgstr ""
+
+#: elf32-ia64.c:3729 elf64-ia64.c:3729
+#, c-format
+msgid "%s: linking non-pic code in a shared library"
+msgstr ""
+
+#: elf32-ia64.c:3762 elf64-ia64.c:3762
+#, c-format
+msgid "%s: @gprel relocation against dynamic symbol %s"
+msgstr ""
+
+#: elf32-ia64.c:3901 elf64-ia64.c:3901
+#, c-format
+msgid "%s: dynamic relocation against speculation fixup"
+msgstr ""
+
+#: elf32-ia64.c:3909 elf64-ia64.c:3909
+#, c-format
+msgid "%s: speculation fixup against undefined weak symbol"
+msgstr ""
+
+#: elf32-ia64.c:4093 elf64-ia64.c:4093
+msgid "unsupported reloc"
+msgstr ""
+
+#: elf32-ia64.c:4373 elf64-ia64.c:4373
+#, c-format
+msgid "%s: linking trap-on-NULL-dereference with non-trapping files"
+msgstr ""
+
+#: elf32-ia64.c:4382 elf64-ia64.c:4382
+#, c-format
+msgid "%s: linking big-endian files with little-endian files"
+msgstr ""
+
+#: elf32-ia64.c:4391 elf64-ia64.c:4391
+#, c-format
+msgid "%s: linking 64-bit files with 32-bit files"
+msgstr ""
+
+#: elf32-ia64.c:4400 elf64-ia64.c:4400
+#, c-format
+msgid "%s: linking constant-gp files with non-constant-gp files"
+msgstr ""
+
+#: elf32-ia64.c:4410 elf64-ia64.c:4410
+#, c-format
+msgid "%s: linking auto-pic files with non-auto-pic files"
+msgstr ""
+
+#: peigen.c:964 pepigen.c:964
+#, c-format
+msgid "%s: line number overflow: 0x%lx > 0xffff"
+msgstr ""
+
+#: peigen.c:981 pepigen.c:981
+#, c-format
+msgid "%s: reloc overflow 1: 0x%lx > 0xffff"
+msgstr ""
+
+#: peigen.c:995 pepigen.c:995
+msgid "Export Directory [.edata (or where ever we found it)]"
+msgstr ""
+
+#: peigen.c:996 pepigen.c:996
+msgid "Import Directory [parts of .idata]"
+msgstr ""
+
+#: peigen.c:997 pepigen.c:997
+msgid "Resource Directory [.rsrc]"
+msgstr ""
+
+#: peigen.c:998 pepigen.c:998
+msgid "Exception Directory [.pdata]"
+msgstr ""
+
+#: peigen.c:999 pepigen.c:999
+msgid "Security Directory"
+msgstr ""
+
+#: peigen.c:1000 pepigen.c:1000
+msgid "Base Relocation Directory [.reloc]"
+msgstr ""
+
+#: peigen.c:1001 pepigen.c:1001
+msgid "Debug Directory"
+msgstr ""
+
+#: peigen.c:1002 pepigen.c:1002
+msgid "Description Directory"
+msgstr ""
+
+#: peigen.c:1003 pepigen.c:1003
+msgid "Special Directory"
+msgstr ""
+
+#: peigen.c:1004 pepigen.c:1004
+msgid "Thread Storage Directory [.tls]"
+msgstr ""
+
+#: peigen.c:1005 pepigen.c:1005
+msgid "Load Configuration Directory"
+msgstr ""
+
+#: peigen.c:1006 pepigen.c:1006
+msgid "Bound Import Directory"
+msgstr ""
+
+#: peigen.c:1007 pepigen.c:1007
+msgid "Import Address Table Directory"
+msgstr ""
+
+#: peigen.c:1008 pepigen.c:1008
+msgid "Delay Import Directory"
+msgstr ""
+
+#: peigen.c:1009 peigen.c:1010 pepigen.c:1009 pepigen.c:1010
+msgid "Reserved"
+msgstr ""
+
+#: peigen.c:1073 pepigen.c:1073
+msgid ""
+"\n"
+"There is an import table, but the section containing it could not be found\n"
+msgstr ""
+
+#: peigen.c:1078 pepigen.c:1078
+#, c-format
+msgid ""
+"\n"
+"There is an import table in %s at 0x%lx\n"
+msgstr ""
+
+#: peigen.c:1115 pepigen.c:1115
+#, c-format
+msgid ""
+"\n"
+"Function descriptor located at the start address: %04lx\n"
+msgstr ""
+
+#: peigen.c:1118 pepigen.c:1118
+#, c-format
+msgid "\tcode-base %08lx toc (loadable/actual) %08lx/%08lx\n"
+msgstr ""
+
+#: peigen.c:1124 pepigen.c:1124
+msgid ""
+"\n"
+"No reldata section! Function descriptor not decoded.\n"
+msgstr ""
+
+#: peigen.c:1129 pepigen.c:1129
+#, c-format
+msgid ""
+"\n"
+"The Import Tables (interpreted %s section contents)\n"
+msgstr ""
+
+#: peigen.c:1132 pepigen.c:1132
+msgid " vma: Hint Time Forward DLL First\n"
+msgstr ""
+
+#: peigen.c:1134 pepigen.c:1134
+msgid " Table Stamp Chain Name Thunk\n"
+msgstr ""
+
+#: peigen.c:1182 pepigen.c:1182
+#, c-format
+msgid ""
+"\n"
+"\tDLL Name: %s\n"
+msgstr ""
+
+#: peigen.c:1186 peigen.c:1249 pepigen.c:1186 pepigen.c:1249
+msgid "\tvma: Hint/Ord Member-Name\n"
+msgstr ""
+
+#: peigen.c:1248 pepigen.c:1248
+msgid "\tThe Import Address Table (difference found)\n"
+msgstr ""
+
+#: peigen.c:1255 pepigen.c:1255
+msgid "\t>>> Ran out of IAT members!\n"
+msgstr ""
+
+#: peigen.c:1273 pepigen.c:1273
+msgid "\tThe Import Address Table is identical\n"
+msgstr ""
+
+#: peigen.c:1345 pepigen.c:1345
+msgid ""
+"\n"
+"There is an export table, but the section containing it could not be found\n"
+msgstr ""
+
+#: peigen.c:1350 pepigen.c:1350
+#, c-format
+msgid ""
+"\n"
+"There is an export table in %s at 0x%lx\n"
+msgstr ""
+
+#: peigen.c:1381 pepigen.c:1381
+#, c-format
+msgid ""
+"\n"
+"The Export Tables (interpreted %s section contents)\n"
+"\n"
+msgstr ""
+
+#: peigen.c:1385 pepigen.c:1385
+#, c-format
+msgid "Export Flags \t\t\t%lx\n"
+msgstr ""
+
+#: peigen.c:1388 pepigen.c:1388
+#, c-format
+msgid "Time/Date stamp \t\t%lx\n"
+msgstr ""
+
+#: peigen.c:1391 pepigen.c:1391
+#, c-format
+msgid "Major/Minor \t\t\t%d/%d\n"
+msgstr ""
+
+#: peigen.c:1394 pepigen.c:1394
+msgid "Name \t\t\t\t"
+msgstr ""
+
+#: peigen.c:1400 pepigen.c:1400
+#, c-format
+msgid "Ordinal Base \t\t\t%ld\n"
+msgstr ""
+
+#: peigen.c:1403 pepigen.c:1403
+msgid "Number in:\n"
+msgstr ""
+
+#: peigen.c:1406 pepigen.c:1406
+#, c-format
+msgid "\tExport Address Table \t\t%08lx\n"
+msgstr ""
+
+#: peigen.c:1410 pepigen.c:1410
+#, c-format
+msgid "\t[Name Pointer/Ordinal] Table\t%08lx\n"
+msgstr ""
+
+#: peigen.c:1413 pepigen.c:1413
+msgid "Table Addresses\n"
+msgstr ""
+
+#: peigen.c:1416 pepigen.c:1416
+msgid "\tExport Address Table \t\t"
+msgstr ""
+
+#: peigen.c:1421 pepigen.c:1421
+msgid "\tName Pointer Table \t\t"
+msgstr ""
+
+#: peigen.c:1426 pepigen.c:1426
+msgid "\tOrdinal Table \t\t\t"
+msgstr ""
+
+#: peigen.c:1441 pepigen.c:1441
+#, c-format
+msgid ""
+"\n"
+"Export Address Table -- Ordinal Base %ld\n"
+msgstr ""
+
+#: peigen.c:1460 pepigen.c:1460
+msgid "Forwarder RVA"
+msgstr ""
+
+#: peigen.c:1471 pepigen.c:1471
+msgid "Export RVA"
+msgstr ""
+
+#: peigen.c:1478 pepigen.c:1478
+msgid ""
+"\n"
+"[Ordinal/Name Pointer] Table\n"
+msgstr ""
+
+#: peigen.c:1533 pepigen.c:1533
+#, c-format
+msgid "Warning, .pdata section size (%ld) is not a multiple of %d\n"
+msgstr ""
+
+#: peigen.c:1537 pepigen.c:1537
+msgid ""
+"\n"
+"The Function Table (interpreted .pdata section contents)\n"
+msgstr ""
+
+#: peigen.c:1540 pepigen.c:1540
+msgid " vma:\t\t\tBegin Address End Address Unwind Info\n"
+msgstr ""
+
+#: peigen.c:1543 pepigen.c:1543
+msgid " vma:\t\tBegin End EH EH PrologEnd Exception\n"
+msgstr ""
+
+#: peigen.c:1545 pepigen.c:1545
+msgid " \t\tAddress Address Handler Data Address Mask\n"
+msgstr ""
+
+#: peigen.c:1613 pepigen.c:1613
+msgid " Register save millicode"
+msgstr ""
+
+#: peigen.c:1616 pepigen.c:1616
+msgid " Register restore millicode"
+msgstr ""
+
+#: peigen.c:1619 pepigen.c:1619
+msgid " Glue code sequence"
+msgstr ""
+
+#: peigen.c:1671 pepigen.c:1671
+msgid ""
+"\n"
+"\n"
+"PE File Base Relocations (interpreted .reloc section contents)\n"
+msgstr ""
+
+#: peigen.c:1701 pepigen.c:1701
+#, c-format
+msgid ""
+"\n"
+"Virtual Address: %08lx Chunk size %ld (0x%lx) Number of fixups %ld\n"
+msgstr ""
+
+#: peigen.c:1714 pepigen.c:1714
+#, 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:1754 pepigen.c:1754
+#, c-format
+msgid ""
+"\n"
+"Characteristics 0x%x\n"
msgstr ""
diff --git a/contrib/binutils/bfd/ppcboot.c b/contrib/binutils/bfd/ppcboot.c
index b2250a0..9ac3f31 100644
--- a/contrib/binutils/bfd/ppcboot.c
+++ b/contrib/binutils/bfd/ppcboot.c
@@ -1,5 +1,5 @@
/* BFD back-end for PPCbug boot records.
- Copyright 1996, 1997, 1998, 1999, 2000, 2001
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Written by Michael Meissner, Cygnus Support, <meissner@cygnus.com>
@@ -32,8 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
the file. objcopy cooperates by specially setting the start
address to zero by default. */
-#include <ctype.h>
-
+#include "safe-ctype.h"
#include "bfd.h"
#include "sysdep.h"
#include "libbfd.h"
@@ -97,7 +96,6 @@ static boolean ppcboot_get_section_contents
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));
@@ -114,7 +112,10 @@ ppcboot_mkobject (abfd)
bfd *abfd;
{
if (!ppcboot_get_tdata (abfd))
- ppcboot_set_tdata (abfd, bfd_zalloc (abfd, sizeof (ppcboot_data_t)));
+ {
+ bfd_size_type amt = sizeof (ppcboot_data_t);
+ ppcboot_set_tdata (abfd, bfd_zalloc (abfd, amt));
+ }
return true;
}
@@ -172,7 +173,8 @@ ppcboot_object_p (abfd)
return NULL;
}
- if (bfd_read ((PTR) &hdr, sizeof (hdr), 1, abfd) != sizeof (hdr))
+ if (bfd_bread ((PTR) &hdr, (bfd_size_type) sizeof (hdr), abfd)
+ != sizeof (hdr))
{
if (bfd_get_error () != bfd_error_system_call)
bfd_set_error (bfd_error_wrong_format);
@@ -216,7 +218,7 @@ ppcboot_object_p (abfd)
tdata->sec = sec;
memcpy ((PTR) &tdata->header, (PTR) &hdr, sizeof (ppcboot_hdr_t));
- ppcboot_set_arch_mach (abfd, bfd_arch_powerpc, 0);
+ ppcboot_set_arch_mach (abfd, bfd_arch_powerpc, 0L);
return abfd->xvec;
}
@@ -235,8 +237,8 @@ ppcboot_get_section_contents (abfd, section, location, offset, count)
file_ptr offset;
bfd_size_type count;
{
- if (bfd_seek (abfd, offset + sizeof (ppcboot_hdr_t), SEEK_SET) != 0
- || bfd_read (location, 1, count, abfd) != count)
+ if (bfd_seek (abfd, offset + (file_ptr) sizeof (ppcboot_hdr_t), SEEK_SET) != 0
+ || bfd_bread (location, count, abfd) != count)
return false;
return true;
}
@@ -259,7 +261,7 @@ mangle_name (abfd, suffix)
bfd *abfd;
char *suffix;
{
- int size;
+ bfd_size_type size;
char *buf;
char *p;
@@ -275,7 +277,7 @@ mangle_name (abfd, suffix)
/* Change any non-alphanumeric characters to underscores. */
for (p = buf; *p; p++)
- if (! isalnum ((unsigned char) *p))
+ if (! ISALNUM (*p))
*p = '_';
return buf;
@@ -292,8 +294,9 @@ ppcboot_get_symtab (abfd, alocation)
asection *sec = ppcboot_get_tdata (abfd)->sec;
asymbol *syms;
unsigned int i;
+ bfd_size_type amt = PPCBOOT_SYMS * sizeof (asymbol);
- syms = (asymbol *) bfd_alloc (abfd, PPCBOOT_SYMS * sizeof (asymbol));
+ syms = (asymbol *) bfd_alloc (abfd, amt);
if (syms == NULL)
return false;
@@ -328,17 +331,7 @@ ppcboot_get_symtab (abfd, alocation)
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_make_empty_symbol _bfd_generic_make_empty_symbol
#define ppcboot_print_symbol _bfd_nosymbols_print_symbol
/* Get information about a symbol. */
@@ -475,6 +468,7 @@ ppcboot_bfd_print_private_bfd_data (abfd, farg)
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_merge_sections bfd_generic_merge_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
diff --git a/contrib/binutils/bfd/ptrace-core.c b/contrib/binutils/bfd/ptrace-core.c
index 704391a..f8db927 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, 1995, 1996, 1998, 1999, 2001
+ Copyright 1993, 1994, 1995, 1996, 1998, 1999, 2001, 2002
Free Software Foundation, Inc.
The structure of this file is based on trad-core.c written by John Gilmore
of Cygnus Support.
@@ -64,8 +64,9 @@ ptrace_unix_core_file_p (abfd)
int val;
struct ptrace_user u;
struct trad_core_struct *rawptr;
+ bfd_size_type amt;
- val = bfd_read ((void *)&u, 1, sizeof u, abfd);
+ val = bfd_bread ((void *)&u, (bfd_size_type) sizeof u, abfd);
if (val != sizeof u || u.pt_magic != _BCS_PTRACE_MAGIC
|| u.pt_rev != _BCS_PTRACE_REV)
{
@@ -78,8 +79,8 @@ ptrace_unix_core_file_p (abfd)
/* Allocate both the upage and the struct core_data at once, so
a single free() will free them both. */
- rawptr = (struct trad_core_struct *)
- bfd_zalloc (abfd, sizeof (struct trad_core_struct));
+ amt = sizeof (struct trad_core_struct);
+ rawptr = (struct trad_core_struct *) bfd_zalloc (abfd, amt);
if (rawptr == NULL)
return 0;
@@ -88,22 +89,17 @@ ptrace_unix_core_file_p (abfd)
rawptr->u = u; /*Copy the uarea into the tdata part of the bfd */
- /* Create the sections. This is raunchy, but bfd_close wants to free
- them separately. */
+ /* Create the sections. */
- core_stacksec (abfd) = (asection *) bfd_zalloc (abfd, sizeof (asection));
+ core_stacksec (abfd) = bfd_make_section_anyway (abfd, ".stack");
if (core_stacksec (abfd) == NULL)
- return NULL;
- core_datasec (abfd) = (asection *) bfd_zalloc (abfd, sizeof (asection));
+ goto fail;
+ core_datasec (abfd) = bfd_make_section_anyway (abfd, ".data");
if (core_datasec (abfd) == NULL)
- return NULL;
- core_regsec (abfd) = (asection *) bfd_zalloc (abfd, sizeof (asection));
+ goto fail;
+ core_regsec (abfd) = bfd_make_section_anyway (abfd, ".reg");
if (core_regsec (abfd) == NULL)
- return NULL;
-
- core_stacksec (abfd)->name = ".stack";
- core_datasec (abfd)->name = ".data";
- core_regsec (abfd)->name = ".reg";
+ goto fail;
/* FIXME: Need to worry about shared memory, library data, and library
text. I don't think that any of these things are supported on the
@@ -130,12 +126,13 @@ ptrace_unix_core_file_p (abfd)
core_datasec (abfd)->alignment_power = 2;
core_regsec (abfd)->alignment_power = 2;
- abfd->sections = core_stacksec (abfd);
- core_stacksec (abfd)->next = core_datasec (abfd);
- core_datasec (abfd)->next = core_regsec (abfd);
- abfd->section_count = 3;
-
return abfd->xvec;
+
+ fail:
+ bfd_release (abfd, abfd->tdata.any);
+ abfd->tdata.any = NULL;
+ bfd_section_list_clear (abfd);
+ return NULL;
}
char *
diff --git a/contrib/binutils/bfd/reloc.c b/contrib/binutils/bfd/reloc.c
index 1c45f6f..d73ad24 100644
--- a/contrib/binutils/bfd/reloc.c
+++ b/contrib/binutils/bfd/reloc.c
@@ -65,31 +65,31 @@ CODE_FRAGMENT
.
.typedef enum bfd_reloc_status
.{
-. {* No errors detected *}
+. {* No errors detected *}
. bfd_reloc_ok,
.
-. {* The relocation was performed, but there was an overflow. *}
+. {* The relocation was performed, but there was an overflow. *}
. bfd_reloc_overflow,
.
-. {* The address to relocate was not within the section supplied. *}
+. {* The address to relocate was not within the section supplied. *}
. bfd_reloc_outofrange,
.
-. {* Used by special functions *}
+. {* Used by special functions *}
. bfd_reloc_continue,
.
-. {* Unsupported relocation size requested. *}
+. {* Unsupported relocation size requested. *}
. bfd_reloc_notsupported,
.
-. {* Unused *}
+. {* Unused *}
. bfd_reloc_other,
.
-. {* The symbol to relocate against was undefined. *}
+. {* The symbol to relocate against was undefined. *}
. bfd_reloc_undefined,
.
-. {* The relocation was performed, but may not be ok - presently
-. generated only when linking i960 coff files with i960 b.out
-. symbols. If this type is returned, the error_message argument
-. to bfd_perform_relocation will be set. *}
+. {* The relocation was performed, but may not be ok - presently
+. generated only when linking i960 coff files with i960 b.out
+. symbols. If this type is returned, the error_message argument
+. to bfd_perform_relocation will be set. *}
. bfd_reloc_dangerous
. }
. bfd_reloc_status_type;
@@ -97,16 +97,16 @@ CODE_FRAGMENT
.
.typedef struct reloc_cache_entry
.{
-. {* A pointer into the canonical table of pointers *}
+. {* A pointer into the canonical table of pointers *}
. struct symbol_cache_entry **sym_ptr_ptr;
.
-. {* offset in section *}
+. {* offset in section *}
. bfd_size_type address;
.
-. {* addend for relocation value *}
+. {* addend for relocation value *}
. bfd_vma addend;
.
-. {* Pointer to how to perform the required relocation *}
+. {* Pointer to how to perform the required relocation *}
. reloc_howto_type *howto;
.
.} arelent;
@@ -250,19 +250,19 @@ CODE_FRAGMENT
.
.enum complain_overflow
.{
-. {* Do not complain on overflow. *}
+. {* Do not complain on overflow. *}
. complain_overflow_dont,
.
-. {* Complain if the bitfield overflows, whether it is considered
-. as signed or unsigned. *}
+. {* Complain if the bitfield overflows, whether it is considered
+. as signed or unsigned. *}
. complain_overflow_bitfield,
.
-. {* Complain if the value overflows when considered as signed
-. number. *}
+. {* Complain if the value overflows when considered as signed
+. number. *}
. complain_overflow_signed,
.
-. {* Complain if the value overflows when considered as an
-. unsigned number. *}
+. {* Complain if the value overflows when considered as an
+. unsigned number. *}
. complain_overflow_unsigned
.};
@@ -280,97 +280,91 @@ CODE_FRAGMENT
.
.struct reloc_howto_struct
.{
-. {* The type field has mainly a documentary use - the back end can
-. do what it wants with it, though normally the back end's
-. external idea of what a reloc number is stored
-. in this field. For example, a PC relative word relocation
-. in a coff environment has the type 023 - because that's
-. what the outside world calls a R_PCRWORD reloc. *}
+. {* The type field has mainly a documentary use - the back end can
+. do what it wants with it, though normally the back end's
+. external idea of what a reloc number is stored
+. in this field. For example, a PC relative word relocation
+. in a coff environment has the type 023 - because that's
+. what the outside world calls a R_PCRWORD reloc. *}
. unsigned int type;
.
-. {* The value the final relocation is shifted right by. This drops
-. unwanted data from the relocation. *}
+. {* The value the final relocation is shifted right by. This drops
+. unwanted data from the relocation. *}
. unsigned int rightshift;
.
-. {* The size of the item to be relocated. This is *not* a
-. power-of-two measure. To get the number of bytes operated
-. on by a type of relocation, use bfd_get_reloc_size. *}
+. {* The size of the item to be relocated. This is *not* a
+. power-of-two measure. To get the number of bytes operated
+. on by a type of relocation, use bfd_get_reloc_size. *}
. int size;
.
-. {* The number of bits in the item to be relocated. This is used
-. when doing overflow checking. *}
+. {* The number of bits in the item to be relocated. This is used
+. when doing overflow checking. *}
. unsigned int bitsize;
.
-. {* Notes that the relocation is relative to the location in the
-. data section of the addend. The relocation function will
-. subtract from the relocation value the address of the location
-. being relocated. *}
+. {* Notes that the relocation is relative to the location in the
+. data section of the addend. The relocation function will
+. subtract from the relocation value the address of the location
+. being relocated. *}
. boolean pc_relative;
.
-. {* The bit position of the reloc value in the destination.
-. The relocated value is left shifted by this amount. *}
+. {* The bit position of the reloc value in the destination.
+. The relocated value is left shifted by this amount. *}
. unsigned int bitpos;
.
-. {* What type of overflow error should be checked for when
-. relocating. *}
+. {* What type of overflow error should be checked for when
+. relocating. *}
. enum complain_overflow complain_on_overflow;
.
-. {* If this field is non null, then the supplied function is
-. called rather than the normal function. This allows really
-. strange relocation methods to be accomodated (e.g., i960 callj
-. instructions). *}
+. {* If this field is non null, then the supplied function is
+. called rather than the normal function. This allows really
+. strange relocation methods to be accomodated (e.g., i960 callj
+. instructions). *}
. bfd_reloc_status_type (*special_function)
-. PARAMS ((bfd *abfd,
-. arelent *reloc_entry,
-. struct symbol_cache_entry *symbol,
-. PTR data,
-. asection *input_section,
-. bfd *output_bfd,
-. char **error_message));
+. PARAMS ((bfd *, arelent *, struct symbol_cache_entry *, PTR, asection *,
+. bfd *, char **));
.
-. {* The textual name of the relocation type. *}
+. {* The textual name of the relocation type. *}
. char *name;
.
-. {* Some formats record a relocation addend in the section contents
-. 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. *}
+. {* 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
-. 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
-. the mask would be 0x00000000. *}
+. {* The src_mask selects which parts of the read in data
+. are to be used in the relocation sum. E.g., if this was an 8 bit
+. byte of data which we read and relocated, this would be
+. 0x000000ff. When we have relocs which have an addend, such as
+. sun4 extended relocs, the value in the offset part of a
+. relocating field is garbage so we never use it. In this case
+. the mask would be 0x00000000. *}
. bfd_vma src_mask;
.
-. {* The dst_mask selects which parts of the instruction are replaced
-. into the instruction. In most cases src_mask == dst_mask,
-. except in the above special case, where dst_mask would be
-. 0x000000ff, and src_mask would be 0x00000000. *}
+. {* The dst_mask selects which parts of the instruction are replaced
+. into the instruction. In most cases src_mask == dst_mask,
+. except in the above special case, where dst_mask would be
+. 0x000000ff, and src_mask would be 0x00000000. *}
. bfd_vma dst_mask;
.
-. {* When some formats create PC relative instructions, they leave
-. the value of the pc of the place being relocated in the offset
-. slot of the instruction, so that a PC relative relocation can
-. be made just by adding in an ordinary offset (e.g., sun3 a.out).
-. Some formats leave the displacement part of an instruction
-. empty (e.g., m88k bcs); this flag signals the fact.*}
+. {* When some formats create PC relative instructions, they leave
+. the value of the pc of the place being relocated in the offset
+. slot of the instruction, so that a PC relative relocation can
+. be made just by adding in an ordinary offset (e.g., sun3 a.out).
+. Some formats leave the displacement part of an instruction
+. empty (e.g., m88k bcs); this flag signals the fact. *}
. boolean pcrel_offset;
-.
.};
*/
@@ -382,37 +376,43 @@ FUNCTION
DESCRIPTION
The HOWTO define is horrible and will go away.
-.#define HOWTO(C, R,S,B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \
-. {(unsigned)C,R,S,B, P, BI, O,SF,NAME,INPLACE,MASKSRC,MASKDST,PC}
+.#define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \
+. { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC }
DESCRIPTION
And will be replaced with the totally magic way. But for the
moment, we are compatible, so do it this way.
-.#define NEWHOWTO( FUNCTION, NAME,SIZE,REL,IN) HOWTO(0,0,SIZE,0,REL,0,complain_overflow_dont,FUNCTION, NAME,false,0,0,IN)
+.#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)
+. 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.
-.#define HOWTO_PREPARE(relocation, symbol) \
-. { \
-. if (symbol != (asymbol *)NULL) { \
-. if (bfd_is_com_section (symbol->section)) { \
-. relocation = 0; \
-. } \
-. else { \
-. relocation = symbol->value; \
-. } \
-. } \
-.}
+.#define HOWTO_PREPARE(relocation, symbol) \
+. { \
+. if (symbol != (asymbol *) NULL) \
+. { \
+. if (bfd_is_com_section (symbol->section)) \
+. { \
+. relocation = 0; \
+. } \
+. else \
+. { \
+. relocation = symbol->value; \
+. } \
+. } \
+. }
*/
@@ -453,9 +453,10 @@ DESCRIPTION
How relocs are tied together in an <<asection>>:
-.typedef struct relent_chain {
+.typedef struct relent_chain
+.{
. arelent relent;
-. struct relent_chain *next;
+. struct relent_chain *next;
.} arelent_chain;
*/
@@ -626,8 +627,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 /
- bfd_octets_per_byte (abfd))
+ 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
@@ -903,14 +904,14 @@ space consuming. For each target:
{
short x = bfd_get_16 (abfd, (bfd_byte *) data + octets);
DOIT (x);
- bfd_put_16 (abfd, x, (unsigned char *) data + octets);
+ bfd_put_16 (abfd, (bfd_vma) x, (unsigned char *) data + octets);
}
break;
case 2:
{
long x = bfd_get_32 (abfd, (bfd_byte *) data + octets);
DOIT (x);
- bfd_put_32 (abfd, x, (bfd_byte *) data + octets);
+ bfd_put_32 (abfd, (bfd_vma) x, (bfd_byte *) data + octets);
}
break;
case -2:
@@ -918,7 +919,7 @@ space consuming. For each target:
long x = bfd_get_32 (abfd, (bfd_byte *) data + octets);
relocation = -relocation;
DOIT (x);
- bfd_put_32 (abfd, x, (bfd_byte *) data + octets);
+ bfd_put_32 (abfd, (bfd_vma) x, (bfd_byte *) data + octets);
}
break;
@@ -927,7 +928,7 @@ space consuming. For each target:
long x = bfd_get_16 (abfd, (bfd_byte *) data + octets);
relocation = -relocation;
DOIT (x);
- bfd_put_16 (abfd, x, (bfd_byte *) data + octets);
+ bfd_put_16 (abfd, (bfd_vma) x, (bfd_byte *) data + octets);
}
break;
@@ -1022,7 +1023,8 @@ bfd_install_relocation (abfd, reloc_entry, data_start, data_start_offset,
}
/* 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
@@ -1292,14 +1294,14 @@ space consuming. For each target:
{
short x = bfd_get_16 (abfd, (bfd_byte *) data);
DOIT (x);
- bfd_put_16 (abfd, x, (unsigned char *) data);
+ bfd_put_16 (abfd, (bfd_vma) x, (unsigned char *) data);
}
break;
case 2:
{
long x = bfd_get_32 (abfd, (bfd_byte *) data);
DOIT (x);
- bfd_put_32 (abfd, x, (bfd_byte *) data);
+ bfd_put_32 (abfd, (bfd_vma) x, (bfd_byte *) data);
}
break;
case -2:
@@ -1307,7 +1309,7 @@ space consuming. For each target:
long x = bfd_get_32 (abfd, (bfd_byte *) data);
relocation = -relocation;
DOIT (x);
- bfd_put_32 (abfd, x, (bfd_byte *) data);
+ bfd_put_32 (abfd, (bfd_vma) x, (bfd_byte *) data);
}
break;
@@ -1681,6 +1683,8 @@ ENUMX
ENUMX
BFD_RELOC_8_GOTOFF
ENUMX
+ BFD_RELOC_64_PLT_PCREL
+ENUMX
BFD_RELOC_32_PLT_PCREL
ENUMX
BFD_RELOC_24_PLT_PCREL
@@ -1689,6 +1693,8 @@ ENUMX
ENUMX
BFD_RELOC_8_PLT_PCREL
ENUMX
+ BFD_RELOC_64_PLTOFF
+ENUMX
BFD_RELOC_32_PLTOFF
ENUMX
BFD_RELOC_16_PLTOFF
@@ -1851,6 +1857,8 @@ ENUMEQX
BFD_RELOC_SPARC_DISP64
BFD_RELOC_64_PCREL
ENUMX
+ BFD_RELOC_SPARC_PLT32
+ENUMX
BFD_RELOC_SPARC_PLT64
ENUMX
BFD_RELOC_SPARC_HIX22
@@ -1927,27 +1935,6 @@ ENUMDOC
2 - byte-manipulation (byte offset reg)
3 - jsr (target of branch)
- 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
@@ -1968,6 +1955,14 @@ ENUMDOC
which is filled by the linker.
ENUM
+ BFD_RELOC_ALPHA_GPREL_HI16
+ENUMX
+ BFD_RELOC_ALPHA_GPREL_LO16
+ENUMDOC
+ The GPREL_HI/LO relocations together form a 32-bit offset from the
+ GP register.
+
+ENUM
BFD_RELOC_MIPS_JMP
ENUMDOC
Bits 27..2 of the relocation address shifted right 2 bits;
@@ -2007,12 +2002,6 @@ ENUM
ENUMDOC
Like BFD_RELOC_LO16, but PC relative.
-ENUMEQ
- BFD_RELOC_MIPS_GPREL
- BFD_RELOC_GPREL16
-ENUMDOC
- Relocation relative to the global pointer.
-
ENUM
BFD_RELOC_MIPS_LITERAL
ENUMDOC
@@ -2022,9 +2011,6 @@ ENUM
BFD_RELOC_MIPS_GOT16
ENUMX
BFD_RELOC_MIPS_CALL16
-ENUMEQX
- BFD_RELOC_MIPS_GPREL32
- BFD_RELOC_GPREL32
ENUMX
BFD_RELOC_MIPS_GOT_HI16
ENUMX
@@ -2135,6 +2121,13 @@ ENUMDOC
ns32k relocations
ENUM
+ BFD_RELOC_PDP11_DISP_8_PCREL
+ENUMX
+ BFD_RELOC_PDP11_DISP_6_PCREL
+ENUMDOC
+ PDP11 relocations
+
+ENUM
BFD_RELOC_PJ_CODE_HI16
ENUMX
BFD_RELOC_PJ_CODE_LO16
@@ -2209,6 +2202,52 @@ ENUMX
BFD_RELOC_PPC_EMB_BIT_FLD
ENUMX
BFD_RELOC_PPC_EMB_RELSDA
+ENUMX
+ BFD_RELOC_PPC64_HIGHER
+ENUMX
+ BFD_RELOC_PPC64_HIGHER_S
+ENUMX
+ BFD_RELOC_PPC64_HIGHEST
+ENUMX
+ BFD_RELOC_PPC64_HIGHEST_S
+ENUMX
+ BFD_RELOC_PPC64_TOC16_LO
+ENUMX
+ BFD_RELOC_PPC64_TOC16_HI
+ENUMX
+ BFD_RELOC_PPC64_TOC16_HA
+ENUMX
+ BFD_RELOC_PPC64_TOC
+ENUMX
+ BFD_RELOC_PPC64_PLTGOT16
+ENUMX
+ BFD_RELOC_PPC64_PLTGOT16_LO
+ENUMX
+ BFD_RELOC_PPC64_PLTGOT16_HI
+ENUMX
+ BFD_RELOC_PPC64_PLTGOT16_HA
+ENUMX
+ BFD_RELOC_PPC64_ADDR16_DS
+ENUMX
+ BFD_RELOC_PPC64_ADDR16_LO_DS
+ENUMX
+ BFD_RELOC_PPC64_GOT16_DS
+ENUMX
+ BFD_RELOC_PPC64_GOT16_LO_DS
+ENUMX
+ BFD_RELOC_PPC64_PLT16_LO_DS
+ENUMX
+ BFD_RELOC_PPC64_SECTOFF_DS
+ENUMX
+ BFD_RELOC_PPC64_SECTOFF_LO_DS
+ENUMX
+ BFD_RELOC_PPC64_TOC16_DS
+ENUMX
+ BFD_RELOC_PPC64_TOC16_LO_DS
+ENUMX
+ BFD_RELOC_PPC64_PLTGOT16_DS
+ENUMX
+ BFD_RELOC_PPC64_PLTGOT16_LO_DS
ENUMDOC
Power(rs6000) and PowerPC relocations.
@@ -2678,6 +2717,78 @@ ENUMDOC
Motorola Mcore relocations.
ENUM
+ BFD_RELOC_MMIX_GETA
+ENUMX
+ BFD_RELOC_MMIX_GETA_1
+ENUMX
+ BFD_RELOC_MMIX_GETA_2
+ENUMX
+ BFD_RELOC_MMIX_GETA_3
+ENUMDOC
+ These are relocations for the GETA instruction.
+ENUM
+ BFD_RELOC_MMIX_CBRANCH
+ENUMX
+ BFD_RELOC_MMIX_CBRANCH_J
+ENUMX
+ BFD_RELOC_MMIX_CBRANCH_1
+ENUMX
+ BFD_RELOC_MMIX_CBRANCH_2
+ENUMX
+ BFD_RELOC_MMIX_CBRANCH_3
+ENUMDOC
+ These are relocations for a conditional branch instruction.
+ENUM
+ BFD_RELOC_MMIX_PUSHJ
+ENUMX
+ BFD_RELOC_MMIX_PUSHJ_1
+ENUMX
+ BFD_RELOC_MMIX_PUSHJ_2
+ENUMX
+ BFD_RELOC_MMIX_PUSHJ_3
+ENUMDOC
+ These are relocations for the PUSHJ instruction.
+ENUM
+ BFD_RELOC_MMIX_JMP
+ENUMX
+ BFD_RELOC_MMIX_JMP_1
+ENUMX
+ BFD_RELOC_MMIX_JMP_2
+ENUMX
+ BFD_RELOC_MMIX_JMP_3
+ENUMDOC
+ These are relocations for the JMP instruction.
+ENUM
+ BFD_RELOC_MMIX_ADDR19
+ENUMDOC
+ This is a relocation for a relative address as in a GETA instruction or
+ a branch.
+ENUM
+ BFD_RELOC_MMIX_ADDR27
+ENUMDOC
+ This is a relocation for a relative address as in a JMP instruction.
+ENUM
+ BFD_RELOC_MMIX_REG_OR_BYTE
+ENUMDOC
+ This is a relocation for an instruction field that may be a general
+ register or a value 0..255.
+ENUM
+ BFD_RELOC_MMIX_REG
+ENUMDOC
+ This is a relocation for an instruction field that may be a general
+ register.
+ENUM
+ BFD_RELOC_MMIX_BASE_PLUS_OFFSET
+ENUMDOC
+ This is a relocation for two instruction fields holding a register and
+ an offset, the equivalent of the relocation.
+ENUM
+ BFD_RELOC_MMIX_LOCAL
+ENUMDOC
+ This relocation is an assertion that the expression is not allocated as
+ a global register. It does not modify contents.
+
+ENUM
BFD_RELOC_AVR_7_PCREL
ENUMDOC
This is a 16 bit reloc for the AVR that stores 8 bit pc relative
@@ -2763,6 +2874,75 @@ ENUMDOC
into 22 bits.
ENUM
+ BFD_RELOC_390_12
+ENUMDOC
+ Direct 12 bit.
+ENUM
+ BFD_RELOC_390_GOT12
+ENUMDOC
+ 12 bit GOT offset.
+ENUM
+ BFD_RELOC_390_PLT32
+ENUMDOC
+ 32 bit PC relative PLT address.
+ENUM
+ BFD_RELOC_390_COPY
+ENUMDOC
+ Copy symbol at runtime.
+ENUM
+ BFD_RELOC_390_GLOB_DAT
+ENUMDOC
+ Create GOT entry.
+ENUM
+ BFD_RELOC_390_JMP_SLOT
+ENUMDOC
+ Create PLT entry.
+ENUM
+ BFD_RELOC_390_RELATIVE
+ENUMDOC
+ Adjust by program base.
+ENUM
+ BFD_RELOC_390_GOTPC
+ENUMDOC
+ 32 bit PC relative offset to GOT.
+ENUM
+ BFD_RELOC_390_GOT16
+ENUMDOC
+ 16 bit GOT offset.
+ENUM
+ BFD_RELOC_390_PC16DBL
+ENUMDOC
+ PC relative 16 bit shifted by 1.
+ENUM
+ BFD_RELOC_390_PLT16DBL
+ENUMDOC
+ 16 bit PC rel. PLT shifted by 1.
+ENUM
+ BFD_RELOC_390_PC32DBL
+ENUMDOC
+ PC relative 32 bit shifted by 1.
+ENUM
+ BFD_RELOC_390_PLT32DBL
+ENUMDOC
+ 32 bit PC rel. PLT shifted by 1.
+ENUM
+ BFD_RELOC_390_GOTPCDBL
+ENUMDOC
+ 32 bit PC rel. GOT shifted by 1.
+ENUM
+ BFD_RELOC_390_GOT64
+ENUMDOC
+ 64 bit GOT offset.
+ENUM
+ BFD_RELOC_390_PLT64
+ENUMDOC
+ 64 bit PC relative PLT address.
+ENUM
+ BFD_RELOC_390_GOTENT
+ENUMDOC
+ 32 bit rel. offset to GOT entry.
+
+ENUM
BFD_RELOC_VTABLE_INHERIT
ENUMX
BFD_RELOC_VTABLE_ENTRY
@@ -2860,6 +3040,10 @@ ENUMX
ENUMX
BFD_RELOC_IA64_LTOFF_FPTR64I
ENUMX
+ BFD_RELOC_IA64_LTOFF_FPTR32MSB
+ENUMX
+ BFD_RELOC_IA64_LTOFF_FPTR32LSB
+ENUMX
BFD_RELOC_IA64_LTOFF_FPTR64MSB
ENUMX
BFD_RELOC_IA64_LTOFF_FPTR64LSB
@@ -2945,6 +3129,44 @@ ENUMX
ENUMDOC
These relocs are only used within the CRIS assembler. They are not
(at present) written to any object files.
+ENUM
+ BFD_RELOC_CRIS_COPY
+ENUMX
+ BFD_RELOC_CRIS_GLOB_DAT
+ENUMX
+ BFD_RELOC_CRIS_JUMP_SLOT
+ENUMX
+ BFD_RELOC_CRIS_RELATIVE
+ENUMDOC
+ Relocs used in ELF shared libraries for CRIS.
+ENUM
+ BFD_RELOC_CRIS_32_GOT
+ENUMDOC
+ 32-bit offset to symbol-entry within GOT.
+ENUM
+ BFD_RELOC_CRIS_16_GOT
+ENUMDOC
+ 16-bit offset to symbol-entry within GOT.
+ENUM
+ BFD_RELOC_CRIS_32_GOTPLT
+ENUMDOC
+ 32-bit offset to symbol-entry within GOT, with PLT handling.
+ENUM
+ BFD_RELOC_CRIS_16_GOTPLT
+ENUMDOC
+ 16-bit offset to symbol-entry within GOT, with PLT handling.
+ENUM
+ BFD_RELOC_CRIS_32_GOTREL
+ENUMDOC
+ 32-bit offset to symbol, relative to GOT.
+ENUM
+ BFD_RELOC_CRIS_32_PLT_GOTREL
+ENUMDOC
+ 32-bit offset to symbol with PLT entry, relative to GOT.
+ENUM
+ BFD_RELOC_CRIS_32_PLT_PCREL
+ENUMDOC
+ 32-bit offset to symbol with PLT entry, relative to this relocation.
ENUM
BFD_RELOC_860_COPY
@@ -3013,6 +3235,35 @@ ENUMX
ENUMDOC
Intel i860 Relocations.
+ENUM
+ BFD_RELOC_OPENRISC_ABS_26
+ENUMX
+ BFD_RELOC_OPENRISC_REL_26
+ENUMDOC
+ OpenRISC Relocations.
+
+ENUM
+ BFD_RELOC_H8_DIR16A8
+ENUMX
+ BFD_RELOC_H8_DIR16R8
+ENUMX
+ BFD_RELOC_H8_DIR24A8
+ENUMX
+ BFD_RELOC_H8_DIR24R8
+ENUMX
+ BFD_RELOC_H8_DIR32A16
+ENUMDOC
+ H8 elf Relocations.
+
+ENUM
+ BFD_RELOC_XSTORMY16_REL_12
+ENUMX
+ BFD_RELOC_XSTORMY16_24
+ENUMX
+ BFD_RELOC_XSTORMY16_FPTR16
+ENUMDOC
+ Sony Xstormy16 Relocations.
+
ENDSENUM
BFD_RELOC_UNUSED
CODE_FRAGMENT
@@ -3159,6 +3410,28 @@ bfd_generic_gc_sections (abfd, link_info)
/*
INTERNAL_FUNCTION
+ bfd_generic_merge_sections
+
+SYNOPSIS
+ boolean bfd_generic_merge_sections
+ (bfd *, struct bfd_link_info *);
+
+DESCRIPTION
+ Provides default handling for SEC_MERGE section merging for back ends
+ which don't have SEC_MERGE support -- i.e., does nothing.
+*/
+
+/*ARGSUSED*/
+boolean
+bfd_generic_merge_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
@@ -3197,7 +3470,7 @@ bfd_generic_get_relocated_section_contents (abfd, link_info, link_order, data,
if (reloc_size < 0)
goto error_return;
- reloc_vector = (arelent **) bfd_malloc ((size_t) reloc_size);
+ reloc_vector = (arelent **) bfd_malloc ((bfd_size_type) reloc_size);
if (reloc_vector == NULL && reloc_size != 0)
goto error_return;
@@ -3205,7 +3478,7 @@ bfd_generic_get_relocated_section_contents (abfd, link_info, link_order, data,
if (!bfd_get_section_contents (input_bfd,
input_section,
(PTR) data,
- 0,
+ (bfd_vma) 0,
input_section->_raw_size))
goto error_return;
diff --git a/contrib/binutils/bfd/reloc16.c b/contrib/binutils/bfd/reloc16.c
index 7de8d95..1d69a7f 100644
--- a/contrib/binutils/bfd/reloc16.c
+++ b/contrib/binutils/bfd/reloc16.c
@@ -1,5 +1,5 @@
/* 8 and 16 bit COFF relocation functions, for BFD.
- Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000
+ Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 2000, 2001
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -137,17 +137,16 @@ bfd_perform_slip (abfd, slip, input_section, value)
}
boolean
-bfd_coff_reloc16_relax_section (abfd, i, link_info, again)
+bfd_coff_reloc16_relax_section (abfd, input_section, link_info, again)
bfd *abfd;
- asection *i;
+ asection *input_section;
struct bfd_link_info *link_info;
boolean *again;
{
/* Get enough memory to hold the stuff. */
- bfd *input_bfd = i->owner;
- asection *input_section = i;
- int *shrinks;
- int shrink = 0;
+ bfd *input_bfd = input_section->owner;
+ unsigned *shrinks;
+ unsigned shrink = 0;
long reloc_size = bfd_get_reloc_upper_bound (input_bfd, input_section);
arelent **reloc_vector = NULL;
long reloc_count;
@@ -159,7 +158,7 @@ bfd_coff_reloc16_relax_section (abfd, i, link_info, again)
if (reloc_size < 0)
return false;
- reloc_vector = (arelent **) bfd_malloc (reloc_size);
+ reloc_vector = (arelent **) bfd_malloc ((bfd_size_type) reloc_size);
if (!reloc_vector && reloc_size > 0)
return false;
@@ -191,11 +190,14 @@ bfd_coff_reloc16_relax_section (abfd, i, link_info, again)
if (reloc_count > 0)
{
int another_pass = 0;
+ bfd_size_type amt;
/* 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));
+ amt = reloc_count + 1;
+ amt *= sizeof (unsigned);
+ shrinks = (unsigned *) bfd_malloc (amt);
+ memset (shrinks, 0, (size_t) amt);
/* Loop until nothing changes in this section. */
do {
@@ -268,11 +270,11 @@ bfd_coff_reloc16_get_relocated_section_contents(in_abfd,
if (!bfd_get_section_contents(input_bfd,
input_section,
data,
- 0,
+ (bfd_vma) 0,
input_section->_raw_size))
return NULL;
- reloc_vector = (arelent **) bfd_malloc ((size_t) reloc_size);
+ reloc_vector = (arelent **) bfd_malloc ((bfd_size_type) reloc_size);
if (!reloc_vector && reloc_size != 0)
return NULL;
diff --git a/contrib/binutils/bfd/sco5-core.c b/contrib/binutils/bfd/sco5-core.c
index 62f9c98..9f5b793 100644
--- a/contrib/binutils/bfd/sco5-core.c
+++ b/contrib/binutils/bfd/sco5-core.c
@@ -1,5 +1,5 @@
/* BFD back end for SCO5 core files (U-area and raw sections)
- Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Written by Jouke Numan <jnuman@hiscom.nl>
This file is part of BFD, the Binary File Descriptor library.
@@ -43,7 +43,6 @@ struct sco5_core_struct
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));
@@ -75,16 +74,6 @@ make_bfd_asection (abfd, name, flags, _raw_size, vma, filepos)
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;
@@ -92,17 +81,17 @@ read_uarea(abfd, filepos)
{
struct sco5_core_struct *rawptr;
+ bfd_size_type amt = sizeof (struct sco5_core_struct);
- rawptr = ((struct sco5_core_struct *)
- bfd_zmalloc (sizeof (struct sco5_core_struct)));
+ rawptr = (struct sco5_core_struct *) bfd_zmalloc (amt);
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))
+ if (bfd_seek (abfd, (file_ptr) filepos, SEEK_SET) != 0
+ || bfd_bread ((void *) &rawptr->u, (bfd_size_type) sizeof rawptr->u,
+ abfd) != sizeof rawptr->u)
{
bfd_set_error (bfd_error_wrong_format);
return NULL;
@@ -150,9 +139,10 @@ sco5_core_file_p (abfd)
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) )
+ if ((bfd_seek (abfd, (file_ptr) (coresize - sizeof coffset_siz),
+ SEEK_SET) != 0)
+ || bfd_bread ((void *) &coffset_siz, (bfd_size_type) sizeof coffset_siz,
+ abfd) != sizeof coffset_siz)
{
bfd_set_error (bfd_error_wrong_format);
return NULL;
@@ -160,8 +150,8 @@ sco5_core_file_p (abfd)
/* 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)
+ if ((bfd_seek (abfd, (file_ptr) (coresize - coffset_siz), SEEK_SET) != 0)
+ || (bfd_bread ((void *) &coffsets, (bfd_size_type) sizeof coffsets, abfd)
!= sizeof coffsets)
|| ((coffsets.u_info != 1) && (coffsets.u_info != C_VERSION)))
{
@@ -173,15 +163,15 @@ sco5_core_file_p (abfd)
{
/* Old version, no section heads, read info from user struct */
- u = read_uarea(abfd, coffsets.u_user);
+ u = read_uarea (abfd, coffsets.u_user);
if (! u)
- return NULL;
+ goto fail;
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;
+ goto fail;
if (!make_bfd_asection (abfd, ".data",
SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS,
@@ -189,14 +179,14 @@ sco5_core_file_p (abfd)
+ u->u_exdata.ux_bsize),
(bfd_vma) u->u_exdata.ux_datorg,
(file_ptr) coffsets.u_data))
- return NULL;
+ goto fail;
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;
+ goto fail;
return abfd->xvec; /* Done for version 1 */
}
@@ -207,18 +197,20 @@ sco5_core_file_p (abfd)
coresecthead and check its validity */
if ((bfd_seek (abfd,
- coresize - coffset_siz - 2 * sizeof coffset_siz,
+ (file_ptr) (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)
+ || (bfd_bread ((void *) &nsecs, (bfd_size_type) sizeof nsecs, abfd)
+ != sizeof nsecs)
+ || (bfd_bread ((void *) &cheadoffs, (bfd_size_type) sizeof cheadoffs,
+ abfd) != sizeof cheadoffs)
+ || (bfd_seek (abfd, (file_ptr) cheadoffs, SEEK_SET) != 0)
+ || (bfd_bread ((void *) &chead, (bfd_size_type) 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;
+ goto fail;
}
/* OK, we believe you. You're a core file (sure, sure). */
@@ -227,11 +219,12 @@ sco5_core_file_p (abfd)
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)
+ if ((bfd_seek (abfd, (file_ptr) chead.cs_hseek, SEEK_SET) != 0)
+ || (bfd_bread ((void *) &chead, (bfd_size_type) sizeof chead, abfd)
+ != sizeof chead))
{
bfd_set_error (bfd_error_wrong_format);
- return NULL;
+ goto fail;
}
switch (chead.cs_stype)
@@ -240,15 +233,15 @@ sco5_core_file_p (abfd)
if (chead.cs_x.csx_magic != COREMAGIC_NUMBER)
{
bfd_set_error (bfd_error_wrong_format);
- return NULL;
+ goto fail;
}
secname = NULL;
nsecs++; /* MAGIC not in section cnt!*/
break;
case CORES_UAREA: /* U-area, read in tdata */
- u = read_uarea(abfd, chead.cs_sseek);
+ u = read_uarea (abfd, chead.cs_sseek);
if (! u)
- return NULL;
+ goto fail;
/* This is tricky. As the "register section", we give them
the entire upage and stack. u.u_ar0 points to where
@@ -319,12 +312,20 @@ sco5_core_file_p (abfd)
(bfd_size_type) chead.cs_vsize,
(bfd_vma) chead.cs_vaddr,
(file_ptr) chead.cs_sseek))
- return NULL;
+ goto fail;
}
return abfd->xvec;
+ fail:
+ if (abfd->tdata.any)
+ {
+ bfd_release (abfd, abfd->tdata.any);
+ abfd->tdata.any = NULL;
+ }
+ bfd_section_list_clear (abfd);
+ return NULL;
}
char *
@@ -351,22 +352,12 @@ sco5_core_file_failing_signal (ignore_abfd)
/* ARGSUSED */
boolean
sco5_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 */
}
-#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 ()
@@ -413,15 +404,15 @@ const bfd_target sco5_core_vec =
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),
+ 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 (_bfd_nosymbols),
+ 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,
diff --git a/contrib/binutils/bfd/section.c b/contrib/binutils/bfd/section.c
index fc03ce9..c1dc0b1 100644
--- a/contrib/binutils/bfd/section.c
+++ b/contrib/binutils/bfd/section.c
@@ -1,6 +1,6 @@
/* Object file "section" support for the BFD library.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001
+ 2000, 2001, 2002
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -177,7 +177,7 @@ CODE_FRAGMENT
.
. int id;
.
-. {* Which section is it; 0..nth. *}
+. {* Which section in the bfd; 0..n-1 as sections are created in a bfd. *}
.
. int index;
.
@@ -205,9 +205,11 @@ CODE_FRAGMENT
. some relocation information too. *}
.#define SEC_RELOC 0x004
.
-.#if 0 {* Obsolete ? *}
-.#define SEC_BALIGN 0x008
-.#endif
+. {* ELF reserves 4 processor specific bits and 8 operating system
+. specific bits in sh_flags; at present we can get away with just
+. one in communicating between the assembler and BFD, but this
+. isn't a good long-term solution. *}
+.#define SEC_ARCH_BIT_0 0x008
.
. {* A signal to the OS that the section contains read only data. *}
.#define SEC_READONLY 0x010
@@ -290,9 +292,10 @@ CODE_FRAGMENT
. objects are to be further relocated. *}
.#define SEC_EXCLUDE 0x40000
.
-. {* The contents of this section are to be sorted by the
-. based on the address specified in the associated symbol
-. table. *}
+. {* The contents of this section are to be sorted based on the sum of
+. the symbol and addend values specified by the associated relocation
+. entries. Entries without associated relocation entries will be
+. appended to the end of the section in an unspecified order. *}
.#define SEC_SORT_ENTRIES 0x80000
.
. {* When linking, duplicate sections of the same name should be
@@ -350,6 +353,18 @@ CODE_FRAGMENT
. references found to any symbol in the section. *}
.#define SEC_CLINK 0x10000000
.
+. {* Attempt to merge identical entities in the section.
+. Entity size is given in the entsize field. *}
+.#define SEC_MERGE 0x20000000
+.
+. {* If given with SEC_MERGE, entities to merge are zero terminated
+. strings where entsize specifies character size instead of fixed
+. size entries. *}
+.#define SEC_STRINGS 0x40000000
+.
+. {* This section contains data about section groups. *}
+.#define SEC_GROUP 0x80000000
+.
. {* End of section flags. *}
.
. {* Some internal packed boolean fields. *}
@@ -364,13 +379,14 @@ CODE_FRAGMENT
. unsigned int linker_mark : 1;
.
. {* Another mark flag used by some of the linker backends. Set for
-. output sections that have a input section. *}
+. output sections that have an input section. *}
. unsigned int linker_has_input : 1;
.
. {* A mark flag used by some linker backends for garbage collection. *}
. unsigned int gc_mark : 1;
.
-. {* Used by the ELF code to mark sections which have been allocated to segments. *}
+. {* Used by the ELF code to mark sections which have been allocated
+. to segments. *}
. unsigned int segment_mark : 1;
.
. {* End of internal packed boolean fields. *}
@@ -466,14 +482,14 @@ CODE_FRAGMENT
.
. unsigned int lineno_count;
.
+. {* Entity size for merging purposes. *}
+.
+. unsigned int entsize;
+.
. {* Optional information about a COMDAT entry; NULL if not COMDAT. *}
.
. struct bfd_comdat_info *comdat;
.
-. {* Points to the kept section if this section is a link-once section,
-. and is discarded. *}
-. struct sec *kept_section;
-.
. {* When a section is being output, this value changes as more
. linenumbers are written out. *}
.
@@ -528,6 +544,12 @@ CODE_FRAGMENT
.#define bfd_ind_section_ptr ((asection *) &bfd_ind_section)
.#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr)
.
+.#define bfd_is_const_section(SEC) \
+. ( ((SEC) == bfd_abs_section_ptr) \
+. || ((SEC) == bfd_und_section_ptr) \
+. || ((SEC) == bfd_com_section_ptr) \
+. || ((SEC) == bfd_ind_section_ptr))
+.
.extern const struct symbol_cache_entry * const bfd_abs_symbol;
.extern const struct symbol_cache_entry * const bfd_com_symbol;
.extern const struct symbol_cache_entry * const bfd_und_symbol;
@@ -538,6 +560,32 @@ CODE_FRAGMENT
.#define bfd_get_section_size_after_reloc(section) \
. ((section)->reloc_done ? (section)->_cooked_size \
. : (abort (), (bfd_size_type) 1))
+.
+.{* Macros to handle insertion and deletion of a bfd's sections. These
+. only handle the list pointers, ie. do not adjust section_count,
+. target_index etc. *}
+.#define bfd_section_list_remove(ABFD, PS) \
+. do \
+. { \
+. asection **_ps = PS; \
+. asection *_s = *_ps; \
+. *_ps = _s->next; \
+. if (_s->next == NULL) \
+. (ABFD)->section_tail = _ps; \
+. } \
+. while (0)
+.#define bfd_section_list_insert(ABFD, PS, S) \
+. do \
+. { \
+. asection **_ps = PS; \
+. asection *_s = S; \
+. _s->next = *_ps; \
+. *_ps = _s; \
+. if (_s->next == NULL) \
+. (ABFD)->section_tail = &_s->next; \
+. } \
+. while (0)
+.
*/
/* We use a macro to initialize the static asymbol structures because
@@ -584,11 +632,11 @@ static const asymbol global_syms[] =
/* line_filepos, userdata, contents, lineno, lineno_count, */ \
0, NULL, NULL, NULL, 0, \
\
- /* comdat, kept_section, moving_line_filepos, target_index, */ \
- NULL, NULL, 0, 0, \
+ /* entsize, comdat, moving_line_filepos, */ \
+ 0, NULL, 0, \
\
- /* used_by_bfd, constructor_chain, owner, */ \
- NULL, NULL, NULL, \
+ /* target_index, used_by_bfd, constructor_chain, owner, */ \
+ 0, NULL, NULL, NULL, \
\
/* symbol, */ \
(struct symbol_cache_entry *) &global_syms[IDX], \
@@ -607,6 +655,83 @@ STD_SECTION (bfd_abs_section, 0, bfd_abs_symbol, BFD_ABS_SECTION_NAME, 2);
STD_SECTION (bfd_ind_section, 0, bfd_ind_symbol, BFD_IND_SECTION_NAME, 3);
#undef STD_SECTION
+struct section_hash_entry
+{
+ struct bfd_hash_entry root;
+ asection section;
+};
+
+/* Initialize an entry in the section hash table. */
+
+struct bfd_hash_entry *
+bfd_section_hash_newfunc (entry, table, string)
+ struct bfd_hash_entry *entry;
+ struct bfd_hash_table *table;
+ const char *string;
+{
+ /* Allocate the structure if it has not already been allocated by a
+ subclass. */
+ if (entry == NULL)
+ {
+ entry = bfd_hash_allocate (table, sizeof (struct section_hash_entry));
+ if (entry == NULL)
+ return entry;
+ }
+
+ /* Call the allocation method of the superclass. */
+ entry = bfd_hash_newfunc (entry, table, string);
+ if (entry != NULL)
+ {
+ memset ((PTR) &((struct section_hash_entry *) entry)->section,
+ 0, sizeof (asection));
+ }
+
+ return entry;
+}
+
+#define section_hash_lookup(table, string, create, copy) \
+ ((struct section_hash_entry *) \
+ bfd_hash_lookup ((table), (string), (create), (copy)))
+
+/* Initializes a new section. NEWSECT->NAME is already set. */
+
+static asection *bfd_section_init PARAMS ((bfd *, asection *));
+
+static asection *
+bfd_section_init (abfd, newsect)
+ bfd *abfd;
+ asection *newsect;
+{
+ static int section_id = 0x10; /* id 0 to 3 used by STD_SECTION. */
+
+ newsect->id = section_id;
+ newsect->index = abfd->section_count;
+ newsect->owner = abfd;
+
+ /* Create a symbol whose only job is to point to this section. This
+ is useful for things like relocs which are relative to the base
+ of a section. */
+ newsect->symbol = bfd_make_empty_symbol (abfd);
+ if (newsect->symbol == NULL)
+ return NULL;
+
+ newsect->symbol->name = newsect->name;
+ newsect->symbol->value = 0;
+ newsect->symbol->section = newsect;
+ newsect->symbol->flags = BSF_SECTION_SYM;
+
+ newsect->symbol_ptr_ptr = &newsect->symbol;
+
+ if (! BFD_SEND (abfd, _new_section_hook, (abfd, newsect)))
+ return NULL;
+
+ section_id++;
+ abfd->section_count++;
+ *abfd->section_tail = newsect;
+ abfd->section_tail = &newsect->next;
+ return newsect;
+}
+
/*
DOCDD
INODE
@@ -619,6 +744,29 @@ These are the functions exported by the section handling part of BFD.
/*
FUNCTION
+ bfd_section_list_clear
+
+SYNOPSIS
+ void bfd_section_list_clear (bfd *);
+
+DESCRIPTION
+ Clears the section list, and also resets the section count and
+ hash table entries.
+*/
+
+void
+bfd_section_list_clear (abfd)
+ bfd *abfd;
+{
+ abfd->sections = NULL;
+ abfd->section_tail = &abfd->sections;
+ abfd->section_count = 0;
+ memset ((PTR) abfd->section_htab.table, 0,
+ abfd->section_htab.size * sizeof (struct bfd_hash_entry *));
+}
+
+/*
+FUNCTION
bfd_get_section_by_name
SYNOPSIS
@@ -640,11 +788,12 @@ bfd_get_section_by_name (abfd, name)
bfd *abfd;
const char *name;
{
- asection *sect;
+ struct section_hash_entry *sh;
+
+ sh = section_hash_lookup (&abfd->section_htab, name, false, false);
+ if (sh != NULL)
+ return &sh->section;
- for (sect = abfd->sections; sect != NULL; sect = sect->next)
- if (!strcmp (sect->name, name))
- return sect;
return NULL;
}
@@ -676,7 +825,7 @@ bfd_get_unique_section_name (abfd, templat, count)
char *sname;
len = strlen (templat);
- sname = bfd_malloc (len + 8);
+ sname = bfd_malloc ((bfd_size_type) len + 8);
if (sname == NULL)
return NULL;
strcpy (sname, templat);
@@ -691,7 +840,7 @@ bfd_get_unique_section_name (abfd, templat, count)
abort ();
sprintf (sname + len, ".%d", num++);
}
- while (bfd_get_section_by_name (abfd, sname) != NULL);
+ while (section_hash_lookup (&abfd->section_htab, sname, false, false));
if (count != NULL)
*count = num;
@@ -728,12 +877,40 @@ bfd_make_section_old_way (abfd, name)
bfd *abfd;
const char *name;
{
- asection *sec = bfd_get_section_by_name (abfd, name);
- if (sec == (asection *) NULL)
+ struct section_hash_entry *sh;
+ asection *newsect;
+
+ if (abfd->output_has_begun)
{
- sec = bfd_make_section (abfd, name);
+ bfd_set_error (bfd_error_invalid_operation);
+ return NULL;
}
- return sec;
+
+ if (strcmp (name, BFD_ABS_SECTION_NAME) == 0)
+ return bfd_abs_section_ptr;
+
+ if (strcmp (name, BFD_COM_SECTION_NAME) == 0)
+ return bfd_com_section_ptr;
+
+ if (strcmp (name, BFD_UND_SECTION_NAME) == 0)
+ return bfd_und_section_ptr;
+
+ if (strcmp (name, BFD_IND_SECTION_NAME) == 0)
+ return bfd_ind_section_ptr;
+
+ sh = section_hash_lookup (&abfd->section_htab, name, true, false);
+ if (sh == NULL)
+ return NULL;
+
+ newsect = &sh->section;
+ if (newsect->name != NULL)
+ {
+ /* Section already exists. */
+ return newsect;
+ }
+
+ newsect->name = name;
+ return bfd_section_init (abfd, newsect);
}
/*
@@ -758,10 +935,8 @@ bfd_make_section_anyway (abfd, name)
bfd *abfd;
const char *name;
{
- static int section_id = 0x10; /* id 0 to 3 used by STD_SECTION. */
+ struct section_hash_entry *sh;
asection *newsect;
- asection **prev = &abfd->sections;
- asection *sect = abfd->sections;
if (abfd->output_has_begun)
{
@@ -769,55 +944,24 @@ bfd_make_section_anyway (abfd, name)
return NULL;
}
- while (sect)
- {
- prev = &sect->next;
- sect = sect->next;
- }
-
- newsect = (asection *) bfd_zalloc (abfd, sizeof (asection));
- if (newsect == NULL)
+ sh = section_hash_lookup (&abfd->section_htab, name, true, false);
+ if (sh == NULL)
return NULL;
- newsect->name = name;
- newsect->id = section_id++;
- newsect->index = abfd->section_count++;
- newsect->flags = SEC_NO_FLAGS;
-
- newsect->userdata = NULL;
- newsect->contents = NULL;
- newsect->next = (asection *) NULL;
- newsect->relocation = (arelent *) NULL;
- newsect->reloc_count = 0;
- newsect->line_filepos = 0;
- newsect->owner = abfd;
- newsect->comdat = NULL;
- newsect->kept_section = NULL;
-
- /* Create a symbol whos only job is to point to this section. This is
- useful for things like relocs which are relative to the base of a
- section. */
- newsect->symbol = bfd_make_empty_symbol (abfd);
- if (newsect->symbol == NULL)
+ newsect = &sh->section;
+ if (newsect->name != NULL)
{
- bfd_release (abfd, newsect);
- return NULL;
- }
- newsect->symbol->name = name;
- newsect->symbol->value = 0;
- newsect->symbol->section = newsect;
- newsect->symbol->flags = BSF_SECTION_SYM;
-
- newsect->symbol_ptr_ptr = &newsect->symbol;
-
- if (BFD_SEND (abfd, _new_section_hook, (abfd, newsect)) != true)
- {
- bfd_release (abfd, newsect);
- return NULL;
+ /* We are making a section of the same name. It can't go in
+ section_htab without generating a unique section name and
+ that would be pointless; We don't need to traverse the
+ hash table. */
+ newsect = (asection *) bfd_zalloc (abfd, sizeof (asection));
+ if (newsect == NULL)
+ return NULL;
}
- *prev = newsect;
- return newsect;
+ newsect->name = name;
+ return bfd_section_init (abfd, newsect);
}
/*
@@ -839,35 +983,34 @@ bfd_make_section (abfd, name)
bfd *abfd;
const char *name;
{
- asection *sect = abfd->sections;
+ struct section_hash_entry *sh;
+ asection *newsect;
- if (strcmp (name, BFD_ABS_SECTION_NAME) == 0)
- {
- return bfd_abs_section_ptr;
- }
- if (strcmp (name, BFD_COM_SECTION_NAME) == 0)
- {
- return bfd_com_section_ptr;
- }
- if (strcmp (name, BFD_UND_SECTION_NAME) == 0)
+ if (abfd->output_has_begun)
{
- return bfd_und_section_ptr;
+ bfd_set_error (bfd_error_invalid_operation);
+ return NULL;
}
- if (strcmp (name, BFD_IND_SECTION_NAME) == 0)
- {
- return bfd_ind_section_ptr;
- }
+ if (strcmp (name, BFD_ABS_SECTION_NAME) == 0
+ || strcmp (name, BFD_COM_SECTION_NAME) == 0
+ || strcmp (name, BFD_UND_SECTION_NAME) == 0
+ || strcmp (name, BFD_IND_SECTION_NAME) == 0)
+ return NULL;
+
+ sh = section_hash_lookup (&abfd->section_htab, name, true, false);
+ if (sh == NULL)
+ return NULL;
- while (sect)
+ newsect = &sh->section;
+ if (newsect->name != NULL)
{
- if (!strcmp (sect->name, name))
- return NULL;
- sect = sect->next;
+ /* Section already exists. */
+ return newsect;
}
- /* The name is not already used; go ahead and make a new section. */
- return bfd_make_section_anyway (abfd, name);
+ newsect->name = name;
+ return bfd_section_init (abfd, newsect);
}
/*
@@ -1000,12 +1143,9 @@ FUNCTION
bfd_set_section_contents
SYNOPSIS
- boolean bfd_set_section_contents
- (bfd *abfd,
- asection *section,
- PTR data,
- file_ptr offset,
- bfd_size_type count);
+ boolean bfd_set_section_contents (bfd *abfd, asection *section,
+ PTR data, file_ptr offset,
+ bfd_size_type count);
DESCRIPTION
Sets the contents of the section @var{section} in BFD
@@ -1046,17 +1186,15 @@ bfd_set_section_contents (abfd, section, location, offset, count)
return (false);
}
- if (offset < 0)
+ sz = bfd_get_section_size_now (abfd, section);
+ if ((bfd_size_type) offset > sz
+ || count > sz
+ || offset + count > sz
+ || count != (size_t) count)
{
- bad_val:
bfd_set_error (bfd_error_bad_value);
return false;
}
- sz = bfd_get_section_size_now (abfd, section);
- if ((bfd_size_type) offset > sz
- || count > sz
- || offset + count > sz)
- goto bad_val;
switch (abfd->direction)
{
@@ -1079,7 +1217,7 @@ bfd_set_section_contents (abfd, section, location, offset, count)
/* Record a copy of the data in memory if desired. */
if (section->contents
&& location != section->contents + offset)
- memcpy (section->contents + offset, location, count);
+ memcpy (section->contents + offset, location, (size_t) count);
if (BFD_SEND (abfd, _bfd_set_section_contents,
(abfd, section, location, offset, count)))
@@ -1096,9 +1234,9 @@ FUNCTION
bfd_get_section_contents
SYNOPSIS
- boolean bfd_get_section_contents
- (bfd *abfd, asection *section, PTR location,
- file_ptr offset, bfd_size_type count);
+ boolean bfd_get_section_contents (bfd *abfd, asection *section,
+ PTR location, file_ptr offset,
+ bfd_size_type count);
DESCRIPTION
Read data from @var{section} in BFD @var{abfd}
@@ -1125,21 +1263,21 @@ bfd_get_section_contents (abfd, section, location, offset, count)
if (section->flags & SEC_CONSTRUCTOR)
{
- memset (location, 0, (unsigned) count);
+ memset (location, 0, (size_t) count);
return true;
}
- if (offset < 0)
+ /* Even if reloc_done is true, this function reads unrelocated
+ contents, so we want the raw size. */
+ sz = section->_raw_size;
+ if ((bfd_size_type) offset > sz
+ || count > sz
+ || offset + count > sz
+ || count != (size_t) count)
{
- bad_val:
bfd_set_error (bfd_error_bad_value);
return false;
}
- /* Even if reloc_done is true, this function reads unrelocated
- contents, so we want the raw size. */
- sz = section->_raw_size;
- if ((bfd_size_type) offset > sz || count > sz || offset + count > sz)
- goto bad_val;
if (count == 0)
/* Don't bother. */
@@ -1147,7 +1285,7 @@ bfd_get_section_contents (abfd, section, location, offset, count)
if ((section->flags & SEC_HAS_CONTENTS) == 0)
{
- memset (location, 0, (unsigned) count);
+ memset (location, 0, (size_t) count);
return true;
}
@@ -1166,7 +1304,8 @@ FUNCTION
bfd_copy_private_section_data
SYNOPSIS
- boolean bfd_copy_private_section_data(bfd *ibfd, asection *isec, bfd *obfd, asection *osec);
+ boolean bfd_copy_private_section_data (bfd *ibfd, asection *isec,
+ bfd *obfd, asection *osec);
DESCRIPTION
Copy private section information from @var{isec} in the BFD
@@ -1239,7 +1378,8 @@ _bfd_strip_section_from_output (info, s)
asection *is;
for (is = abfd->sections; is != NULL; is = is->next)
{
- if (is != s && is->output_section == os)
+ if (is != s && is->output_section == os
+ && (is->flags & SEC_EXCLUDE) == 0)
break;
}
if (is != NULL)
@@ -1257,9 +1397,11 @@ _bfd_strip_section_from_output (info, s)
for (spp = &os->owner->sections; *spp; spp = &(*spp)->next)
if (*spp == os)
{
- *spp = os->next;
+ bfd_section_list_remove (os->owner, spp);
os->owner->section_count--;
break;
}
}
+
+ s->flags |= SEC_EXCLUDE;
}
diff --git a/contrib/binutils/bfd/sparclinux.c b/contrib/binutils/bfd/sparclinux.c
index b877018..28ff8c8 100644
--- a/contrib/binutils/bfd/sparclinux.c
+++ b/contrib/binutils/bfd/sparclinux.c
@@ -1,5 +1,5 @@
/* BFD back-end for linux flavored sparc a.out binaries.
- Copyright 1992, 1993, 1994, 1995, 1996, 1997, 2000
+ Copyright 1992, 1993, 1994, 1995, 1996, 1997, 2000, 2001
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -37,7 +37,10 @@ USA. */
#include "libaout.h" /* BFD a.out internal data structures */
#define DEFAULT_ARCH bfd_arch_sparc
-#define MY(OP) CAT(sparclinux_,OP)
+/* Do not "beautify" the CONCAT* macro args. Traditional C will not
+ remove whitespace added here, and thus will fail to concatenate
+ the tokens. */
+#define MY(OP) CONCAT2 (sparclinux_,OP)
#define TARGETNAME "a.out-sparc-linux"
extern const bfd_target MY(vec);
@@ -225,9 +228,9 @@ linux_link_hash_table_create (abfd)
bfd *abfd;
{
struct linux_link_hash_table *ret;
+ bfd_size_type amt = sizeof (struct linux_link_hash_table);
- ret = ((struct linux_link_hash_table *)
- bfd_alloc (abfd, sizeof (struct linux_link_hash_table)));
+ ret = (struct linux_link_hash_table *) bfd_alloc (abfd, amt);
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,
@@ -407,7 +410,8 @@ linux_add_one_symbol (info, abfd, name, flags, section, value, string,
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)))
+ BSF_GLOBAL | BSF_CONSTRUCTOR, s, (bfd_vma) 0, NULL,
+ false, false, NULL)))
return false;
}
@@ -446,7 +450,7 @@ linux_tally_symbols (h, data)
name = h->root.root.root.string + sizeof NEEDS_SHRLIB - 1;
p = strrchr (name, '_');
if (p != NULL)
- alloc = (char *) bfd_malloc (strlen (name) + 1);
+ alloc = (char *) bfd_malloc ((bfd_size_type) strlen (name) + 1);
if (p == NULL || alloc == NULL)
(*_bfd_error_handler) (_("Output file requires shared library `%s'\n"),
@@ -590,7 +594,8 @@ bfd_sparclinux_size_dynamic_sections (output_bfd, info)
".linux-dynamic");
if (s != NULL)
{
- s->_raw_size = 8 + linux_hash_table (info)->fixup_count * 8;
+ s->_raw_size = linux_hash_table (info)->fixup_count + 1;
+ s->_raw_size *= 8;
s->contents = (bfd_byte *) bfd_alloc (output_bfd, s->_raw_size);
if (s->contents == NULL)
return false;
@@ -633,7 +638,8 @@ linux_finish_dynamic_link (output_bfd, info)
#endif
fixup_table = s->contents;
- bfd_put_32 (output_bfd, linux_hash_table (info)->fixup_count, fixup_table);
+ bfd_put_32 (output_bfd,
+ (bfd_vma) linux_hash_table (info)->fixup_count, fixup_table);
fixup_table += 4;
/* Fill in fixup table. */
@@ -664,14 +670,14 @@ linux_finish_dynamic_link (output_bfd, info)
{
/* Relative address */
new_addr = new_addr - (f->value + 5);
- bfd_put_32 (output_bfd, new_addr, fixup_table);
+ bfd_put_32 (output_bfd, (bfd_vma) 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);
+ bfd_put_32 (output_bfd, (bfd_vma) new_addr, fixup_table);
fixup_table += 4;
bfd_put_32 (output_bfd, f->value, fixup_table);
fixup_table += 4;
@@ -682,9 +688,9 @@ linux_finish_dynamic_link (output_bfd, info)
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);
+ bfd_put_32 (output_bfd, (bfd_vma) 0, fixup_table);
fixup_table += 4;
- bfd_put_32 (output_bfd, 0, fixup_table);
+ bfd_put_32 (output_bfd, (bfd_vma) 0, fixup_table);
fixup_table += 4;
++fixups_written;
for (f = linux_hash_table (info)->fixup_list; f != NULL; f = f->next)
@@ -710,7 +716,7 @@ linux_finish_dynamic_link (output_bfd, info)
new_addr, f->value);
#endif
- bfd_put_32 (output_bfd, new_addr, fixup_table);
+ bfd_put_32 (output_bfd, (bfd_vma) new_addr, fixup_table);
fixup_table += 4;
bfd_put_32 (output_bfd, f->value, fixup_table);
fixup_table += 4;
@@ -723,9 +729,9 @@ linux_finish_dynamic_link (output_bfd, info)
(*_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);
+ bfd_put_32 (output_bfd, (bfd_vma) 0, fixup_table);
fixup_table += 4;
- bfd_put_32 (output_bfd, 0, fixup_table);
+ bfd_put_32 (output_bfd, (bfd_vma) 0, fixup_table);
fixup_table += 4;
++fixups_written;
}
@@ -747,15 +753,16 @@ linux_finish_dynamic_link (output_bfd, info)
printf ("Builtin fixup table at %x\n", new_addr);
#endif
- bfd_put_32 (output_bfd, new_addr, fixup_table);
+ bfd_put_32 (output_bfd, (bfd_vma) new_addr, fixup_table);
}
else
- bfd_put_32 (output_bfd, 0, fixup_table);
+ bfd_put_32 (output_bfd, (bfd_vma) 0, fixup_table);
- if (bfd_seek (output_bfd, os->filepos + s->output_offset, SEEK_SET) != 0)
+ if (bfd_seek (output_bfd, (file_ptr) (os->filepos + s->output_offset),
+ SEEK_SET) != 0)
return false;
- if (bfd_write ((PTR) s->contents, 1, s->_raw_size, output_bfd)
+ if (bfd_bwrite ((PTR) s->contents, s->_raw_size, output_bfd)
!= s->_raw_size)
return false;
diff --git a/contrib/binutils/bfd/sparcnetbsd.c b/contrib/binutils/bfd/sparcnetbsd.c
index 9cb9637..64d0eb1 100644
--- a/contrib/binutils/bfd/sparcnetbsd.c
+++ b/contrib/binutils/bfd/sparcnetbsd.c
@@ -1,5 +1,5 @@
/* BFD back-end for NetBSD/sparc a.out-ish binaries.
- Copyright 1990, 1991, 1992, 1994, 1995, 1997, 1998, 2000
+ Copyright 1990, 1991, 1992, 1994, 1995, 1997, 1998, 2000, 2001
Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -28,7 +28,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define DEFAULT_ARCH bfd_arch_sparc
#define DEFAULT_MID M_SPARC_NETBSD
-#define MY(OP) CAT(sparcnetbsd_,OP)
+/* Do not "beautify" the CONCAT* macro args. Traditional C will not
+ remove whitespace added here, and thus will fail to concatenate
+ the tokens. */
+#define MY(OP) CONCAT2 (sparcnetbsd_,OP)
+
/* This needs to start with a.out so GDB knows it is an a.out variant. */
#define TARGETNAME "a.out-sparc-netbsd"
diff --git a/contrib/binutils/bfd/srec.c b/contrib/binutils/bfd/srec.c
index 33dfaa7..5dfad88 100644
--- a/contrib/binutils/bfd/srec.c
+++ b/contrib/binutils/bfd/srec.c
@@ -1,6 +1,6 @@
/* BFD back-end for s-record objects.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000
+ 2000, 2001, 2002
Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
@@ -108,7 +108,7 @@ DESCRIPTION
#include "sysdep.h"
#include "libbfd.h"
#include "libiberty.h"
-#include <ctype.h>
+#include "safe-ctype.h"
static void srec_get_symbol_info PARAMS ((bfd *, asymbol *, symbol_info *));
static void srec_print_symbol
@@ -122,7 +122,7 @@ static const bfd_target *srec_object_p PARAMS ((bfd *));
static const bfd_target *symbolsrec_object_p PARAMS ((bfd *));
static boolean srec_read_section PARAMS ((bfd *, asection *, bfd_byte *));
-static boolean srec_write_record PARAMS ((bfd *, int, bfd_vma,
+static boolean srec_write_record PARAMS ((bfd *, unsigned int, bfd_vma,
const bfd_byte *,
const bfd_byte *));
static boolean srec_write_header PARAMS ((bfd *));
@@ -138,13 +138,12 @@ static boolean internal_srec_write_object_contents PARAMS ((bfd *, int));
static boolean srec_write_object_contents PARAMS ((bfd *));
static boolean symbolsrec_write_object_contents PARAMS ((bfd *));
static int srec_sizeof_headers PARAMS ((bfd *, boolean));
-static asymbol *srec_make_empty_symbol PARAMS ((bfd *));
static long srec_get_symtab_upper_bound PARAMS ((bfd *));
static long srec_get_symtab PARAMS ((bfd *, asymbol **));
/* Macros for converting between hex and binary. */
-static CONST char digs[] = "0123456789ABCDEF";
+static const char digs[] = "0123456789ABCDEF";
#define NIBBLE(x) hex_value(x)
#define HEX(buffer) ((NIBBLE((buffer)[0])<<4) + NIBBLE((buffer)[1]))
@@ -235,7 +234,8 @@ srec_mkobject (abfd)
if (abfd->tdata.srec_data == NULL)
{
- tdata_type *tdata = (tdata_type *) bfd_alloc (abfd, sizeof (tdata_type));
+ bfd_size_type amt = sizeof (tdata_type);
+ tdata_type *tdata = (tdata_type *) bfd_alloc (abfd, amt);
if (tdata == NULL)
return false;
abfd->tdata.srec_data = tdata;
@@ -260,7 +260,7 @@ srec_get_byte (abfd, errorptr)
{
bfd_byte c;
- if (bfd_read (&c, 1, 1, abfd) != 1)
+ if (bfd_bread (&c, (bfd_size_type) 1, abfd) != 1)
{
if (bfd_get_error () != bfd_error_file_truncated)
*errorptr = true;
@@ -290,7 +290,7 @@ srec_bad_byte (abfd, lineno, c, error)
{
char buf[10];
- if (! isprint (c))
+ if (! ISPRINT (c))
sprintf (buf, "\\%03o", (unsigned int) c);
else
{
@@ -299,7 +299,7 @@ srec_bad_byte (abfd, lineno, c, error)
}
(*_bfd_error_handler)
(_("%s:%d: Unexpected character `%s' in S-record file\n"),
- bfd_get_filename (abfd), lineno, buf);
+ bfd_archive_filename (abfd), lineno, buf);
bfd_set_error (bfd_error_bad_value);
}
}
@@ -313,8 +313,9 @@ srec_new_symbol (abfd, name, val)
bfd_vma val;
{
struct srec_symbol *n;
+ bfd_size_type amt = sizeof (struct srec_symbol);
- n = (struct srec_symbol *) bfd_alloc (abfd, sizeof (struct srec_symbol));
+ n = (struct srec_symbol *) bfd_alloc (abfd, amt);
if (n == NULL)
return false;
@@ -389,7 +390,7 @@ srec_scan (abfd)
case ' ':
do
{
- unsigned int alc;
+ bfd_size_type alc;
char *p, *symname;
bfd_vma symval;
@@ -416,9 +417,9 @@ srec_scan (abfd)
*p++ = c;
while ((c = srec_get_byte (abfd, &error)) != EOF
- && ! isspace (c))
+ && ! ISSPACE (c))
{
- if ((unsigned int) (p - symbuf) >= alc)
+ if ((bfd_size_type) (p - symbuf) >= alc)
{
char *n;
@@ -440,7 +441,7 @@ srec_scan (abfd)
}
*p++ = '\0';
- symname = bfd_alloc (abfd, p - symbuf);
+ symname = bfd_alloc (abfd, (bfd_size_type) (p - symbuf));
if (symname == NULL)
goto error_return;
strcpy (symname, symbuf);
@@ -503,7 +504,7 @@ srec_scan (abfd)
pos = bfd_tell (abfd) - 1;
- if (bfd_read (hdr, 1, 3, abfd) != 3)
+ if (bfd_bread (hdr, (bfd_size_type) 3, abfd) != 3)
goto error_return;
if (! ISHEX (hdr[1]) || ! ISHEX (hdr[2]))
@@ -521,13 +522,13 @@ srec_scan (abfd)
{
if (buf != NULL)
free (buf);
- buf = (bfd_byte *) bfd_malloc (bytes * 2);
+ buf = (bfd_byte *) bfd_malloc ((bfd_size_type) bytes * 2);
if (buf == NULL)
goto error_return;
bufsize = bytes * 2;
}
- if (bfd_read (buf, 1, bytes * 2, abfd) != bytes * 2)
+ if (bfd_bread (buf, (bfd_size_type) bytes * 2, abfd) != bytes * 2)
goto error_return;
/* Ignore the checksum byte. */
@@ -572,9 +573,11 @@ srec_scan (abfd)
{
char secbuf[20];
char *secname;
+ bfd_size_type amt;
sprintf (secbuf, ".sec%d", bfd_count_sections (abfd) + 1);
- secname = (char *) bfd_alloc (abfd, strlen (secbuf) + 1);
+ amt = strlen (secbuf) + 1;
+ secname = (char *) bfd_alloc (abfd, amt);
strcpy (secname, secbuf);
sec = bfd_make_section (abfd, secname);
if (sec == NULL)
@@ -642,7 +645,7 @@ srec_object_p (abfd)
srec_init ();
if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0
- || bfd_read (b, 1, 4, abfd) != 4)
+ || bfd_bread (b, (bfd_size_type) 4, abfd) != 4)
return NULL;
if (b[0] != 'S' || !ISHEX (b[1]) || !ISHEX (b[2]) || !ISHEX (b[3]))
@@ -672,7 +675,7 @@ symbolsrec_object_p (abfd)
srec_init ();
if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0
- || bfd_read (b, 1, 2, abfd) != 2)
+ || bfd_bread (b, (bfd_size_type) 2, abfd) != 2)
return NULL;
if (b[0] != '$' || b[1] != '$')
@@ -722,7 +725,7 @@ srec_read_section (abfd, section, contents)
ought to know the exact format. */
BFD_ASSERT (c == 'S');
- if (bfd_read (hdr, 1, 3, abfd) != 3)
+ if (bfd_bread (hdr, (bfd_size_type) 3, abfd) != 3)
goto error_return;
BFD_ASSERT (ISHEX (hdr[1]) && ISHEX (hdr[2]));
@@ -733,13 +736,13 @@ srec_read_section (abfd, section, contents)
{
if (buf != NULL)
free (buf);
- buf = (bfd_byte *) bfd_malloc (bytes * 2);
+ buf = (bfd_byte *) bfd_malloc ((bfd_size_type) bytes * 2);
if (buf == NULL)
goto error_return;
bufsize = bytes * 2;
}
- if (bfd_read (buf, 1, bytes * 2, abfd) != bytes * 2)
+ if (bfd_bread (buf, (bfd_size_type) bytes * 2, abfd) != bytes * 2)
goto error_return;
address = 0;
@@ -821,8 +824,7 @@ srec_get_section_contents (abfd, section, location, offset, count)
if (section->used_by_bfd == NULL)
{
section->used_by_bfd = bfd_alloc (abfd, section->_raw_size);
- if (section->used_by_bfd == NULL
- && section->_raw_size != 0)
+ if (section->used_by_bfd == NULL && section->_raw_size != 0)
return false;
if (! srec_read_section (abfd, section, section->used_by_bfd))
@@ -865,7 +867,7 @@ srec_set_section_contents (abfd, section, location, offset, bytes_to_do)
register srec_data_list_type *entry;
entry = ((srec_data_list_type *)
- bfd_alloc (abfd, sizeof (srec_data_list_type)));
+ bfd_alloc (abfd, (bfd_size_type) sizeof (srec_data_list_type)));
if (entry == NULL)
return false;
@@ -873,7 +875,9 @@ srec_set_section_contents (abfd, section, location, offset, bytes_to_do)
&& (section->flags & SEC_ALLOC)
&& (section->flags & SEC_LOAD))
{
- bfd_byte *data = (bfd_byte *) bfd_alloc (abfd, bytes_to_do);
+ bfd_byte *data;
+
+ data = (bfd_byte *) bfd_alloc (abfd, bytes_to_do);
if (data == NULL)
return false;
memcpy ((PTR) data, location, (size_t) bytes_to_do);
@@ -927,14 +931,14 @@ srec_set_section_contents (abfd, section, location, offset, bytes_to_do)
static boolean
srec_write_record (abfd, type, address, data, end)
bfd *abfd;
- int type;
+ unsigned int type;
bfd_vma address;
const bfd_byte *data;
const bfd_byte *end;
{
char buffer[MAXCHUNK];
unsigned int check_sum = 0;
- CONST bfd_byte *src = data;
+ const bfd_byte *src = data;
char *dst = buffer;
char *length;
bfd_size_type wrlen;
@@ -981,7 +985,7 @@ srec_write_record (abfd, type, address, data, end)
*dst++ = '\r';
*dst++ = '\n';
wrlen = dst - buffer;
- if (bfd_write ((PTR) buffer, 1, wrlen, abfd) != wrlen)
+ if (bfd_bwrite ((PTR) buffer, wrlen, abfd) != wrlen)
return false;
return true;
}
@@ -998,7 +1002,7 @@ srec_write_header (abfd)
for (i = 0; i < 40 && abfd->filename[i]; i++)
*dst++ = abfd->filename[i];
- return srec_write_record (abfd, 0, 0, buffer, dst);
+ return srec_write_record (abfd, 0, (bfd_vma) 0, buffer, dst);
}
static boolean
@@ -1056,12 +1060,12 @@ srec_write_symbols (abfd)
if (count)
{
- size_t len;
+ bfd_size_type len;
asymbol **table = bfd_get_outsymbols (abfd);
sprintf (buffer, "$$ %s\r\n", abfd->filename);
len = strlen (buffer);
- if (bfd_write (buffer, len, 1, abfd) != len)
+ if (bfd_bwrite (buffer, len, abfd) != len)
return false;
for (i = 0; i < count; i++)
@@ -1071,7 +1075,6 @@ srec_write_symbols (abfd)
&& (s->flags & BSF_DEBUGGING) == 0)
{
/* Just dump out non debug symbols. */
- bfd_size_type l;
char buf2[40], *p;
sprintf_vma (buf2,
@@ -1081,14 +1084,14 @@ srec_write_symbols (abfd)
while (p[0] == '0' && p[1] != 0)
p++;
sprintf (buffer, " %s $%s\r\n", s->name, p);
- l = strlen (buffer);
- if (bfd_write (buffer, l, 1, abfd) != l)
+ len = strlen (buffer);
+ if (bfd_bwrite (buffer, len, abfd) != len)
return false;
}
}
sprintf (buffer, "$$ \r\n");
len = strlen (buffer);
- if (bfd_write (buffer, len, 1, abfd) != len)
+ if (bfd_bwrite (buffer, len, abfd) != len)
return false;
}
@@ -1146,16 +1149,6 @@ srec_sizeof_headers (abfd, exec)
return 0;
}
-static asymbol *
-srec_make_empty_symbol (abfd)
- bfd *abfd;
-{
- asymbol *new = (asymbol *) bfd_zalloc (abfd, sizeof (asymbol));
- if (new)
- new->the_bfd = abfd;
- return new;
-}
-
/* Return the amount of memory needed to read the symbol table. */
static long
@@ -1172,7 +1165,7 @@ srec_get_symtab (abfd, alocation)
bfd *abfd;
asymbol **alocation;
{
- unsigned int symcount = bfd_get_symcount (abfd);
+ bfd_size_type symcount = bfd_get_symcount (abfd);
asymbol *csymbols;
unsigned int i;
@@ -1217,8 +1210,8 @@ srec_get_symbol_info (ignore_abfd, symbol, ret)
}
static void
-srec_print_symbol (ignore_abfd, afile, symbol, how)
- bfd *ignore_abfd ATTRIBUTE_UNUSED;
+srec_print_symbol (abfd, afile, symbol, how)
+ bfd *abfd;
PTR afile;
asymbol *symbol;
bfd_print_symbol_type how;
@@ -1230,7 +1223,7 @@ srec_print_symbol (ignore_abfd, afile, symbol, how)
fprintf (file, "%s", symbol->name);
break;
default:
- bfd_print_symbol_vandf ((PTR) file, symbol);
+ bfd_print_symbol_vandf (abfd, (PTR) file, symbol);
fprintf (file, " %-5s %s",
symbol->section->name,
symbol->name);
@@ -1245,6 +1238,7 @@ srec_print_symbol (ignore_abfd, afile, symbol, how)
#define srec_bfd_is_local_label_name bfd_generic_is_local_label_name
#define srec_get_lineno _bfd_nosymbols_get_lineno
#define srec_find_nearest_line _bfd_nosymbols_find_nearest_line
+#define srec_make_empty_symbol _bfd_generic_make_empty_symbol
#define srec_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
#define srec_read_minisymbols _bfd_generic_read_minisymbols
#define srec_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
@@ -1262,6 +1256,7 @@ srec_print_symbol (ignore_abfd, afile, symbol, how)
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_merge_sections bfd_generic_merge_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
diff --git a/contrib/binutils/bfd/stabs.c b/contrib/binutils/bfd/stabs.c
index 15b1af5..bba4a6d 100644
--- a/contrib/binutils/bfd/stabs.c
+++ b/contrib/binutils/bfd/stabs.c
@@ -1,5 +1,6 @@
/* Stabs in sections linking support.
- Copyright 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of BFD, the Binary File Descriptor library.
@@ -25,8 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "sysdep.h"
#include "libbfd.h"
#include "aout/stab_gnu.h"
-
-#include <ctype.h>
+#include "safe-ctype.h"
/* Stabs entries use a 12 byte format:
4 byte string table index
@@ -178,7 +178,7 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo)
{
boolean first;
struct stab_info *sinfo;
- bfd_size_type count;
+ bfd_size_type count, amt;
struct stab_section_info *secinfo;
bfd_byte *stabbuf = NULL;
bfd_byte *stabstrbuf = NULL;
@@ -223,7 +223,8 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo)
{
/* Initialize the stabs information we need to keep track of. */
first = true;
- *psinfo = (PTR) bfd_alloc (abfd, sizeof (struct stab_info));
+ amt = sizeof (struct stab_info);
+ *psinfo = (PTR) bfd_alloc (abfd, amt);
if (*psinfo == NULL)
goto error_return;
sinfo = (struct stab_info *) *psinfo;
@@ -247,16 +248,16 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo)
count = stabsec->_raw_size / STABSIZE;
- *psecinfo = bfd_alloc (abfd,
- (sizeof (struct stab_section_info)
- + (count - 1) * sizeof (bfd_size_type)));
+ amt = sizeof (struct stab_section_info);
+ amt += (count - 1) * sizeof (bfd_size_type);
+ *psecinfo = bfd_alloc (abfd, amt);
if (*psecinfo == NULL)
goto error_return;
secinfo = (struct stab_section_info *) *psecinfo;
secinfo->excls = NULL;
secinfo->cumulative_skips = NULL;
- memset (secinfo->stridxs, 0, count * sizeof (bfd_size_type));
+ memset (secinfo->stridxs, 0, (size_t) count * sizeof (bfd_size_type));
/* Read the stabs information from abfd. */
@@ -265,9 +266,9 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo)
if (stabbuf == NULL || stabstrbuf == NULL)
goto error_return;
- if (! bfd_get_section_contents (abfd, stabsec, stabbuf, 0,
+ if (! bfd_get_section_contents (abfd, stabsec, stabbuf, (bfd_vma) 0,
stabsec->_raw_size)
- || ! bfd_get_section_contents (abfd, stabstrsec, stabstrbuf, 0,
+ || ! bfd_get_section_contents (abfd, stabstrsec, stabstrbuf, (bfd_vma) 0,
stabstrsec->_raw_size))
goto error_return;
@@ -362,7 +363,7 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo)
{
/* Skip the file number. */
++str;
- while (isdigit ((unsigned char) *str))
+ while (ISDIGIT (*str))
++str;
--str;
}
@@ -383,7 +384,8 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo)
/* Record this symbol, so that we can set the value
correctly. */
- ne = (struct stab_excl_list *) bfd_alloc (abfd, sizeof *ne);
+ amt = sizeof *ne;
+ ne = (struct stab_excl_list *) bfd_alloc (abfd, amt);
if (ne == NULL)
goto error_return;
ne->offset = sym - stabbuf;
@@ -471,8 +473,8 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo)
bfd_size_type i, offset;
bfd_size_type *pskips;
- secinfo->cumulative_skips =
- (bfd_size_type *) bfd_alloc (abfd, count * sizeof (bfd_size_type));
+ amt = count * sizeof (bfd_size_type);
+ secinfo->cumulative_skips = (bfd_size_type *) bfd_alloc (abfd, amt);
if (secinfo->cumulative_skips == NULL)
goto error_return;
@@ -500,6 +502,176 @@ _bfd_link_section_stabs (abfd, psinfo, stabsec, stabstrsec, psecinfo)
return false;
}
+
+/* This function is called for each input file before the stab
+ section is relocated. It discards stab entries for discarded
+ functions and variables. The function returns true iff
+ any entries have been deleted.
+*/
+
+boolean
+_bfd_discard_section_stabs (abfd, stabsec, psecinfo,
+ reloc_symbol_deleted_p, cookie)
+ bfd *abfd;
+ asection *stabsec;
+ PTR psecinfo;
+ boolean (*reloc_symbol_deleted_p) PARAMS ((bfd_vma, PTR));
+ PTR cookie;
+{
+ bfd_size_type count, amt;
+ struct stab_section_info *secinfo;
+ bfd_byte *stabbuf = NULL;
+ bfd_byte *sym, *symend;
+ bfd_size_type skip;
+ bfd_size_type *pstridx;
+ int deleting;
+
+ if (stabsec->_raw_size == 0)
+ {
+ /* This file does not contain stabs debugging information. */
+ return false;
+ }
+
+ if (stabsec->_raw_size % STABSIZE != 0)
+ {
+ /* Something is wrong with the format of these stab symbols.
+ Don't try to optimize them. */
+ return false;
+ }
+
+ if ((stabsec->output_section != NULL
+ && bfd_is_abs_section (stabsec->output_section)))
+ {
+ /* At least one of the sections is being discarded from the
+ link, so we should just ignore them. */
+ return false;
+ }
+
+ /* We should have initialized our data in _bfd_link_stab_sections.
+ If there was some bizarre error reading the string sections, though,
+ we might not have. Bail rather than asserting. */
+ if (psecinfo == NULL)
+ return false;
+
+ count = stabsec->_raw_size / STABSIZE;
+ secinfo = (struct stab_section_info *) psecinfo;
+
+ /* Read the stabs information from abfd. */
+
+ stabbuf = (bfd_byte *) bfd_malloc (stabsec->_raw_size);
+ if (stabbuf == NULL)
+ goto error_return;
+
+ if (! bfd_get_section_contents (abfd, stabsec, stabbuf, (bfd_vma) 0,
+ stabsec->_raw_size))
+ goto error_return;
+
+ /* Look through the stabs symbols and discard any information for
+ discarded functions. */
+
+ skip = 0;
+ deleting = -1;
+
+ symend = stabbuf + stabsec->_raw_size;
+ for (sym = stabbuf, pstridx = secinfo->stridxs;
+ sym < symend;
+ sym += STABSIZE, ++pstridx)
+ {
+ int type;
+
+ if (*pstridx == (bfd_size_type) -1)
+ {
+ /* This stab was deleted in a previous pass. */
+ continue;
+ }
+
+ type = sym[TYPEOFF];
+
+ if (type == N_FUN)
+ {
+ int strx = bfd_get_32 (abfd, sym + STRDXOFF);
+
+ if (strx == 0)
+ {
+ if (deleting)
+ {
+ skip++;
+ *pstridx = -1;
+ }
+ deleting = -1;
+ continue;
+ }
+ deleting = 0;
+ if ((*reloc_symbol_deleted_p) (sym + VALOFF - stabbuf, cookie))
+ deleting = 1;
+ }
+
+ if (deleting == 1)
+ {
+ *pstridx = -1;
+ skip++;
+ }
+ else if (deleting == -1)
+ {
+ /* Outside of a function. Check for deleted variables. */
+ if (type == N_STSYM || type == N_LCSYM)
+ if ((*reloc_symbol_deleted_p) (sym + VALOFF - stabbuf, cookie))
+ {
+ *pstridx = -1;
+ skip ++;
+ }
+ /* We should also check for N_GSYM entries which reference a
+ deleted global, but those are less harmful to debuggers
+ and would require parsing the stab strings. */
+ }
+ }
+
+ free (stabbuf);
+ stabbuf = NULL;
+
+ /* Shrink the stabsec as needed. */
+ stabsec->_cooked_size -= skip * STABSIZE;
+ if (stabsec->_cooked_size == 0)
+ stabsec->flags |= SEC_EXCLUDE;
+
+ /* Recalculate the `cumulative_skips' array now that stabs have been
+ deleted for this section. */
+
+ if (skip != 0)
+ {
+ bfd_size_type i, offset;
+ bfd_size_type *pskips;
+
+ if (secinfo->cumulative_skips == NULL)
+ {
+ amt = count * sizeof (bfd_size_type);
+ secinfo->cumulative_skips = (bfd_size_type *) bfd_alloc (abfd, amt);
+ if (secinfo->cumulative_skips == NULL)
+ goto error_return;
+ }
+
+ pskips = secinfo->cumulative_skips;
+ pstridx = secinfo->stridxs;
+ offset = 0;
+
+ for (i = 0; i < count; i++, pskips++, pstridx++)
+ {
+ *pskips = offset;
+ if (*pstridx == (bfd_size_type) -1)
+ offset += STABSIZE;
+ }
+
+ BFD_ASSERT (offset != 0);
+ }
+
+ return (skip > 0);
+
+ error_return:
+ if (stabbuf != NULL)
+ free (stabbuf);
+ return false;
+}
+
/* Write out the stab section. This is called with the relocated
contents. */
@@ -522,7 +694,8 @@ _bfd_write_section_stabs (output_bfd, psinfo, stabsec, psecinfo, contents)
if (secinfo == NULL)
return bfd_set_section_contents (output_bfd, stabsec->output_section,
- contents, stabsec->output_offset,
+ contents,
+ (file_ptr) stabsec->output_offset,
stabsec->_raw_size);
/* Handle each N_BINCL entry. */
@@ -571,7 +744,7 @@ _bfd_write_section_stabs (output_bfd, psinfo, stabsec, psecinfo, contents)
BFD_ASSERT ((bfd_size_type) (tosym - contents) == stabsec->_cooked_size);
return bfd_set_section_contents (output_bfd, stabsec->output_section,
- contents, stabsec->output_offset,
+ contents, (file_ptr) stabsec->output_offset,
stabsec->_cooked_size);
}
@@ -600,8 +773,8 @@ _bfd_write_stab_strings (output_bfd, psinfo)
<= sinfo->stabstr->output_section->_raw_size);
if (bfd_seek (output_bfd,
- (sinfo->stabstr->output_section->filepos
- + sinfo->stabstr->output_offset),
+ (file_ptr) (sinfo->stabstr->output_section->filepos
+ + sinfo->stabstr->output_offset),
SEEK_SET) != 0)
return false;
diff --git a/contrib/binutils/bfd/sunos.c b/contrib/binutils/bfd/sunos.c
index f4ada70..30fd019 100644
--- a/contrib/binutils/bfd/sunos.c
+++ b/contrib/binutils/bfd/sunos.c
@@ -1,5 +1,6 @@
/* BFD backend for SunOS binaries.
- Copyright 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 2000
+ Copyright 1990, 1991, 1992, 1994, 1995, 1996, 1997, 1998, 2000, 2001,
+ 2002
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -20,7 +21,11 @@ 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-sunos-big"
-#define MY(OP) CAT(sunos_big_,OP)
+
+/* Do not "beautify" the CONCAT* macro args. Traditional C will not
+ remove whitespace added here, and thus will fail to concatenate
+ the tokens. */
+#define MY(OP) CONCAT2 (sunos_big_,OP)
#include "bfd.h"
#include "bfdlink.h"
@@ -142,6 +147,7 @@ sunos_read_dynamic_info (abfd)
struct external_sun4_dynamic dyninfo;
unsigned long dynver;
struct external_sun4_dynamic_link linkinfo;
+ bfd_size_type amt;
if (obj_aout_dynamic_info (abfd) != (PTR) NULL)
return true;
@@ -152,8 +158,8 @@ sunos_read_dynamic_info (abfd)
return false;
}
- info = ((struct sunos_dynamic_info *)
- bfd_zalloc (abfd, sizeof (struct sunos_dynamic_info)));
+ amt = sizeof (struct sunos_dynamic_info);
+ info = (struct sunos_dynamic_info *) bfd_zalloc (abfd, amt);
if (!info)
return false;
info->valid = false;
@@ -174,7 +180,8 @@ sunos_read_dynamic_info (abfd)
if ((abfd->flags & DYNAMIC) == 0)
return true;
if (! bfd_get_section_contents (abfd, obj_datasec (abfd), (PTR) &dyninfo,
- (file_ptr) 0, sizeof dyninfo))
+ (file_ptr) 0,
+ (bfd_size_type) sizeof dyninfo))
return true;
dynver = GET_WORD (abfd, dyninfo.ld_version);
@@ -195,7 +202,8 @@ sunos_read_dynamic_info (abfd)
/* This executable appears to be dynamically linked in a way that we
can understand. */
- if (! bfd_get_section_contents (abfd, dynsec, (PTR) &linkinfo, dynoff,
+ if (! bfd_get_section_contents (abfd, dynsec, (PTR) &linkinfo,
+ (file_ptr) dynoff,
(bfd_size_type) sizeof linkinfo))
return true;
@@ -277,6 +285,7 @@ sunos_slurp_dynamic_symtab (abfd)
bfd *abfd;
{
struct sunos_dynamic_info *info;
+ bfd_size_type amt;
/* Get the general dynamic information. */
if (obj_aout_dynamic_info (abfd) == NULL)
@@ -295,16 +304,12 @@ sunos_slurp_dynamic_symtab (abfd)
/* Get the dynamic nlist structures. */
if (info->dynsym == (struct external_nlist *) NULL)
{
- info->dynsym = ((struct external_nlist *)
- bfd_alloc (abfd,
- (info->dynsym_count
- * EXTERNAL_NLIST_SIZE)));
+ amt = (bfd_size_type) info->dynsym_count * EXTERNAL_NLIST_SIZE;
+ info->dynsym = (struct external_nlist *) bfd_alloc (abfd, amt);
if (info->dynsym == NULL && info->dynsym_count != 0)
return false;
- if (bfd_seek (abfd, info->dyninfo.ld_stab, SEEK_SET) != 0
- || (bfd_read ((PTR) info->dynsym, info->dynsym_count,
- EXTERNAL_NLIST_SIZE, abfd)
- != info->dynsym_count * EXTERNAL_NLIST_SIZE))
+ if (bfd_seek (abfd, (file_ptr) info->dyninfo.ld_stab, SEEK_SET) != 0
+ || bfd_bread ((PTR) info->dynsym, amt, abfd) != amt)
{
if (info->dynsym != NULL)
{
@@ -318,13 +323,12 @@ sunos_slurp_dynamic_symtab (abfd)
/* Get the dynamic strings. */
if (info->dynstr == (char *) NULL)
{
- info->dynstr = (char *) bfd_alloc (abfd, info->dyninfo.ld_symb_size);
+ amt = info->dyninfo.ld_symb_size;
+ info->dynstr = (char *) bfd_alloc (abfd, amt);
if (info->dynstr == NULL && info->dyninfo.ld_symb_size != 0)
return false;
- if (bfd_seek (abfd, info->dyninfo.ld_symbols, SEEK_SET) != 0
- || (bfd_read ((PTR) info->dynstr, 1, info->dyninfo.ld_symb_size,
- abfd)
- != info->dyninfo.ld_symb_size))
+ if (bfd_seek (abfd, (file_ptr) info->dyninfo.ld_symbols, SEEK_SET) != 0
+ || bfd_bread ((PTR) info->dynstr, amt, abfd) != amt)
{
if (info->dynstr != NULL)
{
@@ -367,8 +371,8 @@ sunos_canonicalize_dynamic_symtab (abfd, storage)
table = (bfd_byte *) bfd_malloc (table_size);
if (table == NULL && table_size != 0)
abort ();
- if (bfd_seek (abfd, info->dyninfo.ld_hash, SEEK_SET) != 0
- || bfd_read ((PTR) table, 1, table_size, abfd) != table_size)
+ if (bfd_seek (abfd, (file_ptr) info->dyninfo.ld_hash, SEEK_SET) != 0
+ || bfd_bread ((PTR) table, table_size, abfd) != table_size)
abort ();
for (i = 0; i < info->dynsym_count; i++)
{
@@ -398,18 +402,18 @@ sunos_canonicalize_dynamic_symtab (abfd, storage)
structures. */
if (info->canonical_dynsym == (aout_symbol_type *) NULL)
{
- info->canonical_dynsym = ((aout_symbol_type *)
- bfd_alloc (abfd,
- (info->dynsym_count
- * sizeof (aout_symbol_type))));
+ bfd_size_type size;
+ bfd_size_type strsize = info->dyninfo.ld_symb_size;
+
+ size = (bfd_size_type) info->dynsym_count * sizeof (aout_symbol_type);
+ info->canonical_dynsym = (aout_symbol_type *) bfd_alloc (abfd, size);
if (info->canonical_dynsym == NULL && info->dynsym_count != 0)
return -1;
if (! aout_32_translate_symbol_table (abfd, info->canonical_dynsym,
- info->dynsym, info->dynsym_count,
- info->dynstr,
- info->dyninfo.ld_symb_size,
- true))
+ info->dynsym,
+ (bfd_size_type) info->dynsym_count,
+ info->dynstr, strsize, true))
{
if (info->canonical_dynsym != NULL)
{
@@ -459,6 +463,7 @@ sunos_canonicalize_dynamic_reloc (abfd, storage, syms)
{
struct sunos_dynamic_info *info;
unsigned long i;
+ bfd_size_type size;
/* Get the general dynamic information. */
if (obj_aout_dynamic_info (abfd) == (PTR) NULL)
@@ -477,15 +482,12 @@ sunos_canonicalize_dynamic_reloc (abfd, storage, syms)
/* Get the dynamic reloc information. */
if (info->dynrel == NULL)
{
- info->dynrel = (PTR) bfd_alloc (abfd,
- (info->dynrel_count
- * obj_reloc_entry_size (abfd)));
- if (info->dynrel == NULL && info->dynrel_count != 0)
+ size = (bfd_size_type) info->dynrel_count * obj_reloc_entry_size (abfd);
+ info->dynrel = (PTR) bfd_alloc (abfd, size);
+ if (info->dynrel == NULL && size != 0)
return -1;
- if (bfd_seek (abfd, info->dyninfo.ld_rel, SEEK_SET) != 0
- || (bfd_read ((PTR) info->dynrel, info->dynrel_count,
- obj_reloc_entry_size (abfd), abfd)
- != info->dynrel_count * obj_reloc_entry_size (abfd)))
+ if (bfd_seek (abfd, (file_ptr) info->dyninfo.ld_rel, SEEK_SET) != 0
+ || bfd_bread ((PTR) info->dynrel, size, abfd) != size)
{
if (info->dynrel != NULL)
{
@@ -502,10 +504,8 @@ sunos_canonicalize_dynamic_reloc (abfd, storage, syms)
{
arelent *to;
- info->canonical_dynrel = ((arelent *)
- bfd_alloc (abfd,
- (info->dynrel_count
- * sizeof (arelent))));
+ size = (bfd_size_type) info->dynrel_count * sizeof (arelent);
+ info->canonical_dynrel = (arelent *) bfd_alloc (abfd, size);
if (info->canonical_dynrel == NULL && info->dynrel_count != 0)
return -1;
@@ -520,7 +520,7 @@ sunos_canonicalize_dynamic_reloc (abfd, storage, syms)
pend = p + info->dynrel_count;
for (; p < pend; p++, to++)
NAME(aout,swap_ext_reloc_in) (abfd, p, to, syms,
- info->dynsym_count);
+ (bfd_size_type) info->dynsym_count);
}
else
{
@@ -531,7 +531,7 @@ sunos_canonicalize_dynamic_reloc (abfd, storage, syms)
pend = p + info->dynrel_count;
for (; p < pend; p++, to++)
NAME(aout,swap_std_reloc_in) (abfd, p, to, syms,
- info->dynsym_count);
+ (bfd_size_type) info->dynsym_count);
}
}
@@ -564,21 +564,21 @@ static const bfd_byte sparc_plt_first_entry[SPARC_PLT_ENTRY_SIZE] =
};
/* save %sp, -96, %sp */
-#define SPARC_PLT_ENTRY_WORD0 0x9de3bfa0
+#define SPARC_PLT_ENTRY_WORD0 ((bfd_vma) 0x9de3bfa0)
/* call; address filled in later. */
-#define SPARC_PLT_ENTRY_WORD1 0x40000000
+#define SPARC_PLT_ENTRY_WORD1 ((bfd_vma) 0x40000000)
/* sethi; reloc index filled in later. */
-#define SPARC_PLT_ENTRY_WORD2 0x01000000
+#define SPARC_PLT_ENTRY_WORD2 ((bfd_vma) 0x01000000)
/* This sequence is used when for the jump table entry to a defined
symbol in a complete executable. It is used when linking PIC
compiled code which is not being put into a shared library. */
/* sethi <address to be filled in later>, %g1 */
-#define SPARC_PLT_PIC_WORD0 0x03000000
+#define SPARC_PLT_PIC_WORD0 ((bfd_vma) 0x03000000)
/* jmp %g1 + <address to be filled in later> */
-#define SPARC_PLT_PIC_WORD1 0x81c06000
+#define SPARC_PLT_PIC_WORD1 ((bfd_vma) 0x81c06000)
/* nop */
-#define SPARC_PLT_PIC_WORD2 0x01000000
+#define SPARC_PLT_PIC_WORD2 ((bfd_vma) 0x01000000)
/* An m68k procedure linkage table entry is 8 bytes. The first entry
in the table is a jump which is filled in the by the runtime
@@ -598,7 +598,7 @@ static const bfd_byte m68k_plt_first_entry[M68K_PLT_ENTRY_SIZE] =
};
/* bsrl */
-#define M68K_PLT_ENTRY_WORD0 (0x61ff)
+#define M68K_PLT_ENTRY_WORD0 ((bfd_vma) 0x61ff)
/* Remaining words filled in later. */
/* An entry in the SunOS linker hash table. */
@@ -715,9 +715,9 @@ sunos_link_hash_table_create (abfd)
bfd *abfd;
{
struct sunos_link_hash_table *ret;
+ bfd_size_type amt = sizeof (struct sunos_link_hash_table);
- ret = ((struct sunos_link_hash_table *)
- bfd_alloc (abfd, sizeof (struct sunos_link_hash_table)));
+ ret = (struct sunos_link_hash_table *) bfd_alloc (abfd, amt);
if (ret == (struct sunos_link_hash_table *) NULL)
return (struct bfd_link_hash_table *) NULL;
if (! NAME(aout,link_hash_table_init) (&ret->root, abfd,
@@ -875,10 +875,10 @@ sunos_add_dynamic_symbols (abfd, info, symsp, sym_countp, stringsp)
bfd_size_type *sym_countp;
char **stringsp;
{
- asection *s;
bfd *dynobj;
struct sunos_dynamic_info *dinfo;
unsigned long need;
+ asection **ps;
/* Make sure we have all the required sections. */
if (info->hash->creator == abfd->xvec)
@@ -904,17 +904,12 @@ sunos_add_dynamic_symbols (abfd, info, symsp, sym_countp, stringsp)
want, because that one still implies that the section takes up
space in the output file. If this is the first object we have
seen, we must preserve the dynamic sections we just created. */
- if (abfd != dynobj)
- abfd->sections = NULL;
- else
+ for (ps = &abfd->sections; *ps != NULL; )
{
- asection *s;
-
- for (s = abfd->sections;
- (s->flags & SEC_LINKER_CREATED) == 0;
- s = s->next)
- ;
- abfd->sections = s;
+ if (abfd != dynobj || ((*ps)->flags & SEC_LINKER_CREATED) == 0)
+ bfd_section_list_remove (abfd, ps);
+ else
+ ps = &(*ps)->next;
}
/* The native linker seems to just ignore dynamic objects when -r is
@@ -938,7 +933,7 @@ sunos_add_dynamic_symbols (abfd, info, symsp, sym_countp, stringsp)
/* The .need section holds the list of names of shared objets
which must be included at runtime. The address of this
section is put in the ld_need field. */
- s = bfd_make_section (dynobj, ".need");
+ asection *s = bfd_make_section (dynobj, ".need");
if (s == NULL
|| ! bfd_set_section_flags (dynobj, s,
(SEC_ALLOC
@@ -955,7 +950,7 @@ sunos_add_dynamic_symbols (abfd, info, symsp, sym_countp, stringsp)
/* The .rules section holds the path to search for shared
objects. The address of this section is put in the ld_rules
field. */
- s = bfd_make_section (dynobj, ".rules");
+ asection *s = bfd_make_section (dynobj, ".rules");
if (s == NULL
|| ! bfd_set_section_flags (dynobj, s,
(SEC_ALLOC
@@ -985,12 +980,12 @@ sunos_add_dynamic_symbols (abfd, info, symsp, sym_countp, stringsp)
unsigned short major_vno, minor_vno;
struct bfd_link_needed_list *needed, **pp;
char *namebuf, *p;
- size_t alc;
+ bfd_size_type alc;
bfd_byte b;
char *namecopy;
- if (bfd_seek (abfd, need, SEEK_SET) != 0
- || bfd_read (buf, 1, 16, abfd) != 16)
+ if (bfd_seek (abfd, (file_ptr) need, SEEK_SET) != 0
+ || bfd_bread (buf, (bfd_size_type) 16, abfd) != 16)
return false;
/* For the format of an ld_need entry, see aout/sun4.h. We
@@ -998,12 +993,12 @@ sunos_add_dynamic_symbols (abfd, info, symsp, sym_countp, stringsp)
name = bfd_get_32 (abfd, buf);
flags = bfd_get_32 (abfd, buf + 4);
- major_vno = (unsigned short)bfd_get_16 (abfd, buf + 8);
- minor_vno = (unsigned short)bfd_get_16 (abfd, buf + 10);
+ major_vno = (unsigned short) bfd_get_16 (abfd, buf + 8);
+ minor_vno = (unsigned short) bfd_get_16 (abfd, buf + 10);
need = bfd_get_32 (abfd, buf + 12);
- needed = ((struct bfd_link_needed_list *)
- bfd_alloc (abfd, sizeof (struct bfd_link_needed_list)));
+ alc = sizeof (struct bfd_link_needed_list);
+ needed = (struct bfd_link_needed_list *) bfd_alloc (abfd, alc);
if (needed == NULL)
return false;
needed->by = abfd;
@@ -1020,7 +1015,7 @@ sunos_add_dynamic_symbols (abfd, info, symsp, sym_countp, stringsp)
*p++ = '-';
*p++ = 'l';
}
- if (bfd_seek (abfd, name, SEEK_SET) != 0)
+ if (bfd_seek (abfd, (file_ptr) name, SEEK_SET) != 0)
{
free (namebuf);
return false;
@@ -1028,13 +1023,13 @@ sunos_add_dynamic_symbols (abfd, info, symsp, sym_countp, stringsp)
do
{
- if (bfd_read (&b, 1, 1, abfd) != 1)
+ if (bfd_bread (&b, (bfd_size_type) 1, abfd) != 1)
{
free (namebuf);
return false;
}
- if ((size_t) (p - namebuf) >= alc)
+ if ((bfd_size_type) (p - namebuf) >= alc)
{
char *n;
@@ -1085,7 +1080,7 @@ sunos_add_dynamic_symbols (abfd, info, symsp, sym_countp, stringsp)
strcat (p, minbuf);
}
- namecopy = bfd_alloc (abfd, strlen (namebuf) + 1);
+ namecopy = bfd_alloc (abfd, (bfd_size_type) strlen (namebuf) + 1);
if (namecopy == NULL)
{
free (namebuf);
@@ -1322,11 +1317,11 @@ bfd_sunos_size_dynamic_sections (output_bfd, info, sdynptr, sneedptr,
asection **srulesptr;
{
bfd *dynobj;
- size_t dynsymcount;
+ bfd_size_type dynsymcount;
struct sunos_link_hash_entry *h;
asection *s;
size_t bucketcount;
- size_t hashalloc;
+ bfd_size_type hashalloc;
size_t i;
bfd *sub;
@@ -1442,7 +1437,7 @@ bfd_sunos_size_dynamic_sections (output_bfd, info, sdynptr, sneedptr,
s->contents = (bfd_byte *) bfd_alloc (dynobj, hashalloc);
if (s->contents == NULL && dynsymcount > 0)
return false;
- memset (s->contents, 0, hashalloc);
+ memset (s->contents, 0, (size_t) hashalloc);
for (i = 0; i < bucketcount; i++)
PUT_WORD (output_bfd, (bfd_vma) -1, s->contents + i * HASH_ENTRY_SIZE);
s->_raw_size = bucketcount * HASH_ENTRY_SIZE;
@@ -1470,7 +1465,7 @@ bfd_sunos_size_dynamic_sections (output_bfd, info, sdynptr, sneedptr,
add = 8 - (s->_raw_size & 7);
contents = (bfd_byte *) bfd_realloc (s->contents,
- (size_t) (s->_raw_size + add));
+ s->_raw_size + add);
if (contents == NULL)
return false;
memset (contents + s->_raw_size, 0, (size_t) add);
@@ -1544,19 +1539,19 @@ sunos_scan_relocs (info, abfd, sec, rel_size)
return true;
if (! info->keep_memory)
- relocs = free_relocs = bfd_malloc ((size_t) rel_size);
+ relocs = free_relocs = bfd_malloc (rel_size);
else
{
struct aout_section_data_struct *n;
+ bfd_size_type amt = sizeof (struct aout_section_data_struct);
- n = ((struct aout_section_data_struct *)
- bfd_alloc (abfd, sizeof (struct aout_section_data_struct)));
+ n = (struct aout_section_data_struct *) bfd_alloc (abfd, amt);
if (n == NULL)
relocs = NULL;
else
{
set_aout_section_data (sec, n);
- relocs = bfd_malloc ((size_t) rel_size);
+ relocs = bfd_malloc (rel_size);
aout_section_data (sec)->relocs = relocs;
}
}
@@ -1564,7 +1559,7 @@ sunos_scan_relocs (info, abfd, sec, rel_size)
return false;
if (bfd_seek (abfd, sec->rel_filepos, SEEK_SET) != 0
- || bfd_read (relocs, 1, rel_size, abfd) != rel_size)
+ || bfd_bread (relocs, rel_size, abfd) != rel_size)
goto error_return;
if (obj_reloc_entry_size (abfd) == RELOC_STD_SIZE)
@@ -1777,6 +1772,7 @@ sunos_scan_ext_relocs (info, abfd, sec, relocs, rel_size)
asection *splt = NULL;
asection *sgot = NULL;
asection *srel = NULL;
+ bfd_size_type amt;
/* We only know how to handle SPARC plt entries. */
if (bfd_get_arch (abfd) != bfd_arch_sparc)
@@ -1868,10 +1864,10 @@ sunos_scan_ext_relocs (info, abfd, sec, relocs, rel_size)
if (adata (abfd).local_got_offsets == NULL)
{
+ amt = bfd_get_symcount (abfd);
+ amt *= sizeof (bfd_vma);
adata (abfd).local_got_offsets =
- (bfd_vma *) bfd_zalloc (abfd,
- (bfd_get_symcount (abfd)
- * sizeof (bfd_vma)));
+ (bfd_vma *) bfd_zalloc (abfd, amt);
if (adata (abfd).local_got_offsets == NULL)
return false;
}
@@ -2201,7 +2197,6 @@ sunos_write_dynamic_symbol (output_bfd, info, harg)
bfd *dynobj;
asection *splt;
bfd_byte *p;
- asection *s;
bfd_vma r_address;
dynobj = sunos_hash_table (info)->dynobj;
@@ -2230,8 +2225,6 @@ sunos_write_dynamic_symbol (output_bfd, info, harg)
}
else
{
- bfd_vma val;
-
val = (h->root.root.u.def.section->output_section->vma
+ h->root.root.u.def.section->output_offset
+ h->root.root.u.def.value);
@@ -2250,7 +2243,7 @@ sunos_write_dynamic_symbol (output_bfd, info, harg)
abort ();
bfd_put_16 (output_bfd, M68K_PLT_ENTRY_WORD0, p);
bfd_put_32 (output_bfd, (- (h->plt_offset + 2)), p + 2);
- bfd_put_16 (output_bfd, s->reloc_count, p + 6);
+ bfd_put_16 (output_bfd, (bfd_vma) s->reloc_count, p + 6);
r_address += 2;
break;
@@ -2399,13 +2392,13 @@ sunos_write_dynamic_symbol (output_bfd, info, harg)
outsym = ((struct external_nlist *)
(s->contents + h->dynindx * EXTERNAL_NLIST_SIZE));
- bfd_h_put_8 (output_bfd, type, outsym->e_type);
- bfd_h_put_8 (output_bfd, 0, outsym->e_other);
+ H_PUT_8 (output_bfd, type, outsym->e_type);
+ H_PUT_8 (output_bfd, 0, outsym->e_other);
/* FIXME: The native linker doesn't use 0 for desc. It seems to use
one less than the desc value in the shared library, although that
seems unlikely. */
- bfd_h_put_16 (output_bfd, 0, outsym->e_desc);
+ H_PUT_16 (output_bfd, 0, outsym->e_desc);
PUT_WORD (output_bfd, h->dynstr_index, outsym->e_strx);
PUT_WORD (output_bfd, val, outsym->e_value);
@@ -2668,7 +2661,7 @@ sunos_check_dynamic_reloc (info, input_bfd, input_section, harg, reloc,
}
*relocationp = (sgot->vma
- + (*got_offsetp &~ 1)
+ + (*got_offsetp &~ (bfd_vma) 1)
- sunos_hash_table (info)->got_base);
/* There is nothing else to do for a base relative reloc. */
@@ -2845,7 +2838,8 @@ sunos_finish_dynamic_link (abfd, info)
BFD_ASSERT (o->output_section != NULL
&& o->output_section->owner == abfd);
if (! bfd_set_section_contents (abfd, o->output_section,
- o->contents, o->output_offset,
+ o->contents,
+ (file_ptr) o->output_offset,
o->_raw_size))
return false;
}
@@ -2855,6 +2849,7 @@ sunos_finish_dynamic_link (abfd, info)
{
struct external_sun4_dynamic esd;
struct external_sun4_dynamic_link esdl;
+ file_ptr pos;
/* Finish up the dynamic link information. */
PUT_WORD (dynobj, (bfd_vma) 3, esd.ld_version);
@@ -2869,7 +2864,8 @@ sunos_finish_dynamic_link (abfd, info)
esd.ld);
if (! bfd_set_section_contents (abfd, sdyn->output_section, &esd,
- sdyn->output_offset, sizeof esd))
+ (file_ptr) sdyn->output_offset,
+ (bfd_size_type) sizeof esd))
return false;
PUT_WORD (dynobj, (bfd_vma) 0, esdl.ld_loaded);
@@ -2934,11 +2930,10 @@ sunos_finish_dynamic_link (abfd, info)
BFD_ALIGN (obj_textsec (abfd)->_raw_size, 0x2000),
esdl.ld_text);
+ pos = sdyn->output_offset;
+ pos += sizeof esd + EXTERNAL_SUN4_DYNAMIC_DEBUGGER_SIZE;
if (! bfd_set_section_contents (abfd, sdyn->output_section, &esdl,
- (sdyn->output_offset
- + sizeof esd
- + EXTERNAL_SUN4_DYNAMIC_DEBUGGER_SIZE),
- sizeof esdl))
+ pos, (bfd_size_type) sizeof esdl))
return false;
abfd->flags |= DYNAMIC;
diff --git a/contrib/binutils/bfd/syms.c b/contrib/binutils/bfd/syms.c
index 34169ec..9ec9dd8 100644
--- a/contrib/binutils/bfd/syms.c
+++ b/contrib/binutils/bfd/syms.c
@@ -1,6 +1,6 @@
/* Generic symbol-table support for the BFD library.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000
+ 2000, 2001
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -197,7 +197,7 @@ CODE_FRAGMENT
.
. {* The text of the symbol. The name is left alone, and not copied; the
. application may not alter it. *}
-. CONST char *name;
+. const char *name;
.
. {* The value of the symbol. This really should be a union of a
. numeric value with a pointer, since some flags indicate that
@@ -308,10 +308,12 @@ CODE_FRAGMENT
#include "bfd.h"
#include "sysdep.h"
#include "libbfd.h"
+#include "safe-ctype.h"
#include "bfdlink.h"
#include "aout/stab_gnu.h"
static char coff_section_type PARAMS ((const char *));
+static int cmpindexentry PARAMS ((const PTR, const PTR));
/*
DOCDD
@@ -353,7 +355,10 @@ bfd_is_local_label (abfd, sym)
bfd *abfd;
asymbol *sym;
{
- if ((sym->flags & (BSF_GLOBAL | BSF_WEAK)) != 0)
+ /* The BSF_SECTION_SYM check is needed for IA-64, where every label that
+ starts with '.' is local. This would accidentally catch section names
+ if we didn't reject them here. */
+ if ((sym->flags & (BSF_GLOBAL | BSF_WEAK | BSF_SECTION_SYM)) != 0)
return false;
if (sym->name == NULL)
return false;
@@ -429,14 +434,15 @@ FUNCTION
bfd_print_symbol_vandf
SYNOPSIS
- void bfd_print_symbol_vandf(PTR file, asymbol *symbol);
+ void bfd_print_symbol_vandf(bfd *abfd, PTR file, asymbol *symbol);
DESCRIPTION
Print the value and flags of the @var{symbol} supplied to the
stream @var{file}.
*/
void
-bfd_print_symbol_vandf (arg, symbol)
+bfd_print_symbol_vandf (abfd, arg, symbol)
+ bfd *abfd;
PTR arg;
asymbol *symbol;
{
@@ -444,11 +450,12 @@ bfd_print_symbol_vandf (arg, symbol)
flagword type = symbol->flags;
if (symbol->section != (asection *) NULL)
{
- fprintf_vma (file, symbol->value + symbol->section->vma);
+ bfd_fprintf_vma (abfd, file,
+ symbol->value + symbol->section->vma);
}
else
{
- fprintf_vma (file, symbol->value);
+ bfd_fprintf_vma (abfd, file, symbol->value);
}
/* This presumes that a symbol can not be both BSF_DEBUGGING and
@@ -489,6 +496,31 @@ DESCRIPTION
/*
FUNCTION
+ _bfd_generic_make_empty_symbol
+
+SYNOPSIS
+ asymbol *_bfd_generic_make_empty_symbol (bfd *);
+
+DESCRIPTION
+ Create a new <<asymbol>> structure for the BFD @var{abfd}
+ and return a pointer to it. Used by core file routines,
+ binary back-end and anywhere else where no private info
+ is needed.
+*/
+
+asymbol *
+_bfd_generic_make_empty_symbol (abfd)
+ bfd *abfd;
+{
+ bfd_size_type amt = sizeof (asymbol);
+ asymbol *new = (asymbol *) bfd_zalloc (abfd, amt);
+ if (new)
+ new->the_bfd = abfd;
+ return new;
+}
+
+/*
+FUNCTION
bfd_make_debug_symbol
DESCRIPTION
@@ -502,14 +534,14 @@ DESCRIPTION
struct section_to_type
{
- CONST char *section;
+ const char *section;
char type;
};
/* Map section names to POSIX/BSD single-character symbol types.
This table is probably incomplete. It is sorted for convenience of
adding entries. Since it is so short, a linear search is used. */
-static CONST struct section_to_type stt[] =
+static const struct section_to_type stt[] =
{
{"*DEBUG*", 'N'},
{".bss", 'b'},
@@ -541,7 +573,7 @@ static char
coff_section_type (s)
const char *s;
{
- CONST struct section_to_type *t;
+ const struct section_to_type *t;
for (t = &stt[0]; t->section; t++)
if (!strncmp (s, t->section, strlen (t->section)))
@@ -550,13 +582,6 @@ coff_section_type (s)
return '?';
}
-#ifndef islower
-#define islower(c) ((c) >= 'a' && (c) <= 'z')
-#endif
-#ifndef toupper
-#define toupper(c) (islower(c) ? ((c) & ~0x20) : (c))
-#endif
-
/*
FUNCTION
bfd_decode_symclass
@@ -611,7 +636,7 @@ bfd_decode_symclass (symbol)
else
return '?';
if (symbol->flags & BSF_GLOBAL)
- c = toupper (c);
+ c = TOUPPER (c);
return c;
/* We don't have to handle these cases just yet, but we will soon:
@@ -718,7 +743,7 @@ _bfd_generic_read_minisymbols (abfd, dynamic, minisymsp, sizep)
if (storage == 0)
return 0;
- syms = (asymbol **) bfd_malloc ((size_t) storage);
+ syms = (asymbol **) bfd_malloc ((bfd_size_type) storage);
if (syms == NULL)
goto error_return;
@@ -848,7 +873,8 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
bfd_byte *last_stab = NULL;
bfd_size_type stroff;
struct indexentry *indexentry;
- char *directory_name, *file_name;
+ char *file_name;
+ char *directory_name;
int saw_fun;
*pfound = false;
@@ -894,11 +920,10 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
arelent **reloc_vector;
int i;
char *name;
- char *file_name;
- char *directory_name;
char *function_name;
+ bfd_size_type amt = sizeof *info;
- info = (struct stab_find_info *) bfd_zalloc (abfd, sizeof *info);
+ info = (struct stab_find_info *) bfd_zalloc (abfd, amt);
if (info == NULL)
return false;
@@ -925,10 +950,10 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
if (info->stabs == NULL || info->strs == NULL)
return false;
- if (! bfd_get_section_contents (abfd, info->stabsec, info->stabs, 0,
- stabsize)
- || ! bfd_get_section_contents (abfd, info->strsec, info->strs, 0,
- strsize))
+ if (! bfd_get_section_contents (abfd, info->stabsec, info->stabs,
+ (bfd_vma) 0, stabsize)
+ || ! bfd_get_section_contents (abfd, info->strsec, info->strs,
+ (bfd_vma) 0, strsize))
return false;
/* If this is a relocateable object file, we have to relocate
@@ -938,7 +963,7 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
reloc_size = bfd_get_reloc_upper_bound (abfd, info->stabsec);
if (reloc_size < 0)
return false;
- reloc_vector = (arelent **) bfd_malloc (reloc_size);
+ reloc_vector = (arelent **) bfd_malloc ((bfd_size_type) reloc_size);
if (reloc_vector == NULL && reloc_size != 0)
return false;
reloc_count = bfd_canonicalize_reloc (abfd, info->stabsec, reloc_vector,
@@ -979,7 +1004,7 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
val &= r->howto->src_mask;
sym = *r->sym_ptr_ptr;
val += sym->value + sym->section->vma + r->addend;
- bfd_put_32 (abfd, val, info->stabs + r->address);
+ bfd_put_32 (abfd, (bfd_vma) val, info->stabs + r->address);
}
}
@@ -1029,10 +1054,9 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
return true;
++info->indextablesize;
- info->indextable = ((struct indexentry *)
- bfd_alloc (abfd,
- (sizeof (struct indexentry)
- * info->indextablesize)));
+ amt = info->indextablesize;
+ amt *= sizeof (struct indexentry);
+ info->indextable = (struct indexentry *) bfd_alloc (abfd, amt);
if (info->indextable == NULL)
return false;
@@ -1150,7 +1174,8 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
++i;
info->indextablesize = i;
- qsort (info->indextable, i, sizeof (struct indexentry), cmpindexentry);
+ qsort (info->indextable, (size_t) i, sizeof (struct indexentry),
+ cmpindexentry);
*pinfo = (PTR) info;
}
@@ -1272,9 +1297,8 @@ _bfd_stab_section_find_nearest_line (abfd, symbols, section, offset, pfound,
{
if (info->filename != NULL)
free (info->filename);
- info->filename = (char *) bfd_malloc (dirlen +
- strlen (file_name)
- + 1);
+ info->filename = (char *) bfd_malloc ((bfd_size_type) dirlen
+ + strlen (file_name) + 1);
if (info->filename == NULL)
return false;
strcpy (info->filename, directory_name);
diff --git a/contrib/binutils/bfd/sysdep.h b/contrib/binutils/bfd/sysdep.h
index bab1c51..1338d6b 100644
--- a/contrib/binutils/bfd/sysdep.h
+++ b/contrib/binutils/bfd/sysdep.h
@@ -125,6 +125,12 @@ extern void free ();
extern char *getenv ();
#endif
+/* Define offsetof for those systems which lack it */
+
+#ifndef offsetof
+#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+#endif
+
#ifdef ENABLE_NLS
#include <libintl.h>
/* Note the use of dgetext() and PACKAGE here, rather than gettext().
diff --git a/contrib/binutils/bfd/targets.c b/contrib/binutils/bfd/targets.c
index cfbe6ad..352571a 100644
--- a/contrib/binutils/bfd/targets.c
+++ b/contrib/binutils/bfd/targets.c
@@ -1,6 +1,6 @@
/* Generic target-file-type support for the BFD library.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001
+ 2000, 2001, 2002
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -153,7 +153,8 @@ DESCRIPTION
. bfd_target_versados_flavour,
. bfd_target_msdos_flavour,
. bfd_target_ovax_flavour,
-. bfd_target_evax_flavour
+. bfd_target_evax_flavour,
+. bfd_target_mmo_flavour
.};
.
.enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN };
@@ -208,27 +209,27 @@ Entries for byte swapping for data. These are different from the other
entry points, since they don't take a BFD asthe first argument.
Certain other handlers could do the same.
-. bfd_vma (*bfd_getx64) PARAMS ((const bfd_byte *));
+. bfd_vma (*bfd_getx64) PARAMS ((const bfd_byte *));
. bfd_signed_vma (*bfd_getx_signed_64) PARAMS ((const bfd_byte *));
-. void (*bfd_putx64) PARAMS ((bfd_vma, bfd_byte *));
-. bfd_vma (*bfd_getx32) PARAMS ((const bfd_byte *));
+. void (*bfd_putx64) PARAMS ((bfd_vma, bfd_byte *));
+. bfd_vma (*bfd_getx32) PARAMS ((const bfd_byte *));
. bfd_signed_vma (*bfd_getx_signed_32) PARAMS ((const bfd_byte *));
-. void (*bfd_putx32) PARAMS ((bfd_vma, bfd_byte *));
-. bfd_vma (*bfd_getx16) PARAMS ((const bfd_byte *));
+. void (*bfd_putx32) PARAMS ((bfd_vma, bfd_byte *));
+. bfd_vma (*bfd_getx16) PARAMS ((const bfd_byte *));
. bfd_signed_vma (*bfd_getx_signed_16) PARAMS ((const bfd_byte *));
-. void (*bfd_putx16) PARAMS ((bfd_vma, bfd_byte *));
+. void (*bfd_putx16) PARAMS ((bfd_vma, bfd_byte *));
Byte swapping for the headers
-. bfd_vma (*bfd_h_getx64) PARAMS ((const bfd_byte *));
+. bfd_vma (*bfd_h_getx64) PARAMS ((const bfd_byte *));
. bfd_signed_vma (*bfd_h_getx_signed_64) PARAMS ((const bfd_byte *));
-. void (*bfd_h_putx64) PARAMS ((bfd_vma, bfd_byte *));
-. bfd_vma (*bfd_h_getx32) PARAMS ((const bfd_byte *));
+. void (*bfd_h_putx64) PARAMS ((bfd_vma, bfd_byte *));
+. bfd_vma (*bfd_h_getx32) PARAMS ((const bfd_byte *));
. bfd_signed_vma (*bfd_h_getx_signed_32) PARAMS ((const bfd_byte *));
-. void (*bfd_h_putx32) PARAMS ((bfd_vma, bfd_byte *));
-. bfd_vma (*bfd_h_getx16) PARAMS ((const bfd_byte *));
+. void (*bfd_h_putx32) PARAMS ((bfd_vma, bfd_byte *));
+. bfd_vma (*bfd_h_getx16) PARAMS ((const bfd_byte *));
. bfd_signed_vma (*bfd_h_getx_signed_16) PARAMS ((const bfd_byte *));
-. void (*bfd_h_putx16) PARAMS ((bfd_vma, bfd_byte *));
+. void (*bfd_h_putx16) PARAMS ((bfd_vma, bfd_byte *));
Format dependent routines: these are vectors of entry points
within the target vector structure, one for each format to check.
@@ -239,225 +240,223 @@ Check the format of a file being read. Return a <<bfd_target *>> or zero.
Set the format of a file being written.
-. boolean (*_bfd_set_format[bfd_type_end]) PARAMS ((bfd *));
+. boolean (*_bfd_set_format[bfd_type_end]) PARAMS ((bfd *));
Write cached information into a file being written, at <<bfd_close>>.
-. boolean (*_bfd_write_contents[bfd_type_end]) PARAMS ((bfd *));
+. boolean (*_bfd_write_contents[bfd_type_end]) PARAMS ((bfd *));
The general target vector. These vectors are initialized using the
BFD_JUMP_TABLE macros.
.
. {* Generic entry points. *}
-.#define BFD_JUMP_TABLE_GENERIC(NAME)\
-.CAT(NAME,_close_and_cleanup),\
-.CAT(NAME,_bfd_free_cached_info),\
-.CAT(NAME,_new_section_hook),\
-.CAT(NAME,_get_section_contents),\
-.CAT(NAME,_get_section_contents_in_window)
+Do not "beautify" the CONCAT* macro args. Traditional C will not
+remove whitespace added here, and thus will fail to concatenate
+the tokens.
+.#define BFD_JUMP_TABLE_GENERIC(NAME) \
+.CONCAT2 (NAME,_close_and_cleanup), \
+.CONCAT2 (NAME,_bfd_free_cached_info), \
+.CONCAT2 (NAME,_new_section_hook), \
+.CONCAT2 (NAME,_get_section_contents), \
+.CONCAT2 (NAME,_get_section_contents_in_window)
.
. {* Called when the BFD is being closed to do any necessary cleanup. *}
-. boolean (*_close_and_cleanup) PARAMS ((bfd *));
+. boolean (*_close_and_cleanup) PARAMS ((bfd *));
. {* Ask the BFD to free all cached information. *}
-. boolean (*_bfd_free_cached_info) PARAMS ((bfd *));
+. boolean (*_bfd_free_cached_info) PARAMS ((bfd *));
. {* Called when a new section is created. *}
-. boolean (*_new_section_hook) PARAMS ((bfd *, sec_ptr));
+. boolean (*_new_section_hook) PARAMS ((bfd *, sec_ptr));
. {* Read the contents of a section. *}
-. boolean (*_bfd_get_section_contents) PARAMS ((bfd *, sec_ptr, PTR,
-. file_ptr, bfd_size_type));
-. boolean (*_bfd_get_section_contents_in_window)
-. PARAMS ((bfd *, sec_ptr, bfd_window *,
-. file_ptr, bfd_size_type));
+. boolean (*_bfd_get_section_contents) PARAMS ((bfd *, sec_ptr, PTR,
+. file_ptr, bfd_size_type));
+. boolean (*_bfd_get_section_contents_in_window)
+. PARAMS ((bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type));
.
. {* Entry points to copy private data. *}
-.#define BFD_JUMP_TABLE_COPY(NAME)\
-.CAT(NAME,_bfd_copy_private_bfd_data),\
-.CAT(NAME,_bfd_merge_private_bfd_data),\
-.CAT(NAME,_bfd_copy_private_section_data),\
-.CAT(NAME,_bfd_copy_private_symbol_data),\
-.CAT(NAME,_bfd_set_private_flags),\
-.CAT(NAME,_bfd_print_private_bfd_data)\
+.#define BFD_JUMP_TABLE_COPY(NAME) \
+.CONCAT2 (NAME,_bfd_copy_private_bfd_data), \
+.CONCAT2 (NAME,_bfd_merge_private_bfd_data), \
+.CONCAT2 (NAME,_bfd_copy_private_section_data), \
+.CONCAT2 (NAME,_bfd_copy_private_symbol_data), \
+.CONCAT2 (NAME,_bfd_set_private_flags), \
+.CONCAT2 (NAME,_bfd_print_private_bfd_data) \
. {* Called to copy BFD general private data from one object file
. to another. *}
-. boolean (*_bfd_copy_private_bfd_data) PARAMS ((bfd *, bfd *));
+. boolean (*_bfd_copy_private_bfd_data) PARAMS ((bfd *, bfd *));
. {* Called to merge BFD general private data from one object file
. to a common output file when linking. *}
-. boolean (*_bfd_merge_private_bfd_data) PARAMS ((bfd *, bfd *));
+. boolean (*_bfd_merge_private_bfd_data) PARAMS ((bfd *, bfd *));
. {* Called to copy BFD private section data from one object file
. to another. *}
-. boolean (*_bfd_copy_private_section_data) PARAMS ((bfd *, sec_ptr,
-. bfd *, sec_ptr));
+. boolean (*_bfd_copy_private_section_data) PARAMS ((bfd *, sec_ptr,
+. bfd *, sec_ptr));
. {* Called to copy BFD private symbol data from one symbol
. to another. *}
-. boolean (*_bfd_copy_private_symbol_data) PARAMS ((bfd *, asymbol *,
-. bfd *, asymbol *));
+. boolean (*_bfd_copy_private_symbol_data) PARAMS ((bfd *, asymbol *,
+. bfd *, asymbol *));
. {* Called to set private backend flags *}
-. boolean (*_bfd_set_private_flags) PARAMS ((bfd *, flagword));
+. boolean (*_bfd_set_private_flags) PARAMS ((bfd *, flagword));
.
. {* Called to print private BFD data *}
-. boolean (*_bfd_print_private_bfd_data) PARAMS ((bfd *, PTR));
+. boolean (*_bfd_print_private_bfd_data) PARAMS ((bfd *, PTR));
.
. {* Core file entry points. *}
-.#define BFD_JUMP_TABLE_CORE(NAME)\
-.CAT(NAME,_core_file_failing_command),\
-.CAT(NAME,_core_file_failing_signal),\
-.CAT(NAME,_core_file_matches_executable_p)
+.#define BFD_JUMP_TABLE_CORE(NAME) \
+.CONCAT2 (NAME,_core_file_failing_command), \
+.CONCAT2 (NAME,_core_file_failing_signal), \
+.CONCAT2 (NAME,_core_file_matches_executable_p)
. char * (*_core_file_failing_command) PARAMS ((bfd *));
. int (*_core_file_failing_signal) PARAMS ((bfd *));
. boolean (*_core_file_matches_executable_p) PARAMS ((bfd *, bfd *));
.
. {* Archive entry points. *}
-.#define BFD_JUMP_TABLE_ARCHIVE(NAME)\
-.CAT(NAME,_slurp_armap),\
-.CAT(NAME,_slurp_extended_name_table),\
-.CAT(NAME,_construct_extended_name_table),\
-.CAT(NAME,_truncate_arname),\
-.CAT(NAME,_write_armap),\
-.CAT(NAME,_read_ar_hdr),\
-.CAT(NAME,_openr_next_archived_file),\
-.CAT(NAME,_get_elt_at_index),\
-.CAT(NAME,_generic_stat_arch_elt),\
-.CAT(NAME,_update_armap_timestamp)
+.#define BFD_JUMP_TABLE_ARCHIVE(NAME) \
+.CONCAT2 (NAME,_slurp_armap), \
+.CONCAT2 (NAME,_slurp_extended_name_table), \
+.CONCAT2 (NAME,_construct_extended_name_table), \
+.CONCAT2 (NAME,_truncate_arname), \
+.CONCAT2 (NAME,_write_armap), \
+.CONCAT2 (NAME,_read_ar_hdr), \
+.CONCAT2 (NAME,_openr_next_archived_file), \
+.CONCAT2 (NAME,_get_elt_at_index), \
+.CONCAT2 (NAME,_generic_stat_arch_elt), \
+.CONCAT2 (NAME,_update_armap_timestamp)
. boolean (*_bfd_slurp_armap) PARAMS ((bfd *));
. boolean (*_bfd_slurp_extended_name_table) PARAMS ((bfd *));
. boolean (*_bfd_construct_extended_name_table)
-. PARAMS ((bfd *, char **, bfd_size_type *, const char **));
-. void (*_bfd_truncate_arname) PARAMS ((bfd *, CONST char *, char *));
-. boolean (*write_armap) PARAMS ((bfd *arch,
-. unsigned int elength,
-. struct orl *map,
-. unsigned int orl_count,
-. int stridx));
-. PTR (*_bfd_read_ar_hdr_fn) PARAMS ((bfd *));
-. bfd * (*openr_next_archived_file) PARAMS ((bfd *arch, bfd *prev));
+. PARAMS ((bfd *, char **, bfd_size_type *, const char **));
+. void (*_bfd_truncate_arname) PARAMS ((bfd *, const char *, char *));
+. boolean (*write_armap)
+. PARAMS ((bfd *, unsigned int, struct orl *, unsigned int, int));
+. PTR (*_bfd_read_ar_hdr_fn) PARAMS ((bfd *));
+. bfd * (*openr_next_archived_file) PARAMS ((bfd *, bfd *));
.#define bfd_get_elt_at_index(b,i) BFD_SEND(b, _bfd_get_elt_at_index, (b,i))
. bfd * (*_bfd_get_elt_at_index) PARAMS ((bfd *, symindex));
. int (*_bfd_stat_arch_elt) PARAMS ((bfd *, struct stat *));
. boolean (*_bfd_update_armap_timestamp) PARAMS ((bfd *));
.
. {* Entry points used for symbols. *}
-.#define BFD_JUMP_TABLE_SYMBOLS(NAME)\
-.CAT(NAME,_get_symtab_upper_bound),\
-.CAT(NAME,_get_symtab),\
-.CAT(NAME,_make_empty_symbol),\
-.CAT(NAME,_print_symbol),\
-.CAT(NAME,_get_symbol_info),\
-.CAT(NAME,_bfd_is_local_label_name),\
-.CAT(NAME,_get_lineno),\
-.CAT(NAME,_find_nearest_line),\
-.CAT(NAME,_bfd_make_debug_symbol),\
-.CAT(NAME,_read_minisymbols),\
-.CAT(NAME,_minisymbol_to_symbol)
-. long (*_bfd_get_symtab_upper_bound) PARAMS ((bfd *));
-. long (*_bfd_canonicalize_symtab) PARAMS ((bfd *,
-. struct symbol_cache_entry **));
-. struct symbol_cache_entry *
-. (*_bfd_make_empty_symbol) PARAMS ((bfd *));
-. void (*_bfd_print_symbol) PARAMS ((bfd *, PTR,
-. struct symbol_cache_entry *,
-. bfd_print_symbol_type));
+.#define BFD_JUMP_TABLE_SYMBOLS(NAME) \
+.CONCAT2 (NAME,_get_symtab_upper_bound), \
+.CONCAT2 (NAME,_get_symtab), \
+.CONCAT2 (NAME,_make_empty_symbol), \
+.CONCAT2 (NAME,_print_symbol), \
+.CONCAT2 (NAME,_get_symbol_info), \
+.CONCAT2 (NAME,_bfd_is_local_label_name), \
+.CONCAT2 (NAME,_get_lineno), \
+.CONCAT2 (NAME,_find_nearest_line), \
+.CONCAT2 (NAME,_bfd_make_debug_symbol), \
+.CONCAT2 (NAME,_read_minisymbols), \
+.CONCAT2 (NAME,_minisymbol_to_symbol)
+. long (*_bfd_get_symtab_upper_bound) PARAMS ((bfd *));
+. long (*_bfd_canonicalize_symtab) PARAMS ((bfd *,
+. struct symbol_cache_entry **));
+. struct symbol_cache_entry *
+. (*_bfd_make_empty_symbol) PARAMS ((bfd *));
+. void (*_bfd_print_symbol) PARAMS ((bfd *, PTR,
+. struct symbol_cache_entry *,
+. bfd_print_symbol_type));
.#define bfd_print_symbol(b,p,s,e) BFD_SEND(b, _bfd_print_symbol, (b,p,s,e))
-. void (*_bfd_get_symbol_info) PARAMS ((bfd *,
-. struct symbol_cache_entry *,
-. symbol_info *));
+. void (*_bfd_get_symbol_info) PARAMS ((bfd *,
+. struct symbol_cache_entry *,
+. symbol_info *));
.#define bfd_get_symbol_info(b,p,e) BFD_SEND(b, _bfd_get_symbol_info, (b,p,e))
-. boolean (*_bfd_is_local_label_name) PARAMS ((bfd *, const char *));
+. boolean (*_bfd_is_local_label_name) PARAMS ((bfd *, const char *));
.
-. alent * (*_get_lineno) PARAMS ((bfd *, struct symbol_cache_entry *));
-. boolean (*_bfd_find_nearest_line) PARAMS ((bfd *abfd,
-. struct sec *section, struct symbol_cache_entry **symbols,
-. bfd_vma offset, CONST char **file, CONST char **func,
-. unsigned int *line));
+. alent * (*_get_lineno) PARAMS ((bfd *, struct symbol_cache_entry *));
+. boolean (*_bfd_find_nearest_line)
+. PARAMS ((bfd *, struct sec *, struct symbol_cache_entry **, bfd_vma,
+. const char **, const char **, unsigned int *));
. {* Back-door to allow format-aware applications to create debug symbols
. while using BFD for everything else. Currently used by the assembler
. when creating COFF files. *}
-. asymbol * (*_bfd_make_debug_symbol) PARAMS ((
-. bfd *abfd,
-. void *ptr,
-. unsigned long size));
+. asymbol *(*_bfd_make_debug_symbol) PARAMS ((bfd *, void *,
+. unsigned long size));
.#define bfd_read_minisymbols(b, d, m, s) \
. BFD_SEND (b, _read_minisymbols, (b, d, m, s))
-. long (*_read_minisymbols) PARAMS ((bfd *, boolean, PTR *,
-. unsigned int *));
+. long (*_read_minisymbols) PARAMS ((bfd *, boolean, PTR *,
+. unsigned int *));
.#define bfd_minisymbol_to_symbol(b, d, m, f) \
. BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f))
. asymbol *(*_minisymbol_to_symbol) PARAMS ((bfd *, boolean, const PTR,
. asymbol *));
.
. {* Routines for relocs. *}
-.#define BFD_JUMP_TABLE_RELOCS(NAME)\
-.CAT(NAME,_get_reloc_upper_bound),\
-.CAT(NAME,_canonicalize_reloc),\
-.CAT(NAME,_bfd_reloc_type_lookup)
-. long (*_get_reloc_upper_bound) PARAMS ((bfd *, sec_ptr));
-. long (*_bfd_canonicalize_reloc) PARAMS ((bfd *, sec_ptr, arelent **,
-. struct symbol_cache_entry **));
+.#define BFD_JUMP_TABLE_RELOCS(NAME) \
+.CONCAT2 (NAME,_get_reloc_upper_bound), \
+.CONCAT2 (NAME,_canonicalize_reloc), \
+.CONCAT2 (NAME,_bfd_reloc_type_lookup)
+. long (*_get_reloc_upper_bound) PARAMS ((bfd *, sec_ptr));
+. long (*_bfd_canonicalize_reloc) PARAMS ((bfd *, sec_ptr, arelent **,
+. struct symbol_cache_entry **));
. {* See documentation on reloc types. *}
. reloc_howto_type *
-. (*reloc_type_lookup) PARAMS ((bfd *abfd,
-. bfd_reloc_code_real_type code));
+. (*reloc_type_lookup) PARAMS ((bfd *, bfd_reloc_code_real_type));
.
. {* Routines used when writing an object file. *}
-.#define BFD_JUMP_TABLE_WRITE(NAME)\
-.CAT(NAME,_set_arch_mach),\
-.CAT(NAME,_set_section_contents)
-. boolean (*_bfd_set_arch_mach) PARAMS ((bfd *, enum bfd_architecture,
-. unsigned long));
-. boolean (*_bfd_set_section_contents) PARAMS ((bfd *, sec_ptr, PTR,
-. file_ptr, bfd_size_type));
+.#define BFD_JUMP_TABLE_WRITE(NAME) \
+.CONCAT2 (NAME,_set_arch_mach), \
+.CONCAT2 (NAME,_set_section_contents)
+. boolean (*_bfd_set_arch_mach) PARAMS ((bfd *, enum bfd_architecture,
+. unsigned long));
+. boolean (*_bfd_set_section_contents) PARAMS ((bfd *, sec_ptr, PTR,
+. file_ptr, bfd_size_type));
.
. {* Routines used by the linker. *}
-.#define BFD_JUMP_TABLE_LINK(NAME)\
-.CAT(NAME,_sizeof_headers),\
-.CAT(NAME,_bfd_get_relocated_section_contents),\
-.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_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 *,
-. bfd_byte *data, boolean relocateable,
-. struct symbol_cache_entry **));
+.#define BFD_JUMP_TABLE_LINK(NAME) \
+.CONCAT2 (NAME,_sizeof_headers), \
+.CONCAT2 (NAME,_bfd_get_relocated_section_contents), \
+.CONCAT2 (NAME,_bfd_relax_section), \
+.CONCAT2 (NAME,_bfd_link_hash_table_create), \
+.CONCAT2 (NAME,_bfd_link_add_symbols), \
+.CONCAT2 (NAME,_bfd_final_link), \
+.CONCAT2 (NAME,_bfd_link_split_section), \
+.CONCAT2 (NAME,_bfd_gc_sections), \
+.CONCAT2 (NAME,_bfd_merge_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 *,
+. bfd_byte *, boolean, struct symbol_cache_entry **));
.
-. boolean (*_bfd_relax_section) PARAMS ((bfd *, struct sec *,
-. struct bfd_link_info *, boolean *again));
+. boolean (*_bfd_relax_section)
+. PARAMS ((bfd *, struct sec *, struct bfd_link_info *, boolean *));
.
. {* Create a hash table for the linker. Different backends store
. different information in this table. *}
. struct bfd_link_hash_table *(*_bfd_link_hash_table_create) PARAMS ((bfd *));
.
. {* Add symbols from this object file into the hash table. *}
-. boolean (*_bfd_link_add_symbols) PARAMS ((bfd *, struct bfd_link_info *));
+. boolean (*_bfd_link_add_symbols) PARAMS ((bfd *, struct bfd_link_info *));
.
. {* Do a link based on the link_order structures attached to each
. section of the BFD. *}
-. boolean (*_bfd_final_link) PARAMS ((bfd *, struct bfd_link_info *));
+. boolean (*_bfd_final_link) PARAMS ((bfd *, struct bfd_link_info *));
.
. {* Should this section be split up into smaller pieces during linking. *}
-. boolean (*_bfd_link_split_section) PARAMS ((bfd *, struct sec *));
+. boolean (*_bfd_link_split_section) PARAMS ((bfd *, struct sec *));
.
. {* Remove sections that are not referenced from the output. *}
-. boolean (*_bfd_gc_sections) PARAMS ((bfd *, struct bfd_link_info *));
+. boolean (*_bfd_gc_sections) PARAMS ((bfd *, struct bfd_link_info *));
+.
+. {* Attempt to merge SEC_MERGE sections. *}
+. boolean (*_bfd_merge_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),\
-.CAT(NAME,_get_dynamic_reloc_upper_bound),\
-.CAT(NAME,_canonicalize_dynamic_reloc)
+.#define BFD_JUMP_TABLE_DYNAMIC(NAME) \
+.CONCAT2 (NAME,_get_dynamic_symtab_upper_bound), \
+.CONCAT2 (NAME,_canonicalize_dynamic_symtab), \
+.CONCAT2 (NAME,_get_dynamic_reloc_upper_bound), \
+.CONCAT2 (NAME,_canonicalize_dynamic_reloc)
. {* Get the amount of memory required to hold the dynamic symbols. *}
-. long (*_bfd_get_dynamic_symtab_upper_bound) PARAMS ((bfd *));
+. long (*_bfd_get_dynamic_symtab_upper_bound) PARAMS ((bfd *));
. {* Read in the dynamic symbols. *}
-. long (*_bfd_canonicalize_dynamic_symtab)
+. long (*_bfd_canonicalize_dynamic_symtab)
. PARAMS ((bfd *, struct symbol_cache_entry **));
. {* Get the amount of memory required to hold the dynamic relocs. *}
-. long (*_bfd_get_dynamic_reloc_upper_bound) PARAMS ((bfd *));
+. long (*_bfd_get_dynamic_reloc_upper_bound) PARAMS ((bfd *));
. {* Read in the dynamic relocs. *}
-. long (*_bfd_canonicalize_dynamic_reloc)
+. long (*_bfd_canonicalize_dynamic_reloc)
. PARAMS ((bfd *, arelent **, struct symbol_cache_entry **));
.
@@ -517,6 +516,7 @@ extern const bfd_target bfd_elf32_cris_vec;
extern const bfd_target bfd_elf32_d10v_vec;
extern const bfd_target bfd_elf32_d30v_vec;
extern const bfd_target bfd_elf32_fr30_vec;
+extern const bfd_target bfd_elf32_h8300_vec;
extern const bfd_target bfd_elf32_hppa_linux_vec;
extern const bfd_target bfd_elf32_hppa_vec;
extern const bfd_target bfd_elf32_i370_vec;
@@ -525,6 +525,7 @@ extern const bfd_target bfd_elf32_i860_little_vec;
extern const bfd_target bfd_elf32_i860_vec;
extern const bfd_target bfd_elf32_i960_vec;
extern const bfd_target bfd_elf32_ia64_big_vec;
+extern const bfd_target bfd_elf32_ia64_hpux_big_vec;
extern const bfd_target bfd_elf32_little_generic_vec;
extern const bfd_target bfd_elf32_littlearc_vec;
extern const bfd_target bfd_elf32_littlearm_oabi_vec;
@@ -539,32 +540,45 @@ extern const bfd_target bfd_elf32_mcore_big_vec;
extern const bfd_target bfd_elf32_mcore_little_vec;
extern const bfd_target bfd_elf32_mn10200_vec;
extern const bfd_target bfd_elf32_mn10300_vec;
+extern const bfd_target bfd_elf32_openrisc_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_s390_vec;
extern const bfd_target bfd_elf32_sh_vec;
extern const bfd_target bfd_elf32_shblin_vec;
extern const bfd_target bfd_elf32_shl_vec;
extern const bfd_target bfd_elf32_shlin_vec;
+extern const bfd_target bfd_elf32_shlnbsd_vec;
+extern const bfd_target bfd_elf32_shnbsd_vec;
extern const bfd_target bfd_elf32_sparc_vec;
extern const bfd_target bfd_elf32_tradbigmips_vec;
extern const bfd_target bfd_elf32_tradlittlemips_vec;
extern const bfd_target bfd_elf32_us_cris_vec;
extern const bfd_target bfd_elf32_v850_vec;
+extern const bfd_target bfd_elf32_xstormy16_vec;
extern const bfd_target bfd_elf64_alpha_vec;
extern const bfd_target bfd_elf64_big_generic_vec;
extern const bfd_target bfd_elf64_bigmips_vec;
extern const bfd_target bfd_elf64_hppa_linux_vec;
extern const bfd_target bfd_elf64_hppa_vec;
+extern const bfd_target bfd_elf64_ia64_aix_big_vec;
+extern const bfd_target bfd_elf64_ia64_aix_little_vec;
extern const bfd_target bfd_elf64_ia64_big_vec;
+extern const bfd_target bfd_elf64_ia64_hpux_big_vec;
extern const bfd_target bfd_elf64_ia64_little_vec;
extern const bfd_target bfd_elf64_little_generic_vec;
extern const bfd_target bfd_elf64_littlemips_vec;
+extern const bfd_target bfd_elf64_mmix_vec;
+extern const bfd_target bfd_elf64_powerpc_vec;
+extern const bfd_target bfd_elf64_powerpcle_vec;
+extern const bfd_target bfd_elf64_s390_vec;
+extern const bfd_target bfd_elf64_sparc_vec;
extern const bfd_target bfd_elf64_tradbigmips_vec;
extern const bfd_target bfd_elf64_tradlittlemips_vec;
-extern const bfd_target bfd_elf64_sparc_vec;
extern const bfd_target bfd_elf64_x86_64_vec;
+extern const bfd_target bfd_mmo_vec;
extern const bfd_target bfd_powerpc_pe_vec;
extern const bfd_target bfd_powerpc_pei_vec;
extern const bfd_target bfd_powerpcle_pe_vec;
@@ -625,6 +639,7 @@ extern const bfd_target nlm32_sparc_vec;
extern const bfd_target oasys_vec;
extern const bfd_target pc532machaout_vec;
extern const bfd_target pc532netbsd_vec;
+extern const bfd_target pdp11_aout_vec;
extern const bfd_target pmac_xcoff_vec;
extern const bfd_target ppcboot_vec;
extern const bfd_target riscix_vec;
@@ -644,7 +659,6 @@ extern const bfd_target sparclynx_aout_vec;
extern const bfd_target sparclynx_coff_vec;
extern const bfd_target sparcnetbsd_vec;
extern const bfd_target sunos_big_vec;
-extern const bfd_target tekhex_vec;
extern const bfd_target tic30_aout_vec;
extern const bfd_target tic30_coff_vec;
extern const bfd_target tic54x_coff0_beh_vec;
@@ -662,28 +676,25 @@ extern const bfd_target w65_vec;
extern const bfd_target we32kcoff_vec;
extern const bfd_target z8kcoff_vec;
-/* srec is always included. */
+/* These are always included. */
extern const bfd_target srec_vec;
extern const bfd_target symbolsrec_vec;
-
-/* binary is always included. */
+extern const bfd_target tekhex_vec;
extern const bfd_target binary_vec;
-
-/* ihex is always included. */
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_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 hpux_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 ptrace_core_vec;
extern const bfd_target sco5_core_vec;
extern const bfd_target trad_core_vec;
-extern const bfd_target ptrace_core_vec;
static const bfd_target * const _bfd_target_vector[] = {
@@ -704,127 +715,152 @@ static const bfd_target * const _bfd_target_vector[] = {
it wasn't omitted by mistake. */
&a29kcoff_big_vec,
&a_out_adobe_vec,
-#if 0 /* No one seems to use this. */
+ &aout0_big_vec,
+#if 0
+ /* We have no way of distinguishing these from other a.out variants */
+ &aout_arm_big_vec,
+ &aout_arm_little_vec,
+ /* No one seems to use this. */
&aout_mips_big_vec,
#endif
&aout_mips_little_vec,
+#if 0
+ &apollocoff_vec,
+#endif
+ &arm_epoc_pe_big_vec,
+ &arm_epoc_pe_little_vec,
+ &arm_epoc_pei_big_vec,
+ &arm_epoc_pei_little_vec,
+ &armcoff_big_vec,
+ &armcoff_little_vec,
+ &armnetbsd_vec,
+ &armpe_big_vec,
+ &armpe_little_vec,
+ &armpei_big_vec,
+ &armpei_little_vec,
&b_out_vec_big_host,
&b_out_vec_little_host,
-
&bfd_efi_app_ia32_vec,
#ifdef BFD64
&bfd_efi_app_ia64_vec,
#endif
+ &bfd_elf32_avr_vec,
/* This, and other vectors, may not be used in any *.mt configuration.
But that does not mean they are unnecessary. If configured with
--enable-targets=all, objdump or gdb should be able to examine
the file even if we don't recognize the machine type. */
&bfd_elf32_big_generic_vec,
-#ifdef BFD64
- &bfd_elf64_alpha_vec,
- &bfd_elf64_hppa_vec,
- &bfd_elf64_hppa_linux_vec,
- &bfd_elf64_ia64_little_vec,
- &bfd_elf64_ia64_big_vec,
-#endif
- &bfd_elf32_avr_vec,
&bfd_elf32_bigarc_vec,
- &bfd_elf32_bigarm_vec,
- &bfd_elf32_bigarm_oabi_vec,
+ &bfd_elf32_bigarm_oabi_vec,
+ &bfd_elf32_bigarm_vec,
&bfd_elf32_bigmips_vec,
-#ifdef BFD64
- &bfd_elf64_bigmips_vec,
-#endif
&bfd_elf32_cris_vec,
- &bfd_elf32_us_cris_vec,
&bfd_elf32_d10v_vec,
&bfd_elf32_d30v_vec,
- &bfd_elf32_hppa_vec,
+ &bfd_elf32_fr30_vec,
+ &bfd_elf32_h8300_vec,
&bfd_elf32_hppa_linux_vec,
+ &bfd_elf32_hppa_vec,
&bfd_elf32_i370_vec,
&bfd_elf32_i386_vec,
-#ifdef BFD64
- &bfd_elf64_x86_64_vec,
-#endif
- &bfd_elf32_i860_vec,
&bfd_elf32_i860_little_vec,
+ &bfd_elf32_i860_vec,
&bfd_elf32_i960_vec,
+#if 0
+ &bfd_elf32_ia64_big_vec,
+#endif
+ &bfd_elf32_ia64_hpux_big_vec,
&bfd_elf32_little_generic_vec,
&bfd_elf32_littlearc_vec,
- &bfd_elf32_littlearm_vec,
- &bfd_elf32_littlearm_oabi_vec,
+ &bfd_elf32_littlearm_oabi_vec,
+ &bfd_elf32_littlearm_vec,
&bfd_elf32_littlemips_vec,
-#ifdef BFD64
- &bfd_elf64_littlemips_vec,
-#endif
&bfd_elf32_m32r_vec,
- &bfd_elf32_mn10200_vec,
- &bfd_elf32_mn10300_vec,
&bfd_elf32_m68hc11_vec,
&bfd_elf32_m68hc12_vec,
&bfd_elf32_m68k_vec,
&bfd_elf32_m88k_vec,
+ &bfd_elf32_mcore_big_vec,
+ &bfd_elf32_mcore_little_vec,
+ &bfd_elf32_mn10200_vec,
+ &bfd_elf32_mn10300_vec,
+ &bfd_elf32_openrisc_vec,
&bfd_elf32_pj_vec,
&bfd_elf32_pjl_vec,
&bfd_elf32_powerpc_vec,
&bfd_elf32_powerpcle_vec,
+ &bfd_elf32_s390_vec,
+ &bfd_elf32_sh_vec,
+ &bfd_elf32_shblin_vec,
+ &bfd_elf32_shl_vec,
+ &bfd_elf32_shlin_vec,
+ &bfd_elf32_shlnbsd_vec,
+ &bfd_elf32_shnbsd_vec,
&bfd_elf32_sparc_vec,
- &bfd_elf32_v850_vec,
- &bfd_elf32_fr30_vec,
- &bfd_elf32_mcore_big_vec,
- &bfd_elf32_mcore_little_vec,
&bfd_elf32_tradbigmips_vec,
&bfd_elf32_tradlittlemips_vec,
+ &bfd_elf32_us_cris_vec,
+ &bfd_elf32_v850_vec,
+ &bfd_elf32_xstormy16_vec,
#ifdef BFD64
- &bfd_elf64_tradbigmips_vec,
- &bfd_elf64_tradlittlemips_vec,
- /* No one seems to use this. */
+ &bfd_elf64_alpha_vec,
&bfd_elf64_big_generic_vec,
+ &bfd_elf64_bigmips_vec,
+ &bfd_elf64_hppa_linux_vec,
+ &bfd_elf64_hppa_vec,
+ &bfd_elf64_ia64_aix_big_vec,
+ &bfd_elf64_ia64_aix_little_vec,
+ &bfd_elf64_ia64_big_vec,
+ &bfd_elf64_ia64_hpux_big_vec,
+ &bfd_elf64_ia64_little_vec,
&bfd_elf64_little_generic_vec,
-#endif
+ &bfd_elf64_littlemips_vec,
+ &bfd_elf64_mmix_vec,
+ &bfd_elf64_powerpc_vec,
+ &bfd_elf64_powerpcle_vec,
+ &bfd_elf64_s390_vec,
#if 0
&bfd_elf64_sparc_vec,
#endif
- /* We don't include cisco_core_*_vec. Although it has a magic number,
- the magic number isn't at the beginning of the file, and thus
- might spuriously match other kinds of files. */
-
- &cris_aout_vec,
+ &bfd_elf64_tradbigmips_vec,
+ &bfd_elf64_tradlittlemips_vec,
+ &bfd_elf64_x86_64_vec,
+ &bfd_mmo_vec,
+#endif
+ &bfd_powerpc_pe_vec,
+ &bfd_powerpc_pei_vec,
+ &bfd_powerpcle_pe_vec,
+ &bfd_powerpcle_pei_vec,
+ &cris_aout_vec,
#ifdef BFD64
&demo_64_vec, /* Only compiled if host has long-long support */
#endif
&ecoff_big_vec,
- &ecoff_little_vec,
&ecoff_biglittle_vec,
+ &ecoff_little_vec,
#ifdef BFD64
&ecoffalpha_little_vec,
#endif
+ &go32coff_vec,
+ &go32stubbedcoff_vec,
&h8300coff_vec,
&h8500coff_vec,
#if 0
/* Since a.out files lack decent magic numbers, no way to recognize
which kind of a.out file it is. */
&host_aout_vec,
-#endif
-#if 0 /* Clashes with sunos_big_vec magic no. */
+ /* Clashes with sunos_big_vec magic no. */
&hp300bsd_vec,
#endif
&hp300hpux_vec,
-#if defined (HOST_HPPAHPUX) || defined (HOST_HPPABSD) || defined (HOST_HPPAOSF)
- &som_vec,
-#endif
&i386aout_vec,
&i386bsd_vec,
&i386coff_vec,
+#if 0
+ &i386dynix_vec,
+#endif
&i386freebsd_vec,
- &i860coff_vec,
- &bfd_powerpc_pe_vec,
- &bfd_powerpcle_pe_vec,
- &bfd_powerpc_pei_vec,
- &bfd_powerpcle_pei_vec,
- &go32coff_vec,
- &go32stubbedcoff_vec,
#if 0
/* Since a.out files lack decent magic numbers, no way to recognize
which kind of a.out file it is. */
@@ -841,20 +877,14 @@ static const bfd_target * const _bfd_target_vector[] = {
&i386os9k_vec,
&i386pe_vec,
&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,
+ &i860coff_vec,
&icoff_big_vec,
&icoff_little_vec,
&ieee_vec,
+#if 0
+ &m68k4knetbsd_vec,
+ &m68kaux_coff_vec,
+#endif
&m68kcoff_vec,
&m68kcoffun_vec,
#if 0
@@ -872,13 +902,15 @@ static const bfd_target * const _bfd_target_vector[] = {
&mcore_pe_little_vec,
&mcore_pei_big_vec,
&mcore_pei_little_vec,
+ &mipslpe_vec,
+ &mipslpei_vec,
&newsos3_vec,
- &nlm32_i386_vec,
- &nlm32_sparc_vec,
#ifdef BFD64
&nlm32_alpha_vec,
#endif
- &pc532netbsd_vec,
+ &nlm32_i386_vec,
+ &nlm32_powerpc_vec,
+ &nlm32_sparc_vec,
#if 0
/* We have no oasys tools anymore, so we can't test any of this
anymore. If you want to test the stuff yourself, go ahead...
@@ -888,40 +920,45 @@ static const bfd_target * const _bfd_target_vector[] = {
&oasys_vec,
#endif
&pc532machaout_vec,
-#if 0
- /* We have no way of distinguishing these from other a.out variants */
- &aout_arm_big_vec,
- &aout_arm_little_vec,
- &riscix_vec,
-#endif
+ &pc532netbsd_vec,
+ &pdp11_aout_vec,
#if 0
/* This has the same magic number as RS/6000. */
&pmac_xcoff_vec,
#endif
- &rs6000coff_vec,
+ &ppcboot_vec,
+#if 0
+ /* We have no way of distinguishing these from other a.out variants */
+ &riscix_vec,
+#endif
#ifdef BFD64
&rs6000coff64_vec,
#endif
- &ppcboot_vec,
- &shcoff_vec,
- &shlcoff_vec,
+ &rs6000coff_vec,
&shcoff_small_vec,
+ &shcoff_vec,
&shlcoff_small_vec,
+ &shlcoff_vec,
+ &shlpe_vec,
+ &shlpei_vec,
+#if defined (HOST_HPPAHPUX) || defined (HOST_HPPABSD) || defined (HOST_HPPAOSF)
+ &som_vec,
+#endif
+ &sparccoff_vec,
&sparcle_aout_vec,
&sparclinux_vec,
&sparclynx_aout_vec,
&sparclynx_coff_vec,
&sparcnetbsd_vec,
&sunos_big_vec,
- &aout0_big_vec,
&tic30_aout_vec,
&tic30_coff_vec,
- &tic54x_coff0_vec,
&tic54x_coff0_beh_vec,
- &tic54x_coff1_vec,
+ &tic54x_coff0_vec,
&tic54x_coff1_beh_vec,
- &tic54x_coff2_vec,
+ &tic54x_coff1_vec,
&tic54x_coff2_beh_vec,
+ &tic54x_coff2_vec,
&tic80coff_vec,
&vaxnetbsd_vec,
&versados_vec,
@@ -929,9 +966,9 @@ static const bfd_target * const _bfd_target_vector[] = {
&vms_alpha_vec,
#endif
&vms_vax_vec,
+ &w65_vec,
&we32kcoff_vec,
&z8kcoff_vec,
-
#endif /* not SELECT_VECS */
/* Always support S-records, for convenience. */
@@ -949,12 +986,19 @@ static const bfd_target * const _bfd_target_vector[] = {
#ifdef AIX386_CORE
&aix386_core_vec,
#endif
-#ifdef HPUX_CORE
- &hpux_core_vec,
+#if 0
+ /* 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. */
+ &cisco_core_big_vec,
+ &cisco_core_little_vec,
#endif
#ifdef HPPABSD_CORE
&hppabsd_core_vec,
#endif
+#ifdef HPUX_CORE
+ &hpux_core_vec,
+#endif
#ifdef IRIX_CORE
&irix_core_vec,
#endif
@@ -964,17 +1008,16 @@ static const bfd_target * const _bfd_target_vector[] = {
#ifdef OSF_CORE
&osf_core_vec,
#endif
+#ifdef PTRACE_CORE
+ &ptrace_core_vec,
+#endif
#ifdef SCO5_CORE
&sco5_core_vec,
#endif
-#ifdef TRAD_CORE
+#ifdef TRAD_CORE
&trad_core_vec,
#endif
-#ifdef PTRACE_CORE
- &ptrace_core_vec,
-#endif
-
NULL /* end of list marker */
};
const bfd_target * const *bfd_target_vector = _bfd_target_vector;
@@ -1081,7 +1124,7 @@ FUNCTION
bfd_find_target
SYNOPSIS
- const bfd_target *bfd_find_target(CONST char *target_name, bfd *abfd);
+ const bfd_target *bfd_find_target(const char *target_name, bfd *abfd);
DESCRIPTION
Return a pointer to the transfer vector for the object target
@@ -1147,19 +1190,20 @@ const char **
bfd_target_list ()
{
int vec_length= 0;
+ bfd_size_type amt;
#if defined (HOST_HPPAHPUX) && ! defined (__STDC__)
/* The native compiler on the HP9000/700 has a bug which causes it
to loop endlessly when compiling this file. This avoids it. */
volatile
#endif
- const bfd_target * const *target;
- CONST char **name_list, **name_ptr;
+ const bfd_target * const *target;
+ const char **name_list, **name_ptr;
for (target = &bfd_target_vector[0]; *target != NULL; target++)
vec_length++;
- name_ptr = name_list = (CONST char **)
- bfd_zmalloc ((vec_length + 1) * sizeof (char **));
+ amt = (vec_length + 1) * sizeof (char **);
+ name_ptr = name_list = (const char **) bfd_zmalloc (amt);
if (name_list == NULL)
return NULL;
diff --git a/contrib/binutils/bfd/targmatch.sed b/contrib/binutils/bfd/targmatch.sed
index 2f40e72..2716876 100644
--- a/contrib/binutils/bfd/targmatch.sed
+++ b/contrib/binutils/bfd/targmatch.sed
@@ -1,5 +1,6 @@
1,/START OF targmatch.h/ d
/END OF targmatch.h/,$ d
+/^[ ]*case/,/^[ ]*esac/ d
s/^#if/KEEP #if/
s/^#endif/KEEP #endif/
s/^[ ]*#.*$//
diff --git a/contrib/binutils/bfd/tekhex.c b/contrib/binutils/bfd/tekhex.c
index ccfe7d8..f5d5160 100644
--- a/contrib/binutils/bfd/tekhex.c
+++ b/contrib/binutils/bfd/tekhex.c
@@ -1,5 +1,5 @@
/* BFD backend for Extended Tektronix Hex Format objects.
- Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000
+ Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
@@ -107,7 +107,7 @@ static asymbol *tekhex_make_empty_symbol PARAMS ((bfd *));
static int tekhex_sizeof_headers PARAMS ((bfd *, boolean));
static boolean tekhex_write_object_contents PARAMS ((bfd *));
static void out PARAMS ((bfd *, int, char *, char *));
-static void writesym PARAMS ((char **, CONST char *));
+static void writesym PARAMS ((char **, const char *));
static void writevalue PARAMS ((char **, bfd_vma));
static boolean tekhex_set_section_contents
PARAMS ((bfd*, sec_ptr, PTR, file_ptr, bfd_size_type));
@@ -354,11 +354,11 @@ find_chunk (abfd, vma)
}
if (!d)
{
- char *sname = bfd_alloc (abfd, 12);
+ char *sname = bfd_alloc (abfd, (bfd_size_type) 12);
/* No chunk for this address, so make one up */
- d = (struct data_struct *)
- bfd_alloc (abfd, sizeof (struct data_struct));
+ d = ((struct data_struct *)
+ bfd_alloc (abfd, (bfd_size_type) sizeof (struct data_struct)));
if (!sname || !d)
return NULL;
@@ -394,7 +394,7 @@ first_phase (abfd, type, src)
char *src;
{
asection *section = bfd_abs_section_ptr;
- int len;
+ unsigned int len;
char sym[17]; /* A symbol can only be 16chars long */
switch (type)
@@ -419,7 +419,7 @@ first_phase (abfd, type, src)
section = bfd_get_section_by_name (abfd, sym);
if (section == (asection *) NULL)
{
- char *n = bfd_alloc (abfd, len + 1);
+ char *n = bfd_alloc (abfd, (bfd_size_type) len + 1);
if (!n)
abort (); /* FIXME */
@@ -445,10 +445,10 @@ first_phase (abfd, type, src)
case '8':
/* Symbols, add to section */
{
+ bfd_size_type amt = sizeof (tekhex_symbol_type);
tekhex_symbol_type *new =
- (tekhex_symbol_type *) bfd_alloc (abfd,
- sizeof (tekhex_symbol_type));
- char type = (*src);
+ (tekhex_symbol_type *) bfd_alloc (abfd, amt);
+ char stype = (*src);
if (!new)
abort (); /* FIXME */
@@ -459,12 +459,12 @@ first_phase (abfd, type, src)
new->prev = abfd->tdata.tekhex_data->symbols;
abfd->tdata.tekhex_data->symbols = new;
len = getsym (sym, &src);
- new->symbol.name = bfd_alloc (abfd, len + 1);
+ new->symbol.name = bfd_alloc (abfd, (bfd_size_type) len + 1);
if (!new->symbol.name)
abort (); /* FIXME */
memcpy ((char *) (new->symbol.name), sym, len + 1);
new->symbol.section = section;
- if (type <= '4')
+ if (stype <= '4')
new->symbol.flags = (BSF_GLOBAL | BSF_EXPORT);
else
new->symbol.flags = BSF_LOCAL;
@@ -496,17 +496,17 @@ pass_over (abfd, func)
char type;
/* Find first '%' */
- eof = (boolean) (bfd_read (src, 1, 1, abfd) != 1);
+ eof = (boolean) (bfd_bread (src, (bfd_size_type) 1, abfd) != 1);
while (*src != '%' && !eof)
{
- eof = (boolean) (bfd_read (src, 1, 1, abfd) != 1);
+ eof = (boolean) (bfd_bread (src, (bfd_size_type) 1, abfd) != 1);
}
if (eof)
break;
src++;
/* Fetch the type and the length and the checksum */
- if (bfd_read (src, 1, 5, abfd) != 5)
+ if (bfd_bread (src, (bfd_size_type) 5, abfd) != 5)
abort (); /* FIXME */
type = src[2];
@@ -516,7 +516,7 @@ pass_over (abfd, func)
chars_on_line = HEX (src) - 5; /* Already read five char */
- if (bfd_read (src, 1, chars_on_line, abfd) != chars_on_line)
+ if (bfd_bread (src, (bfd_size_type) chars_on_line, abfd) != chars_on_line)
abort (); /* FIXME */
src[chars_on_line] = 0; /* put a null at the end */
@@ -555,8 +555,9 @@ static boolean
tekhex_mkobject (abfd)
bfd *abfd;
{
- tdata_type *tdata = (tdata_type *) bfd_alloc (abfd, sizeof (tdata_type));
+ tdata_type *tdata;
+ tdata = (tdata_type *) bfd_alloc (abfd, (bfd_size_type) sizeof (tdata_type));
if (!tdata)
return false;
abfd->tdata.tekhex_data = tdata;
@@ -580,7 +581,7 @@ tekhex_object_p (abfd)
tekhex_init ();
if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0
- || bfd_read (b, 1, 4, abfd) != 4)
+ || bfd_bread (b, (bfd_size_type) 4, abfd) != 4)
return NULL;
if (b[0] != '%' || !ISHEX (b[1]) || !ISHEX (b[2]) || !ISHEX (b[3]))
@@ -597,7 +598,7 @@ move_section_contents (abfd, section, locationp, offset, count, get)
bfd *abfd;
asection *section;
PTR locationp;
- file_ptr offset ATTRIBUTE_UNUSED;
+ file_ptr offset;
bfd_size_type count;
boolean get;
{
@@ -606,10 +607,11 @@ move_section_contents (abfd, section, locationp, offset, count, get)
bfd_vma prev_number = 1; /* Nothing can have this as a high bit*/
struct data_struct *d = (struct data_struct *) NULL;
+ BFD_ASSERT (offset == 0);
for (addr = section->vma; count != 0; count--, addr++)
{
-
- bfd_vma chunk_number = addr & ~CHUNK_MASK; /* Get high bits of address */
+ /* Get high bits of address. */
+ bfd_vma chunk_number = addr & ~(bfd_vma) CHUNK_MASK;
bfd_vma low_bits = addr & CHUNK_MASK;
if (chunk_number != prev_number)
@@ -689,7 +691,7 @@ tekhex_set_section_contents (abfd, section, locationp, offset, bytes_to_do)
{
if (s->flags & SEC_LOAD)
{
- for (vma = s->vma & ~CHUNK_MASK;
+ for (vma = s->vma & ~(bfd_vma) CHUNK_MASK;
vma < s->vma + s->_raw_size;
vma += CHUNK_MASK)
find_chunk (abfd, vma);
@@ -699,7 +701,8 @@ tekhex_set_section_contents (abfd, section, locationp, offset, bytes_to_do)
}
if (section->flags & (SEC_LOAD | SEC_ALLOC))
{
- move_section_contents (abfd, section, locationp, offset, bytes_to_do, false);
+ move_section_contents (abfd, section, locationp, offset, bytes_to_do,
+ false);
return true;
}
else
@@ -740,7 +743,7 @@ writevalue (dst, value)
static void
writesym (dst, sym)
char **dst;
- CONST char *sym;
+ const char *sym;
{
char *p = *dst;
int len = (sym ? strlen (sym) : 0);
@@ -797,11 +800,11 @@ out (abfd, type, start, end)
sum += sum_block[(unsigned char) front[2]];
sum += sum_block[(unsigned char) front[3]]; /* type */
TOHEX (front + 4, sum);
- if (bfd_write (front, 1, 6, abfd) != 6)
+ if (bfd_bwrite (front, (bfd_size_type) 6, abfd) != 6)
abort ();
end[0] = '\n';
wrlen = end - start + 1;
- if (bfd_write (start, 1, wrlen, abfd) != wrlen)
+ if (bfd_bwrite (start, wrlen, abfd) != wrlen)
abort ();
}
@@ -826,7 +829,7 @@ tekhex_write_object_contents (abfd)
{
int low;
- CONST int span = 32;
+ const int span = 32;
int addr;
/* Write it in blocks of 32 bytes */
@@ -876,10 +879,10 @@ tekhex_write_object_contents (abfd)
if (section_code != '?')
{ /* do not include debug symbols */
- asymbol *s = *p;
+ asymbol *sym = *p;
char *dst = buffer;
- writesym (&dst, s->section->name);
+ writesym (&dst, sym->section->name);
switch (section_code)
{
@@ -911,15 +914,15 @@ tekhex_write_object_contents (abfd)
return false;
}
- writesym (&dst, s->name);
- writevalue (&dst, s->value + s->section->vma);
+ writesym (&dst, sym->name);
+ writevalue (&dst, sym->value + sym->section->vma);
out (abfd, '3', buffer, dst);
}
}
}
/* And the terminator */
- if (bfd_write ("%0781010\n", 1, 9, abfd) != 9)
+ if (bfd_bwrite ("%0781010\n", (bfd_size_type) 9, abfd) != 9)
abort ();
return true;
}
@@ -937,8 +940,8 @@ static asymbol *
tekhex_make_empty_symbol (abfd)
bfd *abfd;
{
- tekhex_symbol_type *new =
- (tekhex_symbol_type *) bfd_zalloc (abfd, sizeof (struct tekhex_symbol_struct));
+ bfd_size_type amt = sizeof (struct tekhex_symbol_struct);
+ tekhex_symbol_type *new = (tekhex_symbol_type *) bfd_zalloc (abfd, amt);
if (!new)
return NULL;
@@ -957,8 +960,8 @@ tekhex_get_symbol_info (ignore_abfd, symbol, ret)
}
static void
-tekhex_print_symbol (ignore_abfd, filep, symbol, how)
- bfd *ignore_abfd ATTRIBUTE_UNUSED;
+tekhex_print_symbol (abfd, filep, symbol, how)
+ bfd *abfd;
PTR filep;
asymbol *symbol;
bfd_print_symbol_type how;
@@ -975,9 +978,9 @@ tekhex_print_symbol (ignore_abfd, filep, symbol, how)
case bfd_print_symbol_all:
{
- CONST char *section_name = symbol->section->name;
+ const char *section_name = symbol->section->name;
- bfd_print_symbol_vandf ((PTR) file, symbol);
+ bfd_print_symbol_vandf (abfd, (PTR) file, symbol);
fprintf (file, " %-5s %s",
section_name,
@@ -1001,6 +1004,7 @@ tekhex_print_symbol (ignore_abfd, filep, symbol, how)
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_merge_sections bfd_generic_merge_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
diff --git a/contrib/binutils/bfd/trad-core.c b/contrib/binutils/bfd/trad-core.c
index 872ad54..aed0b50 100644
--- a/contrib/binutils/bfd/trad-core.c
+++ b/contrib/binutils/bfd/trad-core.c
@@ -1,6 +1,6 @@
/* BFD back end for traditional Unix core files (U-area and raw sections)
Copyright 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999,
- 2000
+ 2000, 2001, 2002
Free Software Foundation, Inc.
Written by John Gilmore of Cygnus Support.
@@ -80,14 +80,15 @@ trad_unix_core_file_p (abfd)
int val;
struct user u;
struct trad_core_struct *rawptr;
+ bfd_size_type amt;
#ifdef TRAD_CORE_USER_OFFSET
/* If defined, this macro is the file position of the user struct. */
- if (bfd_seek (abfd, TRAD_CORE_USER_OFFSET, SEEK_SET) != 0)
+ if (bfd_seek (abfd, (file_ptr) TRAD_CORE_USER_OFFSET, SEEK_SET) != 0)
return 0;
#endif
- val = bfd_read ((void *)&u, 1, sizeof u, abfd);
+ val = bfd_bread ((void *) &u, (bfd_size_type) sizeof u, abfd);
if (val != sizeof u)
{
/* Too small to be a core file */
@@ -149,8 +150,8 @@ trad_unix_core_file_p (abfd)
/* Allocate both the upage and the struct core_data at once, so
a single free() will free them both. */
- rawptr = (struct trad_core_struct *)
- bfd_zmalloc (sizeof (struct trad_core_struct));
+ amt = sizeof (struct trad_core_struct);
+ rawptr = (struct trad_core_struct *) bfd_zmalloc (amt);
if (rawptr == NULL)
return 0;
@@ -158,22 +159,17 @@ trad_unix_core_file_p (abfd)
rawptr->u = u; /*Copy the uarea into the tdata part of the bfd */
- /* Create the sections. This is raunchy, but bfd_close wants to free
- them separately. */
+ /* Create the sections. */
- core_stacksec(abfd) = (asection *) bfd_zalloc (abfd, sizeof (asection));
+ core_stacksec(abfd) = bfd_make_section_anyway (abfd, ".stack");
if (core_stacksec (abfd) == NULL)
- return NULL;
- core_datasec (abfd) = (asection *) bfd_zalloc (abfd, sizeof (asection));
+ goto fail;
+ core_datasec (abfd) = bfd_make_section_anyway (abfd, ".data");
if (core_datasec (abfd) == NULL)
- return NULL;
- core_regsec (abfd) = (asection *) bfd_zalloc (abfd, sizeof (asection));
+ goto fail;
+ core_regsec (abfd) = bfd_make_section_anyway (abfd, ".reg");
if (core_regsec (abfd) == NULL)
- return NULL;
-
- core_stacksec (abfd)->name = ".stack";
- core_datasec (abfd)->name = ".data";
- core_regsec (abfd)->name = ".reg";
+ goto fail;
core_stacksec (abfd)->flags = SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS;
core_datasec (abfd)->flags = SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS;
@@ -230,12 +226,13 @@ trad_unix_core_file_p (abfd)
core_datasec (abfd)->alignment_power = 2;
core_regsec (abfd)->alignment_power = 2;
- abfd->sections = core_stacksec (abfd);
- core_stacksec (abfd)->next = core_datasec (abfd);
- core_datasec (abfd)->next = core_regsec (abfd);
- abfd->section_count = 3;
-
return abfd->xvec;
+
+ fail:
+ bfd_release (abfd, abfd->tdata.any);
+ abfd->tdata.any = NULL;
+ bfd_section_list_clear (abfd);
+ return NULL;
}
char *
diff --git a/contrib/binutils/bfd/version.h b/contrib/binutils/bfd/version.h
new file mode 100644
index 0000000..55d8900
--- /dev/null
+++ b/contrib/binutils/bfd/version.h
@@ -0,0 +1 @@
+#define BFD_VERSION_DATE 20020127
diff --git a/contrib/binutils/binutils/ChangeLog b/contrib/binutils/binutils/ChangeLog
index 5470118..f091a47 100644
--- a/contrib/binutils/binutils/ChangeLog
+++ b/contrib/binutils/binutils/ChangeLog
@@ -1,13 +1,412 @@
-2001-10-17 Nick Clifton <nickc@cambridge.redhat.com>
+2002-01-25 Jason R. Thorpe <thorpej@wasabisystems.com>
+
+ * objcopy.c (strip_usage): Document -d as an alias
+ --strip-debug.
+
+ * size.c (usage): Document [-t | --totals] options.
+ (long_options): Add --totals option.
+ (main): If the [-t | --totals] option is specified and
+ the output format is Berkeley-style, print the total
+ text, data, and bss sizes of all objects listed.
+ (print_berkeley_format): If the [-t | --totals] option
+ is specified, track the total text, data, and bss
+ sizes.
+ * doc/binutils.texi (size): Document [-t | --totals] options.
+ (strip): Document -d as an alias for --strip-debug.
+ * NEWS: Mention new feature of size.
+
+2002-01-25 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * po/fr.po: Updated version.
+ * po/es.po: Updated version.
+
+2002-01-23 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * addr2line.c (usage): Update text to provide verbose
+ description of the command line options.
+ * ar.c (usage): Update text to provide verbose
+ description of the command line options.
+ (main): Accept -h and -H when running as ranlib.
+ * coffdump.c (show_usage): Update text to provide verbose
+ description of the command line options.
+ * dlltool.c (main): Accept -H as an alias for --help.
+ * nlmconv.c (show_usage): Update text to provide verbose
+ description of the command line options.
+ * nm.c (usage): Replace OPTIONS with option(s).
+ (main): Accept -H as an alias for --help.
+ * objcopy.c (strip_main): Accept -H as an alias for --help.
+ * objdump.c (main): Accept -v as an alias for --verbose.
+ * readelf.c (usage): Adjust format to match style used in
+ other binutils.
+ * size.c (usage): Update text to provide verbose description
+ of the command line options.
+ (main): Accept -v, -h and -H as command line options.
+ * srconv.c (show_usage): Update text to provide verbose
+ description of the command line options.
+ * strings.c (main): Accept -H and -v as command line options.
+ (usage): Update text to provide verbose description of the
+ command line options.
+ * sysdump.c (show_usage): Update text to provide verbose
+ description of the command line options.
+ * windres.c (usage): Adjust format to match style used in
+ other binutils.
+
+ * coffdump.c: Fix formatting.
+ * nlmconv.c: Fix formatting.
+ * srconv.c: Fix formatting.
+ * sysdump.c: Fix formatting.
+
+2002-01-22 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
+
+2002-01-18 Andreas Jaeger <aj@suse.de>
+
+ * version.c (print_version): Update year.
+
+2002-01-17 Alan Modra <amodra@bigpond.net.au>
+
+ * readelf.c (get_machine_name): Handle EM_PPC64.
+ (guess_is_rela): Here too.
+
+2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * po/binutils.pot: Regenerate.
+ * po/fr.po: Regenerate.
+ * po/tr.po: Regenerate.
+
+2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * po/tr.po: Import new version.
+
+2002-01-16 Alan Modra <amodra@bigpond.net.au>
+
+ * readelf.c (get_ppc64_dynamic_type): New.
+ (get_dynamic_type): Call it.
+
+2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * objcopy.c (copy_usage): Use "options" instead of "switches".
+ (strip_usage): Use "options" instead of "switches".
+ * doc/binutils.texi (dlltool): Refer to "options" instead of
+ "switches".
+
+2002-01-14 Richard Earnshaw <rearnsha@arm.com>
+
+ * MAINTAINERS: Add self as co-maintainer for the ARM code.
+
+2001-12-18 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * po/es.po: Import from translation project.
+ * configure.in (ALL_LINGUAS): Add es.
+ * configure: Regenerate.
+
+2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * readelf.c (get_netbsd_elfcore_note_type): Use
+ NT_NETBSDCORE_PROCINFO and NT_NETBSDCORE_FIRSTMACH.
+
+2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * readelf.c: Update copyright years.
+ (get_note_type): Return a const char *.
+ (get_netbsd_elfcore_note_type): New function.
+ (process_note): Use get_netbsd_elfcore_note_type to get
+ the note type string for NetBSD ELF core files.
+
+2002-01-06 Steve Ellcey <sje@cup.hp.com>
+
+ * readelf.c (get_ia64_segment_type): Add support for macros.
+ (get_segment_type): Add support for IA64 specific macros.
+
+2001-12-20 Julian v. Bock <julian@wongr.net>
+
+ * readelf.c (print_symbol): New function: Print a formatted symbol
+ name. If --wide is specified do not truncate it.
+ (dump_relocations): Use print_symbol() to print symbol names.
+ (process_symbol_table): Likewise.
+ (process_syminfo): Likewise.
+ (process_mips_specific): Likewise.
+ (usage): Document new feature of --wide switch.
+ * doc/binutils.texi (objdump): Document additional behaviour of
+ --wide.
+
+2001-12-18 Michael Snyder <msnyder@redhat.com>
+
+ * objcopy.c (copy_file): Accept corefiles (format bfd_core).
+ (copy_object): Don't set the start address or flags of a core file.
+ (copy_section): Don't relocate a core file. Don't copy contents
+ if the input section has the contents flag set, but the output
+ section does not (which happens with the fake 'note' pseudo-
+ sections that BFD creates for corefiles).
+
+2001-12-18 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * readelf.c (get_machine_flags): Recognize header flags for ABI and
+ ASE extensions. More robust code for ISA checking. Ignore empty fields
+ in header flags for GNU extensions.
+
+2001-12-18 Alan Modra <amodra@bigpond.net.au>
+
+ * objcopy.c (copy_archive): Set output bfd format outside the loop.
+
+2001-12-18 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * po/ja.po: Import from translation project.
+ * configure.in (ALL_LINGUAS): Add ja.
+ * configure: Regenerate.
+
+2001-12-18 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * addr2line.c (main): Protoype.
+ * ar.c (main): Protoype.
+ * nm.c (main): Protoype.
+ * objcopy.c (main): Protoype.
+ * objdump.c (main): Protoype.
+ * size.c (main): Protoype.
+ * strings.c (main): Protoype.
+
+2001-12-17 Alan Modra <amodra@bigpond.net.au>
+
+ * readelf.c (symtab_shndx_hdr): New global.
+ (SECTION_HEADER_INDEX): Define.
+ (SECTION_HEADER_NUM): Define.
+ (SECTION_HEADER): Define.
+ (GET_ELF_SYMBOLS): Pass two params rather than three.
+ (get_32bit_elf_symbols): Take file and section args. Read and
+ use SHT_SYMTAB_SHNDX.
+ (get_64bit_elf_symbols): Likewise.
+ (dump_relocations): Use SECTION_HEADER to index "section_headers".
+ (process_section_headers): Likewise. Use SECTION_HEADER_NUM too.
+ Remember symtab_shdx_hdr.
+ (process_program_headers): Scan from index 1 for segment map.
+ (slurp_ia64_unwind_table): Use SECTION_HEADER to index
+ "section_headers".
+ (process_relocs): Likewise. Also adjust call to GET_ELF_SYMBOLS.
+ (process_unwind): Likewise.
+ (process_version_sections): Likewise.
+ (process_symbol_table): Likewise.
+ (display_debug_info): Likewise.
+ (process_dynamic_segment): Fake up a symtab section for changed
+ GET_ELF_SYMBOLS.
+ (get_symbol_index_type): Check SHN_LOOS before SHN_LORESERVE.
+ (process_program_headers): Kill signed/unsigned warning.
+ (load_debug_str): Likewise.
+ (display_debug_info): Likewise.
+
+2001-12-13 Jakub Jelinek <jakub@redhat.com>
+
+ * readelf.c (get_segment_type): Support PT_GNU_EH_FRAME.
+
+2001-12-11 Alan Modra <amodra@bigpond.net.au>
+
+ * readelf.c (process_file_header): Print extended e_shnum and
+ e_shdtrndx values. Set elf_header values for same.
+ (get_32bit_section_headers): Add "num" arg to read "num" headers.
+ (get_64bit_section_headers): Likewise.
+ (process_section_headers): Update calls.
+ (get_file_header): Call get_32bit_section_headers or 64bit variant.
+
+2001-12-10 Jakub Jelinek <jakub@redhat.com>
+
+ * objcopy.c (setup_section): Copy entsize.
+
+2001-12-07 Geoffrey Keating <geoffk@redhat.com>
+
+ * readelf.c (guess_is_rela): Add support for stormy16.
+ (dump_relocations): Likewise.
+ (get_machine_name): Likewise.
+
+2001-12-05 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * dllwrap.c (main) Replace multiple strings describing a
+ single error with a single, newline escaped sentence to permit
+ better translation into foreign languages.
+
+ * readelf.c (get_elf_class): Remove internalionalisation of ELF
+ class names.
+
+2001-12-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * strings.c (get_char): Initialize value.
+
+2001-12-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * arlex.l: Silence compile warnings.
+ * arsup.h: Likewise. Fix formatting.
+
+2001-12-04 Jakub Jelinek <jakub@redhat.com>
+
+ * strings.c: Include config.h before bfd.h.
+ (file_off): New type.
+ (file_open): Define.
+ (print_strings): Use file_off instead of file_ptr. Print addresses
+ which don't fit into long correctly.
+ (get_char): Use file_off instead of file_ptr. Use getc_unlocked if
+ available.
+ (strings_file): Use file_off instead of file_ptr. Use file_open.
+ * configure.in: Check for getc_unlocked.
+ Check for fopen64 and whether _LARGEFILE64_SOURCE needs to
+ be defined for it.
+ * configure: Rebuilt.
+ * config.h.in: Rebuilt.
+
+2001-11-29 H.J. Lu <hjl@gnu.org>
+
+ * bucomm.c (make_tempname): Revert the changes made on
+ 2001-11-14 and 2001-11-12. They won't work with directories.
+
+2001-11-23 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * binutils/Makefile.am (check-DEJAGNU): Pass CC_FOR_TARGET and
+ CFLAGS_FOR_TARGET to runtest in environment.
+ * Makefile.in: Rebuild.
+ * doc/Makefile.in: Rebuild.
+
+2001-11-28 Mike Stump <mrs@wrs.com>
+
+ * objcopy.c (setup_section): Preserve SEC_RELOC when
+ --set-section-flags is used.
+
+2001-11-19 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * readelf.c (do_debug_str): New variable.
+ (display_debug_str): New function: Display the contents of a
+ .debug_str section.
+ (load_debug_str): New function: Load in the contents of a
+ .debug_str section.
+ (free_debug_str): New function: Free the memory used by
+ load_debug_str().
+ (fetch_indirect_string): Retrieve a string from the .debug_str
+ section.
+ (usage): Add -ws.
+ (parse_args): Accept -ws.
+ (process_section_headers): Allow the display of the .debug_str
+ section.
+ (read_and_display_attr_value): Use fetch_indirect_string. Show
+ offset into .debug_str section.
+ (display_debug_info): Use load_debug_str and free_debug_str.
+ (debug_displays): Add .debug_str.
+ * doc/binutils.texi: Document -ws.
+
+2001-11-19 Andreas Jaeger <aj@suse.de>
+
+ * testsuite/binutils-all/objdump.exp: Add x86-64.
+
+2001-11-15 Andreas Schwab <schwab@suse.de>
+
+ * readelf.c: Fix warnings without terminating newline.
+
+2001-11-15 Alan Modra <amodra@bigpond.net.au>
+
+ * doc/binutils.texi (objdump): Document ppc -M options.
+
+2001-11-14 Andreas Jaeger <aj@suse.de>
+
+ * doc/binutils.texi (objdump): Fix description to use x86-64.
+
+2001-11-14 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * bucomm.c (make_tempname): Use mkstemps instead of mkstemp, since
+ not all systems provide mkstemp.
+
+2001-11-14 Alan Modra <amodra@bigpond.net.au>
+
+ * doc/binutils.texi (objdump): Document x86 -M options.
+
+2001-11-13 Keith Walker <keith.walker@arm.com>
+
+ * readelf.c (read_and_display_attr_value): New function to
+ handle DW_FORM_indirect.
+ (read_and_display_attr): Use it.
+
+2001-11-13 Geoffrey Keating <geoffk@redhat.com>
+
+ * readelf.c (display_debug_lines): Deal with unknown standard
+ opcodes. Handle DW_LNS_set_prologue_end, DW_LNS_set_epilogue_begin,
+ DW_LNS_set_isa.
+
+2001-11-13 Timothy Wall <twall@alum.mit.edu>
+
+ * MAINTAINERS: Add self as tic54x maintainer. This target
+ includes the IBM C54XDSP clone.
+
+2001-11-12 * Steven J. Hill <sjhill@realitydiluted.com>
+
+ * bucomm.c (make_tempname): Use mkstemp in place of mktemp.
+
+2001-11-09 Jeffrey A Law (law@cygnus.com)
+
+ * unwind-ia64.c (unw_print_brmask): Fix ISO C portability glitch.
+ (unw_print_grmask, unw_print_frmask, unw_print_abreg): Likewise.
+ (unw_print_xyreg, unw_decode_x1, unw_decode_x2): Likewise.
+ (unw_decode_x3, unw_decode_r1, unw_decode_r2): Likewise.
+ (unw_decode_r3, unw_decode_p1, unw_decode_p2_p5): Likewise.
+ (unw_decode_p6, unw_decode_p7_p10, unw_decode_b1): Likewise.
+ (unw_decode_b2, unw_decode_b3_b4): Likewise.
+
+ * readelf.c (get_elf_class): Fix ISO portability glitch.
+ (get_data_encoding, get_osabi_name, request_dump): Likewise.
+
+2001-11-07 Jakub Jelinek <jakub@redhat.com>
+
+ * readelf.c (debug_str, debug_str_size): New.
+ (display_debug_abbrev): If no abbrevs were read, skip the CU.
+ Call free_abbrevs.
+ (read_and_display_addr): Handle DW_FORM_strp.
+ (display_debug_info): Read .debug_str section if present,
+ so that DW_FORM_strp can be handled.
+ Fix test for non-existant .debug_abbrev section.
+
+2001-11-05 Jakub Jelinek <jakub@redhat.com>
+
+ * arlex.l: Accept `\' in filenames. Patch by <earl_chew@agilent.com>.
- * addr2line.1: Remove .TP macro from SYNOPSIS section - it
- prevents successful translation to DocBook format.
- * nlmconv.1: As above.
- * nm.1: As above.
- * objdump.1: As above.
- * size.1: As above.
- * strings.1: As above.
- * strip.1: As above.
+ * arsup.c (ar_open): Prepend tmp- to basename, not whole path.
+
+2001-11-05 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * MAINTAINERS: Add self as s390/s390x maintainer.
+
+2001-11-02 Tom Rix <trix@bluey.cygnus.com>
+
+ * MAINTAINERS: Add self as PPC XCOFF maintainer.
+
+2001-11-02 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * configure.in (ALL_LINGUAS): Add "fr" and "tr".
+ * configure: Regernate.
+ * po/fr.po: New file.
+ * po/tr.po: New file.
+
+2001-10-30 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * MAINTAINERS: Add self as MMIX port maintainer.
+ * readelf.c: Include elf/mmix.h.
+ (guess_is_rela): MMIX is RELA.
+ (dump_relocations): Handle MMIX relocations.
+ * Makefile.am: Regenerate dependencies.
+ * Makefile.in: Regenerate.
+
+2001-10-13 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * readelf.c (parse_args): Handle multiple options to the -w
+ switch.
+
+2001-10-12 Jakub Jelinek <jakub@redhat.com>
+
+ * readelf.c (get_section_type_name): Don't print SHT_ prefix for
+ LOPROC, LOOS and LOUSER.
+
+2001-10-11 J"orn Rennecke <amylaar@onetel.net.uk>
+
+ * MAINTAINERS: Update my email address.
+
+2001-10-03 Alan Modra <amodra@bigpond.net.au>
+
+ * doc/Makefile.in: Regenerate.
+ * configure: Regenerate.
2001-10-02 Nick Clifton <nickc@cambridge.redhat.com>
@@ -18,61 +417,503 @@
(debug_displays): Add .debug_pubtypes as a known, but not yet
supported, debug section.
+2001-10-02 Alan Modra <amodra@bigpond.net.au>
+
+ * coffdump.c (PROGRAM_VERSION): Delete.
+ (main <'V'>): Call print_version.
+ * srconv.c: Likewise.
+ * sysdump.c: Likewise.
+ * version.c (program_version): Remove.
+ (print_version): Use BFD_VERSION_STRING. Just print the current
+ year in copyright message.
+ * addr2line.c (program_version): Remove unused declaration.
+ * objdump.c (display_target_tables): Use BFD_VERSION_STRING in
+ place of BFD_VERSION.
+ * Makefile.am (Makefile): Depend on bfd/configure.in.
+ (cplus-dem.o): Depend on Makefile.
+ Run "make dep-am".
+ * Makefile.in: Regenerate.
+
2001-10-01 Nick Clifton <nickc@cambridge.redhat.com>
- * readelf.c (display_debug_aranges): Warn about DWARF64 format
- .debug_arange sections.
+ * readelf.c (display_debug_aranges): Detect and warn about DWARF64
+ format .debug_arange sections.
+ (main): Add missing prototype.
+
+2001-09-30 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * Makefile.am: Update dependencies with "make dep-am".
+ * Makefile.in: Regenerate.
+
+2001-09-28 Richard Henderson <rth@redhat.com>
+
+ * objdump.c (dump_section_header): Dump SEC_ARCH_BIT_0.
+
+2001-09-26 Alan Modra <amodra@bigpond.net.au>
+
+ * bucomm.c (fatal): Define using VPARAMS, VA_OPEN, VA_FIXEDARG,
+ VA_CLOSE.
+ (non_fatal): Likewise.
+ * objdump.c (objdump_sprintf): Likewise.
+ * readelf.c (error): Likewise.
+ (warn): Likewise.
+
+2001-09-25 Jakub Jelinek <jakub@redhat.com>
+
+ * readelf.c (do_wide): New.
+ (options): Add --wide.
+ (usage, parse_args): Likewise.
+ (process_program_headers): Put each segment on a single line if
+ --wide is given.
+ (process_section_headers): Put each section on a single line if
+ --wide is given.
+ * doc/binutils.texi: Document it.
+ * NEWS: Likewise.
+
+2001-09-25 Alan Modra <amodra@bigpond.net.au>
+
+ * readelf.c (print_vma): Print 8 digits of low hex value.
+
+2001-09-24 Andreas Jaeger <aj@suse.de>
+
+ * nlmconv.c: Fix warnings about unused attributes and function
+ prototypes.
+
+ * strings.c: Add prototype for get_char.
+
+2000-09-19 H.J. Lu <hjl@gnu.org>
+
+ * doc/Makefile.am ($(DEMANGLER_NAME).1): Try cxxfilt.man and
+ $(srcdir)/cxxfilt.man.
+ * doc/Makefile.in: Rebuild.
+
+2001-09-19 Alan Modra <amodra@bigpond.net.au>
+
+ * objcopy.c (copy_main): Correct rename-section string parsing.
+ Consolidate new_name parsing, and error messages.
+
+2001-09-18 Bruno Haible <haible@clisp.cons.org>
+
+ * addr2line.c: Don't include <ctype.h>.
+ (main): For gettext, also set the LC_CTYPE locate facet.
+ * ar.c (main): Likewise.
+ * coffdump.c (main): Likewise.
+ * dlltool.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (main): For gettext, also set the LC_CTYPE locate facet.
+ Use ISALNUM instead of isalpha/isdigit.
+ * dllwrap.c: Don't include <ctype.h>.
+ (main): For gettext, also set the LC_CTYPE locate facet.
+ * nlmconv.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (main): For gettext, also set the LC_CTYPE locate facet.
+ Use TOUPPER instead of islower/toupper.
+ * nlmheader.y: Include "safe-ctype.h" instead of <ctype.h>.
+ (yylex): Use ISSPACE/ISALNUM instead of isspace/isalnum.
+ Use TOUPPER instead of islower/toupper.
+ * nm.c (main): For gettext, also set the LC_CTYPE locate facet.
+ * objcopy.c (main): Likewise.
+ * objdump.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (disassemble_bytes): Use ISPRINT instead of isprint.
+ (dump_section_stabs): Use ISDIGIT instead of isdigit.
+ (dump_data): Use ISPRINT instead of isprint.
+ (main): For gettext, also set the LC_CTYPE locate facet.
+ * rclex.l: Include "safe-ctype.h" instead of <ctype.h>.
+ (cpp_line, handle_quotes): Use ISSPACE instead of isspace.
+ * rcparse.y: Include "safe-ctype.h" instead of <ctype.h>.
+ Use TOUPPER instead of islower/toupper.
+ * readelf.c (main): For gettext, also set the LC_CTYPE locate facet.
+ * resrc.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (write_rc_accelerators): Use ISPRINT instead of isprint.
+ (write_rc_rcdata): Likewise.
+ * size.c (main): For gettext, also set the LC_CTYPE locate facet.
+ * srconv.c (main): Likewise.
+ * stabs.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (parse_number): Use ISDIGIT/ISUPPER/ISLOWER instead of
+ isdigit/isupper/islower.
+ (parse_stab_string, parse_stab_type, parse_stab_argtypes,
+ parse_stab_array_type, stab_demangle_count, stab_demangle_get_count,
+ stab_demangle_prefix, stab_demangle_qualified,
+ stab_demangle_template, stab_demangle_type,
+ stab_demangle_fund_type): Use ISDIGIT instead of isdigit.
+ * strings.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (isgraphic): Use ISPRINT instead of isascii/isprint.
+ (main): Remove HAVE_LC_MESSAGES dependency.
+ * sysdump.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (pbarray): Use ISPRINT instead of isprint.
+ (main): For gettext, also set the LC_CTYPE locate facet.
+ * windres.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (format_from_filename): Use ISPRINT instead of isprint.
+ (main): For gettext, also set the LC_CTYPE locate facet.
+ * winduni.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (unicode_print): Use ISPRINT instead of isprint.
+ * wrstabs.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (stab_variable): Use ISDIGIT instead of isdigit.
+
+2001-09-18 Alan Modra <amodra@bigpond.net.au>
+
+ * ar.c (print_contents): Cast args of bfd_seek to the right types.
+ Replace bfd_read call with call to bfd_bread.
+ (extract_file): Likewise.
+
+ * objdump.c (dump_section_header): Cast section->filepos to
+ unsigned long to suit printf format string.
+ * readelf.c (process_section_headers): Similarly for sh_offset.
+ (process_unwind): Likewise.
+
+2001-09-14 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * strings.c (encoding, encoding_bytes): New variables.
+ (long_options): Add --encoding.
+ (main): Accept -e and --encoding.
+ (get_char): New function. Read a, possibly wide, character from
+ the input stream.
+ (print_strings): Use get_char().
+ (usage): Document new command line option.
+ * doc/binutils.texi: Document new command line option.
+ * NEWS: Announce new command line option.
+
+2001-09-12 Alexandre Oliva <aoliva@redhat.com>
+
+ * readelf.c (guess_is_rela, dump_relocations, get_machine_name,
+ get_machine_flags): Added EM_M32R, EM_D10V, EM_V850, EM_D30V,
+ EM_MN10200, EM_MN10300, EM_FR30, EM_AVR_OLD and EM_PJ_OLD.
+ Removed EM_CYGNUS_ARC.
+
+2001-09-04 Jeffrey A Law (law@cygnus.com)
+
+ * readelf.c: Include elf/h8 for H8 series definitions.
+ (guess_is_rela): H8 series if RELA.
+ (dump_relocations): Handle H8 series relocations.
+
+2001-08-31 Eric Christopher <echristo@redhat.com>
+
+ * readelf.c (get_machine_flags): Remove E_MIPS_MACH_MIPS32_4K.
+
+2001-08-29 Peter Targett <peter.targett@arccores.com>
+
+ * MAINTAINERS: Include ARC Maintainer.
+
+2001-08-29 Ben Elliston <bje@redhat.com>
+
+ * stabs.c (stab_demangle_template): Initialise s4.
+
+2001-08-27 Alan Modra <amodra@bigpond.net.au>
+
+ * readelf.c (dump_relocations): Recognise EM_PPC64.
+
+2001-08-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * readelf.c (get_machine_flags): Add detection of EF_MIPS_32BITMODE.
+
+2001-08-25 H.J. Lu <hjl@gnu.org>
+
+ * nm.c (print_width): New.
+ (display_rel_file): Set `print_width' according to
+ bfd_sprintf_vma.
+ (print_symbol_info_bsd): Check `print_width' instead of BFD64.
+
+2001-08-24 Alexandre Oliva <aoliva@redhat.com>
+
+ * objcopy.c (use_alt_mach_code): New variable.
+ (OPTION_ALT_MACH_CODE): Define.
+ (copy_options): Added --alt-machine-code.
+ (copy_main): Handle it.
+ (copy_object): Switch to alternate machine code if requested.
+ * doc/binutils.texi: Document new option.
+ * NEWS: Likewise.
+
+2001-08-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * readelf.c (get_machine_flags): Add detection of EF_MIPS_UCODE.
+
+2001-08-21 H.J. Lu <hjl@gnu.org>
+
+ * readelf.c (dump_relocations): Support ELF64 on 32bit hosts.
+ (display_debug_info): Cast for 64bit hosts.
+ (display_debug_frames): Likewise.
+ (process_mips_specific): Likewise.
+
+2001-08-21 Andreas Jaeger <aj@suse.de>
+
+ * coffgrok.h: Add missing parameter for prototype of coff_grok.
+
+ * sysdump.c: Add missing prototypes.
+ * srconv.c: Likewise.
+ * unwind-ia64.c: Likewise.
+ * coffdump.c: Likewise.
+
+ * sysinfo.y: Print prototypes, include <ansidecl.h>.
+
+ * coffgrok.c: Add missing prototypes, include libiberty.h instead
+ of declaring xcalloc.
+
+2001-08-10 H.J. Lu <hjl@gnu.org>
+
+ * nm.c (print_value): Add one arg, bfd *.
+ (print_value): Replace fprintf_vma with bfd_fprintf_vma.
+ (print_symbol_info_bsd): Also pass `abfd' to print_value ().
+ (print_symbol_info_sysv): Likewise.
+ (print_symbol_info_posix): Likewise.
+
+ * objdump.c (dump_section_header): Replace printf_vma with
+ bfd_printf_vma.
+ (print_section_stabs): Likewise.
+ (dump_bfd_header): Likewise.
+ (objdump_print_value): Replace sprintf_vma with
+ bfd_sprintf_vma.
+ (disassemble_bytes): Likewise.
+ (dump_reloc_set): Likewise.
+
+2001-08-10 Andreas Jaeger <aj@suse.de>
+
+ * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
+ to build warnings.
+ * configure: Regenerate.
+
+2001-08-09 Alan Modra <amodra@bigpond.net.au>
+
+ * readelf.c: Add missing prototypes.
+ * objdump.c: Likewise. Format existing prototypes.
+
+2001-08-08 Alexandre Oliva <aoliva@redhat.com>
+
+ * readelf.c (display_debug_info): Add to abbrev_offset the addend
+ of any RELA relocation for the abbrev_offset memory location that
+ refers to the .debug_abbrev section symbol.
+
+2001-08-07 H.J. Lu <hjl@gnu.org>
+
+ * readelf.c (process_file): Return 0 if OK, otherwise return 1.
+ (main): Return process_file ().
2001-08-05 Philip Blundell <philb@gnu.org>
- * binutils.texi (objdump): Fix typos. Use "Thumb" not "THUMB".
+ * doc/binutils.texi: Use "Thumb" not "THUMB".
+
+2001-08-03 John Healy <jhealy@redhat.com>
+
+ Patch suggested by Frank Eigler <fche@redhat.com>.
+ * objdump.c (disassemble_data): Fill in section member of the
+ disasm_info structure.
+
+2001-08-03 Tom Walsh <tom@cyberiansoftware.com>
-2001-07-31 David O'Brien <obrien@FreeBSD.org>
+ * configure.in: Added --with-windres option.
+ * configure: Regenerated.
- * readelf.1: New file.
+2001-07-11 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * doc/binutils.texi: Use @command{name} for commands;
+ use @option{-opt} for options; use @table @env for list of options;
+ remove spaces arround [ | ] in synopsis.
+
+ * doc/Makefile.am (POD2MAN): Use 'GNU Development Tools' for the
+ center title.
+
+2001-07-31 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * objcopy.c: Fix formatting.
+ (section_rename): New structure.
+ (OPTION_RENAME_SECTION): New switch.
+ (copy_usage): Document new switch.
+ (add_section_rename): New function: Add a node to the section
+ rename list.
+ (find_section_rename): New function: Find the new name and
+ flags for a section.
+ (setup_section): Call find_section_name to determine the name
+ of the output section.
+ (copy_main): Handle OPTION_RENAME_SECTION.
+ * binutils.texi: Document new switch.
+ * NEWS: Mention new switch.
+
+2001-07-30 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * README: Rename bug-gnu-utils@gcc.org to bug-binutils@gcc.org.
+ * MAINTAINERS: Rename bug-gnu-utils@gcc.org to
+ bug-binutils@gcc.org.
+
+2001-07-28 Matthias Kramm <kramm@quiss.org>
+
+ * bucomm.c (list_supported_architectures): New function.
+ * bucomm.h (list_supported_architectures): Declare.
+ * objdump.c (usage): Call the above.
+
+2001-07-25 Dave Brolley <brolley@redhat.com>
+
+ * objdump.c (SKIP_ZEROES): Only define it if it is not already defined.
+ (SKIP_ZEROES_AT_END): Only define it if it is not already defined.
+
+2001-07-19 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * README: Update for 2.11. Change bug reporting email address.
+ * MAINTAINERS: Tidy up. Change bug reporting email address.
+
+2001-07-16 DJ Delorie <dj@redhat.com>
+
+ * resres.c (write_res_header): Align header size.
+ (res_align_file): Calculate alignment correctly.
+
+ * rcparse.y (styles): use SUBLANG_SHIFT instead of 8 (or the more
+ correct 10).
+ * resrc.c (write_rc_resource): Likewise.
+ * windres.h (SUBLANG_SHIFT): Define - as 10.
+
+2001-07-15 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * MAINTAINERS: Add Christian Groessler as maintainer for z8k port.
+
+2001-07-11 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * MAINTAINERS: Add notes about branch checkins.
+
+2001-07-05 Daniel Berlin <dan@cgsoftware.com>
+
+ * readelf.c (display_debug_macinfo): New function, display
+ .debug_macinfo section.
+ (do_debug_macinfo): New variable.
+ (parse_args): Handle "-w[mM]" to mean display macro info.
+ (process_section_headers): Handle debug_macinfo.
+ (debug_displays): Replace unsupported function with macinfo
+ function for .debug_macinfo display.
+ * doc/binutils.texi: Document new command line switch.
+ * NEWS: Document new feature of readelf.
+
+2001-07-05 H.J. Lu <hjl@gnu.org>
+
+ * objcopy.c (filter_symbols): Don't turn undefined symbols
+ into local.
+
+2001-07-03 H.J. Lu <hjl@gnu.org>
+
+ * doc/Makefile.am (addr2line.1): Use addr2line.pod instead of
+ $@.pod.
+ (ar.1): Likewise.
+ (dlltool.1): Likewise.
+ (nlmconv.1): Likewise.
+ (nm.1): Likewise.
+ (objcopy.1): Likewise.
+ (objdump.1): Likewise.
+ (ranlib.1): Likewise.
+ (readelf.1): Likewise.
+ (size.1): Likewise.
+ (strings.1): Likewise.
+ (strip.1): Likewise.
+ (windres.1): Likewise.
+ (cxxfilt.man): Use $(DEMANGLER_NAME).pod instead of $@.pod.
+ ($(DEMANGLER_NAME).1): Also substitute cxxfilt with
+ $(DEMANGLER_NAME).
+ (as.1): Removed.
+ * doc/Makefile.in: Regenerated.
+
+2001-07-03 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * MAINTAINERS: Change MIPS maintainer to Eric Christopher.
+
+2001-07-01 Daniel Berlin <dan@cgsoftware.com>
+
+ * readelf.c: Support DWARF 2.1 tags, encodings, languages.
2001-06-29 James Cownie <jcownie@etnus.com>
* readelf.c: Support DWARF 2.1 attributes.
-2001-06-27 Nick Clifton <nickc@cambridge.redhat.com>
+2001-06-28 Alan Modra <amodra@bigpond.net.au>
+
+ * readelf.c (GET_DATA_ALLOC): Remove.
+ (GET_DATA): Remove.
+ (get_data): New function combining above macros, with an extra
+ test for zero size.
+ (slurp_rela_relocs): Use get_data, and catch error return.
+ (slurp_rel_relocs): Likewise.
+ (get_32bit_program_headers): Likewise.
+ (get_64bit_program_headers): Likewise.
+ (get_32bit_section_headers): Likewise.
+ (get_64bit_section_headers): Likewise.
+ (get_32bit_elf_symbols): Likewise.
+ (get_64bit_elf_symbols): Likewise.
+ (process_section_headers): Likewise.
+ (process_relocs): Likewise.
+ (slurp_ia64_unwind_table): Likewise.
+ (process_unwind): Likewise.
+ (get_32bit_dynamic_segment): Likewise.
+ (get_64bit_dynamic_segment): Likewise.
+ (process_dynamic_segment): Likewise.
+ (process_version_sections): Likewise.
+ (process_symbol_table): Likewise.
+ (dump_section): Likewise.
+ (display_debug_info): Likewise.
+ (display_debug_section): Likewise.
+ (process_section_contents): Likewise.
+ (process_corefile_note_segment): Likewise.
+ (process_mips_specific): Likewise. Also free econf32, econf64.
- * objcopy.c (strip_main): Accept -o command line switch.
+2001-06-25 Alan Modra <amodra@bigpond.net.au>
-2001-06-11 Alan Modra <amodra@bigpond.net.au>
+ * readelf.c (dump_relocations): Print "bad symbol index" if
+ symtab == NULL with non-zero symtab_index.
+ (process_relocs): Don't bomb if reloc section has no symsec.
- Merge from mainline.
- 2001-02-27 Alan Modra <alan@linuxcare.com.au>
- * configure.in (BFD_VERSION): New.
- (AM_INIT_AUTOMAKE): Use $BFD_VERSION.
- * configure: Regenerate.
+2001-06-24 H.J. Lu <hjl@gnu.org>
- 2001-04-27 Michal Svec <rebel@atrey.karlin.mff.cuni.cz>
- * strings.c (isgraphic): Do not use isascii() unless it is needed
- for isprint() to work.
- (main): Set the locale domain to LC_ALL not just LC_MESSAGES.
+ * objcopy.c (strip_main): Revert the change made on 2001-05-30
+ by accident.
+ (copy_main): Apply the the change made to strip_main on
+ 2001-05-30 by accident.
- 2001-04-10 Alan Modra <amodra@one.net.au>
- * nm.c (print_symbol_info_bsd): Use a simple printf string.
+2001-06-23 Andreas Jaeger <aj@suse.de>
- 2001-02-07 Todd Vierling <tv@wasabisystems.com>
- * bucomm.c (bfd_target_vector): Change extern array to pointer.
- * objdump.c (bfd_target_vector): Likewise.
+ * unwind-ia64.c (unw_decode_x1): Add unused attribute for
+ parameter 'code'.
+ (unw_decode_x2): Likewise.
+ (unw_decode_x3): Likewise.
+ (unw_decode_x4): Likewise.
-2001-06-10 Philip Blundell <philb@gnu.org>
+2001-06-23 Ben Elliston <bje@redhat.com>
- * configure.in: Set version to 2.11.1.
- * configure: Regenerate.
+ * MAINTAINERS: Add myself as M88k maintainer.
-2001-06-09 Alan Modra <amodra@bigpond.net.au>
+2001-06-22 Jocelyn Mayer <jocelyn.mayer@netgem.com>
+
+ * objcopy.c (strip_main): Support -o or --output-file command lien
+ switch.
- * NEWS: Mention hppa64-elf. Add binutils-2.11 marker.
+2001-06-19 H.J. Lu <hjl@gnu.org>
+
+ * doc/Makefile.in: Regenerated.
+
+2001-06-19 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * readelf.c: Restore formatting.
+
+2001-06-18 H.J. Lu <hjl@gnu.org> & Nick Clifton <nickc@redhat.com>
+
+ * Makefile.am: Move documentation into doc subdirectory.
+ * Makefile.in: Regenerated.
+ * binutils.texi: Move into doc subdirectory.
+ * addr2line.1: Removed.
+ * ar.1: Likewise.
+ * dlltool.1: Likewise.
+ * nlmconv.1: Likewise.
+ * nm.1: Likewise.
+ * objcopy.1: Likewise.
+ * objdump.1: Likewise.
+ * ranlib.1: Likewise.
+ * readelf.1: Likewise.
+ * size.1: Likewise.
+ * strings.1: Likewise.
+ * strip.1: Likewise.
+ * windres.1: Likewise.
+ * cxxfilt.man: Likewise.
+ * doc: New Directory.
+ * doc/Makefile.am: New file.
+ * doc/Makefile.in: Generate.
- * MAINTAINERS: Replace with mainline version.
+2001-06-09 Alan Modra <amodra@bigpond.net.au>
+
+ * NEWS: Fix a typo. Mention hppa64-elf. Add binutils-2.11 marker.
-2001-06-07 Alan Modra <amodra@bigpond.net.au>
+2001-06-01 Alan Modra <amodra@bigpond.net.au>
- * Most files: Update copyright notices.
+ * MAINTAINERS: Update my email address.
2001-05-30 Honda Hiroki <hhonda@kobe-catv.ne.jp>
@@ -83,13 +924,18 @@
* objcopy.1: Regenerate.
* NEWS: Announce new feature.
-2001-05-28 Philip Blundell <philb@gnu.org>
+2001-05-28 Andreas Jaeger <aj@suse.de>
- From 2001-05-28 Andreas Jaeger <aj@suse.de>
* readelf.c (display_debug_frames): Fix warnings: Remove unused
variables, fix format strings.
- From 2001-05-16 Richard Henderson <rth@redhat.com>
+2001-05-28 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * objdump.c (disassemble_bytes): Remove section VMA adjustment
+ when computing the address of the line to show.
+
+2001-05-16 Richard Henderson <rth@redhat.com>
+
* readelf.c (do_debug_frames_interp): New.
(byte_get_little_endian): If BFD64, always read entire 8-byte fields.
(byte_get_big_endian): Likewise.
@@ -101,77 +947,182 @@
unless do_debug_frames_interp.
(debug_displays): Remove duplicate .debug_frame.
- From 2001-05-15 Ralf Baechle <ralf@gnu.org>
+2001-05-15 Ralf Baechle <ralf@gnu.org>
+
* readelf.c: Replace uses of EM_MIPS_RS4_BE with EM_MIPS_RS3_LE.
The former constant was never in active use and is used otherwise
by the ABI.
- From 2001-05-11 Jakub Jelinek <jakub@redhat.com>
+2001-05-11 Jakub Jelinek <jakub@redhat.com>
+
* readelf.c (process_unwind): Print all unwind sections, not just
one.
- From 2001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+2001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
* readelf.c (process_unwind): Remove const specifier.
- From 2001-03-30 H.J. Lu <hjl@gnu.org>
+2001-04-27 Michal Svec <rebel@atrey.karlin.mff.cuni.cz>
+
+ * strings.c (isgraphic): Do not use isascii() unless it is needed
+ for isprint() to work.
+ (main): Set the locale domain to LC_ALL not just LC_MESSAGES.
+
+2001-04-27 Johan Rydberg <jrydberg@opencores.org>
+
+ * NEWS: Announce support for OpenRISC.
+
+2001-04-17 Danny Smith <dannysmith@users.sourceforge.net>
+
+ * dlltool.c (do_default_excludes): Initialise to true.
+
+2001-04-10 Alan Modra <amodra@one.net.au>
+
+ * MAINTAINERS: Update my email address
+ * nm.c (print_symbol_info_bsd): Use a simple printf string.
+
+2001-04-05 Hans-Peter Nilsson <hp@axis.com>
+
+ * readelf.c (display_debug_lines): Fix typo for "Prologue".
+
+2001-03-30 H.J. Lu <hjl@gnu.org>
+
* readelf.c (process_unwind): Just return if do_unwind is 0.
- From 2001-03-29 H.J. Lu <hjl@gnu.org>
+2001-03-28 Roger Sayle <roger@metaphorics.com>
+
+ * dlltool.c (make_one_lib_file): Fix section flags for
+ .text, .data and .bss in stub ds*.o files to match those
+ generated by gas.
+
+2001-03-29 H.J. Lu <hjl@gnu.org>
+
* readelf.c (process_unwind): Only do unwind sections for
IA64.
- From 2001-02-28 Nick Clifton <nickc@redhat.com>
+2001-03-28 H.J. Lu <hjl@gnu.org>
+
+ * Makefile.am ($(srcdir)/dlltool.1): Remove the extra target.
+ * Makefile.in: Regenerate.
+
+2001-03-26 Andreas Jaeger <aj@suse.de>
+
+ * binutils.texi (nm): Fix texi syntax.
+
+2001-03-25 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * binutils.texi: Put @c man begin and @c man end indications
+ to generate man pages using texi2pod and pod2man. Put @c man title
+ to identify each man. Add SEEALSO entries.
+ * Makefile.am (MANCONF, TEXI2POD, POD2MAN): New variable.
+ (man_MANS): Add dlltool.1, nlmconv.1, readelf.1, windres.1,
+ sort the list.
+ (*.1): Build the man pages from binutils.texi.
+ * Makefile.in: Regenerate.
+
+2001-03-13 Eric Kohl <ekohl@rz-online.de>
+
+ * defparse.y (opt_equal_name): allow "." in name.
+ * dlltool.c (def_exports): Added ability to generate forwarded exports.
+ (gen_exp_file): Likewise.
+
+2001-03-12 Stefan Geuken <mail@stefan-geuken.de>
+
+ * NEWS: Document addition of -B switch to objcopy.
+ * binutils.texi: Document addition of -B switch to objcopy.
+ * objcopy.c: (copy_options): Add --binary-architecture.
+ (copy_usage): Document -B/--binary-architecture.
+ (copy_main): Support -B/--binary-architecture. Set
+ bfd_external_binary_architecture.
+
+2001-03-11 Andreas Jaeger <aj@suse.de>
+
+ * readelf.c (guess_is_rela): Handle EM_S390_OLD.
+ (dump_relocations): Likewise.
+ (get_machine_name): Likewise.
+
+2001-02-28 Nick Clifton <nickc@redhat.com>
+
* readelf.c: (struct unw_aux_info): Remove const modifier for
'strtab' field.
(process_unwind): Remove non-K&R compliant LHS type cast in call
to GET_DATA_ALLOC macro.
- From 2001-02-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+2001-02-28 Philip Blundell <pb@futuretv.com>
+
+ * readelf.c (decode_ARM_machine_flags): Explicitly mention which
+ ABI is in use; remove ambiguity between the "unknown" EABI and
+ unrecognised ABIs. Handle version 2 ARM EABI. Update uses of
+ renamed EF_xx constants.
+
+2001-02-27 Alan Modra <alan@linuxcare.com.au>
+
+ * configure.in (BFD_VERSION): New.
+ (AM_INIT_AUTOMAKE): Use $BFD_VERSION.
+ * configure: Regenerate.
+ * Makefile.am: Run "make dep-am"
+ * Makefile.in: Regenerate.
+
+2001-02-14 Nick Clifton <nickc@redhat.com>
+
+ * MAINTAINERS: Add "Obvious Fix" rule.
+
+2001-02-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+
+ * unwind-ia64.c: Don't use ANSI C preprocessor stringisation and string
+ literal concatenation.
+
+2001-02-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+
* readelf.c (struct unw_aux_info): Remove const from the info member.
(process_unwind): Don't type-cast the third argument to the
GET_DATA_ALLOC macro.
- From 2001-02-11 Nick Clifton <nickc@redhat.com>
+2001-02-11 Nick Clifton <nickc@redhat.com>
+
* readelf.c (dump_relocations): Free corrected allocated
array.
(process_unwind): Fix compile time warning.
- From 2001-02-07 David Mosberger <davidm@hpl.hp.com>
- * readelf.c (process_unwind): New function.
- (slurp_ia64_unwind_table): Ditto.
- (dump_ia64_unwind): Ditto.
- (find_symbol_for_address): Ditto.
- (slurp_rela_relocs): New function (split off from dump_relocations()).
- (slurp_rel_relocs): Ditto.
- (parse_args): Handle '-u' option.
- * unwind-ia64.c: New file.
- * unwind-ia64.h: New file.
- * Makefile.am: Include unwind-ia64.c in readelf build.
- * Makefile.in: Regenerate.
- * po/binutils.pot: Regenerate.
+2001-02-10 Nick Clifton <nickc@redhat.com>
-2001-04-06 Hans-Peter Nilsson <hp@axis.com>
+ * binutils.texi: Document new --unwind option to readelf.
- * readelf.c (display_debug_lines): Fix typo for "Prologue".
+2001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
-2001-03-16 Philip Blundell <philb@gnu.org>
+ * readelf.c: Add linux target for S/390.
- * configure: Regenerate.
-
-2001-03-11 Philip Blundell <philb@gnu.org>
+2001-02-10 Alan Modra <alan@linuxcare.com.au>
- * configure.in: Set version to 2.11.
+ * nm.c (print_symbol_info_bsd): Don't #ifdef inside printf in case
+ printf is a macro.
-2001-02-13 Hans-Peter Nilsson <hp@bitrange.com>
+2001-02-08 Hans-Peter Nilsson <hp@bitrange.com>
* acinclude.m4 (AM_PROG_LEX): Override installed definition.
* aclocal.m4: Regenerate.
* configure: Regenerate.
-2001-02-10 Alan Modra <alan@linuxcare.com.au>
+2001-02-07 Todd Vierling <tv@wasabisystems.com>
- * nm.c (print_symbol_info_bsd): Don't #ifdef inside printf in case
- printf is a macro.
+ * bucomm.c (bfd_target_vector): Change extern array to pointer.
+ * objdump.c (bfd_target_vector): Likewise.
+
+2001-02-07 David Mosberger <davidm@hpl.hp.com>
+
+ * readelf.c (process_unwind): New function.
+ (slurp_ia64_unwind_table): Ditto.
+ (dump_ia64_unwind): Ditto.
+ (find_symbol_for_address): Ditto.
+ (slurp_rela_relocs): New function (split off from dump_relocations()).
+ (slurp_rel_relocs): Ditto.
+ (parse_args): Handle '-u' option.
+
+ * unwind-ia64.c: New file.
+ * unwind-ia64.h: New file.
+ * Makefile.am: Include unwind-ia64.c in readelf build.
+ * Makefile.in: Regenerate.
+ * po/binutils.pot: Regenerate.
2001-02-04 Philip Blundell <philb@gnu.org>
@@ -269,7 +1220,7 @@
* readelf.c: Fix formatting.
-Mon Dec 11 14:30:21 MET 2000 Jan Hubicka <jh@suse.cz>
+2000-12-11 Jan Hubicka <jh@suse.cz>
* MAINTAINERS: Add myself and Andreas Jaeger as x86_64 maintainer.
@@ -306,7 +1257,7 @@ Mon Dec 11 14:30:21 MET 2000 Jan Hubicka <jh@suse.cz>
2000-11-28 Hans-Peter Nilsson <hp@bitrange.com>
- * MAINTAINERS: Add Jörn Rennecke and self as SH maintainers.
+ * MAINTAINERS: Add Jörn Rennecke and self as SH maintainers.
Change sourceware.cygnus.com to sources.redhat.com.
Fix typo for "amongst".
@@ -802,13 +1753,13 @@ Mon Dec 11 14:30:21 MET 2000 Jan Hubicka <jh@suse.cz>
* srconv.c: Likewise.
* sysdump.c: Likewise.
-Sun Apr 23 14:23:26 2000 Denis Chertykov <denisc@overta.ru>
+2000-04-23 Denis Chertykov <denisc@overta.ru>
* readelf.c (guess_is_rela): AVR uses RELA relocations.
(get_machine_name): machine name for EM_AVR added.
-Fri Apr 21 13:20:53 2000 Richard Henderson <rth@cygnus.com>
- David Mosberger <davidm@hpl.hp.com>
+2000-04-21 Richard Henderson <rth@cygnus.com>
+ David Mosberger <davidm@hpl.hp.com>
* Makefile.am (readelf.o): Add elf/ia64.h.
* Makefile.in: Rebuild.
@@ -833,7 +1784,7 @@ Fri Apr 21 13:20:53 2000 Richard Henderson <rth@cygnus.com>
`strftime' since strftime is not available on all systems.
(process_mips_specific): Ditto.
-Fri Apr 7 15:56:57 2000 Andrew Cagney <cagney@b1.cygnus.com>
+2000-04-07 Andrew Cagney <cagney@b1.cygnus.com>
* configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
--enable-build-warnings option.
diff --git a/contrib/binutils/binutils/ChangeLog-9197 b/contrib/binutils/binutils/ChangeLog-9197
index d989ae4..1ed5416 100644
--- a/contrib/binutils/binutils/ChangeLog-9197
+++ b/contrib/binutils/binutils/ChangeLog-9197
@@ -3342,7 +3342,7 @@ Fri Apr 29 09:50:38 1994 Steve Chamberlain (sac@cygnus.com)
Wed Apr 27 11:25:18 1994 Steve Chamberlain (sac@cygnus.com)
* Makefile.in (syslex, sysinfo): Use CC_FOR_BUILD.
- * coffdump.c, coffgroc.c, coffgrog.h, srconv.c, sysdump.c,
+ * coffdump.c, coffgrok.c, coffgrok.h, srconv.c, sysdump.c,
sysroff.info: Major changes.
Tue Apr 26 18:18:24 1994 Stan Shebs (shebs@andros.cygnus.com)
@@ -4347,7 +4347,7 @@ Fri May 28 15:01:24 1993 Per Bothner (bothner@rtl.cygnus.com)
Thu May 27 16:58:31 1993 Jeffrey Osier (jeffrey@cygnus.com)
- * biutils.texi: revised c++filt chapter
+ * binutils.texi: revised c++filt chapter
Wed May 26 17:24:17 1993 Ian Lance Taylor (ian@cygnus.com)
@@ -4528,7 +4528,7 @@ Mon Feb 22 22:52:10 1993 Per Bothner (bothner@rtl.cygnus.com)
Mon Feb 22 07:54:03 1993 Mike Werner (mtw@poseidon.cygnus.com)
- * binutils/testsuite: made modifications to testcases, etc., to allow
+ * testsuite: made modifications to testcases, etc., to allow
them to work properly given the reorganization of deja-gnu and the
relocation of the testcases from deja-gnu to a "tool" subdirectory.
@@ -4539,7 +4539,7 @@ Mon Feb 22 10:27:24 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
Sun Feb 21 10:55:55 1993 Mike Werner (mtw@poseidon.cygnus.com)
- * binutils/testsuite: Initial creation of binutils/testsuite.
+ * testsuite: Initial creation of binutils/testsuite.
Migrated dejagnu testcases and support files for testing nm to
binutils/testsuite from deja-gnu. These files were moved "as is"
with no modifications. This migration is part of a major overhaul
@@ -4642,7 +4642,7 @@ Mon Nov 2 12:42:11 1992 Ian Lance Taylor (ian@cygnus.com)
Thu Oct 15 13:57:35 1992 Per Bothner (bothner@cygnus.com)
- * binutils.tex: Document yesterday's changes to strip and copy.
+ * binutils.texi: Document yesterday's changes to strip and copy.
Wed Oct 14 13:22:14 1992 Per Bothner (bothner@cygnus.com)
@@ -5130,7 +5130,6 @@ Fri Oct 11 04:12:28 1991 John Gilmore (gnu at cygnus.com)
Restructure configuration scheme for bfd, binutils, ld.
- * include/sys/h-*.h: Move to bfd/hosts/h-*.h.
* configure.in: Revise to symlink sysdep.h to ../bfd/hosts/h-xxx.h.
Change some config names to match other dirs.
* *.c: Include bfd.h before sysdep.h, so ansidecl and PROTO()
diff --git a/contrib/binutils/binutils/MAINTAINERS b/contrib/binutils/binutils/MAINTAINERS
index 9c44f77..b930f9c 100644
--- a/contrib/binutils/binutils/MAINTAINERS
+++ b/contrib/binutils/binutils/MAINTAINERS
@@ -1,86 +1,111 @@
========= Binutils Maintainers =========
This is the list of individuals responsible for maintenance and update
-of the "binutils" module, which includes the bfd, binutils, include,
-gas, gprof, ld, and opcodes subdirectories. The home page for binutils
-is http://sources.redhat.com/binutils/ and patches should be sent to
-binutils@sources.redhat.com with "[patch]" as part of the subject.
+of the GNU Binary Utilities project. This includes the linker (ld),
+the assembler (gas), the profiler (gprof), a whole suite of other
+programs (binutils) and the libraries that they use (bfd and
+opcodes). This project shares a common set of header files with the
+GCC and GDB projects (include), so maintainership of those files is
+shared amoungst the projects.
-Note - patches to the top level configure.in and config.sub scripts
-should be sent to config-patches@gnu.org and not to the binutils list.
+The home page for binutils is:
- --------- Blanket Write Privs ---------
+ http://www.gnu.org/software/binutils/binutils.html
+
+and patches should be sent to:
+
+ bug-binutils@gnu.org
+
+with "[Patch]" as part of the subject line. Note - patches to the
+top level configure.in and config.sub scripts should be sent to:
+
+ config-patches@gnu.org
-Nick Clifton <nickc@redhat.com> (head maintainer)
-Richard Henderson <rth@redhat.com>
-Ian Taylor <ian@zembu.com>
-Jeff Law <law@redhat.com>
-Jim Wilson <wilson@redhat.com>
-DJ Delorie <dj@redhat.com>
-Alan Modra <amodra@bigpond.net.au>
-Michael Meissner <meissner@redhat.com>
+and not to the binutils list.
- --------- Maintainers ---------
+ --------- Blanket Write Privs ---------
-Maintainers are individuals who are responsible for, and have permission
-to check in changes in, certain subsets of the code. Note that
-maintainers still need approval to check in changes outside of the
-immediate domain that they maintain.
+The following people have permission to check patches into the
+repository without obtaining approval first:
+
+ Nick Clifton <nickc@redhat.com> (head maintainer)
+ Richard Henderson <rth@redhat.com>
+ Ian Taylor <ian@zembu.com>
+ Jeff Law <law@redhat.com>
+ Jim Wilson <wilson@redhat.com>
+ DJ Delorie <dj@redhat.com>
+ Alan Modra <amodra@bigpond.net.au>
+ Michael Meissner <meissner@redhat.com>
+
+ --------- Maintainers ---------
+
+Maintainers are individuals who are responsible for, and have
+permission to check in changes in, certain subsets of the code. Note
+that maintainers still need approval to check in changes outside of
+the immediate domain that they maintain.
If there is no maintainer for a given domain then the responsibility
-falls to the head maintainer (above). If there are several maintainers
-for a given domain then responsibility falls to the first maintainer.
-The first maintainer is free to devolve that responsibility among the
-other maintainers.
-
-ARM Nick Clifton <nickc@redhat.com>
-AVR Denis Chertykov <denisc@overta.ru>
-CRIS Hans-Peter Nilsson <hp@axis.com>
-HPPA elf32 Alan Modra <amodra@bigpond.net.au>
-IA64 Jim Wilson <wilson@redhat.com>
-i860 Jason Eckhardt <jle@redhat.com>
-ix86 Alan Modra <amodra@bigpond.net.au>
-ix86 COFF,PE DJ Delorie <dj@redhat.com>
-ix86 H.J.Lu <hjl@gnu.org>
-ix86 INTEL MODE Diego Novillo <dnovillo@redhat.com>
-MN10300 Eric Christopher <echristo@redhat.com>
-MIPS Ulf Carlsson <ulfc@calypso.engr.sgi.com>
-PPC Geoff Keating <geoffk@redhat.com>
-SH Jörn Rennecke <amylaar@redhat.com>
-SH Hans-Peter Nilsson <hp@bitrange.com>
-SPARC Jakub Jelinek <jakub@redhat.com>
-68HC11 68HC12 Stephane Carrez <Stephane.Carrez@worldnet.fr>
-DWARF2 Jason Merrill <jason@redhat.com>
-x86_64 Jan Hubicka <jh@suse.cz>
-x86_64 Andreas Jaeger <aj@suse.de>
-
- --------- CGEN Maintainers -------------
+falls to the head maintainer (above). If there are several
+maintainers for a given domain then responsibility falls to the first
+maintainer. The first maintainer is free to devolve that
+responsibility among the other maintainers.
+
+ ARC Peter Targett <peter.targett@arccores.com>
+ ARM Nick Clifton <nickc@redhat.com>
+ ARM Richard Earnshaw <rearnsha@arm.com>
+ AVR Denis Chertykov <denisc@overta.ru>
+ CRIS Hans-Peter Nilsson <hp@axis.com>
+ DWARF2 Jason Merrill <jason@redhat.com>
+ HPPA elf32 Alan Modra <amodra@bigpond.net.au>
+ IA64 Jim Wilson <wilson@redhat.com>
+ x86_64 Jan Hubicka <jh@suse.cz>
+ x86_64 Andreas Jaeger <aj@suse.de>
+ i860 Jason Eckhardt <jle@redhat.com>
+ ix86 Alan Modra <amodra@bigpond.net.au>
+ ix86 COFF,PE DJ Delorie <dj@redhat.com>
+ ix86 H.J.Lu <hjl@gnu.org>
+ ix86 INTEL MODE Diego Novillo <dnovillo@redhat.com>
+ M68HC11 M68HC12 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+ MN10300 Eric Christopher <echristo@redhat.com>
+ MIPS Eric Christopher <echristo@redhat.com>
+ M88k Ben Elliston <bje@redhat.com>
+ MMIX Hans-Peter Nilsson <hp@bitrange.com>
+ PPC Geoff Keating <geoffk@redhat.com>
+ PPC XCOFF Tom Rix <trix@redhat.com>
+ s390, s390x Martin Schwidefsky <schwidefsky@de.ibm.com>
+ SH Jörn Rennecke <amylaar@onetel.net.uk>
+ SH Hans-Peter Nilsson <hp@bitrange.com>
+ SPARC Jakub Jelinek <jakub@redhat.com>
+ TIC54X Timothy Wall <twall@alum.mit.edu>
+ z8k Christian Groessler <cpg@aladdin.de>
+
+ --------- CGEN Maintainers -------------
CGEN is a tool for building, amongst other things, assemblers,
-disassemblers and simulators from a single description of a CPU. It
-creates files in several of the binutils directories, but it is
-mentioned here since there is a single group that maintains CGEN and
-the files that it creates.
+disassemblers and simulators from a single description of a CPU.
+It creates files in several of the binutils directories, but it
+is mentioned here since there is a single group that maintains
+CGEN and the files that it creates.
If you have CGEN related problems you can send email to;
- cgen@sources.redhat.com
+ cgen@sources.redhat.com
The current CGEN maintainers are:
Doug Evans, Ben Elliston, Frank Eigler
- --------- Write After Approval ---------
+ --------- Write After Approval ---------
Individuals with "write after approval" have the ability to check in
changes, but they must get approval for each change from someone in
one of the above lists (blanket write or maintainers).
[It's a huge list, folks. You know who you are. If you have the
- *ability* to do binutils checkins, you're in this group. Just remember
- to get approval before checking anything in.]
+ *ability* to do binutils checkins, you're in this group. Just
+ remember to get approval before checking anything in.]
- ------------- Obvious Fixes -------------
+ ------------- Obvious Fixes -------------
Fixes for obvious mistakes do not need approval, and can be checked in
right away, but the patch should still be sent to the binutils list.
@@ -90,3 +115,15 @@ spelling mistakes, blatantly incorrect code (where the correct code is
also blatantly obvious), and so on. Obvious fixes should always be
small, the larger they are, the more likely it is that they contain
some un-obvious side effect or consequence.
+
+ --------- Branch Checkins ---------
+
+If a patch is approved for check in to the mainline sources, it can
+also be checked into the current release branch. Normally however
+only bug fixes should be applied to the branch. New features, new
+ports, etc, should be restricted to the mainline. (Otherwise the
+burden of maintaining the branch in sync with the mainline becomes too
+great). If you are uncertain as to whether a patch is appropriate for
+the branch, ask the branch maintainer. This is:
+
+ Philip Blundell <philb@gnu.org>
diff --git a/contrib/binutils/binutils/Makefile.am b/contrib/binutils/binutils/Makefile.am
index 823c68b..366f544 100644
--- a/contrib/binutils/binutils/Makefile.am
+++ b/contrib/binutils/binutils/Makefile.am
@@ -5,7 +5,7 @@ INTLLIBS = @INTLLIBS@
AUTOMAKE_OPTIONS = cygnus dejagnu
-SUBDIRS = po
+SUBDIRS = doc po
tooldir = $(exec_prefix)/$(target_alias)
@@ -52,9 +52,6 @@ DLLWRAP_PROG=dllwrap
SRCONV_PROG=srconv$(EXEEXT) sysdump$(EXEEXT) coffdump$(EXEEXT)
-man_MANS = ar.1 nm.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 \
- objcopy.1 addr2line.1 nlmconv.1 $(DEMANGLER_NAME).1
-
PROGS = $(SIZE_PROG) $(OBJDUMP_PROG) $(NM_PROG) $(AR_PROG) $(STRINGS_PROG) $(STRIP_PROG) $(RANLIB_PROG) $(DEMANGLER_PROG) $(OBJCOPY_PROG) @BUILD_NLMCONV@ @BUILD_SRCONV@ @BUILD_DLLTOOL@ @BUILD_WINDRES@ $(ADDR2LINE_PROG) $(READELF_PROG) @BUILD_DLLWRAP@ @BUILD_MISC@
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@
@@ -142,17 +139,15 @@ check-DEJAGNU: site.exp
fi; \
runtest=$(RUNTEST); \
if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
- $$runtest --tool $(DEJATOOL) --srcdir $${srcdir}/testsuite \
- CC_FOR_TARGET="$(CC_FOR_TARGET)" \
- CFLAGS_FOR_TARGET="$(CFLAGS)" $(RUNTESTFLAGS); \
+ CC_FOR_TARGET="$(CC_FOR_TARGET)" CFLAGS_FOR_TARGET="$(CFLAGS)" \
+ $$runtest --tool $(DEJATOOL) --srcdir $${srcdir}/testsuite \
+ $(RUNTESTFLAGS); \
else echo "WARNING: could not find \`runtest'" 1>&2; :;\
fi
installcheck:
/bin/sh $(srcdir)/sanity.sh $(bindir)
-info_TEXINFOS = binutils.texi
-
LDADD = $(BFDLIB) $(LIBIBERTY) $(INTLLIBS)
size_SOURCES = size.c $(BULIBS)
@@ -182,7 +177,7 @@ stamp-under: Makefile
$(SHELL) $(srcdir)/../move-if-change underscore.t underscore.c
touch stamp-under
-cplus-dem.o: $(BASEDIR)/libiberty/cplus-dem.c $(INCDIR)/getopt.h
+cplus-dem.o: $(BASEDIR)/libiberty/cplus-dem.c $(INCDIR)/getopt.h Makefile
$(COMPILE) -c -DMAIN -DVERSION='"$(VERSION)"' $(BASEDIR)/libiberty/cplus-dem.c
cxxfilt_SOURCES =
@@ -277,14 +272,16 @@ dllwrap_SOURCES = dllwrap.c version.c
dllwrap_LDADD = $(LIBIBERTY) $(INTLLIBS)
-DISTSTUFF = arparse.c arparse.h arlex.c nlmheader.c sysinfo.c sysinfo.h \
+EXTRA_DIST = arparse.c arparse.h arlex.c nlmheader.c sysinfo.c sysinfo.h \
syslex.c deflex.c defparse.h defparse.c rclex.c rcparse.h rcparse.c
-diststuff: $(DISTSTUFF) info
+diststuff: $(EXTRA_DIST) info
DISTCLEANFILES = stamp-under sysinfo underscore.c sysroff.c sysroff.h \
site.exp site.bak
+Makefile: $(BFDDIR)/configure.in
+
# 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
@@ -330,23 +327,8 @@ dep-am: DEP
.PHONY: dep dep-in dep-am
###
-# DOCUMENTATION TARGETS
-config.texi: Makefile
- rm -f config.texi
- echo '@set VERSION $(VERSION)' > config.texi
-
-binutils.dvi: $(srcdir)/binutils.texi config.texi
-
-binutils.info: $(srcdir)/binutils.texi config.texi
-
-MAINTAINERCLEANFILES = config.texi
-$(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*
+MOSTLYCLEANFILES = sysinfo binutils.log binutils.sum abcdefgh*
mostlyclean-local:
-rm -rf tmpdir
@@ -380,148 +362,171 @@ install-exec-local: install-binPROGRAMS $(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)/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)/bin-bugs.h \
- $(INCDIR)/fopen-same.h $(INCDIR)/aout/ar.h $(BFDDIR)/libbfd.h \
- arsup.h $(INCDIR)/filenames.h
+ $(INCDIR)/symcat.h $(INCDIR)/getopt.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/demangle.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h
+ar.o: ar.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/progress.h bucomm.h \
+ config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/aout/ar.h $(BFDDIR)/libbfd.h arsup.h $(INCDIR)/filenames.h
arsup.o: arsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- arsup.h $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
- $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h
+ $(INCDIR)/symcat.h arsup.h $(INCDIR)/libiberty.h bucomm.h \
+ config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/filenames.h
bucomm.o: bucomm.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
- $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h
+ $(INCDIR)/symcat.h $(INCDIR)/libiberty.h bucomm.h config.h \
+ $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h
coffdump.o: coffdump.c coffgrok.h bucomm.h config.h \
$(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h
coffgrok.o: coffgrok.c bucomm.h config.h $(INCDIR)/bin-bugs.h \
$(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)/bin-bugs.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/libiberty.h debug.h
+ $(INCDIR)/symcat.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)/bin-bugs.h \
- $(INCDIR)/fopen-same.h $(INCDIR)/getopt.h $(INCDIR)/demangle.h \
- $(INCDIR)/dyn-string.h dlltool.h
+ $(INCDIR)/symcat.h $(INCDIR)/libiberty.h bucomm.h config.h \
+ $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/demangle.h \
+ $(INCDIR)/dyn-string.h dlltool.h $(INCDIR)/safe-ctype.h
filemode.o: filemode.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h
-ieee.o: ieee.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/ieee.h \
- bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/libiberty.h debug.h budbg.h $(INCDIR)/filenames.h
+ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h
+ieee.o: ieee.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/ieee.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h debug.h \
+ budbg.h $(INCDIR)/filenames.h
is-ranlib.o: is-ranlib.c
is-strip.o: is-strip.c
maybe-ranlib.o: maybe-ranlib.c
maybe-strip.o: maybe-strip.c
nlmconv.o: nlmconv.c ../bfd/bfd.h $(INCDIR)/ansidecl.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)/bin-bugs.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/getopt.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/symcat.h $(INCDIR)/libiberty.h bucomm.h config.h \
+ $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/safe-ctype.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)/symcat.h \
+ $(INCDIR)/progress.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
$(INCDIR)/aout/ranlib.h $(INCDIR)/demangle.h $(INCDIR)/libiberty.h
not-ranlib.o: not-ranlib.c
not-strip.o: not-strip.c
objcopy.o: objcopy.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/progress.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
- $(INCDIR)/fopen-same.h $(INCDIR)/getopt.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/symcat.h $(INCDIR)/progress.h bucomm.h config.h \
+ $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
budbg.h $(INCDIR)/filenames.h
objdump.o: objdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/getopt.h $(INCDIR)/progress.h bucomm.h config.h \
- $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/dis-asm.h \
- $(INCDIR)/libiberty.h $(INCDIR)/demangle.h debug.h \
- budbg.h $(INCDIR)/aout/aout64.h
-prdbg.o: prdbg.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(INCDIR)/getopt.h $(INCDIR)/progress.h \
bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/libiberty.h debug.h budbg.h
+ $(INCDIR)/safe-ctype.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 \
+ $(INCDIR)/symcat.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)/bin-bugs.h \
- $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h $(INCDIR)/demangle.h \
- debug.h budbg.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+ $(INCDIR)/symcat.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)/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)/bin-bugs.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/libiberty.h
+ $(INCDIR)/symcat.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)/symcat.h \
+ $(INCDIR)/getopt.h 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)/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
+ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/demangle.h debug.h budbg.h $(INCDIR)/filenames.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)/bin-bugs.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/libiberty.h
+ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
sysdump.o: sysdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
- sysroff.h sysroff.c
+ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h $(INCDIR)/safe-ctype.h sysroff.h \
+ sysroff.c
version.o: version.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h
+ $(INCDIR)/symcat.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)/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
+ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.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)/bin-bugs.h \
- $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h $(INCDIR)/obstack.h \
- windres.h winduni.h
+ $(INCDIR)/symcat.h $(INCDIR)/getopt.h bucomm.h config.h \
+ $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h windres.h \
+ winduni.h
resrc.o: resrc.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
+ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h \
+ windres.h winduni.h
rescoff.o: rescoff.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 $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+ $(INCDIR)/symcat.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)/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 \
+ $(INCDIR)/symcat.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 \
+ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h winduni.h $(INCDIR)/safe-ctype.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)/symcat.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/h8.h $(INCDIR)/elf/arc.h $(INCDIR)/elf/fr30.h \
+ $(INCDIR)/elf/mcore.h $(INCDIR)/elf/mmix.h $(INCDIR)/elf/i960.h \
$(INCDIR)/elf/pj.h $(INCDIR)/elf/avr.h $(INCDIR)/elf/ia64.h \
- $(INCDIR)/elf/cris.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
- $(INCDIR)/fopen-same.h $(INCDIR)/getopt.h
+ $(INCDIR)/elf/cris.h $(INCDIR)/elf/i860.h $(INCDIR)/elf/x86-64.h \
+ $(INCDIR)/elf/s390.h $(INCDIR)/elf/xstormy16.h bucomm.h \
+ config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ unwind-ia64.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
+ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h windres.h \
+ winduni.h
dllwrap.o: dllwrap.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
- $(INCDIR)/fopen-same.h $(INCDIR)/getopt.h $(INCDIR)/dyn-string.h
+ $(INCDIR)/symcat.h $(INCDIR)/libiberty.h bucomm.h config.h \
+ $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/dyn-string.h
rename.o: rename.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h
+ $(INCDIR)/symcat.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)/bin-bugs.h $(INCDIR)/fopen-same.h \
- arsup.h
+ $(INCDIR)/symcat.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)/bin-bugs.h $(INCDIR)/fopen-same.h \
- dlltool.h
+ $(INCDIR)/symcat.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)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/nlm/common.h \
- $(INCDIR)/nlm/internal.h nlmconv.h
+nlmheader.o: nlmheader.c $(INCDIR)/safe-ctype.h ../bfd/bfd.h \
+ $(INCDIR)/symcat.h bucomm.h config.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)/bin-bugs.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/libiberty.h windres.h winduni.h
+ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h windres.h \
+ winduni.h $(INCDIR)/safe-ctype.h
rclex.o: rclex.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 rcparse.h
+ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.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 a1c4175..0521329 100644
--- a/contrib/binutils/binutils/Makefile.in
+++ b/contrib/binutils/binutils/Makefile.in
@@ -117,7 +117,7 @@ INTLLIBS = @INTLLIBS@
AUTOMAKE_OPTIONS = cygnus dejagnu
-SUBDIRS = po
+SUBDIRS = doc po
tooldir = $(exec_prefix)/$(target_alias)
@@ -161,10 +161,6 @@ DLLWRAP_PROG = dllwrap
SRCONV_PROG = srconv$(EXEEXT) sysdump$(EXEEXT) coffdump$(EXEEXT)
-man_MANS = ar.1 nm.1 objdump.1 ranlib.1 readelf.1 size.1 strings.1 strip.1 \
- objcopy.1 addr2line.1 nlmconv.1 $(DEMANGLER_NAME).1
-
-
PROGS = $(SIZE_PROG) $(OBJDUMP_PROG) $(NM_PROG) $(AR_PROG) $(STRINGS_PROG) $(STRIP_PROG) $(RANLIB_PROG) $(DEMANGLER_PROG) $(OBJCOPY_PROG) @BUILD_NLMCONV@ @BUILD_SRCONV@ @BUILD_DLLTOOL@ @BUILD_WINDRES@ $(ADDR2LINE_PROG) $(READELF_PROG) @BUILD_DLLWRAP@ @BUILD_MISC@
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@
@@ -243,8 +239,6 @@ CC_FOR_TARGET = ` \
fi`
-info_TEXINFOS = binutils.texi
-
LDADD = $(BFDLIB) $(LIBIBERTY) $(INTLLIBS)
size_SOURCES = size.c $(BULIBS)
@@ -293,7 +287,7 @@ windres_LDADD = $(BFDLIB) $(LIBIBERTY) @LEXLIB@ $(INTLLIBS)
dllwrap_SOURCES = dllwrap.c version.c
dllwrap_LDADD = $(LIBIBERTY) $(INTLLIBS)
-DISTSTUFF = arparse.c arparse.h arlex.c nlmheader.c sysinfo.c sysinfo.h \
+EXTRA_DIST = 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
@@ -301,11 +295,9 @@ DISTCLEANFILES = stamp-under sysinfo underscore.c sysroff.c sysroff.h \
site.exp site.bak
-MAINTAINERCLEANFILES = config.texi
-
-MOSTLYCLEANFILES = sysinfo $(DEMANGLER_NAME).1 binutils.log binutils.sum \
- abcdefgh*
+###
+MOSTLYCLEANFILES = sysinfo binutils.log binutils.sum abcdefgh*
CLEANFILES = dep.sed DEP DEPA DEP1 DEP2
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -422,15 +414,6 @@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CF
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
-man1dir = $(mandir)/man1
-MANS = $(man_MANS)
-
-NROFF = nroff
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
@@ -445,7 +428,7 @@ OBJECTS = $(nlmconv_OBJECTS) $(srconv_OBJECTS) $(sysdump_OBJECTS) $(coffdump_OBJ
all: all-redirect
.SUFFIXES:
-.SUFFIXES: .S .c .dvi .info .l .lo .o .obj .ps .s .texi .texinfo .txi .y
+.SUFFIXES: .S .c .l .lo .o .obj .s .y
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
@@ -648,158 +631,6 @@ nlmheader.h: nlmheader.c
rcparse.h: rcparse.c
-binutils.info: binutils.texi
-binutils.dvi: binutils.texi
-
-
-DVIPS = dvips
-
-.texi.info:
- @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- $(MAKEINFO) -I $(srcdir) $<
-
-.texi.dvi:
- TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \
- MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
-
-.texi:
- @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- $(MAKEINFO) -I $(srcdir) $<
-
-.texinfo.info:
- @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- $(MAKEINFO) -I $(srcdir) $<
-
-.texinfo:
- @rm -f $@ $@-[0-9] $@-[0-9][0-9]
- $(MAKEINFO) -I $(srcdir) $<
-
-.texinfo.dvi:
- 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) $(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 $(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 \
- 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
-
-uninstall-info:
- $(PRE_UNINSTALL)
- @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
- ii=yes; \
- else ii=; fi; \
- list='$(INFO_DEPS)'; \
- for file in $$list; do \
- test -z "$ii" \
- || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \
- done
- @$(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)
- 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 \
- || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
- || cp -p $$d/$$file $(distdir)/$$file; \
- done; \
- done
-
-mostlyclean-aminfo:
- -rm -f binutils.aux binutils.cp binutils.cps binutils.dvi binutils.fn \
- binutils.fns binutils.ky binutils.kys binutils.ps \
- binutils.log binutils.pg binutils.toc binutils.tp \
- binutils.tps binutils.vr binutils.vrs binutils.op binutils.tr \
- binutils.cv binutils.cn
-
-clean-aminfo:
-
-distclean-aminfo:
-
-maintainer-clean-aminfo:
- for i in $(INFO_DEPS); do \
- rm -f $$i; \
- if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \
- rm -f $$i-[0-9]*; \
- fi; \
- done
-clean-info: mostlyclean-aminfo
-
-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,
@@ -947,7 +778,6 @@ distdir: $(DISTFILES)
|| exit 1; \
fi; \
done
- $(MAKE) $(AM_MAKEFLAGS) top_distdir="$(top_distdir)" distdir="$(distdir)" dist-info
RUNTESTFLAGS =
@@ -973,9 +803,9 @@ site.exp: Makefile
@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_DEPS)
+info-am:
info: info-recursive
-dvi-am: $(DVIS)
+dvi-am:
dvi: dvi-recursive
check-am:
$(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU
@@ -990,21 +820,21 @@ all-recursive-am: config.h
install-exec-am: install-binPROGRAMS install-exec-local
install-exec: install-exec-recursive
-install-data-am: install-man
+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-binPROGRAMS uninstall-man
+uninstall-am: uninstall-binPROGRAMS
uninstall: uninstall-recursive
-all-am: Makefile $(PROGRAMS) $(MANS) config.h
+all-am: Makefile $(PROGRAMS) config.h
all-redirect: all-recursive-am
install-strip:
$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
installdirs: installdirs-recursive
installdirs-am:
- $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(mandir)/man1
+ $(mkinstalldirs) $(DESTDIR)$(bindir)
mostlyclean-generic:
@@ -1019,24 +849,24 @@ distclean-generic:
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
- -test -z "arlexldeflexlrclexlarparseharparsecdefparsehdefparsecnlmheaderhnlmheadercrcparsehrcparsec$(MAINTAINERCLEANFILES)" || rm -f arlexl deflexl rclexl arparseh arparsec defparseh defparsec nlmheaderh nlmheaderc rcparseh rcparsec $(MAINTAINERCLEANFILES)
+ -test -z "arlexldeflexlrclexlarparseharparsecdefparsehdefparsecnlmheaderhnlmheadercrcparsehrcparsec" || rm -f arlexl deflexl rclexl arparseh arparsec defparseh defparsec nlmheaderh nlmheaderc rcparseh rcparsec
mostlyclean-am: mostlyclean-hdr mostlyclean-binPROGRAMS \
mostlyclean-noinstPROGRAMS mostlyclean-compile \
- mostlyclean-libtool mostlyclean-aminfo mostlyclean-tags \
+ mostlyclean-libtool mostlyclean-tags \
mostlyclean-generic mostlyclean-local
mostlyclean: mostlyclean-recursive
clean-am: clean-hdr clean-binPROGRAMS clean-noinstPROGRAMS \
- clean-compile clean-libtool clean-aminfo clean-tags \
- clean-generic mostlyclean-am
+ clean-compile clean-libtool 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
+ distclean-libtool distclean-tags distclean-generic \
+ clean-am
-rm -f libtool
distclean: distclean-recursive
@@ -1045,8 +875,8 @@ distclean: distclean-recursive
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-am
+ maintainer-clean-tags 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."
@@ -1060,14 +890,11 @@ 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 \
+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-am info dvi-am dvi check check-am installcheck-am installcheck \
@@ -1091,9 +918,9 @@ check-DEJAGNU: site.exp
fi; \
runtest=$(RUNTEST); \
if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
- $$runtest --tool $(DEJATOOL) --srcdir $${srcdir}/testsuite \
- CC_FOR_TARGET="$(CC_FOR_TARGET)" \
- CFLAGS_FOR_TARGET="$(CFLAGS)" $(RUNTESTFLAGS); \
+ CC_FOR_TARGET="$(CC_FOR_TARGET)" CFLAGS_FOR_TARGET="$(CFLAGS)" \
+ $$runtest --tool $(DEJATOOL) --srcdir $${srcdir}/testsuite \
+ $(RUNTESTFLAGS); \
else echo "WARNING: could not find \`runtest'" 1>&2; :;\
fi
@@ -1111,7 +938,7 @@ stamp-under: Makefile
$(SHELL) $(srcdir)/../move-if-change underscore.t underscore.c
touch stamp-under
-cplus-dem.o: $(BASEDIR)/libiberty/cplus-dem.c $(INCDIR)/getopt.h
+cplus-dem.o: $(BASEDIR)/libiberty/cplus-dem.c $(INCDIR)/getopt.h Makefile
$(COMPILE) -c -DMAIN -DVERSION='"$(VERSION)"' $(BASEDIR)/libiberty/cplus-dem.c
# The following is commented out for the conversion to automake.
@@ -1176,7 +1003,9 @@ nlmconv.o: nlmconv.c $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
ldname=`echo ld | sed '$(transform)'`; \
$(COMPILE) -c -DLD_NAME="\"$${ldname}\"" @NLMCONV_DEFS@ $(srcdir)/nlmconv.c
-diststuff: $(DISTSTUFF) info
+diststuff: $(EXTRA_DIST) info
+
+Makefile: $(BFDDIR)/configure.in
# Targets to rebuild dependencies in this Makefile.
# Have to get rid of DEP1 here so that "$?" later includes all of $(CFILES).
@@ -1221,20 +1050,6 @@ dep-am: DEP
$(SHELL) $(srcdir)/../move-if-change tmp-Makefile.am $(srcdir)/Makefile.am
.PHONY: dep dep-in dep-am
-
-###
-# DOCUMENTATION TARGETS
-config.texi: Makefile
- rm -f config.texi
- echo '@set VERSION $(VERSION)' > config.texi
-
-binutils.dvi: $(srcdir)/binutils.texi config.texi
-
-binutils.info: $(srcdir)/binutils.texi config.texi
-
-$(DEMANGLER_NAME).1: cxxfilt.man Makefile
- sed -e 's/@PROGRAM@/$(DEMANGLER_NAME)/' < $(srcdir)/cxxfilt.man \
- > $(DEMANGLER_NAME).1
mostlyclean-local:
-rm -rf tmpdir
@@ -1266,150 +1081,173 @@ install-exec-local: install-binPROGRAMS $(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)/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)/bin-bugs.h \
- $(INCDIR)/fopen-same.h $(INCDIR)/aout/ar.h $(BFDDIR)/libbfd.h \
- arsup.h $(INCDIR)/filenames.h
+ $(INCDIR)/symcat.h $(INCDIR)/getopt.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/demangle.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h
+ar.o: ar.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/progress.h bucomm.h \
+ config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/aout/ar.h $(BFDDIR)/libbfd.h arsup.h $(INCDIR)/filenames.h
arsup.o: arsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- arsup.h $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
- $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h
+ $(INCDIR)/symcat.h arsup.h $(INCDIR)/libiberty.h bucomm.h \
+ config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/filenames.h
bucomm.o: bucomm.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
- $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h
+ $(INCDIR)/symcat.h $(INCDIR)/libiberty.h bucomm.h config.h \
+ $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/filenames.h
coffdump.o: coffdump.c coffgrok.h bucomm.h config.h \
$(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h
coffgrok.o: coffgrok.c bucomm.h config.h $(INCDIR)/bin-bugs.h \
$(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)/bin-bugs.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/libiberty.h debug.h
+ $(INCDIR)/symcat.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)/bin-bugs.h \
- $(INCDIR)/fopen-same.h $(INCDIR)/getopt.h $(INCDIR)/demangle.h \
- $(INCDIR)/dyn-string.h dlltool.h
+ $(INCDIR)/symcat.h $(INCDIR)/libiberty.h bucomm.h config.h \
+ $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/demangle.h \
+ $(INCDIR)/dyn-string.h dlltool.h $(INCDIR)/safe-ctype.h
filemode.o: filemode.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h
-ieee.o: ieee.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/ieee.h \
- bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/libiberty.h debug.h budbg.h $(INCDIR)/filenames.h
+ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h
+ieee.o: ieee.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ $(INCDIR)/ieee.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h debug.h \
+ budbg.h $(INCDIR)/filenames.h
is-ranlib.o: is-ranlib.c
is-strip.o: is-strip.c
maybe-ranlib.o: maybe-ranlib.c
maybe-strip.o: maybe-strip.c
nlmconv.o: nlmconv.c ../bfd/bfd.h $(INCDIR)/ansidecl.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)/bin-bugs.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/getopt.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
+ $(INCDIR)/symcat.h $(INCDIR)/libiberty.h bucomm.h config.h \
+ $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/safe-ctype.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)/symcat.h \
+ $(INCDIR)/progress.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def \
$(INCDIR)/aout/ranlib.h $(INCDIR)/demangle.h $(INCDIR)/libiberty.h
not-ranlib.o: not-ranlib.c
not-strip.o: not-strip.c
objcopy.o: objcopy.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/progress.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
- $(INCDIR)/fopen-same.h $(INCDIR)/getopt.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/symcat.h $(INCDIR)/progress.h bucomm.h config.h \
+ $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
budbg.h $(INCDIR)/filenames.h
objdump.o: objdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/getopt.h $(INCDIR)/progress.h bucomm.h config.h \
- $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/dis-asm.h \
- $(INCDIR)/libiberty.h $(INCDIR)/demangle.h debug.h \
- budbg.h $(INCDIR)/aout/aout64.h
-prdbg.o: prdbg.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h $(INCDIR)/getopt.h $(INCDIR)/progress.h \
bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/libiberty.h debug.h budbg.h
+ $(INCDIR)/safe-ctype.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 \
+ $(INCDIR)/symcat.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)/bin-bugs.h \
- $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h $(INCDIR)/demangle.h \
- debug.h budbg.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+ $(INCDIR)/symcat.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)/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)/bin-bugs.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/libiberty.h
+ $(INCDIR)/symcat.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)/symcat.h \
+ $(INCDIR)/getopt.h 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)/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
+ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/demangle.h debug.h budbg.h $(INCDIR)/filenames.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)/bin-bugs.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/libiberty.h
+ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
sysdump.o: sysdump.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
- sysroff.h sysroff.c
+ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h $(INCDIR)/safe-ctype.h sysroff.h \
+ sysroff.c
version.o: version.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h
+ $(INCDIR)/symcat.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)/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
+ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.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)/bin-bugs.h \
- $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h $(INCDIR)/obstack.h \
- windres.h winduni.h
+ $(INCDIR)/symcat.h $(INCDIR)/getopt.h bucomm.h config.h \
+ $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h windres.h \
+ winduni.h
resrc.o: resrc.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
+ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h \
+ windres.h winduni.h
rescoff.o: rescoff.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 $(INCDIR)/coff/internal.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+ $(INCDIR)/symcat.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)/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 \
+ $(INCDIR)/symcat.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 \
+ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h winduni.h $(INCDIR)/safe-ctype.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)/symcat.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/h8.h $(INCDIR)/elf/arc.h $(INCDIR)/elf/fr30.h \
+ $(INCDIR)/elf/mcore.h $(INCDIR)/elf/mmix.h $(INCDIR)/elf/i960.h \
$(INCDIR)/elf/pj.h $(INCDIR)/elf/avr.h $(INCDIR)/elf/ia64.h \
- $(INCDIR)/elf/cris.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
- $(INCDIR)/fopen-same.h $(INCDIR)/getopt.h
+ $(INCDIR)/elf/cris.h $(INCDIR)/elf/i860.h $(INCDIR)/elf/x86-64.h \
+ $(INCDIR)/elf/s390.h $(INCDIR)/elf/xstormy16.h bucomm.h \
+ config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h \
+ unwind-ia64.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
+ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h windres.h \
+ winduni.h
dllwrap.o: dllwrap.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/libiberty.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
- $(INCDIR)/fopen-same.h $(INCDIR)/getopt.h $(INCDIR)/dyn-string.h
+ $(INCDIR)/symcat.h $(INCDIR)/libiberty.h bucomm.h config.h \
+ $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/dyn-string.h
rename.o: rename.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- bucomm.h config.h $(INCDIR)/bin-bugs.h $(INCDIR)/fopen-same.h
+ $(INCDIR)/symcat.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)/bin-bugs.h $(INCDIR)/fopen-same.h \
- arsup.h
+ $(INCDIR)/symcat.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)/bin-bugs.h $(INCDIR)/fopen-same.h \
- dlltool.h
+ $(INCDIR)/symcat.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)/bin-bugs.h $(INCDIR)/fopen-same.h $(INCDIR)/nlm/common.h \
- $(INCDIR)/nlm/internal.h nlmconv.h
+nlmheader.o: nlmheader.c $(INCDIR)/safe-ctype.h ../bfd/bfd.h \
+ $(INCDIR)/symcat.h bucomm.h config.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)/bin-bugs.h $(INCDIR)/fopen-same.h \
- $(INCDIR)/libiberty.h windres.h winduni.h
+ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h windres.h \
+ winduni.h $(INCDIR)/safe-ctype.h
rclex.o: rclex.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 rcparse.h
+ $(INCDIR)/symcat.h bucomm.h config.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.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 fd07a6d..a2f7abb 100644
--- a/contrib/binutils/binutils/NEWS
+++ b/contrib/binutils/binutils/NEWS
@@ -1,9 +1,34 @@
-*- text -*-
+* size: Add --totals to display summary of sizes (Berkeley format only).
+
+* readelf: Add --wide option to not break section header or segment listing
+ lines to fit into 80 columns.
+
+* strings: Add --encoding to display wide character strings. By Markus Kuhn.
+
+* objcopy: Add --rename-section to change section names.
+
+* readelf: Support added for DWARF 2.1 extensions. Support added for
+ displaying the contents of .debug.macinfo sections.
+
* New command line switches added to objcopy to allow symbols to be kept as
global symbols, and also to specify files containing lists of such symbols.
by Honda Hiroki.
+* Support for OpenRISC by Johan Rydberg.
+
+* New command line switch to objcopy --alt-machine-code which creates a binary
+ with an alternate machine code if one is defined in the architecture
+ description. Only supported for ELF targets. By Alexandre Oliva.
+
+* New command line switch to objcopy -B (or --binary-architecture) which sets
+ the architecture of the output file to the given argument. This option only
+ makes sense, if the input target is binary. Otherwise it is ignored.
+ By Stefan Geuken.
+
+* Support for PDP-11 by Lars Brinkhoff.
+
Changes in binutils 2.11:
* Add support for ARM v5t and v5te architectures and Intel's XScale ARM
diff --git a/contrib/binutils/binutils/README b/contrib/binutils/binutils/README
index 9157a14..ab3d21f 100644
--- a/contrib/binutils/binutils/README
+++ b/contrib/binutils/binutils/README
@@ -1,26 +1,31 @@
-These are the GNU binutils. These are utilities of use when dealing
-with object files.
+ README for BINUTILS
-The linker (ld) is in a separate directory, which should be ../ld.
-Linker-specific notes are in ../ld/README.
+These are the GNU binutils. These are utilities of use when dealing
+with binary files, either object files or executables. These tools
+consist of the linker (ld), the assembler (gas), and the profiler
+(gprof) each of which have their own sub-directory named after them.
+There is also a collection of other binary tools, including the
+disassembler (objdump) in this directory. These tools make use of a
+pair of libraries (bfd and opcodes) and a common set of header files
+(include).
-As of version 2.5, the assembler (as) is also included in this package, in
-../gas. Assembler-specific notes can be found in ../gas/README.
+There are README and NEWS files in most of the program sub-directories
+which give more information about those specific programs.
-Recent changes are in ./NEWS, ../ld/NEWS, and ../gas/NEWS.
Unpacking and Installation -- quick overview
============================================
-When you unpack the binutils-2.9.tar.gz file, you'll get a directory
-called something like `binutils-2.9', which contains various files and
-directories. Most of the files in the top directory are for
-information and for configuration. The actual source code is in
-subdirectories.
+When you unpack the binutils archive file, you will get a directory
+called something like `binutils-XXX', where XXX is the number of the
+release. (Probably 2.11.2 or higher). This directory contains
+various files and sub-directories. Most of the files in the top
+directory are for information and for configuration. The actual
+source code is in sub-directories.
To build binutils, you can just do:
- cd binutils-2.9
+ cd binutils-XXX
./configure [options]
make
make install # copies the programs files into /usr/local/bin
@@ -33,7 +38,7 @@ If you have GNU make, we recommend building in a different directory:
mkdir objdir
cd objdir
- ../binutils-2.9/configure [options]
+ ../binutils-XXX/configure [options]
make
make install
@@ -41,7 +46,9 @@ This relies on the VPATH feature of GNU make.
By default, the binutils will be configured to support the system on
which they are built. When doing cross development, use the --target
-configure option to specify a different target.
+configure option to specify a different target, eg:
+
+ ./configure --target=foo-elf
The --enable-targets option adds support for more binary file formats
besides the default. List them as the argument to --enable-targets,
@@ -49,11 +56,15 @@ separated by commas. For example:
./configure --enable-targets=sun3,rs6000-aix,decstation
-The name 'all' compiles in support for all valid BFD targets (this was
-the default in releases before 2.3):
+The name 'all' compiles in support for all valid BFD targets:
./configure --enable-targets=all
+On 32-bit hosts though, this support will be restricted to 32-bit
+target unless the --enable-64-bit-bfd option is also used:
+
+ ./configure --enable-64-bit-bfd --enable-targets=all
+
You can also specify the --enable-shared option when you run
configure. This will build the BFD and opcodes libraries as shared
libraries. You can use arguments with the --enable-shared option to
@@ -62,7 +73,7 @@ example, --enable-shared=bfd. The only potential shared libraries in
a binutils release are bfd and opcodes.
The binutils will be linked against the shared libraries. The build
-step will attempt to place the correct library in the runtime search
+step will attempt to place the correct library in the run-time search
path for the binaries. However, in some cases, after you install the
binaries, you may have to set an environment variable, normally
LD_LIBRARY_PATH, so that the system can find the installed libbfd
@@ -71,10 +82,11 @@ shared library.
To build under openVMS/AXP, see the file makefile.vms in the top level
directory.
+
If you don't have ar
====================
-If your system does not already have an ar program, the normal
+If your system does not already have an 'ar' program, the normal
binutils build process will not work. In this case, run configure as
usual. Before running make, run this script:
@@ -98,10 +110,10 @@ the ranlib program in order to build the distribution.
Porting
=======
-Binutils-2.9 supports many different architectures, but there
+Binutils-2.11 supports many different architectures, but there
are many more not supported, including some that were supported
-by earlier versions. We are hoping for volunteers to
-improve this situation.
+by earlier versions. We are hoping for volunteers to improve this
+situation.
The major effort in porting binutils to a new host and/or target
architecture involves the BFD library. There is some documentation
@@ -111,10 +123,13 @@ with gdb-4.x) may also be of help.
Reporting bugs
==============
-Send bug reports and patches to bug-binutils@gnu.org. Always mention
-the version number you are running; this is printed by running any of
-the binutils with the --version option. We appreciate reports about
-bugs, but we do not promise to fix them.
+Send bug reports and patches to:
+
+ bug-binutils@gnu.org.
+
+Always mention the version number you are running; this is printed by
+running any of the binutils with the --version option. We appreciate
+reports about bugs, but we do not promise to fix them.
VMS
===
@@ -156,7 +171,7 @@ 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'.
+standard, you already have a concealed device named 'GNU_ROOT'.
In this case, a simple
$ gmake install
@@ -179,7 +194,7 @@ and [.binutils]strings.exe) and the gnu assembler and preprocessor
and define all programs as foreign commands.
-If you're satiesfied with the compilation, you may want to remove
+If you're satisfied with the compilation, you may want to remove
unneeded objects and libraries:
$ gmake clean
diff --git a/contrib/binutils/binutils/aclocal.m4 b/contrib/binutils/binutils/aclocal.m4
index 32e6c1f..a4a2b46 100644
--- a/contrib/binutils/binutils/aclocal.m4
+++ b/contrib/binutils/binutils/aclocal.m4
@@ -37,6 +37,24 @@ AC_CHECK_PROGS(LEX, flex lex, [$missing_dir/missing flex])
AC_PROG_LEX
AC_DECL_YYTEXT])
+#serial 1
+# This test replaces the one in autoconf.
+# Currently this macro should have the same name as the autoconf macro
+# because gettext's gettext.m4 (distributed in the automake package)
+# still uses it. Otherwise, the use in gettext.m4 makes autoheader
+# give these diagnostics:
+# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
+# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
+
+undefine([AC_ISC_POSIX])
+
+AC_DEFUN(AC_ISC_POSIX,
+ [
+ dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
+ AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
+ ]
+)
+
# Do all the work for Automake. This macro actually does too much --
# some checks are only needed if your package does certain things.
# But this isn't really a big deal.
diff --git a/contrib/binutils/binutils/addr2line.c b/contrib/binutils/binutils/addr2line.c
index daae503..a9ceb91 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, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Contributed by Ulrich Lauther <Ulrich.Lauther@mchp.siemens.de>
This file is part of GNU Binutils.
@@ -28,7 +28,6 @@
both forms write results to stdout, the second form reads addresses
to be converted from stdin. */
-#include <ctype.h>
#include <string.h>
#include "bfd.h"
@@ -37,8 +36,6 @@
#include "demangle.h"
#include "bucomm.h"
-extern char *program_version;
-
static boolean with_functions; /* -f, show function names. */
static boolean do_demangle; /* -C, demangle names. */
static boolean base_names; /* -s, strip directory names. */
@@ -73,11 +70,19 @@ usage (stream, status)
FILE *stream;
int status;
{
- fprintf (stream, _("\
-Usage: %s [-CfsHV] [-b bfdname] [--target=bfdname]\n\
- [-e executable] [--exe=executable] [--demangle[=style]]\n\
- [--basenames] [--functions] [addr addr ...]\n"),
- program_name);
+ fprintf (stream, _("Usage: %s [option(s)] [addr(s)]\n"), program_name);
+ fprintf (stream, _(" Convert addresses into line number/file name pairs.\n"));
+ fprintf (stream, _(" If no addresses are specified on the command line, they will be read from stdin\n"));
+ fprintf (stream, _(" The options are:\n\
+ -b --target=<bfdname> Set the binary file format\n\
+ -e --exe=<executable> Set the input file name (default is a.out)\n\
+ -s --basenames Strip directory names\n\
+ -f --functions Show function names\n\
+ -C --demangle[=style] Demangle function names\n\
+ -h --help Display this information\n\
+ -v --version Display the program's version\n\
+\n"));
+
list_supported_targets (program_name, stream);
if (status == 0)
fprintf (stream, _("Report bugs to %s\n"), REPORT_BUGS_TO);
@@ -266,6 +271,8 @@ process_file (filename, target)
bfd_close (abfd);
}
+int main PARAMS ((int, char **));
+
int
main (argc, argv)
int argc;
@@ -278,6 +285,9 @@ main (argc, argv)
#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
setlocale (LC_MESSAGES, "");
#endif
+#if defined (HAVE_SETLOCALE)
+ setlocale (LC_CTYPE, "");
+#endif
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
@@ -289,13 +299,13 @@ main (argc, argv)
filename = NULL;
target = NULL;
- while ((c = getopt_long (argc, argv, "b:Ce:sfHV", long_options, (int *) 0))
+ while ((c = getopt_long (argc, argv, "b:Ce:sfHhVv", long_options, (int *) 0))
!= EOF)
{
switch (c)
{
case 0:
- break; /* we've been given a long option */
+ break; /* We've been given a long option. */
case 'b':
target = optarg;
break;
@@ -322,9 +332,11 @@ main (argc, argv)
case 'f':
with_functions = true;
break;
+ case 'v':
case 'V':
print_version ("addr2line");
break;
+ case 'h':
case 'H':
usage (stdout, 0);
break;
diff --git a/contrib/binutils/binutils/ar.c b/contrib/binutils/binutils/ar.c
index 996476c..92d9b35 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, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+ 2001, 2002
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -279,8 +280,14 @@ usage (help)
fprintf (s, _(" [-X32_64] - (ignored)\n"));
}
else
+ {
/* xgettext:c-format */
- fprintf (s, _("Usage: %s [-vV] archive\n"), program_name);
+ fprintf (s, _("Usage: %s [options] archive\n"), program_name);
+ fprintf (s, _(" Generate an index to speed access to archives\n"));
+ fprintf (s, _(" The options are:\n\
+ -h --help Print this help message\n\
+ -V --version Print version information\n"));
+ }
list_supported_targets (program_name, stderr);
@@ -357,6 +364,8 @@ remove_output ()
/* The option parsing should be in its own function.
It will be when I have getopt working. */
+int main PARAMS ((int, char **));
+
int
main (argc, argv)
int argc;
@@ -378,6 +387,9 @@ main (argc, argv)
#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
setlocale (LC_MESSAGES, "");
#endif
+#if defined (HAVE_SETLOCALE)
+ setlocale (LC_CTYPE, "");
+#endif
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
@@ -447,7 +459,10 @@ main (argc, argv)
{
boolean touch = false;
- if (argc < 2 || strcmp (argv[1], "--help") == 0)
+ if (argc < 2
+ || strcmp (argv[1], "--help") == 0
+ || strcmp (argv[1], "-h") == 0
+ || strcmp (argv[1], "-H") == 0)
usage (0);
if (strcmp (argv[1], "-V") == 0
|| strcmp (argv[1], "-v") == 0
@@ -827,7 +842,7 @@ print_contents (abfd)
/* xgettext:c-format */
printf (_("\n<member %s>\n\n"), bfd_get_filename (abfd));
- bfd_seek (abfd, 0, SEEK_SET);
+ bfd_seek (abfd, (file_ptr) 0, SEEK_SET);
size = buf.st_size;
while (ncopied < size)
@@ -838,8 +853,7 @@ print_contents (abfd)
if (tocopy > BUFSIZE)
tocopy = BUFSIZE;
- nread = bfd_read (cbuf, 1, tocopy, abfd); /* oops -- broke
- abstraction! */
+ nread = bfd_bread (cbuf, (bfd_size_type) tocopy, abfd);
if (nread != tocopy)
/* xgettext:c-format */
fatal (_("%s is not a valid archive"),
@@ -883,7 +897,7 @@ extract_file (abfd)
if (verbose)
printf ("x - %s\n", bfd_get_filename (abfd));
- bfd_seek (abfd, 0, SEEK_SET);
+ bfd_seek (abfd, (file_ptr) 0, SEEK_SET);
ostream = NULL;
if (size == 0)
@@ -907,7 +921,7 @@ extract_file (abfd)
if (tocopy > BUFSIZE)
tocopy = BUFSIZE;
- nread = bfd_read (cbuf, 1, tocopy, abfd);
+ nread = bfd_bread (cbuf, (bfd_size_type) tocopy, abfd);
if (nread != tocopy)
/* xgettext:c-format */
fatal (_("%s is not a valid archive"),
diff --git a/contrib/binutils/binutils/arlex.l b/contrib/binutils/binutils/arlex.l
index 71ef56e..381b177 100644
--- a/contrib/binutils/binutils/arlex.l
+++ b/contrib/binutils/binutils/arlex.l
@@ -29,6 +29,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "libiberty.h"
#include "arparse.h"
+#define YY_NO_UNPUT
+
+extern int yylex PARAMS ((void));
+
int linenumber;
%}
@@ -71,7 +75,7 @@ int linenumber;
"(" { return '('; }
")" { return ')'; }
"," { return ','; }
-[A-Za-z0-9/$:.\-\_]+ {
+[A-Za-z0-9/\\$:.\-\_]+ {
yylval.name = xstrdup (yytext);
return FILENAME;
}
diff --git a/contrib/binutils/binutils/arsup.c b/contrib/binutils/binutils/arsup.c
index 0058c0d..1e86479 100644
--- a/contrib/binutils/binutils/arsup.c
+++ b/contrib/binutils/binutils/arsup.c
@@ -160,10 +160,11 @@ DEFUN(ar_open,(name, t),
{
char *tname = (char *) xmalloc (strlen (name) + 10);
+ const char *bname = lbasename (name);
real_name = name;
/* Prepend tmp- to the beginning, to avoid file-name clashes after
truncation on filesystems with limited namespaces (DOS). */
- sprintf(tname, "tmp-%s", name);
+ sprintf(tname, "%.*stmp-%s", (int) (bname - name), name, bname);
obfd = bfd_openw(tname, NULL);
if (!obfd) {
diff --git a/contrib/binutils/binutils/arsup.h b/contrib/binutils/binutils/arsup.h
index 26538be..e875cbf 100644
--- a/contrib/binutils/binutils/arsup.h
+++ b/contrib/binutils/binutils/arsup.h
@@ -22,54 +22,40 @@ struct list {
struct list *next;
};
-void
-maybequit PARAMS ((void));
+void maybequit PARAMS ((void));
-void
-prompt PARAMS ((void));
+void prompt PARAMS ((void));
-void
-ar_clear PARAMS ((void));
+void ar_clear PARAMS ((void));
-void
-ar_replace PARAMS ((struct list *));
+void ar_replace PARAMS ((struct list *));
-void
-ar_delete PARAMS ((struct list *));
+void ar_delete PARAMS ((struct list *));
-void
-ar_save PARAMS ((void));
+void ar_save PARAMS ((void));
-void
-ar_list PARAMS ((void));
+void ar_list PARAMS ((void));
-void
-ar_open PARAMS ((char *, int));
+void ar_open PARAMS ((char *, int));
-void
-ar_directory PARAMS ((char *, struct list *, char *));
+void ar_directory PARAMS ((char *, struct list *, char *));
-void
-ar_addmod PARAMS ((struct list *));
+void ar_addmod PARAMS ((struct list *));
-void
-ar_addlib PARAMS ((char *, struct list *));
+void ar_addlib PARAMS ((char *, struct list *));
-void
-ar_end PARAMS ((void));
+void ar_end PARAMS ((void));
-void
-ar_extract PARAMS ((struct list *));
+void ar_extract PARAMS ((struct list *));
-bfd *
-open_inarch PARAMS ((const char *archive_filename, const char *));
+bfd *open_inarch PARAMS ((const char *archive_filename, const char *));
-int
-yyparse PARAMS ((void));
+extern int yylex PARAMS ((void));
+
+int yyparse PARAMS ((void));
/* Functions from ar.c */
-void
-extract_file PARAMS ((bfd * abfd));
+void extract_file PARAMS ((bfd * abfd));
extern int interactive;
diff --git a/contrib/binutils/binutils/bucomm.c b/contrib/binutils/binutils/bucomm.c
index 401a3e4..aa3080f 100644
--- a/contrib/binutils/binutils/bucomm.c
+++ b/contrib/binutils/binutils/bucomm.c
@@ -70,55 +70,26 @@ report (format, args)
putc ('\n', stderr);
}
-#ifdef ANSI_PROTOTYPES
void
-fatal (const char *format, ...)
+fatal VPARAMS ((const char *format, ...))
{
- va_list args;
+ VA_OPEN (args, format);
+ VA_FIXEDARG (args, const char *, format);
- va_start (args, format);
report (format, args);
- va_end (args);
+ VA_CLOSE (args);
xexit (1);
}
void
-non_fatal (const char *format, ...)
+non_fatal VPARAMS ((const char *format, ...))
{
- va_list args;
+ VA_OPEN (args, format);
+ VA_FIXEDARG (args, const char *, format);
- va_start (args, format);
report (format, args);
- va_end (args);
+ VA_CLOSE (args);
}
-#else
-void
-fatal (va_alist)
- va_dcl
-{
- char *Format;
- va_list args;
-
- va_start (args);
- Format = va_arg (args, char *);
- report (Format, args);
- va_end (args);
- 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
this permits the binutils to be configured for a particular target,
@@ -168,6 +139,25 @@ list_supported_targets (name, f)
fprintf (f, " %s", bfd_target_vector[t]->name);
fprintf (f, "\n");
}
+
+/* List the supported architectures. */
+
+void
+list_supported_architectures (name, f)
+ const char *name;
+ FILE *f;
+{
+ const char** arch;
+
+ if (name == NULL)
+ fprintf (f, _("Supported architectures:"));
+ else
+ fprintf (f, _("%s: supported architectures:"), name);
+
+ for (arch = bfd_arch_list (); *arch; arch++)
+ fprintf (f, " %s", *arch);
+ fprintf (f, "\n");
+}
/* Display the archive header for an element as if it were an ls -l listing:
diff --git a/contrib/binutils/binutils/bucomm.h b/contrib/binutils/binutils/bucomm.h
index f8c8608..0c98a7f 100644
--- a/contrib/binutils/binutils/bucomm.h
+++ b/contrib/binutils/binutils/bucomm.h
@@ -164,6 +164,8 @@ void list_matching_formats PARAMS ((char **p));
void list_supported_targets PARAMS ((const char *, FILE *));
+void list_supported_architectures PARAMS ((const char *, FILE *));
+
void print_arelt_descr PARAMS ((FILE *file, bfd *abfd, boolean verbose));
char *make_tempname PARAMS ((char *));
diff --git a/contrib/binutils/binutils/coffdump.c b/contrib/binutils/binutils/coffdump.c
index 80b0817..db5034e 100644
--- a/contrib/binutils/binutils/coffdump.c
+++ b/contrib/binutils/binutils/coffdump.c
@@ -1,27 +1,27 @@
/* Coff file dumper.
- Copyright 1994, 1995, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1998, 1999, 2000, 2001, 2002
+ Free Software Foundation, Inc.
-This file is part of GNU Binutils.
+ 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 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.
+ 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. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Written by Steve Chamberlain <sac@cygnus.com>
This module reads a type tree generated by coffgrok and prints
- it out so we can test the grokker.
-*/
+ it out so we can test the grokker. */
#include <bfd.h>
#include <getopt.h>
@@ -30,14 +30,25 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "coffgrok.h"
#include "bucomm.h"
-#define PROGRAM_VERSION "1.0"
-
static int atnl;
-static void dump_coff_scope ();
+
+static void tab PARAMS ((int));
+static void nl PARAMS ((void));
+static void dump_coff_lines PARAMS ((struct coff_line *));
+static void dump_coff_type PARAMS ((struct coff_type *));
+static void dump_coff_where PARAMS ((struct coff_where *));
+static void dump_coff_visible PARAMS ((struct coff_visible *));
+extern void dump_coff_symbol PARAMS ((struct coff_symbol *));
+static void dump_coff_scope PARAMS ((struct coff_scope *));
+static void dump_coff_sfile PARAMS ((struct coff_sfile *));
+static void dump_coff_section PARAMS ((struct coff_section *));
+extern void coff_dump PARAMS ((struct coff_ofile *));
+static void show_usage PARAMS ((FILE *, int));
+extern int main PARAMS ((int, char **));
static void
tab (x)
-int x;
+ int x;
{
static int indent;
int i;
@@ -79,7 +90,8 @@ int x;
}
}
-static void nl ()
+static void
+nl ()
{
atnl = 1;
}
@@ -90,21 +102,25 @@ dump_coff_lines (p)
{
int i;
int online = 0;
- tab(1);
- printf(_("#lines %d "),p->nlines);
+
+ tab (1);
+ printf (_("#lines %d "),p->nlines);
+
for (i = 0; i < p->nlines; i++)
{
- printf("(%d 0x%x)", p->lines[i], p->addresses[i]);
+ printf ("(%d 0x%x)", p->lines[i], p->addresses[i]);
+
online++;
+
if (online > 6)
{
- nl();
- tab(0);
+ nl ();
+ tab (0);
online = 0;
}
}
- nl();
- tab(-1);
+ nl ();
+ tab (-1);
}
static void
@@ -113,13 +129,14 @@ dump_coff_type (p)
{
tab (1);
printf ("size %d ", p->size);
+
switch (p->type)
{
case coff_secdef_type:
printf ("section definition at %x size %x\n",
p->u.asecdef.address,
p->u.asecdef.size);
- nl();
+ nl ();
break;
case coff_pointer_type:
printf ("pointer to");
@@ -313,7 +330,6 @@ dump_coff_visible (p)
tab (-1);
}
-
void
dump_coff_symbol (p)
struct coff_symbol *p;
@@ -321,6 +337,7 @@ dump_coff_symbol (p)
tab (1);
printf ("List of symbols");
nl ();
+
while (p)
{
tab (1);
@@ -351,35 +368,37 @@ static void
dump_coff_scope (p)
struct coff_scope *p;
{
-if (p) {
- tab (1);
- printf ("List of blocks %lx ",(unsigned long) p);
-
- if (p->sec) {
- printf( " %s %x..%x", p->sec->name,p->offset, p->offset + p->size -1);
- }
- nl ();
- tab (0);
- printf ("*****************");
- nl ();
- while (p)
+ if (p)
{
- tab (0);
- printf ("vars %d", p->nvars);
+ tab (1);
+ printf ("List of blocks %lx ",(unsigned long) p);
+
+ if (p->sec)
+ printf( " %s %x..%x", p->sec->name,p->offset, p->offset + p->size -1);
+
nl ();
- dump_coff_symbol (p->vars_head);
- printf ("blocks");
+ tab (0);
+ printf ("*****************");
nl ();
- dump_coff_scope (p->list_head);
+
+ while (p)
+ {
+ tab (0);
+ printf ("vars %d", p->nvars);
+ nl ();
+ dump_coff_symbol (p->vars_head);
+ printf ("blocks");
+ nl ();
+ dump_coff_scope (p->list_head);
+ nl ();
+ p = p->next;
+ }
+
+ tab (0);
+ printf ("*****************");
nl ();
- p = p->next;
+ tab (-1);
}
-
- tab (0);
- printf ("*****************");
- nl ();
- tab (-1);
-}
}
static void
@@ -389,6 +408,7 @@ dump_coff_sfile (p)
tab (1);
printf ("List of source files");
nl ();
+
while (p)
{
tab (0);
@@ -402,25 +422,27 @@ dump_coff_sfile (p)
static void
dump_coff_section(ptr)
-struct coff_section *ptr;
+ struct coff_section *ptr;
{
int i;
- tab(1);
- printf("section %s %d %d address %x size %x number %d nrelocs %d",
- ptr->name, ptr->code, ptr->data, ptr->address,ptr->size, ptr->number, ptr->nrelocs);
- nl();
+
+ tab (1);
+ printf ("section %s %d %d address %x size %x number %d nrelocs %d",
+ ptr->name, ptr->code, ptr->data, ptr->address,ptr->size,
+ ptr->number, ptr->nrelocs);
+ nl ();
for (i = 0; i < ptr->nrelocs; i++)
{
- tab(0);
- printf("(%x %s %x)",
- ptr->relocs[i].offset,
- ptr->relocs[i].symbol->name,
- ptr->relocs[i].addend);
- nl();
+ tab (0);
+ printf ("(%x %s %x)",
+ ptr->relocs[i].offset,
+ ptr->relocs[i].symbol->name,
+ ptr->relocs[i].addend);
+ nl ();
}
- tab(-1);
+ tab (-1);
}
void
@@ -428,17 +450,17 @@ coff_dump (ptr)
struct coff_ofile *ptr;
{
int i;
+
printf ("Coff dump");
nl ();
printf ("#souces %d", ptr->nsources);
nl ();
dump_coff_sfile (ptr->source_head);
+
for (i = 0; i < ptr->nsections; i++)
- dump_coff_section(ptr->sections + i);
+ dump_coff_section (ptr->sections + i);
}
-
-
char * program_name;
static void
@@ -446,18 +468,18 @@ show_usage (file, status)
FILE *file;
int status;
{
- fprintf (file, "Usage: %s [-hV] in-file\n", program_name);
- exit (status);
-}
+ fprintf (file, _("Usage: %s [option(s)] in-file\n"), program_name);
+ fprintf (file, _(" Print a human readable interpretation of a SYSROFF object file\n"));
+ fprintf (file, _(" The options are:\n\
+ -h --help Display this information\n\
+ -v --version Display the program's version\n\
+\n"));
-static void
-show_help ()
-{
- printf (_("%s: Print a human readable interpretation of a SYSROFF object file\n"),
- program_name);
- show_usage (stdout, 0);
-}
+ if (status == 0)
+ fprintf (file, _("Report bugs to %s\n"), REPORT_BUGS_TO);
+ exit (status);
+}
int
main (ac, av)
@@ -479,30 +501,34 @@ main (ac, av)
#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
setlocale (LC_MESSAGES, "");
#endif
+#if defined (HAVE_SETLOCALE)
+ setlocale (LC_CTYPE, "");
+#endif
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
program_name = av[0];
xmalloc_set_program_name (program_name);
- while ((opt = getopt_long (ac, av, "hV", long_options,
+ while ((opt = getopt_long (ac, av, "HhVv", long_options,
(int *) NULL))
!= EOF)
{
switch (opt)
{
+ case 'H':
case 'h':
- show_help ();
- /*NOTREACHED*/
+ show_usage (stdout, 0);
+ break;
+ case 'v':
case 'V':
- printf (_("GNU %s version %s\n"), program_name, PROGRAM_VERSION);
+ print_version ("coffdump");
exit (0);
- /*NOTREACHED*/
case 0:
break;
default:
show_usage (stderr, 1);
- /*NOTREACHED*/
+ break;
}
}
@@ -512,9 +538,8 @@ main (ac, av)
}
if (!input_file)
- {
- fatal (_("no input file specified"));
- }
+ fatal (_("no input file specified"));
+
abfd = bfd_openr (input_file, 0);
if (!abfd)
@@ -523,6 +548,7 @@ main (ac, av)
if (! bfd_check_format_matches (abfd, bfd_object, &matching))
{
bfd_nonfatal (input_file);
+
if (bfd_get_error () == bfd_error_file_ambiguously_recognized)
{
list_matching_formats (matching);
@@ -533,7 +559,8 @@ main (ac, av)
tree = coff_grok (abfd);
- coff_dump(tree);
- printf("\n");
+ coff_dump (tree);
+ printf ("\n");
+
return 0;
}
diff --git a/contrib/binutils/binutils/coffgrok.c b/contrib/binutils/binutils/coffgrok.c
index 1118fac..0194b3f 100644
--- a/contrib/binutils/binutils/coffgrok.c
+++ b/contrib/binutils/binutils/coffgrok.c
@@ -1,5 +1,5 @@
/* coffgrok.c
- Copyright 1994, 1995, 1997, 1998, 2000 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -26,6 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
*/
#include <bfd.h>
+#include <libiberty.h>
#include "bucomm.h"
#include "coff/internal.h"
@@ -53,7 +54,7 @@ static long symcount;
static struct coff_ptr_struct *rawsyms;
static int rawcount;
static bfd *abfd;
-extern char *xcalloc ();
+
#define PTR_SIZE 4
#define SHORT_SIZE 2
#define INT_SIZE 4
@@ -63,6 +64,19 @@ extern char *xcalloc ();
#define INDEXOF(p) ((struct coff_ptr_struct *)(p)-(rawsyms))
+static struct coff_scope *empty_scope PARAMS ((void));
+static struct coff_symbol *empty_symbol PARAMS ((void));
+static void push_scope PARAMS ((int));
+static void pop_scope PARAMS ((void));
+static void do_sections_p1 PARAMS ((struct coff_ofile *));
+static void do_sections_p2 PARAMS ((struct coff_ofile *));
+static struct coff_where *do_where PARAMS ((int));
+static struct coff_line *do_lines PARAMS ((int, char *));
+static struct coff_type *do_type PARAMS ((int));
+static struct coff_visible *do_visible PARAMS ((int));
+static int do_define PARAMS ((int, struct coff_scope *));
+static struct coff_ofile *doit PARAMS ((void));
+
static struct coff_scope *
empty_scope ()
{
diff --git a/contrib/binutils/binutils/coffgrok.h b/contrib/binutils/binutils/coffgrok.h
index e442bae..be0bdef 100644
--- a/contrib/binutils/binutils/coffgrok.h
+++ b/contrib/binutils/binutils/coffgrok.h
@@ -222,4 +222,4 @@ struct coff_sfile
struct coff_sfile *sfile;
};
-struct coff_ofile *coff_grok();
+struct coff_ofile *coff_grok PARAMS ((bfd *));
diff --git a/contrib/binutils/binutils/config.in b/contrib/binutils/binutils/config.in
index 7b70d16..1e0aa93 100644
--- a/contrib/binutils/binutils/config.in
+++ b/contrib/binutils/binutils/config.in
@@ -28,9 +28,6 @@
/* 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
@@ -61,6 +58,9 @@
/* Define if you have the dcgettext function. */
#undef HAVE_DCGETTEXT
+/* Define if you have the getc_unlocked function. */
+#undef HAVE_GETC_UNLOCKED
+
/* Define if you have the getcwd function. */
#undef HAVE_GETCWD
@@ -130,6 +130,12 @@
/* Define if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
+/* Define if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_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
@@ -160,6 +166,12 @@
/* Suffix used for executables, if any. */
#undef EXECUTABLE_SUFFIX
+/* Is fopen64 available? */
+#undef HAVE_FOPEN64
+
+/* Enable LFS */
+#undef _LARGEFILE64_SOURCE
+
/* Is the type time_t defined in <time.h>? */
#undef HAVE_TIME_T_IN_TIME_H
diff --git a/contrib/binutils/binutils/configure b/contrib/binutils/binutils/configure
index a123770..1ba4285 100755
--- a/contrib/binutils/binutils/configure
+++ b/contrib/binutils/binutils/configure
@@ -53,7 +53,6 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
-sitefile=
srcdir=
target=NONE
verbose=
@@ -168,7 +167,6 @@ 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
@@ -339,11 +337,6 @@ 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=*)
@@ -509,16 +502,12 @@ fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
-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
+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
-else
- CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
@@ -557,12 +546,12 @@ else
fi
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:561: checking for Cygwin environment" >&5
+echo "configure:550: 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 566 "configure"
+#line 555 "configure"
#include "confdefs.h"
int main() {
@@ -573,7 +562,7 @@ int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
@@ -590,19 +579,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:594: checking for mingw32 environment" >&5
+echo "configure:583: 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 599 "configure"
+#line 588 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
@@ -667,7 +656,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:671: checking host system type" >&5
+echo "configure:660: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -688,7 +677,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:692: checking target system type" >&5
+echo "configure:681: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -706,7 +695,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:710: checking build system type" >&5
+echo "configure:699: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -728,249 +717,49 @@ test "$host_alias" != "$target_alias" &&
NONENONEs,x,x, &&
program_prefix=${target_alias}-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:735: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:765: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- 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:816: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
+echo "configure:723: checking for strerror in -lcposix" >&5
+ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="cl"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
- ;;
- esac
- fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:848: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 859 "configure"
+ ac_save_LIBS="$LIBS"
+LIBS="-lcposix $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 731 "configure"
#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char strerror();
-main(){return(0);}
+int main() {
+strerror()
+; return 0; }
EOF
-if { (eval echo configure:864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- ac_cv_prog_cc_works=yes
- # If we can't run a trivial program, we are probably using a cross compiler.
- if (./conftest; exit) 2>/dev/null; then
- ac_cv_prog_cc_cross=no
- else
- ac_cv_prog_cc_cross=yes
- fi
+if { (eval echo configure:742: \"$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
- ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:890: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:895: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:904: \"$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:923: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
+LIBS="$ac_save_LIBS"
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:955: checking for POSIXized ISC" >&5
-if test -d /etc/conf/kconfig.d &&
- grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
-then
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; 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
+ LIBS="$LIBS -lcposix"
else
echo "$ac_t""no" 1>&6
- ISC=
fi
+
+
BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in`
# Find a good install program. We prefer a C program (faster),
@@ -985,7 +774,7 @@ BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${
# 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:989: checking for a BSD compatible install" >&5
+echo "configure:778: 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
@@ -1038,7 +827,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:1042: checking whether build environment is sane" >&5
+echo "configure:831: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
@@ -1095,7 +884,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:1099: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:888: 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
@@ -1141,7 +930,7 @@ EOF
missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:1145: checking for working aclocal" >&5
+echo "configure:934: 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.
@@ -1154,7 +943,7 @@ else
fi
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1158: checking for working autoconf" >&5
+echo "configure:947: 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.
@@ -1167,7 +956,7 @@ else
fi
echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:1171: checking for working automake" >&5
+echo "configure:960: 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.
@@ -1180,7 +969,7 @@ else
fi
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1184: checking for working autoheader" >&5
+echo "configure:973: 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.
@@ -1193,7 +982,7 @@ else
fi
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1197: checking for working makeinfo" >&5
+echo "configure:986: 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.
@@ -1211,7 +1000,7 @@ fi
if test "${enable_shared+set}" = set; then
enableval="$enable_shared"
p=${PACKAGE-default}
-case "$enableval" in
+case $enableval in
yes) enable_shared=yes ;;
no) enable_shared=no ;;
*)
@@ -1234,7 +1023,7 @@ fi
if test "${enable_static+set}" = set; then
enableval="$enable_static"
p=${PACKAGE-default}
-case "$enableval" in
+case $enableval in
yes) enable_static=yes ;;
no) enable_static=no ;;
*)
@@ -1257,7 +1046,7 @@ fi
if test "${enable_fast_install+set}" = set; then
enableval="$enable_fast_install"
p=${PACKAGE-default}
-case "$enableval" in
+case $enableval in
yes) enable_fast_install=yes ;;
no) enable_fast_install=no ;;
*)
@@ -1276,6 +1065,228 @@ else
enable_fast_install=yes
fi
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure: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=":"
+ 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:1102: 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:1153: 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:1185: 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 1196 "configure"
+#include "confdefs.h"
+
+main(){return(0);}
+EOF
+if { (eval echo configure:1201: \"$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:1227: 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:1232: 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:1241: \"$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:1260: checking whether ${CC-cc} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+ ac_cv_prog_cc_g=yes
+else
+ ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+
# Check whether --with-gnu-ld or --without-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then
withval="$with_gnu_ld"
@@ -1285,10 +1296,10 @@ else
fi
ac_prog=ld
-if test "$ac_cv_prog_gcc" = yes; then
+if test "$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:1292: checking for ld used by GCC" >&5
+echo "configure:1303: checking for ld used by GCC" >&5
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
@@ -1296,7 +1307,7 @@ echo "configure:1292: checking for ld used by GCC" >&5
*)
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
esac
- case "$ac_prog" in
+ case $ac_prog in
# Accept absolute paths.
[\\/]* | [A-Za-z]:[\\/]*)
re_direlt='/[^/][^/]*/\.\./'
@@ -1318,12 +1329,12 @@ echo "configure:1292: 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:1322: checking for GNU ld" >&5
+echo "configure:1333: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1325: checking for non-GNU ld" >&5
+echo "configure:1336: checking for non-GNU ld" >&5
fi
-if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
+if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -z "$LD"; then
@@ -1331,11 +1342,11 @@ else
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- ac_cv_path_LD="$ac_dir/$ac_prog"
+ lt_cv_path_LD="$ac_dir/$ac_prog"
# Check to see if the program is GNU ld. I'd rather use --version,
# but apparently some GNU ld's only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
- if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+ if "$lt_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
@@ -1344,11 +1355,11 @@ else
done
IFS="$ac_save_ifs"
else
- ac_cv_path_LD="$LD" # Let the user override the test with a path.
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
fi
fi
-LD="$ac_cv_path_LD"
+LD="$lt_cv_path_LD"
if test -n "$LD"; then
echo "$ac_t""$LD" 1>&6
else
@@ -1356,24 +1367,24 @@ else
fi
test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1360: checking if the linker ($LD) is GNU ld" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
+echo "configure:1371: checking if the linker ($LD) is GNU ld" >&5
+if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# I'd rather use --version here, but apparently some GNU ld's only accept -v.
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
- ac_cv_prog_gnu_ld=yes
+ lt_cv_prog_gnu_ld=yes
else
- ac_cv_prog_gnu_ld=no
+ lt_cv_prog_gnu_ld=no
fi
fi
-echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
-with_gnu_ld=$ac_cv_prog_gnu_ld
+echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
+with_gnu_ld=$lt_cv_prog_gnu_ld
echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
-echo "configure:1377: checking for $LD option to reload object files" >&5
+echo "configure:1388: checking for $LD option to reload object files" >&5
if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1385,13 +1396,13 @@ reload_flag=$lt_cv_ld_reload_flag
test -n "$reload_flag" && reload_flag=" $reload_flag"
echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1389: checking for BSD-compatible nm" >&5
-if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
+echo "configure:1400: checking for BSD-compatible nm" >&5
+if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$NM"; then
# Let the user override the test.
- ac_cv_path_NM="$NM"
+ lt_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
@@ -1403,27 +1414,27 @@ else
# nm: unknown option "B" ignored
# Tru64's nm complains that /dev/null is an invalid object file
if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
- ac_cv_path_NM="$tmp_nm -B"
+ lt_cv_path_NM="$tmp_nm -B"
break
elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$tmp_nm -p"
+ lt_cv_path_NM="$tmp_nm -p"
break
else
- ac_cv_path_NM=${ac_cv_path_NM="$tmp_nm"} # keep the first match, but
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
continue # so that we can try to find one that supports BSD flags
fi
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
+ test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
fi
fi
-NM="$ac_cv_path_NM"
+NM="$lt_cv_path_NM"
echo "$ac_t""$NM" 1>&6
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1427: checking whether ln -s works" >&5
+echo "configure:1438: 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
@@ -1444,7 +1455,7 @@ else
fi
echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
-echo "configure:1448: checking how to recognise dependant libraries" >&5
+echo "configure:1459: checking how to recognise dependant libraries" >&5
if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1462,8 +1473,8 @@ lt_cv_deplibs_check_method='unknown'
# If you have `file' or equivalent on your system and you're not sure
# whether `pass_all' will *always* work, you probably want this one.
-case "$host_os" in
-aix4*)
+case $host_os in
+aix*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -1472,8 +1483,8 @@ beos*)
;;
bsdi4*)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
lt_cv_file_magic_test_file=/shlib/libc.so
;;
@@ -1482,14 +1493,27 @@ cygwin* | mingw* |pw32*)
lt_cv_file_magic_cmd='$OBJDUMP -f'
;;
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ case "$host_os" in
+ rhapsody* | darwin1.012)
+ lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
+ ;;
+ *) # Darwin 1.3 on
+ lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
+ ;;
+ esac
+ ;;
+
freebsd* )
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- case "$host_cpu" in
+ case $host_cpu in
i*86 )
# Not sure whether the presence of OpenBSD here was a mistake.
# Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
;;
esac
@@ -1502,29 +1526,28 @@ gnu*)
lt_cv_deplibs_check_method=pass_all
;;
-hpux10.20*)
- # TODO: Does this work for hpux-11 too?
- lt_cv_deplibs_check_method='file_magic (s0-90-90-9|PA-RISC0-9.0-9) shared library'
+hpux10.20*|hpux11*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=/usr/lib/libc.sl
;;
irix5* | irix6*)
- case "$host_os" in
+ case $host_os in
irix5*)
# this will be overridden with pass_all, but let us keep it just in case
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
;;
*)
- case "$LD" in
+ case $LD in
*-32|*"-32 ") libmagic=32-bit;;
*-n32|*"-n32 ") libmagic=N32;;
*-64|*"-64 ") libmagic=64-bit;;
*) libmagic=never-match;;
esac
# this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
- ;;
+ lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
+ ;;
esac
lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
lt_cv_deplibs_check_method=pass_all
@@ -1532,25 +1555,30 @@ irix5* | irix6*)
# This must be Linux ELF.
linux-gnu*)
- case "$host_cpu" in
- alpha* | i*86 | powerpc* | sparc* | ia64* )
+ case $host_cpu in
+ alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
lt_cv_deplibs_check_method=pass_all ;;
*)
# glibc up to 2.1.1 does not perform some relocations on ARM
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
- esac
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
+ esac
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
;;
netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then :
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
else
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
fi
;;
+newsos6)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
+ ;;
+
osf3* | osf4* | osf5*)
# this will be overridden with pass_all, but let us keep it just in case
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
@@ -1567,14 +1595,18 @@ solaris*)
lt_cv_file_magic_test_file=/lib/libc.so
;;
+sysv5uw[78]* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- case "$host_vendor" in
+ case $host_vendor in
ncr)
lt_cv_deplibs_check_method=pass_all
;;
motorola)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
;;
esac
;;
@@ -1587,13 +1619,13 @@ file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:1591: checking for object suffix" >&5
+echo "configure:1623: checking for object suffix" >&5
if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftest*
echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:1597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
for ac_file in conftest.*; do
case $ac_file in
*.c) ;;
@@ -1613,7 +1645,7 @@ ac_objext=$ac_cv_objext
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1617: checking for executable suffix" >&5
+echo "configure:1649: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1623,10 +1655,10 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:1627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:1659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
- *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+ *.c | *.o | *.obj) ;;
*) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
esac
done
@@ -1652,15 +1684,15 @@ fi
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
# Only perform the check for file, if the check method requires it
-case "$deplibs_check_method" in
+case $deplibs_check_method in
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
-echo "configure:1660: checking for ${ac_tool_prefix}file" >&5
+echo "configure:1692: checking for ${ac_tool_prefix}file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- case "$MAGIC_CMD" in
+ case $MAGIC_CMD in
/*)
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
;;
@@ -1676,7 +1708,7 @@ else
if test -f $ac_dir/${ac_tool_prefix}file; then
lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
if test -n "$file_magic_test_file"; then
- case "$deplibs_check_method" in
+ case $deplibs_check_method in
"file_magic "*)
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
@@ -1718,11 +1750,11 @@ fi
if test -z "$lt_cv_path_MAGIC_CMD"; then
if test -n "$ac_tool_prefix"; then
echo $ac_n "checking for file""... $ac_c" 1>&6
-echo "configure:1722: checking for file" >&5
+echo "configure:1754: checking for file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- case "$MAGIC_CMD" in
+ case $MAGIC_CMD in
/*)
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
;;
@@ -1738,7 +1770,7 @@ else
if test -f $ac_dir/file; then
lt_cv_path_MAGIC_CMD="$ac_dir/file"
if test -n "$file_magic_test_file"; then
- case "$deplibs_check_method" in
+ case $deplibs_check_method in
"file_magic "*)
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
@@ -1789,7 +1821,7 @@ esac
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1793: checking for $ac_word" >&5
+echo "configure:1825: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1821,7 +1853,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1825: checking for $ac_word" >&5
+echo "configure:1857: 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
@@ -1856,7 +1888,7 @@ fi
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1860: checking for $ac_word" >&5
+echo "configure:1892: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1888,7 +1920,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1892: checking for $ac_word" >&5
+echo "configure:1924: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1926,8 +1958,8 @@ libtool_flags="--cache-file=$cache_file"
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
-test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
-test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
+test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
+test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
@@ -1952,12 +1984,12 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
# Some flags need to be propagated to the compiler or linker for good
# libtool support.
-case "$host" in
+case $host in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 1959 "configure"' > conftest.$ac_ext
- if { (eval echo configure:1960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- case "`/usr/bin/file conftest.o`" in
+ echo '#line 1991 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:1992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ case `/usr/bin/file conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -32"
;;
@@ -1977,7 +2009,7 @@ case "$host" in
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:1981: checking whether the C compiler needs -belf" >&5
+echo "configure:2013: 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
@@ -1990,14 +2022,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 1994 "configure"
+#line 2026 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:2001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2033: \"$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
@@ -2107,7 +2139,6 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
# clobbered by the next message.
exec 5>>./config.log
-
@@ -2134,7 +2165,7 @@ if test "${enable_commonbfdlib+set}" = set; then
esac
fi
-build_warnings="-W -Wall"
+build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
# Check whether --enable-build-warnings or --disable-build-warnings was given.
if test "${enable_build_warnings+set}" = set; then
enableval="$enable_build_warnings"
@@ -2171,7 +2202,7 @@ fi
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2175: checking for $ac_word" >&5
+echo "configure:2206: 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
@@ -2201,7 +2232,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2205: checking for $ac_word" >&5
+echo "configure:2236: 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
@@ -2252,7 +2283,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2256: checking for $ac_word" >&5
+echo "configure:2287: 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
@@ -2284,7 +2315,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2288: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2319: 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.
@@ -2295,12 +2326,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 2299 "configure"
+#line 2330 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:2304: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2335: \"$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
@@ -2326,12 +2357,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2330: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2361: 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:2335: checking whether we are using GNU C" >&5
+echo "configure:2366: 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
@@ -2340,7 +2371,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2344: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2375: \"$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
@@ -2359,7 +2390,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2363: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2394: 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
@@ -2396,7 +2427,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2400: checking for $ac_word" >&5
+echo "configure:2431: 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
@@ -2427,7 +2458,7 @@ done
test -n "$YACC" || YACC="yacc"
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2431: checking how to run the C preprocessor" >&5
+echo "configure:2462: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -2442,13 +2473,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 2446 "configure"
+#line 2477 "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:2452: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2483: \"$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
:
@@ -2459,13 +2490,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 2463 "configure"
+#line 2494 "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:2469: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2500: \"$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
:
@@ -2476,13 +2507,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 2480 "configure"
+#line 2511 "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:2486: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2517: \"$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
:
@@ -2512,7 +2543,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2516: checking for $ac_word" >&5
+echo "configure:2547: 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
@@ -2545,7 +2576,7 @@ test -n "$LEX" || LEX="$missing_dir/missing flex"
# Extract the first word of "flex", so it can be a program name with args.
set dummy flex; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2549: checking for $ac_word" >&5
+echo "configure:2580: 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
@@ -2579,7 +2610,7 @@ then
*) ac_lib=l ;;
esac
echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
-echo "configure:2583: checking for yywrap in -l$ac_lib" >&5
+echo "configure:2614: 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
@@ -2587,7 +2618,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$ac_lib $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2591 "configure"
+#line 2622 "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
@@ -2598,7 +2629,7 @@ int main() {
yywrap()
; return 0; }
EOF
-if { (eval echo configure:2602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2633: \"$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
@@ -2621,7 +2652,7 @@ fi
fi
echo $ac_n "checking lex output file root""... $ac_c" 1>&6
-echo "configure:2625: checking lex output file root" >&5
+echo "configure:2656: 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
@@ -2642,7 +2673,7 @@ echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
-echo "configure:2646: checking whether yytext is a pointer" >&5
+echo "configure:2677: 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
@@ -2654,14 +2685,14 @@ echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
ac_save_LIBS="$LIBS"
LIBS="$LIBS $LEXLIB"
cat > conftest.$ac_ext <<EOF
-#line 2658 "configure"
+#line 2689 "configure"
#include "confdefs.h"
`cat $LEX_OUTPUT_ROOT.c`
int main() {
; return 0; }
EOF
-if { (eval echo configure:2665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2696: \"$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
@@ -2683,11 +2714,11 @@ EOF
fi
-ALL_LINGUAS=
+ALL_LINGUAS="fr tr ja es"
# 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:2691: checking for $ac_word" >&5
+echo "configure:2722: 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
@@ -2715,12 +2746,12 @@ else
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2719: checking for ANSI C header files" >&5
+echo "configure:2750: 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 2724 "configure"
+#line 2755 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -2728,7 +2759,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2732: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2763: \"$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*
@@ -2745,7 +2776,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2749 "configure"
+#line 2780 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -2763,7 +2794,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2767 "configure"
+#line 2798 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -2784,7 +2815,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 2788 "configure"
+#line 2819 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -2795,7 +2826,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:2799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -2819,12 +2850,12 @@ EOF
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2823: checking for working const" >&5
+echo "configure:2854: 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 2828 "configure"
+#line 2859 "configure"
#include "confdefs.h"
int main() {
@@ -2873,7 +2904,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:2877: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -2894,21 +2925,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:2898: checking for inline" >&5
+echo "configure:2929: 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 2905 "configure"
+#line 2936 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:2912: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2943: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -2934,12 +2965,12 @@ EOF
esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:2938: checking for off_t" >&5
+echo "configure:2969: 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 2943 "configure"
+#line 2974 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -2967,12 +2998,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:2971: checking for size_t" >&5
+echo "configure:3002: 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 2976 "configure"
+#line 3007 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -3002,19 +3033,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:3006: checking for working alloca.h" >&5
+echo "configure:3037: 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 3011 "configure"
+#line 3042 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:3018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3049: \"$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
@@ -3035,12 +3066,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:3039: checking for alloca" >&5
+echo "configure:3070: 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 3044 "configure"
+#line 3075 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -3068,7 +3099,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:3072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3103: \"$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
@@ -3100,12 +3131,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:3104: checking whether alloca needs Cray hooks" >&5
+echo "configure:3135: 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 3109 "configure"
+#line 3140 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -3130,12 +3161,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:3134: checking for $ac_func" >&5
+echo "configure:3165: 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 3139 "configure"
+#line 3170 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3158,7 +3189,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3193: \"$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
@@ -3185,7 +3216,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:3189: checking stack direction for C alloca" >&5
+echo "configure:3220: 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
@@ -3193,7 +3224,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 3197 "configure"
+#line 3228 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -3212,7 +3243,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:3216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3247: \"$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
@@ -3233,21 +3264,21 @@ EOF
fi
-for ac_hdr in unistd.h
+for ac_hdr in stdlib.h unistd.h sys/stat.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:3241: checking for $ac_hdr" >&5
+echo "configure:3272: 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 3246 "configure"
+#line 3277 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3251: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3282: \"$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*
@@ -3276,12 +3307,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3280: checking for $ac_func" >&5
+echo "configure:3311: 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 3285 "configure"
+#line 3316 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3304,7 +3335,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3339: \"$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
@@ -3329,7 +3360,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:3333: checking for working mmap" >&5
+echo "configure:3364: 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
@@ -3337,7 +3368,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 3341 "configure"
+#line 3372 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -3365,11 +3396,24 @@ else
#include <fcntl.h>
#include <sys/mman.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
/* 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
@@ -3477,7 +3521,7 @@ main()
}
EOF
-if { (eval echo configure:3481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3525: \"$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
@@ -3505,17 +3549,17 @@ unistd.h values.h sys/param.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3509: checking for $ac_hdr" >&5
+echo "configure:3553: 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 3514 "configure"
+#line 3558 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3563: \"$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*
@@ -3545,12 +3589,12 @@ done
__argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3549: checking for $ac_func" >&5
+echo "configure:3593: 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 3554 "configure"
+#line 3598 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3573,7 +3617,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3621: \"$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
@@ -3602,12 +3646,12 @@ done
for ac_func in stpcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3606: checking for $ac_func" >&5
+echo "configure:3650: 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 3611 "configure"
+#line 3655 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3630,7 +3674,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3678: \"$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
@@ -3664,19 +3708,19 @@ EOF
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:3668: checking for LC_MESSAGES" >&5
+echo "configure:3712: 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 3673 "configure"
+#line 3717 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:3680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3724: \"$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
@@ -3697,7 +3741,7 @@ EOF
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:3701: checking whether NLS is requested" >&5
+echo "configure:3745: 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"
@@ -3717,7 +3761,7 @@ fi
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:3721: checking whether included gettext is requested" >&5
+echo "configure:3765: 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"
@@ -3736,17 +3780,17 @@ fi
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:3740: checking for libintl.h" >&5
+echo "configure:3784: 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 3745 "configure"
+#line 3789 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3750: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3794: \"$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*
@@ -3763,19 +3807,19 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:3767: checking for gettext in libc" >&5
+echo "configure:3811: 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 3772 "configure"
+#line 3816 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:3779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3823: \"$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
@@ -3791,7 +3835,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
if test "$gt_cv_func_gettext_libc" != "yes"; then
echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:3795: checking for bindtextdomain in -lintl" >&5
+echo "configure:3839: 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
@@ -3799,7 +3843,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3803 "configure"
+#line 3847 "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
@@ -3810,7 +3854,7 @@ int main() {
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:3814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3858: \"$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
@@ -3826,19 +3870,19 @@ fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:3830: checking for gettext in libintl" >&5
+echo "configure:3874: 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 3835 "configure"
+#line 3879 "configure"
#include "confdefs.h"
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:3842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3886: \"$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
@@ -3866,7 +3910,7 @@ EOF
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3870: checking for $ac_word" >&5
+echo "configure:3914: 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
@@ -3900,12 +3944,12 @@ fi
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3904: checking for $ac_func" >&5
+echo "configure:3948: 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 3909 "configure"
+#line 3953 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3928,7 +3972,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3976: \"$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
@@ -3955,7 +3999,7 @@ done
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3959: checking for $ac_word" >&5
+echo "configure:4003: 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
@@ -3991,7 +4035,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3995: checking for $ac_word" >&5
+echo "configure:4039: 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
@@ -4023,7 +4067,7 @@ else
fi
cat > conftest.$ac_ext <<EOF
-#line 4027 "configure"
+#line 4071 "configure"
#include "confdefs.h"
int main() {
@@ -4031,7 +4075,7 @@ extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:4035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
CATOBJEXT=.gmo
DATADIRNAME=share
@@ -4063,7 +4107,7 @@ fi
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4067: checking for $ac_word" >&5
+echo "configure:4111: 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
@@ -4097,7 +4141,7 @@ fi
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4101: checking for $ac_word" >&5
+echo "configure:4145: 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
@@ -4133,7 +4177,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4137: checking for $ac_word" >&5
+echo "configure:4181: 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
@@ -4223,7 +4267,7 @@ fi
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:4227: checking for catalogs to be installed" >&5
+echo "configure:4271: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
@@ -4251,17 +4295,17 @@ echo "configure:4227: checking for catalogs to be installed" >&5
if test "$CATOBJEXT" = ".cat"; then
ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:4255: checking for linux/version.h" >&5
+echo "configure:4299: 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 4260 "configure"
+#line 4304 "configure"
#include "confdefs.h"
#include <linux/version.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4309: \"$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*
@@ -4306,7 +4350,7 @@ fi
l=
- if test -d $srcdir/po; then
+ if test -f $srcdir/po/POTFILES.in; then
test -d po || mkdir po
if test "x$srcdir" != "x."; then
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
@@ -4324,7 +4368,7 @@ fi
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:4328: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:4372: 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"
@@ -4349,7 +4393,7 @@ fi
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:4353: checking for executable suffix" >&5
+echo "configure:4397: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4359,10 +4403,10 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:4363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:4407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
- *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+ *.c | *.o | *.obj) ;;
*) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
esac
done
@@ -4402,7 +4446,7 @@ AR=${AR-ar}
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4406: checking for $ac_word" >&5
+echo "configure:4450: 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
@@ -4441,7 +4485,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:4445: checking for a BSD compatible install" >&5
+echo "configure:4489: 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
@@ -4508,7 +4552,7 @@ if test "x$cross_compiling" = "xno"; then
EXEEXT_FOR_BUILD='$(EXEEXT)'
else
echo $ac_n "checking for build system executable suffix""... $ac_c" 1>&6
-echo "configure:4512: checking for build system executable suffix" >&5
+echo "configure:4556: 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
@@ -4543,17 +4587,17 @@ for ac_hdr in string.h strings.h stdlib.h unistd.h fcntl.h sys/file.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4547: checking for $ac_hdr" >&5
+echo "configure:4591: 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 4552 "configure"
+#line 4596 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4557: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4601: \"$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*
@@ -4580,12 +4624,12 @@ fi
done
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:4584: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:4628: 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 4589 "configure"
+#line 4633 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
@@ -4601,7 +4645,7 @@ wait (&s);
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
-if { (eval echo configure:4605: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_sys_wait_h=yes
else
@@ -4624,19 +4668,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:4628: checking for working alloca.h" >&5
+echo "configure:4672: 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 4633 "configure"
+#line 4677 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:4640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4684: \"$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
@@ -4657,12 +4701,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:4661: checking for alloca" >&5
+echo "configure:4705: 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 4666 "configure"
+#line 4710 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -4690,7 +4734,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:4694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4738: \"$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
@@ -4722,12 +4766,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:4726: checking whether alloca needs Cray hooks" >&5
+echo "configure:4770: 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 4731 "configure"
+#line 4775 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -4752,12 +4796,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:4756: checking for $ac_func" >&5
+echo "configure:4800: 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 4761 "configure"
+#line 4805 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4780,7 +4824,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4828: \"$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
@@ -4807,7 +4851,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:4811: checking stack direction for C alloca" >&5
+echo "configure:4855: 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
@@ -4815,7 +4859,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 4819 "configure"
+#line 4863 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -4834,7 +4878,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:4838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:4882: \"$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
@@ -4855,15 +4899,15 @@ EOF
fi
-for ac_func in sbrk utimes setmode
+for ac_func in sbrk utimes setmode getc_unlocked
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4862: checking for $ac_func" >&5
+echo "configure:4906: 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 4867 "configure"
+#line 4911 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4886,7 +4930,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -4911,17 +4955,78 @@ fi
done
+# Check whether fopen64 is available and whether _LARGEFILE64_SOURCE
+# needs to be defined for it
+echo $ac_n "checking for fopen64""... $ac_c" 1>&6
+echo "configure:4962: checking for fopen64" >&5
+if eval "test \"`echo '$''{'bu_cv_have_fopen64'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 4967 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+int main() {
+FILE *f = fopen64 ("/tmp/foo","r");
+; return 0; }
+EOF
+if { (eval echo configure:4974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ bu_cv_have_fopen64=yes
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ saved_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
+ cat > conftest.$ac_ext <<EOF
+#line 4984 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+int main() {
+FILE *f = fopen64 ("/tmp/foo","r");
+; return 0; }
+EOF
+if { (eval echo configure:4991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+ rm -rf conftest*
+ bu_cv_have_fopen64="need -D_LARGEFILE64_SOURCE"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ bu_cv_have_fopen64=no
+fi
+rm -f conftest*
+ CPPFLAGS=$saved_CPPFLAGS
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$bu_cv_have_fopen64" 1>&6
+if test $bu_cv_have_fopen64 != no; then
+ cat >> confdefs.h <<\EOF
+#define HAVE_FOPEN64 1
+EOF
+
+ if test $bu_cv_have_fopen64 = "need -D_LARGEFILE64_SOURCE"; then
+ cat >> confdefs.h <<\EOF
+#define _LARGEFILE64_SOURCE 1
+EOF
+
+ fi
+fi
+
# Some systems have frexp only in -lm, not in -lc.
echo $ac_n "checking for library containing frexp""... $ac_c" 1>&6
-echo "configure:4918: checking for library containing frexp" >&5
+echo "configure:5023: 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 4925 "configure"
+#line 5030 "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
@@ -4932,7 +5037,7 @@ int main() {
frexp()
; return 0; }
EOF
-if { (eval echo configure:4936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5041: \"$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
@@ -4943,7 +5048,7 @@ rm -f conftest*
test "$ac_cv_search_frexp" = "no" && for i in m; do
LIBS="-l$i $ac_func_search_save_LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4947 "configure"
+#line 5052 "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
@@ -4954,7 +5059,7 @@ int main() {
frexp()
; return 0; }
EOF
-if { (eval echo configure:4958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5063: \"$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
@@ -4976,19 +5081,19 @@ else :
fi
echo $ac_n "checking for time_t in time.h""... $ac_c" 1>&6
-echo "configure:4980: checking for time_t in time.h" >&5
+echo "configure:5085: 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 4985 "configure"
+#line 5090 "configure"
#include "confdefs.h"
#include <time.h>
int main() {
time_t i;
; return 0; }
EOF
-if { (eval echo configure:4992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5097: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bu_cv_decl_time_t_time_h=yes
else
@@ -5009,19 +5114,19 @@ EOF
fi
echo $ac_n "checking for time_t in sys/types.h""... $ac_c" 1>&6
-echo "configure:5013: checking for time_t in sys/types.h" >&5
+echo "configure:5118: 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 5018 "configure"
+#line 5123 "configure"
#include "confdefs.h"
#include <sys/types.h>
int main() {
time_t i;
; return 0; }
EOF
-if { (eval echo configure:5025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5130: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bu_cv_decl_time_t_types_h=yes
else
@@ -5044,12 +5149,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:5048: checking for utime.h" >&5
+echo "configure:5153: 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 5053 "configure"
+#line 5158 "configure"
#include "confdefs.h"
#include <sys/types.h>
#ifdef HAVE_TIME_H
@@ -5060,7 +5165,7 @@ int main() {
struct utimbuf s;
; return 0; }
EOF
-if { (eval echo configure:5064: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bu_cv_header_utime_h=yes
else
@@ -5081,12 +5186,12 @@ EOF
fi
echo $ac_n "checking whether fprintf must be declared""... $ac_c" 1>&6
-echo "configure:5085: checking whether fprintf must be declared" >&5
+echo "configure:5190: 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 5090 "configure"
+#line 5195 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -5107,7 +5212,7 @@ int main() {
char *(*pfn) = (char *(*)) fprintf
; return 0; }
EOF
-if { (eval echo configure:5111: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_fprintf=no
else
@@ -5128,12 +5233,12 @@ EOF
fi
echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:5132: checking whether strstr must be declared" >&5
+echo "configure:5237: 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 5137 "configure"
+#line 5242 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -5154,7 +5259,7 @@ int main() {
char *(*pfn) = (char *(*)) strstr
; return 0; }
EOF
-if { (eval echo configure:5158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strstr=no
else
@@ -5175,12 +5280,12 @@ EOF
fi
echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6
-echo "configure:5179: checking whether sbrk must be declared" >&5
+echo "configure:5284: 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 5184 "configure"
+#line 5289 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -5201,7 +5306,7 @@ int main() {
char *(*pfn) = (char *(*)) sbrk
; return 0; }
EOF
-if { (eval echo configure:5205: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_sbrk=no
else
@@ -5222,12 +5327,12 @@ EOF
fi
echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
-echo "configure:5226: checking whether getenv must be declared" >&5
+echo "configure:5331: 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 5231 "configure"
+#line 5336 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -5248,7 +5353,7 @@ int main() {
char *(*pfn) = (char *(*)) getenv
; return 0; }
EOF
-if { (eval echo configure:5252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_getenv=no
else
@@ -5269,12 +5374,12 @@ EOF
fi
echo $ac_n "checking whether environ must be declared""... $ac_c" 1>&6
-echo "configure:5273: checking whether environ must be declared" >&5
+echo "configure:5378: 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 5278 "configure"
+#line 5383 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -5295,7 +5400,7 @@ int main() {
char *(*pfn) = (char *(*)) environ
; return 0; }
EOF
-if { (eval echo configure:5299: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:5404: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_environ=no
else
@@ -5438,6 +5543,10 @@ do
fi
done
+if test "${with_windres+set}" = set; then
+ BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+fi
+
@@ -5563,7 +5672,7 @@ done
ac_given_srcdir=$srcdir
ac_given_INSTALL="$INSTALL"
-trap 'rm -fr `echo "Makefile po/Makefile.in:po/Make-in config.h:config.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+trap 'rm -fr `echo "Makefile doc/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
@@ -5610,7 +5719,6 @@ s%@build_alias@%$build_alias%g
s%@build_cpu@%$build_cpu%g
s%@build_vendor@%$build_vendor%g
s%@build_os@%$build_os%g
-s%@CC@%$CC%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
@@ -5622,6 +5730,7 @@ s%@AUTOMAKE@%$AUTOMAKE%g
s%@AUTOHEADER@%$AUTOHEADER%g
s%@MAKEINFO@%$MAKEINFO%g
s%@SET_MAKE@%$SET_MAKE%g
+s%@CC@%$CC%g
s%@LN_S@%$LN_S%g
s%@OBJEXT@%$OBJEXT%g
s%@EXEEXT@%$EXEEXT%g
@@ -5714,7 +5823,7 @@ EOF
cat >> $CONFIG_STATUS <<EOF
-CONFIG_FILES=\${CONFIG_FILES-"Makefile po/Makefile.in:po/Make-in"}
+CONFIG_FILES=\${CONFIG_FILES-"Makefile doc/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
diff --git a/contrib/binutils/binutils/configure.in b/contrib/binutils/binutils/configure.in
index e2fed82..42381bb 100644
--- a/contrib/binutils/binutils/configure.in
+++ b/contrib/binutils/binutils/configure.in
@@ -29,7 +29,7 @@ AC_ARG_ENABLE(commonbfdlib,
*) AC_MSG_ERROR([bad value ${enableval} for BFD commonbfdlib option]) ;;
esac])dnl
-build_warnings="-W -Wall"
+build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
AC_ARG_ENABLE(build-warnings,
[ --enable-build-warnings Enable build-time compiler warnings if gcc is used],
[case "${enableval}" in
@@ -64,7 +64,7 @@ AC_PROG_CC
AC_PROG_YACC
AM_PROG_LEX
-ALL_LINGUAS=
+ALL_LINGUAS="fr tr ja es"
CY_GNU_GETTEXT
AM_MAINTAINER_MODE
@@ -100,7 +100,29 @@ 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 setmode)
+AC_CHECK_FUNCS(sbrk utimes setmode getc_unlocked)
+
+# Check whether fopen64 is available and whether _LARGEFILE64_SOURCE
+# needs to be defined for it
+AC_MSG_CHECKING([for fopen64])
+AC_CACHE_VAL(bu_cv_have_fopen64,
+[AC_TRY_LINK([#include <stdio.h>], [FILE *f = fopen64 ("/tmp/foo","r");],
+bu_cv_have_fopen64=yes,
+[saved_CPPFLAGS=$CPPFLAGS
+ CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE"
+ AC_TRY_LINK([#include <stdio.h>], [FILE *f = fopen64 ("/tmp/foo","r");],
+bu_cv_have_fopen64="need -D_LARGEFILE64_SOURCE",
+bu_cv_have_fopen64=no)
+ CPPFLAGS=$saved_CPPFLAGS])])
+AC_MSG_RESULT($bu_cv_have_fopen64)
+if test $bu_cv_have_fopen64 != no; then
+ AC_DEFINE([HAVE_FOPEN64], 1,
+ [Is fopen64 available?])
+ if test $bu_cv_have_fopen64 = "need -D_LARGEFILE64_SOURCE"; then
+ AC_DEFINE([_LARGEFILE64_SOURCE], 1,
+ [Enable LFS])
+ fi
+fi
# Some systems have frexp only in -lm, not in -lc.
AC_SEARCH_LIBS(frexp, m)
@@ -266,6 +288,10 @@ changequote([,])dnl
fi
done
+if test "${with_windres+set}" = set; then
+ BUILD_WINDRES='$(WINDRES_PROG)$(EXEEXT)'
+fi
+
AC_SUBST(NLMCONV_DEFS)
AC_SUBST(BUILD_NLMCONV)
AC_SUBST(BUILD_SRCONV)
@@ -287,7 +313,7 @@ else
fi
AC_SUBST(UNDERSCORE)
-AC_OUTPUT(Makefile po/Makefile.in:po/Make-in,
+AC_OUTPUT(Makefile doc/Makefile po/Makefile.in:po/Make-in,
[
case "x$CONFIG_FILES" in
*) sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile ;;
diff --git a/contrib/binutils/binutils/defparse.y b/contrib/binutils/binutils/defparse.y
index 7e13965..d0bccd9 100644
--- a/contrib/binutils/binutils/defparse.y
+++ b/contrib/binutils/binutils/defparse.y
@@ -149,6 +149,12 @@ opt_ordinal:
opt_equal_name:
'=' ID { $$ = $2; }
+ | '=' ID '.' ID
+ {
+ char *name = xmalloc (strlen ($2) + 1 + strlen ($4) + 1);
+ sprintf (name, "%s.%s", $2, $4);
+ $$ = name;
+ }
| { $$ = 0; }
;
diff --git a/contrib/binutils/binutils/dlltool.c b/contrib/binutils/binutils/dlltool.c
index 9475b98..a3c52c5 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 1995, 1996, 1997, 1998, 1999, 2000
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -48,9 +48,13 @@
LIBRARY <name> [ , <base> ]
The result is going to be <name>.DLL
- EXPORTS ( <name1> [ = <name2> ] [ @ <integer> ] [ NONAME ] [CONSTANT] [DATA] ) *
+ EXPORTS ( ( ( <name1> [ = <name2> ] )
+ | ( <name1> = <module-name> . <external-name>))
+ [ @ <integer> ] [ NONAME ] [CONSTANT] [DATA] ) *
Declares name1 as an exported symbol from the
- DLL, with optional ordinal number <integer>
+ DLL, with optional ordinal number <integer>.
+ Or declares name1 as an alias (forward) of the function <external-name>
+ in the DLL <module-name>.
IMPORTS ( ( <internal-name> = <module-name> . <integer> )
| ( [ <internal-name> = ] <module-name> . <external-name> )) *
@@ -249,8 +253,8 @@
#include "demangle.h"
#include "dyn-string.h"
#include "dlltool.h"
+#include "safe-ctype.h"
-#include <ctype.h>
#include <time.h>
#include <sys/stat.h>
@@ -363,7 +367,7 @@ static boolean export_all_symbols;
/* True if we should exclude the symbols in DEFAULT_EXCLUDES when
exporting all symbols. */
-static boolean do_default_excludes;
+static boolean do_default_excludes=true;
/* Default symbols to exclude when exporting all the symbols. */
static const char *default_excludes = "DllMain@12,DllEntryPoint@0,impure_ptr";
@@ -636,6 +640,7 @@ typedef struct export
int noname;
int data;
int hint;
+ int forward; /* number of forward label, 0 means no forward */
struct export *next;
}
export_type;
@@ -848,6 +853,7 @@ static export_type *d_exports; /*list of exported functions */
static export_type **d_exports_lexically; /* vector of exported functions in alpha order */
static dlist_type *d_list; /* Descriptions */
static dlist_type *a_list; /* Stuff to go in directives */
+static int d_nforwards = 0; /* Number of forwarded exports */
static int d_is_dll;
static int d_is_exe;
@@ -882,6 +888,12 @@ def_exports (name, internal_name, ordinal, noname, constant, data)
p->next = d_exports;
d_exports = p;
d_nfuncs++;
+
+ if ((internal_name != NULL)
+ && (strchr (internal_name, '.') != NULL))
+ p->forward = ++d_nforwards;
+ else
+ p->forward = 0; /* no forward */
}
void
@@ -1819,9 +1831,14 @@ gen_exp_file ()
i++;
}
}
- 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);
+
+ if (exp->forward == 0)
+ 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);
+ else
+ fprintf (f, "\t%sf%d%s\t%s %d\n", ASM_RVA_BEFORE,
+ exp->forward, ASM_RVA_AFTER, ASM_C, exp->ordinal);
i++;
}
@@ -1846,8 +1863,13 @@ 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 (exp->forward != 0)
+ fprintf (f, "f%d: %s \"%s\"\n",
+ exp->forward, ASM_TEXT, exp->internal_name);
+ }
if (a_list)
{
@@ -2054,16 +2076,22 @@ typedef struct
#define NSECS 7
-#define INIT_SEC_DATA(id, name, flags, align) { id, name, flags, align, NULL, NULL, NULL, 0, NULL }
+#define TEXT_SEC_FLAGS \
+ (SEC_ALLOC | SEC_LOAD | SEC_CODE | SEC_READONLY | SEC_HAS_CONTENTS)
+#define DATA_SEC_FLAGS (SEC_ALLOC | SEC_LOAD | SEC_DATA)
+#define BSS_SEC_FLAGS SEC_ALLOC
+
+#define INIT_SEC_DATA(id, name, flags, align) \
+ { id, name, flags, align, NULL, NULL, NULL, 0, NULL }
static sinfo secdata[NSECS] =
{
- 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)
+ INIT_SEC_DATA (TEXT, ".text", TEXT_SEC_FLAGS, 2),
+ INIT_SEC_DATA (DATA, ".data", DATA_SEC_FLAGS, 2),
+ INIT_SEC_DATA (BSS, ".bss", BSS_SEC_FLAGS, 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
@@ -2209,7 +2237,7 @@ make_one_lib_file (exp, i)
{
bfd * abfd;
asymbol * exp_label;
- asymbol * iname;
+ asymbol * iname = 0;
asymbol * iname2;
asymbol * iname_lab;
asymbol ** iname_lab_pp;
@@ -2223,6 +2251,7 @@ make_one_lib_file (exp, i)
#define EXTRA 0
#endif
asymbol * ptrs[NSECS + 4 + EXTRA + 1];
+ flagword applicable;
char * outname = xmalloc (10);
int oidx = 0;
@@ -2247,6 +2276,8 @@ make_one_lib_file (exp, i)
bfd_set_private_flags (abfd, F_INTERWORK);
#endif
+ applicable = bfd_applicable_section_flags (abfd);
+
/* First make symbols for the sections */
for (i = 0; i < NSECS; i++)
{
@@ -2256,7 +2287,7 @@ make_one_lib_file (exp, i)
si->sec = bfd_make_section_old_way (abfd, si->name);
bfd_set_section_flags (abfd,
si->sec,
- si->flags);
+ si->flags & applicable);
bfd_set_section_alignment(abfd, si->sec, si->align);
si->sec->output_section = si->sec;
@@ -3104,7 +3135,7 @@ usage (file, status)
int status;
{
/* xgetext:c-format */
- fprintf (file, _("Usage %s <options> <object-files>\n"), program_name);
+ fprintf (file, _("Usage %s <option(s)> <object-file(s)>\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"));
@@ -3189,14 +3220,17 @@ main (ac, av)
#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
setlocale (LC_MESSAGES, "");
#endif
+#if defined (HAVE_SETLOCALE)
+ setlocale (LC_CTYPE, "");
+#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:",
+ "m:e:l:aD:d:z:b:xcCuUkAS:f:nvVHhM:L:F:",
#else
- "m:e:l:aD:d:z:b:xcCuUkAS:f:nvVh",
+ "m:e:l:aD:d:z:b:xcCuUkAS:f:nvVHh",
#endif
long_options, 0))
!= EOF)
@@ -3246,6 +3280,7 @@ main (ac, av)
case 'e':
exp_name = optarg;
break;
+ case 'H':
case 'h':
usage (stdout, 0);
break;
@@ -3355,7 +3390,7 @@ main (ac, av)
imp_name_lab = xstrdup (imp_name);
for (p = imp_name_lab; *p; p++)
{
- if (!isalpha ((unsigned char) *p) && !isdigit ((unsigned char) *p))
+ if (!ISALNUM (*p))
*p = '_';
}
head_label = make_label("_head_", imp_name_lab);
diff --git a/contrib/binutils/binutils/dllwrap.c b/contrib/binutils/binutils/dllwrap.c
index 8f83dda..f8449a8 100644
--- a/contrib/binutils/binutils/dllwrap.c
+++ b/contrib/binutils/binutils/dllwrap.c
@@ -1,5 +1,5 @@
/* dllwrap.c -- wrapper for DLLTOOL and GCC to generate PE style DLLs
- Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Contributed by Mumit Khan (khan@xraylith.wisc.edu).
This file is part of GNU Binutils.
@@ -36,7 +36,6 @@
#include "getopt.h"
#include "dyn-string.h"
-#include <ctype.h>
#include <time.h>
#include <sys/stat.h>
@@ -517,7 +516,7 @@ usage (file, status)
FILE *file;
int status;
{
- fprintf (file, _("Usage %s <options> <object-files>\n"), program_name);
+ fprintf (file, _("Usage %s <option(s)> <object-file(s)>\n"), program_name);
fprintf (file, _(" Generic options:\n"));
fprintf (file, _(" --quiet, -q Work quietly\n"));
fprintf (file, _(" --verbose, -v Verbose\n"));
@@ -664,6 +663,15 @@ main (argc, argv)
program_name = argv[0];
+#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
+ setlocale (LC_MESSAGES, "");
+#endif
+#if defined (HAVE_SETLOCALE)
+ setlocale (LC_CTYPE, "");
+#endif
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
+
saved_argv = (char **) xmalloc (argc * sizeof (char*));
dlltool_arg_indices = (int *) xmalloc (argc * sizeof (int));
driver_arg_indices = (int *) xmalloc (argc * sizeof (int));
@@ -841,8 +849,8 @@ main (argc, argv)
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"));
+ warn (_("no export definition file provided.\n\
+Creating one, but that may not be what you want"));
}
/* set the target platform. */
diff --git a/contrib/binutils/binutils/doc/Makefile.am b/contrib/binutils/binutils/doc/Makefile.am
new file mode 100644
index 0000000..8fc8c08
--- /dev/null
+++ b/contrib/binutils/binutils/doc/Makefile.am
@@ -0,0 +1,161 @@
+## Process this file with automake to generate Makefile.in
+
+AUTOMAKE_OPTIONS = cygnus
+
+# What version of the manual you want; "all" includes everything
+CONFIG=all
+
+# Options to extract the man page from as.texinfo
+MANCONF = -Dman
+
+TEXI2POD = perl $(top_srcdir)/../etc/texi2pod.pl
+
+POD2MAN = pod2man --center="GNU Development Tools" \
+ --release="binutils-$(VERSION)" --section=1
+
+# List of man pages generated from binutils.texi
+man_MANS = \
+ addr2line.1 \
+ ar.1 \
+ dlltool.1 \
+ nlmconv.1 \
+ nm.1 \
+ objcopy.1 \
+ objdump.1 \
+ ranlib.1 \
+ readelf.1 \
+ size.1 \
+ strings.1 \
+ strip.1 \
+ windres.1 \
+ $(DEMANGLER_NAME).1
+
+info_TEXINFOS = binutils.texi
+
+config.texi: Makefile
+ rm -f config.texi
+ echo '@set VERSION $(VERSION)' > config.texi
+
+binutils_TEXI = $(srcdir)/binutils.texi
+
+binutils.dvi: $(binutils_TEXI) config.texi
+
+binutils.info: $(binutils_TEXI) config.texi
+
+# Man page generation from texinfo
+addr2line.1: $(binutils_TEXI)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Daddr2line < $< > addr2line.pod
+ -($(POD2MAN) addr2line.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f addr2line.pod
+
+ar.1: $(binutils_TEXI)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Dar < $< > ar.pod
+ -($(POD2MAN) ar.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f ar.pod
+
+dlltool.1: $(binutils_TEXI)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Ddlltool < $< > dlltool.pod
+ -($(POD2MAN) dlltool.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f dlltool.pod
+
+nlmconv.1: $(binutils_TEXI)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Dnlmconv < $< > nlmconv.pod
+ -($(POD2MAN) nlmconv.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f nlmconv.pod
+
+nm.1: $(binutils_TEXI)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Dnm < $< > nm.pod
+ -($(POD2MAN) nm.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f nm.pod
+
+objcopy.1: $(binutils_TEXI)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Dobjcopy < $< > objcopy.pod
+ -($(POD2MAN) objcopy.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f objcopy.pod
+
+objdump.1: $(binutils_TEXI)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Dobjdump < $< > objdump.pod
+ -($(POD2MAN) objdump.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f objdump.pod
+
+ranlib.1: $(binutils_TEXI)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Dranlib < $< > ranlib.pod
+ -($(POD2MAN) ranlib.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f ranlib.pod
+
+readelf.1: $(binutils_TEXI)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Dreadelf < $< > readelf.pod
+ -($(POD2MAN) readelf.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f readelf.pod
+
+size.1: $(binutils_TEXI)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Dsize < $< > size.pod
+ -($(POD2MAN) size.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f size.pod
+
+strings.1: $(binutils_TEXI)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Dstrings < $< > strings.pod
+ -($(POD2MAN) strings.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f strings.pod
+
+strip.1: $(binutils_TEXI)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Dstrip < $< > strip.pod
+ -($(POD2MAN) strip.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f strip.pod
+
+windres.1: $(binutils_TEXI)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Dwindres < $< > windres.pod
+ -($(POD2MAN) windres.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f windres.pod
+
+cxxfilt.man: $(binutils_TEXI)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Dcxxfilt < $< > $(DEMANGLER_NAME).pod
+ -($(POD2MAN) $(DEMANGLER_NAME).pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f $(DEMANGLER_NAME).pod
+
+MAINTAINERCLEANFILES = config.texi
+DISTCLEANFILES = config.texi
+MOSTLYCLEANFILES = $(DEMANGLER_NAME).1
+
+$(DEMANGLER_NAME).1: cxxfilt.man Makefile
+ if test -f cxxfilt.man; then \
+ man=cxxfilt.man; \
+ else \
+ man=$(srcdir)/cxxfilt.man; \
+ fi; \
+ sed -e 's/@PROGRAM@/$(DEMANGLER_NAME)/' \
+ -e 's/cxxfilt/$(DEMANGLER_NAME)/' < $$man \
+ > $(DEMANGLER_NAME).1
+
+# Maintenance
+
+# We need it for the taz target in ../../Makefile.in.
+info: $(MANS)
diff --git a/contrib/binutils/binutils/doc/Makefile.in b/contrib/binutils/binutils/doc/Makefile.in
new file mode 100644
index 0000000..ec18241
--- /dev/null
+++ b/contrib/binutils/binutils/doc/Makefile.in
@@ -0,0 +1,557 @@
+# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_alias = @build_alias@
+build_triplet = @build@
+host_alias = @host_alias@
+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@
+CC_FOR_BUILD = @CC_FOR_BUILD@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+DATADIRNAME = @DATADIRNAME@
+DEMANGLER_NAME = @DEMANGLER_NAME@
+DLLTOOL = @DLLTOOL@
+DLLTOOL_DEFS = @DLLTOOL_DEFS@
+EXEEXT = @EXEEXT@
+EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@
+GCJ = @GCJ@
+GCJFLAGS = @GCJFLAGS@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GT_NO = @GT_NO@
+GT_YES = @GT_YES@
+HDEFINES = @HDEFINES@
+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@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+NLMCONV_DEFS = @NLMCONV_DEFS@
+OBJDUMP = @OBJDUMP@
+OBJDUMP_DEFS = @OBJDUMP_DEFS@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+POFILES = @POFILES@
+POSUB = @POSUB@
+RANLIB = @RANLIB@
+STRIP = @STRIP@
+UNDERSCORE = @UNDERSCORE@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+WARN_CFLAGS = @WARN_CFLAGS@
+YACC = @YACC@
+l = @l@
+
+AUTOMAKE_OPTIONS = cygnus
+
+# What version of the manual you want; "all" includes everything
+CONFIG = all
+
+# Options to extract the man page from as.texinfo
+MANCONF = -Dman
+
+TEXI2POD = perl $(top_srcdir)/../etc/texi2pod.pl
+
+POD2MAN = pod2man --center="GNU Development Tools" \
+ --release="binutils-$(VERSION)" --section=1
+
+
+# List of man pages generated from binutils.texi
+man_MANS = \
+ addr2line.1 \
+ ar.1 \
+ dlltool.1 \
+ nlmconv.1 \
+ nm.1 \
+ objcopy.1 \
+ objdump.1 \
+ ranlib.1 \
+ readelf.1 \
+ size.1 \
+ strings.1 \
+ strip.1 \
+ windres.1 \
+ $(DEMANGLER_NAME).1
+
+
+info_TEXINFOS = binutils.texi
+
+binutils_TEXI = $(srcdir)/binutils.texi
+
+MAINTAINERCLEANFILES = config.texi
+DISTCLEANFILES = config.texi
+MOSTLYCLEANFILES = $(DEMANGLER_NAME).1
+mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES =
+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
+man1dir = $(mandir)/man1
+MANS = $(man_MANS)
+
+NROFF = nroff
+DIST_COMMON = Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+.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
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+binutils.info: binutils.texi
+binutils.dvi: binutils.texi
+
+
+DVIPS = dvips
+
+.texi.info:
+ @rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ $(MAKEINFO) -I $(srcdir) $<
+
+.texi.dvi:
+ TEXINPUTS=$(top_srcdir)/../texinfo/texinfo.tex:$$TEXINPUTS \
+ MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
+
+.texi:
+ @rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ $(MAKEINFO) -I $(srcdir) $<
+
+.texinfo.info:
+ @rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ $(MAKEINFO) -I $(srcdir) $<
+
+.texinfo:
+ @rm -f $@ $@-[0-9] $@-[0-9][0-9]
+ $(MAKEINFO) -I $(srcdir) $<
+
+.texinfo.dvi:
+ 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) $(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 $(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 \
+ 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
+
+uninstall-info:
+ $(PRE_UNINSTALL)
+ @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
+ ii=yes; \
+ else ii=; fi; \
+ list='$(INFO_DEPS)'; \
+ for file in $$list; do \
+ test -z "$$ii" \
+ || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \
+ done
+ @$(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)
+ 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 \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file; \
+ done; \
+ done
+
+mostlyclean-aminfo:
+ -rm -f binutils.aux binutils.cp binutils.cps binutils.dvi binutils.fn \
+ binutils.fns binutils.ky binutils.kys binutils.ps \
+ binutils.log binutils.pg binutils.toc binutils.tp \
+ binutils.tps binutils.vr binutils.vrs binutils.op binutils.tr \
+ binutils.cv binutils.cn
+
+clean-aminfo:
+
+distclean-aminfo:
+
+maintainer-clean-aminfo:
+ for i in $(INFO_DEPS); do \
+ rm -f $$i; \
+ if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \
+ rm -f $$i-[0-9]*; \
+ fi; \
+ done
+clean-info: mostlyclean-aminfo
+
+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:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = doc
+
+distdir: $(DISTFILES)
+ @for file in $(DISTFILES); do \
+ if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ cp -pr $$d/$$file $(distdir)/$$file; \
+ else \
+ test -f $(distdir)/$$file \
+ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+ || cp -p $$d/$$file $(distdir)/$$file || :; \
+ fi; \
+ done
+ $(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-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) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+ $(mkinstalldirs) $(DESTDIR)$(mandir)/man1
+
+
+mostlyclean-generic:
+ -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
+
+clean-generic:
+
+distclean-generic:
+ -rm -f Makefile $(CONFIG_CLEAN_FILES)
+ -rm -f config.cache config.log stamp-h stamp-h[0-9]*
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+mostlyclean-am: mostlyclean-aminfo mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am: clean-aminfo clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am: distclean-aminfo distclean-generic clean-am
+ -rm -f libtool
+
+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."
+
+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
+
+
+config.texi: Makefile
+ rm -f config.texi
+ echo '@set VERSION $(VERSION)' > config.texi
+
+binutils.dvi: $(binutils_TEXI) config.texi
+
+binutils.info: $(binutils_TEXI) config.texi
+
+# Man page generation from texinfo
+addr2line.1: $(binutils_TEXI)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Daddr2line < $< > addr2line.pod
+ -($(POD2MAN) addr2line.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f addr2line.pod
+
+ar.1: $(binutils_TEXI)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Dar < $< > ar.pod
+ -($(POD2MAN) ar.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f ar.pod
+
+dlltool.1: $(binutils_TEXI)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Ddlltool < $< > dlltool.pod
+ -($(POD2MAN) dlltool.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f dlltool.pod
+
+nlmconv.1: $(binutils_TEXI)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Dnlmconv < $< > nlmconv.pod
+ -($(POD2MAN) nlmconv.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f nlmconv.pod
+
+nm.1: $(binutils_TEXI)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Dnm < $< > nm.pod
+ -($(POD2MAN) nm.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f nm.pod
+
+objcopy.1: $(binutils_TEXI)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Dobjcopy < $< > objcopy.pod
+ -($(POD2MAN) objcopy.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f objcopy.pod
+
+objdump.1: $(binutils_TEXI)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Dobjdump < $< > objdump.pod
+ -($(POD2MAN) objdump.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f objdump.pod
+
+ranlib.1: $(binutils_TEXI)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Dranlib < $< > ranlib.pod
+ -($(POD2MAN) ranlib.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f ranlib.pod
+
+readelf.1: $(binutils_TEXI)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Dreadelf < $< > readelf.pod
+ -($(POD2MAN) readelf.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f readelf.pod
+
+size.1: $(binutils_TEXI)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Dsize < $< > size.pod
+ -($(POD2MAN) size.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f size.pod
+
+strings.1: $(binutils_TEXI)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Dstrings < $< > strings.pod
+ -($(POD2MAN) strings.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f strings.pod
+
+strip.1: $(binutils_TEXI)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Dstrip < $< > strip.pod
+ -($(POD2MAN) strip.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f strip.pod
+
+windres.1: $(binutils_TEXI)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Dwindres < $< > windres.pod
+ -($(POD2MAN) windres.pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f windres.pod
+
+cxxfilt.man: $(binutils_TEXI)
+ touch $@
+ -$(TEXI2POD) $(MANCONF) -Dcxxfilt < $< > $(DEMANGLER_NAME).pod
+ -($(POD2MAN) $(DEMANGLER_NAME).pod | sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || (rm -f $@.T$$$$ && exit 1)
+ rm -f $(DEMANGLER_NAME).pod
+
+$(DEMANGLER_NAME).1: cxxfilt.man Makefile
+ if test -f cxxfilt.man; then \
+ man=cxxfilt.man; \
+ else \
+ man=$(srcdir)/cxxfilt.man; \
+ fi; \
+ sed -e 's/@PROGRAM@/$(DEMANGLER_NAME)/' \
+ -e 's/cxxfilt/$(DEMANGLER_NAME)/' < $$man \
+ > $(DEMANGLER_NAME).1
+
+# Maintenance
+
+# We need it for the taz target in ../../Makefile.in.
+info: $(MANS)
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/contrib/binutils/binutils/doc/binutils.texi b/contrib/binutils/binutils/doc/binutils.texi
new file mode 100644
index 0000000..6fb185b
--- /dev/null
+++ b/contrib/binutils/binutils/doc/binutils.texi
@@ -0,0 +1,3832 @@
+\input texinfo @c -*- Texinfo -*-
+@setfilename binutils.info
+@c Copyright 2001, 2002 Free Software Foundation, Inc.
+
+@include config.texi
+
+@ifinfo
+@format
+START-INFO-DIR-ENTRY
+* 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
+@c man begin COPYRIGHT
+Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.1
+or any later version published by the Free Software Foundation;
+with no Invariant Sections, with no Front-Cover Texts, and with no
+Back-Cover Texts. A copy of the license is included in the
+section entitled "GNU Free Documentation License".
+
+@c man end
+@ignore
+Permission is granted to process this file through TeX and print the
+results, provided the printed document carries a 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 ifinfo
+
+@synindex ky cp
+@c
+@c This file documents the GNU binary utilities "ar", "ld", "objcopy",
+@c "objdump", "nm", "size", "strings", "strip", "readelf" and "ranlib".
+@c
+@c Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001, 2002 Free Software Foundation, Inc.
+@c
+@c This text may be freely distributed under the terms of the GNU
+@c Free Documentation License.
+@c
+
+@setchapternewpage odd
+@settitle @sc{gnu} Binary Utilities
+@titlepage
+@finalout
+@title The @sc{gnu} Binary Utilities
+@subtitle Version @value{VERSION}
+@sp 1
+@subtitle May 1993
+@author Roland H. Pesch
+@author Jeffrey M. Osier
+@author Cygnus Support
+@page
+
+@tex
+{\parskip=0pt \hfill Cygnus Support\par \hfill
+\TeX{}info \texinfoversion\par }
+@end tex
+
+@vskip 0pt plus 1filll
+Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1
+ or any later version published by the Free Software Foundation;
+ with no Invariant Sections, with no Front-Cover Texts, and with no
+ Back-Cover Texts. A copy of the license is included in the
+ section entitled "GNU Free Documentation License".
+
+@end titlepage
+
+@node Top
+@top Introduction
+
+@cindex version
+This brief manual contains preliminary documentation for the @sc{gnu} binary
+utilities (collectively version @value{VERSION}):
+
+@iftex
+@table @code
+@item ar
+Create, modify, and extract from archives
+
+@item nm
+List symbols from object files
+
+@item objcopy
+Copy and translate object files
+
+@item objdump
+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
+
+@item strings
+List printable strings from files
+
+@item strip
+Discard symbols
+
+@item c++filt
+Demangle encoded C++ symbols (on MS-DOS, this program is named
+@code{cxxfilt})
+
+@item addr2line
+Convert addresses into file names and line numbers
+
+@item nlmconv
+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
+
+This document is distributed under the terms of the GNU Free
+Documentation License. A copy of the license is included in the
+section entitled "GNU Free Documentation License".
+
+@menu
+* ar:: Create, modify, and extract from archives
+* nm:: List symbols from object files
+* 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
+* GNU Free Documentation License:: GNU Free Documentation License
+* Index:: Index
+@end menu
+
+@node ar
+@chapter ar
+
+@kindex ar
+@cindex archives
+@cindex collections of files
+
+@c man title ar create, modify, and extract from archives
+
+@smallexample
+ar [-]@var{p}[@var{mod} [@var{relpos}] [@var{count}]] @var{archive} [@var{member}@dots{}]
+ar -M [ <mri-script ]
+@end smallexample
+
+@c man begin DESCRIPTION ar
+
+The @sc{gnu} @command{ar} program creates, modifies, and extracts from
+archives. An @dfn{archive} is a single file holding a collection of
+other files in a structure that makes it possible to retrieve
+the original individual files (called @dfn{members} of the archive).
+
+The original files' contents, mode (permissions), timestamp, owner, and
+group are preserved in the archive, and can be restored on
+extraction.
+
+@cindex name length
+@sc{gnu} @command{ar} can maintain archives whose members have names of any
+length; however, depending on how @command{ar} is configured on your
+system, a limit on member-name length may be imposed for compatibility
+with archive formats maintained with other tools. If it exists, the
+limit is often 15 characters (typical of formats related to a.out) or 16
+characters (typical of formats related to coff).
+
+@cindex libraries
+@command{ar} is considered a binary utility because archives of this sort
+are most often used as @dfn{libraries} holding commonly needed
+subroutines.
+
+@cindex symbol index
+@command{ar} creates an index to the symbols defined in relocatable
+object modules in the archive when you specify the modifier @samp{s}.
+Once created, this index is updated in the archive whenever @command{ar}
+makes a change to its contents (save for the @samp{q} update operation).
+An archive with such an index speeds up linking to the library, and
+allows routines in the library to call each other without regard to
+their placement in the archive.
+
+You may use @samp{nm -s} or @samp{nm --print-armap} to list this index
+table. If an archive lacks the table, another form of @command{ar} called
+@command{ranlib} can be used to add just the table.
+
+@cindex compatibility, @command{ar}
+@cindex @command{ar} compatibility
+@sc{gnu} @command{ar} is designed to be compatible with two different
+facilities. You can control its activity using command-line options,
+like the different varieties of @command{ar} on Unix systems; or, if you
+specify the single command-line option @option{-M}, you can control it
+with a script supplied via standard input, like the MRI ``librarian''
+program.
+
+@c man end
+
+@menu
+* ar cmdline:: Controlling @command{ar} on the command line
+* ar scripts:: Controlling @command{ar} with a script
+@end menu
+
+@page
+@node ar cmdline
+@section Controlling @command{ar} on the command line
+
+@smallexample
+@c man begin SYNOPSIS ar
+ar [@option{-X32_64}] [@option{-}]@var{p}[@var{mod} [@var{relpos}] [@var{count}]] @var{archive} [@var{member}@dots{}]
+@c man end
+@end smallexample
+
+@cindex Unix compatibility, @command{ar}
+When you use @command{ar} in the Unix style, @command{ar} insists on at least two
+arguments to execute: one keyletter specifying the @emph{operation}
+(optionally accompanied by other keyletters specifying
+@emph{modifiers}), and the archive name to act on.
+
+Most operations can also accept further @var{member} arguments,
+specifying particular files to operate on.
+
+@c man begin OPTIONS ar
+
+@sc{gnu} @command{ar} allows you to mix the operation code @var{p} and modifier
+flags @var{mod} in any order, within the first command-line argument.
+
+If you wish, you may begin the first command-line argument with a
+dash.
+
+@cindex operations on archive
+The @var{p} keyletter specifies what operation to execute; it may be
+any of the following, but you must specify only one of them:
+
+@table @samp
+@item d
+@cindex deleting from archive
+@emph{Delete} modules from the archive. Specify the names of modules to
+be deleted as @var{member}@dots{}; the archive is untouched if you
+specify no files to delete.
+
+If you specify the @samp{v} modifier, @command{ar} lists each module
+as it is deleted.
+
+@item m
+@cindex moving in archive
+Use this operation to @emph{move} members in an archive.
+
+The ordering of members in an archive can make a difference in how
+programs are linked using the library, if a symbol is defined in more
+than one member.
+
+If no modifiers are used with @code{m}, any members you name in the
+@var{member} arguments are moved to the @emph{end} of the archive;
+you can use the @samp{a}, @samp{b}, or @samp{i} modifiers to move them to a
+specified place instead.
+
+@item p
+@cindex printing from archive
+@emph{Print} the specified members of the archive, to the standard
+output file. If the @samp{v} modifier is specified, show the member
+name before copying its contents to standard output.
+
+If you specify no @var{member} arguments, all the files in the archive are
+printed.
+
+@item q
+@cindex quick append to archive
+@emph{Quick append}; Historically, add the files @var{member}@dots{} to the end of
+@var{archive}, without checking for replacement.
+
+The modifiers @samp{a}, @samp{b}, and @samp{i} do @emph{not} affect this
+operation; new members are always placed at the end of the archive.
+
+The modifier @samp{v} makes @command{ar} list each file as it is appended.
+
+Since the point of this operation is speed, the archive's symbol table
+index is not updated, even if it already existed; you can use @samp{ar s} or
+@command{ranlib} explicitly to update the symbol table index.
+
+However, too many different systems assume quick append rebuilds the
+index, so GNU ar implements @code{q} as a synonym for @code{r}.
+
+@item r
+@cindex replacement in archive
+Insert the files @var{member}@dots{} into @var{archive} (with
+@emph{replacement}). This operation differs from @samp{q} in that any
+previously existing members are deleted if their names match those being
+added.
+
+If one of the files named in @var{member}@dots{} does not exist, @command{ar}
+displays an error message, and leaves undisturbed any existing members
+of the archive matching that name.
+
+By default, new members are added at the end of the file; but you may
+use one of the modifiers @samp{a}, @samp{b}, or @samp{i} to request
+placement relative to some existing member.
+
+The modifier @samp{v} used with this operation elicits a line of
+output for each file inserted, along with one of the letters @samp{a} or
+@samp{r} to indicate whether the file was appended (no old member
+deleted) or replaced.
+
+@item t
+@cindex contents of archive
+Display a @emph{table} listing the contents of @var{archive}, or those
+of the files listed in @var{member}@dots{} that are present in the
+archive. Normally only the member name is shown; if you also want to
+see the modes (permissions), timestamp, owner, group, and size, you can
+request that by also specifying the @samp{v} modifier.
+
+If you do not specify a @var{member}, all files in the archive
+are listed.
+
+@cindex repeated names in archive
+@cindex name duplication in archive
+If there is more than one file with the same name (say, @samp{fie}) in
+an archive (say @samp{b.a}), @samp{ar t b.a fie} lists only the
+first instance; to see them all, you must ask for a complete
+listing---in our example, @samp{ar t b.a}.
+@c WRS only; per Gumby, this is implementation-dependent, and in a more
+@c recent case in fact works the other way.
+
+@item x
+@cindex extract from archive
+@emph{Extract} members (named @var{member}) from the archive. You can
+use the @samp{v} modifier with this operation, to request that
+@command{ar} list each name as it extracts it.
+
+If you do not specify a @var{member}, all files in the archive
+are extracted.
+
+@end table
+
+A number of modifiers (@var{mod}) may immediately follow the @var{p}
+keyletter, to specify variations on an operation's behavior:
+
+@table @samp
+@item a
+@cindex relative placement in archive
+Add new files @emph{after} an existing member of the
+archive. If you use the modifier @samp{a}, the name of an existing archive
+member must be present as the @var{relpos} argument, before the
+@var{archive} specification.
+
+@item b
+Add new files @emph{before} an existing member of the
+archive. If you use the modifier @samp{b}, the name of an existing archive
+member must be present as the @var{relpos} argument, before the
+@var{archive} specification. (same as @samp{i}).
+
+@item c
+@cindex creating archives
+@emph{Create} the archive. The specified @var{archive} is always
+created if it did not exist, when you request an update. But a warning is
+issued unless you specify in advance that you expect to create it, by
+using this modifier.
+
+@item f
+Truncate names in the archive. @sc{gnu} @command{ar} will normally permit file
+names of any length. This will cause it to create archives which are
+not compatible with the native @command{ar} program on some systems. If
+this is a concern, the @samp{f} modifier may be used to truncate file
+names when putting them in the archive.
+
+@item i
+Insert new files @emph{before} an existing member of the
+archive. If you use the modifier @samp{i}, the name of an existing archive
+member must be present as the @var{relpos} argument, before the
+@var{archive} specification. (same as @samp{b}).
+
+@item l
+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}
+@command{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} @command{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,
+even if no other change is made to the archive. You may use this modifier
+flag either with any operation, or alone. Running @samp{ar s} on an
+archive is equivalent to running @samp{ranlib} on it.
+
+@item S
+@cindex not writing archive index
+Do not generate an archive symbol table. This can speed up building a
+large library in several steps. The resulting archive can not be used
+with the linker. In order to build a symbol table, you must omit the
+@samp{S} modifier on the last execution of @samp{ar}, or you must run
+@samp{ranlib} on the archive.
+
+@item u
+@cindex updating an archive
+Normally, @samp{ar r}@dots{} inserts all files
+listed into the archive. If you would like to insert @emph{only} those
+of the files you list that are newer than existing members of the same
+names, use this modifier. The @samp{u} modifier is allowed only for the
+operation @samp{r} (replace). In particular, the combination @samp{qu} is
+not allowed, since checking the timestamps would lose any speed
+advantage from the operation @samp{q}.
+
+@item v
+This modifier requests the @emph{verbose} version of an operation. Many
+operations display additional information, such as filenames processed,
+when the modifier @samp{v} is appended.
+
+@item V
+This modifier shows the version number of @command{ar}.
+@end table
+
+@command{ar} ignores an initial option spelt @samp{-X32_64}, for
+compatibility with AIX. The behaviour produced by this option is the
+default for GNU @command{ar}. @command{ar} does not support any of the other
+@samp{-X} options; in particular, it does not support @option{-X32}
+which is the default for AIX @command{ar}.
+
+@c man end
+
+@ignore
+@c man begin SEEALSO ar
+nm(1), ranlib(1), and the Info entries for @file{binutils}.
+@c man end
+@end ignore
+
+@node ar scripts
+@section Controlling @command{ar} with a script
+
+@smallexample
+ar -M [ <@var{script} ]
+@end smallexample
+
+@cindex MRI compatibility, @command{ar}
+@cindex scripts, @command{ar}
+If you use the single command-line option @samp{-M} with @command{ar}, you
+can control its operation with a rudimentary command language. This
+form of @command{ar} operates interactively if standard input is coming
+directly from a terminal. During interactive use, @command{ar} prompts for
+input (the prompt is @samp{AR >}), and continues executing even after
+errors. If you redirect standard input to a script file, no prompts are
+issued, and @command{ar} abandons execution (with a nonzero exit code)
+on any error.
+
+The @command{ar} command language is @emph{not} designed to be equivalent
+to the command-line options; in fact, it provides somewhat less control
+over archives. The only purpose of the command language is to ease the
+transition to @sc{gnu} @command{ar} for developers who already have scripts
+written for the MRI ``librarian'' program.
+
+The syntax for the @command{ar} command language is straightforward:
+@itemize @bullet
+@item
+commands are recognized in upper or lower case; for example, @code{LIST}
+is the same as @code{list}. In the following descriptions, commands are
+shown in upper case for clarity.
+
+@item
+a single command may appear on each line; it is the first word on the
+line.
+
+@item
+empty lines are allowed, and have no effect.
+
+@item
+comments are allowed; text after either of the characters @samp{*}
+or @samp{;} is ignored.
+
+@item
+Whenever you use a list of names as part of the argument to an @command{ar}
+command, you can separate the individual names with either commas or
+blanks. Commas are shown in the explanations below, for clarity.
+
+@item
+@samp{+} is used as a line continuation character; if @samp{+} appears
+at the end of a line, the text on the following line is considered part
+of the current command.
+@end itemize
+
+Here are the commands you can use in @command{ar} scripts, or when using
+@command{ar} interactively. Three of them have special significance:
+
+@code{OPEN} or @code{CREATE} specify a @dfn{current archive}, which is
+a temporary file required for most of the other commands.
+
+@code{SAVE} commits the changes so far specified by the script. Prior
+to @code{SAVE}, commands affect only the temporary copy of the current
+archive.
+
+@table @code
+@item ADDLIB @var{archive}
+@itemx ADDLIB @var{archive} (@var{module}, @var{module}, @dots{} @var{module})
+Add all the contents of @var{archive} (or, if specified, each named
+@var{module} from @var{archive}) to the current archive.
+
+Requires prior use of @code{OPEN} or @code{CREATE}.
+
+@item ADDMOD @var{member}, @var{member}, @dots{} @var{member}
+@c FIXME! w/Replacement?? If so, like "ar r @var{archive} @var{names}"
+@c else like "ar q..."
+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, canceling the effect of
+any operations since the last @code{SAVE}. May be executed (with no
+effect) even if no current archive is specified.
+
+@item CREATE @var{archive}
+Creates an archive, and makes it the current archive (required for many
+other commands). The new archive is created with a temporary name; it
+is not actually saved as @var{archive} until you use @code{SAVE}.
+You can overwrite existing archives; similarly, the contents of any
+existing file named @var{archive} will not be destroyed until @code{SAVE}.
+
+@item DELETE @var{module}, @var{module}, @dots{} @var{module}
+Delete each listed @var{module} from the current archive; equivalent to
+@samp{ar -d @var{archive} @var{module} @dots{} @var{module}}.
+
+Requires prior use of @code{OPEN} or @code{CREATE}.
+
+@item DIRECTORY @var{archive} (@var{module}, @dots{} @var{module})
+@itemx DIRECTORY @var{archive} (@var{module}, @dots{} @var{module}) @var{outputfile}
+List each named @var{module} present in @var{archive}. The separate
+command @code{VERBOSE} specifies the form of the output: when verbose
+output is off, output is like that of @samp{ar -t @var{archive}
+@var{module}@dots{}}. When verbose output is on, the listing is like
+@samp{ar -tv @var{archive} @var{module}@dots{}}.
+
+Output normally goes to the standard output stream; however, if you
+specify @var{outputfile} as a final argument, @command{ar} directs the
+output to that file.
+
+@item END
+Exit from @command{ar}, with a @code{0} exit code to indicate successful
+completion. This command does not save the output file; if you have
+changed the current archive since the last @code{SAVE} command, those
+changes are lost.
+
+@item EXTRACT @var{module}, @var{module}, @dots{} @var{module}
+Extract each named @var{module} from the current archive, writing them
+into the current directory as separate files. Equivalent to @samp{ar -x
+@var{archive} @var{module}@dots{}}.
+
+Requires prior use of @code{OPEN} or @code{CREATE}.
+
+@ignore
+@c FIXME Tokens but no commands???
+@item FULLDIR
+
+@item HELP
+@end ignore
+
+@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} @command{ar}
+enhancement, rather than present for MRI compatibility.)
+
+Requires prior use of @code{OPEN} or @code{CREATE}.
+
+@item OPEN @var{archive}
+Opens an existing archive for use as the current archive (required for
+many other commands). Any changes as the result of subsequent commands
+will not actually affect @var{archive} until you next use @code{SAVE}.
+
+@item REPLACE @var{module}, @var{module}, @dots{} @var{module}
+In the current archive, replace each existing @var{module} (named in
+the @code{REPLACE} arguments) from files in the current working directory.
+To execute this command without errors, both the file, and the module in
+the current archive, must exist.
+
+Requires prior use of @code{OPEN} or @code{CREATE}.
+
+@item VERBOSE
+Toggle an internal flag governing the output from @code{DIRECTORY}.
+When the flag is on, @code{DIRECTORY} output matches output from
+@samp{ar -tv }@dots{}.
+
+@item SAVE
+Commit your changes to the current archive, and actually save it as a
+file with the name specified in the last @code{CREATE} or @code{OPEN}
+command.
+
+Requires prior use of @code{OPEN} or @code{CREATE}.
+
+@end table
+
+@iftex
+@node ld
+@chapter ld
+@cindex linker
+@kindex ld
+The @sc{gnu} linker @command{ld} is now described in a separate manual.
+@xref{Top,, Overview,, Using LD: the @sc{gnu} linker}.
+@end iftex
+
+@node nm
+@chapter nm
+@cindex symbols
+@kindex nm
+
+@c man title nm list symbols from object files
+
+@smallexample
+@c man begin SYNOPSIS nm
+nm [@option{-a}|@option{--debug-syms}] [@option{-g}|@option{--extern-only}]
+ [@option{-B}] [@option{-C}|@option{--demangle}[=@var{style}]] [@option{-D}|@option{--dynamic}]
+ [@option{-s}|@option{--print-armap}] [@option{-A}|@option{-o}|@option{--print-file-name}]
+ [@option{-n}|@option{-v}|@option{--numeric-sort}] [@option{-p}|@option{--no-sort}]
+ [@option{-r}|@option{--reverse-sort}] [@option{--size-sort}] [@option{-u}|@option{--undefined-only}]
+ [@option{-t} @var{radix}|@option{--radix=}@var{radix}] [@option{-P}|@option{--portability}]
+ [@option{--target=}@var{bfdname}] [@option{-f}@var{format}|@option{--format=}@var{format}]
+ [@option{--defined-only}] [@option{-l}|@option{--line-numbers}] [@option{--no-demangle}]
+ [@option{-V}|@option{--version}] [@option{-X 32_64}] [@option{--help}] [@var{objfile}@dots{}]
+@c man end
+@end smallexample
+
+@c man begin DESCRIPTION nm
+@sc{gnu} @command{nm} lists the symbols from object files @var{objfile}@dots{}.
+If no object files are listed as arguments, @command{nm} assumes the file
+@file{a.out}.
+
+For each symbol, @command{nm} shows:
+
+@itemize @bullet
+@item
+The symbol value, in the radix selected by options (see below), or
+hexadecimal by default.
+
+@item
+The symbol type. At least the following types are used; others are, as
+well, depending on the object file format. If lowercase, the symbol is
+local; if uppercase, the symbol is global (external).
+
+@c Some more detail on exactly what these symbol types are used for
+@c would be nice.
+@table @code
+@item A
+The symbol's value is absolute, and will not be changed by further
+linking.
+
+@item B
+The symbol is in the uninitialized data section (known as BSS).
+
+@item C
+The symbol is common. Common symbols are uninitialized data. When
+linking, multiple common symbols may appear with the same name. If the
+symbol is defined anywhere, the common symbols are treated as undefined
+references.
+@ifclear man
+For more details on common symbols, see the discussion of
+--warn-common in @ref{Options,,Linker options,ld.info,The GNU linker}.
+@end ifclear
+
+@item D
+The symbol is in the initialized data section.
+
+@item G
+The symbol is in an initialized data section for small objects. Some
+object file formats permit more efficient access to small data objects,
+such as a global int variable as opposed to a large global array.
+
+@item I
+The symbol is an indirect reference to another symbol. This is a GNU
+extension to the a.out object file format which is rarely used.
+
+@item N
+The symbol is a debugging symbol.
+
+@item R
+The symbol is in a read only data section.
+
+@item S
+The symbol is in an uninitialized data section for small objects.
+
+@item T
+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 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
+next values printed are the stabs other field, the stabs desc field, and
+the stab type. Stabs symbols are used to hold debugging information.
+@ifclear man
+For more information, see @ref{Top,Stabs,Stabs Overview,stabs.info, The
+``stabs'' debug format}.
+@end ifclear
+
+@item ?
+The symbol type is unknown, or object file format specific.
+@end table
+
+@item
+The symbol name.
+@end itemize
+
+@c man end
+
+@c man begin OPTIONS nm
+The long and short forms of options, shown here as alternatives, are
+equivalent.
+
+@table @env
+@item -A
+@itemx -o
+@itemx --print-file-name
+@cindex input file name
+@cindex file name
+@cindex source file name
+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.
+
+@item -a
+@itemx --debug-syms
+@cindex debugging symbols
+Display all symbols, even debugger-only symbols; normally these are not
+listed.
+
+@item -B
+@cindex @command{nm} format
+@cindex @command{nm} compatibility
+The same as @option{--format=bsd} (for compatibility with the MIPS @command{nm}).
+
+@item -C
+@itemx --demangle[=@var{style}]
+@cindex demangling in nm
+Decode (@dfn{demangle}) low-level symbol names into user-level names.
+Besides removing any initial underscore prepended by the system, this
+makes C++ function names readable. Different compilers have different
+mangling styles. The optional demangling style argument can be used to
+choose an appropriate demangling style for your compiler. @xref{c++filt},
+for more information on demangling.
+
+@item --no-demangle
+Do not demangle low-level symbol names. This is the default.
+
+@item -D
+@itemx --dynamic
+@cindex dynamic symbols
+Display the dynamic symbols rather than the normal symbols. This is
+only meaningful for dynamic objects, such as certain types of shared
+libraries.
+
+@item -f @var{format}
+@itemx --format=@var{format}
+@cindex @command{nm} format
+@cindex @command{nm} compatibility
+Use the output format @var{format}, which can be @code{bsd},
+@code{sysv}, or @code{posix}. The default is @code{bsd}.
+Only the first character of @var{format} is significant; it can be
+either upper or lower case.
+
+@item -g
+@itemx --extern-only
+@cindex external symbols
+Display only external symbols.
+
+@item -l
+@itemx --line-numbers
+@cindex symbol line numbers
+For each symbol, use debugging information to try to find a filename and
+line number. For a defined symbol, look for the line number of the
+address of the symbol. For an undefined symbol, look for the line
+number of a relocation entry which refers to the symbol. If line number
+information can be found, print it after the other symbol information.
+
+@item -n
+@itemx -v
+@itemx --numeric-sort
+Sort symbols numerically by their addresses, rather than alphabetically
+by their names.
+
+@item -p
+@itemx --no-sort
+@cindex sorting symbols
+Do not bother to sort the symbols in any order; print them in the order
+encountered.
+
+@item -P
+@itemx --portability
+Use the POSIX.2 standard output format instead of the default format.
+Equivalent to @samp{-f posix}.
+
+@item -s
+@itemx --print-armap
+@cindex symbol index, listing
+When listing symbols from archive members, include the index: a mapping
+(stored in the archive by @command{ar} or @command{ranlib}) of which modules
+contain definitions for which names.
+
+@item -r
+@itemx --reverse-sort
+Reverse the order of the sort (whether numeric or alphabetic); let the
+last come first.
+
+@item --size-sort
+Sort symbols by size. The size is computed as the difference between
+the value of the symbol and the value of the symbol with the next higher
+value. The size of the symbol is printed, rather than the value.
+
+@item -t @var{radix}
+@itemx --radix=@var{radix}
+Use @var{radix} as the radix for printing the symbol values. It must be
+@samp{d} for decimal, @samp{o} for octal, or @samp{x} for hexadecimal.
+
+@item --target=@var{bfdname}
+@cindex object code format
+Specify an object code format other than your system's default format.
+@xref{Target Selection}, for more information.
+
+@item -u
+@itemx --undefined-only
+@cindex external symbols
+@cindex undefined symbols
+Display only undefined symbols (those external to each object file).
+
+@item --defined-only
+@cindex external symbols
+@cindex undefined symbols
+Display only defined symbols for each object file.
+
+@item -V
+@itemx --version
+Show the version number of @command{nm} and exit.
+
+@item -X
+This option is ignored for compatibility with the AIX version of
+@command{nm}. It takes one parameter which must be the string
+@option{32_64}. The default mode of AIX @command{nm} corresponds
+to @option{-X 32}, which is not supported by @sc{gnu} @command{nm}.
+
+@item --help
+Show a summary of the options to @command{nm} and exit.
+@end table
+
+@c man end
+
+@ignore
+@c man begin SEEALSO nm
+ar(1), objdump(1), ranlib(1), and the Info entries for @file{binutils}.
+@c man end
+@end ignore
+
+@node objcopy
+@chapter objcopy
+
+@c man title objcopy copy and translate object files
+
+@smallexample
+@c man begin SYNOPSIS objcopy
+objcopy [@option{-F} @var{bfdname}|@option{--target=}@var{bfdname}]
+ [@option{-I} @var{bfdname}|@option{--input-target=}@var{bfdname}]
+ [@option{-O} @var{bfdname}|@option{--output-target=}@var{bfdname}]
+ [@option{-B} @var{bfdarch}|@option{--binary-architecture=}@var{bfdarch}]
+ [@option{-S}|@option{--strip-all}] [@option{-g}|@option{--strip-debug}]
+ [@option{-K} @var{symbolname}|@option{--keep-symbol=}@var{symbolname}]
+ [@option{-N} @var{symbolname}|@option{--strip-symbol=}@var{symbolname}]
+ [@option{-G} @var{symbolname}|@option{--keep-global-symbol=}@var{symbolname}]
+ [@option{-L} @var{symbolname}|@option{--localize-symbol=}@var{symbolname}]
+ [@option{-W} @var{symbolname}|@option{--weaken-symbol=}@var{symbolname}]
+ [@option{-x}|@option{--discard-all}] [@option{-X}|@option{--discard-locals}]
+ [@option{-b} @var{byte}|@option{--byte=}@var{byte}]
+ [@option{-i} @var{interleave}|@option{--interleave=}@var{interleave}]
+ [@option{-j} @var{sectionname}|@option{--only-section=}@var{sectionname}]
+ [@option{-R} @var{sectionname}|@option{--remove-section=}@var{sectionname}]
+ [@option{-p}|@option{--preserve-dates}]
+ [@option{--debugging}]
+ [@option{--gap-fill=}@var{val}] [@option{--pad-to=}@var{address}]
+ [@option{--set-start=}@var{val}] [@option{--adjust-start=}@var{incr}]
+ [@option{--change-addresses=}@var{incr}]
+ [@option{--change-section-address} @var{section}@{=,+,-@}@var{val}]
+ [@option{--change-section-lma} @var{section}@{=,+,-@}@var{val}]
+ [@option{--change-section-vma} @var{section}@{=,+,-@}@var{val}]
+ [@option{--change-warnings}] [@option{--no-change-warnings}]
+ [@option{--set-section-flags} @var{section}=@var{flags}]
+ [@option{--add-section} @var{sectionname}=@var{filename}]
+ [@option{--rename-section} @var{oldname}=@var{newname}[,@var{flags}]]
+ [@option{--change-leading-char} ] [@option{--remove-leading-char}]
+ [@option{--srec-len=}@var{ival} ] [@option{--srec-forceS3}]
+ [@option{--redefine-sym} @var{old}=@var{new} ]
+ [@option{--weaken}]
+ [@option{--keep-symbols=}@var{filename}]
+ [@option{--strip-symbols=}@var{filename}]
+ [@option{--keep-global-symbols=}@var{filename}]
+ [@option{--localize-symbols=}@var{filename}]
+ [@option{--weaken-symbols=}@var{filename}]
+ [@option{--alt-machine-code=@var{index}}]
+ [@option{-v}|@option{--verbose}]
+ [@option{-V}|@option{--version}]
+ [@option{--help}]
+ @var{infile} [@var{outfile}]
+@c man end
+@end smallexample
+
+@c man begin DESCRIPTION objcopy
+The @sc{gnu} @command{objcopy} utility copies the contents of an object
+file to another. @command{objcopy} uses the @sc{gnu} @sc{bfd} Library to
+read and write the object files. It can write the destination object
+file in a format different from that of the source object file. The
+exact behavior of @command{objcopy} is controlled by command-line options.
+Note that @command{objcopy} should be able to copy a fully linked file
+between any two formats. However, copying a relocatable object file
+between any two formats may not work as expected.
+
+@command{objcopy} creates temporary files to do its translations and
+deletes them afterward. @command{objcopy} uses @sc{bfd} to do all its
+translation work; it has access to all the formats described in @sc{bfd}
+and thus is able to recognize most formats without being told
+explicitly. @xref{BFD,,BFD,ld.info,Using LD}.
+
+@command{objcopy} can be used to generate S-records by using an output
+target of @samp{srec} (e.g., use @samp{-O srec}).
+
+@command{objcopy} can be used to generate a raw binary file by using an
+output target of @samp{binary} (e.g., use @option{-O binary}). When
+@command{objcopy} generates a raw binary file, it will essentially produce
+a memory dump of the contents of the input object file. All symbols and
+relocation information will be discarded. The memory dump will start at
+the 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 @option{-S} to remove sections containing debugging information. In
+some cases @option{-R} will be useful to remove sections which contain
+information that is not needed by the binary file.
+
+Note - @command{objcopy} is not able to change the endianness of its input
+files. If the input format has an endianness, (some formats do not),
+@command{objcopy} can only copy the inputs into file formats that have the
+same endianness or which have no endianness (eg @samp{srec}).
+
+@c man end
+
+@c man begin OPTIONS objcopy
+
+@table @env
+@item @var{infile}
+@itemx @var{outfile}
+The input and output files, respectively.
+If you do not specify @var{outfile}, @command{objcopy} creates a
+temporary file and destructively renames the result with
+the name of @var{infile}.
+
+@item -I @var{bfdname}
+@itemx --input-target=@var{bfdname}
+Consider the source file's object format to be @var{bfdname}, rather than
+attempting to deduce it. @xref{Target Selection}, for more information.
+
+@item -O @var{bfdname}
+@itemx --output-target=@var{bfdname}
+Write the output file using the object format @var{bfdname}.
+@xref{Target Selection}, for more information.
+
+@item -F @var{bfdname}
+@itemx --target=@var{bfdname}
+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 -B @var{bfdarch}
+@itemx --binary-architecture=@var{bfdarch}
+Useful when transforming a raw binary input file into an object file.
+In this case the output architecture can be set to @var{bfdarch}. This
+option will be ignored if the input file has a known @var{bfdarch}. You
+can access this binary data inside a program by referencing the special
+symbols that are created by the conversion process. These symbols are
+called _binary_@var{objfile}_start, _binary_@var{objfile}_end and
+_binary_@var{objfile}_size. e.g. you can transform a picture file into
+an object file and then access it in your code using these symbols.
+
+@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
+option may be given more than once. Note that using this option
+inappropriately may make the output file unusable.
+
+@item -S
+@itemx --strip-all
+Do not copy relocation and symbol information from the source file.
+
+@item -g
+@itemx --strip-debug
+Do not copy debugging symbols from the source file.
+
+@item --strip-unneeded
+Strip all symbols that are not needed for relocation processing.
+
+@item -K @var{symbolname}
+@itemx --keep-symbol=@var{symbolname}
+Copy only symbol @var{symbolname} from the source file. This option may
+be given more than once.
+
+@item -N @var{symbolname}
+@itemx --strip-symbol=@var{symbolname}
+Do not copy symbol @var{symbolname} from the source file. This option
+may be given more than once.
+
+@item -G @var{symbolname}
+@itemx --keep-global-symbol=@var{symbolname}
+Keep only symbol @var{symbolname} global. Make all other symbols local
+to the file, so that they are not visible externally. This option may
+be given more than once.
+
+@item -L @var{symbolname}
+@itemx --localize-symbol=@var{symbolname}
+Make symbol @var{symbolname} local to the file, so that it is not
+visible externally. This option may be given more than once.
+
+@item -W @var{symbolname}
+@itemx --weaken-symbol=@var{symbolname}
+Make symbol @var{symbolname} weak. This option may be given more than once.
+
+@item -x
+@itemx --discard-all
+Do not copy non-global symbols from the source file.
+@c FIXME any reason to prefer "non-global" to "local" here?
+
+@item -X
+@itemx --discard-locals
+Do not copy compiler-generated local symbols.
+(These usually start with @samp{L} or @samp{.}.)
+
+@item -b @var{byte}
+@itemx --byte=@var{byte}
+Keep only every @var{byte}th byte of the input file (header data is not
+affected). @var{byte} can be in the range from 0 to @var{interleave}-1,
+where @var{interleave} is given by the @option{-i} or @option{--interleave}
+option, or the default of 4. This option is useful for creating files
+to program @sc{rom}. It is typically used with an @code{srec} output
+target.
+
+@item -i @var{interleave}
+@itemx --interleave=@var{interleave}
+Only copy one out of every @var{interleave} bytes. Select which byte to
+copy with the @option{-b} or @option{--byte} option. The default is 4.
+@command{objcopy} ignores this option if you do not specify either @option{-b} or
+@option{--byte}.
+
+@item -p
+@itemx --preserve-dates
+Set the access and modification dates of the output file to be the same
+as those of the input file.
+
+@item --debugging
+Convert debugging information, if possible. This is not the default
+because only certain debugging formats are supported, and the
+conversion process can be time consuming.
+
+@item --gap-fill @var{val}
+Fill gaps between sections with @var{val}. This operation applies to
+the @emph{load address} (LMA) of the sections. It is done by increasing
+the size of the section with the lower address, and filling in the extra
+space created with @var{val}.
+
+@item --pad-to @var{address}
+Pad the output file up to the load address @var{address}. This is
+done by increasing the size of the last section. The extra space is
+filled in with the value specified by @option{--gap-fill} (default zero).
+
+@item --set-start @var{val}
+Set the start address of the new file to @var{val}. Not all object file
+formats support setting the start address.
+
+@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 --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 @option{--change-addresses},
+above. If @var{section} does not exist in the input file, a warning will
+be issued, unless @option{--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 @option{--change-addresses},
+above. If @var{section} does not exist in the input file, a warning
+will be issued, unless @option{--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
+@option{--change-addresses}, above. If @var{section} does not exist in
+the input file, a warning will be issued, unless
+@option{--no-change-warnings} is used.
+
+@item --change-warnings
+@itemx --adjust-warnings
+If @option{--change-section-address} or @option{--change-section-lma} or
+@option{--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 @option{--change-section-address} or
+@option{--adjust-section-lma} or @option{--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{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
+contents of the new section are taken from the file @var{filename}. The
+size of the section will be the size of the file. This option only
+works on file formats which can support sections with arbitrary names.
+
+@item --rename-section @var{oldname}=@var{newname}[,@var{flags}]
+Rename a section from @var{oldname} to @var{newname}, optionally
+changing the section's flags to @var{flags} in the process. This has
+the advantage over usng a linker script to perform the rename in that
+the output stays as an object file and does not become a linked
+executable.
+
+This option is particularly helpful when the input format is binary,
+since this will always create a section called .data. If for example,
+you wanted instead to create a section called .rodata containing binary
+data you could use the following command line to achieve it:
+
+@smallexample
+ objcopy -I binary -O <output_format> -B <architecture> \
+ --rename-section .data=.rodata,alloc,load,readonly,data,contents \
+ <input_binary_file> <output_object_file>
+@end smallexample
+
+@item --change-leading-char
+Some object file formats use special characters at the start of
+symbols. The most common such character is underscore, which compilers
+often add before every symbol. This option tells @command{objcopy} to
+change the leading character of every symbol when it converts between
+object file formats. If the object file formats use the same leading
+character, this option has no effect. Otherwise, it will add a
+character, or remove a character, or change a character, as
+appropriate.
+
+@item --remove-leading-char
+If the first character of a global symbol is a special symbol leading
+character used by the object file format, remove the character. The
+most common symbol leading character is underscore. This option will
+remove a leading underscore from all global symbols. This can be useful
+if you want to link together objects of different file formats with
+different conventions for symbol names. This is different from
+@option{--change-leading-char} because it always changes the symbol name
+when appropriate, regardless of the object file format of the output
+file.
+
+@item --srec-len=@var{ival}
+Meaningful only for srec output. Set the maximum length of the Srecords
+being produced to @var{ival}. This length covers both address, data and
+crc fields.
+
+@item --srec-forceS3
+Meaningful only for srec output. Avoid generation of S1/S2 records,
+creating S3-only record format.
+
+@item --redefine-sym @var{old}=@var{new}
+Change the name of a symbol @var{old}, to @var{new}. This can be useful
+when one is trying link two things together for which you have no
+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
+the @option{-R} option to the linker. This option is only effective when
+using an object file format which supports weak symbols.
+
+@item --keep-symbols=@var{filename}
+Apply @option{--keep-symbol} option to each symbol listed in the file
+@var{filename}. @var{filename} is simply a flat file, with one symbol
+name per line. Line comments may be introduced by the hash character.
+This option may be given more than once.
+
+@item --strip-symbols=@var{filename}
+Apply @option{--strip-symbol} option to each symbol listed in the file
+@var{filename}. @var{filename} is simply a flat file, with one symbol
+name per line. Line comments may be introduced by the hash character.
+This option may be given more than once.
+
+@item --keep-global-symbols=@var{filename}
+Apply @option{--keep-global-symbol} option to each symbol listed in the
+file @var{filename}. @var{filename} is simply a flat file, with one
+symbol name per line. Line comments may be introduced by the hash
+character. This option may be given more than once.
+
+@item --localize-symbols=@var{filename}
+Apply @option{--localize-symbol} option to each symbol listed in the file
+@var{filename}. @var{filename} is simply a flat file, with one symbol
+name per line. Line comments may be introduced by the hash character.
+This option may be given more than once.
+
+@item --weaken-symbols=@var{filename}
+Apply @option{--weaken-symbol} option to each symbol listed in the file
+@var{filename}. @var{filename} is simply a flat file, with one symbol
+name per line. Line comments may be introduced by the hash character.
+This option may be given more than once.
+
+@item --alt-machine-code=@var{index}
+If the output architecture has alternate machine codes, use the
+@var{index}th code instead of the default one. This is useful in case
+a machine is assigned an official code and the tool-chain adopts the
+new code, but other applications still depend on the original code
+being used.
+
+@item -V
+@itemx --version
+Show the version number of @command{objcopy}.
+
+@item -v
+@itemx --verbose
+Verbose output: list all object files modified. In the case of
+archives, @samp{objcopy -V} lists all members of the archive.
+
+@item --help
+Show a summary of the options to @command{objcopy}.
+@end table
+
+@c man end
+
+@ignore
+@c man begin SEEALSO objcopy
+ld(1), objdump(1), and the Info entries for @file{binutils}.
+@c man end
+@end ignore
+
+@node objdump
+@chapter objdump
+
+@cindex object file information
+@kindex objdump
+
+@c man title objdump display information from object files.
+
+@smallexample
+@c man begin SYNOPSIS objdump
+objdump [@option{-a}|@option{--archive-headers}]
+ [@option{-b} @var{bfdname}|@option{--target=@var{bfdname}}]
+ [@option{-C}|@option{--demangle}[=@var{style}] ]
+ [@option{-d}|@option{--disassemble}]
+ [@option{-D}|@option{--disassemble-all}]
+ [@option{-z}|@option{--disassemble-zeroes}]
+ [@option{-EB}|@option{-EL}|@option{--endian=}@{big | little @}]
+ [@option{-f}|@option{--file-headers}]
+ [@option{--file-start-context}]
+ [@option{-g}|@option{--debugging}]
+ [@option{-h}|@option{--section-headers}|@option{--headers}]
+ [@option{-i}|@option{--info}]
+ [@option{-j} @var{section}|@option{--section=}@var{section}]
+ [@option{-l}|@option{--line-numbers}]
+ [@option{-S}|@option{--source}]
+ [@option{-m} @var{machine}|@option{--architecture=}@var{machine}]
+ [@option{-M} @var{options}|@option{--disassembler-options=}@var{options}]
+ [@option{-p}|@option{--private-headers}]
+ [@option{-r}|@option{--reloc}]
+ [@option{-R}|@option{--dynamic-reloc}]
+ [@option{-s}|@option{--full-contents}]
+ [@option{-G}|@option{--stabs}]
+ [@option{-t}|@option{--syms}]
+ [@option{-T}|@option{--dynamic-syms}]
+ [@option{-x}|@option{--all-headers}]
+ [@option{-w}|@option{--wide}]
+ [@option{--start-address=}@var{address}]
+ [@option{--stop-address=}@var{address}]
+ [@option{--prefix-addresses}]
+ [@option{--[no-]show-raw-insn}]
+ [@option{--adjust-vma=}@var{offset}]
+ [@option{-V}|@option{--version}]
+ [@option{-H}|@option{--help}]
+ @var{objfile}@dots{}
+@c man end
+@end smallexample
+
+@c man begin DESCRIPTION objdump
+
+@command{objdump} displays information about one or more object files.
+The options control what particular information to display. This
+information is mostly useful to programmers who are working on the
+compilation tools, as opposed to programmers who just want their
+program to compile and work.
+
+@var{objfile}@dots{} are the object files to be examined. When you
+specify archives, @command{objdump} shows information on each of the member
+object files.
+
+@c man end
+
+@c man begin OPTIONS objdump
+
+The long and short forms of options, shown here as alternatives, are
+equivalent. At least one option from the list
+@option{-a,-d,-D,-f,-g,-G,-h,-H,-p,-r,-R,-S,-t,-T,-V,-x} must be given.
+
+@table @env
+@item -a
+@itemx --archive-header
+@cindex archive headers
+If any of the @var{objfile} files are archives, display the archive
+header information (in a format similar to @samp{ls -l}). Besides the
+information you could list with @samp{ar tv}, @samp{objdump -a} shows
+the object file format of each archive member.
+
+@item --adjust-vma=@var{offset}
+@cindex section addresses in objdump
+@cindex VMA in objdump
+When dumping information, first add @var{offset} to all the section
+addresses. This is useful if the section addresses do not correspond to
+the symbol table, which can happen when putting sections at particular
+addresses when using a format which can not represent section addresses,
+such as a.out.
+
+@item -b @var{bfdname}
+@itemx --target=@var{bfdname}
+@cindex object code format
+Specify that the object-code format for the object files is
+@var{bfdname}. This option may not be necessary; @var{objdump} can
+automatically recognize many formats.
+
+For example,
+@example
+objdump -b oasys -m vax -h fu.o
+@end example
+@noindent
+displays summary information from the section headers (@option{-h}) of
+@file{fu.o}, which is explicitly identified (@option{-m}) as a VAX object
+file in the format produced by Oasys compilers. You can list the
+formats available with the @option{-i} option.
+@xref{Target Selection}, for more information.
+
+@item -C
+@itemx --demangle[=@var{style}]
+@cindex demangling in objdump
+Decode (@dfn{demangle}) low-level symbol names into user-level names.
+Besides removing any initial underscore prepended by the system, this
+makes C++ function names readable. Different compilers have different
+mangling styles. The optional demangling style argument can be used to
+choose an appropriate demangling style for your compiler. @xref{c++filt},
+for more information on demangling.
+
+@item -G
+@item --debugging
+Display debugging information. This attempts to parse debugging
+information stored in the file and print it out using a C like syntax.
+Only certain types of debugging information have been implemented.
+
+@item -d
+@itemx --disassemble
+@cindex disassembling object code
+@cindex machine instructions
+Display the assembler mnemonics for the machine instructions from
+@var{objfile}. This option only disassembles those sections which are
+expected to contain instructions.
+
+@item -D
+@itemx --disassemble-all
+Like @option{-d}, but disassemble the contents of all sections, not just
+those expected to contain instructions.
+
+@item --prefix-addresses
+When disassembling, print the complete address on each line. This is
+the older disassembly format.
+
+@item --disassemble-zeroes
+Normally the disassembly output will skip blocks of zeroes. This
+option directs the disassembler to disassemble those blocks, just like
+any other data.
+
+@item -EB
+@itemx -EL
+@itemx --endian=@{big|little@}
+@cindex endianness
+@cindex disassembly endianness
+Specify the endianness of the object files. This only affects
+disassembly. This can be useful when disassembling a file format which
+does not describe endianness information, such as S-records.
+
+@item -f
+@itemx --file-header
+@cindex object file header
+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 @option{-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
+@cindex section headers
+Display summary information from the section headers of the
+object file.
+
+File segments may be relocated to nonstandard addresses, for example by
+using the @option{-Ttext}, @option{-Tdata}, or @option{-Tbss} options to
+@command{ld}. However, some object file formats, such as a.out, do not
+store the starting address of the file segments. In those situations,
+although @command{ld} relocates the sections correctly, using @samp{objdump
+-h} to list the file section headers cannot show the correct addresses.
+Instead, it shows the usual addresses, which are implicit for the
+target.
+
+@item --help
+Print a summary of the options to @command{objdump} and exit.
+
+@item -i
+@itemx --info
+@cindex architectures available
+@cindex object formats available
+Display a list showing all architectures and object formats available
+for specification with @option{-b} or @option{-m}.
+
+@item -j @var{name}
+@itemx --section=@var{name}
+@cindex section information
+Display information only for section @var{name}.
+
+@item -l
+@itemx --line-numbers
+@cindex source filenames for object files
+Label the display (using debugging information) with the filename and
+source line numbers corresponding to the object code or relocs shown.
+Only useful with @option{-d}, @option{-D}, or @option{-r}.
+
+@item -m @var{machine}
+@itemx --architecture=@var{machine}
+@cindex architecture
+@cindex disassembly architecture
+Specify the architecture to use when disassembling object files. This
+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 @option{-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
+@option{-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
+@option{-M reg-names-apcs} will select the name set used by the ARM
+Procedure Call Standard, whilst specifying @option{-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 @option{-M reg-names-atpcs} and @option{-M reg-names-special-atpcs} which
+use the ARM/Thumb Procedure Call Standard naming conventions. (Either
+with the normal register name or 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 @option{--disassembler-options=force-thumb}. This can be
+useful when attempting to disassemble thumb code produced by other
+compilers.
+
+For the x86, some of the options duplicate functions of the @option{-m}
+switch, but allow finer grained control. Multiple selections from the
+following may be specified as a comma separated string.
+@option{x86-64}, @option{i386} and @option{i8086} select disassembly for
+the given architecture. @option{intel} and @option{att} select between
+intel syntax mode and AT&T syntax mode. @option{addr32},
+@option{addr16}, @option{data32} and @option{data16} specify the default
+address size and operand size. These four options will be overridden if
+@option{x86-64}, @option{i386} or @option{i8086} appear later in the
+option string. Lastly, @option{suffix}, when in AT&T mode,
+instructs the dissassembler to print a mnemonic suffix even when the
+suffix could be inferred by the operands.
+
+For PPC, @option{booke}, @option{booke32} and @option{booke64} select
+disassembly of BookE instructions. @option{32} and @option{64} select
+PowerPC and PowerPC64 disassembly, respectively.
+
+@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
+Print the relocation entries of the file. If used with @option{-d} or
+@option{-D}, the relocations are printed interspersed with the
+disassembly.
+
+@item -R
+@itemx --dynamic-reloc
+@cindex dynamic relocation entries, in object file
+Print the dynamic relocation entries of the file. This is only
+meaningful for dynamic objects, such as certain types of shared
+libraries.
+
+@item -s
+@itemx --full-contents
+@cindex sections, full contents
+@cindex object file sections
+Display the full contents of any sections requested.
+
+@item -S
+@itemx --source
+@cindex source disassembly
+@cindex disassembly, with source
+Display source code intermixed with disassembly, if possible. Implies
+@option{-d}.
+
+@item --show-raw-insn
+When disassembling instructions, print the instruction in hex as well as
+in symbolic form. This is the default except when
+@option{--prefix-addresses} is used.
+
+@item --no-show-raw-insn
+When disassembling instructions, do not print the instruction bytes.
+This is the default when @option{--prefix-addresses} is used.
+
+@item -G
+@item --stabs
+@cindex stab
+@cindex .stab
+@cindex debug symbols
+@cindex ELF object file format
+Display the full contents of any sections requested. Display the
+contents of the .stab and .stab.index and .stab.excl sections from an
+ELF file. This is only useful on systems (such as Solaris 2.0) in which
+@code{.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 @option{--syms}
+output.
+@ifclear man
+For more information on stabs symbols, see @ref{Top,Stabs,Stabs
+Overview,stabs.info, The ``stabs'' debug format}.
+@end ifclear
+
+@item --start-address=@var{address}
+@cindex start-address
+Start displaying data at the specified address. This affects the output
+of the @option{-d}, @option{-r} and @option{-s} options.
+
+@item --stop-address=@var{address}
+@cindex stop-address
+Stop displaying data at the specified address. This affects the output
+of the @option{-d}, @option{-r} and @option{-s} options.
+
+@item -t
+@itemx --syms
+@cindex symbol table entries, printing
+Print the symbol table entries of the file.
+This is similar to the information provided by the @samp{nm} program.
+
+@item -T
+@itemx --dynamic-syms
+@cindex dynamic symbol table entries, printing
+Print the dynamic symbol table entries of the file. This is only
+meaningful for dynamic objects, such as certain types of shared
+libraries. This is similar to the information provided by the @samp{nm}
+program when given the @option{-D} (@option{--dynamic}) option.
+
+@item --version
+Print the version number of @command{objdump} and exit.
+
+@item -x
+@itemx --all-header
+@cindex all header information, object file
+@cindex header information, all
+Display all available header information, including the symbol table and
+relocation entries. Using @option{-x} is equivalent to specifying all of
+@option{-a -f -h -r -t}.
+
+@item -w
+@itemx --wide
+@cindex wide output, printing
+Format some lines for output devices that have more than 80 columns.
+Also do not truncate symbol names when they are displayed.
+@end table
+
+@c man end
+
+@ignore
+@c man begin SEEALSO objdump
+nm(1), readelf(1), and the Info entries for @file{binutils}.
+@c man end
+@end ignore
+
+@node ranlib
+@chapter ranlib
+
+@kindex ranlib
+@cindex archive contents
+@cindex symbol index
+
+@c man title ranlib generate index to archive.
+
+@smallexample
+@c man begin SYNOPSIS ranlib
+ranlib [@option{-vV}] @var{archive}
+@c man end
+@end smallexample
+
+@c man begin DESCRIPTION ranlib
+
+@command{ranlib} generates an index to the contents of an archive and
+stores it in the archive. The index lists each symbol defined by a
+member of an archive that is a relocatable object file.
+
+You may use @samp{nm -s} or @samp{nm --print-armap} to list this index.
+
+An archive with such an index speeds up linking to the library and
+allows routines in the library to call each other without regard to
+their placement in the archive.
+
+The @sc{gnu} @command{ranlib} program is another form of @sc{gnu} @command{ar}; running
+@command{ranlib} is completely equivalent to executing @samp{ar -s}.
+@xref{ar}.
+
+@c man end
+
+@c man begin OPTIONS ranlib
+
+@table @env
+@item -v
+@itemx -V
+@itemx --version
+Show the version number of @command{ranlib}.
+@end table
+
+@c man end
+
+@ignore
+@c man begin SEEALSO ranlib
+ar(1), nm(1), and the Info entries for @file{binutils}.
+@c man end
+@end ignore
+
+@node size
+@chapter size
+
+@kindex size
+@cindex section sizes
+
+@c man title size list section sizes and total size.
+
+@smallexample
+@c man begin SYNOPSIS size
+size [@option{-A}|@option{-B}|@option{--format=}@var{compatibility}]
+ [@option{--help}]
+ [@option{-d}|@option{-o}|@option{-x}|@option{--radix=}@var{number}]
+ [@option{-t}|@option{--totals}]
+ [@option{--target=}@var{bfdname}] [@option{-V}|@option{--version}]
+ [@var{objfile}@dots{}]
+@c man end
+@end smallexample
+
+@c man begin DESCRIPTION size
+
+The @sc{gnu} @command{size} utility lists the section sizes---and the total
+size---for each of the object or archive files @var{objfile} in its
+argument list. By default, one line of output is generated for each
+object file or each module in an archive.
+
+@var{objfile}@dots{} are the object files to be examined.
+If none are specified, the file @code{a.out} will be used.
+
+@c man end
+
+@c man begin OPTIONS size
+
+The command line options have the following meanings:
+
+@table @env
+@item -A
+@itemx -B
+@itemx --format=@var{compatibility}
+@cindex @command{size} display format
+Using one of these options, you can choose whether the output from @sc{gnu}
+@command{size} resembles output from System V @command{size} (using @option{-A},
+or @option{--format=sysv}), or Berkeley @command{size} (using @option{-B}, or
+@option{--format=berkeley}). The default is the one-line format similar to
+Berkeley's.
+@c Bonus for doc-source readers: you can also say --format=strange (or
+@c anything else that starts with 's') for sysv, and --format=boring (or
+@c anything else that starts with 'b') for Berkeley.
+
+Here is an example of the Berkeley (default) format of output from
+@command{size}:
+@smallexample
+$ size --format=Berkeley ranlib size
+text data bss dec hex filename
+294880 81920 11592 388392 5ed28 ranlib
+294880 81920 11888 388688 5ee50 size
+@end smallexample
+
+@noindent
+This is the same data, but displayed closer to System V conventions:
+
+@smallexample
+$ size --format=SysV ranlib size
+ranlib :
+section size addr
+.text 294880 8192
+.data 81920 303104
+.bss 11592 385024
+Total 388392
+
+
+size :
+section size addr
+.text 294880 8192
+.data 81920 303104
+.bss 11888 385024
+Total 388688
+@end smallexample
+
+@item --help
+Show a summary of acceptable arguments and options.
+
+@item -d
+@itemx -o
+@itemx -x
+@itemx --radix=@var{number}
+@cindex @command{size} number format
+@cindex radix for section sizes
+Using one of these options, you can control whether the size of each
+section is given in decimal (@option{-d}, or @option{--radix=10}); octal
+(@option{-o}, or @option{--radix=8}); or hexadecimal (@option{-x}, or
+@option{--radix=16}). In @option{--radix=@var{number}}, only the three
+values (8, 10, 16) are supported. The total size is always given in two
+radices; decimal and hexadecimal for @option{-d} or @option{-x} output, or
+octal and hexadecimal if you're using @option{-o}.
+
+@item -t
+@itemx --totals
+Show totals of all objects listed (Berkeley format listing mode only).
+
+@item --target=@var{bfdname}
+@cindex object code format
+Specify that the object-code format for @var{objfile} is
+@var{bfdname}. This option may not be necessary; @command{size} can
+automatically recognize many formats.
+@xref{Target Selection}, for more information.
+
+@item -V
+@itemx --version
+Display the version number of @command{size}.
+@end table
+
+@c man end
+
+@ignore
+@c man begin SEEALSO size
+ar(1), objdump(1), readelf(1), and the Info entries for @file{binutils}.
+@c man end
+@end ignore
+
+@node strings
+@chapter strings
+@kindex strings
+@cindex listings strings
+@cindex printing strings
+@cindex strings, printing
+
+@c man title strings print the strings of printable characters in files.
+
+@smallexample
+@c man begin SYNOPSIS strings
+strings [@option{-afov}] [@option{-}@var{min-len}]
+ [@option{-n} @var{min-len}] [@option{--bytes=}@var{min-len}]
+ [@option{-t} @var{radix}] [@option{--radix=}@var{radix}]
+ [@option{-e} @var{encoding}] [@option{--encoding=}@var{encoding}]
+ [@option{-}] [@option{--all}] [@option{--print-file-name}]
+ [@option{--target=}@var{bfdname}]
+ [@option{--help}] [@option{--version}] @var{file}@dots{}
+@c man end
+@end smallexample
+
+@c man begin DESCRIPTION strings
+
+For each @var{file} given, @sc{gnu} @command{strings} prints the printable
+character sequences that are at least 4 characters long (or the number
+given with the options below) and are followed by an unprintable
+character. By default, it only prints the strings from the initialized
+and loaded sections of object files; for other types of files, it prints
+the strings from the whole file.
+
+@command{strings} is mainly useful for determining the contents of non-text
+files.
+
+@c man end
+
+@c man begin OPTIONS strings
+
+@table @env
+@item -a
+@itemx --all
+@itemx -
+Do not scan only the initialized and loaded sections of object files;
+scan the whole files.
+
+@item -f
+@itemx --print-file-name
+Print the name of the file before each string.
+
+@item --help
+Print a summary of the program usage on the standard output and exit.
+
+@item -@var{min-len}
+@itemx -n @var{min-len}
+@itemx --bytes=@var{min-len}
+Print sequences of characters that are at least @var{min-len} characters
+long, instead of the default 4.
+
+@item -o
+Like @samp{-t o}. Some other versions of @command{strings} have @option{-o}
+act like @samp{-t d} instead. Since we can not be compatible with both
+ways, we simply chose one.
+
+@item -t @var{radix}
+@itemx --radix=@var{radix}
+Print the offset within the file before each string. The single
+character argument specifies the radix of the offset---@samp{o} for
+octal, @samp{x} for hexadecimal, or @samp{d} for decimal.
+
+@item -e @var{encoding}
+@itemx --encoding=@var{encoding}
+Select the character encoding of the strings that are to be found.
+Possible values for @var{encoding} are: @samp{s} = single-byte
+characters (ASCII, ISO 8859, etc., default), @samp{b} = 16-bit
+Bigendian, @samp{l} = 16-bit Littleendian, @samp{B} = 32-bit Bigendian,
+@samp{L} = 32-bit Littleendian. Useful for finding wide character
+strings.
+
+@item --target=@var{bfdname}
+@cindex object code format
+Specify an object code format other than your system's default format.
+@xref{Target Selection}, for more information.
+
+@item -v
+@itemx --version
+Print the program version number on the standard output and exit.
+@end table
+
+@c man end
+
+@ignore
+@c man begin SEEALSO strings
+ar(1), nm(1), objdump(1), ranlib(1), readelf(1)
+and the Info entries for @file{binutils}.
+@c man end
+@end ignore
+
+@node strip
+@chapter strip
+
+@kindex strip
+@cindex removing symbols
+@cindex discarding symbols
+@cindex symbols, discarding
+
+@c man title strip Discard symbols from object files.
+
+@smallexample
+@c man begin SYNOPSIS strip
+strip [@option{-F} @var{bfdname} |@option{--target=}@var{bfdname} ]
+ [@option{-I} @var{bfdname} |@option{--input-target=}@var{bfdname} ]
+ [@option{-O} @var{bfdname} |@option{--output-target=}@var{bfdname} ]
+ [@option{-s}|@option{--strip-all}] [@option{-S}|@option{-g}|@option{-d}|@option{--strip-debug}]
+ [@option{-K} @var{symbolname} |@option{--keep-symbol=}@var{symbolname} ]
+ [@option{-N} @var{symbolname} |@option{--strip-symbol=}@var{symbolname} ]
+ [@option{-x}|@option{--discard-all} ] [@option{-X} |@option{--discard-locals}]
+ [@option{-R} @var{sectionname} |@option{--remove-section=}@var{sectionname} ]
+ [@option{-o} @var{file} ] [@option{-p}|@option{--preserve-dates}]
+ [@option{-v} |@option{--verbose}] [@option{-V}|@option{--version}] [@option{--help}]
+ @var{objfile}@dots{}
+@c man end
+@end smallexample
+
+@c man begin DESCRIPTION strip
+
+@sc{gnu} @command{strip} discards all symbols from object files
+@var{objfile}. The list of object files may include archives.
+At least one object file must be given.
+
+@command{strip} modifies the files named in its argument,
+rather than writing modified copies under different names.
+
+@c man end
+
+@c man begin OPTIONS strip
+
+@table @env
+@item -F @var{bfdname}
+@itemx --target=@var{bfdname}
+Treat the original @var{objfile} as a file with the object
+code format @var{bfdname}, and rewrite it in the same format.
+@xref{Target Selection}, for more information.
+
+@item --help
+Show a summary of the options to @command{strip} and exit.
+
+@item -I @var{bfdname}
+@itemx --input-target=@var{bfdname}
+Treat the original @var{objfile} as a file with the object
+code format @var{bfdname}.
+@xref{Target Selection}, for more information.
+
+@item -O @var{bfdname}
+@itemx --output-target=@var{bfdname}
+Replace @var{objfile} with a file in the output format @var{bfdname}.
+@xref{Target Selection}, for more information.
+
+@item -R @var{sectionname}
+@itemx --remove-section=@var{sectionname}
+Remove any section named @var{sectionname} from the output file. This
+option may be given more than once. Note that using this option
+inappropriately may make the output file unusable.
+
+@item -s
+@itemx --strip-all
+Remove all symbols.
+
+@item -g
+@itemx -S
+@itemx -d
+@itemx --strip-debug
+Remove debugging symbols only.
+
+@item --strip-unneeded
+Remove all symbols that are not needed for relocation processing.
+
+@item -K @var{symbolname}
+@itemx --keep-symbol=@var{symbolname}
+Keep only symbol @var{symbolname} from the source file. This option may
+be given more than once.
+
+@item -N @var{symbolname}
+@itemx --strip-symbol=@var{symbolname}
+Remove symbol @var{symbolname} from the source file. This option may be
+given more than once, and may be combined with strip options other than
+@option{-K}.
+
+@item -o @var{file}
+Put the stripped output in @var{file}, rather than replacing the
+existing file. When this argument is used, only one @var{objfile}
+argument may be specified.
+
+@item -p
+@itemx --preserve-dates
+Preserve the access and modification dates of the file.
+
+@item -x
+@itemx --discard-all
+Remove non-global symbols.
+
+@item -X
+@itemx --discard-locals
+Remove compiler-generated local symbols.
+(These usually start with @samp{L} or @samp{.}.)
+
+@item -V
+@itemx --version
+Show the version number for @command{strip}.
+
+@item -v
+@itemx --verbose
+Verbose output: list all object files modified. In the case of
+archives, @samp{strip -v} lists all members of the archive.
+@end table
+
+@c man end
+
+@ignore
+@c man begin SEEALSO strip
+the Info entries for @file{binutils}.
+@c man end
+@end ignore
+
+@node c++filt, addr2line, strip, Top
+@chapter c++filt
+
+@kindex c++filt
+@cindex demangling C++ symbols
+
+@c man title cxxfilt Demangle C++ and Java symbols.
+
+@smallexample
+@c man begin SYNOPSIS cxxfilt
+c++filt [@option{-_}|@option{--strip-underscores}]
+ [@option{-j}|@option{--java}]
+ [@option{-n}|@option{--no-strip-underscores}]
+ [@option{-s} @var{format}|@option{--format=}@var{format}]
+ [@option{--help}] [@option{--version}] [@var{symbol}@dots{}]
+@c man end
+@end smallexample
+
+@c man begin DESCRIPTION cxxfilt
+
+@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 @command{c++filt}
+@footnote{MS-DOS does not allow @kbd{+} characters in file names, so on
+MS-DOS this program is named @command{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
+label decodes into a C++ name, the C++ name replaces the low-level
+name in the output.
+
+You can use @command{c++filt} to decipher individual symbols:
+
+@example
+c++filt @var{symbol}
+@end example
+
+If no @var{symbol} arguments are given, @command{c++filt} reads symbol
+names from the standard input and writes the demangled names to the
+standard output. All results are printed on the standard output.
+
+@c man end
+
+@c man begin OPTIONS cxxfilt
+
+@table @env
+@item -_
+@itemx --strip-underscores
+On some systems, both the C and C++ compilers put an underscore in front
+of every name. For example, the C name @code{foo} gets the low-level
+name @code{_foo}. This option removes the initial underscore. Whether
+@command{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.
+
+@item -s @var{format}
+@itemx --format=@var{format}
+@sc{gnu} @command{nm} can decode three different methods of mangling, used by
+different C++ compilers. The argument to this option selects which
+method it uses:
+
+@table @code
+@item gnu
+the one used by the @sc{gnu} compiler (the default method)
+@item lucid
+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
+@item gnu-new-abi
+the one used by the @sc{gnu} compiler with the new ABI.
+@end table
+
+@item --help
+Print a summary of the options to @command{c++filt} and exit.
+
+@item --version
+Print the version number of @command{c++filt} and exit.
+@end table
+
+@c man end
+
+@ignore
+@c man begin SEEALSO cxxfilt
+the Info entries for @file{binutils}.
+@c man end
+@end ignore
+
+@quotation
+@emph{Warning:} @command{c++filt} is a new utility, and the details of its
+user interface are subject to change in future releases. In particular,
+a command-line option may be required in the the future to decode a name
+passed as an argument on the command line; in other words,
+
+@example
+c++filt @var{symbol}
+@end example
+
+@noindent
+may in a future release become
+
+@example
+c++filt @var{option} @var{symbol}
+@end example
+@end quotation
+
+@node addr2line
+@chapter addr2line
+
+@kindex addr2line
+@cindex address to file name and line number
+
+@c man title addr2line convert addresses into file names and line numbers.
+
+@smallexample
+@c man begin SYNOPSIS addr2line
+addr2line [@option{-b} @var{bfdname}|@option{--target=}@var{bfdname}]
+ [@option{-C}|@option{--demangle}[=@var{style}]
+ [@option{-e} @var{filename}|@option{--exe=}@var{filename}]
+ [@option{-f}|@option{--functions}] [@option{-s}|@option{--basename}]
+ [@option{-H}|@option{--help}] [@option{-V}|@option{--version}]
+ [addr addr @dots{}]
+@c man end
+@end smallexample
+
+@c man begin DESCRIPTION addr2line
+
+@command{addr2line} translates program addresses into file names and line
+numbers. Given an address and an executable, it uses the debugging
+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 @option{-e} option. The
+default is the file @file{a.out}.
+
+@command{addr2line} has two modes of operation.
+
+In the first, hexadecimal addresses are specified on the command line,
+and @command{addr2line} displays the file name and line number for each
+address.
+
+In the second, @command{addr2line} reads hexadecimal addresses from
+standard input, and prints the file name and line number for each
+address on standard output. In this mode, @command{addr2line} may be used
+in a pipe to convert dynamically chosen addresses.
+
+The format of the output is @samp{FILENAME:LINENO}. The file name and
+line number for each address is printed on a separate line. If the
+@command{-f} option is used, then each @samp{FILENAME:LINENO} line is
+preceded by a @samp{FUNCTIONNAME} line which is the name of the function
+containing the address.
+
+If the file name or function name can not be determined,
+@command{addr2line} will print two question marks in their place. If the
+line number can not be determined, @command{addr2line} will print 0.
+
+@c man end
+
+@c man begin OPTIONS addr2line
+
+The long and short forms of options, shown here as alternatives, are
+equivalent.
+
+@table @env
+@item -b @var{bfdname}
+@itemx --target=@var{bfdname}
+@cindex object code format
+Specify that the object-code format for the object files is
+@var{bfdname}.
+
+@item -C
+@itemx --demangle[=@var{style}]
+@cindex demangling in objdump
+Decode (@dfn{demangle}) low-level symbol names into user-level names.
+Besides removing any initial underscore prepended by the system, this
+makes C++ function names readable. Different compilers have different
+mangling styles. The optional demangling style argument can be used to
+choose an appropriate demangling style for your compiler. @xref{c++filt},
+for more information on demangling.
+
+@item -e @var{filename}
+@itemx --exe=@var{filename}
+Specify the name of the executable for which addresses should be
+translated. The default file is @file{a.out}.
+
+@item -f
+@itemx --functions
+Display function names as well as file and line number information.
+
+@item -s
+@itemx --basenames
+Display only the base of each file name.
+@end table
+
+@c man end
+
+@ignore
+@c man begin SEEALSO addr2line
+Info entries for @file{binutils}.
+@c man end
+@end ignore
+
+@node nlmconv
+@chapter nlmconv
+
+@command{nlmconv} converts a relocatable object file into a NetWare
+Loadable Module.
+
+@ignore
+@command{nlmconv} currently works with @samp{i386} object
+files in @code{coff}, @sc{elf}, or @code{a.out} format, and @sc{SPARC}
+object files in @sc{elf}, or @code{a.out} format@footnote{
+@command{nlmconv} should work with any @samp{i386} or @sc{sparc} object
+format in the Binary File Descriptor library. It has only been tested
+with the above formats.}.
+@end ignore
+
+@quotation
+@emph{Warning:} @command{nlmconv} is not always built as part of the binary
+utilities, since it is only useful for NLM targets.
+@end quotation
+
+@c man title nlmconv converts object code into an NLM.
+
+@smallexample
+@c man begin SYNOPSIS nlmconv
+nlmconv [@option{-I} @var{bfdname}|@option{--input-target=}@var{bfdname}]
+ [@option{-O} @var{bfdname}|@option{--output-target=}@var{bfdname}]
+ [@option{-T} @var{headerfile}|@option{--header-file=}@var{headerfile}]
+ [@option{-d}|@option{--debug}] [@option{-l} @var{linker}|@option{--linker=}@var{linker}]
+ [@option{-h}|@option{--help}] [@option{-V}|@option{--version}]
+ @var{infile} @var{outfile}
+@c man end
+@end smallexample
+
+@c man begin DESCRIPTION nlmconv
+
+@command{nlmconv} converts the relocatable @samp{i386} object file
+@var{infile} into the NetWare Loadable Module @var{outfile}, optionally
+reading @var{headerfile} for NLM header information. For instructions
+on writing the NLM command file language used in header files, see the
+@samp{linkers} section, @samp{NLMLINK} in particular, of the @cite{NLM
+Development and Tools Overview}, which is part of the NLM Software
+Developer's Kit (``NLM SDK''), available from Novell, Inc.
+@command{nlmconv} uses the @sc{gnu} Binary File Descriptor library to read
+@var{infile};
+@ifclear man
+see @ref{BFD,,BFD,ld.info,Using LD}, for more information.
+@end ifclear
+
+@command{nlmconv} can perform a link step. In other words, you can list
+more than one object file for input if you list them in the definitions
+file (rather than simply specifying one input file on the command line).
+In this case, @command{nlmconv} calls the linker for you.
+
+@c man end
+
+@c man begin OPTIONS nlmconv
+
+@table @env
+@item -I @var{bfdname}
+@itemx --input-target=@var{bfdname}
+Object format of the input file. @command{nlmconv} can usually determine
+the format of a given file (so no default is necessary).
+@xref{Target Selection}, for more information.
+
+@item -O @var{bfdname}
+@itemx --output-target=@var{bfdname}
+Object format of the output file. @command{nlmconv} infers the output
+format based on the input format, e.g. for a @samp{i386} input file the
+output format is @samp{nlm32-i386}.
+@xref{Target Selection}, for more information.
+
+@item -T @var{headerfile}
+@itemx --header-file=@var{headerfile}
+Reads @var{headerfile} for NLM header information. For instructions on
+writing the NLM command file language used in header files, see@ see the
+@samp{linkers} section, of the @cite{NLM Development and Tools
+Overview}, which is part of the NLM Software Developer's Kit, available
+from Novell, Inc.
+
+@item -d
+@itemx --debug
+Displays (on standard error) the linker command line used by @command{nlmconv}.
+
+@item -l @var{linker}
+@itemx --linker=@var{linker}
+Use @var{linker} for any linking. @var{linker} can be an absolute or a
+relative pathname.
+
+@item -h
+@itemx --help
+Prints a usage summary.
+
+@item -V
+@itemx --version
+Prints the version number for @command{nlmconv}.
+@end table
+
+@c man end
+
+@ignore
+@c man begin SEEALSO nlmconv
+the Info entries for @file{binutils}.
+@c man end
+@end ignore
+
+@node windres
+@chapter windres
+
+@command{windres} may be used to manipulate Windows resources.
+
+@quotation
+@emph{Warning:} @command{windres} is not always built as part of the binary
+utilities, since it is only useful for Windows targets.
+@end quotation
+
+@c man title windres manipulate Windows resources.
+
+@smallexample
+@c man begin SYNOPSIS windres
+windres [options] [input-file] [output-file]
+@c man end
+@end smallexample
+
+@c man begin DESCRIPTION windres
+
+@command{windres} reads resources from an input file and copies them into
+an output file. Either file may be in one of three formats:
+
+@table @code
+@item rc
+A text format read by the Resource Compiler.
+
+@item res
+A binary format generated by the Resource Compiler.
+
+@item coff
+A COFF object or executable.
+@end table
+
+The exact description of these different formats is available in
+documentation from Microsoft.
+
+When @command{windres} converts from the @code{rc} format to the @code{res}
+format, it is acting like the Windows Resource Compiler. When
+@command{windres} converts from the @code{res} format to the @code{coff}
+format, it is acting like the Windows @code{CVTRES} program.
+
+When @command{windres} generates an @code{rc} file, the output is similar
+but not identical to the format expected for the input. When an input
+@code{rc} file refers to an external filename, an output @code{rc} file
+will instead include the file contents.
+
+If the input or output format is not specified, @command{windres} will
+guess based on the file name, or, for the input file, the file contents.
+A file with an extension of @file{.rc} will be treated as an @code{rc}
+file, a file with an extension of @file{.res} will be treated as a
+@code{res} file, and a file with an extension of @file{.o} or
+@file{.exe} will be treated as a @code{coff} file.
+
+If no output file is specified, @command{windres} will print the resources
+in @code{rc} format to standard output.
+
+The normal use is for you to write an @code{rc} file, use @command{windres}
+to convert it to a COFF object file, and then link the COFF file into
+your application. This will make the resources described in the
+@code{rc} file available to Windows.
+
+@c man end
+
+@c man begin OPTIONS windres
+
+@table @env
+@item -i @var{filename}
+@itemx --input @var{filename}
+The name of the input file. If this option is not used, then
+@command{windres} will use the first non-option argument as the input file
+name. If there are no non-option arguments, then @command{windres} will
+read from standard input. @command{windres} can not read a COFF file from
+standard input.
+
+@item -o @var{filename}
+@itemx --output @var{filename}
+The name of the output file. If this option is not used, then
+@command{windres} will use the first non-option argument, after any used
+for the input file name, as the output file name. If there is no
+non-option argument, then @command{windres} will write to standard output.
+@command{windres} can not write a COFF file to standard output.
+
+@item -I @var{format}
+@itemx --input-format @var{format}
+The input format to read. @var{format} may be @samp{res}, @samp{rc}, or
+@samp{coff}. If no input format is specified, @command{windres} will
+guess, as described above.
+
+@item -O @var{format}
+@itemx --output-format @var{format}
+The output format to generate. @var{format} may be @samp{res},
+@samp{rc}, or @samp{coff}. If no output format is specified,
+@command{windres} will guess, as described above.
+
+@item -F @var{target}
+@itemx --target @var{target}
+Specify the BFD format to use for a COFF file as input or output. This
+is a BFD target name; you can use the @option{--help} option to see a list
+of supported targets. Normally @command{windres} will use the default
+format, which is the first one listed by the @option{--help} option.
+@ifclear man
+@ref{Target Selection}.
+@end ifclear
+
+@item --preprocessor @var{program}
+When @command{windres} reads an @code{rc} file, it runs it through the C
+preprocessor first. This option may be used to specify the preprocessor
+to use, including any leading arguments. The default preprocessor
+argument is @code{gcc -E -xc-header -DRC_INVOKED}.
+
+@item --include-dir @var{directory}
+Specify an include directory to use when reading an @code{rc} file.
+@command{windres} will pass this to the preprocessor as an @option{-I}
+option. @command{windres} will also search this directory when looking for
+files named in the @code{rc} file.
+
+@item -D @var{target}
+@itemx --define @var{sym}[=@var{val}]
+Specify a @option{-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.
+
+@item --version
+Prints the version number for @command{windres}.
+
+@item --yydebug
+If @command{windres} is compiled with @code{YYDEBUG} defined as @code{1},
+this will turn on parser debugging.
+@end table
+
+@c man end
+
+@ignore
+@c man begin SEEALSO windres
+the Info entries for @file{binutils}.
+@c man end
+@end ignore
+
+@node dlltool
+@chapter Create files needed to build and use DLLs
+@cindex DLL
+@kindex dlltool
+
+@command{dlltool} may be used to create the files needed to build and use
+dynamic link libraries (DLLs).
+
+@quotation
+@emph{Warning:} @command{dlltool} is not always built as part of the binary
+utilities, since it is only useful for those targets which support DLLs.
+@end quotation
+
+@c man title dlltool Create files needed to build and use DLLs.
+
+@smallexample
+@c man begin SYNOPSIS dlltool
+dlltool [@option{-d}|@option{--input-def} @var{def-file-name}]
+ [@option{-b}|@option{--base-file} @var{base-file-name}]
+ [@option{-e}|@option{--output-exp} @var{exports-file-name}]
+ [@option{-z}|@option{--output-def} @var{def-file-name}]
+ [@option{-l}|@option{--output-lib} @var{library-file-name}]
+ [@option{--export-all-symbols}] [@option{--no-export-all-symbols}]
+ [@option{--exclude-symbols} @var{list}]
+ [@option{--no-default-excludes}]
+ [@option{-S}|@option{--as} @var{path-to-assembler}] [@option{-f}|@option{--as-flags} @var{options}]
+ [@option{-D}|@option{--dllname} @var{name}] [@option{-m}|@option{--machine} @var{machine}]
+ [@option{-a}|@option{--add-indirect}] [@option{-U}|@option{--add-underscore}] [@option{-k}|@option{--kill-at}]
+ [@option{-A}|@option{--add-stdcall-alias}]
+ [@option{-x}|@option{--no-idata4}] [@option{-c}|@option{--no-idata5}] [@option{-i}|@option{--interwork}]
+ [@option{-n}|@option{--nodelete}] [@option{-v}|@option{--verbose}]
+ [@option{-h}|@option{--help}] [@option{-V}|@option{--version}]
+ [object-file @dots{}]
+@c man end
+@end smallexample
+
+@c man begin DESCRIPTION dlltool
+
+@command{dlltool} reads its inputs, which can come from the @option{-d} and
+@option{-b} options as well as object files specified on the command
+line. It then processes these inputs and if the @option{-e} option has
+been specified it creates a exports file. If the @option{-l} option
+has been specified it creates a library file and if the @option{-z} option
+has been specified it creates a def file. Any or all of the @option{-e},
+@option{-l} and @option{-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. @command{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 @command{dlltool} can be used
+to create it using the @option{-z} option. In this case @command{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 @option{-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 @option{-e} option to
+@command{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 @option{-l} option to dlltool when it
+is creating or reading in a .def file.
+
+@command{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 @option{-S} command line option can be
+used to specify the path to the assembler that dlltool will use,
+and the @option{-f} option can be used to pass specific flags to that
+assembler. The @option{-n} can be used to prevent dlltool from deleting
+these temporary assembler files when it is done, and if @option{-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
+
+@c man end
+
+@c man begin OPTIONS dlltool
+
+The command line options have the following meanings:
+
+@table @env
+
+@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 @option{--no-default-excludes}
+option. You may add to the list of symbols to not export by using the
+@option{--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
+@option{--export-all-symbols} is used.
+
+@item --no-default-excludes
+When @option{--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 @option{--no-default-excludes} option
+to go ahead and export these special symbols. This is only meaningful
+when @option{--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{options}
+@itemx --as-flags @var{options}
+Specifies any specific command line options to be passed to the
+assembler when building the exports file. This option will work even if
+the @option{-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 options 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 @option{-e} option is used. If this option is not present, then
+the filename given to the @option{-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. @command{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 @command{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 @command{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 @command{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 @command{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 @command{dlltool} is creating the exports and library
+files it should omit the @code{.idata4} section. This is for compatibility
+with certain operating systems.
+
+@item -c
+@itemx --no-idata5
+Specifies that when @command{dlltool} is creating the exports and library
+files it should omit the @code{.idata5} section. This is for compatibility
+with certain operating systems.
+
+@item -i
+@itemx --interwork
+Specifies that @command{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 @command{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
+
+@c man end
+
+@ignore
+@c man begin SEEALSO dlltool
+the Info entries for @file{binutils}.
+@c man end
+@end ignore
+
+@node readelf
+@chapter readelf
+
+@cindex ELF file information
+@kindex readelf
+
+@c man title readelf Displays information about ELF files.
+
+@smallexample
+@c man begin SYNOPSIS readelf
+readelf [@option{-a}|@option{--all}]
+ [@option{-h}|@option{--file-header}]
+ [@option{-l}|@option{--program-headers}|@option{--segments}]
+ [@option{-S}|@option{--section-headers}|@option{--sections}]
+ [@option{-e}|@option{--headers}]
+ [@option{-s}|@option{--syms}|@option{--symbols}]
+ [@option{-n}|@option{--notes}]
+ [@option{-r}|@option{--relocs}]
+ [@option{-u}|@option{--unwind}]
+ [@option{-d}|@option{--dynamic}]
+ [@option{-V}|@option{--version-info}]
+ [@option{-D}|@option{--use-dynamic}]
+ [@option{-x} <number>|@option{--hex-dump=}<number>]
+ [@option{-w[liaprmfs]}|@option{--debug-dump}[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=str]]
+ [@option{-histogram}]
+ [@option{-v}|@option{--version}]
+ [@option{-W}|@option{--wide}]
+ [@option{-H}|@option{--help}]
+ @var{elffile}@dots{}
+@c man end
+@end smallexample
+
+@c man begin DESCRIPTION readelf
+
+@command{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, @command{readelf} does not support examining archives, nor does it
+support examing 64 bit ELF files.
+
+@c man end
+
+@c man begin OPTIONS readelf
+
+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 @env
+@item -a
+@itemx --all
+Equivalent to specifiying @option{--file-header},
+@option{--program-headers}, @option{--sections}, @option{--symbols},
+@option{--relocs}, @option{--dynamic}, @option{--notes} and
+@option{--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 @option{-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 has one.
+
+@item -u
+@itemx --unwind
+@cindex unwind information
+Displays the contents of the file's unwind section, if it has one. Only
+the unwind sections for IA64 ELF files are currently supported.
+
+@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 @command{readelf} use the
+symbol 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[liaprmfs]
+@itemx --debug-dump[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=str]
+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 -W
+@itemx --wide
+Don't break output lines to fit into 80 columns. By default
+@command{readelf} breaks section header and segment listing lines for
+64-bit ELF files, so that they fit into 80 columns. This option causes
+@command{readelf} to print each section header resp. each segment one a
+single line, which is far more readable on terminals wider than 80 columns.
+
+@item -H
+@itemx --help
+Display the command line options understood by @command{readelf}.
+
+@end table
+
+@c man end
+
+@ignore
+@c man begin SEEALSO readelf
+objdump(1), and the Info entries for @file{binutils}.
+@c man end
+@end ignore
+
+@node Selecting The Target System
+@chapter Selecting the target system
+
+You can specify three aspects of the target system to the @sc{gnu}
+binary file utilities, each in several ways:
+
+@itemize @bullet
+@item
+the target
+
+@item
+the architecture
+
+@item
+the linker emulation (which applies to the linker only)
+@end itemize
+
+In the following summaries, the lists of ways to specify values are in
+order of decreasing precedence. The ways listed first override those
+listed later.
+
+The commands to list valid values only list the values for which the
+programs you are running were configured. If they were configured with
+@option{--enable-targets=all}, the commands list most of the available
+values, but a few are left out; not all targets can be configured in at
+once because some of them can only be configured @dfn{native} (on hosts
+with the same type as the target system).
+
+@menu
+* Target Selection::
+* Architecture Selection::
+* Linker Emulation Selection::
+@end menu
+
+@node Target Selection
+@section Target Selection
+
+A @dfn{target} is an object file format. A given target may be
+supported for multiple architectures (@pxref{Architecture Selection}).
+A target selection may also have variations for different operating
+systems or architectures.
+
+The command to list valid target values is @samp{objdump -i}
+(the first column of output contains the relevant information).
+
+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 @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.
+
+Some sample configuration triplets are: @samp{m68k-hp-bsd},
+@samp{mips-dec-ultrix}, @samp{sparc-sun-sunos}.
+
+@subheading @command{objdump} Target
+
+Ways to specify:
+
+@enumerate
+@item
+command line option: @option{-b} or @option{--target}
+
+@item
+environment variable @code{GNUTARGET}
+
+@item
+deduced from the input file
+@end enumerate
+
+@subheading @command{objcopy} and @command{strip} Input Target
+
+Ways to specify:
+
+@enumerate
+@item
+command line options: @option{-I} or @option{--input-target}, or @option{-F} or @option{--target}
+
+@item
+environment variable @code{GNUTARGET}
+
+@item
+deduced from the input file
+@end enumerate
+
+@subheading @command{objcopy} and @command{strip} Output Target
+
+Ways to specify:
+
+@enumerate
+@item
+command line options: @option{-O} or @option{--output-target}, or @option{-F} or @option{--target}
+
+@item
+the input target (see ``@command{objcopy} and @command{strip} Input Target'' above)
+
+@item
+environment variable @code{GNUTARGET}
+
+@item
+deduced from the input file
+@end enumerate
+
+@subheading @command{nm}, @command{size}, and @command{strings} Target
+
+Ways to specify:
+
+@enumerate
+@item
+command line option: @option{--target}
+
+@item
+environment variable @code{GNUTARGET}
+
+@item
+deduced from the input file
+@end enumerate
+
+@subheading Linker Input Target
+
+Ways to specify:
+
+@enumerate
+@item
+command line option: @option{-b} or @option{--format}
+(@pxref{Options,,Options,ld.info,Using LD})
+
+@item
+script command @code{TARGET}
+(@pxref{Option Commands,,Option Commands,ld.info,Using LD})
+
+@item
+environment variable @code{GNUTARGET}
+(@pxref{Environment,,Environment,ld.info,Using LD})
+
+@item
+the default target of the selected linker emulation
+(@pxref{Linker Emulation Selection})
+@end enumerate
+
+@subheading Linker Output Target
+
+Ways to specify:
+
+@enumerate
+@item
+command line option: @option{-oformat}
+(@pxref{Options,,Options,ld.info,Using LD})
+
+@item
+script command @code{OUTPUT_FORMAT}
+(@pxref{Option Commands,,Option Commands,ld.info,Using LD})
+
+@item
+the linker input target (see ``Linker Input Target'' above)
+@end enumerate
+
+@node Architecture Selection
+@section Architecture selection
+
+An @dfn{architecture} is a type of @sc{cpu} on which an object file is
+to run. Its name may contain a colon, separating the name of the
+processor family from the name of the particular @sc{cpu}.
+
+The command to list valid architecture values is @samp{objdump -i} (the
+second column contains the relevant information).
+
+Sample values: @samp{m68k:68020}, @samp{mips:3000}, @samp{sparc}.
+
+@subheading @command{objdump} Architecture
+
+Ways to specify:
+
+@enumerate
+@item
+command line option: @option{-m} or @option{--architecture}
+
+@item
+deduced from the input file
+@end enumerate
+
+@subheading @command{objcopy}, @command{nm}, @command{size}, @command{strings} Architecture
+
+Ways to specify:
+
+@enumerate
+@item
+deduced from the input file
+@end enumerate
+
+@subheading Linker Input Architecture
+
+Ways to specify:
+
+@enumerate
+@item
+deduced from the input file
+@end enumerate
+
+@subheading Linker Output Architecture
+
+Ways to specify:
+
+@enumerate
+@item
+script command @code{OUTPUT_ARCH}
+(@pxref{Option Commands,,Option Commands,ld.info,Using LD})
+
+@item
+the default architecture from the linker output target
+(@pxref{Target Selection})
+@end enumerate
+
+@node Linker Emulation Selection
+@section Linker emulation selection
+
+A linker @dfn{emulation} is a ``personality'' of the linker, which gives
+the linker default values for the other aspects of the target system.
+In particular, it consists of
+
+@itemize @bullet
+@item
+the linker script
+
+@item
+the target
+
+@item
+several ``hook'' functions that are run at certain stages of the linking
+process to do special things that some targets require
+@end itemize
+
+The command to list valid linker emulation values is @samp{ld -V}.
+
+Sample values: @samp{hp300bsd}, @samp{mipslit}, @samp{sun4}.
+
+Ways to specify:
+
+@enumerate
+@item
+command line option: @option{-m}
+(@pxref{Options,,Options,ld.info,Using LD})
+
+@item
+environment variable @code{LDEMULATION}
+
+@item
+compiled-in @code{DEFAULT_EMULATION} from @file{Makefile},
+which comes from @code{EMUL} in @file{config/@var{target}.mt}
+@end enumerate
+
+@node Reporting Bugs
+@chapter Reporting Bugs
+@cindex bugs
+@cindex reporting bugs
+
+Your bug reports play an essential role in making the binary utilities
+reliable.
+
+Reporting a bug may help you by bringing a solution to your problem, or
+it may not. But in any case the principal function of a bug report is
+to help the entire community by making the next version of the binary
+utilities work better. Bug reports are your contribution to their
+maintenance.
+
+In order for a bug report to serve its purpose, you must include the
+information that enables us to fix the bug.
+
+@menu
+* Bug Criteria:: Have you found a bug?
+* Bug Reporting:: How to report bugs
+@end menu
+
+@node Bug Criteria
+@section Have you found a bug?
+@cindex bug criteria
+
+If you are not sure whether you have found a bug, here are some guidelines:
+
+@itemize @bullet
+@cindex fatal signal
+@cindex crash
+@item
+If a binary utility gets a fatal signal, for any input whatever, that is
+a bug. Reliable utilities never crash.
+
+@cindex error on valid input
+@item
+If a binary utility produces an error message for valid input, that is a
+bug.
+
+@item
+If you are an experienced user of binary utilities, your suggestions for
+improvement are welcome in any case.
+@end itemize
+
+@node Bug Reporting
+@section How to report bugs
+@cindex bug reports
+@cindex bugs, reporting
+
+A number of companies and individuals offer support for @sc{gnu}
+products. If you obtained the binary utilities from a support
+organization, we recommend you contact that organization first.
+
+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 the binary
+utilities to @samp{bug-binutils@@gnu.org}.
+
+The fundamental principle of reporting bugs usefully is this:
+@strong{report all the facts}. If you are not sure whether to state a
+fact or leave it out, state it!
+
+Often people omit facts because they think they know what causes the
+problem and assume that some details do not matter. Thus, you might
+assume that the name of a file you use in an example does not matter.
+Well, probably it does not, but one cannot be sure. Perhaps the bug is
+a stray memory reference which happens to fetch from the location where
+that pathname is stored in memory; perhaps, if the pathname were
+different, the contents of that location would fool the utility into
+doing the right thing despite the bug. Play it safe and give a
+specific, complete example. That is the easiest thing for you to do,
+and the most helpful.
+
+Keep in mind that the purpose of a bug report is to enable us to fix the bug if
+it is new to us. Therefore, always write your bug reports on the assumption
+that the bug has not been reported previously.
+
+Sometimes people give a few sketchy facts and ask, ``Does this ring a
+bell?'' Those bug reports are useless, and we urge everyone to
+@emph{refuse to respond to them} except to chide the sender to report
+bugs properly.
+
+To enable us to fix the bug, you should include all these things:
+
+@itemize @bullet
+@item
+The version of the utility. Each utility announces it if you start it
+with the @option{--version} argument.
+
+Without this, we will not know whether there is any point in looking for
+the bug in the current version of the binary utilities.
+
+@item
+Any patches you may have applied to the source, including any patches
+made to the @code{BFD} library.
+
+@item
+The type of machine you are using, and the operating system name and
+version number.
+
+@item
+What compiler (and its version) was used to compile the utilities---e.g.
+``@code{gcc-2.7}''.
+
+@item
+The command arguments you gave the utility to observe the bug. To
+guarantee you will not omit something important, list them all. A copy
+of the Makefile (or the output from make) is sufficient.
+
+If we were to try to guess the arguments, we would probably guess wrong
+and then we might not encounter the bug.
+
+@item
+A complete input file, or set of input files, that will reproduce the
+bug. If the utility is reading an object file or files, then it is
+generally most helpful to send the actual object files, uuencoded if
+necessary to get them through the mail system. Note that
+@samp{bug-binutils@@gnu.org} is a mailing list, so you should avoid
+sending very large files to it. Making the files available for
+anonymous FTP is OK.
+
+If the source files were produced exclusively using @sc{gnu} programs
+(e.g., @command{gcc}, @command{gas}, and/or the @sc{gnu} @command{ld}), then it
+may be OK to send the source files rather than the object files. In
+this case, be sure to say exactly what version of @command{gcc}, or
+whatever, was used to produce the object files. Also say how
+@command{gcc}, or whatever, was configured.
+
+@item
+A description of what behavior you observe that you believe is
+incorrect. For example, ``It gets a fatal signal.''
+
+Of course, if the bug is that the utility gets a fatal signal, then we
+will certainly notice it. But if the bug is incorrect output, we might
+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
+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
+ours fails to crash, we would know that the bug was not happening for
+us. If you had not told us to expect a crash, then we would not be able
+to draw any conclusion from our observations.
+
+@item
+If you wish to suggest changes to the source, send us context diffs, as
+generated by @command{diff} with the @option{-u}, @option{-c}, or @option{-p}
+option. Always send diffs from the old file to the new file. If you
+wish to discuss something in the @command{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.
+@end itemize
+
+Here are some things that are not necessary:
+
+@itemize @bullet
+@item
+A description of the envelope of the bug.
+
+Often people who encounter a bug spend a lot of time investigating
+which changes to the input file will make the bug go away and which
+changes will not affect it.
+
+This is often time consuming and not very useful, because the way we
+will find the bug is by running a single example under the debugger
+with breakpoints, not by pure deduction from a series of examples.
+We recommend that you save your time for something else.
+
+Of course, if you can find a simpler example to report @emph{instead}
+of the original one, that is a convenience for us. Errors in the
+output will be easier to spot, running under the debugger will take
+less time, and so on.
+
+However, simplification is not vital; if you do not want to do this,
+report the bug anyway and send us the entire test case you used.
+
+@item
+A patch for the bug.
+
+A patch for the bug does help us if it is a good one. But do not omit
+the necessary information, such as the test case, on the assumption that
+a patch is all we need. We might see problems with your patch and decide
+to fix the problem another way, or we might not understand it at all.
+
+Sometimes with programs as complicated as the binary utilities it is
+very hard to construct an example that will make the program follow a
+certain path through the code. If you do not send us the example, we
+will not be able to construct one, so we will not be able to verify that
+the bug is fixed.
+
+And if we cannot understand what bug you are trying to fix, or why your
+patch should be an improvement, we will not install it. A test case will
+help us to understand.
+
+@item
+A guess about what the bug is or what it depends on.
+
+Such guesses are usually wrong. Even we cannot guess right about such
+things without first using the debugger to find the facts.
+@end itemize
+
+@node GNU Free Documentation License
+@chapter GNU Free Documentation License
+@cindex GNU Free Documentation License
+
+ GNU Free Documentation License
+
+ Version 1.1, March 2000
+
+ Copyright (C) 2000 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+0. PREAMBLE
+
+The purpose of this License is to make a manual, textbook, or other
+written document "free" in the sense of freedom: to assure everyone
+the effective freedom to copy and redistribute it, with or without
+modifying it, either commercially or noncommercially. Secondarily,
+this License preserves for the author and publisher a way to get
+credit for their work, while not being considered responsible for
+modifications made by others.
+
+This License is a kind of "copyleft", which means that derivative
+works of the document must themselves be free in the same sense. It
+complements the GNU General Public License, which is a copyleft
+license designed for free software.
+
+We have designed this License in order to use it for manuals for free
+software, because free software needs free documentation: a free
+program should come with manuals providing the same freedoms that the
+software does. But this License is not limited to software manuals;
+it can be used for any textual work, regardless of subject matter or
+whether it is published as a printed book. We recommend this License
+principally for works whose purpose is instruction or reference.
+
+
+1. APPLICABILITY AND DEFINITIONS
+
+This License applies to any manual or other work that contains a
+notice placed by the copyright holder saying it can be distributed
+under the terms of this License. The "Document", below, refers to any
+such manual or work. Any member of the public is a licensee, and is
+addressed as "you".
+
+A "Modified Version" of the Document means any work containing the
+Document or a portion of it, either copied verbatim, or with
+modifications and/or translated into another language.
+
+A "Secondary Section" is a named appendix or a front-matter section of
+the Document that deals exclusively with the relationship of the
+publishers or authors of the Document to the Document's overall subject
+(or to related matters) and contains nothing that could fall directly
+within that overall subject. (For example, if the Document is in part a
+textbook of mathematics, a Secondary Section may not explain any
+mathematics.) The relationship could be a matter of historical
+connection with the subject or with related matters, or of legal,
+commercial, philosophical, ethical or political position regarding
+them.
+
+The "Invariant Sections" are certain Secondary Sections whose titles
+are designated, as being those of Invariant Sections, in the notice
+that says that the Document is released under this License.
+
+The "Cover Texts" are certain short passages of text that are listed,
+as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+the Document is released under this License.
+
+A "Transparent" copy of the Document means a machine-readable copy,
+represented in a format whose specification is available to the
+general public, whose contents can be viewed and edited directly and
+straightforwardly with generic text editors or (for images composed of
+pixels) generic paint programs or (for drawings) some widely available
+drawing editor, and that is suitable for input to text formatters or
+for automatic translation to a variety of formats suitable for input
+to text formatters. A copy made in an otherwise Transparent file
+format whose markup has been designed to thwart or discourage
+subsequent modification by readers is not Transparent. A copy that is
+not "Transparent" is called "Opaque".
+
+Examples of suitable formats for Transparent copies include plain
+ASCII without markup, Texinfo input format, LaTeX input format, SGML
+or XML using a publicly available DTD, and standard-conforming simple
+HTML designed for human modification. Opaque formats include
+PostScript, PDF, proprietary formats that can be read and edited only
+by proprietary word processors, SGML or XML for which the DTD and/or
+processing tools are not generally available, and the
+machine-generated HTML produced by some word processors for output
+purposes only.
+
+The "Title Page" means, for a printed book, the title page itself,
+plus such following pages as are needed to hold, legibly, the material
+this License requires to appear in the title page. For works in
+formats which do not have any title page as such, "Title Page" means
+the text near the most prominent appearance of the work's title,
+preceding the beginning of the body of the text.
+
+
+2. VERBATIM COPYING
+
+You may copy and distribute the Document in any medium, either
+commercially or noncommercially, provided that this License, the
+copyright notices, and the license notice saying this License applies
+to the Document are reproduced in all copies, and that you add no other
+conditions whatsoever to those of this License. You may not use
+technical measures to obstruct or control the reading or further
+copying of the copies you make or distribute. However, you may accept
+compensation in exchange for copies. If you distribute a large enough
+number of copies you must also follow the conditions in section 3.
+
+You may also lend copies, under the same conditions stated above, and
+you may publicly display copies.
+
+
+3. COPYING IN QUANTITY
+
+If you publish printed copies of the Document numbering more than 100,
+and the Document's license notice requires Cover Texts, you must enclose
+the copies in covers that carry, clearly and legibly, all these Cover
+Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+the back cover. Both covers must also clearly and legibly identify
+you as the publisher of these copies. The front cover must present
+the full title with all words of the title equally prominent and
+visible. You may add other material on the covers in addition.
+Copying with changes limited to the covers, as long as they preserve
+the title of the Document and satisfy these conditions, can be treated
+as verbatim copying in other respects.
+
+If the required texts for either cover are too voluminous to fit
+legibly, you should put the first ones listed (as many as fit
+reasonably) on the actual cover, and continue the rest onto adjacent
+pages.
+
+If you publish or distribute Opaque copies of the Document numbering
+more than 100, you must either include a machine-readable Transparent
+copy along with each Opaque copy, or state in or with each Opaque copy
+a publicly-accessible computer-network location containing a complete
+Transparent copy of the Document, free of added material, which the
+general network-using public has access to download anonymously at no
+charge using public-standard network protocols. If you use the latter
+option, you must take reasonably prudent steps, when you begin
+distribution of Opaque copies in quantity, to ensure that this
+Transparent copy will remain thus accessible at the stated location
+until at least one year after the last time you distribute an Opaque
+copy (directly or through your agents or retailers) of that edition to
+the public.
+
+It is requested, but not required, that you contact the authors of the
+Document well before redistributing any large number of copies, to give
+them a chance to provide you with an updated version of the Document.
+
+
+4. MODIFICATIONS
+
+You may copy and distribute a Modified Version of the Document under
+the conditions of sections 2 and 3 above, provided that you release
+the Modified Version under precisely this License, with the Modified
+Version filling the role of the Document, thus licensing distribution
+and modification of the Modified Version to whoever possesses a copy
+of it. In addition, you must do these things in the Modified Version:
+
+A. Use in the Title Page (and on the covers, if any) a title distinct
+ from that of the Document, and from those of previous versions
+ (which should, if there were any, be listed in the History section
+ of the Document). You may use the same title as a previous version
+ if the original publisher of that version gives permission.
+B. List on the Title Page, as authors, one or more persons or entities
+ responsible for authorship of the modifications in the Modified
+ Version, together with at least five of the principal authors of the
+ Document (all of its principal authors, if it has less than five).
+C. State on the Title page the name of the publisher of the
+ Modified Version, as the publisher.
+D. Preserve all the copyright notices of the Document.
+E. Add an appropriate copyright notice for your modifications
+ adjacent to the other copyright notices.
+F. Include, immediately after the copyright notices, a license notice
+ giving the public permission to use the Modified Version under the
+ terms of this License, in the form shown in the Addendum below.
+G. Preserve in that license notice the full lists of Invariant Sections
+ and required Cover Texts given in the Document's license notice.
+H. Include an unaltered copy of this License.
+I. Preserve the section entitled "History", and its title, and add to
+ it an item stating at least the title, year, new authors, and
+ publisher of the Modified Version as given on the Title Page. If
+ there is no section entitled "History" in the Document, create one
+ stating the title, year, authors, and publisher of the Document as
+ given on its Title Page, then add an item describing the Modified
+ Version as stated in the previous sentence.
+J. Preserve the network location, if any, given in the Document for
+ public access to a Transparent copy of the Document, and likewise
+ the network locations given in the Document for previous versions
+ it was based on. These may be placed in the "History" section.
+ You may omit a network location for a work that was published at
+ least four years before the Document itself, or if the original
+ publisher of the version it refers to gives permission.
+K. In any section entitled "Acknowledgements" or "Dedications",
+ preserve the section's title, and preserve in the section all the
+ substance and tone of each of the contributor acknowledgements
+ and/or dedications given therein.
+L. Preserve all the Invariant Sections of the Document,
+ unaltered in their text and in their titles. Section numbers
+ or the equivalent are not considered part of the section titles.
+M. Delete any section entitled "Endorsements". Such a section
+ may not be included in the Modified Version.
+N. Do not retitle any existing section as "Endorsements"
+ or to conflict in title with any Invariant Section.
+
+If the Modified Version includes new front-matter sections or
+appendices that qualify as Secondary Sections and contain no material
+copied from the Document, you may at your option designate some or all
+of these sections as invariant. To do this, add their titles to the
+list of Invariant Sections in the Modified Version's license notice.
+These titles must be distinct from any other section titles.
+
+You may add a section entitled "Endorsements", provided it contains
+nothing but endorsements of your Modified Version by various
+parties--for example, statements of peer review or that the text has
+been approved by an organization as the authoritative definition of a
+standard.
+
+You may add a passage of up to five words as a Front-Cover Text, and a
+passage of up to 25 words as a Back-Cover Text, to the end of the list
+of Cover Texts in the Modified Version. Only one passage of
+Front-Cover Text and one of Back-Cover Text may be added by (or
+through arrangements made by) any one entity. If the Document already
+includes a cover text for the same cover, previously added by you or
+by arrangement made by the same entity you are acting on behalf of,
+you may not add another; but you may replace the old one, on explicit
+permission from the previous publisher that added the old one.
+
+The author(s) and publisher(s) of the Document do not by this License
+give permission to use their names for publicity for or to assert or
+imply endorsement of any Modified Version.
+
+
+5. COMBINING DOCUMENTS
+
+You may combine the Document with other documents released under this
+License, under the terms defined in section 4 above for modified
+versions, provided that you include in the combination all of the
+Invariant Sections of all of the original documents, unmodified, and
+list them all as Invariant Sections of your combined work in its
+license notice.
+
+The combined work need only contain one copy of this License, and
+multiple identical Invariant Sections may be replaced with a single
+copy. If there are multiple Invariant Sections with the same name but
+different contents, make the title of each such section unique by
+adding at the end of it, in parentheses, the name of the original
+author or publisher of that section if known, or else a unique number.
+Make the same adjustment to the section titles in the list of
+Invariant Sections in the license notice of the combined work.
+
+In the combination, you must combine any sections entitled "History"
+in the various original documents, forming one section entitled
+"History"; likewise combine any sections entitled "Acknowledgements",
+and any sections entitled "Dedications". You must delete all sections
+entitled "Endorsements."
+
+
+6. COLLECTIONS OF DOCUMENTS
+
+You may make a collection consisting of the Document and other documents
+released under this License, and replace the individual copies of this
+License in the various documents with a single copy that is included in
+the collection, provided that you follow the rules of this License for
+verbatim copying of each of the documents in all other respects.
+
+You may extract a single document from such a collection, and distribute
+it individually under this License, provided you insert a copy of this
+License into the extracted document, and follow this License in all
+other respects regarding verbatim copying of that document.
+
+
+7. AGGREGATION WITH INDEPENDENT WORKS
+
+A compilation of the Document or its derivatives with other separate
+and independent documents or works, in or on a volume of a storage or
+distribution medium, does not as a whole count as a Modified Version
+of the Document, provided no compilation copyright is claimed for the
+compilation. Such a compilation is called an "aggregate", and this
+License does not apply to the other self-contained works thus compiled
+with the Document, on account of their being thus compiled, if they
+are not themselves derivative works of the Document.
+
+If the Cover Text requirement of section 3 is applicable to these
+copies of the Document, then if the Document is less than one quarter
+of the entire aggregate, the Document's Cover Texts may be placed on
+covers that surround only the Document within the aggregate.
+Otherwise they must appear on covers around the whole aggregate.
+
+
+8. TRANSLATION
+
+Translation is considered a kind of modification, so you may
+distribute translations of the Document under the terms of section 4.
+Replacing Invariant Sections with translations requires special
+permission from their copyright holders, but you may include
+translations of some or all Invariant Sections in addition to the
+original versions of these Invariant Sections. You may include a
+translation of this License provided that you also include the
+original English version of this License. In case of a disagreement
+between the translation and the original English version of this
+License, the original English version will prevail.
+
+
+9. TERMINATION
+
+You may not copy, modify, sublicense, or distribute the Document except
+as expressly provided for under this License. Any other attempt to
+copy, modify, sublicense or distribute the Document is void, and will
+automatically terminate your rights under this License. However,
+parties who have received copies, or rights, from you under this
+License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+
+10. FUTURE REVISIONS OF THIS LICENSE
+
+The Free Software Foundation may publish new, revised versions
+of the GNU Free Documentation License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns. See
+http://www.gnu.org/copyleft/.
+
+Each version of the License is given a distinguishing version number.
+If the Document specifies that a particular numbered version of this
+License "or any later version" applies to it, you have the option of
+following the terms and conditions either of that specified version or
+of any later version that has been published (not as a draft) by the
+Free Software Foundation. If the Document does not specify a version
+number of this License, you may choose any version ever published (not
+as a draft) by the Free Software Foundation.
+
+
+ADDENDUM: How to use this License for your documents
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and
+license notices just after the title page:
+
+@smallexample
+ Copyright (c) YEAR YOUR NAME.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1
+ or any later version published by the Free Software Foundation;
+ with the Invariant Sections being LIST THEIR TITLES, with the
+ Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
+ A copy of the license is included in the section entitled "GNU
+ Free Documentation License".
+@end smallexample
+
+If you have no Invariant Sections, write "with no Invariant Sections"
+instead of saying which ones are invariant. If you have no
+Front-Cover Texts, write "no Front-Cover Texts" instead of
+"Front-Cover Texts being LIST"; likewise for Back-Cover Texts.
+
+If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License,
+to permit their use in free software.
+
+@node Index
+@unnumbered Index
+
+@printindex cp
+
+@contents
+@bye
diff --git a/contrib/binutils/binutils/objcopy.c b/contrib/binutils/binutils/objcopy.c
index e6e2e98..1a819e8 100644
--- a/contrib/binutils/binutils/objcopy.c
+++ b/contrib/binutils/binutils/objcopy.c
@@ -48,6 +48,18 @@ struct redefine_node
struct redefine_node *next;
};
+typedef struct section_rename
+{
+ const char * old_name;
+ const char * new_name;
+ flagword flags;
+ struct section_rename * next;
+}
+section_rename;
+
+/* List of sections to be renamed. */
+static section_rename * section_rename_list;
+
static void copy_usage PARAMS ((FILE *, int));
static void strip_usage PARAMS ((FILE *, int));
static flagword parse_flags PARAMS ((const char *));
@@ -73,6 +85,8 @@ 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 *));
+static const char * find_section_rename PARAMS ((bfd *, sec_ptr, flagword *));
+static void add_section_rename PARAMS ((const char *, const char *, flagword));
#define RETURN_NONFATAL(s) {bfd_nonfatal (s); status = 1; return;}
@@ -134,7 +148,11 @@ struct section_list
};
static struct section_list *change_sections;
+
+/* True if some sections are to be removed. */
static boolean sections_removed;
+
+/* True if only some sections are to be copied. */
static boolean sections_copied;
/* Changes to the start address. */
@@ -153,8 +171,10 @@ static bfd_byte gap_fill = 0;
static boolean pad_to_set = false;
static bfd_vma pad_to;
-/* List of sections to add. */
+/* Use alternate machine code? */
+static int use_alt_mach_code = 0;
+/* List of sections to add. */
struct section_add
{
/* Next section to add. */
@@ -171,23 +191,20 @@ struct section_add
asection *section;
};
+/* List of sections to add to the output BFD. */
static struct section_add *add_sections;
/* Whether to convert debugging information. */
-
static boolean convert_debugging = false;
/* Whether to change the leading character in symbol names. */
-
static boolean change_leading_char = false;
/* Whether to remove the leading character from global symbol names. */
-
static boolean remove_leading_char = false;
/* List of symbols to strip, keep, localize, keep-global, weaken,
or redefine. */
-
static struct symlist *strip_specific_list = NULL;
static struct symlist *keep_specific_list = NULL;
static struct symlist *localize_specific_list = NULL;
@@ -196,7 +213,6 @@ 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). */
-
static boolean weaken = false;
/* 150 isn't special; it's just an arbitrary non-ASCII char value. */
@@ -226,6 +242,8 @@ static boolean weaken = false;
#define OPTION_LOCALIZE_SYMBOLS (OPTION_KEEP_SYMBOLS + 1)
#define OPTION_KEEPGLOBAL_SYMBOLS (OPTION_LOCALIZE_SYMBOLS + 1)
#define OPTION_WEAKEN_SYMBOLS (OPTION_KEEPGLOBAL_SYMBOLS + 1)
+#define OPTION_RENAME_SECTION (OPTION_WEAKEN_SYMBOLS + 1)
+#define OPTION_ALT_MACH_CODE (OPTION_RENAME_SECTION + 1)
/* Options to handle if running as "strip". */
@@ -262,6 +280,7 @@ static struct option copy_options[] =
{"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},
+ {"binary-architecture", required_argument, 0, 'B'},
{"byte", required_argument, 0, 'b'},
{"change-addresses", required_argument, 0, OPTION_CHANGE_ADDRESSES},
{"change-leading-char", no_argument, 0, OPTION_CHANGE_LEADING_CHAR},
@@ -291,6 +310,7 @@ static struct option copy_options[] =
{"keep-global-symbol", required_argument, 0, 'G'},
{"remove-leading-char", no_argument, 0, OPTION_REMOVE_LEADING_CHAR},
{"remove-section", required_argument, 0, 'R'},
+ {"rename-section", required_argument, 0, OPTION_RENAME_SECTION},
{"set-section-flags", required_argument, 0, OPTION_SET_SECTION_FLAGS},
{"set-start", required_argument, 0, OPTION_SET_START},
{"strip-all", no_argument, 0, 'S'},
@@ -310,6 +330,7 @@ static struct option copy_options[] =
{"keep-global-symbols", required_argument, 0, OPTION_KEEPGLOBAL_SYMBOLS},
{"localize-symbols", required_argument, 0, OPTION_LOCALIZE_SYMBOLS},
{"weaken-symbols", required_argument, 0, OPTION_WEAKEN_SYMBOLS},
+ {"alt-machine-code", required_argument, 0, OPTION_ALT_MACH_CODE},
{0, no_argument, 0, 0}
};
@@ -330,16 +351,22 @@ extern unsigned int Chunk;
on by the --srec-forceS3 command line switch. */
extern boolean S3Forced;
+/* Defined in bfd/binary.c. Used to set architecture of input binary files. */
+extern enum bfd_architecture bfd_external_binary_architecture;
+
+
static void
copy_usage (stream, exit_status)
FILE *stream;
int exit_status;
{
- fprintf (stream, _("Usage: %s <switches> in-file [out-file]\n"), program_name);
- fprintf (stream, _(" The switches are:\n"));
+ fprintf (stream, _("Usage: %s [option(s)] in-file [out-file]\n"), program_name);
+ fprintf (stream, _(" Copies a binary file, possibly transforming it in the process\n"));
+ fprintf (stream, _(" The options 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\
+ -B --binary-architecture <arch> Set arch of output file, when input is binary\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\
@@ -376,6 +403,7 @@ copy_usage (stream, exit_status)
--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\
+ --rename-section <old>=<new>[,<flags>] Rename section <old> to <new>\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\
@@ -386,6 +414,7 @@ copy_usage (stream, exit_status)
--localize-symbols <file> -L for all symbols listed in <file>\n\
--keep-global-symbols <file> -G for all symbols listed in <file>\n\
--weaken-symbols <file> -W for all symbols listed in <file>\n\
+ --alt-machine-code <index> Use alternate machine code for output\n\
-v --verbose List all object files modified\n\
-V --version Display this program's version number\n\
-h --help Display this output\n\
@@ -401,19 +430,20 @@ strip_usage (stream, exit_status)
FILE *stream;
int exit_status;
{
- fprintf (stream, _("Usage: %s <switches> in-file(s)\n"), program_name);
- fprintf (stream, _(" The switches are:\n"));
+ fprintf (stream, _("Usage: %s <option(s)> in-file(s)\n"), program_name);
+ fprintf (stream, _(" Removes symbols and sections from files\n"));
+ fprintf (stream, _(" The options 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\
+ -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\
+ -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\
+ -g -S -d --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\
+ -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\
@@ -661,10 +691,9 @@ is_specified_symbol (name, list)
struct symlist *tmp_list;
for (tmp_list = list; tmp_list; tmp_list = tmp_list->next)
- {
- if (strcmp (name, tmp_list->name) == 0)
- return true;
- }
+ if (strcmp (name, tmp_list->name) == 0)
+ return true;
+
return false;
}
@@ -718,6 +747,7 @@ filter_symbols (abfd, obfd, osyms, isyms, symcount)
flagword flags = sym->flags;
const char *name = bfd_asymbol_name (sym);
int keep;
+ boolean undefined;
if (redefine_sym_list)
{
@@ -750,10 +780,12 @@ filter_symbols (abfd, obfd, osyms, isyms, symcount)
}
}
+ undefined = bfd_is_und_section (bfd_get_section (sym));
+
if (remove_leading_char
&& ((flags & BSF_GLOBAL) != 0
|| (flags & BSF_WEAK) != 0
- || bfd_is_und_section (bfd_get_section (sym))
+ || undefined
|| bfd_is_com_section (bfd_get_section (sym)))
&& name[0] == bfd_get_symbol_leading_char (abfd))
name = bfd_asymbol_name (sym) = name + 1;
@@ -776,7 +808,7 @@ filter_symbols (abfd, obfd, osyms, isyms, symcount)
keep = 1;
else if ((flags & BSF_GLOBAL) != 0 /* Global symbol. */
|| (flags & BSF_WEAK) != 0
- || bfd_is_und_section (bfd_get_section (sym))
+ || undefined
|| bfd_is_com_section (bfd_get_section (sym)))
keep = strip_symbols != STRIP_UNNEEDED;
else if ((flags & BSF_DEBUGGING) != 0) /* Debugging symbol. */
@@ -806,7 +838,7 @@ filter_symbols (abfd, obfd, osyms, isyms, symcount)
sym->flags &=~ BSF_GLOBAL;
sym->flags |= BSF_WEAK;
}
- if (keep && (flags & (BSF_GLOBAL | BSF_WEAK))
+ if (keep && !undefined && (flags & (BSF_GLOBAL | BSF_WEAK))
&& (is_specified_symbol (name, localize_specific_list)
|| (keepglobal_specific_list != NULL
&& ! is_specified_symbol (name, keepglobal_specific_list))))
@@ -824,27 +856,22 @@ filter_symbols (abfd, obfd, osyms, isyms, symcount)
return dst_count;
}
+/* Find the redefined name of symbol SOURCE. */
+
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;
+ if (strcmp (source, list->source) == 0)
+ return list->target;
+
+ return source;
}
-/* Add a node to a symbol redefine list */
+/* Add a node to a symbol redefine list. */
static void
redefine_list_append (source, target)
@@ -858,18 +885,14 @@ redefine_list_append (source, target)
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);
- }
+ 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);
- }
+ fatal (_("%s: Symbol \"%s\" is target of more than one redefinition"),
+ "--redefine-sym",
+ target);
}
new_node = (struct redefine_node *) xmalloc (sizeof (struct redefine_node));
@@ -881,7 +904,6 @@ redefine_list_append (source, target)
*p = new_node;
}
-
/* Keep only every `copy_byte'th byte in MEMHUNK, which is *SIZE bytes long.
Adjust *SIZE. */
@@ -894,6 +916,7 @@ filter_bytes (memhunk, size)
for (; from < end; from += interleave)
*to++ = *from;
+
if (*size % interleave > (bfd_size_type) copy_byte)
*size = (*size / interleave) + 1;
else
@@ -937,13 +960,18 @@ copy_object (ibfd, obfd)
start = bfd_get_start_address (ibfd);
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))))
- RETURN_NONFATAL (bfd_get_filename (ibfd));
+ /* Neither the start address nor the flags
+ need to be set for a core file. */
+ if (bfd_get_format (obfd) != bfd_core)
+ {
+ if (!bfd_set_start_address (obfd, start)
+ || !bfd_set_file_flags (obfd,
+ (bfd_get_file_flags (ibfd)
+ & bfd_applicable_file_flags (obfd))))
+ RETURN_NONFATAL (bfd_get_filename (ibfd));
+ }
- /* Copy architecture of input file to output file */
+ /* Copy architecture of input file to output file. */
if (!bfd_set_arch_mach (obfd, bfd_get_arch (ibfd),
bfd_get_mach (ibfd)))
non_fatal (_("Warning: Output file cannot represent architecture %s"),
@@ -1099,8 +1127,8 @@ copy_object (ibfd, obfd)
}
}
- /* Symbol filtering must happen after the output sections have
- been created, but before their contents are set. */
+ /* Symbol filtering must happen after the output sections
+ have been created, but before their contents are set. */
dhandle = NULL;
symsize = bfd_get_symtab_upper_bound (ibfd);
if (symsize < 0)
@@ -1181,7 +1209,6 @@ copy_object (ibfd, obfd)
int c, i;
/* Fill in the gaps. */
-
if (max_gap > 8192)
max_gap = 8192;
buf = (bfd_byte *) xmalloc (max_gap);
@@ -1197,6 +1224,7 @@ copy_object (ibfd, obfd)
left = gaps[i];
off = bfd_section_size (obfd, osections[i]) - left;
+
while (left > 0)
{
bfd_size_type now;
@@ -1221,7 +1249,7 @@ copy_object (ibfd, obfd)
from the input BFD to the output BFD. This is done last to
permit the routine to look at the filtered symbol table, which is
important for the ECOFF code at least. */
- if (!bfd_copy_private_bfd_data (ibfd, obfd))
+ if (! bfd_copy_private_bfd_data (ibfd, obfd))
{
non_fatal (_("%s: error copying private BFD data: %s"),
bfd_get_filename (obfd),
@@ -1229,6 +1257,15 @@ copy_object (ibfd, obfd)
status = 1;
return;
}
+
+ /* Switch to the alternate machine code. We have to do this at the
+ very end, because we only initialize the header when we create
+ the first section. */
+ if (use_alt_mach_code != 0)
+ {
+ if (!bfd_alt_mach_code (obfd, use_alt_mach_code))
+ non_fatal (_("unknown alternate machine code, ignored"));
+ }
}
/* Read each archive element in turn from IBFD, copy the
@@ -1265,6 +1302,10 @@ copy_archive (ibfd, obfd, output_target)
list = NULL;
this_element = bfd_openr_next_archived_file (ibfd, NULL);
+
+ if (!bfd_set_format (obfd, bfd_get_format (ibfd)))
+ RETURN_NONFATAL (bfd_get_filename (obfd));
+
while (!status && this_element != (bfd *) NULL)
{
/* Create an output file for this member. */
@@ -1278,6 +1319,7 @@ copy_archive (ibfd, obfd, output_target)
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));
@@ -1291,9 +1333,6 @@ copy_archive (ibfd, obfd, output_target)
if (output_bfd == (bfd *) NULL)
RETURN_NONFATAL (output_name);
- if (!bfd_set_format (obfd, bfd_get_format (ibfd)))
- RETURN_NONFATAL (bfd_get_filename (obfd));
-
if (bfd_check_format (this_element, bfd_object) == true)
copy_object (this_element, output_bfd);
@@ -1352,7 +1391,6 @@ copy_file (input_filename, output_filename, input_target, output_target)
/* To allow us to do "strip *" without dying on the first
non-object file, failures are nonfatal. */
-
ibfd = bfd_openr (input_filename, input_target);
if (ibfd == NULL)
RETURN_NONFATAL (input_filename);
@@ -1372,7 +1410,8 @@ copy_file (input_filename, output_filename, input_target, output_target)
copy_archive (ibfd, obfd, output_target);
}
- else if (bfd_check_format_matches (ibfd, bfd_object, &matching))
+ else if (bfd_check_format_matches (ibfd, bfd_object, &matching)
+ || bfd_check_format_matches (ibfd, bfd_core, &matching))
{
bfd *obfd;
@@ -1407,8 +1446,68 @@ copy_file (input_filename, output_filename, input_target, output_target)
}
}
-/* Create a section in OBFD with the same name and attributes
- as ISECTION in IBFD. */
+/* Add a name to the section renaming list. */
+
+static void
+add_section_rename (old_name, new_name, flags)
+ const char * old_name;
+ const char * new_name;
+ flagword flags;
+{
+ section_rename * rename;
+
+ /* Check for conflicts first. */
+ for (rename = section_rename_list; rename != NULL; rename = rename->next)
+ if (strcmp (rename->old_name, old_name) == 0)
+ {
+ /* Silently ignore duplicate definitions. */
+ if (strcmp (rename->new_name, new_name) == 0
+ && rename->flags == flags)
+ return;
+
+ fatal (_("Multiple renames of section %s"), old_name);
+ }
+
+ rename = (section_rename *) xmalloc (sizeof (* rename));
+
+ rename->old_name = old_name;
+ rename->new_name = new_name;
+ rename->flags = flags;
+ rename->next = section_rename_list;
+
+ section_rename_list = rename;
+}
+
+/* Check the section rename list for a new name of the input section
+ ISECTION. Return the new name if one is found.
+ Also set RETURNED_FLAGS to the flags to be used for this section. */
+
+static const char *
+find_section_rename (ibfd, isection, returned_flags)
+ bfd * ibfd ATTRIBUTE_UNUSED;
+ sec_ptr isection;
+ flagword * returned_flags;
+{
+ const char * old_name = bfd_section_name (ibfd, isection);
+ section_rename * rename;
+
+ /* Default to using the flags of the input section. */
+ * returned_flags = bfd_get_section_flags (ibfd, isection);
+
+ for (rename = section_rename_list; rename != NULL; rename = rename->next)
+ if (strcmp (rename->old_name, old_name) == 0)
+ {
+ if (rename->flags != (flagword) -1)
+ * returned_flags = rename->flags;
+
+ return rename->new_name;
+ }
+
+ return old_name;
+}
+
+/* Create a section in OBFD with the same
+ name and attributes as ISECTION in IBFD. */
static void
setup_section (ibfd, isection, obfdarg)
@@ -1424,7 +1523,8 @@ setup_section (ibfd, isection, obfdarg)
bfd_vma lma;
flagword flags;
const char *err;
-
+ const char * name;
+
if ((bfd_get_section_flags (ibfd, isection) & SEC_DEBUGGING) != 0
&& (strip_symbols == STRIP_DEBUG
|| strip_symbols == STRIP_UNNEEDED
@@ -1442,7 +1542,10 @@ setup_section (ibfd, isection, obfdarg)
if (sections_copied && (p == NULL || ! p->copy))
return;
- osection = bfd_make_section_anyway (obfd, bfd_section_name (ibfd, isection));
+ /* Get the, possibly new, name of the output section. */
+ name = find_section_rename (ibfd, isection, & flags);
+
+ osection = bfd_make_section_anyway (obfd, name);
if (osection == NULL)
{
@@ -1499,15 +1602,17 @@ setup_section (ibfd, isection, obfdarg)
goto loser;
}
- flags = bfd_get_section_flags (ibfd, isection);
if (p != NULL && p->set_flags)
- flags = p->flags | (flags & SEC_HAS_CONTENTS);
+ flags = p->flags | (flags & (SEC_HAS_CONTENTS | SEC_RELOC));
if (!bfd_set_section_flags (obfd, osection, flags))
{
err = _("flags");
goto loser;
}
+ /* Copy merge entity size. */
+ osection->entsize = isection->entsize;
+
/* This used to be mangle_section; we do here to avoid using
bfd_get_section_by_name since some formats allow multiple
sections with the same name. */
@@ -1522,7 +1627,7 @@ setup_section (ibfd, isection, obfdarg)
goto loser;
}
- /* All went well */
+ /* All went well. */
return;
loser:
@@ -1551,8 +1656,8 @@ copy_section (ibfd, isection, obfdarg)
bfd_size_type size;
long relsize;
- /* If we have already failed earlier on, do not keep on generating
- complaints now. */
+ /* If we have already failed earlier on,
+ do not keep on generating complaints now. */
if (status != 0)
return;
@@ -1562,9 +1667,7 @@ copy_section (ibfd, isection, obfdarg)
|| strip_symbols == STRIP_ALL
|| discard_locals == LOCALS_ALL
|| convert_debugging))
- {
- return;
- }
+ return;
p = find_section_list (bfd_section_name (ibfd, isection), false);
@@ -1579,8 +1682,12 @@ copy_section (ibfd, isection, obfdarg)
if (size == 0 || osection == 0)
return;
+ /* Core files do not need to be relocated. */
+ if (bfd_get_format (obfd) == bfd_core)
+ relsize = 0;
+ else
+ relsize = bfd_get_reloc_upper_bound (ibfd, isection);
- relsize = bfd_get_reloc_upper_bound (ibfd, isection);
if (relsize < 0)
RETURN_NONFATAL (bfd_get_filename (ibfd));
@@ -1611,6 +1718,7 @@ copy_section (ibfd, isection, obfdarg)
free (relpp);
relpp = temp_relpp;
}
+
bfd_set_reloc (obfd, osection,
(relcount == 0 ? (arelent **) NULL : relpp), relcount);
}
@@ -1618,7 +1726,8 @@ copy_section (ibfd, isection, obfdarg)
isection->_cooked_size = isection->_raw_size;
isection->reloc_done = true;
- if (bfd_get_section_flags (ibfd, isection) & SEC_HAS_CONTENTS)
+ if (bfd_get_section_flags (ibfd, isection) & SEC_HAS_CONTENTS
+ && bfd_get_section_flags (obfd, osection) & SEC_HAS_CONTENTS)
{
PTR memhunk = (PTR) xmalloc ((unsigned) size);
@@ -1840,7 +1949,7 @@ strip_main (argc, argv)
struct section_list *p;
char *output_file = NULL;
- while ((c = getopt_long (argc, argv, "I:O:F:K:N:R:o:sSpdgxXVv",
+ while ((c = getopt_long (argc, argv, "I:O:F:K:N:R:o:sSpdgxXHhVv",
strip_options, (int *) 0)) != EOF)
{
switch (c)
@@ -1895,7 +2004,9 @@ strip_main (argc, argv)
show_version = true;
break;
case 0:
- break; /* we've been given a long option */
+ /* We've been given a long option. */
+ break;
+ case 'H':
case 'h':
strip_usage (stdout, 0);
default:
@@ -1964,6 +2075,7 @@ copy_main (argc, argv)
int argc;
char *argv[];
{
+ char * binary_architecture = NULL;
char *input_filename = NULL, *output_filename = NULL;
char *input_target = NULL, *output_target = NULL;
boolean show_version = false;
@@ -1972,7 +2084,7 @@ copy_main (argc, argv)
struct section_list *p;
struct stat statbuf;
- while ((c = getopt_long (argc, argv, "b:i:I:j:K:N:s:O:d:F:L:G:R:SpgxXVvW:",
+ while ((c = getopt_long (argc, argv, "b:B:i:I:j:K:N:s:O:d:F:L:G:R:SpgxXHhVvW:",
copy_options, (int *) 0)) != EOF)
{
switch (c)
@@ -1983,6 +2095,10 @@ copy_main (argc, argv)
fatal (_("byte number must be non-negative"));
break;
+ case 'B':
+ binary_architecture = optarg;
+ break;
+
case 'i':
interleave = atoi (optarg);
if (interleave < 1)
@@ -2257,9 +2373,7 @@ copy_main (argc, argv)
s = strchr (optarg, '=');
if (s == NULL)
- {
- fatal (_("bad format for %s"), "--redefine-sym");
- }
+ fatal (_("bad format for %s"), "--redefine-sym");
len = s - optarg;
source = (char *) xmalloc (len + 1);
@@ -2300,6 +2414,50 @@ copy_main (argc, argv)
}
break;
+ case OPTION_RENAME_SECTION:
+ {
+ flagword flags;
+ const char *eq, *fl;
+ char *old_name;
+ char *new_name;
+ unsigned int len;
+
+ eq = strchr (optarg, '=');
+ if (eq == NULL)
+ fatal (_("bad format for %s"), "--rename-section");
+
+ len = eq - optarg;
+ if (len == 0)
+ fatal (_("bad format for %s"), "--rename-section");
+
+ old_name = (char *) xmalloc (len + 1);
+ strncpy (old_name, optarg, len);
+ old_name[len] = 0;
+
+ eq++;
+ fl = strchr (eq, ',');
+ if (fl)
+ {
+ flags = parse_flags (fl + 1);
+ len = fl - eq;
+ }
+ else
+ {
+ flags = -1;
+ len = strlen (eq);
+ }
+
+ if (len == 0)
+ fatal (_("bad format for %s"), "--rename-section");
+
+ new_name = (char *) xmalloc (len + 1);
+ strncpy (new_name, eq, len);
+ new_name[len] = 0;
+
+ add_section_rename (old_name, new_name, flags);
+ }
+ break;
+
case OPTION_SET_START:
set_start = parse_vma (optarg, "--set-start");
set_start_set = true;
@@ -2333,9 +2491,16 @@ copy_main (argc, argv)
add_specific_symbols (optarg, &weaken_specific_list);
break;
+ case OPTION_ALT_MACH_CODE:
+ use_alt_mach_code = atoi (optarg);
+ if (use_alt_mach_code <= 0)
+ fatal (_("alternate machine code index must be positive"));
+ break;
+
case 0:
break; /* we've been given a long option */
+ case 'H':
case 'h':
copy_usage (stdout, 0);
@@ -2364,6 +2529,26 @@ copy_main (argc, argv)
if (output_target == (char *) NULL)
output_target = input_target;
+ if (binary_architecture != (char *) NULL)
+ {
+ if (input_target && strcmp (input_target, "binary") == 0)
+ {
+ const bfd_arch_info_type * temp_arch_info;
+
+ temp_arch_info = bfd_scan_arch (binary_architecture);
+
+ if (temp_arch_info != NULL)
+ bfd_external_binary_architecture = temp_arch_info->arch;
+ else
+ fatal (_("architecture %s unknown"), binary_architecture);
+ }
+ else
+ {
+ non_fatal (_("Warning: input target 'binary' required for binary architecture parameter."));
+ non_fatal (_(" Argument %s ignored"), binary_architecture);
+ }
+ }
+
if (preserve_dates)
if (stat (input_filename, & statbuf) < 0)
fatal (_("Cannot stat: %s: %s"), input_filename, strerror (errno));
@@ -2388,6 +2573,7 @@ copy_main (argc, argv)
else
{
copy_file (input_filename, output_filename, input_target, output_target);
+
if (status == 0 && preserve_dates)
set_times (output_filename, &statbuf);
}
@@ -2432,6 +2618,8 @@ copy_main (argc, argv)
return 0;
}
+int main PARAMS ((int, char **));
+
int
main (argc, argv)
int argc;
@@ -2440,6 +2628,9 @@ main (argc, argv)
#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
setlocale (LC_MESSAGES, "");
#endif
+#if defined (HAVE_SETLOCALE)
+ setlocale (LC_CTYPE, "");
+#endif
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
diff --git a/contrib/binutils/binutils/objdump.c b/contrib/binutils/binutils/objdump.c
index 27002ab..2b422b0 100644
--- a/contrib/binutils/binutils/objdump.c
+++ b/contrib/binutils/binutils/objdump.c
@@ -23,7 +23,7 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "getopt.h"
#include "progress.h"
#include "bucomm.h"
-#include <ctype.h>
+#include "safe-ctype.h"
#include "dis-asm.h"
#include "libiberty.h"
#include "demangle.h"
@@ -108,122 +108,62 @@ static long dynsymcount = 0;
/* Static declarations. */
-static void
-usage PARAMS ((FILE *, int));
-
-static void
-nonfatal PARAMS ((const char *));
-
-static void
-display_file PARAMS ((char *filename, char *target));
-
-static void
-dump_section_header PARAMS ((bfd *, asection *, PTR));
-
-static void
-dump_headers PARAMS ((bfd *));
-
-static void
-dump_data PARAMS ((bfd *abfd));
-
-static void
-dump_relocs PARAMS ((bfd *abfd));
-
-static void
-dump_dynamic_relocs PARAMS ((bfd * abfd));
-
-static void
-dump_reloc_set PARAMS ((bfd *, asection *, arelent **, long));
-
-static void
-dump_symbols PARAMS ((bfd *abfd, boolean dynamic));
-
-static void
-dump_bfd_header PARAMS ((bfd *));
-
-static void
-dump_bfd_private_header PARAMS ((bfd *));
-
-static void
-display_bfd PARAMS ((bfd *abfd));
-
-static void
-display_target_list PARAMS ((void));
-
-static void
-display_info_table PARAMS ((int, int));
-
-static void
-display_target_tables PARAMS ((void));
-
-static void
-display_info PARAMS ((void));
-
-static void
-objdump_print_value PARAMS ((bfd_vma, struct disassemble_info *, boolean));
-
-static void
-objdump_print_symname PARAMS ((bfd *, struct disassemble_info *, asymbol *));
-
-static asymbol *
-find_symbol_for_address PARAMS ((bfd *, asection *, bfd_vma, boolean, long *));
-
-static void
-objdump_print_addr_with_sym PARAMS ((bfd *, asection *, asymbol *, bfd_vma,
- struct disassemble_info *, boolean));
-
-static void
-objdump_print_addr PARAMS ((bfd_vma, struct disassemble_info *, boolean));
-
-static void
-objdump_print_address PARAMS ((bfd_vma, struct disassemble_info *));
-
-static void
-show_line PARAMS ((bfd *, asection *, bfd_vma));
-
-static void
-disassemble_bytes PARAMS ((struct disassemble_info *, disassembler_ftype,
- boolean, bfd_byte *, bfd_vma, bfd_vma,
- arelent ***, arelent **));
-
-static void
-disassemble_data PARAMS ((bfd *));
-
-static const char *
-endian_string PARAMS ((enum bfd_endian));
-
-static asymbol **
-slurp_symtab PARAMS ((bfd *));
-
-static asymbol **
-slurp_dynamic_symtab PARAMS ((bfd *));
-
-static long
-remove_useless_symbols PARAMS ((asymbol **, long));
-
-static int
-compare_symbols PARAMS ((const PTR, const PTR));
-
-static int
-compare_relocs PARAMS ((const PTR, const PTR));
-
-static void
-dump_stabs PARAMS ((bfd *));
-
-static boolean
-read_section_stabs PARAMS ((bfd *, const char *, const char *));
-
-static void
-print_section_stabs PARAMS ((bfd *, const char *, const char *));
+static void usage PARAMS ((FILE *, int));
+static void nonfatal PARAMS ((const char *));
+static void display_file PARAMS ((char *filename, char *target));
+static void dump_section_header PARAMS ((bfd *, asection *, PTR));
+static void dump_headers PARAMS ((bfd *));
+static void dump_data PARAMS ((bfd *abfd));
+static void dump_relocs PARAMS ((bfd *abfd));
+static void dump_dynamic_relocs PARAMS ((bfd * abfd));
+static void dump_reloc_set PARAMS ((bfd *, asection *, arelent **, long));
+static void dump_symbols PARAMS ((bfd *abfd, boolean dynamic));
+static void dump_bfd_header PARAMS ((bfd *));
+static void dump_bfd_private_header PARAMS ((bfd *));
+static void dump_bfd PARAMS ((bfd *));
+static void display_bfd PARAMS ((bfd *abfd));
+static void display_target_list PARAMS ((void));
+static void display_info_table PARAMS ((int, int));
+static void display_target_tables PARAMS ((void));
+static void display_info PARAMS ((void));
+static void objdump_print_value
+ PARAMS ((bfd_vma, struct disassemble_info *, boolean));
+static void objdump_print_symname
+ PARAMS ((bfd *, struct disassemble_info *, asymbol *));
+static asymbol *find_symbol_for_address
+ PARAMS ((bfd *, asection *, bfd_vma, boolean, long *));
+static void objdump_print_addr_with_sym
+ PARAMS ((bfd *, asection *, asymbol *, bfd_vma,
+ struct disassemble_info *, boolean));
+static void objdump_print_addr
+ PARAMS ((bfd_vma, struct disassemble_info *, boolean));
+static void objdump_print_address
+ PARAMS ((bfd_vma, struct disassemble_info *));
+static int objdump_symbol_at_address
+ PARAMS ((bfd_vma, struct disassemble_info *));
+static void show_line PARAMS ((bfd *, asection *, bfd_vma));
+static void disassemble_bytes
+ PARAMS ((struct disassemble_info *, disassembler_ftype, boolean,
+ bfd_byte *, bfd_vma, bfd_vma, arelent ***, arelent **));
+static void disassemble_data PARAMS ((bfd *));
+static const char *endian_string PARAMS ((enum bfd_endian));
+static asymbol ** slurp_symtab PARAMS ((bfd *));
+static asymbol ** slurp_dynamic_symtab PARAMS ((bfd *));
+static long remove_useless_symbols PARAMS ((asymbol **, long));
+static int compare_symbols PARAMS ((const PTR, const PTR));
+static int compare_relocs PARAMS ((const PTR, const PTR));
+static void dump_stabs PARAMS ((bfd *));
+static boolean read_section_stabs PARAMS ((bfd *, const char *, const char *));
+static void print_section_stabs PARAMS ((bfd *, const char *, const char *));
static void
usage (stream, status)
FILE *stream;
int status;
{
- fprintf (stream, _("Usage: %s OPTION... FILE...\n"), program_name);
- fprintf (stream, _("Display information from object FILE.\n"));
- fprintf (stream, _("\n At least one of the following switches must be given:\n"));
+ fprintf (stream, _("Usage: %s <option(s)> <file(s)>\n"), program_name);
+ fprintf (stream, _(" Display information from object <file(s)>.\n"));
+ 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\
@@ -240,7 +180,7 @@ usage (stream, status)
-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\
+ -v, --version Display this program's version number\n\
-i, --info List object formats and architectures supported\n\
-H, --help Display this information\n\
"));
@@ -268,6 +208,7 @@ usage (stream, status)
--adjust-vma=OFFSET Add OFFSET to all displayed section addresses\n\
\n"));
list_supported_targets (program_name, stream);
+ list_supported_architectures (program_name, stream);
disassembler_usage (stream);
}
@@ -343,10 +284,10 @@ dump_section_header (abfd, section, ignored)
printf ("%3d %-13s %08lx ", section->index,
bfd_get_section_name (abfd, section),
(unsigned long) bfd_section_size (abfd, section) / opb);
- printf_vma (bfd_get_section_vma (abfd, section));
+ bfd_printf_vma (abfd, bfd_get_section_vma (abfd, section));
printf (" ");
- printf_vma (section->lma);
- printf (" %08lx 2**%u", section->filepos,
+ bfd_printf_vma (abfd, section->lma);
+ printf (" %08lx 2**%u", (unsigned long) section->filepos,
bfd_get_section_alignment (abfd, section));
if (! wide_output)
printf ("\n ");
@@ -363,9 +304,6 @@ dump_section_header (abfd, section, ignored)
PF (SEC_CONSTRUCTOR_BSS, "CONSTRUCTOR BSS");
PF (SEC_LOAD, "LOAD");
PF (SEC_RELOC, "RELOC");
-#ifdef SEC_BALIGN
- PF (SEC_BALIGN, "BALIGN");
-#endif
PF (SEC_READONLY, "READONLY");
PF (SEC_CODE, "CODE");
PF (SEC_DATA, "DATA");
@@ -378,6 +316,7 @@ dump_section_header (abfd, section, ignored)
PF (SEC_CLINK, "CLINK");
PF (SEC_SMALL_DATA, "SMALL_DATA");
PF (SEC_SHARED, "SHARED");
+ PF (SEC_ARCH_BIT_0, "ARCH_BIT_0");
if ((section->flags & SEC_LINK_ONCE) != 0)
{
@@ -667,8 +606,10 @@ objdump_print_value (vma, info, skip_zeroes)
{
char buf[30];
char *p;
+ struct objdump_disasm_info *aux
+ = (struct objdump_disasm_info *) info->application_data;
- sprintf_vma (buf, vma);
+ bfd_sprintf_vma (aux->abfd, buf, vma);
if (! skip_zeroes)
p = buf;
else
@@ -1166,35 +1107,20 @@ typedef struct
/* sprintf to a "stream" */
static int
-#ifdef ANSI_PROTOTYPES
-objdump_sprintf (SFILE *f, const char *format, ...)
-#else
-objdump_sprintf (va_alist)
- va_dcl
-#endif
+objdump_sprintf VPARAMS ((SFILE *f, const char *format, ...))
{
-#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 *);
-#endif
+ VA_OPEN (args, format);
+ VA_FIXEDARG (args, SFILE *, f);
+ VA_FIXEDARG (args, const char *, format);
vasprintf (&buf, format, args);
- va_end (args);
-
if (buf == NULL)
{
+ va_end (args);
fatal (_("Out of virtual memory"));
}
@@ -1216,13 +1142,16 @@ objdump_sprintf (va_alist)
free (buf);
+ VA_CLOSE (args);
return n;
}
/* The number of zeroes we want to see before we start skipping them.
The number is arbitrarily chosen. */
+#ifndef SKIP_ZEROES
#define SKIP_ZEROES (8)
+#endif
/* The number of zeroes to skip at the end of a section. If the
number of zeroes at the end is between SKIP_ZEROES_AT_END and
@@ -1231,7 +1160,9 @@ objdump_sprintf (va_alist)
attempt to avoid disassembling zeroes inserted by section
alignment. */
+#ifndef SKIP_ZEROES_AT_END
#define SKIP_ZEROES_AT_END (3)
+#endif
/* Disassemble some data in memory between given values. */
@@ -1274,8 +1205,10 @@ disassemble_bytes (info, disassemble_fn, insns, data,
char buf[30];
char *s;
- sprintf_vma (buf, section->vma +
- bfd_section_size (section->owner, section) / opb);
+ bfd_sprintf_vma
+ (aux->abfd, 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')
@@ -1328,13 +1261,16 @@ disassemble_bytes (info, disassemble_fn, insns, data,
done_dot = false;
if (with_line_numbers || with_source_code)
- show_line (aux->abfd, section, addr_offset);
+ /* The line number tables will refer to unadjusted
+ section VMAs, so we must undo any VMA modifications
+ when calling show_line. */
+ show_line (aux->abfd, section, addr_offset - adjust_section_vma);
if (! prefix_addresses)
{
char *s;
- sprintf_vma (buf, section->vma + addr_offset);
+ bfd_sprintf_vma (aux->abfd, buf, section->vma + addr_offset);
for (s = buf + skip_addr_chars; *s == '0'; s++)
*s = ' ';
if (*s == '\0')
@@ -1393,7 +1329,7 @@ disassemble_bytes (info, disassemble_fn, insns, data,
for (j = addr_offset * opb; j < addr_offset * opb + octets; ++j)
{
- if (isprint (data[j]))
+ if (ISPRINT (data[j]))
buf[j - addr_offset * opb] = data[j];
else
buf[j - addr_offset * opb] = '.';
@@ -1471,7 +1407,7 @@ disassemble_bytes (info, disassemble_fn, insns, data,
putchar ('\n');
j = addr_offset * opb + pb;
- sprintf_vma (buf, section->vma + j / opb);
+ bfd_sprintf_vma (aux->abfd, buf, section->vma + j / opb);
for (s = buf + skip_addr_chars; *s == '0'; s++)
*s = ' ';
if (*s == '\0')
@@ -1728,6 +1664,7 @@ disassemble_data (abfd)
disasm_info.buffer = data;
disasm_info.buffer_vma = section->vma;
disasm_info.buffer_length = datasize;
+ disasm_info.section = section;
if (start_address == (bfd_vma) -1
|| start_address < disasm_info.buffer_vma)
addr_offset = 0;
@@ -1997,7 +1934,7 @@ print_section_stabs (abfd, stabsect_name, strsect_name)
else
printf ("%-6d", type);
printf (" %-6d %-6d ", other, desc);
- printf_vma (value);
+ bfd_printf_vma (abfd, value);
printf (" %-6lu", strx);
/* Symbols with type == 0 (N_UNDF) specify the length of the
@@ -2046,7 +1983,7 @@ dump_section_stabs (abfd, stabsect_name, strsect_name)
match or a section followed by a number. */
if (strncmp (stabsect_name, s->name, len) == 0
&& (s->name[len] == '\000'
- || isdigit ((unsigned char) s->name[len])))
+ || ISDIGIT (s->name[len])))
{
if (read_section_stabs (abfd, s->name, strsect_name))
{
@@ -2081,7 +2018,7 @@ dump_bfd_header (abfd)
PF (D_PAGED, "D_PAGED");
PF (BFD_IS_RELAXABLE, "BFD_IS_RELAXABLE");
printf (_("\nstart address 0x"));
- printf_vma (abfd->start_address);
+ bfd_printf_vma (abfd, abfd->start_address);
printf ("\n");
}
@@ -2333,7 +2270,7 @@ dump_data (abfd)
if (j >= stop_offset * opb)
printf (" ");
else
- printf ("%c", isprint (data[j]) ? data[j] : '.');
+ printf ("%c", ISPRINT (data[j]) ? data[j] : '.');
}
putchar ('\n');
}
@@ -2530,7 +2467,7 @@ dump_reloc_set (abfd, sec, relpp, relcount)
if (width == 0)
{
char buf[30];
- sprintf_vma (buf, (bfd_vma) -1);
+ bfd_sprintf_vma (abfd, buf, (bfd_vma) -1);
width = strlen (buf) - 7;
}
printf ("OFFSET %*s TYPE %*s VALUE \n", width, "", 12, "");
@@ -2598,7 +2535,7 @@ dump_reloc_set (abfd, sec, relpp, relcount)
}
if (sym_name)
{
- printf_vma (q->address);
+ bfd_printf_vma (abfd, q->address);
if (q->howto->name)
printf (" %-16s ", q->howto->name);
else
@@ -2610,7 +2547,7 @@ dump_reloc_set (abfd, sec, relpp, relcount)
{
if (section_name == (CONST char *) NULL)
section_name = "*unknown*";
- printf_vma (q->address);
+ bfd_printf_vma (abfd, q->address);
printf (" %-16s [%s]",
q->howto->name,
section_name);
@@ -2618,7 +2555,7 @@ dump_reloc_set (abfd, sec, relpp, relcount)
if (q->addend)
{
printf ("+0x");
- printf_vma (q->addend);
+ bfd_printf_vma (abfd, q->addend);
}
printf ("\n");
}
@@ -2796,11 +2733,13 @@ 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_STRING);
display_target_list ();
display_target_tables ();
}
+int main PARAMS ((int, char **));
+
int
main (argc, argv)
int argc;
@@ -2813,6 +2752,9 @@ main (argc, argv)
#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
setlocale (LC_MESSAGES, "");
#endif
+#if defined (HAVE_SETLOCALE)
+ setlocale (LC_CTYPE, "");
+#endif
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
@@ -2824,14 +2766,14 @@ main (argc, argv)
bfd_init ();
set_default_bfd_target ();
- while ((c = getopt_long (argc, argv, "pib:m:M:VCdDlfahHrRtTxsSj:wE:zgG",
+ while ((c = getopt_long (argc, argv, "pib:m:M:VvCdDlfaHhrRtTxsSj:wE:zgG",
long_options, (int *) 0))
!= EOF)
{
switch (c)
{
case 0:
- break; /* we've been given a long option */
+ break; /* We've been given a long option. */
case 'm':
machine = optarg;
break;
@@ -2852,12 +2794,12 @@ main (argc, argv)
if (optarg != NULL)
{
enum demangling_styles style;
-
+
style = cplus_demangle_name_to_style (optarg);
if (style == unknown_demangling)
fatal (_("unknown demangling style `%s'"),
optarg);
-
+
cplus_demangle_set_style (style);
}
break;
@@ -2895,7 +2837,7 @@ main (argc, argv)
usage (stderr, 1);
}
break;
-
+
case 'f':
dump_file_header = true;
seenflag = true;
@@ -2973,6 +2915,7 @@ main (argc, argv)
case 'H':
usage (stdout, 0);
seenflag = true;
+ case 'v':
case 'V':
show_version = true;
seenflag = true;
diff --git a/contrib/binutils/binutils/po/binutils.pot b/contrib/binutils/binutils/po/binutils.pot
index 2919fb3..ef601f0 100644
--- a/contrib/binutils/binutils/po/binutils.pot
+++ b/contrib/binutils/binutils/po/binutils.pot
@@ -6,15 +6,15 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2001-05-28 19:38+0100\n"
+"POT-Creation-Date: 2002-01-17 13:58+0000\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: 8-bit\n"
+"Content-Transfer-Encoding: 8bit\n"
-#: addr2line.c:76
+#: addr2line.c:73
#, c-format
msgid ""
"Usage: %s [-CfsHV] [-b bfdname] [--target=bfdname]\n"
@@ -22,175 +22,175 @@ msgid ""
" [--basenames] [--functions] [addr addr ...]\n"
msgstr ""
-#: addr2line.c:83 ar.c:288 nlmconv.c:1119 objcopy.c:373 objcopy.c:405
-#: readelf.c:1974 size.c:91 strings.c:530 windres.c:737
+#: addr2line.c:80 ar.c:289 nlmconv.c:1121 objcopy.c:423 objcopy.c:455
+#: readelf.c:2181 size.c:91 strings.c:655 windres.c:737
#, c-format
msgid "Report bugs to %s\n"
msgstr ""
-#: addr2line.c:243
+#: addr2line.c:240
#, c-format
msgid "%s: can not get addresses from archive"
msgstr ""
-#: addr2line.c:310 nm.c:436 objdump.c:2857
+#: addr2line.c:312 nm.c:447 objdump.c:2800
#, c-format
msgid "unknown demangling style `%s'"
msgstr ""
-#: ar.c:236
+#: ar.c:237
#, c-format
msgid "no entry %s in archive\n"
msgstr ""
-#: ar.c:253
+#: ar.c:254
#, c-format
msgid ""
"Usage: %s [-X32_64] [-]{dmpqrstx}[abcfilNoPsSuvV] [member-name] [count] "
"archive-file file...\n"
msgstr ""
-#: ar.c:256
+#: ar.c:257
#, c-format
msgid " %s -M [<mri-script]\n"
msgstr ""
-#: ar.c:257
+#: ar.c:258
msgid " commands:\n"
msgstr ""
-#: ar.c:258
+#: ar.c:259
msgid " d - delete file(s) from the archive\n"
msgstr ""
-#: ar.c:259
+#: ar.c:260
msgid " m[ab] - move file(s) in the archive\n"
msgstr ""
-#: ar.c:260
+#: ar.c:261
msgid " p - print file(s) found in the archive\n"
msgstr ""
-#: ar.c:261
+#: ar.c:262
msgid " q[f] - quick append file(s) to the archive\n"
msgstr ""
-#: ar.c:262
+#: ar.c:263
msgid ""
" r[ab][f][u] - replace existing or insert new file(s) into the archive\n"
msgstr ""
-#: ar.c:263
+#: ar.c:264
msgid " t - display contents of archive\n"
msgstr ""
-#: ar.c:264
+#: ar.c:265
msgid " x[o] - extract file(s) from the archive\n"
msgstr ""
-#: ar.c:265
+#: ar.c:266
msgid " command specific modifiers:\n"
msgstr ""
-#: ar.c:266
+#: ar.c:267
msgid " [a] - put file(s) after [member-name]\n"
msgstr ""
-#: ar.c:267
+#: ar.c:268
msgid " [b] - put file(s) before [member-name] (same as [i])\n"
msgstr ""
-#: ar.c:268
+#: ar.c:269
msgid " [N] - use instance [count] of name\n"
msgstr ""
-#: ar.c:269
+#: ar.c:270
msgid " [f] - truncate inserted file names\n"
msgstr ""
-#: ar.c:270
+#: ar.c:271
msgid " [P] - use full path names when matching\n"
msgstr ""
-#: ar.c:271
+#: ar.c:272
msgid " [o] - preserve original dates\n"
msgstr ""
-#: ar.c:272
+#: ar.c:273
msgid ""
" [u] - only replace files that are newer than current archive "
"contents\n"
msgstr ""
-#: ar.c:273
+#: ar.c:274
msgid " generic modifiers:\n"
msgstr ""
-#: ar.c:274
+#: ar.c:275
msgid " [c] - do not warn if the library had to be created\n"
msgstr ""
-#: ar.c:275
+#: ar.c:276
msgid " [s] - create an archive index (cf. ranlib)\n"
msgstr ""
-#: ar.c:276
+#: ar.c:277
msgid " [S] - do not build a symbol table\n"
msgstr ""
-#: ar.c:277
+#: ar.c:278
msgid " [v] - be verbose\n"
msgstr ""
-#: ar.c:278
+#: ar.c:279
msgid " [V] - display the version number\n"
msgstr ""
-#: ar.c:279
+#: ar.c:280
msgid " [-X32_64] - (ignored)\n"
msgstr ""
-#: ar.c:283
+#: ar.c:284
#, c-format
msgid "Usage: %s [-vV] archive\n"
msgstr ""
-#: ar.c:499
+#: ar.c:505
msgid "two different operation options specified"
msgstr ""
-#: ar.c:574
+#: ar.c:580
#, c-format
msgid "illegal option -- %c"
msgstr ""
-#: ar.c:606
+#: ar.c:612
msgid "no operation specified"
msgstr ""
-#: ar.c:609
+#: ar.c:615
msgid "`u' is only meaningful with the `r' option."
msgstr ""
-#: ar.c:619
+#: ar.c:625
msgid "`N' is only meaningful with the `x' and `d' options."
msgstr ""
-#: ar.c:622
+#: ar.c:628
msgid "Value for `N' must be positive."
msgstr ""
-#: ar.c:705
+#: ar.c:711
#, c-format
msgid "internal error -- this option not implemented"
msgstr ""
-#: ar.c:824 ar.c:876 ar.c:1322 objcopy.c:1131
+#: ar.c:830 ar.c:881 ar.c:1327 objcopy.c:1322
#, c-format
msgid "internal stat error on %s"
msgstr ""
-#: ar.c:828
+#: ar.c:834
#, c-format
msgid ""
"\n"
@@ -198,37 +198,37 @@ msgid ""
"\n"
msgstr ""
-#: ar.c:845 ar.c:913
+#: ar.c:850 ar.c:918
#, c-format
msgid "%s is not a valid archive"
msgstr ""
-#: ar.c:881
+#: ar.c:886
#, c-format
msgid "stat returns negative size for %s"
msgstr ""
-#: ar.c:1008
+#: ar.c:1013
#, c-format
msgid "%s is not an archive"
msgstr ""
-#: ar.c:1015
+#: ar.c:1020
#, c-format
msgid "creating %s"
msgstr ""
-#: ar.c:1221
+#: ar.c:1226
#, c-format
msgid "No member named `%s'\n"
msgstr ""
-#: ar.c:1273
+#: ar.c:1278
#, c-format
msgid "no entry %s in archive %s!"
msgstr ""
-#: ar.c:1434
+#: ar.c:1439
#, c-format
msgid "%s: no archive map to update"
msgstr ""
@@ -243,91 +243,95 @@ msgstr ""
msgid "Can't open file %s\n"
msgstr ""
-#: arsup.c:170
+#: arsup.c:171
#, c-format
msgid "%s: Can't open output archive %s\n"
msgstr ""
-#: arsup.c:182
+#: arsup.c:183
#, c-format
msgid "%s: Can't open input archive %s\n"
msgstr ""
-#: arsup.c:188
+#: arsup.c:189
#, c-format
msgid "%s: file %s is not an archive\n"
msgstr ""
-#: arsup.c:229
+#: arsup.c:230
#, c-format
msgid "%s: no output archive specified yet\n"
msgstr ""
-#: arsup.c:249 arsup.c:284 arsup.c:320 arsup.c:340 arsup.c:398
+#: arsup.c:250 arsup.c:285 arsup.c:321 arsup.c:341 arsup.c:399
#, c-format
msgid "%s: no open output archive\n"
msgstr ""
-#: arsup.c:257 arsup.c:358 arsup.c:378
+#: arsup.c:258 arsup.c:359 arsup.c:379
#, c-format
msgid "%s: can't open file %s\n"
msgstr ""
-#: arsup.c:305 arsup.c:374 arsup.c:453
+#: arsup.c:306 arsup.c:375 arsup.c:454
#, c-format
msgid "%s: can't find module file %s\n"
msgstr ""
-#: arsup.c:405
+#: arsup.c:406
#, c-format
msgid "Current open archive is %s\n"
msgstr ""
-#: arsup.c:432
+#: arsup.c:433
#, c-format
msgid "%s: no open archive\n"
msgstr ""
-#: bucomm.c:135
+#: bucomm.c:106
#, c-format
msgid "can't set BFD default target to `%s': %s"
msgstr ""
-#: bucomm.c:147
+#: bucomm.c:118
#, c-format
msgid "%s: Matching formats:"
msgstr ""
-#: bucomm.c:164
+#: bucomm.c:135
msgid "Supported targets:"
msgstr ""
-#: bucomm.c:166
+#: bucomm.c:137
#, c-format
msgid "%s: supported targets:"
msgstr ""
-#: bucomm.c:272
+#: bucomm.c:153
+msgid "Supported architectures:"
+msgstr ""
+
+#: bucomm.c:155
#, c-format
-msgid "%s: bad number: %s"
+msgid "%s: supported architectures:"
msgstr ""
-#: coffdump.c:94
+#: bucomm.c:262
#, c-format
-msgid "#lines %d "
+msgid "%s: bad number: %s"
msgstr ""
-#: coffdump.c:456 sysdump.c:719
+#: coffdump.c:106
#, c-format
-msgid "%s: Print a human readable interpretation of a SYSROFF object file\n"
+msgid "#lines %d "
msgstr ""
-#: coffdump.c:498 srconv.c:1941 sysdump.c:755
+#: coffdump.c:468 sysdump.c:740
#, c-format
-msgid "GNU %s version %s\n"
+msgid "%s: Print a human readable interpretation of a SYSROFF object file\n"
msgstr ""
-#: coffdump.c:516 srconv.c:1975 sysdump.c:775
+#: coffdump.c:531 srconv.c:2029 sysdump.c:799
msgid "no input file specified"
msgstr ""
@@ -428,528 +432,526 @@ msgstr ""
msgid "debug_write_type: illegal type encountered"
msgstr ""
-#: dlltool.c:737 dlltool.c:762 dlltool.c:788
+#: dlltool.c:743 dlltool.c:768 dlltool.c:794
#, c-format
msgid "Internal error: Unknown machine type: %d"
msgstr ""
-#: dlltool.c:825
+#: dlltool.c:831
#, c-format
msgid "Can't open def file: %s"
msgstr ""
-#: dlltool.c:830
+#: dlltool.c:836
#, c-format
msgid "Processing def file: %s"
msgstr ""
-#: dlltool.c:834
+#: dlltool.c:840
msgid "Processed def file"
msgstr ""
-#: dlltool.c:859
+#: dlltool.c:866
#, c-format
msgid "Syntax error in def file %s:%d"
msgstr ""
-#: dlltool.c:892
+#: dlltool.c:905
#, c-format
msgid "NAME: %s base: %x"
msgstr ""
-#: dlltool.c:895 dlltool.c:914
+#: dlltool.c:908 dlltool.c:927
msgid "Can't have LIBRARY and NAME"
msgstr ""
-#: dlltool.c:911
+#: dlltool.c:924
#, c-format
msgid "LIBRARY: %s base: %x"
msgstr ""
-#: dlltool.c:1169 resrc.c:271
+#: dlltool.c:1182 resrc.c:271
#, c-format
msgid "wait: %s"
msgstr ""
-#: dlltool.c:1174 dllwrap.c:456 resrc.c:276
+#: dlltool.c:1187 dllwrap.c:455 resrc.c:276
#, c-format
msgid "subprocess got fatal signal %d"
msgstr ""
-#: dlltool.c:1180 dllwrap.c:463 resrc.c:283
+#: dlltool.c:1193 dllwrap.c:462 resrc.c:283
#, c-format
msgid "%s exited with status %d"
msgstr ""
-#: dlltool.c:1212
+#: dlltool.c:1225
#, c-format
msgid "Sucking in info from %s section in %s"
msgstr ""
-#: dlltool.c:1336
+#: dlltool.c:1349
#, c-format
msgid "Excluding symbol: %s"
msgstr ""
-#: dlltool.c:1431 dlltool.c:1442 nm.c:946 nm.c:957 objdump.c:443 objdump.c:460
+#: dlltool.c:1444 dlltool.c:1455 nm.c:958 nm.c:969 objdump.c:383 objdump.c:400
#, c-format
msgid "%s: no symbols"
msgstr ""
#. FIXME: we ought to read in and block out the base relocations
-#: dlltool.c:1469
+#: dlltool.c:1482
#, c-format
msgid "Done reading %s"
msgstr ""
-#: dlltool.c:1480
+#: dlltool.c:1493
#, c-format
msgid "Unable to open object file: %s"
msgstr ""
-#: dlltool.c:1483
+#: dlltool.c:1496
#, c-format
msgid "Scanning object file %s"
msgstr ""
-#: dlltool.c:1498
+#: dlltool.c:1511
#, c-format
msgid "Cannot produce mcore-elf dll from archive file: %s"
msgstr ""
-#: dlltool.c:1590
+#: dlltool.c:1603
msgid "Adding exports to output file"
msgstr ""
-#: dlltool.c:1635
+#: dlltool.c:1648
msgid "Added exports to output file"
msgstr ""
-#: dlltool.c:1759
+#: dlltool.c:1772
#, c-format
msgid "Generating export file: %s"
msgstr ""
-#: dlltool.c:1764
+#: dlltool.c:1777
#, c-format
msgid "Unable to open temporary assembler file: %s"
msgstr ""
-#: dlltool.c:1767
+#: dlltool.c:1780
#, c-format
msgid "Opened temporary file: %s"
msgstr ""
-#: dlltool.c:1981
+#: dlltool.c:2004
msgid "Generated exports file"
msgstr ""
-#: dlltool.c:2236
+#: dlltool.c:2266
#, c-format
msgid "bfd_open failed open stub file: %s"
msgstr ""
-#: dlltool.c:2239
+#: dlltool.c:2269
#, c-format
msgid "Creating stub file: %s"
msgstr ""
-#: dlltool.c:2626
+#: dlltool.c:2658
#, c-format
msgid "failed to open temporary head file: %s"
msgstr ""
-#: dlltool.c:2685
+#: dlltool.c:2717
#, c-format
msgid "failed to open temporary tail file: %s"
msgstr ""
-#: dlltool.c:2753
+#: dlltool.c:2785
#, c-format
msgid "Can't open .lib file: %s"
msgstr ""
-#: dlltool.c:2756
+#: dlltool.c:2788
#, c-format
msgid "Creating library file: %s"
msgstr ""
-#: dlltool.c:2815
+#: dlltool.c:2847
#, c-format
msgid "cannot delete %s: %s"
msgstr ""
-#: dlltool.c:2819
+#: dlltool.c:2851
msgid "Created lib file"
msgstr ""
-#: dlltool.c:2924
+#: dlltool.c:2956
#, c-format
msgid "Warning, ignoring duplicate EXPORT %s %d,%d"
msgstr ""
-#: dlltool.c:2930
+#: dlltool.c:2962
#, c-format
msgid "Error, duplicate EXPORT with oridinals: %s"
msgstr ""
-#: dlltool.c:3057
+#: dlltool.c:3089
msgid "Processing definitions"
msgstr ""
-#: dlltool.c:3095
+#: dlltool.c:3127
msgid "Processed definitions"
msgstr ""
#. xgetext:c-format
-#: dlltool.c:3106 dllwrap.c:520
+#: dlltool.c:3138 dllwrap.c:519
#, c-format
msgid "Usage %s <options> <object-files>\n"
msgstr ""
#. xgetext:c-format
-#: dlltool.c:3108
+#: dlltool.c:3140
#, c-format
msgid ""
" -m --machine <machine> Create as DLL for <machine>. [default: %s]\n"
msgstr ""
-#: dlltool.c:3109
+#: dlltool.c:3141
msgid ""
" possible <machine>: arm[_interwork], i386, mcore[-elf]{-le|-be}, "
"ppc, thumb\n"
msgstr ""
-#: dlltool.c:3110
+#: dlltool.c:3142
msgid " -e --output-exp <outname> Generate an export file.\n"
msgstr ""
-#: dlltool.c:3111
+#: dlltool.c:3143
msgid " -l --output-lib <outname> Generate an interface library.\n"
msgstr ""
-#: dlltool.c:3112
+#: dlltool.c:3144
msgid " -a --add-indirect Add dll indirects to export file.\n"
msgstr ""
-#: dlltool.c:3113
+#: dlltool.c:3145
msgid ""
" -D --dllname <name> Name of input dll to put into interface lib.\n"
msgstr ""
-#: dlltool.c:3114
+#: dlltool.c:3146
msgid " -d --input-def <deffile> Name of .def file to be read in.\n"
msgstr ""
-#: dlltool.c:3115
+#: dlltool.c:3147
msgid " -z --output-def <deffile> Name of .def file to be created.\n"
msgstr ""
-#: dlltool.c:3116
+#: dlltool.c:3148
msgid " --export-all-symbols Export all symbols to .def\n"
msgstr ""
-#: dlltool.c:3117
+#: dlltool.c:3149
msgid " --no-export-all-symbols Only export listed symbols\n"
msgstr ""
-#: dlltool.c:3118
+#: dlltool.c:3150
msgid " --exclude-symbols <list> Don't export <list>\n"
msgstr ""
-#: dlltool.c:3119
+#: dlltool.c:3151
msgid " --no-default-excludes Clear default exclude symbols\n"
msgstr ""
-#: dlltool.c:3120
+#: dlltool.c:3152
msgid " -b --base-file <basefile> Read linker generated base file.\n"
msgstr ""
-#: dlltool.c:3121
+#: dlltool.c:3153
msgid " -x --no-idata4 Don't generate idata$4 section.\n"
msgstr ""
-#: dlltool.c:3122
+#: dlltool.c:3154
msgid " -c --no-idata5 Don't generate idata$5 section.\n"
msgstr ""
-#: dlltool.c:3123
+#: dlltool.c:3155
msgid ""
" -U --add-underscore Add underscores to symbols in interface "
"library.\n"
msgstr ""
-#: dlltool.c:3124
+#: dlltool.c:3156
msgid " -k --kill-at Kill @<n> from exported names.\n"
msgstr ""
-#: dlltool.c:3125
+#: dlltool.c:3157
msgid " -A --add-stdcall-alias Add aliases without @<n>.\n"
msgstr ""
-#: dlltool.c:3126
+#: dlltool.c:3158
msgid " -S --as <name> Use <name> for assembler.\n"
msgstr ""
-#: dlltool.c:3127
+#: dlltool.c:3159
msgid " -f --as-flags <flags> Pass <flags> to the assembler.\n"
msgstr ""
-#: dlltool.c:3128
+#: dlltool.c:3160
msgid ""
" -C --compat-implib Create backward compatible import library.\n"
msgstr ""
-#: dlltool.c:3129
+#: dlltool.c:3161
msgid ""
" -n --no-delete Keep temp files (repeat for extra "
"preservation).\n"
msgstr ""
-#: dlltool.c:3130
+#: dlltool.c:3162
msgid " -v --verbose Be verbose.\n"
msgstr ""
-#: dlltool.c:3131
+#: dlltool.c:3163
msgid " -V --version Display the program version.\n"
msgstr ""
-#: dlltool.c:3132
+#: dlltool.c:3164
msgid " -h --help Display this information.\n"
msgstr ""
-#: dlltool.c:3134
+#: dlltool.c:3166
msgid ""
" -M --mcore-elf <outname> Process mcore-elf object files into <outname>.\n"
msgstr ""
-#: dlltool.c:3135
+#: dlltool.c:3167
msgid " -L --linker <name> Use <name> as the linker.\n"
msgstr ""
-#: dlltool.c:3136
+#: dlltool.c:3168
msgid " -F --linker-flags <flags> Pass <flags> to the linker.\n"
msgstr ""
-#: dlltool.c:3280
+#: dlltool.c:3315
#, c-format
msgid "Unable to open base-file: %s"
msgstr ""
-#: dlltool.c:3309
+#: dlltool.c:3344
#, c-format
msgid "Machine '%s' not supported"
msgstr ""
-#: dlltool.c:3412 dllwrap.c:241
+#: dlltool.c:3447 dllwrap.c:240
#, c-format
msgid "Tried file: %s"
msgstr ""
-#: dlltool.c:3419 dllwrap.c:248
+#: dlltool.c:3454 dllwrap.c:247
#, c-format
msgid "Using file: %s"
msgstr ""
-#: dllwrap.c:335
+#: dllwrap.c:334
#, c-format
msgid "Keeping temporary base file %s"
msgstr ""
-#: dllwrap.c:337
+#: dllwrap.c:336
#, c-format
msgid "Deleting temporary base file %s"
msgstr ""
-#: dllwrap.c:351
+#: dllwrap.c:350
#, c-format
msgid "Keeping temporary exp file %s"
msgstr ""
-#: dllwrap.c:353
+#: dllwrap.c:352
#, c-format
msgid "Deleting temporary exp file %s"
msgstr ""
-#: dllwrap.c:366
+#: dllwrap.c:365
#, c-format
msgid "Keeping temporary def file %s"
msgstr ""
-#: dllwrap.c:368
+#: dllwrap.c:367
#, c-format
msgid "Deleting temporary def file %s"
msgstr ""
-#: dllwrap.c:521
+#: dllwrap.c:520
msgid " Generic options:\n"
msgstr ""
-#: dllwrap.c:522
+#: dllwrap.c:521
msgid " --quiet, -q Work quietly\n"
msgstr ""
-#: dllwrap.c:523
+#: dllwrap.c:522
msgid " --verbose, -v Verbose\n"
msgstr ""
-#: dllwrap.c:524
+#: dllwrap.c:523
msgid " --version Print dllwrap version\n"
msgstr ""
-#: dllwrap.c:525
+#: dllwrap.c:524
msgid " --implib <outname> Synonym for --output-lib\n"
msgstr ""
-#: dllwrap.c:526
+#: dllwrap.c:525
#, c-format
msgid " Options for %s:\n"
msgstr ""
-#: dllwrap.c:527
+#: dllwrap.c:526
msgid " --driver-name <driver> Defaults to \"gcc\"\n"
msgstr ""
-#: dllwrap.c:528
+#: dllwrap.c:527
msgid " --driver-flags <flags> Override default ld flags\n"
msgstr ""
-#: dllwrap.c:529
+#: dllwrap.c:528
msgid " --dlltool-name <dlltool> Defaults to \"dlltool\"\n"
msgstr ""
-#: dllwrap.c:530
+#: dllwrap.c:529
msgid " --entry <entry> Specify alternate DLL entry point\n"
msgstr ""
-#: dllwrap.c:531
+#: dllwrap.c:530
msgid " --image-base <base> Specify image base address\n"
msgstr ""
-#: dllwrap.c:532
+#: dllwrap.c:531
msgid " --target <machine> i386-cygwin32 or i386-mingw32\n"
msgstr ""
-#: dllwrap.c:533
+#: dllwrap.c:532
msgid " --dry-run Show what needs to be run\n"
msgstr ""
-#: dllwrap.c:534
+#: dllwrap.c:533
msgid " --mno-cygwin Create Mingw DLL\n"
msgstr ""
-#: dllwrap.c:535
+#: dllwrap.c:534
msgid " Options passed to DLLTOOL:\n"
msgstr ""
-#: dllwrap.c:536
+#: dllwrap.c:535
msgid " --machine <machine>\n"
msgstr ""
-#: dllwrap.c:537
+#: dllwrap.c:536
msgid " --output-exp <outname> Generate export file.\n"
msgstr ""
-#: dllwrap.c:538
+#: dllwrap.c:537
msgid " --output-lib <outname> Generate input library.\n"
msgstr ""
-#: dllwrap.c:539
+#: dllwrap.c:538
msgid " --add-indirect Add dll indirects to export file.\n"
msgstr ""
-#: dllwrap.c:540
+#: dllwrap.c:539
msgid " --dllname <name> Name of input dll to put into output lib.\n"
msgstr ""
-#: dllwrap.c:541
+#: dllwrap.c:540
msgid " --def <deffile> Name input .def file\n"
msgstr ""
-#: dllwrap.c:542
+#: dllwrap.c:541
msgid " --output-def <deffile> Name output .def file\n"
msgstr ""
-#: dllwrap.c:543
+#: dllwrap.c:542
msgid " --export-all-symbols Export all symbols to .def\n"
msgstr ""
-#: dllwrap.c:544
+#: dllwrap.c:543
msgid " --no-export-all-symbols Only export .drectve symbols\n"
msgstr ""
-#: dllwrap.c:545
+#: dllwrap.c:544
msgid " --exclude-symbols <list> Exclude <list> from .def\n"
msgstr ""
-#: dllwrap.c:546
+#: dllwrap.c:545
msgid " --no-default-excludes Zap default exclude symbols\n"
msgstr ""
-#: dllwrap.c:547
+#: dllwrap.c:546
msgid " --base-file <basefile> Read linker generated base file\n"
msgstr ""
-#: dllwrap.c:548
+#: dllwrap.c:547
msgid " --no-idata4 Don't generate idata$4 section\n"
msgstr ""
-#: dllwrap.c:549
+#: dllwrap.c:548
msgid " --no-idata5 Don't generate idata$5 section\n"
msgstr ""
-#: dllwrap.c:550
+#: dllwrap.c:549
msgid " -U Add underscores to .lib\n"
msgstr ""
-#: dllwrap.c:551
+#: dllwrap.c:550
msgid " -k Kill @<n> from exported names\n"
msgstr ""
-#: dllwrap.c:552
+#: dllwrap.c:551
msgid " --add-stdcall-alias Add aliases without @<n>\n"
msgstr ""
-#: dllwrap.c:553
+#: dllwrap.c:552
msgid " --as <name> Use <name> for assembler\n"
msgstr ""
-#: dllwrap.c:554
+#: dllwrap.c:553
msgid " --nodelete Keep temp files.\n"
msgstr ""
-#: dllwrap.c:555
+#: dllwrap.c:554
msgid " Rest are passed unmodified to the language driver\n"
msgstr ""
-#: dllwrap.c:816
+#: dllwrap.c:824
msgid "Must provide at least one of -o or --dllname options"
msgstr ""
-#: dllwrap.c:844
-msgid "no export definition file provided"
-msgstr ""
-
-#: dllwrap.c:845
-msgid "creating one, but that may not be what you want"
+#: dllwrap.c:852
+msgid ""
+"no export definition file provided.\n"
+"Creating one, but that may not be what you want"
msgstr ""
-#: dllwrap.c:1006
+#: dllwrap.c:1014
#, c-format
msgid "DLLTOOL name : %s\n"
msgstr ""
-#: dllwrap.c:1007
+#: dllwrap.c:1015
#, c-format
msgid "DLLTOOL options : %s\n"
msgstr ""
-#: dllwrap.c:1008
+#: dllwrap.c:1016
#, c-format
msgid "DRIVER name : %s\n"
msgstr ""
-#: dllwrap.c:1009
+#: dllwrap.c:1017
#, c-format
msgid "DRIVER options : %s\n"
msgstr ""
@@ -1189,119 +1191,119 @@ msgstr ""
msgid "IEEE unsupported complex type size %u\n"
msgstr ""
-#: nlmconv.c:275 srconv.c:1966
+#: nlmconv.c:278 srconv.c:2020
msgid "input and output files must be different"
msgstr ""
-#: nlmconv.c:322
+#: nlmconv.c:325
msgid "input file named both on command line and with INPUT"
msgstr ""
-#: nlmconv.c:331
+#: nlmconv.c:334
msgid "no input file"
msgstr ""
-#: nlmconv.c:361
+#: nlmconv.c:364
msgid "no name for output file"
msgstr ""
-#: nlmconv.c:374
+#: nlmconv.c:377
msgid "warning: input and output formats are not compatible"
msgstr ""
-#: nlmconv.c:403
+#: nlmconv.c:406
msgid "make .bss section"
msgstr ""
-#: nlmconv.c:412
+#: nlmconv.c:415
msgid "make .nlmsections section"
msgstr ""
-#: nlmconv.c:414
+#: nlmconv.c:417
msgid "set .nlmsections flags"
msgstr ""
-#: nlmconv.c:442
+#: nlmconv.c:445
msgid "set .bss vma"
msgstr ""
-#: nlmconv.c:449
+#: nlmconv.c:452
msgid "set .data size"
msgstr ""
-#: nlmconv.c:629
+#: nlmconv.c:632
#, c-format
msgid "warning: symbol %s imported but not in import list"
msgstr ""
-#: nlmconv.c:649
+#: nlmconv.c:652
msgid "set start address"
msgstr ""
-#: nlmconv.c:698
+#: nlmconv.c:701
#, c-format
msgid "warning: START procedure %s not defined"
msgstr ""
-#: nlmconv.c:700
+#: nlmconv.c:703
#, c-format
msgid "warning: EXIT procedure %s not defined"
msgstr ""
-#: nlmconv.c:702
+#: nlmconv.c:705
#, c-format
msgid "warning: CHECK procedure %s not defined"
msgstr ""
-#: nlmconv.c:723 nlmconv.c:912
+#: nlmconv.c:726 nlmconv.c:915
msgid "custom section"
msgstr ""
-#: nlmconv.c:744 nlmconv.c:941
+#: nlmconv.c:747 nlmconv.c:944
msgid "help section"
msgstr ""
-#: nlmconv.c:766 nlmconv.c:959
+#: nlmconv.c:769 nlmconv.c:962
msgid "message section"
msgstr ""
-#: nlmconv.c:782 nlmconv.c:992
+#: nlmconv.c:785 nlmconv.c:995
msgid "module section"
msgstr ""
-#: nlmconv.c:802 nlmconv.c:1008
+#: nlmconv.c:805 nlmconv.c:1011
msgid "rpc section"
msgstr ""
#. There is no place to record this information.
-#: nlmconv.c:838
+#: nlmconv.c:841
#, c-format
msgid "%s: warning: shared libraries can not have uninitialized data"
msgstr ""
-#: nlmconv.c:859 nlmconv.c:1027
+#: nlmconv.c:862 nlmconv.c:1030
msgid "shared section"
msgstr ""
-#: nlmconv.c:867
+#: nlmconv.c:870
msgid "warning: No version number given"
msgstr ""
-#: nlmconv.c:907 nlmconv.c:936 nlmconv.c:954 nlmconv.c:1003 nlmconv.c:1022
+#: nlmconv.c:910 nlmconv.c:939 nlmconv.c:957 nlmconv.c:1006 nlmconv.c:1025
#, c-format
msgid "%s: read: %s"
msgstr ""
-#: nlmconv.c:929
+#: nlmconv.c:932
msgid "warning: MAP and FULLMAP are not supported; try ld -M"
msgstr ""
-#: nlmconv.c:1099
+#: nlmconv.c:1101
#, c-format
msgid "%s: Convert an object file into a NetWare Loadable Module\n"
msgstr ""
-#: nlmconv.c:1111
+#: nlmconv.c:1113
#, c-format
msgid ""
"Usage: %s [-dhV] [-I bfdname] [-O bfdname] [-T header-file] [-l linker]\n"
@@ -1311,73 +1313,73 @@ msgid ""
" [in-file [out-file]]\n"
msgstr ""
-#: nlmconv.c:1151
+#: nlmconv.c:1153
#, c-format
msgid "support not compiled in for %s"
msgstr ""
-#: nlmconv.c:1191
+#: nlmconv.c:1193
msgid "make section"
msgstr ""
-#: nlmconv.c:1205
+#: nlmconv.c:1207
msgid "set section size"
msgstr ""
-#: nlmconv.c:1211
+#: nlmconv.c:1213
msgid "set section alignment"
msgstr ""
-#: nlmconv.c:1215
+#: nlmconv.c:1217
msgid "set section flags"
msgstr ""
-#: nlmconv.c:1226
+#: nlmconv.c:1228
msgid "set .nlmsections size"
msgstr ""
-#: nlmconv.c:1314 nlmconv.c:1322 nlmconv.c:1331 nlmconv.c:1336
+#: nlmconv.c:1316 nlmconv.c:1324 nlmconv.c:1333 nlmconv.c:1338
msgid "set .nlmsection contents"
msgstr ""
-#: nlmconv.c:1839
+#: nlmconv.c:1841
msgid "stub section sizes"
msgstr ""
-#: nlmconv.c:1888
+#: nlmconv.c:1890
msgid "writing stub"
msgstr ""
-#: nlmconv.c:1978
+#: nlmconv.c:1980
#, c-format
msgid "unresolved PC relative reloc against %s"
msgstr ""
-#: nlmconv.c:2042
+#: nlmconv.c:2044
#, c-format
msgid "overflow when adjusting relocation against %s"
msgstr ""
-#: nlmconv.c:2159
+#: nlmconv.c:2161
#, c-format
msgid "%s: execution of %s failed: "
msgstr ""
-#: nlmconv.c:2174
+#: nlmconv.c:2176
#, c-format
msgid "Execution of %s failed"
msgstr ""
-#: nm.c:294
+#: nm.c:300
#, c-format
msgid "Usage: %s [OPTION]... [FILE]...\n"
msgstr ""
-#: nm.c:295
+#: nm.c:301
msgid "List symbols from FILEs (a.out by default).\n"
msgstr ""
-#: nm.c:296
+#: nm.c:302
msgid ""
"\n"
" -a, --debug-syms Display debugger-only symbols\n"
@@ -1415,31 +1417,31 @@ msgid ""
"\n"
msgstr ""
-#: nm.c:328 objdump.c:274
+#: nm.c:334 objdump.c:216
#, c-format
msgid "Report bugs to %s.\n"
msgstr ""
-#: nm.c:361
+#: nm.c:367
#, c-format
msgid "%s: invalid radix"
msgstr ""
-#: nm.c:386
+#: nm.c:392
#, c-format
msgid "%s: invalid output format"
msgstr ""
-#: nm.c:493
+#: nm.c:504
msgid "Only -X 32_64 is supported"
msgstr ""
-#: nm.c:535
+#: nm.c:546
#, c-format
msgid "data size %ld"
msgstr ""
-#: nm.c:1325
+#: nm.c:1340
#, c-format
msgid ""
"\n"
@@ -1448,7 +1450,7 @@ msgid ""
"\n"
msgstr ""
-#: nm.c:1327
+#: nm.c:1342
#, c-format
msgid ""
"\n"
@@ -1457,14 +1459,14 @@ msgid ""
"\n"
msgstr ""
-#: nm.c:1328 nm.c:1382
+#: nm.c:1343 nm.c:1397
msgid ""
"Name Value Class Type Size Line "
"Section\n"
"\n"
msgstr ""
-#: nm.c:1379
+#: nm.c:1394
#, c-format
msgid ""
"\n"
@@ -1473,7 +1475,7 @@ msgid ""
"\n"
msgstr ""
-#: nm.c:1381
+#: nm.c:1396
#, c-format
msgid ""
"\n"
@@ -1482,26 +1484,28 @@ msgid ""
"\n"
msgstr ""
-#: nm.c:1550
+#: nm.c:1564
msgid ""
"\n"
"Archive index:\n"
msgstr ""
-#: objcopy.c:322
+#: objcopy.c:363
#, c-format
-msgid "Usage: %s <switches> in-file [out-file]\n"
+msgid "Usage: %s <options> in-file [out-file]\n"
msgstr ""
-#: objcopy.c:323 objcopy.c:383
-msgid " The switches are:\n"
+#: objcopy.c:364 objcopy.c:433
+msgid " The options are:\n"
msgstr ""
-#: objcopy.c:324
+#: objcopy.c:365
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"
+" -B --binary-architecture <arch> Set arch of output file, when input is "
+"binary\n"
" -F --target <bfdname> Set both input and output format to "
"<bfdname>\n"
" --debugging Convert debugging information, if "
@@ -1519,6 +1523,7 @@ msgid ""
" -K --keep-symbol <name> Only copy symbol <name>\n"
" -L --localize-symbol <name> Force symbol <name> to be marked as a "
"local\n"
+" -G --keep-global-symbol <name> Localize all symbols except <name>\n"
" -W --weaken-symbol <name> Force symbol <name> to be marked as a "
"weak\n"
" --weaken Force all global symbols to be marked as "
@@ -1554,6 +1559,7 @@ msgid ""
"<flags>\n"
" --add-section <name>=<file> Add section <name> found in <file> to "
"output\n"
+" --rename-section <old>=<new>[,<flags>] Rename section <old> to <new>\n"
" --change-leading-char Force output format's leading character "
"style\n"
" --remove-leading-char Remove leading character from global "
@@ -1563,17 +1569,23 @@ msgid ""
"Srecords\n"
" --srec-forceS3 Restrict the type of generated Srecords "
"to S3\n"
+" --strip-symbols <file> -N for all symbols listed in <file>\n"
+" --keep-symbols <file> -K for all symbols listed in <file>\n"
+" --localize-symbols <file> -L for all symbols listed in <file>\n"
+" --keep-global-symbols <file> -G for all symbols listed in <file>\n"
+" --weaken-symbols <file> -W for all symbols listed in <file>\n"
+" --alt-machine-code <index> Use alternate machine code for output\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:382
+#: objcopy.c:432
#, c-format
-msgid "Usage: %s <switches> in-file(s)\n"
+msgid "Usage: %s <options> in-file(s)\n"
msgstr ""
-#: objcopy.c:384
+#: objcopy.c:434
msgid ""
" -I --input-target <bfdname> Assume input file is in format <bfdname>\n"
" -O --output-target <bfdname> Create an output file in format "
@@ -1598,182 +1610,216 @@ msgid ""
" -o <file> Place stripped output into <file>\n"
msgstr ""
-#: objcopy.c:454
+#: objcopy.c:504
#, c-format
msgid "unrecognized section flag `%s'"
msgstr ""
-#: objcopy.c:455
+#: objcopy.c:505
#, c-format
msgid "supported flags: %s"
msgstr ""
-#: objcopy.c:712
+#: objcopy.c:582 objcopy.c:2206
+#, c-format
+msgid "cannot stat: %s: %s"
+msgstr ""
+
+#: objcopy.c:589 objcopy.c:2224
+#, c-format
+msgid "cannot open: %s: %s"
+msgstr ""
+
+#: objcopy.c:592 objcopy.c:2228
+#, c-format
+msgid "%s: fread failed"
+msgstr ""
+
+#: objcopy.c:665
+#, c-format
+msgid "Ignoring rubbish found on line %d of %s"
+msgstr ""
+
+#: objcopy.c:886
#, c-format
msgid "%s: Multiple redefinition of symbol \"%s\""
msgstr ""
-#: objcopy.c:719
+#: objcopy.c:891
#, c-format
msgid "%s: Symbol \"%s\" is target of more than one redefinition"
msgstr ""
-#: objcopy.c:772
+#: objcopy.c:943
msgid "Unable to change endianness of input file(s)"
msgstr ""
-#: objcopy.c:780
+#: objcopy.c:951
#, c-format
msgid "copy from %s(%s) to %s(%s)\n"
msgstr ""
-#: objcopy.c:799
+#: objcopy.c:975
#, c-format
msgid "Warning: Output file cannot represent architecture %s"
msgstr ""
-#: objcopy.c:826
+#: objcopy.c:1002
#, c-format
msgid "can't create section `%s': %s"
msgstr ""
-#: objcopy.c:912
+#: objcopy.c:1088
#, c-format
msgid "Can't fill gap after %s: %s"
msgstr ""
-#: objcopy.c:937
+#: objcopy.c:1113
#, c-format
msgid "Can't add padding to %s: %s"
msgstr ""
-#: objcopy.c:1075
+#: objcopy.c:1252
#, c-format
msgid "%s: error copying private BFD data: %s"
msgstr ""
-#: objcopy.c:1109
+#: objcopy.c:1265
+msgid "unknown alternate machine code, ignored"
+msgstr ""
+
+#: objcopy.c:1295
#, c-format
msgid "cannot mkdir %s for archive copying (error: %s)"
msgstr ""
-#: objcopy.c:1298
+#: objcopy.c:1466
+#, c-format
+msgid "Multiple renames of section %s"
+msgstr ""
+
+#: objcopy.c:1550
msgid "making"
msgstr ""
-#: objcopy.c:1307
+#: objcopy.c:1559
msgid "size"
msgstr ""
-#: objcopy.c:1321
+#: objcopy.c:1573
msgid "vma"
msgstr ""
-#: objcopy.c:1347
+#: objcopy.c:1599
msgid "alignment"
msgstr ""
-#: objcopy.c:1356
+#: objcopy.c:1607
msgid "flags"
msgstr ""
-#: objcopy.c:1370
+#: objcopy.c:1624
msgid "private data"
msgstr ""
-#: objcopy.c:1378
+#: objcopy.c:1632
#, c-format
msgid "%s: section `%s': error in %s: %s"
msgstr ""
-#: objcopy.c:1652
+#: objcopy.c:1910
#, c-format
msgid "%s: can't create debugging section: %s"
msgstr ""
-#: objcopy.c:1667
+#: objcopy.c:1925
#, c-format
msgid "%s: can't set debugging section contents: %s"
msgstr ""
-#: objcopy.c:1676
+#: objcopy.c:1934
#, c-format
msgid "%s: don't know how to write debugging information for %s"
msgstr ""
-#: objcopy.c:1782
+#: objcopy.c:2041
#, c-format
msgid "%s: cannot stat: %s"
msgstr ""
-#: objcopy.c:1832
+#: objcopy.c:2092
msgid "byte number must be non-negative"
msgstr ""
-#: objcopy.c:1838
+#: objcopy.c:2102
msgid "interleave must be positive"
msgstr ""
-#: objcopy.c:1858 objcopy.c:1866
+#: objcopy.c:2122 objcopy.c:2130
#, c-format
msgid "%s both copied and removed"
msgstr ""
-#: objcopy.c:1935 objcopy.c:2005 objcopy.c:2106 objcopy.c:2134
+#: objcopy.c:2203 objcopy.c:2273 objcopy.c:2373 objcopy.c:2400 objcopy.c:2424
+#: objcopy.c:2428 objcopy.c:2448
#, c-format
msgid "bad format for %s"
msgstr ""
-#: objcopy.c:1938
+#: objcopy.c:2342
#, c-format
-msgid "cannot stat: %s: %s"
+msgid "Warning: truncating gap-fill from 0x%s to 0x%x"
msgstr ""
-#: objcopy.c:1956
-#, c-format
-msgid "cannot open: %s: %s"
+#: objcopy.c:2494
+msgid "alternate machine code index must be positive"
msgstr ""
-#: objcopy.c:1960
-#, c-format
-msgid "%s: fread failed"
+#: objcopy.c:2512
+msgid "byte number must be less than interleave"
msgstr ""
-#: objcopy.c:2074
+#: objcopy.c:2539
#, c-format
-msgid "Warning: truncating gap-fill from 0x%s to 0x%x"
+msgid "architecture %s unknown"
msgstr ""
-#: objcopy.c:2176
-msgid "byte number must be less than interleave"
+#: objcopy.c:2543
+msgid ""
+"Warning: input target 'binary' required for binary architecture parameter."
+msgstr ""
+
+#: objcopy.c:2544
+#, c-format
+msgid " Argument %s ignored"
msgstr ""
-#: objcopy.c:2195
+#: objcopy.c:2550
#, c-format
msgid "Cannot stat: %s: %s"
msgstr ""
-#: objcopy.c:2235 objcopy.c:2249
+#: objcopy.c:2590 objcopy.c:2604
#, c-format
msgid "%s %s%c0x%s never used"
msgstr ""
-#: objdump.c:223
+#: objdump.c:164
#, c-format
msgid "Usage: %s OPTION... FILE...\n"
msgstr ""
-#: objdump.c:224
+#: objdump.c:165
msgid "Display information from object FILE.\n"
msgstr ""
-#: objdump.c:225
+#: objdump.c:166
msgid ""
"\n"
" At least one of the following switches must be given:\n"
msgstr ""
-#: objdump.c:226
+#: objdump.c:167
msgid ""
" -a, --archive-headers Display archive header information\n"
" -f, --file-headers Display the contents of the overall file header\n"
@@ -1799,13 +1845,13 @@ msgid ""
" -H, --help Display this information\n"
msgstr ""
-#: objdump.c:248
+#: objdump.c:189
msgid ""
"\n"
" The following switches are optional:\n"
msgstr ""
-#: objdump.c:249
+#: objdump.c:190
msgid ""
" -b, --target=BFDNAME Specify the target object format as "
"BFDNAME\n"
@@ -1838,130 +1884,130 @@ msgid ""
"\n"
msgstr ""
-#: objdump.c:419
+#: objdump.c:359
msgid "Sections:\n"
msgstr ""
-#: objdump.c:422
+#: objdump.c:362
msgid "Idx Name Size VMA LMA File off Algn"
msgstr ""
-#: objdump.c:424
+#: objdump.c:364
msgid ""
"Idx Name Size VMA LMA File off "
"Algn"
msgstr ""
-#: objdump.c:428
+#: objdump.c:368
msgid " Flags"
msgstr ""
-#: objdump.c:478
+#: objdump.c:418
#, c-format
msgid "%s: not a dynamic object"
msgstr ""
-#: objdump.c:494
+#: objdump.c:434
#, c-format
msgid "%s: No dynamic symbols"
msgstr ""
-#: objdump.c:1197
+#: objdump.c:1124
msgid "Out of virtual memory"
msgstr ""
-#: objdump.c:1616
+#: objdump.c:1553
#, c-format
msgid "Can't use supplied machine %s"
msgstr ""
-#: objdump.c:1634
+#: objdump.c:1571
#, c-format
msgid "Can't disassemble for architecture %s\n"
msgstr ""
-#: objdump.c:1716
+#: objdump.c:1653
#, c-format
msgid "Disassembly of section %s:\n"
msgstr ""
-#: objdump.c:1890
+#: objdump.c:1828
#, c-format
msgid ""
"No %s section present\n"
"\n"
msgstr ""
-#: objdump.c:1897
+#: objdump.c:1835
#, c-format
msgid "%s has no %s section"
msgstr ""
-#: objdump.c:1911
+#: objdump.c:1849
#, c-format
msgid "Reading %s section of %s failed: %s"
msgstr ""
-#: objdump.c:1923
+#: objdump.c:1861
#, c-format
msgid "Reading %s section of %s failed: %s\n"
msgstr ""
-#: objdump.c:1966
+#: objdump.c:1904
#, c-format
msgid ""
"Contents of %s section:\n"
"\n"
msgstr ""
-#: objdump.c:2066
+#: objdump.c:2004
#, c-format
msgid "architecture: %s, "
msgstr ""
-#: objdump.c:2069
+#: objdump.c:2007
#, c-format
msgid "flags 0x%08x:\n"
msgstr ""
-#: objdump.c:2082
+#: objdump.c:2020
msgid ""
"\n"
"start address 0x"
msgstr ""
-#: objdump.c:2114
+#: objdump.c:2052
#, c-format
msgid ""
"\n"
"%s: file format %s\n"
msgstr ""
-#: objdump.c:2156
+#: objdump.c:2094
#, c-format
msgid "%s: printing debugging information failed"
msgstr ""
-#: objdump.c:2233
+#: objdump.c:2171
#, c-format
msgid "In archive %s:\n"
msgstr ""
-#: objdump.c:2285
+#: objdump.c:2223
#, c-format
msgid "Contents of section %s:\n"
msgstr ""
-#: objdump.c:2798
+#: objdump.c:2736
#, c-format
msgid "BFD header file version %s\n"
msgstr ""
-#: objdump.c:2882
+#: objdump.c:2825
msgid "unrecognized -E option"
msgstr ""
-#: objdump.c:2893
+#: objdump.c:2836
#, c-format
msgid "unrecognized --endian type `%s'"
msgstr ""
@@ -2000,1017 +2046,1065 @@ msgstr ""
msgid "Last stabs entries before error:\n"
msgstr ""
-#: readelf.c:271
-#, c-format
-msgid "Unable to seek to start of %s at %x\n"
-msgstr ""
-
-#: readelf.c:279
+#: readelf.c:318
#, c-format
-msgid "Out of memory allocating %d bytes for %s\n"
+msgid "%s: Error: "
msgstr ""
-#: readelf.c:285
+#: readelf.c:329
#, c-format
-msgid "Unable to read in %d bytes of %s\n"
+msgid "%s: Warning: "
msgstr ""
-#: readelf.c:295
+#: readelf.c:351
#, c-format
msgid "Unable to seek to %x for %s\n"
msgstr ""
-#: readelf.c:300
-#, c-format
-msgid "Unable to read data at %x for %s\n"
-msgstr ""
-
-#: readelf.c:315 readelf.c:341
+#: readelf.c:362
#, c-format
-msgid "%s: Error: "
+msgid "Out of memory allocating %d bytes for %s\n"
msgstr ""
-#: readelf.c:327 readelf.c:356
+#: readelf.c:370
#, c-format
-msgid "%s: Warning: "
+msgid "Unable to read in %d bytes of %s\n"
msgstr ""
-#: readelf.c:409 readelf.c:548
+#: readelf.c:423 readelf.c:581
#, c-format
msgid "Unhandled data length: %d\n"
msgstr ""
-#: readelf.c:612
+#: readelf.c:660
msgid "Don't know about relocations on this machine architecture\n"
msgstr ""
-#: readelf.c:643 readelf.c:670 readelf.c:713 readelf.c:738
+#: readelf.c:682 readelf.c:711 readelf.c:757 readelf.c:784
+msgid "relocs"
+msgstr ""
+
+#: readelf.c:693 readelf.c:722 readelf.c:767 readelf.c:794
msgid "out of memory parsing relocs"
msgstr ""
-#: readelf.c:787
+#: readelf.c:845
msgid ""
-" Offset Info Type Symbol's Value Symbol's Name "
+" Offset Info Type Symbol's Value Symbol's Name "
"Addend\n"
msgstr ""
-#: readelf.c:790
-msgid " Offset Info Type Symbol's Value Symbol's Name\n"
+#: readelf.c:848
+msgid " Offset Info Type Symbol's Value Symbol's Name\n"
+msgstr ""
+
+#: readelf.c:854
+msgid ""
+" Offset Info Type Symbol's Value "
+"Symbol's Name Addend\n"
+msgstr ""
+
+#: readelf.c:857
+msgid ""
+" Offset Info Type Symbol's Value "
+"Symbol's Name\n"
msgstr ""
-#: readelf.c:950 readelf.c:952
+#: readelf.c:1061 readelf.c:1063
#, c-format
msgid "unrecognised: %-7lx"
msgstr ""
-#: readelf.c:977
+#: readelf.c:1085
#, c-format
msgid "<string table index %3ld>"
msgstr ""
-#: readelf.c:1193
+#: readelf.c:1315
#, c-format
msgid "Processor Specific: %lx"
msgstr ""
-#: readelf.c:1212
+#: readelf.c:1334
#, c-format
msgid "Operating System specific: %lx"
msgstr ""
-#: readelf.c:1215 readelf.c:1756
+#: readelf.c:1337 readelf.c:1961
#, c-format
msgid "<unknown>: %lx"
msgstr ""
-#: readelf.c:1229
+#: readelf.c:1351
msgid "NONE (None)"
msgstr ""
-#: readelf.c:1230
+#: readelf.c:1352
msgid "REL (Relocatable file)"
msgstr ""
-#: readelf.c:1231
+#: readelf.c:1353
msgid "EXEC (Executable file)"
msgstr ""
-#: readelf.c:1232
+#: readelf.c:1354
msgid "DYN (Shared object file)"
msgstr ""
-#: readelf.c:1233
+#: readelf.c:1355
msgid "CORE (Core file)"
msgstr ""
-#: readelf.c:1237
+#: readelf.c:1359
#, c-format
msgid "Processor Specific: (%x)"
msgstr ""
-#: readelf.c:1239
+#: readelf.c:1361
#, c-format
msgid "OS Specific: (%x)"
msgstr ""
-#: readelf.c:1241 readelf.c:1327 readelf.c:1907
+#: readelf.c:1363 readelf.c:1460 readelf.c:2112
#, c-format
msgid "<unknown>: %x"
msgstr ""
-#: readelf.c:1254
+#: readelf.c:1376
msgid "None"
msgstr ""
-#: readelf.c:1946
+#: readelf.c:2152
msgid "Usage: readelf {options} elf-file(s)\n"
msgstr ""
-#: readelf.c:1947
+#: readelf.c:2153
msgid " Options are:\n"
msgstr ""
-#: readelf.c:1948
+#: readelf.c:2154
msgid " -a or --all Equivalent to: -h -l -S -s -r -d -V -A -I\n"
msgstr ""
-#: readelf.c:1949
+#: readelf.c:2155
msgid " -h or --file-header Display the ELF file header\n"
msgstr ""
-#: readelf.c:1950
+#: readelf.c:2156
msgid " -l or --program-headers or --segments\n"
msgstr ""
-#: readelf.c:1951
+#: readelf.c:2157
msgid " Display the program headers\n"
msgstr ""
-#: readelf.c:1952
+#: readelf.c:2158
msgid " -S or --section-headers or --sections\n"
msgstr ""
-#: readelf.c:1953
+#: readelf.c:2159
msgid " Display the sections' header\n"
msgstr ""
-#: readelf.c:1954
+#: readelf.c:2160
msgid " -e or --headers Equivalent to: -h -l -S\n"
msgstr ""
-#: readelf.c:1955
+#: readelf.c:2161
msgid " -s or --syms or --symbols Display the symbol table\n"
msgstr ""
-#: readelf.c:1956
+#: readelf.c:2162
msgid " -n or --notes Display the core notes (if present)\n"
msgstr ""
-#: readelf.c:1957
+#: readelf.c:2163
msgid " -r or --relocs Display the relocations (if present)\n"
msgstr ""
-#: readelf.c:1958
+#: readelf.c:2164
msgid " -u or --unwind Display the unwind info (if present)\n"
msgstr ""
-#: readelf.c:1959
+#: readelf.c:2165
msgid " -d or --dynamic Display the dynamic segment (if present)\n"
msgstr ""
-#: readelf.c:1960
+#: readelf.c:2166
msgid " -V or --version-info Display the version sections (if present)\n"
msgstr ""
-#: readelf.c:1961
+#: readelf.c:2167
msgid ""
" -A or --arch-specific Display architecture specific information (if "
"any).\n"
msgstr ""
-#: readelf.c:1962
+#: readelf.c:2168
msgid ""
" -D or --use-dynamic Use the dynamic section info when displaying "
"symbols\n"
msgstr ""
-#: readelf.c:1963
+#: readelf.c:2169
msgid " -x <number> or --hex-dump=<number>\n"
msgstr ""
-#: readelf.c:1964
+#: readelf.c:2170
msgid " Dump the contents of section <number>\n"
msgstr ""
-#: readelf.c:1965
+#: readelf.c:2171
msgid ""
-" -w[liaprf] or --debug-dump[=line,=info,=abbrev,=pubnames,=ranges,=frames]\n"
+" -w[liaprmfs] or --debug-dump[=line,=info,=abbrev,=pubnames,=ranges,=macro,"
+"=frames,=str]\n"
msgstr ""
-#: readelf.c:1966
+#: readelf.c:2172
msgid ""
" Display the contents of DWARF2 debug sections\n"
msgstr ""
-#: readelf.c:1968
+#: readelf.c:2174
msgid " -i <number> or --instruction-dump=<number>\n"
msgstr ""
-#: readelf.c:1969
+#: readelf.c:2175
msgid ""
" Disassemble the contents of section <number>\n"
msgstr ""
-#: readelf.c:1971
+#: readelf.c:2177
msgid " -I or --histogram Display histogram of bucket list lengths\n"
msgstr ""
-#: readelf.c:1972
+#: readelf.c:2178
msgid " -v or --version Display the version number of readelf\n"
msgstr ""
-#: readelf.c:1973
+#: readelf.c:2179
+msgid ""
+" -W or --wide Don't split lines or truncate symbols to fit "
+"into 80 columns\n"
+msgstr ""
+
+#: readelf.c:2180
msgid " -H or --help Display this information\n"
msgstr ""
-#: readelf.c:1991
+#: readelf.c:2198
msgid "Out of memory allocating dump request table."
msgstr ""
-#: readelf.c:2136
+#: readelf.c:2357
#, c-format
msgid "Unrecognised debug option '%s'\n"
msgstr ""
-#: readelf.c:2161
+#: readelf.c:2385
#, c-format
msgid "Invalid option '-%c'\n"
msgstr ""
-#: readelf.c:2174
+#: readelf.c:2398
msgid "Nothing to do.\n"
msgstr ""
-#: readelf.c:2187 readelf.c:2204 readelf.c:4267
+#: readelf.c:2411 readelf.c:2428 readelf.c:4700
msgid "none"
msgstr ""
-#: readelf.c:2188
-msgid "ELF32"
-msgstr ""
-
-#: readelf.c:2189
-msgid "ELF64"
-msgstr ""
-
-#: readelf.c:2191 readelf.c:2208 readelf.c:2236
+#: readelf.c:2415 readelf.c:2432 readelf.c:2460
#, c-format
msgid "<unknown: %x>"
msgstr ""
-#: readelf.c:2205
+#: readelf.c:2429
msgid "2's complement, little endian"
msgstr ""
-#: readelf.c:2206
+#: readelf.c:2430
msgid "2's complement, big endian"
msgstr ""
-#: readelf.c:2221
-msgid "UNIX - System V"
-msgstr ""
-
-#: readelf.c:2222
-msgid "UNIX - HP-UX"
-msgstr ""
-
-#: readelf.c:2223
-msgid "UNIX - NetBSD"
-msgstr ""
-
-#: readelf.c:2224
-msgid "UNIX - Linux"
-msgstr ""
-
-#: readelf.c:2225
-msgid "GNU/Hurd"
-msgstr ""
-
-#: readelf.c:2226
-msgid "UNIX - Solaris"
-msgstr ""
-
-#: readelf.c:2227
-msgid "UNIX - AIX"
-msgstr ""
-
-#: readelf.c:2228
-msgid "UNIX - IRIX"
-msgstr ""
-
-#: readelf.c:2229
-msgid "UNIX - FreeBSD"
-msgstr ""
-
-#: readelf.c:2230
-msgid "UNIX - TRU64"
-msgstr ""
-
-#: readelf.c:2231
-msgid "Novell - Modesto"
-msgstr ""
-
-#: readelf.c:2232
-msgid "UNIX - OpenBSD"
-msgstr ""
-
-#: readelf.c:2233
+#: readelf.c:2457
msgid "Standalone App"
msgstr ""
-#: readelf.c:2234
-msgid "ARM"
-msgstr ""
-
-#: readelf.c:2251
+#: readelf.c:2475
msgid "Not an ELF file - it has the wrong magic bytes at the start\n"
msgstr ""
-#: readelf.c:2259
+#: readelf.c:2483
msgid "ELF Header:\n"
msgstr ""
-#: readelf.c:2260
+#: readelf.c:2484
msgid " Magic: "
msgstr ""
-#: readelf.c:2264
+#: readelf.c:2488
#, c-format
msgid " Class: %s\n"
msgstr ""
-#: readelf.c:2266
+#: readelf.c:2490
#, c-format
msgid " Data: %s\n"
msgstr ""
-#: readelf.c:2268
+#: readelf.c:2492
#, c-format
msgid " Version: %d %s\n"
msgstr ""
-#: readelf.c:2275
+#: readelf.c:2499
#, c-format
msgid " OS/ABI: %s\n"
msgstr ""
-#: readelf.c:2277
+#: readelf.c:2501
#, c-format
msgid " ABI Version: %d\n"
msgstr ""
-#: readelf.c:2279
+#: readelf.c:2503
#, c-format
msgid " Type: %s\n"
msgstr ""
-#: readelf.c:2281
+#: readelf.c:2505
#, c-format
msgid " Machine: %s\n"
msgstr ""
-#: readelf.c:2283
+#: readelf.c:2507
#, c-format
msgid " Version: 0x%lx\n"
msgstr ""
-#: readelf.c:2286
+#: readelf.c:2510
msgid " Entry point address: "
msgstr ""
-#: readelf.c:2288
+#: readelf.c:2512
msgid ""
"\n"
" Start of program headers: "
msgstr ""
-#: readelf.c:2290
+#: readelf.c:2514
msgid ""
" (bytes into file)\n"
" Start of section headers: "
msgstr ""
-#: readelf.c:2292
+#: readelf.c:2516
msgid " (bytes into file)\n"
msgstr ""
-#: readelf.c:2294
+#: readelf.c:2518
#, c-format
msgid " Flags: 0x%lx%s\n"
msgstr ""
-#: readelf.c:2297
+#: readelf.c:2521
#, c-format
msgid " Size of this header: %ld (bytes)\n"
msgstr ""
-#: readelf.c:2299
+#: readelf.c:2523
#, c-format
msgid " Size of program headers: %ld (bytes)\n"
msgstr ""
-#: readelf.c:2301
+#: readelf.c:2525
#, c-format
msgid " Number of program headers: %ld\n"
msgstr ""
-#: readelf.c:2303
+#: readelf.c:2527
#, c-format
msgid " Size of section headers: %ld (bytes)\n"
msgstr ""
-#: readelf.c:2305
+#: readelf.c:2529
#, c-format
-msgid " Number of section headers: %ld\n"
+msgid " Number of section headers: %ld"
msgstr ""
-#: readelf.c:2307
+#: readelf.c:2534
#, c-format
-msgid " Section header string table index: %ld\n"
+msgid " Section header string table index: %ld"
+msgstr ""
+
+#: readelf.c:2568 readelf.c:2604
+msgid "program headers"
msgstr ""
-#: readelf.c:2392
+#: readelf.c:2638
msgid ""
"\n"
"There are no program headers in this file.\n"
msgstr ""
-#: readelf.c:2398
+#: readelf.c:2644
#, c-format
msgid ""
"\n"
"Elf file type is %s\n"
msgstr ""
-#: readelf.c:2399
+#: readelf.c:2645
msgid "Entry point "
msgstr ""
-#: readelf.c:2401
+#: readelf.c:2647
#, c-format
msgid ""
"\n"
"There are %d program headers, starting at offset "
msgstr ""
-#: readelf.c:2412 readelf.c:2588 readelf.c:2630 readelf.c:2673 readelf.c:2714
-#: readelf.c:3660 readelf.c:3701 readelf.c:3877 readelf.c:4798 readelf.c:4812
-#: readelf.c:8251 readelf.c:8291
+#: readelf.c:2658 readelf.c:2883 readelf.c:2929 readelf.c:2992 readelf.c:3059
+#: readelf.c:4087 readelf.c:4130 readelf.c:4310 readelf.c:5246 readelf.c:5260
+#: readelf.c:9246 readelf.c:9286
msgid "Out of memory\n"
msgstr ""
-#: readelf.c:2430
+#: readelf.c:2676
#, c-format
msgid ""
"\n"
"Program Header%s:\n"
msgstr ""
-#: readelf.c:2434
+#: readelf.c:2680
msgid ""
" Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align\n"
msgstr ""
-#: readelf.c:2438
+#: readelf.c:2683
+msgid ""
+" Type Offset VirtAddr PhysAddr FileSiz "
+"MemSiz Flg Align\n"
+msgstr ""
+
+#: readelf.c:2687
msgid " Type Offset VirtAddr PhysAddr\n"
msgstr ""
-#: readelf.c:2440
+#: readelf.c:2689
msgid " FileSiz MemSiz Flags Align\n"
msgstr ""
-#: readelf.c:2498
+#: readelf.c:2789
msgid "more than one dynamic segment\n"
msgstr ""
-#: readelf.c:2506
+#: readelf.c:2797
msgid "Unable to find program interpreter name\n"
msgstr ""
-#: readelf.c:2513
+#: readelf.c:2804
#, c-format
msgid ""
"\n"
" [Requesting program interpreter: %s]"
msgstr ""
-#: readelf.c:2531
+#: readelf.c:2822
msgid ""
"\n"
" Section to Segment mapping:\n"
msgstr ""
-#: readelf.c:2532
+#: readelf.c:2823
msgid " Segment Sections...\n"
msgstr ""
-#: readelf.c:2796
+#: readelf.c:2874 readelf.c:2920
+msgid "section headers"
+msgstr ""
+
+#: readelf.c:2968 readelf.c:3035
+msgid "symbols"
+msgstr ""
+
+#: readelf.c:2979 readelf.c:3046
+msgid "symtab shndx"
+msgstr ""
+
+#: readelf.c:3147
msgid ""
"\n"
"There are no sections in this file.\n"
msgstr ""
-#: readelf.c:2802
+#: readelf.c:3153
#, c-format
msgid "There are %d section headers, starting at offset 0x%lx:\n"
msgstr ""
-#: readelf.c:2840
+#: readelf.c:3170 readelf.c:3479 readelf.c:3826 readelf.c:5397
+msgid "string table"
+msgstr ""
+
+#: readelf.c:3191
msgid "File contains multiple dynamic symbol tables\n"
msgstr ""
-#: readelf.c:2853
+#: readelf.c:3203
msgid "File contains multiple dynamic string tables\n"
msgstr ""
-#: readelf.c:2888
+#: readelf.c:3209
+msgid "dynamic strings"
+msgstr ""
+
+#: readelf.c:3215
+msgid "File contains multiple symtab shndx tables\n"
+msgstr ""
+
+#: readelf.c:3250
#, c-format
msgid ""
"\n"
"Section Header%s:\n"
msgstr ""
-#: readelf.c:2892
+#: readelf.c:3254
msgid ""
" [Nr] Name Type Addr Off Size ES Flg Lk "
"Inf Al\n"
msgstr ""
-#: readelf.c:2895
-msgid " [Nr] Name Type Address Offset\n"
-msgstr ""
-
-#: readelf.c:2896
-msgid " Size EntSize Flags Link Info Align\n"
-msgstr ""
-
-#: readelf.c:2943
-msgid "Key to Flags:\n"
+#: readelf.c:3257
+msgid ""
+" [Nr] Name Type Address Off Size ES "
+"Flg Lk Inf Al\n"
msgstr ""
-#: readelf.c:2944
-msgid " W (write), A (alloc), X (execute), M (merge), S (strings)\n"
+#: readelf.c:3260
+msgid " [Nr] Name Type Address Offset\n"
msgstr ""
-#: readelf.c:2945
-msgid " I (info), L (link order), G (group), x (unknown)\n"
+#: readelf.c:3261
+msgid " Size EntSize Flags Link Info Align\n"
msgstr ""
-#: readelf.c:2946
+#: readelf.c:3356
msgid ""
+"Key to Flags:\n"
+" W (write), A (alloc), X (execute), M (merge), S (strings)\n"
+" I (info), L (link order), G (group), x (unknown)\n"
" O (extra OS processing required) o (OS specific), p (processor specific)\n"
msgstr ""
-#: readelf.c:3004
+#: readelf.c:3417
#, c-format
msgid ""
"\n"
"Relocation section at offset 0x%lx contains %ld bytes:\n"
msgstr ""
-#: readelf.c:3011
+#: readelf.c:3424
msgid ""
"\n"
"There are no dynamic relocations in this file.\n"
msgstr ""
-#: readelf.c:3039
+#: readelf.c:3451
msgid ""
"\n"
"Relocation section "
msgstr ""
-#: readelf.c:3046 readelf.c:3480
+#: readelf.c:3458 readelf.c:3905
#, c-format
msgid " at offset 0x%lx contains %lu entries:\n"
msgstr ""
-#: readelf.c:3074
+#: readelf.c:3496
msgid ""
"\n"
"There are no relocations in this file.\n"
msgstr ""
-#: readelf.c:3318 readelf.c:3330
+#: readelf.c:3692
+msgid "unwind table"
+msgstr ""
+
+#: readelf.c:3743 readelf.c:3755 readelf.c:7608 readelf.c:7619
#, c-format
-msgid "Skipping unexpected symbol type %u"
+msgid "Skipping unexpected symbol type %u\n"
msgstr ""
-#: readelf.c:3338
+#: readelf.c:3763
#, c-format
-msgid "Skipping unexpected relocation type %s"
+msgid "Skipping unexpected relocation type %s\n"
msgstr ""
-#: readelf.c:3383 readelf.c:3408
+#: readelf.c:3808 readelf.c:3833
msgid ""
"\n"
"There are no unwind sections in this file.\n"
msgstr ""
-#: readelf.c:3459
+#: readelf.c:3884
msgid ""
"\n"
"Could not find unwind info section for "
msgstr ""
-#: readelf.c:3473
+#: readelf.c:3896
+msgid "unwind info"
+msgstr ""
+
+#: readelf.c:3898
msgid ""
"\n"
"Unwind section "
msgstr ""
-#: readelf.c:3754
+#: readelf.c:4071 readelf.c:4114
+msgid "dynamic segment"
+msgstr ""
+
+#: readelf.c:4183
msgid ""
"\n"
"There is no dynamic segment in this file.\n"
msgstr ""
-#: readelf.c:3788
+#: readelf.c:4217
msgid "Unable to seek to end of file!"
msgstr ""
-#: readelf.c:3797
+#: readelf.c:4228
msgid "Unable to determine the number of symbols to load\n"
msgstr ""
-#: readelf.c:3827
+#: readelf.c:4258
msgid "Unable to seek to end of file\n"
msgstr ""
-#: readelf.c:3833
+#: readelf.c:4264
msgid "Unable to determine the length of the dynamic string table\n"
msgstr ""
-#: readelf.c:3894
+#: readelf.c:4269
+msgid "dynamic string table"
+msgstr ""
+
+#: readelf.c:4303
+msgid "symbol information"
+msgstr ""
+
+#: readelf.c:4327
#, c-format
msgid ""
"\n"
"Dynamic segment at offset 0x%x contains %ld entries:\n"
msgstr ""
-#: readelf.c:3897
+#: readelf.c:4330
msgid " Tag Type Name/Value\n"
msgstr ""
-#: readelf.c:3933
+#: readelf.c:4366
msgid "Auxiliary library"
msgstr ""
-#: readelf.c:3937
+#: readelf.c:4370
msgid "Filter library"
msgstr ""
-#: readelf.c:3941
+#: readelf.c:4374
msgid "Configuration file"
msgstr ""
-#: readelf.c:3945
+#: readelf.c:4378
msgid "Dependency audit library"
msgstr ""
-#: readelf.c:3949
+#: readelf.c:4382
msgid "Audit library"
msgstr ""
-#: readelf.c:3967 readelf.c:3993 readelf.c:4019
+#: readelf.c:4400 readelf.c:4426 readelf.c:4452
msgid "Flags:"
msgstr ""
-#: readelf.c:3969 readelf.c:3995 readelf.c:4021
+#: readelf.c:4402 readelf.c:4428 readelf.c:4454
msgid " None\n"
msgstr ""
-#: readelf.c:4140
+#: readelf.c:4573
#, c-format
msgid "Shared library: [%s]"
msgstr ""
-#: readelf.c:4143
+#: readelf.c:4576
msgid " program interpreter"
msgstr ""
-#: readelf.c:4147
+#: readelf.c:4580
#, c-format
msgid "Library soname: [%s]"
msgstr ""
-#: readelf.c:4151
+#: readelf.c:4584
#, c-format
msgid "Library rpath: [%s]"
msgstr ""
-#: readelf.c:4155
+#: readelf.c:4588
#, c-format
msgid "Library runpath: [%s]"
msgstr ""
-#: readelf.c:4216
+#: readelf.c:4649
#, c-format
msgid "Not needed object: [%s]\n"
msgstr ""
-#: readelf.c:4313
+#: readelf.c:4746
#, c-format
msgid ""
"\n"
"Version definition section '%s' contains %ld entries:\n"
msgstr ""
-#: readelf.c:4316
+#: readelf.c:4749
msgid " Addr: 0x"
msgstr ""
-#: readelf.c:4318 readelf.c:4506
+#: readelf.c:4751 readelf.c:4946
#, c-format
msgid " Offset: %#08lx Link: %lx (%s)\n"
msgstr ""
-#: readelf.c:4348
+#: readelf.c:4758
+msgid "version definition section"
+msgstr ""
+
+#: readelf.c:4784
#, c-format
msgid " %#06x: Rev: %d Flags: %s"
msgstr ""
-#: readelf.c:4351
+#: readelf.c:4787
#, c-format
msgid " Index: %d Cnt: %d "
msgstr ""
-#: readelf.c:4362
+#: readelf.c:4798
#, c-format
msgid "Name: %s\n"
msgstr ""
-#: readelf.c:4364
+#: readelf.c:4800
#, c-format
msgid "Name index: %ld\n"
msgstr ""
-#: readelf.c:4379
+#: readelf.c:4815
#, c-format
msgid " %#06x: Parent %d: %s\n"
msgstr ""
-#: readelf.c:4382
+#: readelf.c:4818
#, c-format
msgid " %#06x: Parent %d, name index: %ld\n"
msgstr ""
-#: readelf.c:4401
+#: readelf.c:4837
#, c-format
msgid ""
"\n"
"Version needs section '%s' contains %ld entries:\n"
msgstr ""
-#: readelf.c:4404
+#: readelf.c:4840
msgid " Addr: 0x"
msgstr ""
-#: readelf.c:4406
+#: readelf.c:4842
#, c-format
msgid " Offset: %#08lx Link to section: %ld (%s)\n"
msgstr ""
-#: readelf.c:4432
+#: readelf.c:4848
+msgid "version need section"
+msgstr ""
+
+#: readelf.c:4870
#, c-format
msgid " %#06x: Version: %d"
msgstr ""
-#: readelf.c:4435
+#: readelf.c:4873
#, c-format
msgid " File: %s"
msgstr ""
-#: readelf.c:4437
+#: readelf.c:4875
#, c-format
msgid " File: %lx"
msgstr ""
-#: readelf.c:4439
+#: readelf.c:4877
#, c-format
msgid " Cnt: %d\n"
msgstr ""
-#: readelf.c:4457
+#: readelf.c:4895
#, c-format
msgid " %#06x: Name: %s"
msgstr ""
-#: readelf.c:4460
+#: readelf.c:4898
#, c-format
msgid " %#06x: Name index: %lx"
msgstr ""
-#: readelf.c:4463
+#: readelf.c:4901
#, c-format
msgid " Flags: %s Version: %d\n"
msgstr ""
-#: readelf.c:4501
+#: readelf.c:4937
+msgid "version string table"
+msgstr ""
+
+#: readelf.c:4941
#, c-format
msgid ""
"\n"
"Version symbols section '%s' contains %d entries:\n"
msgstr ""
-#: readelf.c:4504
+#: readelf.c:4944
msgid " Addr: "
msgstr ""
-#: readelf.c:4535
+#: readelf.c:4954
+msgid "version symbol data"
+msgstr ""
+
+#: readelf.c:4981
msgid " 0 (*local*) "
msgstr ""
-#: readelf.c:4539
+#: readelf.c:4985
msgid " 1 (*global*) "
msgstr ""
-#: readelf.c:4673
+#: readelf.c:5020 readelf.c:5454
+msgid "version need"
+msgstr ""
+
+#: readelf.c:5030
+msgid "version need aux (2)"
+msgstr ""
+
+#: readelf.c:5071 readelf.c:5516
+msgid "version def"
+msgstr ""
+
+#: readelf.c:5090 readelf.c:5531
+msgid "version def aux"
+msgstr ""
+
+#: readelf.c:5121
msgid ""
"\n"
"No version information found in this file.\n"
msgstr ""
-#: readelf.c:4691 readelf.c:4726
+#: readelf.c:5139 readelf.c:5174
#, c-format
msgid "<processor specific>: %d"
msgstr ""
-#: readelf.c:4693 readelf.c:4738
+#: readelf.c:5141 readelf.c:5186
#, c-format
msgid "<OS specific>: %d"
msgstr ""
-#: readelf.c:4695 readelf.c:4741
+#: readelf.c:5143 readelf.c:5189
#, c-format
msgid "<unknown>: %d"
msgstr ""
-#: readelf.c:4804
+#: readelf.c:5252
msgid "Unable to read in dynamic data\n"
msgstr ""
-#: readelf.c:4846
+#: readelf.c:5294
msgid "Unable to seek to start of dynamic information"
msgstr ""
-#: readelf.c:4852
+#: readelf.c:5300
msgid "Failed to read in number of buckets\n"
msgstr ""
-#: readelf.c:4858
+#: readelf.c:5306
msgid "Failed to read in number of chains\n"
msgstr ""
-#: readelf.c:4878
+#: readelf.c:5326
msgid ""
"\n"
"Symbol table for image:\n"
msgstr ""
-#: readelf.c:4880
+#: readelf.c:5328
msgid " Num Buc: Value Size Type Bind Vis Ndx Name\n"
msgstr ""
-#: readelf.c:4882
+#: readelf.c:5330
msgid " Num Buc: Value Size Type Bind Vis Ndx Name\n"
msgstr ""
-#: readelf.c:4926
+#: readelf.c:5375
#, c-format
msgid ""
"\n"
"Symbol table '%s' contains %lu entries:\n"
msgstr ""
-#: readelf.c:4930
+#: readelf.c:5379
msgid " Num: Value Size Type Bind Vis Ndx Name\n"
msgstr ""
-#: readelf.c:4932
+#: readelf.c:5381
msgid " Num: Value Size Type Bind Vis Ndx Name\n"
msgstr ""
-#: readelf.c:5042
+#: readelf.c:5427
+msgid "version data"
+msgstr ""
+
+#: readelf.c:5467
+msgid "version need aux (3)"
+msgstr ""
+
+#: readelf.c:5492
msgid "bad dynamic symbol"
msgstr ""
-#: readelf.c:5102
+#: readelf.c:5554
msgid ""
"\n"
"Dynamic symbol information is not available for displaying symbols.\n"
msgstr ""
-#: readelf.c:5114
+#: readelf.c:5566
#, c-format
msgid ""
"\n"
"Histogram for bucket list length (total of %d buckets):\n"
msgstr ""
-#: readelf.c:5116
+#: readelf.c:5568
#, c-format
msgid " Length Number %% of total Coverage\n"
msgstr ""
-#: readelf.c:5121 readelf.c:5140 readelf.c:7933 readelf.c:8126
+#: readelf.c:5573 readelf.c:5592 readelf.c:8825 readelf.c:9017
msgid "Out of memory"
msgstr ""
-#: readelf.c:5189
+#: readelf.c:5641
#, c-format
msgid ""
"\n"
"Dynamic info segment at offset 0x%lx contains %d entries:\n"
msgstr ""
-#: readelf.c:5192
+#: readelf.c:5644
msgid " Num: Name BoundTo Flags\n"
msgstr ""
-#: readelf.c:5240
+#: readelf.c:5696
#, c-format
msgid ""
"\n"
"Assembly dump of section %s\n"
msgstr ""
-#: readelf.c:5263
+#: readelf.c:5719
#, c-format
msgid ""
"\n"
"Section '%s' has no data to dump.\n"
msgstr ""
-#: readelf.c:5268
+#: readelf.c:5724
#, c-format
msgid ""
"\n"
"Hex dump of section '%s':\n"
msgstr ""
-#: readelf.c:5420
-msgid "badly formed extended line op encountered!"
+#: readelf.c:5729
+msgid "section data"
msgstr ""
-#: readelf.c:5427
+#: readelf.c:5878
+msgid "badly formed extended line op encountered!\n"
+msgstr ""
+
+#: readelf.c:5885
#, c-format
msgid " Extended opcode %d: "
msgstr ""
-#: readelf.c:5432
+#: readelf.c:5890
msgid ""
"End of Sequence\n"
"\n"
msgstr ""
-#: readelf.c:5438
+#: readelf.c:5896
#, c-format
msgid "set Address to 0x%lx\n"
msgstr ""
-#: readelf.c:5443
+#: readelf.c:5901
msgid " define new File Table entry\n"
msgstr ""
-#: readelf.c:5444 readelf.c:5566
+#: readelf.c:5902 readelf.c:6031
msgid " Entry\tDir\tTime\tSize\tName\n"
msgstr ""
-#: readelf.c:5446
+#: readelf.c:5904
#, c-format
msgid " %d\t"
msgstr ""
-#: readelf.c:5449 readelf.c:5451 readelf.c:5453 readelf.c:5578 readelf.c:5580
-#: readelf.c:5582
+#: readelf.c:5907 readelf.c:5909 readelf.c:5911 readelf.c:6043 readelf.c:6045
+#: readelf.c:6047
#, c-format
msgid "%lu\t"
msgstr ""
-#: readelf.c:5454
+#: readelf.c:5912
#, c-format
msgid ""
"%s\n"
"\n"
msgstr ""
-#: readelf.c:5458
+#: readelf.c:5916
#, c-format
msgid "UNKNOWN: length %d\n"
msgstr ""
-#: readelf.c:5484
+#: readelf.c:5942
#, c-format
msgid ""
"\n"
@@ -3018,503 +3112,629 @@ msgid ""
"\n"
msgstr ""
-#: readelf.c:5496
+#: readelf.c:5954
+msgid "64-bit DWARF line info is not supported yet.\n"
+msgstr ""
+
+#: readelf.c:5961
msgid "The line info appears to be corrupt - the section is too small\n"
msgstr ""
-#: readelf.c:5504
+#: readelf.c:5969
msgid "Only DWARF version 2 line info is currently supported.\n"
msgstr ""
-#: readelf.c:5519
+#: readelf.c:5984
#, c-format
msgid " Length: %ld\n"
msgstr ""
-#: readelf.c:5520
+#: readelf.c:5985
#, c-format
msgid " DWARF Version: %d\n"
msgstr ""
-#: readelf.c:5521
+#: readelf.c:5986
#, c-format
msgid " Prologue Length: %d\n"
msgstr ""
-#: readelf.c:5522
+#: readelf.c:5987
#, c-format
msgid " Minimum Instruction Length: %d\n"
msgstr ""
-#: readelf.c:5523
+#: readelf.c:5988
#, c-format
msgid " Initial value of 'is_stmt': %d\n"
msgstr ""
-#: readelf.c:5524
+#: readelf.c:5989
#, c-format
msgid " Line Base: %d\n"
msgstr ""
-#: readelf.c:5525
+#: readelf.c:5990
#, c-format
msgid " Line Range: %d\n"
msgstr ""
-#: readelf.c:5526
+#: readelf.c:5991
#, c-format
msgid " Opcode Base: %d\n"
msgstr ""
-#: readelf.c:5535
+#: readelf.c:6000
msgid ""
"\n"
" Opcodes:\n"
msgstr ""
-#: readelf.c:5538
+#: readelf.c:6003
#, c-format
msgid " Opcode %d has %d args\n"
msgstr ""
-#: readelf.c:5544
+#: readelf.c:6009
msgid ""
"\n"
" The Directory Table is empty.\n"
msgstr ""
-#: readelf.c:5547
+#: readelf.c:6012
msgid ""
"\n"
" The Directory Table:\n"
msgstr ""
-#: readelf.c:5551
+#: readelf.c:6016
#, c-format
msgid " %s\n"
msgstr ""
-#: readelf.c:5562
+#: readelf.c:6027
msgid ""
"\n"
" The File Name Table is empty.\n"
msgstr ""
-#: readelf.c:5565
+#: readelf.c:6030
msgid ""
"\n"
" The File Name Table:\n"
msgstr ""
-#: readelf.c:5573
+#: readelf.c:6038
#, c-format
msgid " %d\t"
msgstr ""
-#: readelf.c:5584
+#: readelf.c:6049
#, c-format
msgid "%s\n"
msgstr ""
#. Now display the statements.
-#: readelf.c:5592
+#: readelf.c:6057
msgid ""
"\n"
" Line Number Statements:\n"
msgstr ""
-#: readelf.c:5611
+#: readelf.c:6073
+#, c-format
+msgid " Special opcode %d: advance Address by %d to 0x%lx"
+msgstr ""
+
+#: readelf.c:6077
+#, c-format
+msgid " and Line by %d to %d\n"
+msgstr ""
+
+#: readelf.c:6088
msgid " Copy\n"
msgstr ""
-#: readelf.c:5618
+#: readelf.c:6095
#, c-format
msgid " Advance PC by %d to %lx\n"
msgstr ""
-#: readelf.c:5626
+#: readelf.c:6103
#, c-format
msgid " Advance Line by %d to %d\n"
msgstr ""
-#: readelf.c:5633
+#: readelf.c:6110
#, c-format
msgid " Set File Name to entry %d in the File Name Table\n"
msgstr ""
-#: readelf.c:5641
+#: readelf.c:6118
#, c-format
msgid " Set column to %d\n"
msgstr ""
-#: readelf.c:5648
+#: readelf.c:6125
#, c-format
msgid " Set is_stmt to %d\n"
msgstr ""
-#: readelf.c:5653
+#: readelf.c:6130
msgid " Set basic block\n"
msgstr ""
-#: readelf.c:5661
+#: readelf.c:6138
#, c-format
msgid " Advance PC by constant %d to 0x%lx\n"
msgstr ""
-#: readelf.c:5669
+#: readelf.c:6146
#, c-format
msgid " Advance PC by fixed size amount %d to 0x%lx\n"
msgstr ""
-#: readelf.c:5677
+#: readelf.c:6151
+msgid " Set prologue_end to true\n"
+msgstr ""
+
+#: readelf.c:6155
+msgid " Set epilogue_begin to true\n"
+msgstr ""
+
+#: readelf.c:6161
#, c-format
-msgid " Special opcode %d: advance Address by %d to 0x%lx"
+msgid " Set ISA to %d\n"
msgstr ""
-#: readelf.c:5681
+#: readelf.c:6165
#, c-format
-msgid " and Line by %d to %d\n"
+msgid " Unknown opcode %d with operands: "
msgstr ""
-#: readelf.c:5704 readelf.c:6133
+#: readelf.c:6197 readelf.c:6658 readelf.c:6730
#, c-format
msgid ""
"Contents of the %s section:\n"
"\n"
msgstr ""
-#: readelf.c:5727
+#: readelf.c:6216
+msgid "64-bit DWARF pubnames are not supported yet.\n"
+msgstr ""
+
+#: readelf.c:6226
msgid "Only DWARF 2 pubnames are currently supported\n"
msgstr ""
-#: readelf.c:5734
+#: readelf.c:6233
#, c-format
msgid " Length: %ld\n"
msgstr ""
-#: readelf.c:5736
+#: readelf.c:6235
#, c-format
msgid " Version: %d\n"
msgstr ""
-#: readelf.c:5738
+#: readelf.c:6237
#, c-format
msgid " Offset into .debug_info section: %ld\n"
msgstr ""
-#: readelf.c:5740
+#: readelf.c:6239
#, c-format
msgid " Size of area in .debug_info section: %ld\n"
msgstr ""
-#: readelf.c:5743
+#: readelf.c:6242
msgid ""
"\n"
" Offset\tName\n"
msgstr ""
-#: readelf.c:5825
+#: readelf.c:6333
#, c-format
msgid "Unknown TAG value: %lx"
msgstr ""
-#: readelf.c:5920
+#: readelf.c:6443
#, c-format
msgid "Unknown AT value: %lx"
msgstr ""
-#: readelf.c:5957
+#: readelf.c:6480
#, c-format
msgid "Unknown FORM value: %lx"
msgstr ""
-#: readelf.c:6139
+#: readelf.c:6679
+#, c-format
+msgid " DW_MACINFO_start_file - lineno: %d filenum: %d\n"
+msgstr ""
+
+#: readelf.c:6684
+msgid " DW_MACINFO_end_file\n"
+msgstr ""
+
+#: readelf.c:6692
+#, c-format
+msgid " DW_MACINFO_define - lineno : %d macro : %s\n"
+msgstr ""
+
+#: readelf.c:6700
+#, c-format
+msgid " DW_MACINFO_undef - lineno : %d macro : %s\n"
+msgstr ""
+
+#: readelf.c:6711
+#, c-format
+msgid " DW_MACINFO_vendor_ext - constant : %d string : %s\n"
+msgstr ""
+
+#: readelf.c:6739
msgid " Number TAG\n"
msgstr ""
-#: readelf.c:6145
+#: readelf.c:6745
#, c-format
msgid " %ld %s [%s]\n"
msgstr ""
-#: readelf.c:6148
+#: readelf.c:6748
msgid "has children"
msgstr ""
-#: readelf.c:6148
+#: readelf.c:6748
msgid "no children"
msgstr ""
-#: readelf.c:6152
+#: readelf.c:6752
#, c-format
msgid " %-18s %s\n"
msgstr ""
-#: readelf.c:6171
+#: readelf.c:6773
#, c-format
msgid " %lu byte block: "
msgstr ""
-#: readelf.c:6478
+#: readelf.c:7096
msgid "(User defined location op)"
msgstr ""
-#: readelf.c:6480
+#: readelf.c:7098
msgid "(Unknown location op)"
msgstr ""
-#: readelf.c:6607
+#: readelf.c:7137
+msgid "debug_str section data"
+msgstr ""
+
+#: readelf.c:7156
+msgid "<no .debug_str section>"
+msgstr ""
+
+#: readelf.c:7159
+msgid "<offset is too big>"
+msgstr ""
+
+#: readelf.c:7179
+msgid ""
+"\n"
+"The .debug_str section is empty.\n"
+msgstr ""
+
+#: readelf.c:7183
+msgid ""
+"Contents of the .debug_str section:\n"
+"\n"
+msgstr ""
+
+#: readelf.c:7354
#, c-format
-msgid "Unable to handle FORM: %d"
+msgid " (indirect string, offset: 0x%lx): "
msgstr ""
-#: readelf.c:6611
+#: readelf.c:7363
#, c-format
-msgid "Unrecognised form: %d"
+msgid "Unrecognised form: %d\n"
msgstr ""
-#: readelf.c:6624
+#: readelf.c:7376
msgid "(not inlined)"
msgstr ""
-#: readelf.c:6625
+#: readelf.c:7377
msgid "(inlined)"
msgstr ""
-#: readelf.c:6626
+#: readelf.c:7378
msgid "(declared as inline but ignored)"
msgstr ""
-#: readelf.c:6627
+#: readelf.c:7379
msgid "(declared as inline and inlined)"
msgstr ""
-#: readelf.c:6628
+#: readelf.c:7380
#, c-format
msgid " (Unknown inline attribute value: %lx)"
msgstr ""
-#: readelf.c:6757 readelf.c:6883
+#: readelf.c:7545 readelf.c:7746
#, c-format
msgid ""
"The section %s contains:\n"
"\n"
msgstr ""
-#: readelf.c:6779
+#: readelf.c:7568
+msgid "64-bit DWARF debug info is not supported yet.\n"
+msgstr ""
+
+#: readelf.c:7637
#, c-format
msgid " Compilation Unit @ %lx:\n"
msgstr ""
-#: readelf.c:6780
+#: readelf.c:7638
#, c-format
msgid " Length: %ld\n"
msgstr ""
-#: readelf.c:6781
+#: readelf.c:7639
#, c-format
msgid " Version: %d\n"
msgstr ""
-#: readelf.c:6782
+#: readelf.c:7640
#, c-format
msgid " Abbrev Offset: %ld\n"
msgstr ""
-#: readelf.c:6783
+#: readelf.c:7641
#, c-format
msgid " Pointer Size: %d\n"
msgstr ""
-#: readelf.c:6787
+#: readelf.c:7645
msgid "Only version 2 DWARF debug information is currently supported.\n"
msgstr ""
-#: readelf.c:6809
+#: readelf.c:7666
msgid "Unable to locate .debug_abbrev section!\n"
msgstr ""
-#: readelf.c:6849
+#: readelf.c:7672
+msgid "debug_abbrev section data"
+msgstr ""
+
+#: readelf.c:7709
#, c-format
msgid "Unable to locate entry %lu in the abbreviation table\n"
msgstr ""
-#: readelf.c:6854
+#: readelf.c:7714
#, c-format
-msgid " <%d><%x>: Abbrev Number: %lu (%s)\n"
+msgid " <%d><%lx>: Abbrev Number: %lu (%s)\n"
+msgstr ""
+
+#: readelf.c:7767
+msgid "64-bit DWARF aranges are not supported yet.\n"
msgstr ""
-#: readelf.c:6904
+#: readelf.c:7773
msgid "Only DWARF 2 aranges are currently supported.\n"
msgstr ""
-#: readelf.c:6908
+#: readelf.c:7777
#, c-format
msgid " Length: %ld\n"
msgstr ""
-#: readelf.c:6909
+#: readelf.c:7778
#, c-format
msgid " Version: %d\n"
msgstr ""
-#: readelf.c:6910
+#: readelf.c:7779
#, c-format
msgid " Offset into .debug_info: %lx\n"
msgstr ""
-#: readelf.c:6911
+#: readelf.c:7780
#, c-format
msgid " Pointer Size: %d\n"
msgstr ""
-#: readelf.c:6912
+#: readelf.c:7781
#, c-format
msgid " Segment Size: %d\n"
msgstr ""
-#: readelf.c:6914
+#: readelf.c:7783
msgid ""
"\n"
" Address Length\n"
msgstr ""
-#: readelf.c:7092
+#: readelf.c:7965
#, c-format
msgid "The section %s contains:\n"
msgstr ""
-#: readelf.c:7620
+#: readelf.c:7988
+msgid "64-bit DWARF format frames are not supported yet.\n"
+msgstr ""
+
+#: readelf.c:8499
#, c-format
msgid "Displaying the debug contents of section %s is not yet supported.\n"
msgstr ""
-#: readelf.c:7683
+#: readelf.c:8565
#, c-format
msgid ""
"\n"
"Section '%s' has no debugging data.\n"
msgstr ""
-#: readelf.c:7702
+#: readelf.c:8570 readelf.c:8632
+msgid "debug section data"
+msgstr ""
+
+#: readelf.c:8586
#, c-format
msgid "Unrecognised debug section: %s\n"
msgstr ""
-#: readelf.c:7774
+#: readelf.c:8660
msgid "Some sections were not dumped because they do not exist!\n"
msgstr ""
-#: readelf.c:7957
+#: readelf.c:8733
+msgid "liblist"
+msgstr ""
+
+#: readelf.c:8818
+msgid "options"
+msgstr ""
+
+#: readelf.c:8849
#, c-format
msgid ""
"\n"
"Section '%s' contains %d entries:\n"
msgstr ""
-#: readelf.c:8119
+#: readelf.c:9010
msgid "conflict list with without table"
msgstr ""
-#: readelf.c:8147
+#: readelf.c:9028 readelf.c:9044
+msgid "conflict"
+msgstr ""
+
+#: readelf.c:9054
#, c-format
msgid ""
"\n"
-"Section '.conflict' contains %d entries:\n"
+"Section '.conflict' contains %ld entries:\n"
msgstr ""
-#: readelf.c:8148
+#: readelf.c:9056
msgid " Num: Index Value Name"
msgstr ""
-#: readelf.c:8173
+#: readelf.c:9083
msgid "NT_PRSTATUS (prstatus structure)"
msgstr ""
-#: readelf.c:8174
+#: readelf.c:9084
msgid "NT_FPREGSET (floating point registers)"
msgstr ""
-#: readelf.c:8175
+#: readelf.c:9085
msgid "NT_PRPSINFO (prpsinfo structure)"
msgstr ""
-#: readelf.c:8176
+#: readelf.c:9086
msgid "NT_TASKSTRUCT (task structure)"
msgstr ""
-#: readelf.c:8177
+#: readelf.c:9087
msgid "NT_PRXFPREG (user_xfpregs structure)"
msgstr ""
-#: readelf.c:8178
+#: readelf.c:9088
msgid "NT_PSTATUS (pstatus structure)"
msgstr ""
-#: readelf.c:8179
+#: readelf.c:9089
msgid "NT_FPREGS (floating point registers)"
msgstr ""
-#: readelf.c:8180
+#: readelf.c:9090
msgid "NT_PSINFO (psinfo structure)"
msgstr ""
-#: readelf.c:8181
+#: readelf.c:9091
msgid "NT_LWPSTATUS (lwpstatus_t structure)"
msgstr ""
-#: readelf.c:8182
+#: readelf.c:9092
msgid "NT_LWPSINFO (lwpsinfo_t structure)"
msgstr ""
-#: readelf.c:8183
+#: readelf.c:9093
msgid "NT_WIN32PSTATUS (win32_pstatus strcuture)"
msgstr ""
-#: readelf.c:8185
+#: readelf.c:9095 readelf.c:9119
#, c-format
msgid "Unknown note type: (0x%08x)"
msgstr ""
-#: readelf.c:8223
+#. NetBSD core "procinfo" structure.
+#: readelf.c:9109
+msgid "NetBSD procinfo structure"
+msgstr ""
+
+#: readelf.c:9136 readelf.c:9150
+msgid "PT_GETREGS (reg structure)"
+msgstr ""
+
+#: readelf.c:9138 readelf.c:9152
+msgid "PT_GETFPREGS (fpreg structure)"
+msgstr ""
+
+#: readelf.c:9158
+#, c-format
+msgid "PT_FIRSTMACH+%d"
+msgstr ""
+
+#: readelf.c:9212
+msgid "notes"
+msgstr ""
+
+#: readelf.c:9218
#, c-format
msgid ""
"\n"
"Notes at offset 0x%08lx with length 0x%08lx:\n"
msgstr ""
-#: readelf.c:8225
+#: readelf.c:9220
msgid " Owner\t\tData size\tDescription\n"
msgstr ""
-#: readelf.c:8336
+#: readelf.c:9331
msgid "No note segments present in the core file.\n"
msgstr ""
-#: readelf.c:8414
-msgid "This instance of readelf has been built without support for a\n"
-msgstr ""
-
-#: readelf.c:8415
-msgid "64 bit data type and so it cannot read 64 bit ELF files.\n"
+#: readelf.c:9409
+msgid ""
+"This instance of readelf has been built without support for a\n"
+"64 bit data type and so it cannot read 64 bit ELF files.\n"
msgstr ""
-#: readelf.c:8450
+#: readelf.c:9452
#, c-format
msgid "Cannot stat input file %s.\n"
msgstr ""
-#: readelf.c:8457
+#: readelf.c:9459
#, c-format
msgid "Input file %s not found.\n"
msgstr ""
-#: readelf.c:8463
+#: readelf.c:9465
#, c-format
msgid "%s: Failed to read file header\n"
msgstr ""
-#: readelf.c:8477
+#: readelf.c:9479
#, c-format
msgid ""
"\n"
@@ -3919,27 +4139,27 @@ msgstr ""
msgid "default is --format=sysv\n"
msgstr ""
-#: size.c:141
+#: size.c:146
#, c-format
msgid "invalid argument to --format: %s"
msgstr ""
-#: size.c:168
+#: size.c:173
#, c-format
msgid "Invalid radix: %s\n"
msgstr ""
-#: srconv.c:1880
+#: srconv.c:1931
#, c-format
msgid "Usage: %s [-dhVq] in-file [out-file]\n"
msgstr ""
-#: srconv.c:1887
+#: srconv.c:1938
#, c-format
msgid "%s: Convert a COFF object file into a SYSROFF object file\n"
msgstr ""
-#: srconv.c:2020
+#: srconv.c:2074
#, c-format
msgid "unable to open output file %s"
msgstr ""
@@ -4039,39 +4259,40 @@ msgstr ""
msgid "no argument types in mangled string\n"
msgstr ""
-#: strings.c:177
+#: strings.c:199
#, c-format
msgid "invalid number %s"
msgstr ""
-#: strings.c:513
+#: strings.c:638
#, c-format
msgid "invalid integer argument %s"
msgstr ""
-#: strings.c:523
+#: strings.c:648
#, 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"
+"Usage: %s [-afov] [-n min-len] [-min-len] [-t {o,x,d}] [-e {s,b,l,B,L}]\n"
+" [-] [--all] [--print-file-name] [--bytes=min-len] [--radix={o,x,d}]\n"
+" [--target=bfdname] [--encoding {s,b,l,B,L}] [--help] [--version] "
+"file...\n"
msgstr ""
-#: sysdump.c:712
+#: sysdump.c:733
#, c-format
msgid "Usage: %s [-hV] in-file\n"
msgstr ""
-#: sysdump.c:781
+#: sysdump.c:805
#, c-format
msgid "cannot open input file %s"
msgstr ""
-#: version.c:39
-msgid "Copyright 1997, 98, 99, 2000, 2001 Free Software Foundation, Inc.\n"
+#: version.c:35
+msgid "Copyright 2001 Free Software Foundation, Inc.\n"
msgstr ""
-#: version.c:40
+#: version.c:36
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"
@@ -4158,7 +4379,7 @@ msgid ""
"No input-file is stdin, default rc. No output-file is stdout, default rc.\n"
msgstr ""
-#: windres.c:980
+#: windres.c:983
msgid "no resources"
msgstr ""
diff --git a/contrib/binutils/binutils/rclex.l b/contrib/binutils/binutils/rclex.l
index d05d1c0..c9073e2 100644
--- a/contrib/binutils/binutils/rclex.l
+++ b/contrib/binutils/binutils/rclex.l
@@ -1,5 +1,5 @@
%{ /* rclex.l -- lexer for Windows rc files parser */
-/* Copyright 1997, 1998, 1999 Free Software Foundation, Inc.
+/* Copyright 1997, 1998, 1999, 2001 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of GNU Binutils.
@@ -26,10 +26,10 @@
#include "bfd.h"
#include "bucomm.h"
#include "libiberty.h"
+#include "safe-ctype.h"
#include "windres.h"
#include "rcparse.h"
-#include <ctype.h>
#include <assert.h>
/* Whether we are in rcdata mode, in which we returns the lengths of
@@ -252,18 +252,18 @@ cpp_line (s)
char *send, *fn;
++s;
- while (isspace ((unsigned char) *s))
+ while (ISSPACE (*s))
++s;
line = strtol (s, &send, 0);
- if (*send != '\0' && ! isspace ((unsigned char) *send))
+ if (*send != '\0' && ! ISSPACE (*send))
return;
/* Subtract 1 because we are about to count the newline. */
rc_lineno = line - 1;
s = send;
- while (isspace ((unsigned char) *s))
+ while (ISSPACE (*s))
++s;
if (*s != '"')
@@ -423,8 +423,8 @@ handle_quotes (input, len)
else
{
++t;
- assert (isspace ((unsigned char) *t));
- while (isspace ((unsigned char) *t))
+ assert (ISSPACE (*t));
+ while (ISSPACE (*t))
++t;
if (*t == '\0')
break;
diff --git a/contrib/binutils/binutils/rcparse.y b/contrib/binutils/binutils/rcparse.y
index 89004e7..152c8ee 100644
--- a/contrib/binutils/binutils/rcparse.y
+++ b/contrib/binutils/binutils/rcparse.y
@@ -1,5 +1,5 @@
%{ /* rcparse.y -- parser for Windows rc files
- Copyright 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of GNU Binutils.
@@ -26,8 +26,7 @@
#include "bucomm.h"
#include "libiberty.h"
#include "windres.h"
-
-#include <ctype.h>
+#include "safe-ctype.h"
/* The current language. */
@@ -245,7 +244,7 @@ acc_event:
$$.flags = ACC_CONTROL | ACC_VIRTKEY;
++s;
ch = *s;
- ch = toupper ((unsigned char) ch);
+ ch = TOUPPER (ch);
}
$$.key = ch;
if (s[1] != '\0')
@@ -455,7 +454,7 @@ styles:
}
| styles LANGUAGE numexpr cnumexpr
{
- sub_res_info.language = $3 | ($4 << 8);
+ sub_res_info.language = $3 | ($4 << SUBLANG_SHIFT);
}
| styles VERSIONK numexpr
{
@@ -874,7 +873,7 @@ icon:
language:
LANGUAGE numexpr cnumexpr
{
- language = $2 | ($3 << 8);
+ language = $2 | ($3 << SUBLANG_SHIFT);
}
;
@@ -1259,8 +1258,7 @@ id:
/* It seems that resource ID's are forced to upper case. */
copy = xstrdup ($1);
for (s = copy; *s != '\0'; s++)
- if (islower ((unsigned char) *s))
- *s = toupper ((unsigned char) *s);
+ *s = TOUPPER (*s);
res_string_to_id (&$$, copy);
free (copy);
}
@@ -1297,8 +1295,7 @@ resref:
/* It seems that resource ID's are forced to upper case. */
copy = xstrdup ($1);
for (s = copy; *s != '\0'; s++)
- if (islower ((unsigned char) *s))
- *s = toupper ((unsigned char) *s);
+ *s = TOUPPER (*s);
res_string_to_id (&$$, copy);
free (copy);
}
@@ -1329,7 +1326,7 @@ suboptions:
| suboptions LANGUAGE numexpr cnumexpr
{
$$ = $1;
- $$.language = $3 | ($4 << 8);
+ $$.language = $3 | ($4 << SUBLANG_SHIFT);
}
| suboptions VERSIONK numexpr
{
diff --git a/contrib/binutils/binutils/readelf.c b/contrib/binutils/binutils/readelf.c
index 7befc88..2480c76 100644
--- a/contrib/binutils/binutils/readelf.c
+++ b/contrib/binutils/binutils/readelf.c
@@ -1,5 +1,5 @@
/* readelf.c -- display contents of an ELF format file
- Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Originally developed by Eric Youngdale <eric@andante.jic.com>
Modifications by Nick Clifton <nickc@redhat.com>
@@ -64,9 +64,11 @@
#include "elf/mn10200.h"
#include "elf/mn10300.h"
#include "elf/hppa.h"
+#include "elf/h8.h"
#include "elf/arc.h"
#include "elf/fr30.h"
#include "elf/mcore.h"
+#include "elf/mmix.h"
#include "elf/i960.h"
#include "elf/pj.h"
#include "elf/avr.h"
@@ -74,30 +76,33 @@
#include "elf/cris.h"
#include "elf/i860.h"
#include "elf/x86-64.h"
+#include "elf/s390.h"
+#include "elf/xstormy16.h"
#include "bucomm.h"
#include "getopt.h"
-char * program_name = "readelf";
-unsigned int dynamic_addr;
+char * program_name = "readelf";
+unsigned int dynamic_addr;
bfd_size_type dynamic_size;
-unsigned int rela_addr;
-unsigned int rela_size;
-char * dynamic_strings;
+unsigned int rela_addr;
+unsigned int rela_size;
+char * dynamic_strings;
char * string_table;
unsigned long string_table_length;
unsigned long num_dynamic_syms;
Elf_Internal_Sym * dynamic_symbols;
Elf_Internal_Syminfo * dynamic_syminfo;
-unsigned long dynamic_syminfo_offset;
+unsigned long dynamic_syminfo_offset;
unsigned int dynamic_syminfo_nent;
-char program_interpreter [64];
-int dynamic_info[DT_JMPREL + 1];
-int version_info[16];
-int loadaddr = 0;
+char program_interpreter [64];
+int dynamic_info[DT_JMPREL + 1];
+int version_info[16];
+int loadaddr = 0;
Elf_Internal_Ehdr elf_header;
Elf_Internal_Shdr * section_headers;
Elf_Internal_Dyn * dynamic_segment;
+Elf_Internal_Shdr * symtab_shndx_hdr;
int show_name;
int do_dynamic;
int do_syms;
@@ -109,6 +114,7 @@ int do_using_dynamic;
int do_header;
int do_dump;
int do_version;
+int do_wide;
int do_histogram;
int do_debugging;
int do_debug_info;
@@ -118,6 +124,8 @@ int do_debug_pubnames;
int do_debug_aranges;
int do_debug_frames;
int do_debug_frames_interp;
+int do_debug_macinfo;
+int do_debug_str;
int do_arch;
int do_notes;
int is_32bit_elf;
@@ -145,11 +153,13 @@ print_mode;
/* Forward declarations for dumb compilers. */
static void print_vma PARAMS ((bfd_vma, print_mode));
+static void print_symbol PARAMS ((int, char *));
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_ppc64_dynamic_type PARAMS ((unsigned long));
static const char * get_parisc_dynamic_type PARAMS ((unsigned long));
static const char * get_dynamic_type PARAMS ((unsigned long));
static int slurp_rela_relocs PARAMS ((FILE *, unsigned long, unsigned long, Elf_Internal_Rela **, unsigned long *));
@@ -182,18 +192,21 @@ 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_syminfo PARAMS ((FILE *));
static int process_section_contents PARAMS ((FILE *));
-static void process_file PARAMS ((char *));
+static void process_mips_fpe_exception PARAMS ((int));
+static int process_mips_specific PARAMS ((FILE *));
+static int 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_section_headers PARAMS ((FILE *, unsigned int));
+static int get_64bit_section_headers PARAMS ((FILE *, unsigned int));
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 Elf_Internal_Sym * get_32bit_elf_symbols PARAMS ((FILE *, Elf_Internal_Shdr *));
+static Elf_Internal_Sym * get_64bit_elf_symbols PARAMS ((FILE *, Elf_Internal_Shdr *));
static const char * get_elf_section_flags PARAMS ((bfd_vma));
static int * get_dynamic_data PARAMS ((FILE *, unsigned int));
static int get_32bit_dynamic_segment PARAMS ((FILE *));
@@ -205,11 +218,18 @@ static int dump_section PARAMS ((Elf32_Internal_Shdr *,
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 prescan_debug_info PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *));
static int display_debug_lines PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *));
+static int display_debug_pubnames PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *));
static int display_debug_abbrev PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *));
static int display_debug_aranges PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *));
static int display_debug_frames PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *));
+static int display_debug_macinfo PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *));
+static int display_debug_str PARAMS ((Elf32_Internal_Shdr *, unsigned char *, FILE *));
static unsigned char * process_abbrev_section PARAMS ((unsigned char *, unsigned char *));
+static void load_debug_str PARAMS ((FILE *));
+static void free_debug_str PARAMS ((void));
+static const char * fetch_indirect_string PARAMS ((unsigned long));
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));
@@ -220,18 +240,21 @@ 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, unsigned long));
+static unsigned char * read_and_display_attr_value PARAMS ((unsigned long, unsigned long, unsigned char *, unsigned long, unsigned long));
static unsigned char * display_block PARAMS ((unsigned char *, unsigned long));
static void decode_location_expression PARAMS ((unsigned char *, unsigned int, unsigned long));
-static void request_dump PARAMS ((unsigned int, char));
-static const char * get_elf_class PARAMS ((unsigned char));
-static const char * get_data_encoding PARAMS ((unsigned char));
-static const char * get_osabi_name PARAMS ((unsigned char));
+static void request_dump PARAMS ((unsigned int, int));
+static const char * get_elf_class PARAMS ((unsigned int));
+static const char * get_data_encoding PARAMS ((unsigned int));
+static const char * get_osabi_name PARAMS ((unsigned int));
static int guess_is_rela PARAMS ((unsigned long));
-static char * get_note_type PARAMS ((unsigned int));
+static const char * get_note_type PARAMS ((unsigned int));
+static const char * get_netbsd_elfcore_note_type PARAMS ((unsigned int));
static int process_note PARAMS ((Elf32_Internal_Note *));
static int process_corefile_note_segment PARAMS ((FILE *, bfd_vma, bfd_vma));
static int process_corefile_note_segments PARAMS ((FILE *));
static int process_corefile_contents PARAMS ((FILE *));
+static int process_arch_specific PARAMS ((FILE *));
typedef int Elf32_Word;
@@ -245,6 +268,22 @@ typedef int Elf32_Word;
((X)->sh_name >= string_table_length \
? "<corrupt>" : string_table + (X)->sh_name))
+/* Given st_shndx I, map to section_headers index. */
+#define SECTION_HEADER_INDEX(I) \
+ ((I) < SHN_LORESERVE \
+ ? (I) \
+ : ((I) <= SHN_HIRESERVE \
+ ? 0 \
+ : (I) - (SHN_HIRESERVE + 1 - SHN_LORESERVE)))
+
+/* Reverse of the above. */
+#define SECTION_HEADER_NUM(N) \
+ ((N) < SHN_LORESERVE \
+ ? (N) \
+ : (N) + (SHN_HIRESERVE + 1 - SHN_LORESERVE))
+
+#define SECTION_HEADER(I) (section_headers + SECTION_HEADER_INDEX (I))
+
#define DT_VERSIONTAGIDX(tag) (DT_VERNEEDNUM - (tag)) /* Reverse order! */
#define BYTE_GET(field) byte_get (field, sizeof (field))
@@ -263,104 +302,79 @@ typedef int Elf32_Word;
#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
+#define NUM_ELEM(array) (sizeof (array) / sizeof ((array)[0]))
+
+#define GET_ELF_SYMBOLS(file, section) \
+ (is_32bit_elf ? get_32bit_elf_symbols (file, section) \
+ : get_64bit_elf_symbols (file, section))
+
+
static void
-error (const char * message, ...)
+error VPARAMS ((const char *message, ...))
{
- va_list args;
+ VA_OPEN (args, message);
+ VA_FIXEDARG (args, const char *, message);
fprintf (stderr, _("%s: Error: "), program_name);
- va_start (args, message);
vfprintf (stderr, message, args);
- va_end (args);
- return;
+ VA_CLOSE (args);
}
static void
-warn (const char * message, ...)
+warn VPARAMS ((const char *message, ...))
{
- va_list args;
+ VA_OPEN (args, message);
+ VA_FIXEDARG (args, const char *, message);
fprintf (stderr, _("%s: Warning: "), program_name);
- va_start (args, message);
vfprintf (stderr, message, args);
- va_end (args);
- return;
+ VA_CLOSE (args);
}
-#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 PTR get_data PARAMS ((PTR, FILE *, long, size_t, const char *));
-static void
-warn (va_alist)
- va_dcl
+static PTR
+get_data (var, file, offset, size, reason)
+ PTR var;
+ FILE *file;
+ long offset;
+ size_t size;
+ const char *reason;
{
- char * message;
- va_list args;
+ PTR mvar;
- fprintf (stderr, _("%s: Warning: "), program_name);
- va_start (args);
- message = va_arg (args, char *);
- vfprintf (stderr, message, args);
- va_end (args);
- return;
+ if (size == 0)
+ return NULL;
+
+ if (fseek (file, offset, SEEK_SET))
+ {
+ error (_("Unable to seek to %x for %s\n"), offset, reason);
+ return NULL;
+ }
+
+ mvar = var;
+ if (mvar == NULL)
+ {
+ mvar = (PTR) malloc (size);
+
+ if (mvar == NULL)
+ {
+ error (_("Out of memory allocating %d bytes for %s\n"),
+ size, reason);
+ return NULL;
+ }
+ }
+
+ if (fread (mvar, size, 1, file) != 1)
+ {
+ error (_("Unable to read in %d bytes of %s\n"), size, reason);
+ if (mvar != var)
+ free (mvar);
+ return NULL;
+ }
+
+ return mvar;
}
-#endif
static bfd_vma
byte_get_little_endian (field, size)
@@ -454,7 +468,7 @@ print_vma (vma, mode)
printf ("%lx", vma);
#else
if (_bfd_int64_high (vma))
- printf ("%lx%lx", _bfd_int64_high (vma), _bfd_int64_low (vma));
+ printf ("%lx%8.8lx", _bfd_int64_high (vma), _bfd_int64_low (vma));
else
printf ("%lx", _bfd_int64_low (vma));
#endif
@@ -500,6 +514,25 @@ print_vma (vma, mode)
#endif
}
+/* Display a symbol on stdout. If do_wide is not true then
+ format the symbol to be at most WIDTH characters,
+ truhncating as necessary. If WIDTH is negative then
+ format the string to be exactly - WIDTH characters,
+ truncating or padding as necessary. */
+
+static void
+print_symbol (width, symbol)
+ int width;
+ char * symbol;
+{
+ if (do_wide)
+ printf (symbol);
+ else if (width < 0)
+ printf ("%-*.*s", width, width, symbol);
+ else
+ printf ("%-.*s", width, symbol);
+}
+
static bfd_vma
byte_get_big_endian (field, size)
unsigned char * field;
@@ -563,7 +596,9 @@ guess_is_rela (e_machine)
case EM_386:
case EM_486:
case EM_960:
+ case EM_M32R:
case EM_CYGNUS_M32R:
+ case EM_D10V:
case EM_CYGNUS_D10V:
case EM_MIPS:
case EM_MIPS_RS3_LE:
@@ -571,23 +606,37 @@ guess_is_rela (e_machine)
/* Targets that use RELA relocations. */
case EM_68K:
+ case EM_H8_300:
+ case EM_H8_300H:
+ case EM_H8S:
case EM_SPARC32PLUS:
case EM_SPARCV9:
case EM_SPARC:
case EM_PPC:
+ case EM_PPC64:
+ case EM_V850:
case EM_CYGNUS_V850:
+ case EM_D30V:
case EM_CYGNUS_D30V:
+ case EM_MN10200:
case EM_CYGNUS_MN10200:
+ case EM_MN10300:
case EM_CYGNUS_MN10300:
+ case EM_FR30:
case EM_CYGNUS_FR30:
case EM_SH:
case EM_ALPHA:
case EM_MCORE:
case EM_IA_64:
case EM_AVR:
+ case EM_AVR_OLD:
case EM_CRIS:
case EM_860:
case EM_X86_64:
+ case EM_S390:
+ case EM_S390_OLD:
+ case EM_MMIX:
+ case EM_XSTORMY16:
return TRUE;
case EM_MMA:
@@ -630,8 +679,10 @@ slurp_rela_relocs (file, rel_offset, rel_size, relasp, nrelasp)
{
Elf32_External_Rela * erelas;
- GET_DATA_ALLOC (rel_offset, rel_size, erelas,
- Elf32_External_Rela *, "relocs");
+ erelas = (Elf32_External_Rela *) get_data (NULL, file, rel_offset,
+ rel_size, _("relocs"));
+ if (!erelas)
+ return 0;
nrelas = rel_size / sizeof (Elf32_External_Rela);
@@ -657,8 +708,10 @@ slurp_rela_relocs (file, rel_offset, rel_size, relasp, nrelasp)
{
Elf64_External_Rela * erelas;
- GET_DATA_ALLOC (rel_offset, rel_size, erelas,
- Elf64_External_Rela *, "relocs");
+ erelas = (Elf64_External_Rela *) get_data (NULL, file, rel_offset,
+ rel_size, _("relocs"));
+ if (!erelas)
+ return 0;
nrelas = rel_size / sizeof (Elf64_External_Rela);
@@ -701,8 +754,10 @@ slurp_rel_relocs (file, rel_offset, rel_size, relsp, nrelsp)
{
Elf32_External_Rel * erels;
- GET_DATA_ALLOC (rel_offset, rel_size, erels,
- Elf32_External_Rel *, "relocs");
+ erels = (Elf32_External_Rel *) get_data (NULL, file, rel_offset,
+ rel_size, _("relocs"));
+ if (!erels)
+ return 0;
nrels = rel_size / sizeof (Elf32_External_Rel);
@@ -726,8 +781,10 @@ slurp_rel_relocs (file, rel_offset, rel_size, relsp, nrelsp)
{
Elf64_External_Rel * erels;
- GET_DATA_ALLOC (rel_offset, rel_size, erels,
- Elf64_External_Rel *, "relocs");
+ erels = (Elf64_External_Rel *) get_data (NULL, file, rel_offset,
+ rel_size, _("relocs"));
+ if (!erels)
+ return 0;
nrels = rel_size / sizeof (Elf64_External_Rel);
@@ -782,12 +839,24 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela)
return 0;
}
- if (is_rela)
- printf
- (_(" Offset Info Type Symbol's Value Symbol's Name Addend\n"));
+ if (is_32bit_elf)
+ {
+ 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"));
+ }
else
- printf
- (_(" Offset Info Type Symbol's Value Symbol's Name\n"));
+ {
+ 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++)
{
@@ -827,11 +896,26 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela)
#endif
}
+ if (is_32bit_elf)
+ {
+#ifdef _bfd_int64_low
+ printf ("%8.8lx %8.8lx ", _bfd_int64_low (offset), _bfd_int64_low (info));
+#else
+ printf ("%8.8lx %8.8lx ", offset, info);
+#endif
+ }
+ else
+ {
#ifdef _bfd_int64_low
- printf (" %8.8lx %5.5lx ", _bfd_int64_low (offset), _bfd_int64_low (info));
+ printf ("%8.8lx%8.8lx %8.8lx%8.8lx ",
+ _bfd_int64_high (offset),
+ _bfd_int64_low (offset),
+ _bfd_int64_high (info),
+ _bfd_int64_low (info));
#else
- printf (" %8.8lx %5.5lx ", offset, info);
+ printf ("%16.16lx %16.16lx ", offset, info);
#endif
+ }
switch (elf_header.e_machine)
{
@@ -839,6 +923,7 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela)
rtype = NULL;
break;
+ case EM_M32R:
case EM_CYGNUS_M32R:
rtype = elf_m32r_reloc_type (type);
break;
@@ -857,6 +942,7 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela)
break;
case EM_AVR:
+ case EM_AVR_OLD:
rtype = elf_avr_reloc_type (type);
break;
@@ -867,14 +953,17 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela)
rtype = elf_sparc_reloc_type (type);
break;
+ case EM_V850:
case EM_CYGNUS_V850:
rtype = v850_reloc_type (type);
break;
+ case EM_D10V:
case EM_CYGNUS_D10V:
rtype = elf_d10v_reloc_type (type);
break;
+ case EM_D30V:
case EM_CYGNUS_D30V:
rtype = elf_d30v_reloc_type (type);
break;
@@ -883,14 +972,17 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela)
rtype = elf_sh_reloc_type (type);
break;
+ case EM_MN10300:
case EM_CYGNUS_MN10300:
rtype = elf_mn10300_reloc_type (type);
break;
+ case EM_MN10200:
case EM_CYGNUS_MN10200:
rtype = elf_mn10200_reloc_type (type);
break;
+ case EM_FR30:
case EM_CYGNUS_FR30:
rtype = elf_fr30_reloc_type (type);
break;
@@ -899,7 +991,12 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela)
rtype = elf_mcore_reloc_type (type);
break;
+ case EM_MMIX:
+ rtype = elf_mmix_reloc_type (type);
+ break;
+
case EM_PPC:
+ case EM_PPC64:
rtype = elf_ppc_reloc_type (type);
break;
@@ -916,7 +1013,6 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela)
rtype = elf_arm_reloc_type (type);
break;
- case EM_CYGNUS_ARC:
case EM_ARC:
rtype = elf_arc_reloc_type (type);
break;
@@ -925,7 +1021,14 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela)
rtype = elf_hppa_reloc_type (type);
break;
+ case EM_H8_300:
+ case EM_H8_300H:
+ case EM_H8S:
+ rtype = elf_h8_reloc_type (type);
+ break;
+
case EM_PJ:
+ case EM_PJ_OLD:
rtype = elf_pj_reloc_type (type);
break;
case EM_IA_64:
@@ -943,6 +1046,15 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela)
case EM_X86_64:
rtype = elf_x86_64_reloc_type (type);
break;
+
+ case EM_S390_OLD:
+ case EM_S390:
+ rtype = elf_s390_reloc_type (type);
+ break;
+
+ case EM_XSTORMY16:
+ rtype = elf_xstormy16_reloc_type (type);
+ break;
}
if (rtype == NULL)
@@ -956,31 +1068,27 @@ dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela)
if (symtab_index)
{
- if (symtab != NULL)
+ if (symtab == NULL || symtab_index >= nsyms)
+ printf (" bad symbol index: %08lx", (unsigned long) symtab_index);
+ else
{
- if (symtab_index >= nsyms)
- printf (" bad symbol index: %08lx", (unsigned long) symtab_index);
- else
- {
- Elf_Internal_Sym * psym;
+ Elf_Internal_Sym * psym;
- psym = symtab + symtab_index;
+ psym = symtab + symtab_index;
- printf (" ");
- print_vma (psym->st_value, LONG_HEX);
- printf (" ");
+ 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 (psym->st_name == 0)
+ print_symbol (-25, SECTION_NAME (section_headers + psym->st_shndx));
+ else if (strtab == NULL)
+ printf (_("<string table index %3ld>"), psym->st_name);
+ else
+ print_symbol (-25, strtab + psym->st_name);
- if (is_rela)
- printf (" + %lx", (unsigned long) relas [i].r_addend);
- }
+ if (is_rela)
+ printf (" + %lx", (unsigned long) relas [i].r_addend);
}
}
else if (is_rela)
@@ -1071,6 +1179,18 @@ get_sparc64_dynamic_type (type)
}
static const char *
+get_ppc64_dynamic_type (type)
+ unsigned long type;
+{
+ switch (type)
+ {
+ case DT_PPC64_GLINK: return "PPC64_GLINK";
+ default:
+ return NULL;
+ }
+}
+
+static const char *
get_parisc_dynamic_type (type)
unsigned long type;
{
@@ -1182,6 +1302,9 @@ get_dynamic_type (type)
case EM_SPARCV9:
result = get_sparc64_dynamic_type (type);
break;
+ case EM_PPC64:
+ result = get_ppc64_dynamic_type (type);
+ break;
default:
result = NULL;
break;
@@ -1251,32 +1374,33 @@ get_machine_name (e_machine)
switch (e_machine)
{
- case EM_NONE: return _("None");
- case EM_M32: return "WE32100";
- case EM_SPARC: return "Sparc";
- case EM_386: return "Intel 80386";
- case EM_68K: return "MC68000";
- case EM_88K: return "MC88000";
- case EM_486: return "Intel 80486";
- case EM_860: return "Intel 80860";
- case EM_MIPS: return "MIPS R3000";
- case EM_S370: return "IBM System/370";
+ case EM_NONE: return _("None");
+ case EM_M32: return "WE32100";
+ case EM_SPARC: return "Sparc";
+ case EM_386: return "Intel 80386";
+ case EM_68K: return "MC68000";
+ case EM_88K: return "MC88000";
+ case EM_486: return "Intel 80486";
+ case EM_860: return "Intel 80860";
+ case EM_MIPS: return "MIPS R3000";
+ case EM_S370: return "IBM System/370";
case EM_MIPS_RS3_LE: return "MIPS R4000 big-endian";
case EM_OLD_SPARCV9: return "Sparc v9 (old)";
- case EM_PARISC: return "HPPA";
+ case EM_PARISC: return "HPPA";
case EM_PPC_OLD: return "Power PC (old)";
case EM_SPARC32PLUS: return "Sparc v8+" ;
- case EM_960: return "Intel 90860";
- case EM_PPC: return "PowerPC";
- case EM_V800: return "NEC V800";
- case EM_FR20: return "Fujitsu FR20";
- case EM_RH32: return "TRW RH32";
+ case EM_960: return "Intel 90860";
+ case EM_PPC: return "PowerPC";
+ case EM_PPC64: return "PowerPC64";
+ 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_SPARCV9: return "Sparc v9";
+ case EM_TRICORE: return "Siemens Tricore";
case EM_ARC: return "ARC";
case EM_H8_300: return "Hitachi H8/300";
case EM_H8_300H: return "Hitachi H8/300H";
@@ -1286,15 +1410,22 @@ get_machine_name (e_machine)
case EM_MIPS_X: return "Stanford MIPS-X";
case EM_COLDFIRE: return "Motorola Coldfire";
case EM_68HC12: return "Motorola M68HC12";
- case EM_ALPHA: return "Alpha";
- case EM_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_ALPHA: return "Alpha";
+ case EM_CYGNUS_D10V:
+ case EM_D10V: return "d10v";
+ case EM_CYGNUS_D30V:
+ case EM_D30V: return "d30v";
+ case EM_CYGNUS_M32R:
+ case EM_M32R: return "Mitsubishi M32r";
+ case EM_CYGNUS_V850:
+ case EM_V850: return "NEC v850";
+ case EM_CYGNUS_MN10300:
+ case EM_MN10300: return "mn10300";
+ case EM_CYGNUS_MN10200:
+ case EM_MN10200: return "mn10200";
+ case EM_CYGNUS_FR30:
+ case EM_FR30: return "Fujitsu FR30";
+ case EM_PJ_OLD:
case EM_PJ: return "picoJava";
case EM_MMA: return "Fujitsu Multimedia Accelerator";
case EM_PCP: return "Siemens PCP";
@@ -1314,15 +1445,19 @@ get_machine_name (e_machine)
case EM_SVX: return "Silicon Graphics SVx";
case EM_ST19: return "STMicroelectronics ST19 8-bit microcontroller";
case EM_VAX: return "Digital VAX";
+ case EM_AVR_OLD:
case EM_AVR: return "Atmel AVR 8-bit microcontroller";
case EM_CRIS: return "Axis Communications 32-bit embedded processor";
- case EM_JAVELIN: return "Infineon Technologies 32-bit embedded cpu";
- case EM_FIREPATH: return "Element 14 64-bit DSP processor";
- case EM_ZSP: return "LSI Logic's 16-bit DSP processor";
+ case EM_JAVELIN: return "Infineon Technologies 32-bit embedded cpu";
+ case EM_FIREPATH: return "Element 14 64-bit DSP processor";
+ case EM_ZSP: return "LSI Logic's 16-bit DSP processor";
case EM_MMIX: return "Donald Knuth's educational 64-bit processor";
- case EM_HUANY: return "Harvard Universitys's machine-independent object format";
- case EM_PRISM: return "SiTera Prism";
+ case EM_HUANY: return "Harvard Universitys's machine-independent object format";
+ case EM_PRISM: return "SiTera Prism";
case EM_X86_64: return "Advanced Micro Devices X86-64";
+ case EM_S390_OLD:
+ case EM_S390: return "IBM S/390";
+ case EM_XSTORMY16: return "Sanyo Xstormy16 CPU core";
default:
sprintf (buff, _("<unknown>: %x"), e_machine);
return buff;
@@ -1357,12 +1492,13 @@ decode_ARM_machine_flags (e_flags, buf)
switch (eabi)
{
default:
- strcat (buf, ", <unknown EABI>");
+ strcat (buf, ", <unrecognised EABI>");
if (e_flags)
unknown = 1;
break;
case EF_ARM_EABI_VER1:
+ strcat (buf, ", Version1 EABI");
while (e_flags)
{
unsigned flag;
@@ -1373,7 +1509,7 @@ decode_ARM_machine_flags (e_flags, buf)
switch (flag)
{
- case EF_ARM_SYMSARESORTED: /* Conflicts with EF_INTERWORK. */
+ case EF_ARM_SYMSARESORTED: /* Conflicts with EF_ARM_INTERWORK. */
strcat (buf, ", sorted symbol tables");
break;
@@ -1384,7 +1520,39 @@ decode_ARM_machine_flags (e_flags, buf)
}
break;
+ case EF_ARM_EABI_VER2:
+ strcat (buf, ", Version2 EABI");
+ while (e_flags)
+ {
+ unsigned flag;
+
+ /* Process flags one bit at a time. */
+ flag = e_flags & - e_flags;
+ e_flags &= ~ flag;
+
+ switch (flag)
+ {
+ case EF_ARM_SYMSARESORTED: /* Conflicts with EF_ARM_INTERWORK. */
+ strcat (buf, ", sorted symbol tables");
+ break;
+
+ case EF_ARM_DYNSYMSUSESEGIDX:
+ strcat (buf, ", dynamic symbols use segment index");
+ break;
+
+ case EF_ARM_MAPSYMSFIRST:
+ strcat (buf, ", mapping symbols precede others");
+ break;
+
+ default:
+ unknown = 1;
+ break;
+ }
+ }
+ break;
+
case EF_ARM_EABI_UNKNOWN:
+ strcat (buf, ", GNU EABI");
while (e_flags)
{
unsigned flag;
@@ -1395,35 +1563,35 @@ decode_ARM_machine_flags (e_flags, buf)
switch (flag)
{
- case EF_INTERWORK:
+ case EF_ARM_INTERWORK:
strcat (buf, ", interworking enabled");
break;
- case EF_APCS_26:
+ case EF_ARM_APCS_26:
strcat (buf, ", uses APCS/26");
break;
- case EF_APCS_FLOAT:
+ case EF_ARM_APCS_FLOAT:
strcat (buf, ", uses APCS/float");
break;
- case EF_PIC:
+ case EF_ARM_PIC:
strcat (buf, ", position independent");
break;
- case EF_ALIGN8:
+ case EF_ARM_ALIGN8:
strcat (buf, ", 8 bit structure alignment");
break;
- case EF_NEW_ABI:
+ case EF_ARM_NEW_ABI:
strcat (buf, ", uses new ABI");
break;
- case EF_OLD_ABI:
+ case EF_ARM_OLD_ABI:
strcat (buf, ", uses old ABI");
break;
- case EF_SOFT_FLOAT:
+ case EF_ARM_SOFT_FLOAT:
strcat (buf, ", software FP");
break;
@@ -1474,6 +1642,7 @@ get_machine_flags (e_flags, e_machine)
strcat (buf, ", relocatable-lib");
break;
+ case EM_V850:
case EM_CYGNUS_V850:
switch (e_flags & EF_V850_ARCH)
{
@@ -1492,6 +1661,7 @@ get_machine_flags (e_flags, e_machine)
}
break;
+ case EM_M32R:
case EM_CYGNUS_M32R:
if ((e_flags & EF_M32R_ARCH) == E_M32R_ARCH)
strcat (buf, ", m32r");
@@ -1509,29 +1679,17 @@ get_machine_flags (e_flags, e_machine)
if (e_flags & EF_MIPS_CPIC)
strcat (buf, ", cpic");
+ if (e_flags & EF_MIPS_UCODE)
+ strcat (buf, ", ugen_reserved");
+
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");
+ if (e_flags & EF_MIPS_OPTIONS_FIRST)
+ strcat (buf, ", odk first");
- if ((e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_5)
- strcat (buf, ", mips5");
-
- if ((e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_32)
- strcat (buf, ", mips32");
-
- if ((e_flags & EF_MIPS_ARCH) == E_MIPS_ARCH_64)
- strcat (buf, ", mips64");
+ if (e_flags & EF_MIPS_32BITMODE)
+ strcat (buf, ", 32bitmode");
switch ((e_flags & EF_MIPS_MACH))
{
@@ -1540,10 +1698,48 @@ get_machine_flags (e_flags, e_machine)
case E_MIPS_MACH_4100: strcat (buf, ", 4100"); break;
case E_MIPS_MACH_4650: strcat (buf, ", 4650"); break;
case E_MIPS_MACH_4111: strcat (buf, ", 4111"); break;
- case E_MIPS_MACH_MIPS32_4K: strcat (buf, ", mips32-4k"); break;
case E_MIPS_MACH_SB1: strcat (buf, ", sb1"); break;
- default: strcat (buf, " UNKNOWN"); break;
+ case 0:
+ /* We simply ignore the field in this case to avoid confusion:
+ MIPS ELF does not specify EF_MIPS_MACH, it is a GNU
+ extension. */
+ break;
+ default: strcat (buf, ", unknown CPU"); break;
+ }
+
+ switch ((e_flags & EF_MIPS_ABI))
+ {
+ case E_MIPS_ABI_O32: strcat (buf, ", o32"); break;
+ case E_MIPS_ABI_O64: strcat (buf, ", o64"); break;
+ case E_MIPS_ABI_EABI32: strcat (buf, ", eabi32"); break;
+ case E_MIPS_ABI_EABI64: strcat (buf, ", eabi64"); break;
+ case 0:
+ /* We simply ignore the field in this case to avoid confusion:
+ MIPS ELF does not specify EF_MIPS_ABI, it is a GNU extension.
+ This means it is likely to be an o32 file, but not for
+ sure. */
+ break;
+ default: strcat (buf, ", unknown ABI"); break;
+ }
+
+ if (e_flags & EF_MIPS_ARCH_ASE_MDMX)
+ strcat (buf, ", mdmx");
+
+ if (e_flags & EF_MIPS_ARCH_ASE_M16)
+ strcat (buf, ", mips16");
+
+ switch ((e_flags & EF_MIPS_ARCH))
+ {
+ case E_MIPS_ARCH_1: strcat (buf, ", mips1"); break;
+ case E_MIPS_ARCH_2: strcat (buf, ", mips2"); break;
+ case E_MIPS_ARCH_3: strcat (buf, ", mips3"); break;
+ case E_MIPS_ARCH_4: strcat (buf, ", mips4"); break;
+ case E_MIPS_ARCH_5: strcat (buf, ", mips5"); break;
+ case E_MIPS_ARCH_32: strcat (buf, ", mips32"); break;
+ case E_MIPS_ARCH_64: strcat (buf, ", mips64"); break;
+ default: strcat (buf, ", unknown ISA"); break;
}
+
break;
case EM_SPARCV9:
@@ -1602,6 +1798,7 @@ get_machine_flags (e_flags, e_machine)
break;
case EM_PJ:
+ case EM_PJ_OLD:
if ((e_flags & EF_PICOJAVA_NEWCALLS) == EF_PICOJAVA_NEWCALLS)
strcat (buf, ", new calling convention");
@@ -1683,6 +1880,10 @@ get_ia64_segment_type (type)
{
case PT_IA_64_ARCHEXT: return "IA_64_ARCHEXT";
case PT_IA_64_UNWIND: return "IA_64_UNWIND";
+ case PT_HP_TLS: return "HP_TLS";
+ case PT_IA_64_HP_OPT_ANOT: return "HP_OPT_ANNOT";
+ case PT_IA_64_HP_HSL_ANOT: return "HP_HSL_ANNOT";
+ case PT_IA_64_HP_STACK: return "HP_STACK";
default:
break;
}
@@ -1706,6 +1907,9 @@ get_segment_type (p_type)
case PT_SHLIB: return "SHLIB";
case PT_PHDR: return "PHDR";
+ case PT_GNU_EH_FRAME:
+ return "GNU_EH_FRAME";
+
default:
if ((p_type >= PT_LOPROC) && (p_type <= PT_HIPROC))
{
@@ -1742,6 +1946,9 @@ get_segment_type (p_type)
case EM_PARISC:
result = get_parisc_segment_type (p_type);
break;
+ case EM_IA_64:
+ result = get_ia64_segment_type (p_type);
+ break;
default:
result = NULL;
break;
@@ -1897,12 +2104,12 @@ get_section_type_name (sh_type)
if (result != NULL)
return result;
- sprintf (buff, "SHT_LOPROC+%x", sh_type - SHT_LOPROC);
+ sprintf (buff, "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);
+ sprintf (buff, "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);
+ sprintf (buff, "LOUSER+%x", sh_type - SHT_LOUSER);
else
sprintf (buff, _("<unknown>: %x"), sh_type);
@@ -1936,6 +2143,7 @@ struct option options [] =
#endif
{"version", no_argument, 0, 'v'},
+ {"wide", no_argument, 0, 'W'},
{"help", no_argument, 0, 'H'},
{0, no_argument, 0, 0}
};
@@ -1943,34 +2151,38 @@ struct option options [] =
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, _(" -u or --unwind Display the unwind info (if present)\n"));
- fprintf (stdout, _(" -d or --dynamic Display the dynamic segment (if present)\n"));
- fprintf (stdout, _(" -V or --version-info Display the version sections (if present)\n"));
- fprintf (stdout, _(" -A or --arch-specific Display architecture specific information (if any).\n"));
- 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[liaprf] or --debug-dump[=line,=info,=abbrev,=pubnames,=ranges,=frames]\n"));
- fprintf (stdout, _(" Display the contents of DWARF2 debug sections\n"));
+ fprintf (stdout, _("Usage: readelf <option(s)> elf-file(s)\n"));
+ fprintf (stdout, _(" Display information about the contents of ELF format files\n"));
+ fprintf (stdout, _(" Options are:\n\
+ -a --all Equivalent to: -h -l -S -s -r -d -V -A -I\n\
+ -h --file-header Display the ELF file header\n\
+ -l --program-headers Display the program headers\n\
+ --segments An alias for --program-headers\n\
+ -S --section-headers Display the sections' header\n\
+ --sections An alias for --section-headers\n\
+ -e --headers Equivalent to: -h -l -S\n\
+ -s --syms Display the symbol table\n\
+ --symbols An alias for --syms\n\
+ -n --notes Display the core notes (if present)\n\
+ -r --relocs Display the relocations (if present)\n\
+ -u --unwind Display the unwind info (if present)\n\
+ -d --dynamic Display the dynamic segment (if present)\n\
+ -V --version-info Display the version sections (if present)\n\
+ -A --arch-specific Display architecture specific information (if any).\n\
+ -D --use-dynamic Use the dynamic section info when displaying symbols\n\
+ -x --hex-dump=<number> Dump the contents of section <number>\n\
+ -w --debug-dump[=line,=info,=abbrev,=pubnames,=ranges,=macro,=frames,=str]\n\
+ 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"));
+ fprintf (stdout, _("\
+ -i --instruction-dump=<number>\n\
+ 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, _("\
+ -I --histogram Display histogram of bucket list lengths\n\
+ -W --wide Allow output width to exceed 80 characters\n\
+ -H --help Display this information\n\
+ -v --version Display the version number of readelf\n"));
fprintf (stdout, _("Report bugs to %s\n"), REPORT_BUGS_TO);
exit (0);
@@ -1979,7 +2191,7 @@ usage ()
static void
request_dump (section, type)
unsigned int section;
- char type;
+ int type;
{
if (section >= num_dump_sects)
{
@@ -2018,7 +2230,7 @@ parse_args (argc, argv)
usage ();
while ((c = getopt_long
- (argc, argv, "ersuahnldSDAIw::x:i:vV", options, NULL)) != EOF)
+ (argc, argv, "ersuahnldSDAIw::x:i:vVW", options, NULL)) != EOF)
{
char * cp;
int section;
@@ -2098,44 +2310,58 @@ parse_args (argc, argv)
do_debugging = 1;
else
{
+ unsigned int index = 0;
+
do_debugging = 0;
- switch (optarg[0])
- {
- case 'i':
- case 'I':
- do_debug_info = 1;
- break;
- case 'a':
- case 'A':
- do_debug_abbrevs = 1;
- break;
+ while (optarg[index])
+ switch (optarg[index++])
+ {
+ case 'i':
+ case 'I':
+ do_debug_info = 1;
+ break;
- case 'l':
- case 'L':
- do_debug_lines = 1;
- break;
+ case 'a':
+ case 'A':
+ do_debug_abbrevs = 1;
+ break;
- case 'p':
- case 'P':
- do_debug_pubnames = 1;
- break;
+ case 'l':
+ case 'L':
+ do_debug_lines = 1;
+ break;
- case 'r':
- case 'R':
- do_debug_aranges = 1;
- break;
+ case 'p':
+ case 'P':
+ do_debug_pubnames = 1;
+ break;
- case 'F':
- do_debug_frames_interp = 1;
- case 'f':
- do_debug_frames = 1;
- break;
+ case 'r':
+ case 'R':
+ do_debug_aranges = 1;
+ break;
- default:
- warn (_("Unrecognised debug option '%s'\n"), optarg);
- break;
- }
+ case 'F':
+ do_debug_frames_interp = 1;
+ case 'f':
+ do_debug_frames = 1;
+ break;
+
+ case 'm':
+ case 'M':
+ do_debug_macinfo = 1;
+ break;
+
+ case 's':
+ case 'S':
+ do_debug_str = 1;
+ break;
+
+ default:
+ warn (_("Unrecognised debug option '%s'\n"), optarg);
+ break;
+ }
}
break;
#ifdef SUPPORT_DISASSEMBLY
@@ -2155,6 +2381,9 @@ parse_args (argc, argv)
case 'V':
do_version ++;
break;
+ case 'W':
+ do_wide ++;
+ break;
default:
oops:
/* xgettext:c-format */
@@ -2178,15 +2407,15 @@ parse_args (argc, argv)
static const char *
get_elf_class (elf_class)
- unsigned char elf_class;
+ unsigned int elf_class;
{
static char buff [32];
switch (elf_class)
{
case ELFCLASSNONE: return _("none");
- case ELFCLASS32: return _("ELF32");
- case ELFCLASS64: return _("ELF64");
+ case ELFCLASS32: return "ELF32";
+ case ELFCLASS64: return "ELF64";
default:
sprintf (buff, _("<unknown: %x>"), elf_class);
return buff;
@@ -2195,7 +2424,7 @@ get_elf_class (elf_class)
static const char *
get_data_encoding (encoding)
- unsigned char encoding;
+ unsigned int encoding;
{
static char buff [32];
@@ -2212,26 +2441,26 @@ get_data_encoding (encoding)
static const char *
get_osabi_name (osabi)
- unsigned char osabi;
+ unsigned int osabi;
{
static char buff [32];
switch (osabi)
{
- case ELFOSABI_NONE: return _("UNIX - System V");
- case ELFOSABI_HPUX: return _("UNIX - HP-UX");
- case ELFOSABI_NETBSD: return _("UNIX - NetBSD");
- case ELFOSABI_LINUX: return _("UNIX - Linux");
- case ELFOSABI_HURD: return _("GNU/Hurd");
- case ELFOSABI_SOLARIS: return _("UNIX - Solaris");
- case ELFOSABI_AIX: return _("UNIX - AIX");
- case ELFOSABI_IRIX: return _("UNIX - IRIX");
- case ELFOSABI_FREEBSD: return _("UNIX - FreeBSD");
- case ELFOSABI_TRU64: return _("UNIX - TRU64");
- case ELFOSABI_MODESTO: return _("Novell - Modesto");
- case ELFOSABI_OPENBSD: return _("UNIX - OpenBSD");
+ case ELFOSABI_NONE: return "UNIX - System V";
+ case ELFOSABI_HPUX: return "UNIX - HP-UX";
+ case ELFOSABI_NETBSD: return "UNIX - NetBSD";
+ case ELFOSABI_LINUX: return "UNIX - Linux";
+ case ELFOSABI_HURD: return "GNU/Hurd";
+ case ELFOSABI_SOLARIS: return "UNIX - Solaris";
+ case ELFOSABI_AIX: return "UNIX - AIX";
+ case ELFOSABI_IRIX: return "UNIX - IRIX";
+ case ELFOSABI_FREEBSD: return "UNIX - FreeBSD";
+ case ELFOSABI_TRU64: return "UNIX - TRU64";
+ case ELFOSABI_MODESTO: return "Novell - Modesto";
+ case ELFOSABI_OPENBSD: return "UNIX - OpenBSD";
case ELFOSABI_STANDALONE: return _("Standalone App");
- case ELFOSABI_ARM: return _("ARM");
+ case ELFOSABI_ARM: return "ARM";
default:
sprintf (buff, _("<unknown: %x>"), osabi);
return buff;
@@ -2302,10 +2531,26 @@ process_file_header ()
(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"),
+ printf (_(" Number of section headers: %ld"),
(long) elf_header.e_shnum);
- printf (_(" Section header string table index: %ld\n"),
+ if (section_headers != NULL && elf_header.e_shnum == 0)
+ printf (" (%ld)", (long) section_headers[0].sh_size);
+ putc ('\n', stdout);
+ printf (_(" Section header string table index: %ld"),
(long) elf_header.e_shstrndx);
+ if (section_headers != NULL && elf_header.e_shstrndx == SHN_XINDEX)
+ printf (" (%ld)", (long) section_headers[0].sh_link);
+ putc ('\n', stdout);
+ }
+
+ if (section_headers != NULL)
+ {
+ if (elf_header.e_shnum == 0)
+ elf_header.e_shnum = section_headers[0].sh_size;
+ if (elf_header.e_shstrndx == SHN_XINDEX)
+ elf_header.e_shstrndx = section_headers[0].sh_link;
+ free (section_headers);
+ section_headers = NULL;
}
return 1;
@@ -2322,9 +2567,12 @@ get_32bit_program_headers (file, program_headers)
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");
+ phdrs = ((Elf32_External_Phdr *)
+ get_data (NULL, file, elf_header.e_phoff,
+ elf_header.e_phentsize * elf_header.e_phnum,
+ _("program headers")));
+ if (!phdrs)
+ return 0;
for (i = 0, internal = program_headers, external = phdrs;
i < elf_header.e_phnum;
@@ -2355,9 +2603,12 @@ get_64bit_program_headers (file, program_headers)
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");
+ phdrs = ((Elf64_External_Phdr *)
+ get_data (NULL, file, elf_header.e_phoff,
+ elf_header.e_phentsize * elf_header.e_phnum,
+ _("program headers")));
+ if (!phdrs)
+ return 0;
for (i = 0, internal = program_headers, external = phdrs;
i < elf_header.e_phnum;
@@ -2432,6 +2683,9 @@ process_program_headers (file)
if (is_32bit_elf)
printf
(_(" Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align\n"));
+ else if (do_wide)
+ printf
+ (_(" Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align\n"));
else
{
printf
@@ -2466,6 +2720,48 @@ process_program_headers (file)
(segment->p_flags & PF_X ? 'E' : ' '));
printf ("%#lx", (unsigned long) segment->p_align);
}
+ else if (do_wide)
+ {
+ if ((unsigned long) segment->p_offset == segment->p_offset)
+ printf ("0x%6.6lx ", (unsigned long) segment->p_offset);
+ else
+ {
+ print_vma (segment->p_offset, FULL_HEX);
+ putchar (' ');
+ }
+
+ print_vma (segment->p_vaddr, FULL_HEX);
+ putchar (' ');
+ print_vma (segment->p_paddr, FULL_HEX);
+ putchar (' ');
+
+ if ((unsigned long) segment->p_filesz == segment->p_filesz)
+ printf ("0x%6.6lx ", (unsigned long) segment->p_filesz);
+ else
+ {
+ print_vma (segment->p_filesz, FULL_HEX);
+ putchar (' ');
+ }
+
+ if ((unsigned long) segment->p_memsz == segment->p_memsz)
+ printf ("0x%6.6lx", (unsigned long) segment->p_memsz);
+ else
+ {
+ print_vma (segment->p_offset, FULL_HEX);
+ }
+
+ printf (" %c%c%c ",
+ (segment->p_flags & PF_R ? 'R' : ' '),
+ (segment->p_flags & PF_W ? 'W' : ' '),
+ (segment->p_flags & PF_X ? 'E' : ' '));
+
+ if ((unsigned long) segment->p_align == segment->p_align)
+ printf ("%#lx", (unsigned long) segment->p_align);
+ else
+ {
+ print_vma (segment->p_align, PREFIX_HEX);
+ }
+ }
else
{
print_vma (segment->p_offset, FULL_HEX);
@@ -2522,7 +2818,7 @@ process_program_headers (file)
if (loadaddr == -1)
{
- /* Very strange. */
+ /* Very strange. */
loadaddr = 0;
}
@@ -2535,7 +2831,7 @@ process_program_headers (file)
for (i = 0; i < elf_header.e_phnum; i++)
{
- int j;
+ unsigned int j;
Elf_Internal_Shdr * section;
segment = program_headers + i;
@@ -2543,7 +2839,7 @@ process_program_headers (file)
printf (" %2.2d ", i);
- for (j = 0; j < elf_header.e_shnum; j++, section ++)
+ for (j = 1; j < elf_header.e_shnum; j++, section ++)
{
if (section->sh_size > 0
/* Compare allocated sections by VMA, unallocated
@@ -2569,19 +2865,23 @@ process_program_headers (file)
static int
-get_32bit_section_headers (file)
+get_32bit_section_headers (file, num)
FILE * file;
+ unsigned int num;
{
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");
+ shdrs = ((Elf32_External_Shdr *)
+ get_data (NULL, file, elf_header.e_shoff,
+ elf_header.e_shentsize * num,
+ _("section headers")));
+ if (!shdrs)
+ return 0;
- section_headers = (Elf_Internal_Shdr *) malloc
- (elf_header.e_shnum * sizeof (Elf_Internal_Shdr));
+ section_headers = ((Elf_Internal_Shdr *)
+ malloc (num * sizeof (Elf_Internal_Shdr)));
if (section_headers == NULL)
{
@@ -2590,7 +2890,7 @@ get_32bit_section_headers (file)
}
for (i = 0, internal = section_headers;
- i < elf_header.e_shnum;
+ i < num;
i ++, internal ++)
{
internal->sh_name = BYTE_GET (shdrs[i].sh_name);
@@ -2611,19 +2911,23 @@ get_32bit_section_headers (file)
}
static int
-get_64bit_section_headers (file)
+get_64bit_section_headers (file, num)
FILE * file;
+ unsigned int num;
{
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");
+ shdrs = ((Elf64_External_Shdr *)
+ get_data (NULL, file, elf_header.e_shoff,
+ elf_header.e_shentsize * num,
+ _("section headers")));
+ if (!shdrs)
+ return 0;
- section_headers = (Elf_Internal_Shdr *) malloc
- (elf_header.e_shnum * sizeof (Elf_Internal_Shdr));
+ section_headers = ((Elf_Internal_Shdr *)
+ malloc (num * sizeof (Elf_Internal_Shdr)));
if (section_headers == NULL)
{
@@ -2632,7 +2936,7 @@ get_64bit_section_headers (file)
}
for (i = 0, internal = section_headers;
- i < elf_header.e_shnum;
+ i < num;
i ++, internal ++)
{
internal->sh_name = BYTE_GET (shdrs[i].sh_name);
@@ -2653,26 +2957,47 @@ get_64bit_section_headers (file)
}
static Elf_Internal_Sym *
-get_32bit_elf_symbols (file, offset, number)
+get_32bit_elf_symbols (file, section)
FILE * file;
- unsigned long offset;
- unsigned long number;
+ Elf_Internal_Shdr *section;
{
+ unsigned long number;
Elf32_External_Sym * esyms;
+ Elf_External_Sym_Shndx *shndx;
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");
+ esyms = ((Elf32_External_Sym *)
+ get_data (NULL, file, section->sh_offset,
+ section->sh_size, _("symbols")));
+ if (!esyms)
+ return NULL;
+
+ shndx = NULL;
+ if (symtab_shndx_hdr != NULL
+ && (symtab_shndx_hdr->sh_link
+ == (unsigned long) SECTION_HEADER_NUM (section - section_headers)))
+ {
+ shndx = ((Elf_External_Sym_Shndx *)
+ get_data (NULL, file, symtab_shndx_hdr->sh_offset,
+ symtab_shndx_hdr->sh_size, _("symtab shndx")));
+ if (!shndx)
+ {
+ free (esyms);
+ return NULL;
+ }
+ }
+ number = section->sh_size / section->sh_entsize;
isyms = (Elf_Internal_Sym *) malloc (number * sizeof (Elf_Internal_Sym));
if (isyms == NULL)
{
error (_("Out of memory\n"));
+ if (shndx)
+ free (shndx);
free (esyms);
-
return NULL;
}
@@ -2684,36 +3009,62 @@ get_32bit_elf_symbols (file, offset, number)
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);
+ if (psym->st_shndx == SHN_XINDEX && shndx != NULL)
+ psym->st_shndx
+ = byte_get ((unsigned char *) &shndx[j], sizeof (shndx[j]));
psym->st_info = BYTE_GET (esyms[j].st_info);
psym->st_other = BYTE_GET (esyms[j].st_other);
}
+ if (shndx)
+ free (shndx);
free (esyms);
return isyms;
}
static Elf_Internal_Sym *
-get_64bit_elf_symbols (file, offset, number)
+get_64bit_elf_symbols (file, section)
FILE * file;
- unsigned long offset;
- unsigned long number;
+ Elf_Internal_Shdr *section;
{
+ unsigned long number;
Elf64_External_Sym * esyms;
+ Elf_External_Sym_Shndx *shndx;
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");
+ esyms = ((Elf64_External_Sym *)
+ get_data (NULL, file, section->sh_offset,
+ section->sh_size, _("symbols")));
+ if (!esyms)
+ return NULL;
+
+ shndx = NULL;
+ if (symtab_shndx_hdr != NULL
+ && (symtab_shndx_hdr->sh_link
+ == (unsigned long) SECTION_HEADER_NUM (section - section_headers)))
+ {
+ shndx = ((Elf_External_Sym_Shndx *)
+ get_data (NULL, file, symtab_shndx_hdr->sh_offset,
+ symtab_shndx_hdr->sh_size, _("symtab shndx")));
+ if (!shndx)
+ {
+ free (esyms);
+ return NULL;
+ }
+ }
+ number = section->sh_size / section->sh_entsize;
isyms = (Elf_Internal_Sym *) malloc (number * sizeof (Elf_Internal_Sym));
if (isyms == NULL)
{
error (_("Out of memory\n"));
+ if (shndx)
+ free (shndx);
free (esyms);
-
return NULL;
}
@@ -2725,10 +3076,15 @@ get_64bit_elf_symbols (file, offset, number)
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);
+ if (psym->st_shndx == SHN_XINDEX && shndx != NULL)
+ psym->st_shndx
+ = byte_get ((unsigned char *) &shndx[j], sizeof (shndx[j]));
psym->st_value = BYTE_GET8 (esyms[j].st_value);
psym->st_size = BYTE_GET8 (esyms[j].st_size);
}
+ if (shndx)
+ free (shndx);
free (esyms);
return isyms;
@@ -2786,7 +3142,7 @@ process_section_headers (file)
FILE * file;
{
Elf_Internal_Shdr * section;
- int i;
+ unsigned int i;
section_headers = NULL;
@@ -2804,25 +3160,25 @@ process_section_headers (file)
if (is_32bit_elf)
{
- if (! get_32bit_section_headers (file))
+ if (! get_32bit_section_headers (file, elf_header.e_shnum))
return 0;
}
- else if (! get_64bit_section_headers (file))
+ else if (! get_64bit_section_headers (file, elf_header.e_shnum))
return 0;
/* Read in the string table, so that we have names to display. */
- section = section_headers + elf_header.e_shstrndx;
+ section = SECTION_HEADER (elf_header.e_shstrndx);
if (section->sh_size != 0)
{
- GET_DATA_ALLOC (section->sh_offset, section->sh_size,
- string_table, char *, "string table");
+ string_table = (char *) get_data (NULL, file, section->sh_offset,
+ section->sh_size, _("string table"));
string_table_length = section->sh_size;
}
/* Scan the sections for the dynamic symbol table
- and dynamic string table and debug sections. */
+ and dynamic string table and debug sections. */
dynamic_symbols = NULL;
dynamic_strings = NULL;
dynamic_syminfo = NULL;
@@ -2842,8 +3198,7 @@ process_section_headers (file)
}
num_dynamic_syms = section->sh_size / section->sh_entsize;
- dynamic_symbols =
- GET_ELF_SYMBOLS (file, section->sh_offset, num_dynamic_syms);
+ dynamic_symbols = GET_ELF_SYMBOLS (file, section);
}
else if (section->sh_type == SHT_STRTAB
&& strcmp (name, ".dynstr") == 0)
@@ -2854,12 +3209,22 @@ process_section_headers (file)
continue;
}
- GET_DATA_ALLOC (section->sh_offset, section->sh_size,
- dynamic_strings, char *, "dynamic strings");
+ dynamic_strings = (char *) get_data (NULL, file, section->sh_offset,
+ section->sh_size,
+ _("dynamic strings"));
+ }
+ else if (section->sh_type == SHT_SYMTAB_SHNDX)
+ {
+ if (symtab_shndx_hdr != NULL)
+ {
+ error (_("File contains multiple symtab shndx tables\n"));
+ continue;
+ }
+ symtab_shndx_hdr = section;
}
else if ((do_debugging || do_debug_info || do_debug_abbrevs
|| do_debug_lines || do_debug_pubnames || do_debug_aranges
- || do_debug_frames)
+ || do_debug_frames || do_debug_macinfo || do_debug_str)
&& strncmp (name, ".debug_", 7) == 0)
{
name += 7;
@@ -2871,6 +3236,8 @@ process_section_headers (file)
|| (do_debug_pubnames && (strcmp (name, "pubnames") == 0))
|| (do_debug_aranges && (strcmp (name, "aranges") == 0))
|| (do_debug_frames && (strcmp (name, "frame") == 0))
+ || (do_debug_macinfo && (strcmp (name, "macinfo") == 0))
+ || (do_debug_str && (strcmp (name, "str") == 0))
)
request_dump (i, DEBUG_DUMP);
}
@@ -2890,6 +3257,9 @@ process_section_headers (file)
if (is_32bit_elf)
printf
(_(" [Nr] Name Type Addr Off Size ES Flg Lk Inf Al\n"));
+ else if (do_wide)
+ printf
+ (_(" [Nr] Name Type Address Off Size ES Flg Lk Inf Al\n"));
else
{
printf (_(" [Nr] Name Type Address Offset\n"));
@@ -2900,8 +3270,8 @@ process_section_headers (file)
i < elf_header.e_shnum;
i ++, section ++)
{
- printf (" [%2d] %-17.17s %-15.15s ",
- i,
+ printf (" [%2u] %-17.17s %-15.15s ",
+ SECTION_HEADER_NUM (i),
SECTION_NAME (section),
get_section_type_name (section->sh_type));
@@ -2921,11 +3291,59 @@ process_section_headers (file)
(unsigned long) section->sh_info,
(unsigned long) section->sh_addralign);
}
+ else if (do_wide)
+ {
+ print_vma (section->sh_addr, LONG_HEX);
+
+ if ((long) section->sh_offset == section->sh_offset)
+ printf (" %6.6lx", (unsigned long) section->sh_offset);
+ else
+ {
+ putchar (' ');
+ print_vma (section->sh_offset, LONG_HEX);
+ }
+
+ if ((unsigned long) section->sh_size == section->sh_size)
+ printf (" %6.6lx", (unsigned long) section->sh_size);
+ else
+ {
+ putchar (' ');
+ print_vma (section->sh_size, LONG_HEX);
+ }
+
+ if ((unsigned long) section->sh_entsize == section->sh_entsize)
+ printf (" %2.2lx", (unsigned long) section->sh_entsize);
+ else
+ {
+ putchar (' ');
+ print_vma (section->sh_entsize, LONG_HEX);
+ }
+
+ printf (" %3s ", get_elf_section_flags (section->sh_flags));
+
+ printf ("%2ld %3lx ",
+ (unsigned long) section->sh_link,
+ (unsigned long) section->sh_info);
+
+ if ((unsigned long) section->sh_addralign == section->sh_addralign)
+ printf ("%2ld\n", (unsigned long) section->sh_addralign);
+ else
+ {
+ print_vma (section->sh_addralign, DEC);
+ putchar ('\n');
+ }
+ }
else
{
putchar (' ');
print_vma (section->sh_addr, LONG_HEX);
- printf (" %8.8lx", section->sh_offset);
+ if ((long) section->sh_offset == section->sh_offset)
+ printf (" %8.8lx", (unsigned long) section->sh_offset);
+ else
+ {
+ printf (" ");
+ print_vma (section->sh_offset, LONG_HEX);
+ }
printf ("\n ");
print_vma (section->sh_size, LONG_HEX);
printf (" ");
@@ -2940,10 +3358,10 @@ process_section_headers (file)
}
}
- printf (_("Key to Flags:\n"));
- printf (_(" W (write), A (alloc), X (execute), M (merge), S (strings)\n"));
- printf (_(" I (info), L (link order), G (group), x (unknown)\n"));
- printf (_(" O (extra OS processing required) o (OS specific), p (processor specific)\n"));
+ printf (_("Key to Flags:\n\
+ W (write), A (alloc), X (execute), M (merge), S (strings)\n\
+ I (info), L (link order), G (group), x (unknown)\n\
+ O (extra OS processing required) o (OS specific), p (processor specific)\n"));
return 1;
}
@@ -3030,7 +3448,6 @@ process_relocs (file)
if (rel_size)
{
Elf32_Internal_Shdr * strsec;
- Elf32_Internal_Shdr * symsec;
Elf_Internal_Sym * symtab;
char * strtab;
int is_rela;
@@ -3046,25 +3463,35 @@ process_relocs (file)
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);
+ symtab = NULL;
+ strtab = NULL;
+ nsyms = 0;
+ if (section->sh_link)
+ {
+ Elf32_Internal_Shdr * symsec;
- if (symtab == NULL)
- continue;
+ symsec = SECTION_HEADER (section->sh_link);
+ nsyms = symsec->sh_size / symsec->sh_entsize;
+ symtab = GET_ELF_SYMBOLS (file, symsec);
- strsec = section_headers + symsec->sh_link;
+ if (symtab == NULL)
+ continue;
- GET_DATA_ALLOC (strsec->sh_offset, strsec->sh_size, strtab,
- char *, "string table");
+ strsec = SECTION_HEADER (symsec->sh_link);
+ strtab = (char *) get_data (NULL, file, strsec->sh_offset,
+ strsec->sh_size,
+ _("string table"));
+ }
is_rela = section->sh_type == SHT_RELA;
- dump_relocations (file, rel_offset, rel_size, symtab, nsyms, strtab, is_rela);
+ dump_relocations (file, rel_offset, rel_size,
+ symtab, nsyms, strtab, is_rela);
- free (strtab);
- free (symtab);
+ if (strtab)
+ free (strtab);
+ if (symtab)
+ free (symtab);
found = 1;
}
@@ -3266,7 +3693,10 @@ slurp_ia64_unwind_table (file, aux, sec)
/* Second, build the unwind table from the contents of the unwind section: */
size = sec->sh_size;
- GET_DATA_ALLOC (sec->sh_offset, size, table, char *, "unwind table");
+ table = (char *) get_data (NULL, file, sec->sh_offset,
+ size, _("unwind table"));
+ if (!table)
+ return 0;
tep = aux->table = xmalloc (size / (3 * addr_size) * sizeof (aux->table[0]));
for (tp = table; tp < table + size; tp += 3 * addr_size, ++ tep)
@@ -3299,7 +3729,7 @@ slurp_ia64_unwind_table (file, aux, sec)
++relsec)
{
if (relsec->sh_type != SHT_RELA
- || section_headers + relsec->sh_info != sec)
+ || SECTION_HEADER (relsec->sh_info) != sec)
continue;
if (!slurp_rela_relocs (file, relsec->sh_offset, relsec->sh_size,
@@ -3315,7 +3745,7 @@ slurp_ia64_unwind_table (file, aux, sec)
if (ELF32_ST_TYPE (sym->st_info) != STT_SECTION)
{
- warn (_("Skipping unexpected symbol type %u"),
+ warn (_("Skipping unexpected symbol type %u\n"),
ELF32_ST_TYPE (sym->st_info));
continue;
}
@@ -3327,7 +3757,7 @@ slurp_ia64_unwind_table (file, aux, sec)
if (ELF64_ST_TYPE (sym->st_info) != STT_SECTION)
{
- warn (_("Skipping unexpected symbol type %u"),
+ warn (_("Skipping unexpected symbol type %u\n"),
ELF64_ST_TYPE (sym->st_info));
continue;
}
@@ -3335,7 +3765,7 @@ slurp_ia64_unwind_table (file, aux, sec)
if (strncmp (relname, "R_IA64_SEGREL", 13) != 0)
{
- warn (_("Skipping unexpected relocation type %s"), relname);
+ warn (_("Skipping unexpected relocation type %s\n"), relname);
continue;
}
@@ -3393,12 +3823,12 @@ process_unwind (file)
if (sec->sh_type == SHT_SYMTAB)
{
aux.nsyms = sec->sh_size / sec->sh_entsize;
- aux.symtab = GET_ELF_SYMBOLS (file, sec->sh_offset, aux.nsyms);
+ aux.symtab = GET_ELF_SYMBOLS (file, sec);
- strsec = section_headers + sec->sh_link;
+ strsec = SECTION_HEADER (sec->sh_link);
aux.strtab_size = strsec->sh_size;
- GET_DATA_ALLOC (strsec->sh_offset, aux.strtab_size,
- aux.strtab, char *, "string table");
+ aux.strtab = (char *) get_data (NULL, file, strsec->sh_offset,
+ aux.strtab_size, _("string table"));
}
else if (sec->sh_type == SHT_IA_64_UNWIND)
unwcount++;
@@ -3467,8 +3897,8 @@ process_unwind (file)
{
aux.info_size = sec->sh_size;
aux.info_addr = sec->sh_addr;
- GET_DATA_ALLOC (sec->sh_offset, aux.info_size, aux.info,
- char *, "unwind info");
+ aux.info = (char *) get_data (NULL, file, sec->sh_offset,
+ aux.info_size, _("unwind info"));
printf (_("\nUnwind section "));
@@ -3478,7 +3908,7 @@ process_unwind (file)
printf ("'%s'", SECTION_NAME (unwsec));
printf (_(" at offset 0x%lx contains %lu entries:\n"),
- unwsec->sh_offset,
+ (unsigned long) unwsec->sh_offset,
(unsigned long) (unwsec->sh_size / (3 * addr_size)));
(void) slurp_ia64_unwind_table (file, & aux, unwsec);
@@ -3642,8 +4072,10 @@ get_32bit_dynamic_segment (file)
Elf_Internal_Dyn * entry;
bfd_size_type i;
- GET_DATA_ALLOC (dynamic_addr, dynamic_size,
- edyn, Elf32_External_Dyn *, "dynamic segment");
+ edyn = (Elf32_External_Dyn *) get_data (NULL, file, dynamic_addr,
+ dynamic_size, _("dynamic segment"));
+ if (!edyn)
+ return 0;
/* 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
@@ -3683,8 +4115,10 @@ get_64bit_dynamic_segment (file)
Elf_Internal_Dyn * entry;
bfd_size_type i;
- GET_DATA_ALLOC (dynamic_addr, dynamic_size,
- edyn, Elf64_External_Dyn *, "dynamic segment");
+ edyn = (Elf64_External_Dyn *) get_data (NULL, file, dynamic_addr,
+ dynamic_size, _("dynamic segment"));
+ if (!edyn)
+ return 0;
/* 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
@@ -3771,7 +4205,7 @@ process_dynamic_segment (file)
i < dynamic_size;
++i, ++ entry)
{
- unsigned long offset;
+ Elf32_Internal_Shdr section;
if (entry->d_tag != DT_SYMTAB)
continue;
@@ -3781,24 +4215,26 @@ process_dynamic_segment (file)
/* 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;
+ should work. */
+ section.sh_offset = entry->d_un.d_val - loadaddr;
if (fseek (file, 0, SEEK_END))
error (_("Unable to seek to end of file!"));
+ section.sh_size = ftell (file) - section.sh_offset;
if (is_32bit_elf)
- num_dynamic_syms = (ftell (file) - offset) / sizeof (Elf32_External_Sym);
+ section.sh_entsize = sizeof (Elf32_External_Sym);
else
- num_dynamic_syms = (ftell (file) - offset) / sizeof (Elf64_External_Sym);
+ section.sh_entsize = sizeof (Elf64_External_Sym);
+ num_dynamic_syms = section.sh_size / section.sh_entsize;
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);
+ dynamic_symbols = GET_ELF_SYMBOLS (file, &section);
}
}
@@ -3820,7 +4256,7 @@ process_dynamic_segment (file)
/* 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. */
+ should work. */
offset = entry->d_un.d_val - loadaddr;
if (fseek (file, 0, SEEK_END))
@@ -3834,9 +4270,8 @@ process_dynamic_segment (file)
continue;
}
- GET_DATA_ALLOC (offset, str_tab_len, dynamic_strings, char *,
- "dynamic string table");
-
+ dynamic_strings = (char *) get_data (NULL, file, offset, str_tab_len,
+ _("dynamic string table"));
break;
}
}
@@ -3868,8 +4303,11 @@ process_dynamic_segment (file)
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");
+ extsyminfo = ((Elf_External_Syminfo *)
+ get_data (NULL, file, dynamic_syminfo_offset,
+ syminsz, _("symbol information")));
+ if (!extsyminfo)
+ return 0;
dynamic_syminfo = (Elf_Internal_Syminfo *) malloc (syminsz);
if (dynamic_syminfo == NULL)
@@ -4317,11 +4755,14 @@ process_version_sections (file)
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));
+ SECTION_NAME (SECTION_HEADER (section->sh_link)));
- GET_DATA_ALLOC (section->sh_offset, section->sh_size,
- edefs, Elf_External_Verdef *,
- "version definition section");
+ edefs = ((Elf_External_Verdef *)
+ get_data (NULL, file, section->sh_offset,
+ section->sh_size,
+ _("version definition section")));
+ if (!edefs)
+ break;
for (idx = cnt = 0; cnt < section->sh_info; ++ cnt)
{
@@ -4405,11 +4846,13 @@ process_version_sections (file)
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));
+ SECTION_NAME (SECTION_HEADER (section->sh_link)));
- GET_DATA_ALLOC (section->sh_offset, section->sh_size,
- eneed, Elf_External_Verneed *,
- "version need section");
+ eneed = ((Elf_External_Verneed *)
+ get_data (NULL, file, section->sh_offset,
+ section->sh_size, _("version need section")));
+ if (!eneed)
+ break;
for (idx = cnt = 0; cnt < section->sh_info; ++cnt)
{
@@ -4477,26 +4920,28 @@ process_version_sections (file)
case SHT_GNU_versym:
{
Elf32_Internal_Shdr * link_section;
- int total;
- int cnt;
- unsigned char * edata;
- unsigned short * data;
- char * strtab;
- Elf_Internal_Sym * symbols;
+ int total;
+ int cnt;
+ unsigned char * edata;
+ unsigned short * data;
+ char * strtab;
+ Elf_Internal_Sym * symbols;
Elf32_Internal_Shdr * string_sec;
- link_section = section_headers + section->sh_link;
+ link_section = SECTION_HEADER (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);
+ symbols = GET_ELF_SYMBOLS (file, link_section);
- string_sec = section_headers + link_section->sh_link;
+ string_sec = SECTION_HEADER (link_section->sh_link);
- GET_DATA_ALLOC (string_sec->sh_offset, string_sec->sh_size,
- strtab, char *, "version string table");
+ strtab = (char *) get_data (NULL, file, string_sec->sh_offset,
+ string_sec->sh_size,
+ _("version string table"));
+ if (!strtab)
+ break;
printf (_("\nVersion symbols section '%s' contains %d entries:\n"),
SECTION_NAME (section), total);
@@ -4507,10 +4952,16 @@ process_version_sections (file)
(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");
+ edata =
+ ((unsigned char *)
+ get_data (NULL, file,
+ version_info[DT_VERSIONTAGIDX (DT_VERSYM)] - loadaddr,
+ total * sizeof (short), _("version symbol data")));
+ if (!edata)
+ {
+ free (strtab);
+ break;
+ }
data = (unsigned short *) malloc (total * sizeof (short));
@@ -4545,8 +4996,7 @@ process_version_sections (file)
check_def = 1;
check_need = 1;
- if (symbols [cnt + j].st_shndx >= SHN_LORESERVE
- || section_headers[symbols [cnt + j].st_shndx].sh_type
+ if (SECTION_HEADER (symbols [cnt + j].st_shndx)->sh_type
!= SHT_NOBITS)
{
if (symbols [cnt + j].st_shndx == SHN_UNDEF)
@@ -4571,7 +5021,8 @@ process_version_sections (file)
Elf_External_Vernaux evna;
unsigned long a_off;
- GET_DATA (offset, evn, "version need");
+ get_data (&evn, file, offset, sizeof (evn),
+ _("version need"));
ivn.vn_aux = BYTE_GET (evn.vn_aux);
ivn.vn_next = BYTE_GET (evn.vn_next);
@@ -4580,8 +5031,8 @@ process_version_sections (file)
do
{
- GET_DATA (a_off, evna,
- "version need aux (2)");
+ get_data (&evna, file, a_off, sizeof (evna),
+ _("version need aux (2)"));
ivna.vna_next = BYTE_GET (evna.vna_next);
ivna.vna_other = BYTE_GET (evna.vna_other);
@@ -4621,7 +5072,8 @@ process_version_sections (file)
do
{
- GET_DATA (offset, evd, "version def");
+ get_data (&evd, file, offset, sizeof (evd),
+ _("version def"));
ivd.vd_next = BYTE_GET (evd.vd_next);
ivd.vd_ndx = BYTE_GET (evd.vd_ndx);
@@ -4638,8 +5090,9 @@ process_version_sections (file)
ivd.vd_aux = BYTE_GET (evd.vd_aux);
- GET_DATA (offset - ivd.vd_next + ivd.vd_aux,
- evda, "version def aux");
+ get_data (&evda, file,
+ offset - ivd.vd_next + ivd.vd_aux,
+ sizeof (evda), _("version def aux"));
ivda.vda_name = BYTE_GET (evda.vda_name);
@@ -4769,10 +5222,10 @@ get_symbol_index_type (type)
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 if (type >= SHN_LORESERVE && type <= SHN_HIRESERVE)
+ return "RSV";
else
{
static char buff [32];
@@ -4822,7 +5275,7 @@ get_dynamic_data (file, number)
return i_data;
}
-/* Dump the symbol table */
+/* Dump the symbol table. */
static int
process_symbol_table (file)
FILE * file;
@@ -4900,8 +5353,9 @@ process_symbol_table (file)
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);
+ printf (" %3.3s ", get_symbol_index_type (psym->st_shndx));
+ print_symbol (25, dynamic_strings + psym->st_name);
+ putchar ('\n');
}
}
}
@@ -4931,8 +5385,7 @@ process_symbol_table (file)
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);
+ symtab = GET_ELF_SYMBOLS (file, section);
if (symtab == NULL)
continue;
@@ -4942,10 +5395,11 @@ process_symbol_table (file)
{
Elf32_Internal_Shdr * string_sec;
- string_sec = section_headers + section->sh_link;
+ string_sec = SECTION_HEADER (section->sh_link);
- GET_DATA_ALLOC (string_sec->sh_offset, string_sec->sh_size,
- strtab, char *, "string table");
+ strtab = (char *) get_data (NULL, file, string_sec->sh_offset,
+ string_sec->sh_size,
+ _("string table"));
}
for (si = 0, psym = symtab;
@@ -4959,8 +5413,8 @@ process_symbol_table (file)
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);
+ printf (" %4s ", get_symbol_index_type (psym->st_shndx));
+ print_symbol (25, strtab + psym->st_name);
if (section->sh_type == SHT_DYNSYM &&
version_info [DT_VERSIONTAGIDX (DT_VERSYM)] != 0)
@@ -4974,14 +5428,13 @@ process_symbol_table (file)
offset = version_info [DT_VERSIONTAGIDX (DT_VERSYM)]
- loadaddr;
- GET_DATA (offset + si * sizeof (vers_data), data,
- "version data");
+ get_data (&data, file, offset + si * sizeof (vers_data),
+ sizeof (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;
+ is_nobits = (SECTION_HEADER (psym->st_shndx)->sh_type
+ == SHT_NOBITS);
check_def = (psym->st_shndx != SHN_UNDEF);
@@ -5002,7 +5455,8 @@ process_symbol_table (file)
{
unsigned long vna_off;
- GET_DATA (offset, evn, "version need");
+ get_data (&evn, file, offset, sizeof (evn),
+ _("version need"));
ivn.vn_aux = BYTE_GET (evn.vn_aux);
ivn.vn_next = BYTE_GET (evn.vn_next);
@@ -5013,8 +5467,9 @@ process_symbol_table (file)
{
Elf_External_Vernaux evna;
- GET_DATA (vna_off, evna,
- "version need aux (3)");
+ get_data (&evna, file, vna_off,
+ sizeof (evna),
+ _("version need aux (3)"));
ivna.vna_other = BYTE_GET (evna.vna_other);
ivna.vna_next = BYTE_GET (evna.vna_next);
@@ -5062,7 +5517,8 @@ process_symbol_table (file)
{
Elf_External_Verdef evd;
- GET_DATA (offset, evd, "version def");
+ get_data (&evd, file, offset, sizeof (evd),
+ _("version def"));
ivd.vd_ndx = BYTE_GET (evd.vd_ndx);
ivd.vd_aux = BYTE_GET (evd.vd_aux);
@@ -5076,7 +5532,8 @@ process_symbol_table (file)
offset -= ivd.vd_next;
offset += ivd.vd_aux;
- GET_DATA (offset, evda, "version def aux");
+ get_data (&evda, file, offset, sizeof (evda),
+ _("version def aux"));
ivda.vda_name = BYTE_GET (evda.vda_name);
@@ -5194,8 +5651,9 @@ process_syminfo (file)
{
unsigned short int flags = dynamic_syminfo[i].si_flags;
- printf ("%4d: %-30s ", i,
- dynamic_strings + dynamic_symbols[i].st_name);
+ printf ("%4d: ", i);
+ print_symbol (30, dynamic_strings + dynamic_symbols[i].st_name);
+ putchar (' ');
switch (dynamic_syminfo[i].si_boundto)
{
@@ -5208,9 +5666,12 @@ process_syminfo (file)
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);
+ {
+ print_symbol (10, dynamic_strings
+ + dynamic_segment
+ [dynamic_syminfo[i].si_boundto].d_un.d_val);
+ putchar (' ' );
+ }
else
printf ("%-10d ", dynamic_syminfo[i].si_boundto);
break;
@@ -5269,8 +5730,10 @@ dump_section (section, file)
addr = section->sh_addr;
- GET_DATA_ALLOC (section->sh_offset, bytes, start, unsigned char *,
- "section data");
+ start = (unsigned char *) get_data (NULL, file, section->sh_offset, bytes,
+ _("section data"));
+ if (!start)
+ return 0;
data = start;
@@ -5417,7 +5880,7 @@ process_extended_line_op (data, is_stmt, pointer_size)
if (len == 0)
{
- warn (_("badly formed extended line op encountered!"));
+ warn (_("badly formed extended line op encountered!\n"));
return bytes_read;
}
@@ -5607,7 +6070,19 @@ display_debug_lines (section, start, file)
op_code = * data ++;
- switch (op_code)
+ if (op_code >= info.li_opcode_base)
+ {
+ 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);
+ }
+ else switch (op_code)
{
case DW_LNS_extended_op:
data += process_extended_line_op (data, info.li_default_is_stmt,
@@ -5677,20 +6152,36 @@ display_debug_lines (section, start, file)
adv, state_machine_regs.address);
break;
+ case DW_LNS_set_prologue_end:
+ printf (_(" Set prologue_end to true\n"));
+ break;
+
+ case DW_LNS_set_epilogue_begin:
+ printf (_(" Set epilogue_begin to true\n"));
+ break;
+
+ case DW_LNS_set_isa:
+ adv = read_leb128 (data, & bytes_read, 0);
+ data += bytes_read;
+ printf (_(" Set ISA to %d\n"), adv);
+ 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);
+ printf (_(" Unknown opcode %d with operands: "), op_code);
+ {
+ int i;
+ for (i = standard_opcodes[op_code - 1]; i > 0 ; --i)
+ {
+ printf ("0x%lx%s", read_leb128 (data, &bytes_read, 0),
+ i == 1 ? "" : ", ");
+ data += bytes_read;
+ }
+ putchar ('\n');
+ }
break;
}
}
- printf ("\n");
+ putchar ('\n');
}
return 1;
@@ -5779,58 +6270,67 @@ get_TAG_name (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_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";
+ 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";
+ /* DWARF 2.1 values. */
+ case DW_TAG_dwarf_procedure: return "DW_TAG_dwarf_procedure";
+ case DW_TAG_restrict_type: return "DW_TAG_restrict_type";
+ case DW_TAG_interface_type: return "DW_TAG_interface_type";
+ case DW_TAG_namespace: return "DW_TAG_namespace";
+ case DW_TAG_imported_module: return "DW_TAG_imported_module";
+ case DW_TAG_unspecified_type: return "DW_TAG_unspecified_type";
+ case DW_TAG_partial_unit: return "DW_TAG_partial_unit";
+ case DW_TAG_imported_unit: return "DW_TAG_imported_unit";
default:
{
static char buffer [100];
@@ -5847,100 +6347,100 @@ get_AT_name (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_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_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";
/* DWARF 2.1 values. */
- case DW_AT_allocated: return "DW_AT_allocated";
- case DW_AT_associated: return "DW_AT_associated";
- case DW_AT_data_location: return "DW_AT_data_location";
- case DW_AT_stride: return "DW_AT_stride";
- case DW_AT_entry_pc: return "DW_AT_entry_pc";
- case DW_AT_use_UTF8: return "DW_AT_use_UTF8";
- case DW_AT_extension: return "DW_AT_extension";
- case DW_AT_ranges: return "DW_AT_ranges";
- case DW_AT_trampoline: return "DW_AT_trampoline";
- case DW_AT_call_column: return "DW_AT_call_column";
- case DW_AT_call_file: return "DW_AT_call_file";
- case DW_AT_call_line: return "DW_AT_call_line";
+ case DW_AT_allocated: return "DW_AT_allocated";
+ case DW_AT_associated: return "DW_AT_associated";
+ case DW_AT_data_location: return "DW_AT_data_location";
+ case DW_AT_stride: return "DW_AT_stride";
+ case DW_AT_entry_pc: return "DW_AT_entry_pc";
+ case DW_AT_use_UTF8: return "DW_AT_use_UTF8";
+ case DW_AT_extension: return "DW_AT_extension";
+ case DW_AT_ranges: return "DW_AT_ranges";
+ case DW_AT_trampoline: return "DW_AT_trampoline";
+ case DW_AT_call_column: return "DW_AT_call_column";
+ case DW_AT_call_file: return "DW_AT_call_file";
+ case DW_AT_call_line: return "DW_AT_call_line";
/* SGI/MIPS extensions. */
- 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_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_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_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";
/* GNU extensions. */
- 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";
+ 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];
@@ -5957,27 +6457,27 @@ get_FORM_name (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_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";
+ case DW_FORM_indirect: return "DW_FORM_indirect";
default:
{
static char buffer [100];
@@ -6150,6 +6650,80 @@ process_abbrev_section (start, end)
static int
+display_debug_macinfo (section, start, file)
+ Elf32_Internal_Shdr * section;
+ unsigned char * start;
+ FILE * file ATTRIBUTE_UNUSED;
+{
+ unsigned char * end = start + section->sh_size;
+ unsigned char * curr = start;
+ unsigned int bytes_read;
+ enum dwarf_macinfo_record_type op;
+
+ printf (_("Contents of the %s section:\n\n"), SECTION_NAME (section));
+
+ while (curr < end)
+ {
+ unsigned int lineno;
+ const char * string;
+
+ op = * curr;
+ curr ++;
+
+ switch (op)
+ {
+ case DW_MACINFO_start_file:
+ {
+ unsigned int filenum;
+
+ lineno = read_leb128 (curr, & bytes_read, 0);
+ curr += bytes_read;
+ filenum = read_leb128 (curr, & bytes_read, 0);
+ curr += bytes_read;
+
+ printf (_(" DW_MACINFO_start_file - lineno: %d filenum: %d\n"), lineno, filenum);
+ }
+ break;
+
+ case DW_MACINFO_end_file:
+ printf (_(" DW_MACINFO_end_file\n"));
+ break;
+
+ case DW_MACINFO_define:
+ lineno = read_leb128 (curr, & bytes_read, 0);
+ curr += bytes_read;
+ string = curr;
+ curr += strlen (string) + 1;
+ printf (_(" DW_MACINFO_define - lineno : %d macro : %s\n"), lineno, string);
+ break;
+
+ case DW_MACINFO_undef:
+ lineno = read_leb128 (curr, & bytes_read, 0);
+ curr += bytes_read;
+ string = curr;
+ curr += strlen (string) + 1;
+ printf (_(" DW_MACINFO_undef - lineno : %d macro : %s\n"), lineno, string);
+ break;
+
+ case DW_MACINFO_vendor_ext:
+ {
+ unsigned int constant;
+
+ constant = read_leb128 (curr, & bytes_read, 0);
+ curr += bytes_read;
+ string = curr;
+ curr += strlen (string) + 1;
+ printf (_(" DW_MACINFO_vendor_ext - constant : %d string : %s\n"), constant, string);
+ }
+ break;
+ }
+ }
+
+ return 1;
+}
+
+
+static int
display_debug_abbrev (section, start, file)
Elf32_Internal_Shdr * section;
unsigned char * start;
@@ -6164,6 +6738,9 @@ display_debug_abbrev (section, start, file)
{
start = process_abbrev_section (start, end);
+ if (first_abbrev == NULL)
+ continue;
+
printf (_(" Number TAG\n"));
for (entry = first_abbrev; entry; entry = entry->next)
@@ -6182,6 +6759,8 @@ display_debug_abbrev (section, start, file)
get_FORM_name (attr->form));
}
}
+
+ free_abbrevs ();
}
while (start);
@@ -6525,12 +7104,132 @@ decode_location_expression (data, pointer_size, length)
/* No way to tell where the next op is, so just bail. */
return;
}
+
+ /* Separate the ops. */
+ printf ("; ");
}
}
+static const char * debug_str_contents;
+static bfd_vma debug_str_size;
+
+static void
+load_debug_str (file)
+ FILE * file;
+{
+ Elf32_Internal_Shdr * sec;
+ unsigned int i;
+
+ /* If it is already loaded, do nothing. */
+ if (debug_str_contents != NULL)
+ return;
+
+ /* Locate the .debug_str section. */
+ for (i = 0, sec = section_headers;
+ i < elf_header.e_shnum;
+ i ++, sec ++)
+ if (strcmp (SECTION_NAME (sec), ".debug_str") == 0)
+ break;
+
+ if (i == elf_header.e_shnum || sec->sh_size == 0)
+ return;
+
+ debug_str_size = sec->sh_size;
+
+ debug_str_contents = ((char *)
+ get_data (NULL, file, sec->sh_offset, sec->sh_size,
+ _("debug_str section data")));
+}
+
+static void
+free_debug_str ()
+{
+ if (debug_str_contents == NULL)
+ return;
+
+ free ((char *) debug_str_contents);
+ debug_str_contents = NULL;
+ debug_str_size = 0;
+}
+
+static const char *
+fetch_indirect_string (offset)
+ unsigned long offset;
+{
+ if (debug_str_contents == NULL)
+ return _("<no .debug_str section>");
+
+ if (offset > debug_str_size)
+ return _("<offset is too big>");
+
+ return debug_str_contents + offset;
+}
+
+
+static int
+display_debug_str (section, start, file)
+ Elf32_Internal_Shdr * section;
+ unsigned char * start;
+ FILE * file ATTRIBUTE_UNUSED;
+{
+ unsigned long bytes;
+ bfd_vma addr;
+
+ addr = section->sh_addr;
+ bytes = section->sh_size;
+
+ if (bytes == 0)
+ {
+ printf (_("\nThe .debug_str section is empty.\n"));
+ return 0;
+ }
+
+ printf (_("Contents of the .debug_str section:\n\n"));
+
+ while (bytes)
+ {
+ int j;
+ int k;
+ int lbytes;
+
+ lbytes = (bytes > 16 ? 16 : bytes);
+
+ printf (" 0x%8.8lx ", (unsigned long) addr);
+
+ for (j = 0; j < 16; j++)
+ {
+ if (j < lbytes)
+ printf ("%2.2x", start [j]);
+ else
+ printf (" ");
+
+ if ((j & 3) == 3)
+ printf (" ");
+ }
+
+ for (j = 0; j < lbytes; j++)
+ {
+ k = start [j];
+ if (k >= ' ' && k < 0x80)
+ printf ("%c", k);
+ else
+ printf (".");
+ }
+
+ putchar ('\n');
+
+ start += lbytes;
+ addr += lbytes;
+ bytes -= lbytes;
+ }
+
+ return 1;
+}
+
+
static unsigned char *
-read_and_display_attr (attribute, form, data, cu_offset, pointer_size)
+read_and_display_attr_value (attribute, form, data, cu_offset, pointer_size)
unsigned long attribute;
unsigned long form;
unsigned char * data;
@@ -6541,8 +7240,6 @@ read_and_display_attr (attribute, form, data, cu_offset, pointer_size)
unsigned char * block_start = NULL;
int bytes_read;
- printf (" %-18s:", get_AT_name (attribute));
-
switch (form)
{
default:
@@ -6554,6 +7251,11 @@ read_and_display_attr (attribute, form, data, cu_offset, pointer_size)
data += pointer_size;
break;
+ case DW_FORM_strp:
+ uvalue = byte_get (data, /* offset_size */ 4);
+ data += /* offset_size */ 4;
+ break;
+
case DW_FORM_ref1:
case DW_FORM_flag:
case DW_FORM_data1:
@@ -6582,6 +7284,13 @@ read_and_display_attr (attribute, form, data, cu_offset, pointer_size)
uvalue = read_leb128 (data, & bytes_read, 0);
data += bytes_read;
break;
+
+ case DW_FORM_indirect:
+ form = read_leb128 (data, & bytes_read, 0);
+ data += bytes_read;
+ printf (" %s", get_FORM_name (form));
+ return read_and_display_attr_value (attribute, form, data, cu_offset,
+ pointer_size);
}
switch (form)
@@ -6647,12 +7356,16 @@ read_and_display_attr (attribute, form, data, cu_offset, pointer_size)
break;
case DW_FORM_strp:
+ printf (_(" (indirect string, offset: 0x%lx): "), uvalue);
+ printf (fetch_indirect_string (uvalue));
+ break;
+
case DW_FORM_indirect:
- warn (_("Unable to handle FORM: %d"), form);
+ /* Handled above. */
break;
default:
- warn (_("Unrecognised form: %d"), form);
+ warn (_("Unrecognised form: %d\n"), form);
break;
}
@@ -6686,6 +7399,11 @@ read_and_display_attr (attribute, form, data, cu_offset, pointer_size)
case DW_LANG_Ada83: printf ("(Ada)"); break;
case DW_LANG_Cobol74: printf ("(Cobol 74)"); break;
case DW_LANG_Cobol85: printf ("(Cobol 85)"); break;
+ /* DWARF 2.1 values. */
+ case DW_LANG_C99: printf ("(ANSI C99)"); break;
+ case DW_LANG_Ada95: printf ("(ADA 95)"); break;
+ case DW_LANG_Fortran95: printf ("(Fortran 95)"); break;
+ /* MIPS extension. */
case DW_LANG_Mips_Assembler: printf ("(MIPS assembler)"); break;
default: printf ("(Unknown: %lx)", uvalue); break;
}
@@ -6703,6 +7421,8 @@ read_and_display_attr (attribute, form, data, cu_offset, pointer_size)
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;
+ /* DWARF 2.1 value. */
+ case DW_ATE_imaginary_float: printf ("(imaginary float)"); break;
default:
if (uvalue >= DW_ATE_lo_user
&& uvalue <= DW_ATE_hi_user)
@@ -6800,6 +7520,20 @@ read_and_display_attr (attribute, form, data, cu_offset, pointer_size)
break;
}
+ return data;
+}
+
+static unsigned char *
+read_and_display_attr (attribute, form, data, cu_offset, pointer_size)
+ unsigned long attribute;
+ unsigned long form;
+ unsigned char * data;
+ unsigned long cu_offset;
+ unsigned long pointer_size;
+{
+ printf (" %-18s:", get_AT_name (attribute));
+ data = read_and_display_attr_value (attribute, form, data, cu_offset,
+ pointer_size);
printf ("\n");
return data;
}
@@ -6815,12 +7549,15 @@ display_debug_info (section, start, file)
printf (_("The section %s contains:\n\n"), SECTION_NAME (section));
+ load_debug_str (file);
+
while (start < end)
{
DWARF2_External_CompUnit * external;
DWARF2_Internal_CompUnit compunit;
+ Elf32_Internal_Shdr * relsec;
unsigned char * tags;
- int i;
+ unsigned int i;
int level;
unsigned long cu_offset;
@@ -6837,6 +7574,67 @@ display_debug_info (section, start, file)
break;
}
+ /* Check for RELA relocations in the abbrev_offset address, and
+ apply them. */
+ for (relsec = section_headers;
+ relsec < section_headers + elf_header.e_shnum;
+ ++relsec)
+ {
+ unsigned long nrelas;
+ Elf_Internal_Rela *rela, *rp;
+ Elf32_Internal_Shdr *symsec;
+ Elf_Internal_Sym *symtab;
+ Elf_Internal_Sym *sym;
+
+ if (relsec->sh_type != SHT_RELA
+ || SECTION_HEADER (relsec->sh_info) != section)
+ continue;
+
+ if (!slurp_rela_relocs (file, relsec->sh_offset, relsec->sh_size,
+ & rela, & nrelas))
+ return 0;
+
+ symsec = SECTION_HEADER (relsec->sh_link);
+ symtab = GET_ELF_SYMBOLS (file, symsec);
+
+ for (rp = rela; rp < rela + nrelas; ++rp)
+ {
+ if (rp->r_offset
+ != (bfd_vma) ((unsigned char *) &external->cu_abbrev_offset
+ - section_begin))
+ continue;
+
+ if (is_32bit_elf)
+ {
+ sym = symtab + ELF32_R_SYM (rp->r_info);
+
+ if (ELF32_ST_TYPE (sym->st_info) != STT_SECTION)
+ {
+ warn (_("Skipping unexpected symbol type %u\n"),
+ ELF32_ST_TYPE (sym->st_info));
+ continue;
+ }
+ }
+ else
+ {
+ sym = symtab + ELF64_R_SYM (rp->r_info);
+
+ if (ELF64_ST_TYPE (sym->st_info) != STT_SECTION)
+ {
+ warn (_("Skipping unexpected symbol type %u\n"),
+ ELF64_ST_TYPE (sym->st_info));
+ continue;
+ }
+ }
+
+ compunit.cu_abbrev_offset += rp->r_addend;
+ break;
+ }
+
+ free (rela);
+ break;
+ }
+
tags = start + sizeof (* external);
cu_offset = start - section_begin;
start += compunit.cu_length + sizeof (external->cu_length);
@@ -6853,8 +7651,7 @@ display_debug_info (section, start, file)
continue;
}
- if (first_abbrev != NULL)
- free_abbrevs ();
+ free_abbrevs ();
/* Read in the abbrevs used by this compilation unit. */
@@ -6869,14 +7666,17 @@ display_debug_info (section, start, file)
if (strcmp (SECTION_NAME (sec), ".debug_abbrev") == 0)
break;
- if (i == -1 || sec->sh_size == 0)
+ if (i == elf_header.e_shnum || 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");
+ begin = ((unsigned char *)
+ get_data (NULL, file, sec->sh_offset, sec->sh_size,
+ _("debug_abbrev section data")));
+ if (!begin)
+ return 0;
process_abbrev_section (begin + compunit.cu_abbrev_offset,
begin + sec->sh_size);
@@ -6916,8 +7716,9 @@ display_debug_info (section, start, file)
return 0;
}
- printf (_(" <%d><%x>: Abbrev Number: %lu (%s)\n"),
- level, tags - section_begin - bytes_read,
+ printf (_(" <%d><%lx>: Abbrev Number: %lu (%s)\n"),
+ level,
+ (unsigned long) (tags - section_begin - bytes_read),
abbrev_number,
get_TAG_name (entry->tag));
@@ -6932,6 +7733,8 @@ display_debug_info (section, start, file)
}
}
+ free_debug_str ();
+
printf ("\n");
return 1;
@@ -7040,6 +7843,10 @@ Frame_Chunk;
in the frame info. */
#define DW_CFA_unreferenced (-1)
+static void frame_need_space PARAMS ((Frame_Chunk *, int));
+static void frame_display_row PARAMS ((Frame_Chunk *, int *, int *));
+static int size_of_encoded_value PARAMS ((int));
+
static void
frame_need_space (fc, reg)
Frame_Chunk * fc;
@@ -7344,10 +8151,10 @@ display_debug_frames (section, start, file)
start += augmentation_data_len;
}
- printf ("\n%08lx %08lx %08lx FDE cie=%08x pc=%08lx..%08lx\n",
+ printf ("\n%08lx %08lx %08lx FDE cie=%08lx pc=%08lx..%08lx\n",
(unsigned long)(saved_start - section_start), length, cie_id,
- cie->chunk_start - section_start, fc->pc_begin,
- fc->pc_begin + fc->pc_range);
+ (unsigned long)(cie->chunk_start - section_start),
+ fc->pc_begin, fc->pc_begin + fc->pc_range);
if (! do_debug_frames_interp && augmentation_data_len)
{
unsigned long i;
@@ -7723,22 +8530,24 @@ prescan_debug_info (section, start, file)
sections. */
struct
{
- char * name;
+ const char * const 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_frame", display_debug_frames, NULL },
+ { ".debug_info", display_debug_info, prescan_debug_info },
+ { ".debug_line", display_debug_lines, NULL },
+ { ".debug_pubnames", display_debug_pubnames, NULL },
{ ".eh_frame", display_debug_frames, NULL },
- { ".debug_macinfo", display_debug_not_supported, NULL },
+ { ".debug_macinfo", display_debug_macinfo, NULL },
+ { ".debug_str", display_debug_str, NULL },
+
{ ".debug_pubtypes", display_debug_not_supported, NULL },
- { ".debug_str", display_debug_not_supported, NULL },
+ { ".debug_ranges", 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 },
@@ -7762,8 +8571,10 @@ display_debug_section (section, file)
return 0;
}
- GET_DATA_ALLOC (section->sh_offset, length, start, unsigned char *,
- "debug section data");
+ start = (unsigned char *) get_data (NULL, file, section->sh_offset, length,
+ _("debug section data"));
+ if (!start)
+ return 0;
/* See if we know how to display the contents of this section. */
if (strncmp (name, ".gnu.linkonce.wi.", 17) == 0)
@@ -7783,8 +8594,7 @@ display_debug_section (section, file)
/* If we loaded in the abbrev section at some point,
we must release it here. */
- if (first_abbrev != NULL)
- free_abbrevs ();
+ free_abbrevs ();
return 1;
}
@@ -7822,8 +8632,11 @@ process_section_contents (file)
unsigned char * start;
length = section->sh_size;
- GET_DATA_ALLOC (section->sh_offset, length, start, unsigned char *,
- "debug section data");
+ start = ((unsigned char *)
+ get_data (NULL, file, section->sh_offset, length,
+ _("debug section data")));
+ if (!start)
+ return 0;
debug_displays[j].prescan (section, start, file);
free (start);
@@ -7919,73 +8732,78 @@ process_mips_specific (file)
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)
+ elib = ((Elf32_External_Lib *)
+ get_data (NULL, file, liblist_offset,
+ liblistno * sizeof (Elf32_External_Lib),
+ _("liblist")));
+ if (elib)
{
- 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 ("\nSection '.liblist' contains %lu entries:\n",
+ (unsigned long) liblistno);
+ fputs (" Library Time Stamp Checksum Version Flags\n",
+ stdout);
- 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
+ for (cnt = 0; cnt < liblistno; ++cnt)
{
- 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)
+ 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: ", (unsigned long) cnt);
+ print_symbol (20, dynamic_strings + liblist.l_name);
+ printf (" %s %#10lx %-7ld", timebuf, liblist.l_checksum,
+ liblist.l_version);
+
+ if (liblist.l_flags == 0)
+ puts (" NONE");
+ else
+ {
+ static const struct
{
- fputs (l_flags_vals[fcnt].name, stdout);
- flags ^= l_flags_vals[fcnt].bit;
+ const char * name;
+ int bit;
}
- if (flags != 0)
- printf (" %#x", (unsigned int) flags);
+ 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 ("");
+ puts ("");
+ }
}
- }
- free (elib);
+ free (elib);
+ }
}
if (options_offset != 0)
@@ -8001,194 +8819,194 @@ process_mips_specific (file)
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)
+ eopt = (Elf_External_Options *) get_data (NULL, file, options_offset,
+ sect->sh_size, _("options"));
+ if (eopt)
{
- error (_("Out of memory"));
- return 0;
- }
-
- offset = cnt = 0;
- option = iopt;
+ iopt = ((Elf_Internal_Options *)
+ malloc ((sect->sh_size / sizeof (eopt)) * sizeof (* iopt)));
+ if (iopt == NULL)
+ {
+ error (_("Out of memory"));
+ return 0;
+ }
- while (offset < sect->sh_size)
- {
- Elf_External_Options * eoption;
+ offset = cnt = 0;
+ option = iopt;
- eoption = (Elf_External_Options *) ((char *) eopt + offset);
+ while (offset < sect->sh_size)
+ {
+ Elf_External_Options * eoption;
- option->kind = BYTE_GET (eoption->kind);
- option->size = BYTE_GET (eoption->size);
- option->section = BYTE_GET (eoption->section);
- option->info = BYTE_GET (eoption->info);
+ eoption = (Elf_External_Options *) ((char *) eopt + offset);
- offset += option->size;
+ option->kind = BYTE_GET (eoption->kind);
+ option->size = BYTE_GET (eoption->size);
+ option->section = BYTE_GET (eoption->section);
+ option->info = BYTE_GET (eoption->info);
- ++option;
- ++cnt;
- }
+ offset += option->size;
- printf (_("\nSection '%s' contains %d entries:\n"),
- SECTION_NAME (sect), cnt);
+ ++option;
+ ++cnt;
+ }
- option = iopt;
+ printf (_("\nSection '%s' contains %d entries:\n"),
+ SECTION_NAME (sect), cnt);
- while (cnt-- > 0)
- {
- size_t len;
+ option = iopt;
- switch (option->kind)
+ while (cnt-- > 0)
{
- 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
+ size_t len;
+
+ switch (option->kind)
{
- /* 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]);
+ 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;
- 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);
}
-
- free (eopt);
}
if (conflicts_offset != 0 && conflictsno != 0)
{
- Elf32_External_Conflict * econf32;
- Elf64_External_Conflict * econf64;
Elf32_Conflict * iconf;
size_t cnt;
@@ -8207,31 +9025,50 @@ process_mips_specific (file)
if (is_32bit_elf)
{
- GET_DATA_ALLOC (conflicts_offset, conflictsno * sizeof (* econf32),
- econf32, Elf32_External_Conflict *, "conflict");
+ Elf32_External_Conflict * econf32;
+
+ econf32 = ((Elf32_External_Conflict *)
+ get_data (NULL, file, conflicts_offset,
+ conflictsno * sizeof (* econf32),
+ _("conflict")));
+ if (!econf32)
+ return 0;
for (cnt = 0; cnt < conflictsno; ++cnt)
iconf[cnt] = BYTE_GET (econf32[cnt]);
+
+ free (econf32);
}
else
{
- GET_DATA_ALLOC (conflicts_offset, conflictsno * sizeof (* econf64),
- econf64, Elf64_External_Conflict *, "conflict");
+ Elf64_External_Conflict * econf64;
+
+ econf64 = ((Elf64_External_Conflict *)
+ get_data (NULL, file, conflicts_offset,
+ conflictsno * sizeof (* econf64),
+ _("conflict")));
+ if (!econf64)
+ return 0;
for (cnt = 0; cnt < conflictsno; ++cnt)
iconf[cnt] = BYTE_GET (econf64[cnt]);
+
+ free (econf64);
}
- printf (_("\nSection '.conflict' contains %d entries:\n"), conflictsno);
+ printf (_("\nSection '.conflict' contains %ld entries:\n"),
+ (long) conflictsno);
puts (_(" Num: Index Value Name"));
for (cnt = 0; cnt < conflictsno; ++cnt)
{
- Elf_Internal_Sym * psym = &dynamic_symbols[iconf[cnt]];
+ Elf_Internal_Sym * psym = & dynamic_symbols [iconf [cnt]];
- printf ("%5lu: %8lu ", (unsigned long) cnt, 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);
+ putchar (' ');
+ print_symbol (25, dynamic_strings + psym->st_name);
+ putchar ('\n');
}
free (iconf);
@@ -8240,7 +9077,7 @@ process_mips_specific (file)
return 1;
}
-static char *
+static const char *
get_note_type (e_type)
unsigned e_type;
{
@@ -8265,18 +9102,100 @@ get_note_type (e_type)
}
}
+static const char *
+get_netbsd_elfcore_note_type (e_type)
+ unsigned e_type;
+{
+ static char buff[64];
+
+ if (e_type == NT_NETBSDCORE_PROCINFO)
+ {
+ /* NetBSD core "procinfo" structure. */
+ return _("NetBSD procinfo structure");
+ }
+
+ /* As of Jan 2002 there are no other machine-independent notes
+ defined for NetBSD core files. If the note type is less
+ than the start of the machine-dependent note types, we don't
+ understand it. */
+
+ if (e_type < NT_NETBSDCORE_FIRSTMACH)
+ {
+ sprintf (buff, _("Unknown note type: (0x%08x)"), e_type);
+ return buff;
+ }
+
+ switch (elf_header.e_machine)
+ {
+ /* On the Alpha, SPARC (32-bit and 64-bit), PT_GETREGS == mach+0
+ and PT_GETFPREGS == mach+2. */
+
+ case EM_OLD_ALPHA:
+ case EM_ALPHA:
+ case EM_SPARC:
+ case EM_SPARC32PLUS:
+ case EM_SPARCV9:
+ switch (e_type)
+ {
+ case NT_NETBSDCORE_FIRSTMACH+0:
+ return _("PT_GETREGS (reg structure)");
+ case NT_NETBSDCORE_FIRSTMACH+2:
+ return _("PT_GETFPREGS (fpreg structure)");
+ default:
+ break;
+ }
+ break;
+
+ /* On all other arch's, PT_GETREGS == mach+1 and
+ PT_GETFPREGS == mach+3. */
+ default:
+ switch (e_type)
+ {
+ case NT_NETBSDCORE_FIRSTMACH+1:
+ return _("PT_GETREGS (reg structure)");
+ case NT_NETBSDCORE_FIRSTMACH+3:
+ return _("PT_GETFPREGS (fpreg structure)");
+ default:
+ break;
+ }
+ }
+
+ sprintf (buff, _("PT_FIRSTMACH+%d"), e_type - NT_NETBSDCORE_FIRSTMACH);
+ 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. */
+ If the value of namesz is zero, there is no name present. */
static int
process_note (pnote)
Elf32_Internal_Note * pnote;
{
+ const char *nt;
+
+ if (pnote->namesz == 0)
+ {
+ /* If there is no note name, then use the default set of
+ note type strings. */
+ nt = get_note_type (pnote->type);
+ }
+ else if (strncmp (pnote->namedata, "NetBSD-CORE", 11) == 0)
+ {
+ /* NetBSD-specific core file notes. */
+ nt = get_netbsd_elfcore_note_type (pnote->type);
+ }
+ else
+ {
+ /* Don't recognize this note name; just use the default set of
+ note type strings. */
+ nt = get_note_type (pnote->type);
+ }
+
printf (" %s\t\t0x%08lx\t%s\n",
pnote->namesz ? pnote->namedata : "(NONE)",
- pnote->descsz, get_note_type (pnote->type));
+ pnote->descsz, nt);
return 1;
}
@@ -8294,7 +9213,10 @@ process_corefile_note_segment (file, offset, length)
if (length <= 0)
return 0;
- GET_DATA_ALLOC (offset, length, pnotes, Elf_External_Note *, "notes");
+ pnotes = (Elf_External_Note *) get_data (NULL, file, offset, length,
+ _("notes"));
+ if (!pnotes)
+ return 0;
external = pnotes;
@@ -8489,8 +9411,8 @@ get_file_header (file)
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"));
+ error (_("This instance of readelf has been built without support for a\n\
+64 bit data type and so it cannot read 64 bit ELF files.\n"));
return 0;
}
@@ -8512,10 +9434,17 @@ get_file_header (file)
elf_header.e_shstrndx = BYTE_GET (ehdr64.e_shstrndx);
}
+ /* There may be some extensions in the first section header. Don't
+ bomb if we can't read it. */
+ if (is_32bit_elf)
+ get_32bit_section_headers (file, 1);
+ else
+ get_64bit_section_headers (file, 1);
+
return 1;
}
-static void
+static int
process_file (file_name)
char * file_name;
{
@@ -8526,21 +9455,21 @@ process_file (file_name)
if (stat (file_name, & statbuf) < 0)
{
error (_("Cannot stat input file %s.\n"), file_name);
- return;
+ return 1;
}
file = fopen (file_name, "rb");
if (file == NULL)
{
error (_("Input file %s not found.\n"), file_name);
- return;
+ return 1;
}
if (! get_file_header (file))
{
error (_("%s: Failed to read file header\n"), file_name);
fclose (file);
- return;
+ return 1;
}
/* Initialise per file variables. */
@@ -8557,7 +9486,7 @@ process_file (file_name)
if (! process_file_header ())
{
fclose (file);
- return;
+ return 1;
}
process_section_headers (file);
@@ -8615,12 +9544,14 @@ process_file (file_name)
free (dynamic_syminfo);
dynamic_syminfo = NULL;
}
+
+ return 0;
}
#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 */
+ symbols. */
void
print_address (unsigned int addr, FILE * outfile)
@@ -8628,7 +9559,7 @@ print_address (unsigned int addr, FILE * outfile)
fprintf (outfile,"0x%8.8x", addr);
}
-/* Needed by the i386 disassembler. */
+/* Needed by the i386 disassembler. */
void
db_task_printsym (unsigned int addr)
{
@@ -8636,14 +9567,21 @@ db_task_printsym (unsigned int addr)
}
#endif
+int main PARAMS ((int, char **));
+
int
main (argc, argv)
int argc;
char ** argv;
{
+ int err;
+
#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
setlocale (LC_MESSAGES, "");
#endif
+#if defined (HAVE_SETLOCALE)
+ setlocale (LC_CTYPE, "");
+#endif
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
@@ -8652,11 +9590,12 @@ main (argc, argv)
if (optind < (argc - 1))
show_name = 1;
+ err = 0;
while (optind < argc)
- process_file (argv [optind ++]);
+ err |= process_file (argv [optind ++]);
if (dump_sects != NULL)
free (dump_sects);
- return 0;
+ return err;
}
diff --git a/contrib/binutils/binutils/resrc.c b/contrib/binutils/binutils/resrc.c
index fca874a..eb7db96 100644
--- a/contrib/binutils/binutils/resrc.c
+++ b/contrib/binutils/binutils/resrc.c
@@ -1,5 +1,5 @@
/* resrc.c -- read and write Windows rc files.
- Copyright 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
This file is part of GNU Binutils.
@@ -25,10 +25,10 @@
#include "bfd.h"
#include "bucomm.h"
#include "libiberty.h"
+#include "safe-ctype.h"
#include "windres.h"
#include <assert.h>
-#include <ctype.h>
#include <errno.h>
#include <sys/stat.h>
#ifdef HAVE_UNISTD_H
@@ -1889,8 +1889,8 @@ write_rc_resource (e, type, name, res, language)
if (res->res_info.language != 0 && res->res_info.language != *language)
fprintf (e, "%sLANGUAGE %d, %d\n",
modifiers ? "// " : "",
- res->res_info.language & 0xff,
- (res->res_info.language >> 8) & 0xff);
+ res->res_info.language & ((1<<SUBLANG_SHIFT)-1),
+ (res->res_info.language >> SUBLANG_SHIFT) & 0xff);
if (res->res_info.characteristics != 0)
fprintf (e, "%sCHARACTERISTICS %lu\n",
modifiers ? "// " : "",
@@ -1976,7 +1976,7 @@ write_rc_accelerators (e, accelerators)
fprintf (e, " ");
if ((acc->key & 0x7f) == acc->key
- && isprint ((unsigned char) acc->key)
+ && ISPRINT (acc->key)
&& (acc->flags & ACC_VIRTKEY) == 0)
{
fprintf (e, "\"%c\"", acc->key);
@@ -2383,7 +2383,7 @@ write_rc_rcdata (e, rcdata, ind)
s = ri->u.string.s;
for (i = 0; i < ri->u.string.length; i++)
{
- if (isprint ((unsigned char) *s))
+ if (ISPRINT (*s))
putc (*s, e);
else
fprintf (e, "\\%03o", *s);
@@ -2421,7 +2421,7 @@ write_rc_rcdata (e, rcdata, ind)
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])
+ if (! ISPRINT (ri->u.buffer.data[i + j])
&& ri->u.buffer.data[i + j] != 0)
break;
if (j >= 4)
@@ -2429,7 +2429,7 @@ write_rc_rcdata (e, rcdata, ind)
fprintf (e, "\t// ");
for (j = 0; j < 4; ++j)
{
- if (! isprint (ri->u.buffer.data[i + j]))
+ if (! ISPRINT (ri->u.buffer.data[i + j]))
fprintf (e, "\\%03o", ri->u.buffer.data[i + j]);
else
{
@@ -2455,7 +2455,7 @@ write_rc_rcdata (e, rcdata, ind)
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])
+ if (! ISPRINT (ri->u.buffer.data[i + j])
&& ri->u.buffer.data[i + j] != 0)
break;
if (j >= 2)
@@ -2463,7 +2463,7 @@ write_rc_rcdata (e, rcdata, ind)
fprintf (e, "\t// ");
for (j = 0; j < 2; ++j)
{
- if (! isprint (ri->u.buffer.data[i + j]))
+ if (! ISPRINT (ri->u.buffer.data[i + j]))
fprintf (e, "\\%03o", ri->u.buffer.data[i + j]);
else
{
@@ -2483,7 +2483,7 @@ write_rc_rcdata (e, rcdata, ind)
if (! first)
indent (e, ind + 2);
if ((ri->u.buffer.data[i] & 0x7f) == ri->u.buffer.data[i]
- && isprint (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]);
diff --git a/contrib/binutils/binutils/resres.c b/contrib/binutils/binutils/resres.c
index 6a860eb..616772e 100644
--- a/contrib/binutils/binutils/resres.c
+++ b/contrib/binutils/binutils/resres.c
@@ -387,6 +387,8 @@ write_res_header (datasize, type, name, resinfo)
reshdr.data_size = datasize;
reshdr.header_size = 24 + get_id_size (type) + get_id_size (name);
+ reshdr.header_size = (reshdr.header_size + 3) & ~3;
+
res_align_file ();
write_res_data (&reshdr, sizeof (reshdr), 1);
write_res_id (type);
@@ -513,7 +515,9 @@ read_unistring (len)
static void
res_align_file (void)
{
- if (fseek (fres, ftell (fres) % 4, SEEK_CUR) != 0)
+ int pos = ftell (fres);
+ int skip = ((pos + 3) & ~3) - pos;
+ if (fseek (fres, skip, SEEK_CUR) != 0)
fatal ("%s: %s: unable to align file", program_name, filename);
}
diff --git a/contrib/binutils/binutils/size.c b/contrib/binutils/binutils/size.c
index 47a91ad..3293e44 100644
--- a/contrib/binutils/binutils/size.c
+++ b/contrib/binutils/binutils/size.c
@@ -1,22 +1,22 @@
/* size.c -- report size of various sections of an executable file.
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
-This file is part of GNU Binutils.
+ 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 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.
+ 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. */
+ 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. */
/* Extensions/incompatibilities:
o - BSD output has filenames at the end.
@@ -26,8 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
o - We also handle core files.
o - We also handle archives.
If you write shell scripts which manipulate this info then you may be
- out of luck; there's no --compatibility or --pedantic option.
-*/
+ out of luck; there's no --compatibility or --pedantic option. */
#include "bfd.h"
#include "getopt.h"
@@ -43,49 +42,63 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
enum
{
decimal, octal, hex
- } radix = decimal;
+ }
+radix = decimal;
+
int berkeley_format = BSD_DEFAULT; /* 0 means use AT&T-style output. */
int show_version = 0;
int show_help = 0;
+int show_totals = 0;
+
+static bfd_size_type total_bsssize;
+static bfd_size_type total_datasize;
+static bfd_size_type total_textsize;
/* Program exit status. */
int return_code = 0;
static char *target = NULL;
-/* Static declarations */
+/* Static declarations. */
-static void usage PARAMS ((FILE *, int));
-static void display_file PARAMS ((char *filename));
-static void display_bfd PARAMS ((bfd *));
-static void display_archive PARAMS ((bfd *));
-static int size_number PARAMS ((bfd_size_type));
+static void usage PARAMS ((FILE *, int));
+static void display_file PARAMS ((char *));
+static void display_bfd PARAMS ((bfd *));
+static void display_archive PARAMS ((bfd *));
+static int size_number PARAMS ((bfd_size_type));
#if 0
-static void lprint_number PARAMS ((int, bfd_size_type));
+static void lprint_number PARAMS ((int, bfd_size_type));
#endif
-static void rprint_number PARAMS ((int, bfd_size_type));
+static void rprint_number PARAMS ((int, bfd_size_type));
static void print_berkeley_format PARAMS ((bfd *));
-static void sysv_internal_sizer PARAMS ((bfd *, asection *, PTR));
+static void sysv_internal_sizer PARAMS ((bfd *, asection *, PTR));
static void sysv_internal_printer PARAMS ((bfd *, asection *, PTR));
-static void print_sysv_format PARAMS ((bfd *));
-static void print_sizes PARAMS ((bfd * file));
-static void berkeley_sum PARAMS ((bfd *, sec_ptr, PTR));
+static void print_sysv_format PARAMS ((bfd *));
+static void print_sizes PARAMS ((bfd * file));
+static void berkeley_sum PARAMS ((bfd *, sec_ptr, PTR));
static void
usage (stream, status)
FILE *stream;
int status;
{
- fprintf (stream, _("\
-Usage: %s [-A | --format=sysv | -B | --format=berkeley]\n\
- [-o | --radix=8 | -d | --radix=10 | -h | --radix=16]\n\
- [-V | --version] [--target=bfdname] [--help] [file...]\n"),
- program_name);
+ fprintf (stream, _("Usage: %s [option(s)] [file(s)]\n"), program_name);
+ fprintf (stream, _(" Displays the sizes of sections inside binary files\n"));
+ fprintf (stream, _(" If no input file(s) are specified, a.out is assumed\n"));
+ fprintf (stream, _(" The options are:\n\
+ -A|-B --format={sysv|berkeley} Select output style (default is %s)\n\
+ -o|-d|-h --radix={8|10|16} Display numbers in octal, decimal or hex\n\
+ -t --totals Display the total sizes (Berkeley only)\n\
+ --target=<bfdname> Set the binary file format\n\
+ -h --help Display this information\n\
+ -v --version Display the program's version\n\
+\n"),
#if BSD_DEFAULT
- fputs (_("default is --format=berkeley\n"), stream);
+ "berkeley"
#else
- fputs (_("default is --format=sysv\n"), stream);
+ "sysv"
#endif
+);
list_supported_targets (program_name, stream);
if (status == 0)
fprintf (stream, _("Report bugs to %s\n"), REPORT_BUGS_TO);
@@ -97,11 +110,14 @@ struct option long_options[] =
{"format", required_argument, 0, 200},
{"radix", required_argument, 0, 201},
{"target", required_argument, 0, 202},
+ {"totals", no_argument, &show_totals, 1},
{"version", no_argument, &show_version, 1},
{"help", no_argument, &show_help, 1},
{0, no_argument, 0, 0}
};
+int main PARAMS ((int, char **));
+
int
main (argc, argv)
int argc;
@@ -113,6 +129,9 @@ main (argc, argv)
#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
setlocale (LC_MESSAGES, "");
#endif
+#if defined (HAVE_SETLOCALE)
+ setlocale (LC_CTYPE, "");
+#endif
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
@@ -122,7 +141,7 @@ main (argc, argv)
bfd_init ();
set_default_bfd_target ();
- while ((c = getopt_long (argc, argv, "ABVdfox", long_options,
+ while ((c = getopt_long (argc, argv, "ABHhVvdfotx", long_options,
(int *) 0)) != EOF)
switch (c)
{
@@ -176,6 +195,7 @@ main (argc, argv)
case 'B':
berkeley_format = 1;
break;
+ case 'v':
case 'V':
show_version = 1;
break;
@@ -188,6 +208,9 @@ main (argc, argv)
case 'o':
radix = octal;
break;
+ case 't':
+ show_totals = 1;
+ break;
case 'f': /* FIXME : For sysv68, `-f' means `full format', i.e.
`[fname:] M(.text) + N(.data) + O(.bss) + P(.comment) = Q'
where `fname: ' appears only if there are >= 2 input files,
@@ -200,6 +223,8 @@ main (argc, argv)
break;
case 0:
break;
+ case 'h':
+ case 'H':
case '?':
usage (stderr, 1);
}
@@ -215,6 +240,20 @@ main (argc, argv)
for (; optind < argc;)
display_file (argv[optind++]);
+ if (show_totals && berkeley_format)
+ {
+ bfd_size_type total = total_textsize + total_datasize + total_bsssize;
+
+ rprint_number (7, total_textsize);
+ putchar('\t');
+ rprint_number (7, total_datasize);
+ putchar('\t');
+ rprint_number (7, total_bsssize);
+ printf (((radix == octal) ? "\t%7lo\t%7lx\t" : "\t%7lu\t%7lx\t"),
+ (unsigned long) total, (unsigned long) total);
+ fputs ("(TOTALS)\n", stdout);
+ }
+
return return_code;
}
@@ -248,7 +287,7 @@ display_bfd (abfd)
if (bfd_check_format_matches (abfd, bfd_core, &matching))
{
- CONST char *core_cmd;
+ const char *core_cmd;
print_sizes (abfd);
fputs (" (core file", stdout);
@@ -294,7 +333,7 @@ display_archive (file)
}
display_bfd (arfile);
- /* Don't close the archive elements; we need them for next_archive */
+ /* Don't close the archive elements; we need them for next_archive. */
}
}
@@ -303,6 +342,7 @@ display_file (filename)
char *filename;
{
bfd *file = bfd_openr (filename, target);
+
if (file == NULL)
{
bfd_nonfatal (filename);
@@ -330,6 +370,7 @@ size_number (num)
bfd_size_type num;
{
char buffer[40];
+
sprintf (buffer,
(radix == decimal ? "%lu" :
((radix == octal) ? "0%lo" : "0x%lx")),
@@ -348,6 +389,7 @@ lprint_number (width, num)
bfd_size_type num;
{
char buffer[40];
+
sprintf (buffer,
(radix == decimal ? "%lu" :
((radix == octal) ? "0%lo" : "0x%lx")),
@@ -364,6 +406,7 @@ rprint_number (width, num)
bfd_size_type num;
{
char buffer[40];
+
sprintf (buffer,
(radix == decimal ? "%lu" :
((radix == octal) ? "0%lo" : "0x%lx")),
@@ -423,6 +466,13 @@ print_berkeley_format (abfd)
total = textsize + datasize + bsssize;
+ if (show_totals)
+ {
+ total_textsize += textsize;
+ total_datasize += datasize;
+ total_bsssize += bsssize;
+ }
+
rprint_number (7, textsize);
putchar ('\t');
rprint_number (7, datasize);
@@ -432,6 +482,7 @@ print_berkeley_format (abfd)
(unsigned long) total, (unsigned long) total);
fputs (bfd_get_filename (abfd), stdout);
+
if (bfd_my_archive (abfd))
printf (" (ex %s)", bfd_get_filename (bfd_my_archive (abfd)));
}
@@ -450,15 +501,18 @@ sysv_internal_sizer (file, sec, ignore)
PTR ignore ATTRIBUTE_UNUSED;
{
bfd_size_type size = bfd_section_size (file, sec);
- if (!bfd_is_abs_section (sec)
- && !bfd_is_com_section (sec)
- && !bfd_is_und_section (sec))
+
+ if ( ! bfd_is_abs_section (sec)
+ && ! bfd_is_com_section (sec)
+ && ! bfd_is_und_section (sec))
{
int namelen = strlen (bfd_section_name (file, sec));
+
if (namelen > svi_namelen)
svi_namelen = namelen;
svi_total += size;
+
if (bfd_section_vma (file, sec) > svi_maxvma)
svi_maxvma = bfd_section_vma (file, sec);
}
@@ -471,9 +525,10 @@ sysv_internal_printer (file, sec, ignore)
PTR ignore ATTRIBUTE_UNUSED;
{
bfd_size_type size = bfd_section_size (file, sec);
- if (!bfd_is_abs_section (sec)
- && !bfd_is_com_section (sec)
- && !bfd_is_und_section (sec))
+
+ if ( ! bfd_is_abs_section (sec)
+ && ! bfd_is_com_section (sec)
+ && ! bfd_is_und_section (sec))
{
svi_total += size;
@@ -489,12 +544,13 @@ static void
print_sysv_format (file)
bfd *file;
{
- /* size all of the columns */
+ /* Size all of the columns. */
svi_total = 0;
svi_maxvma = 0;
svi_namelen = 0;
bfd_map_over_sections (file, sysv_internal_sizer, (PTR) NULL);
svi_vmalen = size_number ((bfd_size_type)svi_maxvma);
+
if ((size_t) svi_vmalen < sizeof ("addr") - 1)
svi_vmalen = sizeof ("addr")-1;
@@ -504,11 +560,13 @@ print_sysv_format (file)
svi_total = 0;
printf ("%s ", bfd_get_filename (file));
+
if (bfd_my_archive (file))
printf (" (ex %s)", bfd_get_filename (bfd_my_archive (file)));
printf (":\n%-*s %*s %*s\n", svi_namelen, "section",
svi_sizelen, "size", svi_vmalen, "addr");
+
bfd_map_over_sections (file, sysv_internal_printer, (PTR) NULL);
printf ("%-*s ", svi_namelen, "Total");
diff --git a/contrib/binutils/binutils/srconv.c b/contrib/binutils/binutils/srconv.c
index d5a2324..5361420 100644
--- a/contrib/binutils/binutils/srconv.c
+++ b/contrib/binutils/binutils/srconv.c
@@ -1,5 +1,5 @@
/* srconv.c -- Sysroff conversion program
- Copyright 1994, 1995, 1996, 1998, 1999, 2000
+ Copyright 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -36,17 +36,67 @@
#include "coff/internal.h"
#include "../bfd/libcoff.h"
-#define PROGRAM_VERSION "1.5"
/*#define FOOP1 1 */
static int addrsize;
static char *toolname;
static char **rnames;
-static void wr_cs ();
-static void walk_tree_scope ();
-static void wr_globals ();
-static int find_base ();
+static int get_member_id PARAMS ((int));
+static int get_ordinary_id PARAMS ((int));
+static char *section_translate PARAMS ((char *));
+static char *strip_suffix PARAMS ((char *));
+static void checksum PARAMS ((FILE *, char *, int, int));
+static void writeINT PARAMS ((int, char *, int *, int, FILE *));
+static void writeBITS PARAMS ((int, char *, int *, int));
+static void writeBARRAY PARAMS ((barray, char *, int *, int, FILE *));
+static void writeCHARS PARAMS ((char *, char *, int *, int, FILE *));
+static void wr_tr PARAMS ((void));
+static void wr_un PARAMS ((struct coff_ofile *, struct coff_sfile *, int, int));
+static void wr_hd PARAMS ((struct coff_ofile *));
+static void wr_sh PARAMS ((struct coff_ofile *, struct coff_section *));
+static void wr_ob PARAMS ((struct coff_ofile *, struct coff_section *));
+static void wr_rl PARAMS ((struct coff_ofile *, struct coff_section *));
+static void wr_object_body PARAMS ((struct coff_ofile *));
+static void wr_dps_start
+ PARAMS ((struct coff_sfile *, struct coff_section *, struct coff_scope *,
+ int, int));
+static void wr_dps_end
+ PARAMS ((struct coff_section *, struct coff_scope *, int));
+static int *nints PARAMS ((int));
+static void walk_tree_type_1
+ PARAMS ((struct coff_sfile *, struct coff_symbol *, struct coff_type *,
+ int));
+static void walk_tree_type
+ PARAMS ((struct coff_sfile *, struct coff_symbol *, struct coff_type *,
+ int));
+static void walk_tree_symbol
+ PARAMS ((struct coff_sfile *, struct coff_section *,
+ struct coff_symbol *, int));
+static void walk_tree_scope
+ PARAMS ((struct coff_section *, struct coff_sfile *, struct coff_scope *,
+ int, int));
+static void walk_tree_sfile
+ PARAMS ((struct coff_section *, struct coff_sfile *));
+static void wr_program_structure
+ PARAMS ((struct coff_ofile *, struct coff_sfile *));
+static void wr_du PARAMS ((struct coff_ofile *, struct coff_sfile *, int));
+static void wr_dus PARAMS ((struct coff_ofile *, struct coff_sfile *));
+static int find_base PARAMS ((struct coff_sfile *, struct coff_section *));
+static void wr_dln PARAMS ((struct coff_ofile *, struct coff_sfile *, int));
+static void wr_globals
+ PARAMS ((struct coff_ofile *, struct coff_sfile *, int));
+static void wr_debug PARAMS ((struct coff_ofile *));
+static void wr_cs PARAMS ((void));
+static int wr_sc PARAMS ((struct coff_ofile *, struct coff_sfile *));
+static void wr_er PARAMS ((struct coff_ofile *, struct coff_sfile *, int));
+static void wr_ed PARAMS ((struct coff_ofile *, struct coff_sfile *, int));
+static void wr_unit_info PARAMS ((struct coff_ofile *));
+static void wr_module PARAMS ((struct coff_ofile *));
+static int align PARAMS ((int));
+static void prescan PARAMS ((struct coff_ofile *));
+static void show_usage PARAMS ((FILE *, int));
+extern int main PARAMS ((int, char **));
static FILE *file;
static bfd *abfd;
@@ -72,9 +122,8 @@ get_member_id (x)
int x;
{
if (ids2[x])
- {
- return ids2[x];
- }
+ return ids2[x];
+
ids2[x] = base2++;
return ids2[x];
}
@@ -84,9 +133,8 @@ get_ordinary_id (x)
int x;
{
if (ids1[x])
- {
- return ids1[x];
- }
+ return ids1[x];
+
ids1[x] = base1++;
return ids1[x];
}
@@ -103,11 +151,8 @@ section_translate (n)
return n;
}
-
-
#define DATE "940201073000"; /* Just a time on my birthday */
-
static
char *
strip_suffix (name)
@@ -115,6 +160,7 @@ strip_suffix (name)
{
int i;
char *res;
+
for (i = 0; name[i] != 0 && name[i] != '.'; i++)
;
res = (char *) xmalloc (i + 1);
@@ -123,7 +169,6 @@ strip_suffix (name)
return res;
}
-
/* IT LEN stuff CS */
static void
checksum (file, ptr, size, code)
@@ -136,6 +181,7 @@ checksum (file, ptr, size, code)
int last;
int sum = 0;
int bytes = size / 8;
+
last = !(code & 0xff00);
if (size & 0x7)
abort ();
@@ -143,17 +189,14 @@ checksum (file, ptr, size, code)
ptr[1] = bytes + 1;
for (j = 0; j < bytes; j++)
- {
- sum += ptr[j];
- }
- /* Glue on a checksum too */
+ sum += ptr[j];
+
+ /* Glue on a checksum too. */
ptr[bytes] = ~sum;
fwrite (ptr, bytes + 1, 1, file);
}
-
-
static void
writeINT (n, ptr, idx, size, file)
int n;
@@ -171,11 +214,12 @@ writeINT (n, ptr, idx, size, file)
if (byte > 240)
{
- /* Lets write out that record and do another one */
+ /* Lets write out that record and do another one. */
checksum (file, ptr, *idx, code | 0x1000);
*idx = 16;
byte = *idx / 8;
}
+
switch (size)
{
case 0:
@@ -199,7 +243,6 @@ writeINT (n, ptr, idx, size, file)
*idx += size * 8;
}
-
static void
writeBITS (val, ptr, idx, size)
int val;
@@ -210,12 +253,13 @@ writeBITS (val, ptr, idx, size)
int byte = *idx / 8;
int bit = *idx % 8;
int old;
+
*idx += size;
old = ptr[byte];
- /* Turn off all about to change bits */
+ /* Turn off all about to change bits. */
old &= ~((~0 >> (8 - bit - size)) & ((1 << size) - 1));
- /* Turn on the bits we want */
+ /* Turn on the bits we want. */
old |= (val & ((1 << size) - 1)) << (8 - bit - size);
ptr[byte] = old;
}
@@ -229,14 +273,12 @@ writeBARRAY (data, ptr, idx, size, file)
FILE *file;
{
int i;
+
writeINT (data.len, ptr, idx, 1, file);
for (i = 0; i < data.len; i++)
- {
- writeINT (data.data[i], ptr, idx, 1, file);
- }
+ writeINT (data.data[i], ptr, idx, 1, file);
}
-
static void
writeCHARS (string, ptr, idx, size, file)
char *string;
@@ -249,7 +291,7 @@ writeCHARS (string, ptr, idx, size, file)
if (i > 240)
{
- /* Lets write out that record and do another one */
+ /* Lets write out that record and do another one. */
checksum (file, ptr, *idx, code | 0x1000);
*idx = 16;
i = *idx / 8;
@@ -257,12 +299,12 @@ writeCHARS (string, ptr, idx, size, file)
if (size == 0)
{
- /* Variable length string */
+ /* Variable length string. */
size = strlen (string);
ptr[i++] = size;
}
- /* BUG WAITING TO HAPPEN */
+ /* BUG WAITING TO HAPPEN. */
memcpy (ptr + i, string, size);
i += size;
*idx = i * 8;
@@ -271,7 +313,6 @@ writeCHARS (string, ptr, idx, size, file)
#define SYSROFF_SWAP_OUT
#include "sysroff.c"
-
static char *rname_sh[] =
{
"R0", "R1", "R2", "R3", "R4", "R5", "R6", "R7", "R8", "R9", "R10", "R11", "R12", "R13", "R14", "R15"
@@ -285,13 +326,14 @@ static char *rname_h8300[] =
static void
wr_tr ()
{
- /* The TR block is not normal - it doesn't have any contents. */
+ /* The TR block is not normal - it doesn't have any contents. */
- static char b[] = {
- 0xff, /* IT */
- 0x03, /* RL */
- 0xfd, /* CS */
- };
+ static char b[] =
+ {
+ 0xff, /* IT */
+ 0x03, /* RL */
+ 0xfd, /* CS */
+ };
fwrite (b, 1, sizeof (b), file);
}
@@ -303,7 +345,6 @@ wr_un (ptr, sfile, first, nsecs)
int nsecs ATTRIBUTE_UNUSED;
{
struct IT_un un;
-
struct coff_symbol *s;
un.spare1 = 0;
@@ -314,17 +355,16 @@ wr_un (ptr, sfile, first, nsecs)
un.format = FORMAT_OM;
un.spare1 = 0;
-
#if 1
- un.nsections = ptr->nsections - 1; /* Don't count the abs section */
+ un.nsections = ptr->nsections - 1; /* Don't count the abs section. */
#else
- /*NEW - only count sections with size */
+ /*NEW - only count sections with size. */
un.nsections = nsecs;
#endif
un.nextdefs = 0;
un.nextrefs = 0;
- /* Count all the undefined and defined variables with global scope */
+ /* Count all the undefined and defined variables with global scope. */
if (first)
{
@@ -346,7 +386,6 @@ wr_un (ptr, sfile, first, nsecs)
sysroff_swap_un_out (file, &un);
}
-
static void
wr_hd (p)
struct coff_ofile *p;
@@ -355,18 +394,16 @@ wr_hd (p)
hd.spare1 = 0;
if (bfd_get_file_flags (abfd) & EXEC_P)
- {
- hd.mt = MTYPE_ABS_LM;
- }
+ hd.mt = MTYPE_ABS_LM;
else
- {
- hd.mt = MTYPE_OMS_OR_LMS;
- }
+ hd.mt = MTYPE_OMS_OR_LMS;
+
hd.cd = DATE;
hd.nu = p->nsources; /* Always one unit */
hd.code = 0; /* Always ASCII */
hd.ver = "0200"; /* Version 2.00 */
+
switch (bfd_get_arch (abfd))
{
case bfd_arch_h8300:
@@ -465,7 +502,8 @@ wr_ob (p, section)
while (i < section->bfd_section->_raw_size)
{
struct IT_ob ob;
- int todo = 200; /* Copy in 200 byte lumps */
+ int todo = 200; /* Copy in 200 byte lumps. */
+
ob.spare = 0;
if (i + todo > section->bfd_section->_raw_size)
todo = section->bfd_section->_raw_size - i;
@@ -485,32 +523,33 @@ wr_ob (p, section)
ob.saf = 0;
}
- ob.cpf = 0; /* Never compress */
+ ob.cpf = 0; /* Never compress. */
ob.data.len = todo;
bfd_get_section_contents (abfd, section->bfd_section, stuff, i, todo);
ob.data.data = stuff;
sysroff_swap_ob_out (file, &ob /*, i + todo < section->size */ );
i += todo;
}
- /* Now fill the rest with blanks */
+
+ /* Now fill the rest with blanks. */
while (i < (bfd_size_type) section->size)
{
struct IT_ob ob;
- int todo = 200; /* Copy in 200 byte lumps */
+ int todo = 200; /* Copy in 200 byte lumps. */
+
ob.spare = 0;
if (i + todo > (bfd_size_type) section->size)
todo = section->size - i;
ob.saf = 0;
- ob.cpf = 0; /* Never compress */
+ ob.cpf = 0; /* Never compress. */
ob.data.len = todo;
memset (stuff, 0, todo);
ob.data.data = stuff;
sysroff_swap_ob_out (file, &ob);
i += todo;
}
- /* Now fill the rest with blanks */
-
+ /* Now fill the rest with blanks. */
}
static void
@@ -520,11 +559,13 @@ wr_rl (ptr, sec)
{
int nr = sec->nrelocs;
int i;
+
for (i = 0; i < nr; i++)
{
struct coff_reloc *r = sec->relocs + i;
struct coff_symbol *ref;
struct IT_rl rl;
+
rl.apol = 0;
rl.boundary = 0;
rl.segment = 1;
@@ -532,18 +573,19 @@ wr_rl (ptr, sec)
rl.check = 0;
rl.addr = r->offset;
rl.bitloc = 0;
- rl.flen = 32; /* SH Specific */
- /* What sort of reloc ? Look in the section to find out */
+ rl.flen = 32; /* SH Specific. */
+
+ /* What sort of reloc ? Look in the section to find out. */
ref = r->symbol;
if (ref->visible->type == coff_vis_ext_ref)
{
- rl.bcount = 4; /* Always 4 for us */
+ rl.bcount = 4; /* Always 4 for us. */
rl.op = OP_EXT_REF;
rl.symn = ref->er_number;
}
else if (ref->visible->type == coff_vis_common)
{
- rl.bcount = 11; /* Always 11 for us */
+ rl.bcount = 11; /* Always 11 for us. */
rl.op = OP_SEC_REF;
rl.secn = ref->where->section->number;
rl.copcode_is_3 = 3;
@@ -551,10 +593,9 @@ wr_rl (ptr, sec)
rl.addend = ref->where->offset - ref->where->section->address;
rl.aopcode_is_0x20 = 0x20;
}
-
else
{
- rl.bcount = 11; /* Always 11 for us */
+ rl.bcount = 11; /* Always 11 for us. */
rl.op = OP_SEC_REF;
rl.secn = ref->where->section->number;
rl.copcode_is_3 = 3;
@@ -562,12 +603,12 @@ wr_rl (ptr, sec)
rl.addend = -ref->where->section->address;
rl.aopcode_is_0x20 = 0x20;
}
+
rl.end = 0xff;
- if (rl.op == OP_SEC_REF
+
+ if ( rl.op == OP_SEC_REF
|| rl.op == OP_EXT_REF)
- {
- sysroff_swap_rl_out (file, &rl);
- }
+ sysroff_swap_rl_out (file, &rl);
}
}
@@ -576,6 +617,7 @@ wr_object_body (p)
struct coff_ofile *p;
{
int i;
+
for (i = 1; i < p->nsections; i++)
{
wr_sh (p, p->sections + i);
@@ -593,21 +635,23 @@ wr_dps_start (sfile, section, scope, type, nest)
int nest;
{
struct IT_dps dps;
+
dps.end = 0;
dps.opt = 0;
dps.type = type;
+
if (scope->sec)
{
dps.san = scope->sec->number;
dps.address = scope->offset - find_base (sfile, scope->sec);
dps.block_size = scope->size;
+
if (debug)
{
printf ("DPS %s %d %x\n",
sfile->name,
nest,
dps.address);
-
}
}
else
@@ -629,6 +673,7 @@ wr_dps_end (section, scope, type)
int type;
{
struct IT_dps dps;
+
dps.end = 1;
dps.type = type;
sysroff_swap_dps_out (file, &dps);
@@ -641,7 +686,6 @@ nints (x)
return (int *) (xcalloc (sizeof (int), x));
}
-static void walk_tree_symbol ();
static void
walk_tree_type_1 (sfile, symbol, type, nest)
struct coff_sfile *sfile;
@@ -664,11 +708,13 @@ walk_tree_type_1 (sfile, symbol, type, nest)
dbt.sign = BTYPE_UNSPEC;
dbt.fptype = FPTYPE_NOTSPEC;
break;
+
case T_CHAR:
dbt.btype = BTYPE_CHAR;
dbt.sign = BTYPE_UNSPEC;
dbt.fptype = FPTYPE_NOTSPEC;
break;
+
case T_SHORT:
case T_INT:
case T_LONG:
@@ -676,23 +722,28 @@ walk_tree_type_1 (sfile, symbol, type, nest)
dbt.sign = SIGN_SIGNED;
dbt.fptype = FPTYPE_NOTSPEC;
break;
+
case T_FLOAT:
dbt.btype = BTYPE_FLOAT;
dbt.fptype = FPTYPE_SINGLE;
break;
+
case T_DOUBLE:
dbt.btype = BTYPE_FLOAT;
dbt.fptype = FPTYPE_DOUBLE;
break;
+
case T_LNGDBL:
dbt.btype = BTYPE_FLOAT;
dbt.fptype = FPTYPE_EXTENDED;
break;
+
case T_UCHAR:
dbt.btype = BTYPE_CHAR;
dbt.sign = SIGN_UNSIGNED;
dbt.fptype = FPTYPE_NOTSPEC;
break;
+
case T_USHORT:
case T_UINT:
case T_ULONG:
@@ -701,14 +752,17 @@ walk_tree_type_1 (sfile, symbol, type, nest)
dbt.fptype = FPTYPE_NOTSPEC;
break;
}
+
dbt.bitsize = type->size;
dbt.neg = 0x1001;
sysroff_swap_dbt_out (file, &dbt);
break;
}
+
case coff_pointer_type:
{
struct IT_dpt dpt;
+
walk_tree_type_1 (sfile, symbol, type->u.pointer.points_to, nest + 1);
dpt.neg = 0x1001;
sysroff_swap_dpt_out (file, &dpt);
@@ -719,6 +773,7 @@ walk_tree_type_1 (sfile, symbol, type, nest)
{
struct IT_dfp dfp;
struct coff_symbol *param;
+
dfp.end = 0;
dfp.spare = 0;
dfp.nparams = type->u.function.parameters->nvars;
@@ -731,9 +786,8 @@ walk_tree_type_1 (sfile, symbol, type, nest)
for (param = type->u.function.parameters->vars_head;
param;
param = param->next)
- {
- walk_tree_symbol (sfile, 0, param, nest);
- }
+ walk_tree_symbol (sfile, 0, param, nest);
+
dfp.end = 1;
sysroff_swap_dfp_out (file, &dfp);
break;
@@ -744,6 +798,7 @@ walk_tree_type_1 (sfile, symbol, type, nest)
struct IT_dbt dbt;
struct IT_dds dds;
struct coff_symbol *member;
+
dds.spare = 0;
dbt.btype = BTYPE_STRUCT;
dbt.bitsize = type->size;
@@ -755,43 +810,43 @@ walk_tree_type_1 (sfile, symbol, type, nest)
dds.end = 0;
dds.neg = 0x1001;
sysroff_swap_dds_out (file, &dds);
+
for (member = type->u.astructdef.elements->vars_head;
member;
member = member->next)
- {
- walk_tree_symbol (sfile, 0, member, nest + 1);
- }
+ walk_tree_symbol (sfile, 0, member, nest + 1);
dds.end = 1;
sysroff_swap_dds_out (file, &dds);
}
break;
+
case coff_structref_type:
{
struct IT_dbt dbt;
+
dbt.btype = BTYPE_TAG;
dbt.bitsize = type->size;
dbt.sign = SIGN_UNSPEC;
dbt.fptype = FPTYPE_NOTSPEC;
+
if (type->u.astructref.ref)
- {
- dbt.sid = get_member_id (type->u.astructref.ref->number);
- }
+ dbt.sid = get_member_id (type->u.astructref.ref->number);
else
- {
- dbt.sid = 0;
- }
+ dbt.sid = 0;
dbt.neg = 0x1001;
sysroff_swap_dbt_out (file, &dbt);
}
break;
+
case coff_array_type:
{
struct IT_dar dar;
int j;
- int dims = 1; /* Only output one dimension at a time */
+ int dims = 1; /* Only output one dimension at a time. */
+
dar.dims = dims;
dar.variable = nints (dims);
dar.subtype = nints (dims);
@@ -804,6 +859,7 @@ walk_tree_type_1 (sfile, symbol, type, nest)
dar.minspare = nints (dims);
dar.neg = 0x1001;
dar.length = type->size / type->u.array.dim;
+
for (j = 0; j < dims; j++)
{
dar.variable[j] = VARIABLE_FIXED;
@@ -818,11 +874,13 @@ walk_tree_type_1 (sfile, symbol, type, nest)
sysroff_swap_dar_out (file, &dar);
}
break;
+
case coff_enumdef_type:
{
struct IT_dbt dbt;
struct IT_den den;
struct coff_symbol *member;
+
dbt.btype = BTYPE_ENUM;
dbt.bitsize = type->size;
dbt.sign = SIGN_UNSPEC;
@@ -835,22 +893,21 @@ walk_tree_type_1 (sfile, symbol, type, nest)
den.neg = 0x1001;
den.spare = 0;
sysroff_swap_den_out (file, &den);
+
for (member = type->u.aenumdef.elements->vars_head;
member;
member = member->next)
- {
- walk_tree_symbol (sfile, 0, member, nest + 1);
- }
+ walk_tree_symbol (sfile, 0, member, nest + 1);
den.end = 1;
sysroff_swap_den_out (file, &den);
}
break;
- break;
case coff_enumref_type:
{
struct IT_dbt dbt;
+
dbt.btype = BTYPE_TAG;
dbt.bitsize = type->size;
dbt.sign = SIGN_UNSPEC;
@@ -860,6 +917,7 @@ walk_tree_type_1 (sfile, symbol, type, nest)
sysroff_swap_dbt_out (file, &dbt);
}
break;
+
default:
abort ();
}
@@ -905,17 +963,15 @@ walk_tree_type_1 (sfile, symbol, type, nest)
static void
walk_tree_type (sfile, symbol, type, nest)
-
- struct
- coff_sfile *sfile;
+ struct coff_sfile *sfile;
struct coff_symbol *symbol;
struct coff_type *type;
int nest;
{
if (symbol->type->type == coff_function_type)
{
-
struct IT_dty dty;
+
dty.end = 0;
dty.neg = 0x1001;
@@ -941,11 +997,11 @@ walk_tree_type (sfile, symbol, type, nest)
BLOCK_TYPE_BLOCK);
wr_dps_end (symbol->where->section,
symbol->type->u.function.code, BLOCK_TYPE_FUNCTION);
-
}
else
{
struct IT_dty dty;
+
dty.end = 0;
dty.neg = 0x1001;
sysroff_swap_dty_out (file, &dty);
@@ -953,11 +1009,8 @@ walk_tree_type (sfile, symbol, type, nest)
dty.end = 1;
sysroff_swap_dty_out (file, &dty);
}
-
}
-
-
static void
walk_tree_symbol (sfile, section, symbol, nest)
struct coff_sfile *sfile;
@@ -967,7 +1020,7 @@ walk_tree_symbol (sfile, section, symbol, nest)
{
struct IT_dsy dsy;
- memset(&dsy, 0, sizeof(dsy));
+ memset (&dsy, 0, sizeof(dsy));
dsy.nesting = nest;
switch (symbol->type->type)
@@ -976,6 +1029,7 @@ walk_tree_symbol (sfile, section, symbol, nest)
dsy.type = STYPE_FUNC;
dsy.assign = 1;
break;
+
case coff_structref_type:
case coff_pointer_type:
case coff_array_type:
@@ -984,18 +1038,22 @@ walk_tree_symbol (sfile, section, symbol, nest)
dsy.type = STYPE_VAR;
dsy.assign = 1;
break;
+
case coff_enumdef_type:
dsy.type = STYPE_TAG;
dsy.assign = 0;
dsy.magic = 2;
break;
+
case coff_structdef_type:
dsy.type = STYPE_TAG;
dsy.assign = 0;
dsy.magic = symbol->type->u.astructdef.isstruct ? 0 : 1;
break;
+
case coff_secdef_type:
return;
+
default:
abort ();
}
@@ -1005,6 +1063,7 @@ walk_tree_symbol (sfile, section, symbol, nest)
dsy.assign = 0;
dsy.type = STYPE_MEMBER;
}
+
if (symbol->where->where == coff_where_member_of_enum)
{
dsy.type = STYPE_ENUM;
@@ -1024,7 +1083,6 @@ walk_tree_symbol (sfile, section, symbol, nest)
dsy.snumber = get_ordinary_id (symbol->number);
}
-
dsy.sname = symbol->name[0] == '_' ? symbol->name + 1 : symbol->name;
switch (symbol->visible->type)
@@ -1033,30 +1091,37 @@ walk_tree_symbol (sfile, section, symbol, nest)
case coff_vis_ext_def:
dsy.ainfo = AINFO_STATIC_EXT_DEF;
break;
+
case coff_vis_ext_ref:
dsy.ainfo = AINFO_STATIC_EXT_REF;
break;
+
case coff_vis_int_def:
dsy.ainfo = AINFO_STATIC_INT;
break;
+
case coff_vis_auto:
case coff_vis_autoparam:
dsy.ainfo = AINFO_AUTO;
break;
+
case coff_vis_register:
case coff_vis_regparam:
dsy.ainfo = AINFO_REG;
break;
break;
+
case coff_vis_tag:
case coff_vis_member_of_struct:
case coff_vis_member_of_enum:
break;
+
default:
abort ();
}
dsy.dlength = symbol->type->size;
+
switch (symbol->where->where)
{
case coff_where_memory:
@@ -1066,16 +1131,17 @@ walk_tree_symbol (sfile, section, symbol, nest)
dsy.section = 0;
#endif
break;
+
case coff_where_member_of_struct:
case coff_where_member_of_enum:
case coff_where_stack:
case coff_where_register:
case coff_where_unknown:
case coff_where_strtag:
-
case coff_where_entag:
case coff_where_typedef:
break;
+
default:
abort ();
}
@@ -1085,12 +1151,12 @@ walk_tree_symbol (sfile, section, symbol, nest)
case coff_where_memory:
dsy.address = symbol->where->offset - find_base (sfile, symbol->where->section);
break;
+
case coff_where_stack:
dsy.address = symbol->where->offset;
break;
- case coff_where_member_of_struct:
-
+ case coff_where_member_of_struct:
if (symbol->where->bitsize)
{
int bits = (symbol->where->offset * 8 + symbol->where->bitoffset);
@@ -1107,18 +1173,20 @@ walk_tree_symbol (sfile, section, symbol, nest)
dsy.field_off = symbol->where->offset;
}
break;
+
case coff_where_member_of_enum:
/* dsy.bitunit = 0;
dsy.field_len = symbol->type->size;
dsy.field_off = symbol->where->offset; */
break;
+
case coff_where_register:
case coff_where_unknown:
case coff_where_strtag:
-
case coff_where_entag:
case coff_where_typedef:
break;
+
default:
abort ();
}
@@ -1129,10 +1197,9 @@ walk_tree_symbol (sfile, section, symbol, nest)
switch (symbol->visible->type)
{
case coff_vis_common:
- /* We do this 'cause common C symbols are treated as extdefs */
+ /* We do this 'cause common C symbols are treated as extdefs. */
case coff_vis_ext_def:
case coff_vis_ext_ref:
-
dsy.ename = symbol->name;
break;
@@ -1142,29 +1209,26 @@ walk_tree_symbol (sfile, section, symbol, nest)
break;
case coff_vis_int_def:
-
case coff_vis_auto:
case coff_vis_register:
case coff_vis_tag:
case coff_vis_member_of_struct:
case coff_vis_member_of_enum:
break;
+
default:
abort ();
}
dsy.sfn = 0;
dsy.sln = 2;
-
dsy.neg = 0x1001;
-
sysroff_swap_dsy_out (file, &dsy);
walk_tree_type (sfile, symbol, symbol->type, nest);
}
-
static void
walk_tree_scope (section, sfile, scope, nest, type)
struct coff_section *section;
@@ -1185,25 +1249,21 @@ walk_tree_scope (section, sfile, scope, nest, type)
wr_globals (tree, sfile, nest + 1);
for (vars = scope->vars_head; vars; vars = vars->next)
- {
- walk_tree_symbol (sfile, section, vars, nest);
- }
+ walk_tree_symbol (sfile, section, vars, nest);
for (child = scope->list_head; child; child = child->next)
- {
- walk_tree_scope (section, sfile, child, nest + 1, BLOCK_TYPE_BLOCK);
- }
+ walk_tree_scope (section, sfile, child, nest + 1, BLOCK_TYPE_BLOCK);
wr_dps_end (section, scope, type);
}
}
+
static void
walk_tree_sfile (section, sfile)
struct coff_section *section;
struct coff_sfile *sfile;
{
walk_tree_scope (section, sfile, sfile->scope, 0, BLOCK_TYPE_COMPUNIT);
-
}
static void
@@ -1211,9 +1271,7 @@ wr_program_structure (p, sfile)
struct coff_ofile *p;
struct coff_sfile *sfile;
{
-
walk_tree_sfile (p->sections + 4, sfile);
-
}
static void
@@ -1233,6 +1291,7 @@ wr_du (p, sfile, n)
int j;
unsigned int *lowest = (unsigned *) nints (p->nsections);
unsigned int *highest = (unsigned *) nints (p->nsections);
+
du.format = bfd_get_file_flags (abfd) & EXEC_P ? 0 : 1;
du.optimized = 0;
du.stackfrmt = 0;
@@ -1250,7 +1309,7 @@ wr_du (p, sfile, n)
}
/* Look through all the symbols and try and work out the extents in this
- source file */
+ source file. */
#if 0
for (symbol = sfile->scope->vars_head;
symbol;
@@ -1270,16 +1329,15 @@ wr_du (p, sfile, n)
}
}
-
for (i = 0; i < du.sections; i++)
{
if (highest[i] == 0)
- {
- lowest[i] = highest[i] = incit;
- }
+ lowest[i] = highest[i] = incit;
+
du.san[used] = i;
du.length[used] = highest[i] - lowest[i];
du.address[used] = bfd_get_file_flags (abfd) & EXEC_P ? lowest[i] : 0;
+
if (debug)
{
printf (" section %6s 0x%08x..0x%08x\n",
@@ -1289,14 +1347,16 @@ wr_du (p, sfile, n)
}
used++;
}
-
#endif
+
lim = du.sections;
for (j = 0; j < lim; j++)
{
int src = j;
int dst = j;
+
du.san[dst] = dst;
+
if (sfile->section[src].init)
{
du.length[dst]
@@ -1309,6 +1369,7 @@ wr_du (p, sfile, n)
du.length[dst] = 0;
du.address[dst] = 0;
}
+
if (debug)
{
if (sfile->section[src].parent)
@@ -1319,6 +1380,7 @@ wr_du (p, sfile, n)
du.address[dst] + du.length[dst] - 1);
}
}
+
du.sections = dst + 1;
}
@@ -1333,7 +1395,6 @@ wr_dus (p, sfile)
struct coff_ofile *p ATTRIBUTE_UNUSED;
struct coff_sfile *sfile;
{
-
struct IT_dus dus;
dus.efn = 0x1001;
@@ -1342,7 +1403,7 @@ wr_dus (p, sfile)
dus.fname = (char **) xcalloc (sizeof (char *), dus.ns);
dus.spare = nints (dus.ns);
dus.ndir = 0;
- /* Find the filenames */
+ /* Find the filenames. */
#if 0
i = 0;
@@ -1365,7 +1426,7 @@ wr_dus (p, sfile)
}
/* Find the offset of the .text section for this sfile in the
- .text section for the output file */
+ .text section for the output file. */
static int
find_base (sfile, section)
@@ -1514,7 +1575,8 @@ wr_dln (p, sfile, n)
#endif
}
-/* Write the global symbols out to the debug info */
+/* Write the global symbols out to the debug info. */
+
static void
wr_globals (p, sfile, n)
struct coff_ofile *p;
@@ -1522,6 +1584,7 @@ wr_globals (p, sfile, n)
int n ATTRIBUTE_UNUSED;
{
struct coff_symbol *sy;
+
for (sy = p->symbol_list_head;
sy;
sy = sy->next_in_ofile_list)
@@ -1530,10 +1593,9 @@ wr_globals (p, sfile, n)
|| sy->visible->type == coff_vis_ext_ref)
{
/* Only write out symbols if they belong to
- the current source file */
+ the current source file. */
if (sy->sfile == sfile)
walk_tree_symbol (sfile, 0, sy, 0);
-
}
}
}
@@ -1544,15 +1606,14 @@ wr_debug (p)
{
struct coff_sfile *sfile;
int n = 0;
+
for (sfile = p->source_head;
sfile;
sfile = sfile->next)
-
{
if (debug)
- {
- printf ("%s\n", sfile->name);
- }
+ printf ("%s\n", sfile->name);
+
wr_du (p, sfile, n);
wr_dus (p, sfile);
wr_program_structure (p, sfile);
@@ -1565,8 +1626,9 @@ static void
wr_cs ()
{
/* It seems that the CS struct is not normal - the size is wrong
- heres one I prepared earlier.. */
- static char b[] = {
+ heres one I prepared earlier. */
+ static char b[] =
+ {
0x80, /* IT */
0x21, /* RL */
0x00, /* number of chars in variable length part */
@@ -1606,7 +1668,7 @@ wr_cs ()
/* Write out the SC records for a unit. Create an SC
for all the sections which appear in the output file, even
- if there isn't an equivalent one on the input */
+ if there isn't an equivalent one on the input. */
static int
wr_sc (ptr, sfile)
@@ -1614,23 +1676,19 @@ wr_sc (ptr, sfile)
struct coff_sfile *sfile;
{
int i;
-int scount = 0;
- /* First work out the total number of sections */
-
+ int scount = 0;
+ /* First work out the total number of sections. */
int total_sec = ptr->nsections;
-
struct myinfo
{
struct coff_section *sec;
struct coff_symbol *symbol;
};
struct coff_symbol *symbol;
-
struct myinfo *info
= (struct myinfo *) calloc (total_sec, sizeof (struct myinfo));
-
for (i = 0; i < total_sec; i++)
{
info[i].sec = ptr->sections + i;
@@ -1656,19 +1714,20 @@ int scount = 0;
}
/* Now output all the section info, and fake up some stuff for sections
- we don't have */
-
+ we don't have. */
for (i = 1; i < total_sec; i++)
{
struct IT_sc sc;
char *name;
+
symbol = info[i].symbol;
sc.spare = 0;
sc.spare1 = 0;
+
if (!symbol)
{
- /* Don't have a symbol set aside for this section, which means that nothing
- in this file does anything for the section. */
+ /* Don't have a symbol set aside for this section, which means
+ that nothing in this file does anything for the section. */
sc.format = !(bfd_get_file_flags (abfd) & EXEC_P);
sc.addr = 0;
sc.length = 0;
@@ -1691,7 +1750,6 @@ int scount = 0;
}
sc.align = 4;
-
sc.concat = CONCAT_SIMPLE;
sc.read = 3;
sc.write = 3;
@@ -1700,8 +1758,9 @@ int scount = 0;
sc.mode = 3;
sc.spare = 0;
sc.segadd = 0;
- sc.spare1 = 0; /* If not zero, then it doesn't work */
+ sc.spare1 = 0; /* If not zero, then it doesn't work. */
sc.name = section_translate (name);
+
if (strlen (sc.name) == 1)
{
switch (sc.name[0])
@@ -1710,6 +1769,7 @@ int scount = 0;
case 'B':
sc.contents = CONTENTS_DATA;
break;
+
default:
sc.contents = CONTENTS_CODE;
}
@@ -1720,19 +1780,20 @@ int scount = 0;
}
#if 0
/* NEW */
- if (sc.length) {
+ if (sc.length)
+ {
#endif
- sysroff_swap_sc_out (file, &sc);
- scount++;
+ sysroff_swap_sc_out (file, &sc);
+ scount++;
#if 0
- }
+ }
#endif
}
-return scount;
+ return scount;
}
+/* Write out the ER records for a unit. */
-/* Write out the ER records for a unit. */
static void
wr_er (ptr, sfile, first)
struct coff_ofile *ptr;
@@ -1741,6 +1802,7 @@ wr_er (ptr, sfile, first)
{
int idx = 0;
struct coff_symbol *sym;
+
if (first)
{
for (sym = ptr->symbol_list_head; sym; sym = sym->next_in_ofile_list)
@@ -1748,6 +1810,7 @@ wr_er (ptr, sfile, first)
if (sym->visible->type == coff_vis_ext_ref)
{
struct IT_er er;
+
er.spare = 0;
er.type = ER_NOTSPEC;
er.name = sym->name;
@@ -1758,7 +1821,8 @@ wr_er (ptr, sfile, first)
}
}
-/* Write out the ED records for a unit. */
+/* Write out the ED records for a unit. */
+
static void
wr_ed (ptr, sfile, first)
struct coff_ofile *ptr;
@@ -1766,6 +1830,7 @@ wr_ed (ptr, sfile, first)
int first;
{
struct coff_symbol *s;
+
if (first)
{
for (s = ptr->symbol_list_head; s; s = s->next_in_ofile_list)
@@ -1777,6 +1842,7 @@ wr_ed (ptr, sfile, first)
ed.section = s->where->section->number;
ed.spare = 0;
+
if (s->where->section->data)
{
ed.type = ED_TYPE_DATA;
@@ -1790,6 +1856,7 @@ wr_ed (ptr, sfile, first)
ed.type = ED_TYPE_NOTSPEC;
ed.type = ED_TYPE_DATA;
}
+
ed.address = s->where->offset - s->where->section->address;
ed.name = s->name;
sysroff_swap_ed_out (file, &ed);
@@ -1804,6 +1871,7 @@ wr_unit_info (ptr)
{
struct coff_sfile *sfile;
int first = 1;
+
for (sfile = ptr->source_head;
sfile;
sfile = sfile->next)
@@ -1811,6 +1879,7 @@ wr_unit_info (ptr)
long p1;
long p2;
int nsecs;
+
p1 = ftell (file);
wr_un (ptr, sfile, first, 0);
nsecs = wr_sc (ptr, sfile);
@@ -1844,7 +1913,7 @@ align (x)
}
/* Find all the common variables and turn them into
- ordinary defs - dunno why, but thats what hitachi does with 'em */
+ ordinary defs - dunno why, but thats what hitachi does with 'em. */
static void
prescan (tree)
@@ -1852,8 +1921,10 @@ prescan (tree)
{
struct coff_symbol *s;
struct coff_section *common_section;
- /* Find the common section - always section 3 */
+
+ /* Find the common section - always section 3. */
common_section = tree->sections + 3;
+
for (s = tree->symbol_list_head;
s;
s = s->next_in_ofile_list)
@@ -1878,20 +1949,20 @@ show_usage (file, status)
FILE *file;
int status;
{
- fprintf (file, _("Usage: %s [-dhVq] in-file [out-file]\n"), program_name);
+ fprintf (file, _("Usage: %s [option(s)] in-file [out-file]\n"), program_name);
+ fprintf (file, _("Convert a COFF object file into a SYSROFF object file\n"));
+ fprintf (file, _(" The options are:\n\
+ -q --quick (Obsolete - ignoerd)\n\
+ -n --noprescan Do not perform a scan to convert commons into defs\n\
+ -d --debug Display information about what is being done\n\
+ -h --help Display this information\n\
+ -v --version Print the program's version number\n"));
+
+ if (status == 0)
+ fprintf (file, _("Report bugs to %s\n"), REPORT_BUGS_TO);
exit (status);
}
-static void
-show_help ()
-{
- printf (_("%s: Convert a COFF object file into a SYSROFF object file\n"),
- program_name);
- show_usage (stdout, 0);
-}
-
-
-
int
main (ac, av)
int ac;
@@ -1914,13 +1985,16 @@ main (ac, av)
#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
setlocale (LC_MESSAGES, "");
#endif
+#if defined (HAVE_SETLOCALE)
+ setlocale (LC_CTYPE, "");
+#endif
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
program_name = av[0];
xmalloc_set_program_name (program_name);
- while ((opt = getopt_long (ac, av, "dhVqn", long_options,
+ while ((opt = getopt_long (ac, av, "dHhVvqn", long_options,
(int *) NULL))
!= EOF)
{
@@ -1935,11 +2009,13 @@ main (ac, av)
case 'd':
debug = 1;
break;
+ case 'H':
case 'h':
- show_help ();
+ show_usage (stdout, 0);
/*NOTREACHED */
+ case 'v':
case 'V':
- printf (_("GNU %s version %s\n"), program_name, PROGRAM_VERSION);
+ print_version ("srconv");
exit (0);
/*NOTREACHED */
case 0:
@@ -1982,8 +2058,10 @@ main (ac, av)
it doesn't end in .o, then stick a .obj on anyway */
int len = strlen (input_file);
+
output_file = xmalloc (len + 5);
strcpy (output_file, input_file);
+
if (len > 3
&& output_file[len - 2] == '.'
&& output_file[len - 1] == 'o')
@@ -2006,6 +2084,7 @@ main (ac, av)
if (!bfd_check_format_matches (abfd, bfd_object, &matching))
{
bfd_nonfatal (input_file);
+
if (bfd_get_error () == bfd_error_file_ambiguously_recognized)
{
list_matching_formats (matching);
@@ -2017,15 +2096,16 @@ main (ac, av)
file = fopen (output_file, FOPEN_WB);
if (!file)
- {
- fatal (_("unable to open output file %s"), output_file);
- }
+ fatal (_("unable to open output file %s"), output_file);
if (debug)
printf ("ids %d %d\n", base1, base2);
+
tree = coff_grok (abfd);
+
if (!noprescan)
prescan (tree);
+
wr_module (tree);
return 0;
}
diff --git a/contrib/binutils/binutils/stabs.c b/contrib/binutils/binutils/stabs.c
index daea301..bbc0632 100644
--- a/contrib/binutils/binutils/stabs.c
+++ b/contrib/binutils/binutils/stabs.c
@@ -26,11 +26,11 @@
trying to identify the correct address for anything. */
#include <stdio.h>
-#include <ctype.h>
#include "bfd.h"
#include "bucomm.h"
#include "libiberty.h"
+#include "safe-ctype.h"
#include "demangle.h"
#include "debug.h"
#include "budbg.h"
@@ -307,11 +307,11 @@ parse_number (pp, poverflow)
int d;
d = *p++;
- if (isdigit ((unsigned char) d))
+ if (ISDIGIT (d))
d -= '0';
- else if (isupper ((unsigned char) d))
+ else if (ISUPPER (d))
d -= 'A';
- else if (islower ((unsigned char) d))
+ else if (ISLOWER (d))
d -= 'a';
else
break;
@@ -781,7 +781,7 @@ parse_stab_string (dhandle, info, stabtype, desc, value, string)
}
++p;
- if (isdigit ((unsigned char) *p) || *p == '(' || *p == '-')
+ if (ISDIGIT (*p) || *p == '(' || *p == '-')
type = 'l';
else
type = *p++;
@@ -1185,7 +1185,7 @@ parse_stab_type (dhandle, info, typename, pp, slotp)
/* 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". */
- if (! isdigit ((unsigned char) **pp) && **pp != '(' && **pp != '-')
+ if (! ISDIGIT (**pp) && **pp != '(' && **pp != '-')
{
/* 'typenums=' not present, type is anonymous. Read and return
the definition, but don't put it in the type vector. */
@@ -1228,7 +1228,7 @@ parse_stab_type (dhandle, info, typename, pp, slotp)
const char *p = *pp + 1;
const char *attr;
- if (isdigit ((unsigned char) *p) || *p == '(' || *p == '-')
+ if (ISDIGIT (*p) || *p == '(' || *p == '-')
{
/* Member type. */
break;
@@ -2913,7 +2913,7 @@ parse_stab_argtypes (dhandle, info, class_type, fieldname, tagname,
/* Constructors are sometimes handled specially. */
is_full_physname_constructor = ((argtypes[0] == '_'
&& argtypes[1] == '_'
- && (isdigit ((unsigned char) argtypes[2])
+ && (ISDIGIT (argtypes[2])
|| argtypes[2] == 'Q'
|| argtypes[2] == 't'))
|| strncmp (argtypes, "__ct", 4) == 0);
@@ -3149,7 +3149,7 @@ parse_stab_array_type (dhandle, info, pp, stringp)
adjustable = false;
- if (! isdigit ((unsigned char) **pp) && **pp != '-')
+ if (! ISDIGIT (**pp) && **pp != '-')
{
++*pp;
adjustable = true;
@@ -3163,7 +3163,7 @@ parse_stab_array_type (dhandle, info, pp, stringp)
}
++*pp;
- if (! isdigit ((unsigned char) **pp) && **pp != '-')
+ if (! ISDIGIT (**pp) && **pp != '-')
{
++*pp;
adjustable = true;
@@ -3772,7 +3772,7 @@ stab_demangle_count (pp)
unsigned int count;
count = 0;
- while (isdigit ((unsigned char) **pp))
+ while (ISDIGIT (**pp))
{
count *= 10;
count += **pp - '0';
@@ -3789,12 +3789,12 @@ stab_demangle_get_count (pp, pi)
const char **pp;
unsigned int *pi;
{
- if (! isdigit ((unsigned char) **pp))
+ if (! ISDIGIT (**pp))
return false;
*pi = **pp - '0';
++*pp;
- if (isdigit ((unsigned char) **pp))
+ if (ISDIGIT (**pp))
{
unsigned int count;
const char *p;
@@ -3807,7 +3807,7 @@ stab_demangle_get_count (pp, pi)
count += *p - '0';
++p;
}
- while (isdigit ((unsigned char) *p));
+ while (ISDIGIT (*p));
if (*p == '_')
{
*pp = p + 1;
@@ -3902,7 +3902,7 @@ stab_demangle_prefix (minfo, pp)
scan += i - 2;
if (scan == *pp
- && (isdigit ((unsigned char) scan[2])
+ && (ISDIGIT (scan[2])
|| scan[2] == 'Q'
|| scan[2] == 't'))
{
@@ -3911,7 +3911,7 @@ stab_demangle_prefix (minfo, pp)
return true;
}
else if (scan == *pp
- && ! isdigit ((unsigned char) scan[2])
+ && ! ISDIGIT (scan[2])
&& scan[2] != 't')
{
/* Look for the `__' that separates the prefix from the
@@ -4126,13 +4126,13 @@ stab_demangle_qualified (minfo, pp, ptype)
preceded by an underscore (to distinguish it from the <= 9
case) and followed by an underscore. */
p = *pp + 2;
- if (! isdigit ((unsigned char) *p) || *p == '0')
+ if (! ISDIGIT (*p) || *p == '0')
{
stab_bad_demangle (orig);
return false;
}
qualifiers = atoi (p);
- while (isdigit ((unsigned char) *p))
+ while (ISDIGIT (*p))
++p;
if (*p != '_')
{
@@ -4397,7 +4397,7 @@ stab_demangle_template (minfo, pp, pname)
{
if (**pp == 'm')
++*pp;
- while (isdigit ((unsigned char) **pp))
+ while (ISDIGIT (**pp))
++*pp;
}
else if (charp)
@@ -4428,18 +4428,18 @@ stab_demangle_template (minfo, pp, pname)
{
if (**pp == 'm')
++*pp;
- while (isdigit ((unsigned char) **pp))
+ while (ISDIGIT (**pp))
++*pp;
if (**pp == '.')
{
++*pp;
- while (isdigit ((unsigned char) **pp))
+ while (ISDIGIT (**pp))
++*pp;
}
if (**pp == 'e')
{
++*pp;
- while (isdigit ((unsigned char) **pp))
+ while (ISDIGIT (**pp))
++*pp;
}
}
@@ -4461,7 +4461,7 @@ stab_demangle_template (minfo, pp, pname)
regular demangling routine. */
if (pname != NULL)
{
- char *s1, *s2, *s3, *s4;
+ char *s1, *s2, *s3, *s4 = NULL;
char *from, *to;
s1 = savestring (orig, *pp - orig);
@@ -4692,7 +4692,7 @@ stab_demangle_type (minfo, pp, ptype)
high = 0;
while (**pp != '\0' && **pp != '_')
{
- if (! isdigit ((unsigned char) **pp))
+ if (! ISDIGIT (**pp))
{
stab_bad_demangle (orig);
return false;
@@ -4796,7 +4796,7 @@ stab_demangle_type (minfo, pp, ptype)
varargs = false;
++*pp;
- if (isdigit ((unsigned char) **pp))
+ if (ISDIGIT (**pp))
{
n = stab_demangle_count (pp);
if (strlen (*pp) < n)
@@ -5106,7 +5106,7 @@ stab_demangle_fund_type (minfo, pp, ptype)
case 'G':
++*pp;
- if (! isdigit ((unsigned char) **pp))
+ if (! ISDIGIT (**pp))
{
stab_bad_demangle (orig);
return false;
diff --git a/contrib/binutils/binutils/sysdump.c b/contrib/binutils/binutils/sysdump.c
index 65d2ca6..8ac0f27 100644
--- a/contrib/binutils/binutils/sysdump.c
+++ b/contrib/binutils/binutils/sysdump.c
@@ -1,5 +1,6 @@
/* Sysroff object format dumper.
- Copyright 1994, 1995, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1998, 1999, 2000, 2001, 2002
+ Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -22,25 +23,46 @@
/* Written by Steve Chamberlain <sac@cygnus.com>.
This program reads a SYSROFF object file and prints it in an
- almost human readable form to stdout. */
+ almost human readable form to stdout. */
#include "bfd.h"
#include "bucomm.h"
+#include "safe-ctype.h"
#include <stdio.h>
-#include <ctype.h>
#include <libiberty.h>
#include <getopt.h>
#include "sysroff.h"
-#define PROGRAM_VERSION "1.0"
-
static int dump = 1;
static int segmented_p;
static int code;
static int addrsize = 4;
static FILE *file;
+static void dh PARAMS ((unsigned char *, int));
+static void itheader PARAMS ((char *, int));
+static void p PARAMS ((void));
+static void tabout PARAMS ((void));
+static void pbarray PARAMS ((barray *));
+static int getone PARAMS ((int));
+static int opt PARAMS ((int));
+static void must PARAMS ((int));
+static void tab PARAMS ((int, char *));
+static void dump_symbol_info PARAMS ((void));
+static void derived_type PARAMS ((void));
+static void module PARAMS ((void));
+static void show_usage PARAMS ((FILE *, int));
+
+extern char *getCHARS PARAMS ((unsigned char *, int *, int, int));
+extern int fillup PARAMS ((char *));
+extern barray getBARRAY PARAMS ((unsigned char *, int *, int, int));
+extern int getINT PARAMS ((unsigned char *, int *, int, int));
+extern int getBITS PARAMS ((char *, int *, int, int));
+extern void sysroff_swap_tr_in PARAMS ((void));
+extern void sysroff_print_tr_out PARAMS ((void));
+extern int main PARAMS ((int, char **));
+
char *
getCHARS (ptr, idx, size, max)
unsigned char *ptr;
@@ -51,14 +73,13 @@ getCHARS (ptr, idx, size, max)
int oc = *idx / 8;
char *r;
int b = size;
+
if (b >= max)
- {
- return "*undefined*";
- }
+ return "*undefined*";
if (b == 0)
{
- /* Got to work out the length of the string from self */
+ /* Got to work out the length of the string from self. */
b = ptr[oc++];
(*idx) += 8;
}
@@ -67,6 +88,7 @@ getCHARS (ptr, idx, size, max)
r = xcalloc (b + 1, 1);
memcpy (r, ptr + oc, b);
r[b] = 0;
+
return r;
}
@@ -94,10 +116,12 @@ dh (ptr, size)
for (j = 0; j < span && j + i < size; j++)
{
int c = ptr[i + j];
+
if (c < 32 || c > 127)
c = '.';
printf ("%c", c);
}
+
printf ("\n");
}
}
@@ -109,18 +133,17 @@ fillup (ptr)
int size;
int sum;
int i;
+
size = getc (file) - 2;
fread (ptr, 1, size, file);
sum = code + size + 2;
+
for (i = 0; i < size; i++)
- {
- sum += ptr[i];
- }
+ sum += ptr[i];
if ((sum & 0xff) != 0xff)
- {
- printf ("SUM IS %x\n", sum);
- }
+ printf ("SUM IS %x\n", sum);
+
if (dump)
dh (ptr, size);
@@ -138,12 +161,13 @@ getBARRAY (ptr, idx, dsize, max)
int i;
int byte = *idx / 8;
int size = ptr[byte++];
+
res.len = size;
res.data = (unsigned char *) xmalloc (size);
+
for (i = 0; i < size; i++)
- {
- res.data[i] = ptr[byte++];
- }
+ res.data[i] = ptr[byte++];
+
return res;
}
@@ -158,13 +182,14 @@ getINT (ptr, idx, size, max)
int byte = *idx / 8;
if (byte >= max)
- {
- return 0;
- }
+ return 0;
+
if (size == -2)
size = addrsize;
+
if (size == -1)
size = 0;
+
switch (size)
{
case 0:
@@ -181,6 +206,7 @@ getINT (ptr, idx, size, max)
default:
abort ();
}
+
*idx += size * 8;
return n;
}
@@ -211,14 +237,15 @@ itheader (name, code)
}
static int indent;
+
static void
p ()
{
int i;
+
for (i = 0; i < indent; i++)
- {
- printf ("| ");
- }
+ printf ("| ");
+
printf ("> ");
}
@@ -233,11 +260,13 @@ pbarray (y)
barray *y;
{
int x;
+
printf ("%d (", y->len);
+
for (x = 0; x < y->len; x++)
- {
- printf ("(%02x %c)", y->data[x], isprint (y->data[x]) ? y->data[x] : '.');
- }
+ printf ("(%02x %c)", y->data[x],
+ ISPRINT (y->data[x]) ? y->data[x] : '.');
+
printf (")\n");
}
@@ -246,27 +275,26 @@ pbarray (y)
#include "sysroff.c"
-/*
- * FIXME: sysinfo, which generates sysroff.[ch] from sysroff.info, can't
- * hack the special case of the tr block, which has no contents. So we
- * implement our own functions for reading in and printing out the tr
- * block.
- */
+/* FIXME: sysinfo, which generates sysroff.[ch] from sysroff.info, can't
+ hack the special case of the tr block, which has no contents. So we
+ implement our own functions for reading in and printing out the tr
+ block. */
#define IT_tr_CODE 0x7f
+
void
sysroff_swap_tr_in()
{
- char raw[255];
+ char raw[255];
- memset(raw, 0, 255);
- fillup(raw);
+ memset (raw, 0, 255);
+ fillup (raw);
}
void
sysroff_print_tr_out()
{
- itheader("tr", IT_tr_CODE);
+ itheader ("tr", IT_tr_CODE);
}
static int
@@ -274,6 +302,7 @@ getone (type)
int type;
{
int c = getc (file);
+
code = c;
if ((c & 0x7f) != type)
@@ -291,6 +320,7 @@ getone (type)
sysroff_print_cs_out (&dummy);
}
break;
+
case IT_dln_CODE:
{
struct IT_dln dummy;
@@ -298,6 +328,7 @@ getone (type)
sysroff_print_dln_out (&dummy);
}
break;
+
case IT_hd_CODE:
{
struct IT_hd dummy;
@@ -306,6 +337,7 @@ getone (type)
sysroff_print_hd_out (&dummy);
}
break;
+
case IT_dar_CODE:
{
struct IT_dar dummy;
@@ -313,6 +345,7 @@ getone (type)
sysroff_print_dar_out (&dummy);
}
break;
+
case IT_dsy_CODE:
{
struct IT_dsy dummy;
@@ -320,6 +353,7 @@ getone (type)
sysroff_print_dsy_out (&dummy);
}
break;
+
case IT_dfp_CODE:
{
struct IT_dfp dummy;
@@ -327,6 +361,7 @@ getone (type)
sysroff_print_dfp_out (&dummy);
}
break;
+
case IT_dso_CODE:
{
struct IT_dso dummy;
@@ -334,6 +369,7 @@ getone (type)
sysroff_print_dso_out (&dummy);
}
break;
+
case IT_dpt_CODE:
{
struct IT_dpt dummy;
@@ -341,6 +377,7 @@ getone (type)
sysroff_print_dpt_out (&dummy);
}
break;
+
case IT_den_CODE:
{
struct IT_den dummy;
@@ -348,6 +385,7 @@ getone (type)
sysroff_print_den_out (&dummy);
}
break;
+
case IT_dbt_CODE:
{
struct IT_dbt dummy;
@@ -355,6 +393,7 @@ getone (type)
sysroff_print_dbt_out (&dummy);
}
break;
+
case IT_dty_CODE:
{
struct IT_dty dummy;
@@ -362,6 +401,7 @@ getone (type)
sysroff_print_dty_out (&dummy);
}
break;
+
case IT_un_CODE:
{
struct IT_un dummy;
@@ -369,6 +409,7 @@ getone (type)
sysroff_print_un_out (&dummy);
}
break;
+
case IT_sc_CODE:
{
struct IT_sc dummy;
@@ -376,6 +417,7 @@ getone (type)
sysroff_print_sc_out (&dummy);
}
break;
+
case IT_er_CODE:
{
struct IT_er dummy;
@@ -383,6 +425,7 @@ getone (type)
sysroff_print_er_out (&dummy);
}
break;
+
case IT_ed_CODE:
{
struct IT_ed dummy;
@@ -390,6 +433,7 @@ getone (type)
sysroff_print_ed_out (&dummy);
}
break;
+
case IT_sh_CODE:
{
struct IT_sh dummy;
@@ -397,6 +441,7 @@ getone (type)
sysroff_print_sh_out (&dummy);
}
break;
+
case IT_ob_CODE:
{
struct IT_ob dummy;
@@ -404,6 +449,7 @@ getone (type)
sysroff_print_ob_out (&dummy);
}
break;
+
case IT_rl_CODE:
{
struct IT_rl dummy;
@@ -411,6 +457,7 @@ getone (type)
sysroff_print_rl_out (&dummy);
}
break;
+
case IT_du_CODE:
{
struct IT_du dummy;
@@ -419,6 +466,7 @@ getone (type)
sysroff_print_du_out (&dummy);
}
break;
+
case IT_dus_CODE:
{
struct IT_dus dummy;
@@ -426,6 +474,7 @@ getone (type)
sysroff_print_dus_out (&dummy);
}
break;
+
case IT_dul_CODE:
{
struct IT_dul dummy;
@@ -433,6 +482,7 @@ getone (type)
sysroff_print_dul_out (&dummy);
}
break;
+
case IT_dss_CODE:
{
struct IT_dss dummy;
@@ -440,6 +490,7 @@ getone (type)
sysroff_print_dss_out (&dummy);
}
break;
+
case IT_hs_CODE:
{
struct IT_hs dummy;
@@ -447,6 +498,7 @@ getone (type)
sysroff_print_hs_out (&dummy);
}
break;
+
case IT_dps_CODE:
{
struct IT_dps dummy;
@@ -454,24 +506,27 @@ getone (type)
sysroff_print_dps_out (&dummy);
}
break;
+
case IT_tr_CODE:
- {
- sysroff_swap_tr_in ();
- sysroff_print_tr_out ();
- }
+ sysroff_swap_tr_in ();
+ sysroff_print_tr_out ();
break;
+
case IT_dds_CODE:
{
struct IT_dds dummy;
+
sysroff_swap_dds_in (&dummy);
sysroff_print_dds_out (&dummy);
}
break;
+
default:
printf ("GOT A %x\n", c);
return 0;
break;
}
+
return 1;
}
@@ -529,9 +584,7 @@ must (x)
int x;
{
if (!getone (x))
- {
- printf ("WANTED %x!!\n", x);
- }
+ printf ("WANTED %x!!\n", x);
}
static void
@@ -540,6 +593,7 @@ tab (i, s)
char *s;
{
indent += i;
+
if (s)
{
p ();
@@ -548,12 +602,11 @@ tab (i, s)
}
}
-static void derived_type ();
-
static void
dump_symbol_info ()
{
tab (1, "SYMBOL INFO");
+
while (opt (IT_dsy_CODE))
{
if (opt (IT_dty_CODE))
@@ -563,6 +616,7 @@ dump_symbol_info ()
must (IT_dty_CODE);
}
}
+
tab (-1, "");
}
@@ -570,6 +624,7 @@ static void
derived_type ()
{
tab (1, "DERIVED TYPE");
+
while (1)
{
if (opt (IT_dpp_CODE))
@@ -709,18 +764,17 @@ show_usage (file, status)
FILE *file;
int status;
{
- fprintf (file, _("Usage: %s [-hV] in-file\n"), program_name);
+ fprintf (file, _("Usage: %s [option(s)] in-file\n"), program_name);
+ fprintf (file, _("Print a human readable interpretation of a SYSROFF object file\n"));
+ fprintf (file, _(" The options are:\n\
+ -h --help Display this information\n\
+ -v --version Print the program's version number\n"));
+
+ if (status == 0)
+ fprintf (file, _("Report bugs to %s\n"), REPORT_BUGS_TO);
exit (status);
}
-static void
-show_help ()
-{
- printf (_("%s: Print a human readable interpretation of a SYSROFF object file\n"),
- program_name);
- show_usage (stdout, 0);
-}
-
int
main (ac, av)
int ac;
@@ -738,21 +792,26 @@ main (ac, av)
#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
setlocale (LC_MESSAGES, "");
#endif
+#if defined (HAVE_SETLOCALE)
+ setlocale (LC_CTYPE, "");
+#endif
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
program_name = av[0];
xmalloc_set_program_name (program_name);
- while ((opt = getopt_long (ac, av, "hV", long_options, (int *) NULL)) != EOF)
+ while ((opt = getopt_long (ac, av, "HhVv", long_options, (int *) NULL)) != EOF)
{
switch (opt)
{
+ case 'H':
case 'h':
- show_help ();
+ show_usage (stdout, 0);
/*NOTREACHED*/
+ case 'v':
case 'V':
- printf (_("GNU %s version %s\n"), program_name, PROGRAM_VERSION);
+ print_version ("sysdump");
exit (0);
/*NOTREACHED*/
case 0:
@@ -766,20 +825,15 @@ main (ac, av)
/* The input and output files may be named on the command line. */
if (optind < ac)
- {
- input_file = av[optind];
- }
+ input_file = av[optind];
if (!input_file)
- {
- fatal (_("no input file specified"));
- }
+ fatal (_("no input file specified"));
file = fopen (input_file, FOPEN_RB);
+
if (!file)
- {
- fatal (_("cannot open input file %s"), input_file);
- }
+ fatal (_("cannot open input file %s"), input_file);
module ();
return 0;
diff --git a/contrib/binutils/binutils/sysinfo.y b/contrib/binutils/binutils/sysinfo.y
index fef16cb..4aa4607 100644
--- a/contrib/binutils/binutils/sysinfo.y
+++ b/contrib/binutils/binutils/sysinfo.y
@@ -72,6 +72,7 @@ top: {
printf("#ifdef SYSROFF_PRINT\n");
printf("#include <stdio.h>\n");
printf("#include <stdlib.h>\n");
+ printf("#include <ansidecl.h>\n");
break;
}
}
@@ -103,6 +104,13 @@ it:
{
case 'd':
printf("\n\n\n#define IT_%s_CODE 0x%x\n", it,code);
+ printf("struct IT_%s;\n", it);
+ printf("extern void sysroff_swap_%s_in PARAMS ((struct IT_%s *));\n",
+ $2, it);
+ printf("extern void sysroff_swap_%s_out PARAMS ((FILE *, struct IT_%s *));\n",
+ $2, it);
+ printf("extern void sysroff_print_%s_out PARAMS ((struct IT_%s *));\n",
+ $2, it);
printf("struct IT_%s { \n", it);
break;
case 'i':
diff --git a/contrib/binutils/binutils/unwind-ia64.c b/contrib/binutils/binutils/unwind-ia64.c
index 3b05c77..d3f4b61 100644
--- a/contrib/binutils/binutils/unwind-ia64.c
+++ b/contrib/binutils/binutils/unwind-ia64.c
@@ -33,10 +33,16 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
static bfd_vma unw_rlen = 0;
+static void unw_print_brmask PARAMS ((char *, unsigned int));
+static void unw_print_grmask PARAMS ((char *, unsigned int));
+static void unw_print_frmask PARAMS ((char *, unsigned int));
+static void unw_print_abreg PARAMS ((char *, unsigned int));
+static void unw_print_xyreg PARAMS ((char *, unsigned int, unsigned int));
+
static void
unw_print_brmask (cp, mask)
char * cp;
- unsigned char mask;
+ unsigned int mask;
{
char *sep = "";
int i;
@@ -56,7 +62,7 @@ unw_print_brmask (cp, mask)
static void
unw_print_grmask (cp, mask)
char * cp;
- unsigned char mask;
+ unsigned int mask;
{
char *sep = "";
int i;
@@ -76,7 +82,7 @@ unw_print_grmask (cp, mask)
static void
unw_print_frmask (cp, mask)
char * cp;
- unsigned long mask;
+ unsigned int mask;
{
char *sep = "";
int i;
@@ -96,7 +102,7 @@ unw_print_frmask (cp, mask)
static void
unw_print_abreg (cp, abreg)
char * cp;
- unsigned char abreg;
+ unsigned int abreg;
{
static const char *special_reg[16] =
{
@@ -128,8 +134,8 @@ unw_print_abreg (cp, abreg)
static void
unw_print_xyreg (cp, x, ytreg)
char * cp;
- unsigned char x;
- unsigned char ytreg;
+ unsigned int x;
+ unsigned int ytreg;
{
switch ((x << 1) | ((ytreg >> 7) & 1))
{
@@ -522,33 +528,33 @@ typedef bfd_vma unw_word;
static unw_word unw_decode_uleb128 PARAMS ((const unsigned char **));
static const unsigned char *unw_decode_x1 PARAMS ((const unsigned char *,
- unsigned char, void *));
+ unsigned int, void *));
static const unsigned char *unw_decode_x2 PARAMS ((const unsigned char *,
- unsigned char, void *));
+ unsigned int, void *));
static const unsigned char *unw_decode_x3 PARAMS ((const unsigned char *,
- unsigned char, void *));
+ unsigned int, void *));
static const unsigned char *unw_decode_x4 PARAMS ((const unsigned char *,
- unsigned char, void *));
+ unsigned int, void *));
static const unsigned char *unw_decode_r1 PARAMS ((const unsigned char *,
- unsigned char, void *));
+ unsigned int, void *));
static const unsigned char *unw_decode_r2 PARAMS ((const unsigned char *,
- unsigned char, void *));
+ unsigned int, void *));
static const unsigned char *unw_decode_r3 PARAMS ((const unsigned char *,
- unsigned char, void *));
+ unsigned int, void *));
static const unsigned char *unw_decode_p1 PARAMS ((const unsigned char *,
- unsigned char, void *));
+ unsigned int, void *));
static const unsigned char *unw_decode_p2_p5 PARAMS ((const unsigned char *,
- unsigned char, void *));
+ unsigned int, void *));
static const unsigned char *unw_decode_p6 PARAMS ((const unsigned char *,
- unsigned char, void *));
+ unsigned int, void *));
static const unsigned char *unw_decode_p7_p10 PARAMS ((const unsigned char *,
- unsigned char, void *));
+ unsigned int, void *));
static const unsigned char *unw_decode_b1 PARAMS ((const unsigned char *,
- unsigned char, void *));
+ unsigned int, void *));
static const unsigned char *unw_decode_b2 PARAMS ((const unsigned char *,
- unsigned char, void *));
+ unsigned int, void *));
static const unsigned char *unw_decode_b3_x4 PARAMS ((const unsigned char *,
- unsigned char, void *));
+ unsigned int, void *));
static unw_word
unw_decode_uleb128 (dpp)
@@ -577,7 +583,7 @@ unw_decode_uleb128 (dpp)
static const unsigned char *
unw_decode_x1 (dp, code, arg)
const unsigned char * dp;
- unsigned char code;
+ unsigned int code ATTRIBUTE_UNUSED;
void * arg ATTRIBUTE_UNUSED;
{
unsigned char byte1, abreg;
@@ -597,7 +603,7 @@ unw_decode_x1 (dp, code, arg)
static const unsigned char *
unw_decode_x2 (dp, code, arg)
const unsigned char * dp;
- unsigned char code;
+ unsigned int code ATTRIBUTE_UNUSED;
void * arg ATTRIBUTE_UNUSED;
{
unsigned char byte1, byte2, abreg, x, ytreg;
@@ -619,7 +625,7 @@ unw_decode_x2 (dp, code, arg)
static const unsigned char *
unw_decode_x3 (dp, code, arg)
const unsigned char * dp;
- unsigned char code;
+ unsigned int code ATTRIBUTE_UNUSED;
void * arg ATTRIBUTE_UNUSED;
{
unsigned char byte1, byte2, abreg, qp;
@@ -643,7 +649,7 @@ unw_decode_x3 (dp, code, arg)
static const unsigned char *
unw_decode_x4 (dp, code, arg)
const unsigned char * dp;
- unsigned char code;
+ unsigned int code ATTRIBUTE_UNUSED;
void * arg ATTRIBUTE_UNUSED;
{
unsigned char byte1, byte2, byte3, qp, abreg, x, ytreg;
@@ -669,7 +675,7 @@ unw_decode_x4 (dp, code, arg)
static const unsigned char *
unw_decode_r1 (dp, code, arg)
const unsigned char *dp;
- unsigned char code;
+ unsigned int code;
void *arg;
{
int body = (code & 0x20) != 0;
@@ -683,7 +689,7 @@ unw_decode_r1 (dp, code, arg)
static const unsigned char *
unw_decode_r2 (dp, code, arg)
const unsigned char *dp;
- unsigned char code;
+ unsigned int code;
void *arg;
{
unsigned char byte1, mask, grsave;
@@ -701,7 +707,7 @@ unw_decode_r2 (dp, code, arg)
static const unsigned char *
unw_decode_r3 (dp, code, arg)
const unsigned char *dp;
- unsigned char code;
+ unsigned int code;
void *arg;
{
unw_word rlen;
@@ -714,7 +720,7 @@ unw_decode_r3 (dp, code, arg)
static const unsigned char *
unw_decode_p1 (dp, code, arg)
const unsigned char * dp;
- unsigned char code;
+ unsigned int code;
void * arg ATTRIBUTE_UNUSED;
{
unsigned char brmask = (code & 0x1f);
@@ -726,7 +732,7 @@ unw_decode_p1 (dp, code, arg)
static const unsigned char *
unw_decode_p2_p5 (dp, code, arg)
const unsigned char * dp;
- unsigned char code;
+ unsigned int code;
void * arg ATTRIBUTE_UNUSED;
{
if ((code & 0x10) == 0)
@@ -807,7 +813,7 @@ unw_decode_p2_p5 (dp, code, arg)
static const unsigned char *
unw_decode_p6 (dp, code, arg)
const unsigned char * dp;
- unsigned char code;
+ unsigned int code;
void * arg ATTRIBUTE_UNUSED;
{
int gregs = (code & 0x10) != 0;
@@ -823,7 +829,7 @@ unw_decode_p6 (dp, code, arg)
static const unsigned char *
unw_decode_p7_p10 (dp, code, arg)
const unsigned char *dp;
- unsigned char code;
+ unsigned int code;
void *arg;
{
unsigned char r, byte1, byte2;
@@ -999,7 +1005,7 @@ unw_decode_p7_p10 (dp, code, arg)
static const unsigned char *
unw_decode_b1 (dp, code, arg)
const unsigned char * dp;
- unsigned char code;
+ unsigned int code;
void * arg ATTRIBUTE_UNUSED;
{
unw_word label = (code & 0x1f);
@@ -1014,7 +1020,7 @@ unw_decode_b1 (dp, code, arg)
static const unsigned char *
unw_decode_b2 (dp, code, arg)
const unsigned char * dp;
- unsigned char code;
+ unsigned int code;
void * arg ATTRIBUTE_UNUSED;
{
unw_word t;
@@ -1027,7 +1033,7 @@ unw_decode_b2 (dp, code, arg)
static const unsigned char *
unw_decode_b3_x4 (dp, code, arg)
const unsigned char *dp;
- unsigned char code;
+ unsigned int code;
void *arg;
{
unw_word t, ecount, label;
diff --git a/contrib/binutils/binutils/version.c b/contrib/binutils/binutils/version.c
index 5a4aefe..edaa065 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, 1997, 1998, 1999, 2000, 2001
+ Copyright 1991, 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -22,11 +22,6 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfd.h"
#include "bucomm.h"
-/* This is the version numbers for the binutils. They all change in
- lockstep -- it's easier that way. */
-
-const char *program_version = VERSION;
-
/* Print the version number and copyright information, and exit. This
implements the --version option for the various programs. */
@@ -36,8 +31,8 @@ print_version (name)
{
/* This output is intended to follow the GNU standards document. */
/* xgettext:c-format */
- printf ("GNU %s %s\n", name, program_version);
- printf (_("Copyright 1997, 98, 99, 2000, 2001 Free Software Foundation, Inc.\n"));
+ printf ("GNU %s %s\n", name, BFD_VERSION_STRING);
+ printf (_("Copyright 2002 Free Software Foundation, Inc.\n"));
printf (_("\
This program is free software; you may redistribute it under the terms of\n\
the GNU General Public License. This program has absolutely no warranty.\n"));
diff --git a/contrib/binutils/binutils/wrstabs.c b/contrib/binutils/binutils/wrstabs.c
index 0b29511..4f10e0d 100644
--- a/contrib/binutils/binutils/wrstabs.c
+++ b/contrib/binutils/binutils/wrstabs.c
@@ -1,5 +1,5 @@
/* wrstabs.c -- Output stabs debugging information
- Copyright 1996, 1997, 1998, 2000 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
Written by Ian Lance Taylor <ian@cygnus.com>.
This file is part of GNU Binutils.
@@ -23,12 +23,12 @@
information. */
#include <stdio.h>
-#include <ctype.h>
#include <assert.h>
#include "bfd.h"
#include "bucomm.h"
#include "libiberty.h"
+#include "safe-ctype.h"
#include "debug.h"
#include "budbg.h"
@@ -2172,7 +2172,7 @@ stab_variable (p, name, kind, val)
kindstr = "";
/* Make sure that this is a type reference or definition. */
- if (! isdigit ((unsigned char) *s))
+ if (! ISDIGIT (*s))
{
char *n;
long index;
diff --git a/contrib/binutils/config.guess b/contrib/binutils/config.guess
index 71de137..aa6ea3f 100755
--- a/contrib/binutils/config.guess
+++ b/contrib/binutils/config.guess
@@ -1,9 +1,9 @@
#! /bin/sh
# Attempt to guess a canonical system name.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-# Free Software Foundation, Inc.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002 Free Software Foundation, Inc.
-timestamp='2001-03-16'
+timestamp='2002-01-10'
# 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
@@ -24,8 +24,9 @@ timestamp='2001-03-16'
# 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>.
+# Originally written by Per Bothner <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
#
# This script attempts to guess a canonical system name similar to
# config.sub. If it succeeds, it prints the system name on stdout, and
@@ -52,7 +53,7 @@ version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
-Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 99, 2000
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
@@ -95,25 +96,25 @@ trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
# use `HOST_CC' if defined, but it is deprecated.
-case $CC_FOR_BUILD,$HOST_CC,$CC in
- ,,) echo "int dummy(){}" > $dummy.c
+set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int dummy(){}" > $dummy.c ;
for c in cc gcc c89 ; do
- ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1
+ ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
if test $? = 0 ; then
- CC_FOR_BUILD="$c"; break
- fi
- done
- rm -f $dummy.c $dummy.o $dummy.rel
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ rm -f $dummy.c $dummy.o $dummy.rel ;
if test x"$CC_FOR_BUILD" = x ; then
- CC_FOR_BUILD=no_compiler_found
+ CC_FOR_BUILD=no_compiler_found ;
fi
;;
,,*) CC_FOR_BUILD=$CC ;;
,*,*) CC_FOR_BUILD=$HOST_CC ;;
-esac
+esac'
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi@noc.rutgers.edu 8/24/94.)
+# (ghazi@noc.rutgers.edu 1994-08-24)
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
PATH=$PATH:/.attbin ; export PATH
fi
@@ -127,29 +128,29 @@ UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
*:NetBSD:*:*)
- # Netbsd (nbsd) targets should (where applicable) match one or
+ # 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-unknown ;;
- 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 ;;
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ UNAME_MACHINE_ARCH=`(uname -p) 2>/dev/null` || \
+ UNAME_MACHINE_ARCH=unknown
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
esac
# The Operating System including object format, if it has switched
# to ELF recently, or will in the future.
- case "${UNAME_MACHINE}" in
- i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep __ELF__ >/dev/null
then
@@ -171,6 +172,45 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
exit 0 ;;
+ amiga:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ arc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ hp300:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mac68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ macppc:OpenBSD:*:*)
+ echo powerpc-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme88k:OpenBSD:*:*)
+ echo m88k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvmeppc:OpenBSD:*:*)
+ echo powerpc-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ pmax:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sgi:OpenBSD:*:*)
+ echo mipseb-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sun3:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ wgrisc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ *:OpenBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
alpha:OSF1:*:*)
if test $UNAME_RELEASE = "V4.0"; then
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
@@ -204,6 +244,7 @@ main:
jsr \$26,exit
.end main
EOF
+ eval $set_cc_for_build
$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
if test "$?" = 0 ; then
case `./$dummy` in
@@ -225,6 +266,9 @@ EOF
2-307)
UNAME_MACHINE="alphaev67"
;;
+ 2-1307)
+ UNAME_MACHINE="alphaev68"
+ ;;
esac
fi
rm -f $dummy.s $dummy
@@ -242,29 +286,11 @@ EOF
Amiga*:UNIX_System_V:4.0:*)
echo m68k-unknown-sysv4
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 ;;
- arc:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- hkmips:OpenBSD:*:*)
- echo mips-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- pmax:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- sgi:OpenBSD:*:*)
- echo mips-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- wgrisc:OpenBSD:*:*)
- echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
exit 0 ;;
*:OS/390:*:*)
echo i370-ibm-openedition
@@ -328,9 +354,6 @@ EOF
aushp:SunOS:*:*)
echo sparc-auspex-sunos${UNAME_RELEASE}
exit 0 ;;
- atari*:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
# 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
@@ -357,18 +380,6 @@ EOF
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-unknown-mint${UNAME_RELEASE}
exit 0 ;;
- sun3*:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mac68k:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mvme68k:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- mvme88k:OpenBSD:*:*)
- echo m88k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
powerpc:machten:*:*)
echo powerpc-apple-machten${UNAME_RELEASE}
exit 0 ;;
@@ -385,6 +396,7 @@ EOF
echo clipper-intergraph-clix${UNAME_RELEASE}
exit 0 ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#ifdef __cplusplus
#include <stdio.h> /* for printf() prototype */
@@ -412,6 +424,9 @@ EOF
rm -f $dummy.c $dummy
echo mips-mips-riscos${UNAME_RELEASE}
exit 0 ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit 0 ;;
Night_Hawk:Power_UNIX:*:*)
echo powerpc-harris-powerunix
exit 0 ;;
@@ -459,7 +474,7 @@ EOF
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
- i?86:AIX:*:*)
+ i*86:AIX:*:*)
echo i386-ibm-aix
exit 0 ;;
ia64:AIX:*:*)
@@ -472,6 +487,7 @@ EOF
exit 0 ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#include <sys/systemcfg.h>
@@ -533,10 +549,8 @@ EOF
9000/31? ) HP_ARCH=m68000 ;;
9000/[34]?? ) HP_ARCH=m68k ;;
9000/[678][0-9][0-9])
- case "${HPUX_REV}" in
- 11.[0-9][0-9])
- if [ -x /usr/bin/getconf ]; then
- sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
case "${sc_cpu_version}" in
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
@@ -545,12 +559,13 @@ EOF
case "${sc_kernel_bits}" in
32) HP_ARCH="hppa2.0n" ;;
64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
esac ;;
esac
- fi ;;
- esac
- if [ "${HP_ARCH}" = "" ]; then
- sed 's/^ //' << EOF >$dummy.c
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
#define _HPUX_SOURCE
#include <stdlib.h>
@@ -583,10 +598,10 @@ EOF
exit (0);
}
EOF
- (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
- if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
- rm -f $dummy.c $dummy
- fi ;;
+ (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null) && HP_ARCH=`./$dummy`
+ if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
+ rm -f $dummy.c $dummy
+ fi ;;
esac
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
exit 0 ;;
@@ -595,6 +610,7 @@ EOF
echo ia64-hp-hpux${HPUX_REV}
exit 0 ;;
3050*:HI-UX:*:*)
+ eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#include <unistd.h>
int
@@ -630,7 +646,7 @@ EOF
9000/8??:4.3bsd:*:*)
echo hppa1.0-hp-bsd
exit 0 ;;
- *9??*:MPE/iX:*:*)
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
echo hppa1.0-hp-mpeix
exit 0 ;;
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
@@ -639,7 +655,7 @@ EOF
hp8??:OSF1:*:*)
echo hppa1.0-hp-osf
exit 0 ;;
- i?86:OSF1:*:*)
+ i*86:OSF1:*:*)
if [ -x /usr/sbin/sysversion ] ; then
echo ${UNAME_MACHINE}-unknown-osf1mk
else
@@ -649,9 +665,6 @@ 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 ;;
@@ -674,12 +687,13 @@ EOF
echo xmp-cray-unicos
exit 0 ;;
CRAY*Y-MP:*:*:*)
- echo ymp-cray-unicos${UNAME_RELEASE}
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
exit 0 ;;
CRAY*[A-Z]90:*:*:*)
echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
- -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
exit 0 ;;
CRAY*TS:*:*:*)
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
@@ -702,10 +716,7 @@ EOF
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit 0 ;;
- hp300:OpenBSD:*:*)
- echo m68k-unknown-openbsd${UNAME_RELEASE}
- exit 0 ;;
- i?86:BSD/386:*:* | i?86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
exit 0 ;;
sparc*:BSD/OS:*:*)
@@ -717,9 +728,6 @@ EOF
*:FreeBSD:*:*)
echo ${UNAME_MACHINE}-unknown-freebsd`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-cygwin
exit 0 ;;
@@ -729,6 +737,9 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit 0 ;;
+ x86:Interix*:3*)
+ echo i386-pc-interix3
+ 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
@@ -760,97 +771,43 @@ EOF
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit 0 ;;
mips:Linux:*:*)
- 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
-#ifdef __MIPSEL__
- printf ("%sel-unknown-linux-gnu\n", argv[1]);
-#endif
- return 0;
-}
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips
+ #undef mipsel
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mipsel
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips
+ #else
+ CPU=
+ #endif
+ #endif
EOF
- $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
- rm -f $dummy.c $dummy
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+ rm -f $dummy.c
+ test x"${CPU}" != x && echo "${CPU}-pc-linux-gnu" && exit 0
;;
ppc:Linux:*:*)
- # Determine Lib Version
- cat >$dummy.c <<EOF
-#include <features.h>
-#if defined(__GLIBC__)
-extern char __libc_version[];
-extern char __libc_release[];
-#endif
-main(argc, argv)
- int argc;
- char *argv[];
-{
-#if defined(__GLIBC__)
- printf("%s %s\n", __libc_version, __libc_release);
-#else
- printf("unknown\n");
-#endif
- return 0;
-}
-EOF
- LIBC=""
- $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null
- if test "$?" = 0 ; then
- ./$dummy | grep 1\.99 > /dev/null
- if test "$?" = 0 ; then LIBC="libc1" ; fi
- fi
- rm -f $dummy.c $dummy
- echo powerpc-unknown-linux-gnu${LIBC}
+ echo powerpc-unknown-linux-gnu
+ exit 0 ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
exit 0 ;;
alpha:Linux:*:*)
- 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_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
- if test "$?" = 0 ; then
- case `./$dummy` in
- 0-0) UNAME_MACHINE="alpha" ;;
- 1-0) UNAME_MACHINE="alphaev5" ;;
- 1-1) UNAME_MACHINE="alphaev56" ;;
- 1-101) UNAME_MACHINE="alphapca56" ;;
- 2-303) UNAME_MACHINE="alphaev6" ;;
- 2-307) UNAME_MACHINE="alphaev67" ;;
- esac
- objdump --private-headers $dummy | \
- grep ld.so.1 > /dev/null
- if test "$?" = 0 ; then
- LIBC="libc1"
- fi
- fi
- rm -f $dummy.s $dummy
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
exit 0 ;;
parisc:Linux:*:* | hppa:Linux:*:*)
@@ -876,78 +833,62 @@ EOF
x86_64:Linux:*:*)
echo x86_64-unknown-linux-gnu
exit 0 ;;
- i?86:Linux:*:*)
+ i*86:Linux:*:*)
# The BFD linker knows what the default object file format is, so
# first see if it will tell us. cd to the root directory to prevent
# problems with other programs or directories called `ld' in the path.
- ld_supported_emulations=`cd /; ld --help 2>&1 \
- | sed -ne '/supported emulations:/!d
+ ld_supported_targets=`cd /; ld --help 2>&1 \
+ | sed -ne '/supported targets:/!d
s/[ ][ ]*/ /g
- s/.*supported emulations: *//
+ s/.*supported targets: *//
s/ .*//
p'`
- case "$ld_supported_emulations" in
- i?86linux)
- echo "${UNAME_MACHINE}-pc-linux-gnuaout"
- exit 0
- ;;
- elf_i?86)
+ case "$ld_supported_targets" in
+ elf32-i386)
TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
;;
- i?86coff)
+ a.out-i386-linux)
+ echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+ exit 0 ;;
+ coff-i386)
echo "${UNAME_MACHINE}-pc-linux-gnucoff"
- exit 0
- ;;
- esac
- # Either a pre-BFD a.out linker (linux-gnuoldld)
- # or one that does not give us useful --help.
- # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
- # If ld does not provide *any* "supported emulations:"
- # that means it is gnuoldld.
- test -z "$ld_supported_emulations" && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
- case "${UNAME_MACHINE}" in
- i?86)
- VENDOR=pc;
- ;;
- *)
- VENDOR=unknown;
- ;;
+ exit 0 ;;
+ "")
+ # Either a pre-BFD a.out linker (linux-gnuoldld) or
+ # one that does not give us useful --help.
+ echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+ exit 0 ;;
esac
# Determine whether the default compiler is a.out or elf
- cat >$dummy.c <<EOF
-#include <features.h>
-#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
- printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
-# else
- printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
-# endif
-# else
- printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
-# endif
-#else
- printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
-#endif
- return 0;
-}
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <features.h>
+ #ifdef __ELF__
+ # ifdef __GLIBC__
+ # if __GLIBC__ >= 2
+ LIBC=gnu
+ # else
+ LIBC=gnulibc1
+ # endif
+ # else
+ LIBC=gnulibc1
+ # endif
+ #else
+ LIBC=gnuaout
+ #endif
EOF
- $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
- rm -f $dummy.c $dummy
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+ rm -f $dummy.c
+ test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
;;
-# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. earlier versions
-# are messed up and put the nodename in both sysname and nodename.
- i?86:DYNIX/ptx:4*:*)
+ i*86:DYNIX/ptx:4*:*)
+ # 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.
echo i386-sequent-sysv4
exit 0 ;;
- i?86:UNIX_SV:4.2MP:2.*)
+ i*86:UNIX_SV:4.2MP:2.*)
# Unixware is an offshoot of SVR4, but it has its own version
# number series starting with 2...
# I am not positive that other SVR4 systems won't match this,
@@ -955,7 +896,7 @@ EOF
# Use sysv4.2uw... so that sysv4* matches it.
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
exit 0 ;;
- i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
+ 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_REL}
@@ -963,16 +904,15 @@ EOF
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
+ i*86:*:5:[78]*)
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
exit 0 ;;
- i?86:*:3.2:*)
+ i*86:*:3.2:*)
if test -f /usr/options/cb.name; then
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
@@ -990,7 +930,7 @@ EOF
echo ${UNAME_MACHINE}-pc-sysv32
fi
exit 0 ;;
- i?86:*DOS:*:*)
+ i*86:*DOS:*:*)
echo ${UNAME_MACHINE}-pc-msdosdjgpp
exit 0 ;;
pc:*:*:*)
@@ -1018,7 +958,7 @@ EOF
exit 0 ;;
M68*:*:R3V[567]*:*)
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
- 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
+ 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@@ -1029,13 +969,13 @@ EOF
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& echo i486-ncr-sysv4 && exit 0 ;;
- m68*:LynxOS:2.*:*)
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
echo m68k-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
exit 0 ;;
- i?86:LynxOS:2.*:* | i?86:LynxOS:3.[01]*:*)
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
TSUNAMI:LynxOS:2.*:*)
@@ -1044,7 +984,7 @@ EOF
rs6000:LynxOS:2.*:*)
echo rs6000-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:*)
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
echo powerpc-unknown-lynxos${UNAME_RELEASE}
exit 0 ;;
SM[BE]S:UNIX_SV:*:*)
@@ -1064,8 +1004,8 @@ EOF
echo ns32k-sni-sysv
fi
exit 0 ;;
- PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
- # says <Richard.M.Bartel@ccMail.Census.GOV>
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
echo i586-unisys-sysv4
exit 0 ;;
*:UNIX_System_V:4*:FTX*)
@@ -1077,6 +1017,10 @@ EOF
# From seanf@swdc.stratus.com.
echo i860-stratus-sysv4
exit 0 ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit 0 ;;
mc68*:A/UX:*:*)
echo m68k-apple-aux${UNAME_RELEASE}
exit 0 ;;
@@ -1123,7 +1067,7 @@ EOF
*:QNX:*:4*)
echo i386-pc-qnx
exit 0 ;;
- NSR-[KW]:NONSTOP_KERNEL:*:*)
+ NSR-[GKLNPTVW]:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk${UNAME_RELEASE}
exit 0 ;;
*:NonStop-UX:*:*)
@@ -1146,7 +1090,7 @@ EOF
fi
echo ${UNAME_MACHINE}-unknown-plan9
exit 0 ;;
- i?86:OS/2:*:*)
+ i*86:OS/2:*:*)
# If we were able to find `uname', then EMX Unix compatibility
# is probably installed.
echo ${UNAME_MACHINE}-pc-os2-emx
@@ -1169,11 +1113,18 @@ EOF
*:ITS:*:*)
echo pdp10-unknown-its
exit 0 ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit 0 ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ 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
+eval $set_cc_for_build
cat >$dummy.c <<EOF
#ifdef _SEQUENT_
# include <sys/types.h>
diff --git a/contrib/binutils/config.if b/contrib/binutils/config.if
index 625a407..3958928 100644
--- a/contrib/binutils/config.if
+++ b/contrib/binutils/config.if
@@ -82,8 +82,8 @@ EOF
exit 1
fi
else
- # Cross compiling. Assume glibc 2.1.
- libc_interface=-libc6.1-
+ # Cross compiling. Assume glibc 2.2.
+ libc_interface=-libc6.2-
fi
;;
*)
diff --git a/contrib/binutils/config.sub b/contrib/binutils/config.sub
index 7146a2f..1657334 100755
--- a/contrib/binutils/config.sub
+++ b/contrib/binutils/config.sub
@@ -1,9 +1,9 @@
#! /bin/sh
# Configuration validation subroutine script.
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
-# Free Software Foundation, Inc.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002 Free Software Foundation, Inc.
-timestamp='2001-03-19'
+timestamp='2002-01-02'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -29,7 +29,8 @@ timestamp='2001-03-19'
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
-# Please send patches to <config-patches@gnu.org>.
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
@@ -117,7 +118,7 @@ esac
# Here we must recognize all the valid KERNEL-OS combinations.
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
- nto-qnx* | linux-gnu* | storm-chaos* | os2-emx*)
+ nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*)
os=-$maybe_os
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
;;
@@ -157,6 +158,14 @@ case $os in
os=-vxworks
basic_machine=$1
;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
-hiux*)
os=-hiuxwe2
;;
@@ -215,25 +224,36 @@ esac
case $basic_machine in
# Recognize the basic CPU types without company name.
# Some are omitted here because they have special meanings below.
- tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \
- | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \
- | pyramid | mn10200 | mn10300 | tron | a29k \
- | 580 | i960 | h8300 \
- | x86 | ppcbe | mipsbe | mipsle | shbe | shle \
- | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
- | hppa64 \
- | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \
- | alphaev6[78] \
- | we32k | ns16k | clipper | i370 | sh | sh[34] \
- | powerpc | powerpcle \
- | 1750a | dsp16xx | pdp10 | pdp11 \
- | mips16 | mips64 | mipsel | mips64el \
- | mips64orion | mips64orionel | mipstx39 | mipstx39el \
- | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \
- | mips64vr5000 | miprs64vr5000el | mcore | s390 | s390x \
- | sparc | sparclet | sparclite | sparc64 | sparcv9 | v850 | c4x \
- | thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \
- | pj | pjl | h8500)
+ 1750a | 580 \
+ | a29k \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+ | c4x | clipper \
+ | d10v | d30v | dsp16xx \
+ | fr30 \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | i370 | i860 | i960 | ia64 \
+ | m32r | m68000 | m68k | m88k | mcore \
+ | mips16 | mips64 | mips64el | mips64orion | mips64orionel \
+ | mips64vr4100 | mips64vr4100el | mips64vr4300 \
+ | mips64vr4300el | mips64vr5000 | mips64vr5000el \
+ | mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \
+ | mipsisa32 \
+ | mn10200 | mn10300 \
+ | ns16k | ns32k \
+ | openrisc \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | pyramid \
+ | sh | sh[34] | sh[34]eb | shbe | shle \
+ | sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \
+ | strongarm \
+ | tahoe | thumb | tic80 | tron \
+ | v850 | v850e \
+ | we32k \
+ | x86 | xscale | xstormy16 | xtensa \
+ | z8k)
basic_machine=$basic_machine-unknown
;;
m6811 | m68hc11 | m6812 | m68hc12)
@@ -241,13 +261,13 @@ case $basic_machine in
basic_machine=$basic_machine-unknown
os=-none
;;
- m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | z8k | v70 | w65)
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
;;
# 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[234567]86 | x86_64)
+ i*86 | x86_64)
basic_machine=$basic_machine-pc
;;
# Object if more than one company name word.
@@ -256,30 +276,45 @@ case $basic_machine in
exit 1
;;
# Recognize the basic CPU types with company name.
- # FIXME: clean up the formatting here.
- vax-* | tahoe-* | i[234567]86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \
- | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \
- | arm-* | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \
- | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
- | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \
- | xmp-* | ymp-* \
- | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \
- | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \
- | hppa2.0n-* | hppa64-* \
- | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \
- | alphaev6[78]-* \
- | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \
- | clipper-* | orion-* \
- | sparclite-* | pdp10-* | pdp11-* | sh-* | powerpc-* | powerpcle-* \
- | sparc64-* | sparcv9-* | sparc86x-* | mips16-* | mips64-* | mipsel-* \
- | mips64el-* | mips64orion-* | mips64orionel-* \
- | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \
- | mipstx39-* | mipstx39el-* | mcore-* \
- | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \
- | [cjt]90-* \
- | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
- | thumb-* | v850-* | d30v-* | tic30-* | tic80-* | c30-* | fr30-* \
- | bs2000-* | tic54x-* | c54x-* | x86_64-* | pj-* | pjl-*)
+ 580-* \
+ | a29k-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armv*-* \
+ | avr-* \
+ | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c54x-* \
+ | clipper-* | cray2-* | cydra-* \
+ | d10v-* | d30v-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fr30-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | m32r-* \
+ | m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | mcore-* \
+ | mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \
+ | mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipseb-* \
+ | mipsle-* | mipsel-* | mipstx39-* | mipstx39el-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | pyramid-* \
+ | romp-* | rs6000-* \
+ | sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \
+ | sparc-* | sparc64-* | sparc86x-* | sparclite-* \
+ | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* \
+ | t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
+ | v850-* | v850e-* | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xmp-* | xps100-* | xscale-* | xstormy16-* \
+ | xtensa-* \
+ | ymp-* \
+ | z8k-*)
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
@@ -386,6 +421,14 @@ case $basic_machine in
decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
basic_machine=mips-dec
;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
delta | 3300 | motorola-3300 | motorola-delta \
| 3300-motorola | delta-motorola)
basic_machine=m68k-motorola
@@ -506,19 +549,19 @@ case $basic_machine in
basic_machine=i370-ibm
;;
# I'm not sure what "Sysv32" means. Should this be sysv3.2?
- i[34567]86v32)
+ i*86v32)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv32
;;
- i[34567]86v4*)
+ i*86v4*)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv4
;;
- i[34567]86v)
+ i*86v)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-sysv
;;
- i[34567]86sol2)
+ i*86sol2)
basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
os=-solaris2
;;
@@ -588,6 +631,10 @@ case $basic_machine in
basic_machine=m68k-rom68k
os=-coff
;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
msdos)
basic_machine=i386-pc
os=-msdos
@@ -692,7 +739,7 @@ case $basic_machine in
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
- pentium | p5 | k5 | k6 | nexgen)
+ pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
pentiumpro | p6 | 6x86 | athlon)
@@ -701,7 +748,7 @@ case $basic_machine in
pentiumii | pentium2)
basic_machine=i686-pc
;;
- pentium-* | p5-* | k5-* | k6-* | nexgen-*)
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-* | 6x86-* | athlon-*)
@@ -725,6 +772,16 @@ case $basic_machine in
ppcle-* | powerpclittle-*)
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
ps2)
basic_machine=i386-ibm
;;
@@ -742,6 +799,12 @@ case $basic_machine in
rtpc | rtpc-*)
basic_machine=romp-ibm
;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
sa29200)
basic_machine=a29k-amd
os=-udi
@@ -753,7 +816,7 @@ case $basic_machine in
basic_machine=sh-hitachi
os=-hms
;;
- sparclite-wrs)
+ sparclite-wrs | simso-wrs)
basic_machine=sparclite-wrs
os=-vxworks
;;
@@ -833,6 +896,10 @@ case $basic_machine in
tx39el)
basic_machine=mipstx39el-unknown
;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
tower | tower-32)
basic_machine=m68k-ncr
;;
@@ -879,6 +946,10 @@ case $basic_machine in
basic_machine=hppa1.1-winbond
os=-proelf
;;
+ windows32)
+ basic_machine=i386-pc
+ os=-windows32-msvcrt
+ ;;
xmp)
basic_machine=xmp-cray
os=-unicos
@@ -932,10 +1003,10 @@ case $basic_machine in
we32k)
basic_machine=we32k-att
;;
- sh3 | sh4)
+ sh3 | sh4 | sh3eb | sh4eb)
basic_machine=sh-unknown
;;
- sparc | sparcv9)
+ sparc | sparcv9 | sparcv9b)
basic_machine=sparc-sun
;;
cydra)
@@ -957,6 +1028,9 @@ case $basic_machine in
basic_machine=c4x-none
os=-coff
;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
*)
echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
exit 1
@@ -1013,16 +1087,18 @@ case $os in
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* \
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
- | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*)
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* | -morphos*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
case $basic_machine in
- x86-* | i[34567]86-*)
+ x86-* | i*86-*)
;;
*)
os=-nto$os
@@ -1069,6 +1145,9 @@ case $os in
-acis*)
os=-aos
;;
+ -atheos*)
+ os=-atheos
+ ;;
-386bsd)
os=-bsd
;;
@@ -1149,6 +1228,7 @@ case $basic_machine in
arm*-semi)
os=-aout
;;
+ # This must come before the *-dec entry.
pdp10-*)
os=-tops20
;;
@@ -1341,6 +1421,9 @@ case $basic_machine in
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
vendor=atari
;;
+ -vos*)
+ vendor=stratus
+ ;;
esac
basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
;;
diff --git a/contrib/binutils/config/ChangeLog b/contrib/binutils/config/ChangeLog
index 920ab32..5a398ec 100644
--- a/contrib/binutils/config/ChangeLog
+++ b/contrib/binutils/config/ChangeLog
@@ -1,4 +1,9 @@
-Fri Jul 14 18:13:23 2000 Mark P Mitchell <mark@codesourcery.com>
+2001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * mh-s390pic: New file.
+ * mt-s390pic: New file.
+
+2000-07-14 Mark P Mitchell <mark@codesourcery.com>
* mh-irix6 (CC): Don't set it.
diff --git a/contrib/binutils/configure b/contrib/binutils/configure
index 57e22d8..e55339f 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, 97, 98, 1999
+# Copyright (C) 1988, 90, 91, 92, 93, 94, 95, 96, 97, 98, 1999, 2000, 2001
# Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
@@ -86,7 +86,7 @@ subdirs=
target_alias=NOTARGET
target_makefile_frag=
undefs=NOUNDEFS
-version="$Revision: 1.11 $"
+version="$Revision: 1.13 $"
x11=default
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
@@ -450,7 +450,7 @@ case "${fatal}" in
fi
;;
esac
- echo "Configuring for a ${host_alias} host." 1>&2
+ echo "Configuring for a ${host_alias} host."
arguments="--host=$host_alias $arguments"
else
echo 'Config.guess failed to determine the host type. You need to specify one.' 1>&2
@@ -804,46 +804,57 @@ 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}" ] && [ -r Makefile ]; then
- sed -n -e ':loop
+# ./config.status by hand. Do the same for various Makefile fragments
+# so that they can specify these vars.
+for file in Mafefile ${package_makefile_rules_frag} \
+ ${site:+config/ms-${site}} ${host_makefile_frag} \
+ ${target_makefile_frag} ${package_makefile_frag}
+do
+ if ! test -r $file; then
+ file=${srcdir}/${file}
+ if ! test -r $file; then continue; fi
+ fi
+
+ if [ -z "${CC}" ]; then
+ sed -n -e ':loop
/\\$/ N
s/\\\n//g
t loop
-/^CC[ ]*=/ s/CC[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc
- CC=`tail -1 Makefile.cc`
- rm -f Makefile.cc
-fi
+/^CC[ ]*=/ s/CC[ ]*=[ ]*\(.*\)/\1/p' < $file > Makefile.cc
+ CC=`tail -1 Makefile.cc`
+ rm -f Makefile.cc
+ fi
-if [ -z "${CFLAGS}" ] && [ -r Makefile ]; then
- sed -n -e ':loop
+ if [ -z "${CFLAGS}" ]; then
+ sed -n -e ':loop
/\\$/ N
s/\\\n//g
t loop
-/^CFLAGS[ ]*=/ s/CFLAGS[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc
- CFLAGS=`tail -1 Makefile.cc`
- rm -f Makefile.cc
-fi
+/^CFLAGS[ ]*=/ s/CFLAGS[ ]*=[ ]*\(.*\)/\1/p' < $file > Makefile.cc
+ CFLAGS=`tail -1 Makefile.cc`
+ rm -f Makefile.cc
+ fi
-if [ -z "${CXX}" ] && [ -r Makefile ]; then
- sed -n -e ':loop
+ if [ -z "${CXX}" ]; then
+ sed -n -e ':loop
/\\$/ N
s/\\\n//g
t loop
-/^CXX[ ]*=/ s/CXX[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc
- CXX=`tail -1 Makefile.cc`
- rm -f Makefile.cc
-fi
+/^CXX[ ]*=/ s/CXX[ ]*=[ ]*\(.*\)/\1/p' < $file > Makefile.cc
+ CXX=`tail -1 Makefile.cc`
+ rm -f Makefile.cc
+ fi
-if [ -z "${CXXFLAGS}" ] && [ -r Makefile ]; then
- sed -n -e ':loop
+ if [ -z "${CXXFLAGS}" ]; then
+ sed -n -e ':loop
/\\$/ N
s/\\\n//g
t loop
-/^CXXFLAGS[ ]*=/ s/CXXFLAGS[ ]*=[ ]*\(.*\)/\1/p' < Makefile > Makefile.cc
- CXXFLAGS=`tail -1 Makefile.cc`
- rm -f Makefile.cc
-fi
+/^CXXFLAGS[ ]*=/ s/CXXFLAGS[ ]*=[ ]*\(.*\)/\1/p' < $file > Makefile.cc
+ CXXFLAGS=`tail -1 Makefile.cc`
+ rm -f Makefile.cc
+ fi
+done
# Generate a default definition for YACC. This is used if the makefile can't
# locate bison or byacc in objdir.
@@ -1078,6 +1089,12 @@ else
GDB_TK=""
fi
+all_build_modules=
+if test x"${build_alias}" != x"${host_alias}"
+then
+ all_build_modules='$(ALL_BUILD_MODULES_LIST)'
+fi
+
for subdir in . ${subdirs} ; do
# ${subdir} is relative path from . to the directory we're currently
@@ -1378,6 +1395,7 @@ EOF
-e "s|^oldincludedir[ ]*=.*$|oldincludedir = ${oldincludedir}|" \
-e "s|^infodir[ ]*=.*$|infodir = ${infodir}|" \
-e "s|^mandir[ ]*=.*$|mandir = ${mandir}|" \
+ -e "s|^ALL_BUILD_MODULES =.*|ALL_BUILD_MODULES =${all_build_modules}|" \
-e "/^CC[ ]*=/{
:loop1
/\\\\$/ N
diff --git a/contrib/binutils/configure.in b/contrib/binutils/configure.in
index 1284aa6..a9219bb 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-99, 2000 Free Software Foundation, Inc.
+# Copyright (C) 1992-99, 2000, 2001 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
@@ -321,6 +321,9 @@ if [ x${shared} = xyes ]; then
powerpc*-*-*)
host_makefile_frag="${host_makefile_frag} config/mh-ppcpic"
;;
+ s390-* | s390x-*)
+ host_makefile_frag="${host_makefile_frag} config/mh-s390pic"
+ ;;
*-*-*)
if test -f ${srcdir}/config/mh-${host_cpu}pic; then
host_makefile_frag="${host_makefile_frag} config/mh-${host_cpu}pic"
@@ -431,6 +434,18 @@ if [ ! -d ${target_subdir} ] ; then
fi
fi
+build_subdir=${build_alias}
+
+if [ x"${build_alias}" != x"${host}" ] ; then
+ if [ ! -d ${build_subdir} ] ; then
+ if mkdir ${build_subdir} ; then true
+ else
+ echo "'*** could not make ${PWD=`pwd`}/${build_subdir}" 1>&2
+ exit 1
+ fi
+ fi
+fi
+
copy_dirs=
# Handle --with-headers=XXX. The contents of the named directory are
@@ -555,7 +570,7 @@ case "${host}" in
noconfigdirs="$noconfigdirs tk itcl tix libgui gdb"
;;
*-*-cygwin*)
- noconfigdirs="autoconf automake send-pr rcs guile perl texinfo apache inet"
+ noconfigdirs="autoconf automake send-pr rcs guile perl apache inet"
;;
*-*-netbsd*)
noconfigdirs="rcs"
@@ -569,7 +584,34 @@ case "${host}" in
esac
+# Save it here so that, even in case of --enable-libgcj, if the Java
+# front-end isn't enabled, we still get libgcj disabled.
+libgcj_saved=$libgcj
+case $enable_libgcj in
+yes)
+ # If we reset it here, it won't get added to noconfigdirs in the
+ # target-specific build rules, so it will be forcibly enabled
+ # (unless the Java language itself isn't enabled).
+ libgcj=
+ ;;
+no)
+ # Make sure we get it printed in the list of not supported target libs.
+ noconfigdirs="$noconfigdirs ${libgcj}"
+ ;;
+esac
+
case "${target}" in
+ *-*-netbsd*)
+ # Skip some stuff on all NetBSD configurations.
+ skipdirs="$skipdirs target-newlib target-libiberty target-libgloss"
+
+ # Skip some stuff that's unsupported on some NetBSD configurations.
+ case "${target}" in
+ *)
+ noconfigdirs="$noconfigdirs ${libgcj}"
+ ;;
+ esac
+ ;;
*-*-netware)
noconfigdirs="$noconfigdirs ${libstdcxx_version} target-newlib target-libiberty target-libgloss target-libffi"
;;
@@ -613,18 +655,6 @@ case "${target}" in
arm-*-pe*)
noconfigdirs="$noconfigdirs target-libgloss"
;;
- 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 target-libffi"
;;
@@ -638,25 +668,25 @@ case "${target}" in
noconfigdirs="$noconfigdirs target-libgloss target-libffi"
;;
strongarm-*-elf)
- noconfigdirs="$noconfigdirs target-libgloss target-libffi"
+ noconfigdirs="$noconfigdirs target-libffi"
if [ x${is_cross_compiler} != xno ] ; then
target_configdirs="${target_configdirs} target-bsp target-cygmon"
fi
;;
strongarm-*-coff)
- noconfigdirs="$noconfigdirs target-libgloss target-libffi"
+ noconfigdirs="$noconfigdirs target-libffi"
if [ x${is_cross_compiler} != xno ] ; then
target_configdirs="${target_configdirs} target-bsp target-cygmon"
fi
;;
xscale-*-elf)
- noconfigdirs="$noconfigdirs target-libgloss target-libffi"
+ noconfigdirs="$noconfigdirs target-libffi"
if [ x${is_cross_compiler} != xno ] ; then
target_configdirs="${target_configdirs} target-bsp target-cygmon"
fi
;;
xscale-*-coff)
- noconfigdirs="$noconfigdirs target-libgloss target-libffi"
+ noconfigdirs="$noconfigdirs target-libffi"
if [ x${is_cross_compiler} != xno ] ; then
target_configdirs="${target_configdirs} target-bsp target-cygmon"
fi
@@ -683,7 +713,9 @@ case "${target}" in
target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon"
fi
;;
- h8300*-*-* | \
+ h8300*-*-*)
+ noconfigdirs="$noconfigdirs target-libgloss"
+ ;;
h8500-*-*)
noconfigdirs="$noconfigdirs ${libstdcxx_version} target-libgloss target-libffi"
;;
@@ -701,12 +733,18 @@ case "${target}" in
"" | cc*) noconfigdirs="$noconfigdirs emacs emacs19" ;;
*) ;;
esac
- noconfigdirs="$noconfigdirs ld shellutils"
+ # According to Alexandre Oliva <aoliva@redhat.com>, libjava won't
+ # build on HP-UX 10.20.
+ noconfigdirs="$noconfigdirs ld shellutils ${libgcj}"
;;
ia64*-*-elf*)
# No gdb support yet.
noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb"
;;
+ ia64*-**-hpux*)
+ # No gdb or ld support yet.
+ noconfigdirs="$noconfigdirs tix readline mmalloc libgui itcl gdb ld"
+ ;;
i[3456]86-*-coff | i[3456]86-*-elf)
if [ x${is_cross_compiler} != xno ] ; then
target_configdirs="${target_configdirs} target-libstub target-cygmon"
@@ -718,7 +756,7 @@ case "${target}" in
;;
i[3456]86-*-mingw32*)
target_configdirs="$target_configdirs target-mingw"
- noconfigdirs="$noconfigdirs expect target-libgloss target-libffi"
+ noconfigdirs="$noconfigdirs expect target-libgloss ${libgcj}"
# Can't build gdb for mingw32 if not native.
case "${host}" in
@@ -729,7 +767,7 @@ case "${target}" in
;;
*-*-cygwin*)
target_configdirs="$target_configdirs target-libtermcap target-winsup"
- noconfigdirs="$noconfigdirs target-gperf target-libgloss target-libffi"
+ noconfigdirs="$noconfigdirs target-gperf target-libgloss ${libgcj}"
# always build newlib.
skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'`
@@ -764,7 +802,7 @@ case "${target}" in
noconfigdirs="$noconfigdirs emacs emacs19 target-libgloss target-libffi"
;;
i[3456]86-*-beos*)
- noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss"
+ noconfigdirs="$noconfigdirs gdb target-newlib target-libgloss ${libgcj}"
;;
m68hc11-*-*|m6811-*-*|m68hc12-*-*|m6812-*-*)
noconfigdirs="$noconfigdirs target-libiberty target-librx target-libg++ target-libstdc++ target-libio target-libf2c target-libchill target-zlib target-libobjc"
@@ -793,12 +831,7 @@ case "${target}" in
;;
powerpc-*-aix*)
# copied from rs6000-*-* entry
- # 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 target-libffi ld"
- use_gnu_ld=no
+ use_gnu_ld=yes
;;
powerpc*-*-winnt* | powerpc*-*-pe* | ppc*-*-pe)
target_configdirs="$target_configdirs target-winsup"
@@ -823,12 +856,8 @@ case "${target}" in
noconfigdirs="$noconfigdirs target-newlib gprof cvssrc target-libffi"
;;
rs6000-*-aix*)
- # The configure and build of ld are currently disabled because
- # GNU ld is known to be broken for AIX 4.2 and 4.3 (at least)
- # The symptom is that GDBtk 4.18 fails at startup with a segfault
- # if linked by GNU ld, but not if linked by the native ld.
- noconfigdirs="$noconfigdirs gprof target-libffi ld"
- use_gnu_ld=no
+ noconfigdirs="$noconfigdirs gprof target-libffi"
+ use_gnu_ld=yes
;;
rs6000-*-*)
noconfigdirs="$noconfigdirs gprof target-libffi"
@@ -844,7 +873,11 @@ case "${target}" in
mips*-*-irix6*)
# The GNU assembler does not support IRIX 6.
# emacs is emacs 18, which does not work on Irix 5 (emacs19 does work)
- noconfigdirs="$noconfigdirs gas gprof emacs target-libgloss"
+ # Linking libjava exceeds command-line length limits on at least
+ # IRIX 6.2, but not on IRIX 6.5.
+ # Also, boehm-gc won't build on IRIX 6.5, according to Jeffrey Oldham
+ # <oldham@codesourcery.com>
+ noconfigdirs="$noconfigdirs gas gprof emacs target-libgloss ${libgcj}"
;;
mips*-dec-bsd*)
noconfigdirs="$noconfigdirs gprof target-libgloss target-libffi"
@@ -880,13 +913,13 @@ case "${target}" in
if [ x${is_cross_compiler} != xno ] ; then
target_configdirs="${target_configdirs} target-libstub target-cygmon"
fi
- noconfigdirs="target-libffi"
+ noconfigdirs="$noconfigdirs target-libffi"
;;
sparclite-*-*)
if [ x${is_cross_compiler} != xno ] ; then
target_configdirs="${target_configdirs} target-bsp target-libstub target-cygmon"
fi
- noconfigdirs="target-libffi"
+ noconfigdirs="$noconfigdirs target-libffi"
;;
sparc-*-sunos4*)
if [ x${is_cross_compiler} != xno ] ; then
@@ -895,6 +928,17 @@ case "${target}" in
use_gnu_ld=no
fi
;;
+ sparc-*-solaris*)
+ case "${host}" in
+ sparc-*-solaris2.8)
+ # According to Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>, libjava
+ # won't build correctly on Solaris 8 if there's a
+ # previously-installed version of GCC in the configured prefix.
+ # This problem does not show up on earlier versions of Solaris.
+ noconfigdirs="$noconfigdirs ${libgcj}"
+ ;;
+ esac
+ ;;
v810-*-*)
noconfigdirs="$noconfigdirs bfd binutils gas gcc gdb ld ${libstdcxx_version} opcodes target-libgloss target-libffi"
;;
@@ -920,7 +964,7 @@ case "${target}" in
*-*-mpw*)
# Macs want a resource compiler.
configdirs="$configdirs grez"
- noconfigdirs="target-libffi"
+ noconfigdirs="$noconfigdirs target-libffi"
;;
esac
@@ -947,18 +991,24 @@ fi
# Look if the user specified --enable-languages="..."; if not, use
# the environment variable $LANGUAGES if defined. $LANGUAGES might
# go away some day.
+# NB: embedded tabs in this IF block -- do not untabify
if test x"${enable_languages+set}" != xset; then
if test x"${LANGUAGES+set}" = xset; then
- enable_languages="`echo ${LANGUAGES} | tr ' ' ','`"
+ enable_languages="${LANGUAGES}"
+ echo configure.in: warning: setting LANGUAGES is deprecated, use --enable-languages instead 1>&2
else
enable_languages=all
fi
else
- if test x"${enable_languages}" = x; then
- echo configure.in: --enable-languages needs at least one argument 1>&2
+ if test x"${enable_languages}" = x ||
+ test x"${enable_languages}" = xyes;
+ then
+ echo configure.in: --enable-languages needs at least one language argument 1>&2
exit 1
fi
fi
+enable_languages=`echo "${enable_languages}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'`
+
subdirs=
for lang in ${srcdir}/gcc/*/config-lang.in ..
do
@@ -1183,7 +1233,7 @@ rm -f conftest*
case "${host}" in
sparc-sun-solaris2*)
CCBASE="`echo ${CC-cc} | sed 's/ .*$//'`"
- if [ "`/usr/bin/which $CCBASE`" = "/usr/ucb/cc" ] ; then
+ if [ "`type $CCBASE | sed 's/^[^/]*//'`" = "/usr/ucb/cc" ] ; then
could_use=
[ -d /opt/SUNWspro/bin ] && could_use="/opt/SUNWspro/bin"
if [ -d /opt/cygnus/bin ] ; then
@@ -1225,7 +1275,8 @@ if [ "${shared}" = "yes" ]; then
esac
fi
-# Record target_configdirs and the configure arguments in Makefile.
+# Record target_configdirs and the configure arguments for target and
+# build configuration in Makefile.
target_configdirs=`echo "${target_configdirs}" | sed -e 's/target-//g'`
targargs=`echo "${arguments}" | \
sed -e 's/--no[^ ]*//' \
@@ -1234,6 +1285,11 @@ targargs=`echo "${arguments}" | \
-e 's/--bu[a-z-]*=[^ ]*//' \
-e 's/--ta[a-z-]*=[^ ]*//'`
+# For the build-side libraries, we just need to pretend we're native,
+# and not use the same cache file. Multilibs are neither needed nor
+# desired.
+buildargs="--cache-file=../config.cache --build=${build_alias} --host=${build_alias} ${targargs}"
+
# Passing a --with-cross-host argument lets the target libraries know
# whether they are being built with a cross-compiler or being built
# native. However, it would be better to use other mechanisms to make the
@@ -1254,6 +1310,9 @@ if [ x${with_newlib} != xno ] && echo " ${target_configdirs} " | grep " newlib "
targargs="--with-newlib ${targargs}"
fi
+# Pass the appropriate --host, --build, and --cache-file arguments.
+targargs="--cache-file=../config.cache --host=${target_alias} --build=${build_alias} ${targargs}"
+
# provide a proper gxx_include_dir.
# Note, if you change the default, make sure to fix both here and in
# the gcc, libio, and libstdc++ subdirectories.
@@ -1315,10 +1374,20 @@ case " $skipdirs " in
fi
fi
- # If we're building newlib, use its generic headers last, but search
- # for any libc-related directories first (so make it the last -B
- # switch).
- FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include'
+ case "${target}-${is_cross_compiler}" in
+ i[3456]86-pc-linux*-no)
+ # Here host == target, so we don't need to build gcc,
+ # so we don't want to discard standard headers.
+ FLAGS_FOR_TARGET=`echo " $FLAGS_FOR_TARGET " | sed -e 's/ -nostdinc / /'`
+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/'
+ ;;
+ *)
+ # If we're building newlib, use its generic headers last, but search
+ # for any libc-related directories first (so make it the last -B
+ # switch).
+ FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -B$$r/$(TARGET_SUBDIR)/newlib/ -isystem $$r/$(TARGET_SUBDIR)/newlib/targ-include -isystem $$s/newlib/libc/include'
+ ;;
+ esac
;;
esac
@@ -1371,7 +1440,7 @@ esac
if test "x${CXX_FOR_TARGET+set}" = xset; then
:
elif test -d ${topsrcdir}/gcc; then
- CXX_FOR_TARGET='$$r/gcc/g++ -B$$r/gcc/ -nostdinc++ '$libstdcxx_flags
+ CXX_FOR_TARGET='$$r/gcc/`case $$dir in libstdc++-v3) echo xgcc ;; *) echo g++ ;; esac` -B$$r/gcc/ -nostdinc++ '$libstdcxx_flags
elif test "$host" = "$target"; then
CXX_FOR_TARGET='$(CXX)'
else
@@ -1381,16 +1450,26 @@ case $CXX_FOR_TARGET in
*' $(FLAGS_FOR_TARGET)') ;;
*) CXX_FOR_TARGET=$CXX_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;;
esac
-qCXX_FOR_TARGET=`echo "$CXX_FOR_TARGET" | sed 's,&,\\\&,g'`
+qCXX_FOR_TARGET=`echo "$CXX_FOR_TARGET" | sed 's,[&%],\\\&,g'`
+
+# We want to defer the evaluation of `cmd`s and shell variables in
+# CXX_FOR_TARGET when recursing in the top-level Makefile, such as for
+# bootstrap. We'll enclose CXX_FOR_TARGET_FOR_RECURSIVE_MAKE in single
+# quotes, but we still have to duplicate `$'s so that shell variables
+# can be expanded by the nested make as shell variables, not as make
+# macros.
+qqCXX_FOR_TARGET=`echo "$qCXX_FOR_TARGET" | sed -e 's,[$][$],$$$$,g'`
-targargs="--cache-file=../config.cache --host=${target_alias} --build=${build_alias} ${targargs}"
sed -e "s:^TARGET_CONFIGDIRS[ ]*=.*$:TARGET_CONFIGDIRS = ${target_configdirs}:" \
- -e "s%^CONFIG_ARGUMENTS[ ]*=.*$%CONFIG_ARGUMENTS = ${targargs}%" \
+ -e "s%^TARGET_CONFIGARGS[ ]*=.*$%TARGET_CONFIGARGS = ${targargs}%" \
-e "s%^FLAGS_FOR_TARGET[ ]*=.*$%FLAGS_FOR_TARGET = ${FLAGS_FOR_TARGET}%" \
-e "s%^CC_FOR_TARGET[ ]*=.*$%CC_FOR_TARGET = ${CC_FOR_TARGET}%" \
-e "s%^CHILL_FOR_TARGET[ ]*=.*$%CHILL_FOR_TARGET = ${CHILL_FOR_TARGET}%" \
-e "s%^CXX_FOR_TARGET[ ]*=.*$%CXX_FOR_TARGET = ${qCXX_FOR_TARGET}%" \
+ -e "s%^CXX_FOR_TARGET_FOR_RECURSIVE_MAKE[ ]*=.*$%CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = ${qqCXX_FOR_TARGET}%" \
-e "s%^TARGET_SUBDIR[ ]*=.*$%TARGET_SUBDIR = ${target_subdir}%" \
+ -e "s%^BUILD_SUBDIR[ ]*=.*$%BUILD_SUBDIR = ${build_subdir}%" \
+ -e "s%^BUILD_CONFIGARGS[ ]*=.*$%BUILD_CONFIGARGS = ${buildargs}%" \
-e "s%^gxx_include_dir[ ]*=.*$%gxx_include_dir=${gxx_include_dir}%" \
Makefile > Makefile.tem
rm -f Makefile
diff --git a/contrib/binutils/gas/CONTRIBUTORS b/contrib/binutils/gas/CONTRIBUTORS
index b3fd03e..68d11dc 100644
--- a/contrib/binutils/gas/CONTRIBUTORS
+++ b/contrib/binutils/gas/CONTRIBUTORS
@@ -2,7 +2,7 @@
If you've contributed to gas and your name isn't listed here, it is
not meant as a slight. I just don't know about it. Email me,
-raeburn@cygnus.com and I'll correct the situation.
+nickc@redhat.com and I'll correct the situation.
This file will eventually be deleted: The general info will go into
the documentation, and info on specific files will go into an AUTHORS
diff --git a/contrib/binutils/gas/ChangeLog b/contrib/binutils/gas/ChangeLog
index 03a8210..10a0688 100644
--- a/contrib/binutils/gas/ChangeLog
+++ b/contrib/binutils/gas/ChangeLog
@@ -1,5199 +1,332 @@
-2001-10-16 Alan Modra <amodra@bigpond.net.au>
+2002-01-26 Nick Clifton <nick@redhat.com>
- From Andrew Pines <apines@cosmodog.com>
- * config/tc-m68k.c (m68k_ip): Correct absolute jmp opcodes.
+ * po/fr.po: Updated version
-2001-10-05 Alan Modra <amodra@bigpond.net.au>
+2002-01-24 Kazu Hirata <kazu@hxi.com>
- * config/tc-i386.c (parse_register): If not producing code for
- x86_64, reject x86_64 register name matches.
- (md_assemble): Remove now redundant check for x86_64 regs.
+ * config/tc-h8300.c (check_operand): Don't print a warning
+ when a valid 24-bit address is given to a 16-bit address
+ operand.
-2001-09-30 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+2002-01-24 Alexandre Oliva <aoliva@redhat.com>
- * config/tc-m68hc11.c (cmp_opcode): Define prototype.
- (print_opcode_format, skip_whites): Likewise.
- (convert_branch, m68hc11_new_insn): Likewise.
- (build_dbranch_insn, build_indexed_byte): Likewise.
- (build_reg_mode, find, find_opcode): Likewise.
- (print_insn_format): Fix call to print_opcode_format.
- (md_assemble): Fix call to build_dbranch_insn.
+ * config/tc-sh.c (sh_elf_suffix): Removed.
+ (sh_PIC_related_p, sh_check_fixup, sh_cons_fix_new,
+ sh_end_of_match, sh_parse_name): New functions.
+ (sh_elf_cons): Simplify.
+ (parse_exp): Reject misplaced PIC operands.
+ (md_undefined_symbol): Simplify.
+ (sh_fix_adjustable): Let @GOTOFF be adjusted.
+ (md_apply_fix3): Write @PLT and @GOTOFF addends in place.
+ (tc_gen_reloc): Move fixp subsy absolute value into addnumber.
+ Complain if subsy remains at the end.
+ * config/tc-sh.h (sh_parse_name, sh_cons_fix_new): Declare.
+ (md_parse_name, TC_CONS_FIX_NEW, O_PIC_reloc): Define.
-2001-09-19 Andreas Schwab <schwab@suse.de>
+2002-01-22 Alexandre Oliva <aoliva@redhat.com>
- * config/tc-m68k.c: Include "dwarf2dbg.h".
+ * config/tc-mn10300.c (xr_registers): Move `pc'...
+ (other_registers): ... here.
-2001-08-29 Joel Sherrill <joel@OARcorp.com>
+2002-01-22 Alan Modra <amodra@bigpond.net.au>
- * configure.in (i[3456]86-*-rtems*, m68*-*-rtems*): Change
- default from coff to elf.
- * configure: Regenerate.
-
-2001-08-28 Philip Blundell <philb@gnu.org>
-
- * configure.in (sh-*-coff*, sh-*-rtems*): Set bfd_gas to yes.
- Patch from Joel Sherril <joel.sherrill@OARcorp.com>
- * configure: Regenerate.
-
-2001-07-21 Andreas Schwab <schwab@suse.de>
-
- * config/tc-m68k.c (md_pseudo_table) [OBJ_ELF]: Add .file and
- .loc.
- (md_assemble) [OBJ_ELF]: Call dwarf2_emit_insn before emitting
- insn.
- * config/tc-m68k.h (DWARF2_LINE_MIN_INSN_LENGTH): Define.
-
-2001-07-14 matthew green <mrg@eterna.com.au>
-
- * configure.in (i386-*-netbsdelf*): New target.
- * configure: Regenerate.
-
-2001-07-07 Nick Clifton <nickc@cambridge.redhat.com>
-
- * ecoff.c (add_file): Only set debug_type to DEBUG_NONE if it is
- DEBUG_UNSPECIFIED.
-
-2001-06-27 Nick Clifton <nickc@cambridge.redhat.com>
-
- * config/tc-arm.c (do_ldst): Use MVN to build simple inverted
- constants.
-
-2000-06-20 Tom Rix <trix@redhat.com>
-
- * config/tc-ppc.c (ppc_comm): Change default alignment to 4 bytes.
-
-2001-06-18 Philip Blundell <philb@gnu.org>
-
- * config/tc-arm.c (do_msr): Remove restriction on usage of
- immediate operands.
-
-2001-06-13 Philip Blundell <philb@gnu.org>
-
- * config/tc-arm.c (thumb_shift): Improve wording of error message.
- (do_t_arit): Likewise.
-
-2001-06-13 Nick Clifton <nickc@cambridge.redhat.com>
-
- * config/tc-sh.c (md_pseudo_table): Only intercept the .file and
- .loc pseudos if the dfwarf2 functions are available.
- (md_assemble): Only call dwarf2_emit_insn if it is available.
-
-2001-06-13 Nick Clifton <nickc@cambridge.redhat.com>
-
- Merge from mainline:
- 2001-05-11 Nick Clifton <nickc@cambridge.redhat.com>
- * config/tc-arm.c (arm_handle_align): When truncating an aligned
- block, ensure that the low order bits of the alignment are
- preserved.
- 2001-05-06 Nick Clifton <nickc@cambridge.redhat.com>
- * config/tc-arm.h (MAX_MEM_FOR_RS_ALIGN_CODE): Define.
- * config/tc-arm.c (arm_handle_align): Do not insert more than
- MAX_MEM_FOR_RS_ALIGN_CODE bytes.
- (arm_frag_align_code): Use MAX_MEM_FOR_RS_ALIGN_CODE.
- 2001-04-26 Nick Clifton <nickc@cambridge.redhat.com>
- * config/tc-arm.c (arm_handle_align): New Function: Generate
- no-op filled alignment frags.
- (arm_frag_align_code): New Function: Create a code alignment frag.
- (arm_init_frag): New Function: Initialse the target dependent
- parts of a frag.
- * config/tc-arm.h (TC_FRAG_TYPE): Define.
- (TC_FRAG_INIT): Define.
- (HANDLE_ALIGN): Define.
- (md_do_align): Define.
- 2001-03-12 Nick Clifton <nickc@redhat.com>
- * config/tc-arm.c (md_begin): Always set machine type based on
- cpu_variant.
- 2001-03-06 Nick Clifton <nickc@redhat.com>
- * config/tc-arm.c (md_apply_fix3): Clear bit zero of offset in
- BLX(1) instruction.
-
-2001-06-12 Nick Clifton <nickc@cambridge.redhat.com>
-
- * doc/as.texinfo (Infix Ops): Document that comparison and
- combiner operators can be used as infix operators.
-
-2001-06-12 Nick Clifton <nickc@cambridge.redhat.com>
-
- * config/tc-arm.c: Fix test for overlow of literal pool.
-
-2001-06-11 Alan Modra <amodra@bigpond.net.au>
-
- Merge from mainline.
- 2001-06-08 Alan Modra <amodra@bigpond.net.au>
- * config/tc-mips.c (mips16_mark_labels): Reduce number of calls to
- S_GET_VALUE by using a temp.
- (append_insn): Likewise, and for S_SET_VALUE too.
- (mips_emit_delays): Likewise.
- (my_getExpression): Likewise.
- (md_apply_fix): Likewise. Use "valueT" rather than "long" for "value".
- (mips16_extended_frag): Cater for first relaxation pass having
- bogus addresses. Use relax_marker to reliably determine whether a
- symbol frag has been reached on the current pass.
-
- 2001-06-07 H.J. Lu <hjl@gnu.org>
- * configure.in: Use MIPS_STABS_ELF for Linux/mips.
- * configure: Regenerate.
-
- 2001-06-07 H.J. Lu <hjl@gnu.org>
- * config/tc-mips.c (mips_pseudo_table): Add "extern" if
- MIPS_STABS_ELF is defined.
-
- 2001-06-06 Christian Groessler <cpg@aladdin.de>
- * config/tc-z8k.c: Removed many warnings by removing unused
- variables and tagging unused parameters as such.
- (md_begin): Fixed a typo (","instead of ";").
- (struct ctrl_table): Add parentheses to initialize array
- correctly.
- (struct flag_table): Likewise.
- (struct intr_table): Likewise.
- (struct table): Likewise.
- (check_operand): "#if 0"'ed since it doesn't seem to be used.
-
- 2001-06-06 Peter Jakubek <pjak@snafu.de>
- * gas/config/tc-m68k.c (md_show_usage): Add all supported ColdFire
- options to list (e.g. m5206e, m5307, m5407).
-
- 2001-06-06 Alan Modra <amodra@bigpond.net.au>
- * config/tc-i386.c (md_assemble): Handle Pentium4 branch hints.
- <JumpByte, JumpDword insn output>: Remove dead code.
-
- 2001-06-05 Nick Clifton <nickc@cambridge.redhat.com>
- * symbols.c (S_SET_EXTERNAL): Do not override a section symbol's
- status.
-
- 2001-05-27 Alan Modra <amodra@one.net.au>
- * config/tc-m68k.c (md_assemble): Ensure variable part of frag is
- allocated in the same chunk as the fixed part.
-
- 2001-05-25 Alan Modra <amodra@one.net.au>
- * configure.in: Replace linuxoldld with linux*oldld.
- * configure: Regenerate.
-
- 2000-05-24 Tom Rix <trix@redhat.com>
- * config/obj-coff.c (add_lineno): xcoff allows negative line
- numbers
- * config/tc-ppc.c (ppc_stabx): fix generated symbol
-
- 2001-05-23 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
- * config/tc-mips.c (ISA_HAS_64BIT_REGS): Add ISA_MIPS64 as 64 bit
- architecture, remove erraneous ISA_MIPS32.
- (md_show_usage): Add MIPS r12k support.
- (mips_cpu_info_table): Add MIPS r12k support.
-
- 2001-05-22 Alan Modra <amodra@one.net.au>
- * config/tc-m68k.c (relaxable_symbol): Only treat external symbols
- as relaxable if embedded system, make weak syms non-relaxable.
- Move definition..
- (tc_m68k_fix_adjustable): ..so it can be used here.
- (md_apply_fix_2): Sign extend without conditional.
-
- 2001-05-16 Jeff Johnston <jjohnstn@redhat.com>
- * cgen.c (gas_cgen_tc_gen_reloc): Changed error message when
- howto entry is not found.
-
- 2001-05-10 Alan Modra <amodra@one.net.au>
- * config/obj-vms.c (obj_crawl_symbol_chain): Don't take address of
- symbol_next.
- * config/tc-fr30.c (md_estimate_size_before_relax): Return size of
- current variable part of frag.
- * config/tc-m32r.c (md_estimate_size_before_relax): Likewise.
- * config/tc-m68hc11.c (RELAX_STATE): Define.
- (RELAX_LENGTH): Define.
- (md_estimate_size_before_relax): Handle non-relaxable cases
- separately from relaxable cases for clarity, and return correct
- size for multi-pass relaxation.
- * config/tc-tahoe.c (RELAX_LENGTH): Correct.
- (md_estimate_size_before_relax): As for tc-m68hc11.c.
- (md_convert_frag): Remove "length_code".
- * config/tc-vax.c (RELAX_STATE): Define.
- (RELAX_LENGTH): Define.
- (md_relax_table): Add missing entry.
- (md_estimate_size_before_relax): As for tc-m68hc11.c.
- (md_convert_frag): Remove "length_code".
- * config/tc-ns32k.c (md_estimate_size_before_relax): Simplify and
- don't bother setting fr_var. Return correct size for multi-pass
- relaxation.
- * config/tc-h8500.c (md_convert_frag): Don't bother clearing fr_var.
- (md_estimate_size_before_relax): No need to set fr_var.
- * config/tc-mcore.c (md_convert_frag): Don't bother clearing fr_var.
- (md_estimate_size_before_relax): No need to set fr_var.
-
- 2001-05-08 Andreas Schwab <schwab@suse.de>
- * config/tc-m68k.c: Instead of replacing -1 by 64 in assignment to
- fx_pcrel_adjust explicitly sign extend when reading it.
-
- 2001-05-03 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
- * Makefile.am (TARG_ENV_HFILES): Add te-hppa64.h and te-hppalinux64.h.
- Run "make dep-am".
+ * Makefile.am: Run "make dep-am".
* Makefile.in: Regenerate.
- * configure.in: Remove duplicate mips-*-ecoff* entry.
- * configure: Regenerate.
- * config/obj-ecoff.c (obj_pseudo_table): Fix terminating entry.
- (n_names): Cast away type mismatch.
- (ecoff_sec_sym_ok_for_reloc): Add unused attribute.
- (obj_ecoff_frob_symbol): Likewise.
- * ecoff.c: (add_file): Add unused attribute.
- (ecoff_directive_begin): Likewise.
- (ecoff_directive_bend): Likewise.
- (ecoff_directive_def): Likewise.
- (ecoff_directive_dim): Likewise.
- (ecoff_directive_scl): Likewise.
- (ecoff_directive_size): Likewise.
- (ecoff_directive_type): Likewise.
- (ecoff_directive_tag): Likewise.
- (ecoff_directive_val): Likewise.
- (ecoff_directive_endef): Likewise.
- (ecoff_directive_end): Likewise.
- (ecoff_directive_ent): Likewise.
- (ecoff_directive_extern): Likewise.
- (ecoff_directive_file): Likewise.
- (ecoff_directive_fmask): Likewise.
- (ecoff_directive_frame): Likewise.
- (ecoff_directive_mask): Likewise.
- (ecoff_directive_loc): Likewise.
- (mark_stabs): Likewise.
- (ecoff_stab): Likewise.
- (ecoff_frob_symbol): Cast away type mismatch.
- (ecoff_padding_adjust): Likewise.
- (ecoff_build_symbols): Likewise.
- (ecoff_build_procs): Likewise.
- (ecoff_build_aux): Likewise.
- (ecoff_build_strings): Likewise.
- (ecoff_build_fdr): Likewise.
- (ecoff_build_debug): Likewise.
- * itbl-ops.c (itbl_assemble): Variable initialization.
-
- 2001-04-29 Keith M Wesolowski <wesolows@foobazco.org>
- * config/tc-mips.c (md_parse_option): Also accept
- elf64-tradbigmips and elf64-tradlittlemips for OPTION_64.
-
- 2001-04-27 Sean McNeil <sean@mcneil.com>
- * configure.in: Add arm-vxworks.
- * configure: Regenerate.
-
- 2001-04-25 Nick Clifton <nickc@cambridge.redhat.com>
- * config/obj-coff.c (do_linenos_for): Check to see if the filename
- symbol has been initialised before extracting its symbol index.
-
- 2001-04-24 Christian Groessler <cpg@aladdin.de>
- * config/tc-z8k.c (build_bytes): 12 and 16 bit displacements now
- generate R_CALLR and R_REL16 relocations
-
- 2000-04-20 Jason Eckhardt <jle@redhat.com>
- * config/tc-d10v.h (tc_frob_label): Update the symbol's frag
- since frag_now can change after d10v_cleanup is called.
-
- 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
- * dwarf2dbg.c (process_entries): Don't optimize redundant line notes.
-
- 2001-04-07 Steven J. Hill <sjhill@cotw.com>
- * config/tc-mips.c: Support ELF64 for traditional MIPS targets.
- * Makefile.am: (TARG_ENV_HFILES): Add tc-mips.h.
- * Makefile.in: Regenerated.
- * configure.in: Use traditional MIPS targets for Linux/MIPS.
- * configure: Regenerated.
-
- 2001-04-05 Alan Modra <alan@linuxcare.com.au>
- * configure.in: Add h8500-*-coff and h8500-*-rtems targets.
- * configure: Regenerate.
- * config/tc-h8500.c (md_estimate_size_before_relax): Add missing
- cases, and always return size based on current fr_subtype.
- (md_begin): Move initialization of md_relax_table..
- (md_relax_table): ..to static initializer. Set rlx_length for
- UNDEF_WORD_DISP cases.
- * config/tc-w65.c (md_estimate_size_before_relax): Likewise.
- (md_begin): Likewise.
- (md_relax_table): Likewise.
- * config/tc-mcore.c (md_estimate_size_before_relax): Likewise.
- (md_relax_table): Set rlx_length for UNDEF_WORD_DISP cases.
- Set rlx_backward and rlx_forward to zero for unused states.
- * config/tc-sh.c (md_estimate_size_before_relax): Likewise.
- (md_relax_table): Set rlx_length for UNDEF_WORD_DISP cases.
- (UNCOND12, UNCOND32): Remove duplicate defines.
-
- 2001-03-30 Alan Modra <alan@linuxcare.com.au>
- * dwarf2dbg.c (dwarf2_directive_file): Fix warnings.
-
- 2001-03-30 Alan Modra <alan@linuxcare.com.au>
- * config/tc-sh.c (md_estimate_size_before_relax): Add extra
- do-nothing cases to switch to avoid abort on a second relaxation
- pass, and tidy code a little.
- * config/tc-h8500.c (md_estimate_size_before_relax): Likewise.
- * config/tc-w65.c (md_estimate_size_before_relax): Likewise.
- * config/tc-mcore.c (COND12, UNCD12): Rename to DISP12 throughout.
- (COND32, UNCD32): Rename to DISP32 throughout.
- (UNDEF_WORD_DISP): Renumber to 3.
- (md_estimate_size_before_relax): Add extra do-nothing cases.
- * config/tc-mn10200.c (md_estimate_size_before_relax): Rewrite.
- * config/tc-ns32k.c (md_estimate_size_before_relax): Add cases to
- handle word and dword branches.
-
- 2001-03-17 Alan Modra <alan@linuxcare.com.au>
- * read.c (do_org): Handle complex expressions.
- * cgen.c (gas_cgen_finish_insn): Likewise.
-
- 2001-03-15 Alexandre Oliva <aoliva@redhat.com>
- * config/tc-sh.c (parse_reg): Match capital MACH and MACL.
-
- 2001-03-06 Igor Shevlyakov <igor@windriver.com>
- * config/tc-m68k.c : Add 5407 to archs[] table.
- (HAVE_LONG_BRANCH): Add mcf5407.
- (select_control_regs): Recognize 5407.
-
- 2001-03-02 Richard Sandiford <rsandifo@redhat.com>
- * config/atof-ieee.c (TC_LARGEST_EXPONENT_IS_NORMAL): New macro.
- (gen_to_words): Print warnings if NaNs are found and the target CPU
- does not support them. Allow largest exponent to be used in normal
- numbers if TC_LARGEST_EXPONENT_IS_NORMAL evaluates to true.
-
- 2001-02-27 Alan Modra <alan@linuxcare.com.au>
- * configure.in (BFD_VERSION): New.
- (AM_INIT_AUTOMAKE): Use $BFD_VERSION.
- * configure: Regenerate.
-
- 2001-02-26 Mark Elbrecht <snowball3@bigfoot.com>
- * config/obj-coff.c [BFD_ASSEMBLER] (obj_coff_section): Set
- SEC_NEVER_LOAD when the 'n' flag is used.
- Add SEC_NEVER_LOAD to matchflags.
-
- 2001-02-24 Stephane Carrez <Stephane.Carrez@worldnet.fr>
- * symbols.c (decode_local_label_name): Initialize message_format
- only when an error is reported (perf pb due to I18N).
-
- 2001-02-23 H.J. Lu <hjl@gnu.org>
- * dwarf2dbg.c (dwarf2_directive_file): Call s_app_file (0) if
- BFD_ASSEMBLER is not defined.
-
- 2001-02-16 matthew green <mrg@redhat.com>
- * cgen.c (gas_cgen_md_apply_fix3): Support BFD_RELOC_64.
-
- 2001-02-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
- * config/tc-mips.c (macro): For M_LA_AB emit a
- BFD_RELOC_MIPS_CALL16 relocation or a
- BFD_RELOC_MIPS_CALL_HI16/BFD_RELOC_MIPS_CALL_LO16 pair instead of
- BFD_RELOC_MIPS_GOT16 and
- BFD_RELOC_MIPS_GOT_HI16/BFD_RELOC_MIPS_GOT_LO16, respectively for
- loading the jump register when generating SVR4_PIC code.
-
- 2001-02-10 Chris Demetriou <cgd@broadcom.com>
- * configure.in: Make 'mipself' and 'mipsecoff' emulations
- map to MIPS-specific files, as they used to do before the
- change on 2000-05-21.
- * configure: Regerate.
-
- 2001-02-10 Chris Demetriou <cgd@broadcom.com>
- * config/tc-mips.c (md_parse_option): Don't try to compile
- ELF-only option code if not ELF.
-
-2001-06-10 Philip Blundell <philb@gnu.org>
-
- * configure.in: Set version to 2.11.1.
- * configure: Regenerate.
-
-2001-06-07 Alan Modra <amodra@bigpond.net.au>
-
- * Most files: Update copyright notices.
-
-2001-06-06 Hans-Peter Nilsson <hp@axis.com>
-
- * config/tc-cris.c (cris_insn_first_word_frag): New.
- (md_assemble): Call cris_insn_first_word_frag to get the first
- frag in an insn, not frag_more. Don't call dwarf2_emit_insn at
- end. Drop variable insn_size.
- (gen_bdap): Call cris_insn_first_word_frag, not frag_more.
-
-2001-06-06 Nick Clifton <nickc@cambridge.redhat.com>
-
- * as.c (show_usage): Remove L from listing options. It is not a
- generic option.
-
-2001-06-06 Tracy Kuhrt <Tracy.Kuhrt@microchip.com>
-
- * as.c (parse_args): Correct option name "listing-lhs-width2".
-
-2001-05-30 Richard Henderson <rth@redhat.com>
-
- * read.c (emit_leb128_expr): Call md_cons_align.
-
-2001-05-28 Jeff Sturm <jsturm@one-point.com>
-
- * config/tc-sparc.c (md_apply_fix3): Handle BFD_RELOC_SPARC_UA16,
- BFD_RELOC_SPARC_UA32 and BFD_RELOC_SPARC_UA64.
- (tc_gen_reloc): Likewise.
- (sparc_cons_align): Don't clear sparc_no_align_cons.
- (cons_fix_new_sparc): Substitute BFD_RELOC_SPARC_UA{16|32|64} for
- BFD_RELOC_{16|32|64} iff sparc_no_align_cons is set.
-
-2001-05-23 Alan Modra <amodra@one.net.au>
-
- Merge from mainline.
- 2001-05-22 Alan Modra <amodra@one.net.au>
- * config/tc-arc.c (md_assemble): Use is_end_of_line instead of
- testing for NULs.
-
- 2001-05-16 Alan Modra <amodra@one.net.au>
- * config/tc-arc.c (md_assemble): Correct dwarf2_emit_insn param
- for 8 byte insns.
- * config/tc-i386.c (md_assemble): Call dwarf2_emit_insn before
- opcodes are output rather than after. Delete insn_size.
- * config/tc-v850.c (md_assemble): Similarly, but delete
- total_insn_size. Update copyright.
-
- 2001-05-03 Alan Modra <amodra@one.net.au>
- * config/tc-i386.c (i386_displacement): Call as_bad for bad GOTOFF
- expressions rather than triggering an assert.
-
- 2001-03-30 Alan Modra <alan@linuxcare.com.au>
- * config/tc-i386.c (UNCOND_JUMP, COND_JUMP, COND_JUMP86): Decrement.
- (md_relax_table): Remove first four unused entries. Increment
- rlx_length by one throughout table, and update comments to suit.
- (md_estimate_size_before_relax): Return size of current variable
- part of frag to reflect reality when relaxing more than once.
-
- 2001-03-25 Alan Modra <alan@linuxcare.com.au>
- * config/tc-i386.c (i386_scale): Accept an absolute expression for
- scale factor, and return the end of the expression.
- (i386_operand): Modify for above.
-
- 2001-03-13 Alan Modra <alan@linuxcare.com.au>
- * config/tc-i386.c (RELOC_ENUM): Define. Use throughout file.
- (NUM_FLAG_CODE): Define.
- (lex_got): New function.
- (got_reloc): New global var.
- (x86_cons_fix_new): New function.
- (x86_cons): New function.
- (i386_immediate): Use lex_got here, replacing inline code. Change
- "ignoring junk.." error message to "junk.."
- (i386_displacement): Likewise.
- * config/tc-i386.h (TC_PARSE_CONS_EXPRESSION): Define.
- (x86_cons): Declare.
- (TC_CONS_FIX_NEW): Define.
- (x86_cons_fix_new): Declare.
-
- 2001-03-07 Alan Modra <alan@linuxcare.com.au>
- * config/tc-i386.c (struct _i386_insn): Rename disp_reloc to reloc.
- (md_assemble) <smallest displacement>: Use correct field of i.op[]
- union.
- <JumpInterSegment output>: Use correct i.disp_reloc[].
- <immediate output>: Likewise.
-
- 2001-02-13 Alan Modra <alan@linuxcare.com.au>
- * doc/c-i386.texi (i386-Arch): Add "jumps"/"nojumps" blurb.
- Mention effect of < 386 architectures on jump promotion.
- (i386-Jumps): xref above. Don't assume long disp is 32 bits.
-
- * config/tc-i386.c (no_cond_jump_promotion): New.
- (set_cpu_arch): Parse "jumps" arch modifier.
- (insn_size): Modify usage comment.
- (ENCODE_RELAX_STATE): Reformat and protect macro arg.
- (SIZE_FROM_RELAX_STATE): Rename to DISP_SIZE_FROM_RELAX_STATE.
- (TYPE_FROM_RELAX_STATE): New define.
- (UNCOND_JUMP, COND_JUMP): Renumber.
- (md_relax_table): Reorder to suit.
- (COND_JUMP86): New define.
- (md_relax_table): Handle COND_JUMP86 cases. Add a few comments.
- (md_assemble): Create frag var for jumps of max size, encode relax
- state for COND_JUMP86.
- (md_estimate_size_before_relax): Handle COND_JUMP86 cases, and
- leave conditional jumps small if no_cond_jump_promotion.
- (md_convert_frag): Likewise.
-
- 2001-05-10 Alan Modra <amodra@one.net.au>
- * config/tc-v850.c (md_estimate_size_before_relax): Rewrite.
- (md_convert_frag): Don't bother clearing fr_var.
- (md_pseudo_table): Correct initialization.
-
- 2001-05-12 Peter Targett <peter.targett@arccores.com>
- * config/tc-arc.c: Update copyright and tidy source comments.
- (md_pseudo_table): Add directive .cpu back as an alias for
- .option. Add .file and .line for dwarf2 support.
- (arc_mach_type): Make bfd_mach_arc_6 default.
- (md_longopts): Add entry 'pre-v6' representing old command line
- option when assembling for 'arc5' core versions.
- (md_parse_option): Make OPTION_ARC same as OPTION_ARC6, for new
- default behaviour.
- (arc_code_symbol): Make symbol value for @h30 fixup expression
- equal to O_constant.
- (md_assemble): Call dwarf2_emit_insn.
- Include "dwarf2dbg2.h". Formatting fixes throughout file.
- * config/tc-arc.h (DWARF2_LINE_MIN_INSN_LENGTH): Define.
- * doc/c-arc.texi (ARC_CORE_DEFAULT): Update to new default.
-
- 2001-05-15 Alexandre Oliva <aoliva@redhat.com>
- * config/tc-mn10300.c (mn10300_force_relocation): Don't
- optimize differences between symbols in code sections to
- constants.
- (mn10300_fix_adjustable): Don't adjust to section+offset
- relocations pointing at symbols in code sections.
-
- 2001-05-14 Alexandre Oliva <aoliva@redhat.com>
- * config/tc-mn10300.c (md_assemble): Anchor dwarf2 line info
- before a relaxable insns.
-
- 2001-05-13 Alexandre Oliva <aoliva@redhat.com>
- * config/tc-mn10300.c (tc_gen_reloc): Don't reject differences
- between symbols if the base symbol is in the current section;
- emit a PC-relative relocation instead.
-
- 2001-05-09 Alexandre Oliva <aoliva@redhat.com>
- * config/tc-mn10300.c (md_apply_fix3): Accept PC-relative relocs.
-
- 2001-05-06 Alexandre Oliva <aoliva@redhat.com>
- * config/tc-mn10300.c (md_assemble): Subtract operand->shift
- from offset in non-pcrel operands too.
-
- 2001-04-14 Alexandre Oliva <aoliva@redhat.com>
- * config/tc-mn10300.c (md_assemble): Simplify offset adjustment of
- pc-relative relocations not placed at the end of the instruction.
-
- 2001-04-06 Alexandre Oliva <aoliva@redhat.com>
- * config/tc-mn10300.c (xr_registers): Added `pc'.
-
- 2001-03-30 Alan Modra <alan@linuxcare.com.au>
- * config/tc-mn10300.c (md_estimate_size_before_relax): Rewrite.
-
- 2001-02-23 Richard Sandiford <rsandifo@redhat.com>
- * config/tc-mn10300.c (md_apply_fix3): Don't mark a fixup as
- done if it's against a symbol.
-
- 2001-03-28 H.J. Lu <hjl@gnu.org>
- * read.c (equals): Set to local for COFF only if it hasn't been
- defined before.
-
- 2001-03-27 Nick Papadonis <nick@coelacanth.com>
- * read.c (equals): (for COFF) default symbols to being local.
-
- 2001-03-23 Richard Sandiford <rsandifo@redhat.com>
- * write.c (fix_new_exp): Print an error if passed a register.
-
- 2001-03-20 Alan Modra <alan@linuxcare.com.au>
- * frags.h (struct frag): Add relax_marker.
- * write.c (is_dnrange): Delete.
- (relax_frag): Use correct types for `aim', `target', `address'.
- Delete `offset', `was_address'. Test `relax_marker' instead of
- using fragile (and slow) address test.
- (relax_segment): Init and flip `relax_marker'.
-
- 2001-02-13 Ian Lance Taylor <ian@zembu.com>
- * write.c (is_dnrange): Stop as soon as the address becomes
- larger.
- (relax_frag): Add segment parameter. Only call symbol_get_frag
- once. Only call is_dnrange if the symbol is in the same segment,
- and the symbol address is larger.
- (relax_segment): Pass segment to md_relax_frag and relax_frag.
- * write.h (relax_frag): Update declaration.
- * config/tc-fr30.c (fr30_relax_frag): Add segment parameter. Pass
- it to relax_frag.
- * config/tc-m32r.c (m32r_relax_frag): Likewise.
- * config/tc-m32r.h (md_relax_frag): Add segment parameter.
- (m32r_relax_frag): Update declaration.
- * config/tc-mips.h (md_relax_frag): Add segment parameter.
- * config/tc-tic54x.h (md_relax_frag): Likewise.
- * doc/internals.texi (CPU backend): Update documentation for
- md_relax_frag.
-
- 2001-03-15 DJ Delorie <dj@redhat.com>
- * stabs.c (s_stab_generic): Don't corrupt the notes obstack by
- blindly freeing string if it isn't at the top of the obstack.
-
-2001-05-14 Richard Henderson <rth@redhat.com>
-
- * ehopt.c (eh_frame_convert_frag): Fix missed subtype adjustment
- last change.
-
-2001-05-14 Richard Henderson <rth@redhat.com>
-
- * ehopt.c (get_cie_info): Rename from eh_frame_code_alignment;
- also collect whether to expect an FDE augmentation.
- (check_eh_frame): Rewrite as a state machine. Track where in
- an FDE we are located, skip any augmentation.
- (eh_frame_estimate_size_before_relax): Get code alignment from
- the fragment subtype.
- (eh_frame_relax_frag, eh_frame_convert_frag): Likewise.
- * read.c (emit_leb128_expr): Call check_eh_frame.
-
-2001-05-09 Richard Henderson <rth@redhat.com>
-
- * config/tc-ia64.c (generate_unwind_image): Align the fragment
- beginning a function's unwind info block.
-
-2001-04-27 David Mosberger <davidm@hpl.hp.com>
-
- * config/tc-ia64.c (dot_spillmem_p): Fix output_spill_?sprel_p()
- argument passing order: predicate goes last, not first.
-
-2001-04-16 David O'Brien <obrien@FreeBSD.org>
-
- * configure.in: Add the em type for FreeBSD targets.
- * configure: Regenerate.
-
-2001-04-13 Jim Wilson <wilson@redhat.com>
-
- * tc-ia64.c (is_conditional_branch): Return true for br, brl, and br.
- excluding br.i.
-
-2001-04-02 Philip Blundell <philb@gnu.org>
-
- From 2001-03-17 Richard Henderson <rth@redhat.com>
- * dwarf2dbg.c (user_filenum, user_filenum_allocated): Remove.
- (dwarf2_directive_loc): Don't use them.
- (dwarf2_directive_file): Reject duplicate file definitions.
- (get_filenum): Zero allocated memory.
- (out_file_list): Complain about missing file definitions.
-
-2001-03-31 Alan Modra <alan@linuxcare.com.au>
-
- * listing.c (listing_listing): Enable listing on EDICT_NOLIST_NEXT
- for one line if not already enabled.
- * cond.c (s_elseif): Correct conditional assembly listing.
- (s_else): Likewise.
-
- * cond.c (s_endif): Correct handling of "if .. elseif .." trees.
- Don't abort on NULL current_cframe.
-
-2001-03-30 Richard Henderson <rth@redhat.com>
-
- * write.c (relax_seg, size_seg): Split from relax_and_size_seg.
- (write_object_file): Relax code then data, then size sections.
-
- * config/tc-i386.c (md_convert_frag): Don't die on local symbols
- that have been finalized.
-
-2001-03-28 Alan Modra <alan@linuxcare.com.au>
-
- * config/tc-hppa.c (DEFAULT_LEVEL): Define.
- (md_begin): Use it when setting default architecture.
-
-2001-03-27 Hans-Peter Nilsson <hp@axis.com>
-
- * configure.in (cris-*-*): Change default emulation to criself.
- (cris-*-*aout*): New rule.
- * configure: Regenerate.
-
-2001-03-19 Alan Modra <alan@linuxcare.com.au>
-
- * config/tc-i386.c (md_assemble <REGISTER_WARNINGS>): Correct
- used register name.
-
-2001-03-18 Stephane Carrez <Stephane.Carrez@worldnet.fr>
-
- * config/tc-m68hc11.c (md_pseudo_table): Recognize xrefb to comply
- with 'Motorola specification for assembly language input standard'.
-
-2001-03-18 Dave Brolley <brolley@redhat.com>
-
- * config/tc-m32r.c (expand_debug_syms): Call frag_align_code rather
- than m32r_do_align.
-
-2001-03-16 Philip Blundell <philb@gnu.org>
-
- * configure: Regenerate.
-
-2001-03-15 David Mosberger <davidm@hpl.hp.com>
-
- * config/tc-ia64.c (md): New member keep_pending_output.
- (ia64_flush_pending_output): Flush only if md.keep_pending_output
- is not set.
- (dot_xdata): Turn on md.keep_pending_output for the duration of
- this function.
- (dot_xfloat_cons): Ditto.
- (dot_xstringer): Ditto.
- (dot_xdata_ua): Ditto.
- (dot_xfloat_cons_ua): Ditto.
-
-2001-03-15 Jim Wilson <wilson@redhat.com>
-
- * config/tc-ia64.c (ia64_unrecognized_line, case '['): Add local
- label support.
-
-2001-03-11 Philip Blundell <philb@gnu.org>
-
- * configure.in: Set version to 2.11.
-
-2001-02-28 Andreas Jaeger <aj@suse.de>, Bo Thorsen <bo@suse.de>
-
- * config/tc-i386.c (tc_gen_reloc): Remove ugly hack which is not needed
- anymore since we use bfd_elf_generic_reloc now.
- (md_apply_fix3): Only apply hack for partial_inplace if not using RELA.
-
-2001-02-21 David Mosberger <davidm@hpl.hp.com>
-
- * config/tc-ia64.c (enum operand_match_result): New type.
- (operand_match): Change return type to operand_match_result.
- Fix all returns appropriately, adding support for returning the
- out-of-range result.
- (parse_operands): New locals result, error_pos, out_of_range_pos,
- curr_out_of_range_pos. Rewrite operand matching loop to give better
- error messages.
-
-2001-02-21 David Mosberger <davidm@hpl.hp.com>
-
- * config/tc-ia64.c (struct unwind): Add member "prologue_count".
- (dot_proc): Clear unwind.prologue_count to zero.
- (dot_prologue): Increment unwind.prologue_count.
- (dot_restore): If second operand is omitted, use
- unwind.prologue_count -1 for "ecount" (# of additional regions to
- pop). Decrement unwind.prologue_count by number of regions
- popped.
+ * gas/po/POTFILES.in: Regenerate.
-2001-02-20 Bo Thorsen <bo@suse.de>
+2002-01-21 DJ Delorie <dj@redhat.com>
- * config/tc-i386.c (tc_i386_fix_adjustable): Fix GOTPCREL GOT
- entry.
+ * config/obj-coff.c (obj_coff_init_stab_section): Make the
+ stabstr_name allocation permanent, as it will be referenced from
+ the section hash.
-2001-02-18 David O'Brien <obrien@FreeBSD.org>
+2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
- * configure.in (cpu_type, arch): Add a generic FreeBSD specification as
- all FreeBSD platforms should look the same at this level.
- * configure: Rebuilt.
- * config/tc-i386.c: Add support for old FreeBSD a.out hosts.
+ * configure.in (ia64-*-netbsd*): New target.
+ * configure: Regenerate.
-2001-02-14 Philip Blundell <pb@futuretv.com>
+2002-01-21 Hans-Peter Nilsson <hp@bitrange.com>
- From 2001-02-06 H.J. Lu <hjl@gnu.org>
- * config/tc-ia64.h (TC_RELOC_RTSYM_LOC_FIXUP): Do fixup if
- there is no relocation.
+ * doc/as.texinfo (Overview) <Target ARM options>: Add missing {}
+ to @dots call.
+ <Detailed description, ARM options>: Ditto.
+ * doc/c-arm.texi (ARM Options): Ditto.
- From 2001-02-06 H.J. Lu <hjl@gnu.org>
- * config/tc-ia64.h (TC_RELOC_RTSYM_LOC_FIXUP): New. Defined.
- * config/tc-ia64.c (md_parse_option): Only accept the valid
- ia64 options on "-axxx".
+2002-01-18 Richard Earnshaw <rearnsha@arm.com>
-2001-02-13 Alan Modra <alan@linuxcare.com.au>
+ * tc-arm.c (do_xsc_mia, do_xsc_mar, do_xsc_mra): Renamed from
+ do_mia, do_mar and do_mra respectively.
+ (do_mav_*): Renamed from do_c_*.
+ (mav_reg_required_here, mav_parse_offset): Renamed from
+ cirrus_reg_required_here and cirrus_parse_offset respectively.
+ (MAV_MODE?): Renamed from CIRRUS_MODE?.
- * expr.c (operator): Don't bump input_line_pointer for two char
- operators. Instead return operator size via new param num_chars.
- (expr): Use above to parse multi-char operators correctly.
+2002-01-18 Richard Earnshaw <rearnsha@arm.com>
+ Keith Walker <keith.walker@arm.com>
-2001-02-12 Philip Blundell <pb@futuretv.com>
+ * tc-arm.c (ARM_EXT_V5J, ARM_ARCH_V5TEJ): Define.
+ (insns): Add pattern for bxj instruction.
+ (do_bxj): New function.
+ (arm_cpus): Add arm926ej.
+ (arm_archs): Add armv5tej.
- * config/tc-arm.c (do_ldst): Improve warnings for unpredictable
- ldrt/strt instructions.
+2002-01-18 Richard Earnshaw <rearnsha@arm.com>
-Mon Feb 12 17:44:08 CET 2001 Jan Hubicka <jh@suse.cz>
+ * doc/c-arm.texi: Add new fpe options to list of supported flags.
- * tc-i386.c (i386_displacement): Fix handling of
- BFD_RELOC_X86_64_GOTPCREL.
- (i386_validate_fix): Likewise.
+2002-01-19 Keith Walker <keith.walker@arm.com>
-2001-02-09 David Mosberger <davidm@hpl.hp.com>
+ * tc-arm.c (arm_fpus): Add fpe2 and fpe3.
- * config/tc-ia64.h (md_elf_section_type): New macro.
- (ELF_TC_SPECIAL_SECTIONS): Drop .IA_64.unwind and .IA_64.unwind_info
- (they're now handled via ia64_elf_section_type.
+2002-01-18 Richard Earnshaw <rearnsha@arm.com>
- * config/tc-ia64.c (unwind): New members saved_text_seg,
- saved_text_subseg, and force_unwind_entry.
- (optimize_unw_records): New function to optimize away unnecessary
- unwind directives.
- (ia64_elf_section_type): New function.
- (output_unw_records): Generate unwind info only if the size is
- non-zero or if it's forced for some other reason (e.g.,
- handlerdata or a personality routine).
- (generate_unwind_image): Don't switch back to previous
- section---stay inside the unwind info section instead so that
- handlerdata that may follow goes into the right place.
- (dot_handlerdata): Force generation of unwind entry and save the
- current active text segment before generating unwind image.
- (dot_unwentry): Force generation of unwind entry.
- (dot_personality): Ditto.
- (dot_endp): Generate unwind table entry only if there is
- some unwind info or the unwind entry was forced.
+ * NEWS: Mention new ARM command-line options and VFP support.
- * config/tc-ia64.c (make_unw_section_name): New macro to form
- unwind section name.
- (generate_unwind_image): Add "text_name" argument. Use it to
- form unwind section name.
- (dot_handlerdata): Determine current segment (section) name and
- pass it to generate_unwind_image().
- (dot_endp): Determine current segment (section) name and use
- it to determine the appropriate unwind section name.
- (ia64_md_do_align): Add missing ATTRIBUTE_UNUSED declarations to
- n, fill, and max arguments.
+ * config/tc-arm.c (ARM_CEXT_XSCALE): Replaces ARM_EXT_XSCALE. All
+ uses changed.
+ (ARM_CEXT_MAVERICK): Similarly.
+ (ARM_ANY): Now means any core instruction.
+ (CPU_DEFAULT): Default to ARM_ANY.
+ (uses_apcs_26, atcps, support_interwork, uses_apcs_float)
+ (pic_code): Declare for all object types. Make type int.
+ (legacy_cpu, legacy_fpu, mcpu_cpu_opt, mcpu_fpu_opt, march_cpu_opt)
+ (march_fpu_opt, mfpu_opt): Declare.
+ (md_longopts): Tidy up conditional definitions.
+ (arm_opts, arm_cpus, arm_archs, arm_fpus, arm_extensions)
+ (arm_long_opts): New tables.
+ (arm_parse_cpu, arm_parse_arch, arm_parse_fpu): New functions.
+ (arm_parse_extension): New function.
+ (md_parse_option): Rewrite using new table-driven system.
+ (md_show_usage): Use new table-driven system.
+ (md_begin): Calculate cpu_variant from command line option data.
+ * doc/as.texinfo (ARM ISA options): Docuement new ARM-specific
+ command-line options.
+ * doc/c-arm.texi: Likewise.
-2001-02-09 Alexandre Oliva <aoliva@redhat.com>
+2002-01-18 Andreas Jaeger <aj@suse.de>
- * config/tc-sh.c (md_pseudo_table): Add uaquad. Use s_uacons for
- 2byte, 4byte and 8byte.
+ * as.c (parse_args): Update year.
-2001-02-08 Alan Modra <alan@linuxcare.com.au>
+2002-01-17 Timothy Wall <twall@alum.mit.edu>
- * config/tc-hppa.c (pa_build_unwind_subspace): Don't call
- md_number_to_chars with size > sizeof (valueT).
+ * config/tc-tic54x.c (encode_address): Add a more informative
+ warning about incorrect syntax.
-2001-02-05 Jim Wilson <wilson@redhat.com>
+2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
- * config/tc-ia64.c (errata_nop_necessary_p): Return 0 instead of
- aborting for invalid operands.
-
-2001-02-06 Alan Modra <alan@linuxcare.com.au>
-
- * config/tc-hppa.c (fix_new_hppa): Pass in unwind directly rather
- than via pointer. Update all callers.
- (UNWIND_LOW32): Define.
- (UNWIND_HIGH32): Define.
- (pa_build_unwind_subspace): Use the above macros instead of dumping
- bitfields directly. Call frag_more once rather than multiple times.
- (md_assemble): Use UNWIND_LOW32.
- (pa_entry): Likewise
- (pa_procend): Likewise.
- (process_exit): Use UNWIND_HIGH32.
-
-2001-02-04 Stephane Carrez <Stephane.Carrez@worldnet.fr>
-
- * config/tc-m68hc11.h (LISTING_HEADER): Use m68hc11_listing_header
- function to select the header according to the cpu.
- (md_after_pass_hook, md_do_align): Remove.
- (md_cleanup, m68hc11_cleanup): Remove.
- (md_pcrel_from_section): Declare.
- * config/tc-m68hc11.c (build_dbranch_insn): Remove insn_size.
- (build_jump_insn, build_insn): Likewise.
- (m68hc11_listing_header): New function.
- (m68hc11_cleanup): Remove.
-
-2001-02-02 Stephane Carrez <Stephane.Carrez@worldnet.fr>
-
- * config/tc-m68hc11.c (relaxable_symbol): Relax externally visible
- symbols because there is no support for shared libraries and these
- symbols can't be overridden (unless they are weak).
-
-2001-02-01 Momchil Velikov <velco@fadata.bg>
-
- * dwarf2dbg.c (out_debug_abbrev): Terminate the abbreviations
- for the compilation unit with a zero byte.
-
-2001-01-30 Alan Modra <alan@linuxcare.com.au>
-
- * config/tc-hppa.c (pa_ip): Support 12 bit branches to absolute
- destinations. Correct range check for 17 and 22 bit branches.
-
-2001-01-25 Nick Clifton <nickc@redhat.com>
-
- * config/tc-m68k.c (tc_gen_reloc): Do not abort if tcbit is
- still set. Issue an error message instead.
- (md_estimate_size_before_relax): Delete unused variable
- 'buffer_address'. Fixup parentheses around if statement.
-
-2001-01-23 Kazu Hirata <kazu@hxi.com>
-
- * as.c: Fix formatting.
- * ehopt.c: Likewise.
- * messages.c: Likewise.
- * stabs.c: Likewise.
- * symbols.c: Likewise.
-
-2001-01-23 Ben Elliston <bje@redhat.com>
-
- * config/tc-m32r.c (m32r_handle_align): Declare type of fragp.
-
-2001-01-22 Kazu Hirata <kazu@hxi.com>
-
- * config/tc-alpha.c: Fix formatting.
-
-2001-01-19 Kazu Hirata <kazu@hxi.com>
-
- * config/tc-alpha.c: Fix formatting.
-
-2001-01-18 Kazu Hirata <kazu@hxi.com>
-
- * config/tc-alpha.c: Fix formatting.
-
-2001-01-18 Nick Clifton <nickc@redhat.com>
-
- * config/tc-arm.c (ldm_flags): Remove redundant bit from "fa" and
- "da" flags.
- (stm_flags): Remove redundant bit from "ed" and "da" flags.
-
-2001-01-18 Alexandre Oliva <aoliva@redhat.com>
-
- * configure.in (cpu_type, arch): Match i386 too.
- * configure: Rebuilt.
-
-2001-01-16 Kazu Hirata <kazu@hxi.com>
-
- * config/tc-i386.c: Fix formatting.
-
-2001-01-16 Alan Modra <alan@linuxcare.com.au>
-
- * config/tc-hppa.c (tc_gen_reloc): Use SEGREL32 instead of DIR32
- relocs for .PARISC.unwind section.
-
- * config/tc-hppa.c (pa_build_unwind_subspace): Build unwind
- depending on section flags, not just for .text.
-
-2001-01-15 Jim Wilson <wilson@redhat.com>
-
- * config/tc-ia64.c (ia64_flush_insns): Handle unwind directives
- not immediately followed by an instruction.
-
-2001-01-15 Kazu Hirata <kazu@hxi.com>
-
- * config/tc-m68hc11.c: Fix formatting.
-
-2001-01-15 Nick Clifton <nickc@redhat.com>
-
- * symbols.c (colon): Change 'already defined symbol' from a
- fatal error to an ordinary error. There is no reason why this
- error should be fatal.
-
- * message.c (as_fatal): Delete output file, if one has been
- created.
-
-2001-01-14 Alan Modra <alan@linuxcare.com.au>
-
- * config/tc-hppa.h (TARGET_FORMAT): Add hppa-linux variants.
-
-2001-01-14 Kazu Hirata <kazu@hxi.com>
-
- * config/tc-alpha.c: Fix formatting.
- * config/tc-arc.c: Likewise.
- * config/tc-arc.h: Likewise.
- * config/tc-d10v.c: Likewise.
- * config/tc-i370.c: Likewise.
- * config/tc-i386.c: Likewise.
- * config/tc-i960.c: Likewise.
- * config/tc-m68k.c: Likewise.
- * config/tc-ppc.c: Likewise.
- * config/tc-sparc.c: Likewise.
- * config/tc-tahoe.c: Likewise.
- * config/tc-vax.c: Likewise.
-
- * config/tc-arc.c: Fix formatting.
-
- * config/tc-arc.c: Fix formatting.
-
-2001-01-14 Alan Modra <alan@linuxcare.com.au>
-
- * config/tc-hppa.c (pa_build_unwind_subspace): Use SEGREL32 for
- both 32 and 64 bit ELF.
-
- * config/tc-hppa.c (pa_ip): Store `a' flag in bit zero of operand
- and don't bother storing `m' for "ce" completer. Tidy handling of
- 'J' and 'K' operands to suit. Handle '<' and '>' operands.
-
-Sun Jan 14 00:36:42 MET 2001 Jan Hubicka <jh@suse.cz>
-
- * tc-i386.h (TARGET_MACH): New macro.
- (i386_mach): Declare.
- * tc-i386.c (i386_mach): New function.
-
-2001-01-13 Philip Blundell <philb@gnu.org>
-
- * doc/as.texinfo: Fix spelling and cross-references.
-
- * doc/c-arm.texi: Fix typos. Say that `;' is a line separator
- character for all systems, not just GNU/Linux. Make it explicit
- that `-k' doesn't affect code generation, just ELF flags.
-
-Sat Jan 13 01:47:35 MET 2001 Jan Hubicka <jh@suse.cz>
-
- * config/tc-i386.c (md_assemble): Check cpu_flags even for nullary
- instructions.
-
-2001-01-12 Frank Ch. Eigler <fche@redhat.com>
-
- * cgen.c (gas_cgen_finish_insn): Call dwarf2_emit_insn.
-
-2001-01-12 Nick Clifton <nickc@redhat.com>
-
- * as.c (print_args): Update copyright date to 2001.
-
-2001-01-12 Peter Targett <peter.targett@arccores.com>
-
- * doc/c-arc.texi: New file.
- Some sections to be expanded.
-
-2001-01-12 Alan Modra <alan@linuxcare.com.au>
-
- * config/tc-i386.c (md_longopts): Recognize "--64" only for ELF.
- (md_parse_option): Always accept "--32".
-
-2001-01-11 Peter Targett <peter.targett@arccores.com>
-
- * as.h (TC_ARC): Ensure struc-symbol.h included.
- * as.c (dwarf2dbg.h): Include to remove implicit declaration
- warnings.
- * struc-symbol.h (SYMBOLS_NEED_BACKPOINTERS): Define.
- (TARGET_SYMBOL_FIELDS) added.
-
- * doc/Makefile.am (CPU_DOCS): Added c-arc.texi.
- * doc/c-arc.texi: New file.
- Some sections to be expanded.
- * doc/as.texinfo: Update command-line options.
- Removed outdated text for ARC dependant features, instead include
- text from above file.
-
- * config/obj-elf.h (ELF_TARGET_SYMBOL_FIELDS): Define local flag.
- (TARGET_SYMBOL_FIELDS): Alias to previous definition.
- (targ-cpu.h) header.
- * config/tc-arc.h:
- * config/tc-arc.c: New updated configuration for
- ARC, including selection of core variants, and extensibility of
- instructions, registers etc. through directives.
-
- * config/tc-arc.c (arc_extinst): Minor corrections for
- error messages.
- (arc_common) Likewise. Make alignment argument optional for local
- symbols also, with default of zero.
-
-2001-01-11 Stephane Carrez <Stephane.Carrez@worldnet.fr>
-
- * config/tc-m68hc11.c (md_estimate_size_before_relax): Fix
- STATE_INDEXED_OFFSET when the symbol is undefined (16-bit offset).
- (build_indexed_byte): Don't relax indexed byte, use 16-bit offset
- and fix_new_exp() instead.
- (md_convert_frag): For indexed post byte use the symbol value
- rather than the displacement.
- (md_relax_table): Fix indexed offset relax.
-
-2001-01-11 Stephane Carrez <Stephane.Carrez@worldnet.fr>
-
- * config/tc-m68hc11.c (md_estimate_size_before_relax):Don't
- relax weak symbols.
- (relaxable_symbol): New function.
-
-2001-01-11 Andreas Jaeger <aj@suse.de>
-
- * config/tc-i386.h (TC_RELOC_GLOBAL_OFFSET_TABLE): Removed, it's
- not used anywhere.
-
-2001-01-10 Nick Clifton <nickc@redhat.com>
-
- * config/tc-arm.c (arm_fix_adjustable): Define for OBJ_COFF.
- * config/tc-arm.h (obj_fix_adjustable): Define for OBJ_COFF
-
-2001-01-10 Nick Clifton <nickc@redhat.com>
-
- * symbols.c (DOLLAR_LABEL_CHAR): New constant - the magic
- character used to dollar local symbols.
- (LOCAL_LABEL_CHAR): New constant - the magic character used to
- local label symbols.
- (dollar_label_name): Use DOLLAR_LABEL_CHAR.
- (fb_label_name): Prefix local labels with LOCAL_LABEL_PREFIX,
- if defined.
- Use LOCAL_LABEL_CHAR.
- (decode_local_label_name): Skip LOCAL_LABEL_PREFIX.
- Use DOLLAR_LABEL_CHAR and LOCAL_LABEL_CHAR.
- (S_IS_LOCAL): Use DOLLAR_LABEL_CHAR and LOCAL_LABEL_CHAR.
-
-2001-01-08 Bo Thorsen <bo@suse.de>
-
- * config/tc-i386.c (i386_immediate, i386_displacement):
- GOTPCREL check fix.
-
-2001-01-07 Ian Lance Taylor <ian@zembu.com>
-
- * doc/c-i386.texi (i386-Arch): Remove spaces incorrectly inserted
- in last change.
-
-2001-01-07 Philip Blundell <philb@gnu.org>
-
- * doc/as.texinfo (Bug Reporting): Update email address for
- reports.
- * README: Likewise.
-
-Sat Jan 6 13:33:10 MET 2001 Jan Hubicka <jh@suse.cz>
-
- * configure.in: Define DEFAULT_ARCH for i386.
- * tc-i386.c (md_assemble): Return after the error message;
- move testing for 64bit operands to proper place.
-
-2001-01-06 Jan Hubicka <jh@suse.cz>, Andreas Jaeger <aj@suse.de>
-
- * doc/as.texinfo: Document '#' as comment character for i386 and
- x86_64. Add AMD x86-64 into menu of machine dependent information.
-
- * doc/c-i386.texi: Document x86_64 extensions.
-
-Fri Jan 5 13:26:42 MET 2001 Jan Hubicka <jh@suse.cz>
-
- * tc-i386.c (md_assemble): Handle third byte of the opcode as prefix.
-
-Thu Jan 4 22:25:26 MET 2001 Jan Hubicka <jh@suse.cz>
-
- * tc-i386.c (cpu_arch): Add Pentium4 and modify sledgehammer entry.
- * NEWS: Add note about Pentium4 support.
-
-Wed Jan 3 17:26:32 MET 2001 Jan Hubicka <jh@suse.cz>
-
- * tc-i387.c (pi, pte, pt): Update.
- (type_names): Add new types.
-
-Wed Jan 3 16:26:52 MET 2001 Jan Hubicka <jh@suse.cz>
-
- * tc-i386.h (CpuK6, CpuAthlon, CpuSledgehammer, CpuMMX, Cpu3dnow,
- CpuUnknown): Renumber
- (CpuP4, CpuSSE2): New.
- (CpuUnknownFlags): Add CpuP4 and CpuSSE2
-
-2001-01-03 Philip Blundell <pb@futuretv.com>
-
- * config/tc-alpha.c (alpha_force_relocation): Handle vtable
- relocs.
- (alpha_fix_adjustable): Likewise.
- (md_apply_fix): Likewise.
-
-2000-12-31 H.J. Lu <hjl@gnu.org>
-
- * listing.c (listing_message): Allocate string only if it is
- used.
-
- * configure: Rebuild.
-
-2000-12-31 Hans-Peter Nilsson <hp@bitrange.com>
-
- * doc/internals.texi (Relaxing with a table) <after relaxation>:
- Point out caveats with generating fixups for the opcode in a frag.
-
-Sat Dec 30 19:02:48 MET 2000 Jan Hubicka <jh@suse.cz>
-
- * configure.in: Add support for x86_64 and x86_64-*-linux-gnu*
- * NEWS: Add x86_64.
-
-2000-12-29 H.J. Lu <hjl@gnu.org>
-
- * listing.c (calc_hex): Print the variable part only if the
- fragment type is rs_fill.
-
-2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
-
- * doc/internals.texi (tc_conditional_pseudoop,
- TC_LINKRELAX_FIXUP): Fix typos.
-
-2000-12-28 Richard Henderson <rth@redhat.com>
-
- * write.c (subsegs_finish): Fix thinko last change -- don't
- "optimize" the alignment == 0 case.
-
-2000-12-28 Richard Henderson <rth@redhat.com>
-
- * as.h (rs_align_test): New.
- * frags.c (NOP_OPCODE): Move default from read.c.
- (MAX_MEM_FOR_RS_ALIGN_CODE): New default.
- (frag_align_code): New.
- * frags.h (frag_align_code): Declare.
- * read.c (NOP_OPCODE): Remove.
- (do_align): Use frag_align_code.
- * write.c (NOP_OPCODE): Remove.
- (get_recorded_alignment): New.
- (cvt_frag_to_fill): Handle rs_align_test.
- (relax_segment): Likewise.
- (subsegs_finish): Align last subseg in section to the
- section alignment. Use frag_align_code.
- * write.h (get_recorded_alignment): Declare.
- * config/obj-coff.c (size_section): Handle rs_align_test.
- (fill_section, fixup_mdeps): Likewise.
- (write_object_file): Use frag_align_code.
-
- * config/tc-alpha.c (alpha_align): Use frag_align_code.
- (alpha_handle_align): New.
- * config/tc-alpha.h (HANDLE_ALIGN): New.
- (MAX_MEM_FOR_RS_ALIGN_CODE): New.
-
- * config/tc-i386.h (md_do_align): Use frag_align_code.
- (MAX_MEM_FOR_RS_ALIGN_CODE): New.
-
- * config/tc-ia64.c (ia64_md_do_align): Don't do code alignment.
- (ia64_handle_align): New.
- * config/tc-ia64.h (HANDLE_ALIGN): New.
- (MAX_MEM_FOR_RS_ALIGN_CODE): New.
-
- * config/tc-m32r.c (m32r_do_align): Remove.
- (m32r_handle_align): New.
- (fill_insn): Use frag_align_code.
- * config/tc-m32r.h (md_do_align): Remove.
- (HANDLE_ALIGN, MAX_MEM_FOR_RS_ALIGN_CODE): New.
- * config/tc-m88k.c, config/tc-m88k.h: Similarly.
- * config/tc-mips.c, config/tc-mips.h: Similarly.
-
- * config/tc-sh.c (sh_cons_align): Use rs_align_test.
- (sh_handle_align): Likewise. Handle rs_align_code.
- (sh_do_align): Remove.
- * config/tc-sh.h (md_do_align): Remove.
- (MAX_MEM_FOR_RS_ALIGN_CODE): New.
-
- * config/tc-sparc.c (sparc_cons_align): Use rs_align_test.
- (sparc_handle_align): Likewise. Handle rs_align_code.
- * config/tc-sparc.h (md_do_align): Remove.
- (MAX_MEM_FOR_RS_ALIGN_CODE): New.
-
-2000-12-22 DJ Delorie <dj@redhat.com>
-
- * config/tc-d10v.c (md_assemble): set prev_seg and prev_subseg
- when we assemble the first half of a pair.
-
-2000-12-22 H.J. Lu <hjl@gnu.org>
-
- * config/tc-i386.c (reloc): Update the macro for non-bfd
- assembler.
- (BFD_RELOC_X86_64_GOTPCREL): Set to 0 for non-bfd assembler.
-
-2000-12-22 H.J. Lu <hjl@gnu.org>
-
- * dwarf2dbg.c (dwarf2_finish): Remove #if BFD_ASSEMBLER.
-
-Wed Dec 20 14:21:22 MET 2000 Jan Hubicka <jh@suse.cz>
-
- * tc-i386.h (i386_target_format): Define even for ELFs.
- (QWORD_MNEM_SUFFIX): New macro.
- (CpuK6,CpuAthlon,CpuSledgehammer, Cpu64, CpuNo64, CpuUnknownFlags):
- New macros
- (CpuMMX,CpuSSE,Cpu3dnow, CpuUnknown): Renumber.
- (IgnoreSize, DefaultSize, No_?Suf, FWait, IsString, regKludge, IsPrefix,
- ImmExt): Renumber.
- (Size64, No_qSuf, NoRex64, Rex64): New macros.
- (Reg64, Imm32S, Imm64, Disp32S, Disp64): New macros.
- (Imm8, Imm8S, Imm16, Imm32, Imm1, BaseIndex, Disp8, Disp16, Disp32,
- InOutPortReg,ShiftCount, Control, Debug, Test, FloatReg, FloatAcc,
- SReg2, SReg3, Acc, JumpAbsolute, RegMMX, RegXMM, EsSeg, InvMem):
- Renumber.
- (Reg, WordReg): Add Reg64.
- (Imm): Add Imm32S and Imm64.
- (EncImm): New.
- (Disp): Add Disp64 and Disp32S.
- (AnyMem): Add Disp32S.
- (RegRex, RegRex64): New macros.
- (rex_byte): New type.
- * tc-i386.c (set_16bit_code_flag): Kill.
- (fits_in_unsigned_long, fits_in_signed_long): New functions.
- (reloc): New parameter "signed"; support x86_64.
- (set_code_flag): New.
- (DEFAULT_ARCH): New macro; default to "i386".
- (default_arch): New static variable.
- (struct _i386_insn): New fields Operand_PCrel; rex.
- (flag_16bit_code): Kill; All tests replaced to "flag_code == CODE_64BIT"
- (flag_code): New enum and static variable.
- (use_rela_relocations): New static variable.
- (flag_code_names): New static variable.
- (cpu_arch_flags): Default to CpuUnknownFlags|CpuNo64.
- (cpu_arch): Add "sledgehammer"; Add CPUAthlon to Athlon and CpuK6 to
- K6 and Athlon.
- (i386_align_code): Return plain "nop" for x86_64.
- (mode_from_disp_size): Support Disp32S.
- (smallest_imm_type): Support Imm32S and Imm64.
- (offset_in_range): Support size of 8.
- (set_cpu_arch): Do not clobber to Cpu64/CpuNo64.
- (md_pseudo_table): Add "code64"; use set_code_flat.
- (md_begin): Emit sane error message on hash failure.
- (tc_i386_fix_adjustable): Support x86_64 relocations.
- (md_assemble): Support QWORD_MNEM_SUFFIX, REX registers,
- instructions supported on particular arch just partially,
- output of 64bit immediates, handling of Imm32S and Disp32S type.
- (i386_immedaite): Support x86_64 relocations; support 64bit constants.
- (i386_displacement): Likewise.
- (i386_index_check): Cleanup; support 64bit addresses.
- (md_apply_fix3): Support x86_64 relocation and rela.
- (md_longopts): Add "32" and "64".
- (md_parse_option): Add OPTION_32 and OPTION_64.
- (i386_target_format): Call even for ELFs; choose between
- elf64-x86-64 and elf32-i386.
- (i386_validate_fix): Refuse GOTOFF in 64bit mode.
- (tc_gen_reloc): Support rela relocations and x86_64.
- (intel_e09_1): Support QWORD.
-
-2000-12-15 Diego Novillo <dnovillo@redhat.com>
-
- * config/tc-i386.c (intel_e09_1): Only flag as a memory operand if
- it's not an offset expression.
- (intel_e10_1): Ditto. Also, if the operand is an offset expression,
- keep the braces '[' and ']' in the output string.
- (intel_e11): Ditto. Also remove comparison intel_parser.op_modifier
- != FLAT. There is no such op_modifier.
-
-2000-12-14 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+ * po/gas.pot: Regenerate.
- * dwarf2dbg.c: If we don't have <limits.h>, try including <sys/param.h>
- if we have it.
+2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
-2000-12-13 Kazu Hirata <kazu@hxi.com>
+ * macro.c (get_any_string): Add no-c-format comment to prevent
+ confusion when translating string.
+ * gasp.c (get_any_string): Add no-c-format comment to prevent
+ confusion when translating string.
- * as.h: Fix formatting.
- * cgen.h: Likewise.
- * dwarf2dbg.c: Likewise.
- * input-scrub.c: Likewise.
- * read.h: Likewise.
+2002-01-16 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+ Johannes Stezenbach <js@convergence.de>
+ * config/tc-mips.c (percent_op): Ensure longer percent_op's are
+ matched before the shorter ones.
+ (my_getSmallParser): Fix handling of nested parentheses in
+ percent_op's. Code cleanup.
+ (my_getPercentOp): New function, code from my_getSmallParser.
+ (my_getSmallExpression): Fix handling of closing parentheses.
+ Code cleanup. Better comments.
-2000-12-13 Mark Elbrecht <snowball3@bigfoot.com>
+2002-01-16 Nick Clifton <nickc@redhat.com>
- * configure.in (i386-*-msdosdjgpp): Set bfd_gas to yes.
+ po/tr.po: New file: Turkish translation.
+ configure.in (LINGUAS): Add "tr".
configure: Regenerate.
-2000-12-13 Michael Sokolov <msokolov@ivan.Harhan.ORG>
-
- * dwarf2dbg.c: #include <limits.h> only if it exists.
-
-2000-12-13 Rodney Brown <RodneyBrown@mynd.com>
-
- * config/tc-hppa.c (pa_ip): Correct CHECK_FIELD typo.
- (md_apply_fix): Here too.
-
-2000-12-12 Jim Wilson <wilson@redhat.com>
-
- * config/tc-ia64.h (ia64_init): Add prototype.
-
-2000-12-12 H.J. Lu <hjl@gnu.org>
-
- * dwarf2dbg.c: Enabled only if BFD_ASSEMBLER is defined.
-
- * read.h (outputting_stabs_line_debug): Change it to int.
- * stabs.c (outputting_stabs_line_debug): Likewise.
-
-2000-12-12 Geoffrey Keating <geoffk@redhat.com>
-
- * config/obj-bout.c (obj_crawl_symbol_chain): Don't take
- the address of a function result.
-
-2000-12-12 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
-
- * config/tc-ppc.c (md_pseudo_table): Add .file and .loc.
- (md_assemble): Call dwarf2_emit_insn.
- (shlib): Fix typo SHILB -> SHLIB.
+2002-01-15 Richard Earnshaw <rearnsha@arm.com>
+
+ Support for VFP instructions
+ * tc-arm.c (CP_WB_OK, CP_NO_WB): New defines.
+ (cp_address_required_here): New argument wb_ok. When false, do not
+ accept write-back forms of addressing. Change all callers.
+ (FPU_VFP_EXT_NONE, FPU_VFP_EXT_V1xD, FPU_VFP_VFP_V1)
+ (FPU_VFP_EXT_V2): Define.
+ (FPU_ARCH_VFP, FPU_ARCH_VFP_V1xD, FPU_ARCH_VFP_V1, FPU_ARCH_VFP_V2):
+ Define in terms of above.
+ (vfp_dp_reg_pos, vfp_sp_reg_pos, vfp_ldstm_type): New enums.
+ (vfp_reg): New struct.
+ (vfp_regs): New array of registers.
+ (insns): Add VFP instructions.
+ (sn_table): New array of VFP single-precision register names.
+ (dn_table): New array of VFP double-precision register names.
+ (all_reg_maps): Add the new register tables.
+ (arm_reg_type): Add new values for above. Increase RET_TYPE_MAX.
+ (vfp_sp_reg_required_here, vfp_dp_reg_required_here, do_vfp_sp_monadic)
+ (do_vfp_dp_monadic, do_vfp_sp_dyadic, do_vfp_dp_dyadic)
+ (do_vfp_reg_from_sp, do_vfp_sp_reg2, do_vfp_sp_from_reg)
+ (do_vfp_reg_from_dp, do_vfp_reg2_from_dp, do_vfp_dp_from_reg)
+ (do_vfp_dp_from_reg2, vfp_psr_parse, vfp_psr_required_here)
+ (do_vfp_reg_from_ctrl, do_vfp_ctrl_from_reg, do_vfp_sp_ldst)
+ (do_vfp_dp_ldst, vfp_sp_reg_list, vfp_dp_reg_list, vfp_sp_ldstm)
+ (vfp_dp_ldstm, do_vfp_sp_ldstmia, do_vfp_sp_ldstmdb, do_vfp_ldstmia)
+ (do_vfp_dp_ldstmdb, do_vfp_xp_ldstmia, do_vfp_xp_ldstmdb)
+ (do_vfp_sp_compare_z, do_vfp_dp_compare_z, do_vfp_dp_sp_cvt)
+ (do_vfp_sp_dp_cvt): New functions.
+ (md_begin): Set soft-float flag for appropriate VFP work.
+ (md_atof): Handle VFP-format doubles.
+ (md_parse_option): Handle VFP command-line options.
+ (md_show_usage): Display VFP command-line options.
+
+2002-01-15 Richard Earnshaw <rearnsha@arm.com>
+
+ * tc-arm.c (md_parse_option): Tidy up setting of cpu_variant for
+ various command line options.
+
+2002-01-15 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * config/tc-xstormy16.c: (xstormy16_fix_adjustable): Do not fix
+ vtinherit relocs.
+ (xstormy16_md_apply_fix3): Do not return a value.
+
+2002-01-14 Richard Earnshaw <rearnsha@arm.com>
+
+ * tc-arm.c (md_longopts): On targets that aren't bi-endian, support
+ the -EL/-EB option that matches the target's endianness.
(md_parse_option): Likewise.
- (ppc_elf_validate_fix): Likewise:
- * config/tc-ppc.h (DWARF2_LINE_MIN_INSN_LENGTH): New.
-
-2000-12-12 Nick Clifton <nickc@redhat.com>
-
- * cgen.h: Fix formatting.
- * input-scrub.c: Fix formatting.
- * macro.c: Fix formatting.
- * config/tc-mips.c: Fix formatting.
- * doc/c-mips.texi: Fix formatting.
-
-Mon Dec 11 14:35:42 MET 2000 Jan hubicka <jh@suse.cz>
-
- * tc-i386.c (md_assemble): Refuse 's' and 'l' suffixes in the intel
- mode; convert 'd' suffix to 's' or 'l'; remove all DWORD_MNEM_SUFFIX
- references.
- (intel_e09_1): Convert QWORD to 'l' suffix for FP operations; refuse
- otherwise.
- * tc-i386.h (DWORD_MNEM_SUFFIX): Kill.
- (No_dSuf): Kill.
-
- * i386.h (*_Suf): Remove No_dSuf.
- (d_suf, wld_Suf,sld_Suf, sldx_Suf, bwld_Suf, d_FP, sld_FP, sldx_FP)
- Remove.
- (i386_optab): Remove 'd' in the suffixes.
-
-2000-12-06 Mark Elbrecht <snowball3@bigfoot.com>
-
- * config/tc-i386.c (T_SHORT): Undefine before defining.
-
-2000-12-05 Kazu Hirata <kazu@hxi.com>
-
- * config/tc-mips.c: Fix formatting.
-
-2000-12-04 Matthew Hiller <hiller@redhat.com>
-
- * config/tc-d10v.c (flag_allow_gstabs_packing): New variable.
- (md_longopts): New options --gstabs-packing, --no-gstabs-packing.
- (md_show_usage): Ditto.
- (md_parse_option): Ditto.
- (d10v_cleanup): Writes pending instruction only if
- ! outputting_stabs_line_debug || ! flag_allow_gstabs_packing.
- Fix compile time warning messages.
-
- * doc/c-d10v.texi: Documents new options.
-
-2000-12-04 Matthew Hiller <hiller@redhat.com>
-
- * stabs.c (outputting_stabs_line_debug): New variable.
- (stabs_generate_asm_lineno): Set outputting_stabs_line_debug at
- function entry and unset at function exit.
-
- * read.h (outputting_stabs_line_debug): New extern declaration.
-
- * as.c: Include dwarf2dbg.h for definition of dwarf2_finish.
-
- * dwarf2dbg.c: Fix compile time warning messages.
-
-2000-12-03 Kazu Hirata <kazu@hxi.com>
-
- * config/tc-a29k.c: Fix formatting.
- * config/tc-alpha.c: Likewise.
- * config/tc-arm.c: Likewise.
- * config/tc-cris.c: Likewise.
- * config/tc-hppa.c: Likewise.
- * config/tc-i370.c: Likewise.
- * config/tc-i386.c: Likewise.
- * config/tc-i860.c: Likewise.
- * config/tc-i960.c: Likewise.
- * config/tc-ia64.c: Likewise.
- * config/tc-m68hc11.c: Likewise.
- * config/tc-m68k.c: Likewise.
- * config/tc-m88k.c: Likewise.
- * config/tc-pj.c: Likewise.
- * config/tc-ppc.c: Likewise.
- * config/tc-sh.c: Likewise.
- * config/tc-sparc.c: Likewise.
- * config/tc-tahoe.c: Likewise.
- * config/tc-vax.c: Likewise.
-
-2000-12-01 Chris Demetriou <cgd@sibyte.com>
-
- * config/tc-mips.c (mips_ip): When calculating offsets,
- don't accept as constant the difference between the
- addresses of symbols in two different sections.
-
- * config/tc-mips.c (macro_build): Add new 'U' and 'J' operand
- specifiers.
- (validate_mips_insn): Likewise. Also, update 'B' operand
- specifier to use OP_*_CODE20 constants and delete 'm' operand
- specifier.
- (mips_ip): Remove 'm' operand specifier, add 'U' and 'J'
- operand specifiers. Change warning generated by 'B' operand
- specifier to reflect its new multi-purpose usage.
-
- * config/tc-mips.c (mips_set_options): Use ISA_UNKNOWN rather than
- -1, and update comment.
- (file_mips_isa): Likewise.
- (mips_cpu): Use CPU_UNKNOWN rather than -1, and update comment.
- (ISA_HAS_COPROC_DELAYS, ISA_HAS_64BIT_REGS, gpr_interlocks): Use
- ISA_* constants rather than hard-coded numbers.
- (mips_cpu_info): New structure.
- (mips_cpu_info_table): New table describing CPU and ISA names
- and numbers.
- (mips_cpu_info_from_name, mips_cpu_info_from_isa,
- mips_cpu_info_from_cpu): New functions.
- (mips_isa_to_str): New function to get string for ISA name.
- (mips_cpu_to_str): Convert to use mips_cpu_info_from_cpu, and
- return const char *.
- (md_begin): Redo CPU and ISA selection logic, using
- mips_cpu_info_from_*. Convert to use ISA_* constants rather
- than hard-coded numbers.
- (append_insn, mips_emit_delays, macro, macro2): Convert to use
- ISA_* constants rather than hard-coded numbers.
- (mips_ip): Convert to use mips_isa_to_str to get ISA name.
- (md_longopts): Delete OPTION_NO_MIPS32.
- (md_parse_option): Convert to use ISA_* constants rather than
- hard-coded numbers. Make OPTIONS_MIPS32 case treat MIPS32
- as an ISA. Delete OPTION_NO_MIPS32 case. Convert OPTION_MCPU
- to use strcasecmp to recognize "default" and to use
- mips_cpu_info_from_name to get CPU numbers from argument.
- (md_show_usage): Move -mips32 so it's with the rest of the ISA
- flags. Change 4Kc, 4Kp and 4Km CPU entries to just be
- mips32-4k.
- (s_mipsset): Accept ISA value 32.
- * doc/as.texinfo: Clean up MIPS options summary slightly,
- remove -no-mips32. Add note about -mips4 and -mips32
- specifying those ISA levels. Delete -mips32 and -no-mips32
- cpu flag descriptions.
- * doc/c-mips.texi: Add -mips32 to list of ISA switches. Clean
- up the supported CPU switch list, and replace 4Kc, 4Km, and
- 4Kp entries with a single mips32-4k entry. Note that you can
- use ".set mips32".
-
- * tc-mips.c (ISA_HAS_64BIT_REGS): Add checks for ISA_MIPS5 and
- ISA_MIPS64.
- (md_longopts, OPTION_MIPS5, OPTION_MIPS64): Add options for
- -mips5 and -mips64.
- (md_parse_option): Add cases for OPTION_MIPS5 and
- OPTION_MIPS64.
- (md_show_usage): Mention -mips5 and -mips64 arguments.
- (s_mipsset): Add cases for MIPS5 and MIPS64.
- (mips_cpu_info_table): Add entries for MIPS5 and MIPS64 ISAs
- and pseudo-CPUs.
- * doc/as.texinfo: Mention -mips5 and -mips64 options
- and their meanings.
- * doc/c-mips.texi: Likewise. Also update introduction
- and ".set" usage information.
-
- * config/tc-mips.c (md_show_usage): Add "sb1" to the
- CPU list.
- (mips_cpu_info_table): Add SB-1 entries.
- * doc/c-mips.texi: Add "sb1" to the list of CPUs
- known to the -mcpu option.
-
- * doc/as.texinfo: Correct description of MIPS -mcpu
- option, by copying some of the text from doc/c-mips.texi.
-
-2000-12-01 Joel Sherrill <joel@OARcorp.com>
-
- * configure.in (arm-*-rtems*, a29k-*rtems*, h8300-*-rtems*):
- New targets.
- (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
- (sparc*-*-rtems*): Switched from a.out to ELF.
- * configure: Regenerate.
- * config.in: Regenerate.
- * Makefile.in: Regenerate.
- * aclocal.m4: Regenerate.
- * po/gas.pot: Regenerate.
-
-2000-11-30 Philip Blundell <pb@futuretv.com>
-
- * config/obj-coff.c (obj_coff_weak): Use S_SET_WEAK if it exists,
- even in non BFD_ASSEMBLER case.
-
-2000-11-30 Diego Novillo <dnovillo@redhat.com>
-
- * tc-i386.c (md_assemble): Swap i.disp_relocs when using intel
- syntax.
-
-2000-11-29 Richard Henderson <rth@redhat.com>
-
- * dwarf2dbg.c: Rewrite from scratch. Queue all debugging output
- until dwarf2_finish; use relaxation to get cross-fragment offsets;
- thread multiple subsegments properly; handle multiple code
- sections properly; emit proper compilation unit info for assembler
- generated debugging.
-
- * as.h (enum _relax_state): Add rs_dwarf2dbg.
- * dwarf2dbg.h (struct dwarf2_line_info): Remove filename.
- (dwarf2dbg_estimate_size_before_relax): Declare.
- (dwarf2dbg_relax_frag, dwarf2dbg_convert_frag): Declare.
- * write.c: Include dwarf2dbg.h.
- (cvt_frag_to_fill): Handle rs_dwarf2dbg.
- (relax_segment): Likewise.
-
-2000-11-28 Hans-Peter Nilsson <hp@bitrange.com>
-
- * config/tc-sh.c (md_convert_frag) <undefined symbol, conditional
- jump>: Use as_bad_where instead of as_bad. Tweak error message
- accordingly. Stabilize frag by updating fix part and resetting
- variant part.
- <undefined symbol, unconditional jump>: Ditto.
- (sh_elf_cons): Cast *input_line_pointer to unsigned char when
- indexing is_end_of_line[].
- (md_assemble): Initialize size to 0.
- (md_section_align): Mark parameter seg as unused.
- (parse_reg): Parse names case-insensitively.
-
-2000-11-28 Kazu Hirata <kazu@hxi.com>
-
- * config/obj-aout.h: Fix formatting.
- * config/obj-bout.h: Likewise.
- * config/obj-coff.c: Likewise.
- * config/obj-coff.h: Likewise.
- * config/obj-elf.h: Likewise.
- * config/obj-som.h: Likewise.
- * config/obj-vms.c: Likewise.
- * config/obj-vms.h: Likewise.
- * config/tc-h8300.h: Likewise.
- * config/tc-ns32k.h: Likewise.
- * config/tc-sparc.h: Likewise.
- * config/tc-tic54x.h: Likewise.
- * config/tc-z8k.h: Likewise.
-
-2000-11-28 Nick Clifton <nickc@redhat.com>
-
- * doc/as.1 (COPYING): Mention that the GNU Free Documentation
- License is present in the sources, but not the output, and
- also available from the GNU website.
- (GNU Free Documentation License): Comment out this section.
-
-2000-11-28 Hans-Peter Nilsson <hp@axis.com>
-
- * Makefile.am (CPU_OBJ_VALID): Add case to filter out invalid coff
- targets. Remove i860 from valid a.out targets.
- * Makefile.in: Regenerate.
-
- * config/tc-cris.c: Include dwarf2dbg.h.
- (md_pseudo_table): Add .file and .loc.
- (md_assemble): Call dwarf2_emit_insn if generating ELF.
- (s_cris_file, s_cris_loc): New.
- * config/tc-cris.h (DWARF2_LINE_MIN_INSN_LENGTH): Define.
- * Makefile.am: Regenerate dependencies.
- * Makefile.in: Regenerate.
-
-2000-11-28 Alan Modra <alan@linuxcare.com.au>
-
- * expr.c (STANDARD_MUL_PRECEDENCE): Correct value.
- (MRI_MUL_PRECEDENCE): Likewise.
- (op_rank): Fix a comment typo.
-
-2000-11-26 Stephane Carrez <Stephane.Carrez@worldnet.fr>
-
- * config/tc-m68hc11.c (build_indexed_byte): Print the offset in
- the error message.
- (get_operand): Fix analysis for movw/movb instructions.
-
-2000-11-24 Nick Clifton <nickc@redhat.com>
-
- * configure.in (xscale-elf): Add target.
- (xscale-coff): Add target.
- * configure: Regenerate.
-
- * config/tc-arm.c (ARM_EXT_V5E): New ARM architecture
- extenstion.
- (ARM_EXT_XSCALE): New ARM architecture extension.
- (ARM_LONGMUL): Rename to ARM_EXT_LONGMUL.
- (ARM_HALFWORD): Rename to ARM_EXT_HALFWORD.
- (ARM_THUMB): Rename to ARM_EXT_THUMB.
- (ARM_ARCH_V4): Remove processor from architecture.
- (ARM_ARCH_3M): New architecutre definition.
- (ARM_ARCH_V5TE): New architecutre definition.
- (ARM_ARCH_XSCALE): New architecutre definition.
- (CPU_DEFAULT): Allow to be defaulted to XScale.
- (atpcs): New boolean variable.
- (ldr_flags): Support 'd' flag for double word loads.
- (str_flags): Support 'd' flag for double word stored.
- (do_mia): New function.
- (do_mar): New function.
- (do_mra): New function.
- (do_pld): New function.
- (do_ldrd): New function.
- (do_blx): New function.
- (do_bkpt): New function.
- (do_clz): New function.
- (do_lstc2): New function.
- (do_cdp2): New function.
- (do_t_blx): New function.
- (do_t_bkpt): New function.
- (do_smla): New function.
- (do_smlal): New function.
- (do_smul): New function.
- (do_qadd): New function.
- (do_co_reg2c): New function.
- (LONGEST_INSN): Redefine to 7.
-
- * doc/c-arm.texi: Document -mxscale, -mmarmv5te and -matpcs
- command line switches.
-
-2000-11-22 Jim Wilson <wilson@redhat.com>
-
- * config/tc-ia64.c (pseudo_func): Add missing initializers.
- (struct rsrc): Make line unsigned.
- (gr_values): Add missing initializer.
- (SLOT_NUM_NOT_SET): Add unsigned cast.
- (ia64_elf_section_flags, output_vbyte_mem, count_output, dot_radix,
- dot_fframe, dot_vframe, dot_vframesp, dot_vframepsp, dot_save,
- dot_restore, dot_restorereg, dot_restorereg_p, dot_handlerdata,
- dot_unwentry, dot_altrp, dot_saveg, dot_savef, dot_saveb, dot_savegf,
- dot_spill, dot_spillreg, dot_spillreg_p, dot_label_state,
- dot_copy_state, dot_unwabi, dot_personality, dot_proc, dot_body,
- dot_prologue, dot_endp, dot_regstk, dot_psr, dot_alias, dot_ln,
- dot_reg_val, dot_entry, dot_mem_offset, ia64_init, mark_resource,
- md_undefined_symbol, md_apply_fix3, tc_gen_reloc, ia64_md_do_align):
- Add ATTRIBUTE_UNUSED to unused parameters.
- (convert_expr_to_ab_reg): Add parens.
- (convert_expr_to_xy_reg): Add parens. Comment out >= REG_GR test.
- (dot_prologue): Initialize grsave when declared.
- (md_pseudo_table): Add missing initializers.
- (operand_match): Add casts to bfd_vma.
- (emit_one_bundle): Delete unused local prev. Make required_template
- unsigned.
- (specify_resource): Cast i to unsigned.
- (note_register_values): Use fprintf_vma.
- (print_dependency): Likewise.
-
-2000-11-21 Jim Wilson <wilson@redhat.com>
-
- * config/tc-ia64.c (generate_unwind_image): Call record_alignment
- for unwind info section.
- (dot_endp): Likewise for unwind section.
-
- * config/tc-ia64.c (emit_one_bundle): Pass size of 8 not 4 to
- fix_new_exp.
-
-2000-11-21 Jakub Jelinek <jakub@redhat.com>
-
- * config/tc-sparc.c (md_pseudo_table): Add .file and .loc.
- (output_insn): Call dwarf2_emit_insn.
- * config/tc-sparc.h (DWARF2_LINE_MIN_INSN_LENGTH): New.
-
-2000-11-17 Richard Henderson <rth@redhat.com>
-
- * ehopt.c (eh_frame_code_alignment): New arg `in_seg', update all
- callers. Don't switch segments. Expect CIE == -1 in .debug_frame.
- (check_eh_frame): Handle .eh_frame and .debug_frame concurrently.
-
-2000-11-17 Nick Clifton <nickc@redhat.com>
-
- * config/tc-arm.c (md_pseudo_table): Add support for .line and
- .file pseudo ops.
-
-2000-11-17 Richard Henderson <rth@redhat.com>
-
- * config/tc-i386.c (md_pseudo_table): Add .file and .loc.
-
-2000-11-17 Richard Henderson <rth@redhat.com>
-
- * dwarf2dbg.c (dwarf2_gen_line_info): Early out for no line number.
- * config/obj-elf.h (ECOFF_DEBUGGING) [TC_ALPHA]: Adjust for
- tri-state definition of alpha_flag_mdebug.
- * config/tc-alpha.c (alpha_flag_mdebug): Init to -1.
- (s_alpha_file): Store first .file directive.
- (s_alpha_stab): New.
- (md_pseudo_table): Add stabs and stabn.
-
-2000-11-17 Richard Henderson <rth@redhat.com>
-
- * config/tc-i386.c (md_assemble): Call dwarf2_emit_insn.
-
-2000-11-17 Richard Henderson <rth@redhat.com>
-
- * as.c (debug_type): Init to DEBUG_UNSPECIFIED.
- (main): Call dwarf2_finish.
- * as.h (debug_type): Clarify documentation of the meaning
- of this variable.
- * dwarf2dbg.c (DWARF2_LINE_MIN_INSN_LENGTH): Default to 1.
- (print_stats): Fix parenthesis problem.
- (now_subseg_size): New.
- (dwarf2_finish): Use it. If DEBUG_DWARF2, emit bits for .debug_info.
- (dwarf2_directive_file): Don't set debug_type.
- (dwarf2_where): Honor DEBUG_DWARF2 first.
- (dwarf2_emit_insn): Renamed from dwarf2_generate_asm_lineno;
- do nothing if not emitting dwarf2 debug info, or no work.
- * dwarf2dbg.h (dwarf2_emit_insn): Update.
- * ecoff.c (add_file): Turn on DEBUG_ECOFF only if DEBUG_UNSPECIFIED.
- (ecoff_new_file): Likewise.
- * read.c (generate_lineno_debug): Kill ecoff hackery. Update
- commentary wrt dwarf2.
-
- * config/tc-alpha.c (alpha_adjust_symtab_relocs): Add
- ATTRIBUTE_UNUSED as needed.
- (emit_insn): Call dwarf2_emit_insn.
- (s_alpha_file): New.
- (s_alpha_loc): New.
- (s_alpha_coff_wrapper): Don't handle them.
- (md_pseudo_table): Update for .file and .loc.
- * config/tc-alpha.h (DWARF2_LINE_MIN_INSN_LENGTH): New.
-
- * config/tc-arm.c (output_inst): Update for dwarf2_emit_insn;
- don't protect with debug_type.
- * config/tc-hppa.c (md_assemble): Likewise.
- * config/tc-m68hc11.c (m68hc11_new_insn): Likewise.
- * config/tc-mn10300.c (md_assemble): Likewise.
- * config/tc-sh.c (md_assemble): Likewise.
- * config/tc-v850.c (md_assemble): Likewise.
-
- * config/tc-arm.c (arm_end_of_source): Remove.
- * config/tc-hppa.c (pa_end_of_source): Remove.
- * config/tc-m68hc11.c (m68hc11_end_of_source): Remove.
- * config/tc-mn10300.c (mn10300_finalize): Remove.
- * config/tc-sh.c (sh_finalize): Remove.
- * config/tc-v850.c (sh_finalize): Remove.
-
- * config/tc-arm.h (md_end): Remove.
- * config/tc-hppa.h (md_end): Remove.
- (DWARF2_LINE_MIN_INSN_LENGTH): New.
- * config/tc-m68hc11.h (md_end): Remove.
- * config/tc-mn10300.h (md_end): Remove.
- * config/tc-sh.h (md_end): Remove.
- * config/tc-v850.h (md_end): Remove.
-
- * config/tc-ia64.c (emit_one_bundle): Don't protect
- dwarf2 bits with debug_type.
- (md_assemble): Likewise.
- (ia64_end_of_source): Don't call dwarf2_finish.
-
-2000-11-16 Jim Wilson <wilson@redhat.com>
-
- * config/tc-ia64.c (errata_nop_necessary_p): Abort if general regno
- >= 128 instead of > 128. Abort if predicate regno is >= 64 instead of
- > 16.
-
-2000-11-16 H.J. Lu <hjl@gnu.org>
-
- * config/obj-elf.c (obj_elf_symver): Don't check the missing
- version name.
-
-2000-11-15 Kazu Hirata <kazu@hxi.com>
-
- * config/tc-tic30.c: Fix formatting.
- * config/tc-tic80.c: Likewise.
- * config/tc-v850.c: Likewise.
- * config/tc-vax.c: Likewise.
- * config/tc-w65.c: Likewise.
- * config/tc-z8k.c: Likewise.
-
-2000-11-14 DJ Delorie <dj@redhat.com>
-
- * config/tc-v850.c: Support dwarf2.
- * config/tc-v850.h: Ditto.
-
- * config/tc-v850.c (cons_fix_new_v850): Don't rely on
- parse_cons_expression_v850 to initialize hold_cons_reloc.
-
-2000-11-15 Bernd Schmidt <bernds@redhat.com>
-
- * tc-ia64.c (struct md): New entries LAST_GROUPS, GROUP_IDX.
- (errata_nops_necessary_p): New function.
- (emit_one_bundle): Call it. Update the GROUP_IDX field in struct
- md.
-
-2000-11-14 Jim Wilson <wilson@redhat.com>
-
- * config/tc-ia64.c (ia64_target_format): If EF_IA_64_BE not set, then
- return little endian bfd formats.
-
-2000-11-14 Kazu Hirata <kazu@hxi.com>
-
- * config/aout_gnu.h: Fix formatting.
- * config/atof-vax.c: Likewise.
- * config/m68k-parse.h: Likewise.
- * config/m88k-opcode.h: Likewise.
- * config/obj-elf.c: Likewise.
- * config/tc-arm.c: Likewise.
- * config/tc-cris.c: Likewise.
- * config/tc-i386.c: Likewise.
- * config/tc-ia64.c: Likewise.
- * config/tc-mn10300.c: Likewise.
- * config/te-386bsd.h: Likewise.
- * config/te-hppa.h: Likewise.
- * config/te-nbsd.h: Likewise.
- * config/te-ppcnw.h: Likewise.
- * config/te-sparcaout.h: Likewise.
- * config/te-tmips.h: Likewise.
- * config/vax-inst.h: Likewise.
- * config/vms-conf.h: Likewise.
-
-2000-11-14 Jakub Jelinek <jakub@redhat.com>
-
- * config/tc-alpha.c (s_alpha_prologue): Preserve visibility bits.
-
-2000-11-13 H.J. Lu <hjl@gnu.org>
-
- * config/obj-elf.c (elf_frob_symbol): Support
- ".symver name,name2@@@nodename".
- (elf_frob_file_before_adjust): Likewise.
-
- * doc/as.texinfo: Updated for ".symver name,name2@@@nodename"
- and ".symver name,name2@@@nodename".
- Fix a typo.
-
-2000-11-12 H.J. Lu (hjl@gnu.org)
-
- * config/obj-elf.c (obj_elf_symver): Check missing version
- name.
-
-2000-11-12 H.J. Lu (hjl@gnu.org)
-
- * dwarf2dbg.c (dwarf2_generate_asm_lineno): Use addressT
- instead of bfd_vma for non-bfd assemblers.
-
-2000-11-09 Kazu Hirata <kazu@hxi.com>
-
- * itbl-ops.c: Fix comment typos.
-
-2000-11-08 Jim Wilson <wilson@redhat.com>
-
- * config/tc-ia64.c (struct unw_rec_list): Add slot_frag field.
- (struct unwind): Add next_slot_frag field.
- (slot_index): New parameters slot_frag and first_frag. Add code
- to add in frag sizes when different. Add comments.
- (fixup_unw_records): New locals first_frag and last_frag. Pass new
- arguments to slot_index.
- (emit_one_bundle): Set slot_frag field. Set next_slot_number after
- loop end. Set next_slot_frag field.
-
-2000-11-07 H.J. Lu <hjl@gnu.org>
-
- * doc/as.texinfo (.symver): Updated for versioned symbol
- reference.
-
- * obj.h (format_ops): Add the frob_file_before_adjust field.
-
- * config/obj-aout.c (aout_format_ops): Set the
- frob_file_before_adjust field to 0.
- * config/obj-coff.c (coff_format_ops): Likewise.
- * config/obj-ecoff.c (ecoff_format_ops): Likewise.
-
- * config/obj-elf.c (obj_elf_symver): Allow duplicated version
- name.
- (elf_frob_file_before_adjust): New function to remove unneeded
- versioned symbols from the symbol table.
- (elf_format_ops): Set the frob_file_before_adjust field to
- elf_frob_file_before_adjust.
-
- * config/obj-elf.h (obj_frob_file_before_adjust): Defined if
- not defined.
-
- * config/obj-multi.h (obj_frob_file_before_adjust): Defined.
-
-2000-11-07 Peter Targett <peter.targett@arccores.com>
-
- * gas/config/tc-arc.h: Avoid warnings for LITTLE_ENDIAN and
- BIG_ENDIAN macros.
- * gas/config/tc-arc.c: Use S_IS_LOCAL to test local symbols.
- Fix compile time warning messages.
-
-2000-11-07 Nick Clifton <nickc@redhat.com>
-
- * stabs.c (generate_asm_file): Increase length of xmalloc'ed
- buffer in order to avoid buffer overflows.
-
-2000-11-06 Steve Ellcey <sje@cup.hp.com>
-
- * config/tc-ia64.c (md_shortopts, md_parse_option, md_show_usage):
- Change M to m for -milp32 or -mlp64 to match gcc.
- (dot_endp): Use bytes_per_address instead of 8.
- (emit_one_bundle): Use number_to_chars_littleendian instead of
- md_number_to_chars.
- (fix_insn): Likewise.
- (ia64_init): New function.
- (ia64_target_format): New function.
- (md_begin): Set endianness, arch, and machine as appropriate.
- * config/tc-ia64.h: (TARGET_BYTES_BIG_ENDIAN, md_number_to_chars):
- Make these macros depend on TE_HPUX macro.
- (TARGET_FORMAT): Define.
- (HOST_SPECIAL_INIT): Define.
- * config/te-hpux.h: New file.
- * configure.in: Add "ia64-*-hpux*" target to configure.
- * configure: Regenerate.
-
-2000-11-06 Kazu Hirata <kazu@hxi.com>
-
- * as.c: Fix formatting.
- * dwarf2dbg.c: Likewise.
- * input-file.c: Likewise.
- * input-file.h: Likewise.
- * input-scrub.c: Likewise.
- * itbl-ops.c: Likewise.
- * listing.c: Likewise.
- * macro.h: Likewise.
- * messages.c: Likewise.
- * read.c: Likewise.
- * subsegs.c: Likewise.
- * subsegs.h: Likewise.
- * write.c: Likewise.
-
-2000-11-06 Nick Clifton <nickc@redhat.com>
-
- * doc/as.texinfo: Add GNU Free Documentation License.
- * doc/gasp.texi: Add GNU Free Documentation License.
- * doc/as.1: Add GNU Free Documentation License.
-
-2000-11-05 Nick Clifton <nickc@redhat.com>
-
- * config/tc-arm.c: Add include of "dwarf2dbg.h"
-
-2000-11-02 Per Lundberg <plundis@chaosdev.org>
-
- * configure.in: Recognise i[3456]86-chaosdev-storm-chaos.
- * configure: Regenerate.
-
-2000-11-01 Nick Clifton <nickc@redhat.com>
-
- * read.c (original_case_string): New global variable.
- (read_a_source_file): Copy opcode string into
- original_case_string if clobbering the case of the opcode.
- * read.h: Export the definition of original_case_string.
- * config/tc-arm.c (md_assembler): When parsing a .req
- directive use the original opcode string, not the case
- clobbered version.
-
-2000-11-02 Nick Clifton <nickc@redhat.com>
-
- * config/tc-mn10300.c (debug_line): Remove this static
- variable.
- (md_assemble): Call dwarf2_generate_asm_lineno instead of
- dwarf2_where and dwarf2_gen_line_info.
-
-2000-11-02 Theo Honohan <th@futuretv.com>
-
- * config/tc-arm.c (do_msr): Improve error message.
-
-2000-10-31 Eric Christopher <echristo@redhat.com>
-
- * config/tc-mn10300.c (md_apply_fix3): Use valuep if fully resolved
- or pc-relative, else use fx_offset.
-
-2000-10-31 Jim Wilson <wilson@redhat.com>
-
- * config/tc-ia64.c (struct md): New field tag_fixups.
- (ia64_flush_insns): Handle tag_fixups. Error if dangling
- qualifying predicate.
- (emit_one_bundle): Delete spurious multiplication by one. Handle
- tag_fixups.
- (ia64_start_line): Error if dangling qualifying predicate.
- (defining_tag): New static variable.
- (ia64_unrecognized_line, case '['): Parse tags.
- (ia64_frob_label): Create tag_fixups.
- (md_assemble): Reset md.qp.X_op after using it.
-
-2000-10-31 Kaz Kojima <kkojima@rr.iij4u.or.jp>
-
- * config/tc-sh.c (md_apply_fix [BFD_RELOC_SH_PCDISP12BY2]): Allow 4094.
-
-2000-10-31 Bernd Schmidt <bernds@redhat.co.uk>
-
- * tc-ia64.c (extra_goodness): Only prefer F in slot 1 and B in slot 2.
-
-2000-10-30 Kazu Hirata <kazu@hxi.com>
-
- * expr.c: Fix formatting.
- * flonum-copy.c: Likewise.
- * flonum.h: Likewise.
- * gasp.c: Likewise.
- * hash.c: Likewise.
-
-2000-10-30 Hans-Peter Nilsson <hp@bitrange.com>
-
- * as.h (OPTION_MD_BASE): Bump to 190.
- * as.c (parse_args) <std_longopts>: Add comment about the need to
- check OPTION_MD_BASE in as.h.
-
- * config/tc-sh.c (md_apply_fix): For ELF, do not "adjust back" VAL
- for weak symbols.
-
-2000-10-27 Nick Clifton <nickc@redhat.com>
-
- * configure.in (emulations): Add m68hc12.
- * configure: Regenerate.
- * po/gas.pot: Regenerate.
-
-2000-10-27 Aldy Hernandez <aldyh@redhat.com>
-
- * config/tc-arm.c (psrs): Remove lowercase versions of spsr* and
- cpsr*.
- (arm_psr_parse): Handle lowercase CPSR and SPSR.
-
-2000-10-25 Nick Clifton <nickc@redhat.com>
-
- * dwarf2out.c (dwarf2_generate_asm_lineno): New function: Generate
- a DWARF2 line number information sequence.
-
- *dwarf2out.h: Add prototype for dwarf2_generate_asm_lineno.
-
- * read.c (generate_lineno_debug): Update comment describing why
- DWARF2 line number debug information is not generated
- automatically by this function.
-
- * doc/as.texinfo: Note that --gdwarf2 only works on some targets,
- not all.
-
- * config/tc-arm.h (md_end): Define.
- (DWARF2_LINE_MIN_INSN_LENGTH): Define.
-
- * config/tc-arm.c (output_inst): Call dwarf2_generate_asm_lineno
- if generating DWARF2 line numbers.
- (arm_end_of_source): New function. Call dwarf2_finish if
- necessary.
-
- * config/tc-hppa.c (md_assemble): Use dwarf2_generate_asm_lineno.
- * config/tc-m68hc11.c (m68hc11_new_insn): Use dwarf2_generate_asm_lineno.
- * config/tc-sh.c (md_assemble): Use dwarf2_generate_asm_lineno.
-
-2000-10-25 Diego Novillo <dnovillo@cygnus.com>
-
- * tc-i386.c: Fix prototype declarations for functions taking no
- arguments.
-
-2000-10-24 Diego Novillo <dnovillo@cygnus.com>
-
- * tc-i386.c (i386_operand_modifier): Remove.
- (build_displacement_string): Remove.
- (i386_parse_seg): Remove.
- (i386_intel_memory_operand): Remove.
- (i386_intel_operand): Re-write using recursive descent parser based
- on MASM documentation.
- (struct intel_parser_s): New structure.
- (intel_parser): New static variable.
- (struct intel_token): New structure.
- (cur_token, prev_token): New static variables.
- (T_NIL): Define.
- (T_CONST): Define.
- (T_REG): Define.
- (T_BYTE): Define.
- (T_WORD): Define.
- (T_DWORD): Define.
- (T_QWORD): Define.
- (T_XWORD): Define.
- (T_SHORT): Define.
- (T_OFFSET): Define.
- (T_PTR): Define.
- (T_ID): Define.
- (intel_match_token): New function.
- (intel_get_token): New function.
- (intel_putback_token): New function.
- (intel_expr): New function.
- (intel_e05): New function.
- (intel_e05_1): New function.
- (intel_e06): New function.
- (intel_e06_1): New function.
- (intel_e09): New function.
- (intel_e09_1): New function.
- (intel_e10): New function.
- (intel_e10_1): New function.
- (intel_e11): New function.
-
-2000-10-20 Jakub Jelinek <jakub@redhat.com>
-
- * config/tc-sparc.c (sparc_ip): Fix a bug which caused v9_arg_p
- instructions to loose any special insn->architecture mask.
-
- * config/tc-sparc.c (v9a_asr_table): Add v9b ASRs.
- (sparc_md_end, sparc_arch_types, sparc_arch,
- sparc_elf_final_processing): Handle v8plusb and v9b architectures.
- (sparc_ip): Handle siam mode operands. Support v9b ASRs (and
- request v9b architecture if they are used).
-
-2000-10-18 Michael Sokolov <msokolov@ivan.Harhan.ORG>
-
- * config/tc-m68k.c: Fix the previous misapplied patch.
-
-2000-10-18 Michael Sokolov <msokolov@ivan.Harhan.ORG>
-
- * config/tc-m68k.h (RELAX_RELOC_*): New definitions for both
- BFD_ASSEMBLER and !BFD_ASSEMBLER.
- * config/tc-m68k.c (md_convert_frag_1): Use them instead of
- BFD_RELOC_*.
-
-2000-10-17 Kazu Hirata <kazu@hxi.com>
-
- * debug.c: Fix formatting.
- * depend.c: Likewise.
- * dwarf2dbg.c: Likewise.
- * dwarf2dbg.h: Likewise.
- * ecoff.c: Likewise.
- * expr.c: Likewise.
- * expr.h: Likewise.
- * flonum-konst.c: Likewise.
- * frags.h: Likewise.
-
-2000-10-17 Chandrakala Chavva <cchavva@redhat.com>
-
- * as.c: New option OPTION_TARGET_HELP. Prints all target specific
- options.
- * doc/as.texinfo: Added notes about this new option.
-
-2000-10-16 Hans-Peter Nilsson <hp@bitrange.com>
-
- * config/tc-sh.c (JREG): Remove.
- (md_convert_frag): Remove #if 0:d code using JREG.
-
-2000-10-15 Diego Novillo <dnovillo@cygnus.com>
-
- * config/tc-i386.c (i386_operand_modifier): Only match
- modifiers SHORT and FLAT if they are followed by a space.
- (parse_register): When `allow_naked_reg' is set, do not confuse
- identifiers that start with a register name with a register.
-
-2000-10-12 Kazu Hirata <kazu@hxi.com>
-
- * app.c: Fix formatting.
- * as.c: Likewise.
- * as.h: Likewise.
- * bit_fix.h: Likewise.
- * cgen.c: Likewise.
- * cgen.h: Likewise.
- * cond.c: Likewise.
-
-2000-10-11 Alan Modra <alan@linuxcare.com.au>
-
- * config/obj-elf.c (elf_frob_symbol): Revert 2000-10-07 change.
-
-2000-10-07 Alan Modra <alan@linuxcare.com.au>
-
- * config/tc-hppa.c (md_apply_fix): Remove plainly wrong assert.
- Re-arrange function a little and improve error message.
-
- * write.c (write_relocs): Fix a comment.
-
- * config/obj-elf.c (elf_frob_symbol): Make section syms global on
- link-once sections.
-
-2000-10-05 Jim Wilson <wilson@cygnus.com>
-
- * config/tc-ia64.c (resources_match): Handle IA64_RS_PRr.
-
-2000-10-05 Alan Modra <alan@linuxcare.com.au>
-
- * config/tc-i386.c: Delete some useless comments, reformat others.
-
- * config/tc-i386.h (TC_FIX_ADJUSTABLE): Add check to cover
- non-global syms in linkonce sections.
-
-2000-10-04 Ralf Baechle <ralf@gnu.org>
-
- * config/tc-ia64.c (operand_match): Don't use // style comments.
- * config/tc-i370.c: Likewise.
-
-2000-09-29 Hans-Peter Nilsson <hp@axis.com>
-
- Changes to handle varying register prefix and user symbol prefix.
- * config/tc-cris.c (SYNTAX_RELAX_REG_PREFIX,
- SYNTAX_ENFORCE_REG_PREFIX, SYNTAX_USER_SYM_LEADING_UNDERSCORE,
- SYNTAX_USER_SYM_NO_LEADING_UNDERSCORE, REGISTER_PREFIX_CHAR): New.
- (s_syntax, cris_force_reg_prefix, cris_relax_reg_prefix,
- cris_sym_leading_underscore, cris_sym_no_leading_underscore): New.
- (demand_register_prefix): New variable.
- (md_pseudo_table): New pseudo ".syntax".
- (md_longopts): New options --no-underscore and --underscore.
- (cris_target_format): Return elf32-us-cris or elf32-cris depending
- on symbols_have_leading_underscore.
- (get_gen_reg): Accept or require REGISTER_PREFIX_CHAR.
- (get_spec_reg): Ditto.
- (cris_number_to_imm) <case BFD_RELOC_VTABLE_ENTRY>: Remove FIXME.
- Fix formatting.
- (md_parse_option) <case 'h' 'H'>: Deprecate; add reference to
- --help.
- <case OPTION_NO_US, case OPTION_US>: New.
- (md_show_usage): Be brief and reformat to match continuation of
- --help.
- * po/gas.pot: Regenerate.
-
-2000-09-28 Alan Modra <alan@linuxcare.com.au>
-
- * config/tc-hppa.c (hppa_force_relocation): If OBJ_SOM, don't
- force relocs for 12 bit branches.
- (md_apply_fix): Similarly, adjust logic here.
-
-2000-09-28 Alan Modra <alan@linuxcare.com.au>
-
- * config/tc-hppa.c (md_apply_fix): Add fmt assertion. Don't
- adjust for external and weak syms as we will use a reloc. Allow
- for +8 offset when calculating limits of branches.
- (hppa_fix_adjustable): Undo 2000-09-23 change.
- (hppa_force_relocation): Likewise. Add fx_addsy assertion.
- Correct distance calculation.
- (tc_gen_reloc): Print the file name and line number if we can't
- handle a fixup.
-
- From John David Anglin <dave@hiauly1.hia.nrc.ca>
- * config/tc-hppa.c (nonzero_dibits): Define.
- (arg_reloc_stub_needed): Check each arg and return value
- separately for zero case.
- (pa_align): Declare argument `bytes'.
-
-2000-09-25 Kazu Hirata <kazu@hxi.com>
-
- * config/tc-cris.c: Fix formatting.
- * config/tc-d10v.h: Likewise.
- * config/tc-d30v.c: Likewise.
- * config/tc-d30v.h: Likewise.
- * config/tc-fr30.c: Likewise.
- * config/tc-fr30.h: Likewise.
- * config/tc-m68k.c: Likewise.
- * config/tc-m68k.h: Likewise.
- * config/tc-pj.h: Likewise.
- * config/tc-ppc.c: Likewise.
- * config/tc-ppc.h: Likewise.
- * config/tc-sh.c: Likewise.
- * config/tc-sh.h: Likewise.
- * config/tc-sparc.c: Likewise.
- * config/tc-v850.h: Likewise.
- * config/tc-vax.h: Likewise.
- * config/tc-w65.h: Likewise.
- * config/tc-z8k.h: Likewise.
-
-2000-09-23 Alan Modra <alan@linuxcare.com.au>
-
- * config/tc-hppa.c (hppa_fix_adjustable): Do the external and weak
- checks only for ELF.
- (hppa_force_relocation): Likewise.
-
-2000-09-22 Jim Wilson <wilson@cygnus.com>
-
- * config/tc-ia64.c (dv_sem): Add "stop".
- (specify_resource, case IA64_RS_PR): Only handles regs 1 to 15 now.
- (specify_resource, case IA64_RS_PRr): New for regs 16 to 62.
- (specify_resource, case IA64_RS_PR63): Reorder (note == 7) test to
- match above.
- (mark_resources): Check IA64_RS_PRr.
-
-2000-09-22 Michael Sokolov <msokolov@ivan.Harhan.ORG>
-
- * config/tc-m68k.c (md_relax_table, m68k_ip, md_convert_frag_1,
- md_estimate_size_before_relax): Redesign and clean up the
- relaxation mechanism.
-
-2000-09-21 Kazu Hirata <kazu@hxi.com>
-
- * config/tc-ns32k.c: Fix formatting.
- * config/tc-ns32k.h: Likewise.
-
-2000-09-20 Kazu Hirata <kazu@hxi.com>
-
- * config/tc-m32r.c: Fix formatting.
- * config/tc-m32r.h: Likewise.
- * config/tc-m68851.h: Likewise.
- * config/tc-m68hc11.c: Likewise.
- * config/tc-m68hc11.h: Likewise.
- * config/tc-m88k.c: Likewise.
- * config/tc-mcore.c: Likewise.
- * config/tc-mcore.h: Likewise.
- * config/tc-mips.c: Likewise.
- * config/tc-mips.h: Likewise.
- * config/tc-mn10200.h: Likewise.
- * config/tc-mn10300.h: Likewise.
- * config/tc-tahoe.c: Likewise.
- * config/tc-tahoe.h: Likewise.
-
-2000-09-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
-
- * config/tc-vax.c (synthetic_votstrs): Remove jbssi and jbcci.
- Likewise in relaxation description comments.
-
-2000-09-18 Alan Modra <alan@linuxcare.com.au>
-
- * config/tc-hppa.h (TC_FORCE_RELOCATION_SECTION): Allow
- subtraction of two syms without emitting a relocation.
-
- From David Huggins-Daines <dhd@linuxcare.com>
- * config/tc-hppa.c (hppa_force_relocation): Force relocations for
- global or weak symbols.
-
-2000-09-15 Kazu Hirata <kazu@hxi.com>
-
- * config/tc-h8300.h: Fix formatting.
- * config/tc-h8500.c: Likewise.
- * config/tc-h8500.h: Likewise.
- * config/tc-hppa.h: Likewise.
- * config/tc-i370.h: Likewise.
- * config/tc-i386.h: Likewise.
- * config/tc-i860.c: Likewise.
- * config/tc-i860.h: Likewise.
- * config/tc-i960.h: Likewise.
- * config/tc-ia64.c: Likewise.
- * config/tc-ia64.h: Likewise.
-
-2000-09-14 Kazu Hirata <kazu@hxi.com>
-
- * config/tc-a29k.c: Fix formatting.
- * config/tc-alpha.c: Likewise.
- * config/tc-arc.c: Likewise.
- * config/tc-arc.h: Likewise.
- * config/tc-arm.c: Likewise.
- * config/tc-arm.h: Likewise.
- * config/tc-avr.c: Likewise.
- * config/tc-avr.h: Likewise.
- * config/tc-tic30.c: Likewise.
- * config/tc-tic30.h: Likewise.
- * config/tc-tic54x.c: Likewise.
- * config/tc-tic54x.h: Likewise.
- * config/tc-tic80.c: Likewise.
- * config/tc-tic80.h: Likewise.
-
-2000-09-14 Timothy Wall <twall@cygnus.com>
-
- * config/tc-ia64.c (specify_resource): For PR%/PR63, note types of
- parallel comparisons for later use.
- (struct rsrc): Add parallel comparison type.
- (resources_match): Skip special cases of PR usage (non-conflicting
- parallel compares).
-
-2000-09-13 Kazu Hirata <kazu@hxi.com>
-
- * config/obj-ecoff.c: Fix formatting.
- * config/obj-elf.c: Likewise.
- * config/obj-elf.h: Likewise.
- * config/obj-evax.h: Likewise.
- * config/obj-generic.h: Likewise.
- * config/obj-hp300.c: Likewise.
- * config/obj-hp300.h: Likewise.
- * config/obj-ieee.h: Likewise.
- * config/obj-vms.c: Likewise.
- * config/obj-vms.h: Likewise.
-
-2000-09-13 Anders Norlander <anorland@acc.umu.se>
-
- * config/tc-mips.c (md_begin): Recognize 4Kc, 4Km and 4Kp processors.
- (md_parse_option): Ditto.
- (md_longopts): Add -mips32 option.
- (md_show_usage): Document new options.
- (mips_ip): Assemble sdbbp 20 bit 'm' args for MIPS32.
- (mips_ip): Assemble mfc0 with a sub-selection code.
- (validate_mips_insn): Handle 'H' (OP_*_SEL) and 'm' (OP_*_CODE20).
- (mips_cpu_to_str): New function.
- (mips_ip): Use mips_cpu_to_str instead of printing numeric cpu value.
- Use CPU_* defines instead of hardcoded numbers.
-
- * doc/as.texinfo: Document new options.
- * doc/c-mips.texi: Ditto.
-
-2000-09-12 Kazu Hirata <kazu@hxi.com>
-
- * as.h: Fix formatting.
- * asintl.h: Likewise.
- * bit_fix.h: Likewise.
- * config/obj-aout.c: Likewise.
- * config/obj-aout.h: Likewise.
- * config/obj-bout.c: Likewise.
- * config/obj-bout.h: Likewise.
- * config/obj-coff.c: Likewise.
- * config/obj-coff.h: Likewise.
- * dwarf2dbg.h: Likewise.
- * expr.h: Likewise.
- * flonum.h: Likewise.
- * frags.h: Likewise.
- * itbl-ops.h: Likewise.
- * macro.h: Likewise.
- * read.h: Likewise.
- * sb.h: Likewise.
- * struc-symbol.h: Likewise.
- * subsegs.h: Likewise.
- * symbols.h: Likewise.
- * tc.h: Likewise.
- * write.h: Likewise.
-
-2000-09-11 Kazu Hirata <kazu@hxi.com>
-
- * bignum-copy.c: Fix formatting.
- * config/tc-i370.c: Likewise.
- * config/tc-i960.c: Likewise.
- * config/tc-m68k.c: Likewise.
- * ehopt.c: Likewise.
- * flonum-copy.c: Likewise.
- * flonum-konst.c: Likewise.
- * flonum-mult.c: Likewise.
- * literal.c: Likewise.
- * read.c: Likewise.
- * sb.c: Likewise.
- * stabs.c: Likewise.
- * subsegs.c: Likewise.
-
-2000-09-09 Philip Blundell <philb@gnu.org>
-
- * configure.in (arm*-*-uclinux*): New target.
- * configure: Regenerate.
-
-2000-09-09 Kazu Hirata <kazu@hxi.com>
-
- * input-file.c: Fix formatting.
- * itbl-ops.c: Likewise.
- * messages.c: Likewise.
-
-2000-09-08 Philip Blundell <philb@gnu.org>
-
- * config/tc-arm.c (md_apply_fix3): Correct handling of ADRL when
- offset is negative.
-
-2000-09-07 H.J. Lu <hjl@gnu.org>
-
- * configure.in (AC_ISC_POSIX): Put after AC_CANONICAL_SYSTEM.
- * configure: Rebuild.
-
-2000-09-07 Kazu Hirata <kazu@hxi.com>
-
- * atof-generic.c: Fix formatting.
- * config/tc-mips.c: Likewise.
- * config/tc-vax.c: Likewise.
- * input-scrub.c: Likewise.
-
-2000-09-07 Alexandre Oliva <aoliva@redhat.com>
-
- * config/tc-sh.h (TARGET_FORMAT): Use sh-linux targets.
- * configure.in (sh-*-linux*): Added.
- * configure: Rebuilt.
-
-2000-09-06 Kazu Hirata <kazu@hxi.com>
-
- * config/tc-hppa.c: Fix formatting.
-
- * ecoff.c: Fix formatting.
-
-2000-09-06 Alexandre Oliva <aoliva@redhat.com>
-
- * configure: Rebuilt with new libtool.m4.
-
-2000-09-05 Kazu Hirata <kazu@hxi.com>
-
- * cgen.c: Fix formatting.
- * config/tc-ia64.c: Likewise.
-
-2000-09-05 Nick Clifton <nickc@redhat.com>
-
- * aclocal.m4: Regenerate.
- * config.in: Regenerate.
- * configure: Regenerate.
- * po/gas.pot: Regenerate.
-
-2000-09-05 Hans-Peter Nilsson <hp@axis.com>
-
- * config/tc-cris.c: Correct comment typos.
-
-2000-09-05 Eric Christopher <echristo@cygnus.com>
-
- * config/tc-mn10300.c: Cleanup.
- (md_pcrel_from): Enable.
-
-2000-09-05 Alan Modra <alan@linuxcare.com.au>
-
- * expr.c (operand): Fix a comment typo.
- * write.c (write_relocs): Fix a signed/unsigned warning.
-
- * config/tc-hppa.c (fudge_reg_expressions): New
- (hppa_force_reg_syms_absolute): New.
- (pa_equ): Allow reg_section expressions.
- * config/tc-hppa.c (md_optimize_expr): Define.
- (hppa_force_reg_syms_absolute): Prototype.
-
- * config/tc-hppa.c (pa_11_fp_reg_struct): Delete.
- (pa_parse_number): Pass in arg to select fp reg parsing.
- Return 1 to indicate format checks pass. If strict, then only
- accept a register or register symbol. Return value in...
- (pa_number): New static for pa_parse_number.
- (FP_REG_BASE): Define.
- (FP_REG_RSEL): Define.
- (pre_defined_registers): Apply FP_REG_BASE and FP_REG_RSEL as
- appropriate. White space changes.
- (need_pa11_opcode): Don't bother passing any params, get them from
- globals instead.
- (pa_ip): Modify all calls to pa_parse_number and need_pa11_opcode.
- Remove extraneous check in case 'Q'.
- (pa_equ): Modify call to pa_parse_number to do strict parsing. If
- reg, set section of resulting symbol to reg_section.
- (pa_parse_space_stmt): Modify call to pa_parse_number.
- (pa_space): Likewise.
-
- * config/tc-hppa.c: (md_apply_fix): Handle vtable relocs.
- (hppa_force_relocation): Handle vtable relocs.
- (pa_vtable_entry): New.
- (pa_vtable_inherit): New.
- (md_pseudo_table): Add entries for vtable pseudos.
- (hppa_fix_adjustable): Reject reduction of R_PARISC_GNU_VTINHERIT
- and R_PARISC_GNU_VTENTRY relocs. Reject reduction of relocs
- against weak syms.
- (tc_gen_reloc): Remove ELF_ARG_RELOC_INSN code.
- (pa_type_args): Don't call symbol_get_bfdsym multiple times.
- Set STT_PARISC_MILLICODE for OBJ_ELF when encountering a
- millicode import.
- * config/obj-elf.c (obj_elf_type): Allow md_elf_symbol_type to
- specify a symbol type.
-
- * config/tc-hppa.h: Reorganize file a little, grouping OBJ_ELF
- dependent things together.
- (md_elf_symbol_type): Define.
-
- * config/tc-hppa.c (fix_new_hppa): Elide "$PIC_pcrel$0" pseudo
- symbol.
- * config/tc-hppa.h (tc_frob_symbol): Elide "$PIC_pcrel$0" here too.
-
- * config/obj-elf.h (obj_elf_vtable_inherit): Declare.
- (obj_elf_vtable_entry): Declare.
-
- * config/obj-elf.c (obj_elf_vtable_inherit): Return struct fix *
- and export function.
- (obj_elf_vtable_entry): Similarly.
- (elf_pseudo_table): Fix the damage with a cast.
-
-2000-09-03 Richard Henderson <rth@cygnus.com>
-
- * config/tc-ia64.c (emit_one_bundle): Stop collecting insns
- for template selection when a label is needed.
-
-2000-09-02 Kazu Hirata <kazu@hxi.com>
-
- * config/tc-ia64.c: Fix formatting.
-
-2000-09-02 Nick Clifton <nickc@redhat.com>
-
- * configure.in: Increase version number to 2.10.91.
- * configure: Regenerate.
- * aclocal.m4: Regenerate.
- * config.in: Regenerate.
- * po/gas.pot: Regenerate.
- * Makefile.in: Regenerate.
-
-2000-09-01 Alexandre Oliva <aoliva@redhat.com>
-
- * config/tc-sh.h [OBJ_ELF] (TC_FIX_ADJUSTABLE): Define.
- * config/tc-sh.c (md_apply_fix): Map 32-bit relocations that
- become PC-relative to BFD_RELOC_32_PCREL. Reject 16- or 8-bit
- similar relocs.
- (sh_obj_adjustable): Return 1 for PC-relative offsets used in
- branches.
-
-2000-09-01 Niibe Yutaka <gniibe@m17n.org>, Kaz Kojima <kkojima@rr.iij4u.or.jp>, Alexandre Oliva <aoliva@redhat.com>
-
- * config/tc-sh.h (DIFF_EXPR_OK, GLOBAL_OFFSET_TABLE_NAME,
- TC_RELOC_GLOBAL_OFFSET_TABLE, TC_RELOC_RTSYM_LOC_FIXUP): Define.
- * config/tc-sh.c (sh_elf_cons, sh_elf_suffix): New functions.
- [OBJ_ELF] (md_pseudo_table) <long, int, word, short>: Use them.
- (GOT_symbol): New variable.
- (md_undefined_symbol): Set it.
-
-2000-09-01 Richard Henderson <rth@cygnus.com>
-
- * config/tc-ia64.c (match): Don't inline.
- (extra_goodness): New.
- (md_begin): Prefer nop.f and nop.b for best_template.
-
-2000-08-31 Kazu Hirata <kazu@hxi.com>
-
- * as.c: Fix formatting.
- * cond.c: Likewise.
- * frags.c: Likewise.
- * macro.c: Likewise.
-
-2000-08-31 Eric Christopher <echristo@cygnus.com>
-
- * config/tc-mn10300.c: Cleanup and fix warnings.
- (md_pseudo_table): Add initializers.
- (md_show_usage): Cleanup.
- (md_parse_option): Fix warnings.
- (md_undefined_symbol): Fix warnings.
- (md_conver_frag): Fix warnings.
- (tc_gen_reloc): Fix warnings.
- (md_apply_fix3): Fix warnings.
- (check_operand): Fix warnings.
-
-2000-08-31 Alexandre Oliva <aoliva@redhat.com>
-
- * acinclude.m4: Include libtool and gettext macros from the
- top level.
- * aclocal.m4, configure: Rebuilt.
-
-2000-08-30 Mark Hatle <mhatle@mvista.com>
-
- * config/tc-ppc.c (md_parse_option): Recognize -m405.
-
-2000-08-31 Kazu Hirata <kazu@hxi.com>
-
- * listing.c: Fix formatting.
-
-2000-08-29 Kazu Hirata <kazu@hxi.com>
-
- * app.c: Fix a comment typo. Fix formatting.
-
-2000-08-25 J. David Anglin <dave@hiauly1.hia.nrc.ca>
-
- * tc-vax.c (md_convert_frag): Correctly calculate the pc relative
- offset of the target destination for jmp instructions.
- (md_assemble): Change mode to VAX_ABSOLUTE_MODE as per comments.
-
-2000-08-24 Hans-Peter Nilsson <hp@axis.com>
-
- * NEWS: Mention support for CRIS.
-
-Thu Aug 24 20:41:05 2000 Denis Chertykov <denisc@overta.ru>
-
- * config/tc-avr.h (TC_IMPLICIT_LCOMM_ALIGNMENT): New macros.
- Sets `.lcomm' alignment to zero.
-
-2000-08-23 Alexandre Oliva <aoliva@redhat.com>
-
- * config/tc-i386.h <OBJ_MAYBE_ELF, OBJ_MAYBE_COFF>
- (TC_FIX_ADJUSTABLE): Define.
-
-2000-08-23 Jim Wilson <wilson@cygnus.com>
-
- * config/tc-ia64.c (output_unw_records): Set U & E flags only if
- unwind.personality_routine is set.
-
-2000-08-23 H.J. Lu <hjl@gnu.org>
-
- * write.c (TC_FIX_ADJUSTABLE): Remove the duplicate.
-
-2000-08-23 Alexandre Oliva <aoliva@redhat.com>
-
- * config/tc-i386.h (TC_FIX_ADJUSTABLE): Do *NOT* define if target
- environment is pe.
-
-2000-08-22 H.J. Lu <hjl@gnu.org>
-
- * config.in (STRICTCOFF): New for strict COFF.
-
- * configure.in: Define STRICTCOFF for i386-*-msdosdjgpp*,
- i386-*-go32* and i386-go32-rtems*.
- * configure: Rebuilt.
-
- * config/obj-coff.c (obj_coff_endef): Follow the historical
- behavior if STRICTCOFF is not defined.
-
- * doc/internals.texi: Document STRICTCOFF.
-
-2000-08-22 Alexandre Oliva <aoliva@redhat.com>
-
- * write.c (TC_FIX_ADJUSTABLE): Define to 1, if not defined.
- (fixup_segment) Use it instead of TC_DONT_FIX_NON_ADJUSTABLE.
- * config/tc-i386.h (TC_DONT_FIX_NON_ADJUSTABLE): Remove.
- <OBJ_ELF, OBJ_COFF, TE_PE> (TC_FIX_ADJUSTABLE): Define.
- * config/tc-arm.h (TC_DONT_FIX_NON_ADJUSTABLE): Remove.
- <OBJ_ELF> (TC_FIX_ADJUSTABLE): Define.
- * config/tc-i960.h, config/tc-m68k.h, config/tc-v850.h:
- Likewise.
-
-2000-08-22 Eric Christopher <echristo@cygnus.com>
-
- * config/tc-mn10300.c: (md_apply_fix): New function.
- (mn10300_force_relocation): New function.
- (mn10300_fix_adjustable): New function.
-
- * config/tc-mn10300.h: (TC_FORCE_RELOCATION): Define.
- (TC_HANDLES_FX_DONE): Define.
- (obj_fix_adjustable): Define.
- (MD_APPLY_FIX3): Define.
- (TC_LINKRELAX_FIXUP): Define.
-
- * write.c: (TC_LINKRELAX_FIXUP): Define if not
- previously defined.
- (fixup_segment): Use TC_LINKRELAX_FIXUP.
-
- * doc/internals.texi: Document TC_LINKRELAX_FIXUP.
-
-2000-08-21 Jason Eckhardt <jle@cygnus.com>
-
- * config/tc-i860.c (md_apply_fix3): Do not insert the immediate
- if the fixup resulted in a relocation.
-
-2000-08-18 Nick Clifton <nickc@redhat.com>
-
- * config/tc-arm.c (decode_shift): Replace as_tsktsk with as_warn.
- Make reference to first element of shift_names explicit.
-
-2000-08-18 Alexandre Oliva <aoliva@redhat.com>
-
- * write.c (fixup_segment) [TC_DONT_FIX_NON_ADJUSTABLE]: Use
- obj_fix_adjustable() and tc_fix_adjustable() to tell whether to
- add a symbol's address. Removed all target-specific #ifdefs that
- used to accomplished the same.
- * config/tc-v850.h (TC_DONT_FIX_NON_ADJUSTABLE): Define.
- * config/tc-m68k.h (TC_DONT_FIX_NON_ADJUSTABLE): Define.
- * config/tc-arm.h (TC_DONT_FIX_NON_ADJUSTABLE): Define.
- * config/tc-i960.h (TC_DONT_FIX_NON_ADJUSTABLE): Define.
- * config/tc-i386.h (TC_DONT_FIX_NON_ADJUSTABLE): Define.
-
-2000-08-17 Kazu Hirata <kazu@hxi.com>
-
- * dwarf2dbg.c: Fix formatting.
-
-2000-08-17 Nick Clifton <nickc@redhat.com>
-
- * config/tc-arm.c (decode_shift): Allow illegal shifts by zero
- to be recoded as logical shift lefts by zero.
-
-2000-08-16 Jim Wilson <wilson@cygnus.com>
- * config/tc-ia64.c (specify_resource, case IA64_RS_GR): Handle
- postincrement modified registers. Handle IA64_OPND_R3_2 addl
- source registers.
- (note_register_values): Handle IA64_OPND_R3_2 operands.
-
-2000-08-16 Jason Eckhardt <jle@cygnus.com>
-
- * config/tc-i860.c (md_operand): Silly typo fixed.
-
-2000-08-16 Nick Clifton <nickc@redhat.com>
-
- * config/tc-arm.c (struct asm_shift): Delete.
- (shift[]): Delete.
- (enum asm_shift_index): New.
- (struct asm_shift_properties): New.
- (struct asm_shift_name): New.
- (shift_properties[]); New.
- (shift_names[]); New.
-
- (decode_shift): Use new structures.
- Issue a warning is "ROR #0" is used.
- Issue a warning if "ASR #0" or "LSR #0" is used.
-
- (md_begin): Initialise arm_shift_hsh table from new
- asm_shift_name array.
-
-2000-08-16 Jakub Jelinek <jakub@redhat.com>
-
- * config/tc-sparc.c: Kill all warnings.
- (md_parse_option): Set -32/-64 for -xarch=, allow all -A archs
- in -xarch= as well.
- (md_show_usage): Update usage text.
-
-2000-08-16 Nick Clifton <nickc@redhat.com>
-
- * config/tc-arm.c (do_bx): Warn about "bx px" not being very
- useful.
-
-2000-08-15 Will Cohen <wcohen@redhat.com>
-
- * config/tc-sh.h (DWARF2_LINE_MIN_INSN_LENGTH): Defined.
-
- * config/tc-sh.c (md_assemble): Changed so debug_type
- test performed for ppi_assemble
- * config/tc-sh.c: Included dwarf2dbg.h.
- (debug_line): Defined.
- (md_assemble): Generates dwarf2 line info.
- (sh_finalize): New function. Finalize dwarf2 info.
- (assemble_ppi): Returns size of code generated.
- (build_Mytes): Returns size of code generated.
- (md_pseudo_table): Added "file" and "loc" psuedo ops.
- * config/tc-sh.h (md_end): Defined.
- (sh_finalize): Declared.
-
-2000-08-15 Alexandre Oliva <aoliva@redhat.com>
-
- * config/tc-sh.c (md_apply_fix) [BFD_RELOC_32, BFD_RELOC_16]: Use
- md_number_to_chars.
-
-2000-08-14 Nick Clifton <nickc@redhat.com>
-
- * config/tc-arm.c (do_bx): Allow "bx pc".
-
-2000-08-14 Jim Wilson <wilson@cygnus.com>
-
- * config/tc-ia64.c (md_longopts): Add -mconstant-gp and -mauto-pic.
- (md_parse_option): Add OPTION_MCONSTANT_GP and OPTION_MAUTO_PIC.
- (md_begin): Change assignment to md.flag to OR in the new bit.
-
-2000-08-14 Mark Elbrecht <snowball3@bigfoot.com>
-
- * config/obj-coff.c (obj_coff_endef) [BFD_ASSEMBLER]: Set the debug
- flag for storage types C_ARG, C_REGPARM, C_FIELD, C_MOS, C_MOE,
- C_MOU, and C_EOS.
-
-2000-08-14 Jason Eckhardt <jle@cygnus.com>
-
- * NEWS: Mention i860 support.
-
-Mon Aug 14 11:49:12 2000 Jeffrey A Law (law@cygnus.com)
-
- * config/tc-mn10300.h (DWARF2_LINE_MIN_INSN_LENGTH): Define.
-
-2000-08-14 Andreas Schwab <schwab@suse.de>
-
- * doc/c-arm.texi (ARM Directives): Fix warnings from makeinfo.
-
-2000-08-11 Andreas Schwab <schwab@suse.de>
-
- * doc/c-i860.texi (Opcodes for i860): Remove braces from @item
- argument.
-
-2000-08-11 Kazu Hirata <kazu@hxi.com>
-
- * expr.c: Fix formatting.
- * config/obj-bout.c: Likewise.
-
-2000-08-10 Jason Eckhardt <jle@cygnus.com>
-
- * doc/c-i860.texi: Flesh out the i860 section more.
-
-2000-08-10 Kazu Hirata <kazu@hxi.com>
-
- * symbols.c: Fix formatting.
- * expr.c: Likewise.
-
-Wed Aug 9 16:28:21 EDT 2000 Diego Novillo <dnovillo@cygnus.com>
-
- * tc-i386.c (md_assemble): Skip suffix check if the opcode modifier
- has the IgnoreSize bit set.
-
-2000-08-09 Alan Modra <alan@linuxcare.com.au>
-
- From Rodney Brown <RodneyBrown@mynd.com>
- * configure.in: Use elf on Unixware 7 (i586-sco-sysv5uw7.1.0)
- * configure: Regenerate.
-
-2000-08-09 Kazu Hirata <kazu@hxi.com>
-
- * hash.c: Fix formatting.
- * gasp.c: Likewise.
-
-2000-08-08 Jason Eckhardt <jle@cygnus.com>
-
- * config/tc-i860.h: Rework completely for BFD_ASSEMBLER.
- (i860_fix_info): New enum.
- (MD_APPLY_FIX3): Define.
- (WORKING_DOT_WORD): Define.
- (TC_HANDLES_FX_DONE): Define.
- (DIFF_EXPR_OK): Define.
- (LISTING_HEADER): Define.
- (TARGET_FORMAT): Select target format based on endian flag.
- (TARGET_BYTES_BIG_ENDIAN): Default to little endian.
- (target_big_endian): Add external declaration.
-
- * config/tc-i860.c: All existing code reworked completely. Other
- new code shown below.
- (SYNTAX_SVR4): Define.
- (target_warn_expand): New variable.
- (md_shortopts): Declare and define (-Qy, -Qn, and -V options).
- (md_longopts): Declare and define with new options (-EL, -EB,
- and -mwarn-expand).
- (md_show_usage): New function.
- (md_operand): New function.
- (obtain_reloc_for_imm16): New function.
- (md_apply_fix3): New function.
- (tc_gen_reloc): New function.
-
-2000-08-08 Stephane Carrez <Stephane.Carrez@worldnet.fr>
-
- * config/tc-m68hc11.c (build_jump_insn): Make sure the
- 2 bytes of the jump address are in the same frag.
- (find): Accept 68hc12 register indirect modes.
-
- * NEWS: Mention 68HC11 & 68HC12 support.
-
-2000-08-07 Richard Henderson <rth@cygnus.com>
-
- * config/tc-ia64.c (unwind): Add prologue_mask member.
- (dot_vframe): Elide psp_gr record if it overlaps prologue_gr.
- (dot_save): Likewise for pfs_gr, rp_gr, and preds_gr.
- (dot_body): Clear unwind.prologue_mask.
- (dot_prologue): Set it. Accept a register second argument.
-
-2000-08-07 Kazu Hirata <kazu@hxi.com>
-
- * config/atof-ieee.c: Fix formatting.
- * config/atof-tahoe.c: Likewise.
-
-2000-08-06 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-sparc.c (md_begin): Fix typo in recent formatting
- work.
-
- * doc/as.texinfo (Pseudo Ops): Update to include descriptions
- of .popsection, .previous, .pushsection, .subsection,
- .version, .vtable_entry, .vtable_inherit and .weak.
-
-2000-08-05 Kazu Hirata <kazu@hxi.com>
-
- * config/tc-cris.c: Fix formatting.
- * config/tc-i386.c: Likewise.
- * config/tc-sparc.c (sparc_ip): Simplify the code.
-
-2000-08-04 Kazu Hirata <kazu@hxi.com>
-
- * config/tc-cris.c: Rearrange code for readability.
- * config/tc-d10v.c: Fix formatting.
- * config/tc-m32r.c: Likewise.
- * config/tc-sparc.c: Likewise.
-
-2000-08-02 Jim Wilson <wilson@cygnus.com>
-
- * config/tc-ia64.c (emit_one_bundle): Call ia64_free_opcode
- before ia64_find_opcode.
- (md_assemble): Likewise.
-
-2000-08-01 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-arm.c (do_mrs): Fix skip of 'cpsr_all' flag.
- Undo some formatting fixes.
-
-2000-08-01 Kazu Hirata <kazu@hxi.com>
-
- * config/obj-som.c: Fix formatting.
- * config/obj-ieee.c: Likewise.
- * config/tc-arm.c: Likewise.
- * config/tc-v850.c: Likewise.
-
-2000-08-01 Nick Clifton <nickc@redhat.com>
-
- * doc/c-m68k.texi (section M680x0 Options): Turn into a table
- index by command line option.
-
-2000-08-01 Michael Sokolov <msokolov@ivan.Harhan.ORG>
-
- * doc/c-m68k.texi (@cindex @samp{--pcrel}): Rewrite option description.
- (@node M68K-Branch): Rewrite to match the reality.
-
-2000-07-31 Jason Eckhardt <jle@cygnus.com>
-
- * doc/c-i860.texi: New file.
- * doc/Makefile.am (CPU_DOCS): Add c-i860.texi.
- * doc/Makefile.in: Regenerate.
- * doc/all.texi: Add I860 as relevant architecture.
- * doc/as.texinfo: Include i860 dependent file c-i860.texi.
-
-2000-07-31 Kazu Hirata <kazu@hxi.com>
-
- * config/tc-d30v.c: Fix formatting.
-
-2000-07-31 Michael Sokolov <msokolov@ivan.Harhan.ORG>
-
- * config/tc-m68k.c (flag_keep_pcrel, OPTION_PCREL): Add --pcrel option.
- (md_convert_frag_1, md_estimate_size_before_relax): When making DBcc
- long emit a long branch if available instead of an absolute jump, never
- emit absolute jumps for anything with --pcrel.
-
- * doc/c-m68k.texi: Document new command line option.
-
-2000-07-29 Marek Michalkiewicz <marekm@linux.org.pl>
-
- * config/tc-avr.c: Use PARAMS macro in function declarations.
- Don't declare md_pcrel_from_section (already in tc-avr.h).
- (avr_operands): Use AVR_UNDEF_P and AVR_SKIP_P macros.
- (avr_operand): Don't set (unsigned) op_mask to -1.
-
-2000-07-28 Jason Eckhardt <jle@cygnus.com>
-
- * configure.in: Add bits for i860-stardent-{sysv4, elf}*.
+2002-01-14 Richard Earnshaw <rearnsha@arm.com>
+
+ * tc-arm.c (md_longopts): Fix misplaced #endif -- the -oabi option
+ is not dependent on ARM_BI_ENDIAN.
+
+2002-01-14 Richard Earnshaw <rearnsha@arm.com>
+
+ * tc-arm.c (all error messages): Normalize capitalization of messages.
+
+ * tc-arm.h (md_operand): Delete define.
+ * tc-arm.c (in_my_get_expression): New static variable.
+ (my_get_expression): Set and clear it.
+ (md_operand): New function. If called from my_get_expression
+ put the error in inst.error.
+ (output_inst): Now takes argument of instruction being assembled.
+ Print it out with any error message.
+ (do_ldst, do_ldstv4, thumb_load_store): Fault attempt to use a store
+ with '=' syntax.
+ (end_of_line): Don't update inst.error if it is already set.
+
+2002-01-11 Richard Earnshaw <rearnsha@arm.com>
+
+ * tc-arm.c ((do_ldst): Fix handling an immediate expression pseudo
+ op that can be translated into a mvn instruction.
+
+2002-01-11 Steve Ellcey <sje@cup.hp.com>
+
+ * gas/config/tc-ia64.h (MD_FLAGS_DEFAULT): New Macro for
+ setting default md.flags.
+ (SHT_INIT_ARRAY): New elf special section used by HP-UX.
+ (SHT_FINI_ARRAY): New elf special section used by HP-UX.
+ * gas/config/tc-ia64.c (setup_unwind_header): Add support
+ for 32 bit unwind info blocks.
+ (generate_unwind_image): Add support for different types
+ of unwind images (32 bits and/or big-endian).
+ (ia64_init): Use MD_FLAGS_DEFAULT to set md.flags.
+ (ia64_target_format): Add support for hpux target formats.
+ (ia64_gen_real_reloc_type): Add support for FUNC_IPLT_RELOC.
+ (ia64_elf_section_type): Add support for SHT_INIT_ARRAY and
+ SHT_FINI_ARRAY elf section types.
+
+2002-01-10 Richard Earnshaw <rearnsha@arm.com>
+
+ * tc-arm.c (struct reg_entry): Move before prototypes.
+ (int_register, cp_register, fp_register): Delete.
+ (reg_table): Delete. Replaced with ...
+ (rn_table, cp_table, cn_table, fn_table, mav_mvf_table)
+ (mav_mvd_table, mav_mvfx_table, mav_mvdx_table, mav_mvax_table)
+ (mav_dspsc_table): ... one table per register set.
+ (arm_reg_hsh): Delete.
+ (struct reg_map): New structure.
+ (all_reg_maps): New array.
+ (enum arm_reg_type): New enums.
+ (build_reg_hsh): New function.
+ (insert_reg_alias): Use hash table passed by caller. Adjust all
+ callers.
+ (create_register_alias): New function, split out from ...
+ (md_assemble): ... here.
+ (md_begin): Build new register hash tables.
+ (arm_reg_parse): New argument for the hash table to search. Adjust all
+ callers.
+ (arm_reg_parse_any): New function.
+ (co_proc_number): Look up the processor number in the processor hash
+ table.
+ (cirrus_regtype): Delete.
+ (cirrus_register, cirrus_mvf_register, cirrus_mvd_register)
+ (cirrus_mvfx_register, cirrus_mvdx_register, cirrus_mvax_register)
+ (ARM_EXT_MAVERICKsc_register): Delete.
+ (do_c_binops_1, do_c_binops_2, do_c_binops_3): Delete.
+ (do_c_binops_1[a-o], do_c_binops_2[a-c], do_c_binops_3[a-d]): New
+ functions.
+ (do_c_triple_4, do_c_triple_5): Delete.
+ (do_c_triple_4[ab], do_c_triple_5[a-h]): New functions.
+ (do_c_quad_6): Delete.
+ (do_c_quad_6[ab]): New functions.
+ (do_c_binops, do_c_triple, do_c_quad, do_c_shift, do_c_ldst): Rework
+ arguments to use new register parsing methods.
+ (cirrus_reg_required_here): Likewise.
+ (insns): Reclassify cirrus maverick worker functions.
+ (cirrus_valid_reg): Delete.
+
+2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * configure.in (sh*le): Set cpu_type=sh and endian=little.
+ (sh*-*-netbsdelf*): New target.
+ * configure: Regenerate.
+ * tc-sh.h: Update copyright years.
+ (TARGET_FORMAT): Add version for TE_NetBSD.
+
+2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * read.c (emit_expr): Do not allow 'size' or 'nbytes' to go
+ negative.
+
+2002-01-06 Alan Modra <amodra@bigpond.net.au>
+
+ * config/tc-m68k.h (md_prepare_relax_scan): Rewrite.
+ * config/tc-m68k.c (md_relax_table): Add md_prepare_relax_scan comment.
+
+2002-01-05 Daniel Jacobowitz <drow@mvista.com>
+
+ * tc-mips.c (mips_cprestore_valid): New flag.
+ (mips_frame_reg_valid): New flag.
+ (macro) [M_JAL_2]: Check both flags.
+ [M_JAL_A]: Likewise.
+ (s_cprestore): Set mips_cprestore_valid.
+ (tc_get_register): If setting mips_frame_reg, set
+ mips_frame_reg_valid and clear mips_cprestore_valid.
+ (s_mips_ent): Clear both flags.
+ (s_mips_end): Clear both flags.
+
+2002-01-05 Alan Modra <amodra@bigpond.net.au>
+
+ * write.c (write_object_file): Make use of bfd_section_list_remove.
+ * config/obj-ecoff.c (ecoff_frob_file): Likewise.
+ * config/tc-mmix.c (mmix_frob_file): Likewise.
+
+2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * configure.in (i386-*-netbsdelf*): Collapse target into...
+ (i386-*-netbsd*): ...this. Add support for x86-64.
* configure: Regenerated.
- * config/obj-elf.c (obj_elf_type): Recognize a fifth type
- of operand to the .type directive (.e.g, "type").
-
-2000-07-28 Alan Modra <alan@linuxcare.com.au>
-
- * as.h (warn_comment, found_comment, found_comment_file): Declare.
- * app.c (do_scrub_chars): Record where first comment found.
- * read.c (read_a_source_file): Init found_comment on entry, and
- notify whether comments found on exit.
- * config/tc-hppa.c (md_shortopts): Add "c".
- (md_longopts): Add warn-comment.
- (md_parse_option): Handle it.
- (md_show_usage): Show available options.
- * config/tc-hppa.h (WARN_COMMENTS): Define if TE_LINUX
-
-Thu Jul 27 11:25:01 2000 Andrew Cagney <cagney@b1.cygnus.com>
-
- * config/tc-mn10300.c (md_convert_frag): Fix printfs.
- (tc_gen_reloc): Add cast when assigning bfd_abs_symbol to
- sym_ptr_ptr
- (md_estimate_size_before_relax): Don't fall off end of function.
-
-2000-07-27 Kazu Hirata <kazu@hxi.com>
-
- * config/tc-avr.c: Fix formatting.
- * config/tc-ns32k.c: Likewise.
-
-2000-07-27 Alan Modra <alan@linuxcare.com.au>
-
- * config/tc-d10v.c (find_opcode): Remove extraneous `='.
-
-2000-07-27 Kazu Hirata <kazu@hxi.com>
-
- * config/tc-d10v.c: Fix formatting.
- * config/tc-z8k.c: Likewise.
- * config/tc-sparc.c: Likewise.
-
-2000-07-26 Dave Brolley <brolley@redhat.com>
-
- * cgen.c (queue_fixup): Declare opinfo.
- (gas_cgen_parse_operand): Mark unused parameters with ATTRIBUTE_UNUSED.
- (gas_cgen_md_operand): Ditto.
- (gas_cgen_md_apply_fix3): Ditto.
-
-2000-07-24 Mark Elbrecht <snowball3@bigfoot.com>
-
- * config/obj-coff.c (obj_frob_symbol): Don't merge
- labels. Don't merge if the symbol isn't constant. Return
- immediately if a symbol is merged.
-
-2000-07-22 Alan Modra <alan@linuxcare.com.au>
-
- * frags.c (frag_align): Correct absolute section alignment.
-
-2000-07-20 DJ Delorie <dj@redhat.com>
-
- * config/obj-coff.c (obj_frob_symbol): revert previous change,
- it breaks linking against DLLs.
-
-2000-07-20 Hans-Peter Nilsson <hp@axis.com>
-
- * configure.in: Add CRIS support.
- * configure: Regenerate.
- * Makefile.am: (CPU_TYPES): Add cris.
- (CPU_OBJ_VALID) [aout]: Add cris.
- (MULTI_CPU_TYPES): Add cris.
- (MULTI_CPU_OBJ_VALID) [aout]: Add cris.
- [coff]: Only i386 and mips are valid.
- (TARGET_CPU_CFILES): Add config/tc-cris.c.
- (TARGET_CPU_HFILES): Add config/tc-cris.h.
- (MULTI_CFILES): Add config/e-crisaout.c and config/e-criself.c.
- Regenerate dependencies.
- * Makefile.in: Regenerate.
- * aclocal.m4: Regenerate.
- * as.c: Declare crisaout, criself.
- * config/tc-cris.h, config/tc-cris.c: New.
- * config/e-criself.c, config/e-crisaout.c: New.
- * po/POTFILES.in, po/gas.pot: Regenerate.
-
-2000-07-20 Kazu Hirata <kazu@hxi.com>
-
- * read.c: Fix formatting.
- * write.c: Fix formatting.
-
-2000-07-19 H.J. Lu <hjl@gnu.org>
-
- * sb.c: Include <stdlib.h> if exists for abort ().
-
-2000-07-19 Alan Modra <alan@linuxcare.com.au>
-
- * config/tc-hppa.c (hppa_fix_adjustable): Correct LR%/RR% comment.
- (arg_reloc_stub_needed): #ifdef OBJ_SOM, not #ifdef SOM.
- (pa_type_args): Same here.
-
-2000-07-17 Mark Elbrecht <snowball3@bigfoot.com>
-
- * config/obj-coff.c (obj_frob_symbol): Don't merge labels. Don't
- merge if the symbol isn't constant. Don't call S_SET_EXTERNAL if
- the storage class is already set.
-
-2000-07-17 Kazu Hirata <kazu@hxi.com>
-
- * config/tc-m68hc11.c: Fix formatting.
- * config/tc-mn10200.c: Likewise.
- * config/tc-mn10300.c: Likewise.
- * config/tc-pj.c: Likewise.
- * config/tc-tic80.c: Likewise.
- * config/tc-w65.c: Likewise.
-
-2000-07-17 Frank Ch. Eigler <fche@redhat.com>
-
- * expr.c (operand): Permit %bin literals if LITERAL_PREFIXPERCENT_BIN
- is defined.
-
-2000-07-15 Ian Lance Taylor <ian@zembu.com>
-
- * doc/c-mips.texi (MIPS Opts): Remove erroneous space after
- @code.
-
-2000-07-15 Alan Modra <alan@linuxcare.com.au>
-
- * config/tc-hppa.c (hppa_fix_adjustable): Use the same checks for
- ELF as are used for SOM (except the 32-bit reloc one) to decide
- whether a symbol can be reduced to a section symbol. Expand on
- the comment for symbols involved in LR% and RR% expressions.
-
-2000-07-14 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-mips.c (mips_disable_float_construction): New
- static variable. Set to true if doubles should not be
- constructed by loading two single width fp registers with
- halves of the value.
- (mips_ip): Test mips_disable_float_construction.
- (md_longopts): Add command line switches --construct-floats
- and --no-construct-floats.
- (md_parse_option): Parse new command line options.
- (md_show_usage): Describe new command line options.
-
- * doc/c-mips.texi: Document new command line options.
-
-2000-07-13 Koundinya K <kk@ddeorg.soft.net>
-
- * configure.in: Remove the test /usr/dde for mips-*-sysv4*MP*
- * configure: Regenerate.
-
-2000-07-13 Hans-Peter Nilsson <hp@axis.com>
-
- * configure.in (DEFAULT_EMULATION setting): Revert part of
- 2000-07-01 change that set te_multi=multi unless set to tmips.
- * configure: Regenerate.
-
-2000-07-12 Mark Elbrecht <snowball3@bigfoot.com>
-
- * config/obj-coff.c (coff_frob_section): Add padding to the last
- section when aligning it increases its size.
-
-2000-07-11 Kazu Hirata <kazu@hxi.com>
-
- * config/tc-tic54x.c: Fix formatting.
-
-2000-07-10 Kazu Hirata <kazu@hxi.com>
-
- * config/tc-h8500.c: Fix formatting.
- * config/tc-tic54x.c: Fix formatting.
-
-2000-07-10 Alan Modra <alan@linuxcare.com.au>
-
- * config/tc-hppa.c (md_apply_fix): Check fmt 12 and 22 pc-rel
- displacements correctly.
-
- * read.h (s_abort): Add ATTRIBUTE_NORETURN.
-
-2000-07-10 Ryan Bradetich <rbradetich@uswest.net>
-
- * hash.c (hash_insert): Add cast to obstruct_alloc to fix
- warning.
- (hash_jam): Ditto.
-
-2000-07-09 Alan Modra <alan@linuxcare.com.au>
-
- From David Huggins-Daines <dhd@linuxcare.com>
- * config/te-hppalinux64.h: Add a new emulation.
- * configure.in (emulations): Add configure bits to support the
- 64-bit Linux/parisc target.
- * configure: Regenerate.
-
- * config/tc-hppa.c (md_parse_option): Support `-V' for ELF.
- (md_shortopts): Add `V' for ELF.
-
- * config/tc-hppa.c (arg_reloc_stub_needed): Define as zero except
- when SOM or ELF_ARG_RELOC are defined.
- (pa_type_args): Only set symbol_arg_reloc_info when SOM or
- ELF_ARG_RELOC are defined.
- (pa_stringer_aux): Don't pa_check_current_space_and_subspace here..
- (pa_stringer): ..Do it here instead. Fix comment typos.
- (hppa_force_relocation): Cast enums to int before comparing with
- ints.
-
- From Ryan Bradetich <rbradetich@uswest.net>
- * config/tc-hppa.c: Removed unneeded libbfd.h to fix macro
- redifinition warning.
- (md_apply_fix): Added cast from enum to int for fixP->fx_r_type.
- (hppa_force_relocation): ditto
- (md_apply_fix): Added cast to buf to fix warnings.
-
- * config/tc-hppa.h (pa_define_label, parse_cons_expression_hppa,
- cons_fix_new_hppa, hppa_force_relocation): Prototype.
-
- * config/tc-hppa.c (reloc_type): It's an enum for OBJ_ELF.
- (R_N0SEL, R_N1SEL): Define only for OBJ_SOM.
- (tc_gen_reloc): Make `code' a reloc_type and `codes' a
- reloc_type** to avoid warnings in switch.
- (md_apply_fix): Make insn, val signed. Zap buf_wd and read insn a
- little earlier instead.
-
- * config/tc-hppa.c (symbol_arg_reloc_info): Define for both som
- and elf.
- (pa_type_args): Use symbol_arg_reloc_info.
- (struct pa_it): Make arg_reloc unsigned int.
- (struct hppa_fix_struct): Likewise for fx_arg_reloc.
- (pa_text, pa_data, pa_comm): Don't compile for TE_LINUX.
- (pa_code): Delete. pa_text duplicates this function.
- (md_pseudo_table): Call obj_elf_text for ".code" if TE_LINUX.
- (fix_new_hppa): Argument offset is offsetT, arg_reloc is unsigned
- int.
- (cons_fix_new_hppa): Actually change selector to e_fsel when
- warning about assuming so.
- (tc_gen_reloc): More example elf arg reloc code.
- (md_apply_fix): Use arg_reloc_stub_needed for elf too.
- (hppa_force_relocation): Likewise.
-
- * config/tc-hppa.h: Use TARGET_ARCH_SIZE to select target include
- files.
- (pa_end_of_source): Prototype.
- (hppa_fix_adjustable): Prototype.
- (LABELS_WITHOUT_COLONS): Move it..
- * config/te-hppa.h: To here.
-
- * config/te-hppa64.h: New file.
-
- * config/tc-hppa.c: Use TARGET_ARCH_SIZE to select target reloc
- type.
- (md_apply_fix): Pass stdoutput to bfd_hppa_insn2fmt. Handle
- format -10, -16, 16 relocs.
- (hppa_elf_mark_end_of_function): Test for null
- last_call_info->start_symbol
-
- * config/tc-hppa.c (pa_ip): In case 'V', pass `strict' to
- CHECK_FIELD, not INSERT_FIELD_AND_CONTINUE. Don't pass opcode to
- re_assesmble_* functions. Delete extraneous statements. Fix
- typos in comments.
- (md_apply_fix): Compare against 1048575 in case 21. Don't pass
- insn to re_assemble_*.
-
-2000-07-08 Ulf Carlsson <ulfc@engr.sgi.com>
-
- * doc/internals.texi (Expressions): Fix typo.
-
-2000-07-08 Kazu Hirata <kazu@hxi.com>
-
- * config/tc-sh.c: Fix formatting.
- * config/tc-tic54x.c: Fix formatting.
- * depend.c: Fix formatting.
- * flonum-konst.c: Likewise.
- * flonum-mult.c: Likewise.
-
-2000-07-07 Kazu Hirata <kazu@hxi.com>
-
- * config/tc-sh.c: Fix comments.
- * config/obj-vms.c: Fix comments.
- * config/tc-a29k.c: Likewise.
- * config/tc-alpha.c: Likewise.
- * config/tc-h8300.c: Likewise.
- * config/tc-h8500.c: Likewise.
- * config/tc-i370.c: Likewise.
- * config/tc-ia64.c: Likewise.
- * config/tc-m68hc11.c: Likewise.
- * config/tc-m68k.c: Likewise.
- * config/tc-mips.c: Likewise.
- * config/tc-ns32k.c: Likewise.
- * config/tc-ppc.c: Likewise.
- * config/tc-z8k.c: Likewise.
-
-2000-07-06 Mark Elbrecht <snowball3@bigfoot.com>
-
- * config/obj-coff.c (TC_COFF_SECTION_DEFAULT_ATTRIBUTES): New.
- Default to '(SEC_LOAD | SEC_DATA)'.
- (obj_coff_section) [BFD_ASSEMBLER]: Use it.
-
- * doc/internals.texi (CPU Backend): Describe
- TC_COFF_SECTION_DEFAULT_ATTRIBUTES.
-
-Thu Jul 6 17:20:58 2000 Andrew Cagney <cagney@b1.cygnus.com>
-
- * as.c (parse_args): NULL terminate the long option list.
-
-Tue Jul 4 14:08:28 2000 Andrew Cagney <cagney@b1.cygnus.com>
-
- * config/tc-d30v.h: Include "write.h" for fixS.
- (d30v_start_line, md_pcrel_from_section): Add function prototypes.
-
-2000-07-05 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-d30v.c (write_2_short): Further changes to warning
- messages produced when combining EITHER_BUT_PREFER_MU attributed
- opcodes.
-
-2000-07-05 DJ Delorie <dj@redhat.com>
-
- * MAINTAINERS: new
-
-2000-07-04 Alexandre Oliva <aoliva@redhat.com>
-
- * config/tc-arm.c (psrs): Accept combinations of flags.
-
-2000-07-03 Marek Michalkiewicz <marekm@linux.org.pl>
-
- * config/tc-avr.c: Change _ () to _() around all strings marked
- for translation (exception from the usual coding style).
- (avr_opt): New struct variable, how the new switches are set.
- (OPTION_MMCU): Define as 'm' and actually use.
- (md_longopts): Add -mall-opcodes, -mno-skip-bug, -mno-wrap.
- (show_mcu_list): New function, display the list of known MCUs.
- (md_show_usage): Document the new switches. Call show_mcu_list.
- (avr_set_arch): Change 'm' to OPTION_MMCU.
- (md_parse_option): Call show_mcu_list if unknown MCU specified.
- Handle the new switches.
- (avr_operands): Disable warnings for undefined combinations of
- operands if -mall-opcodes. Disable warnings for skipping two-word
- instructions if enhanced core or -mno-skip-bug.
- (avr_operand): Accept all addressing modes on avr1 if -mall-opcodes.
- (md_apply_fix3): Reject 8K wrap if >8K or -mno-wrap.
- (md_assemble): Accept opcodes not supported by MCU if -mall-opcodes.
- (avr_ldi_expression): Warn about implicit lo8().
- * config/tc-avr.h (md_pcrel_from_section): Add prototype.
-
-2000-07-01 Koundinya K <kk@ddeorg.soft.net>
-
- * configure.in: Add entry for mips-*-sysv4*MP*
- * configure: Rebuild
- * config/tc-mips.c (mips_target_format): Return elf32-tradbigmips or
- elf32-tradlittlemips for traditional mips targets.
- * config/tc-mips.c (md_estimate_size_before_relax): Duplicate the
- test for Link Once sections as in adjust_reloc_syms.
- * config/te-tmips.h: New file for traditional mips targets. Define
- TE_TMIPS.
-
-2000-06-29 Mark Elbrecht <snowball3@bigfoot.com>
-
- * config/obj-coff.c (obj_coff_setcion) [BFD_ASSEMBLER]: If the
- flags argument is not present, don't change an existing section's
- section's attributes. If the flags argument is present, warn if the
- attributes don't match the section's current attributes. When
- long section names are supported, set SEC_LINK_ONCE and
- SEC_LINK_DUPLICATES_DISCARD for a new .gnu.linkonce section.
-
-Thu Jun 29 21:30:00 2000 Hans-Peter Nilsson <hp@axis.com>
-
- * config/obj-aout.c (obj_aout_type): Do not ignore for undefined
- symbols; create them.
-
-2000-06-29 Mark Elbrecht <snowball3@bigfoot.com>
-
- * write.c (set_segment_vma): New: Set vma and lma for a segment.
- (write_object_file) [BFD_ASSEMBLER && OBJ_COFF && TE_GO32]: Use it.
-
-2000-06-27 Aldy Hernandez <aldyh@redhat.com>
-
- * config/tc-mips.c (mips_ip): handle "(foo-.-4)" type of
- expressions. Ignore the problem when handling 16 bit signed
- immediates, because the assembler will take care of the relocation
- later.
-
-2000-06-27 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-d30v.c (write_2_short): Do not allow opcodes with
- the EITHER_BUT_PREFER_MU attribute to be combined into a reverse
- sequential order, and emit warning messages if the input source
- code contains constructs like that, or parallel constructs
- containing such opcodes.
-
-2000-06-26 Marek Michalkiewicz <marekm@linux.org.pl>
-
- * config/tc-avr.c (mcu_types): Rename avr4 to avr5, add avr4.
- Add more MCU types for avr4 and avr5. Replace at94k{10,20,40}
- with just at94k. Change AVR_ISA_85xx back to AVR_ISA_2xxx.
- (md_show_usage): Update usage message.
- (md_parse_option): Allow redefinition of MCU type within the
- same avr[1-5] bfd machine type. Show both old and new MCU type
- in the error message.
- (md_apply_fix3): Support 8K wrap if AVR_ISA_MEGA is not set.
- Simplify 8K wrap code.
-
-2000-06-25 Kazu Hirata <kazu@hxi.com>
-
- * config/obj-aout.c: Remove all uses of DEFUN.
- * config/obj-ieee.c: Likewise.
- * config/tc-sh.c: Fix comment typos.
- * config/tc-tahoe.c: Likewise.
- * config/tc-vax.c: Likewise.
- * config/tc-w65.c: Likewise.
- * config/tc-z8k.c: Likewise.
- * config/tc-h8300.c (build_bytes): Assemble ldmac correctly.
-
-2000-06-24 DJ Delorie <dj@cygnus.com>
-
- * config/tc-i386.c (md_estimate_size_before_relax): Revert
- more changes from Sept 1999
- (tc_i386_fix_adjustable): ditto
- (md_apply_fix3): ditto
-
-2000-06-24 Frank Ch. Eigler <fche@redhat.com>
-
- * cgen.c (expr_jmp_buf_p): New validity flag for expr_jmp_buf.
- (gas_cgen_parse_operand): Set it around expression() call.
- (gas_cgen_md_operand): Test for it before longjmp().
-
-2000-06-24 Kazu Hirata <kazu@hxi.com>
-
- * config/tc-h8500.c: Remove all uses of DEFUN.
- * config/tc-sh.c: Likewise.
- * config/tc-w65.c: Likewise.
- * config/tc-z8k.c: Likewise.
-
- * config/tc-h8500.c: Fix typos in comments.
-
-2000-06-23 Frank Ch. Eigler <fche@redhat.com>
-
- * expr.c (operand): Permit $hex literals if LITERAL_PREFIXDOLLAR_HEX
- is defined.
-
-2000-06-23 matthew green <mrg@redhat.com>
-
- * expr.c (operand): Do not as_bad() if RELAX_PAREN_GROUPING is
- defined. Fix error message for `[' grouping.
-
-2000-06-22 Kazu Hirata <kazu@hxi.com>
-
- * config/tc-h8300.c: Fix formatting and comment typos.
-
-2000-06-22 Timothy Wall <twall@cygnus.com>
-
- * config/tc-ia64.c (note_register_values): Move premature QP
- notation clearing into the appropriate place.
-
-2000-06-22 Alan Modra <alan@linuxcare.com.au>
-
- * dep-in.sed: Escape literal `.'s on patterns. Trim off `../'
- first before anything else. Add bin-bugs.h, emul.h and progress.h
- Sort list of files as for $(OBJS) in Makefile.am.
-
- * Makefile.am (DEP): grep for leading `/' in DEPA, and fail if we
- find one. Remake dependencies.
- ($(OBJS)): Add bin-bugs.h, emul.h, and progress.h Sort the list.
- * Makefile.in: Regenerate.
- * doc/Makefile.in: Regenerate.
-
- * config/tc-i386.c (i386_displacement): Don't assume a constant
- displacement is necessarily 16 bits when in 16 bit code mode.
- (md_assemble): Instead size the displacement here after we know
- for sure that a .code16gcc operand hasn't automatically added
- operand size prefixes.
-
-2000-06-21 H.J. Lu <hjl@gnu.org>
-
- * Makefile.am: Rebuild dependency.
- * Makefile.in: Rebuild.
-
-2000-06-21 Kazu Hirata <kazu@hxi.com>
-
- * config/tc-h8300.c (parse_reg): Make the function static.
- (parse_exp): Likewise.
-
-2000-06-20 DJ Delorie <dj@cygnus.com>
-
- * config/tc-i386.c (tc_i386_fix_adjustable): Revert change from
- Sept 1999; RVA relocs need to be treated more like DIR32 relocs
- for cygwin import libraries to work properly.
-
-2000-06-20 H.J. Lu <hjl@gnu.org>
-
- * Makefile.am: Rebuild dependency.
- * Makefile.in: Rebuild.
- * configure: Likewise.
- * doc/Makefile.in: Likewise.
-
-2000-06-20 Timothy Wall <twall@cygnus.com>
-
- * doc/internals.texi (CPU backend): Add @itemx for
- TC_START_LABEL_WITHOUT_COLON.
- * doc/c-tic54x.texi: New.
- * doc/as.texinfo: Add tic54x features and include primary tic54x
- documentation file.
- * doc/all.texi: Add C54X.
- * doc/Makefile.am (CPU_DOCS): Add c-tic54x.texi.
- * doc/Makefile.in: Regenerate.
- * configure.in: Add tic54x and define LIBM for tic54x.
- * configure: Regenrate.
- * config/tc-tic54x.[ch]: New.
- * config/obj-coff.h: Add tic54x.
- * Makefile.am: (CPU_TYPES): Add tic54x.
- (TARGET_CPU_CFILES): Add 'tc-tic54x.c'.
- (TARGET_CPU_HFILES): Add 'tc-tic54x.h'.
- (as_new_LDADD): Add $(LIBM).
- * Makefile.in: Regenerate.
-
-2000-06-18 Stephane Carrez <stcarrez@worldnet.fr>
-
- * doc/Makefile.am (CPU_DOCS): Added 68hc11 file.
- * doc/c-m68hc11.texi: Document 68HC11 and 68HC12 port.
- * doc/as.texinfo: Likewise.
-
- * configure, Makefile.in: Regenerate.
- * configure.in (emulations): Recognize m6811 and m6812.
- * Makefile.am (CPU_TYPES, TARGET_CPU_CFILES, TARGET_CPU_HFILES):
- Added files for 68hc11 and 68hc12 assembler.
- * config/tc-m68hc11.c: Assembler for 68hc11 and 68hc12.
- * config/tc-m68hc11.h: Header definition for that assembler.
-
-2000-06-18 Nick Clifton <nickc@redhat.com>
-
- * symbols.c (resolve_symbol_value): Use bfd_octets_per_byte
- instead of OCTETS_PER_BYTE.
-
- * config/tc-v850.c: Fix compile time warnings.
- * config/tc-ppc.c: Fix compile time warnings.
-
-2000-06-18 H.J. Lu <hjl@gnu.org>
-
- * configure.in: Don't emulate i386-pc-pe-coff with i386coff.
- * configure: Rebuild.
-
-2000-06-17 Mark Elbrecht <snowball3@bigfoot.com>
-
- * config/obj-coff.c (obj_coff_weak): Typo fix: Change BFD_ASSEMLER
- to BFD_ASSEMBLER.
-
-2000-06-16 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-mips.c (md_parse_option): Accept RM5200,RM5230,
- RM5231, RM5261, RM5721 and RM7000 as r5000 cpu variants.
-
- * doc/c-mips.texi: Document newly accepted cpu variants.
-
-2000-06-15 Ulf Carlsson <ulfc@engr.sgi.com>
-
- * config/tc-mips.h: Remove definition of ONLY_STANDARD_ESCAPES.
-
-2000-06-13 Ulf Carlsson <ulfc@engr.sgi.com>
-
- * macro.c (getstring): Make it possible to escape the quote
- character.
-
-Tue Jun 13 20:58:28 2000 Catherine Moore <clm@redhat.com>
-
- * config/tc-hppa.c (pa_export): Weak symbols can be global.
-
-2000-06-13 H.J. Lu <hjl@gnu.org>
-
- * configure: Regenerate.
-
-2000-06-09 Alan Modra <alan@linuxcare.com.au>
-
- * app.c (do_scrub_begin): Don't default lex[';'] as a line
- separator.
- * doc/internals.texi (line_separator_chars): Semicolon is no
- longer a default. Mention null and newline as defaults.
-
- * read.c (is_end_of_line): Remove ifdef TC_HPPA.
-
- * config/tc-i386.h (line_separator_chars): Explicitly mention `;'
- * config/tc-i860.h (line_separator_chars): Likewise.
- * config/tc-h8300.c (line_separator_chars): Likewise.
- * config/tc-i960.c (line_separator_chars): Likewise.
- * config/tc-m68k.c (line_separator_chars): Likewise.
- * config/tc-mips.c (line_separator_chars): Likewise.
- * config/tc-ns32k.c (line_separator_chars): Likewise.
- * config/tc-sparc.c (line_separator_chars): Likewise.
- * config/tc-vax.c (line_separator_chars): Likewise.
-
- * config/tc-h8300.c (comment_chars): Use string initialiser.
- * config/tc-i960.c (line_comment_chars): Likewise.
- * config/tc-z8k.c (comment_chars, line_comment_chars,
- line_separator_chars): Likewise.
-
- * config/tc-arm.c (line_separator_chars): Always use `;', not just
- for TE_LINUX.
-
-2000-06-08 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-arm.c (cons_fix_new_arm): Assign correct reloc value
- for size 1 fixes.
-
-2000-06-08 David O'Brien <obrien@FreeBSD.org>
-
- * configure.in (VERSION): Update to show this is the CVS mainline.
-
-2000-06-08 Matthew Jacob <mjacob@feral.com>
-
- * config/tc-alpha.c (md_undefined_symbol): Properly understand that
- $at is the integer register $r28, vs. both $r28 and the floating
- point register $f28.
-
-2000-06-08 James E. Wilson <wilson@cygnus.com>
-
- * config/tc-ia64.c (generate_unwind_image): Call ia64_flush_insns.
- (dot_endp): Don't call ia64_flush_insns.
- (emit_one_bundle): Don't delete prologue/body records from
- unwind_record list in first loop. Rewrite second loop to account for
- this.
-
-2000-06-07 David Mosberger <davidm@hpl.hp.com>
-
- * config/tc-ia64.c: Add missing prototypes.
- (generate_unwind_image): Cast argument to output_unw_records call.
-
-Wed Jun 7 22:44:14 2000 Denis Chertykov <denisc@overta.ru>
-
- * config/tc-avr.c (avr_operand): fix the formatting of the comment.
-
-Wed Jun 7 21:26:15 2000 Denis Chertykov <denisc@overta.ru>
-
- * config/tc-avr.c (AVR_ISA_???): moved to include/opcode/avr.h
- (REGISTER_P): likewise.
- (avr_opcodes): uses include/opcode/avr.h
- (avr_operand): enable ld r,Z or st r,Z for at90s1200.
-
-2000-06-04 Alan Modra <alan@linuxcare.com.au>
-
- * read.c (is_end_of_line): No ';' for TC_HPPA. Add missing
- initializers too.
-
-2000-06-03 H.J. Lu <hjl@gnu.org>
-
- * read.c (is_end_of_line): Put back `;'.
-
-2000-06-03 Alan Modra <alan@linuxcare.com.au>
-
- * config/tc-i386.c (md_shortopts): Remove 'm', add 'q' to non-elf.
-
-2000-06-01 Alan Modra <alan@linuxcare.com.au>
-
- * expr.c (operand): Test is_end_of_line outside switch to catch
- line separator chars that are also operators.
- (operator): Return O_illegal for line separator chars.
-
- * read.c (is_end_of_line): Use 1 instead of 99. Don't set `;'
- entry (or `!' entry for TC_HPPA).
-
- * config/tc-arm.c (my_get_float_expression): Cast to unsigned char
- before indexing is_end_of_line. Remove redundant check for '\0'.
- (fp_op2): Likewise.
- * config/tc-h8500.c (md_assemble): Likewise.
- * config/tc-mcore.c (md_assemble): Likewise.
- * config/tc-tic30.c (tic30_find_parallel_insn): Likewise.
- (md_atof): Likewise
-
- * config/tc-m88k.c (s_bss): Cast to unsigned char before indexing
- is_end_of_line.
- * config/tc-mcore.c (mcore_cons): Likewise.
- (mcore_float_cons): Likewise.
- (mcore_stringer): Likewise.
- * config/tc-tic30.c (tic30_find_parallel_insn): Likewise.
-
-2000-06-01 Scott Bambrough <scottb@netwinder.org>
-
- * config/tc-arm.c (do_mrs): Allow SPSR_BIT to be set correctly.
-
-2000-05-29 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-sh.c: Fix compile time warning messages.
-
- * config/tc-mips.c: Fix compile time warning messages.
-
-2000-05-29 Philip Blundell <philb@gnu.org>
-
- * doc/as.texinfo: Update copyright dates.
- (Local Labels): Delete misplaced mention of ARM.
- * NEWS: Mention ARM ELF support.
-
-2000-05-27 Alexandre Oliva <aoliva@cygnus.com>
-
- * config/tc-mn10300.c (md_assemble): Copy size to real_size before
- it is modified, and use the real_size to compute the frag address
- for dwarf2 line info.
-
-2000-05-27 Alan Modra <alan@linuxcare.com.au>
-
- * Makefile.am (DEP, DEP1, dep, dep-in, dep-am): Use a better sed
- line-matching scheme to cope with automake moving variables around.
- ($(TARG_CPU_O)): Remove dependency on TARG_CPU_DEP_@target_cpu_type@
- * Makefile.in: Regenerate.
-
-2000-05-26 Jakub Jelinek <jakub@redhat.com>
-
- * config/tc-sparc.c (sparc_relax): New.
- (md_longopts): Add -relax and -no-relax options.
- (md_parse_options, md_show_usage): Likewise.
- (md_apply_fix3): Optimize tail call into branch always if possible.
-
-Thu May 4 15:27:07 2000 Donald Lindsay <dlindsay@cygnus.com>
-
- * config/tc-d10v.c (write_2_short, parallel_ok, md_assemble,
- d10v_cleanup) implement Mitsubishi's newly explained branch-packing
- rules, with warning when a GAS statement specifies a packing that
- will result in an instruction being squashed.
- Added typdef packing_type and enumerals, changed various integer
- literals to use the enumerals.
-
-2000-05-24 David Mosberger <davidm@hpl.hp.com>
-
- * config/tc-ia64.c (dot_restorereg_p): New function.
- (md_pseudo_table): Add restorereg.p.
- (output_X3_format): Fix typo: record type should be UNW_X3, not UNW_X1.
- (output_X4_format): Fix typo: record type should be UNW_X4, not UNW_X2.
-
- * config/tc-ia64.h (unw_record_type): Add unwabi.
- (unw_r_record): Rename member MASK to GRMASK. Add sub-structure
- called MASK with members for imask, and the masks produced by
- fr_mem, gr_mem, br_mem, and frgr_mem.
- (unw_p_record): Add members ABI and CONTEXT.
- (unw_x_record): Add member AB.
- * config/tc-ia64.c (enum reg_symbol): Add REG_PSP and REG_PRIUNAT
- as pseudo-register for use during unwind info generation.
- (AR_PFS, AR_LC): New macros.
- (enum pseudo_type): Add PSEUDO_FUNC_REG to permit declaring registers
- whose names start with an at sign (as in "@priunat").
- (pseudo_func): Add "svr4", "hpux", "nt" constants and "priunat"
- register.
- (unwind_list, unwind_tail, current_unwind_entry, proc_start,
- proc_end, unwind_info, personality_routine): Consolidate into
- "unwind" structure to reduce offset-table use. Add member
- NEXT_SLOT_NUMBER to track the slot number for the next instruction
- to be emitted.
- (output_R1_format, output_R3_format, output_P3_format,
- output_P6_format): Initialize R with zero to reduce compiler warnings.
- (output_P7_format): Ditto. Add `default' branch to switch
- statement to reduce compiler warnings.
- (output_P8_format, output_B1_format, output_B4_format): Ditto.
- (output_P4_format): Rename 2nd & 3rd arg to IMASK and IMASK_SIZE.
- (format_ab_reg): Rename from format_a_b_reg. Merge A and B args
- into single argument.
- (output_X1_format, output_X3_format): Initialize R with zero to reduce
- compiler warnings. Merge A and B args into single argument.
- (output_X2_format, output_X4_format): Remove unused variable R. Merge
- A and B args into single argument.
- (free_record): Removed (wasn't used).
- (free_list_records): Also free imasks in prologue records.
- (output_prologue, output_prologue_gr): Initialize mask bits to zero.
- (output_spill_mask): Remove.
- (output_unwabi): New function.
- (output_epilogue, output_label_state, output_copy_state): Call
- alloc_record.
- (output_spill_psprel, output_spill_sprel, output_spill_psprel_p,
- output_spill_sprel_p, output_spill_reg, output_spill_reg_p): Add AB
- argument.
- (process_one_record): New locals FR_MASK and GR_MASK. Ignore
- gr_mem, fr_mem, br_mem, and frgr_mem records and instead emit them
- as part of handling the prologue records. Emit region's imask if
- we have one. Handle unwabi, epilogue, label_state, copy_state,
- spill_psprel, spill_sprel, spill_reg, spill_psprel_p,
- spill_sprel_p, and spill_reg_p records.
- (set_imask, count_bits, slot_index): New function.
- (fixup_unw_records): Fix region size computation. Handle
- epilogue, spill_reg, spill_sprel, spill_psprel, spill_reg_p,
- spill_sprel_p, and spill_psprel_p records. Merge mask bits of
- frgr_mem, fr_mem, gr_mem, br_mem on a per-region basis and
- set_imask accordingly. Update imask for gr_gr, and br_gr records.
- (convert_expr_to_ab_reg, convert_expr_to_xy_reg): New function.
- (dot_save): Use manifest constants for applicaton registers.
- Handle REG_PR and REG_PRIUNAT.
- (dot_restore): Don't just ignore it.
- (dot_restorereg): New function..
- (generate_unwind_image): Ensure unwind info is a multiple of eight
- bytes, not just four bytes.
- (dot_handlerdata, dot_unwentry): Demand empty rest of line.
- (dot_altrp): Don't just ignore it.
- (dot_savemem): New function. Replaces dot_savesp() and
- dot_savepsp(). Use manifest constants for applicaton registers.
- Handle REG_PR and REG_PRIUNAT.
- (dot_savef): Simplify.
- (dot_saveb): Support generation of br_gr.
- (dot_spillreg, dot_spillmem, dot_spillreg_p, dot_spillmem_p,
- dot_label_state, dot_copy_state): New function.
- (dot_unwabi): Don't just ignore it.
- (md_pseudo_table): Add restorereg, spillreg, spillsp, spillpsp,
- spillreg.p, spillsp.p, spillpsp, label_state, copy_state,
- unwabi, vframesp, and vframepsp. Fix typo alprp->altrp.
- (emit_one_bundle): Set slot number for prologue/body records
- *before* emitting the first insn.
- (emit_one_bundle): Set UNWIND.NEXT_SLOT_NUMBER.
- (md_begin): Declare "psp" pseudo-register.
- (md_operand): Handle PSEUDO_FUNC_REG. Fix printing of error message
- so we don't get segfault.
- (output_psp_sprel): Output sp/psp relative offsets as 4-byte word
- counts as required per SW Conventions manual
- (output_rp_psprel, output_rp_sprel, output_pfs_psprel,output_pfs_sprel,
- output_preds_psprel, output_preds_sprel, output_spill_base,
- output_unat_psprel, output_unat_sprel, output_lc_psprel,
- output_lc_sprel, output_fpsr_psprel, output_fpsr_sprel,
- output_priunat_psprel, output_priunat_sprel, output_bsp_psprel,
- output_bsp_sprel, output_bspstore_psprel, output_bspstore_sprel,
- output_rnat_psprel, output_rnat_sprel, output_spill_psprel,
- output_spill_sprel, output_spill_psprel_p, output_spill_sprel_p):Ditto.
- (dot_vframe): Implement.
- (dot_vframesp, dot_vframepsp): New function.
-
-Tue May 23 00:57:05 2000 Hans-Peter Nilsson <hp@axis.com>
-
- * configure.in (i386-*-freebsd a.out entry): Quote properly.
- * configure: Regenerate.
-
-2000-05-23 Alan Modra <alan@linuxcare.com.au>
-
- * config/tc-i386.c (md_assemble): Pass jump reloc in fr_var...
- (md_estimate_size_before_relax): so we can use it here instead of
- old kludges. Localise vars to blocks. Comment.
-
- * frags.c (frag_new): Update fr_var comments.
- * frags.h (struct frag): Ditto.
-
-2000-05-22 Richard Henderson <rth@cygnus.com>
-
- * config/tc-ia64.c (FUNC_PC_RELATIVE): New.
- (pseudo_func): Add pcrel.
- (operand_match): Handle IA64_OPND_TGT64.
- (build_insn): Likewise.
- (md_begin): Initialize pseudo_func[FUNC_PC_RELATIVE].
- (ia64_gen_real_reloc_type): Handle FUNC_PC_RELATIVE.
- (fix_insn): Handle all three 64-bit relocation types.
-
-Mon May 22 22:43:32 2000 Hans-Peter Nilsson <hp@axis.com>
-
- * obj.h (struct format_ops): New members begin, app_file,
- s_set_other, s_set_desc, s_get_type, s_set_type,
- separate_stab_sections, init_stab_section.
-
- * config/obj-multi.h: Update GPL notice to v2.
- (obj_begin): New.
- (obj_app_file): New.
- (S_SET_SIZE): Test s_set_size for NULL before calling.
- (S_SET_ALIGN): Similar for s_set_align.
- (S_SET_OTHER): New.
- (S_SET_DESC): New.
- (S_GET_TYPE): New.
- (S_SET_TYPE): New.
- (SEPARATE_STAB_SECTIONS): New.
- (INIT_STAB_SECTION): New.
- (EMIT_SECTION_SYMBOLS): New.
- (AOUT_STABS) [OBJ_MAYBE_AOUT]: Define.
-
- * config/obj-elf.h: Update GPL notice to v2.
- Mention that this file is included from obj-multi.h.
- (obj_begin): Wrap definition in ifndef.
- (elf_file_symbol): Constify declaration.
- (obj_app_file): Ditto.
- (SEPARATE_STAB_SECTIONS, INIT_STAB_SECTION, OBJ_PROCESS_STAB):
- Wrap in ifndef SEPARATE_STAB_SECTIONS.
-
- * config/obj-elf.c (elf_s_set_other): New.
- (elf_file_symbol): Constify argument.
- (elf_separate_stab_sections): New.
- (elf_init_stab_section): New.
- (elf_format_ops): Add new members. Remove comma at end.
-
- * config/obj-ecoff.c (ecoff_separate_stab_sections): New.
- (ecoff_format_ops): Add new fields. Remove comma at end.
- Mention inconsistency for emit_section_symbols.
-
- * config/obj-coff.h (c_dot_file_symbol): Constify declaration.
-
- * config/obj-coff.c (c_dot_file_symbol): Constify argument.
- (coff_separate_stab_sections): New.
- (coff_format_ops): Add new members.
-
- * config/obj-aout.c (obj_aout_sec_sym_ok_for_reloc): New.
- (obj_aout_s_set_other): New.
- (obj_aout_s_set_desc): New.
- (obj_aout_s_get_type): New.
- (obj_aout_s_set_type): New.
- (obj_aout_separate_stab_sections): New.
- (aout_format_ops): New members added. Use obj_aout_process_stab,
- not 0. Use obj_aout_sec_sym_ok_for_reloc, not 0.
- (obj_aout_frob_symbol): Add ATTRIBUTE_UNUSED to args as
- appropriate.
- (obj_aout_line, obj_aout_weak, obj_aout_type): Ditto.
-
-2000-05-22 Alan Modra <alan@linuxcare.com.au>
-
- * config/tc-i386.c (tc_i386_fix_adjustable): Prevent adjustment
- for OBJ_MAYBE_ELF too. Use S_IS_EXTERNAL instead of S_IS_EXTERN.
- (md_estimate_size_before_relax): Ensure jumps to weak and
- externally visible symbols are relocatable.
-
-Sat May 20 16:41:55 2000 Hans-Peter Nilsson <hp@axis.com>
-
- * stabs.c (aout_process_stab): Make global.
- (s_desc): Add ATTRIBUTE_UNUSED to args as appropriate.
- * read.h (aout_process_stab): Declare.
-
- * configure.in (EMULATIONS) [i386aout, i386coff, i386elf]:
- Generalize to *aout, *coff *elf.
- * configure: Regenerated.
-
- * doc/internals.texi (Object format backend): Say
- SEPARATE_STAB_SECTIONS needs to be nonzero, not just defined.
-
- * Makefile.am (TARG_ENV_HFILES): Delete te-multi.h.
- * Makefile.in: Regenerated.
-
-2000-05-19 Catherine Moore <clm@cygnus.com>
-
- * cgen.h (GAS_CGEN_MAX_FIXUPS): Check if already defined.
-
-2000-05-18 Alan Modra <alan@linuxcare.com.au>
-
- * config/tc-hppa.c (md_apply_fix): Mask out immediate bits of
- instruction to reflect change in re_assemble_*.
-
-Thu May 18 10:52:14 2000 Jeffrey A Law (law@cygnus.com)
-
- * configure.in (hppa-*-hpux11*): If the cpu is hppa*64*, then
- build PA64 ELF tools.
- * configure: Rebuilt.
-
-2000-05-17 Alan Modra <alan@linuxcare.com.au>
- * Makefile.am: Regenerate dependencies.
- * Makefile.in: Regenerate.
-
-2000-05-15 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-arm.c (struct asm_psr): Add boolean field
- distinguishing between CSPR and SPSR. Rename 'number' field
- to 'field'.
- (psrs): Rearrange contents to match new asm_psr structure.
- (arm_psr_parse): Move next to psr_required_here. Make it
- return an asm_psr structure.
- (psr_required_here): Use asm_psr structure returned by
- arm_psr_parse.
- (do_msr): Reorganise to allow psr_required_here to be called
- only once.
- (md_undefined_name): Mark 'name' parameter as unused, since
- the COFF target does not use it.
-
-2000-05-14 David O'Brien <obrien@FreeBSD.org>
-
- * config/te-386bsd.h: Clean up comments to adhere to the GNU coding
- standards.
- * config/te-aux.h: Likewise.
- * config/te-dpx2.h: Likewise.
- * config/te-go32.h: Likewise.
- * config/te-hp300.h: Likewise.
- * config/te-hppa.h: Likewise.
- * config/te-i386aix.h: Likewise.
- * config/te-ic960.h: Likewise.
- * config/te-interix.h: Likewise.
- * config/te-nbsd532.h: Likewise.
- * config/te-pc532mach.h: Likewise.
- * config/te-ppcnw.h: Likewise.
- * config/te-psos.h: Likewise.
- * config/te-sparcaout.h: Likewise.
- * config/te-sun3.h: Likewise.
- * config/te-sysv32.h: Likewise.
-
-2000-05-14 Alan Modra <alan@linuxcare.com.au>
-
- * config/tc-h8300.c (do_a_fix_imm): Don't rely on `short' being 16
- bits. Instead explicitly mask and sign extend. Do the 8 bit mask
- and sign extend without an if statement.
- (build_bytes): Likewise.
-
-2000-05-14 Kazu Hirata <kazu@hxi.com>
-
- * config/tc-h8300.c (do_a_fix_imm): Output a reloc for no
- X_add_symbol L_32 case.
-
-2000-05-14 David O'Brien <obrien@FreeBSD.org>
-
- * config/te-freebsd.h: New file.
-
-2000-05-13 Alan Modra <alan@linuxcare.com.au>
-
- * asintl.h (gettext, dgettext, dcgettext, textdomain,
- bindtextdomain): Replace defines with those from intl/libgettext.h
- to quieten gcc warnings.
-
- * NEWS: Mention x86 .arch and -q.
-
- * config/tc-i386.c (quiet_warnings): New.
- (md_assemble): Use quiet_warnings.
- (md_parse_option): Set quiet_warnings from -q.
- (md_show_usage): Mention -q, delete -m.
- (flag_do_long_jump): Delete.
- (md_parse_option): Remove -m.
- (md_show_usage): Remove -m.
- (md_create_long_jump): Remove useless flag_do_long_jump code.
-
- * as.c (parse_args): In case OPTION_DEFSYM, use a valueT to hold
- the symbol value, and use bfd_scan_vma if BFD_ASSEMBLER.
-
-2000-05-13 Alan Modra <alan@linuxcare.com.au>
- Alexander Sokolov <robocop@netlink.ru>
-
- * doc/c-i386.texi (i386-Arch): New section.
- (i386-Syntax): Mention .intel_syntax and .att_syntax.
-
- * config/tc-i386.c (cpu_arch_name, cpu_arch_flags): New.
- (smallest_imm_type): Use smallest opcode for shift by one if cpu
- architecture has been given and is not 486.
- (set_cpu_arch): New.
- (md_pseudo_table): Add .arch.
- (md_assemble): Warn if cpu architecture has been given and an
- unsupported instruction.
-
- * config/tc-i386.h (SMALLEST_DISP_TYPE): Delete.
- Move operand_types bit defines after relevant template field.
- (template): Add cpu_flags.
- (Cpu*): Define.
- (arch_entry): New.
-
-2000-05-12 Alexandre Oliva <aoliva@cygnus.com>
-
- * config/tc-mn10300.h (md_end): Define.
- (mn10300_finalize): Declare.
- * config/tc-mn10300.c: Include dwarf2dbg.h.
- (debug_line): Define.
- (md_assemble): Generate dwarf2 line info.
- (mn10300_finalize): New function. Finalize dwarf2 info.
-
-2000-05-11 Ulf Carlsson <ulfc@engr.sgi.com>
-
- * config/tc-mips.c (md_estimate_size_before_relax): Use the
- external version of the relocation for weak symbols.
-
-2000-05-08 David Mosberger <davidm@hpl.hp.com>
-
- * config/tc-ia64.c (output_P7_format, case mem_stack_f): Output fixed
- frame size in units of 16 bytes, as required per SW Conventions manual.
- (output_unw_records): Output info-block header as a dword to get
- byte-order right.
-
-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.
-
-2000-05-04 Alan Modra <alan@linuxcare.com.au>
-
- * as.c (parse_args): Just mention current year in printed
- copyright message.
-
-2000-05-03 J.T. Conklin <jtc@redback.com>
-
- * config/tc-ppc.c (pre_defined_registers): Add entries for vector
- unit registers.
- (md_parse_option): Recognize -m7400.
-
-2000-05-03 Ian Lance Taylor <ian@zembu.com>
-
- * config/atof-ieee.c (gen_to_words): When adding carry back in,
- don't permit lp to become less than the words array.
-
-2000-05-03 Rodney Brown <RodneyBrown@pmsc.com>
-
- config/tc-mcore.c (md_apply_fix3): BFD_RELOC_MCORE_PCREL_IMM11BY2
- Fix little-endian case.
-
-2000-05-03 David O'Brien <obrien@NUXI.com>
-
- * as.c (parse_args): Update copyright.
-
-2000-05-03 Mark Elbrecht <snowball3@bigfoot.com>
-
- * gas/config/tc-i386.h (SUB_SEGMENT_ALIGN): If TE_GO32, return 4
- for the .bss section too.
-
-2000-05-02 Alan Modra <alan@linuxcare.com.au>
-
- * configure.in: Set em=linux for hppa-*-linux.
- * configure: Regenerate.
- * doc/Makefile.in: Regenerate with correct automake.
-
- * frags.c (frag_grow): Sanity check chunk_size.
-
- * config/obj-elf.h: #include "bfd.h" not <bfd.h>
- * config/obj-som.h: Likewise.
- * config/obj-ieee.h: Likewise.
-
- * config/tc-hppa.h: Test BFD_ARCH_SIZE, not BFD64.
-
- * config/tc-hppa.c (log2): Only compile when OBJ_SOM.
- (md_pseudo_table): Fully initialise OBJ_ELF cases.
- (fix_new_hppa): Add ATTRIBUTE_UNUSED to args as appropriate.
- (pa_ip): low_sign_unext now returns via function value. Use
- re_assemble_* instead of dis_assemble_* and
- INSERT_FIELD_AND_CONTINUE combination. Don't call sign_unext
- unnecessarily.
- (md_convert_frag): Add ATTRIBUTE_UNUSED to args as appropriate.
- (md_section_align, md_parse_option, md_show_usage,
- md_undefined_symbol, pa_align, pa_block, pa_brtab, pa_try,
- pa_callinfo, pa_code, pa_comm, pa_end, pa_enter, pa_entry,
- pa_exit, pa_export, pa_import, pa_label, pa_leave, pa_level,
- pa_origin, pa_param, pa_proc, pa_procend, pa_space, pa_spnum,
- pa_version, pa_compiler, pa_copyright, pa_data, pa_fill, pa_lsym,
- pa_text): Likewise.
- (md_apply_fix): Change type of new_val to offsetT. Delete w1, w2,
- w, resulti. Add insn, val. Move bfd_get_32 and bfd_put_32
- outside of switch. Correct mask and shifting errors in case 10
- and case -11. In case 21, compare against signed range to suit
- hppa_field_adjust changes. In case 12, use re_assemble_12. In
- case 17 and case 22, use offsetT variable to properly check range.
- Use re_assemble_* here too.
- (evaluate_absolute): Change type of value to offsetT. Call
- hppa_field_adjust to do the work for us.
- (pa_parse_cmpb_64_cmpltr): Delete save_s.
- (pa_parse_cmpib_64_cmpltr): Ditto.
- (pa_build_unwind_subspace): Delete unused var subseg. Change type
- of i to unsigned int.
- (pa_type_args): Conditionally declare symbol if OBJ_SOM.
- (pa_end_of_source): Return type is void.
-
-Mon May 1 08:54:23 2000 Catherine Moore <clm@cygnus.com>
-
- * macro.c (macro_expand_body): Don't prepend macro number with zeroes.
-
-Mon May 1 14:19:39 2000 Denis Chertykov <denisc@overta.ru>
-
- * config/tc-avr.c: ATTRIBUTE_UNUSED added to the necessary places.
- More comments added.
- (md_begin): Removed "construct symbols for each register name".
- Because register names conflicts with GCC generated function
- names.
- (avr_operand): Now constant numbers can be used as a register
- identifiers (0 as r0, 31 as r31).
- (md_assemble): use skip_space () before parsing instruction
- operands.
-
-2000-05-01 Alan Modra <alan@linuxcare.com.au>
-
- * configure.in: Set bfd_gas=yes on i386-*-pe and i386-*-nt* to
- ensure all pe targets use bfd. Remove unnecessary bfd_gas=yes on
- arm-*-netbsd* and arm-*-wince as this is set for all arm*.
- * configure: Regenerate.
-
-2000-04-29 Andreas Jaeger <aj@suse.de>
-
- * as.h: Correctly check GCC version.
-
-2000-04-26 David O'Brien <obrien@FreeBSD.org>
-
- * doc/as.1: Fix unbalanced brackets.
-
- * config/tc-i386.c (comment_chars): Don't use '/' as comment start if
- TE_FreeBSD.
- (line_comment_chars): Set to '/' if TE_FreeBSD.
-
-Tue Apr 25 11:02:02 2000 Jeffrey A Law (law@cygnus.com)
-
- * configure.in: Configury support for PA64 (currently disabled).
- * configure: Rebuilt.
-
-2000-04-25 Machida Hiroyuki <machida@sm.sony.co.jp>
-
- * config/tc-mips.c (s_change_sec): Use record_alignment, not
- bfd_set_section_alignment.
-
-2000-04-25 Alan Modra <alan@linuxcare.com.au>
-
- * config/tc-i386.c (offset_in_range): Ensure shift counts are less
- than 32.
-
-2000-04-24 Nick Clifton <nickc@cygnus.com>
-
- * doc/c-arm.texi (ARM Directives): Document behaviour of .align 0.
- * doc/as.texinfo (Align): Include arm and strongarm in list of
- targets that have the second form of the behaviour of the .align
- directive.
-
-2000-04-24 Mark Klein <mklein@dis.com>
-
- * obj-som.c: Terminate obj_pseudo_table.
-
-Mon Apr 24 15:21:11 2000 Clinton Popetz <cpopetz@cygnus.com>
-
- * as.c (parse_args): Allow md_parse_option to override -a listing
- option.
- * config/obj-coff.c (add_lineno): Change type of offset parameter
- from "int" to "bfd_vma."
- * config/tc-ppc.c (md_pseudo_table): Add "llong" and "machine."
- (ppc_mach, ppc_subseg_align, ppc_target_format): New.
- (ppc_change_csect): Align correctly for XCOFF64.
- (ppc_machine): New function, which discards "ppc_machine" line.
- (ppc_tc): Cons for 8 when code is 64 bit.
- (md_apply_fix3): Don't check operand->insert. Handle 64 bit
- relocations.
- (md_parse_option): Handle -a64 and -a32.
- (ppc_xcoff64): New.
- * config/tc-ppc.h (TARGET_MACH): Define.
- (TARGET_FORMAT): Move to function.
- (SUB_SEGMENT_ALIGN): Use ppc_subseg_align.
-
-Sun Apr 23 16:45:45 2000 Denis Chertykov <denisc@overta.ru>
-
- * config/tc-avr.c: New AVR_ISA_ defined.
- (md_assemble): Handle opcodes with optional operands (lpm,elpm).
- (avr_operand): Handle 'a', 'v' and 'z' constraint letters needed
- for `fmul', `movw' and `lpm R,Z' instructions.
- (avr_operands): Warn if current opcode is a two-word instruction
- and previous opcode was cpse/sbic/sbis/sbrc/sbrs.
- (avr_opcodes): New commands added.
- (REGISTER_P): Check 'a' and 'v' constraint letters.
- (mcu_types): New MCU added.
-
-2000-04-22 Timothy Wall <twall@cygnus.com>
-
- * config/tc-ia64.c (pseudo_func[]): Add new "nat" entry equivalent
- to "natval".
- (operand_match): Conditionally insert default bit values for IMMU9.
-
-2000-04-14 Matthew Green <mrg@cygnus.com>
-
- * configure.in: Add NetBSD/sparc ELF and NetBSD/sparc64 support.
- * configure: Rebuilt.
-
-Fri Apr 21 14:29:43 2000 Jeffrey A Law (law@cygnus.com)
- Jason Eckhardt <jle@cygnus.com>
-
- * config/tc-hppa.c (md_apply_fix): Handle new PA2.0 formats.
-
- * config/tc-hppa.c (CHECK_ALIGN): New macro.
- Added handling of new operand types l,y,&,fe,fE,fx.
-
-Fri Apr 21 13:20:53 2000 Richard Henderson <rth@cygnus.com>
- David Mosberger <davidm@hpl.hp.com>
- Timothy Wall <twall@cygnus.com>
- Andrew MacLeod <amacleod@cygnus.com>
- Jim Wilson <wilson@cygnus.com>
-
- * Makefile.am (CPU_TYPES): Add ia64.
- (TARGET_CPU_CFILES): Add config/tc-ia64.c.
- (TARGET_CPU_HFILES): Add config/tc-ia64.h.
- * Makefile.in: Rebuild.
- * app.c (do_scrub_chars): Handle DOUBLESLASH_COMMENTS.
- * configure: Rebuild.
- * configure.in: Recognize ia64 as cpu type. Set bfd_gas.
- (ia64-*-elf*, ia64-*-linux-gnu*): New targets.
- * expr.c (expr): Handle md_optimize_expr.
- * read.c (LEX_HASH): Add comment.
- * config/tc-ia64.c, config/tc-ia64.h: New files.
-
-2000-04-21 Richard Henderson <rth@cygnus.com>
-
- * config/tc-d30v.c (write_2_short): Disregard opcode1->ecc when
- bundling a non-delayed branch type instruction.
-
-2000-04-20 Alexandre Oliva <aoliva@cygnus.com>
-
- * config/tc-mn10300.c (HAVE_AM30): Define.
- (md_assemble): Use it.
-
-2000-04-19 Alan Modra <alan@linuxcare.com.au>
-
- * config/obj-elf.c (obj_elf_change_section): Check for changed
- section attributes.
-
- * 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.
-
-2000-04-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
-
- * Makefile.am (YACC, LEX): Get them from configure.
-
-2000-04-18 H.J. Lu (hjl@gnu.org)
-
- * config/tc-i386.c (offset_in_range): Use addressT instead of
- bfd_vma for non-bfd assemblers.
-
-2000-04-17 Alan Modra <alan@linuxcare.com.au>
-
- * config/tc-i386.c (offset_in_range): Sign extend val so BFD64
- doesn't give spurious errors.
-
-2000-04-14 Michael Sokolov <msokolov@ivan.Harhan.ORG>
-
- * as.h (SEEK_SET): Define if undefined.
-
-2000-04-13 Alan Modra <alan@linuxcare.com.au>
-
- * config/tc-arm.c (md_apply_fix3): Don't use UL suffix on
- constants, and don't assume offsetT is 32 bits.
-
-2000-04-12 Andrew Cagney <cagney@b1.cygnus.com>
-
- * config/tc-d10v.h: Include "write.h" to get definition of fixS.
- (md_pcrel_from_section): Add prototype.
- (d10v_fix_adjustable): Add prototype.
- (d10v_force_relocation): Replace 'struct fix' with 'fixS'.
-
- * config/tc-d10v.c (md_apply_fix3): Add paren around &&.
-
-2000-04-12 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-d10v.c (find_opcode): Correctly calculate position of
- symbol in frag chain.
-
-2000-04-10 Alan Modra <alan@linuxcare.com.au>
-
- * config/tc-i386.c (fits_in_signed_byte): Change arg to offsetT.
- (fits_in_unsigned_byte, fits_in_unsigned_word): Ditto.
- (fits_in_signed_word, smallest_imm_type): Ditto.
- (md_assemble): Use an offsetT var to hold offsetT values, not a
- long.
- (offset_in_range): New.
- (md_assemble): Use it.
- (md_convert_frag): Change type of target_address, opcode_address,
- and displacement_from_opcode_start to offsetT.
- (md_create_short_jump): Change type of offset to offsetT.
- (md_create_long_jump): Ditto.
- (md_apply_fix3): Use -4, not 0xfffffffc for BFD_RELOC_386_PLT32.
- (md_chars_to_number): Remove.
- (output_invalid): Remove duplicate prototype.
-
-2000-04-09 Nick Clifton <nickc@cygnus.com>
-
- * Makefile.am (CPU_TYPES): Add 'avr'.
- (TARGET_CPU_CFILES): Add 'tc-avr.c'.
- (TARGET_CPU_HFILES): Add 'tc-avr.h'.
-
- * Makefile.in: Regenerate.
-
- * doc/as.texinfo: Add M32R documentation.
-
-Fri Apr 7 15:56:57 2000 Andrew Cagney <cagney@b1.cygnus.com>
-
- * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
- --enable-build-warnings option.
- * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
- * Makefile.in, configure: Re-generate.
-
-2000-04-07 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-arm.c (md_apply_fix3): Treat BFD_RELOC_ARM_PCREL_BLX
- in the same way as BFD_RELOC_ARM_PCREL_BRANCH, and
- BFD_RELOC_THUMB_PCREL_BLX lie BFD_RELOC_THUMB_PCREL_BRANCH.
- (tc_gen_reloc): Accept BFD_RELOC_{ARM|THUMB}_PCREL_BLX.
- (arm_force_relocation): Force relocations for
- BFD_RELOC_{ARM|THUMB}_PCREL_BLX as well.
-
-Wed Apr 5 22:26:32 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * config/tc-sh.c (get_operands): There's no third operand if the
- first operand is an immediate.
-
-Wed Apr 5 22:07:19 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * config/tc-sh.c (immediate): Delete.
- (sh_operand_info): Add immediate member.
- (parse_reg): Use A_PC for pc.
- (parse_exp): Add second argument 'op'. All callers changed.
- (parse_at): Expect pc to be coded as A_PC.
- Use immediate field in *op.
- (insert): Add fourth argument 'op'. All callers changed.
- (build_relax): Add second argument 'op'. All callers changed.
- (insert_loop_bounds): New function.
- (build_Mytes): Remove DISP_4.
- Split IMM_[48]{,BY[24]} into IMM[01]_[48]{,BY[24]}. Add REPEAT.
- (assemble_ppi): Use immediate field in *operand.
- (sh_force_relocation): Handle BFD_RELOC_SH_LOOP_{START,END}.
- (md_apply_fix): Likewise.
- (tc_gen_reloc): Likewise. Check for a pcrel BFD_RELOC_SH_LABEL.
-
-Wed Apr 5 06:35:45 2000 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
-
- * config/tc-sparc.c (sparc_ip): Avoid string pasting.
-
-Tue Apr 4 19:27:50 2000 Hans-Peter Nilsson <hp@axis.com>
-
- * internals.texi (CPU backend): Document
- TC_CHECK_ADJUSTED_BROKEN_DOT_WORD.
-
-2000-04-04 Alan Modra <alan@linuxcare.com.au>
-
- * po/gas.pot: Regenerate.
-
- * as.c (show_usage): Restore translated part of bug string.
- * gasp.c (show_usage): Likewise.
-
- * 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.
-
-2000-04-03 Alexandre Oliva <aoliva@cygnus.com>
-
- * 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.
-
-2000-04-03 Alan Modra <alan@linuxcare.com.au>
-
- * as.h: #include "bin-bugs.h"
- * as.c (show_usage): Use REPORT_BUGS_TO.
- * gasp.c: #include "bin-bugs.h"
- (show_usage): Use REPORT_BUGS_TO.
-
- * config/tc-sparc.c (md_show_usage): Add a trailing newline.
-
-Mon Apr 3 13:56:03 2000 Hans-Peter Nilsson <hp@axis.com>
-
- * write.c (write_object_file) [! WORKING_DOT_WORD]: If defined,
- call TC_CHECK_ADJUSTED_BROKEN_DOT_WORD for each word after
- adjustments.
-
-2000-04-03 Alan Modra <alan@linuxcare.com.au>
-
- * 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.
-
-2000-04-02 Richard Henderson <rth@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.
-
-2000-04-01 Ian Lance Taylor <ian@zembu.com>
-
- * 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.
-
-2000-03-31 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-d10v.h (md_flush_pending_output): Define.
-
-2000-03-29 Nick Clifton <nickc@cygnus.com>
-
- * 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.
-
-2000-03-29 Nick Clifton <nickc@cygnus.com
-
- * config/tc-arm.c (tinsns): Add "bal" instruction pattern.
-
-2000-03-28 Alan Modra <alan@linuxcare.com.au>
-
- * listing.c (LISTING_LHS_WIDTH): Default depends on
- LISTING_WORD_SIZE.
- (LISTING_LHS_WIDTH_SECOND): Default to LISTING_LHS_WIDTH.
-
-2000-03-27 Ian Lance Taylor <ian@zembu.com>
-
- * config/tc-sh.c (md_show_usage): Use backslash before newline in
- string literal.
-
-2000-03-27 Alan Modra <alan@linuxcare.com.au>
-
- * config/tc-avr.h (TC_HANDLES_FX_DONE): Define.
-
- * 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.
-
-2000-03-27 Denis Chertykov <denisc@overta.ru>
-
- * config/tc-avr.c: New file for AVR support.
- * config/tc-avr.h: Likewise.
- * configure.in: Add AVR support.
- * configure: Regenerate.
-
-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.
-
-2000-03-26 Alan Modra <alan@linuxcare.com.au>
-
- * config/tc-i386.c: Don't start any as_bad or as_warn message with
- an initial capital letter.
- (i386_index_check): Reindent.
-
-2000-03-19 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-arm.c (md_apply_fix3): Fix bug detecting overflow of pc
- relative branches.
-
-2000-03-17 Thomas de Lellis <tdel@windriver.com>
-
- * 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>
-
- * config/tc-arm.c (md_apply_fix3): Handle same-section relocations
- that have a destingation >= 0x400000.
- Fix compile time warning messages.
-
-Thu Mar 16 23:45:16 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * 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 Mar 16 21:18:13 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * 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.
-
-Thu Mar 16 20:58:10 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
-
- * config/tc-sh.c (md_show_usage): Add description of -dsp.
-
-2000-03-15 Jonathan Larmour <jlarmour@redhat.co.uk>
-
- * config/tc-sh.c (parse_reg): Match r[0..7]_bank operands before
- normal operands.
-
-2000-03-15 Kazu Hirata <kazu@hxi.com>
-
- * config/tc-h8300.c: Add ATTRIBUTE_UNUSED as appropriate.
-
-Mon Mar 13 22:02:59 2000 Hans-Peter Nilsson <hp@axis.se>
-
- * expr.c (operand) [case 'f']: When testing if '0f' can start a
- floating-point-number, make sure 'f' is in FLT_CHARS.
-
-Sat Mar 11 00:01:39 2000 Hans-Peter Nilsson <hp@axis.se>
-
- * 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.
-
-2000-03-10 Geoffrey Keating <geoffk@cygnus.com>
-
- * config/tc-mips.c (mips_ip): Don't put stuff in .rodata
- when embedded-pic.
-
- * 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.
- Put S_IS_EXTERN processing back in.
-
-2000-03-08 H.J. Lu (hjl@gnu.org)
-
- * Makefile.am (install-exec-tooldir): Depend on
- install-exec-bindir for parallel make.
- * Makefile.in: Regenerated.
-
-2000-03-06 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-m32r.c (struct md_longopts): Add -m32r command line
- switch.
- (md_parse_option): Parse -m32r command line switch - disable m32rx
- compatability.
- (md_show_usage): Document new option.
-
- * doc/Makefile.am (CPU_DOCS): Add c-m32r.texi.
- * doc/Makefile.in: Regenerate.
- * doc/c-m32r.texi (M32R-Opts): Document new command line switch.
-
-2000-03-02 Michael Meissner <meissner@redhat.com>
-
- * config/tc-d30v.c (check_range): Remove code that incorrectly
- sign extended values where bits < 32.
-
-2000-03-02 H.J. Lu (hjl@gnu.org)
-
- * configure.in: Support --enable-targets=all on ia32.
- * configure: Regenerated.
-
-2000-03-01 Nick Clifton <nickc@cygnus.com>
-
- * gasp.c (do_align): Remove bogus check of alignment value.
-
-2000-02-27 Thomas de Lellis <tdel@windriver.com>
-
- * 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.
-
-2000-02-27 Hans-Peter Nilsson <hp@axis.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.
-
-2000-02-27 Jakub Jelinek <jakub@redhat.com>
-
- * config/tc-sparc.c (OPTION_UNDECLARED_REGS): New option.
- (md_parse_option): Handle it.
- (md_show_usage): Document it.
-
-2000-02-27 Ian Lance Taylor <ian@zembu.com>
-
- * config/tc-alpha.c (md_assemble): Accept `1' and `9' in an
- opcode, for the instruction `pal19'. From Andrea Arcangeli
- <andrea@suse.de>.
-
-2000-02-26 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * 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.
-
-2000-02-26 Andreas Jaeger <aj@suse.de>
-
- * doc/c-mips.texi (MIPS Opts): Fix typo in last patch.
-
-2000-02-25 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * config/tc-i386.c (md_assemble): Don't swap intersegment jmp and
- call operands when intel_syntax.
- (intel_float_operand): Return 2 for "fi...".
- (i386_operand_modifier): Change "DWORD PTR" test to suit above.
- Return SHORT_MNEM_SUFFIX for "WORD PTR" when "fi...". Revert
- earlier "SHORT" change.
- (md_assemble): When determining suffix from Regs, exclude
- InOutPortReg.
-
-2000-02-24 Nick Clifton <nickc@cygnus.com>
-
- * configure: Add arm-wince, mips-pe and sh-pe targets.
- * configure: Regenerate.
-
- * 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.
-
- * 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.
-
-2000-02-19 Michael Meissner <meissner@redhat.com>
-
- * 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.
-
-2000-02-22 Andrew Haley <aph@cygnus.com>
-
- * doc/c-mips.texi (MIPS Opts): Document -mgp32 and -mgp64.
-
-2000-02-22 Andrew Haley <aph@cygnus.com>
-
- * 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.
-
- (OPTION_M7900): Change offset
- (OPTION_NO_M7900): Ditto.
-
-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.
-
-2000-02-08 Timothy Wall <twall@redhat.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>
-
- * 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>
-
- * listing.c (print_lines): Remove conditionals causing bug in
- listings.
-
-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>
-
- * stabs.c (generate_asm_file): Escape backslashes in stabs file
- entries, matching the way GCC generates them. If not escaped, the
- filename is encoded incorrectly.
-
-2000-01-31 Nick Clifton <nickc@cygnus.com>
-
- * config/tc-arm.c (reg_table): Add support for ATPCS register
- naming conventions.
-
-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.
-
-2000-01-19 Chandra Chavva <cchavva@cygnus.com>
-
- * config/tc-mcore.c (md_assemble): Give warning message if
- operands passes to instruction are more than the spec.
-
-2000-01-27 Thomas de Lellis <tdel@windriver.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.
-
-2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au>
-
- * Makefile.am (MULTI_CFILES): Add config/e-i386aout.c
- Add dependencies for e-i386aout.o. Fix 2 comment lines.
-
- * Makefile.in: Same here.
- Update copyright.
-
- * 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.
-
- * configure: Regenerate.
-
- * 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.
+2002-01-03 matthew green <mrg@redhat.com>
-2000-01-03 Martin v. Loewis <loewis@informatik.hu-berlin.de>
+ * config/tc-ppc.c (md_parse_option): BookE is not Motorola specific.
- * config/obj-elf.c (elf_pseudo_table): Define visibility pseudos.
- (obj_elf_visibility): New function.
+2002-01-02 Nick Clifton <nickc@cambridge.redhat.com>
- * doc/as.texinfo (Visibility): New node: document visibility
- pseudo ops.
+ * config/tc-m68k.c (md_estimate_size_before_relax): Test for a
+ NULL frag link.
-For older changes see ChangeLog-9899
+For older changes see ChangeLog-0001
+
+Local Variables:
+mode: change-log
+left-margin: 8
+fill-column: 74
+version-control: never
+End:
diff --git a/contrib/binutils/gas/ChangeLog-0001 b/contrib/binutils/gas/ChangeLog-0001
new file mode 100644
index 0000000..9d8af6f
--- /dev/null
+++ b/contrib/binutils/gas/ChangeLog-0001
@@ -0,0 +1,7703 @@
+2001-12-31 Richard Henderson <rth@redhat.com>
+
+ * config/tc-ia64.c (errata_nop_necessary_p): Prototype.
+ (make_unw_section_name): Constify local variables.
+
+ * config/tc-ia64.c (has_suffix_p): New.
+ (note_register_values): Use it instead of strstr.
+
+2001-12-31 Jeffrey A Law (law@redhat.com)
+
+ * config/tc-hppa.c (pa_ip): Handle new 'c' mode completers,
+ 'X', 'M', and 'A'.
+
+2001-12-21 Jakub Jelinek <jakub@redhat.com>
+
+ * config/tc-sparc.h (TC_PARSE_CONS_EXPRESSION): Define.
+ (sparc_cons): Provide prototype.
+ * config/tc-sparc.c (tc_gen_reloc): Handle BFD_RELOC_*_PCREL and
+ BFD_RELOC_SPARC_PLT{32,64}. Enumerate for which relocs
+ reloc->addend = fixp->fx_addnumber shouldn't be done instead of
+ enumarating for which pc relative ones it should be done.
+ (sparc_cons_special_reloc): New variable.
+ (sparc_cons): New function.
+ (cons_fix_new_sparc): Use sparc_cons_special_reloc.
+ * testsuite/gas/sparc/pcrel.s: New test.
+ * testsuite/gas/sparc/pcrel.d: Expected output.
+ * testsuite/gas/sparc/pcrel64.s: New test.
+ * testsuite/gas/sparc/pcrel64.d: Expected output.
+ * testsuite/gas/sparc/plt.s: New test.
+ * testsuite/gas/sparc/plt.d: Expected output.
+ * testsuite/gas/sparc/plt64.s: New test.
+ * testsuite/gas/sparc/plt64.d: Expected output.
+ * testsuite/gas/sparc/sparc.exp: Add pcrel, pcrel64, plt and plt64
+ tests.
+
+2001-12-20 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+ Daniel Jacobowitz <drow@mvista.com>
+
+ * config/tc-mips.c (file_mips_gp32): Initialize to invalid value.
+ (file_mips_fp32): Likewise.
+ (md_begin): Compatibility handling for -mipsN option.
+
+2001-12-20 Alexandre Oliva <aoliva@redhat.com>
+
+ * config/tc-sh.c (parse_at): Reject @(r0) and @(r0,).
+
+2001-12-20 matthew green <mrg@redhat.com>
+
+ * config/tc-ppc.c (md_parse_option): Make -maltivec default
+ to generating PowerPC instructions.
+
+2001-12-20 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * configure.in (mips-dec-netbsd*): Delete.
+ * configure: Regenerate.
+
+ * configure.in (arm-*-netbsdelf*): Add target.
+ * configure: Regenerate.
+
+2001-12-18 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * config/tc-mips.h (TC_HANDLE_FX_DONE): Remove redundant
+ definition.
+
+2001-12-18 Niibe Yutaka <gniibe@m17n.org>
+
+ * configure.in (assign object format): Bug fix for setting
+ endian.
+ * configure: Regenerate.
+
+2001-12-18 matthew green <mrg@eterna.com.au>
+
+ * configure.in (m68k-*-netbsdelf*): New target.
+ (m68k-*-netbsd*): Also include ELF support.
+ (m68k-*-netbsdaout*): New alias for m68*-*-netbsd*.
+ * configure: Regenerate.
+
+2001-12-18 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * gasp.c (main): Protoype.
+
+2001-12-17 Richard Henderson <rth@redhat.com>
+
+ * config/tc-alpha.c (alpha_handle_align): Encode unop with RB as $sp.
+
+2001-12-17 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * cgen.c: Add prototype for queue_fixup.
+ (gas_cgen_parse_operand): Move initilisastion of errmsg to avoid
+ possible longjmp corruption.
+ * cgen.h: Add prototype for gas_cgen_md_operand.
+
+2001-12-15 Alan Modra <amodra@bigpond.net.au>
+
+ * config/obj-elf.c (obj_elf_init_stab_section): References are
+ kept to section name strings. Don't alloca them!
+
+2001-12-12 Alexandre Oliva <aoliva@redhat.com>
+
+ * config/tc-d10v.c (get_operands): Mark OPERAND_PLUS after
+ OPERAND_ATSIGN as O_absent.
+
+2001-12-07 Geoffrey Keating <geoffk@redhat.com>
+ Richard Henderson <rth@redhat.com>
+
+ * configure.in: Add support for xstormy16.
+ * configure: Regenerated.
+ * Makefile.am: Add support for xstormy16.
+ * Makefile.in: Regenerated.
+ * config/tc-xstormy16.c: New file.
+ * config/tc-xstormy16.h: New file.
+
+2001-12-06 Richard Earnshaw (rearnsha@arm.com)
+
+ * tc-arm.c (do_arit, do_cmp, do_mov, do_ldst, do_ldstt, do_ldmstm)
+ (do_branch, do_swi, do_adr, do_adrl, do_empty, do_mul, do_mla)
+ (do_swap, do_msr, do_mrs, do_mull, do_ldstv4, do_bx, do_blx)
+ (do_bkpt, do_clz, do_lstc2, do_cdp2, do_co_reg2, do_smla, do_smlal)
+ (do_smul, do_qadd, do_pld, do_ldrd, do_co_reg2c, do_cdp, do_lstc)
+ (do_co_reg, do_fpa_ctrl, do_fpa_ldst, do_fpa_ldmstm, do_fpa_monadic)
+ (do_fpa_dyadic, do_fpa_cmp, do_fpa_from_reg, do_fpa_to_reg, do_mia)
+ (do_mar, do_mra, do_c_binops, do_c_binops_1, do_c_binops_2)
+ (do_c_binops_3, do_c_triple, do_c_triple_4, do_c_triple_5, do_c_quad)
+ (do_c_quad_6, do_c_dspsc, do_c_dspsc_1, do_c_dspsc_2, do_c_shift)
+ (do_c_shift_1, do_c_shift_2, do_c_ldst, do_c_ldst_1, do_c_ldst_2)
+ (do_c_ldst_3, do_c_ldst_4, do_branch25): Delete redundant argument,
+ FLAGS.
+ (struct asm_opcode): Adjust parms field accordingly.
+ (md_assemble): Don't pass dummy second argument when calling worker
+ functions.
+ (build_arm_ops_hsh): Add prototype
+ (BAD_FLAGS): Delete.
+
+2001-12-05 Richard Earnshaw <rearnsha@arm.com>
+
+ * tc-arm.c (struct asm_opcode): Delete comp_suffix and flags. Add
+ cond_offset. Rename variants->variant.
+ (insns): Adjust for new format. Explicitly code each variant that
+ takes flags. Remove temporary instructions.
+ (struct arm_it): Remove redundant field suffix.
+ (s_flag, ldr_flags, str_flags, byte_flag, cmp_flags, ldm_flags)
+ (stm_flags, lfm_flags, sfm_flags, round_flags, fix_flags, except_flag)
+ (long_flag): Delete.
+ (struct asm_flg): Delete.
+ (LONGEST_INST): Delete.
+ (V4_STR_BIT): Define.
+ (struct thumb_opcode): Rename variants->variant.
+ (do_empty): Renamed from do_nop.
+ (ldst_extend): Delete argument hwse. Split code for half-word and
+ signed byte instructions to ...
+ (ldst_extend_v4): ... here.
+ (ld_mode_required_here): Use ldst_extend_v4.
+ (do_ldrd): Simplify now that this is only called for ldrd. No
+ need to test for XScale, which was wrong anyway. Don't reject r12
+ as a target register. Add test that ldrd doesn't update an index
+ register.
+ (do_pld): Don't allow post-indexed or write-back addressing modes.
+ Adjust call to ldst_extend.
+ (do_adr): Split code for adrl to ...
+ (do_adrl): ... here.
+ (do_cmp): No need to fold in COND_BIT.
+ (do_ldst): Simplify. Split code for ldrt/strt into do_ldstt. Split
+ code to handle half-word and signed byte instructions to ...
+ (do_ldstv4): ... here.
+ (do_ldstt): New function. Handle load/store with translate.
+ (do_ldmstm): Write feature modification bits directly into
+ inst.instruction.
+ (do_fpa_ldst): Remove suffix handling code.
+ (do_fpa_dyadic, do_fpa_monadic, do_fpa_from_reg): Likewise.
+ (do_fpa_ldmstm): Type of access is now held in inst.instruction.
+ (build_arm_ops_hsh): New function.
+ (md_begin): Call it. Don't build the ARM opcode directly.
+ (md_assemble): Simplify ARM instruction handling.
+
+2001-12-05 Arati Dikey <aratid@kpit.com>
+
+ * tc-sh.c (parse_at): Corrected incorrect op->type selection due
+ to missing 'else'.
+
+2001-12-04 Alexandre Oliva <aoliva@redhat.com>
+
+ * config/tc-d10v.c (write_2_short): Don't skip dummy fixups, so
+ that we can tell which operand refers to the insn put in the L
+ container and mark it as such, so that the relocation type can be
+ adjusted.
+
+2001-12-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config/tc-mips.c (mips_cpreturn_offset): Better comment.
+ (load_register): Better error message. Cast away signedness
+ mismatches. Add casts needed for varargs.
+ (load_address): Replace checks of HAVE_64BIT_ADDRESS with dbl.
+ Remove superfluous casts.
+ (macro): Cast away signedness mismatches. Remove superfluous casts.
+ (s_cpload): Fix wrong comment.
+ (s_mips_weakext): Standardize output message.
+ (get_number): Likewise.
+
+2001-12-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config/tc-mips.c (append_insn): Add jump address range overflow
+ check.
+
+2001-12-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config/tc-mips.c (md_parse_option): Fix comment. Allow -mabi option
+ for ELF only.
+ (show): Document -mabi option.
+
+2001-12-03 Jeroen Dobbelaere <jeroen.dobbelaere@acunia.com>
+
+ * config/tc-arm.c (md_parse_option): Only clear cpu part when
+ specifying 'xscale' cpu (don't change the fpu part).
+
+2001-12-04 Alexandre Oliva <aoliva@redhat.com>
+
+ * config/tc-d10v.c (find_opcode): Reject SP operand if
+ OPERAND_NOSP flag is present.
+
+2001-12-03 Eric Christopher <echristo@redhat.com>
+
+ * config/tc-mips.c (tc_gen_reloc): One missed BFD_RELOC_MIPS_GPREL.
+
+2001-12-02 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config/tc-mips.c (macro_build): Replace BFD_RELOC_MIPS_GPREL
+ by BFD_RELOC_GPREL16.
+ (load_address): Likewise.
+ (macro): Likewise.
+ (md_apply_fix): Likewise. Replace BFD_RELOC_MIPS_GPREL32 by
+ BFD_RELOC_GPREL32.
+ (s_gpword): Replace BFD_RELOC_MIPS_GPREL32 by BFD_RELOC_GPREL32.
+ (tc_gen_reloc): Replace BFD_RELOC_MIPS_GPREL by BFD_RELOC_GPREL16.
+ *config/tc-mips.h: Replace BFD_RELOC_MIPS_GPREL by BFD_RELOC_GPREL16.
+
+2001-11-29 Alexandre Oliva <aoliva@redhat.com>
+
+ * config/tc-d10v.c (get_operands): Emit OPERAND_PLUS for
+ prefix `+'.
+
+ * config/tc-d10v.c (find_opcode): Reject non-SP operand if
+ flags requires SP.
+
+2001-11-29 Arati Dikey <aratid@kpit.com>
+
+ * tc-sh.c (parse_at): Removed case-sensitivity of index register
+ R8, R9.
+
+2001-11-28 Jakub Jelinek <jakub@redhat.com>
+
+ * write.c (adjust_reloc_syms): Mark SEC_MERGE symbols as used
+ in reloc if it has non-zero addend.
+ * config/tc-alpha.c (tc_gen_reloc): Reinstall SEC_MERGE check.
+ * config/tc-sparc.c (md_apply_fix3): Likewise.
+
+2001-11-28 Andreas Schwab <schwab@suse.de>
+
+ * as.c (parse_args): Call md_after_parse_args if defined.
+ * config/tc-ia64.h (md_after_parse_args): Define.
+ * config/tc-ia64.c (ia64_after_parse_args): Reject --gstabs.
+ * doc/internals.texi (CPU backend): Document md_after_parse_args.
+
+2001-11-23 Jakub Jelinek <jakub@redhat.com>
+
+ * config/tc-alpha.c (tc_gen_reloc): Remove SEC_MERGE test.
+ * write.c (adjust_reloc_syms): Don't handle relocs against
+ SEC_MERGE section symbols specially.
+ (fixup_segment): Likewise.
+
+2001-11-21 Richard Sandiford <rsandifo@redhat.com>
+
+ * config/tc-mips.c (mips_need_elf_addend_fixup): New, extracted from...
+ (md_apply_fix3): ...here. Don't prevent the symbol value being
+ subtracted twice from GPREL addends.
+ (tc_gen_reloc): Add the symbol value to a GPREL addend if it was
+ subtracted by the previous function.
+
+2001-11-20 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * config/tc-avr.c (md_apply_fix3): Fix typo introduced by
+ md_apply_fix3 change.
+
+2001-11-20 Ben Elliston <bje@redhat.com>
+
+ * config/tc-m88k.c (md_apply_fix3): Match local variable `val' to
+ usage after md_apply_fix3 cleanups.
+
+2001-11-19 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * doc/c-mmix.texi: Use texinfo 4 features.
+ (MMIX-mmixal): Fix typo.
+
+2001-11-17 Hans-Peter Nilsson <hp@axis.com>
+
+ * config/tc-cris.c (md_apply_fix3): Cast value, not pointer, in
+ val assignment.
+
+2001-11-16 Michael Snyder <msnyder@redhat.com>
+
+ * stabs.c (stabs_generate_asm_lineno): Remember file and line number
+ from one call to the next, and eliminate consecutive duplicates
+ (thereby emitting only one line symbol per source line).
+ * dwarf2dbg.c (dwarf2_gen_line_info): Ditto.
+
+2001-11-16 Alan Modra <amodra@bigpond.net.au>
+
+ * config/tc-m68k.c (md_apply_fix3): Change val back to a signed type.
+
+2001-11-15 H.J. Lu <hjl@gnu.org>
+
+ * config/tc-hppa.c (md_apply_fix3): Fix a typo.
+
+2001-11-15 H.J. Lu <hjl@gnu.org>
+
+ * config/tc-alpha.c (md_apply_fix3): Fix a typo.
+
+2001-11-15 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * write.c (fixup_segment): Remove references to md_apply_fix and
+ TC_HANDLE_FX_DONE.
+ * cgen.c, config/obj-coff.c, config/tc-*.c: Update all occurances
+ of md_apply_fix to md_apply_fix3.
+ Make all md_apply_fix3 functions void.
+ * cgen.h, config/obj-coff.h, tc-*.h: Remove all definitions of
+ MD_APPLY_FIX3 and TC_HANDLE_FX_DONE.
+ * doc/internals.texi: Update references to md_apply_fix3.
+ * tc.h: Update prototype for md_apply_fix3.
+
+2001-11-15 Alan Modra <amodra@bigpond.net.au>
+
+ * config/tc-i386.h (md_end): Define.
+ (i386_elf_emit_arch_note): Declare.
+ (CpuUnknown): Delete.
+ * config/tc-i386.c (default_arch): Constify.
+ (smallest_imm_type): Remove CpuUnknown test.
+ (md_assemble): Don't bother checking cpu_arch_flags non-zero.
+ (i386_elf_emit_arch_note): New function.
+
+ * po/POTFILES.in: Regenerate.
+
+2001-11-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config/tc-mips.c (mips_ip): Re-allow %hi() op for non-ELF assembler.
+
+2001-11-15 Alan Modra <amodra@bigpond.net.au>
+
+ * frags.c (frag_grow): Revert last change.
+
+ * dwarf2dbg.c (get_frag_fix): Align last frag size.
+
+ * config/tc-ppc.c (ppc_insert_operand): Pass (ppc_cpu | ppc_size)
+ to operand->insert.
+ (md_assemble): Likewise.
+
+2001-11-12 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * frags.c (frag_grow): Use frag_make_room() to grow the
+ obstack.
+
+2001-11-14 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * config/tc-sparc.c (md_apply_fix3): Do not remove the symbol's
+ value from the addend for fixups against local symbols in
+ SEC_MERGE sections - it was not added in, in the first place.
+
+2001-11-11 Timothy Wall <twall@alum.mit.edu>
+
+ * write.c (relax_segment): Convert symbol address into an octet
+ offset prior to adding to the frag address, which is an octet
+ offset. Add comments to that effect.
+ * config/tc-tic54x.c: Fix bugs causing tests to fail.
+ * config/tc-tic54x.h: Ditch PARAMS macro.
+
+2001-11-13 Alan Modra <amodra@bigpond.net.au>
+
+ * config/obj-elf.c (obj_elf_version): Ensure terminating NUL is
+ put in note section. Use sizeof instead of hard-coded constants.
+
+2001-11-12 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config/tc-mips.c (support_64bit_objects): Define for OBJ_ELF only.
+ (md_longopts): Allow OPTION_MABI for ELF compilation only. RE-allow
+ OPTION_GP32, OPTION_GP64, OPTION_FP32 for non-ELF compilation.
+ Sort options a bit more logical.
+ (md_parse_option): Allow OPTION_32, OPTION_N32, OPTION_N64,
+ OPTION_MABI only for elf targets.
+
+2001-11-12 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config/tc-mips.c (set_at): Add cast needed for varargs.
+ (load_register): Likewise.
+ (macro): Likewise. Some code reformatting.
+ (macro2): Add cast needed for varargs.
+ (mips16_macro): Likewise.
+
+2001-11-12 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config/tc-mips.c (md_assemble): Remove superflous casts.
+ (append_insn): Likewise.
+ (mips16_macro_build): Likewise.
+ (macro): Likewise.
+ (mips16_ip): Likewise.
+ (s_cpload): Likewise.
+ (mips_relax_frag): Likewise.
+
+2001-11-12 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config/tc-mips.c (mips_abi_level): Move in front of
+ mips_set_options.
+ (mips_set_options): Add members gp32, fp32, abi.
+ (file_mips_gp32): New flag.
+ (file_mips_fp32): New flag.
+ (mips_opts): Initialize the new members.
+ (mips_gp32): Remove.
+ (mips_fp32): Remove.
+ (HAVE_32BIT_GPRS): Use the new values from mips_opts.
+ (HAVE_32BIT_FPRS): Likewise.
+ (HAVE_NEWABI): Likewise.
+ (HAVE_64BIT_OBJECTS): Likewise.
+ (md_begin): Likewise. Save default (file) values.
+ (md_parse_option): Use the new values from mips_opts.
+ (s_mipsset): Likewise. Fix logic to keep the ABI selection if
+ possible. Let .set mipsN work together with .set push/pop.
+ Enhance error messages.
+ (mips_elf_final_processing): Use file_mips_* for header processing.
+
+2001-11-09 Marek Michalkiewicz <marekm@amelek.gda.pl>
+
+ * config/tc-avr.c (mcu_types): Update for new devices.
+
+2001-11-09 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * doc/Makefile.am (POD2MAN): Use 'GNU Development Tools' for
+ the page man title.
+ * doc/Makefile.in: Rebuild.
+ * doc/as.texinfo: Do not put man SEEALSO in document;
+ Use @command for commands, @option for options; Reorganize usage
+ to clearly identify target specific options.
+
+2001-11-08 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config/tc-mips.c (mips_force_relocation): Remove duplicate code.
+
+2001-11-06 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config/tc-mips.c (my_getSmallParser): Fix small parser bug.
+
+2001-11-05 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * config/tc-s390.c (tc_s390_force_relocation): Force all relocations
+ that need the global offset table.
+ (md_apply_fix3): Add code to undo opertions done in fixup_segment
+ triggered by TC_FORCE_RELOCATION.
+ * config/tc-s390.h (TC_FORCE_RELOCATION): Replace macro code with
+ a call to function tc_s390_force_relocation.
+ (TC_FIX_ADJUSTABLE): Define.
+
+2001-11-04 Chris Demetriou <cgd@broadcom.com>
+
+ * configure.in (mips-*-netbsd*): Add support for target.
+ * configure: Regenerate.
+
+2001-11-02 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * configure.in (ALL_LINGUAS): Add 'fr'.
+ * configure: Regernate.
+ * po/fr.po: New file. Obtained from the translation project web
+ site.
+
+2001-11-02 Richard Earnshaw <rearnsha@arm.com>
+
+ * tc-arm.c: Re-arrange prototypes by architecture.
+ (insns): Re-arrange instructions by archtitecture. Pld instruction
+ is part of ARMv5E.
+ (tinsns): blx and bkpt are part of ARMv5T.
+ (do_fp_{ctrl,ldst,ldstm,dyadic,monadic,cmp,from_reg,to_reg}): Rename
+ to do_fpa_*. All callers changed.
+
+ * tc-arm.c (insns): Add two temporary instructions to handle
+ ldrd/strd.
+
+2001-11-01 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * config/tc-m68hc11.c (build_jump_insn): Allocate worst case storage
+ for bra/bsr and use frag_variant(), this ensure that the possible
+ 16-bit BFD_RELOC_16 will be in the same frag.
+
+2001-10-31 Chris Demetriou <cgd@broadcom.com>
+
+ * config/tc-mips.c (HAVE_32BIT_ADDRESSES): If compiling embedded
+ PIC code, assume pointers the same size as GPRs.
+ (macro): In M_LA_AB handling for embedded PIC code, support
+ "la $treg,foo-bar($breg)". In load/store handling
+ (label ld_st) support "<op> $treg,<sym>-<local_sym>($breg)"
+ which is used by the compiler for switch statements.
+ In load/store double multi-instruction macro handling
+ (label ldd_std) add a comment that no special handling
+ is currently done for embedded PIC.
+ (mips_ip): In 'o' (16-bit offset) case, only accept 16
+ bit offsets.
+
+2001-10-31 Richard Earnshaw <rearnsha@arm.com>
+
+ General cleanup of feature definitions.
+ * tc-arm.c (ARM_EXT_LONGMUL, ARM_EXT_HALFWORD, ARM_EXT_THUMB): Delete.
+ (ARM_2UP, ARM_ALL, ARM_3UP, ARM_6UP): Delete.
+ (FPU_CORE, FPU_FPA10, FPA_FPA11, FPU_ALL, FPA_MEMMULTI): Delete.
+ (ARM_EXT_V{1,2,2S,3,3M,4,4T,5T,5ExP}): New defines.
+ (ARM_EXT_V{5,5E}): Synchronize with above.
+ (ARM_ARCH_V*): Define a complete set in terms of above features.
+ (ARM_{1,2,3,250,6,7,8,9,STRONG}): Define in terms of architecture.
+ (FPU_FPA_EXT_V[12]): Define.
+ (FPU_ARCH_FPE, FPU_ARCH_FPA): Define in terms of above.
+ (FPU_ANY): Define.
+ (FPU_DEFAULT): Default to FPA.
+ (CPU_DEFAULT): For XScale, this is now just ARM_ARCH_XSCALE; for
+ Thumb, this is now ARM_ARCH_V5T.
+ (insns): Rework for new feature defines.
+ (tinsns): Likewise.
+ (opcode_select, do_ldst, md_begin, md_parse_option): Likewise.
+
+2001-10-31 NIIBE Yutaka <gniibe@m17n.org>
+
+ * configure.in: Handle sh*eb-*-linux* and sh*-*-linux*.
+ * configure: Regenerate.
+ * Makefile.in: Regenerate.
+ * doc/c-sh.texi (SH Options): Added descriptions.
+
+2001-10-30 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * configure.in: Update for MMIX port.
+ * Makefile.am: Ditto. Regenerate dependencies.
+ * Makefile.in: Regenerate.
+ * configure: Regenerate.
+ * config/tc-mmix.h, config/tc-mmix.c: New files.
+ * doc/Makefile.am (CPU_DOCS): Add c-mmix.texi
+ * doc/Makefile.in: Regenerate.
+ * doc/all.texi: @set MMIX.
+ * doc/as.texinfo: Ditto. Add MMIX gas manpage option overview.
+ Include c-mmix.texi.
+ * doc/c-mmix.texi: New file.
+
+2001-10-24 Chris Demetriou <cgd@broadcom.com>
+
+ * config/tc-mips.c (hilo_interlocks, cop_interlocks): Make
+ these evaluate to true if mips_arch indicates SB-1.
+
+2001-10-23 Alan Modra <amodra@bigpond.net.au>
+
+ * as.c (parse_args): Print the date as well for --version.
+
+2001-10-20 Chris Demetriou <cgd@broadcom.com>
+
+ * config/tc-mips.c (md_show_usage): Print "sb1" for Broadcom
+ SB-1 CPU for consistency.
+ (mips_cpu_info_table): Tweak comment about SB-1.
+
+2001-10-20 H.J. Lu <hjl@gnu.org>
+
+ * config/tc-arm.c (do_c_shift): Use ISDIGIT instead of isdigit.
+ (cirrus_parse_offset): Likewise.
+
+2001-10-19 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * config/tc-arm.c: Restore line_comment_chars.
+
+2001-10-18 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * config/tc-arm.c (comment_chars): Remove semi-colon accidentally
+ added to the list.
+
+2001-10-18 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * write.c (fixup_segment): Handle fixups for SEC_MERGE sections as
+ for undefined symbols.
+
+2001-10-17 Chris Demetriou <cgd@broadcom.com>
+
+ * doc/as.texinfo (MIPS ISA options): Added accidentally
+ omitted "-mips64" option to list of options.
+
+2001-10-17 matthew green <mrg@redhat.com>
+
+ * config/tc-ppc.c (md_show_usage): Add missing -maltivec, -m7400,
+ -m7410, -m7450 and -m7455 options.
+
+2001-10-17 Alan Modra <amodra@bigpond.net.au>
+
+ * config/tc-ppc.c (PPC_HA, PPC_HIGHERA, PPC_HIGHESTA): Simplify.
+ (ppc_size): Select PPC_OPCODE_64 if 64 bit.
+ (md_begin): Don't set ppc_size here.
+ (ppc_target_format): Test ppc_size as well as BFD_DEFAULT_TARGET_SIZE.
+ (md_shortopts): Constify.
+ (md_longopts): Likewise.
+ (md_longopts_size): Likewise.
+ (ppc_elf_suffix): Only allow 64-bit relocs when ppc_size specifies
+ 64-bit opcodes.
+ (ppc_machine): Explain why this function is a nop.
+
+2001-10-17 Alan Modra <amodra@bigpond.net.au>
+
+ * bit_fix.h: Comment typo fix.
+ * config/tc-mips.c: Likewise.
+ * config/tc-sh.c: Likewise.
+ * config/tc-arc.c (arc_code_symbol): Remove unnecessary test.
+
+ * configure.in (MIPS_STABS_ELF): AC_DEFINE in only one place so
+ that autoheader doesn't duplicate config.in entries.
+ (DEFAULT_ARCH): Ditto.
+ * configure: Regenerate.
+ * config.in: Regenerate.
+
+2001-10-16 Alan Modra <amodra@bigpond.net.au>
+
+ From Andrew Pines <apines@cosmodog.com>
+ * config/tc-m68k.c (m68k_ip): Correct absolute jmp opcodes.
+
+2001-10-16 NIIBE Yutaka <gniibe@m17n.org>,
+ Hans-Peter Nilsson <hp@bitrange.com>
+
+ * config/tc-sh.c (shl): Remove.
+ (big): New function.
+ (little): Remove shl handling. Emit error for endian mismatch.
+ (md_show_usage): Add description of -big.
+ (md_parse_option): Handle OPTION_BIG. Remove shl handling.
+ (OPTION_BIG): Add.
+ (md_pseudo_table): Add .big.
+ (md_longopts): Add -big.
+ (md_begin): Don't set target_big_endian here.
+ * config/tc-sh.h (TARGET_BYTES_BIG_ENDIAN): Remove.
+ (LISTING_HEADER, COFF_MAGIC, TARGET_FORMAT): Use target_big_endian.
+ (shl): Remove.
+ * configure.in (endian): Default is big.
+ (sh-*-pe*): Little endian.
+ (cpu_type): Set sh for target sh*.
+ * configure: Regenerate.
+
+2001-10-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config/tc-mips.c (md_apply_fix): Preliminary handling of NewABI
+ relocations.
+
+2001-10-13 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * config/tc-arm.c: Replace CONST with const.
+
+ * cgen.c: Tidy up formatting.
+
+2001-10-12 matthew green <mrg@redhat.com>
+
+ * config/tc-ppc.c (md_parse_option): New -m7410, -m7450 and -m7455
+ flags, equivalent to -m7400. New -maltivec to enable AltiVec
+ instructions. New -mbook64 and -mbooke/-mbooke32 flags to enable
+ 64-bit and 32-bit BookE support, respectively. Change -m403 and
+ -m405 to set PPC403 option.
+ (md_show_usage): Adjust for new options.
+ * doc/all.texi: Set PPC.
+ * doc/as.texinfo: Add PPC support and pull in c-ppc.texi.
+ * doc/c-ppc.texi: New file.
+ * doc/Makefile.am (CPU_DOCS): Add c-ppc.texi.
+ * doc/Makefile.in: Regenerate.
+
+2001-10-12 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * read.c (s_bad_endr): New function. Issues a warning message
+ about a bad use of the .rept pseudo op.
+ (po_table[]): Add .endr.
+ * read.h: Prototype s_bad_endr.
+
+ * CONTRIBUTORS: Update contact email address.
+
+2001-10-11 Kazu Hirata <kazu@hxi.com>
+
+ * config/tc-alpha.c: Fix comment typos.
+ * config/tc-cris.c: Likewise.
+ * config/tc-hppa.c: Likewise.
+ * config/tc-i370.c: Likewise.
+ * config/tc-mips.c: Likewise.
+ * config/tc-mn10200.c: Likewise.
+ * config/tc-mn10300.c: Likewise.
+ * config/tc-sh.c: Likewise.
+ * config/tc-tahoe.c: Likewise.
+ * config/tc-v850.c: Likewise.
+
+2001-10-11 Kazu Hirata <kazu@hxi.com>
+
+ * app.c: Fix comment typos.
+ * bit_fix.h: Likewise.
+ * expr.c: Likewise.
+ * itbl-ops.c: Likewise.
+
+2001-10-11 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * input-file.c: Include safe-ctype.h.
+ (input_file_open): Use ISSPACE instead of isspace.
+
+2001-10-10 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config/tc-mips.c (mips_cpreturn_offset): New variable.
+ (mips_cpreturn_register): Likewise.
+ (mips_gp_register): Likewise.
+ (s_cpsetup): New function prototype.
+ (s_cplocal): Likewise.
+ (s_cpreturn): Likewise.
+ (s_gpvalue): Likewise.
+ (mips_pseudo_table): Add .cpsetup, .cplocal, .cpreturn, .gpvalue
+ pseudo-ops.
+ (macro): Don't warn about .cprestore for NewABI.
+ (md_pcrel_from): Code cleanup.
+ (mips_force_relocation): Force output of some NewABI relocations even
+ without a defined symbol.
+ (s_cpload): Ignore .cpload for NewABI.
+ (s_cpsetup): Handle .cpsetup.
+ (s_cplocal): Handle .cplocal.
+ (s_cprestore): Ignore .cprestore for NewABI.
+ (s_cpreturn): Handle .cpreturn.
+ (s_gpvalue): Handle .gpvalue.
+ (s_cpadd): Ignore .cpadd for NewABI.
+ (nopic_need_relax): Take g_switch_value into account as gp
+ optimization.
+ (tc_gen_reloc): Don't handle BFD_RELOC_MIPS_{CALL,GOT}* for NewABI.
+
+2001-10-10 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config/tc-mips.c (my_getSmallParser): New function prototype.
+ (small_ex_type): Named this enum, more return values for
+ my_getSmallExpression.
+ (mips_ip): Allow SPC and HT between arguments. Handle some NewABI
+ triple relocations. Protect some parts with ifdef OBJ_ELF.
+ (percent_op_match): New struct, lookup table for %some_reloc().
+ (my_getSmallParser): New function, parses nested percent_ops also.
+ (my_getSmallExpression): Rewite to support nested percent_ops.
+
+2001-10-10 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config/tc-mips.c
+ (load_address): Support both 32- and 64-bit addresses.
+ (macro): Call load_register correctly. Expand 64-bit loads ans stores.
+ (macro2): Call load_address correctly.
+
+2001-10-09 Christian Groessler <cpg@aladdin.de>
+
+ * config/tc-z8k.c: Include opcodes/z8k-opc.h after bfd.h
+ since z8k-opc.h now uses the PARAMS macro.
+
+2001-10-09 Aldy Hernandez <aldyh@redhat.com>
+
+ * config/tc-arm.c: Change MAVERIK to MAVERICK.
+
+2001-10-09 Alan Modra <amodra@bigpond.net.au>
+
+ * config/obj-elf.c: Make use of elf_group_name and elf_next_in_group
+ throughout file.
+ (obj_elf_change_section): Rename "group" to "group_name".
+ (obj_elf_section): Likewise.
+ (elf_frob_file): Don't use sec->lineno for SHT_GROUP section to store
+ first member section; Instead use elf_next_in_group.
+
+2001-10-09 Alan Modra <amodra@bigpond.net.au>
+
+ * config/obj-elf.c: (obj_elf_change_section): Add "group" param.
+ Set elf_section_data group from it. Warn if group name changed.
+ (obj_elf_parse_section_letters): Parse 'G' too.
+ (obj_elf_section): Parse group name.
+ (struct group_list): New.
+ (build_group_lists): New function.
+ (elf_frob_file): Create SEC_GROUP section(s).
+
+ * config/obj-elf.c: (elf_copy_symbol_attributes): Zap trailing
+ whitespace.
+
+2001-10-08 Aldy Hernandez <aldyh@redhat.com>
+
+ * doc/arm/c-arm.texi (ARM Options): Add arm9e documentation.
+
+ * config/tc-arm.c (ARM_EXT_MAVERIK): New macro.
+ (cirrus_regtype): New enum.
+ (LONGEST_INST): Change to 10.
+ (CIRRUS_MODE1): New.
+ (CIRRUS_MODE2): New.
+ (CIRRUS_MODE3): New.
+ (CIRRUS_MODE4): New.
+ (CIRRUS_MODE5): New.
+ (CIRRUS_MODE6): New.
+ (insns): Add cirrus dsp instructions.
+ (ARM_EXT_MAVERIKSC_REG): New.
+ (cirrus_register): New.
+ (cirrus_mvf_register): New.
+ (cirrus_mvd_register): New.
+ (cirrus_mvfx_register): New.
+ (cirrus_mvdx_register): New.
+ (cirrus_mvax_register): New.
+ (ARM_EXT_MAVERIKsc_register): New.
+ (reg_table): Add cirrus registers.
+ (cirrus_valid_reg): New.
+ (cirrus_reg_required_here): New.
+ (do_c_binops_1): New.
+ (do_c_binops_2): New.
+ (do_c_binops_3): New.
+ (do_c_triple_4): New.
+ (do_c_triple_5): New.
+ (do_c_quad_6): New.
+ (do_c_dspsc_1): New.
+ (do_c_dspsc_2): New.
+ (do_c_shift_1): New.
+ (do_c_shift_2): New.
+ (do_c_ldst_1): New.
+ (do_c_ldst_2): New.
+ (do_c_ldst_3): New.
+ (do_c_ldst_4): New.
+ (do_c_binops): New.
+ (do_c_triple): New.
+ (do_c_quad): New.
+ (do_c_dspsc): New.
+ (do_c_shift): New.
+ (cirrus_parse_offset): New.
+ (do_c_ldst): New.
+ (md_parse_option): Add arm9e.
+ (md_show_usage): Same.
+
+2001-10-08 Tom Rix <trix@redhat.com>
+
+ * config/tc-ppc (ppc_bf, ppc_biei) : Set first .bi lineno value to
+ location of next .bf
+ * config/obj-coff.c (coff_frob_symbol) : XCOFF does not use endndx.
+
+2001-10-07 Alan Modra <amodra@bigpond.net.au>
+
+ * config/obj-elf.c: Standardize error/warning messages - don't
+ capitalise, no final period or newline, don't say "ignoring" for
+ as_bad messages. In some cases, change the wording to that used
+ elsewhere for similar messages.
+ (obj_elf_section_name): New function, split out from ..
+ (obj_elf_section): .. here. Correctly mask off SHF_MERGE if
+ entsize not specified.
+
+2001-10-05 Jakub Jelinek <jakub@redhat.com>
+
+ * doc/as.texinfo: Document M and S ELF section flags.
+
+2001-10-05 Alan Modra <amodra@bigpond.net.au>
+
+ * subsegs.c (subseg_text_p): Return 0 for absolute section.
+ * read.c (do_align): If in absolute section, warn about and ignore
+ non-zero fill pattern.
+
+2001-10-05 Alexandre Oliva <aoliva@redhat.com>
+
+ * config/tc-mn10300.c (tc_gen_reloc): Don't free
+ reloc->sym_ptr_ptr if it's not allocated.
+
+2001-10-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config/tc-mips.c (prev_insn_reloc_type): Make it an array to hold a
+ relocation triple.
+ (prev_insn_fixp): Likewise.
+ (append_insn): Changed prototype to accept a relocation pointer.
+ (imm_reloc): Make it an array.
+ (offset_reloc): Likewise.
+ (md_assemble): Handle triple relocations.
+ (append_insn): Likewise. Add handling for some NewABI relocations.
+ (mips_no_prev_insn): Handle triple relocations.
+ (macro_build): Likewise. Add handling for some NewABI relocations.
+ Move handling for the 'u' case to append_insn().
+ (mips16_macro_build): Handle triple relocations.
+ (macro_build_lui): Likewise. Don't handle _gp_disp as special symbol
+ for NewABI.
+ (mips_ip): Handle triple relocations.
+ (mips16_ip): Likewise.
+ (mips_force_relocation): Force handling of triple relocations
+ without symbols for NewABI.
+ (md_apply_fix): Add handling for some NewABI relocations.
+
+2001-10-05 Alan Modra <amodra@bigpond.net.au>
+
+ * config/tc-i386.c (parse_register): If not producing code for
+ x86_64, reject x86_64 register name matches.
+ (md_assemble): Remove now redundant check for x86_64 regs.
+
+2001-10-04 Alan Modra <amodra@bigpond.net.au>
+
+ * config/tc-ppc.c (md_assemble <DS relocs>): Test ppc_size as well
+ as BFD_DEFAULT_TARGET_SIZE.
+ (ppc_tc): Likewise.
+ (ppc_is_toc_sym): Likewise.
+ (md_apply_fix3): Likewise.
+
+2001-10-03 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config/tc-mips.c (mips_64): Remove.
+ (mips_target_format): Move downwards in file, use HAVE_64BIT_OBJECTS
+ in it.
+ (mips_abi_level, mips_abi): New enum.
+ (mips_32bit_abi): Remove.
+ (HAVE*PRS): Use mips_abi instead of mips_32bit_abi.
+ (HAVE_NEWABI): New define.
+ (HAVE_64BIT_OBJECTS): New define.
+ (HAVE_32BIT_ADDRESSES): Don't return true for 64bit objects.
+ (HAVE_64BIT_ADDRESSES): New define, inverse of HAVE_32BIT_ADDRESSES.
+ (support_64bit_objects): New prototype.
+ (md_begin): Use mips_abi instead of mips_32bit_abi. Don't write
+ .reginfo section for n32, use .MIPS.options instead.
+ (support_64bit_objects): New function, code from md_parse_option.
+ (md_longopts): Add -n32 option.
+ (md_parse_option): Use mips_abi instead of mips_32bit_abi/mips64.
+ Add -n32 option. Protect with OBJ_ELF.
+ (s_mipsset): Use mips_abi instead of mips_32bit_abi.
+ (mips_elf_final_processing): Likewise. Don't write .reginfo section
+ for n32, use .MIPS.options instead.
+
+2001-10-03 Alan Modra <amodra@bigpond.net.au>
+
+ * po/POTFILES.in: Regenerate.
+ * configure: Regenerate.
+
+2001-10-02 Alan Modra <amodra@bigpond.net.au>
+
+ * config/tc-ppc.c (md_apply_fix3 <BFD_RELOC_CTOR>): Make it 64
+ bits if target is 64 bit.
+
+ * doc/as.texinfo (listing): Fix typo.
+
+ * as.c (print_version_id): Use BFD_VERSION_STRING in place of
+ BFD_VERSION.
+ * Makefile.am (Makefile): Depend on bfd/configure.in.
+ Run "make dep-am".
+ * Makefile.in: Regenerate.
+
+2001-09-30 H.J. Lu <hjl@gnu.org>
+
+ * config/obj-elf.c (obj_elf_parse_section_letters): Accept "am"
+ and "ams" for compatibility.
+
+2001-09-30 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * config/tc-sh.c (md_pcrel_from_section): Transformed from
+ md_pcrel_from. Handle pc-relativeness against link-time
+ symbol. Handle relativeness to elsewhere than the fixup.
+ * config/tc-sh.h (MD_PCREL_FROM_SECTION): Define.
+ (md_pcrel_from_section): Prototype.
+
+ * Makefile.am: Update dependencies with "make dep-am".
+ * Makefile.in: Regenerate.
+
+2001-09-30 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * config/tc-m68hc11.c (cmp_opcode): Define prototype.
+ (print_opcode_format, skip_whites): Likewise.
+ (convert_branch, m68hc11_new_insn): Likewise.
+ (build_dbranch_insn, build_indexed_byte): Likewise.
+ (build_reg_mode, find, find_opcode): Likewise.
+ (print_insn_format): Fix call to print_opcode_format.
+ (md_assemble): Fix call to build_dbranch_insn.
+
+2001-09-27 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * config/tc-arm.c: Add missing prototypes.
+
+2001-09-26 Jeff Johnston <jjohnstn@redhat.com>
+
+ * input-file.c (input_file_open): When reading the
+ first line looking for #NO_APP, prepare for the possibility
+ of finding #APP instead. Also fix algorithm to allow
+ white-space to follow either #NO_APP or #APP directives.
+
+2001-09-25 Geoff Berry <geoff.berry@bops.com>
+
+ * listing.c (buffer_line): Don't write past the end of `line' when
+ EOF is reached.
+
+2001-09-25 Alexandre Oliva <aoliva@redhat.com>
+
+ * config/tc-mn10300.c (tc_gen_reloc): Don't emit an *ABS*
+ relocation for differences between symbols in a section other
+ than the one in which the difference is to be placed; apply
+ the relocation instead.
+
+2001-09-24 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * config/tc-arc.c: Add missing prototype.
+ (md_atof): Change type to int. Add missing prototype.
+ * config/tc-arc.h: Prototype exported functions.
+
+2001-09-22 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * as.c: Add missing function prototype.
+ * config/obj-aout.c: Fix compile time warning.
+
+2001-09-21 Bruno Haible <haible@clisp.cons.org>
+
+ * config/tc-openrisc.c: Don't include <ctype.h>.
+
+2001-09-19 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * gas/config/tc-s390.c: Add option -mwarn-areg-zero.
+
+2001-09-19 Alan Modra <amodra@bigpond.net.au>
+
+ * config/tc-i370.c: Fix typo in last change.
+
+2001-09-19 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * doc/as.texinfo (Symbol Names): Improve documentation on local
+ labels and add documenation about dollar labels.
+
+2001-09-18 Bruno Haible <haible@clisp.cons.org>
+
+ * as.h: Don't include <ctype.h>.
+ * as.c (main): For gettext, also set the LC_CTYPE locate facet.
+ * atof-generic.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (atof_generic): Use ISDIGIT instead of isdigit.
+ * config/m68k-parse.y: Include "safe-ctype.h".
+ (yylex): Use ISDIGIT/ISALNUM instead of isdigit/isalnum.
+ * config/obj-elf.c: Include "safe-ctype.h".
+ (obj_elf_vtable_inherit): Use ISSPACE instead of isspace.
+ * config/obj-vms.c: Include "safe-ctype.h".
+ (Write_VMS_MHD_Records): Use TOUPPER instead of islower/toupper.
+ (VMS_Case_Hack_Symbol): Use ISUPPER/ISLOWER/TOUPPER/TOLOWER
+ instead of isupper/islower/toupper/tolower.
+ * config/tc-a29k.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (insert_sreg): Use TOUPPER instead of islower/toupper.
+ (machine_ip): Use ISALPHA/ISALNUM/ISUPPER/TOLOWER instead of
+ isalpha/isalnum/isupper/tolower.
+ (a29k_unrecognized_line, md_operand): Use ISDIGIT instead of
+ isdigit.
+ * config/tc-alpha.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (md_undefined_symbol, s_alpha_ent): Use ISDIGIT instead of isdigit.
+ * config/tc-arc.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (md_assemble): Use ISSPACE/ISALNUM instead of isspace/isalnum.
+ (arc_extoper): Use TOLOWER instead of isupper/tolower.
+ * config/tc-arm.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (arm_psr_parse): Use ISALPHA instead of isalpha.
+ (accum0_required_here): Use ISALNUM instead of isalnum.
+ (do_ldrd): Use ISSPACE instead of isspace.
+ (decode_shift): Use ISALPHA instead of isalpha.
+ (insert_reg): Use TOUPPER instead of islower/toupper.
+ (arm_reg_parse): Use ISALPHA instead of isalpha.
+ (arm_parse_reloc): Use ISALNUM/ISPUNCT/TOLOWER instead of
+ isalnum/ispunct/tolower.
+ * config/tc-avr.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (md_parse_option): Use TOLOWER instead of tolower.
+ (avr_operand): Use ISDIGIT/TOLOWER instead of isdigit/tolower.
+ * config/tc-cris.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (cris_process_instruction): Use ISLOWER instead of islower.
+ (get_gen_reg): Use ISALNUM/ISDIGIT instead of isalnum/isdigit.
+ (get_spec_reg): Use TOLOWER/ISALNUM instead of isupper/tolower/isalnum.
+ (get_flags): Use ISSPACE instead of isspace.
+ * config/tc-d10v.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (do_assemble): Use TOLOWER instead of tolower.
+ * config/tc-d30v.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (do_assemble): Use TOLOWER instead of tolower.
+ (d30v_start_line): Use ISSPACE instead of isspace.
+ * config/tc-fr30.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (fr30_is_colon_insn): Use TOLOWER instead of tolower.
+ * config/tc-h8300.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (skip_colonthing, get_operand): Use ISDIGIT instead of isdigit.
+ * config/tc-h8500.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (start_label): Use ISALPHA instead of isalpha.
+ * config/tc-hppa.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (pa_ip): Use ISUPPER/ISLOWER/TOLOWER instead of
+ isupper/islower/tolower.
+ (pa_parse_number): Use ISDIGIT instead of isdigit.
+ (pa_chk_field_selector): Use TOLOWER instead of tolower.
+ (pa_stringer): Use ISDIGIT instead of isdigit.
+ * config/tc-i370.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (register_name): Use ISALPHA instead of isalpha.
+ (i370_elf_suffix): Use ISALNUM/TOLOWER instead of
+ isalnum/islower/tolower.
+ (i370_addr_offset): Use ISDIGIT/ISALPHA instead of
+ isdigit/isalpha.
+ (i370_addr_cons): Use ISALPHA/ISXDIGIT instead of
+ isalpha/isxdigit.
+ (md_assemble): Use ISSPACE instead of isspace.
+ * config/tc-i386.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (md_begin): Use ISDIGIT/ISLOWER/ISUPPER/TOLOWER/ISALPHA
+ instead of isdigit/islower/isupper/tolower/isalpha.
+ (output_invalid): Use ISPRINT instead of isprint.
+ * config/tc-i860.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (i860_ip): Use ISLOWER/ISDIGIT instead of islower/isdigit.
+ * config/tc-i960.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (get_args): Use ISALNUM instead of isalnum.
+ * config/tc-ia64.c: Include "safe-ctype.h".
+ (dot_pred_rel): Use TOUPPER/ISDIGIT instead of toupper/isdigit.
+ (ia64_unrecognized_line): Use ISDIGIT instead of isdigit.
+ (ia64_parse_name): Likewise.
+ * config/tc-m32r.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (assemble_two_insns): Use ISSPACE/ISALNUM/ISUPPER/TOLOWER
+ instead of isspace/isalnum/isupper/tolower.
+ * config/tc-m68hc11.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (md_assemble): Use TOLOWER/ISALNUM instead of tolower/isalnum.
+ * config/tc-m68k.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (mklower_table): Remove variable.
+ (mklower): Remove macro.
+ (insert_reg): Use TOUPPER instead of islower/toupper.
+ (md_begin): Remove initialization of mklower_table.
+ (s_reg): Use ISALNUM instead of isalnum.
+ (mri_assemble): Use ISUPPER/TOLOWER instead of isupper/tolower.
+ (parse_mri_condition): Use TOLOWER instead of isupper/tolower.
+ (build_mri_control_operand): Use TOLOWER instead of tolower.
+ (s_mri_else, s_mri_break, s_mri_next, s_mri_for): Likewise.
+ * config/tc-m88k.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (md_assemble): Use ISSPACE instead of isspace.
+ (get_imm16): Use ISALNUM instead of isalnum.
+ (get_cnd): Use ISDIGIT/ISUPPER/TOLOWER instead of
+ isdigit/isupper/tolower.
+ (get_bf_offset_expression): Use ISALPHA/ISUPPER/TOLOWER
+ instead of isalpha/isupper/tolower.
+ (hexval): Use ISDIGIT/ISLOWER/ISUPPER instead of
+ isdigit/islower/isupper.
+ * config/tc-mcore.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (mcore_s_section): Use ISSPACE instead of isspace.
+ (parse_reg): Use ISSPACE/TOLOWER/ISALNUM instead of
+ isspace/tolower/isalnum.
+ (parse_creg): Use ISSPACE/TOLOWER instead of isspace/tolower.
+ (parse_psrmod): Use TOLOWER instead of isascii/tolower.
+ (parse_exp, parse_mem, md_assemble): Use ISSPACE instead of
+ isspace.
+ * config/tc-mips.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (mips_ip): Use ISSPACE/ISDIGIT instead of isspace/isdigit.
+ (mips16_ip): Use ISLOWER/ISDIGIT instead of islower/isdigit.
+ (my_getSmallExpression): Use ISDIGIT/TOLOWER instead of
+ isdigit/tolower.
+ (tc_get_register): Likewise.
+ (get_number): Use ISDIGIT/ISXDIGIT instead of isdigit/isxdigit.
+ (s_mips_ent): Use ISDIGIT instead of isdigit.
+ * config/tc-mn10200.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (md_assemble): Use ISSPACE instead of isspace.
+ * config/tc-mn10300.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (md_assemble): Use ISSPACE instead of isspace.
+ * config/tc-ns32k.c: Don't include <ctype.h>.
+ * config/tc-pdp11.c: Include "safe-ctype.h".
+ (mklower): Remove function.
+ (parse_reg): Use TOLOWER instead of mklower.
+ * config/tc-pj.c: Include "safe-ctype.h".
+ (md_assemble): Use ISSPACE instead of isspace.
+ * config/tc-ppc.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (register_name): Use ISALPHA instead of isalpha.
+ (ppc_elf_suffix): Use ISALNUM/TOLOWER instead of
+ isalnum/islower/tolower.
+ (md_assemble): Use ISSPACE instead of isspace.
+ (ppc_canonicalize_symbol_name): Use ISLOWER/TOUPPER instead of
+ islower/toupper.
+ * config/tc-s390.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (register_name): Use ISALPHA instead of isalpha.
+ (s390_elf_suffix, s390_lit_suffix): Use ISALNUM instead of isalnum.
+ (md_gather_operands, md_assemble, s390_insn): Use ISSPACE instead of
+ isspace.
+ * config/tc-sh.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (sh_elf_suffix): Use ISALNUM/TOLOWER instead of
+ isalnum/islower/tolower.
+ (IDENT_CHAR): Use ISALNUM instead of isalnum.
+ (parse_reg): Use TOLOWER instead of tolower.
+ (find_cooked_opcode): Use TOLOWER instead of isupper/tolower.
+ * config/tc-sparc.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (sparc_ip): Use ISLOWER/ISDIGIT instead of islower/isdigit.
+ (parse_keyword_arg): Use ISALNUM instead of isalnum.
+ * config/tc-tahoe.c: Include "safe-ctype.h".
+ (tahoe_reg_parse): Use ISDIGIT instead of isdigit.
+ (tip_op): Use TOLOWER instead of isupper/tolower.
+ * config/tc-tic30.c: Include "safe-ctype.h".
+ (md_begin): Use ISLOWER/ISDIGIT/ISUPPER/TOLOWER/ISLOWER/
+ ISALPHA instead of islower/isdigit/isupper/tolower/islower/isalpha.
+ (tic30_operand): Use TOLOWER instead of tolower.
+ (tic30_find_parallel_insn): Likewise.
+ (output_invalid): Use ISPRINT instead of isprint.
+ * config/tc-tic54x.c: Include "safe-ctype.h".
+ (tic54x_asg, tic54x_eval): Use ISALPHA instead of isalpha.
+ (lookup_version): Use TOUPPER instead of toupper.
+ (tic54x_var): Use ISALPHA instead of isalpha.
+ (tic54x_mlib): Use ISSPACE instead of isspace.
+ (subsym_iscons): Use TOUPPER instead of toupper.
+ (get_operands): Use ISSPACE instead of isspace.
+ (is_type): Use TOUPPER/ISDIGIT instead of toupper/isdigit.
+ (encode_indirect, encode_operand): Use TOUPPER instead of toupper.
+ (next_line_shows_parallel): Use ISSPACE instead of isspace.
+ (subsym_get_arg, subsym_substitute): Use ISDIGIT instead of isdigit.
+ (tic54x_start_line_hook, md_assemble, tic54x_start_label): Use
+ ISSPACE instead of isspace.
+ * config/tc-tic80.c: Include "safe-ctype.h".
+ (md_assemble): Use ISSPACE instead of isspace.
+ * config/tc-v850.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (system_register_name): Use ISDIGIT instead of isdigit.
+ (md_assemble): Use ISSPACE instead of isspace.
+ * config/tc-vax.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (vax_reg_parse): Use TOLOWER/ISDIGIT instead of
+ isupper/tolower/isdigit.
+ (vip_op): Use TOLOWER instead of isupper/tolower.
+ * config/tc-w65.c: Don't include <ctype.h>.
+ * config/tc-z8k.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (tohex): Use ISDIGIT/ISLOWER instead of isdigit/islower.
+ (whatreg): Use ISDIGIT instead of isdigit.
+ * ecoff.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (ecoff_directive_ent, ecoff_stab): Use ISDIGIT instead of isdigit.
+ * expr.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (integer_constant): Use ISALNUM/TOUPPER instead of
+ isalnum/islower/toupper.
+ (operand): Use TOLOWER instead of isupper/tolower.
+ * gasp.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (sb_strtol, level_0, change_base, doinstr): Use ISDIGIT instead
+ of isdigit.
+ (process_assigns, whatcond): Use TOUPPER instead of toupper.
+ (chartype_init): Use ISALPHA/ISDIGIT instead of isalpha/isdigit.
+ (main): For gettext, also set the LC_CTYPE locate facet.
+ * hash.c: Include "safe-ctype.h".
+ (main): Use TOLOWER instead of isupper/tolower.
+ * itbl-lex.l: Don't include <ctype.h>.
+ * listing.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (listing_newline): Use ISCNTRL instead of isascii/iscntrl. Don't
+ omit non-ASCII characters.
+ (debugging_pseudo): Use ISSPACE instead of isspace.
+ * macro.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (buffer_and_nest): Use ISALNUM instead of isalnum.
+ (get_token): Use ISALPHA/ISALNUM instead of isalpha/isalnum.
+ (define_macro): Use ISUPPER/TOLOWER instead of isupper/tolower.
+ (macro_expand_body): Use ISALNUM/ISDIGIT/ISUPPER/ISALPHA
+ instead of isalnum/isdigit/isupper/isalpha.
+ (check_macro): Use ISALPHA/ISALNUM/ISUPPER/TOLOWER instead
+ of isalpha/isalnum/isupper/tolower.
+ * read.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (read_a_source_file): Use ISUPPER/TOLOWER/ISDIGIT instead of
+ isupper/tolower/isdigit.
+ (s_mri_common): Use ISDIGIT instead of isdigit.
+ (s_mri_sect): Use ISDIGIT/TOUPPER instead of isdigit/toupper.
+ (s_float_space): Use ISALPHA instead of isalpha.
+ (ignore_rest_of_line): Use ISPRINT instead of isprint.
+ (float_cons): Use ISALPHA instead of isalpha.
+ (next_char_of_string): Use ISDIGIT/ISXDIGIT instead of
+ isdigit/isxdigit.
+ * symbols.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (save_symbol_name): Use ISLOWER/TOUPPER instead of
+ islower/toupper.
+ (symbol_find_base): Use TOUPPER instead of islower/toupper.
+ (decode_local_label_name): Use ISDIGIT instead of isdigit.
+
+2001-09-18 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * tc-s390.c (s390_insn): Add code to cope with 6 byte O_constants
+ in 64 bit mode and make format "e" work.
+
+2001-09-18 Alan Modra <amodra@bigpond.net.au>
+
+ * dwarf2dbg.c (dwarf2_directive_file): Avoid signed/unsigned warning.
+
+ * write.c (set_symtab): Update bfd_alloc declaration. Use a temp
+ var to ensure bfd_alloc arg is the right type.
+ (write_object_file): Cast args of bfd_seek. Replace bfd_write with
+ bfd_bwrite.
+
+ * config/obj-coff.c: Replace calls to bfd_write with calls to
+ bfd_bwrite. Cast args of bfd_seek.
+
+ * config/obj-elf.c (obj_elf_change_section): Avoid signed/unsigned
+ warning.
+
+ * config/tc-mn10300.c (set_arch_mach): Make param unsigned.
+
+ * config/tc-tic54x.c (tic54x_mlib): Replace bfd_read call with
+ call to bfd_bread.
+
+2001-09-15 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * config/tc-sh.h (sh_force_relocation): Prototype.
+ (struct fix): Forward declare.
+ * config/tc-sh.c (type sh_operand_info): Move to top of file.
+ (cons, s_align_bytes): Remove old-type declarations.
+ (sh_elf_suffix, parse_reg, dot, parse_exp, parse_at, get_operand,
+ get_operands, get_specific, insert, build_relax,
+ insert_loop_bounds, build_Mytes): Prototype.
+ (little): Make static. Prototype.
+ (check, tc_Nout_fix_to_chars): Delete unused functions.
+
+2001-09-14 Eric Christopher <echristo@redhat.com>
+
+ * config/tc-mips.c (md_parse_option): Remove setting mips_64 via
+ -mgp32/mgp64.
+
+2001-09-14 Kevin Lo <kevlo@openbsd.org>
+
+ * configure.in: Add arm-openbsd target.
+ * configure: Regenerate.
+
+2001-09-14 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * configure.in: Change machine triplets from mips-*-linux-gnu* to
+ mips*-*-linux*.
+
+2001-09-12 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config/tc-mips.c (append_insn): Don't rightshift BFD_RELOC_16_PCREL.
+
+2001-09-11 Richard Henderson <rth@redhat.com>
+
+ * config/tc-alpha.c (alpha_elf_section_letter): New.
+ (alpha_elf_section_flags): New.
+ * config/tc-alpha.h (md_elf_section_letter): New.
+ (md_elf_section_flags): New.
+ * config/tc-ia64.c (ia64_elf_section_letter): New.
+ * config/tc-ia64.h (md_elf_section_letter): New.
+
+2001-09-11 Jakub Jelinek <jakub@redhat.com>
+
+ * config/obj-elf.c (obj_elf_parse_section_letters): Use 'M' instead
+ of 'm', 'S' instead of 's'. Update bad_msg.
+ * config/tc-ppc.c (ppc_section_letter): Update bad_msg.
+ * config/tc-i370.c (i370_sectioN_letter): Update bad_msg.
+
+2001-09-09 Alan Modra <amodra@bigpond.net.au>
+
+ * expr.c (expr): Move code setting "retval" to the end of the loop,
+ and rearrange for efficiency. For "PIC code" subtraction, use
+ "rightseg" rather than recalculating. For "symbol OP symbol"
+ subtract, set "retval" to absolute_section if symbols in same
+ section.
+ * symbols.c (resolve_symbol_value): Resolve "sym +/- expr" to an
+ O_symbol. Simplify a +/- b code. Allow equality and non-equality
+ comparisons on symbols from any section. Allow other comparison
+ operators as for subtraction.
+ (symbol_equated_reloc_p): New predicate function.
+ * symbols.h (symbol_equated_reloc_p): Declare.
+ * write.c (relax_segment <rs_machine_dependent>): Ensure segment
+ for expression syms is set correctly.
+ (adjust_reloc_syms): Use symbol_equated_reloc_p.
+ (write_relocs): Likewise.
+ (write_object_file): Likewise.
+ * config/tc-mips.c (md_estimate_size_before_relax): Likewise.
+ * config/tc-i386.c (md_assemble <Output jumps>): Don't lose part
+ of a complex expression when setting up frag_var.
+
+2001-09-07 Richard Henderson <rth@redhat.com>
+
+ * config/tc-alpha.c (alpha_reloc_op_tag): Replace need_seq with
+ require_seq and allow_seq. Let !literal omit the sequence number.
+ (tokenize_arguments): Reject sequence numbers of !allow_seq.
+
+2001-09-08 Jakub Jelinek <jakub@redhat.com>
+
+ * config/tc-sparc.c (md_apply_fix3): Handle relocs against SEC_MERGE
+ section symbols the same way as externs.
+
+2001-09-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config/tc-mips.c (s_mipsset): Reallow unrestricted use of .set mipsX
+ pseudo-op.
+
+2001-09-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config/tc-mips.c (append_insn): Handle BFD_RELOC_16_PCREL.
+ (macro_build): Use BFD_RELOC_16_PCREL_S2 only for embedded
+ PIC, BFD_RELOC_16_PCREL for the rest.
+ (mips_ip): Likewise.
+ (md_pcrel_from): return the right offset for the differently shifted
+ pcrel relocs.
+ (md_apply_fix): Handle BFD_RELOC_16_PCREL.
+
+2001-09-05 Richard Henderson <rth@redhat.com>
+
+ * config/tc-ia64.c (FUNC_IPLT_RELOC): New.
+ (pseudo_func): Add @iplt.
+ (pseudo_opcode): Add data16 and data16.ua.
+ (md_begin): Set iplt pseudo.
+ (ia64_cons_fix_new): Handle 16 byte iplt reloc specially.
+
+2001-09-04 Richard Henderson <rth@redhat.com>
+
+ * config/tc-alpha.c (struct alpha_insn): Make sequence scalar long.
+ (MACRO_LITERAL, MACRO_BASE, MACRO_BYTOFF, MACRO_JSR): Remove.
+ (alpha_macros): Remove occurrences of same.
+ (O_lituse_addr, O_gprel): New.
+ (DUMMY_RELOC_LITUSE_*): New.
+ (s_alpha_ucons, s_alpha_arch): Prototype.
+ (alpha_reloc_op): Construct elements via DEF macro.
+ (ALPHA_RELOC_SEQUENCE_OK): Remove.
+ (struct alpha_reloc_tag): Rename from alpha_literal_tag; rename
+ members to not be literal specific.
+ (next_sequence_num): New.
+ (md_apply_fix3): Cope with missing GPDISP_LO16. Adjust for
+ added/removed BFD relocations.
+ (alpha_force_relocation, alpha_fix_adjustable): Likewise.
+ (alpha_adjust_symtab_relocs): Handle GPDISP relocs as well.
+ (tokenize_arguments): Parse ! relocations properly.
+ (find_macro_match): Delete unused macro argument types.
+ (assemble_insn): Add reloc parameter; emit that instead of the
+ default as appropriate.
+ (get_alpha_reloc_tag): New. Split from ...
+ (emit_insn): ... here. Allocate a reloc tag for GPDISP.
+ (assemble_tokens): Don't search macros if user relocation present.
+ Copy reloc sequence number to insn struct.
+ (emit_ldgp): Remove user reloc handling.
+ (load_expression, emit_lda, emit_ldah, emit_ir_load): Likewise.
+ (emit_loadstore, emit_ldXu, emit_ldil, emit_stX): Likewise.
+ (emit_sextX, emit_division, emit_jsrjmp, emit_retjcr): Likewise.
+ * config/tc-alpha.h (tc_adjust_symtab): Always define.
+ (struct alpha_fix_tag): Name members less literal specific.
+
+2001-09-04 Jeffrey A Law (law@cygnus.com)
+
+ * tc-h8300.c (tc_gen_reloc): Give an error if we try to take the
+ address of two symbols in different sections.
+
+2001-08-31 Eric Christopher <echristo@redhat.com>
+ Jason Eckhardt <jle@redhat.com>
+
+ * config/tc-mips.c (mips_cpu_info): Add support for mipsisa32,
+ 5kc, and 20kc. Clean up old entries.
+
+2001-08-31 J"orn Rennecke <amylaar@redhat.com>
+ Jeff Law <law@redhat.com>
+
+ * config/tc-h8300.c (build_bytes): For OBJ_ELF, make relocation's
+ offset match H8 ELF spec.
+ (md_section_align): Alternate implementation for BFD_ASSEMBLER.
+ (md_apply_fix): Fix argument and return types for BFD_ASSEMBLER.
+
+ * tc-h8300.c (relocation mappings): Remove. Moved to tc-h8300.h.
+ (build_bytes): Mark fixups for PCrel branches as signed. For
+ OBJ_ELF, make sure the reloc's offset points to the first byte
+ to be modified.
+ (md_convert_frag): Update definiton based on BFD_ASSEMBLER.
+ * tc-h8300.h (relocation mappings): Add.
+
+2001-08-30 J"orn Rennecke <amylaar@redhat.com>
+
+ * tc-h8300.c (tc_crawl_symbol_chain, tc_headers_hook): Don't
+ define for BFD_ASSEMBLER.
+ (tc_reloc_mangle): Likewise.
+ (tc_gen_reloc): New function for BFD_ASSEMBLER.
+
+2001-08-29 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-h8300.c (h8300hmode): Record the machine type
+ if BFD_ASSEMBLER is defined.
+ (h8300smode, md_begin): Similarly.
+
+2001-08-29 Joel Sherrill <joel@OARcorp.com>
+
+ * configure.in (i[3456]86-*-rtems*, m68*-*-rtems*): Change
+ default from coff to elf.
+ * configure: Regenerate.
+
+2001-08-29 J"orn Rennecke <amylaar@redhat.com>
+
+ * tc-h8300.c: If OBJ_ELF, include elf/h8.h, and define
+ assorted coff relocations to the corresponding elf relocations.
+ * tc-h8300.h (TARGET_ARCH, TARGET_FORMAT): Define appropriately.
+
+ * configure.in: Add case for h8300-*-elf.
+ * configure: Regenerate.
+
+2001-08-29 J"orn Rennecke <amylaar@redhat.com>
+
+ * doc/internals.texi (MD_PCREL_FROM_SECTION): Change
+ documentation to reflect reality.
+
+2001-08-27 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config/tc-mips.c (load_address): Reflect change to MAX_GPREL_OFFSET.
+ (macro): Reflect change to MAX_GPREL_OFFSET.
+
+2001-08-27 Torbjorn Granlund <tege@swox.com>
+ Staffan Ulfberg <staffanu@swox.se>
+ Linus Nordberg <linus@swox.se>
+ Alan Modra <amodra@bigpond.net.au>
+
+ * configure.in: Recognise powerpc*le*, not just powerpcle*.
+ * configure: Regenerate.
+ * config/tc-ppc.c (PPC_LO, PPC_HI, PPC_HA, PPC_HIGHER,
+ PPC_HIGHERA, PPC_HIGHEST, PPC_HIGHESTA, SEX16): New macros.
+ (md_assemble): Use them.
+ (ppc_machine): Support stub for ELF64 as well as XCOFF.
+ (md_pseudo_table): Add "llong", "quad".
+ (md_parse_option): Match default_cpu of powerpc*.
+ (ppc_arch): Likewise.
+ (ppc_subseg_align): Only for OBJ_XCOFF.
+ (ppc_target_format): Return elf64-powerpc strings for 64 bit ELF.
+ (md_begin): Select PPC_OPCODE_64 for 64 bit.
+ (ppc_insert_operand): Don't bother testing 'file' before calling
+ as_bad_where. Use as_bad_where for operand->insert errors.
+ (mapping): Add ELF64 relocation modifiers.
+ (ppc_elf_suffix): Replace symbol on BFD_RELOC_PPC64_TOC reloc
+ expressions with abs_symbol.
+ (ppc_elf_cons): Correct offset for little endian targets.
+ (ppc_elf_frob_symbol): New.
+ (md_assemble): Add support for 64 bit ELF relocs.
+ (ppc_tc): Ensure 8 byte alignment when 64 bit.
+ (ppc_is_toc_sym): Only define for OBJ_XCOFF and OBJ_ELF. Match
+ ".toc" section for 64 bit ELF.
+ (ppc_fix_adjustable): New. Macro body moved from tc-ppc.h.
+ (md_apply_fix3): Silence warning with ATTRIBUTE_UNUSED. Only do
+ the ppc_is_toc_sym check for OBJ_XCOFF and OBJ_ELF. For 64 bit,
+ use BFD_RELOC_PPC64_TOC16_DS instead of BFD_RELOC_PPC_TOC16.
+ Expand on comments, error message. Add support for 64 bit relocs,
+ and use PPC_HI etc. macros.
+ * config/tc-ppc.h (MAX_MEM_FOR_RS_ALIGN_CODE): Define.
+ (HANDLE_ALIGN): Define to generate nops in code sections rather
+ than zeros.
+ (TC_FORCE_RELOCATION): Force for BFD_RELOC_PPC64_TOC.
+ (ELF_TC_SPECIAL_SECTIONS): Add 64 bit ELF sections.
+ (tc_fix_adjustable): Move body of macro to tc-ppc.c.
+ (ppc_fix_adjustable): Declare.
+ (tc_frob_symbol): Define.
+ (ppc_elf_frob_symbol): Declare.
+
+2001-08-26 Andreas Jaeger <aj@suse.de>
+
+ * config/tc-s390.c: Add missing prototypes
+ (md_gather_operands): Make static.
+
+2001-08-26 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config/tc-mips.h (MAX_GPREL_OFFSET): Change it to the maximum
+ allowed value, not the word beyond maximum.
+ * config/tc-mips.c (macro_build_lui): Code cleanup.
+ (macro): Reflect change to MAX_GPREL_OFFSET.
+ (mips_ip): Check explicitly against S_EX_NONE.
+ (my_get_SmallExpression): parse for %gp_rel, not %gprel.
+ (md_apply_fix): Code cleanup.
+
+2001-08-24 Andreas Jaeger <aj@suse.de>
+
+ * config/tc-ppc.h: Fix prototype declaration.
+
+2001-08-23 Jakub Jelinek <jakub@redhat.com>
+
+ * config/tc-ia64.c (dot_endp): Set function symbol sizes.
+ * config/obj-elf.c (obj_elf_size): When size is constant, free
+ and clear symbol_get_obj(sym)->size if any.
+
+2001-08-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config/tc-mips.c (md_begin): Warn about incompatibility between
+ -march=FOO and -mipsN option, continue with default ISA.
+
+2001-08-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config/tc-mips.c (md_parse_option): #ifdef the
+ traditional/non-traditional names as it is done in mips_target_format.
+
+2001-08-20 Richard Henderson <rth@redhat.com>
+
+ * config/tc-alpha.h (MD_APPLY_FIX3): Define.
+ * config/tc-alpha.c (md_apply_fix3): Rename from md_apply_fix;
+ use seg parameter instead of now_seg.
+
+2001-08-18 H.J. Lu <hjl@gnu.org>
+
+ * config/tc-mips.c (show): Add the missing prototype.
+
+2001-08-18 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config/tc-mips.c (S_EX_*): New enum for my_getSmallExpression()
+ return values.
+ (mips_ip): Use the new return values instead of characters. Add
+ support for %higher and %highest.
+ (LP): Remove.
+ (RP): Remove.
+ (my_getSmallExpression): Make parsing case insensitive and more
+ reliable. Add support for %higher and %highest. Further support to
+ parse %gprel and %neg is implemented but currently deactivated.
+
+2001-08-17 Alan Modra <amodra@bigpond.net.au>
+
+ * ecoff.c (ecoff_frob_symbol): Remove casts from bfd_get_gp_size.
+ (ecoff_build_symbols): Likewise.
+ * read.c (s_lcomm_internal): Fix signed/unsigned warning.
+
+2001-08-16 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config/tc-mips.c (mips_elf_final_processing): Set elf header flags
+ for n32 ABI if appropriate.
+
+2001-08-16 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config/tc-mips.c (cons_fix_new_mips): Remove.
+ * config/tc-mips.h (TC_CONS_FIX_NEW): Remove.
+ (cons_fix_new_mips): Remove.
+
+2001-08-14 Jeff Johnston <jjohnstn@redhat.com>
+
+ * expr.c (operand)[LITERAL_PREFIXDOLLAR_HEX]: Treat $L as
+ a label, not a hex constant.
+
+2001-08-13 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * config/tc-v850.h: Add missing prototypes.
+
+2001-08-12 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * config/tc-s390.c (s390_elf_cons): Correct fixups for PLT
+ relocations.
+
+2001-08-12 TAKAI Kousuke <takai@vlsi.kuee.kyoto-u.ac.jp>
+
+ * config/tc-sparc.c (cons_fix_new_sparc): Move
+ `sparc_no_align_cons = 0;' to...
+ (s_uacons): ...here so that sparc_no_align_cons will get
+ cleared properly.
+
+2001-08-11 Kazu Hirata <kazu@hxi.com>
+
+ * config/tc-mips.c: Fix a comment typo.
+
+2001-08-10 Richard Sandiford <rsandifo@redhat.com>
+
+ * config/tc-mips.c (move_register): New function.
+ (macro_build): Remove OPCODE_IS_MEMBER's gp32 argument.
+ (mips_ip): Likewise.
+ (macro2): Use move_register rather than macro_build for moves.
+ (mips16_macro): Likewise.
+ (macro): Likewise. Handle M_MOVE.
+
+2001-08-10 Andreas Jaeger <aj@suse.de>
+
+ * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
+ to build warnings.
+ * configure: Regenerate.
+
+2001-08-10 Alan Modra <amodra@bigpond.net.au>
+
+ * as.h (alloca): Don't declare if __GNUC__. Remove an old comment.
+ Comment indentation of #pragma.
+ * macro.c (alloca): Likewise.
+
+ * config/tc-ppc.c: Revert 2001-08-08.
+
+2001-08-09 Alan Modra <amodra@bigpond.net.au>
+
+ * symbols.c: Add missing prototypes.
+ * config/e-i386elf.c: Likewise.
+ * config/e-i386coff.c: Likewise.
+ * config/e-i386aout.c: Likewise.
+ * config/obj-coff.c: Likewise.
+ (def_symbol_in_progress, stack): Move definition.
+ * config/obj-elf.c: Add missing prototypes.
+ (obj_elf_change_section): Make static.
+ (obj_elf_parse_section_letters): Likewise.
+ (obj_elf_section_word): Likewise.
+ (obj_elf_section_type): Likewise.
+
+2001-08-08 Alan Modra <amodra@bigpond.net.au>
+
+ From 1999-10-25 Torbjorn Granlund <tege@swox.com>
+ * config/tc-ppc.c (md_apply_fix3): Replace haphazard code for
+ determining reloc type with code reading operands->reloc field.
+
+2001-08-08 Alan Modra <amodra@bigpond.net.au>
+
+ * config/obj-elf.c (elf_copy_symbol_attributes): Make it a global
+ function, and expand old obj-elf.h OBJ_COPY_SYMBOL_ATTRIBUTES here.
+ * config/obj-elf.h (elf_copy_symbol_attributes): Declare.
+ (OBJ_COPY_SYMBOL_ATTRIBUTES): Call elf_copy_symbol_attributes.
+
+ * output-file.c (output_file_create): Don't try to open a second
+ time as it's unnecessary. FOPEN_W was undefined too.
+
+2001-08-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config/tc-mips.c (macro_build): Replace magic constants by defines.
+ (mips_ip): Likewise. Typo.
+
+2001-08-04 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config/tc-mips.c (mips_abi_string): Initialize with NULL instead
+ of 0.
+ (RELAX_ENCODE): Replace bfd_vma by valueT.
+ (load_address): Formatting.
+ (macro): Likewise. Code cleanup. Typo.
+ (macro2): Formatting.
+ (md_parse_option): Typo.
+ (s_mipsset): Reorder cases to look nicer.
+ (md_estimate_size_before_relax): Formatting. Code cleanup.
+ (mips_elf_final_processing): Check against NULL instead of 0.
+ (md_obj_end): Remove ugly `' in message string.
+ (s_mips_ent): Remove ugly `' in message string.
+
+2001-07-30 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config/tc-mips.c (md_begin): Take -mcpu value into account even when
+ -mipsX is specified. Make both -mcpu/-march and -mcpu/-mtune pairs
+ mutually exclusive (if they are different).
+ (md_parse_option): Warn if an -march/-mtune/-mcpu/-m<cpu> option is
+ set more than once.
+
+2001-08-03 Richard Sandiford <rsandifo@redhat.com>
+
+ * config/tc-mips.c (md_apply_fix): Don't subtract the symbol value
+ from GPREL addends.
+
+2001-08-02 Richard Sandiford <rsandifo@redhat.com>
+
+ * doc/c-mips.tex (-mgp32, -mfp32): Added -mfp32, unified with -mgp32.
+ * config/tc-mips.c (mips_fp32, mips_32bit_abi): New static variables.
+ (md_long_opts): Add -mfp32 option.
+ (md_parse_option): Handle it. Set mips_32bit_abi given -mabi=32.
+ (md_show_usage): Show usage for -mfp32 and -mgp32.
+ (HAVE_32BIT_GPRS, HAVE_32BIT_FPRS): New macros.
+ (HAVE_64BIT_GPRS, HAVE_64BIT_FPRS): New macros, inverse of the above.
+ (HAVE_32BIT_ADDRESSES): New macro.
+ (load_register): Use HAVE_32BIT_GPRS to determine the register width.
+ (load_address): Use HAVE_32BIT_ADDRESSES to determine the address size.
+ (s_cprestore, s_cpadd): Likewise.
+ (macro): Use HAVE_32BIT_GPRS to determine the width of registers
+ used in branch and M_LI_D macros. Use HAVE_64BIT_FPRS to determine
+ the width registers used in M_LI_DD macros. Use HAVE_32BIT_ADDRESSES
+ to determine the width of addresses in load, store and jump macros.
+ (macro2): Use HAVE_32BIT_GPRS to determine the width of registers
+ used in set instructions; do not check the address size for them.
+ Use HAVE_32BIT_ADDRESSES to determine the width of addresses in
+ unaligned load and store macros.
+ (mips_ip): Use the new macros to check the width of a register when
+ processing float constants. Force a constant into memory if it is
+ destined for an FPR and the FPRs are wider than the GPRs. Warn about
+ odd FPR numbers if HAVE_32BIT_FPRS. Use HAVE_32BIT_GPRS rather
+ than mips_gp32 to select synthetic instructions.
+ (macro_build): Use HAVE_32BIT_GPRS rather than mips_gp32 to select
+ synthetic instructions.
+
+2001-08-01 Christian Groessler <cpg@aladdin.de>
+
+ * config/tc-z8k.c (parse_reg): If a string starts with "r", "rl",
+ "rh", "rr", "rq", or "sp" then don't automatically assume
+ it's a register name. Check whether there is a number
+ following.
+
+2001-08-01 Alan Modra <amodra@bigpond.net.au>
+
+ * config/tc-i386.c (lex_got): Match lower case relocation tokens.
+ Don't allocate more space than necessary for the input line copy.
+
+2001-08-01 Alan Modra <amodra@bigpond.net.au>
+
+ * read.c: Standardize error/warning messages - don't capitalise, no
+ final period or newline, don't say "ignored" or "zero assumed" for
+ as_bad messages. In some cases, change the wording to that used
+ elsewhere for similar messages.
+ * app.c: Likewise.
+ * as.c: Likewise.
+ * atof-generic.c: Likewise.
+ * cgen.c: Likewise.
+ * cond.c: Likewise.
+ * depend.c: Likewise.
+ * dwarf2dbg.c: Likewise.
+ * ecoff.c: Likewise.
+ * expr.c: Likewise.
+ * frags.c: Likewise.
+ * input-file.c: Likewise.
+ * input-scrub.c: Likewise.
+ * listing.c: Likewise.
+ * output-file.c: Likewise.
+ * stabs.c: Likewise.
+ * subsegs.c: Likewise.
+ * symbols.c: Likewise.
+ * write.c: Likewise.
+ * ecoff.c (ecoff_directive_end): Test for missing name by
+ comparing input line pointers rather than reading string.
+ (ecoff_directive_ent): Likewise.
+ * read.c (s_set): Likewise.
+ (s_align): Report a warning rather than an error for
+ alignment too large.
+ (s_comm): Check for missing symbol name.
+ (s_lcomm_internal): Likewise.
+ (s_lsym): Likewise.
+ (s_globl): Use is_end_of_line instead of looking for '\n'.
+ (s_lcomm_internal): Likewise.
+ (ignore_rest_of_line): Report a warning rather than an error.
+
+2001-07-31 Geoffrey Keating <geoffk@redhat.com>
+
+ * config/tc-ppc.c (ppc_elf_validate_fix): It's OK to have
+ any kind of relocation against a not-loaded section.
+
+2001-07-30 Alan Modra <amodra@bigpond.net.au>
+
+ * config/obj-elf.c (obj_elf_symver): Temporarily modify lex_type
+ to include '@' in symbol names when parsing versioned symbols
+ rather than calling get_symbol_end multiple times.
+ * config/tc-i370.c (register_name): Format fixes. Don't call
+ get_symbol_end after parsing number.
+ * config/tc-mn10200.c (data_register_name): Format fixes. Hoist
+ code out of conditional.
+ (address_register_name): Likewise.
+ (other_register_name): Likewise.
+ * config/tc-mn10300.c (r_register_name): Likewise.
+ (xr_register_name): Likewise.
+ (data_register_name): Likewise.
+ (address_register_name): Likewise.
+ (other_register_name): Likewise.
+ * config/tc-ppc.c (register_name): Likewise.
+ * config/tc-s390.c (register_name): Likewise.
+
+2001-07-27 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * config/tc-m68hc11.c (md_estimate_size_before_relax): Fix bsr
+ and bra relax: update fragP->fr_fix after the fixup.
+
+2001-07-27 Tracy Kuhrt <Tracy.Kuhrt@microchip.com>
+
+ * read.c (s_set): Check for missing symbol name.
+
+2001-07-26 Alan Modra <amodra@bigpond.net.au>
+
+ * write.c (relax_segment <rs_space>): Account for fr_fix.
+
+2001-07-25 H.J. Lu <hjl@gnu.org>
+
+ * config/tc-mips.c (md_estimate_size_before_relax): Make sure
+ we treat weak like extern only for ELF.
+ (mips_fix_adjustable): Make sure we don't adjust extern/weak
+ symbols only for ELF.
+
+2001-07-25 Chris Demetriou <cgd@broadcom.com>
+
+ * config/tc-mips.c: Fix spelling error in comment.
+
+2001-07-25 Dave Brolley <brolley@redhat.com>
+
+ * app.c (LEX_IS_PARALLEL_SEPARATOR): New macro.
+ (IS_PARALLEL_SEPARATOR): New macro.
+ (do_scrub_begin): Set up characters in tc_parallel_separator_chars
+ as LEX_IS_PARALLEL_SEPARATOR, if it is defined.
+ (do_scrub_chars): Handle LEX_PARALLEL_SEPARATOR chars like
+ LEX_LINE_SEPARATOR except that we go to state 1 (as if the label has
+ been seen).
+
+2001-07-24 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am (DEP_FLAGS): Define, add -DOBJ_MAYBE_ELF.
+ (DEP1, DEPTC, DEPOBJ, DEP2): Use it.
+ Update dependencies with "make dep-am".
+ * Makefile.in: Regenerate.
+ * doc/Makefile.in: Regenerate.
+
+2001-07-23 Kazu Hirata <kazu@hxi.com>
+
+ * config/tc-alpha.h: Fix formatting.
+ * config/tc-arc.c: Likewise.
+ * config/tc-d10v.h: Likewise.
+ * config/tc-hppa.c: Likewise.
+ * config/tc-i370.c: Likewise.
+ * config/tc-i386.h: Likewise.
+ * config/tc-i960.h: Likewise.
+ * config/tc-ia64.c: Likewise.
+ * config/tc-ia64.h: Likewise.
+ * config/tc-m32r.c: Likewise.
+ * config/tc-m68k.c: Likewise.
+ * config/tc-m88k.c: Likewise.
+ * config/tc-ns32k.c: Likewise.
+ * config/tc-pdp11.c: Likewise.
+ * config/tc-pj.h: Likewise.
+ * config/tc-s390.c: Likewise.
+ * config/tc-sparc.c: Likewise.
+ * config/tc-sparc.h: Likewise.
+ * config/tc-tic80.c: Likewise.
+ * config/tc-w65.h: Likewise.
+
+2001-07-23 Alan Modra <amodra@bigpond.net.au>
+
+ * symbols.c (S_GET_VALUE): Don't treat O_constant and local
+ symbols specially. Always resolve, adding fr_address to value.
+ * write.c (write_object_file): Don't add fr_address to sym values.
+ (relax_frag): Likewise.
+ (relax_segment): Likewise.
+ * config/obj-ieee.c (do_symbols): Likewise.
+ * config/tc-cris.c (md_convert_frag): Likewise.
+ * config/tc-fr30.c (md_convert_frag): Likewise.
+ * config/tc-i386.c (md_convert_frag): Likewise.
+ * config/tc-m32r.c (md_convert_frag): Likewise.
+ * config/tc-m68hc11.c (md_convert_frag): Likewise.
+ * config/tc-mcore.c (md_convert_frag): Likewise.
+ * config/tc-mips.c (mips16_extended_frag): Likewise.
+ * config/tc-ns32k.c (md_convert_frag): Likewise.
+ * config/tc-m68k.c (md_convert_frag_1): Likewise.
+ (BRANCHBWL, BRABSJUNC, BRABSJCOND, BRANCHBW, FBRANCH, DBCCLBR,
+ DBCCABSJ, PCREL1632, PCINDEX, ABSTOPCREL): Decrement.
+ (md_relax_table): Remove first four entries. Format.
+ (md_estimate_size_before_relax): Remove old_fix. Don't bother
+ setting fr_var. Simplify byte branch checks.
+
+2001-07-23 Alan Modra <amodra@bigpond.net.au>
+
+ * config/tc-hppa.c (pa_parse_nonneg_cmpsub_cmpltr): Remove
+ "isbranch" param as all calls have it set.
+ (pa_parse_neg_cmpsub_cmpltr): Likewise.
+ (pa_parse_nonneg_add_cmpltr): Likewise. Remember result of
+ strcasecmp in "nullify" var.
+ (pa_parse_neg_add_cmpltr): Likewise.
+ (pa_ip): Don't "save_s" unnecessarily. Update calls to above
+ functions. Don't print wrong conditions in error messages.
+
+2001-07-23 Andreas Jaeger <aj@suse.de>
+
+ * config/tc-s390.c (s390_force_relocation): Removed.
+
+ * config/tc-s390.h: Remove double declaration of
+ TC_FORCE_RELOCATION.
+
+2001-07-22 H.J. Lu <hjl@gnu.org>
+
+ * config/tc-mips.c (s_mips_end): Remove unused variables.
+ (s_mips_frame): Add ATTRIBUTE_UNUSED.
+
+2001-07-17 Andreas Schwab <schwab@suse.de>
+
+ * config/tc-m68k.c (md_pseudo_table) [OBJ_ELF]: Add .file and
+ .loc.
+ (md_assemble) [OBJ_ELF]: Call dwarf2_emit_insn before emitting
+ insn.
+ * config/tc-m68k.h (DWARF2_LINE_MIN_INSN_LENGTH): Define.
+
+2001-07-17 matthew green <mrg@eterna.com.au>
+
+ * config/tc-i386.c (comment_chars): Don't use '/' as comment start if
+ TE_NetBSD.
+ (line_comment_chars): Set to '/' if TE_NetBSD.
+
+2001-07-14 matthew green <mrg@eterna.com.au>
+
+ * configure.in (i386-*-netbsdelf*): New target.
+ * configure: Regenerate.
+
+2001-07-10 Mark Elbrecht <snowball3@softhome.net>
+
+ * config/obj-coff.c (coff_frob_symbol): Don't merge if the storage
+ class of the non-debug symbol is C_NULL.
+
+2001-07-10 Anders Norlander <anorland@synergenix.se>
+
+ * doc/as.texinfo (Incbin): Fix grammatical errors.
+
+2001-07-10 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * depend.c: Use FOPEN_.. macros in calls to fopen().
+ * input-file.c: As above.
+ * itbl-ops.c: As above.
+ * listing.c: As above.
+ * output-file.c: As above.
+ * read.c: As above.
+
+2001-07-08 Anders Norlander <anorland@synergenix.se>
+
+ * read.c (s_incbin): New .incbin function.
+ * read.c (potable): Add "incbin" pseudo-op.
+ * read.h: Add s_incbin prototype.
+ * doc/as.texinfo (incbin): Document .incbin pseudo-op.
+ * NEWS: Mention new feature.
+
+2001-07-07 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * ecoff.c (add_file): Only set debug_type to DEBUG_NONE if it is
+ DEBUG_UNSPECIFIED.
+
+2001-07-06 John Healy <jhealy@redhat.com>
+
+ * cgen.c (gas_cgen_save_fixups): Modified to allow more than one
+ set of fixups to be stored.
+ (gas_cgen_restore_fixups): Modified to allow the fixup chain to be
+ restored to be chosen from any that are saved.
+ (gas_cgen_swap_fixups): Modified to allow the current set of
+ fixups to be swapped with any other set that has been saved.
+ (gas_cgen_initialize_saved_fixups_array): New routine.
+ * cgen.h: Modifed prototypes for gas_cgen_save_fixups,
+ gas_cgen_restore_fixups, and gas_cgen_swap_fixups. Added definitions
+ or MAX_SAVED_FIXUP_CHAINS.
+ * config/tc-m32r.c (assemble_two_insns): Changed calls to fixup
+ store, swap and restore fuctions to reflect the new interface.
+
+2001-07-06 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * config/tc-m68k.c (md_estimate_size_before_relax): Catch and
+ ignore empty, ineffectual alignment frags when deciding if a
+ branch can be short.
+
+2001-07-05 Steve Ellcey <sje@cup.hp.com>
+
+ * config/tc-ia64.c (special_section): Add SPECIAL_SECTION_INIT_ARRAY
+ and SPECIAL_SECTION_FINI_ARRAY.
+ (special_section_name): Add .init_array and .fini_array.
+ (md_pseudo_table): Add init_array and fini_array.
+ (md): Add pointer_size and pointer_size_shift fields.
+ (setup_unwind_header): New static function.
+ (output_unw_records): Modify to use setup_unwind_header.
+ (generate_unwind_image, dot_endp): Modify to use md.pointer_size and
+ md.pointer_size_shift.
+ (md_begin): Initialize md.pointer_size and md.pointer_size_shift.
+
+2001-07-05 Ben Elliston <bje@redhat.com>
+
+ * README (Supported platforms): m88k no longer suffers bitrot.
+
+ * config/tc-m88k.c (md_pseudo_table): Remove redundant "global".
+
+2001-07-05 Alan Modra <amodra@bigpond.net.au>
+
+ * struc-symbol.h (struct local_symbol): Rename lsy_offset to
+ lsy_value. Correct typos in comments.
+ * symbols.c (local_symbol_make): Update for name change.
+ (local_symbol_convert): Likewise.
+ (colon): Likewise.
+ (S_GET_VALUE): Likewise.
+ (S_SET_VALUE): Likewise.
+ (print_symbol_value_1): Likewise.
+ (resolve_symbol_value): Likewise. Don't divide local sym values
+ by OCTETS_PER_BYTE twice.
+
+2001-07-04 Jim Wilson <wilson@redhat.com>
+
+ * config/tc-ia64.c (md_pseudo_table): Add 2byte, 4byte, and 8byte.
+
+ * config/tc-ia64.c (is_conditional_branch): Rewrite to exclude mod
+ sched branches.
+
+2001-07-05 Ben Elliston <bje@redhat.com>
+
+ * read.c (s_fill): Correct spelling error in comments.
+
+ * doc/c-m88k.texi: New file.
+ * doc/Makefile.am (CPU_DOCS): Add c-m88k.texi.
+ * doc/Makefile.in: Regenerate.
+ * doc/all.texi: Set M880X0.
+ * doc/as.texinfo: Hook in m88k-dependent documentation.
+
+2001-07-04 Eric Christopher <echristo@redhat.com>
+
+ * doc/c-mips.texi (MIPS Opts): Document 12000 as valid cpu.
+
+ * config/tc-mips.c (mips_cpu_info_table): Add rm5200, rm5231, rm5261,
+ and rm5721 as valid cpu strings.
+ (md_show_usage): Add rm5200, rm5231, rm5261, rm5721.
+
+2001-07-04 Richard Sandiford <rsandifo@redhat.com>
+
+ * config/tc-mips.c (md_apply_fix): Prevent addend from becoming zero
+ if it's expected to be non-zero.
+
+2001-07-03 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * config/tc-sh.c (sh_frob_section): Replace symbol_get_frag() with
+ fscan->fx_frag.
+
+ * write.c (TC_FINALIZE_SYMS_BEFORE_SIZE_SEG): Default to 1.
+ (write_object_file): Set finalize_syms to
+ TC_FINALIZE_SYMS_BEFORE_SIZE_SEG just before size_segs is
+ called.
+
+ * doc/internals.texi: Document
+ TC_FINALIZE_SYMS_BEFORE_SIZE_SEG.
+
+2001-07-02 Alan Modra <amodra@bigpond.net.au>
+
+ * config/tc-ppc.c: Formatting fixes.
+
+2001-07-01 Ben Elliston <bje@redhat.com>
+
+ * config/tc-m88k.c: Back out warning fixes from 2001-06-24, as
+ they cause some subtle breakage. Will fix them again later.
+
+2001-06-28 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * config/obj-coff.c (obj_coff_ln): Treat a .ln directive
+ outside of a function as a .appline directive.
+
+2001-06-28 Eric Christopher <echristo@redhat.com>
+ H.J. Lu <hjl@gnu.org>
+
+ * config/tc-mips.c (mips_arch): New. Use mips_arch instead
+ of mips_cpu for the ISA selection.
+ (md_longopts): Add OPTION_MARCH and OPTION_MTUNE.
+ (md_parse_option): Handle OPTION_MARCH and OPTION_MTUNE.
+ (mips_tune): New. Use mips_tune for scheduling and optimization
+ issues.
+ (append_insn): Use mips_tune and mips_arch.
+ (macro_build): Ditto.
+ (mips_ip): Ditto.
+ (md_begin): Handle mips_arch, mips_tune and mips_cpu. For
+ backwards compatability mips_cpu generates arch and tune.
+ (md_show_usage): Document new behavior.
+
+ * doc/c-mips.texi (MIPS Opts): Document -march and -mtune.
+ Deprecate -mcpu.
+
+ * NEWS: Update.
+
+2001-06-27 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * write.c (write_object_file): Do not set finalize_syms until
+ after the segments have been sized. Some backends may still
+ need to access the syms's frags in order to adjust relaxed
+ frags.
+
+ * config/tc-arm.c (do_ldst): Use MVN to build simple inverted
+ constants.
+
+2001-06-27 Alan Modra <amodra@bigpond.net.au>
+
+ * write.c (fixup_segment <Difference of 2 syms same seg>): Don't
+ subtract MD_PCREL_FROM_SECTION for 68k.
+ (fixup_segment <Difference of 2 syms different seg>): Only fudge
+ by adding MD_PCREL_FROM_SECTION for 68k or if not already pcrel.
+
+2001-06-27 Tracy A. Kuhrt <Tracy.Kuhrt@microchip.com>
+
+ * write.c (fixup_segment <Difference of 2 syms same seg>): If
+ pcrel, subtract MD_PCREL_FROM_SECTION value.
+
+2001-06-24 Ben Elliston <bje@redhat.com>
+
+ * stabs.c (generate_asm_file): Make local variable `len' a size_t.
+
+2001-06-24 Jakub Jelinek <jakub@redhat.com>
+
+ * config/tc-alpha.c (tc_gen_reloc): Handle relocs against SEC_MERGE
+ section symbols the same way as externs.
+
+2001-06-24 Ben Elliston <bje@redhat.com>
+
+ * config/tc-m88k.c (md_number_to_imm): Remove; unused since 1993.
+ (emit_relocations): Ditto.
+ (s_bss): Ditto.
+ (md_begin): Reformat comments to conform to the GNU standards.
+ (md_assemble): Ditto.
+
+ * config/tc-m88k.c (get_reg): Adjust type of `reg_prefix' to char.
+ (md_parse_option): Mark parameters as unused.
+ (md_show_usage): Ditto.
+ (calcop): Adjust type of `reg_prefix' to char.
+ (get_reg): Ditto.
+ (getval): Adjust type of local `c' to char.
+ (md_create_short_jump): Mark from_addr, to_addr params as unused.
+ (md_create_long_jump): Ditto.
+ (md_estimate_size_before_relax): Mark parameters as unused.
+
+ * config/tc-m88k.c (md_pseudo_table): Properly terminate the table
+ to allay a possible compiler warning.
+
+2001-06-22 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * doc/internals.texi (CPU backend): Document md_atof.
+
+2001-06-22 Matthew Wilcox <willy@ldl.fc.hp.com>
+
+ * config/tc-hppa.c (pre_defined_registers): Add %mrp (millicode
+ return pointer) alias for %r2 or %r31, depending on 32 or 64 bit
+ architecture.
+
+2001-06-21 Philip Blundell <philb@gnu.org>
+
+ * config/tc-arm.c (cplong_flag): Rename to long_flag. All uses
+ updated.
+ (insns): Remove entry for adrl. Add long_flag for adr.
+ (do_adr): Handle `l' suffix.
+ (do_adrl): Delete.
+
+2001-06-21 Alan Modra <amodra@bigpond.net.au>
+
+ * config/tc-hppa.c (CHECK_FIELD_WHERE): Define.
+ (md_apply_fix): Use it here. Replace printf with equivalent
+ as_bad_where.
+ (tc_gen_reloc): Use as_bad_where instead of as_bad.
+ (md_apply_fix): Here too.
+ * config/tc-i386.c (tc_gen_reloc): Use as_bad_where instead of as_bad.
+ * config/tc-m68k.c (tc_gen_reloc): Likewise.
+ (md_convert_frag_1): Likewise.
+
+2000-06-20 Tom Rix <trix@redhat.com>
+
+ * config/tc-ppc.c (ppc_comm): Change default alignment to 4 bytes.
+
+2001-06-18 H.J. Lu <hjl@gnu.org>
+
+ * doc/Makefile.am (info): Depend on $(MANS).
+ (as.1): Remove the prefix `$(srcdir)/'.
+ * doc/Makefile.in: Regenerated.
+
+ * as.1: Removed.
+
+2001-06-18 Philip Blundell <philb@gnu.org>
+
+ * config/tc-arm.c (do_msr): Remove restriction on usage of
+ immediate operands.
+
+2001-06-19 Alan Modra <amodra@bigpond.net.au>
+
+ * dwarf2dbg.c (dwarf2_finish): Output file info even when no
+ line info.
+
+2001-06-13 Philip Blundell <philb@gnu.org>
+
+ * config/tc-arm.c (thumb_shift): Improve wording of error message.
+ (do_t_arit): Likewise.
+
+2001-06-13 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * config/tc-sh.c (md_pseudo_table): Only intercept the .file and
+ .loc pseudos if the dfwarf2 functions are available.
+ (md_assemble): Only call dwarf2_emit_insn if it is available.
+
+ * expr.c: Fix typo in comment.
+
+2001-06-12 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * doc/as.texinfo (Infix Ops): Document that comparison and
+ combiner operators can be used as infix operators.
+
+2001-06-12 Peter Jakubek <pjak@snafu.de>
+
+ * config/tc-m68k.c (parse_mri_control_operand): Fix handling
+ of AND/OR.
+ (swap_mri_condition): Add HS (alias fo CC) and LO (alias for CS).
+ (reverse_mri_condition): Likewise.
+ (swap_mri_condition): Issue warning for conditions that can not be
+ swapped.
+ (build_mri_control_operand): Fix order of operands (swapped).
+ (build_mri_control_operand): Allow upper case extension in structured
+ control directives.
+ (s_mri_else): Likewise.
+ (s_mri_next): Likewise.
+ (s_mri_for): Likewise.
+ (s_mri_if): Fix handling comment ('*') in mri mode.
+ (s_mri_while): Likewise.
+ * macro.c (macro_expand): Allow macro invocation with empty
+ extension.
+
+2001-06-12 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * config/tc-arm.c: Fix test for overlow of literal pool.
+
+2001-06-11 H.J. Lu <hjl@gnu.org>
+
+ * NEWS: Updated for the new -n option for the MIPS assembler.
+
+ * config/tc-mips.c (md_show_usage): Add -n.
+
+ * doc/as.texinfo: Document the new -n option.
+ * doc/c-mips.texi: Likewise.
+ * doc/as.1: Regenerated.
+
+2001-06-10 Alan Modra <amodra@bigpond.net.au>
+
+ * config/obj-coff.c (obj_coff_section): Formatting fix.
+
+ * config/tc-i386.c (md_assemble): Accept branch hints as ",pt" and
+ ",pn".
+
+2001-06-08 H.J. Lu <hjl@gnu.org>
+
+ * config/tc-mips.c (warn_nops): New variable. Set to 0 to
+ disable warning about all NOPS that the assembler generates.
+ (macro): Warn NOPS generated only if warn_nops is not 0.
+ (md_shortopts): Add `n'.
+ (md_parse_option): Set warn_nops to 1 for `n'.
+
+2001-06-08 H.J. Lu <hjl@gnu.org>
+
+ * config/tc-mips.c (mips_ip): Properly handle illegal operands.
+
+2001-06-08 H.J. Lu <hjl@gnu.org>
+
+ * config/tc-mips.c (md_apply_fix): Don't adjust common
+ extern/weak symbols for ELF.
+ (md_estimate_size_before_relax): Treat weak like extern for
+ ELF.
+ (mips_fix_adjustable): Don't adjust extern/weak symbols for
+ ELF.
+
+2001-06-08 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am: 'som' is not wrongly spelled 'some'.
+ * Makefile.in: Regenerate.
+
+ * config/tc-mips.c (mips16_mark_labels): Reduce number of calls to
+ S_GET_VALUE by using a temp.
+ (append_insn): Likewise, and for S_SET_VALUE too.
+ (mips_emit_delays): Likewise.
+ (my_getExpression): Likewise.
+ (md_apply_fix): Likewise. Use "valueT" rather than "long" for "value".
+ (mips16_extended_frag): Remove code concerned with avoiding
+ locking in a frag address now that symbols are not finalized until
+ relaxation is complete. Cater for first relaxation pass having
+ bogus addresses. Use relax_marker to reliably determine whether a
+ symbol frag has been reached on the current pass.
+
+2001-06-07 H.J. Lu <hjl@gnu.org>
+
+ * configure.in: Move "mips-*-linux-gnu*" before "mips-*-gnu*".
+ * configure: Regenerate.
+
+2001-06-07 H.J. Lu <hjl@gnu.org>
+
+ * configure.in: Use MIPS_STABS_ELF for Linux/mips and remove
+ ecoff emulation.
+ * configure: Regenerate.
+
+2001-06-07 H.J. Lu <hjl@gnu.org>
+
+ * config/tc-mips.c (mips_pseudo_table): Add "extern" if
+ MIPS_STABS_ELF is defined.
+
+2001-06-06 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * as.c (show_usage): Remove L from listing options. It is not a
+ generic option.
+
+2001-06-06 Christian Groessler <cpg@aladdin.de>
+
+ * config/tc-z8k.c: Removed many warnings by removing unused
+ variables and tagging unused parameters as such.
+ (md_begin): Fixed a typo (","instead of ";").
+ (struct ctrl_table): Add parentheses to initialize array
+ correctly.
+ (struct flag_table): Likewise.
+ (struct intr_table): Likewise.
+ (struct table): Likewise.
+ (check_operand): "#if 0"'ed since it doesn't seem to be used.
+
+2001-06-06 Peter Jakubek <pjak@snafu.de>
+
+ * config/tc-m68k.c (md_show_usage): Add all supported ColdFire
+ options to list (e.g. m5206e, m5307, m5407).
+
+2001-06-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * config/tc-s390.h (TC_FORCE_RELOCATION): Always emit relocations
+ BFD_RELOC_VTABLE_INHERIT and BFD_RELOC_VTABLE_ENTRY.
+
+2001-06-06 Alan Modra <amodra@bigpond.net.au>
+
+ * config/tc-i386.c (md_assemble): Handle Pentium4 branch hints.
+ <JumpByte, JumpDword insn output>: Remove dead code.
+
+2001-06-06 Tracy Kuhrt <Tracy.Kuhrt@microchip.com>
+
+ * as.c (parse_args): Correct option name "listing-lhs-width2".
+
+2001-06-05 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * symbols.c (S_SET_EXTERNAL): Do not override a section symbol's
+ status.
+
+2001-05-30 Richard Henderson <rth@redhat.com>
+
+ * read.c (emit_leb128_expr): Call md_cons_align.
+
+2001-05-28 Jeff Sturm <jsturm@one-point.com>
+
+ * config/tc-sparc.c (md_apply_fix3): Handle BFD_RELOC_SPARC_UA16,
+ BFD_RELOC_SPARC_UA32 and BFD_RELOC_SPARC_UA64.
+ (tc_gen_reloc): Likewise.
+ (sparc_cons_align): Don't clear sparc_no_align_cons.
+ (cons_fix_new_sparc): Substitute BFD_RELOC_SPARC_UA{16|32|64} for
+ BFD_RELOC_{16|32|64} iff sparc_no_align_cons is set.
+
+2001-05-27 Alan Modra <amodra@one.net.au>
+
+ * write.c (relax_segment <rs_space>): Check the section of a
+ symbol to determine whether it is absolute rather than comparing
+ its frag against zero_address_frag as listings play tricks with
+ frags.
+
+ * config/tc-m68k.c (md_assemble): Ensure variable part of frag is
+ allocated in the same chunk as the fixed part.
+
+2001-05-26 Alan Modra <amodra@one.net.au>
+
+ * write.c (relax_segment <rs_space>): Calculate growth using
+ addresses before stretch. Prevent repeated error messages.
+ From Peter Jakubek <pjak@snafu.de>
+ Use as_bad_where and as_warn_where to pinpoint errors.
+
+2001-05-25 Alan Modra <amodra@one.net.au>
+
+ * symbols.c (resolve_symbol_value): Always set segment, even when
+ not finalizing symbol value.
+
+ * config/obj-ieee.c (write_object_file): Set finalize_syms.
+ * config/obj-coff.c (write_object_file): Likewise.
+ * (size_section): Remove rs_space assert as fr_symbol is no longer
+ removed.
+ (fill_section): Likewise.
+
+ * configure.in: Replace linuxoldld with linux*oldld.
+ * configure: Regenerate.
+
+ From 2.11 branch 2001-03-30 Richard Henderson <rth@redhat.com>
+ * config/tc-i386.c (md_convert_frag): Don't die on local symbols
+ that have been finalized.
+
+ * symbols.c (resolve_symbol_value): Clear sy_resolving before
+ taking exit_dont_set_value.
+
+ * write.c (relax_segment <rs_space>): Don't zap fr_symbol when
+ relaxing.
+
+2000-05-24 Tom Rix <trix@redhat.com>
+
+ * config/obj-coff.c (add_lineno): xcoff allows negative line
+ numbers
+ * config/tc-ppc.c (ppc_stabx): fix generated symbol
+
+2001-05-24 Alan Modra <amodra@one.net.au>
+
+ * write.c (write_object_file): Set finalize_syms = 1 before
+ size_seg is called.
+
+2001-05-23 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * config/tc-mips.c (ISA_HAS_64BIT_REGS): Add ISA_MIPS64 as 64 bit
+ architecture, remove erraneous ISA_MIPS32.
+ (md_show_usage): Add MIPS r12k support.
+ (mips_cpu_info_table): Add MIPS r12k support.
+
+2001-05-22 Alan Modra <amodra@one.net.au>
+
+ * config/tc-arc.c (md_assemble): Use is_end_of_line instead of
+ testing for NULs.
+
+ * symbols.c (resolve_symbol_value): Remove "finalize" param,
+ instead use finalize_syms directly. Don't treat expressions
+ specially with regard to finalize_syms. Update calls to self.
+ (resolve_local_symbol): Update call to resolve_symbol_value.
+ (S_GET_VALUE): Likewise. Return resolve_symbol_value if
+ !finalize_syms.
+ * symbols.h (resolve_symbol_value): Update prototype.
+ * config/obj-aout.c (obj_crawl_symbol_chain): Update call
+ to resolve_symbol_value.
+ * config/obj-bout.c (obj_crawl_symbol_chain): Likewise.
+ * config/obj-coff.c (do_relocs_for): Likewise.
+ (yank_symbols): Likewise.
+ (fixup_segment): Likewise.
+ * config/obj-vms.c (obj_crawl_symbol_chain): Likewise.
+ * config/tc-mips.c (md_convert_frag): Likewise.
+ * config/tc-ppc.c (ppc_frob_symbol): Likewise.
+ (ppc_fix_adjustable): Likewise.
+ * dwarf2dbg.c (dwarf2dbg_estimate_size_before_relax): Likewise.
+ (dwarf2dbg_convert_frag): Likewise.
+ * ehopt.c (eh_frame_estimate_size_before_relax): Likewise.
+ (eh_frame_convert_frag): Likewise.
+ * expr.c (make_expr_symbol): Likewise.
+ * write.c (adjust_reloc_syms): Likewise.
+ (write_object_file): Likewise.
+ (relax_segment): Likewise.
+ (fixup_segment): Likewise.
+ (finalize_syms): Init to zero, and update comment.
+ (write_object_file): Set finalize_syms to 1 rather than 2.
+ * doc/internals.texi (sy_value): Mention finalize_syms.
+ (S_GET_VALUE): Remove restriction on when S_GET_VALUE can be called.
+
+ * config/tc-m68k.c (relaxable_symbol): Only treat external symbols
+ as relaxable if embedded system, make weak syms non-relaxable.
+ Move definition..
+ (tc_m68k_fix_adjustable): ..so it can be used here.
+ (md_apply_fix_2): Sign extend without conditional.
+
+ * config/tc-v850.c: Update copyright.
+
+2001-05-16 Jeff Johnston <jjohnstn@redhat.com>
+
+ * cgen.c (gas_cgen_tc_gen_reloc): Changed error message when
+ howto entry is not found.
+
+2001-05-15 Alexandre Oliva <aoliva@redhat.com>
+
+ * config/tc-mn10300.c (mn10300_force_relocation): Don't
+ optimize differences between symbols in code sections to
+ constants.
+ (mn10300_fix_adjustable): Don't adjust to section+offset
+ relocations pointing at symbols in code sections.
+
+2001-05-16 Alan Modra <amodra@one.net.au>
+
+ * config/tc-arc.c (md_assemble): Correct dwarf2_emit_insn param
+ for 8 byte insns.
+ * config/tc-i386.c (md_assemble): Call dwarf2_emit_insn before
+ opcodes are output rather than after. Delete insn_size.
+ * config/tc-v850.c (md_assemble): Similarly, but delete
+ total_insn_size.
+
+2001-05-14 Richard Henderson <rth@redhat.com>
+
+ * ehopt.c (eh_frame_convert_frag): Fix missed subtype adjustment
+ last change.
+
+2001-05-14 Richard Henderson <rth@redhat.com>
+
+ * ehopt.c (get_cie_info): Rename from eh_frame_code_alignment;
+ also collect whether to expect an FDE augmentation.
+ (check_eh_frame): Rewrite as a state machine. Track where in
+ an FDE we are located, skip any augmentation.
+ (eh_frame_estimate_size_before_relax): Get code alignment from
+ the fragment subtype.
+ (eh_frame_relax_frag, eh_frame_convert_frag): Likewise.
+ * read.c (emit_leb128_expr): Call check_eh_frame.
+
+2001-05-14 Alexandre Oliva <aoliva@redhat.com>
+
+ * config/tc-mn10300.c (md_assemble): Anchor dwarf2 line info
+ before a relaxable insns.
+
+2001-05-13 Alexandre Oliva <aoliva@redhat.com>
+
+ * config/tc-mn10300.c (tc_gen_reloc): Don't reject differences
+ between symbols if the base symbol is in the current section;
+ emit a PC-relative relocation instead.
+
+2001-05-12 Peter Targett <peter.targett@arccores.com>
+
+ * config/tc-arc.c: Update copyright and tidy source comments.
+ (md_pseudo_table): Add directive .cpu back as an alias for
+ .option. Add .file and .line for dwarf2 support.
+ (arc_mach_type): Make bfd_mach_arc_6 default.
+ (md_longopts): Add entry 'pre-v6' representing old command line
+ option when assembling for 'arc5' core versions.
+ (md_parse_option): Make OPTION_ARC same as OPTION_ARC6, for new
+ default behaviour.
+ (arc_code_symbol): Make symbol value for @h30 fixup expression
+ equal to O_constant.
+ (md_assemble): Call dwarf2_emit_insn.
+ Include "dwarf2dbg2.h". Formatting fixes throughout file.
+ * config/tc-arc.h (DWARF2_LINE_MIN_INSN_LENGTH): Define.
+ * doc/c-arc.texi (ARC_CORE_DEFAULT): Update to new default.
+
+2001-05-11 Jakub Jelinek <jakub@redhat.com>
+
+ * config/tc-ia64.c (special_linkonce_name): New.
+ (make_unw_section): Map .gnu.linkonce.t.FOO text section into
+ .gnu.linkonce.ia64unw{,i}.FOO.
+ (ia64_elf_section_type): Handle .gnu.linkonce.ia64unw{,i}.FOO.
+ (dot_endp): Add comment about it.
+
+2001-05-11 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * config/tc-arm.c (arm_handle_align): When truncating an aligned
+ block, ensure that the low order bits of the alignment are
+ preserved.
+
+2001-05-10 Alan Modra <amodra@one.net.au>
+
+ * config/obj-vms.c (obj_crawl_symbol_chain): Don't take address of
+ symbol_next.
+
+ * config/tc-fr30.c (md_estimate_size_before_relax): Return size of
+ current variable part of frag.
+ * config/tc-m32r.c (md_estimate_size_before_relax): Likewise.
+ * config/tc-openrisc.c (md_estimate_size_before_relax): Likewise.
+ * config/tc-m68hc11.c (RELAX_STATE): Define.
+ (RELAX_LENGTH): Define.
+ (md_estimate_size_before_relax): Handle non-relaxable cases
+ separately from relaxable cases for clarity, and return correct
+ size for multi-pass relaxation.
+ * config/tc-tahoe.c (RELAX_LENGTH): Correct.
+ (md_estimate_size_before_relax): As for tc-m68hc11.c.
+ (md_convert_frag): Remove "length_code".
+ * config/tc-vax.c (RELAX_STATE): Define.
+ (RELAX_LENGTH): Define.
+ (md_relax_table): Add missing entry.
+ (md_estimate_size_before_relax): As for tc-m68hc11.c.
+ (md_convert_frag): Remove "length_code".
+ * config/tc-ns32k.c (md_estimate_size_before_relax): Simplify and
+ don't bother setting fr_var. Return correct size for multi-pass
+ relaxation.
+ * config/tc-v850.c (md_estimate_size_before_relax): Rewrite.
+ (md_convert_frag): Don't bother clearing fr_var.
+ (md_pseudo_table): Correct initialization.
+ * config/tc-h8500.c (md_convert_frag): Don't bother clearing fr_var.
+ (md_estimate_size_before_relax): No need to set fr_var.
+ * config/tc-mcore.c (md_convert_frag): Don't bother clearing fr_var.
+ (md_estimate_size_before_relax): No need to set fr_var.
+
+2001-05-09 Richard Henderson <rth@redhat.com>
+
+ * config/tc-ia64.c (generate_unwind_image): Align the fragment
+ beginning a function's unwind info block.
+
+2001-05-09 Alexandre Oliva <aoliva@redhat.com>
+
+ * config/tc-mn10300.c (md_apply_fix3): Accept PC-relative relocs.
+
+2001-05-08 Andreas Schwab <schwab@suse.de>
+
+ * config/tc-m68k.c: Instead of replacing -1 by 64 in assignment to
+ fx_pcrel_adjust explicitly sign extend when reading it.
+
+2001-05-08 Alan Modra <amodra@one.net.au>
+
+ * config/tc-m68k.c (md_estimate_size_before_relax): Set fr_var
+ from md_relax_table, and combine some switch cases.
+
+2001-05-06 Alexandre Oliva <aoliva@redhat.com>
+
+ * config/tc-mn10300.c (md_assemble): Subtract operand->shift
+ from offset in non-pcrel operands too.
+
+2001-05-06 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * config/tc-arm.h (MAX_MEM_FOR_RS_ALIGN_CODE): Define.
+ * config/tc-arm.c (arm_handle_align): Do not insert more than
+ MAX_MEM_FOR_RS_ALIGN_CODE bytes.
+ (arm_frag_align_code): Use MAX_MEM_FOR_RS_ALIGN_CODE.
+
+2001-05-03 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * Makefile.am (TARG_ENV_HFILES): Add te-hppa64.h and te-hppalinux64.h.
+ Run "make dep-am".
+ * Makefile.in: Regenerate.
+ * configure.in: Remove duplicate mips-*-ecoff* entry.
+ * configure: Regenerate.
+
+ * config/obj-ecoff.c (obj_pseudo_table): Fix terminating entry.
+ (n_names): Cast away type mismatch.
+ (ecoff_sec_sym_ok_for_reloc): Add unused attribute.
+ (obj_ecoff_frob_symbol): Likewise.
+ * ecoff.c: (add_file): Add unused attribute.
+ (ecoff_directive_begin): Likewise.
+ (ecoff_directive_bend): Likewise.
+ (ecoff_directive_def): Likewise.
+ (ecoff_directive_dim): Likewise.
+ (ecoff_directive_scl): Likewise.
+ (ecoff_directive_size): Likewise.
+ (ecoff_directive_type): Likewise.
+ (ecoff_directive_tag): Likewise.
+ (ecoff_directive_val): Likewise.
+ (ecoff_directive_endef): Likewise.
+ (ecoff_directive_end): Likewise.
+ (ecoff_directive_ent): Likewise.
+ (ecoff_directive_extern): Likewise.
+ (ecoff_directive_file): Likewise.
+ (ecoff_directive_fmask): Likewise.
+ (ecoff_directive_frame): Likewise.
+ (ecoff_directive_mask): Likewise.
+ (ecoff_directive_loc): Likewise.
+ (mark_stabs): Likewise.
+ (ecoff_stab): Likewise.
+ (ecoff_frob_symbol): Cast away type mismatch.
+ (ecoff_padding_adjust): Likewise.
+ (ecoff_build_symbols): Likewise.
+ (ecoff_build_procs): Likewise.
+ (ecoff_build_aux): Likewise.
+ (ecoff_build_strings): Likewise.
+ (ecoff_build_fdr): Likewise.
+ (ecoff_build_debug): Likewise.
+ * itbl-ops.c (itbl_assemble): Variable initialization.
+
+2001-05-03 Alan Modra <amodra@one.net.au>
+
+ * config/tc-i386.c (i386_displacement): Call as_bad for bad GOTOFF
+ expressions rather than triggering an assert.
+
+2001-05-02 Johan Rydberg <jrydberg@opencores.org>
+
+ * config/tc-openrisc.c: New file.
+ * config/tc-openrisc.h: Likewise.
+
+ * Makefile.am: Add OpenRISC target.
+ * Makefile.in: Regenerated.
+
+ * configure.in (openrisc-*-*): Add target.
+ * configure: Regenerated.
+
+2001-05-02 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * config/tc-arm.c (arm_frag_align_code): Change error message to
+ more explanatory version.
+
+2001-04-29 Keith M Wesolowski <wesolows@foobazco.org>
+
+ * config/tc-mips.c (md_parse_option): Also accept
+ elf64-tradbigmips and elf64-tradlittlemips for OPTION_64.
+
+2001-04-27 David Mosberger <davidm@hpl.hp.com>
+
+ * config/tc-ia64.c (dot_spillmem_p): Fix output_spill_?sprel_p()
+ argument passing order: predicate goes last, not first.
+
+2001-04-27 Sean McNeil <sean@mcneil.com>
+
+ * configure.in: Add arm-vxworks.
+ * configure: Regenerate.
+
+2001-04-26 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * config/tc-arm.c (arm_handle_align): New Function: Generate
+ no-op filled alignment frags.
+ (arm_frag_align_code): New Function: Create a code alignment frag.
+ (arm_init_frag): New Function: Initialse the target dependent
+ parts of a frag.
+
+ * config/tc-arm.h (TC_FRAG_TYPE): Define.
+ (TC_FRAG_INIT): Define.
+ (HANDLE_ALIGN): Define.
+ (md_do_align): Define.
+
+2001-04-25 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * config/obj-coff.c (do_linenos_for): Check to see if the filename
+ symbol has been initialised before extracting its symbol index.
+
+2001-04-24 H.J. Lu <hjl@gnu.org>
+
+ * configure: Regenerated with the right version of autoconf.
+
+2001-04-24 Christian Groessler <cpg@aladdin.de>
+
+ * config/tc-z8k.c (build_bytes): 12 and 16 bit displacements now
+ generate R_CALLR and R_REL16 relocations
+
+2000-04-20 Jason Eckhardt <jle@redhat.com>
+
+ * config/tc-d10v.h (tc_frob_label): Update the symbol's frag
+ since frag_now can change after d10v_cleanup is called.
+
+2001-04-16 David O'Brien <obrien@FreeBSD.org>
+
+ * configure.in: Add the em type for FreeBSD targets.
+ * configure: Regenerate.
+
+2001-04-14 Alexandre Oliva <aoliva@redhat.com>
+
+ * struc-symbol.h (struct local_symbol): New TC_LOCAL_SYMFIELD_TYPE.
+ * symbols.c (local_symbol_convert): Call TC_LOCAL_SYMFIELD_CONVERT.
+
+ * config/tc-mn10300.c (md_assemble): Simplify offset adjustment of
+ pc-relative relocations not placed at the end of the instruction.
+
+2001-04-13 Jim Wilson <wilson@redhat.com>
+
+ * tc-ia64.c (is_conditional_branch): Return true for br, brl, and br.
+ excluding br.i.
+
+2001-04-13 Jakub Jelinek <jakub@redhat.com>
+
+ * config/obj-elf.c (obj_elf_change_section): Add entsize argument,
+ handle SHF_MERGE and SHF_STRINGS.
+ (obj_elf_parse_section_letters): Set SHF_MERGE and SHF_STRINGS.
+ (obj_elf_section): Allow additional argument specifying entity size.
+ * write.c (adjust_reloc_syms): Keep relocations against local symbols
+ in SEC_MERGE sections.
+
+2001-04-12 Jason Merrill <jason_merrill@redhat.com>
+
+ * dwarf2dbg.c (process_entries): Don't optimize redundant line notes.
+
+2001-04-12 Alexandre Oliva <aoliva@redhat.com>
+
+ * expr.c (operand): Pass &c to md_parse_name().
+ * config/tc-ia64.h, config/tc-ppc.h, config/tc-tic54x.h: Adjust.
+
+2001-04-07 Steven J. Hill <sjhill@cotw.com>
+
+ * config/tc-mips.c: Support ELF64 for traditional MIPS targets.
+
+ * Makefile.am: (TARG_ENV_HFILES): Add tc-mips.h.
+ * Makefile.in: Regenerated.
+
+ * configure.in: Use traditional MIPS targets for Linux/MIPS.
+ * configure: Regenerated.
+
+2001-04-06 Alexandre Oliva <aoliva@redhat.com>
+
+ * config/tc-mn10300.c (xr_registers): Added `pc'.
+
+2001-04-05 Alan Modra <alan@linuxcare.com.au>
+
+ * configure.in: Add h8500-*-coff and h8500-*-rtems targets.
+ * configure: Regenerate.
+
+ * config/tc-h8500.c (md_estimate_size_before_relax): Add missing
+ cases, and always return size based on current fr_subtype.
+ (md_begin): Move initialization of md_relax_table..
+ (md_relax_table): ..to static initializer. Set rlx_length for
+ UNDEF_WORD_DISP cases.
+ * config/tc-w65.c (md_estimate_size_before_relax): Likewise.
+ (md_begin): Likewise.
+ (md_relax_table): Likewise.
+ * config/tc-mcore.c (md_estimate_size_before_relax): Likewise.
+ (md_relax_table): Set rlx_length for UNDEF_WORD_DISP cases.
+ Set rlx_backward and rlx_forward to zero for unused states.
+ * config/tc-sh.c (md_estimate_size_before_relax): Likewise.
+ (md_relax_table): Set rlx_length for UNDEF_WORD_DISP cases.
+ (UNCOND12, UNCOND32): Remove duplicate defines.
+
+2001-04-04 Hans-Peter Nilsson <hp@axis.com>
+
+ * config/tc-cris.c (md_estimate_size_before_relax) <case
+ ENCODE_RELAX (STATE_CONDITIONAL_BRANCH, STATE_UNDF)>: Don't emit
+ 32-bit branch, just set fragP->fr_subtype. Set fragP->fr_var.
+ <all cases>: Always set fragP->fr_var using md_cris_relax_table.
+ Add cases to cover all relax states.
+ (cris_insn_first_word_frag): New.
+ (md_assemble): Call cris_insn_first_word_frag to get the first
+ frag in an insn, not frag_more. Don't call dwarf2_emit_insn at
+ end. Drop variable insn_size.
+ (gen_bdap): Call cris_insn_first_word_frag, not frag_more.
+ (cris_sym_leading_underscore): Wrap first as_bad parameter in _().
+ (cris_sym_no_leading_underscore, s_cris_file, s_cris_loc): Ditto.
+
+ * write.c (write_object_file): Reset broken word state before
+ calling relax_seg.
+
+2001-03-31 Alan Modra <alan@linuxcare.com.au>
+
+ * listing.c (listing_listing): Enable listing on EDICT_NOLIST_NEXT
+ for one line if not already enabled.
+ * cond.c (s_elseif): Correct conditional assembly listing.
+ (s_else): Likewise.
+
+ * cond.c (s_endif): Correct handling of "if .. elseif .." trees.
+ Don't abort on NULL current_cframe.
+
+2001-03-30 Alan Modra <alan@linuxcare.com.au>
+
+ * dwarf2dbg.c (dwarf2_directive_file): Fix warnings.
+ (dwarf2dbg_convert_frag): Pass `finalize_syms' to resolve_symbol_value.
+ * config/obj-aout.c (obj_crawl_symbol_chain): Likewise.
+ * config/obj-bout.c (obj_crawl_symbol_chain): Likewise.
+ * config/obj-coff.c (do_relocs_for): Likewise.
+ (yank_symbols): Likewise.
+ (fixup_segment): Likewise.
+ * config/tc-ppc.c (ppc_frob_symbol): Likewise.
+ (ppc_fix_adjustable): Likewise.
+ * config/tc-mips.c (md_convert_frag): Likewise.
+ * config/obj-vms.c (obj_crawl_symbol_chain): Likewise.
+ * ehopt.c (eh_frame_convert_frag): Likewise.
+ * expr.c (make_expr_symbol): Likewise.
+
+ * frags.h (struct frag): Add last_fr_address. Reorder fields for
+ better packing.
+ * symbols.c (resolve_symbol_value): Don't fix expression values
+ until relaxation is complete.
+ (resolve_local_symbol): Pass `finalize_syms' to resolve_symbol_value.
+ (S_GET_VALUE): Likewise, and return unresolved expression value.
+ * write.c (finalize_syms): New.
+ (relax_and_size_seg): Split into..
+ (relax_seg): New function, returns 1 if anything changed..
+ (size_seg): And the remainder of relax_and_size_seg.
+ (fixup_segment): Arrange for final resolution of sym values.
+ (adjust_reloc_syms): Likewise.
+ (write_object_file): Likewise, and repeatedly call relax_seg until
+ nothing more changes.
+ (relax_segment): Return 1 if anything changed. Use correct types
+ for rs_org `target' and `after'.
+ * write.h (finalize_syms): Declare.
+ (relax_segment): Update prototype.
+
+ * config/tc-sh.c (md_estimate_size_before_relax): Add extra
+ do-nothing cases to switch to avoid abort on a second relaxation
+ pass, and tidy code a little.
+ * config/tc-cris.c (md_estimate_size_before_relax): Likewise.
+ * config/tc-h8500.c (md_estimate_size_before_relax): Likewise.
+ * config/tc-w65.c (md_estimate_size_before_relax): Likewise.
+ * config/tc-i386.c (UNCOND_JUMP, COND_JUMP, COND_JUMP86): Decrement.
+ (md_relax_table): Remove first four unused entries. Increment
+ rlx_length by one throughout table, and update comments to suit.
+ (md_estimate_size_before_relax): Return size of current variable
+ part of frag to reflect reality when relaxing more than once.
+ * config/tc-mcore.c (COND12, UNCD12): Rename to DISP12 throughout.
+ (COND32, UNCD32): Rename to DISP32 throughout.
+ (UNDEF_WORD_DISP): Renumber to 3.
+ (md_estimate_size_before_relax): Add extra do-nothing cases.
+ * config/tc-mn10200.c (md_estimate_size_before_relax): Rewrite.
+ * config/tc-mn10300.c (md_estimate_size_before_relax): Rewrite.
+ * config/tc-ns32k.c (md_estimate_size_before_relax): Add cases to
+ handle word and dword branches.
+
+2001-03-29 Hans-Peter Nilsson <hp@axis.com>
+
+ * config/tc-cris.h (tc_fix_adjustable): Allow only
+ BFD_RELOC_CRIS_32_GOTREL of the PIC relocs.
+ * config/tc-cris.c (cris_get_pic_suffix): Correct reloc type in
+ example in comment to valid type.
+
+2001-03-28 H.J. Lu <hjl@gnu.org>
+
+ * read.c (equals): Set to local for COFF only if it hasn't been
+ defined before.
+
+2001-03-28 Alan Modra <alan@linuxcare.com.au>
+
+ * config/tc-hppa.c (DEFAULT_LEVEL): Define.
+ (md_begin): Use it when setting default architecture.
+
+2001-03-27 Nick Papadonis <nick@coelacanth.com>
+
+ * read.c (equals): (for COFF) default symbols to being local.
+
+2001-03-27 Hans-Peter Nilsson <hp@axis.com>
+
+ * configure.in (cris-*-*): Change default emulation to criself.
+ (cris-*-*aout*): New rule.
+ * configure: Regenerate.
+
+2001-03-26 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * config/tc-s390.c (tc_s390_fix_adjustable): Add test for
+ BFD_RELOC_390_GOTENT.
+ * config/tc-s390.h (TC_RELOC_RTSYM_LOC_FIXUP): Add test for
+ BFD_RELOC_390_GOTENT.
+
+2001-03-26 Nick Clifton <nickc@redhat.com>
+
+ * config/tc-s390.h (TC_FORCE_RELOCATION): Define.
+ * config/tc-s390.c (s390_force_relocation): New function: Force
+ relocations for VTINHERIT relocs.
+
+2001-03-23 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * doc/as.texinfo: Put @c man begin to generate the as man page.
+ When generating man, define all the variables. Re-organize some
+ options to obtain better indentation of man page.
+ * doc/Makefile.am (MANCONF, TEXI2POD, POD2MAN): New variable.
+ (as.1): Build from as.texinfo.
+ * doc/Makefile.in: Regenerate.Index: binutils/Makefile.am
+
+2001-03-25 Alan Modra <alan@linuxcare.com.au>
+
+ * config/tc-i386.c (i386_scale): Accept an absolute expression for
+ scale factor, and return the end of the expression.
+ (i386_operand): Modify for above.
+
+2001-03-23 Nick Clifton <nickc@redhat.com>
+
+ * doc/as.texinfo: Document --listing-XXX command line switches.
+ Explain why listings behave differently when -pipe is used.
+
+2001-03-23 Richard Sandiford <rsandifo@redhat.com>
+
+ * write.c (fix_new_exp): Print an error if passed a register.
+
+2001-03-23 Hans-Peter Nilsson <hp@axis.com>
+
+ * config/tc-cris.c: Tweak attribution. Fix typos. PIC support.
+ (PIC_SUFFIX_CHAR): New macro.
+ (cris_get_pic_suffix, cris_get_pic_reloc_size): New functions.
+ (pic): New variable.
+ (md_longopts): New option --pic.
+ (OPTION_PIC): Define.
+ (md_estimate_size_before_relax): Tweak longish comment.
+ (md_create_long_jump): Make the long jumps generate ADD.D offset,PC.
+ (md_assemble): Handle a PIC relocation on prefix and normal
+ instruction operands.
+ <output_instruction.insn_type == CRIS_INSN_BRANCH>: Handle
+ "complex" operand expressions. Call frag_more outside
+ gen_cond_branch_32 parameter list.
+ (cris_process_instruction): Handle PIC relocs on parsed
+ operand expressions. Validize PIC reloc sizes.
+ (get_autoinc_prefix_or_indir_op): Handle PIC suffix.
+ (gen_bdap): Handle "complex" operand expressions.
+ (gen_cond_branch_32): Use as_warn_where, not as_warn. Use
+ ADD.D offset,PC as jump instruction if generating PIC. Generate
+ error instead of crashing on complex expressions.
+ (cris_number_to_imm): Add segT parameter. All callers changed.
+ Use segT parameter, not now_seg, for segment of fixup. Handle
+ PCREL relocations but check that they are fully resolved.
+ (md_parse_option): Handle OPTION_PIC.
+ (tc_gen_reloc): Handle PIC relocs.
+ (md_show_usage): Update for --pic.
+ (md_apply_fix3): Renamed from md_apply_fix.
+ (md_pcrel_from): Accept emitting PCREL relocs when ELF.
+ (md_cris_force_relocation): Force relocation for PIC relocs.
+
+ * config/tc-cris.h: Tweak attribution.
+ (MD_APPLY_FIX3): Define.
+ (IS_CRIS_PIC_RELOC): New macro.
+ (TC_RELOC_RTSYM_LOC_FIXUP): Define.
+ (tc_fix_adjustable): Don't adjust a globally visible symbol when
+ generating ELF.
+ (tc_frob_symbol): Avoid emitting undefined symbols.
+
+2001-03-20 Alan Modra <alan@linuxcare.com.au>
+
+ * frags.h (struct frag): Add relax_marker.
+ * write.c (is_dnrange): Delete.
+ (relax_frag): Use correct types for `aim', `target', `address'.
+ Delete `offset', `was_address'. Test `relax_marker' instead of
+ using fragile (and slow) address test.
+ (relax_segment): Init and flip `relax_marker'.
+
+2001-03-19 Alan Modra <alan@linuxcare.com.au>
+
+ * config/tc-i386.c (md_assemble <REGISTER_WARNINGS>): Correct
+ used register name.
+
+2001-03-18 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * config/tc-m68hc11.c (md_pseudo_table): Recognize xrefb to comply
+ with 'Motorola specification for assembly language input standard'.
+
+2001-03-17 Richard Henderson <rth@redhat.com>
+
+ * dwarf2dbg.c (user_filenum, user_filenum_allocated): Remove.
+ (dwarf2_directive_loc): Don't use them.
+ (dwarf2_directive_file): Reject duplicate file definitions.
+ (get_filenum): Zero allocated memory.
+ (out_file_list): Complain about missing file definitions.
+
+2001-03-17 Alan Modra <alan@linuxcare.com.au>
+
+ * read.c (do_org): Handle complex expressions.
+ * cgen.c (gas_cgen_finish_insn): Likewise.
+
+2001-03-15 David Mosberger <davidm@hpl.hp.com>
+
+ * config/tc-ia64.c (md): New member keep_pending_output.
+ (ia64_flush_pending_output): Flush only if md.keep_pending_output
+ is not set.
+ (dot_xdata): Turn on md.keep_pending_output for the duration of
+ this function.
+ (dot_xfloat_cons): Ditto.
+ (dot_xstringer): Ditto.
+ (dot_xdata_ua): Ditto.
+ (dot_xfloat_cons_ua): Ditto.
+
+2001-03-15 Jim Wilson <wilson@redhat.com>
+
+ * config/tc-ia64.c (ia64_unrecognized_line, case '['): Add local
+ label support.
+
+2001-03-15 Alexandre Oliva <aoliva@redhat.com>
+
+ * config/tc-sh.c (parse_reg): Match capital MACH and MACL.
+
+2001-03-15 DJ Delorie <dj@redhat.com>
+
+ * stabs.c (s_stab_generic): Don't corrupt the notes obstack by
+ blindly freeing string if it isn't at the top of the obstack.
+
+2001-03-13 Alan Modra <alan@linuxcare.com.au>
+
+ * config/tc-i386.c (RELOC_ENUM): Define. Use throughout file.
+ (NUM_FLAG_CODE): Define.
+ (lex_got): New function.
+ (got_reloc): New global var.
+ (x86_cons_fix_new): New function.
+ (x86_cons): New function.
+ (i386_immediate): Use lex_got here, replacing inline code. Change
+ "ignoring junk.." error message to "junk.."
+ (i386_displacement): Likewise.
+ * config/tc-i386.h (TC_PARSE_CONS_EXPRESSION): Define.
+ (x86_cons): Declare.
+ (TC_CONS_FIX_NEW): Define.
+ (x86_cons_fix_new): Declare.
+
+2001-03-12 Nick Clifton <nickc@redhat.com>
+
+ * config/tc-arm.c (md_begin): Always set machine type based on
+ cpu_variant.
+
+2001-03-07 Alan Modra <alan@linuxcare.com.au>
+
+ * config/tc-i386.c (struct _i386_insn): Rename disp_reloc to reloc.
+ (md_assemble) <smallest displacement>: Use correct field of i.op[]
+ union.
+ <JumpInterSegment output>: Use correct i.disp_reloc[].
+ <immediate output>: Likewise.
+
+2001-03-06 Nick Clifton <nickc@redhat.com>
+
+ * config/tc-arm.c (md_apply_fix3): Clear bit zero of offset in
+ BLX(1) instruction.
+
+2001-03-06 Igor Shevlyakov <igor@windriver.com>
+
+ * config/tc-m68k.c : Add 5407 to archs[] table.
+ (HAVE_LONG_BRANCH): Add mcf5407.
+ (select_control_regs): Recognize 5407.
+
+2001-03-02 Dave Brolley <brolley@redhat.com>
+
+ * config/tc-m32r.c (expand_debug_syms): Call frag_align_code rather
+ than m32r_do_align.
+
+2001-03-02 Richard Sandiford <rsandifo@redhat.com>
+
+ * config/atof-ieee.c (TC_LARGEST_EXPONENT_IS_NORMAL): New macro.
+ (gen_to_words): Print warnings if NaNs are found and the target CPU
+ does not support them. Allow largest exponent to be used in normal
+ numbers if TC_LARGEST_EXPONENT_IS_NORMAL evaluates to true.
+
+2001-02-28 Andreas Jaeger <aj@suse.de>, Bo Thorsen <bo@suse.de>
+
+ * config/tc-i386.c (tc_gen_reloc): Remove ugly hack which is not needed
+ anymore since we use bfd_elf_generic_reloc now.
+ (md_apply_fix3): Only apply hack for partial_inplace if not using RELA.
+
+2001-02-27 Alan Modra <alan@linuxcare.com.au>
+
+ * configure.in (BFD_VERSION): New.
+ (AM_INIT_AUTOMAKE): Use $BFD_VERSION.
+ * configure: Regenerate.
+ * Makefile.am: Run "make dep-am"
+ * Makefile.in: Regenerate.
+ * doc/Makefile.in: Regenerate.
+
+2001-02-26 Mark Elbrecht <snowball3@bigfoot.com>
+
+ * config/obj-coff.c [BFD_ASSEMBLER] (obj_coff_section): Set
+ SEC_NEVER_LOAD when the 'n' flag is used.
+ Add SEC_NEVER_LOAD to matchflags.
+
+2001-02-24 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * symbols.c (decode_local_label_name): Initialize message_format
+ only when an error is reported (perf pb due to I18N).
+
+2001-02-23 H.J. Lu <hjl@gnu.org>
+
+ * dwarf2dbg.c (dwarf2_directive_file): Call s_app_file (0) if
+ BFD_ASSEMBLER is not defined.
+
+2001-02-23 Richard Sandiford <rsandifo@redhat.com>
+
+ * config/tc-mn10300.c (md_apply_fix3): Don't mark a fixup as
+ done if it's against a symbol.
+
+2001-02-22 Timothy Wall <twall@cygnus.com>
+
+ * config/tc-ia64.c (ia64_target_format): Return ia64-aix-specific
+ target formats if applicable.
+ * config/te-ia64aix.h: New. Configuration for AIX5 on IA-64.
+ * Makefile.am (TARG_ENV_HFILES): Added config/te-ia64aix.h.
+ * Makefile.in: Regenerated.
+ * configure.in: Added configuration for ia64-*-aix*.
+ * configure: Regenerated.
+
+2001-02-21 David Mosberger <davidm@hpl.hp.com>
+
+ * config/tc-ia64.c (enum operand_match_result): New type.
+ (operand_match): Change return type to operand_match_result.
+ Fix all returns appropriately, adding support for returning the
+ out-of-range result.
+ (parse_operands): New locals result, error_pos, out_of_range_pos,
+ curr_out_of_range_pos. Rewrite operand matching loop to give better
+ error messages.
+
+2001-02-21 David Mosberger <davidm@hpl.hp.com>
+
+ * config/tc-ia64.c (struct unwind): Add member "prologue_count".
+ (dot_proc): Clear unwind.prologue_count to zero.
+ (dot_prologue): Increment unwind.prologue_count.
+ (dot_restore): If second operand is omitted, use
+ unwind.prologue_count -1 for "ecount" (# of additional regions to
+ pop). Decrement unwind.prologue_count by number of regions
+ popped.
+
+2001-02-21 Nick Clifton <nickc@redhat.com>
+
+ * doc/as.texinfo (Section): Note that some flags to the COFF
+ version of .section remove attributes rather than setting them.
+
+2001-02-20 Kazu Hirata <kazu@hxi.com>
+
+ * config/tc-pdp11.c: Fix formatting.
+ * config/tc-pdp11.h: Likewise.
+
+2001-02-20 Bo Thorsen <bo@suse.de>
+
+ * config/tc-i386.c (tc_i386_fix_adjustable): Fix GOTPCREL GOT
+ entry.
+
+2001-02-18 David O'Brien <obrien@FreeBSD.org>
+
+ * configure.in (cpu_type, arch): Add a generic FreeBSD specification as
+ all FreeBSD platforms should look the same at this level.
+ * configure: Rebuilt.
+ * config/tc-i386.c: Add support for old FreeBSD a.out hosts.
+
+2001-02-18 lars brinkhoff <lars@nocrew.org>
+
+ * Makefile.am: Add PDP-11 target.
+ * configure.in: Likewise.
+ * config/tc-pdp11.c: New file.
+ * config/tc-pdp11.h: New file.
+ * doc/Makefile.am: Add PDP-11 documentation.
+ * doc/all.texi: Likewise.
+ * doc/as.texinfo: Likewise.
+ * doc/c-pdp11.texi: New file.
+
+2001-02-16 matthew green <mrg@redhat.com>
+
+ * cgen.c (gas_cgen_md_apply_fix3): Support BFD_RELOC_64.
+
+2001-02-13 Jim Wilson <wilson@redhat.com>
+
+ * config/tc-ia64.c (operand_match, case TAG13): Make a BFD_RELOC_UNUSED
+ reloc instead of a 0 reloc.
+ (md_apply_fix3): Check for BFD_RELOC_UNUSED instead of 0, and mark it
+ as done.
+ * config/tc-ia64.h (TC_RELOC_RTSYM_LOC_FIXUP): Likewise.
+
+2001-02-13 Ian Lance Taylor <ian@zembu.com>
+
+ * write.c (is_dnrange): Stop as soon as the address becomes
+ larger.
+ (relax_frag): Add segment parameter. Only call symbol_get_frag
+ once. Only call is_dnrange if the symbol is in the same segment,
+ and the symbol address is larger.
+ (relax_segment): Pass segment to md_relax_frag and relax_frag.
+ * write.h (relax_frag): Update declaration.
+ * config/tc-fr30.c (fr30_relax_frag): Add segment parameter. Pass
+ it to relax_frag.
+ * config/tc-m32r.c (m32r_relax_frag): Likewise.
+ * config/tc-m32r.h (md_relax_frag): Add segment parameter.
+ (m32r_relax_frag): Update declaration.
+ * config/tc-mips.h (md_relax_frag): Add segment parameter.
+ * config/tc-tic54x.h (md_relax_frag): Likewise.
+ * doc/internals.texi (CPU backend): Update documentation for
+ md_relax_frag.
+
+2001-02-13 Alan Modra <alan@linuxcare.com.au>
+
+ * doc/c-i386.texi (i386-Arch): Add "jumps"/"nojumps" blurb.
+ Mention effect of < 386 architectures on jump promotion.
+ (i386-Jumps): xref above. Don't assume long disp is 32 bits.
+
+ * config/tc-i386.c (no_cond_jump_promotion): New.
+ (set_cpu_arch): Parse "jumps" arch modifier.
+ (insn_size): Modify usage comment.
+ (ENCODE_RELAX_STATE): Reformat and protect macro arg.
+ (SIZE_FROM_RELAX_STATE): Rename to DISP_SIZE_FROM_RELAX_STATE.
+ (TYPE_FROM_RELAX_STATE): New define.
+ (UNCOND_JUMP, COND_JUMP): Renumber.
+ (md_relax_table): Reorder to suit.
+ (COND_JUMP86): New define.
+ (md_relax_table): Handle COND_JUMP86 cases. Add a few comments.
+ (md_assemble): Create frag var for jumps of max size, encode relax
+ state for COND_JUMP86.
+ (md_estimate_size_before_relax): Handle COND_JUMP86 cases, and
+ leave conditional jumps small if no_cond_jump_promotion.
+ (md_convert_frag): Likewise.
+
+ * expr.c (operator): Don't bump input_line_pointer for two char
+ operators. Instead return operator size via new param num_chars.
+ (expr): Use above to parse multi-char operators correctly.
+
+2001-02-12 Jan Hubicka <jh@suse.cz>
+
+ * config/tc-i386.c (i386_displacement): Fix handling of
+ BFD_RELOC_X86_64_GOTPCREL.
+ (i386_validate_fix): Likewise.
+
+2001-02-12 Philip Blundell <pb@futuretv.com>
+
+ * config/tc-arm.c (do_ldst): Improve warnings for unpredictable
+ ldrt/strt instructions.
+
+2001-02-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
+
+ * config/tc-mips.c (macro): For M_LA_AB emit a
+ BFD_RELOC_MIPS_CALL16 relocation or a
+ BFD_RELOC_MIPS_CALL_HI16/BFD_RELOC_MIPS_CALL_LO16 pair instead of
+ BFD_RELOC_MIPS_GOT16 and
+ BFD_RELOC_MIPS_GOT_HI16/BFD_RELOC_MIPS_GOT_LO16, respectively for
+ loading the jump register when generating SVR4_PIC code.
+
+2001-02-10 Chris Demetriou <cgd@broadcom.com>
+
+ * configure.in: Make 'mipself' and 'mipsecoff' emulations
+ map to MIPS-specific files, as they used to do before the
+ change on 2000-05-21.
+ * configure: Regerate.
+
+2001-02-10 Chris Demetriou <cgd@broadcom.com>
+
+ * config/tc-mips.c (md_parse_option): Don't try to compile
+ ELF-only option code if not ELF.
+
+2001-02-08 David Mosberger <davidm@hpl.hp.com>
+
+ * config/tc-ia64.h (md_elf_section_type): New macro.
+ (ELF_TC_SPECIAL_SECTIONS): Drop .IA_64.unwind and .IA_64.unwind_info
+ (they're now handled via ia64_elf_section_type.
+
+ * config/tc-ia64.c (unwind): New members saved_text_seg,
+ saved_text_subseg, and force_unwind_entry.
+ (optimize_unw_records): New function to optimize away unnecessary
+ unwind directives.
+ (ia64_elf_section_type): New function.
+ (output_unw_records): Generate unwind info only if the size is
+ non-zero or if it's forced for some other reason (e.g.,
+ handlerdata or a personality routine).
+ (generate_unwind_image): Don't switch back to previous
+ section---stay inside the unwind info section instead so that
+ handlerdata that may follow goes into the right place.
+ (dot_handlerdata): Force generation of unwind entry and save the
+ current active text segment before generating unwind image.
+ (dot_unwentry): Force generation of unwind entry.
+ (dot_personality): Ditto.
+ (dot_endp): Generate unwind table entry only if there is
+ some unwind info or the unwind entry was forced.
+
+ * config/tc-ia64.c (make_unw_section_name): New macro to form
+ unwind section name.
+ (generate_unwind_image): Add "text_name" argument. Use it to
+ form unwind section name.
+ (dot_handlerdata): Determine current segment (section) name and
+ pass it to generate_unwind_image().
+ (dot_endp): Determine current segment (section) name and use
+ it to determine the appropriate unwind section name.
+ (ia64_md_do_align): Add missing ATTRIBUTE_UNUSED declarations to
+ n, fill, and max arguments.
+
+2001-02-09 Schwidefsky <schwidefsky@de.ibm.com>
+
+ * Makefile.am: Add linux target for S/390.
+ * configure.in: Likewise.
+ * config/tc-s390.c: New file.
+ * config/tc-s390.h: New file.
+
+2001-02-09 Alexandre Oliva <aoliva@redhat.com>
+
+ * config/tc-sh.c (md_pseudo_table): Add uaquad. Use s_uacons for
+ 2byte, 4byte and 8byte.
+
+2001-02-08 Alan Modra <alan@linuxcare.com.au>
+
+ * config/tc-hppa.c (pa_build_unwind_subspace): Don't call
+ md_number_to_chars with size > sizeof (valueT).
+
+2001-02-06 H.J. Lu <hjl@gnu.org>
+
+ * config/tc-ia64.h (TC_RELOC_RTSYM_LOC_FIXUP): Do fixup if
+ there is no relocation.
+
+2001-02-06 H.J. Lu <hjl@gnu.org>
+
+ * config/tc-ia64.h (TC_RELOC_RTSYM_LOC_FIXUP): New. Defined.
+
+ * config/tc-ia64.c (md_parse_option): Only accept the valid
+ ia64 options on "-axxx".
+
+2001-02-05 Jim Wilson <wilson@redhat.com>
+
+ * config/tc-ia64.c (errata_nop_necessary_p): Return 0 instead of
+ aborting for invalid operands.
+
+2001-02-06 Alan Modra <alan@linuxcare.com.au>
+
+ * config/tc-hppa.c (fix_new_hppa): Pass in unwind directly rather
+ than via pointer. Update all callers.
+ (UNWIND_LOW32): Define.
+ (UNWIND_HIGH32): Define.
+ (pa_build_unwind_subspace): Use the above macros instead of dumping
+ bitfields directly. Call frag_more once rather than multiple times.
+ (md_assemble): Use UNWIND_LOW32.
+ (pa_entry): Likewise
+ (pa_procend): Likewise.
+ (process_exit): Use UNWIND_HIGH32.
+
+2001-02-04 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * config/tc-m68hc11.h (LISTING_HEADER): Use m68hc11_listing_header
+ function to select the header according to the cpu.
+ (md_after_pass_hook, md_do_align): Remove.
+ (md_cleanup, m68hc11_cleanup): Remove.
+ (md_pcrel_from_section): Declare.
+ * config/tc-m68hc11.c (build_dbranch_insn): Remove insn_size.
+ (build_jump_insn, build_insn): Likewise.
+ (m68hc11_listing_header): New function.
+ (m68hc11_cleanup): Remove.
+
+2001-02-02 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * config/tc-m68hc11.c (relaxable_symbol): Relax externally visible
+ symbols because there is no support for shared libraries and these
+ symbols can't be overridden (unless they are weak).
+
+2001-02-01 Momchil Velikov <velco@fadata.bg>
+
+ * dwarf2dbg.c (out_debug_abbrev): Terminate the abbreviations
+ for the compilation unit with a zero byte.
+
+2001-01-30 Alan Modra <alan@linuxcare.com.au>
+
+ * config/tc-hppa.c (pa_ip): Support 12 bit branches to absolute
+ destinations. Correct range check for 17 and 22 bit branches.
+
+2001-01-25 Nick Clifton <nickc@redhat.com>
+
+ * config/tc-m68k.c (tc_gen_reloc): Do not abort if tcbit is
+ still set. Issue an error message instead.
+ (md_estimate_size_before_relax): Delete unused variable
+ 'buffer_address'. Fixup parentheses around if statement.
+
+2001-01-23 Kazu Hirata <kazu@hxi.com>
+
+ * as.c: Fix formatting.
+ * ehopt.c: Likewise.
+ * messages.c: Likewise.
+ * stabs.c: Likewise.
+ * symbols.c: Likewise.
+
+2001-01-23 Ben Elliston <bje@redhat.com>
+
+ * config/tc-m32r.c (m32r_handle_align): Declare type of fragp.
+
+2001-01-22 Kazu Hirata <kazu@hxi.com>
+
+ * config/tc-alpha.c: Fix formatting.
+
+2001-01-19 Kazu Hirata <kazu@hxi.com>
+
+ * config/tc-alpha.c: Fix formatting.
+
+2001-01-18 Kazu Hirata <kazu@hxi.com>
+
+ * config/tc-alpha.c: Fix formatting.
+
+2001-01-18 Nick Clifton <nickc@redhat.com>
+
+ * config/tc-arm.c (ldm_flags): Remove redundant bit from "fa" and
+ "da" flags.
+ (stm_flags): Remove redundant bit from "ed" and "da" flags.
+
+2001-01-18 Alexandre Oliva <aoliva@redhat.com>
+
+ * configure.in (cpu_type, arch): Match i386 too.
+ * configure: Rebuilt.
+
+2001-01-16 Kazu Hirata <kazu@hxi.com>
+
+ * config/tc-i386.c: Fix formatting.
+
+2001-01-16 Alan Modra <alan@linuxcare.com.au>
+
+ * config/tc-hppa.c (tc_gen_reloc): Use SEGREL32 instead of DIR32
+ relocs for .PARISC.unwind section.
+
+ * config/tc-hppa.c (pa_build_unwind_subspace): Build unwind
+ depending on section flags, not just for .text.
+
+2001-01-15 Jim Wilson <wilson@redhat.com>
+
+ * config/tc-ia64.c (ia64_flush_insns): Handle unwind directives
+ not immediately followed by an instruction.
+
+2001-01-15 Kazu Hirata <kazu@hxi.com>
+
+ * config/tc-m68hc11.c: Fix formatting.
+
+2001-01-15 Nick Clifton <nickc@redhat.com>
+
+ * symbols.c (colon): Change 'already defined symbol' from a
+ fatal error to an ordinary error. There is no reason why this
+ error should be fatal.
+
+ * message.c (as_fatal): Delete output file, if one has been
+ created.
+
+2001-01-14 Alan Modra <alan@linuxcare.com.au>
+
+ * config/tc-hppa.h (TARGET_FORMAT): Add hppa-linux variants.
+
+2001-01-14 Kazu Hirata <kazu@hxi.com>
+
+ * config/tc-alpha.c: Fix formatting.
+ * config/tc-arc.c: Likewise.
+ * config/tc-arc.h: Likewise.
+ * config/tc-d10v.c: Likewise.
+ * config/tc-i370.c: Likewise.
+ * config/tc-i386.c: Likewise.
+ * config/tc-i960.c: Likewise.
+ * config/tc-m68k.c: Likewise.
+ * config/tc-ppc.c: Likewise.
+ * config/tc-sparc.c: Likewise.
+ * config/tc-tahoe.c: Likewise.
+ * config/tc-vax.c: Likewise.
+
+ * config/tc-arc.c: Fix formatting.
+
+ * config/tc-arc.c: Fix formatting.
+
+2001-01-14 Alan Modra <alan@linuxcare.com.au>
+
+ * config/tc-hppa.c (pa_build_unwind_subspace): Use SEGREL32 for
+ both 32 and 64 bit ELF.
+
+ * config/tc-hppa.c (pa_ip): Store `a' flag in bit zero of operand
+ and don't bother storing `m' for "ce" completer. Tidy handling of
+ 'J' and 'K' operands to suit. Handle '<' and '>' operands.
+
+2001-01-14 Jan Hubicka <jh@suse.cz>
+
+ * config/tc-i386.h (TARGET_MACH): New macro.
+ (i386_mach): Declare.
+ * config/tc-i386.c (i386_mach): New function.
+
+2001-01-13 Philip Blundell <philb@gnu.org>
+
+ * doc/as.texinfo: Fix spelling and cross-references.
+
+ * doc/c-arm.texi: Fix typos. Say that `;' is a line separator
+ character for all systems, not just GNU/Linux. Make it explicit
+ that `-k' doesn't affect code generation, just ELF flags.
+
+2001-01-13 Jan Hubicka <jh@suse.cz>
+
+ * config/tc-i386.c (md_assemble): Check cpu_flags even for nullary
+ instructions.
+
+2001-01-12 Frank Ch. Eigler <fche@redhat.com>
+
+ * cgen.c (gas_cgen_finish_insn): Call dwarf2_emit_insn.
+
+2001-01-12 Nick Clifton <nickc@redhat.com>
+
+ * as.c (print_args): Update copyright date to 2001.
+
+2001-01-12 Peter Targett <peter.targett@arccores.com>
+
+ * doc/c-arc.texi: New file.
+ Some sections to be expanded.
+
+2001-01-12 Alan Modra <alan@linuxcare.com.au>
+
+ * config/tc-i386.c (md_longopts): Recognize "--64" only for ELF.
+ (md_parse_option): Always accept "--32".
+
+2001-01-11 Peter Targett <peter.targett@arccores.com>
+
+ * as.h (TC_ARC): Ensure struc-symbol.h included.
+ * as.c (dwarf2dbg.h): Include to remove implicit declaration
+ warnings.
+ * struc-symbol.h (SYMBOLS_NEED_BACKPOINTERS): Define.
+ (TARGET_SYMBOL_FIELDS) added.
+
+ * doc/Makefile.am (CPU_DOCS): Added c-arc.texi.
+ * doc/c-arc.texi: New file.
+ Some sections to be expanded.
+ * doc/as.texinfo: Update command-line options.
+ Removed outdated text for ARC dependant features, instead include
+ text from above file.
+
+ * config/obj-elf.h (ELF_TARGET_SYMBOL_FIELDS): Define local flag.
+ (TARGET_SYMBOL_FIELDS): Alias to previous definition.
+ (targ-cpu.h) header.
+ * config/tc-arc.h:
+ * config/tc-arc.c: New updated configuration for
+ ARC, including selection of core variants, and extensibility of
+ instructions, registers etc. through directives.
+
+ * config/tc-arc.c (arc_extinst): Minor corrections for
+ error messages.
+ (arc_common) Likewise. Make alignment argument optional for local
+ symbols also, with default of zero.
+
+2001-01-11 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * config/tc-m68hc11.c (md_estimate_size_before_relax): Fix
+ STATE_INDEXED_OFFSET when the symbol is undefined (16-bit offset).
+ (build_indexed_byte): Don't relax indexed byte, use 16-bit offset
+ and fix_new_exp() instead.
+ (md_convert_frag): For indexed post byte use the symbol value
+ rather than the displacement.
+ (md_relax_table): Fix indexed offset relax.
+
+2001-01-11 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * config/tc-m68hc11.c (md_estimate_size_before_relax):Don't
+ relax weak symbols.
+ (relaxable_symbol): New function.
+
+2001-01-11 Andreas Jaeger <aj@suse.de>
+
+ * config/tc-i386.h (TC_RELOC_GLOBAL_OFFSET_TABLE): Removed, it's
+ not used anywhere.
+
+2001-01-10 Nick Clifton <nickc@redhat.com>
+
+ * config/tc-arm.c (arm_fix_adjustable): Define for OBJ_COFF.
+ * config/tc-arm.h (obj_fix_adjustable): Define for OBJ_COFF
+
+2001-01-10 Nick Clifton <nickc@redhat.com>
+
+ * symbols.c (DOLLAR_LABEL_CHAR): New constant - the magic
+ character used to dollar local symbols.
+ (LOCAL_LABEL_CHAR): New constant - the magic character used to
+ local label symbols.
+ (dollar_label_name): Use DOLLAR_LABEL_CHAR.
+ (fb_label_name): Prefix local labels with LOCAL_LABEL_PREFIX,
+ if defined.
+ Use LOCAL_LABEL_CHAR.
+ (decode_local_label_name): Skip LOCAL_LABEL_PREFIX.
+ Use DOLLAR_LABEL_CHAR and LOCAL_LABEL_CHAR.
+ (S_IS_LOCAL): Use DOLLAR_LABEL_CHAR and LOCAL_LABEL_CHAR.
+
+2001-01-08 Bo Thorsen <bo@suse.de>
+
+ * config/tc-i386.c (i386_immediate, i386_displacement):
+ GOTPCREL check fix.
+
+2001-01-07 Ian Lance Taylor <ian@zembu.com>
+
+ * doc/c-i386.texi (i386-Arch): Remove spaces incorrectly inserted
+ in last change.
+
+2001-01-07 Philip Blundell <philb@gnu.org>
+
+ * doc/as.texinfo (Bug Reporting): Update email address for
+ reports.
+ * README: Likewise.
+
+2001-01-06 Jan Hubicka <jh@suse.cz>
+
+ * configure.in: Define DEFAULT_ARCH for i386.
+ * config/tc-i386.c (md_assemble): Return after the error message;
+ move testing for 64bit operands to proper place.
+
+2001-01-06 Jan Hubicka <jh@suse.cz>, Andreas Jaeger <aj@suse.de>
+
+ * doc/as.texinfo: Document '#' as comment character for i386 and
+ x86_64. Add AMD x86-64 into menu of machine dependent information.
+
+ * doc/c-i386.texi: Document x86_64 extensions.
+
+2001-01-05 Jan Hubicka <jh@suse.cz>
+
+ * config/tc-i386.c (md_assemble): Handle third byte of the opcode as prefix.
+
+2001-01-04 Jan Hubicka <jh@suse.cz>
+
+ * config/tc-i386.c (cpu_arch): Add Pentium4 and modify sledgehammer entry.
+ * NEWS: Add note about Pentium4 support.
+
+2001-01-04 Jan Hubicka <jh@suse.cz>
+
+ * config/tc-i387.c (pi, pte, pt): Update.
+ (type_names): Add new types.
+
+2001-01-03 Jan Hubicka <jh@suse.cz>
+
+ * config/tc-i386.h (CpuK6, CpuAthlon, CpuSledgehammer, CpuMMX, Cpu3dnow,
+ CpuUnknown): Renumber
+ (CpuP4, CpuSSE2): New.
+ (CpuUnknownFlags): Add CpuP4 and CpuSSE2
+
+2001-01-03 Philip Blundell <pb@futuretv.com>
+
+ * config/tc-alpha.c (alpha_force_relocation): Handle vtable
+ relocs.
+ (alpha_fix_adjustable): Likewise.
+ (md_apply_fix): Likewise.
+
+2000-12-31 H.J. Lu <hjl@gnu.org>
+
+ * listing.c (listing_message): Allocate string only if it is
+ used.
+
+ * configure: Rebuild.
+
+2000-12-31 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * doc/internals.texi (Relaxing with a table) <after relaxation>:
+ Point out caveats with generating fixups for the opcode in a frag.
+
+2000-12-30 Jan Hubicka <jh@suse.cz>
+
+ * configure.in: Add support for x86_64 and x86_64-*-linux-gnu*
+ * NEWS: Add x86_64.
+
+2000-12-29 H.J. Lu <hjl@gnu.org>
+
+ * listing.c (calc_hex): Print the variable part only if the
+ fragment type is rs_fill.
+
+2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * doc/internals.texi (tc_conditional_pseudoop,
+ TC_LINKRELAX_FIXUP): Fix typos.
+
+2000-12-28 Richard Henderson <rth@redhat.com>
+
+ * write.c (subsegs_finish): Fix thinko last change -- don't
+ "optimize" the alignment == 0 case.
+
+2000-12-28 Richard Henderson <rth@redhat.com>
+
+ * as.h (rs_align_test): New.
+ * frags.c (NOP_OPCODE): Move default from read.c.
+ (MAX_MEM_FOR_RS_ALIGN_CODE): New default.
+ (frag_align_code): New.
+ * frags.h (frag_align_code): Declare.
+ * read.c (NOP_OPCODE): Remove.
+ (do_align): Use frag_align_code.
+ * write.c (NOP_OPCODE): Remove.
+ (get_recorded_alignment): New.
+ (cvt_frag_to_fill): Handle rs_align_test.
+ (relax_segment): Likewise.
+ (subsegs_finish): Align last subseg in section to the
+ section alignment. Use frag_align_code.
+ * write.h (get_recorded_alignment): Declare.
+ * config/obj-coff.c (size_section): Handle rs_align_test.
+ (fill_section, fixup_mdeps): Likewise.
+ (write_object_file): Use frag_align_code.
+
+ * config/tc-alpha.c (alpha_align): Use frag_align_code.
+ (alpha_handle_align): New.
+ * config/tc-alpha.h (HANDLE_ALIGN): New.
+ (MAX_MEM_FOR_RS_ALIGN_CODE): New.
+
+ * config/tc-i386.h (md_do_align): Use frag_align_code.
+ (MAX_MEM_FOR_RS_ALIGN_CODE): New.
+
+ * config/tc-ia64.c (ia64_md_do_align): Don't do code alignment.
+ (ia64_handle_align): New.
+ * config/tc-ia64.h (HANDLE_ALIGN): New.
+ (MAX_MEM_FOR_RS_ALIGN_CODE): New.
+
+ * config/tc-m32r.c (m32r_do_align): Remove.
+ (m32r_handle_align): New.
+ (fill_insn): Use frag_align_code.
+ * config/tc-m32r.h (md_do_align): Remove.
+ (HANDLE_ALIGN, MAX_MEM_FOR_RS_ALIGN_CODE): New.
+ * config/tc-m88k.c, config/tc-m88k.h: Similarly.
+ * config/tc-mips.c, config/tc-mips.h: Similarly.
+
+ * config/tc-sh.c (sh_cons_align): Use rs_align_test.
+ (sh_handle_align): Likewise. Handle rs_align_code.
+ (sh_do_align): Remove.
+ * config/tc-sh.h (md_do_align): Remove.
+ (MAX_MEM_FOR_RS_ALIGN_CODE): New.
+
+ * config/tc-sparc.c (sparc_cons_align): Use rs_align_test.
+ (sparc_handle_align): Likewise. Handle rs_align_code.
+ * config/tc-sparc.h (md_do_align): Remove.
+ (MAX_MEM_FOR_RS_ALIGN_CODE): New.
+
+2000-12-22 DJ Delorie <dj@redhat.com>
+
+ * config/tc-d10v.c (md_assemble): set prev_seg and prev_subseg
+ when we assemble the first half of a pair.
+
+2000-12-22 H.J. Lu <hjl@gnu.org>
+
+ * config/tc-i386.c (reloc): Update the macro for non-bfd
+ assembler.
+ (BFD_RELOC_X86_64_GOTPCREL): Set to 0 for non-bfd assembler.
+
+2000-12-22 H.J. Lu <hjl@gnu.org>
+
+ * dwarf2dbg.c (dwarf2_finish): Remove #if BFD_ASSEMBLER.
+
+2000-12-20 Jan Hubicka <jh@suse.cz>
+
+ * config/tc-i386.h (i386_target_format): Define even for ELFs.
+ (QWORD_MNEM_SUFFIX): New macro.
+ (CpuK6,CpuAthlon,CpuSledgehammer, Cpu64, CpuNo64, CpuUnknownFlags):
+ New macros
+ (CpuMMX,CpuSSE,Cpu3dnow, CpuUnknown): Renumber.
+ (IgnoreSize, DefaultSize, No_?Suf, FWait, IsString, regKludge, IsPrefix,
+ ImmExt): Renumber.
+ (Size64, No_qSuf, NoRex64, Rex64): New macros.
+ (Reg64, Imm32S, Imm64, Disp32S, Disp64): New macros.
+ (Imm8, Imm8S, Imm16, Imm32, Imm1, BaseIndex, Disp8, Disp16, Disp32,
+ InOutPortReg,ShiftCount, Control, Debug, Test, FloatReg, FloatAcc,
+ SReg2, SReg3, Acc, JumpAbsolute, RegMMX, RegXMM, EsSeg, InvMem):
+ Renumber.
+ (Reg, WordReg): Add Reg64.
+ (Imm): Add Imm32S and Imm64.
+ (EncImm): New.
+ (Disp): Add Disp64 and Disp32S.
+ (AnyMem): Add Disp32S.
+ (RegRex, RegRex64): New macros.
+ (rex_byte): New type.
+ * config/tc-i386.c (set_16bit_code_flag): Kill.
+ (fits_in_unsigned_long, fits_in_signed_long): New functions.
+ (reloc): New parameter "signed"; support x86_64.
+ (set_code_flag): New.
+ (DEFAULT_ARCH): New macro; default to "i386".
+ (default_arch): New static variable.
+ (struct _i386_insn): New fields Operand_PCrel; rex.
+ (flag_16bit_code): Kill; All tests replaced to "flag_code == CODE_64BIT"
+ (flag_code): New enum and static variable.
+ (use_rela_relocations): New static variable.
+ (flag_code_names): New static variable.
+ (cpu_arch_flags): Default to CpuUnknownFlags|CpuNo64.
+ (cpu_arch): Add "sledgehammer"; Add CPUAthlon to Athlon and CpuK6 to
+ K6 and Athlon.
+ (i386_align_code): Return plain "nop" for x86_64.
+ (mode_from_disp_size): Support Disp32S.
+ (smallest_imm_type): Support Imm32S and Imm64.
+ (offset_in_range): Support size of 8.
+ (set_cpu_arch): Do not clobber to Cpu64/CpuNo64.
+ (md_pseudo_table): Add "code64"; use set_code_flat.
+ (md_begin): Emit sane error message on hash failure.
+ (tc_i386_fix_adjustable): Support x86_64 relocations.
+ (md_assemble): Support QWORD_MNEM_SUFFIX, REX registers,
+ instructions supported on particular arch just partially,
+ output of 64bit immediates, handling of Imm32S and Disp32S type.
+ (i386_immedaite): Support x86_64 relocations; support 64bit constants.
+ (i386_displacement): Likewise.
+ (i386_index_check): Cleanup; support 64bit addresses.
+ (md_apply_fix3): Support x86_64 relocation and rela.
+ (md_longopts): Add "32" and "64".
+ (md_parse_option): Add OPTION_32 and OPTION_64.
+ (i386_target_format): Call even for ELFs; choose between
+ elf64-x86-64 and elf32-i386.
+ (i386_validate_fix): Refuse GOTOFF in 64bit mode.
+ (tc_gen_reloc): Support rela relocations and x86_64.
+ (intel_e09_1): Support QWORD.
+
+2000-12-15 Diego Novillo <dnovillo@redhat.com>
+
+ * config/tc-i386.c (intel_e09_1): Only flag as a memory operand if
+ it's not an offset expression.
+ (intel_e10_1): Ditto. Also, if the operand is an offset expression,
+ keep the braces '[' and ']' in the output string.
+ (intel_e11): Ditto. Also remove comparison intel_parser.op_modifier
+ != FLAT. There is no such op_modifier.
+
+2000-12-14 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+
+ * dwarf2dbg.c: If we don't have <limits.h>, try including <sys/param.h>
+ if we have it.
+
+2000-12-13 Kazu Hirata <kazu@hxi.com>
+
+ * as.h: Fix formatting.
+ * cgen.h: Likewise.
+ * dwarf2dbg.c: Likewise.
+ * input-scrub.c: Likewise.
+ * read.h: Likewise.
+
+2000-12-13 Mark Elbrecht <snowball3@bigfoot.com>
+
+ * configure.in (i386-*-msdosdjgpp): Set bfd_gas to yes.
+ configure: Regenerate.
+
+2000-12-13 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+
+ * dwarf2dbg.c: #include <limits.h> only if it exists.
+
+2000-12-13 Rodney Brown <RodneyBrown@mynd.com>
+
+ * config/tc-hppa.c (pa_ip): Correct CHECK_FIELD typo.
+ (md_apply_fix): Here too.
+
+2000-12-12 Jim Wilson <wilson@redhat.com>
+
+ * config/tc-ia64.h (ia64_init): Add prototype.
+
+2000-12-12 H.J. Lu <hjl@gnu.org>
+
+ * dwarf2dbg.c: Enabled only if BFD_ASSEMBLER is defined.
+
+ * read.h (outputting_stabs_line_debug): Change it to int.
+ * stabs.c (outputting_stabs_line_debug): Likewise.
+
+2000-12-12 Geoffrey Keating <geoffk@redhat.com>
+
+ * config/obj-bout.c (obj_crawl_symbol_chain): Don't take
+ the address of a function result.
+
+2000-12-12 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
+
+ * config/tc-ppc.c (md_pseudo_table): Add .file and .loc.
+ (md_assemble): Call dwarf2_emit_insn.
+ (shlib): Fix typo SHILB -> SHLIB.
+ (md_parse_option): Likewise.
+ (ppc_elf_validate_fix): Likewise:
+ * config/tc-ppc.h (DWARF2_LINE_MIN_INSN_LENGTH): New.
+
+2000-12-12 Nick Clifton <nickc@redhat.com>
+
+ * cgen.h: Fix formatting.
+ * input-scrub.c: Fix formatting.
+ * macro.c: Fix formatting.
+ * config/tc-mips.c: Fix formatting.
+ * doc/c-mips.texi: Fix formatting.
+
+2000-12-11 Jan hubicka <jh@suse.cz>
+
+ * config/tc-i386.c (md_assemble): Refuse 's' and 'l' suffixes in the intel
+ mode; convert 'd' suffix to 's' or 'l'; remove all DWORD_MNEM_SUFFIX
+ references.
+ (intel_e09_1): Convert QWORD to 'l' suffix for FP operations; refuse
+ otherwise.
+ * config/tc-i386.h (DWORD_MNEM_SUFFIX): Kill.
+ (No_dSuf): Kill.
+
+ * i386.h (*_Suf): Remove No_dSuf.
+ (d_suf, wld_Suf,sld_Suf, sldx_Suf, bwld_Suf, d_FP, sld_FP, sldx_FP)
+ Remove.
+ (i386_optab): Remove 'd' in the suffixes.
+
+2000-12-06 Mark Elbrecht <snowball3@bigfoot.com>
+
+ * config/tc-i386.c (T_SHORT): Undefine before defining.
+
+2000-12-05 Kazu Hirata <kazu@hxi.com>
+
+ * config/tc-mips.c: Fix formatting.
+
+2000-12-04 Matthew Hiller <hiller@redhat.com>
+
+ * config/tc-d10v.c (flag_allow_gstabs_packing): New variable.
+ (md_longopts): New options --gstabs-packing, --no-gstabs-packing.
+ (md_show_usage): Ditto.
+ (md_parse_option): Ditto.
+ (d10v_cleanup): Writes pending instruction only if
+ ! outputting_stabs_line_debug || ! flag_allow_gstabs_packing.
+ Fix compile time warning messages.
+
+ * doc/c-d10v.texi: Documents new options.
+
+2000-12-04 Matthew Hiller <hiller@redhat.com>
+
+ * stabs.c (outputting_stabs_line_debug): New variable.
+ (stabs_generate_asm_lineno): Set outputting_stabs_line_debug at
+ function entry and unset at function exit.
+
+ * read.h (outputting_stabs_line_debug): New extern declaration.
+
+ * as.c: Include dwarf2dbg.h for definition of dwarf2_finish.
+
+ * dwarf2dbg.c: Fix compile time warning messages.
+
+2000-12-03 Kazu Hirata <kazu@hxi.com>
+
+ * config/tc-a29k.c: Fix formatting.
+ * config/tc-alpha.c: Likewise.
+ * config/tc-arm.c: Likewise.
+ * config/tc-cris.c: Likewise.
+ * config/tc-hppa.c: Likewise.
+ * config/tc-i370.c: Likewise.
+ * config/tc-i386.c: Likewise.
+ * config/tc-i860.c: Likewise.
+ * config/tc-i960.c: Likewise.
+ * config/tc-ia64.c: Likewise.
+ * config/tc-m68hc11.c: Likewise.
+ * config/tc-m68k.c: Likewise.
+ * config/tc-m88k.c: Likewise.
+ * config/tc-pj.c: Likewise.
+ * config/tc-ppc.c: Likewise.
+ * config/tc-sh.c: Likewise.
+ * config/tc-sparc.c: Likewise.
+ * config/tc-tahoe.c: Likewise.
+ * config/tc-vax.c: Likewise.
+
+2000-12-01 Chris Demetriou <cgd@sibyte.com>
+
+ * config/tc-mips.c (mips_ip): When calculating offsets,
+ don't accept as constant the difference between the
+ addresses of symbols in two different sections.
+
+ * config/tc-mips.c (macro_build): Add new 'U' and 'J' operand
+ specifiers.
+ (validate_mips_insn): Likewise. Also, update 'B' operand
+ specifier to use OP_*_CODE20 constants and delete 'm' operand
+ specifier.
+ (mips_ip): Remove 'm' operand specifier, add 'U' and 'J'
+ operand specifiers. Change warning generated by 'B' operand
+ specifier to reflect its new multi-purpose usage.
+
+ * config/tc-mips.c (mips_set_options): Use ISA_UNKNOWN rather than
+ -1, and update comment.
+ (file_mips_isa): Likewise.
+ (mips_cpu): Use CPU_UNKNOWN rather than -1, and update comment.
+ (ISA_HAS_COPROC_DELAYS, ISA_HAS_64BIT_REGS, gpr_interlocks): Use
+ ISA_* constants rather than hard-coded numbers.
+ (mips_cpu_info): New structure.
+ (mips_cpu_info_table): New table describing CPU and ISA names
+ and numbers.
+ (mips_cpu_info_from_name, mips_cpu_info_from_isa,
+ mips_cpu_info_from_cpu): New functions.
+ (mips_isa_to_str): New function to get string for ISA name.
+ (mips_cpu_to_str): Convert to use mips_cpu_info_from_cpu, and
+ return const char *.
+ (md_begin): Redo CPU and ISA selection logic, using
+ mips_cpu_info_from_*. Convert to use ISA_* constants rather
+ than hard-coded numbers.
+ (append_insn, mips_emit_delays, macro, macro2): Convert to use
+ ISA_* constants rather than hard-coded numbers.
+ (mips_ip): Convert to use mips_isa_to_str to get ISA name.
+ (md_longopts): Delete OPTION_NO_MIPS32.
+ (md_parse_option): Convert to use ISA_* constants rather than
+ hard-coded numbers. Make OPTIONS_MIPS32 case treat MIPS32
+ as an ISA. Delete OPTION_NO_MIPS32 case. Convert OPTION_MCPU
+ to use strcasecmp to recognize "default" and to use
+ mips_cpu_info_from_name to get CPU numbers from argument.
+ (md_show_usage): Move -mips32 so it's with the rest of the ISA
+ flags. Change 4Kc, 4Kp and 4Km CPU entries to just be
+ mips32-4k.
+ (s_mipsset): Accept ISA value 32.
+ * doc/as.texinfo: Clean up MIPS options summary slightly,
+ remove -no-mips32. Add note about -mips4 and -mips32
+ specifying those ISA levels. Delete -mips32 and -no-mips32
+ cpu flag descriptions.
+ * doc/c-mips.texi: Add -mips32 to list of ISA switches. Clean
+ up the supported CPU switch list, and replace 4Kc, 4Km, and
+ 4Kp entries with a single mips32-4k entry. Note that you can
+ use ".set mips32".
+
+ * config/tc-mips.c (ISA_HAS_64BIT_REGS): Add checks for ISA_MIPS5 and
+ ISA_MIPS64.
+ (md_longopts, OPTION_MIPS5, OPTION_MIPS64): Add options for
+ -mips5 and -mips64.
+ (md_parse_option): Add cases for OPTION_MIPS5 and
+ OPTION_MIPS64.
+ (md_show_usage): Mention -mips5 and -mips64 arguments.
+ (s_mipsset): Add cases for MIPS5 and MIPS64.
+ (mips_cpu_info_table): Add entries for MIPS5 and MIPS64 ISAs
+ and pseudo-CPUs.
+ * doc/as.texinfo: Mention -mips5 and -mips64 options
+ and their meanings.
+ * doc/c-mips.texi: Likewise. Also update introduction
+ and ".set" usage information.
+
+ * config/tc-mips.c (md_show_usage): Add "sb1" to the
+ CPU list.
+ (mips_cpu_info_table): Add SB-1 entries.
+ * doc/c-mips.texi: Add "sb1" to the list of CPUs
+ known to the -mcpu option.
+
+ * doc/as.texinfo: Correct description of MIPS -mcpu
+ option, by copying some of the text from doc/c-mips.texi.
+
+2000-12-01 Joel Sherrill <joel@OARcorp.com>
+
+ * configure.in (arm-*-rtems*, a29k-*rtems*, h8300-*-rtems*):
+ New targets.
+ (sparc*-*-rtemself*, sparc*-*-rtemsaout*): New targets.
+ (sparc*-*-rtems*): Switched from a.out to ELF.
+ * configure: Regenerate.
+ * config.in: Regenerate.
+ * Makefile.in: Regenerate.
+ * aclocal.m4: Regenerate.
+ * po/gas.pot: Regenerate.
+
+2000-11-30 Philip Blundell <pb@futuretv.com>
+
+ * config/obj-coff.c (obj_coff_weak): Use S_SET_WEAK if it exists,
+ even in non BFD_ASSEMBLER case.
+
+2000-11-30 Diego Novillo <dnovillo@redhat.com>
+
+ * config/tc-i386.c (md_assemble): Swap i.disp_relocs when using intel
+ syntax.
+
+2000-11-29 Richard Henderson <rth@redhat.com>
+
+ * dwarf2dbg.c: Rewrite from scratch. Queue all debugging output
+ until dwarf2_finish; use relaxation to get cross-fragment offsets;
+ thread multiple subsegments properly; handle multiple code
+ sections properly; emit proper compilation unit info for assembler
+ generated debugging.
+
+ * as.h (enum _relax_state): Add rs_dwarf2dbg.
+ * dwarf2dbg.h (struct dwarf2_line_info): Remove filename.
+ (dwarf2dbg_estimate_size_before_relax): Declare.
+ (dwarf2dbg_relax_frag, dwarf2dbg_convert_frag): Declare.
+ * write.c: Include dwarf2dbg.h.
+ (cvt_frag_to_fill): Handle rs_dwarf2dbg.
+ (relax_segment): Likewise.
+
+2000-11-28 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * config/tc-sh.c (md_convert_frag) <undefined symbol, conditional
+ jump>: Use as_bad_where instead of as_bad. Tweak error message
+ accordingly. Stabilize frag by updating fix part and resetting
+ variant part.
+ <undefined symbol, unconditional jump>: Ditto.
+ (sh_elf_cons): Cast *input_line_pointer to unsigned char when
+ indexing is_end_of_line[].
+ (md_assemble): Initialize size to 0.
+ (md_section_align): Mark parameter seg as unused.
+ (parse_reg): Parse names case-insensitively.
+
+2000-11-28 Kazu Hirata <kazu@hxi.com>
+
+ * config/obj-aout.h: Fix formatting.
+ * config/obj-bout.h: Likewise.
+ * config/obj-coff.c: Likewise.
+ * config/obj-coff.h: Likewise.
+ * config/obj-elf.h: Likewise.
+ * config/obj-som.h: Likewise.
+ * config/obj-vms.c: Likewise.
+ * config/obj-vms.h: Likewise.
+ * config/tc-h8300.h: Likewise.
+ * config/tc-ns32k.h: Likewise.
+ * config/tc-sparc.h: Likewise.
+ * config/tc-tic54x.h: Likewise.
+ * config/tc-z8k.h: Likewise.
+
+2000-11-28 Nick Clifton <nickc@redhat.com>
+
+ * doc/as.1 (COPYING): Mention that the GNU Free Documentation
+ License is present in the sources, but not the output, and
+ also available from the GNU website.
+ (GNU Free Documentation License): Comment out this section.
+
+2000-11-28 Hans-Peter Nilsson <hp@axis.com>
+
+ * Makefile.am (CPU_OBJ_VALID): Add case to filter out invalid coff
+ targets. Remove i860 from valid a.out targets.
+ * Makefile.in: Regenerate.
+
+ * config/tc-cris.c: Include dwarf2dbg.h.
+ (md_pseudo_table): Add .file and .loc.
+ (md_assemble): Call dwarf2_emit_insn if generating ELF.
+ (s_cris_file, s_cris_loc): New.
+ * config/tc-cris.h (DWARF2_LINE_MIN_INSN_LENGTH): Define.
+ * Makefile.am: Regenerate dependencies.
+ * Makefile.in: Regenerate.
+
+2000-11-28 Alan Modra <alan@linuxcare.com.au>
+
+ * expr.c (STANDARD_MUL_PRECEDENCE): Correct value.
+ (MRI_MUL_PRECEDENCE): Likewise.
+ (op_rank): Fix a comment typo.
+
+2000-11-26 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * config/tc-m68hc11.c (build_indexed_byte): Print the offset in
+ the error message.
+ (get_operand): Fix analysis for movw/movb instructions.
+
+2000-11-24 Nick Clifton <nickc@redhat.com>
+
+ * configure.in (xscale-elf): Add target.
+ (xscale-coff): Add target.
+ * configure: Regenerate.
+
+ * config/tc-arm.c (ARM_EXT_V5E): New ARM architecture
+ extenstion.
+ (ARM_EXT_XSCALE): New ARM architecture extension.
+ (ARM_LONGMUL): Rename to ARM_EXT_LONGMUL.
+ (ARM_HALFWORD): Rename to ARM_EXT_HALFWORD.
+ (ARM_THUMB): Rename to ARM_EXT_THUMB.
+ (ARM_ARCH_V4): Remove processor from architecture.
+ (ARM_ARCH_3M): New architecutre definition.
+ (ARM_ARCH_V5TE): New architecutre definition.
+ (ARM_ARCH_XSCALE): New architecutre definition.
+ (CPU_DEFAULT): Allow to be defaulted to XScale.
+ (atpcs): New boolean variable.
+ (ldr_flags): Support 'd' flag for double word loads.
+ (str_flags): Support 'd' flag for double word stored.
+ (do_mia): New function.
+ (do_mar): New function.
+ (do_mra): New function.
+ (do_pld): New function.
+ (do_ldrd): New function.
+ (do_blx): New function.
+ (do_bkpt): New function.
+ (do_clz): New function.
+ (do_lstc2): New function.
+ (do_cdp2): New function.
+ (do_t_blx): New function.
+ (do_t_bkpt): New function.
+ (do_smla): New function.
+ (do_smlal): New function.
+ (do_smul): New function.
+ (do_qadd): New function.
+ (do_co_reg2c): New function.
+ (LONGEST_INSN): Redefine to 7.
+
+ * doc/c-arm.texi: Document -mxscale, -mmarmv5te and -matpcs
+ command line switches.
+
+2000-11-22 Jim Wilson <wilson@redhat.com>
+
+ * config/tc-ia64.c (pseudo_func): Add missing initializers.
+ (struct rsrc): Make line unsigned.
+ (gr_values): Add missing initializer.
+ (SLOT_NUM_NOT_SET): Add unsigned cast.
+ (ia64_elf_section_flags, output_vbyte_mem, count_output, dot_radix,
+ dot_fframe, dot_vframe, dot_vframesp, dot_vframepsp, dot_save,
+ dot_restore, dot_restorereg, dot_restorereg_p, dot_handlerdata,
+ dot_unwentry, dot_altrp, dot_saveg, dot_savef, dot_saveb, dot_savegf,
+ dot_spill, dot_spillreg, dot_spillreg_p, dot_label_state,
+ dot_copy_state, dot_unwabi, dot_personality, dot_proc, dot_body,
+ dot_prologue, dot_endp, dot_regstk, dot_psr, dot_alias, dot_ln,
+ dot_reg_val, dot_entry, dot_mem_offset, ia64_init, mark_resource,
+ md_undefined_symbol, md_apply_fix3, tc_gen_reloc, ia64_md_do_align):
+ Add ATTRIBUTE_UNUSED to unused parameters.
+ (convert_expr_to_ab_reg): Add parens.
+ (convert_expr_to_xy_reg): Add parens. Comment out >= REG_GR test.
+ (dot_prologue): Initialize grsave when declared.
+ (md_pseudo_table): Add missing initializers.
+ (operand_match): Add casts to bfd_vma.
+ (emit_one_bundle): Delete unused local prev. Make required_template
+ unsigned.
+ (specify_resource): Cast i to unsigned.
+ (note_register_values): Use fprintf_vma.
+ (print_dependency): Likewise.
+
+2000-11-21 Jim Wilson <wilson@redhat.com>
+
+ * config/tc-ia64.c (generate_unwind_image): Call record_alignment
+ for unwind info section.
+ (dot_endp): Likewise for unwind section.
+
+ * config/tc-ia64.c (emit_one_bundle): Pass size of 8 not 4 to
+ fix_new_exp.
+
+2000-11-21 Jakub Jelinek <jakub@redhat.com>
+
+ * config/tc-sparc.c (md_pseudo_table): Add .file and .loc.
+ (output_insn): Call dwarf2_emit_insn.
+ * config/tc-sparc.h (DWARF2_LINE_MIN_INSN_LENGTH): New.
+
+2000-11-17 Richard Henderson <rth@redhat.com>
+
+ * ehopt.c (eh_frame_code_alignment): New arg `in_seg', update all
+ callers. Don't switch segments. Expect CIE == -1 in .debug_frame.
+ (check_eh_frame): Handle .eh_frame and .debug_frame concurrently.
+
+2000-11-17 Nick Clifton <nickc@redhat.com>
+
+ * config/tc-arm.c (md_pseudo_table): Add support for .line and
+ .file pseudo ops.
+
+2000-11-17 Richard Henderson <rth@redhat.com>
+
+ * config/tc-i386.c (md_pseudo_table): Add .file and .loc.
+
+2000-11-17 Richard Henderson <rth@redhat.com>
+
+ * dwarf2dbg.c (dwarf2_gen_line_info): Early out for no line number.
+ * config/obj-elf.h (ECOFF_DEBUGGING) [TC_ALPHA]: Adjust for
+ tri-state definition of alpha_flag_mdebug.
+ * config/tc-alpha.c (alpha_flag_mdebug): Init to -1.
+ (s_alpha_file): Store first .file directive.
+ (s_alpha_stab): New.
+ (md_pseudo_table): Add stabs and stabn.
+
+2000-11-17 Richard Henderson <rth@redhat.com>
+
+ * config/tc-i386.c (md_assemble): Call dwarf2_emit_insn.
+
+2000-11-17 Richard Henderson <rth@redhat.com>
+
+ * as.c (debug_type): Init to DEBUG_UNSPECIFIED.
+ (main): Call dwarf2_finish.
+ * as.h (debug_type): Clarify documentation of the meaning
+ of this variable.
+ * dwarf2dbg.c (DWARF2_LINE_MIN_INSN_LENGTH): Default to 1.
+ (print_stats): Fix parenthesis problem.
+ (now_subseg_size): New.
+ (dwarf2_finish): Use it. If DEBUG_DWARF2, emit bits for .debug_info.
+ (dwarf2_directive_file): Don't set debug_type.
+ (dwarf2_where): Honor DEBUG_DWARF2 first.
+ (dwarf2_emit_insn): Renamed from dwarf2_generate_asm_lineno;
+ do nothing if not emitting dwarf2 debug info, or no work.
+ * dwarf2dbg.h (dwarf2_emit_insn): Update.
+ * ecoff.c (add_file): Turn on DEBUG_ECOFF only if DEBUG_UNSPECIFIED.
+ (ecoff_new_file): Likewise.
+ * read.c (generate_lineno_debug): Kill ecoff hackery. Update
+ commentary wrt dwarf2.
+
+ * config/tc-alpha.c (alpha_adjust_symtab_relocs): Add
+ ATTRIBUTE_UNUSED as needed.
+ (emit_insn): Call dwarf2_emit_insn.
+ (s_alpha_file): New.
+ (s_alpha_loc): New.
+ (s_alpha_coff_wrapper): Don't handle them.
+ (md_pseudo_table): Update for .file and .loc.
+ * config/tc-alpha.h (DWARF2_LINE_MIN_INSN_LENGTH): New.
+
+ * config/tc-arm.c (output_inst): Update for dwarf2_emit_insn;
+ don't protect with debug_type.
+ * config/tc-hppa.c (md_assemble): Likewise.
+ * config/tc-m68hc11.c (m68hc11_new_insn): Likewise.
+ * config/tc-mn10300.c (md_assemble): Likewise.
+ * config/tc-sh.c (md_assemble): Likewise.
+ * config/tc-v850.c (md_assemble): Likewise.
+
+ * config/tc-arm.c (arm_end_of_source): Remove.
+ * config/tc-hppa.c (pa_end_of_source): Remove.
+ * config/tc-m68hc11.c (m68hc11_end_of_source): Remove.
+ * config/tc-mn10300.c (mn10300_finalize): Remove.
+ * config/tc-sh.c (sh_finalize): Remove.
+ * config/tc-v850.c (sh_finalize): Remove.
+
+ * config/tc-arm.h (md_end): Remove.
+ * config/tc-hppa.h (md_end): Remove.
+ (DWARF2_LINE_MIN_INSN_LENGTH): New.
+ * config/tc-m68hc11.h (md_end): Remove.
+ * config/tc-mn10300.h (md_end): Remove.
+ * config/tc-sh.h (md_end): Remove.
+ * config/tc-v850.h (md_end): Remove.
+
+ * config/tc-ia64.c (emit_one_bundle): Don't protect
+ dwarf2 bits with debug_type.
+ (md_assemble): Likewise.
+ (ia64_end_of_source): Don't call dwarf2_finish.
+
+2000-11-16 Jim Wilson <wilson@redhat.com>
+
+ * config/tc-ia64.c (errata_nop_necessary_p): Abort if general regno
+ >= 128 instead of > 128. Abort if predicate regno is >= 64 instead of
+ > 16.
+
+2000-11-16 H.J. Lu <hjl@gnu.org>
+
+ * config/obj-elf.c (obj_elf_symver): Don't check the missing
+ version name.
+
+2000-11-15 Kazu Hirata <kazu@hxi.com>
+
+ * config/tc-tic30.c: Fix formatting.
+ * config/tc-tic80.c: Likewise.
+ * config/tc-v850.c: Likewise.
+ * config/tc-vax.c: Likewise.
+ * config/tc-w65.c: Likewise.
+ * config/tc-z8k.c: Likewise.
+
+2000-11-14 DJ Delorie <dj@redhat.com>
+
+ * config/tc-v850.c: Support dwarf2.
+ * config/tc-v850.h: Ditto.
+
+ * config/tc-v850.c (cons_fix_new_v850): Don't rely on
+ parse_cons_expression_v850 to initialize hold_cons_reloc.
+
+2000-11-15 Bernd Schmidt <bernds@redhat.com>
+
+ * config/tc-ia64.c (struct md): New entries LAST_GROUPS, GROUP_IDX.
+ (errata_nops_necessary_p): New function.
+ (emit_one_bundle): Call it. Update the GROUP_IDX field in struct
+ md.
+
+2000-11-14 Jim Wilson <wilson@redhat.com>
+
+ * config/tc-ia64.c (ia64_target_format): If EF_IA_64_BE not set, then
+ return little endian bfd formats.
+
+2000-11-14 Kazu Hirata <kazu@hxi.com>
+
+ * config/aout_gnu.h: Fix formatting.
+ * config/atof-vax.c: Likewise.
+ * config/m68k-parse.h: Likewise.
+ * config/m88k-opcode.h: Likewise.
+ * config/obj-elf.c: Likewise.
+ * config/tc-arm.c: Likewise.
+ * config/tc-cris.c: Likewise.
+ * config/tc-i386.c: Likewise.
+ * config/tc-ia64.c: Likewise.
+ * config/tc-mn10300.c: Likewise.
+ * config/te-386bsd.h: Likewise.
+ * config/te-hppa.h: Likewise.
+ * config/te-nbsd.h: Likewise.
+ * config/te-ppcnw.h: Likewise.
+ * config/te-sparcaout.h: Likewise.
+ * config/te-tmips.h: Likewise.
+ * config/vax-inst.h: Likewise.
+ * config/vms-conf.h: Likewise.
+
+2000-11-14 Jakub Jelinek <jakub@redhat.com>
+
+ * config/tc-alpha.c (s_alpha_prologue): Preserve visibility bits.
+
+2000-11-13 H.J. Lu <hjl@gnu.org>
+
+ * config/obj-elf.c (elf_frob_symbol): Support
+ ".symver name,name2@@@nodename".
+ (elf_frob_file_before_adjust): Likewise.
+
+ * doc/as.texinfo: Updated for ".symver name,name2@@@nodename"
+ and ".symver name,name2@@@nodename".
+ Fix a typo.
+
+2000-11-12 H.J. Lu (hjl@gnu.org)
+
+ * config/obj-elf.c (obj_elf_symver): Check missing version
+ name.
+
+2000-11-12 H.J. Lu (hjl@gnu.org)
+
+ * dwarf2dbg.c (dwarf2_generate_asm_lineno): Use addressT
+ instead of bfd_vma for non-bfd assemblers.
+
+2000-11-09 Kazu Hirata <kazu@hxi.com>
+
+ * itbl-ops.c: Fix comment typos.
+
+2000-11-08 Jim Wilson <wilson@redhat.com>
+
+ * config/tc-ia64.c (struct unw_rec_list): Add slot_frag field.
+ (struct unwind): Add next_slot_frag field.
+ (slot_index): New parameters slot_frag and first_frag. Add code
+ to add in frag sizes when different. Add comments.
+ (fixup_unw_records): New locals first_frag and last_frag. Pass new
+ arguments to slot_index.
+ (emit_one_bundle): Set slot_frag field. Set next_slot_number after
+ loop end. Set next_slot_frag field.
+
+2000-11-07 H.J. Lu <hjl@gnu.org>
+
+ * doc/as.texinfo (.symver): Updated for versioned symbol
+ reference.
+
+ * obj.h (format_ops): Add the frob_file_before_adjust field.
+
+ * config/obj-aout.c (aout_format_ops): Set the
+ frob_file_before_adjust field to 0.
+ * config/obj-coff.c (coff_format_ops): Likewise.
+ * config/obj-ecoff.c (ecoff_format_ops): Likewise.
+
+ * config/obj-elf.c (obj_elf_symver): Allow duplicated version
+ name.
+ (elf_frob_file_before_adjust): New function to remove unneeded
+ versioned symbols from the symbol table.
+ (elf_format_ops): Set the frob_file_before_adjust field to
+ elf_frob_file_before_adjust.
+
+ * config/obj-elf.h (obj_frob_file_before_adjust): Defined if
+ not defined.
+
+ * config/obj-multi.h (obj_frob_file_before_adjust): Defined.
+
+2000-11-07 Peter Targett <peter.targett@arccores.com>
+
+ * config/tc-arc.h: Avoid warnings for LITTLE_ENDIAN and
+ BIG_ENDIAN macros.
+ * config/tc-arc.c: Use S_IS_LOCAL to test local symbols.
+ Fix compile time warning messages.
+
+2000-11-07 Nick Clifton <nickc@redhat.com>
+
+ * stabs.c (generate_asm_file): Increase length of xmalloc'ed
+ buffer in order to avoid buffer overflows.
+
+2000-11-06 Steve Ellcey <sje@cup.hp.com>
+
+ * config/tc-ia64.c (md_shortopts, md_parse_option, md_show_usage):
+ Change M to m for -milp32 or -mlp64 to match gcc.
+ (dot_endp): Use bytes_per_address instead of 8.
+ (emit_one_bundle): Use number_to_chars_littleendian instead of
+ md_number_to_chars.
+ (fix_insn): Likewise.
+ (ia64_init): New function.
+ (ia64_target_format): New function.
+ (md_begin): Set endianness, arch, and machine as appropriate.
+ * config/tc-ia64.h: (TARGET_BYTES_BIG_ENDIAN, md_number_to_chars):
+ Make these macros depend on TE_HPUX macro.
+ (TARGET_FORMAT): Define.
+ (HOST_SPECIAL_INIT): Define.
+ * config/te-hpux.h: New file.
+ * configure.in: Add "ia64-*-hpux*" target to configure.
+ * configure: Regenerate.
+
+2000-11-06 Kazu Hirata <kazu@hxi.com>
+
+ * as.c: Fix formatting.
+ * dwarf2dbg.c: Likewise.
+ * input-file.c: Likewise.
+ * input-file.h: Likewise.
+ * input-scrub.c: Likewise.
+ * itbl-ops.c: Likewise.
+ * listing.c: Likewise.
+ * macro.h: Likewise.
+ * messages.c: Likewise.
+ * read.c: Likewise.
+ * subsegs.c: Likewise.
+ * subsegs.h: Likewise.
+ * write.c: Likewise.
+
+2000-11-06 Nick Clifton <nickc@redhat.com>
+
+ * doc/as.texinfo: Add GNU Free Documentation License.
+ * doc/gasp.texi: Add GNU Free Documentation License.
+ * doc/as.1: Add GNU Free Documentation License.
+
+2000-11-05 Nick Clifton <nickc@redhat.com>
+
+ * config/tc-arm.c: Add include of "dwarf2dbg.h"
+
+2000-11-02 Per Lundberg <plundis@chaosdev.org>
+
+ * configure.in: Recognise i[3456]86-chaosdev-storm-chaos.
+ * configure: Regenerate.
+
+2000-11-01 Nick Clifton <nickc@redhat.com>
+
+ * read.c (original_case_string): New global variable.
+ (read_a_source_file): Copy opcode string into
+ original_case_string if clobbering the case of the opcode.
+ * read.h: Export the definition of original_case_string.
+ * config/tc-arm.c (md_assembler): When parsing a .req
+ directive use the original opcode string, not the case
+ clobbered version.
+
+2000-11-02 Nick Clifton <nickc@redhat.com>
+
+ * config/tc-mn10300.c (debug_line): Remove this static
+ variable.
+ (md_assemble): Call dwarf2_generate_asm_lineno instead of
+ dwarf2_where and dwarf2_gen_line_info.
+
+2000-11-02 Theo Honohan <th@futuretv.com>
+
+ * config/tc-arm.c (do_msr): Improve error message.
+
+2000-10-31 Eric Christopher <echristo@redhat.com>
+
+ * config/tc-mn10300.c (md_apply_fix3): Use valuep if fully resolved
+ or pc-relative, else use fx_offset.
+
+2000-10-31 Jim Wilson <wilson@redhat.com>
+
+ * config/tc-ia64.c (struct md): New field tag_fixups.
+ (ia64_flush_insns): Handle tag_fixups. Error if dangling
+ qualifying predicate.
+ (emit_one_bundle): Delete spurious multiplication by one. Handle
+ tag_fixups.
+ (ia64_start_line): Error if dangling qualifying predicate.
+ (defining_tag): New static variable.
+ (ia64_unrecognized_line, case '['): Parse tags.
+ (ia64_frob_label): Create tag_fixups.
+ (md_assemble): Reset md.qp.X_op after using it.
+
+2000-10-31 Kaz Kojima <kkojima@rr.iij4u.or.jp>
+
+ * config/tc-sh.c (md_apply_fix [BFD_RELOC_SH_PCDISP12BY2]): Allow 4094.
+
+2000-10-31 Bernd Schmidt <bernds@redhat.co.uk>
+
+ * config/tc-ia64.c (extra_goodness): Only prefer F in slot 1 and B in slot 2.
+
+2000-10-30 Kazu Hirata <kazu@hxi.com>
+
+ * expr.c: Fix formatting.
+ * flonum-copy.c: Likewise.
+ * flonum.h: Likewise.
+ * gasp.c: Likewise.
+ * hash.c: Likewise.
+
+2000-10-30 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * as.h (OPTION_MD_BASE): Bump to 190.
+ * as.c (parse_args) <std_longopts>: Add comment about the need to
+ check OPTION_MD_BASE in as.h.
+
+ * config/tc-sh.c (md_apply_fix): For ELF, do not "adjust back" VAL
+ for weak symbols.
+
+2000-10-27 Nick Clifton <nickc@redhat.com>
+
+ * configure.in (emulations): Add m68hc12.
+ * configure: Regenerate.
+ * po/gas.pot: Regenerate.
+
+2000-10-27 Aldy Hernandez <aldyh@redhat.com>
+
+ * config/tc-arm.c (psrs): Remove lowercase versions of spsr* and
+ cpsr*.
+ (arm_psr_parse): Handle lowercase CPSR and SPSR.
+
+2000-10-25 Nick Clifton <nickc@redhat.com>
+
+ * dwarf2out.c (dwarf2_generate_asm_lineno): New function: Generate
+ a DWARF2 line number information sequence.
+
+ *dwarf2out.h: Add prototype for dwarf2_generate_asm_lineno.
+
+ * read.c (generate_lineno_debug): Update comment describing why
+ DWARF2 line number debug information is not generated
+ automatically by this function.
+
+ * doc/as.texinfo: Note that --gdwarf2 only works on some targets,
+ not all.
+
+ * config/tc-arm.h (md_end): Define.
+ (DWARF2_LINE_MIN_INSN_LENGTH): Define.
+
+ * config/tc-arm.c (output_inst): Call dwarf2_generate_asm_lineno
+ if generating DWARF2 line numbers.
+ (arm_end_of_source): New function. Call dwarf2_finish if
+ necessary.
+
+ * config/tc-hppa.c (md_assemble): Use dwarf2_generate_asm_lineno.
+ * config/tc-m68hc11.c (m68hc11_new_insn): Use dwarf2_generate_asm_lineno.
+ * config/tc-sh.c (md_assemble): Use dwarf2_generate_asm_lineno.
+
+2000-10-25 Diego Novillo <dnovillo@cygnus.com>
+
+ * config/tc-i386.c: Fix prototype declarations for functions taking no
+ arguments.
+
+2000-10-24 Diego Novillo <dnovillo@cygnus.com>
+
+ * config/tc-i386.c (i386_operand_modifier): Remove.
+ (build_displacement_string): Remove.
+ (i386_parse_seg): Remove.
+ (i386_intel_memory_operand): Remove.
+ (i386_intel_operand): Re-write using recursive descent parser based
+ on MASM documentation.
+ (struct intel_parser_s): New structure.
+ (intel_parser): New static variable.
+ (struct intel_token): New structure.
+ (cur_token, prev_token): New static variables.
+ (T_NIL): Define.
+ (T_CONST): Define.
+ (T_REG): Define.
+ (T_BYTE): Define.
+ (T_WORD): Define.
+ (T_DWORD): Define.
+ (T_QWORD): Define.
+ (T_XWORD): Define.
+ (T_SHORT): Define.
+ (T_OFFSET): Define.
+ (T_PTR): Define.
+ (T_ID): Define.
+ (intel_match_token): New function.
+ (intel_get_token): New function.
+ (intel_putback_token): New function.
+ (intel_expr): New function.
+ (intel_e05): New function.
+ (intel_e05_1): New function.
+ (intel_e06): New function.
+ (intel_e06_1): New function.
+ (intel_e09): New function.
+ (intel_e09_1): New function.
+ (intel_e10): New function.
+ (intel_e10_1): New function.
+ (intel_e11): New function.
+
+2000-10-20 Jakub Jelinek <jakub@redhat.com>
+
+ * config/tc-sparc.c (sparc_ip): Fix a bug which caused v9_arg_p
+ instructions to loose any special insn->architecture mask.
+
+ * config/tc-sparc.c (v9a_asr_table): Add v9b ASRs.
+ (sparc_md_end, sparc_arch_types, sparc_arch,
+ sparc_elf_final_processing): Handle v8plusb and v9b architectures.
+ (sparc_ip): Handle siam mode operands. Support v9b ASRs (and
+ request v9b architecture if they are used).
+
+2000-10-18 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+
+ * config/tc-m68k.c: Fix the previous misapplied patch.
+
+2000-10-18 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+
+ * config/tc-m68k.h (RELAX_RELOC_*): New definitions for both
+ BFD_ASSEMBLER and !BFD_ASSEMBLER.
+ * config/tc-m68k.c (md_convert_frag_1): Use them instead of
+ BFD_RELOC_*.
+
+2000-10-17 Kazu Hirata <kazu@hxi.com>
+
+ * debug.c: Fix formatting.
+ * depend.c: Likewise.
+ * dwarf2dbg.c: Likewise.
+ * dwarf2dbg.h: Likewise.
+ * ecoff.c: Likewise.
+ * expr.c: Likewise.
+ * expr.h: Likewise.
+ * flonum-konst.c: Likewise.
+ * frags.h: Likewise.
+
+2000-10-17 Chandrakala Chavva <cchavva@redhat.com>
+
+ * as.c: New option OPTION_TARGET_HELP. Prints all target specific
+ options.
+ * doc/as.texinfo: Added notes about this new option.
+
+2000-10-16 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * config/tc-sh.c (JREG): Remove.
+ (md_convert_frag): Remove #if 0:d code using JREG.
+
+2000-10-15 Diego Novillo <dnovillo@cygnus.com>
+
+ * config/tc-i386.c (i386_operand_modifier): Only match
+ modifiers SHORT and FLAT if they are followed by a space.
+ (parse_register): When `allow_naked_reg' is set, do not confuse
+ identifiers that start with a register name with a register.
+
+2000-10-12 Kazu Hirata <kazu@hxi.com>
+
+ * app.c: Fix formatting.
+ * as.c: Likewise.
+ * as.h: Likewise.
+ * bit_fix.h: Likewise.
+ * cgen.c: Likewise.
+ * cgen.h: Likewise.
+ * cond.c: Likewise.
+
+2000-10-11 Alan Modra <alan@linuxcare.com.au>
+
+ * config/obj-elf.c (elf_frob_symbol): Revert 2000-10-07 change.
+
+2000-10-07 Alan Modra <alan@linuxcare.com.au>
+
+ * config/tc-hppa.c (md_apply_fix): Remove plainly wrong assert.
+ Re-arrange function a little and improve error message.
+
+ * write.c (write_relocs): Fix a comment.
+
+ * config/obj-elf.c (elf_frob_symbol): Make section syms global on
+ link-once sections.
+
+2000-10-05 Jim Wilson <wilson@cygnus.com>
+
+ * config/tc-ia64.c (resources_match): Handle IA64_RS_PRr.
+
+2000-10-05 Alan Modra <alan@linuxcare.com.au>
+
+ * config/tc-i386.c: Delete some useless comments, reformat others.
+
+ * config/tc-i386.h (TC_FIX_ADJUSTABLE): Add check to cover
+ non-global syms in linkonce sections.
+
+2000-10-04 Ralf Baechle <ralf@gnu.org>
+
+ * config/tc-ia64.c (operand_match): Don't use // style comments.
+ * config/tc-i370.c: Likewise.
+
+2000-09-29 Hans-Peter Nilsson <hp@axis.com>
+
+ Changes to handle varying register prefix and user symbol prefix.
+ * config/tc-cris.c (SYNTAX_RELAX_REG_PREFIX,
+ SYNTAX_ENFORCE_REG_PREFIX, SYNTAX_USER_SYM_LEADING_UNDERSCORE,
+ SYNTAX_USER_SYM_NO_LEADING_UNDERSCORE, REGISTER_PREFIX_CHAR): New.
+ (s_syntax, cris_force_reg_prefix, cris_relax_reg_prefix,
+ cris_sym_leading_underscore, cris_sym_no_leading_underscore): New.
+ (demand_register_prefix): New variable.
+ (md_pseudo_table): New pseudo ".syntax".
+ (md_longopts): New options --no-underscore and --underscore.
+ (cris_target_format): Return elf32-us-cris or elf32-cris depending
+ on symbols_have_leading_underscore.
+ (get_gen_reg): Accept or require REGISTER_PREFIX_CHAR.
+ (get_spec_reg): Ditto.
+ (cris_number_to_imm) <case BFD_RELOC_VTABLE_ENTRY>: Remove FIXME.
+ Fix formatting.
+ (md_parse_option) <case 'h' 'H'>: Deprecate; add reference to
+ --help.
+ <case OPTION_NO_US, case OPTION_US>: New.
+ (md_show_usage): Be brief and reformat to match continuation of
+ --help.
+ * po/gas.pot: Regenerate.
+
+2000-09-28 Alan Modra <alan@linuxcare.com.au>
+
+ * config/tc-hppa.c (hppa_force_relocation): If OBJ_SOM, don't
+ force relocs for 12 bit branches.
+ (md_apply_fix): Similarly, adjust logic here.
+
+2000-09-28 Alan Modra <alan@linuxcare.com.au>
+
+ * config/tc-hppa.c (md_apply_fix): Add fmt assertion. Don't
+ adjust for external and weak syms as we will use a reloc. Allow
+ for +8 offset when calculating limits of branches.
+ (hppa_fix_adjustable): Undo 2000-09-23 change.
+ (hppa_force_relocation): Likewise. Add fx_addsy assertion.
+ Correct distance calculation.
+ (tc_gen_reloc): Print the file name and line number if we can't
+ handle a fixup.
+
+ From John David Anglin <dave@hiauly1.hia.nrc.ca>
+ * config/tc-hppa.c (nonzero_dibits): Define.
+ (arg_reloc_stub_needed): Check each arg and return value
+ separately for zero case.
+ (pa_align): Declare argument `bytes'.
+
+2000-09-25 Kazu Hirata <kazu@hxi.com>
+
+ * config/tc-cris.c: Fix formatting.
+ * config/tc-d10v.h: Likewise.
+ * config/tc-d30v.c: Likewise.
+ * config/tc-d30v.h: Likewise.
+ * config/tc-fr30.c: Likewise.
+ * config/tc-fr30.h: Likewise.
+ * config/tc-m68k.c: Likewise.
+ * config/tc-m68k.h: Likewise.
+ * config/tc-pj.h: Likewise.
+ * config/tc-ppc.c: Likewise.
+ * config/tc-ppc.h: Likewise.
+ * config/tc-sh.c: Likewise.
+ * config/tc-sh.h: Likewise.
+ * config/tc-sparc.c: Likewise.
+ * config/tc-v850.h: Likewise.
+ * config/tc-vax.h: Likewise.
+ * config/tc-w65.h: Likewise.
+ * config/tc-z8k.h: Likewise.
+
+2000-09-23 Alan Modra <alan@linuxcare.com.au>
+
+ * config/tc-hppa.c (hppa_fix_adjustable): Do the external and weak
+ checks only for ELF.
+ (hppa_force_relocation): Likewise.
+
+2000-09-22 Jim Wilson <wilson@cygnus.com>
+
+ * config/tc-ia64.c (dv_sem): Add "stop".
+ (specify_resource, case IA64_RS_PR): Only handles regs 1 to 15 now.
+ (specify_resource, case IA64_RS_PRr): New for regs 16 to 62.
+ (specify_resource, case IA64_RS_PR63): Reorder (note == 7) test to
+ match above.
+ (mark_resources): Check IA64_RS_PRr.
+
+2000-09-22 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+
+ * config/tc-m68k.c (md_relax_table, m68k_ip, md_convert_frag_1,
+ md_estimate_size_before_relax): Redesign and clean up the
+ relaxation mechanism.
+
+2000-09-21 Kazu Hirata <kazu@hxi.com>
+
+ * config/tc-ns32k.c: Fix formatting.
+ * config/tc-ns32k.h: Likewise.
+
+2000-09-20 Kazu Hirata <kazu@hxi.com>
+
+ * config/tc-m32r.c: Fix formatting.
+ * config/tc-m32r.h: Likewise.
+ * config/tc-m68851.h: Likewise.
+ * config/tc-m68hc11.c: Likewise.
+ * config/tc-m68hc11.h: Likewise.
+ * config/tc-m88k.c: Likewise.
+ * config/tc-mcore.c: Likewise.
+ * config/tc-mcore.h: Likewise.
+ * config/tc-mips.c: Likewise.
+ * config/tc-mips.h: Likewise.
+ * config/tc-mn10200.h: Likewise.
+ * config/tc-mn10300.h: Likewise.
+ * config/tc-tahoe.c: Likewise.
+ * config/tc-tahoe.h: Likewise.
+
+2000-09-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+
+ * config/tc-vax.c (synthetic_votstrs): Remove jbssi and jbcci.
+ Likewise in relaxation description comments.
+
+2000-09-18 Alan Modra <alan@linuxcare.com.au>
+
+ * config/tc-hppa.h (TC_FORCE_RELOCATION_SECTION): Allow
+ subtraction of two syms without emitting a relocation.
+
+ From David Huggins-Daines <dhd@linuxcare.com>
+ * config/tc-hppa.c (hppa_force_relocation): Force relocations for
+ global or weak symbols.
+
+2000-09-15 Kazu Hirata <kazu@hxi.com>
+
+ * config/tc-h8300.h: Fix formatting.
+ * config/tc-h8500.c: Likewise.
+ * config/tc-h8500.h: Likewise.
+ * config/tc-hppa.h: Likewise.
+ * config/tc-i370.h: Likewise.
+ * config/tc-i386.h: Likewise.
+ * config/tc-i860.c: Likewise.
+ * config/tc-i860.h: Likewise.
+ * config/tc-i960.h: Likewise.
+ * config/tc-ia64.c: Likewise.
+ * config/tc-ia64.h: Likewise.
+
+2000-09-14 Kazu Hirata <kazu@hxi.com>
+
+ * config/tc-a29k.c: Fix formatting.
+ * config/tc-alpha.c: Likewise.
+ * config/tc-arc.c: Likewise.
+ * config/tc-arc.h: Likewise.
+ * config/tc-arm.c: Likewise.
+ * config/tc-arm.h: Likewise.
+ * config/tc-avr.c: Likewise.
+ * config/tc-avr.h: Likewise.
+ * config/tc-tic30.c: Likewise.
+ * config/tc-tic30.h: Likewise.
+ * config/tc-tic54x.c: Likewise.
+ * config/tc-tic54x.h: Likewise.
+ * config/tc-tic80.c: Likewise.
+ * config/tc-tic80.h: Likewise.
+
+2000-09-14 Timothy Wall <twall@cygnus.com>
+
+ * config/tc-ia64.c (specify_resource): For PR%/PR63, note types of
+ parallel comparisons for later use.
+ (struct rsrc): Add parallel comparison type.
+ (resources_match): Skip special cases of PR usage (non-conflicting
+ parallel compares).
+
+2000-09-13 Kazu Hirata <kazu@hxi.com>
+
+ * config/obj-ecoff.c: Fix formatting.
+ * config/obj-elf.c: Likewise.
+ * config/obj-elf.h: Likewise.
+ * config/obj-evax.h: Likewise.
+ * config/obj-generic.h: Likewise.
+ * config/obj-hp300.c: Likewise.
+ * config/obj-hp300.h: Likewise.
+ * config/obj-ieee.h: Likewise.
+ * config/obj-vms.c: Likewise.
+ * config/obj-vms.h: Likewise.
+
+2000-09-13 Anders Norlander <anorland@acc.umu.se>
+
+ * config/tc-mips.c (md_begin): Recognize 4Kc, 4Km and 4Kp processors.
+ (md_parse_option): Ditto.
+ (md_longopts): Add -mips32 option.
+ (md_show_usage): Document new options.
+ (mips_ip): Assemble sdbbp 20 bit 'm' args for MIPS32.
+ (mips_ip): Assemble mfc0 with a sub-selection code.
+ (validate_mips_insn): Handle 'H' (OP_*_SEL) and 'm' (OP_*_CODE20).
+ (mips_cpu_to_str): New function.
+ (mips_ip): Use mips_cpu_to_str instead of printing numeric cpu value.
+ Use CPU_* defines instead of hardcoded numbers.
+
+ * doc/as.texinfo: Document new options.
+ * doc/c-mips.texi: Ditto.
+
+2000-09-12 Kazu Hirata <kazu@hxi.com>
+
+ * as.h: Fix formatting.
+ * asintl.h: Likewise.
+ * bit_fix.h: Likewise.
+ * config/obj-aout.c: Likewise.
+ * config/obj-aout.h: Likewise.
+ * config/obj-bout.c: Likewise.
+ * config/obj-bout.h: Likewise.
+ * config/obj-coff.c: Likewise.
+ * config/obj-coff.h: Likewise.
+ * dwarf2dbg.h: Likewise.
+ * expr.h: Likewise.
+ * flonum.h: Likewise.
+ * frags.h: Likewise.
+ * itbl-ops.h: Likewise.
+ * macro.h: Likewise.
+ * read.h: Likewise.
+ * sb.h: Likewise.
+ * struc-symbol.h: Likewise.
+ * subsegs.h: Likewise.
+ * symbols.h: Likewise.
+ * tc.h: Likewise.
+ * write.h: Likewise.
+
+2000-09-11 Kazu Hirata <kazu@hxi.com>
+
+ * bignum-copy.c: Fix formatting.
+ * config/tc-i370.c: Likewise.
+ * config/tc-i960.c: Likewise.
+ * config/tc-m68k.c: Likewise.
+ * ehopt.c: Likewise.
+ * flonum-copy.c: Likewise.
+ * flonum-konst.c: Likewise.
+ * flonum-mult.c: Likewise.
+ * literal.c: Likewise.
+ * read.c: Likewise.
+ * sb.c: Likewise.
+ * stabs.c: Likewise.
+ * subsegs.c: Likewise.
+
+2000-09-09 Philip Blundell <philb@gnu.org>
+
+ * configure.in (arm*-*-uclinux*): New target.
+ * configure: Regenerate.
+
+2000-09-09 Kazu Hirata <kazu@hxi.com>
+
+ * input-file.c: Fix formatting.
+ * itbl-ops.c: Likewise.
+ * messages.c: Likewise.
+
+2000-09-08 Philip Blundell <philb@gnu.org>
+
+ * config/tc-arm.c (md_apply_fix3): Correct handling of ADRL when
+ offset is negative.
+
+2000-09-07 H.J. Lu <hjl@gnu.org>
+
+ * configure.in (AC_ISC_POSIX): Put after AC_CANONICAL_SYSTEM.
+ * configure: Rebuild.
+
+2000-09-07 Kazu Hirata <kazu@hxi.com>
+
+ * atof-generic.c: Fix formatting.
+ * config/tc-mips.c: Likewise.
+ * config/tc-vax.c: Likewise.
+ * input-scrub.c: Likewise.
+
+2000-09-07 Alexandre Oliva <aoliva@redhat.com>
+
+ * config/tc-sh.h (TARGET_FORMAT): Use sh-linux targets.
+ * configure.in (sh-*-linux*): Added.
+ * configure: Rebuilt.
+
+2000-09-06 Kazu Hirata <kazu@hxi.com>
+
+ * config/tc-hppa.c: Fix formatting.
+
+ * ecoff.c: Fix formatting.
+
+2000-09-06 Alexandre Oliva <aoliva@redhat.com>
+
+ * configure: Rebuilt with new libtool.m4.
+
+2000-09-05 Kazu Hirata <kazu@hxi.com>
+
+ * cgen.c: Fix formatting.
+ * config/tc-ia64.c: Likewise.
+
+2000-09-05 Nick Clifton <nickc@redhat.com>
+
+ * aclocal.m4: Regenerate.
+ * config.in: Regenerate.
+ * configure: Regenerate.
+ * po/gas.pot: Regenerate.
+
+2000-09-05 Hans-Peter Nilsson <hp@axis.com>
+
+ * config/tc-cris.c: Correct comment typos.
+
+2000-09-05 Eric Christopher <echristo@cygnus.com>
+
+ * config/tc-mn10300.c: Cleanup.
+ (md_pcrel_from): Enable.
+
+2000-09-05 Alan Modra <alan@linuxcare.com.au>
+
+ * expr.c (operand): Fix a comment typo.
+ * write.c (write_relocs): Fix a signed/unsigned warning.
+
+ * config/tc-hppa.c (fudge_reg_expressions): New
+ (hppa_force_reg_syms_absolute): New.
+ (pa_equ): Allow reg_section expressions.
+ * config/tc-hppa.c (md_optimize_expr): Define.
+ (hppa_force_reg_syms_absolute): Prototype.
+
+ * config/tc-hppa.c (pa_11_fp_reg_struct): Delete.
+ (pa_parse_number): Pass in arg to select fp reg parsing.
+ Return 1 to indicate format checks pass. If strict, then only
+ accept a register or register symbol. Return value in...
+ (pa_number): New static for pa_parse_number.
+ (FP_REG_BASE): Define.
+ (FP_REG_RSEL): Define.
+ (pre_defined_registers): Apply FP_REG_BASE and FP_REG_RSEL as
+ appropriate. White space changes.
+ (need_pa11_opcode): Don't bother passing any params, get them from
+ globals instead.
+ (pa_ip): Modify all calls to pa_parse_number and need_pa11_opcode.
+ Remove extraneous check in case 'Q'.
+ (pa_equ): Modify call to pa_parse_number to do strict parsing. If
+ reg, set section of resulting symbol to reg_section.
+ (pa_parse_space_stmt): Modify call to pa_parse_number.
+ (pa_space): Likewise.
+
+ * config/tc-hppa.c: (md_apply_fix): Handle vtable relocs.
+ (hppa_force_relocation): Handle vtable relocs.
+ (pa_vtable_entry): New.
+ (pa_vtable_inherit): New.
+ (md_pseudo_table): Add entries for vtable pseudos.
+ (hppa_fix_adjustable): Reject reduction of R_PARISC_GNU_VTINHERIT
+ and R_PARISC_GNU_VTENTRY relocs. Reject reduction of relocs
+ against weak syms.
+ (tc_gen_reloc): Remove ELF_ARG_RELOC_INSN code.
+ (pa_type_args): Don't call symbol_get_bfdsym multiple times.
+ Set STT_PARISC_MILLICODE for OBJ_ELF when encountering a
+ millicode import.
+ * config/obj-elf.c (obj_elf_type): Allow md_elf_symbol_type to
+ specify a symbol type.
+
+ * config/tc-hppa.h: Reorganize file a little, grouping OBJ_ELF
+ dependent things together.
+ (md_elf_symbol_type): Define.
+
+ * config/tc-hppa.c (fix_new_hppa): Elide "$PIC_pcrel$0" pseudo
+ symbol.
+ * config/tc-hppa.h (tc_frob_symbol): Elide "$PIC_pcrel$0" here too.
+
+ * config/obj-elf.h (obj_elf_vtable_inherit): Declare.
+ (obj_elf_vtable_entry): Declare.
+
+ * config/obj-elf.c (obj_elf_vtable_inherit): Return struct fix *
+ and export function.
+ (obj_elf_vtable_entry): Similarly.
+ (elf_pseudo_table): Fix the damage with a cast.
+
+2000-09-03 Richard Henderson <rth@cygnus.com>
+
+ * config/tc-ia64.c (emit_one_bundle): Stop collecting insns
+ for template selection when a label is needed.
+
+2000-09-02 Kazu Hirata <kazu@hxi.com>
+
+ * config/tc-ia64.c: Fix formatting.
+
+2000-09-02 Nick Clifton <nickc@redhat.com>
+
+ * configure.in: Increase version number to 2.10.91.
+ * configure: Regenerate.
+ * aclocal.m4: Regenerate.
+ * config.in: Regenerate.
+ * po/gas.pot: Regenerate.
+ * Makefile.in: Regenerate.
+
+2000-09-01 Alexandre Oliva <aoliva@redhat.com>
+
+ * config/tc-sh.h [OBJ_ELF] (TC_FIX_ADJUSTABLE): Define.
+ * config/tc-sh.c (md_apply_fix): Map 32-bit relocations that
+ become PC-relative to BFD_RELOC_32_PCREL. Reject 16- or 8-bit
+ similar relocs.
+ (sh_obj_adjustable): Return 1 for PC-relative offsets used in
+ branches.
+
+2000-09-01 Niibe Yutaka <gniibe@m17n.org>, Kaz Kojima <kkojima@rr.iij4u.or.jp>, Alexandre Oliva <aoliva@redhat.com>
+
+ * config/tc-sh.h (DIFF_EXPR_OK, GLOBAL_OFFSET_TABLE_NAME,
+ TC_RELOC_GLOBAL_OFFSET_TABLE, TC_RELOC_RTSYM_LOC_FIXUP): Define.
+ * config/tc-sh.c (sh_elf_cons, sh_elf_suffix): New functions.
+ [OBJ_ELF] (md_pseudo_table) <long, int, word, short>: Use them.
+ (GOT_symbol): New variable.
+ (md_undefined_symbol): Set it.
+
+2000-09-01 Richard Henderson <rth@cygnus.com>
+
+ * config/tc-ia64.c (match): Don't inline.
+ (extra_goodness): New.
+ (md_begin): Prefer nop.f and nop.b for best_template.
+
+2000-08-31 Kazu Hirata <kazu@hxi.com>
+
+ * as.c: Fix formatting.
+ * cond.c: Likewise.
+ * frags.c: Likewise.
+ * macro.c: Likewise.
+
+2000-08-31 Eric Christopher <echristo@cygnus.com>
+
+ * config/tc-mn10300.c: Cleanup and fix warnings.
+ (md_pseudo_table): Add initializers.
+ (md_show_usage): Cleanup.
+ (md_parse_option): Fix warnings.
+ (md_undefined_symbol): Fix warnings.
+ (md_conver_frag): Fix warnings.
+ (tc_gen_reloc): Fix warnings.
+ (md_apply_fix3): Fix warnings.
+ (check_operand): Fix warnings.
+
+2000-08-31 Alexandre Oliva <aoliva@redhat.com>
+
+ * acinclude.m4: Include libtool and gettext macros from the
+ top level.
+ * aclocal.m4, configure: Rebuilt.
+
+2000-08-30 Mark Hatle <mhatle@mvista.com>
+
+ * config/tc-ppc.c (md_parse_option): Recognize -m405.
+
+2000-08-31 Kazu Hirata <kazu@hxi.com>
+
+ * listing.c: Fix formatting.
+
+2000-08-29 Kazu Hirata <kazu@hxi.com>
+
+ * app.c: Fix a comment typo. Fix formatting.
+
+2000-08-25 J. David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * config/tc-vax.c (md_convert_frag): Correctly calculate the pc relative
+ offset of the target destination for jmp instructions.
+ (md_assemble): Change mode to VAX_ABSOLUTE_MODE as per comments.
+
+2000-08-24 Hans-Peter Nilsson <hp@axis.com>
+
+ * NEWS: Mention support for CRIS.
+
+2000-08-24 Denis Chertykov <denisc@overta.ru>
+
+ * config/tc-avr.h (TC_IMPLICIT_LCOMM_ALIGNMENT): New macros.
+ Sets `.lcomm' alignment to zero.
+
+2000-08-23 Alexandre Oliva <aoliva@redhat.com>
+
+ * config/tc-i386.h (OBJ_MAYBE_ELF, OBJ_MAYBE_COFF,
+ TC_FIX_ADJUSTABLE): Define.
+
+2000-08-23 Jim Wilson <wilson@cygnus.com>
+
+ * config/tc-ia64.c (output_unw_records): Set U & E flags only if
+ unwind.personality_routine is set.
+
+2000-08-23 H.J. Lu <hjl@gnu.org>
+
+ * write.c (TC_FIX_ADJUSTABLE): Remove the duplicate.
+
+2000-08-23 Alexandre Oliva <aoliva@redhat.com>
+
+ * config/tc-i386.h (TC_FIX_ADJUSTABLE): Do *NOT* define if target
+ environment is pe.
+
+2000-08-22 H.J. Lu <hjl@gnu.org>
+
+ * config.in (STRICTCOFF): New for strict COFF.
+
+ * configure.in: Define STRICTCOFF for i386-*-msdosdjgpp*,
+ i386-*-go32* and i386-go32-rtems*.
+ * configure: Rebuilt.
+
+ * config/obj-coff.c (obj_coff_endef): Follow the historical
+ behavior if STRICTCOFF is not defined.
+
+ * doc/internals.texi: Document STRICTCOFF.
+
+2000-08-22 Alexandre Oliva <aoliva@redhat.com>
+
+ * write.c (TC_FIX_ADJUSTABLE): Define to 1, if not defined.
+ (fixup_segment) Use it instead of TC_DONT_FIX_NON_ADJUSTABLE.
+ * config/tc-i386.h (TC_DONT_FIX_NON_ADJUSTABLE): Remove.
+ <OBJ_ELF, OBJ_COFF, TE_PE> (TC_FIX_ADJUSTABLE): Define.
+ * config/tc-arm.h (TC_DONT_FIX_NON_ADJUSTABLE): Remove.
+ <OBJ_ELF> (TC_FIX_ADJUSTABLE): Define.
+ * config/tc-i960.h, config/tc-m68k.h, config/tc-v850.h:
+ Likewise.
+
+2000-08-22 Eric Christopher <echristo@cygnus.com>
+
+ * config/tc-mn10300.c: (md_apply_fix): New function.
+ (mn10300_force_relocation): New function.
+ (mn10300_fix_adjustable): New function.
+
+ * config/tc-mn10300.h: (TC_FORCE_RELOCATION): Define.
+ (TC_HANDLES_FX_DONE): Define.
+ (obj_fix_adjustable): Define.
+ (MD_APPLY_FIX3): Define.
+ (TC_LINKRELAX_FIXUP): Define.
+
+ * write.c: (TC_LINKRELAX_FIXUP): Define if not
+ previously defined.
+ (fixup_segment): Use TC_LINKRELAX_FIXUP.
+
+ * doc/internals.texi: Document TC_LINKRELAX_FIXUP.
+
+2000-08-21 Jason Eckhardt <jle@cygnus.com>
+
+ * config/tc-i860.c (md_apply_fix3): Do not insert the immediate
+ if the fixup resulted in a relocation.
+
+2000-08-18 Nick Clifton <nickc@redhat.com>
+
+ * config/tc-arm.c (decode_shift): Replace as_tsktsk with as_warn.
+ Make reference to first element of shift_names explicit.
+
+2000-08-18 Alexandre Oliva <aoliva@redhat.com>
+
+ * write.c (fixup_segment) [TC_DONT_FIX_NON_ADJUSTABLE]: Use
+ obj_fix_adjustable() and tc_fix_adjustable() to tell whether to
+ add a symbol's address. Removed all target-specific #ifdefs that
+ used to accomplished the same.
+ * config/tc-v850.h (TC_DONT_FIX_NON_ADJUSTABLE): Define.
+ * config/tc-m68k.h (TC_DONT_FIX_NON_ADJUSTABLE): Define.
+ * config/tc-arm.h (TC_DONT_FIX_NON_ADJUSTABLE): Define.
+ * config/tc-i960.h (TC_DONT_FIX_NON_ADJUSTABLE): Define.
+ * config/tc-i386.h (TC_DONT_FIX_NON_ADJUSTABLE): Define.
+
+2000-08-17 Kazu Hirata <kazu@hxi.com>
+
+ * dwarf2dbg.c: Fix formatting.
+
+2000-08-17 Nick Clifton <nickc@redhat.com>
+
+ * config/tc-arm.c (decode_shift): Allow illegal shifts by zero
+ to be recoded as logical shift lefts by zero.
+
+2000-08-16 Jim Wilson <wilson@cygnus.com>
+
+ * config/tc-ia64.c (specify_resource, case IA64_RS_GR): Handle
+ postincrement modified registers. Handle IA64_OPND_R3_2 addl
+ source registers.
+ (note_register_values): Handle IA64_OPND_R3_2 operands.
+
+2000-08-16 Jason Eckhardt <jle@cygnus.com>
+
+ * config/tc-i860.c (md_operand): Silly typo fixed.
+
+2000-08-16 Nick Clifton <nickc@redhat.com>
+
+ * config/tc-arm.c (struct asm_shift): Delete.
+ (shift[]): Delete.
+ (enum asm_shift_index): New.
+ (struct asm_shift_properties): New.
+ (struct asm_shift_name): New.
+ (shift_properties[]); New.
+ (shift_names[]); New.
+
+ (decode_shift): Use new structures.
+ Issue a warning is "ROR #0" is used.
+ Issue a warning if "ASR #0" or "LSR #0" is used.
+
+ (md_begin): Initialise arm_shift_hsh table from new
+ asm_shift_name array.
+
+2000-08-16 Jakub Jelinek <jakub@redhat.com>
+
+ * config/tc-sparc.c: Kill all warnings.
+ (md_parse_option): Set -32/-64 for -xarch=, allow all -A archs
+ in -xarch= as well.
+ (md_show_usage): Update usage text.
+
+2000-08-16 Nick Clifton <nickc@redhat.com>
+
+ * config/tc-arm.c (do_bx): Warn about "bx px" not being very
+ useful.
+
+2000-08-15 Will Cohen <wcohen@redhat.com>
+
+ * config/tc-sh.h (DWARF2_LINE_MIN_INSN_LENGTH): Defined.
+
+ * config/tc-sh.c (md_assemble): Changed so debug_type
+ test performed for ppi_assemble
+ * config/tc-sh.c: Included dwarf2dbg.h.
+ (debug_line): Defined.
+ (md_assemble): Generates dwarf2 line info.
+ (sh_finalize): New function. Finalize dwarf2 info.
+ (assemble_ppi): Returns size of code generated.
+ (build_Mytes): Returns size of code generated.
+ (md_pseudo_table): Added "file" and "loc" psuedo ops.
+ * config/tc-sh.h (md_end): Defined.
+ (sh_finalize): Declared.
+
+2000-08-15 Alexandre Oliva <aoliva@redhat.com>
+
+ * config/tc-sh.c (md_apply_fix) [BFD_RELOC_32, BFD_RELOC_16]: Use
+ md_number_to_chars.
+
+2000-08-14 Nick Clifton <nickc@redhat.com>
+
+ * config/tc-arm.c (do_bx): Allow "bx pc".
+
+2000-08-14 Jim Wilson <wilson@cygnus.com>
+
+ * config/tc-ia64.c (md_longopts): Add -mconstant-gp and -mauto-pic.
+ (md_parse_option): Add OPTION_MCONSTANT_GP and OPTION_MAUTO_PIC.
+ (md_begin): Change assignment to md.flag to OR in the new bit.
+
+2000-08-14 Mark Elbrecht <snowball3@bigfoot.com>
+
+ * config/obj-coff.c (obj_coff_endef) [BFD_ASSEMBLER]: Set the debug
+ flag for storage types C_ARG, C_REGPARM, C_FIELD, C_MOS, C_MOE,
+ C_MOU, and C_EOS.
+
+2000-08-14 Jason Eckhardt <jle@cygnus.com>
+
+ * NEWS: Mention i860 support.
+
+2000-08-14 Jeffrey A Law (law@cygnus.com)
+
+ * config/tc-mn10300.h (DWARF2_LINE_MIN_INSN_LENGTH): Define.
+
+2000-08-14 Andreas Schwab <schwab@suse.de>
+
+ * doc/c-arm.texi (ARM Directives): Fix warnings from makeinfo.
+
+2000-08-11 Andreas Schwab <schwab@suse.de>
+
+ * doc/c-i860.texi (Opcodes for i860): Remove braces from @item
+ argument.
+
+2000-08-11 Kazu Hirata <kazu@hxi.com>
+
+ * expr.c: Fix formatting.
+ * config/obj-bout.c: Likewise.
+
+2000-08-10 Jason Eckhardt <jle@cygnus.com>
+
+ * doc/c-i860.texi: Flesh out the i860 section more.
+
+2000-08-10 Kazu Hirata <kazu@hxi.com>
+
+ * symbols.c: Fix formatting.
+ * expr.c: Likewise.
+
+2000-08-09 Diego Novillo <dnovillo@cygnus.com>
+
+ * config/tc-i386.c (md_assemble): Skip suffix check if the opcode
+ modifier has the IgnoreSize bit set.
+
+2000-08-09 Alan Modra <alan@linuxcare.com.au>
+
+ From Rodney Brown <RodneyBrown@mynd.com>
+ * configure.in: Use elf on Unixware 7 (i586-sco-sysv5uw7.1.0)
+ * configure: Regenerate.
+
+2000-08-09 Kazu Hirata <kazu@hxi.com>
+
+ * hash.c: Fix formatting.
+ * gasp.c: Likewise.
+
+2000-08-08 Jason Eckhardt <jle@cygnus.com>
+
+ * config/tc-i860.h: Rework completely for BFD_ASSEMBLER.
+ (i860_fix_info): New enum.
+ (MD_APPLY_FIX3): Define.
+ (WORKING_DOT_WORD): Define.
+ (TC_HANDLES_FX_DONE): Define.
+ (DIFF_EXPR_OK): Define.
+ (LISTING_HEADER): Define.
+ (TARGET_FORMAT): Select target format based on endian flag.
+ (TARGET_BYTES_BIG_ENDIAN): Default to little endian.
+ (target_big_endian): Add external declaration.
+
+ * config/tc-i860.c: All existing code reworked completely. Other
+ new code shown below.
+ (SYNTAX_SVR4): Define.
+ (target_warn_expand): New variable.
+ (md_shortopts): Declare and define (-Qy, -Qn, and -V options).
+ (md_longopts): Declare and define with new options (-EL, -EB,
+ and -mwarn-expand).
+ (md_show_usage): New function.
+ (md_operand): New function.
+ (obtain_reloc_for_imm16): New function.
+ (md_apply_fix3): New function.
+ (tc_gen_reloc): New function.
+
+2000-08-08 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * config/tc-m68hc11.c (build_jump_insn): Make sure the
+ 2 bytes of the jump address are in the same frag.
+ (find): Accept 68hc12 register indirect modes.
+
+ * NEWS: Mention 68HC11 & 68HC12 support.
+
+2000-08-07 Richard Henderson <rth@cygnus.com>
+
+ * config/tc-ia64.c (unwind): Add prologue_mask member.
+ (dot_vframe): Elide psp_gr record if it overlaps prologue_gr.
+ (dot_save): Likewise for pfs_gr, rp_gr, and preds_gr.
+ (dot_body): Clear unwind.prologue_mask.
+ (dot_prologue): Set it. Accept a register second argument.
+
+2000-08-07 Kazu Hirata <kazu@hxi.com>
+
+ * config/atof-ieee.c: Fix formatting.
+ * config/atof-tahoe.c: Likewise.
+
+2000-08-06 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-sparc.c (md_begin): Fix typo in recent formatting
+ work.
+
+ * doc/as.texinfo (Pseudo Ops): Update to include descriptions
+ of .popsection, .previous, .pushsection, .subsection,
+ .version, .vtable_entry, .vtable_inherit and .weak.
+
+2000-08-05 Kazu Hirata <kazu@hxi.com>
+
+ * config/tc-cris.c: Fix formatting.
+ * config/tc-i386.c: Likewise.
+ * config/tc-sparc.c (sparc_ip): Simplify the code.
+
+2000-08-04 Kazu Hirata <kazu@hxi.com>
+
+ * config/tc-cris.c: Rearrange code for readability.
+ * config/tc-d10v.c: Fix formatting.
+ * config/tc-m32r.c: Likewise.
+ * config/tc-sparc.c: Likewise.
+
+2000-08-02 Jim Wilson <wilson@cygnus.com>
+
+ * config/tc-ia64.c (emit_one_bundle): Call ia64_free_opcode
+ before ia64_find_opcode.
+ (md_assemble): Likewise.
+
+2000-08-01 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-arm.c (do_mrs): Fix skip of 'cpsr_all' flag.
+ Undo some formatting fixes.
+
+2000-08-01 Kazu Hirata <kazu@hxi.com>
+
+ * config/obj-som.c: Fix formatting.
+ * config/obj-ieee.c: Likewise.
+ * config/tc-arm.c: Likewise.
+ * config/tc-v850.c: Likewise.
+
+2000-08-01 Nick Clifton <nickc@redhat.com>
+
+ * doc/c-m68k.texi (section M680x0 Options): Turn into a table
+ index by command line option.
+
+2000-08-01 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+
+ * doc/c-m68k.texi (@cindex @samp{--pcrel}): Rewrite option description.
+ (@node M68K-Branch): Rewrite to match the reality.
+
+2000-07-31 Jason Eckhardt <jle@cygnus.com>
+
+ * doc/c-i860.texi: New file.
+ * doc/Makefile.am (CPU_DOCS): Add c-i860.texi.
+ * doc/Makefile.in: Regenerate.
+ * doc/all.texi: Add I860 as relevant architecture.
+ * doc/as.texinfo: Include i860 dependent file c-i860.texi.
+
+2000-07-31 Kazu Hirata <kazu@hxi.com>
+
+ * config/tc-d30v.c: Fix formatting.
+
+2000-07-31 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+
+ * config/tc-m68k.c (flag_keep_pcrel, OPTION_PCREL): Add --pcrel option.
+ (md_convert_frag_1, md_estimate_size_before_relax): When making DBcc
+ long emit a long branch if available instead of an absolute jump, never
+ emit absolute jumps for anything with --pcrel.
+
+ * doc/c-m68k.texi: Document new command line option.
+
+2000-07-29 Marek Michalkiewicz <marekm@linux.org.pl>
+
+ * config/tc-avr.c: Use PARAMS macro in function declarations.
+ Don't declare md_pcrel_from_section (already in tc-avr.h).
+ (avr_operands): Use AVR_UNDEF_P and AVR_SKIP_P macros.
+ (avr_operand): Don't set (unsigned) op_mask to -1.
+
+2000-07-28 Jason Eckhardt <jle@cygnus.com>
+
+ * configure.in: Add bits for i860-stardent-{sysv4, elf}*.
+ * configure: Regenerated.
+ * config/obj-elf.c (obj_elf_type): Recognize a fifth type
+ of operand to the .type directive (.e.g, "type").
+
+2000-07-28 Alan Modra <alan@linuxcare.com.au>
+
+ * as.h (warn_comment, found_comment, found_comment_file): Declare.
+ * app.c (do_scrub_chars): Record where first comment found.
+ * read.c (read_a_source_file): Init found_comment on entry, and
+ notify whether comments found on exit.
+ * config/tc-hppa.c (md_shortopts): Add "c".
+ (md_longopts): Add warn-comment.
+ (md_parse_option): Handle it.
+ (md_show_usage): Show available options.
+ * config/tc-hppa.h (WARN_COMMENTS): Define if TE_LINUX
+
+2000-07-27 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * config/tc-mn10300.c (md_convert_frag): Fix printfs.
+ (tc_gen_reloc): Add cast when assigning bfd_abs_symbol to
+ sym_ptr_ptr
+ (md_estimate_size_before_relax): Don't fall off end of function.
+
+2000-07-27 Kazu Hirata <kazu@hxi.com>
+
+ * config/tc-avr.c: Fix formatting.
+ * config/tc-ns32k.c: Likewise.
+
+2000-07-27 Alan Modra <alan@linuxcare.com.au>
+
+ * config/tc-d10v.c (find_opcode): Remove extraneous `='.
+
+2000-07-27 Kazu Hirata <kazu@hxi.com>
+
+ * config/tc-d10v.c: Fix formatting.
+ * config/tc-z8k.c: Likewise.
+ * config/tc-sparc.c: Likewise.
+
+2000-07-26 Dave Brolley <brolley@redhat.com>
+
+ * cgen.c (queue_fixup): Declare opinfo.
+ (gas_cgen_parse_operand): Mark unused parameters with ATTRIBUTE_UNUSED.
+ (gas_cgen_md_operand): Ditto.
+ (gas_cgen_md_apply_fix3): Ditto.
+
+2000-07-24 Mark Elbrecht <snowball3@bigfoot.com>
+
+ * config/obj-coff.c (obj_frob_symbol): Don't merge
+ labels. Don't merge if the symbol isn't constant. Return
+ immediately if a symbol is merged.
+
+2000-07-22 Alan Modra <alan@linuxcare.com.au>
+
+ * frags.c (frag_align): Correct absolute section alignment.
+
+2000-07-20 DJ Delorie <dj@redhat.com>
+
+ * config/obj-coff.c (obj_frob_symbol): revert previous change,
+ it breaks linking against DLLs.
+
+2000-07-20 Hans-Peter Nilsson <hp@axis.com>
+
+ * configure.in: Add CRIS support.
+ * configure: Regenerate.
+ * Makefile.am: (CPU_TYPES): Add cris.
+ (CPU_OBJ_VALID) [aout]: Add cris.
+ (MULTI_CPU_TYPES): Add cris.
+ (MULTI_CPU_OBJ_VALID) [aout]: Add cris.
+ [coff]: Only i386 and mips are valid.
+ (TARGET_CPU_CFILES): Add config/tc-cris.c.
+ (TARGET_CPU_HFILES): Add config/tc-cris.h.
+ (MULTI_CFILES): Add config/e-crisaout.c and config/e-criself.c.
+ Regenerate dependencies.
+ * Makefile.in: Regenerate.
+ * aclocal.m4: Regenerate.
+ * as.c: Declare crisaout, criself.
+ * config/tc-cris.h, config/tc-cris.c: New.
+ * config/e-criself.c, config/e-crisaout.c: New.
+ * po/POTFILES.in, po/gas.pot: Regenerate.
+
+2000-07-20 Kazu Hirata <kazu@hxi.com>
+
+ * read.c: Fix formatting.
+ * write.c: Fix formatting.
+
+2000-07-19 H.J. Lu <hjl@gnu.org>
+
+ * sb.c: Include <stdlib.h> if exists for abort ().
+
+2000-07-19 Alan Modra <alan@linuxcare.com.au>
+
+ * config/tc-hppa.c (hppa_fix_adjustable): Correct LR%/RR% comment.
+ (arg_reloc_stub_needed): #ifdef OBJ_SOM, not #ifdef SOM.
+ (pa_type_args): Same here.
+
+2000-07-17 Mark Elbrecht <snowball3@bigfoot.com>
+
+ * config/obj-coff.c (obj_frob_symbol): Don't merge labels. Don't
+ merge if the symbol isn't constant. Don't call S_SET_EXTERNAL if
+ the storage class is already set.
+
+2000-07-17 Kazu Hirata <kazu@hxi.com>
+
+ * config/tc-m68hc11.c: Fix formatting.
+ * config/tc-mn10200.c: Likewise.
+ * config/tc-mn10300.c: Likewise.
+ * config/tc-pj.c: Likewise.
+ * config/tc-tic80.c: Likewise.
+ * config/tc-w65.c: Likewise.
+
+2000-07-17 Frank Ch. Eigler <fche@redhat.com>
+
+ * expr.c (operand): Permit %bin literals if LITERAL_PREFIXPERCENT_BIN
+ is defined.
+
+2000-07-15 Ian Lance Taylor <ian@zembu.com>
+
+ * doc/c-mips.texi (MIPS Opts): Remove erroneous space after
+ @code.
+
+2000-07-15 Alan Modra <alan@linuxcare.com.au>
+
+ * config/tc-hppa.c (hppa_fix_adjustable): Use the same checks for
+ ELF as are used for SOM (except the 32-bit reloc one) to decide
+ whether a symbol can be reduced to a section symbol. Expand on
+ the comment for symbols involved in LR% and RR% expressions.
+
+2000-07-14 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-mips.c (mips_disable_float_construction): New
+ static variable. Set to true if doubles should not be
+ constructed by loading two single width fp registers with
+ halves of the value.
+ (mips_ip): Test mips_disable_float_construction.
+ (md_longopts): Add command line switches --construct-floats
+ and --no-construct-floats.
+ (md_parse_option): Parse new command line options.
+ (md_show_usage): Describe new command line options.
+
+ * doc/c-mips.texi: Document new command line options.
+
+2000-07-13 Koundinya K <kk@ddeorg.soft.net>
+
+ * configure.in: Remove the test /usr/dde for mips-*-sysv4*MP*
+ * configure: Regenerate.
+
+2000-07-13 Hans-Peter Nilsson <hp@axis.com>
+
+ * configure.in (DEFAULT_EMULATION setting): Revert part of
+ 2000-07-01 change that set te_multi=multi unless set to tmips.
+ * configure: Regenerate.
+
+2000-07-12 Mark Elbrecht <snowball3@bigfoot.com>
+
+ * config/obj-coff.c (coff_frob_section): Add padding to the last
+ section when aligning it increases its size.
+
+2000-07-11 Kazu Hirata <kazu@hxi.com>
+
+ * config/tc-tic54x.c: Fix formatting.
+
+2000-07-10 Kazu Hirata <kazu@hxi.com>
+
+ * config/tc-h8500.c: Fix formatting.
+ * config/tc-tic54x.c: Fix formatting.
+
+2000-07-10 Alan Modra <alan@linuxcare.com.au>
+
+ * config/tc-hppa.c (md_apply_fix): Check fmt 12 and 22 pc-rel
+ displacements correctly.
+
+ * read.h (s_abort): Add ATTRIBUTE_NORETURN.
+
+2000-07-10 Ryan Bradetich <rbradetich@uswest.net>
+
+ * hash.c (hash_insert): Add cast to obstruct_alloc to fix
+ warning.
+ (hash_jam): Ditto.
+
+2000-07-09 Alan Modra <alan@linuxcare.com.au>
+
+ From David Huggins-Daines <dhd@linuxcare.com>
+ * config/te-hppalinux64.h: Add a new emulation.
+ * configure.in (emulations): Add configure bits to support the
+ 64-bit Linux/parisc target.
+ * configure: Regenerate.
+
+ * config/tc-hppa.c (md_parse_option): Support `-V' for ELF.
+ (md_shortopts): Add `V' for ELF.
+
+ * config/tc-hppa.c (arg_reloc_stub_needed): Define as zero except
+ when SOM or ELF_ARG_RELOC are defined.
+ (pa_type_args): Only set symbol_arg_reloc_info when SOM or
+ ELF_ARG_RELOC are defined.
+ (pa_stringer_aux): Don't pa_check_current_space_and_subspace here..
+ (pa_stringer): ..Do it here instead. Fix comment typos.
+ (hppa_force_relocation): Cast enums to int before comparing with
+ ints.
+
+ From Ryan Bradetich <rbradetich@uswest.net>
+ * config/tc-hppa.c: Removed unneeded libbfd.h to fix macro
+ redifinition warning.
+ (md_apply_fix): Added cast from enum to int for fixP->fx_r_type.
+ (hppa_force_relocation): ditto
+ (md_apply_fix): Added cast to buf to fix warnings.
+
+ * config/tc-hppa.h (pa_define_label, parse_cons_expression_hppa,
+ cons_fix_new_hppa, hppa_force_relocation): Prototype.
+
+ * config/tc-hppa.c (reloc_type): It's an enum for OBJ_ELF.
+ (R_N0SEL, R_N1SEL): Define only for OBJ_SOM.
+ (tc_gen_reloc): Make `code' a reloc_type and `codes' a
+ reloc_type** to avoid warnings in switch.
+ (md_apply_fix): Make insn, val signed. Zap buf_wd and read insn a
+ little earlier instead.
+
+ * config/tc-hppa.c (symbol_arg_reloc_info): Define for both som
+ and elf.
+ (pa_type_args): Use symbol_arg_reloc_info.
+ (struct pa_it): Make arg_reloc unsigned int.
+ (struct hppa_fix_struct): Likewise for fx_arg_reloc.
+ (pa_text, pa_data, pa_comm): Don't compile for TE_LINUX.
+ (pa_code): Delete. pa_text duplicates this function.
+ (md_pseudo_table): Call obj_elf_text for ".code" if TE_LINUX.
+ (fix_new_hppa): Argument offset is offsetT, arg_reloc is unsigned
+ int.
+ (cons_fix_new_hppa): Actually change selector to e_fsel when
+ warning about assuming so.
+ (tc_gen_reloc): More example elf arg reloc code.
+ (md_apply_fix): Use arg_reloc_stub_needed for elf too.
+ (hppa_force_relocation): Likewise.
+
+ * config/tc-hppa.h: Use TARGET_ARCH_SIZE to select target include
+ files.
+ (pa_end_of_source): Prototype.
+ (hppa_fix_adjustable): Prototype.
+ (LABELS_WITHOUT_COLONS): Move it..
+ * config/te-hppa.h: To here.
+
+ * config/te-hppa64.h: New file.
+
+ * config/tc-hppa.c: Use TARGET_ARCH_SIZE to select target reloc
+ type.
+ (md_apply_fix): Pass stdoutput to bfd_hppa_insn2fmt. Handle
+ format -10, -16, 16 relocs.
+ (hppa_elf_mark_end_of_function): Test for null
+ last_call_info->start_symbol
+
+ * config/tc-hppa.c (pa_ip): In case 'V', pass `strict' to
+ CHECK_FIELD, not INSERT_FIELD_AND_CONTINUE. Don't pass opcode to
+ re_assesmble_* functions. Delete extraneous statements. Fix
+ typos in comments.
+ (md_apply_fix): Compare against 1048575 in case 21. Don't pass
+ insn to re_assemble_*.
+
+2000-07-08 Ulf Carlsson <ulfc@engr.sgi.com>
+
+ * doc/internals.texi (Expressions): Fix typo.
+
+2000-07-08 Kazu Hirata <kazu@hxi.com>
+
+ * config/tc-sh.c: Fix formatting.
+ * config/tc-tic54x.c: Fix formatting.
+ * depend.c: Fix formatting.
+ * flonum-konst.c: Likewise.
+ * flonum-mult.c: Likewise.
+
+2000-07-07 Kazu Hirata <kazu@hxi.com>
+
+ * config/tc-sh.c: Fix comments.
+ * config/obj-vms.c: Fix comments.
+ * config/tc-a29k.c: Likewise.
+ * config/tc-alpha.c: Likewise.
+ * config/tc-h8300.c: Likewise.
+ * config/tc-h8500.c: Likewise.
+ * config/tc-i370.c: Likewise.
+ * config/tc-ia64.c: Likewise.
+ * config/tc-m68hc11.c: Likewise.
+ * config/tc-m68k.c: Likewise.
+ * config/tc-mips.c: Likewise.
+ * config/tc-ns32k.c: Likewise.
+ * config/tc-ppc.c: Likewise.
+ * config/tc-z8k.c: Likewise.
+
+2000-07-06 Mark Elbrecht <snowball3@bigfoot.com>
+
+ * config/obj-coff.c (TC_COFF_SECTION_DEFAULT_ATTRIBUTES): New.
+ Default to '(SEC_LOAD | SEC_DATA)'.
+ (obj_coff_section) [BFD_ASSEMBLER]: Use it.
+
+ * doc/internals.texi (CPU Backend): Describe
+ TC_COFF_SECTION_DEFAULT_ATTRIBUTES.
+
+2000-06-06 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * as.c (parse_args): NULL terminate the long option list.
+
+2000-06-04 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * config/tc-d30v.h: Include "write.h" for fixS.
+ (d30v_start_line, md_pcrel_from_section): Add function prototypes.
+
+2000-07-05 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-d30v.c (write_2_short): Further changes to warning
+ messages produced when combining EITHER_BUT_PREFER_MU attributed
+ opcodes.
+
+2000-07-05 DJ Delorie <dj@redhat.com>
+
+ * MAINTAINERS: new
+
+2000-07-04 Alexandre Oliva <aoliva@redhat.com>
+
+ * config/tc-arm.c (psrs): Accept combinations of flags.
+
+2000-07-03 Marek Michalkiewicz <marekm@linux.org.pl>
+
+ * config/tc-avr.c: Change _ () to _() around all strings marked
+ for translation (exception from the usual coding style).
+ (avr_opt): New struct variable, how the new switches are set.
+ (OPTION_MMCU): Define as 'm' and actually use.
+ (md_longopts): Add -mall-opcodes, -mno-skip-bug, -mno-wrap.
+ (show_mcu_list): New function, display the list of known MCUs.
+ (md_show_usage): Document the new switches. Call show_mcu_list.
+ (avr_set_arch): Change 'm' to OPTION_MMCU.
+ (md_parse_option): Call show_mcu_list if unknown MCU specified.
+ Handle the new switches.
+ (avr_operands): Disable warnings for undefined combinations of
+ operands if -mall-opcodes. Disable warnings for skipping two-word
+ instructions if enhanced core or -mno-skip-bug.
+ (avr_operand): Accept all addressing modes on avr1 if -mall-opcodes.
+ (md_apply_fix3): Reject 8K wrap if >8K or -mno-wrap.
+ (md_assemble): Accept opcodes not supported by MCU if -mall-opcodes.
+ (avr_ldi_expression): Warn about implicit lo8().
+ * config/tc-avr.h (md_pcrel_from_section): Add prototype.
+
+2000-07-01 Koundinya K <kk@ddeorg.soft.net>
+
+ * configure.in: Add entry for mips-*-sysv4*MP*
+ * configure: Rebuild
+ * config/tc-mips.c (mips_target_format): Return elf32-tradbigmips or
+ elf32-tradlittlemips for traditional mips targets.
+ * config/tc-mips.c (md_estimate_size_before_relax): Duplicate the
+ test for Link Once sections as in adjust_reloc_syms.
+ * config/te-tmips.h: New file for traditional mips targets. Define
+ TE_TMIPS.
+
+2000-06-29 Mark Elbrecht <snowball3@bigfoot.com>
+
+ * config/obj-coff.c (obj_coff_setcion) [BFD_ASSEMBLER]: If the
+ flags argument is not present, don't change an existing section's
+ section's attributes. If the flags argument is present, warn if the
+ attributes don't match the section's current attributes. When
+ long section names are supported, set SEC_LINK_ONCE and
+ SEC_LINK_DUPLICATES_DISCARD for a new .gnu.linkonce section.
+
+2000-06-29 Hans-Peter Nilsson <hp@axis.com>
+
+ * config/obj-aout.c (obj_aout_type): Do not ignore for undefined
+ symbols; create them.
+
+2000-06-29 Mark Elbrecht <snowball3@bigfoot.com>
+
+ * write.c (set_segment_vma): New: Set vma and lma for a segment.
+ (write_object_file) [BFD_ASSEMBLER && OBJ_COFF && TE_GO32]: Use it.
+
+2000-06-27 Aldy Hernandez <aldyh@redhat.com>
+
+ * config/tc-mips.c (mips_ip): handle "(foo-.-4)" type of
+ expressions. Ignore the problem when handling 16 bit signed
+ immediates, because the assembler will take care of the relocation
+ later.
+
+2000-06-27 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-d30v.c (write_2_short): Do not allow opcodes with
+ the EITHER_BUT_PREFER_MU attribute to be combined into a reverse
+ sequential order, and emit warning messages if the input source
+ code contains constructs like that, or parallel constructs
+ containing such opcodes.
+
+2000-06-26 Marek Michalkiewicz <marekm@linux.org.pl>
+
+ * config/tc-avr.c (mcu_types): Rename avr4 to avr5, add avr4.
+ Add more MCU types for avr4 and avr5. Replace at94k{10,20,40}
+ with just at94k. Change AVR_ISA_85xx back to AVR_ISA_2xxx.
+ (md_show_usage): Update usage message.
+ (md_parse_option): Allow redefinition of MCU type within the
+ same avr[1-5] bfd machine type. Show both old and new MCU type
+ in the error message.
+ (md_apply_fix3): Support 8K wrap if AVR_ISA_MEGA is not set.
+ Simplify 8K wrap code.
+
+2000-06-25 Kazu Hirata <kazu@hxi.com>
+
+ * config/obj-aout.c: Remove all uses of DEFUN.
+ * config/obj-ieee.c: Likewise.
+ * config/tc-sh.c: Fix comment typos.
+ * config/tc-tahoe.c: Likewise.
+ * config/tc-vax.c: Likewise.
+ * config/tc-w65.c: Likewise.
+ * config/tc-z8k.c: Likewise.
+ * config/tc-h8300.c (build_bytes): Assemble ldmac correctly.
+
+2000-06-24 DJ Delorie <dj@cygnus.com>
+
+ * config/tc-i386.c (md_estimate_size_before_relax): Revert
+ more changes from Sept 1999
+ (tc_i386_fix_adjustable): ditto
+ (md_apply_fix3): ditto
+
+2000-06-24 Frank Ch. Eigler <fche@redhat.com>
+
+ * cgen.c (expr_jmp_buf_p): New validity flag for expr_jmp_buf.
+ (gas_cgen_parse_operand): Set it around expression() call.
+ (gas_cgen_md_operand): Test for it before longjmp().
+
+2000-06-24 Kazu Hirata <kazu@hxi.com>
+
+ * config/tc-h8500.c: Remove all uses of DEFUN.
+ * config/tc-sh.c: Likewise.
+ * config/tc-w65.c: Likewise.
+ * config/tc-z8k.c: Likewise.
+
+ * config/tc-h8500.c: Fix typos in comments.
+
+2000-06-23 Frank Ch. Eigler <fche@redhat.com>
+
+ * expr.c (operand): Permit $hex literals if LITERAL_PREFIXDOLLAR_HEX
+ is defined.
+
+2000-06-23 matthew green <mrg@redhat.com>
+
+ * expr.c (operand): Do not as_bad() if RELAX_PAREN_GROUPING is
+ defined. Fix error message for `[' grouping.
+
+2000-06-22 Kazu Hirata <kazu@hxi.com>
+
+ * config/tc-h8300.c: Fix formatting and comment typos.
+
+2000-06-22 Timothy Wall <twall@cygnus.com>
+
+ * config/tc-ia64.c (note_register_values): Move premature QP
+ notation clearing into the appropriate place.
+
+2000-06-22 Alan Modra <alan@linuxcare.com.au>
+
+ * dep-in.sed: Escape literal `.'s on patterns. Trim off `../'
+ first before anything else. Add bin-bugs.h, emul.h and progress.h
+ Sort list of files as for $(OBJS) in Makefile.am.
+
+ * Makefile.am (DEP): grep for leading `/' in DEPA, and fail if we
+ find one. Remake dependencies.
+ ($(OBJS)): Add bin-bugs.h, emul.h, and progress.h Sort the list.
+ * Makefile.in: Regenerate.
+ * doc/Makefile.in: Regenerate.
+
+ * config/tc-i386.c (i386_displacement): Don't assume a constant
+ displacement is necessarily 16 bits when in 16 bit code mode.
+ (md_assemble): Instead size the displacement here after we know
+ for sure that a .code16gcc operand hasn't automatically added
+ operand size prefixes.
+
+2000-06-21 H.J. Lu <hjl@gnu.org>
+
+ * Makefile.am: Rebuild dependency.
+ * Makefile.in: Rebuild.
+
+2000-06-21 Kazu Hirata <kazu@hxi.com>
+
+ * config/tc-h8300.c (parse_reg): Make the function static.
+ (parse_exp): Likewise.
+
+2000-06-20 DJ Delorie <dj@cygnus.com>
+
+ * config/tc-i386.c (tc_i386_fix_adjustable): Revert change from
+ Sept 1999; RVA relocs need to be treated more like DIR32 relocs
+ for cygwin import libraries to work properly.
+
+2000-06-20 H.J. Lu <hjl@gnu.org>
+
+ * Makefile.am: Rebuild dependency.
+ * Makefile.in: Rebuild.
+ * configure: Likewise.
+ * doc/Makefile.in: Likewise.
+
+2000-06-20 Timothy Wall <twall@cygnus.com>
+
+ * doc/internals.texi (CPU backend): Add @itemx for
+ TC_START_LABEL_WITHOUT_COLON.
+ * doc/c-tic54x.texi: New.
+ * doc/as.texinfo: Add tic54x features and include primary tic54x
+ documentation file.
+ * doc/all.texi: Add C54X.
+ * doc/Makefile.am (CPU_DOCS): Add c-tic54x.texi.
+ * doc/Makefile.in: Regenerate.
+ * configure.in: Add tic54x and define LIBM for tic54x.
+ * configure: Regenrate.
+ * config/tc-tic54x.[ch]: New.
+ * config/obj-coff.h: Add tic54x.
+ * Makefile.am: (CPU_TYPES): Add tic54x.
+ (TARGET_CPU_CFILES): Add 'tc-tic54x.c'.
+ (TARGET_CPU_HFILES): Add 'tc-tic54x.h'.
+ (as_new_LDADD): Add $(LIBM).
+ * Makefile.in: Regenerate.
+
+2000-06-18 Stephane Carrez <stcarrez@worldnet.fr>
+
+ * doc/Makefile.am (CPU_DOCS): Added 68hc11 file.
+ * doc/c-m68hc11.texi: Document 68HC11 and 68HC12 port.
+ * doc/as.texinfo: Likewise.
+
+ * configure, Makefile.in: Regenerate.
+ * configure.in (emulations): Recognize m6811 and m6812.
+ * Makefile.am (CPU_TYPES, TARGET_CPU_CFILES, TARGET_CPU_HFILES):
+ Added files for 68hc11 and 68hc12 assembler.
+ * config/tc-m68hc11.c: Assembler for 68hc11 and 68hc12.
+ * config/tc-m68hc11.h: Header definition for that assembler.
+
+2000-06-18 Nick Clifton <nickc@redhat.com>
+
+ * symbols.c (resolve_symbol_value): Use bfd_octets_per_byte
+ instead of OCTETS_PER_BYTE.
+
+ * config/tc-v850.c: Fix compile time warnings.
+ * config/tc-ppc.c: Fix compile time warnings.
+
+2000-06-18 H.J. Lu <hjl@gnu.org>
+
+ * configure.in: Don't emulate i386-pc-pe-coff with i386coff.
+ * configure: Rebuild.
+
+2000-06-17 Mark Elbrecht <snowball3@bigfoot.com>
+
+ * config/obj-coff.c (obj_coff_weak): Typo fix: Change BFD_ASSEMLER
+ to BFD_ASSEMBLER.
+
+2000-06-16 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-mips.c (md_parse_option): Accept RM5200,RM5230,
+ RM5231, RM5261, RM5721 and RM7000 as r5000 cpu variants.
+
+ * doc/c-mips.texi: Document newly accepted cpu variants.
+
+2000-06-15 Ulf Carlsson <ulfc@engr.sgi.com>
+
+ * config/tc-mips.h: Remove definition of ONLY_STANDARD_ESCAPES.
+
+2000-06-13 Ulf Carlsson <ulfc@engr.sgi.com>
+
+ * macro.c (getstring): Make it possible to escape the quote
+ character.
+
+2000-06-13 Catherine Moore <clm@redhat.com>
+
+ * config/tc-hppa.c (pa_export): Weak symbols can be global.
+
+2000-06-13 H.J. Lu <hjl@gnu.org>
+
+ * configure: Regenerate.
+
+2000-06-09 Alan Modra <alan@linuxcare.com.au>
+
+ * app.c (do_scrub_begin): Don't default lex[';'] as a line
+ separator.
+ * doc/internals.texi (line_separator_chars): Semicolon is no
+ longer a default. Mention null and newline as defaults.
+
+ * read.c (is_end_of_line): Remove ifdef TC_HPPA.
+
+ * config/tc-i386.h (line_separator_chars): Explicitly mention `;'
+ * config/tc-i860.h (line_separator_chars): Likewise.
+ * config/tc-h8300.c (line_separator_chars): Likewise.
+ * config/tc-i960.c (line_separator_chars): Likewise.
+ * config/tc-m68k.c (line_separator_chars): Likewise.
+ * config/tc-mips.c (line_separator_chars): Likewise.
+ * config/tc-ns32k.c (line_separator_chars): Likewise.
+ * config/tc-sparc.c (line_separator_chars): Likewise.
+ * config/tc-vax.c (line_separator_chars): Likewise.
+
+ * config/tc-h8300.c (comment_chars): Use string initialiser.
+ * config/tc-i960.c (line_comment_chars): Likewise.
+ * config/tc-z8k.c (comment_chars, line_comment_chars,
+ line_separator_chars): Likewise.
+
+ * config/tc-arm.c (line_separator_chars): Always use `;', not just
+ for TE_LINUX.
+
+2000-06-08 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-arm.c (cons_fix_new_arm): Assign correct reloc value
+ for size 1 fixes.
+
+2000-06-08 David O'Brien <obrien@FreeBSD.org>
+
+ * configure.in (VERSION): Update to show this is the CVS mainline.
+
+2000-06-08 Matthew Jacob <mjacob@feral.com>
+
+ * config/tc-alpha.c (md_undefined_symbol): Properly understand that
+ $at is the integer register $r28, vs. both $r28 and the floating
+ point register $f28.
+
+2000-06-08 James E. Wilson <wilson@cygnus.com>
+
+ * config/tc-ia64.c (generate_unwind_image): Call ia64_flush_insns.
+ (dot_endp): Don't call ia64_flush_insns.
+ (emit_one_bundle): Don't delete prologue/body records from
+ unwind_record list in first loop. Rewrite second loop to account for
+ this.
+
+2000-06-07 David Mosberger <davidm@hpl.hp.com>
+
+ * config/tc-ia64.c: Add missing prototypes.
+ (generate_unwind_image): Cast argument to output_unw_records call.
+
+2000-06-07 Denis Chertykov <denisc@overta.ru>
+
+ * config/tc-avr.c (avr_operand): fix the formatting of the comment.
+
+2000-06-07 Denis Chertykov <denisc@overta.ru>
+
+ * config/tc-avr.c (AVR_ISA_???): moved to include/opcode/avr.h
+ (REGISTER_P): likewise.
+ (avr_opcodes): uses include/opcode/avr.h
+ (avr_operand): enable ld r,Z or st r,Z for at90s1200.
+
+2000-06-04 Alan Modra <alan@linuxcare.com.au>
+
+ * read.c (is_end_of_line): No ';' for TC_HPPA. Add missing
+ initializers too.
+
+2000-06-03 H.J. Lu <hjl@gnu.org>
+
+ * read.c (is_end_of_line): Put back `;'.
+
+2000-06-03 Alan Modra <alan@linuxcare.com.au>
+
+ * config/tc-i386.c (md_shortopts): Remove 'm', add 'q' to non-elf.
+
+2000-06-01 Alan Modra <alan@linuxcare.com.au>
+
+ * expr.c (operand): Test is_end_of_line outside switch to catch
+ line separator chars that are also operators.
+ (operator): Return O_illegal for line separator chars.
+
+ * read.c (is_end_of_line): Use 1 instead of 99. Don't set `;'
+ entry (or `!' entry for TC_HPPA).
+
+ * config/tc-arm.c (my_get_float_expression): Cast to unsigned char
+ before indexing is_end_of_line. Remove redundant check for '\0'.
+ (fp_op2): Likewise.
+ * config/tc-h8500.c (md_assemble): Likewise.
+ * config/tc-mcore.c (md_assemble): Likewise.
+ * config/tc-tic30.c (tic30_find_parallel_insn): Likewise.
+ (md_atof): Likewise
+
+ * config/tc-m88k.c (s_bss): Cast to unsigned char before indexing
+ is_end_of_line.
+ * config/tc-mcore.c (mcore_cons): Likewise.
+ (mcore_float_cons): Likewise.
+ (mcore_stringer): Likewise.
+ * config/tc-tic30.c (tic30_find_parallel_insn): Likewise.
+
+2000-06-01 Scott Bambrough <scottb@netwinder.org>
+
+ * config/tc-arm.c (do_mrs): Allow SPSR_BIT to be set correctly.
+
+2000-05-29 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-sh.c: Fix compile time warning messages.
+
+ * config/tc-mips.c: Fix compile time warning messages.
+
+2000-05-29 Philip Blundell <philb@gnu.org>
+
+ * doc/as.texinfo: Update copyright dates.
+ (Local Labels): Delete misplaced mention of ARM.
+ * NEWS: Mention ARM ELF support.
+
+2000-05-27 Alexandre Oliva <aoliva@cygnus.com>
+
+ * config/tc-mn10300.c (md_assemble): Copy size to real_size before
+ it is modified, and use the real_size to compute the frag address
+ for dwarf2 line info.
+
+2000-05-27 Alan Modra <alan@linuxcare.com.au>
+
+ * Makefile.am (DEP, DEP1, dep, dep-in, dep-am): Use a better sed
+ line-matching scheme to cope with automake moving variables around.
+ ($(TARG_CPU_O)): Remove dependency on TARG_CPU_DEP_@target_cpu_type@
+ * Makefile.in: Regenerate.
+
+2000-05-26 Jakub Jelinek <jakub@redhat.com>
+
+ * config/tc-sparc.c (sparc_relax): New.
+ (md_longopts): Add -relax and -no-relax options.
+ (md_parse_options, md_show_usage): Likewise.
+ (md_apply_fix3): Optimize tail call into branch always if possible.
+
+2000-05-04 Donald Lindsay <dlindsay@cygnus.com>
+
+ * config/tc-d10v.c (write_2_short, parallel_ok, md_assemble,
+ d10v_cleanup) implement Mitsubishi's newly explained branch-packing
+ rules, with warning when a GAS statement specifies a packing that
+ will result in an instruction being squashed.
+ Added typdef packing_type and enumerals, changed various integer
+ literals to use the enumerals.
+
+2000-05-24 David Mosberger <davidm@hpl.hp.com>
+
+ * config/tc-ia64.c (dot_restorereg_p): New function.
+ (md_pseudo_table): Add restorereg.p.
+ (output_X3_format): Fix typo: record type should be UNW_X3, not UNW_X1.
+ (output_X4_format): Fix typo: record type should be UNW_X4, not UNW_X2.
+
+ * config/tc-ia64.h (unw_record_type): Add unwabi.
+ (unw_r_record): Rename member MASK to GRMASK. Add sub-structure
+ called MASK with members for imask, and the masks produced by
+ fr_mem, gr_mem, br_mem, and frgr_mem.
+ (unw_p_record): Add members ABI and CONTEXT.
+ (unw_x_record): Add member AB.
+ * config/tc-ia64.c (enum reg_symbol): Add REG_PSP and REG_PRIUNAT
+ as pseudo-register for use during unwind info generation.
+ (AR_PFS, AR_LC): New macros.
+ (enum pseudo_type): Add PSEUDO_FUNC_REG to permit declaring registers
+ whose names start with an at sign (as in "@priunat").
+ (pseudo_func): Add "svr4", "hpux", "nt" constants and "priunat"
+ register.
+ (unwind_list, unwind_tail, current_unwind_entry, proc_start,
+ proc_end, unwind_info, personality_routine): Consolidate into
+ "unwind" structure to reduce offset-table use. Add member
+ NEXT_SLOT_NUMBER to track the slot number for the next instruction
+ to be emitted.
+ (output_R1_format, output_R3_format, output_P3_format,
+ output_P6_format): Initialize R with zero to reduce compiler warnings.
+ (output_P7_format): Ditto. Add `default' branch to switch
+ statement to reduce compiler warnings.
+ (output_P8_format, output_B1_format, output_B4_format): Ditto.
+ (output_P4_format): Rename 2nd & 3rd arg to IMASK and IMASK_SIZE.
+ (format_ab_reg): Rename from format_a_b_reg. Merge A and B args
+ into single argument.
+ (output_X1_format, output_X3_format): Initialize R with zero to reduce
+ compiler warnings. Merge A and B args into single argument.
+ (output_X2_format, output_X4_format): Remove unused variable R. Merge
+ A and B args into single argument.
+ (free_record): Removed (wasn't used).
+ (free_list_records): Also free imasks in prologue records.
+ (output_prologue, output_prologue_gr): Initialize mask bits to zero.
+ (output_spill_mask): Remove.
+ (output_unwabi): New function.
+ (output_epilogue, output_label_state, output_copy_state): Call
+ alloc_record.
+ (output_spill_psprel, output_spill_sprel, output_spill_psprel_p,
+ output_spill_sprel_p, output_spill_reg, output_spill_reg_p): Add AB
+ argument.
+ (process_one_record): New locals FR_MASK and GR_MASK. Ignore
+ gr_mem, fr_mem, br_mem, and frgr_mem records and instead emit them
+ as part of handling the prologue records. Emit region's imask if
+ we have one. Handle unwabi, epilogue, label_state, copy_state,
+ spill_psprel, spill_sprel, spill_reg, spill_psprel_p,
+ spill_sprel_p, and spill_reg_p records.
+ (set_imask, count_bits, slot_index): New function.
+ (fixup_unw_records): Fix region size computation. Handle
+ epilogue, spill_reg, spill_sprel, spill_psprel, spill_reg_p,
+ spill_sprel_p, and spill_psprel_p records. Merge mask bits of
+ frgr_mem, fr_mem, gr_mem, br_mem on a per-region basis and
+ set_imask accordingly. Update imask for gr_gr, and br_gr records.
+ (convert_expr_to_ab_reg, convert_expr_to_xy_reg): New function.
+ (dot_save): Use manifest constants for applicaton registers.
+ Handle REG_PR and REG_PRIUNAT.
+ (dot_restore): Don't just ignore it.
+ (dot_restorereg): New function..
+ (generate_unwind_image): Ensure unwind info is a multiple of eight
+ bytes, not just four bytes.
+ (dot_handlerdata, dot_unwentry): Demand empty rest of line.
+ (dot_altrp): Don't just ignore it.
+ (dot_savemem): New function. Replaces dot_savesp() and
+ dot_savepsp(). Use manifest constants for applicaton registers.
+ Handle REG_PR and REG_PRIUNAT.
+ (dot_savef): Simplify.
+ (dot_saveb): Support generation of br_gr.
+ (dot_spillreg, dot_spillmem, dot_spillreg_p, dot_spillmem_p,
+ dot_label_state, dot_copy_state): New function.
+ (dot_unwabi): Don't just ignore it.
+ (md_pseudo_table): Add restorereg, spillreg, spillsp, spillpsp,
+ spillreg.p, spillsp.p, spillpsp, label_state, copy_state,
+ unwabi, vframesp, and vframepsp. Fix typo alprp->altrp.
+ (emit_one_bundle): Set slot number for prologue/body records
+ *before* emitting the first insn.
+ (emit_one_bundle): Set UNWIND.NEXT_SLOT_NUMBER.
+ (md_begin): Declare "psp" pseudo-register.
+ (md_operand): Handle PSEUDO_FUNC_REG. Fix printing of error message
+ so we don't get segfault.
+ (output_psp_sprel): Output sp/psp relative offsets as 4-byte word
+ counts as required per SW Conventions manual
+ (output_rp_psprel, output_rp_sprel, output_pfs_psprel,output_pfs_sprel,
+ output_preds_psprel, output_preds_sprel, output_spill_base,
+ output_unat_psprel, output_unat_sprel, output_lc_psprel,
+ output_lc_sprel, output_fpsr_psprel, output_fpsr_sprel,
+ output_priunat_psprel, output_priunat_sprel, output_bsp_psprel,
+ output_bsp_sprel, output_bspstore_psprel, output_bspstore_sprel,
+ output_rnat_psprel, output_rnat_sprel, output_spill_psprel,
+ output_spill_sprel, output_spill_psprel_p, output_spill_sprel_p):Ditto.
+ (dot_vframe): Implement.
+ (dot_vframesp, dot_vframepsp): New function.
+
+2000-05-23 Hans-Peter Nilsson <hp@axis.com>
+
+ * configure.in (i386-*-freebsd a.out entry): Quote properly.
+ * configure: Regenerate.
+
+2000-05-23 Alan Modra <alan@linuxcare.com.au>
+
+ * config/tc-i386.c (md_assemble): Pass jump reloc in fr_var...
+ (md_estimate_size_before_relax): so we can use it here instead of
+ old kludges. Localise vars to blocks. Comment.
+
+ * frags.c (frag_new): Update fr_var comments.
+ * frags.h (struct frag): Ditto.
+
+2000-05-22 Richard Henderson <rth@cygnus.com>
+
+ * config/tc-ia64.c (FUNC_PC_RELATIVE): New.
+ (pseudo_func): Add pcrel.
+ (operand_match): Handle IA64_OPND_TGT64.
+ (build_insn): Likewise.
+ (md_begin): Initialize pseudo_func[FUNC_PC_RELATIVE].
+ (ia64_gen_real_reloc_type): Handle FUNC_PC_RELATIVE.
+ (fix_insn): Handle all three 64-bit relocation types.
+
+2000-05-22 Hans-Peter Nilsson <hp@axis.com>
+
+ * obj.h (struct format_ops): New members begin, app_file,
+ s_set_other, s_set_desc, s_get_type, s_set_type,
+ separate_stab_sections, init_stab_section.
+
+ * config/obj-multi.h: Update GPL notice to v2.
+ (obj_begin): New.
+ (obj_app_file): New.
+ (S_SET_SIZE): Test s_set_size for NULL before calling.
+ (S_SET_ALIGN): Similar for s_set_align.
+ (S_SET_OTHER): New.
+ (S_SET_DESC): New.
+ (S_GET_TYPE): New.
+ (S_SET_TYPE): New.
+ (SEPARATE_STAB_SECTIONS): New.
+ (INIT_STAB_SECTION): New.
+ (EMIT_SECTION_SYMBOLS): New.
+ (AOUT_STABS) [OBJ_MAYBE_AOUT]: Define.
+
+ * config/obj-elf.h: Update GPL notice to v2.
+ Mention that this file is included from obj-multi.h.
+ (obj_begin): Wrap definition in ifndef.
+ (elf_file_symbol): Constify declaration.
+ (obj_app_file): Ditto.
+ (SEPARATE_STAB_SECTIONS, INIT_STAB_SECTION, OBJ_PROCESS_STAB):
+ Wrap in ifndef SEPARATE_STAB_SECTIONS.
+
+ * config/obj-elf.c (elf_s_set_other): New.
+ (elf_file_symbol): Constify argument.
+ (elf_separate_stab_sections): New.
+ (elf_init_stab_section): New.
+ (elf_format_ops): Add new members. Remove comma at end.
+
+ * config/obj-ecoff.c (ecoff_separate_stab_sections): New.
+ (ecoff_format_ops): Add new fields. Remove comma at end.
+ Mention inconsistency for emit_section_symbols.
+
+ * config/obj-coff.h (c_dot_file_symbol): Constify declaration.
+
+ * config/obj-coff.c (c_dot_file_symbol): Constify argument.
+ (coff_separate_stab_sections): New.
+ (coff_format_ops): Add new members.
+
+ * config/obj-aout.c (obj_aout_sec_sym_ok_for_reloc): New.
+ (obj_aout_s_set_other): New.
+ (obj_aout_s_set_desc): New.
+ (obj_aout_s_get_type): New.
+ (obj_aout_s_set_type): New.
+ (obj_aout_separate_stab_sections): New.
+ (aout_format_ops): New members added. Use obj_aout_process_stab,
+ not 0. Use obj_aout_sec_sym_ok_for_reloc, not 0.
+ (obj_aout_frob_symbol): Add ATTRIBUTE_UNUSED to args as
+ appropriate.
+ (obj_aout_line, obj_aout_weak, obj_aout_type): Ditto.
+
+2000-05-22 Alan Modra <alan@linuxcare.com.au>
+
+ * config/tc-i386.c (tc_i386_fix_adjustable): Prevent adjustment
+ for OBJ_MAYBE_ELF too. Use S_IS_EXTERNAL instead of S_IS_EXTERN.
+ (md_estimate_size_before_relax): Ensure jumps to weak and
+ externally visible symbols are relocatable.
+
+2000-05-20 Hans-Peter Nilsson <hp@axis.com>
+
+ * stabs.c (aout_process_stab): Make global.
+ (s_desc): Add ATTRIBUTE_UNUSED to args as appropriate.
+ * read.h (aout_process_stab): Declare.
+
+ * configure.in (EMULATIONS) [i386aout, i386coff, i386elf]:
+ Generalize to *aout, *coff *elf.
+ * configure: Regenerated.
+
+ * doc/internals.texi (Object format backend): Say
+ SEPARATE_STAB_SECTIONS needs to be nonzero, not just defined.
+
+ * Makefile.am (TARG_ENV_HFILES): Delete te-multi.h.
+ * Makefile.in: Regenerated.
+
+2000-05-19 Catherine Moore <clm@cygnus.com>
+
+ * cgen.h (GAS_CGEN_MAX_FIXUPS): Check if already defined.
+
+2000-05-18 Alan Modra <alan@linuxcare.com.au>
+
+ * config/tc-hppa.c (md_apply_fix): Mask out immediate bits of
+ instruction to reflect change in re_assemble_*.
+
+2000-05-18 Jeffrey A Law (law@cygnus.com)
+
+ * configure.in (hppa-*-hpux11*): If the cpu is hppa*64*, then
+ build PA64 ELF tools.
+ * configure: Rebuilt.
+
+2000-05-17 Alan Modra <alan@linuxcare.com.au>
+
+ * Makefile.am: Regenerate dependencies.
+ * Makefile.in: Regenerate.
+
+2000-05-15 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-arm.c (struct asm_psr): Add boolean field
+ distinguishing between CSPR and SPSR. Rename 'number' field
+ to 'field'.
+ (psrs): Rearrange contents to match new asm_psr structure.
+ (arm_psr_parse): Move next to psr_required_here. Make it
+ return an asm_psr structure.
+ (psr_required_here): Use asm_psr structure returned by
+ arm_psr_parse.
+ (do_msr): Reorganise to allow psr_required_here to be called
+ only once.
+ (md_undefined_name): Mark 'name' parameter as unused, since
+ the COFF target does not use it.
+
+2000-05-14 David O'Brien <obrien@FreeBSD.org>
+
+ * config/te-386bsd.h: Clean up comments to adhere to the GNU coding
+ standards.
+ * config/te-aux.h: Likewise.
+ * config/te-dpx2.h: Likewise.
+ * config/te-go32.h: Likewise.
+ * config/te-hp300.h: Likewise.
+ * config/te-hppa.h: Likewise.
+ * config/te-i386aix.h: Likewise.
+ * config/te-ic960.h: Likewise.
+ * config/te-interix.h: Likewise.
+ * config/te-nbsd532.h: Likewise.
+ * config/te-pc532mach.h: Likewise.
+ * config/te-ppcnw.h: Likewise.
+ * config/te-psos.h: Likewise.
+ * config/te-sparcaout.h: Likewise.
+ * config/te-sun3.h: Likewise.
+ * config/te-sysv32.h: Likewise.
+
+2000-05-14 Alan Modra <alan@linuxcare.com.au>
+
+ * config/tc-h8300.c (do_a_fix_imm): Don't rely on `short' being 16
+ bits. Instead explicitly mask and sign extend. Do the 8 bit mask
+ and sign extend without an if statement.
+ (build_bytes): Likewise.
+
+2000-05-14 Kazu Hirata <kazu@hxi.com>
+
+ * config/tc-h8300.c (do_a_fix_imm): Output a reloc for no
+ X_add_symbol L_32 case.
+
+2000-05-14 David O'Brien <obrien@FreeBSD.org>
+
+ * config/te-freebsd.h: New file.
+
+2000-05-13 Alan Modra <alan@linuxcare.com.au>
+
+ * asintl.h (gettext, dgettext, dcgettext, textdomain,
+ bindtextdomain): Replace defines with those from intl/libgettext.h
+ to quieten gcc warnings.
+
+ * NEWS: Mention x86 .arch and -q.
+
+ * config/tc-i386.c (quiet_warnings): New.
+ (md_assemble): Use quiet_warnings.
+ (md_parse_option): Set quiet_warnings from -q.
+ (md_show_usage): Mention -q, delete -m.
+ (flag_do_long_jump): Delete.
+ (md_parse_option): Remove -m.
+ (md_show_usage): Remove -m.
+ (md_create_long_jump): Remove useless flag_do_long_jump code.
+
+ * as.c (parse_args): In case OPTION_DEFSYM, use a valueT to hold
+ the symbol value, and use bfd_scan_vma if BFD_ASSEMBLER.
+
+2000-05-13 Alan Modra <alan@linuxcare.com.au>
+ Alexander Sokolov <robocop@netlink.ru>
+
+ * doc/c-i386.texi (i386-Arch): New section.
+ (i386-Syntax): Mention .intel_syntax and .att_syntax.
+
+ * config/tc-i386.c (cpu_arch_name, cpu_arch_flags): New.
+ (smallest_imm_type): Use smallest opcode for shift by one if cpu
+ architecture has been given and is not 486.
+ (set_cpu_arch): New.
+ (md_pseudo_table): Add .arch.
+ (md_assemble): Warn if cpu architecture has been given and an
+ unsupported instruction.
+
+ * config/tc-i386.h (SMALLEST_DISP_TYPE): Delete.
+ Move operand_types bit defines after relevant template field.
+ (template): Add cpu_flags.
+ (Cpu*): Define.
+ (arch_entry): New.
+
+2000-05-12 Alexandre Oliva <aoliva@cygnus.com>
+
+ * config/tc-mn10300.h (md_end): Define.
+ (mn10300_finalize): Declare.
+ * config/tc-mn10300.c: Include dwarf2dbg.h.
+ (debug_line): Define.
+ (md_assemble): Generate dwarf2 line info.
+ (mn10300_finalize): New function. Finalize dwarf2 info.
+
+2000-05-11 Ulf Carlsson <ulfc@engr.sgi.com>
+
+ * config/tc-mips.c (md_estimate_size_before_relax): Use the
+ external version of the relocation for weak symbols.
+
+2000-05-08 David Mosberger <davidm@hpl.hp.com>
+
+ * config/tc-ia64.c (output_P7_format, case mem_stack_f): Output fixed
+ frame size in units of 16 bytes, as required per SW Conventions manual.
+ (output_unw_records): Output info-block header as a dword to get
+ byte-order right.
+
+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.
+
+2000-05-04 Alan Modra <alan@linuxcare.com.au>
+
+ * as.c (parse_args): Just mention current year in printed
+ copyright message.
+
+2000-05-03 J.T. Conklin <jtc@redback.com>
+
+ * config/tc-ppc.c (pre_defined_registers): Add entries for vector
+ unit registers.
+ (md_parse_option): Recognize -m7400.
+
+2000-05-03 Ian Lance Taylor <ian@zembu.com>
+
+ * config/atof-ieee.c (gen_to_words): When adding carry back in,
+ don't permit lp to become less than the words array.
+
+2000-05-03 Rodney Brown <RodneyBrown@pmsc.com>
+
+ config/tc-mcore.c (md_apply_fix3): BFD_RELOC_MCORE_PCREL_IMM11BY2
+ Fix little-endian case.
+
+2000-05-03 David O'Brien <obrien@NUXI.com>
+
+ * as.c (parse_args): Update copyright.
+
+2000-05-03 Mark Elbrecht <snowball3@bigfoot.com>
+
+ * config/tc-i386.h (SUB_SEGMENT_ALIGN): If TE_GO32, return 4
+ for the .bss section too.
+
+2000-05-02 Alan Modra <alan@linuxcare.com.au>
+
+ * configure.in: Set em=linux for hppa-*-linux.
+ * configure: Regenerate.
+ * doc/Makefile.in: Regenerate with correct automake.
+
+ * frags.c (frag_grow): Sanity check chunk_size.
+
+ * config/obj-elf.h: #include "bfd.h" not <bfd.h>
+ * config/obj-som.h: Likewise.
+ * config/obj-ieee.h: Likewise.
+
+ * config/tc-hppa.h: Test BFD_ARCH_SIZE, not BFD64.
+
+ * config/tc-hppa.c (log2): Only compile when OBJ_SOM.
+ (md_pseudo_table): Fully initialise OBJ_ELF cases.
+ (fix_new_hppa): Add ATTRIBUTE_UNUSED to args as appropriate.
+ (pa_ip): low_sign_unext now returns via function value. Use
+ re_assemble_* instead of dis_assemble_* and
+ INSERT_FIELD_AND_CONTINUE combination. Don't call sign_unext
+ unnecessarily.
+ (md_convert_frag): Add ATTRIBUTE_UNUSED to args as appropriate.
+ (md_section_align, md_parse_option, md_show_usage,
+ md_undefined_symbol, pa_align, pa_block, pa_brtab, pa_try,
+ pa_callinfo, pa_code, pa_comm, pa_end, pa_enter, pa_entry,
+ pa_exit, pa_export, pa_import, pa_label, pa_leave, pa_level,
+ pa_origin, pa_param, pa_proc, pa_procend, pa_space, pa_spnum,
+ pa_version, pa_compiler, pa_copyright, pa_data, pa_fill, pa_lsym,
+ pa_text): Likewise.
+ (md_apply_fix): Change type of new_val to offsetT. Delete w1, w2,
+ w, resulti. Add insn, val. Move bfd_get_32 and bfd_put_32
+ outside of switch. Correct mask and shifting errors in case 10
+ and case -11. In case 21, compare against signed range to suit
+ hppa_field_adjust changes. In case 12, use re_assemble_12. In
+ case 17 and case 22, use offsetT variable to properly check range.
+ Use re_assemble_* here too.
+ (evaluate_absolute): Change type of value to offsetT. Call
+ hppa_field_adjust to do the work for us.
+ (pa_parse_cmpb_64_cmpltr): Delete save_s.
+ (pa_parse_cmpib_64_cmpltr): Ditto.
+ (pa_build_unwind_subspace): Delete unused var subseg. Change type
+ of i to unsigned int.
+ (pa_type_args): Conditionally declare symbol if OBJ_SOM.
+ (pa_end_of_source): Return type is void.
+
+2000-05-01 Catherine Moore <clm@cygnus.com>
+
+ * macro.c (macro_expand_body): Don't prepend macro number with zeroes.
+
+2000-05-01 Denis Chertykov <denisc@overta.ru>
+
+ * config/tc-avr.c: ATTRIBUTE_UNUSED added to the necessary places.
+ More comments added.
+ (md_begin): Removed "construct symbols for each register name".
+ Because register names conflicts with GCC generated function
+ names.
+ (avr_operand): Now constant numbers can be used as a register
+ identifiers (0 as r0, 31 as r31).
+ (md_assemble): use skip_space () before parsing instruction
+ operands.
+
+2000-05-01 Alan Modra <alan@linuxcare.com.au>
+
+ * configure.in: Set bfd_gas=yes on i386-*-pe and i386-*-nt* to
+ ensure all pe targets use bfd. Remove unnecessary bfd_gas=yes on
+ arm-*-netbsd* and arm-*-wince as this is set for all arm*.
+ * configure: Regenerate.
+
+2000-04-29 Andreas Jaeger <aj@suse.de>
+
+ * as.h: Correctly check GCC version.
+
+2000-04-26 David O'Brien <obrien@FreeBSD.org>
+
+ * doc/as.1: Fix unbalanced brackets.
+
+ * config/tc-i386.c (comment_chars): Don't use '/' as comment start if
+ TE_FreeBSD.
+ (line_comment_chars): Set to '/' if TE_FreeBSD.
+
+2000-04-25 Jeffrey A Law (law@cygnus.com)
+
+ * configure.in: Configury support for PA64 (currently disabled).
+ * configure: Rebuilt.
+
+2000-04-25 Machida Hiroyuki <machida@sm.sony.co.jp>
+
+ * config/tc-mips.c (s_change_sec): Use record_alignment, not
+ bfd_set_section_alignment.
+
+2000-04-25 Alan Modra <alan@linuxcare.com.au>
+
+ * config/tc-i386.c (offset_in_range): Ensure shift counts are less
+ than 32.
+
+2000-04-24 Nick Clifton <nickc@cygnus.com>
+
+ * doc/c-arm.texi (ARM Directives): Document behaviour of .align 0.
+ * doc/as.texinfo (Align): Include arm and strongarm in list of
+ targets that have the second form of the behaviour of the .align
+ directive.
+
+2000-04-24 Mark Klein <mklein@dis.com>
+
+ * config/obj-som.c: Terminate obj_pseudo_table.
+
+2000-04-24 Clinton Popetz <cpopetz@cygnus.com>
+
+ * as.c (parse_args): Allow md_parse_option to override -a listing
+ option.
+ * config/obj-coff.c (add_lineno): Change type of offset parameter
+ from "int" to "bfd_vma."
+ * config/tc-ppc.c (md_pseudo_table): Add "llong" and "machine."
+ (ppc_mach, ppc_subseg_align, ppc_target_format): New.
+ (ppc_change_csect): Align correctly for XCOFF64.
+ (ppc_machine): New function, which discards "ppc_machine" line.
+ (ppc_tc): Cons for 8 when code is 64 bit.
+ (md_apply_fix3): Don't check operand->insert. Handle 64 bit
+ relocations.
+ (md_parse_option): Handle -a64 and -a32.
+ (ppc_xcoff64): New.
+ * config/tc-ppc.h (TARGET_MACH): Define.
+ (TARGET_FORMAT): Move to function.
+ (SUB_SEGMENT_ALIGN): Use ppc_subseg_align.
+
+2000-04-23 Denis Chertykov <denisc@overta.ru>
+
+ * config/tc-avr.c: New AVR_ISA_ defined.
+ (md_assemble): Handle opcodes with optional operands (lpm,elpm).
+ (avr_operand): Handle 'a', 'v' and 'z' constraint letters needed
+ for `fmul', `movw' and `lpm R,Z' instructions.
+ (avr_operands): Warn if current opcode is a two-word instruction
+ and previous opcode was cpse/sbic/sbis/sbrc/sbrs.
+ (avr_opcodes): New commands added.
+ (REGISTER_P): Check 'a' and 'v' constraint letters.
+ (mcu_types): New MCU added.
+
+2000-04-22 Timothy Wall <twall@cygnus.com>
+
+ * config/tc-ia64.c (pseudo_func[]): Add new "nat" entry equivalent
+ to "natval".
+ (operand_match): Conditionally insert default bit values for IMMU9.
+
+2000-04-14 Matthew Green <mrg@cygnus.com>
+
+ * configure.in: Add NetBSD/sparc ELF and NetBSD/sparc64 support.
+ * configure: Rebuilt.
+
+2000-04-21 Jeffrey A Law (law@cygnus.com)
+ Jason Eckhardt <jle@cygnus.com>
+
+ * config/tc-hppa.c (md_apply_fix): Handle new PA2.0 formats.
+
+ * config/tc-hppa.c (CHECK_ALIGN): New macro.
+ Added handling of new operand types l,y,&,fe,fE,fx.
+
+2000-04-21 Richard Henderson <rth@cygnus.com>
+ David Mosberger <davidm@hpl.hp.com>
+ Timothy Wall <twall@cygnus.com>
+ Andrew MacLeod <amacleod@cygnus.com>
+ Jim Wilson <wilson@cygnus.com>
+
+ * Makefile.am (CPU_TYPES): Add ia64.
+ (TARGET_CPU_CFILES): Add config/tc-ia64.c.
+ (TARGET_CPU_HFILES): Add config/tc-ia64.h.
+ * Makefile.in: Rebuild.
+ * app.c (do_scrub_chars): Handle DOUBLESLASH_COMMENTS.
+ * configure: Rebuild.
+ * configure.in: Recognize ia64 as cpu type. Set bfd_gas.
+ (ia64-*-elf*, ia64-*-linux-gnu*): New targets.
+ * expr.c (expr): Handle md_optimize_expr.
+ * read.c (LEX_HASH): Add comment.
+ * config/tc-ia64.c, config/tc-ia64.h: New files.
+
+2000-04-21 Richard Henderson <rth@cygnus.com>
+
+ * config/tc-d30v.c (write_2_short): Disregard opcode1->ecc when
+ bundling a non-delayed branch type instruction.
+
+2000-04-20 Alexandre Oliva <aoliva@cygnus.com>
+
+ * config/tc-mn10300.c (HAVE_AM30): Define.
+ (md_assemble): Use it.
+
+2000-04-19 Alan Modra <alan@linuxcare.com.au>
+
+ * config/obj-elf.c (obj_elf_change_section): Check for changed
+ section attributes.
+
+ * 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.
+
+2000-04-19 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+
+ * Makefile.am (YACC, LEX): Get them from configure.
+
+2000-04-18 H.J. Lu (hjl@gnu.org)
+
+ * config/tc-i386.c (offset_in_range): Use addressT instead of
+ bfd_vma for non-bfd assemblers.
+
+2000-04-17 Alan Modra <alan@linuxcare.com.au>
+
+ * config/tc-i386.c (offset_in_range): Sign extend val so BFD64
+ doesn't give spurious errors.
+
+2000-04-14 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+
+ * as.h (SEEK_SET): Define if undefined.
+
+2000-04-13 Alan Modra <alan@linuxcare.com.au>
+
+ * config/tc-arm.c (md_apply_fix3): Don't use UL suffix on
+ constants, and don't assume offsetT is 32 bits.
+
+2000-04-12 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * config/tc-d10v.h: Include "write.h" to get definition of fixS.
+ (md_pcrel_from_section): Add prototype.
+ (d10v_fix_adjustable): Add prototype.
+ (d10v_force_relocation): Replace 'struct fix' with 'fixS'.
+
+ * config/tc-d10v.c (md_apply_fix3): Add paren around &&.
+
+2000-04-12 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-d10v.c (find_opcode): Correctly calculate position of
+ symbol in frag chain.
+
+2000-04-10 Alan Modra <alan@linuxcare.com.au>
+
+ * config/tc-i386.c (fits_in_signed_byte): Change arg to offsetT.
+ (fits_in_unsigned_byte, fits_in_unsigned_word): Ditto.
+ (fits_in_signed_word, smallest_imm_type): Ditto.
+ (md_assemble): Use an offsetT var to hold offsetT values, not a
+ long.
+ (offset_in_range): New.
+ (md_assemble): Use it.
+ (md_convert_frag): Change type of target_address, opcode_address,
+ and displacement_from_opcode_start to offsetT.
+ (md_create_short_jump): Change type of offset to offsetT.
+ (md_create_long_jump): Ditto.
+ (md_apply_fix3): Use -4, not 0xfffffffc for BFD_RELOC_386_PLT32.
+ (md_chars_to_number): Remove.
+ (output_invalid): Remove duplicate prototype.
+
+2000-04-09 Nick Clifton <nickc@cygnus.com>
+
+ * Makefile.am (CPU_TYPES): Add 'avr'.
+ (TARGET_CPU_CFILES): Add 'tc-avr.c'.
+ (TARGET_CPU_HFILES): Add 'tc-avr.h'.
+
+ * Makefile.in: Regenerate.
+
+ * doc/as.texinfo: Add M32R documentation.
+
+2000-04-07 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * configure.in (WARN_CFLAGS): Set to -W -Wall by default. Add
+ --enable-build-warnings option.
+ * Makefile.am (AM_CFLAGS, WARN_CFLAGS): Add definitions.
+ * Makefile.in, configure: Re-generate.
+
+2000-04-07 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-arm.c (md_apply_fix3): Treat BFD_RELOC_ARM_PCREL_BLX
+ in the same way as BFD_RELOC_ARM_PCREL_BRANCH, and
+ BFD_RELOC_THUMB_PCREL_BLX lie BFD_RELOC_THUMB_PCREL_BRANCH.
+ (tc_gen_reloc): Accept BFD_RELOC_{ARM|THUMB}_PCREL_BLX.
+ (arm_force_relocation): Force relocations for
+ BFD_RELOC_{ARM|THUMB}_PCREL_BLX as well.
+
+2000-04-05 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * config/tc-sh.c (get_operands): There's no third operand if the
+ first operand is an immediate.
+
+2000-04-05 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * config/tc-sh.c (immediate): Delete.
+ (sh_operand_info): Add immediate member.
+ (parse_reg): Use A_PC for pc.
+ (parse_exp): Add second argument 'op'. All callers changed.
+ (parse_at): Expect pc to be coded as A_PC.
+ Use immediate field in *op.
+ (insert): Add fourth argument 'op'. All callers changed.
+ (build_relax): Add second argument 'op'. All callers changed.
+ (insert_loop_bounds): New function.
+ (build_Mytes): Remove DISP_4.
+ Split IMM_[48]{,BY[24]} into IMM[01]_[48]{,BY[24]}. Add REPEAT.
+ (assemble_ppi): Use immediate field in *operand.
+ (sh_force_relocation): Handle BFD_RELOC_SH_LOOP_{START,END}.
+ (md_apply_fix): Likewise.
+ (tc_gen_reloc): Likewise. Check for a pcrel BFD_RELOC_SH_LABEL.
+
+2000-04-05 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
+
+ * config/tc-sparc.c (sparc_ip): Avoid string pasting.
+
+2000-04-04 Hans-Peter Nilsson <hp@axis.com>
+
+ * internals.texi (CPU backend): Document
+ TC_CHECK_ADJUSTED_BROKEN_DOT_WORD.
+
+2000-04-04 Alan Modra <alan@linuxcare.com.au>
+
+ * po/gas.pot: Regenerate.
+
+ * as.c (show_usage): Restore translated part of bug string.
+ * gasp.c (show_usage): Likewise.
+
+ * 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.
+
+2000-04-03 Alexandre Oliva <aoliva@cygnus.com>
+
+ * 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.
+
+2000-04-03 Alan Modra <alan@linuxcare.com.au>
+
+ * as.h: #include "bin-bugs.h"
+ * as.c (show_usage): Use REPORT_BUGS_TO.
+ * gasp.c: #include "bin-bugs.h"
+ (show_usage): Use REPORT_BUGS_TO.
+
+ * config/tc-sparc.c (md_show_usage): Add a trailing newline.
+
+2000-04-03 Hans-Peter Nilsson <hp@axis.com>
+
+ * write.c (write_object_file) [! WORKING_DOT_WORD]: If defined,
+ call TC_CHECK_ADJUSTED_BROKEN_DOT_WORD for each word after
+ adjustments.
+
+2000-04-03 Alan Modra <alan@linuxcare.com.au>
+
+ * 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.
+
+2000-04-02 Richard Henderson <rth@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.
+
+2000-04-01 Ian Lance Taylor <ian@zembu.com>
+
+ * 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.
+
+2000-03-31 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-d10v.h (md_flush_pending_output): Define.
+
+2000-03-29 Nick Clifton <nickc@cygnus.com>
+
+ * 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.
+
+2000-03-29 Nick Clifton <nickc@cygnus.com
+
+ * config/tc-arm.c (tinsns): Add "bal" instruction pattern.
+
+2000-03-28 Alan Modra <alan@linuxcare.com.au>
+
+ * listing.c (LISTING_LHS_WIDTH): Default depends on
+ LISTING_WORD_SIZE.
+ (LISTING_LHS_WIDTH_SECOND): Default to LISTING_LHS_WIDTH.
+
+2000-03-27 Ian Lance Taylor <ian@zembu.com>
+
+ * config/tc-sh.c (md_show_usage): Use backslash before newline in
+ string literal.
+
+2000-03-27 Alan Modra <alan@linuxcare.com.au>
+
+ * config/tc-avr.h (TC_HANDLES_FX_DONE): Define.
+
+ * 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.
+
+2000-03-27 Denis Chertykov <denisc@overta.ru>
+
+ * config/tc-avr.c: New file for AVR support.
+ * config/tc-avr.h: Likewise.
+ * configure.in: Add AVR support.
+ * configure: Regenerate.
+
+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.
+
+2000-03-26 Alan Modra <alan@linuxcare.com.au>
+
+ * config/tc-i386.c: Don't start any as_bad or as_warn message with
+ an initial capital letter.
+ (i386_index_check): Reindent.
+
+2000-03-19 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-arm.c (md_apply_fix3): Fix bug detecting overflow of pc
+ relative branches.
+
+2000-03-17 Thomas de Lellis <tdel@windriver.com>
+
+ * 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>
+
+ * config/tc-arm.c (md_apply_fix3): Handle same-section relocations
+ that have a destingation >= 0x400000.
+ Fix compile time warning messages.
+
+2000-03-16 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * 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.
+
+2000-03-16 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * 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.
+
+2000-03-16 J"orn Rennecke <amylaar@cygnus.co.uk>
+
+ * config/tc-sh.c (md_show_usage): Add description of -dsp.
+
+2000-03-15 Jonathan Larmour <jlarmour@redhat.co.uk>
+
+ * config/tc-sh.c (parse_reg): Match r[0..7]_bank operands before
+ normal operands.
+
+2000-03-15 Kazu Hirata <kazu@hxi.com>
+
+ * config/tc-h8300.c: Add ATTRIBUTE_UNUSED as appropriate.
+
+2000-03-13 Hans-Peter Nilsson <hp@axis.se>
+
+ * expr.c (operand) [case 'f']: When testing if '0f' can start a
+ floating-point-number, make sure 'f' is in FLT_CHARS.
+
+2000-03-11 Hans-Peter Nilsson <hp@axis.se>
+
+ * 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.
+
+2000-03-10 Geoffrey Keating <geoffk@cygnus.com>
+
+ * config/tc-mips.c (mips_ip): Don't put stuff in .rodata
+ when embedded-pic.
+
+ * 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.
+ Put S_IS_EXTERN processing back in.
+
+2000-03-08 H.J. Lu (hjl@gnu.org)
+
+ * Makefile.am (install-exec-tooldir): Depend on
+ install-exec-bindir for parallel make.
+ * Makefile.in: Regenerated.
+
+2000-03-06 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-m32r.c (struct md_longopts): Add -m32r command line
+ switch.
+ (md_parse_option): Parse -m32r command line switch - disable m32rx
+ compatability.
+ (md_show_usage): Document new option.
+
+ * doc/Makefile.am (CPU_DOCS): Add c-m32r.texi.
+ * doc/Makefile.in: Regenerate.
+ * doc/c-m32r.texi (M32R-Opts): Document new command line switch.
+
+2000-03-02 Michael Meissner <meissner@redhat.com>
+
+ * config/tc-d30v.c (check_range): Remove code that incorrectly
+ sign extended values where bits < 32.
+
+2000-03-02 H.J. Lu (hjl@gnu.org)
+
+ * configure.in: Support --enable-targets=all on ia32.
+ * configure: Regenerated.
+
+2000-03-01 Nick Clifton <nickc@cygnus.com>
+
+ * gasp.c (do_align): Remove bogus check of alignment value.
+
+2000-02-27 Thomas de Lellis <tdel@windriver.com>
+
+ * 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.
+
+2000-02-27 Hans-Peter Nilsson <hp@axis.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.
+
+2000-02-27 Jakub Jelinek <jakub@redhat.com>
+
+ * config/tc-sparc.c (OPTION_UNDECLARED_REGS): New option.
+ (md_parse_option): Handle it.
+ (md_show_usage): Document it.
+
+2000-02-27 Ian Lance Taylor <ian@zembu.com>
+
+ * config/tc-alpha.c (md_assemble): Accept `1' and `9' in an
+ opcode, for the instruction `pal19'. From Andrea Arcangeli
+ <andrea@suse.de>.
+
+2000-02-26 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * 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.
+
+2000-02-26 Andreas Jaeger <aj@suse.de>
+
+ * doc/c-mips.texi (MIPS Opts): Fix typo in last patch.
+
+2000-02-25 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * config/tc-i386.c (md_assemble): Don't swap intersegment jmp and
+ call operands when intel_syntax.
+ (intel_float_operand): Return 2 for "fi...".
+ (i386_operand_modifier): Change "DWORD PTR" test to suit above.
+ Return SHORT_MNEM_SUFFIX for "WORD PTR" when "fi...". Revert
+ earlier "SHORT" change.
+ (md_assemble): When determining suffix from Regs, exclude
+ InOutPortReg.
+
+2000-02-24 Nick Clifton <nickc@cygnus.com>
+
+ * configure: Add arm-wince, mips-pe and sh-pe targets.
+ * configure: Regenerate.
+
+ * 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.
+
+ * 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.
+
+2000-02-19 Michael Meissner <meissner@redhat.com>
+
+ * 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.
+
+2000-02-22 Andrew Haley <aph@cygnus.com>
+
+ * doc/c-mips.texi (MIPS Opts): Document -mgp32 and -mgp64.
+
+2000-02-22 Andrew Haley <aph@cygnus.com>
+
+ * 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.
+
+ (OPTION_M7900): Change offset
+ (OPTION_NO_M7900): Ditto.
+
+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.
+
+2000-02-17 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.
+
+2000-02-11 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.
+
+2000-02-08 Timothy Wall <twall@redhat.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>
+
+ * 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>
+
+ * listing.c (print_lines): Remove conditionals causing bug in
+ listings.
+
+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>
+
+ * stabs.c (generate_asm_file): Escape backslashes in stabs file
+ entries, matching the way GCC generates them. If not escaped, the
+ filename is encoded incorrectly.
+
+2000-01-31 Nick Clifton <nickc@cygnus.com>
+
+ * config/tc-arm.c (reg_table): Add support for ATPCS register
+ naming conventions.
+
+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.
+
+2000-01-19 Chandra Chavva <cchavva@cygnus.com>
+
+ * config/tc-mcore.c (md_assemble): Give warning message if
+ operands passes to instruction are more than the spec.
+
+2000-01-27 Thomas de Lellis <tdel@windriver.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.
+
+2000-01-27 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * Makefile.am (MULTI_CFILES): Add config/e-i386aout.c
+ Add dependencies for e-i386aout.o. Fix 2 comment lines.
+
+ * Makefile.in: Same here.
+ Update copyright.
+
+ * 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.
+
+ * configure: Regenerate.
+
+ * 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.
+
+2000-01-03 Martin v. Loewis <loewis@informatik.hu-berlin.de>
+
+ * 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.
+
+For older changes see ChangeLog-9899
diff --git a/contrib/binutils/gas/ChangeLog-9295 b/contrib/binutils/gas/ChangeLog-9295
index 7ea48e6..a761ea1 100644
--- a/contrib/binutils/gas/ChangeLog-9295
+++ b/contrib/binutils/gas/ChangeLog-9295
@@ -151,8 +151,8 @@ Tue Nov 28 10:42:36 1995 Ken Raeburn <raeburn@cygnus.com>
(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.
+ * symbols.c (symbol_print_statistics): New function.
+ * symbols.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.
@@ -458,8 +458,8 @@ Thu Oct 26 19:18:27 1995 Ken Raeburn <raeburn@cygnus.com>
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.
+ * config/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>
@@ -1930,8 +1930,8 @@ Tue Aug 1 17:35:26 1995 Ian Lance Taylor <ian@cygnus.com>
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.
+ * config/tc-sh.c (md_convert_frag): Make some error messages
+ more explict.
Mon Jul 31 21:40:47 1995 Ken Raeburn <raeburn@cygnus.com>
@@ -2392,7 +2392,7 @@ Wed Jul 5 12:01:49 1995 Ian Lance Taylor <ian@cygnus.com>
(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.
+ * config/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)
@@ -3143,10 +3143,10 @@ Thu Apr 13 18:18:08 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
Thu Apr 13 14:34:36 1995 Torbjorn Granlund <tege@adder.cygnus.com>
- * tc-m68k.c (m68k_init_after_args): Test for m68360.
+ * config/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.
+ * config/tc-m68k.h (TARGET_WORD_SIZE): Define.
(TARGET_ARCH): Define.
* expr.c (integer_constant): If TARGET_WORD_SIZE is defined,
@@ -3714,7 +3714,8 @@ Thu Jan 26 11:35:33 1995 Michael Meissner <meissner@cygnus.com>
Wed Jan 25 16:23:13 1995 Jim Wilson <wilson@chestnut.cygnus.com>
- * tc-sh.c (little): Add argument IGNORE to avoid compiler warnings.
+ * config/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):
@@ -3878,7 +3879,7 @@ Wed Jan 18 12:16:07 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
(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.
+ * config/tc-h8300.h (tc_reloc_mangle): Declare.
Tue Jan 17 10:58:06 1995 Ian Lance Taylor <ian@sanguine.cygnus.com>
@@ -7482,7 +7483,7 @@ Mon Jan 24 19:18:23 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
of unused functions.
(obj_frob_symbol): Define if ECOFF_DEBUGGING.
- * tc-mips.c (g_switch_seen): New static variable.
+ * config/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.
@@ -7515,7 +7516,7 @@ 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.
+ * config/obj-som.c: Likewise.
Tue Jan 18 19:05:32 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
@@ -7758,7 +7759,7 @@ Wed Dec 29 14:37:26 1993 Ken Raeburn (raeburn@cujo.cygnus.com)
Sun Dec 26 14:31:47 1993 Torbjorn Granlund (tege@adder.cygnus.com)
- * tc-hppa.c (pre_defined_registers): Convert to lower case.
+ * config/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'.
@@ -7953,7 +7954,7 @@ Fri Dec 3 10:56:40 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
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
+ * config/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.
@@ -8480,7 +8481,7 @@ Tue Nov 2 18:04:11 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
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
+ * config/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
@@ -8849,7 +8850,7 @@ Mon Oct 25 10:20:31 1993 Ken Raeburn (raeburn@rover.cygnus.com)
Sun Oct 24 16:49:00 1993 Jim Wilson (wilson@x1.cygnus.com)
- * tc-mips.c (md_pseudo_table): Add dword pseudo op.
+ * config/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)
@@ -8946,7 +8947,7 @@ Thu Oct 21 12:52:01 1993 Ken Raeburn (raeburn@cygnus.com)
* 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
+ * config/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
@@ -9701,7 +9702,7 @@ Wed Aug 25 13:37:46 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
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.
+ * config/tc-hppa.h (pa_param): Declare.
Tue Aug 24 15:41:35 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
@@ -10200,7 +10201,7 @@ Mon Jul 19 15:21:20 1993 Ken Raeburn (raeburn@rtl.cygnus.com)
* 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
+ * config/tc-sparc.h (LOCAL_LABEL) [OBJ_ELF]: Local labels can start with
"L" or "_.L_".
* write.c (write_relocs): New function, split off from
@@ -11126,7 +11127,7 @@ Wed Apr 28 13:40:29 1993 Ian Lance Taylor (ian@rtl.cygnus.com)
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
+ * config/tc-sh.c, config/tc-sh.h: New files supporting Hitachi
SH.
Mon Apr 26 12:28:27 1993 Ian Lance Taylor (ian@cygnus.com)
@@ -11620,7 +11621,7 @@ Mon Mar 8 14:57:10 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
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
+ * 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)
@@ -11847,8 +11848,8 @@ Mon Feb 8 13:56:17 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
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
+ * config/{h8500.mt, config/tc-h8500.c, config/tc-h8500.h,
+ config/obj-coffbfd.c, obj-coffbfd.h}: support for the H8/500.
Wed Feb 3 19:28:18 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
@@ -11994,25 +11995,25 @@ Tue Jan 5 08:42:16 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
* 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
+ * config/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
+ * config/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
+ * config/obj-vms.c (obj_aout_stab): Add code to generate listing file.
+ * config/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
+ * config/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
+ * config/obj-vms.c (VMS_LSYM_Parse): Correctly handle case of continuation
stabs directives.
- * obj-vms.c (VMS_write_object_file): Define all vtable psects
+ * config/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
+ * config/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
@@ -12148,8 +12149,8 @@ Mon Dec 28 10:32:05 1992 Ken Raeburn (raeburn@cygnus.com)
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.
+ * write.c, config/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)
@@ -12191,9 +12192,9 @@ Sat Dec 12 15:26:34 1992 Ian Lance Taylor (ian@cygnus.com)
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.
+ * config/tc-i386.h: Define SUB_SEGMENT_ALIGN.
+ * config/tc-a29k.h: Define ZERO_BASED_SEGMENTS.
+ * config/tc-i386.c: (i386_operand): If I386COFF, accept any segment type.
Tue Dec 8 00:06:48 1992 Ken Raeburn (raeburn@rtl.cygnus.com)
@@ -12327,9 +12328,9 @@ Mon Nov 23 11:00:16 1992 Ken Raeburn (raeburn@cygnus.com)
* 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.
+ * config/obj-coff.c (obj_coff_endef): Use as_warn, not fprintf.
- * tc-m68k.c (md_assemble): Don't complain about 68000 with 68881;
+ * config/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)
@@ -12349,45 +12350,46 @@ Tue Nov 10 09:49:24 1992 Ian Lance Taylor (ian@cygnus.com)
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,
+ * config/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
+ * config/tc-m68k.h (OPTIONAL_REGISTER_PREFIX): Define to be "%", if not
M68KCOFF.
- * obj-coffbfd.c (fill_section): set STYP_NOLOAD bit for .bss
+ * config/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.
+ * config/atof-ieee.c, config/atof-ns32k.c, config/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
+ * config/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.
+ * config/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.
+ * config/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
+ * config/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
+ * config/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.
+ * config/tc-i960.c: Missed a couple of 0->NO_RELOC conversions.
- * tc-i960.h (N_BALNAME, N_CALLNAME): Define as char-type values,
+ * config/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)
@@ -12400,7 +12402,7 @@ Wed Oct 28 08:52:34 1992 Ken Raeburn (raeburn@cygnus.com)
Fri Oct 23 14:40:38 1992 Ian Lance Taylor (ian@cygnus.com)
- * obj-coffbfd.c (write_object_file): check return value of
+ * config/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)
@@ -12426,11 +12428,11 @@ Sat Oct 10 12:33:45 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
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):
+ * config/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
+ * config/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)
@@ -12443,25 +12445,26 @@ Thu Oct 1 23:05:12 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
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
+ * config/obj-coffbfd.c (write_object_file): don't fixup for the z8k
+ * config/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.
+ * config/tc-i960.h, config/tc-i960.c: avoid the ANSI
+ preprocessor addition #elif, since it is not supported by old
+ compilers.
+ config/ho-rs6000.h, config/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.
+ * config/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
+ * config/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.
@@ -12481,7 +12484,7 @@ Thu Sep 24 12:42:32 1992 Brendan Kehoe (brendan@rtl.cygnus.com)
Tue Sep 22 13:02:07 1992 Sean Eric Fagan (sef@cygnus.com)
- * obj-coffbfd.c (do_relocs_for,fill_section): now allocate all
+ * config/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)
@@ -12490,17 +12493,17 @@ Tue Sep 22 13:02:07 1992 Sean Eric Fagan (sef@cygnus.com)
Tue Sep 22 15:10:51 1992 Ken Raeburn (raeburn@cambridge.cygnus.com)
- * tc-m68k.c: Replace "enum m68k_architecture" with "int"
+ * config/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
+ * config/tc-m68k.c (md_assemble, md_parse_option): Handle new
"-mno-688[58]1" options.
- * tc-m68k.c: Added CPU32 support.
+ * config/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.
+ * config/tc-m68k.c (m68k_ip): An(disp) is not pc relative.
Tue Sep 15 17:25:05 1992 Jim Wilson (wilson@sphagnum.cygnus.com)
@@ -12525,19 +12528,19 @@ Sun Sep 13 20:30:10 1992 Ian Lance Taylor (ian@cygnus.com)
* write.c (fixup_segment): fixed missing parens in expression
checking for byte or word overflow.
- * obj-coffbfd.h: define WARN_SIGNED_OVERFLOW_WORD.
+ * config/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
+ * config/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
+ * config/obj-coffbfd.h : added stuff
+ * config/tc-i386.c (tc_coff_fix2rtype): new function
+ * config/tc-i386.h : new coff defines
Thu Sep 10 09:23:15 1992 Ian Lance Taylor (ian@cygnus.com)
@@ -12553,21 +12556,23 @@ Wed Sep 9 11:06:25 1992 Ian Lance Taylor (ian@cygnus.com)
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
+ * config/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.
+ * config/tc-m68kmote.c, config/tc-m68kmote.h: removed now
+ superfluous files.
+
From Steve Chamberlain:
- m68kcoff.mt: for m68k COFF.
- obj-coffbfd.c: (fixup_mdeps) added
+ * config/m68kcoff.mt: for m68k COFF.
+ * config/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.
+ * config/ obj-coffbfd.h: define WORKING_DOT_WORD (too hard to
+ support) and handle m68k.
+ * config/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)
@@ -12592,9 +12597,11 @@ Sat Aug 29 12:11:12 1992 Jim Wilson (wilson@sphagnum.cygnus.com)
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).
+ * config/obj-bout.h, config/obj-bout.c (obj_header_append,
+ obj_symbol_to_chars).
+ * config/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)
@@ -12623,9 +12630,9 @@ 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.
+ * config/tc-m68k.c: use TARGET_CPU to choose default cpu type.
- * te-generic.h: default to LOCAL_LABELS_DOLLAR and LOCAL_LABELS_FB
+ * config/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)
@@ -12636,7 +12643,7 @@ Fri Aug 21 14:38:44 1992 Ken Raeburn (raeburn@cambridge.cygnus.com)
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
+ * config/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
@@ -12658,16 +12665,16 @@ Wed Aug 19 09:25:09 1992 Ken Raeburn (raeburn@cygnus.com)
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
+ * config/obj-bout.c (obj_emit_relocations): Emit alignment relocs despite
their not having symbols associated.
- * tc-i960.c (norelax, instrument_branches): Default initializer is
+ * config/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.
+ * config/tc-i960.h (linkrelax): Delete declaration.
(HANDLE_ALIGN): New macro; calls i960_handle_align.
(NEED_FX_R_TYPE, NO_RELOC): New macros.
@@ -12716,7 +12723,7 @@ Tue Aug 11 12:58:14 1992 Ken Raeburn (raeburn@cygnus.com)
Mon Aug 10 14:37:08 1992 Per Bothner (bothner@cygnus.com)
- * tc-m68k.c: ".align N" means align to N-byte boundary *only*
+ * config/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)
@@ -12734,7 +12741,7 @@ Wed Aug 5 12:02:40 1992 Steve Chamberlain (sac@thepub.cygnus.com)
Wed Aug 5 01:54:34 1992 John Gilmore (gnu at cygnus.com)
- * tc-m68k.c (try_index): Error if index scaling specified and
+ * config/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)
@@ -12785,7 +12792,7 @@ Mon Jul 13 14:11:36 1992 Steve Chamberlain (sac@thepub.cygnus.com)
Mon Jul 6 17:09:32 1992 Steve Chamberlain (sac@cygnus.com)
- * obj-coffbfd.c (fill_section): mark .lit sections as STYP_LIT
+ * config/obj-coffbfd.c (fill_section): mark .lit sections as STYP_LIT
Mon Jun 1 16:20:22 1992 Michael Tiemann (tiemann@cygnus.com)
@@ -12814,7 +12821,7 @@ Tue Jun 9 07:54:54 1992 Steve Chamberlain (sac@thepub.cygnus.com)
* 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
+ * config/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
@@ -12853,7 +12860,7 @@ 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
+ * config/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)
@@ -12867,9 +12874,9 @@ Thu May 14 17:22:48 1992 K. Richard Pixley (rich@rtl.cygnus.com)
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):
+ * config/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.
+ * config/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)
@@ -12923,8 +12930,8 @@ Fri Mar 13 08:03:03 1992 Steve Chamberlain (sac@thepub.cygnus.com)
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.
+ * config/tc-m68k.h, config/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)
@@ -12936,7 +12943,7 @@ Wed Mar 11 23:32:42 1992 K. Richard Pixley (rich@cygnus.com)
* 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.
+ * config/te-sun3.h: add LOCAL_LABELS_DOLLAR.
Sat Mar 7 00:06:25 1992 K. Richard Pixley (rich@rtl.cygnus.com)
@@ -13024,9 +13031,9 @@ Fri Feb 21 06:21:07 1992 K. Richard Pixley (rich@rtl.cygnus.com)
* read.c, write.c subsegs.c: back out the .bss changes.
- * obj-aout.c: do not include stab.gnu.h if NO_LISTING.
+ * config/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.
+ * config/tc-i860.c, a.out.gnu.h: move i860 relocs to a proper place.
* a.out.h: removed.
@@ -13045,11 +13052,11 @@ Fri Feb 21 01:08:48 1992 Minh Tran-Le (TRANLE@INTELLICORP.COM)
* as.c (perform_an_assembly_pass): zero bss_fix_root, too.
- * tc-i386.c: tc-i386.c: added handling of the following opcodes:
+ * config/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
+ * config/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
@@ -13085,18 +13092,18 @@ Tue Feb 18 02:21:25 1992 K. Richard Pixley (rich at cygnus.com)
* write.c: comment change only.
- * tc-m88k.[hc]: pulled in from hack's unfinished work. These
+ * config/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
+ * config/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
+ * config/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.
+ * config/tc-i960.c, config/tc-sparc.c: white space and comments only.
- * tc-a29k.h: delete duplicate macro definition.
+ * config/tc-a29k.h: delete duplicate macro definition.
* new file atof-ns32k.c copied from hack's last unreleased gas.
diff --git a/contrib/binutils/gas/ChangeLog-9697 b/contrib/binutils/gas/ChangeLog-9697
index 7b93733..7ffff3e 100644
--- a/contrib/binutils/gas/ChangeLog-9697
+++ b/contrib/binutils/gas/ChangeLog-9697
@@ -145,7 +145,7 @@ Mon Dec 1 20:24:18 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
Sat Nov 22 16:19:22 1997 Richard Henderson <rth@cygnus.com>
- * tc-alpha.c (range_signed_16, range_signed_32): Work around an
+ * config/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>
@@ -171,7 +171,7 @@ Thu Nov 20 15:06:08 1997 Richard Earnshaw <rearnsha@arm.com>
Wed Nov 19 17:44:42 1997 Richard Henderson <rth@cygnus.com>
- * tc-sh.c (parse_reg): Properly quote for fv4.
+ * config/tc-sh.c (parse_reg): Properly quote for fv4.
Wed Nov 19 23:46:18 1997 Ian Lance Taylor <ian@cygnus.com>
@@ -287,7 +287,7 @@ Tue Nov 4 16:35:57 1997 Ian Dall <Ian.Dall@dsto.defence.gov.au>
Mon Nov 3 13:30:17 1997 Gavin Koch <gavin@cygnus.com>
- * tc-mips.c (md_begin): Reorganize setting of default values so
+ * config/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
@@ -499,7 +499,7 @@ Thu Oct 9 15:17:50 1997 Ian Lance Taylor <ian@cygnus.com>
Thu Oct 9 01:44:36 1997 J"orn Rennecke <amylaar@cygnus.co.uk>
- * tc-d10v.h (TC_START_LABEL): Don't define.
+ * config/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>
@@ -941,7 +941,7 @@ Thu Aug 21 00:59:53 1997 Doug Evans <dje@canuck.cygnus.com>
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
+ * config/tc-sh.c (parse_reg, get_specific, build_Mytes): Add SH4
floating point extensions.
(parse_reg): parse sgr and dbr.
@@ -1165,14 +1165,14 @@ Mon Jul 28 18:41:41 1997 Rob Savoye <rob@chinadoll.cygnus.com>
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
+ * config/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.
+ * config/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>
@@ -1462,7 +1462,7 @@ Wed May 14 09:54:53 1997 Nick Clifton <nickc@cygnus.com>
options -mapcs-32, -mapcs-26, -marmv2, -marmv2a, -marmv3,
-marmv3m, -marmv4, -marmv4t.
- * tc-arm.h (LOCAL_LABEL): Removed the definition of this macro
+ * config/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)
@@ -2197,9 +2197,9 @@ 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.
+ * config/tc-mips.c (ECOFF_LITTLE_FORMAT): Define.
(mips_target_format): Use.
- * te-lnews.h: New file.
+ * config/te-lnews.h: New file.
Wed Feb 26 15:33:46 1997 Fred Fish <fnf@cygnus.com>
@@ -2387,7 +2387,7 @@ Fri Feb 21 14:34:31 1997 Martin M. Hunt <hunt@pizza.cygnus.com>
Fri Feb 21 10:08:25 1997 Jim Wilson <wilson@cygnus.com>
- * tc-mips.c (mips_ip): If configured for an embedded ELF system,
+ * config/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>
@@ -3713,12 +3713,12 @@ Thu Oct 3 00:16:50 1996 Jeffrey A Law (law@cygnus.com)
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.
+ * config/obj-evax.h: move openvms definitions from here to tc-alpha.c.
+ * config/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-alpha.h (TC_CONS_FIX_NEW): define
Tue Oct 1 16:16:01 1996 Joel Sherrill <joel@oarcorp.com>
@@ -3749,7 +3749,7 @@ Tue Oct 1 12:37:48 1996 Ian Lance Taylor <ian@cygnus.com>
Tue Oct 1 09:36:19 1996 Stu Grossman (grossman@critters.cygnus.com)
- * tc-v850.h: Define LOCAL_LABEL to recognise _.L_* symbols
+ * config/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>
@@ -4142,7 +4142,7 @@ Thu Aug 15 17:01:31 1996 James G. Smith <jsmith@cygnus.co.uk>
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
+ * config/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.
@@ -4337,7 +4337,7 @@ Mon Jul 22 14:01:33 1996 Ian Lance Taylor <ian@cygnus.com>
Mon Jul 22 12:46:55 1996 Richard Henderson <rth@tamu.edu>
- * tc-alpha.c: Patches to track current minimum alignment to reduce
+ * config/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.
@@ -4357,10 +4357,10 @@ Mon Jul 22 12:46:55 1996 Richard Henderson <rth@tamu.edu>
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.
+ * config/tc-alpha.h (md_flush_pending_output): Remove.
(md_cons_align): Add.
- * tc-alpha.c: Add oodles of function description comments.
+ * config/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.
@@ -5320,7 +5320,7 @@ 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.
+ * config/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.
diff --git a/contrib/binutils/gas/ChangeLog-9899 b/contrib/binutils/gas/ChangeLog-9899
index a853b88..c2e4d89 100644
--- a/contrib/binutils/gas/ChangeLog-9899
+++ b/contrib/binutils/gas/ChangeLog-9899
@@ -1,3 +1,9 @@
+1999-12-27 Alan Modra <alan@spri.levels.unisa.edu.au>
+
+ * config/tc-i386.c (MATCH): Relax JumpAbsolute check. Emit a
+ warning for absolute jump/call without `*' in non-intel mode. No
+ need to set i.types[0] JumpAbsolute in intel mode.
+
1999-12-22 Philip Blundell <pb@futuretv.com>
* config/tc-arm.c (arm_s_text): If OBJ_ELF, call the appropriate
@@ -174,8 +180,8 @@ Wed Oct 27 16:50:44 1999 Don Lindsay <dlindsay@cygnus.com>
Mon Oct 18 18:11:10 MDT 1999 Diego Novillo <dnovillo@cygnus.com>
- * tc_d10v.c (find_opcode): Allow ATSIGN to match expressions of the
- form @abs16, @(abs16) and @(abs16 + imm).
+ * config/tc-d10v.c (find_opcode): Allow ATSIGN to match
+ expressions of the form @abs16, @(abs16) and @(abs16 + imm).
1999-10-21 Gavin Romig-Koch <gavin@cygnus.com>
@@ -379,7 +385,7 @@ Wed Sep 15 05:14:32 1999 Jeffrey A Law (law@cygnus.com)
(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-hppa.h (md_end): Define for OBJ_ELF.
1999-09-14 Michael Meissner <meissner@cygnus.com>
@@ -1074,10 +1080,10 @@ Thu Jul 1 15:33:10 1999 Jeffrey A Law (law@cygnus.com)
Mon Jun 21 16:45:19 1999 Jeffrey A Law (law@cygnus.com)
- * tc-hppa.c (elf_hppa_reloc_type): Renamed from elf32_hppa_reloc_type.
+ * config/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.
+ * config/tc-hppa.h (TARGET_FORMAT): Handle elf64-hppa format.
1999-06-21 Ian Lance Taylor <ian@zembu.com>
@@ -1099,7 +1105,7 @@ Mon Jun 21 16:45:19 1999 Jeffrey A Law (law@cygnus.com)
Fri Jun 18 14:34:18 1999 Jeffrey A Law (law@cygnus.com)
- * tc-hppa.c: General cleanups of ELF support. No more spaces
+ * config/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.
@@ -1670,9 +1676,9 @@ Thu May 6 19:50:14 1999 Richard Henderson <rth@cygnus.com>
1999-05-05 Catherine Moore <clm@cygnus.com>
- * tc-m68k.c: Include elf/m68k.h.
+ * config/tc-m68k.c: Include elf/m68k.h.
(m68k_elf_final_processing): New routine.
- * tc-m68k.h (elf_tc_final_processing m68k_elf_final_processing):
+ * config/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)
@@ -1772,7 +1778,7 @@ Fri Apr 16 12:26:39 1999 Bob Manson <manson@charmed.cygnus.com>
Thu Apr 15 16:52:09 1999 Jeffrey A Law (law@cygnus.com)
- * tc-hppa.c (pa_get_absolute_exression): Try to handle "5 %r3"
+ * config/tc-hppa.c (pa_get_absolute_exression): Try to handle "5 %r3"
expressions correctly.
@@ -1782,7 +1788,7 @@ Thu Apr 15 16:52:09 1999 Jeffrey A Law (law@cygnus.com)
Mon Apr 12 23:45:07 1999 Jeffrey A Law (law@cygnus.com)
- * tc-hppa.c (pa_ip, case '3'): New case for PA2.0 fmpyfadd
+ * config/tc-hppa.c (pa_ip, case '3'): New case for PA2.0 fmpyfadd
and fmpynfadd instructions.
1999-04-11 Richard Henderson <rth@cygnus.com>
@@ -1805,7 +1811,7 @@ Mon Apr 12 23:45:07 1999 Jeffrey A Law (law@cygnus.com)
Sat Apr 10 20:10:02 1999 Richard Henderson <rth@cygnus.com>
- * tc-alpha.c (load_expression): Call as_bad instead of abort.
+ * config/tc-alpha.c (load_expression): Call as_bad instead of abort.
1999-04-08 Nick Clifton <nickc@cygnus.com>
@@ -1869,18 +1875,18 @@ Sat Apr 10 20:10:02 1999 Richard Henderson <rth@cygnus.com>
Mon Mar 29 10:15:40 CST 1999 Catherine Moore <clm@cygnus.com>
- * tc-mips.c (md_apply_fix): Adjust value for linkonce sections.
+ * config/tc-mips.c (md_apply_fix): Adjust value for linkonce sections.
Wed Mar 24 14:11:10 1999 Jeffrey A Law (law@cygnus.com)
- * tc-hppa.c (pa_parse_nonneg_cmpsub_cmpltr): Clean up code to
+ * config/tc-hppa.c (pa_parse_nonneg_cmpsub_cmpltr): Clean up code to
detect ",n" without a condition.
(pa_parse_neg_cmpsub_cmpltr): Likewise.
Tue Mar 23 11:28:23 1999 Jeffrey A Law (law@cygnus.com)
- * tc-hppa.c (pa_ip, case '~'): The condition for a branch on bit
+ * config/tc-hppa.c (pa_ip, case '~'): The condition for a branch on bit
instruction is encoded with one bit.
@@ -1897,16 +1903,16 @@ Tue Mar 23 11:28:23 1999 Jeffrey A Law (law@cygnus.com)
Sun Mar 21 18:08:18 1999 Richard Henderson <rth@cygnus.com>
- * tc-alpha.c (md_assemble): Allow '6' in an opcode.
+ * config/tc-alpha.c (md_assemble): Allow '6' in an opcode.
Thu Mar 18 10:55:30 1999 Jeffrey A Law (law@cygnus.com)
- * tc-hppa.c (pa_ip, case 'a'): Do not call pa_parse_..._cmpsub_cmpltr.
+ * config/tc-hppa.c (pa_ip, case 'a'): Do not call pa_parse_..._cmpsub_cmpltr.
Thu Mar 18 02:30:07 1999 Jeffrey A Law (law@cygnus.com)
- * tc-hppa.c (pa_ip, case 'd'): Do not allow ",n".
+ * config/tc-hppa.c (pa_ip, case 'd'): Do not allow ",n".
1999-03-15 Martin Hunt <hunt@cygnus.com>
@@ -2602,9 +2608,9 @@ Wed Oct 7 14:09:14 1998 Nick Clifton <nickc@cygnus.com>
Tue Oct 6 09:31:15 1998 Catherine Moore <clm@cygnus.com>
- * tc-sparc.h (TC_FORCE_RELOCATION): Define.
+ * config/tc-sparc.h (TC_FORCE_RELOCATION): Define.
(elf32_sparc_force_relocation): Declare.
- * tc-sparc.c (md_apply_fix3): Handle vtable relocs.
+ * config/tc-sparc.c (md_apply_fix3): Handle vtable relocs.
(tc_gen_reloc): Handle vtable relocs.
(elf32_sparc_force_relocation): New.
@@ -2622,7 +2628,7 @@ Mon Oct 5 09:25:32 1998 Catherine Moore <clm@cygnsu.com>
Mon Oct 5 00:48:52 1998 Jeffrey A Law (law@cygnus.com)
- * tc-hppa.c (fp_operand_format): Add some additional formats.
+ * config/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".
@@ -2843,8 +2849,8 @@ Wed Aug 19 09:30:16 1998 Nick Clifton <nickc@cygnus.com>
Tue Aug 18 11:59:43 1998 Catherine Moore <clm@cygnus.com>
- * tc-arm.h: Define obj_fix_adjustable for OBJ_ELF.
- * tc-arm.c (arm_fix_adjustable): New routine.
+ * config/tc-arm.h: Define obj_fix_adjustable for OBJ_ELF.
+ * config/tc-arm.c (arm_fix_adjustable): New routine.
1998-08-13 Vladimir N. Makarov <vmakarov@cygnus.com>
@@ -3194,7 +3200,7 @@ Thu Jul 2 16:24:58 1998 Ian Lance Taylor <ian@cygnus.com>
Thu Jul 2 14:06:22 1998 Klaus Kaempf <kkaempf@rmi.de>
- * obj-vms.c: Add C++ support with ctors/dtors sections. Add weak
+ * config/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.
@@ -3207,7 +3213,7 @@ Thu Jul 2 14:06:22 1998 Klaus Kaempf <kkaempf@rmi.de>
(vms_write_object_file): Write Ctors_Symbols/Dtors_Symbols to
appropriate section.
- * tc-alpha.h (TARGET_FORMAT): Rename "evax-alpha" to "vms-alpha".
+ * config/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>
@@ -3232,7 +3238,7 @@ Wed Jul 1 16:35:32 1998 Doug Evans <devans@seba.cygnus.com>
Wed Jul 1 21:38:56 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
- * config/tc-sh (COND_JUMP_DELAY, COND12_DELAY_LENGTH): Define.
+ * config/tc-sh.c (COND_JUMP_DELAY, COND12_DELAY_LENGTH): Define.
Changed all users of COND12_DELAY.
Fri Jun 26 11:21:11 1998 Jeffrey A Law (law@cygnus.com)
@@ -4414,7 +4420,7 @@ Fri Feb 20 15:03:13 1998 Ian Lance Taylor <ian@cygnus.com>
Thu Feb 19 22:25:42 1998 Richard Henderson <rth@cygnus.com>
- * tc-ppc.c (ppc_biei): Cache the last symbol we inserted
+ * config/tc-ppc.c (ppc_biei): Cache the last symbol we inserted
so we don't have to scan the entire list.
Tue Feb 17 17:02:15 1998 Fred Fish <fnf@cygnus.com>
@@ -4487,7 +4493,7 @@ Wed Feb 11 23:26:28 1998 Jeffrey A Law (law@cygnus.com)
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):
+ * config/tc-d10v.c (parallel_ok, find_opcode):
Split OPERAND_ACC into OPERAND_ACC0 and OPERAND_ACC1.
Introduce OPERAND_GPR.
@@ -4685,9 +4691,9 @@ Thu Jan 29 18:48:19 1998 Bill Moyer <billm@cygnus.com>
Wed Jan 28 14:35:00 1998 Bill Moyer <billm@cygnus.com>
* as.h (flag_warn_suppress_instructionswap): added new flag.
- * tc-d10v.c (md_parse_option,md_longopts): added "--nowarnswap"
+ * config/tc-d10v.c (md_parse_option,md_longopts): added "--nowarnswap"
command line argument.
- * tc-d10v.c (write_2_short): emit "Swapping instructions"
+ * config/tc-d10v.c (write_2_short): emit "Swapping instructions"
warning only if flag_warn_suppress_instructionswap is false.
Wed Jan 28 16:41:19 1998 J.J. van der Heijden <J.J.vanderHeijden@student.utwente.nl>
@@ -4797,20 +4803,20 @@ Fri Jan 16 14:51:48 1998 Ian Lance Taylor <ian@cygnus.com>
Fri Jan 16 11:30:37 1998 Richard Henderson <rth@cygnus.com>
- * tc-m68k.c (m68k_ip): Remove absl->reglst MRI hack.
+ * config/tc-m68k.c (m68k_ip): Remove absl->reglst MRI hack.
(crack_operand): Add reg->reglst MRI hack.
(r_seg): Put reglst symbols in reg_section.
(m68k_frob_symbol): Frob reglst symbols into absolute_section.
Thu Jan 15 14:19:01 1998 Richard Henderson <rth@cygnus.com>
- * tc-sh.c (get_specific): Handle SGR & DBR.
+ * config/tc-sh.c (get_specific): Handle SGR & DBR.
Thu Jan 15 13:46:48 1998 Richard Henderson <rth@cygnus.com>
- * tc-h8300.c (parse_reg): Take the length of the symbol into
+ * config/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-h8500.c (parse_reg): Likewise.
Wed Jan 14 17:52:33 1998 Nick Clifton <nickc@cygnus.com>
@@ -4838,7 +4844,7 @@ Mon Jan 12 13:04:57 1998 Doug Evans <devans@seba.cygnus.com>
(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.
+ * config/tc-m32r.c: Clean up pass over `struct foo' usage.
(md_estimate_size_before_relax): Use CGEN_INSN_MNEMONIC.
Tue Jan 6 15:36:02 1998 Richard Henderson <rth@cygnus.com>
diff --git a/contrib/binutils/gas/Makefile.am b/contrib/binutils/gas/Makefile.am
index 357f3cf..304189d 100644
--- a/contrib/binutils/gas/Makefile.am
+++ b/contrib/binutils/gas/Makefile.am
@@ -60,11 +60,15 @@ CPU_TYPES = \
m88k \
mcore \
mips \
+ mmix \
mn10200 \
mn10300 \
ns32k \
+ openrisc \
+ pdp11 \
pj \
ppc \
+ s390 \
sh \
sparc \
tahoe \
@@ -74,6 +78,7 @@ CPU_TYPES = \
vax \
w65 \
v850 \
+ xstormy16 \
z8k
# Object format types. This is only used for dependency information.
@@ -100,7 +105,7 @@ CPU_OBJ_VALID = \
case $$o in \
aout) \
case $$c in \
- a29k | arm | cris | i386 | m68k | mips | ns32k | sparc | tahoe | tic30 | vax) \
+ a29k | arm | cris | i386 | m68k | mips | ns32k | pdp11 | sparc | tahoe | tic30 | vax) \
valid=yes ;; \
esac ;; \
bout) \
@@ -109,7 +114,7 @@ CPU_OBJ_VALID = \
esac ;; \
coff) valid=yes; \
case $$c in \
- cris | i860) \
+ cris | i860 | mmix) \
valid= ;; \
esac ;; \
ecoff) \
@@ -241,11 +246,15 @@ TARGET_CPU_CFILES = \
config/tc-m88k.c \
config/tc-mcore.c \
config/tc-mips.c \
+ config/tc-mmix.c \
config/tc-mn10200.c \
config/tc-mn10300.c \
config/tc-ns32k.c \
+ config/tc-openrisc.c \
+ config/tc-pdp11.c \
config/tc-pj.c \
config/tc-ppc.c \
+ config/tc-s390.c \
config/tc-sh.c \
config/tc-sparc.c \
config/tc-tahoe.c \
@@ -255,6 +264,7 @@ TARGET_CPU_CFILES = \
config/tc-vax.c \
config/tc-w65.c \
config/tc-v850.c \
+ config/tc-xstormy16.c \
config/tc-z8k.c
TARGET_CPU_HFILES = \
@@ -281,11 +291,15 @@ TARGET_CPU_HFILES = \
config/tc-m88k.h \
config/tc-mcore.h \
config/tc-mips.h \
+ config/tc-mmix.h \
config/tc-mn10200.h \
config/tc-mn10300.h \
config/tc-ns32k.h \
+ config/tc-openrisc.h \
+ config/tc-pdp11.h \
config/tc-pj.h \
config/tc-ppc.h \
+ config/tc-s390.h \
config/tc-sh.h \
config/tc-sparc.h \
config/tc-tahoe.h \
@@ -295,6 +309,7 @@ TARGET_CPU_HFILES = \
config/tc-vax.h \
config/tc-w65.h \
config/tc-v850.h \
+ config/tc-xstormy16.h \
config/tc-z8k.h
# OBJ files in config
@@ -340,6 +355,7 @@ TARG_ENV_HFILES = \
config/te-hppa64.h \
config/te-hppalinux64.h \
config/te-i386aix.h \
+ config/te-ia64aix.h \
config/te-ic960.h \
config/te-linux.h \
config/te-lnews.h \
@@ -425,10 +441,8 @@ stamp-mk.com: vmsconf.sh Makefile
$(SHELL) $(srcdir)/../move-if-change new-make.com $(srcdir)/make-gas.com
touch stamp-mk.com
-EXTRA_DIST = make-gas.com
-
-DISTSTUFF = make-gas.com m68k-parse.c itbl-parse.c itbl-parse.h itbl-lex.c
-diststuff: $(DISTSTUFF) info
+EXTRA_DIST = make-gas.com m68k-parse.c itbl-parse.c itbl-parse.h itbl-lex.c
+diststuff: $(EXTRA_DIST) info
DISTCLEANFILES = targ-cpu.h obj-format.h targ-env.h itbl-cpu.h cgen-desc.h
@@ -451,6 +465,9 @@ INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(srcdir)/config -I$(INCDIR)
# in a subdirectory.
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\""
+DEP_FLAGS = -DBFD_ASSEMBLER -DOBJ_MAYBE_ELF \
+ -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES)
+
# How to link with both our special library facilities
# and the system's installed libraries.
@@ -742,6 +759,8 @@ de-stage3:
DEP_FILE_DEPS = $(CFILES) $(HFILES) $(TARGET_CPU_CFILES) \
$(TARGET_CPU_HFILES) $(OBJ_FORMAT_CFILES) $(OBJ_FORMAT_HFILES)
+Makefile: $(BFDDIR)/configure.in
+
# Automatic dependency computation. This is a real pain, because the
# dependencies change based on target_cpu_type and obj_format.
# Just to make things even more complicated, automake separates the
@@ -779,7 +798,7 @@ DEP1: $(CFILES) $(MULTI_CFILES)
echo '' > targ-env.h; \
echo '' > itbl-cpu.h; \
echo '' > itbl-parse.h; \
- $(MKDEP) -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) $? > DEP
+ $(MKDEP) $(DEP_FLAGS) $? > DEP
mv -f DEPDIR/DEP $@
# Work out the special dependencies for the tc-*.c files.
@@ -800,7 +819,7 @@ DEPTC: $(TARGET_CPU_CFILES)
echo '#include "opcodes/'"$${c}"'-desc.h"' > cgen-desc.h; \
rm -f dummy.c; \
cp $${srcdir}/config/tc-$${c}.c dummy.c; \
- $(MKDEP) -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) dummy.c | \
+ $(MKDEP) $(DEP_FLAGS) dummy.c | \
sed -e "s/dummy.o: dummy.c/DEPTC_$${c}_$${o} =/" >> ../DEPTCA; \
rm -f dummy.c; \
else true; fi; \
@@ -838,7 +857,7 @@ DEPOBJ: $(OBJ_FORMAT_CFILES)
echo '' > itbl-parse.h; \
rm -f dummy.c; \
cp $${srcdir}/config/obj-$${o}.c dummy.c; \
- $(MKDEP) -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) dummy.c | \
+ $(MKDEP) $(DEP_FLAGS) dummy.c | \
sed -e "s/dummy.o: dummy.c/DEPOBJ_$${c}_$${o} =/" >> ../DEPOBJA; \
rm -f dummy.c; \
else true; fi; \
@@ -873,7 +892,7 @@ DEP2: $(TARGET_CPU_HFILES) $(OBJ_FORMAT_HFILES)
if [ x$${valid} = xyes ]; then \
echo '#include "tc-'"$${c}"'.h"' > targ-cpu.h; \
echo '#include "obj-'"$${o}"'.h"' > dummy.c; \
- $(MKDEP) -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) dummy.c | \
+ $(MKDEP) $(DEP_FLAGS) dummy.c | \
sed -e "s/dummy.o: dummy.c/DEP_$${c}_$${o} =/" >> ../DEP2A; \
else true; fi; \
done; \
@@ -921,359 +940,491 @@ dep-am: DEP
.PHONY: dep dep-in dep-am
AMKDEP = #DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING BELOW.
-DEPTC_a29k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-a29k.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/a29k.h
-DEPTC_a29k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-a29k.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/a29k.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/opcode/a29k.h
-DEPTC_a29k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-a29k.h $(INCDIR)/opcode/a29k.h
-DEPTC_alpha_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-alpha.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- subsegs.h $(INCDIR)/obstack.h struc-symbol.h ecoff.h \
- $(INCDIR)/opcode/alpha.h $(srcdir)/config/atof-vax.c
-DEPTC_alpha_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-alpha.h \
- ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \
- subsegs.h $(INCDIR)/obstack.h struc-symbol.h $(INCDIR)/opcode/alpha.h \
+DEPTC_a29k_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-a29k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/a29k.h
+DEPTC_a29k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-a29k.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/a29k.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/a29k.h
+DEPTC_a29k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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)/safe-ctype.h $(INCDIR)/opcode/a29k.h
+DEPTC_alpha_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-alpha.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \
+ struc-symbol.h ecoff.h $(INCDIR)/opcode/alpha.h $(INCDIR)/safe-ctype.h \
$(srcdir)/config/atof-vax.c
-DEPTC_alpha_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-alpha.h subsegs.h \
- $(INCDIR)/obstack.h struc-symbol.h ecoff.h $(INCDIR)/coff/sym.h \
- $(INCDIR)/coff/ecoff.h $(INCDIR)/opcode/alpha.h $(INCDIR)/elf/alpha.h \
- $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h $(srcdir)/config/atof-vax.c
-DEPTC_alpha_evax = $(srcdir)/config/obj-evax.h $(srcdir)/config/tc-alpha.h \
+DEPTC_alpha_ecoff = $(INCDIR)/symcat.h $(srcdir)/config/obj-ecoff.h \
+ $(srcdir)/config/tc-alpha.h ecoff.h $(INCDIR)/coff/sym.h \
+ $(INCDIR)/coff/ecoff.h subsegs.h $(INCDIR)/obstack.h \
+ struc-symbol.h $(INCDIR)/opcode/alpha.h $(INCDIR)/safe-ctype.h \
+ $(srcdir)/config/atof-vax.c
+DEPTC_alpha_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-alpha.h \
subsegs.h $(INCDIR)/obstack.h struc-symbol.h ecoff.h \
- $(INCDIR)/opcode/alpha.h $(srcdir)/config/atof-vax.c
-DEPTC_arc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arc.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- struc-symbol.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h \
- $(srcdir)/../opcodes/arc-ext.h $(INCDIR)/elf/arc.h \
- $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h
-DEPTC_arc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h struc-symbol.h \
- subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h \
- $(srcdir)/../opcodes/arc-ext.h $(INCDIR)/elf/arc.h \
- $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h
-DEPTC_arm_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-arm.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h
-DEPTC_arm_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arm.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/arm.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h
-DEPTC_arm_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arm.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \
- dwarf2dbg.h
-DEPTC_avr_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-avr.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h $(INCDIR)/opcode/alpha.h \
+ $(INCDIR)/elf/alpha.h $(INCDIR)/elf/reloc-macros.h \
+ dwarf2dbg.h $(INCDIR)/safe-ctype.h $(srcdir)/config/atof-vax.c
+DEPTC_alpha_evax = $(INCDIR)/symcat.h $(srcdir)/config/obj-evax.h \
+ $(srcdir)/config/tc-alpha.h subsegs.h $(INCDIR)/obstack.h \
+ struc-symbol.h ecoff.h $(INCDIR)/opcode/alpha.h $(INCDIR)/safe-ctype.h \
+ $(srcdir)/config/atof-vax.c
+DEPTC_arc_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-arc.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h struc-symbol.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/arc.h $(srcdir)/../opcodes/arc-ext.h \
+ $(INCDIR)/elf/arc.h $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h
+DEPTC_arc_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ struc-symbol.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/arc.h $(srcdir)/../opcodes/arc-ext.h \
+ $(INCDIR)/elf/arc.h $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h
+DEPTC_arm_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-arm.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h
+DEPTC_arm_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-arm.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/arm.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h subsegs.h \
+ $(INCDIR)/obstack.h
+DEPTC_arm_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h
+DEPTC_avr_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-avr.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/avr.h
-DEPTC_avr_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-avr.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/avr.h
-DEPTC_cris_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-cris.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \
+DEPTC_avr_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/avr.h
+DEPTC_cris_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-cris.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
$(INCDIR)/opcode/cris.h dwarf2dbg.h
-DEPTC_cris_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-cris.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/cris.h dwarf2dbg.h
-DEPTC_d10v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d10v.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+DEPTC_cris_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-cris.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/cris.h dwarf2dbg.h
+DEPTC_d10v_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-d10v.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/d10v.h \
$(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h
-DEPTC_d10v_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d10v.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/d10v.h $(INCDIR)/elf/ppc.h \
- $(INCDIR)/elf/reloc-macros.h
-DEPTC_d30v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d30v.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+DEPTC_d10v_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/d10v.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h
+DEPTC_d30v_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-d30v.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/d30v.h
-DEPTC_d30v_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d30v.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/d30v.h
-DEPTC_fr30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-fr30.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- subsegs.h $(INCDIR)/obstack.h $(INCDIR)/symcat.h $(srcdir)/../opcodes/fr30-desc.h \
- $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/fr30-opc.h \
- cgen.h
-DEPTC_fr30_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-fr30.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/symcat.h $(srcdir)/../opcodes/fr30-desc.h \
+DEPTC_d30v_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/d30v.h
+DEPTC_fr30_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-fr30.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/fr30-desc.h \
$(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/fr30-opc.h \
cgen.h
-DEPTC_h8300_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-h8300.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/h8300.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/h8300.h
-DEPTC_h8300_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8300.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/h8300.h
-DEPTC_h8500_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-h8500.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/h8500.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/h8500-opc.h
-DEPTC_h8500_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8500.h subsegs.h \
- $(INCDIR)/obstack.h $(srcdir)/../opcodes/h8500-opc.h
-DEPTC_hppa_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-hppa.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+DEPTC_fr30_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(srcdir)/../opcodes/fr30-desc.h $(INCDIR)/opcode/cgen.h \
+ $(srcdir)/../opcodes/fr30-opc.h cgen.h
+DEPTC_h8300_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-h8300.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/h8300.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/h8300.h \
+ $(INCDIR)/safe-ctype.h
+DEPTC_h8300_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/elf/h8.h $(INCDIR)/elf/reloc-macros.h
+DEPTC_h8500_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-h8500.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/h8500.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/h8500-opc.h \
+ $(INCDIR)/safe-ctype.h
+DEPTC_h8500_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h
+DEPTC_hppa_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-hppa.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
subsegs.h $(INCDIR)/obstack.h $(BFDDIR)/libhppa.h $(INCDIR)/opcode/hppa.h
-DEPTC_hppa_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-hppa.h $(BFDDIR)/elf32-hppa.h \
- $(BFDDIR)/libhppa.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h \
+DEPTC_hppa_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-hppa.h \
+ $(BFDDIR)/elf32-hppa.h $(BFDDIR)/libhppa.h $(INCDIR)/elf/hppa.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/safe-ctype.h \
subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/hppa.h \
dwarf2dbg.h
-DEPTC_ia64_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ia64.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+DEPTC_ia64_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-ia64.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h
-DEPTC_ia64_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ia64.h dwarf2dbg.h \
- subsegs.h $(INCDIR)/obstack.h
-DEPTC_i370_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i370.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+DEPTC_ia64_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ia64.h \
+ $(INCDIR)/safe-ctype.h dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h
+DEPTC_i370_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-i370.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
subsegs.h $(INCDIR)/obstack.h struc-symbol.h $(INCDIR)/opcode/i370.h
-DEPTC_i370_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i370.h subsegs.h \
- $(INCDIR)/obstack.h struc-symbol.h $(INCDIR)/opcode/i370.h \
- $(INCDIR)/elf/i370.h
-DEPTC_i386_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-i386.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \
+DEPTC_i370_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ struc-symbol.h $(INCDIR)/opcode/i370.h $(INCDIR)/elf/i370.h
+DEPTC_i386_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-i386.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
dwarf2dbg.h $(INCDIR)/opcode/i386.h
-DEPTC_i386_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i386.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/i386.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h dwarf2dbg.h \
- $(INCDIR)/opcode/i386.h
-DEPTC_i386_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i386.h subsegs.h \
+DEPTC_i386_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-i386.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h subsegs.h \
$(INCDIR)/obstack.h dwarf2dbg.h $(INCDIR)/opcode/i386.h
-DEPTC_i860_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i860.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/i860.h $(INCDIR)/elf/i860.h \
- $(INCDIR)/elf/reloc-macros.h
-DEPTC_i960_bout = $(srcdir)/config/obj-bout.h $(srcdir)/config/tc-i960.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/i960.h
-DEPTC_i960_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i960.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/i960.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i960.h
-DEPTC_i960_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i960.h $(INCDIR)/obstack.h \
+DEPTC_i386_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ dwarf2dbg.h $(INCDIR)/opcode/i386.h
+DEPTC_i860_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/i860.h $(INCDIR)/elf/i860.h $(INCDIR)/elf/reloc-macros.h
+DEPTC_i960_bout = $(INCDIR)/symcat.h $(srcdir)/config/obj-bout.h \
+ $(srcdir)/config/tc-i960.h $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h \
$(INCDIR)/opcode/i960.h
-DEPTC_m32r_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m32r.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- subsegs.h $(INCDIR)/obstack.h $(INCDIR)/symcat.h $(srcdir)/../opcodes/m32r-desc.h \
- $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/m32r-opc.h \
- cgen.h
-DEPTC_m32r_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32r.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/symcat.h $(srcdir)/../opcodes/m32r-desc.h \
+DEPTC_i960_coff = $(INCDIR)/symcat.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 \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i960.h
+DEPTC_i960_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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)/safe-ctype.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i960.h
+DEPTC_m32r_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-m32r.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/m32r-desc.h \
$(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/m32r-opc.h \
cgen.h
-DEPTC_m68hc11_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68hc11.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/m68hc11.h \
- dwarf2dbg.h
-DEPTC_m68hc11_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68hc11.h subsegs.h \
+DEPTC_m32r_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(srcdir)/../opcodes/m32r-desc.h $(INCDIR)/opcode/cgen.h \
+ $(srcdir)/../opcodes/m32r-opc.h cgen.h
+DEPTC_m68hc11_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-m68hc11.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h subsegs.h \
$(INCDIR)/obstack.h $(INCDIR)/opcode/m68hc11.h dwarf2dbg.h
-DEPTC_m68k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
- subsegs.h $(INCDIR)/opcode/m68k.h $(srcdir)/config/m68k-parse.h
-DEPTC_m68k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68k.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h $(INCDIR)/opcode/m68k.h \
- $(srcdir)/config/m68k-parse.h
-DEPTC_m68k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68k.h $(INCDIR)/obstack.h \
- subsegs.h $(INCDIR)/opcode/m68k.h $(srcdir)/config/m68k-parse.h \
- $(INCDIR)/elf/m68k.h $(INCDIR)/elf/reloc-macros.h
-DEPTC_m68k_hp300 = $(srcdir)/config/obj-hp300.h $(srcdir)/config/obj-aout.h \
+DEPTC_m68hc11_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68hc11.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/m68hc11.h dwarf2dbg.h
+DEPTC_m68k_aout = $(INCDIR)/symcat.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 \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h subsegs.h \
+ dwarf2dbg.h $(INCDIR)/opcode/m68k.h $(srcdir)/config/m68k-parse.h
+DEPTC_m68k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-m68k.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h \
+ subsegs.h dwarf2dbg.h $(INCDIR)/opcode/m68k.h $(srcdir)/config/m68k-parse.h
+DEPTC_m68k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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)/safe-ctype.h $(INCDIR)/obstack.h subsegs.h \
+ dwarf2dbg.h $(INCDIR)/opcode/m68k.h $(srcdir)/config/m68k-parse.h \
+ $(INCDIR)/elf/m68k.h $(INCDIR)/elf/reloc-macros.h
+DEPTC_m68k_hp300 = $(INCDIR)/symcat.h $(srcdir)/config/obj-hp300.h \
+ $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/obstack.h subsegs.h dwarf2dbg.h $(INCDIR)/opcode/m68k.h \
$(srcdir)/config/m68k-parse.h
-DEPTC_m88k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m88k.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/m88k.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/config/m88k-opcode.h
-DEPTC_m88k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m88k.h subsegs.h \
+DEPTC_m88k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-m88k.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/m88k.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h subsegs.h \
$(INCDIR)/obstack.h $(srcdir)/config/m88k-opcode.h
-DEPTC_mcore_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mcore.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/mcore.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/mcore-opc.h
-DEPTC_mcore_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mcore.h subsegs.h \
- $(INCDIR)/obstack.h $(srcdir)/../opcodes/mcore-opc.h \
- $(INCDIR)/elf/mcore.h $(INCDIR)/elf/reloc-macros.h
-DEPTC_mips_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-mips.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \
+DEPTC_m88k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(srcdir)/config/m88k-opcode.h
+DEPTC_mcore_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-mcore.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/mcore.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/mcore-opc.h \
+ $(INCDIR)/safe-ctype.h
+DEPTC_mcore_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mcore.h \
+ subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/mcore-opc.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/elf/mcore.h $(INCDIR)/elf/reloc-macros.h
+DEPTC_mips_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-mips.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/safe-ctype.h \
$(INCDIR)/opcode/mips.h itbl-ops.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \
ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
-DEPTC_mips_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mips.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/mipspe.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mips.h \
- itbl-ops.h $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h ecoff.h \
- $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
-DEPTC_mips_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-mips.h \
- ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \
- subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mips.h \
- itbl-ops.h $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h
-DEPTC_mips_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mips.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/mips.h itbl-ops.h \
- $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h ecoff.h \
- $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
-DEPTC_mn10200_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mn10200.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+DEPTC_mips_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-mips.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/mipspe.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/safe-ctype.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)/symcat.h $(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)/safe-ctype.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)/symcat.h $(srcdir)/config/obj-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)/safe-ctype.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_mmix_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mmix.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/mmix.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/mmix.h \
+ $(INCDIR)/safe-ctype.h dwarf2dbg.h
+DEPTC_mn10200_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-mn10200.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10200.h
-DEPTC_mn10200_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10200.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10200.h
-DEPTC_mn10300_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mn10300.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+DEPTC_mn10200_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/mn10200.h
+DEPTC_mn10300_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-mn10300.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10300.h \
dwarf2dbg.h
-DEPTC_mn10300_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10300.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10300.h dwarf2dbg.h
-DEPTC_ns32k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-ns32k.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ns32k.h \
- $(INCDIR)/obstack.h
-DEPTC_ns32k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ns32k.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+DEPTC_mn10300_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/mn10300.h dwarf2dbg.h
+DEPTC_ns32k_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-ns32k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
$(INCDIR)/opcode/ns32k.h $(INCDIR)/obstack.h
-DEPTC_ns32k_elf = $(srcdir)/config/obj-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_ns32k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-ns32k.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ns32k.h \
$(INCDIR)/obstack.h
-DEPTC_pj_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-pj.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+DEPTC_ns32k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ns32k.h \
+ $(INCDIR)/opcode/ns32k.h $(INCDIR)/obstack.h
+DEPTC_openrisc_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-openrisc.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \
+ $(srcdir)/../opcodes/openrisc-desc.h $(INCDIR)/opcode/cgen.h \
+ $(srcdir)/../opcodes/openrisc-opc.h cgen.h
+DEPTC_openrisc_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-openrisc.h \
+ subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/openrisc-desc.h \
+ $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/openrisc-opc.h \
+ cgen.h
+DEPTC_pdp11_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-pdp11.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/pdp11.h
+DEPTC_pdp11_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-pdp11.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/opcode/pdp11.h
+DEPTC_pdp11_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pdp11.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/pdp11.h
+DEPTC_pj_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-pj.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
$(INCDIR)/opcode/pj.h
-DEPTC_pj_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pj.h $(INCDIR)/opcode/pj.h
-DEPTC_ppc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ppc.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/rs6000.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/ppc.h
-DEPTC_ppc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ppc.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/ppc.h $(INCDIR)/elf/ppc.h \
- $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h
-DEPTC_sh_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sh.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/sh.h $(BFDDIR)/libcoff.h \
+DEPTC_pj_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pj.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/pj.h
+DEPTC_ppc_coff = $(INCDIR)/symcat.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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/ppc.h
+DEPTC_ppc_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/ppc.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
+ dwarf2dbg.h
+DEPTC_s390_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-s390.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h struc-symbol.h $(INCDIR)/opcode/s390.h \
+ $(INCDIR)/elf/s390.h $(INCDIR)/elf/reloc-macros.h
+DEPTC_s390_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-s390.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ struc-symbol.h $(INCDIR)/opcode/s390.h $(INCDIR)/elf/s390.h \
+ $(INCDIR)/elf/reloc-macros.h
+DEPTC_sh_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-sh.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/sh.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/sh-opc.h \
- struc-symbol.h dwarf2dbg.h
-DEPTC_sh_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh.h subsegs.h \
- $(INCDIR)/obstack.h $(srcdir)/../opcodes/sh-opc.h struc-symbol.h \
- $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h
-DEPTC_sparc_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-sparc.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \
- $(INCDIR)/opcode/sparc.h
-DEPTC_sparc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sparc.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/sparc.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/sparc.h
-DEPTC_sparc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sparc.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/sparc.h $(INCDIR)/elf/sparc.h \
+ $(INCDIR)/safe-ctype.h struc-symbol.h dwarf2dbg.h
+DEPTC_sh_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h struc-symbol.h $(INCDIR)/elf/sh.h \
$(INCDIR)/elf/reloc-macros.h dwarf2dbg.h
-DEPTC_tahoe_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tahoe.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
- $(INCDIR)/opcode/tahoe.h
-DEPTC_tahoe_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tahoe.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+DEPTC_sparc_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-sparc.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/sparc.h
+DEPTC_sparc_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-sparc.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/sparc.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/opcode/sparc.h
+DEPTC_sparc_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/sparc.h $(INCDIR)/elf/sparc.h $(INCDIR)/elf/reloc-macros.h \
+ dwarf2dbg.h
+DEPTC_tahoe_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-tahoe.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h $(INCDIR)/opcode/tahoe.h
+DEPTC_tahoe_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-tahoe.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
$(INCDIR)/obstack.h $(INCDIR)/opcode/tahoe.h
-DEPTC_tahoe_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tahoe.h $(INCDIR)/obstack.h \
- $(INCDIR)/opcode/tahoe.h
-DEPTC_tic30_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tic30.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/tic30.h
-DEPTC_tic30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic30.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic30.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/opcode/tic30.h
-DEPTC_tic30_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic30.h $(INCDIR)/opcode/tic30.h
-DEPTC_tic54x_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic54x.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h sb.h macro.h \
+DEPTC_tahoe_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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)/safe-ctype.h $(INCDIR)/obstack.h $(INCDIR)/opcode/tahoe.h
+DEPTC_tic30_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-tic30.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/tic30.h
+DEPTC_tic30_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-tic30.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/tic30.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/tic30.h
+DEPTC_tic30_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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)/safe-ctype.h $(INCDIR)/opcode/tic30.h
+DEPTC_tic54x_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-tic54x.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h sb.h macro.h \
subsegs.h $(INCDIR)/obstack.h struc-symbol.h $(INCDIR)/opcode/tic54x.h
-DEPTC_tic54x_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic54x.h sb.h \
- macro.h subsegs.h $(INCDIR)/obstack.h struc-symbol.h \
- $(INCDIR)/opcode/tic54x.h $(srcdir)/config/obj-coff.h \
+DEPTC_tic54x_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic54x.h \
+ $(INCDIR)/safe-ctype.h sb.h macro.h subsegs.h $(INCDIR)/obstack.h \
+ struc-symbol.h $(INCDIR)/opcode/tic54x.h $(srcdir)/config/obj-coff.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \
$(BFDDIR)/libcoff.h
-DEPTC_tic80_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic80.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic80.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/opcode/tic80.h
-DEPTC_tic80_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic80.h $(INCDIR)/opcode/tic80.h
-DEPTC_vax_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-vax.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(srcdir)/config/vax-inst.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h
-DEPTC_vax_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-vax.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(srcdir)/config/vax-inst.h $(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h
-DEPTC_vax_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-vax.h $(srcdir)/config/vax-inst.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h
-DEPTC_vax_vms = $(srcdir)/config/obj-vms.h $(srcdir)/config/tc-vax.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(srcdir)/config/vax-inst.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h
-DEPTC_w65_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-w65.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/w65.h $(BFDDIR)/libcoff.h \
+DEPTC_tic80_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-tic80.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/tic80.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/tic80.h
+DEPTC_tic80_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic80.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/tic80.h
+DEPTC_vax_aout = $(INCDIR)/symcat.h $(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 \
+ $(INCDIR)/safe-ctype.h
+DEPTC_vax_coff = $(INCDIR)/symcat.h $(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 $(INCDIR)/safe-ctype.h
+DEPTC_vax_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-vax.h \
+ $(srcdir)/config/vax-inst.h $(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h \
+ $(INCDIR)/safe-ctype.h
+DEPTC_vax_vms = $(INCDIR)/symcat.h $(srcdir)/config/obj-vms.h \
+ $(srcdir)/config/tc-vax.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(srcdir)/config/vax-inst.h \
+ $(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h $(INCDIR)/safe-ctype.h
+DEPTC_w65_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-w65.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/w65.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/w65-opc.h
-DEPTC_w65_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-w65.h subsegs.h \
- $(INCDIR)/obstack.h $(srcdir)/../opcodes/w65-opc.h
-DEPTC_v850_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-v850.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+DEPTC_w65_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-w65.h \
+ subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/w65-opc.h
+DEPTC_v850_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-v850.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/v850.h \
dwarf2dbg.h
-DEPTC_v850_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-v850.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/v850.h dwarf2dbg.h
-DEPTC_z8k_coff = $(srcdir)/../opcodes/z8k-opc.h $(srcdir)/config/obj-coff.h \
+DEPTC_v850_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/v850.h dwarf2dbg.h
+DEPTC_xstormy16_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-xstormy16.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \
+ $(srcdir)/../opcodes/xstormy16-desc.h $(INCDIR)/opcode/cgen.h \
+ $(srcdir)/../opcodes/xstormy16-opc.h cgen.h
+DEPTC_xstormy16_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-xstormy16.h \
+ subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/xstormy16-desc.h \
+ $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/xstormy16-opc.h \
+ cgen.h
+DEPTC_z8k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
$(srcdir)/config/tc-z8k.h $(INCDIR)/coff/internal.h \
- $(INCDIR)/coff/z8k.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
-DEPTC_z8k_elf = $(srcdir)/../opcodes/z8k-opc.h $(srcdir)/config/obj-elf.h \
+ $(INCDIR)/coff/z8k.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h $(srcdir)/../opcodes/z8k-opc.h
+DEPTC_z8k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-z8k.h \
+ $(INCDIR)/safe-ctype.h $(srcdir)/../opcodes/z8k-opc.h
DEPTC_hppa_som = $(srcdir)/config/tc-hppa.h subsegs.h \
$(INCDIR)/obstack.h $(BFDDIR)/libhppa.h $(INCDIR)/opcode/hppa.h \
$(BFDDIR)/som.h
@@ -1282,322 +1433,441 @@ DEPTC_i386_multi = $(DEPTC_i386_aout) $(DEPTC_i386_coff) \
DEPTC_mips_multi = $(DEPTC_mips_coff) $(DEPTC_mips_ecoff) \
$(DEPTC_mips_elf)
DEPTC_cris_multi = $(DEPTC_cris_aout) $(DEPTC_cris_elf)
-DEPOBJ_a29k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-a29k.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/obstack.h
-DEPOBJ_a29k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-a29k.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/a29k.h $(BFDDIR)/libcoff.h \
+DEPOBJ_a29k_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-a29k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
+DEPOBJ_a29k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-a29k.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/a29k.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_a29k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-a29k.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_alpha_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-alpha.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_alpha_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-alpha.h \
+DEPOBJ_a29k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+DEPOBJ_alpha_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-alpha.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h
+DEPOBJ_alpha_ecoff = $(INCDIR)/symcat.h $(srcdir)/config/obj-ecoff.h \
+ $(srcdir)/config/tc-alpha.h ecoff.h $(INCDIR)/coff/sym.h \
+ $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(BFDDIR)/libecoff.h
+DEPOBJ_alpha_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(BFDDIR)/libecoff.h
-DEPOBJ_alpha_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-alpha.h subsegs.h \
- $(INCDIR)/obstack.h ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \
$(INCDIR)/elf/alpha.h $(INCDIR)/elf/reloc-macros.h \
$(INCDIR)/aout/aout64.h
-DEPOBJ_alpha_evax = $(srcdir)/config/obj-evax.h $(srcdir)/config/tc-alpha.h
-DEPOBJ_arc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arc.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- struc-symbol.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_arc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h struc-symbol.h \
- subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_arm_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-arm.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/obstack.h
-DEPOBJ_arm_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arm.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/arm.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_arm_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arm.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_avr_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-avr.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_avr_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-avr.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_cris_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-cris.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/obstack.h
-DEPOBJ_cris_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-cris.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_d10v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d10v.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_d10v_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d10v.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_d30v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d30v.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+DEPOBJ_alpha_evax = $(INCDIR)/symcat.h $(srcdir)/config/obj-evax.h \
+ $(srcdir)/config/tc-alpha.h
+DEPOBJ_arc_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-arc.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h struc-symbol.h \
$(INCDIR)/obstack.h subsegs.h
-DEPOBJ_d30v_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d30v.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_fr30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-fr30.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_fr30_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-fr30.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_h8300_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-h8300.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/h8300.h $(BFDDIR)/libcoff.h \
+DEPOBJ_arc_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ struc-symbol.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+DEPOBJ_arm_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-arm.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
+DEPOBJ_arm_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-arm.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/arm.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_h8300_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8300.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_h8500_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-h8500.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/h8500.h $(BFDDIR)/libcoff.h \
+DEPOBJ_arm_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+DEPOBJ_avr_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-avr.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h
+DEPOBJ_avr_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+DEPOBJ_cris_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-cris.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
+DEPOBJ_cris_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-cris.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+DEPOBJ_d10v_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-d10v.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h
+DEPOBJ_d10v_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+DEPOBJ_d30v_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-d30v.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h
+DEPOBJ_d30v_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+DEPOBJ_fr30_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-fr30.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h
+DEPOBJ_fr30_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+DEPOBJ_h8300_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-h8300.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/h8300.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_h8500_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8500.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_hppa_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-hppa.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_hppa_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-hppa.h $(BFDDIR)/elf32-hppa.h \
- $(BFDDIR)/libhppa.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h \
- subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_ia64_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ia64.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_ia64_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ia64.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_i370_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i370.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_i370_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i370.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/elf/i370.h $(INCDIR)/aout/aout64.h
-DEPOBJ_i386_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-i386.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/obstack.h
-DEPOBJ_i386_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i386.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/i386.h $(BFDDIR)/libcoff.h \
+DEPOBJ_h8300_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+DEPOBJ_h8500_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-h8500.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/h8500.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_i386_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i386.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_i860_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i860.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_i960_bout = $(srcdir)/config/obj-bout.h $(srcdir)/config/tc-i960.h \
- $(INCDIR)/obstack.h
-DEPOBJ_i960_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i960.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/i960.h $(BFDDIR)/libcoff.h \
+DEPOBJ_h8500_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+DEPOBJ_hppa_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-hppa.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h
+DEPOBJ_hppa_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-hppa.h \
+ $(BFDDIR)/elf32-hppa.h $(BFDDIR)/libhppa.h $(INCDIR)/elf/hppa.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_ia64_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-ia64.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h
+DEPOBJ_ia64_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ia64.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+DEPOBJ_i370_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-i370.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h
+DEPOBJ_i370_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/elf/i370.h $(INCDIR)/aout/aout64.h
+DEPOBJ_i386_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-i386.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
+DEPOBJ_i386_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-i386.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_i960_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i960.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_m32r_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m32r.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+DEPOBJ_i386_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+DEPOBJ_i860_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+DEPOBJ_i960_bout = $(INCDIR)/symcat.h $(srcdir)/config/obj-bout.h \
+ $(srcdir)/config/tc-i960.h $(INCDIR)/obstack.h
+DEPOBJ_i960_coff = $(INCDIR)/symcat.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 \
$(INCDIR)/obstack.h subsegs.h
-DEPOBJ_m32r_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32r.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_m68hc11_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68hc11.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_m68hc11_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68hc11.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_m68k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/obstack.h
-DEPOBJ_m68k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68k.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h \
+DEPOBJ_i960_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+DEPOBJ_m32r_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-m32r.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h
+DEPOBJ_m32r_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+DEPOBJ_m68hc11_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-m68hc11.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_m68k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68k.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_m68k_hp300 = $(srcdir)/config/obj-aout.c $(srcdir)/config/obj-aout.h \
+DEPOBJ_m68hc11_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68hc11.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+DEPOBJ_m68k_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
$(srcdir)/config/tc-m68k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
$(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
-DEPOBJ_m88k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m88k.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/m88k.h $(BFDDIR)/libcoff.h \
+DEPOBJ_m68k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-m68k.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_m88k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m88k.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_mcore_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mcore.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/mcore.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_mcore_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mcore.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_mips_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-mips.h \
+DEPOBJ_m68k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+DEPOBJ_m68k_hp300 = $(srcdir)/config/obj-aout.c $(INCDIR)/symcat.h \
+ $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
$(INCDIR)/obstack.h
-DEPOBJ_mips_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mips.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/mipspe.h $(BFDDIR)/libcoff.h \
+DEPOBJ_m88k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-m88k.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/m88k.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_m88k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+DEPOBJ_mcore_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-mcore.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/mcore.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_mcore_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+DEPOBJ_mips_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-mips.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
+DEPOBJ_mips_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-mips.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/mipspe.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_mips_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-mips.h \
+DEPOBJ_mips_ecoff = $(INCDIR)/symcat.h $(srcdir)/config/obj-ecoff.h \
+ $(srcdir)/config/tc-mips.h ecoff.h $(INCDIR)/coff/sym.h \
+ $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(BFDDIR)/libecoff.h
+DEPOBJ_mips_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(BFDDIR)/libecoff.h
-DEPOBJ_mips_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mips.h subsegs.h \
- $(INCDIR)/obstack.h ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \
$(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/aout/aout64.h
-DEPOBJ_mn10200_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mn10200.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_mn10200_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10200.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_mn10300_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mn10300.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_mn10300_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10300.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_ns32k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-ns32k.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/obstack.h
-DEPOBJ_ns32k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ns32k.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_ns32k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ns32k.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_pj_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-pj.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+DEPOBJ_mmix_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mmix.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+DEPOBJ_mn10200_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-mn10200.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h
+DEPOBJ_mn10200_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+DEPOBJ_mn10300_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-mn10300.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h
+DEPOBJ_mn10300_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+DEPOBJ_ns32k_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-ns32k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
+DEPOBJ_ns32k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-ns32k.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h
+DEPOBJ_ns32k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+DEPOBJ_openrisc_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-openrisc.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h
+DEPOBJ_openrisc_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-openrisc.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+DEPOBJ_pdp11_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-pdp11.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
+DEPOBJ_pdp11_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-pdp11.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h
+DEPOBJ_pdp11_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pdp11.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+DEPOBJ_pj_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-pj.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h
+DEPOBJ_pj_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pj.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+DEPOBJ_ppc_coff = $(INCDIR)/symcat.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 \
$(INCDIR)/obstack.h subsegs.h
-DEPOBJ_pj_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pj.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_ppc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ppc.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/rs6000.h $(BFDDIR)/libcoff.h \
+DEPOBJ_ppc_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/aout/aout64.h
+DEPOBJ_s390_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-s390.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h
+DEPOBJ_s390_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-s390.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+DEPOBJ_sh_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-sh.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/sh.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_ppc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ppc.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
+DEPOBJ_sh_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
$(INCDIR)/aout/aout64.h
-DEPOBJ_sh_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sh.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/sh.h $(BFDDIR)/libcoff.h \
+DEPOBJ_sparc_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-sparc.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
+DEPOBJ_sparc_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-sparc.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/sparc.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_sh_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_sparc_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-sparc.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/obstack.h
-DEPOBJ_sparc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sparc.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/sparc.h $(BFDDIR)/libcoff.h \
+DEPOBJ_sparc_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+DEPOBJ_tahoe_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-tahoe.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
+DEPOBJ_tahoe_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-tahoe.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h
+DEPOBJ_tahoe_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+DEPOBJ_tic30_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-tic30.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
+DEPOBJ_tic30_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-tic30.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/tic30.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_sparc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sparc.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_tahoe_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tahoe.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/obstack.h
-DEPOBJ_tahoe_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tahoe.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_tahoe_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tahoe.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_tic30_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tic30.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/obstack.h
-DEPOBJ_tic30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic30.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic30.h $(BFDDIR)/libcoff.h \
+DEPOBJ_tic30_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+DEPOBJ_tic54x_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-tic54x.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_tic30_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic30.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_tic54x_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic54x.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \
+DEPOBJ_tic54x_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic54x.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+DEPOBJ_tic80_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-tic80.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/tic80.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_tic80_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic80.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+DEPOBJ_vax_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-vax.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
+DEPOBJ_vax_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-vax.h $(INCDIR)/coff/internal.h \
$(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
subsegs.h
-DEPOBJ_tic54x_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic54x.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_tic80_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic80.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic80.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_tic80_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic80.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_vax_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-vax.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/obstack.h
-DEPOBJ_vax_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-vax.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_vax_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-vax.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_vax_vms = $(srcdir)/config/obj-vms.h $(srcdir)/config/tc-vax.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def subsegs.h \
+DEPOBJ_vax_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+DEPOBJ_vax_vms = $(INCDIR)/symcat.h $(srcdir)/config/obj-vms.h \
+ $(srcdir)/config/tc-vax.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/safe-ctype.h subsegs.h \
$(INCDIR)/obstack.h
-DEPOBJ_w65_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-w65.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/w65.h $(BFDDIR)/libcoff.h \
+DEPOBJ_w65_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-w65.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/w65.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_w65_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-w65.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_v850_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-v850.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_v850_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-v850.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_z8k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-z8k.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/z8k.h $(BFDDIR)/libcoff.h \
+DEPOBJ_w65_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+DEPOBJ_v850_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-v850.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h
+DEPOBJ_v850_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+DEPOBJ_xstormy16_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-xstormy16.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h
+DEPOBJ_xstormy16_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-xstormy16.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+DEPOBJ_z8k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-z8k.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/z8k.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_z8k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-z8k.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_z8k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.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
@@ -1609,241 +1879,287 @@ DEPOBJ_cris_multi = $(DEPOBJ_cris_aout) $(DEPOBJ_cris_elf)
DEP_a29k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-a29k.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
DEP_a29k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-a29k.h \
- $(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
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/a29k.h \
+ $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+DEP_a29k_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
+ $(INCDIR)/symcat.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_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h
+DEP_arc_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/arm.h \
+ $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+DEP_arm_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h
+DEP_avr_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-avr.h
DEP_cris_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-cris.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
-DEP_cris_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-cris.h
+DEP_cris_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-cris.h
DEP_d10v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d10v.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
-DEP_d10v_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d10v.h
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h
+DEP_d10v_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h
+DEP_d30v_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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)/symcat.h $(INCDIR)/coff/internal.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_fr30_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/h8300.h \
+ $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+DEP_h8300_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/h8500.h \
+ $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+DEP_h8500_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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 \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-hppa.h $(BFDDIR)/elf32-hppa.h \
- $(BFDDIR)/libhppa.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h
+DEP_hppa_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-hppa.h \
+ $(BFDDIR)/elf32-hppa.h $(BFDDIR)/libhppa.h $(INCDIR)/elf/hppa.h \
+ $(INCDIR)/elf/reloc-macros.h
DEP_ia64_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ia64.h \
$(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
-DEP_ia64_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ia64.h
+DEP_ia64_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ia64.h
DEP_i370_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i370.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
-DEP_i370_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i370.h
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h
+DEP_i370_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
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_elf = $(srcdir)/config/obj-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)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/i386.h \
+ $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+DEP_i386_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/i960.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+DEP_i960_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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_m68hc11_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68hc11.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h
-DEP_m68hc11_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68hc11.h
+DEP_m32r_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32r.h
+DEP_m68hc11_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68hc11.h \
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h \
+ $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+DEP_m68hc11_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68hc11.h
DEP_m68k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
DEP_m68k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68k.h \
- $(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
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h \
+ $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+DEP_m68k_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/m88k.h \
+ $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+DEP_m88k_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/mcore.h \
+ $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+DEP_mcore_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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 $(INCDIR)/coff/mipspe.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/mipspe.h \
+ $(INCDIR)/coff/external.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_mips_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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_mmix_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mmix.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
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h
+DEP_mn10200_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h
+DEP_mn10300_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h
+DEP_ns32k_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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_openrisc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-openrisc.h \
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h
+DEP_openrisc_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-openrisc.h
+DEP_pdp11_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-pdp11.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
+DEP_pdp11_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-pdp11.h \
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h
+DEP_pdp11_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pdp11.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
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h
+DEP_pj_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/rs6000.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+DEP_ppc_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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_s390_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-s390.h \
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.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_s390_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-s390.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
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/sh.h \
+ $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+DEP_sh_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/sparc.h \
+ $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+DEP_sparc_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h
+DEP_tahoe_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic30.h \
+ $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+DEP_tic30_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic30.h
DEP_tic54x_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic54x.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
-DEP_tic54x_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic54x.h
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic54x.h \
+ $(INCDIR)/coff/ti.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+DEP_tic54x_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic54x.h
DEP_tic80_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic80.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic80.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h
-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
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic80.h \
+ $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+DEP_tic80_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h
+DEP_vax_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/w65.h \
+ $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+DEP_w65_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h
+DEP_v850_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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_xstormy16_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-xstormy16.h \
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.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_xstormy16_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-xstormy16.h
+DEP_z8k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-z8k.h \
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/z8k.h \
+ $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+DEP_z8k_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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_aout) $(DEP_i386_coff) \
$(DEP_i386_elf)
@@ -1852,49 +2168,62 @@ DEP_mips_multi = $(DEP_mips_coff) $(DEP_mips_ecoff) \
DEP_cris_multi = $(DEP_cris_aout) $(DEP_cris_elf)
BMKDEP = #DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING ABOVE.
#MKDEP DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING BELOW.
-app.o: app.c
-as.o: as.c subsegs.h $(INCDIR)/obstack.h output-file.h \
- sb.h macro.h dwarf2dbg.h
-atof-generic.o: atof-generic.c
-bignum-copy.o: bignum-copy.c
-cond.o: cond.c macro.h sb.h $(INCDIR)/obstack.h
-depend.o: depend.c
-dwarf2dbg.o: dwarf2dbg.c dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h \
+app.o: app.c $(INCDIR)/symcat.h
+as.o: as.c $(INCDIR)/symcat.h subsegs.h $(INCDIR)/obstack.h \
+ output-file.h sb.h macro.h dwarf2dbg.h
+atof-generic.o: atof-generic.c $(INCDIR)/symcat.h $(INCDIR)/safe-ctype.h
+bignum-copy.o: bignum-copy.c $(INCDIR)/symcat.h
+cond.o: cond.c $(INCDIR)/symcat.h macro.h sb.h $(INCDIR)/obstack.h
+depend.o: depend.c $(INCDIR)/symcat.h
+dwarf2dbg.o: dwarf2dbg.c $(INCDIR)/symcat.h dwarf2dbg.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/dwarf2.h
+ecoff.o: ecoff.c $(INCDIR)/symcat.h ecoff.h
+ehopt.o: ehopt.c $(INCDIR)/symcat.h subsegs.h $(INCDIR)/obstack.h \
$(INCDIR)/elf/dwarf2.h
-ecoff.o: ecoff.c ecoff.h
-ehopt.o: ehopt.c subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/dwarf2.h
-expr.o: expr.c $(INCDIR)/obstack.h
-flonum-copy.o: flonum-copy.c
+expr.o: expr.c $(INCDIR)/symcat.h $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/obstack.h
+flonum-copy.o: flonum-copy.c $(INCDIR)/symcat.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 $(INCDIR)/obstack.h
-input-file.o: input-file.c input-file.h
-input-scrub.o: input-scrub.c input-file.h sb.h
-listing.o: listing.c input-file.h subsegs.h
-literal.o: literal.c subsegs.h $(INCDIR)/obstack.h
-macro.o: macro.c sb.h macro.h
-messages.o: messages.c
-output-file.o: output-file.c output-file.h
-read.o: read.c subsegs.h $(INCDIR)/obstack.h sb.h macro.h \
- ecoff.h
+frags.o: frags.c $(INCDIR)/symcat.h subsegs.h $(INCDIR)/obstack.h
+hash.o: hash.c $(INCDIR)/symcat.h $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/obstack.h
+input-file.o: input-file.c $(INCDIR)/symcat.h input-file.h \
+ $(INCDIR)/safe-ctype.h
+input-scrub.o: input-scrub.c $(INCDIR)/symcat.h input-file.h \
+ sb.h
+listing.o: listing.c $(INCDIR)/symcat.h $(INCDIR)/safe-ctype.h \
+ input-file.h subsegs.h
+literal.o: literal.c $(INCDIR)/symcat.h subsegs.h $(INCDIR)/obstack.h
+macro.o: macro.c $(INCDIR)/safe-ctype.h sb.h macro.h
+messages.o: messages.c $(INCDIR)/symcat.h
+output-file.o: output-file.c $(INCDIR)/symcat.h output-file.h
+read.o: read.c $(INCDIR)/symcat.h $(INCDIR)/safe-ctype.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 \
- struc-symbol.h
-write.o: write.c subsegs.h $(INCDIR)/obstack.h output-file.h \
- dwarf2dbg.h
-gasp.o: gasp.c sb.h macro.h
-itbl-ops.o: itbl-ops.c itbl-ops.h
-e-crisaout.o: $(srcdir)/config/e-crisaout.c emul-target.h
-e-criself.o: $(srcdir)/config/e-criself.c emul-target.h
-e-i386aout.o: $(srcdir)/config/e-i386aout.c emul-target.h
-e-i386coff.o: $(srcdir)/config/e-i386coff.c emul-target.h
-e-i386elf.o: $(srcdir)/config/e-i386elf.c emul-target.h
-e-mipsecoff.o: $(srcdir)/config/e-mipsecoff.c emul-target.h
-e-mipself.o: $(srcdir)/config/e-mipself.c emul-target.h
+stabs.o: stabs.c $(INCDIR)/symcat.h $(INCDIR)/obstack.h \
+ subsegs.h ecoff.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def
+subsegs.o: subsegs.c $(INCDIR)/symcat.h subsegs.h $(INCDIR)/obstack.h
+symbols.o: symbols.c $(INCDIR)/symcat.h $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/obstack.h subsegs.h struc-symbol.h
+write.o: write.c $(INCDIR)/symcat.h subsegs.h $(INCDIR)/obstack.h \
+ output-file.h dwarf2dbg.h
+gasp.o: gasp.c $(INCDIR)/safe-ctype.h sb.h macro.h
+itbl-ops.o: itbl-ops.c itbl-ops.h $(INCDIR)/symcat.h
+e-crisaout.o: $(srcdir)/config/e-crisaout.c $(INCDIR)/symcat.h \
+ emul-target.h
+e-criself.o: $(srcdir)/config/e-criself.c $(INCDIR)/symcat.h \
+ emul-target.h
+e-i386aout.o: $(srcdir)/config/e-i386aout.c $(INCDIR)/symcat.h \
+ emul-target.h
+e-i386coff.o: $(srcdir)/config/e-i386coff.c $(INCDIR)/symcat.h \
+ emul-target.h
+e-i386elf.o: $(srcdir)/config/e-i386elf.c $(INCDIR)/symcat.h \
+ emul-target.h
+e-mipsecoff.o: $(srcdir)/config/e-mipsecoff.c $(INCDIR)/symcat.h \
+ emul-target.h
+e-mipself.o: $(srcdir)/config/e-mipself.c $(INCDIR)/symcat.h \
+ emul-target.h
$(OBJS): $(DEP_@target_cpu_type@_@obj_format@)
$(TARG_CPU_O): $(DEPTC_@target_cpu_type@_@obj_format@)
$(OBJ_FORMAT_O): $(DEPOBJ_@target_cpu_type@_@obj_format@)
diff --git a/contrib/binutils/gas/Makefile.in b/contrib/binutils/gas/Makefile.in
index 0e001a6..5664979 100644
--- a/contrib/binutils/gas/Makefile.in
+++ b/contrib/binutils/gas/Makefile.in
@@ -171,11 +171,15 @@ CPU_TYPES = \
m88k \
mcore \
mips \
+ mmix \
mn10200 \
mn10300 \
ns32k \
+ openrisc \
+ pdp11 \
pj \
ppc \
+ s390 \
sh \
sparc \
tahoe \
@@ -185,6 +189,7 @@ CPU_TYPES = \
vax \
w65 \
v850 \
+ xstormy16 \
z8k
@@ -213,7 +218,7 @@ CPU_OBJ_VALID = \
case $$o in \
aout) \
case $$c in \
- a29k | arm | cris | i386 | m68k | mips | ns32k | sparc | tahoe | tic30 | vax) \
+ a29k | arm | cris | i386 | m68k | mips | ns32k | pdp11 | sparc | tahoe | tic30 | vax) \
valid=yes ;; \
esac ;; \
bout) \
@@ -222,7 +227,7 @@ CPU_OBJ_VALID = \
esac ;; \
coff) valid=yes; \
case $$c in \
- cris | i860) \
+ cris | i860 | mmix) \
valid= ;; \
esac ;; \
ecoff) \
@@ -358,11 +363,15 @@ TARGET_CPU_CFILES = \
config/tc-m88k.c \
config/tc-mcore.c \
config/tc-mips.c \
+ config/tc-mmix.c \
config/tc-mn10200.c \
config/tc-mn10300.c \
config/tc-ns32k.c \
+ config/tc-openrisc.c \
+ config/tc-pdp11.c \
config/tc-pj.c \
config/tc-ppc.c \
+ config/tc-s390.c \
config/tc-sh.c \
config/tc-sparc.c \
config/tc-tahoe.c \
@@ -372,6 +381,7 @@ TARGET_CPU_CFILES = \
config/tc-vax.c \
config/tc-w65.c \
config/tc-v850.c \
+ config/tc-xstormy16.c \
config/tc-z8k.c
@@ -399,11 +409,15 @@ TARGET_CPU_HFILES = \
config/tc-m88k.h \
config/tc-mcore.h \
config/tc-mips.h \
+ config/tc-mmix.h \
config/tc-mn10200.h \
config/tc-mn10300.h \
config/tc-ns32k.h \
+ config/tc-openrisc.h \
+ config/tc-pdp11.h \
config/tc-pj.h \
config/tc-ppc.h \
+ config/tc-s390.h \
config/tc-sh.h \
config/tc-sparc.h \
config/tc-tahoe.h \
@@ -413,6 +427,7 @@ TARGET_CPU_HFILES = \
config/tc-vax.h \
config/tc-w65.h \
config/tc-v850.h \
+ config/tc-xstormy16.h \
config/tc-z8k.h
@@ -461,6 +476,7 @@ TARG_ENV_HFILES = \
config/te-hppa64.h \
config/te-hppalinux64.h \
config/te-i386aix.h \
+ config/te-ia64aix.h \
config/te-ic960.h \
config/te-linux.h \
config/te-lnews.h \
@@ -542,9 +558,7 @@ noinst_PROGRAMS = as-new gasp-new
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
+EXTRA_DIST = 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-desc.h
@@ -567,6 +581,10 @@ INCLUDES = -D_GNU_SOURCE -I. -I$(srcdir) -I../bfd -I$(srcdir)/config -I$(INCDIR)
# in a subdirectory.
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\""
+DEP_FLAGS = -DBFD_ASSEMBLER -DOBJ_MAYBE_ELF \
+ -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES)
+
+
# How to link with both our special library facilities
# and the system's installed libraries.
@@ -628,449 +646,591 @@ DEP_FILE_DEPS = $(CFILES) $(HFILES) $(TARGET_CPU_CFILES) \
AMKDEP = #DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING BELOW.
-DEPTC_a29k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-a29k.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/a29k.h
-
-DEPTC_a29k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-a29k.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/a29k.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/opcode/a29k.h
+DEPTC_a29k_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-a29k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/a29k.h
-DEPTC_a29k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-a29k.h $(INCDIR)/opcode/a29k.h
+DEPTC_a29k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-a29k.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/a29k.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/a29k.h
-DEPTC_alpha_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-alpha.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- subsegs.h $(INCDIR)/obstack.h struc-symbol.h ecoff.h \
- $(INCDIR)/opcode/alpha.h $(srcdir)/config/atof-vax.c
+DEPTC_a29k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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)/safe-ctype.h $(INCDIR)/opcode/a29k.h
-DEPTC_alpha_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-alpha.h \
- ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \
- subsegs.h $(INCDIR)/obstack.h struc-symbol.h $(INCDIR)/opcode/alpha.h \
+DEPTC_alpha_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-alpha.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \
+ struc-symbol.h ecoff.h $(INCDIR)/opcode/alpha.h $(INCDIR)/safe-ctype.h \
$(srcdir)/config/atof-vax.c
-DEPTC_alpha_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-alpha.h subsegs.h \
- $(INCDIR)/obstack.h struc-symbol.h ecoff.h $(INCDIR)/coff/sym.h \
- $(INCDIR)/coff/ecoff.h $(INCDIR)/opcode/alpha.h $(INCDIR)/elf/alpha.h \
- $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h $(srcdir)/config/atof-vax.c
+DEPTC_alpha_ecoff = $(INCDIR)/symcat.h $(srcdir)/config/obj-ecoff.h \
+ $(srcdir)/config/tc-alpha.h ecoff.h $(INCDIR)/coff/sym.h \
+ $(INCDIR)/coff/ecoff.h subsegs.h $(INCDIR)/obstack.h \
+ struc-symbol.h $(INCDIR)/opcode/alpha.h $(INCDIR)/safe-ctype.h \
+ $(srcdir)/config/atof-vax.c
-DEPTC_alpha_evax = $(srcdir)/config/obj-evax.h $(srcdir)/config/tc-alpha.h \
+DEPTC_alpha_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-alpha.h \
subsegs.h $(INCDIR)/obstack.h struc-symbol.h ecoff.h \
- $(INCDIR)/opcode/alpha.h $(srcdir)/config/atof-vax.c
-
-DEPTC_arc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arc.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- struc-symbol.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h \
- $(srcdir)/../opcodes/arc-ext.h $(INCDIR)/elf/arc.h \
- $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h
+ $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h $(INCDIR)/opcode/alpha.h \
+ $(INCDIR)/elf/alpha.h $(INCDIR)/elf/reloc-macros.h \
+ dwarf2dbg.h $(INCDIR)/safe-ctype.h $(srcdir)/config/atof-vax.c
-DEPTC_arc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h struc-symbol.h \
- subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/arc.h \
- $(srcdir)/../opcodes/arc-ext.h $(INCDIR)/elf/arc.h \
- $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h
+DEPTC_alpha_evax = $(INCDIR)/symcat.h $(srcdir)/config/obj-evax.h \
+ $(srcdir)/config/tc-alpha.h subsegs.h $(INCDIR)/obstack.h \
+ struc-symbol.h ecoff.h $(INCDIR)/opcode/alpha.h $(INCDIR)/safe-ctype.h \
+ $(srcdir)/config/atof-vax.c
-DEPTC_arm_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-arm.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h
+DEPTC_arc_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-arc.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h struc-symbol.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/arc.h $(srcdir)/../opcodes/arc-ext.h \
+ $(INCDIR)/elf/arc.h $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h
-DEPTC_arm_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arm.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/arm.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h
+DEPTC_arc_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ struc-symbol.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/arc.h $(srcdir)/../opcodes/arc-ext.h \
+ $(INCDIR)/elf/arc.h $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h
+
+DEPTC_arm_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-arm.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h
+
+DEPTC_arm_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-arm.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/arm.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h subsegs.h \
+ $(INCDIR)/obstack.h
-DEPTC_arm_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arm.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h \
- dwarf2dbg.h
+DEPTC_arm_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/elf/arm.h $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h
-DEPTC_avr_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-avr.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+DEPTC_avr_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-avr.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/avr.h
-DEPTC_avr_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-avr.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/avr.h
+DEPTC_avr_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/avr.h
-DEPTC_cris_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-cris.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \
+DEPTC_cris_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-cris.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
$(INCDIR)/opcode/cris.h dwarf2dbg.h
-DEPTC_cris_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-cris.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/cris.h dwarf2dbg.h
+DEPTC_cris_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-cris.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/cris.h dwarf2dbg.h
-DEPTC_d10v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d10v.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+DEPTC_d10v_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-d10v.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/d10v.h \
$(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h
-DEPTC_d10v_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d10v.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/d10v.h $(INCDIR)/elf/ppc.h \
- $(INCDIR)/elf/reloc-macros.h
+DEPTC_d10v_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/d10v.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h
-DEPTC_d30v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d30v.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+DEPTC_d30v_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-d30v.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/d30v.h
-DEPTC_d30v_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d30v.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/d30v.h
-
-DEPTC_fr30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-fr30.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- subsegs.h $(INCDIR)/obstack.h $(INCDIR)/symcat.h $(srcdir)/../opcodes/fr30-desc.h \
- $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/fr30-opc.h \
- cgen.h
-
-DEPTC_fr30_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-fr30.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/symcat.h $(srcdir)/../opcodes/fr30-desc.h \
+DEPTC_d30v_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/d30v.h
+
+DEPTC_fr30_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-fr30.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/fr30-desc.h \
$(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/fr30-opc.h \
cgen.h
-DEPTC_h8300_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-h8300.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/h8300.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/h8300.h
-
-DEPTC_h8300_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8300.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/h8300.h
+DEPTC_fr30_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(srcdir)/../opcodes/fr30-desc.h $(INCDIR)/opcode/cgen.h \
+ $(srcdir)/../opcodes/fr30-opc.h cgen.h
+
+DEPTC_h8300_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-h8300.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/h8300.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/h8300.h \
+ $(INCDIR)/safe-ctype.h
+
+DEPTC_h8300_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/elf/h8.h $(INCDIR)/elf/reloc-macros.h
-DEPTC_h8500_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-h8500.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/h8500.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/h8500-opc.h
+DEPTC_h8500_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-h8500.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/h8500.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/h8500-opc.h \
+ $(INCDIR)/safe-ctype.h
-DEPTC_h8500_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8500.h subsegs.h \
- $(INCDIR)/obstack.h $(srcdir)/../opcodes/h8500-opc.h
+DEPTC_h8500_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h
-DEPTC_hppa_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-hppa.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+DEPTC_hppa_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-hppa.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
subsegs.h $(INCDIR)/obstack.h $(BFDDIR)/libhppa.h $(INCDIR)/opcode/hppa.h
-DEPTC_hppa_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-hppa.h $(BFDDIR)/elf32-hppa.h \
- $(BFDDIR)/libhppa.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h \
+DEPTC_hppa_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-hppa.h \
+ $(BFDDIR)/elf32-hppa.h $(BFDDIR)/libhppa.h $(INCDIR)/elf/hppa.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/safe-ctype.h \
subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/hppa.h \
dwarf2dbg.h
-DEPTC_ia64_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ia64.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+DEPTC_ia64_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-ia64.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h
-DEPTC_ia64_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ia64.h dwarf2dbg.h \
- subsegs.h $(INCDIR)/obstack.h
+DEPTC_ia64_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ia64.h \
+ $(INCDIR)/safe-ctype.h dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h
-DEPTC_i370_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i370.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+DEPTC_i370_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-i370.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
subsegs.h $(INCDIR)/obstack.h struc-symbol.h $(INCDIR)/opcode/i370.h
-DEPTC_i370_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i370.h subsegs.h \
- $(INCDIR)/obstack.h struc-symbol.h $(INCDIR)/opcode/i370.h \
- $(INCDIR)/elf/i370.h
+DEPTC_i370_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ struc-symbol.h $(INCDIR)/opcode/i370.h $(INCDIR)/elf/i370.h
-DEPTC_i386_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-i386.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \
+DEPTC_i386_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-i386.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
dwarf2dbg.h $(INCDIR)/opcode/i386.h
-DEPTC_i386_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i386.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/i386.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h dwarf2dbg.h \
- $(INCDIR)/opcode/i386.h
-
-DEPTC_i386_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i386.h subsegs.h \
+DEPTC_i386_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-i386.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h subsegs.h \
$(INCDIR)/obstack.h dwarf2dbg.h $(INCDIR)/opcode/i386.h
-DEPTC_i860_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i860.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/i860.h $(INCDIR)/elf/i860.h \
- $(INCDIR)/elf/reloc-macros.h
-
-DEPTC_i960_bout = $(srcdir)/config/obj-bout.h $(srcdir)/config/tc-i960.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/i960.h
+DEPTC_i386_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ dwarf2dbg.h $(INCDIR)/opcode/i386.h
-DEPTC_i960_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i960.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/i960.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i960.h
+DEPTC_i860_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/i860.h $(INCDIR)/elf/i860.h $(INCDIR)/elf/reloc-macros.h
-DEPTC_i960_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i960.h $(INCDIR)/obstack.h \
+DEPTC_i960_bout = $(INCDIR)/symcat.h $(srcdir)/config/obj-bout.h \
+ $(srcdir)/config/tc-i960.h $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h \
$(INCDIR)/opcode/i960.h
-DEPTC_m32r_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m32r.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- subsegs.h $(INCDIR)/obstack.h $(INCDIR)/symcat.h $(srcdir)/../opcodes/m32r-desc.h \
- $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/m32r-opc.h \
- cgen.h
+DEPTC_i960_coff = $(INCDIR)/symcat.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 \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i960.h
+
+DEPTC_i960_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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)/safe-ctype.h $(INCDIR)/obstack.h $(INCDIR)/opcode/i960.h
-DEPTC_m32r_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32r.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/symcat.h $(srcdir)/../opcodes/m32r-desc.h \
+DEPTC_m32r_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-m32r.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/m32r-desc.h \
$(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/m32r-opc.h \
cgen.h
-DEPTC_m68hc11_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68hc11.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/m68hc11.h \
- dwarf2dbg.h
-
-DEPTC_m68hc11_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68hc11.h subsegs.h \
+DEPTC_m32r_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(srcdir)/../opcodes/m32r-desc.h $(INCDIR)/opcode/cgen.h \
+ $(srcdir)/../opcodes/m32r-opc.h cgen.h
+
+DEPTC_m68hc11_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-m68hc11.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h subsegs.h \
$(INCDIR)/obstack.h $(INCDIR)/opcode/m68hc11.h dwarf2dbg.h
-DEPTC_m68k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
- subsegs.h $(INCDIR)/opcode/m68k.h $(srcdir)/config/m68k-parse.h
+DEPTC_m68hc11_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68hc11.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/m68hc11.h dwarf2dbg.h
-DEPTC_m68k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68k.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h $(INCDIR)/opcode/m68k.h \
- $(srcdir)/config/m68k-parse.h
+DEPTC_m68k_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-m68k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h subsegs.h \
+ dwarf2dbg.h $(INCDIR)/opcode/m68k.h $(srcdir)/config/m68k-parse.h
-DEPTC_m68k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68k.h $(INCDIR)/obstack.h \
- subsegs.h $(INCDIR)/opcode/m68k.h $(srcdir)/config/m68k-parse.h \
+DEPTC_m68k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-m68k.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h \
+ subsegs.h dwarf2dbg.h $(INCDIR)/opcode/m68k.h $(srcdir)/config/m68k-parse.h
+
+DEPTC_m68k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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)/safe-ctype.h $(INCDIR)/obstack.h subsegs.h \
+ dwarf2dbg.h $(INCDIR)/opcode/m68k.h $(srcdir)/config/m68k-parse.h \
$(INCDIR)/elf/m68k.h $(INCDIR)/elf/reloc-macros.h
-DEPTC_m68k_hp300 = $(srcdir)/config/obj-hp300.h $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-m68k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/obstack.h subsegs.h $(INCDIR)/opcode/m68k.h \
+DEPTC_m68k_hp300 = $(INCDIR)/symcat.h $(srcdir)/config/obj-hp300.h \
+ $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/obstack.h subsegs.h dwarf2dbg.h $(INCDIR)/opcode/m68k.h \
$(srcdir)/config/m68k-parse.h
-DEPTC_m88k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m88k.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/m88k.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/config/m88k-opcode.h
-
-DEPTC_m88k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m88k.h subsegs.h \
+DEPTC_m88k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-m88k.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/m88k.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h subsegs.h \
$(INCDIR)/obstack.h $(srcdir)/config/m88k-opcode.h
-DEPTC_mcore_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mcore.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/mcore.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/mcore-opc.h
+DEPTC_m88k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(srcdir)/config/m88k-opcode.h
+
+DEPTC_mcore_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-mcore.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/mcore.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/mcore-opc.h \
+ $(INCDIR)/safe-ctype.h
-DEPTC_mcore_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mcore.h subsegs.h \
- $(INCDIR)/obstack.h $(srcdir)/../opcodes/mcore-opc.h \
- $(INCDIR)/elf/mcore.h $(INCDIR)/elf/reloc-macros.h
+DEPTC_mcore_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mcore.h \
+ subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/mcore-opc.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/elf/mcore.h $(INCDIR)/elf/reloc-macros.h
+
+DEPTC_mips_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-mips.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/safe-ctype.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_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-mips.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \
+DEPTC_mips_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-mips.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/mipspe.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/safe-ctype.h \
$(INCDIR)/opcode/mips.h itbl-ops.h $(srcdir)/config/obj-elf.h \
$(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
$(INCDIR)/elf/external.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h \
ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
-DEPTC_mips_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mips.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/mipspe.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mips.h \
- itbl-ops.h $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h ecoff.h \
- $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
+DEPTC_mips_ecoff = $(INCDIR)/symcat.h $(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)/safe-ctype.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_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-mips.h \
- ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \
- subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mips.h \
- itbl-ops.h $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h
-
-DEPTC_mips_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mips.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/mips.h itbl-ops.h \
- $(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h ecoff.h \
- $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h
-
-DEPTC_mn10200_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mn10200.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+DEPTC_mips_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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)/safe-ctype.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_mmix_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mmix.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/mmix.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/opcode/mmix.h \
+ $(INCDIR)/safe-ctype.h dwarf2dbg.h
+
+DEPTC_mn10200_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-mn10200.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10200.h
-DEPTC_mn10200_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10200.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10200.h
+DEPTC_mn10200_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/mn10200.h
-DEPTC_mn10300_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mn10300.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+DEPTC_mn10300_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-mn10300.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10300.h \
dwarf2dbg.h
-DEPTC_mn10300_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10300.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/mn10300.h dwarf2dbg.h
+DEPTC_mn10300_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/mn10300.h dwarf2dbg.h
+
+DEPTC_ns32k_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-ns32k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/opcode/ns32k.h $(INCDIR)/obstack.h
-DEPTC_ns32k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-ns32k.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ns32k.h \
+DEPTC_ns32k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-ns32k.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/ns32k.h \
$(INCDIR)/obstack.h
-DEPTC_ns32k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ns32k.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+DEPTC_ns32k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ns32k.h \
$(INCDIR)/opcode/ns32k.h $(INCDIR)/obstack.h
-DEPTC_ns32k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ns32k.h $(INCDIR)/opcode/ns32k.h \
- $(INCDIR)/obstack.h
+DEPTC_openrisc_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-openrisc.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \
+ $(srcdir)/../opcodes/openrisc-desc.h $(INCDIR)/opcode/cgen.h \
+ $(srcdir)/../opcodes/openrisc-opc.h cgen.h
-DEPTC_pj_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-pj.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+DEPTC_openrisc_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-openrisc.h \
+ subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/openrisc-desc.h \
+ $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/openrisc-opc.h \
+ cgen.h
+
+DEPTC_pdp11_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-pdp11.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/pdp11.h
+
+DEPTC_pdp11_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-pdp11.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/opcode/pdp11.h
+
+DEPTC_pdp11_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pdp11.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/pdp11.h
+
+DEPTC_pj_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-pj.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
$(INCDIR)/opcode/pj.h
-DEPTC_pj_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pj.h $(INCDIR)/opcode/pj.h
+DEPTC_pj_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pj.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/pj.h
-DEPTC_ppc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ppc.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/rs6000.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/ppc.h
+DEPTC_ppc_coff = $(INCDIR)/symcat.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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/ppc.h
-DEPTC_ppc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ppc.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/ppc.h $(INCDIR)/elf/ppc.h \
- $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h
+DEPTC_ppc_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/ppc.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
+ dwarf2dbg.h
+
+DEPTC_s390_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-s390.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
+ subsegs.h $(INCDIR)/obstack.h struc-symbol.h $(INCDIR)/opcode/s390.h \
+ $(INCDIR)/elf/s390.h $(INCDIR)/elf/reloc-macros.h
+
+DEPTC_s390_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-s390.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ struc-symbol.h $(INCDIR)/opcode/s390.h $(INCDIR)/elf/s390.h \
+ $(INCDIR)/elf/reloc-macros.h
-DEPTC_sh_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sh.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/sh.h $(BFDDIR)/libcoff.h \
+DEPTC_sh_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-sh.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/sh.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/sh-opc.h \
- struc-symbol.h dwarf2dbg.h
+ $(INCDIR)/safe-ctype.h struc-symbol.h dwarf2dbg.h
-DEPTC_sh_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh.h subsegs.h \
- $(INCDIR)/obstack.h $(srcdir)/../opcodes/sh-opc.h struc-symbol.h \
- $(INCDIR)/elf/sh.h $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h
+DEPTC_sh_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h struc-symbol.h $(INCDIR)/elf/sh.h \
+ $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h
-DEPTC_sparc_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-sparc.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \
+DEPTC_sparc_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-sparc.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
$(INCDIR)/opcode/sparc.h
-DEPTC_sparc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sparc.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/sparc.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/sparc.h
+DEPTC_sparc_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-sparc.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/sparc.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h subsegs.h \
+ $(INCDIR)/obstack.h $(INCDIR)/opcode/sparc.h
-DEPTC_sparc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sparc.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/sparc.h $(INCDIR)/elf/sparc.h \
- $(INCDIR)/elf/reloc-macros.h dwarf2dbg.h
+DEPTC_sparc_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/sparc.h $(INCDIR)/elf/sparc.h $(INCDIR)/elf/reloc-macros.h \
+ dwarf2dbg.h
-DEPTC_tahoe_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tahoe.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
- $(INCDIR)/opcode/tahoe.h
+DEPTC_tahoe_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-tahoe.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h $(INCDIR)/opcode/tahoe.h
-DEPTC_tahoe_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tahoe.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+DEPTC_tahoe_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-tahoe.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
$(INCDIR)/obstack.h $(INCDIR)/opcode/tahoe.h
-DEPTC_tahoe_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tahoe.h $(INCDIR)/obstack.h \
- $(INCDIR)/opcode/tahoe.h
+DEPTC_tahoe_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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)/safe-ctype.h $(INCDIR)/obstack.h $(INCDIR)/opcode/tahoe.h
-DEPTC_tic30_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tic30.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/opcode/tic30.h
+DEPTC_tic30_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-tic30.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/tic30.h
-DEPTC_tic30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic30.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic30.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/opcode/tic30.h
+DEPTC_tic30_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-tic30.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/tic30.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/tic30.h
-DEPTC_tic30_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic30.h $(INCDIR)/opcode/tic30.h
+DEPTC_tic30_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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)/safe-ctype.h $(INCDIR)/opcode/tic30.h
-DEPTC_tic54x_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic54x.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h sb.h macro.h \
+DEPTC_tic54x_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-tic54x.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h sb.h macro.h \
subsegs.h $(INCDIR)/obstack.h struc-symbol.h $(INCDIR)/opcode/tic54x.h
-DEPTC_tic54x_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic54x.h sb.h \
- macro.h subsegs.h $(INCDIR)/obstack.h struc-symbol.h \
- $(INCDIR)/opcode/tic54x.h $(srcdir)/config/obj-coff.h \
+DEPTC_tic54x_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic54x.h \
+ $(INCDIR)/safe-ctype.h sb.h macro.h subsegs.h $(INCDIR)/obstack.h \
+ struc-symbol.h $(INCDIR)/opcode/tic54x.h $(srcdir)/config/obj-coff.h \
$(INCDIR)/coff/internal.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \
$(BFDDIR)/libcoff.h
-DEPTC_tic80_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic80.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic80.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/opcode/tic80.h
-
-DEPTC_tic80_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic80.h $(INCDIR)/opcode/tic80.h
+DEPTC_tic80_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-tic80.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/tic80.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/tic80.h
-DEPTC_vax_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-vax.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(srcdir)/config/vax-inst.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h
-
-DEPTC_vax_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-vax.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(srcdir)/config/vax-inst.h $(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h
+DEPTC_tic80_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic80.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/opcode/tic80.h
-DEPTC_vax_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-vax.h $(srcdir)/config/vax-inst.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h
+DEPTC_vax_aout = $(INCDIR)/symcat.h $(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 \
+ $(INCDIR)/safe-ctype.h
-DEPTC_vax_vms = $(srcdir)/config/obj-vms.h $(srcdir)/config/tc-vax.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def $(srcdir)/config/vax-inst.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h
+DEPTC_vax_coff = $(INCDIR)/symcat.h $(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 $(INCDIR)/safe-ctype.h
-DEPTC_w65_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-w65.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/w65.h $(BFDDIR)/libcoff.h \
+DEPTC_vax_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-vax.h \
+ $(srcdir)/config/vax-inst.h $(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h \
+ $(INCDIR)/safe-ctype.h
+
+DEPTC_vax_vms = $(INCDIR)/symcat.h $(srcdir)/config/obj-vms.h \
+ $(srcdir)/config/tc-vax.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(srcdir)/config/vax-inst.h \
+ $(INCDIR)/obstack.h $(INCDIR)/opcode/vax.h $(INCDIR)/safe-ctype.h
+
+DEPTC_w65_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-w65.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/w65.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/w65-opc.h
-DEPTC_w65_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-w65.h subsegs.h \
- $(INCDIR)/obstack.h $(srcdir)/../opcodes/w65-opc.h
+DEPTC_w65_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-w65.h \
+ subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/w65-opc.h
-DEPTC_v850_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-v850.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+DEPTC_v850_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-v850.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h \
subsegs.h $(INCDIR)/obstack.h $(INCDIR)/opcode/v850.h \
dwarf2dbg.h
-DEPTC_v850_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-v850.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/opcode/v850.h dwarf2dbg.h
+DEPTC_v850_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/opcode/v850.h dwarf2dbg.h
+
+DEPTC_xstormy16_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-xstormy16.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h subsegs.h $(INCDIR)/obstack.h \
+ $(srcdir)/../opcodes/xstormy16-desc.h $(INCDIR)/opcode/cgen.h \
+ $(srcdir)/../opcodes/xstormy16-opc.h cgen.h
+
+DEPTC_xstormy16_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-xstormy16.h \
+ subsegs.h $(INCDIR)/obstack.h $(srcdir)/../opcodes/xstormy16-desc.h \
+ $(INCDIR)/opcode/cgen.h $(srcdir)/../opcodes/xstormy16-opc.h \
+ cgen.h
-DEPTC_z8k_coff = $(srcdir)/../opcodes/z8k-opc.h $(srcdir)/config/obj-coff.h \
+DEPTC_z8k_coff = $(INCDIR)/symcat.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
+ $(INCDIR)/coff/z8k.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h $(srcdir)/../opcodes/z8k-opc.h
-DEPTC_z8k_elf = $(srcdir)/../opcodes/z8k-opc.h $(srcdir)/config/obj-elf.h \
+DEPTC_z8k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-z8k.h \
+ $(INCDIR)/safe-ctype.h $(srcdir)/../opcodes/z8k-opc.h
DEPTC_hppa_som = $(srcdir)/config/tc-hppa.h subsegs.h \
$(INCDIR)/obstack.h $(BFDDIR)/libhppa.h $(INCDIR)/opcode/hppa.h \
@@ -1083,411 +1243,541 @@ DEPTC_mips_multi = $(DEPTC_mips_coff) $(DEPTC_mips_ecoff) \
$(DEPTC_mips_elf)
DEPTC_cris_multi = $(DEPTC_cris_aout) $(DEPTC_cris_elf)
-DEPOBJ_a29k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-a29k.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/obstack.h
+DEPOBJ_a29k_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-a29k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
-DEPOBJ_a29k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-a29k.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/a29k.h $(BFDDIR)/libcoff.h \
+DEPOBJ_a29k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-a29k.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/a29k.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_a29k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-a29k.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_a29k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
-DEPOBJ_alpha_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-alpha.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_alpha_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-alpha.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h
-DEPOBJ_alpha_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-alpha.h \
- ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(BFDDIR)/libecoff.h
+DEPOBJ_alpha_ecoff = $(INCDIR)/symcat.h $(srcdir)/config/obj-ecoff.h \
+ $(srcdir)/config/tc-alpha.h ecoff.h $(INCDIR)/coff/sym.h \
+ $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(BFDDIR)/libecoff.h
-DEPOBJ_alpha_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-alpha.h subsegs.h \
- $(INCDIR)/obstack.h ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \
+DEPOBJ_alpha_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.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 = $(srcdir)/config/obj-evax.h $(srcdir)/config/tc-alpha.h
-DEPOBJ_arc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arc.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- struc-symbol.h $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_alpha_evax = $(INCDIR)/symcat.h $(srcdir)/config/obj-evax.h \
+ $(srcdir)/config/tc-alpha.h
-DEPOBJ_arc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arc.h struc-symbol.h \
- subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_arc_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-arc.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h struc-symbol.h \
+ $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_arm_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-arm.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/obstack.h
+DEPOBJ_arc_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ struc-symbol.h $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
-DEPOBJ_arm_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-arm.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/arm.h $(BFDDIR)/libcoff.h \
+DEPOBJ_arm_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-arm.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
+
+DEPOBJ_arm_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-arm.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/arm.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_arm_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-arm.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_arm_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
-DEPOBJ_avr_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-avr.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_avr_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-avr.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h
-DEPOBJ_avr_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-avr.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_avr_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
-DEPOBJ_cris_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-cris.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/obstack.h
+DEPOBJ_cris_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-cris.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
-DEPOBJ_cris_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-cris.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_cris_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-cris.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
-DEPOBJ_d10v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d10v.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_d10v_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-d10v.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h
-DEPOBJ_d10v_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d10v.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_d10v_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
-DEPOBJ_d30v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d30v.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_d30v_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-d30v.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h
-DEPOBJ_d30v_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-d30v.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_d30v_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
-DEPOBJ_fr30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-fr30.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_fr30_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-fr30.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h
-DEPOBJ_fr30_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-fr30.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_fr30_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
-DEPOBJ_h8300_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-h8300.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/h8300.h $(BFDDIR)/libcoff.h \
+DEPOBJ_h8300_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-h8300.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/h8300.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_h8300_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8300.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_h8300_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
-DEPOBJ_h8500_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-h8500.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/h8500.h $(BFDDIR)/libcoff.h \
+DEPOBJ_h8500_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-h8500.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/h8500.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_h8500_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-h8500.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_h8500_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
-DEPOBJ_hppa_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-hppa.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_hppa_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-hppa.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h
-DEPOBJ_hppa_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-hppa.h $(BFDDIR)/elf32-hppa.h \
- $(BFDDIR)/libhppa.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h \
+DEPOBJ_hppa_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-hppa.h \
+ $(BFDDIR)/elf32-hppa.h $(BFDDIR)/libhppa.h $(INCDIR)/elf/hppa.h \
+ $(INCDIR)/elf/reloc-macros.h $(INCDIR)/safe-ctype.h \
subsegs.h $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
-DEPOBJ_ia64_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ia64.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_ia64_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-ia64.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h
-DEPOBJ_ia64_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ia64.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_ia64_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ia64.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
-DEPOBJ_i370_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i370.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_i370_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-i370.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h
-DEPOBJ_i370_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i370.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/elf/i370.h $(INCDIR)/aout/aout64.h
+DEPOBJ_i370_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/elf/i370.h $(INCDIR)/aout/aout64.h
-DEPOBJ_i386_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-i386.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/obstack.h
+DEPOBJ_i386_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-i386.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
-DEPOBJ_i386_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i386.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/i386.h $(BFDDIR)/libcoff.h \
+DEPOBJ_i386_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-i386.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/i386.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_i386_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i386.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_i386_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
-DEPOBJ_i860_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i860.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_i860_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
-DEPOBJ_i960_bout = $(srcdir)/config/obj-bout.h $(srcdir)/config/tc-i960.h \
- $(INCDIR)/obstack.h
+DEPOBJ_i960_bout = $(INCDIR)/symcat.h $(srcdir)/config/obj-bout.h \
+ $(srcdir)/config/tc-i960.h $(INCDIR)/obstack.h
-DEPOBJ_i960_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i960.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/i960.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_i960_coff = $(INCDIR)/symcat.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 \
+ $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_i960_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-i960.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_i960_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
-DEPOBJ_m32r_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m32r.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_m32r_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-m32r.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h
-DEPOBJ_m32r_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32r.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_m32r_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
-DEPOBJ_m68hc11_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68hc11.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h \
+DEPOBJ_m68hc11_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-m68hc11.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_m68hc11_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68hc11.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_m68hc11_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68hc11.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
-DEPOBJ_m68k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/obstack.h
+DEPOBJ_m68k_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-m68k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
-DEPOBJ_m68k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68k.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h \
+DEPOBJ_m68k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-m68k.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/m68k.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_m68k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68k.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_m68k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
-DEPOBJ_m68k_hp300 = $(srcdir)/config/obj-aout.c $(srcdir)/config/obj-aout.h \
- $(srcdir)/config/tc-m68k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
+DEPOBJ_m68k_hp300 = $(srcdir)/config/obj-aout.c $(INCDIR)/symcat.h \
+ $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
+ $(INCDIR)/obstack.h
-DEPOBJ_m88k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m88k.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/m88k.h $(BFDDIR)/libcoff.h \
+DEPOBJ_m88k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-m88k.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/m88k.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_m88k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m88k.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_m88k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
-DEPOBJ_mcore_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mcore.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/mcore.h $(BFDDIR)/libcoff.h \
+DEPOBJ_mcore_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-mcore.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/mcore.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_mcore_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mcore.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_mcore_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
-DEPOBJ_mips_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-mips.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/obstack.h
+DEPOBJ_mips_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-mips.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
-DEPOBJ_mips_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mips.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/mipspe.h $(BFDDIR)/libcoff.h \
+DEPOBJ_mips_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-mips.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/mipspe.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_mips_ecoff = $(srcdir)/config/obj-ecoff.h $(srcdir)/config/tc-mips.h \
- ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(BFDDIR)/libecoff.h
+DEPOBJ_mips_ecoff = $(INCDIR)/symcat.h $(srcdir)/config/obj-ecoff.h \
+ $(srcdir)/config/tc-mips.h ecoff.h $(INCDIR)/coff/sym.h \
+ $(INCDIR)/coff/ecoff.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(BFDDIR)/libecoff.h
-DEPOBJ_mips_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mips.h subsegs.h \
- $(INCDIR)/obstack.h ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \
+DEPOBJ_mips_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ ecoff.h $(INCDIR)/coff/sym.h $(INCDIR)/coff/ecoff.h \
$(INCDIR)/elf/mips.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/aout/aout64.h
-DEPOBJ_mn10200_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mn10200.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_mmix_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mmix.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
-DEPOBJ_mn10200_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10200.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_mn10200_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-mn10200.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h
-DEPOBJ_mn10300_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mn10300.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_mn10200_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
-DEPOBJ_mn10300_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mn10300.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_mn10300_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-mn10300.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h
-DEPOBJ_ns32k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-ns32k.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/obstack.h
+DEPOBJ_mn10300_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
-DEPOBJ_ns32k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ns32k.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_ns32k_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-ns32k.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
-DEPOBJ_ns32k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ns32k.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_ns32k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-ns32k.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h
+
+DEPOBJ_ns32k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+
+DEPOBJ_openrisc_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-openrisc.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h
-DEPOBJ_pj_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-pj.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
+DEPOBJ_openrisc_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-openrisc.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+
+DEPOBJ_pdp11_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-pdp11.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
+
+DEPOBJ_pdp11_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-pdp11.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h
+
+DEPOBJ_pdp11_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pdp11.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+
+DEPOBJ_pj_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-pj.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h
+
+DEPOBJ_pj_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pj.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+
+DEPOBJ_ppc_coff = $(INCDIR)/symcat.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 \
$(INCDIR)/obstack.h subsegs.h
-DEPOBJ_pj_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pj.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_ppc_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h $(INCDIR)/aout/aout64.h
-DEPOBJ_ppc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ppc.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/rs6000.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_s390_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-s390.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h
-DEPOBJ_ppc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ppc.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/elf/ppc.h $(INCDIR)/elf/reloc-macros.h \
+DEPOBJ_s390_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-s390.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
$(INCDIR)/aout/aout64.h
-DEPOBJ_sh_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sh.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/sh.h $(BFDDIR)/libcoff.h \
+DEPOBJ_sh_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-sh.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/sh.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_sh_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sh.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_sh_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
-DEPOBJ_sparc_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-sparc.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/obstack.h
+DEPOBJ_sparc_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-sparc.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
-DEPOBJ_sparc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-sparc.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/sparc.h $(BFDDIR)/libcoff.h \
+DEPOBJ_sparc_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-sparc.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/sparc.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_sparc_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-sparc.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_sparc_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
-DEPOBJ_tahoe_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tahoe.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/obstack.h
+DEPOBJ_tahoe_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-tahoe.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
-DEPOBJ_tahoe_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tahoe.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_tahoe_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-tahoe.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h
-DEPOBJ_tahoe_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tahoe.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_tahoe_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
-DEPOBJ_tic30_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-tic30.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/obstack.h
+DEPOBJ_tic30_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-tic30.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
-DEPOBJ_tic30_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic30.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic30.h $(BFDDIR)/libcoff.h \
+DEPOBJ_tic30_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-tic30.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/tic30.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_tic30_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic30.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_tic30_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
-DEPOBJ_tic54x_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic54x.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
- subsegs.h
+DEPOBJ_tic54x_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-tic54x.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_tic54x_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic54x.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_tic54x_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic54x.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
-DEPOBJ_tic80_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic80.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic80.h $(BFDDIR)/libcoff.h \
+DEPOBJ_tic80_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-tic80.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/tic80.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_tic80_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic80.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_tic80_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic80.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
-DEPOBJ_vax_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-vax.h \
- $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h $(INCDIR)/aout/aout64.h \
- $(INCDIR)/obstack.h
+DEPOBJ_vax_aout = $(INCDIR)/symcat.h $(srcdir)/config/obj-aout.h \
+ $(srcdir)/config/tc-vax.h $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h \
+ $(INCDIR)/aout/aout64.h $(INCDIR)/obstack.h
-DEPOBJ_vax_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-vax.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_vax_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-vax.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h
-DEPOBJ_vax_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-vax.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_vax_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
-DEPOBJ_vax_vms = $(srcdir)/config/obj-vms.h $(srcdir)/config/tc-vax.h \
- $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def subsegs.h \
+DEPOBJ_vax_vms = $(INCDIR)/symcat.h $(srcdir)/config/obj-vms.h \
+ $(srcdir)/config/tc-vax.h $(INCDIR)/aout/stab_gnu.h \
+ $(INCDIR)/aout/stab.def $(INCDIR)/safe-ctype.h subsegs.h \
$(INCDIR)/obstack.h
-DEPOBJ_w65_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-w65.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/w65.h $(BFDDIR)/libcoff.h \
+DEPOBJ_w65_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-w65.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/w65.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_w65_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-w65.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_w65_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
-DEPOBJ_v850_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-v850.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h \
- $(INCDIR)/obstack.h subsegs.h
+DEPOBJ_v850_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-v850.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h
-DEPOBJ_v850_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-v850.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_v850_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
-DEPOBJ_z8k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-z8k.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/z8k.h $(BFDDIR)/libcoff.h \
+DEPOBJ_xstormy16_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-xstormy16.h $(INCDIR)/coff/internal.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h $(INCDIR)/obstack.h \
+ subsegs.h
+
+DEPOBJ_xstormy16_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-elf.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-xstormy16.h \
+ $(INCDIR)/safe-ctype.h subsegs.h $(INCDIR)/obstack.h \
+ $(INCDIR)/aout/aout64.h
+
+DEPOBJ_z8k_coff = $(INCDIR)/symcat.h $(srcdir)/config/obj-coff.h \
+ $(srcdir)/config/tc-z8k.h $(INCDIR)/coff/internal.h \
+ $(INCDIR)/coff/z8k.h $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h \
$(INCDIR)/bfdlink.h $(INCDIR)/obstack.h subsegs.h
-DEPOBJ_z8k_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-z8k.h subsegs.h \
- $(INCDIR)/obstack.h $(INCDIR)/aout/aout64.h
+DEPOBJ_z8k_elf = $(INCDIR)/symcat.h $(srcdir)/config/obj-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 \
+ $(INCDIR)/safe-ctype.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 \
@@ -1504,328 +1794,384 @@ 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
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/a29k.h \
+ $(INCDIR)/coff/external.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_a29k_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
+ $(INCDIR)/symcat.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_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
+ $(INCDIR)/symcat.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_arc_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/arm.h \
+ $(INCDIR)/coff/external.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_arm_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
+ $(INCDIR)/symcat.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_avr_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-avr.h
DEP_cris_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-cris.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
-DEP_cris_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-cris.h
+DEP_cris_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-cris.h
DEP_d10v_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-d10v.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+ $(INCDIR)/symcat.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_d10v_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
+ $(INCDIR)/symcat.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_d30v_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
+ $(INCDIR)/symcat.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_fr30_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/h8300.h \
+ $(INCDIR)/coff/external.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_h8300_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/h8500.h \
+ $(INCDIR)/coff/external.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_h8500_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h
-DEP_hppa_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-hppa.h $(BFDDIR)/elf32-hppa.h \
- $(BFDDIR)/libhppa.h $(INCDIR)/elf/hppa.h $(INCDIR)/elf/reloc-macros.h
+DEP_hppa_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-hppa.h \
+ $(BFDDIR)/elf32-hppa.h $(BFDDIR)/libhppa.h $(INCDIR)/elf/hppa.h \
+ $(INCDIR)/elf/reloc-macros.h
DEP_ia64_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-ia64.h \
$(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
-DEP_ia64_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ia64.h
+DEP_ia64_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-ia64.h
DEP_i370_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-i370.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+ $(INCDIR)/symcat.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-i370.h
+DEP_i370_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
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
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/i386.h \
+ $(INCDIR)/coff/external.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_i386_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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_elf = $(srcdir)/config/obj-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_i860_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
+ $(INCDIR)/symcat.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_i960_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
+ $(INCDIR)/symcat.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_m32r_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m32r.h
DEP_m68hc11_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68hc11.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h \
+ $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
-DEP_m68hc11_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68hc11.h
+DEP_m68hc11_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-m68hc11.h
DEP_m68k_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-m68k.h \
$(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
DEP_m68k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-m68k.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/m68k.h \
+ $(INCDIR)/coff/external.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_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/m88k.h \
+ $(INCDIR)/coff/external.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_m88k_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/mcore.h \
+ $(INCDIR)/coff/external.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_mcore_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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 $(INCDIR)/coff/mipspe.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/mipspe.h \
+ $(INCDIR)/coff/external.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_mips_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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_mmix_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-mmix.h
DEP_mn10200_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-mn10200.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+ $(INCDIR)/symcat.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_mn10200_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
+ $(INCDIR)/symcat.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_mn10300_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
+ $(INCDIR)/symcat.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_ns32k_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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_openrisc_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-openrisc.h \
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h
+
+DEP_openrisc_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-openrisc.h
+
+DEP_pdp11_aout = $(srcdir)/config/obj-aout.h $(srcdir)/config/tc-pdp11.h \
+ $(BFDDIR)/libaout.h $(INCDIR)/bfdlink.h
+
+DEP_pdp11_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-pdp11.h \
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h \
+ $(INCDIR)/bfdlink.h
+
+DEP_pdp11_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-pdp11.h
DEP_pj_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-pj.h \
- $(INCDIR)/coff/internal.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+ $(INCDIR)/symcat.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_pj_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/rs6000.h \
+ $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+
+DEP_ppc_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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_s390_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-s390.h \
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.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_s390_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-s390.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
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/sh.h \
+ $(INCDIR)/coff/external.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_sh_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/sparc.h \
+ $(INCDIR)/coff/external.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_sparc_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
+ $(INCDIR)/symcat.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_tahoe_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic30.h \
+ $(INCDIR)/coff/external.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_tic30_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic30.h
DEP_tic54x_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic54x.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h \
- $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic54x.h \
+ $(INCDIR)/coff/ti.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
-DEP_tic54x_elf = $(srcdir)/config/obj-elf.h $(BFDDIR)/elf-bfd.h \
- $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h $(INCDIR)/elf/external.h \
- $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic54x.h
+DEP_tic54x_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-tic54x.h
DEP_tic80_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-tic80.h \
- $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic80.h $(BFDDIR)/libcoff.h \
- $(INCDIR)/bfdlink.h
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/tic80.h \
+ $(INCDIR)/coff/external.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_tic80_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
+ $(INCDIR)/symcat.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_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/w65.h \
+ $(INCDIR)/coff/external.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_w65_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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
+ $(INCDIR)/symcat.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_v850_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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 \
+DEP_xstormy16_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-xstormy16.h \
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.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_xstormy16_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.h \
+ $(BFDDIR)/elf-bfd.h $(INCDIR)/elf/common.h $(INCDIR)/elf/internal.h \
+ $(INCDIR)/elf/external.h $(INCDIR)/bfdlink.h $(srcdir)/config/tc-xstormy16.h
+
+DEP_z8k_coff = $(srcdir)/config/obj-coff.h $(srcdir)/config/tc-z8k.h \
+ $(INCDIR)/symcat.h $(INCDIR)/coff/internal.h $(INCDIR)/coff/z8k.h \
+ $(INCDIR)/coff/external.h $(BFDDIR)/libcoff.h $(INCDIR)/bfdlink.h
+
+DEP_z8k_elf = $(srcdir)/config/obj-elf.h $(INCDIR)/symcat.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_aout) $(DEP_i386_coff) \
@@ -2281,7 +2627,7 @@ stamp-mk.com: vmsconf.sh Makefile
sh $(srcdir)/vmsconf.sh $(GENERIC_OBJS) > new-make.com
$(SHELL) $(srcdir)/../move-if-change new-make.com $(srcdir)/make-gas.com
touch stamp-mk.com
-diststuff: $(DISTSTUFF) info
+diststuff: $(EXTRA_DIST) info
$(OBJS): @ALL_OBJ_DEPS@
@@ -2520,6 +2866,8 @@ de-stage3:
- (cd stage3 ; rm -f as$(EXEEXT) ; mv -f * ..)
- rmdir stage3
+Makefile: $(BFDDIR)/configure.in
+
# Automatic dependency computation. This is a real pain, because the
# dependencies change based on target_cpu_type and obj_format.
# Just to make things even more complicated, automake separates the
@@ -2557,7 +2905,7 @@ DEP1: $(CFILES) $(MULTI_CFILES)
echo '' > targ-env.h; \
echo '' > itbl-cpu.h; \
echo '' > itbl-parse.h; \
- $(MKDEP) -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) $? > DEP
+ $(MKDEP) $(DEP_FLAGS) $? > DEP
mv -f DEPDIR/DEP $@
# Work out the special dependencies for the tc-*.c files.
@@ -2578,7 +2926,7 @@ DEPTC: $(TARGET_CPU_CFILES)
echo '#include "opcodes/'"$${c}"'-desc.h"' > cgen-desc.h; \
rm -f dummy.c; \
cp $${srcdir}/config/tc-$${c}.c dummy.c; \
- $(MKDEP) -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) dummy.c | \
+ $(MKDEP) $(DEP_FLAGS) dummy.c | \
sed -e "s/dummy.o: dummy.c/DEPTC_$${c}_$${o} =/" >> ../DEPTCA; \
rm -f dummy.c; \
else true; fi; \
@@ -2616,7 +2964,7 @@ DEPOBJ: $(OBJ_FORMAT_CFILES)
echo '' > itbl-parse.h; \
rm -f dummy.c; \
cp $${srcdir}/config/obj-$${o}.c dummy.c; \
- $(MKDEP) -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) dummy.c | \
+ $(MKDEP) $(DEP_FLAGS) dummy.c | \
sed -e "s/dummy.o: dummy.c/DEPOBJ_$${c}_$${o} =/" >> ../DEPOBJA; \
rm -f dummy.c; \
else true; fi; \
@@ -2651,7 +2999,7 @@ DEP2: $(TARGET_CPU_HFILES) $(OBJ_FORMAT_HFILES)
if [ x$${valid} = xyes ]; then \
echo '#include "tc-'"$${c}"'.h"' > targ-cpu.h; \
echo '#include "obj-'"$${o}"'.h"' > dummy.c; \
- $(MKDEP) -DBFD_ASSEMBLER -I. -I.. -I$${srcdir} -I../../bfd $(DEP_INCLUDES) dummy.c | \
+ $(MKDEP) $(DEP_FLAGS) dummy.c | \
sed -e "s/dummy.o: dummy.c/DEP_$${c}_$${o} =/" >> ../DEP2A; \
else true; fi; \
done; \
@@ -2698,49 +3046,62 @@ dep-am: DEP
# ANYTHING CHANGED OR ADDED BETWEEN THE WARNING LINES MAY GO AWAY.
.PHONY: dep dep-in dep-am
#MKDEP DO NOT PUT ANYTHING BETWEEN THIS LINE AND THE MATCHING WARNING BELOW.
-app.o: app.c
-as.o: as.c subsegs.h $(INCDIR)/obstack.h output-file.h \
- sb.h macro.h dwarf2dbg.h
-atof-generic.o: atof-generic.c
-bignum-copy.o: bignum-copy.c
-cond.o: cond.c macro.h sb.h $(INCDIR)/obstack.h
-depend.o: depend.c
-dwarf2dbg.o: dwarf2dbg.c dwarf2dbg.h subsegs.h $(INCDIR)/obstack.h \
+app.o: app.c $(INCDIR)/symcat.h
+as.o: as.c $(INCDIR)/symcat.h subsegs.h $(INCDIR)/obstack.h \
+ output-file.h sb.h macro.h dwarf2dbg.h
+atof-generic.o: atof-generic.c $(INCDIR)/symcat.h $(INCDIR)/safe-ctype.h
+bignum-copy.o: bignum-copy.c $(INCDIR)/symcat.h
+cond.o: cond.c $(INCDIR)/symcat.h macro.h sb.h $(INCDIR)/obstack.h
+depend.o: depend.c $(INCDIR)/symcat.h
+dwarf2dbg.o: dwarf2dbg.c $(INCDIR)/symcat.h dwarf2dbg.h \
+ subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/dwarf2.h
+ecoff.o: ecoff.c $(INCDIR)/symcat.h ecoff.h
+ehopt.o: ehopt.c $(INCDIR)/symcat.h subsegs.h $(INCDIR)/obstack.h \
$(INCDIR)/elf/dwarf2.h
-ecoff.o: ecoff.c ecoff.h
-ehopt.o: ehopt.c subsegs.h $(INCDIR)/obstack.h $(INCDIR)/elf/dwarf2.h
-expr.o: expr.c $(INCDIR)/obstack.h
-flonum-copy.o: flonum-copy.c
+expr.o: expr.c $(INCDIR)/symcat.h $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/obstack.h
+flonum-copy.o: flonum-copy.c $(INCDIR)/symcat.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 $(INCDIR)/obstack.h
-input-file.o: input-file.c input-file.h
-input-scrub.o: input-scrub.c input-file.h sb.h
-listing.o: listing.c input-file.h subsegs.h
-literal.o: literal.c subsegs.h $(INCDIR)/obstack.h
-macro.o: macro.c sb.h macro.h
-messages.o: messages.c
-output-file.o: output-file.c output-file.h
-read.o: read.c subsegs.h $(INCDIR)/obstack.h sb.h macro.h \
- ecoff.h
+frags.o: frags.c $(INCDIR)/symcat.h subsegs.h $(INCDIR)/obstack.h
+hash.o: hash.c $(INCDIR)/symcat.h $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/obstack.h
+input-file.o: input-file.c $(INCDIR)/symcat.h input-file.h \
+ $(INCDIR)/safe-ctype.h
+input-scrub.o: input-scrub.c $(INCDIR)/symcat.h input-file.h \
+ sb.h
+listing.o: listing.c $(INCDIR)/symcat.h $(INCDIR)/safe-ctype.h \
+ input-file.h subsegs.h
+literal.o: literal.c $(INCDIR)/symcat.h subsegs.h $(INCDIR)/obstack.h
+macro.o: macro.c $(INCDIR)/safe-ctype.h sb.h macro.h
+messages.o: messages.c $(INCDIR)/symcat.h
+output-file.o: output-file.c $(INCDIR)/symcat.h output-file.h
+read.o: read.c $(INCDIR)/symcat.h $(INCDIR)/safe-ctype.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 \
- struc-symbol.h
-write.o: write.c subsegs.h $(INCDIR)/obstack.h output-file.h \
- dwarf2dbg.h
-gasp.o: gasp.c sb.h macro.h
-itbl-ops.o: itbl-ops.c itbl-ops.h
-e-crisaout.o: $(srcdir)/config/e-crisaout.c emul-target.h
-e-criself.o: $(srcdir)/config/e-criself.c emul-target.h
-e-i386aout.o: $(srcdir)/config/e-i386aout.c emul-target.h
-e-i386coff.o: $(srcdir)/config/e-i386coff.c emul-target.h
-e-i386elf.o: $(srcdir)/config/e-i386elf.c emul-target.h
-e-mipsecoff.o: $(srcdir)/config/e-mipsecoff.c emul-target.h
-e-mipself.o: $(srcdir)/config/e-mipself.c emul-target.h
+stabs.o: stabs.c $(INCDIR)/symcat.h $(INCDIR)/obstack.h \
+ subsegs.h ecoff.h $(INCDIR)/aout/stab_gnu.h $(INCDIR)/aout/stab.def
+subsegs.o: subsegs.c $(INCDIR)/symcat.h subsegs.h $(INCDIR)/obstack.h
+symbols.o: symbols.c $(INCDIR)/symcat.h $(INCDIR)/safe-ctype.h \
+ $(INCDIR)/obstack.h subsegs.h struc-symbol.h
+write.o: write.c $(INCDIR)/symcat.h subsegs.h $(INCDIR)/obstack.h \
+ output-file.h dwarf2dbg.h
+gasp.o: gasp.c $(INCDIR)/safe-ctype.h sb.h macro.h
+itbl-ops.o: itbl-ops.c itbl-ops.h $(INCDIR)/symcat.h
+e-crisaout.o: $(srcdir)/config/e-crisaout.c $(INCDIR)/symcat.h \
+ emul-target.h
+e-criself.o: $(srcdir)/config/e-criself.c $(INCDIR)/symcat.h \
+ emul-target.h
+e-i386aout.o: $(srcdir)/config/e-i386aout.c $(INCDIR)/symcat.h \
+ emul-target.h
+e-i386coff.o: $(srcdir)/config/e-i386coff.c $(INCDIR)/symcat.h \
+ emul-target.h
+e-i386elf.o: $(srcdir)/config/e-i386elf.c $(INCDIR)/symcat.h \
+ emul-target.h
+e-mipsecoff.o: $(srcdir)/config/e-mipsecoff.c $(INCDIR)/symcat.h \
+ emul-target.h
+e-mipself.o: $(srcdir)/config/e-mipself.c $(INCDIR)/symcat.h \
+ emul-target.h
$(OBJS): $(DEP_@target_cpu_type@_@obj_format@)
$(TARG_CPU_O): $(DEPTC_@target_cpu_type@_@obj_format@)
$(OBJ_FORMAT_O): $(DEPOBJ_@target_cpu_type@_@obj_format@)
diff --git a/contrib/binutils/gas/NEWS b/contrib/binutils/gas/NEWS
index 6c3439d..950f63b 100644
--- a/contrib/binutils/gas/NEWS
+++ b/contrib/binutils/gas/NEWS
@@ -1,4 +1,21 @@
-*- text -*-
+The ARM assembler now accepts -march=..., -mcpu=... and -mfpu=... for
+specifying the target instruction set. The old method of specifying the
+target processor has been deprecated, but is still accepted for
+compatibility.
+
+Support for the VFP floating-point instruction set has been added to
+the ARM assembler.
+
+New psuedo op: .incbin to include a set of binary data at a given point
+in the assembly. Contributed by Anders Norlander.
+
+The MIPS assembler now accepts -march/-mtune. -mcpu has been deprecated
+but still works for compatability.
+
+The MIPS assembler no longer issues a warning by default when it
+generates a nop instruction from a macro. The new command line option
+-n will turn on the warning.
Changes in 2.11:
diff --git a/contrib/binutils/gas/README b/contrib/binutils/gas/README
index 87666df..ef12d3f 100644
--- a/contrib/binutils/gas/README
+++ b/contrib/binutils/gas/README
@@ -1,10 +1,10 @@
README for GAS
-A number of things have changed since version 1 and the wonderful world of gas
-looks very different. There's still a lot of irrelevant garbage lying around
-that will be cleaned up in time. Documentation is scarce, as are logs of the
-changes made since the last gas release. My apologies, and I'll try to get
-something useful.
+A number of things have changed since version 1 and the wonderful
+world of gas looks very different. There's still a lot of irrelevant
+garbage lying around that will be cleaned up in time. Documentation
+is scarce, as are logs of the changes made since the last gas release.
+My apologies, and I'll try to get something useful.
Unpacking and Installation - Summary
====================================
@@ -31,7 +31,7 @@ system. You can rebuild it by typing:
make as.dvi
The Info form is viewable with the GNU Emacs `info' subsystem, or the
-standalone `info' program, available as part of the GNU Texinfo distribution.
+stand-alone `info' program, available as part of the GNU Texinfo distribution.
To build the info files, you will need the `makeinfo' program. Type:
cd gas/doc
@@ -142,7 +142,7 @@ The `--enable' options recognized by software in the gas distribution are:
Supported platforms
===================
-At this point I believe gas to be ansi only code for most target cpu's. That
+At this point I believe gas to be ANSI only code for most target cpu's. That
is, there should be relatively few, if any host system dependencies. So
porting (as a cross-assembler) to hosts not yet supported should be fairly
easy. Porting to a new target shouldn't be too tough if it's a variant of one
@@ -173,9 +173,10 @@ Native assembling should work on:
sparc solaris
ns32k (netbsd, lites)
-I believe that gas as a cross-assembler can currently be targetted for
+I believe that gas as a cross-assembler can currently be targeted for
most of the above hosts, plus
+ arm
decstation-bsd (a.out format, to be used in BSD 4.4)
ebmon29k
go32 (DOS on i386, with DJGPP -- old a.out version)
@@ -202,7 +203,7 @@ run gcc on it. Or run "gcc -xassembler-with-cpp foo.s".
Support for ELF should work now for sparc, hppa, i386, alpha, m68k,
MIPS, powerpc.
-Support for sequent (ns32k), tahoe, i860, m88k may be suffering from bitrot.
+Support for sequent (ns32k), tahoe, i860 may be suffering from bitrot.
If you try out gas on some host or target not listed above, please let me know
the results, so I can update the list.
@@ -229,10 +230,13 @@ warning message when this happens.
REPORTING BUGS IN GAS
=====================
-Bugs in gas should be reported to bug-binutils@gnu.org. They may be
-cross-posted to bug-gcc if they affect the use of gas with gcc. They
-should not be reported just to bug-gcc, since I don't read that list,
-and therefore wouldn't see them.
+Bugs in gas should be reported to:
+
+ bug-gnu-utils@gnu.org.
+
+They may be cross-posted to gcc-bugs@gnu.org if they affect the use of
+gas with gcc. They should not be reported just to gcc-bugs, since not
+all of the maintainers read that list.
If you report a bug in GAS, please remember to include:
@@ -265,7 +269,7 @@ does demonstrate the problem; but if paring it down would cause large delays
in filing the bug report, don't bother.
If the input file is very large, and you are on the internet, you may want to
-make it avaliable for anonymous FTP instead of mailing it. If you do, include
+make it available for anonymous FTP instead of mailing it. If you do, include
instructions for FTP'ing it in your bug report.
If you expect to be contributing a large number of test cases, it would be
diff --git a/contrib/binutils/gas/app.c b/contrib/binutils/gas/app.c
index 5111598..ba587d4 100644
--- a/contrib/binutils/gas/app.c
+++ b/contrib/binutils/gas/app.c
@@ -78,9 +78,11 @@ static const char symbol_chars[] =
#ifdef DOUBLEBAR_PARALLEL
#define LEX_IS_DOUBLEBAR_1ST 13
#endif
+#define LEX_IS_PARALLEL_SEPARATOR 14
#define IS_SYMBOL_COMPONENT(c) (lex[c] == LEX_IS_SYMBOL_COMPONENT)
#define IS_WHITESPACE(c) (lex[c] == LEX_IS_WHITESPACE)
#define IS_LINE_SEPARATOR(c) (lex[c] == LEX_IS_LINE_SEPARATOR)
+#define IS_PARALLEL_SEPARATOR(c) (lex[c] == LEX_IS_PARALLEL_SEPARATOR)
#define IS_COMMENT(c) (lex[c] == LEX_IS_COMMENT_START)
#define IS_LINE_COMMENT(c) (lex[c] == LEX_IS_LINE_COMMENT_START)
#define IS_NEWLINE(c) (lex[c] == LEX_IS_NEWLINE)
@@ -164,6 +166,15 @@ do_scrub_begin (m68k_mri)
lex[(unsigned char) *p] = LEX_IS_LINE_SEPARATOR;
} /* declare line separators */
+#ifdef tc_parallel_separator_chars
+ /* This macro permits the processor to specify all characters which
+ separate parallel insns on the same line. */
+ for (p = tc_parallel_separator_chars; *p; p++)
+ {
+ lex[(unsigned char) *p] = LEX_IS_PARALLEL_SEPARATOR;
+ } /* declare parallel separators */
+#endif
+
/* Only allow slash-star comments if slash is not in use.
FIXME: This isn't right. We should always permit them. */
if (lex['/'] == 0)
@@ -376,7 +387,7 @@ do_scrub_chars (get, tostart, tolen)
/* I added states 9 and 10 because the MIPS ECOFF assembler uses
constructs like ``.loc 1 20''. This was turning into ``.loc
120''. States 9 and 10 ensure that a space is never dropped in
- between characters which could appear in a identifier. Ian
+ between characters which could appear in an identifier. Ian
Taylor, ian@cygnus.com.
I added state 11 so that something like "Lfoo add %r25,%r26,%r27" works
@@ -555,7 +566,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 ('"');
@@ -621,7 +632,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:
@@ -630,7 +641,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;
}
@@ -796,7 +807,8 @@ do_scrub_chars (get, tostart, tolen)
#endif
if (IS_COMMENT (ch)
|| ch == '/'
- || IS_LINE_SEPARATOR (ch))
+ || IS_LINE_SEPARATOR (ch)
+ || IS_PARALLEL_SEPARATOR (ch))
{
if (scrub_m68k_mri)
{
@@ -992,7 +1004,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);
@@ -1039,6 +1051,11 @@ do_scrub_chars (get, tostart, tolen)
PUT (ch);
break;
+ case LEX_IS_PARALLEL_SEPARATOR:
+ state = 1;
+ PUT (ch);
+ break;
+
#ifdef TC_V850
case LEX_IS_DOUBLEDASH_1ST:
ch2 = GET ();
@@ -1119,7 +1136,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 (_("end of file in comment; newline inserted"));
state = 0;
PUT ('\n');
break;
diff --git a/contrib/binutils/gas/as.c b/contrib/binutils/gas/as.c
index e8c2212..dab04e9 100644
--- a/contrib/binutils/gas/as.c
+++ b/contrib/binutils/gas/as.c
@@ -1,6 +1,6 @@
/* as.c - GAS main program.
Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001
+ 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -208,7 +208,7 @@ print_version_id ()
#ifdef BFD_ASSEMBLER
fprintf (stderr, _("GNU assembler version %s (%s) using BFD version %s"),
- VERSION, TARGET_ALIAS, BFD_VERSION);
+ VERSION, TARGET_ALIAS, BFD_VERSION_STRING);
#else
fprintf (stderr, _("GNU assembler version %s (%s)"), VERSION, TARGET_ALIAS);
#endif
@@ -524,8 +524,8 @@ 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 2001 Free Software Foundation, Inc.\n"));
+ printf (_("GNU assembler %s\n"), BFD_VERSION_STRING);
+ printf (_("Copyright 2002 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"));
@@ -587,7 +587,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"));
break;
}
@@ -602,11 +602,8 @@ the GNU General Public License. This program has absolutely no warranty.\n"));
internal table. */
itbl_files->name = xstrdup (optarg);
if (itbl_parse (itbl_files->name) != 0)
- {
- fprintf (stderr, _("Failed to read instruction table %s\n"),
- itbl_files->name);
- exit (EXIT_SUCCESS);
- }
+ as_fatal (_("failed to read instruction table %s\n"),
+ itbl_files->name);
}
break;
@@ -765,10 +762,16 @@ the GNU General Public License. This program has absolutely no warranty.\n"));
*pargc = new_argc;
*pargv = new_argv;
+
+#ifdef md_after_parse_args
+ md_after_parse_args ();
+#endif
}
static long start_time;
+int main PARAMS ((int, char **));
+
int
main (argc, argv)
int argc;
@@ -783,6 +786,9 @@ main (argc, argv)
#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
setlocale (LC_MESSAGES, "");
#endif
+#if defined (HAVE_SETLOCALE)
+ setlocale (LC_CTYPE, "");
+#endif
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
diff --git a/contrib/binutils/gas/as.h b/contrib/binutils/gas/as.h
index 75abfa9..ed82574 100644
--- a/contrib/binutils/gas/as.h
+++ b/contrib/binutils/gas/as.h
@@ -43,28 +43,19 @@
/* This is the code recommended in the autoconf documentation, almost
verbatim. If it doesn't work for you, let me know, and notify
djm@gnu.ai.mit.edu as well. */
-/* Added #undef for DJ Delorie. The right fix is to ensure that as.h
- is included first, before even any system header files, in all files
- that use it. KR 1994.11.03 */
/* Added void* version for STDC case. This is to be compatible with
the declaration in bison.simple, used for m68k operand parsing.
--KR 1995.08.08 */
/* Force void* decl for hpux. This is what Bison uses. --KR 1995.08.16 */
-/* AIX requires this to be the first thing in the file. */
-#ifdef __GNUC__
-# ifndef alloca
-# ifdef __STDC__
-extern void *alloca ();
-# else
-extern char *alloca ();
-# endif
-# endif
-#else
+#ifndef __GNUC__
# if HAVE_ALLOCA_H
# include <alloca.h>
# else
# ifdef _AIX
+/* Indented so that pre-ansi C compilers will ignore it, rather than
+ choke on it. Some versions of AIX require this to be the first
+ thing in the file. */
#pragma alloca
# else
# ifndef alloca /* predefined by HP cc +Olibcalls */
@@ -76,13 +67,12 @@ extern void *alloca ();
# endif /* alloca */
# endif /* _AIX */
# endif /* HAVE_ALLOCA_H */
-#endif
+#endif /* __GNUC__ */
/* Now, tend to the rest of the configuration. */
/* System include files first... */
#include <stdio.h>
-#include <ctype.h>
#ifdef HAVE_STRING_H
#include <string.h>
#else
diff --git a/contrib/binutils/gas/atof-generic.c b/contrib/binutils/gas/atof-generic.c
index 1309566..c5d10d4 100644
--- a/contrib/binutils/gas/atof-generic.c
+++ b/contrib/binutils/gas/atof-generic.c
@@ -1,5 +1,5 @@
/* atof_generic.c - turn a string of digits into a Flonum
- Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000
+ Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -19,10 +19,10 @@
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
-#include <ctype.h>
#include <string.h>
#include "as.h"
+#include "safe-ctype.h"
#ifndef FALSE
#define FALSE (0)
@@ -171,7 +171,7 @@ atof_generic (address_of_string_pointer,
&& (!c || !strchr (string_of_decimal_exponent_marks, c)));
p++)
{
- if (isdigit ((unsigned char) c))
+ if (ISDIGIT (c))
{
if (seen_significant_digit || c > '0')
{
@@ -200,7 +200,7 @@ atof_generic (address_of_string_pointer,
{
unsigned int zeros = 0; /* Length of current string of zeros */
- for (p++; (c = *p) && isdigit ((unsigned char) c); p++)
+ for (p++; (c = *p) && ISDIGIT (c); p++)
{
if (c == '0')
{
@@ -221,7 +221,7 @@ atof_generic (address_of_string_pointer,
&& (!c || !strchr (string_of_decimal_exponent_marks, c)));
p++)
{
- if (isdigit ((unsigned char) c))
+ if (ISDIGIT (c))
{
/* This may be retracted below. */
number_of_digits_after_decimal++;
@@ -275,7 +275,7 @@ atof_generic (address_of_string_pointer,
for (; (c); c = *++p)
{
- if (isdigit ((unsigned char) c))
+ if (ISDIGIT (c))
{
decimal_exponent = decimal_exponent * 10 + c - '0';
/*
@@ -400,7 +400,7 @@ atof_generic (address_of_string_pointer,
for (p = first_digit, count = number_of_digits_to_use; count; p++, --count)
{
c = *p;
- if (isdigit ((unsigned char) c))
+ if (ISDIGIT (c))
{
/*
* Multiply by 10. Assume can never overflow.
@@ -434,7 +434,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/bit_fix.h b/contrib/binutils/gas/bit_fix.h
index 3eedb3c..80c0022 100644
--- a/contrib/binutils/gas/bit_fix.h
+++ b/contrib/binutils/gas/bit_fix.h
@@ -1,5 +1,5 @@
/* bit_fix.h
- Copyright 1987, 1992, 2000 Free Software Foundation, Inc.
+ Copyright 1987, 1992, 2000, 2001 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -26,8 +26,8 @@
The or-mask is used to set the huffman bits in displacements for the
ns32k port.
The acbi, addqi, movqi, cmpqi instruction requires an assembler that
- can handle bitfields. Ie handle an expression, evaluate it and insert
- the result in an some bitfield. ( ex: 5 bits in a short field of a opcode)
+ can handle bitfields. Ie. handle an expression, evaluate it and insert
+ the result in some bitfield. (eg: 5 bits in a short field of an opcode)
*/
#ifndef __bit_fix_h__
diff --git a/contrib/binutils/gas/cgen.c b/contrib/binutils/gas/cgen.c
index 759b382..75138a45 100644
--- a/contrib/binutils/gas/cgen.c
+++ b/contrib/binutils/gas/cgen.c
@@ -29,6 +29,8 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "cgen.h"
#include "dwarf2dbg.h"
+static void queue_fixup PARAMS ((int, int, expressionS *));
+
/* Opcode table descriptor, must be set by md_begin. */
CGEN_CPU_DESC gas_cgen_cpu_desc;
@@ -94,61 +96,118 @@ queue_fixup (opindex, opinfo, expP)
++ num_fixups;
}
-/* The following three functions allow a backup of the fixup chain to be made,
- 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. */
-/* ??? I think with cgen_asm_finish_insn (or something else) there is no
- more need for this. */
+/* The following functions allow fixup chains to be stored, retrieved,
+ and swapped. They are a generalization of a pre-existing scheme
+ for storing, restoring and swapping fixup chains that was used by
+ the m32r port. The functionality is essentially the same, only
+ instead of only being able to store a single fixup chain, an entire
+ array of fixup chains can be stored. It is the user's responsibility
+ to keep track of how many fixup chains have been stored and which
+ elements of the array they are in.
+
+ The algorithms used are the same as in the old scheme. Other than the
+ "array-ness" of the whole thing, the functionality is identical to the
+ old scheme.
+
+ gas_cgen_initialize_saved_fixups_array():
+ Sets num_fixups_in_chain to 0 for each element. Call this from
+ md_begin() if you plan to use these functions and you want the
+ fixup count in each element to be set to 0 intially. This is
+ not necessary, but it's included just in case. It performs
+ the same function for each element in the array of fixup chains
+ that gas_init_parse() performs for the current fixups.
+
+ gas_cgen_save_fixups (element):
+ element - element number of the array you wish to store the fixups
+ to. No mechanism is built in for tracking what element
+ was last stored to.
+
+ gas_cgen_restore_fixups (element):
+ element - element number of the array you wish to restore the fixups
+ from.
+
+ gas_cgen_swap_fixups(int element):
+ element - swap the current fixups with those in this element number.
+*/
+
+struct saved_fixups {
+ struct fixup fixup_chain[GAS_CGEN_MAX_FIXUPS];
+ int num_fixups_in_chain;
+};
-static struct fixup saved_fixups[GAS_CGEN_MAX_FIXUPS];
-static int saved_num_fixups;
+static struct saved_fixups stored_fixups[MAX_SAVED_FIXUP_CHAINS];
void
-gas_cgen_save_fixups ()
+gas_cgen_initialize_saved_fixups_array ()
{
- saved_num_fixups = num_fixups;
-
- memcpy (saved_fixups, fixups, sizeof (fixups[0]) * num_fixups);
+ int i = 0;
- num_fixups = 0;
+ while (i < MAX_SAVED_FIXUP_CHAINS)
+ stored_fixups[i++].num_fixups_in_chain = 0;
}
void
-gas_cgen_restore_fixups ()
+gas_cgen_save_fixups (i)
+ int i;
{
- num_fixups = saved_num_fixups;
-
- memcpy (fixups, saved_fixups, sizeof (fixups[0]) * num_fixups);
+ if (i < 0 || i >= MAX_SAVED_FIXUP_CHAINS)
+ {
+ as_fatal ("index into stored_fixups[] out of bounds");
+ return;
+ }
- saved_num_fixups = 0;
+ stored_fixups[i].num_fixups_in_chain = num_fixups;
+ memcpy (stored_fixups[i].fixup_chain, fixups,
+ sizeof (fixups[0]) * num_fixups);
+ num_fixups = 0;
}
void
-gas_cgen_swap_fixups ()
+gas_cgen_restore_fixups (i)
+ int i;
{
- int tmp;
- struct fixup tmp_fixup;
-
- if (num_fixups == 0)
+ if (i < 0 || i >= MAX_SAVED_FIXUP_CHAINS)
{
- gas_cgen_restore_fixups ();
+ as_fatal ("index into stored_fixups[] out of bounds");
+ return;
}
- else if (saved_num_fixups == 0)
+
+ num_fixups = stored_fixups[i].num_fixups_in_chain;
+ memcpy (fixups,stored_fixups[i].fixup_chain,
+ (sizeof (stored_fixups[i].fixup_chain[0])) * num_fixups);
+ stored_fixups[i].num_fixups_in_chain = 0;
+}
+
+void
+gas_cgen_swap_fixups (i)
+ int i;
+{
+ if (i < 0 || i >= MAX_SAVED_FIXUP_CHAINS)
{
- gas_cgen_save_fixups ();
+ as_fatal ("index into stored_fixups[] out of bounds");
+ return;
}
+
+ if (num_fixups == 0)
+ gas_cgen_restore_fixups (i);
+
+ else if (stored_fixups[i].num_fixups_in_chain == 0)
+ gas_cgen_save_fixups (i);
+
else
{
- tmp = saved_num_fixups;
- saved_num_fixups = num_fixups;
+ int tmp;
+ struct fixup tmp_fixup;
+
+ tmp = stored_fixups[i].num_fixups_in_chain;
+ stored_fixups[i].num_fixups_in_chain = num_fixups;
num_fixups = tmp;
for (tmp = GAS_CGEN_MAX_FIXUPS; tmp--;)
{
- tmp_fixup = saved_fixups [tmp];
- saved_fixups [tmp] = fixups [tmp];
- fixups [tmp] = tmp_fixup;
+ tmp_fixup = stored_fixups[i].fixup_chain [tmp];
+ stored_fixups[i].fixup_chain[tmp] = fixups [tmp];
+ fixups [tmp] = tmp_fixup;
}
}
}
@@ -164,7 +223,7 @@ gas_cgen_swap_fixups ()
At this point we do not use a bfd_reloc_code_real_type for
operands residing in the insn, but instead just use the
operand index. This lets us easily handle fixups for any
- operand type. We pick a BFD reloc type in md_apply_fix. */
+ operand type. We pick a BFD reloc type in md_apply_fix3. */
fixS *
gas_cgen_record_fixup (frag, where, insn, length, operand, opinfo, symbol, offset)
@@ -204,7 +263,7 @@ gas_cgen_record_fixup (frag, where, insn, length, operand, opinfo, symbol, offse
At this point we do not use a bfd_reloc_code_real_type for
operands residing in the insn, but instead just use the
operand index. This lets us easily handle fixups for any
- operand type. We pick a BFD reloc type in md_apply_fix. */
+ operand type. We pick a BFD reloc type in md_apply_fix3. */
fixS *
gas_cgen_record_fixup_exp (frag, where, insn, length, operand, opinfo, exp)
@@ -265,7 +324,7 @@ gas_cgen_parse_operand (cd, want, strP, opindex, opinfo, resultP, valueP)
static char *hold;
static enum cgen_parse_operand_result *resultP_1;
#endif
- const char *errmsg = NULL;
+ const char *errmsg;
expressionS exp;
if (want == CGEN_PARSE_OPERAND_INIT)
@@ -285,12 +344,13 @@ gas_cgen_parse_operand (cd, want, strP, opindex, opinfo, resultP, valueP)
expr_jmp_buf_p = 0;
input_line_pointer = (char *) hold;
*resultP_1 = CGEN_PARSE_OPERAND_RESULT_ERROR;
- return "illegal operand";
+ return _("illegal operand");
}
expr_jmp_buf_p = 1;
expression (&exp);
expr_jmp_buf_p = 0;
+ errmsg = NULL;
*strP = input_line_pointer;
input_line_pointer = hold;
@@ -509,14 +569,14 @@ gas_cgen_finish_insn (insn, buf, length, relax_p, result)
handles the rest. bfd_install_relocation (or some other bfd function)
should handle them all. */
-int
-gas_cgen_md_apply_fix3 (fixP, valueP, seg)
+void
+gas_cgen_md_apply_fix3 (fixP, valP, seg)
fixS * fixP;
- valueT * valueP;
+ valueT * valP;
segT seg ATTRIBUTE_UNUSED;
{
char *where = fixP->fx_frag->fr_literal + fixP->fx_where;
- valueT value;
+ valueT value = * valP;
/* Canonical name, since used a lot. */
CGEN_CPU_DESC cd = gas_cgen_cpu_desc;
@@ -532,15 +592,15 @@ gas_cgen_md_apply_fix3 (fixP, valueP, seg)
result of md_pcrel_from. This is confusing. */
if (fixP->fx_addsy == (symbolS *) NULL)
- {
- value = *valueP;
- fixP->fx_done = 1;
- }
+ 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)
@@ -594,7 +654,7 @@ gas_cgen_md_apply_fix3 (fixP, valueP, seg)
}
if (fixP->fx_done)
- return 1;
+ return;
/* The operand isn't fully resolved. Determine a BFD reloc value
based on the operand information and leave it to
@@ -602,16 +662,15 @@ gas_cgen_md_apply_fix3 (fixP, valueP, seg)
partial_inplace == false. */
reloc_type = md_cgen_lookup_reloc (insn, operand, fixP);
+
if (reloc_type != BFD_RELOC_NONE)
- {
- fixP->fx_r_type = reloc_type;
- }
+ fixP->fx_r_type = reloc_type;
else
{
as_bad_where (fixP->fx_file, fixP->fx_line,
_("unresolved expression that must be resolved"));
fixP->fx_done = 1;
- return 1;
+ return;
}
}
else if (fixP->fx_done)
@@ -639,17 +698,13 @@ gas_cgen_md_apply_fix3 (fixP, valueP, seg)
break;
}
}
- else
- {
- /* bfd_install_relocation will be called to finish things up. */
- }
+ /* else
+ bfd_install_relocation will be called to finish things up. */
/* Tuck `value' away for use by tc_gen_reloc.
See the comment describing fx_addnumber in write.h.
This field is misnamed (or misused :-). */
fixP->fx_addnumber = value;
-
- return 1;
}
/* Translate internal representation of relocation info to BFD target format.
diff --git a/contrib/binutils/gas/cgen.h b/contrib/binutils/gas/cgen.h
index b09ccaa..97cd38d 100644
--- a/contrib/binutils/gas/cgen.h
+++ b/contrib/binutils/gas/cgen.h
@@ -53,9 +53,12 @@ extern const char * gas_cgen_parse_operand
/* 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));
+/* Routines and macros for saving fixup chains. */
+extern void gas_cgen_save_fixups PARAMS ((int));
+extern void gas_cgen_restore_fixups PARAMS ((int));
+extern void gas_cgen_swap_fixups PARAMS ((int));
+extern void gas_cgen_initialize_saved_fixups_array PARAMS ((void));
+#define MAX_SAVED_FIXUP_CHAINS 50
/* Add a register to the assembler's hash table.
This makes lets GAS parse registers for us.
@@ -77,7 +80,7 @@ extern fixS * gas_cgen_record_fixup_exp PARAMS ((fragS *, int, const CGEN_INSN *
expressionS *));
/* md_apply_fix3 handler */
-extern int gas_cgen_md_apply_fix3 PARAMS ((fixS *, valueT *, segT));
+extern void gas_cgen_md_apply_fix3 PARAMS ((fixS *, valueT *, segT));
/* tc_gen_reloc handler */
extern arelent *gas_cgen_tc_gen_reloc PARAMS ((asection *, fixS *));
@@ -93,4 +96,6 @@ md_cgen_record_fixup_exp PARAMS ((fragS *, int, const CGEN_INSN *, int,
const CGEN_OPERAND *, int,
expressionS *));
+extern void gas_cgen_md_operand PARAMS ((expressionS *));
+
#endif /* GAS_CGEN_H */
diff --git a/contrib/binutils/gas/cond.c b/contrib/binutils/gas/cond.c
index 6c6e8ad..73304cb 100644
--- a/contrib/binutils/gas/cond.c
+++ b/contrib/binutils/gas/cond.c
@@ -257,11 +257,11 @@ s_elseif (arg)
{
if (current_cframe == NULL)
{
- as_bad (_("\".elseif\" without matching \".if\" - ignored"));
+ as_bad (_("\".elseif\" without matching \".if\""));
}
else if (current_cframe->else_seen)
{
- as_bad (_("\".elseif\" after \".else\" - ignored"));
+ as_bad (_("\".elseif\" after \".else\""));
as_bad_where (current_cframe->else_file_line.file,
current_cframe->else_file_line.line,
_("here is the previous \"else\""));
@@ -365,11 +365,11 @@ s_else (arg)
{
if (current_cframe == NULL)
{
- as_bad (_(".else without matching .if - ignored"));
+ as_bad (_("\".else\" without matching \".if\""));
}
else if (current_cframe->else_seen)
{
- as_bad (_("duplicate \"else\" - ignored"));
+ as_bad (_("duplicate \"else\""));
as_bad_where (current_cframe->else_file_line.file,
current_cframe->else_file_line.line,
_("here is the previous \"else\""));
diff --git a/contrib/binutils/gas/config.in b/contrib/binutils/gas/config.in
index e2a6003..6f1311f 100644
--- a/contrib/binutils/gas/config.in
+++ b/contrib/binutils/gas/config.in
@@ -154,20 +154,14 @@
/* Using strict COFF? */
#undef STRICTCOFF
-/* Use ELF stabs for MIPS, not ECOFF stabs */
-#undef MIPS_STABS_ELF
-
-/* Use ELF stabs for MIPS, not ECOFF stabs */
-#undef MIPS_STABS_ELF
-
/* Define if default target is PowerPC Solaris. */
#undef TARGET_SOLARIS_COMMENT
/* Define as 1 if big endian. */
#undef TARGET_BYTES_BIG_ENDIAN
-/* Default architecture. */
-#undef DEFAULT_ARCH
+/* Use ELF stabs for MIPS, not ECOFF stabs */
+#undef MIPS_STABS_ELF
/* Default architecture. */
#undef DEFAULT_ARCH
diff --git a/contrib/binutils/gas/config/e-i386aout.c b/contrib/binutils/gas/config/e-i386aout.c
index 18fdf68..f8435ab 100644
--- a/contrib/binutils/gas/config/e-i386aout.c
+++ b/contrib/binutils/gas/config/e-i386aout.c
@@ -1,6 +1,8 @@
#include "as.h"
#include "emul.h"
+static const char *i386aout_bfd_name PARAMS ((void));
+
static const char *
i386aout_bfd_name ()
{
diff --git a/contrib/binutils/gas/config/e-i386coff.c b/contrib/binutils/gas/config/e-i386coff.c
index afed728..f6510a4 100644
--- a/contrib/binutils/gas/config/e-i386coff.c
+++ b/contrib/binutils/gas/config/e-i386coff.c
@@ -1,6 +1,8 @@
#include "as.h"
#include "emul.h"
+static const char *i386coff_bfd_name PARAMS ((void));
+
static const char *
i386coff_bfd_name ()
{
diff --git a/contrib/binutils/gas/config/e-i386elf.c b/contrib/binutils/gas/config/e-i386elf.c
index a16701e..e11fc3d 100644
--- a/contrib/binutils/gas/config/e-i386elf.c
+++ b/contrib/binutils/gas/config/e-i386elf.c
@@ -1,6 +1,8 @@
#include "as.h"
#include "emul.h"
+static const char *i386elf_bfd_name PARAMS ((void));
+
static const char *
i386elf_bfd_name ()
{
diff --git a/contrib/binutils/gas/config/obj-aout.c b/contrib/binutils/gas/config/obj-aout.c
index 9d4f24a..a394306 100644
--- a/contrib/binutils/gas/config/obj-aout.c
+++ b/contrib/binutils/gas/config/obj-aout.c
@@ -466,7 +466,7 @@ obj_crawl_symbol_chain (headers)
S_SET_SEGMENT (symbolP, SEG_TEXT);
} /* if pusing data into text */
- resolve_symbol_value (symbolP, 1);
+ resolve_symbol_value (symbolP);
/* Skip symbols which were equated to undefined or common
symbols. */
@@ -755,4 +755,4 @@ const struct format_ops aout_format_ops =
0, /* read_begin_hook */
0 /* symbol_new_hook */
};
-#endif BFD_ASSEMBLER
+#endif /* BFD_ASSEMBLER */
diff --git a/contrib/binutils/gas/config/obj-coff.c b/contrib/binutils/gas/config/obj-coff.c
index 69e5558..759389a 100644
--- a/contrib/binutils/gas/config/obj-coff.c
+++ b/contrib/binutils/gas/config/obj-coff.c
@@ -38,7 +38,29 @@
#define TC_COFF_SECTION_DEFAULT_ATTRIBUTES (SEC_LOAD | SEC_DATA)
#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;
+
+typedef struct
+ {
+ unsigned long chunk_size;
+ unsigned long element_size;
+ unsigned long size;
+ char *data;
+ unsigned long pointer;
+ }
+stack;
+
+static stack *stack_init PARAMS ((unsigned long, unsigned long));
+static char *stack_push PARAMS ((stack *, char *));
+static char *stack_pop PARAMS ((stack *));
+static void tag_init PARAMS ((void));
+static void tag_insert PARAMS ((const char *, symbolS *));
+static symbolS *tag_find PARAMS ((char *));
+static symbolS *tag_find_or_make PARAMS ((char *));
static void obj_coff_bss PARAMS ((int));
+static void obj_coff_weak PARAMS ((int));
const char *s_get_name PARAMS ((symbolS * s));
static void obj_coff_ln PARAMS ((int));
static void obj_coff_def PARAMS ((int));
@@ -54,21 +76,8 @@ 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
- {
- unsigned long chunk_size;
- unsigned long element_size;
- unsigned long size;
- char *data;
- unsigned long pointer;
- }
-stack;
static stack *
stack_init (chunk_size, element_size)
@@ -246,7 +255,11 @@ obj_coff_weak (ignore)
#ifdef BFD_ASSEMBLER
+static segT fetch_coff_debug_section PARAMS ((void));
static void SA_SET_SYM_TAGNDX PARAMS ((symbolS *, symbolS *));
+static int S_GET_DATA_TYPE PARAMS ((symbolS *));
+void c_symbol_merge PARAMS ((symbolS *, symbolS *));
+static void add_lineno PARAMS ((fragS *, addressT, int));
#define GET_FILENAME_STRING(X) \
((char*) (&((X)->sy_symbol.ost_auxent->x_file.x_n.x_offset))[1])
@@ -493,13 +506,13 @@ obj_coff_ln (appline)
}
l = get_absolute_expression ();
- if (!appline)
- {
- add_lineno (frag_now, frag_now_fix (), l);
- }
- if (appline)
+ /* If there is no lineno symbol, treat a .ln
+ directive as if it were a .appline directive. */
+ if (appline || current_lineno_sym == NULL)
new_logical_line ((char *) NULL, l - 1);
+ else
+ add_lineno (frag_now, frag_now_fix (), l);
#ifndef NO_LISTING
{
@@ -1174,18 +1187,21 @@ coff_frob_symbol (symp, punt)
if (!SF_GET_DEBUG (symp))
{
- symbolS *real;
+ symbolS * real;
+
if (!SF_GET_LOCAL (symp)
&& !SF_GET_STATICS (symp)
&& S_GET_STORAGE_CLASS (symp) != C_LABEL
&& symbol_constant_p(symp)
&& (real = symbol_find_base (S_GET_NAME (symp), DO_NOT_STRIP))
+ && S_GET_STORAGE_CLASS (real) == C_NULL
&& real != symp)
{
c_symbol_merge (symp, real);
*punt = 1;
return;
}
+
if (!S_IS_DEFINED (symp) && !SF_GET_LOCAL (symp))
{
assert (S_GET_VALUE (symp) == 0);
@@ -1199,6 +1215,7 @@ coff_frob_symbol (symp, punt)
else
S_SET_STORAGE_CLASS (symp, C_STAT);
}
+
if (SF_GET_PROCESS (symp))
{
if (S_GET_STORAGE_CLASS (symp) == C_BLOCK)
@@ -1208,6 +1225,7 @@ coff_frob_symbol (symp, punt)
else
{
symbolS *begin;
+
begin = *(symbolS **) stack_pop (block_stack);
if (begin == 0)
as_warn (_("mismatched .eb"));
@@ -1215,9 +1233,11 @@ coff_frob_symbol (symp, punt)
next_set_end = begin;
}
}
+
if (coff_last_function == 0 && SF_GET_FUNCTION (symp))
{
union internal_auxent *auxp;
+
coff_last_function = symp;
if (S_GET_NUMBER_AUXILIARY (symp) < 1)
S_SET_NUMBER_AUXILIARY (symp, 1);
@@ -1225,6 +1245,7 @@ coff_frob_symbol (symp, punt)
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)
@@ -1236,6 +1257,7 @@ coff_frob_symbol (symp, punt)
coff_last_function = 0;
}
}
+
if (S_IS_EXTERNAL (symp))
S_SET_STORAGE_CLASS (symp, C_EXT);
else if (SF_GET_LOCAL (symp))
@@ -1287,6 +1309,7 @@ coff_frob_symbol (symp, punt)
set_end = next_set_end;
}
+#ifndef OBJ_XCOFF
if (! *punt
&& S_GET_STORAGE_CLASS (symp) == C_FCN
&& strcmp (S_GET_NAME (symp), ".bf") == 0)
@@ -1295,7 +1318,7 @@ coff_frob_symbol (symp, punt)
SA_SET_SYM_ENDNDX (coff_last_bf, symp);
coff_last_bf = symp;
}
-
+#endif
if (coffsymbol (symbol_get_bfdsym (symp))->lineno)
{
int i;
@@ -1608,7 +1631,7 @@ obj_coff_init_stab_section (seg)
/* Zero it out. */
memset (p, 0, 12);
as_where (&file, (unsigned int *) NULL);
- stabstr_name = (char *) alloca (strlen (seg->name) + 4);
+ stabstr_name = (char *) xmalloc (strlen (seg->name) + 4);
strcpy (stabstr_name, seg->name);
strcat (stabstr_name, "str");
stroff = get_stab_string_offset (file, stabstr_name);
@@ -1824,7 +1847,6 @@ size_section (abfd, idx)
break;
#endif
case rs_space:
- assert (frag->fr_symbol == 0);
case rs_fill:
case rs_org:
size += frag->fr_fix;
@@ -1977,7 +1999,7 @@ do_relocs_for (abfd, h, file_cursor)
/* Turn the segment of the symbol into an offset. */
if (symbol_ptr)
{
- resolve_symbol_value (symbol_ptr, 1);
+ resolve_symbol_value (symbol_ptr);
if (! symbol_ptr->sy_resolved)
{
char *file;
@@ -2038,8 +2060,8 @@ do_relocs_for (abfd, h, file_cursor)
#endif
/* Write out the reloc table */
- bfd_write ((PTR) external_reloc_vec, 1, external_reloc_size,
- abfd);
+ bfd_bwrite ((PTR) external_reloc_vec,
+ (bfd_size_type) external_reloc_size, abfd);
free (external_reloc_vec);
/* Fill in section header info. */
@@ -2138,7 +2160,6 @@ fill_section (abfd, h, file_cursor)
break;
case rs_space:
- assert (frag->fr_symbol == 0);
case rs_fill:
case rs_align:
case rs_align_code:
@@ -2182,7 +2203,7 @@ fill_section (abfd, h, file_cursor)
{
if (s->s_scnptr != 0)
{
- bfd_write (buffer, s->s_size, 1, abfd);
+ bfd_bwrite (buffer, s->s_size, abfd);
*file_cursor += s->s_size;
}
free (buffer);
@@ -2206,7 +2227,7 @@ coff_header_append (abfd, h)
unsigned long string_size = 4;
#endif
- bfd_seek (abfd, 0, 0);
+ bfd_seek (abfd, (file_ptr) 0, 0);
#ifndef OBJ_COFF_OMIT_OPTIONAL_HEADER
H_SET_MAGIC_NUMBER (h, COFF_MAGIC);
@@ -2222,8 +2243,8 @@ coff_header_append (abfd, h)
i = bfd_coff_swap_filehdr_out (abfd, &h->filehdr, buffer);
- bfd_write (buffer, i, 1, abfd);
- bfd_write (buffero, H_GET_SIZEOF_OPTIONAL_HEADER (h), 1, abfd);
+ bfd_bwrite (buffer, (bfd_size_type) i, abfd);
+ bfd_bwrite (buffero, (bfd_size_type) H_GET_SIZEOF_OPTIONAL_HEADER (h), abfd);
for (i = SEG_E0; i < SEG_LAST; i++)
{
@@ -2248,7 +2269,7 @@ coff_header_append (abfd, h)
buffer);
if (size == 0)
as_bad (_("bfd_coff_swap_scnhdr_out failed"));
- bfd_write (buffer, size, 1, abfd);
+ bfd_bwrite (buffer, (bfd_size_type) size, abfd);
}
}
}
@@ -2958,7 +2979,7 @@ yank_symbols ()
S_SET_SEGMENT (symbolP, SEG_E0);
} /* push data into text */
- resolve_symbol_value (symbolP, 1);
+ resolve_symbol_value (symbolP);
if (S_GET_STORAGE_CLASS (symbolP) == C_NULL)
{
@@ -3375,7 +3396,7 @@ do_linenos_for (abfd, h, file_cursor)
s->scnhdr.s_lnnoptr = *file_cursor;
- bfd_write (buffer, 1, s->scnhdr.s_nlnno * LINESZ, abfd);
+ bfd_bwrite (buffer, (bfd_size_type) s->scnhdr.s_nlnno * LINESZ, abfd);
free (buffer);
*file_cursor += s->scnhdr.s_nlnno * LINESZ;
@@ -3473,6 +3494,9 @@ write_object_file ()
relax_segment (segment_info[i].frchainP->frch_root, i);
}
+ /* Relaxation has completed. Freeze all syms. */
+ finalize_syms = 1;
+
H_SET_NUMBER_OF_SECTIONS (&headers, 0);
/* Find out how big the sections are, and set the addresses. */
@@ -3595,7 +3619,8 @@ write_object_file ()
w_symbols (abfd, buffer1, symbol_rootP);
if (string_byte_count > 0)
w_strings (buffer1 + symtable_size);
- bfd_write (buffer1, 1, symtable_size + string_byte_count, abfd);
+ bfd_bwrite (buffer1, (bfd_size_type) symtable_size + string_byte_count,
+ abfd);
free (buffer1);
}
@@ -4191,7 +4216,7 @@ fixup_segment (segP, this_segment_type)
/* Make sure the symbols have been resolved; this may not have
happened if these are expression symbols. */
if (add_symbolP != NULL && ! add_symbolP->sy_resolved)
- resolve_symbol_value (add_symbolP, 1);
+ resolve_symbol_value (add_symbolP);
if (add_symbolP != NULL)
{
@@ -4221,7 +4246,7 @@ fixup_segment (segP, this_segment_type)
}
if (sub_symbolP != NULL && ! sub_symbolP->sy_resolved)
- resolve_symbol_value (sub_symbolP, 1);
+ resolve_symbol_value (sub_symbolP);
if (add_symbolP != NULL
&& add_symbolP->sy_mri_common)
@@ -4471,11 +4496,7 @@ 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
+ md_apply_fix3 (fixP, (valueT *) & add_number, this_segment_type);
if (!fixP->fx_bit_fixP && ! fixP->fx_no_overflow)
{
diff --git a/contrib/binutils/gas/config/obj-coff.h b/contrib/binutils/gas/config/obj-coff.h
index f862f77..98948be 100644
--- a/contrib/binutils/gas/config/obj-coff.h
+++ b/contrib/binutils/gas/config/obj-coff.h
@@ -121,10 +121,17 @@
#ifdef TE_PE
#define TARGET_FORMAT "pe-shl"
#else
+
+#if 0 /* FIXME: The "shl" varaible does not appear to exist. What happened to it ? */
#define TARGET_FORMAT \
(shl \
? (sh_small ? "coff-shl-small" : "coff-shl") \
: (sh_small ? "coff-sh-small" : "coff-sh"))
+#else
+#define TARGET_FORMAT \
+ (sh_small ? "coff-shl-small" : "coff-shl")
+#endif
+
#endif
#endif
diff --git a/contrib/binutils/gas/config/obj-ecoff.c b/contrib/binutils/gas/config/obj-ecoff.c
index d1eabce..4d055cb 100644
--- a/contrib/binutils/gas/config/obj-ecoff.c
+++ b/contrib/binutils/gas/config/obj-ecoff.c
@@ -106,7 +106,7 @@ ecoff_frob_file ()
const struct ecoff_debug_swap * const debug_swap
= &ecoff_backend (stdoutput)->debug_swap;
bfd_vma addr;
- asection *sec;
+ asection **sec;
HDRR *hdr;
char *buf;
char *set;
@@ -143,53 +143,39 @@ ecoff_frob_file ()
};
#define n_names ((int) (sizeof (names) / sizeof (names[0])))
+ /* Sections that match names, order to be straightened out later. */
+ asection *secs[n_names];
+ int i;
+
addr = 0;
- {
- /* Sections that match names, order to be straightened out later. */
- asection *secs[n_names];
- /* Linked list of sections with non-matching names. Random ordering. */
- asection *other_sections = 0;
- /* Pointer to next section, since we're destroying the original
- ordering. */
- asection *next;
-
- int i;
-
- for (i = 0; i < n_names; i++)
- secs[i] = 0;
- for (sec = stdoutput->sections; sec != (asection *) NULL; sec = next)
- {
- next = sec->next;
- for (i = 0; i < n_names; i++)
- if (!strcmp (sec->name, names[i]))
- {
- secs[i] = sec;
- break;
- }
- if (i == n_names)
+ for (i = 0; i < n_names; i++)
+ secs[i] = 0;
+
+ for (sec = &stdoutput->sections; *sec != (asection *) NULL; )
+ {
+ for (i = 0; i < n_names; i++)
+ if (!strcmp ((*sec)->name, names[i]))
{
- bfd_set_section_vma (stdoutput, sec, addr);
- addr += bfd_section_size (stdoutput, sec);
- sec->next = other_sections;
- other_sections = sec;
+ secs[i] = *sec;
+ bfd_section_list_remove (stdoutput, sec);
+ break;
}
- }
- for (i = 0; i < n_names; i++)
- if (secs[i])
+ if (i == n_names)
{
- sec = secs[i];
- bfd_set_section_vma (stdoutput, sec, addr);
- addr += bfd_section_size (stdoutput, sec);
+ bfd_set_section_vma (stdoutput, *sec, addr);
+ addr += bfd_section_size (stdoutput, *sec);
+ sec = &(*sec)->next;
}
- for (i = n_names - 1; i >= 0; i--)
- if (secs[i])
- {
- sec = secs[i];
- sec->next = other_sections;
- other_sections = sec;
- }
- stdoutput->sections = other_sections;
- }
+ }
+ for (i = 0; i < n_names; i++)
+ if (secs[i])
+ {
+ bfd_set_section_vma (stdoutput, secs[i], addr);
+ addr += bfd_section_size (stdoutput, secs[i]);
+ }
+ for (i = n_names - 1; i >= 0; i--)
+ if (secs[i])
+ bfd_section_list_insert (stdoutput, &stdoutput->sections, secs[i]);
/* Build the ECOFF debugging information. */
assert (ecoff_data (stdoutput) != 0);
diff --git a/contrib/binutils/gas/config/obj-elf.c b/contrib/binutils/gas/config/obj-elf.c
index 162f02f..6ec0882 100644
--- a/contrib/binutils/gas/config/obj-elf.c
+++ b/contrib/binutils/gas/config/obj-elf.c
@@ -1,5 +1,5 @@
/* ELF object file format
- Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+ Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -21,6 +21,7 @@
#define OBJ_HEADER "obj-elf.h"
#include "as.h"
+#include "safe-ctype.h"
#include "subsegs.h"
#include "obstack.h"
@@ -55,9 +56,9 @@ static void elf_s_set_size PARAMS ((symbolS *, bfd_vma));
static bfd_vma elf_s_get_align PARAMS ((symbolS *));
static void elf_s_set_align PARAMS ((symbolS *, bfd_vma));
static void elf_s_set_other PARAMS ((symbolS *, int));
-static void elf_copy_symbol_attributes PARAMS ((symbolS *, symbolS *));
static int elf_sec_sym_ok_for_reloc PARAMS ((asection *));
static void adjust_stab_sections PARAMS ((bfd *, asection *, PTR));
+static void build_group_lists PARAMS ((bfd *, asection *, PTR));
static int elf_separate_stab_sections PARAMS ((void));
static void elf_init_stab_section PARAMS ((segT));
@@ -74,6 +75,12 @@ 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_visibility PARAMS ((int));
+static void obj_elf_change_section
+ PARAMS ((const char *, int, int, int, const char *, int));
+static int obj_elf_parse_section_letters PARAMS ((char *, size_t));
+static int obj_elf_section_word PARAMS ((char *, size_t));
+static char *obj_elf_section_name PARAMS ((void));
+static int obj_elf_section_type PARAMS ((char *, size_t));
static void obj_elf_symver PARAMS ((int));
static void obj_elf_subsection PARAMS ((int));
static void obj_elf_popsection PARAMS ((int));
@@ -242,13 +249,6 @@ elf_s_set_other (sym, other)
S_SET_OTHER (sym, other);
}
-static void
-elf_copy_symbol_attributes (dest, src)
- symbolS *dest, *src;
-{
- OBJ_COPY_SYMBOL_ATTRIBUTES (dest, src);
-}
-
static int
elf_sec_sym_ok_for_reloc (sec)
asection *sec;
@@ -305,7 +305,7 @@ obj_elf_common (is_common)
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;
}
@@ -322,7 +322,7 @@ obj_elf_common (is_common)
*p = c;
if (S_IS_DEFINED (symbolP) && ! S_IS_COMMON (symbolP))
{
- as_bad (_("Ignoring attempt to re-define symbol"));
+ as_bad (_("symbol `%s' is already defined"), S_GET_NAME (symbolP));
ignore_rest_of_line ();
return;
}
@@ -330,7 +330,7 @@ obj_elf_common (is_common)
{
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);
}
}
@@ -353,7 +353,7 @@ obj_elf_common (is_common)
if (temp < 0)
{
temp = 0;
- as_warn (_("Common alignment negative; 0 assumed"));
+ as_warn (_("common alignment negative; 0 assumed"));
}
}
if (symbol_get_obj (symbolP)->local)
@@ -372,7 +372,7 @@ obj_elf_common (is_common)
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;
}
@@ -619,10 +619,14 @@ static struct special_section const special_sections[] =
{ NULL, 0, 0 }
};
-void
-obj_elf_change_section (name, type, attr, push)
- char *name;
- int type, attr, push;
+static void
+obj_elf_change_section (name, type, attr, entsize, group_name, push)
+ const char *name;
+ int type;
+ int attr;
+ int entsize;
+ const char *group_name;
+ int push;
{
asection *old_sec;
segT sec;
@@ -661,11 +665,11 @@ obj_elf_change_section (name, type, attr, push)
{
if (old_sec == NULL)
{
- as_warn (_("Setting incorrect section type for %s"), name);
+ as_warn (_("setting incorrect section type for %s"), name);
}
else
{
- as_warn (_("Ignoring incorrect section type for %s"), name);
+ as_warn (_("ignoring incorrect section type for %s"), name);
type = special_sections[i].type;
}
}
@@ -678,7 +682,7 @@ obj_elf_change_section (name, type, attr, push)
file. */
if (strcmp (name, ".note") != 0
|| attr != SHF_ALLOC)
- as_warn (_("Setting incorrect section attributes for %s"),
+ as_warn (_("setting incorrect section attributes for %s"),
name);
}
attr |= special_sections[i].attributes;
@@ -690,7 +694,9 @@ obj_elf_change_section (name, type, attr, push)
| ((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));
+ | ((attr & SHF_EXECINSTR) ? SEC_CODE : 0)
+ | ((attr & SHF_MERGE) ? SEC_MERGE : 0)
+ | ((attr & SHF_STRINGS) ? SEC_STRINGS : 0));
#ifdef md_elf_section_flags
flags = md_elf_section_flags (flags, attr, type);
#endif
@@ -704,6 +710,9 @@ obj_elf_change_section (name, type, attr, push)
seg_info (sec)->bss = 1;
bfd_set_section_flags (stdoutput, sec, flags);
+ if (flags & SEC_MERGE)
+ sec->entsize = entsize;
+ elf_group_name (sec) = group_name;
/* Add a symbol for this section to the symbol table. */
secsym = symbol_find (name);
@@ -719,8 +728,13 @@ obj_elf_change_section (name, type, attr, push)
saw the first time. */
if ((old_sec->flags ^ flags)
& (SEC_ALLOC | SEC_LOAD | SEC_READONLY | SEC_CODE
- | SEC_EXCLUDE | SEC_SORT_ENTRIES))
- as_warn (_("Ignoring changed section attributes for %s"), name);
+ | SEC_EXCLUDE | SEC_SORT_ENTRIES | SEC_MERGE | SEC_STRINGS))
+ as_warn (_("ignoring changed section attributes for %s"), name);
+ else if ((flags & SEC_MERGE) && old_sec->entsize != (unsigned) entsize)
+ as_warn (_("ignoring changed section entity size for %s"), name);
+ else if ((attr & SHF_GROUP) != 0
+ && strcmp (elf_group_name (old_sec), group_name) != 0)
+ as_warn (_("ignoring new section group for %s"), name);
}
#ifdef md_elf_section_change_hook
@@ -728,7 +742,7 @@ obj_elf_change_section (name, type, attr, push)
#endif
}
-int
+static int
obj_elf_parse_section_letters (str, len)
char *str;
size_t len;
@@ -748,9 +762,30 @@ obj_elf_parse_section_letters (str, len)
case 'x':
attr |= SHF_EXECINSTR;
break;
+ case 'M':
+ attr |= SHF_MERGE;
+ break;
+ case 'S':
+ attr |= SHF_STRINGS;
+ break;
+ case 'G':
+ attr |= SHF_GROUP;
+ break;
+ /* Compatibility. */
+ case 'm':
+ if (*(str - 1) == 'a')
+ {
+ attr |= SHF_MERGE;
+ if (len > 1 && str[1] == 's')
+ {
+ attr |= SHF_STRINGS;
+ str++, len--;
+ }
+ break;
+ }
default:
{
- char *bad_msg = _("Unrecognized .section attribute: want a,w,x");
+ char *bad_msg = _("unrecognized .section attribute: want a,w,x,M,S,G");
#ifdef md_elf_section_letter
int md_attr = md_elf_section_letter (*str, &bad_msg);
if (md_attr >= 0)
@@ -770,7 +805,7 @@ obj_elf_parse_section_letters (str, len)
return attr;
}
-int
+static int
obj_elf_section_word (str, len)
char *str;
size_t len;
@@ -790,11 +825,11 @@ obj_elf_section_word (str, len)
}
#endif
- as_warn (_("Unrecognized section attribute"));
+ as_warn (_("unrecognized section attribute"));
return 0;
}
-int
+static int
obj_elf_section_type (str, len)
char *str;
size_t len;
@@ -812,16 +847,57 @@ obj_elf_section_type (str, len)
}
#endif
- as_warn (_("Unrecognized section type"));
+ as_warn (_("unrecognized section type"));
return 0;
}
+/* Get name of section. */
+static char *
+obj_elf_section_name ()
+{
+ char *name;
+
+ SKIP_WHITESPACE ();
+ if (*input_line_pointer == '"')
+ {
+ int dummy;
+
+ name = demand_copy_C_string (&dummy);
+ if (name == NULL)
+ {
+ ignore_rest_of_line ();
+ return NULL;
+ }
+ }
+ else
+ {
+ char *end = input_line_pointer;
+
+ while (0 == strchr ("\n\t,; ", *end))
+ end++;
+ if (end == input_line_pointer)
+ {
+ as_warn (_("missing name"));
+ ignore_rest_of_line ();
+ return NULL;
+ }
+
+ 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 ();
+ return name;
+}
+
void
obj_elf_section (push)
int push;
{
- char *name, *beg, *end;
+ char *name, *group_name, *beg;
int type, attr, dummy;
+ int entsize;
#ifndef TC_I370
if (flag_mri)
@@ -845,38 +921,13 @@ obj_elf_section (push)
}
#endif /* ! defined (TC_I370) */
- /* Get name of section. */
- SKIP_WHITESPACE ();
- if (*input_line_pointer == '"')
- {
- name = demand_copy_C_string (&dummy);
- if (name == NULL)
- {
- ignore_rest_of_line ();
- return;
- }
- }
- else
- {
- end = input_line_pointer;
- while (0 == strchr ("\n\t,; ", *end))
- end++;
- if (end == input_line_pointer)
- {
- as_warn (_("Missing section name"));
- ignore_rest_of_line ();
- 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 ();
-
+ name = obj_elf_section_name ();
+ if (name == NULL)
+ return;
type = SHT_NULL;
attr = 0;
+ group_name = NULL;
+ entsize = 0;
if (*input_line_pointer == ',')
{
@@ -898,6 +949,8 @@ obj_elf_section (push)
if (*input_line_pointer == ',')
{
char c;
+ char *save = input_line_pointer;
+
++input_line_pointer;
SKIP_WHITESPACE ();
c = *input_line_pointer;
@@ -918,6 +971,41 @@ obj_elf_section (push)
*input_line_pointer = c;
type = obj_elf_section_type (beg, input_line_pointer - beg);
}
+ else
+ input_line_pointer = save;
+ }
+
+ SKIP_WHITESPACE ();
+ if ((attr & SHF_MERGE) != 0 && *input_line_pointer == ',')
+ {
+ ++input_line_pointer;
+ SKIP_WHITESPACE ();
+ entsize = get_absolute_expression ();
+ SKIP_WHITESPACE ();
+ if (entsize < 0)
+ {
+ as_warn (_("invalid merge entity size"));
+ attr &= ~SHF_MERGE;
+ entsize = 0;
+ }
+ }
+ else if ((attr & SHF_MERGE) != 0)
+ {
+ as_warn (_("entity size for SHF_MERGE not specified"));
+ attr &= ~SHF_MERGE;
+ }
+
+ if ((attr & SHF_GROUP) != 0 && *input_line_pointer == ',')
+ {
+ ++input_line_pointer;
+ group_name = obj_elf_section_name ();
+ if (group_name == NULL)
+ attr &= ~SHF_GROUP;
+ }
+ else if ((attr & SHF_GROUP) != 0)
+ {
+ as_warn (_("group name for SHF_GROUP not specified"));
+ attr &= ~SHF_GROUP;
}
}
else
@@ -929,7 +1017,7 @@ obj_elf_section (push)
SKIP_WHITESPACE ();
if (*input_line_pointer != '#')
{
- as_warn (_("Bad .section directive - character following name is not '#'"));
+ as_warn (_("character following name is not '#'"));
ignore_rest_of_line ();
return;
}
@@ -948,7 +1036,7 @@ obj_elf_section (push)
demand_empty_rest_of_line ();
- obj_elf_change_section (name, type, attr, push);
+ obj_elf_change_section (name, type, attr, entsize, group_name, push);
}
/* Change to the .data section. */
@@ -1030,7 +1118,7 @@ obj_elf_previous (ignore)
if (previous_section == 0)
{
- as_bad (_(".previous without corresponding .section; ignored"));
+ as_warn (_(".previous without corresponding .section; ignored"));
return;
}
@@ -1057,7 +1145,7 @@ obj_elf_popsection (xxx)
if (top == NULL)
{
- as_bad (_(".popsection without corresponding .pushsection; ignored"));
+ as_warn (_(".popsection without corresponding .pushsection; ignored"));
return;
}
@@ -1098,6 +1186,7 @@ obj_elf_symver (ignore)
{
char *name;
char c;
+ char old_lexat;
symbolS *sym;
name = input_line_pointer;
@@ -1117,13 +1206,12 @@ obj_elf_symver (ignore)
++input_line_pointer;
name = input_line_pointer;
- while (1)
- {
- c = get_symbol_end ();
- if (c != ELF_VER_CHR)
- break;
- *input_line_pointer++ = c;
- }
+
+ /* Temporarily include '@' in symbol names. */
+ old_lexat = lex_type[(unsigned char) '@'];
+ lex_type[(unsigned char) '@'] |= LEX_NAME;
+ c = get_symbol_end ();
+ lex_type[(unsigned char) '@'] = old_lexat;
if (symbol_get_obj (sym)->versioned_name == NULL)
{
@@ -1206,7 +1294,7 @@ obj_elf_vtable_inherit (ignore)
if (input_line_pointer[0] == '0'
&& (input_line_pointer[1] == '\0'
- || isspace ((unsigned char) input_line_pointer[1])))
+ || ISSPACE (input_line_pointer[1])))
{
psym = section_symbol (absolute_section);
++input_line_pointer;
@@ -1296,20 +1384,46 @@ elf_obj_symbol_new_hook (symbolP)
#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. */
+
+void
+elf_copy_symbol_attributes (dest, src)
+ symbolS *dest, *src;
+{
+ struct elf_obj_sy *srcelf = symbol_get_obj (src);
+ struct elf_obj_sy *destelf = symbol_get_obj (dest);
+ if (srcelf->size)
+ {
+ if (destelf->size == NULL)
+ destelf->size =
+ (expressionS *) xmalloc (sizeof (expressionS));
+ *destelf->size = *srcelf->size;
+ }
+ else
+ {
+ 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));
+}
+
void
obj_elf_version (ignore)
int ignore ATTRIBUTE_UNUSED;
{
char *name;
unsigned int c;
- char ch;
char *p;
asection *seg = now_seg;
subsegT subseg = now_subseg;
Elf_Internal_Note i_note;
Elf_External_Note e_note;
asection *note_secp = (asection *) NULL;
- int i, len;
+ int len;
SKIP_WHITESPACE ();
if (*input_line_pointer == '\"')
@@ -1339,26 +1453,21 @@ obj_elf_version (ignore)
i_note.descsz = 0; /* no description */
i_note.type = NT_VERSION;
p = frag_more (sizeof (e_note.namesz));
- md_number_to_chars (p, (valueT) i_note.namesz, 4);
+ md_number_to_chars (p, (valueT) i_note.namesz, sizeof (e_note.namesz));
p = frag_more (sizeof (e_note.descsz));
- md_number_to_chars (p, (valueT) i_note.descsz, 4);
+ md_number_to_chars (p, (valueT) i_note.descsz, sizeof (e_note.descsz));
p = frag_more (sizeof (e_note.type));
- md_number_to_chars (p, (valueT) i_note.type, 4);
+ md_number_to_chars (p, (valueT) i_note.type, sizeof (e_note.type));
+ p = frag_more (len + 1);
+ strcpy (p, name);
- for (i = 0; i < len; i++)
- {
- ch = *(name + i);
- {
- FRAG_APPEND_1_CHAR (ch);
- }
- }
frag_align (2, 0, 0);
subseg_set (seg, subseg);
}
else
{
- as_bad (_("Expected quoted string"));
+ as_bad (_("expected quoted string"));
}
demand_empty_rest_of_line ();
}
@@ -1396,7 +1505,14 @@ obj_elf_size (ignore)
sym = symbol_find_or_make (name);
*p = c;
if (exp.X_op == O_constant)
- S_SET_SIZE (sym, exp.X_add_number);
+ {
+ S_SET_SIZE (sym, exp.X_add_number);
+ if (symbol_get_obj (sym)->size)
+ {
+ xfree (symbol_get_obj (sym)->size);
+ symbol_get_obj (sym)->size = NULL;
+ }
+ }
else
{
symbol_get_obj (sym)->size =
@@ -1464,7 +1580,7 @@ obj_elf_type (ignore)
;
#endif
else
- as_bad (_("ignoring unrecognized symbol type \"%s\""), typename);
+ as_bad (_("unrecognized symbol type \"%s\""), typename);
*input_line_pointer = c;
@@ -1525,7 +1641,7 @@ obj_elf_init_stab_section (seg)
/* Zero it out. */
memset (p, 0, 12);
as_where (&file, (unsigned int *) NULL);
- stabstr_name = (char *) alloca (strlen (segment_name (seg)) + 4);
+ stabstr_name = (char *) xmalloc (strlen (segment_name (seg)) + 4);
strcpy (stabstr_name, segment_name (seg));
strcat (stabstr_name, "str");
stroff = get_stab_string_offset (file, stabstr_name);
@@ -1736,7 +1852,7 @@ elf_frob_symbol (symp, puntp)
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));
}
@@ -1769,11 +1885,101 @@ elf_frob_symbol (symp, puntp)
#endif
}
+struct group_list
+{
+ asection **head; /* Section lists. */
+ unsigned int *elt_count; /* Number of sections in each list. */
+ unsigned int num_group; /* Number of lists. */
+};
+
+/* Called via bfd_map_over_sections. If SEC is a member of a group,
+ add it to a list of sections belonging to the group. INF is a
+ pointer to a struct group_list, which is where we store the head of
+ each list. */
+
+static void
+build_group_lists (abfd, sec, inf)
+ bfd *abfd ATTRIBUTE_UNUSED;
+ asection *sec;
+ PTR inf;
+{
+ struct group_list *list = (struct group_list *) inf;
+ const char *group_name = elf_group_name (sec);
+ unsigned int i;
+
+ if (group_name == NULL)
+ return;
+
+ /* If this group already has a list, add the section to the head of
+ the list. */
+ for (i = 0; i < list->num_group; i++)
+ {
+ if (strcmp (group_name, elf_group_name (list->head[i])) == 0)
+ {
+ elf_next_in_group (sec) = list->head[i];
+ list->head[i] = sec;
+ list->elt_count[i] += 1;
+ return;
+ }
+ }
+
+ /* New group. Make the arrays bigger in chunks to minimize calls to
+ realloc. */
+ i = list->num_group;
+ if ((i & 127) == 0)
+ {
+ unsigned int newsize = i + 128;
+ list->head = xrealloc (list->head, newsize * sizeof (*list->head));
+ list->elt_count = xrealloc (list->elt_count,
+ newsize * sizeof (*list->elt_count));
+ }
+ list->head[i] = sec;
+ list->elt_count[i] = 1;
+ list->num_group += 1;
+}
+
void
elf_frob_file ()
{
+ struct group_list list;
+ unsigned int i;
+
bfd_map_over_sections (stdoutput, adjust_stab_sections, (PTR) 0);
+ /* Go find section groups. */
+ list.num_group = 0;
+ list.head = NULL;
+ list.elt_count = NULL;
+ bfd_map_over_sections (stdoutput, build_group_lists, (PTR) &list);
+
+ /* Make the SHT_GROUP sections that describe each section group. We
+ can't set up the section contents here yet, because elf section
+ indices have yet to be calculated. elf.c:set_group_contents does
+ the rest of the work. */
+ for (i = 0; i < list.num_group; i++)
+ {
+ const char *group_name = elf_group_name (list.head[i]);
+ asection *s;
+ flagword flags;
+
+ s = subseg_force_new (group_name, 0);
+ flags = SEC_READONLY | SEC_HAS_CONTENTS | SEC_IN_MEMORY | SEC_GROUP;
+ if (s == NULL
+ || !bfd_set_section_flags (stdoutput, s, flags)
+ || !bfd_set_section_alignment (stdoutput, s, 2))
+ {
+ as_fatal (_("can't create group: %s"),
+ bfd_errmsg (bfd_get_error ()));
+ }
+
+ /* Pass a pointer to the first section in this group. */
+ elf_next_in_group (s) = list.head[i];
+
+ s->_raw_size = 4 * (list.elt_count[i] + 1);
+ s->contents = frag_more (s->_raw_size);
+ frag_now->fr_fix = frag_now_fix_octets ();
+ }
+
#ifdef elf_tc_final_processing
elf_tc_final_processing ();
#endif
@@ -1859,7 +2065,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");
@@ -1879,7 +2085,7 @@ elf_frob_file_after_relocs ()
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);
@@ -1887,7 +2093,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 */
diff --git a/contrib/binutils/gas/config/obj-elf.h b/contrib/binutils/gas/config/obj-elf.h
index 8e3ce7d..33c5f43 100644
--- a/contrib/binutils/gas/config/obj-elf.h
+++ b/contrib/binutils/gas/config/obj-elf.h
@@ -182,32 +182,10 @@ void elf_obj_symbol_new_hook PARAMS ((symbolS *));
#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. */
+void elf_copy_symbol_attributes PARAMS ((symbolS *, symbolS *));
#ifndef OBJ_COPY_SYMBOL_ATTRIBUTES
-#define OBJ_COPY_SYMBOL_ATTRIBUTES(DEST,SRC) \
-do \
- { \
- struct elf_obj_sy *srcelf = symbol_get_obj (SRC); \
- struct elf_obj_sy *destelf = symbol_get_obj (DEST); \
- if (srcelf->size) \
- { \
- if (destelf->size == NULL) \
- destelf->size = \
- (expressionS *) xmalloc (sizeof (expressionS)); \
- *destelf->size = *srcelf->size; \
- } \
- else \
- { \
- 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)
+#define OBJ_COPY_SYMBOL_ATTRIBUTES(DEST, SRC) \
+ (elf_copy_symbol_attributes (DEST, SRC))
#endif
#ifndef SEPARATE_STAB_SECTIONS
diff --git a/contrib/binutils/gas/config/obj-ieee.c b/contrib/binutils/gas/config/obj-ieee.c
index 521a0d7..505bb35 100644
--- a/contrib/binutils/gas/config/obj-ieee.c
+++ b/contrib/binutils/gas/config/obj-ieee.c
@@ -292,7 +292,7 @@ do_symbols (abfd)
{
ptr->sy_symbol.sy.section =
(asection *) (segment_info[ptr->sy_symbol.seg].user_stuff);
- S_SET_VALUE (ptr, S_GET_VALUE (ptr) + ptr->sy_frag->fr_address);
+ S_SET_VALUE (ptr, S_GET_VALUE (ptr));
if (ptr->sy_symbol.sy.flags == 0)
ptr->sy_symbol.sy.flags = BSF_LOCAL;
}
@@ -558,6 +558,9 @@ write_object_file ()
for (i = SEG_E0; i < SEG_UNKNOWN; i++)
relax_segment (segment_info[i].frag_root, i);
+ /* Relaxation has completed. Freeze all syms. */
+ finalize_syms = 1;
+
/* Now the addresses of the frags are correct within the segment. */
bfd_as_write_hook ();
diff --git a/contrib/binutils/gas/config/tc-alpha.c b/contrib/binutils/gas/config/tc-alpha.c
index ba42aaa..b1a3471 100644
--- a/contrib/binutils/gas/config/tc-alpha.c
+++ b/contrib/binutils/gas/config/tc-alpha.c
@@ -62,7 +62,7 @@
#include "dwarf2dbg.h"
#endif
-#include <ctype.h>
+#include "safe-ctype.h"
/* Local types */
@@ -81,7 +81,7 @@ struct alpha_insn {
unsigned insn;
int nfixups;
struct alpha_fixup fixups[MAX_INSN_FIXUPS];
- unsigned sequence[MAX_INSN_FIXUPS];
+ long sequence;
};
enum alpha_macro_arg {
@@ -92,10 +92,6 @@ enum alpha_macro_arg {
MACRO_CPIR,
MACRO_FPR,
MACRO_EXP,
- MACRO_LITERAL,
- MACRO_BASE,
- MACRO_BYTOFF,
- MACRO_JSR
};
struct alpha_macro {
@@ -110,19 +106,29 @@ struct alpha_macro {
#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. */
+ of O_literal .. O_gpre16. */
#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_lituse_addr O_md4 /* !lituse_addr relocation */
+#define O_lituse_base O_md5 /* !lituse_base relocation */
+#define O_lituse_bytoff O_md6 /* !lituse_bytoff relocation */
+#define O_lituse_jsr O_md7 /* !lituse_jsr relocation */
+#define O_gpdisp O_md8 /* !gpdisp relocation */
+#define O_gprelhigh O_md9 /* !gprelhigh relocation */
+#define O_gprellow O_md10 /* !gprellow relocation */
+#define O_gprel O_md11 /* !gprel relocation */
+
+#define DUMMY_RELOC_LITUSE_ADDR (BFD_RELOC_UNUSED + 1)
+#define DUMMY_RELOC_LITUSE_BASE (BFD_RELOC_UNUSED + 2)
+#define DUMMY_RELOC_LITUSE_BYTOFF (BFD_RELOC_UNUSED + 3)
+#define DUMMY_RELOC_LITUSE_JSR (BFD_RELOC_UNUSED + 4)
+
+#define LITUSE_ADDR 0
+#define LITUSE_BASE 1
+#define LITUSE_BYTOFF 2
+#define LITUSE_JSR 3
+
+#define USER_RELOC_P(R) ((R) >= O_literal && (R) <= O_gprel)
/* Macros for extracting the type and number of encoded register tokens */
@@ -188,6 +194,9 @@ struct alpha_macro {
/* Prototypes for all local functions */
+static struct alpha_reloc_tag *get_alpha_reloc_tag PARAMS ((long));
+static void alpha_adjust_symtab_relocs PARAMS ((bfd *, asection *, PTR));
+
static int tokenize_arguments PARAMS ((char *, expressionS *, int));
static const struct alpha_opcode *find_opcode_match
PARAMS ((const struct alpha_opcode *, const expressionS *, int *, int *));
@@ -197,16 +206,15 @@ static unsigned insert_operand
PARAMS ((unsigned, const struct alpha_operand *, offsetT, char *, unsigned));
static void assemble_insn
PARAMS ((const struct alpha_opcode *, const expressionS *, int,
- struct alpha_insn *));
+ struct alpha_insn *, bfd_reloc_code_real_type));
static void emit_insn PARAMS ((struct alpha_insn *));
static void assemble_tokens_to_insn
PARAMS ((const char *, const expressionS *, int, struct alpha_insn *));
static void assemble_tokens
PARAMS ((const char *, const expressionS *, int, int));
-static int load_expression
- PARAMS ((int, const expressionS *, int *, expressionS *,
- const expressionS *));
+static long load_expression
+ PARAMS ((int, const expressionS *, int *, expressionS *));
static void emit_ldgp PARAMS ((const expressionS *, int, const PTR));
static void emit_division PARAMS ((const expressionS *, int, const PTR));
@@ -257,16 +265,14 @@ static void s_alpha_base PARAMS ((int));
static void s_alpha_align PARAMS ((int));
static void s_alpha_stringer PARAMS ((int));
static void s_alpha_space PARAMS ((int));
+static void s_alpha_ucons PARAMS ((int));
+static void s_alpha_arch PARAMS ((int));
static void create_literal_section PARAMS ((const char *, segT *, symbolS **));
#ifndef OBJ_ELF
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. */
@@ -469,103 +475,58 @@ static int alpha_flag_show_after_trunc = 0; /* -H */
that op-O_literal indexes into it. */
#define ALPHA_RELOC_TABLE(op) \
-&alpha_reloc_op[ ((!USER_RELOC_P (op)) \
+(&alpha_reloc_op[ ((!USER_RELOC_P (op)) \
? (abort (), 0) \
- : (int) (op) - (int) O_literal) ]
+ : (int) (op) - (int) O_literal) ])
-#define LITUSE_BASE 1
-#define LITUSE_BYTOFF 2
-#define LITUSE_JSR 3
+#define DEF(NAME, RELOC, REQ, ALLOW) \
+ { #NAME, sizeof(#NAME)-1, O_##NAME, RELOC, REQ, ALLOW}
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 */
+ bfd_reloc_code_real_type reloc; /* relocation before frob */
+ unsigned int require_seq : 1; /* require a sequence number */
+ unsigned int allow_seq : 1; /* allow a sequence number */
} 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 */
- },
+ DEF(literal, BFD_RELOC_ALPHA_ELF_LITERAL, 0, 1),
+ DEF(lituse_addr, DUMMY_RELOC_LITUSE_ADDR, 1, 1),
+ DEF(lituse_base, DUMMY_RELOC_LITUSE_BASE, 1, 1),
+ DEF(lituse_bytoff, DUMMY_RELOC_LITUSE_BYTOFF, 1, 1),
+ DEF(lituse_jsr, DUMMY_RELOC_LITUSE_JSR, 1, 1),
+ DEF(gpdisp, BFD_RELOC_ALPHA_GPDISP, 1, 1),
+ DEF(gprelhigh, BFD_RELOC_ALPHA_GPREL_HI16, 0, 0),
+ DEF(gprellow, BFD_RELOC_ALPHA_GPREL_LO16, 0, 0),
+ DEF(gprel, BFD_RELOC_GPREL16, 0, 0)
};
+#undef DEF
+
static const int alpha_num_reloc_op
= sizeof (alpha_reloc_op) / sizeof (*alpha_reloc_op);
+#endif /* RELOC_OP_P */
/* 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
+struct alpha_reloc_tag
{
- fixS *lituse; /* head of linked list of !literals */
+ fixS *slaves; /* 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 */
+ long sequence; /* sequence # */
+ unsigned n_master; /* # of literals */
+ unsigned n_slaves; /* # of lituses */
+ char multi_section_p; /* True if more than one section was used */
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
+
+/* Sequence numbers for internal use by macros. */
+static long next_sequence_num = -1;
/* A table of CPU names and opcode sets. */
@@ -606,48 +567,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_OPIR, MACRO_LITERAL, MACRO_BASE, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
{ "ldah", emit_ldah, NULL,
{ MACRO_IR, MACRO_EXP, MACRO_EOA } },
{ "ldl", emit_ir_load, "ldl",
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
{ "ldl_l", emit_ir_load, "ldl_l",
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
{ "ldq", emit_ir_load, "ldq",
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_LITERAL, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
{ "ldq_l", emit_ir_load, "ldq_l",
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
{ "ldq_u", emit_ir_load, "ldq_u",
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
{ "ldf", emit_loadstore, "ldf",
- { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
+ { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
{ "ldg", emit_loadstore, "ldg",
- { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
+ { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
{ "lds", emit_loadstore, "lds",
- { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
+ { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
{ "ldt", emit_loadstore, "ldt",
- { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
+ { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
{ "ldb", emit_ldX, (PTR) 0,
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
{ "ldbu", emit_ldXu, (PTR) 0,
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
{ "ldw", emit_ldX, (PTR) 1,
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
{ "ldwu", emit_ldXu, (PTR) 1,
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
{ "uldw", emit_uldX, (PTR) 1,
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
{ "uldwu", emit_uldXu, (PTR) 1,
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
{ "uldl", emit_uldX, (PTR) 2,
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
{ "uldlu", emit_uldXu, (PTR) 2,
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
{ "uldq", emit_uldXu, (PTR) 3,
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
{ "ldgp", emit_ldgp, NULL,
{ MACRO_IR, MACRO_EXP, MACRO_PIR, MACRO_EOA } },
@@ -672,34 +633,34 @@ static const struct alpha_macro alpha_macros[] = {
#endif
{ "stl", emit_loadstore, "stl",
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
{ "stl_c", emit_loadstore, "stl_c",
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
{ "stq", emit_loadstore, "stq",
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
{ "stq_c", emit_loadstore, "stq_c",
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
{ "stq_u", emit_loadstore, "stq_u",
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
{ "stf", emit_loadstore, "stf",
- { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
+ { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
{ "stg", emit_loadstore, "stg",
- { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
+ { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
{ "sts", emit_loadstore, "sts",
- { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
+ { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
{ "stt", emit_loadstore, "stt",
- { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
+ { MACRO_FPR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
{ "stb", emit_stX, (PTR) 0,
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
{ "stw", emit_stX, (PTR) 1,
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
{ "ustw", emit_ustX, (PTR) 1,
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
{ "ustl", emit_ustX, (PTR) 2,
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
{ "ustq", emit_ustX, (PTR) 3,
- { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_BASE, MACRO_EOA } },
+ { MACRO_IR, MACRO_EXP, MACRO_OPIR, MACRO_EOA } },
/* Arithmetic macros */
#if 0
@@ -762,15 +723,15 @@ static const struct alpha_macro alpha_macros[] = {
MACRO_IR, MACRO_EXP, MACRO_EOA */ } },
{ "jsr", emit_jsrjmp, "jsr",
- { 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 } },
+ { MACRO_PIR, MACRO_EXP, MACRO_EOA,
+ MACRO_PIR, MACRO_EOA,
+ MACRO_IR, MACRO_EXP, MACRO_EOA,
+ MACRO_EXP, MACRO_EOA } },
{ "jmp", emit_jsrjmp, "jmp",
- { 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 } },
+ { MACRO_PIR, MACRO_EXP, MACRO_EOA,
+ MACRO_PIR, MACRO_EOA,
+ MACRO_IR, MACRO_EXP, MACRO_EOA,
+ MACRO_EXP, MACRO_EOA } },
{ "ret", emit_retjcr, "ret",
{ MACRO_IR, MACRO_EXP, MACRO_EOA,
MACRO_IR, MACRO_EOA,
@@ -825,7 +786,8 @@ 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
@@ -912,12 +874,10 @@ md_begin ()
}
#endif /* OBJ_ELF */
- subseg_set (text_section, 0);
-
-#ifdef RELOC_OP_P
/* Create literal lookup hash table. */
alpha_literal_hash = hash_new ();
-#endif
+
+ subseg_set (text_section, 0);
}
/* The public interface to the instruction assembler. */
@@ -1158,13 +1118,14 @@ md_pcrel_from (fixP)
the distance to the "lda" instruction for setting the addend to
GPDISP. */
-int
-md_apply_fix (fixP, valueP)
+void
+md_apply_fix3 (fixP, valP, seg)
fixS *fixP;
- valueT *valueP;
+ valueT * valP;
+ segT seg;
{
char * const fixpos = fixP->fx_frag->fr_literal + fixP->fx_where;
- valueT value = *valueP;
+ valueT value = * valP;
unsigned image, size;
switch (fixP->fx_r_type)
@@ -1176,10 +1137,13 @@ md_apply_fix (fixP, valueP)
case BFD_RELOC_ALPHA_GPDISP_HI16:
{
fixS *next = fixP->fx_next;
- assert (next->fx_r_type == BFD_RELOC_ALPHA_GPDISP_LO16);
- fixP->fx_offset = (next->fx_frag->fr_address + next->fx_where
- - fixP->fx_frag->fr_address - fixP->fx_where);
+ /* With user-specified !gpdisp relocations, we can be missing
+ the matching LO16 reloc. We will have already issued an
+ error message. */
+ if (next)
+ fixP->fx_offset = (next->fx_frag->fr_address + next->fx_where
+ - fixP->fx_frag->fr_address - fixP->fx_where);
value = (value - sign_extend_16 (value)) >> 16;
}
@@ -1196,7 +1160,7 @@ md_apply_fix (fixP, valueP)
#endif
do_reloc_gp:
- fixP->fx_addsy = section_symbol (now_seg);
+ fixP->fx_addsy = section_symbol (seg);
md_number_to_chars (fixpos, value, 2);
break;
@@ -1220,7 +1184,7 @@ md_apply_fix (fixP, valueP)
md_number_to_chars (fixpos, value, size);
goto done;
}
- return 1;
+ return;
#ifdef OBJ_ECOFF
case BFD_RELOC_GPREL32:
@@ -1229,11 +1193,13 @@ md_apply_fix (fixP, valueP)
/* FIXME: inherited this obliviousness of `value' -- why? */
md_number_to_chars (fixpos, -alpha_gp_value, 4);
break;
-#endif
-#ifdef OBJ_ELF
+#else
case BFD_RELOC_GPREL32:
- return 1;
#endif
+ case BFD_RELOC_GPREL16:
+ case BFD_RELOC_ALPHA_GPREL_HI16:
+ case BFD_RELOC_ALPHA_GPREL_LO16:
+ return;
case BFD_RELOC_23_PCREL_S2:
if (fixP->fx_pcrel == 0 && fixP->fx_addsy == 0)
@@ -1242,7 +1208,7 @@ md_apply_fix (fixP, valueP)
image = (image & ~0x1FFFFF) | ((value >> 2) & 0x1FFFFF);
goto write_done;
}
- return 1;
+ return;
case BFD_RELOC_ALPHA_HINT:
if (fixP->fx_pcrel == 0 && fixP->fx_addsy == 0)
@@ -1251,43 +1217,22 @@ md_apply_fix (fixP, valueP)
image = (image & ~0x3FFF) | ((value >> 2) & 0x3FFF);
goto write_done;
}
- return 1;
+ return;
#ifdef OBJ_ECOFF
case BFD_RELOC_ALPHA_LITERAL:
md_number_to_chars (fixpos, value, 2);
- return 1;
-
- case BFD_RELOC_ALPHA_LITUSE:
- return 1;
+ return;
#endif
-#ifdef OBJ_ELF
case BFD_RELOC_ALPHA_ELF_LITERAL:
case BFD_RELOC_ALPHA_LITUSE:
- return 1;
-#endif
-#ifdef OBJ_EVAX
case BFD_RELOC_ALPHA_LINKAGE:
case BFD_RELOC_ALPHA_CODEADDR:
- 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
+ return;
case BFD_RELOC_VTABLE_INHERIT:
case BFD_RELOC_VTABLE_ENTRY:
- return 1;
+ return;
default:
{
@@ -1317,7 +1262,7 @@ md_apply_fix (fixP, valueP)
}
if (fixP->fx_addsy != 0 || fixP->fx_pcrel != 0)
- return 1;
+ return;
else
{
as_warn_where (fixP->fx_file, fixP->fx_line,
@@ -1330,12 +1275,9 @@ write_done:
done:
fixP->fx_done = 1;
- return 0;
}
-/*
- * Look for a register name in the given symbol.
- */
+/* Look for a register name in the given symbol. */
symbolS *
md_undefined_symbol (name)
@@ -1354,7 +1296,7 @@ md_undefined_symbol (name)
/* FALLTHRU */
case 'r':
- if (!isdigit (*++name))
+ if (!ISDIGIT (*++name))
break;
/* FALLTHRU */
@@ -1362,7 +1304,7 @@ md_undefined_symbol (name)
case '5': case '6': case '7': case '8': case '9':
if (name[1] == '\0')
num = name[0] - '0';
- else if (name[0] != '0' && isdigit (name[1]) && name[2] == '\0')
+ else if (name[0] != '0' && ISDIGIT (name[1]) && name[2] == '\0')
{
num = (name[0] - '0') * 10 + name[1] - '0';
if (num >= 32)
@@ -1423,7 +1365,7 @@ alpha_define_label (sym)
}
/* Return true if we must always emit a reloc for a type and false if
- there is some hope of resolving it a assembly time. */
+ there is some hope of resolving it at assembly time. */
int
alpha_force_relocation (f)
@@ -1437,27 +1379,15 @@ alpha_force_relocation (f)
case BFD_RELOC_ALPHA_GPDISP_HI16:
case BFD_RELOC_ALPHA_GPDISP_LO16:
case BFD_RELOC_ALPHA_GPDISP:
-#ifdef OBJ_ECOFF
case BFD_RELOC_ALPHA_LITERAL:
-#endif
-#ifdef OBJ_ELF
case BFD_RELOC_ALPHA_ELF_LITERAL:
-#endif
case BFD_RELOC_ALPHA_LITUSE:
+ case BFD_RELOC_GPREL16:
case BFD_RELOC_GPREL32:
-#ifdef OBJ_EVAX
+ case BFD_RELOC_ALPHA_GPREL_HI16:
+ case BFD_RELOC_ALPHA_GPREL_LO16:
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
case BFD_RELOC_VTABLE_INHERIT:
case BFD_RELOC_VTABLE_ENTRY:
return 1;
@@ -1496,35 +1426,21 @@ alpha_fix_adjustable (f)
case BFD_RELOC_ALPHA_GPDISP:
return 0;
-#ifdef OBJ_ECOFF
case BFD_RELOC_ALPHA_LITERAL:
-#endif
-#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_LITUSE:
case BFD_RELOC_ALPHA_LINKAGE:
case BFD_RELOC_ALPHA_CODEADDR:
-#endif
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
case BFD_RELOC_VTABLE_ENTRY:
case BFD_RELOC_VTABLE_INHERIT:
return 0;
+ case BFD_RELOC_GPREL16:
case BFD_RELOC_GPREL32:
+ case BFD_RELOC_ALPHA_GPREL_HI16:
+ case BFD_RELOC_ALPHA_GPREL_LO16:
case BFD_RELOC_23_PCREL_S2:
case BFD_RELOC_32:
case BFD_RELOC_64:
@@ -1591,7 +1507,8 @@ 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_WEAK (fixp->fx_addsy))
+ if ((S_IS_EXTERN (fixp->fx_addsy) || S_IS_WEAK (fixp->fx_addsy)
+ || (S_GET_SEGMENT (fixp->fx_addsy)->flags & SEC_MERGE))
&& !S_IS_COMMON (fixp->fx_addsy))
reloc->addend -= symbol_get_bfdsym (fixp->fx_addsy)->value;
#endif
@@ -1649,31 +1566,45 @@ alpha_frob_file_before_adjust ()
#endif /* OBJ_ECOFF */
-#ifdef RELOC_OP_P
+static struct alpha_reloc_tag *
+get_alpha_reloc_tag (sequence)
+ long sequence;
+{
+ char buffer[ALPHA_RELOC_DIGITS];
+ struct alpha_reloc_tag *info;
+
+ sprintf (buffer, "!%ld", sequence);
+
+ info = (struct alpha_reloc_tag *) hash_find (alpha_literal_hash, buffer);
+ if (! info)
+ {
+ size_t len = strlen (buffer);
+ const char *errmsg;
+
+ info = (struct alpha_reloc_tag *)
+ xcalloc (sizeof (struct alpha_reloc_tag) + len, 1);
+
+ info->segment = now_seg;
+ info->sequence = sequence;
+ strcpy (info->string, buffer);
+ errmsg = hash_insert (alpha_literal_hash, info->string, (PTR) info);
+ if (errmsg)
+ as_fatal (errmsg);
+ }
+
+ return info;
+}
/* 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. */
+ relocations, and similarly for !gpdisp 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);
- }
+ bfd_map_over_sections (stdoutput, alpha_adjust_symtab_relocs, NULL);
}
-
-/* Inner function to move LITUSE's next to the LITERAL. */
static void
alpha_adjust_symtab_relocs (abfd, sec, ptr)
@@ -1685,14 +1616,8 @@ alpha_adjust_symtab_relocs (abfd, sec, ptr)
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
+ fixS *slave;
+ unsigned long n_slaves = 0;
/* 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
@@ -1704,121 +1629,94 @@ alpha_adjust_symtab_relocs (abfd, sec, ptr)
if (! seginfo->fix_root)
return;
- /* First rebuild the fixup chain without the expicit lituse's. */
- prevP = &(seginfo->fix_root);
+ /* First rebuild the fixup chain without the expicit lituse and
+ gpdisp_lo16 relocs. */
+ 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
+ case BFD_RELOC_ALPHA_LITUSE:
+ n_slaves++;
+ if (fixp->tc_fix_data.info->n_master == 0)
+ as_bad_where (fixp->fx_file, fixp->fx_line,
+ _("No !literal!%ld was found"),
+ fixp->tc_fix_data.info->sequence);
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)
+ case BFD_RELOC_ALPHA_GPDISP_LO16:
+ n_slaves++;
+ if (fixp->tc_fix_data.info->n_master == 0)
as_bad_where (fixp->fx_file, fixp->fx_line,
- _("No !literal!%d was found"),
+ _("No ldah !gpdisp!%ld 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;
+
+ default:
+ *prevP = fixp;
+ prevP = &fixp->fx_next;
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)
+ /* If there were any dependent relocations, go and add them back to
+ the chain. They are linked through the next_reloc field in
+ reverse order, so as we go through the next_reloc chain, we
+ effectively reverse the chain once again.
+
+ Except if there is more than one !literal for a given sequence
+ number. In that case, the programmer and/or compiler is not sure
+ how control flows from literal to lituse, and we can't be sure to
+ get the relaxation correct.
+
+ ??? Well, actually we could, if there are enough lituses such that
+ we can make each literal have at least one of each lituse type
+ present. Not implemented.
+
+ Also suppress the optimization if the !literals/!lituses are spread
+ in different segments. This can happen with "intersting" uses of
+ inline assembly; examples are present in the Linux kernel semaphores. */
+
+ for (fixp = seginfo->fix_root; fixp; fixp = next)
{
- for (fixp = seginfo->fix_root; fixp; fixp = fixp->fx_next)
+ next = fixp->fx_next;
+ switch (fixp->fx_r_type)
{
- switch (fixp->fx_r_type)
+ case BFD_RELOC_ALPHA_ELF_LITERAL:
+ if (fixp->tc_fix_data.info->n_master == 1
+ && ! fixp->tc_fix_data.info->multi_section_p)
{
- 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 (slave = fixp->tc_fix_data.info->slaves;
+ slave != (fixS *) 0;
+ slave = slave->tc_fix_data.next_reloc)
{
- 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;
- }
+ slave->fx_next = fixp->fx_next;
+ fixp->fx_next = slave;
}
- break;
+ }
+ 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;
+ case BFD_RELOC_ALPHA_GPDISP_HI16:
+ if (fixp->tc_fix_data.info->n_slaves == 0)
+ as_bad_where (fixp->fx_file, fixp->fx_line,
+ _("No lda !gpdisp!%ld was found"),
+ fixp->tc_fix_data.info->sequence);
+ else
+ {
+ slave = fixp->tc_fix_data.info->slaves;
+ slave->fx_next = next;
+ fixp->fx_next = slave;
}
+ break;
+
+ default:
+ 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
@@ -1875,7 +1773,7 @@ debug_exp (tok, ntok)
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_gprel: name = "O_gprel"; break;
case O_md11: name = "O_md11"; break;
case O_md12: name = "O_md12"; break;
case O_md13: name = "O_md13"; break;
@@ -1908,13 +1806,11 @@ tokenize_arguments (str, tok, ntok)
#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);
@@ -1922,6 +1818,11 @@ tokenize_arguments (str, tok, ntok)
old_input_line_pointer = input_line_pointer;
input_line_pointer = str;
+#ifdef RELOC_OP_P
+ /* ??? Wrest control of ! away from the regular expression parser. */
+ is_end_of_line[(unsigned char) '!'] = 1;
+#endif
+
while (tok < end_tok && *input_line_pointer)
{
SKIP_WHITESPACE ();
@@ -1944,59 +1845,66 @@ tokenize_arguments (str, tok, ntok)
if (!saw_arg)
goto err;
- for (p = ++input_line_pointer;
- ((c = *p) != '!' && c != ';' && c != '#' && c != ','
- && !is_end_of_line[c]);
- p++)
- ;
+ ++input_line_pointer;
+ SKIP_WHITESPACE ();
+ p = input_line_pointer;
+ c = get_symbol_end ();
/* Parse !relocation_type */
- len = p - input_line_pointer;
+ len = input_line_pointer - p;
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 (len == r->length && memcmp (p, r->name, len) == 0)
+ break;
if (i < 0)
{
- as_bad (_("Unknown relocation operand: !%s"),
- input_line_pointer);
+ as_bad (_("Unknown relocation operand: !%s"), p);
goto err_report;
}
- input_line_pointer = ++p;
-
- /* Parse !sequence_number */
- memset (tok, '\0', sizeof (expressionS));
- expression (tok);
+ *input_line_pointer = c;
+ SKIP_WHITESPACE ();
+ if (*input_line_pointer != '!')
+ {
+ if (r->require_seq)
+ {
+ as_bad (_("no sequence number after !%s"), p);
+ goto err_report;
+ }
- if (tok->X_op != O_constant
- || ! ALPHA_RELOC_SEQUENCE_OK (tok->X_add_number))
+ tok->X_add_number = 0;
+ }
+ else
{
- as_bad (_("Bad sequence number: !%s!%s"),
- r->name, input_line_pointer);
- goto err_report;
+ if (! r->allow_seq)
+ {
+ as_bad (_("!%s does not use a sequence number"), p);
+ goto err_report;
+ }
+
+ input_line_pointer++;
+
+ /* Parse !sequence_number */
+ expression (tok);
+ if (tok->X_op != O_constant || tok->X_add_number <= 0)
+ {
+ 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
+#endif /* RELOC_OP_P */
case ',':
++input_line_pointer;
@@ -2048,18 +1956,25 @@ fini:
#ifdef DEBUG_ALPHA
debug_exp (orig_tok, ntok - (end_tok - tok));
#endif
+#ifdef RELOC_OP_P
+ is_end_of_line[(unsigned char) '!'] = 0;
+#endif
return ntok - (end_tok - tok);
err:
+#ifdef RELOC_OP_P
+ is_end_of_line[(unsigned char) '!'] = 0;
+#endif
input_line_pointer = old_input_line_pointer;
return TOKENIZE_ERROR;
-#ifdef RELOC_OP_P
err_report:
+#ifdef RELOC_OP_P
+ is_end_of_line[(unsigned char) '!'] = 0;
+#endif
input_line_pointer = old_input_line_pointer;
return TOKENIZE_ERROR_REPORT;
-#endif
}
/* Search forward through all variants of an opcode looking for a
@@ -2247,7 +2162,6 @@ 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:
@@ -2255,7 +2169,7 @@ find_macro_match (first_macro, tok, pntok)
case O_gpdisp:
case O_gprelhigh:
case O_gprellow:
-#endif
+ case O_gprel:
goto match_failed;
default:
@@ -2264,38 +2178,6 @@ find_macro_match (first_macro, tok, pntok)
++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;
@@ -2370,12 +2252,15 @@ insert_operand (insn, operand, val, file, line)
*/
static void
-assemble_insn (opcode, tok, ntok, insn)
+assemble_insn (opcode, tok, ntok, insn, reloc)
const struct alpha_opcode *opcode;
const expressionS *tok;
int ntok;
struct alpha_insn *insn;
+ bfd_reloc_code_real_type reloc;
{
+ const struct alpha_operand *reloc_operand = NULL;
+ const expressionS *reloc_exp = NULL;
const unsigned char *argidx;
unsigned image;
int tokidx = 0;
@@ -2431,24 +2316,85 @@ assemble_insn (opcode, tok, ntok, insn)
case O_constant:
image = insert_operand (image, operand, t->X_add_number, NULL, 0);
+ assert (reloc_operand == NULL);
+ reloc_operand = operand;
+ reloc_exp = t;
break;
default:
- {
- struct alpha_fixup *fixup;
+ /* This is only 0 for fields that should contain registers,
+ which means this pattern shouldn't have matched. */
+ if (operand->default_reloc == 0)
+ abort ();
- if (insn->nfixups >= MAX_INSN_FIXUPS)
- as_fatal (_("too many fixups"));
+ /* There is one special case for which an insn receives two
+ relocations, and thus the user-supplied reloc does not
+ override the operand reloc. */
+ if (operand->default_reloc == BFD_RELOC_ALPHA_HINT)
+ {
+ struct alpha_fixup *fixup;
- fixup = &insn->fixups[insn->nfixups++];
+ if (insn->nfixups >= MAX_INSN_FIXUPS)
+ as_fatal (_("too many fixups"));
- fixup->exp = *t;
- fixup->reloc = operand->default_reloc;
- }
+ fixup = &insn->fixups[insn->nfixups++];
+ fixup->exp = *t;
+ fixup->reloc = BFD_RELOC_ALPHA_HINT;
+ }
+ else
+ {
+ if (reloc == BFD_RELOC_UNUSED)
+ reloc = operand->default_reloc;
+
+ assert (reloc_operand == NULL);
+ reloc_operand = operand;
+ reloc_exp = t;
+ }
break;
}
}
+ if (reloc != BFD_RELOC_UNUSED)
+ {
+ struct alpha_fixup *fixup;
+
+ if (insn->nfixups >= MAX_INSN_FIXUPS)
+ as_fatal (_("too many fixups"));
+
+ /* ??? My but this is hacky. But the OSF/1 assembler uses the same
+ relocation tag for both ldah and lda with gpdisp. Choose the
+ correct internal relocation based on the opcode. */
+ if (reloc == BFD_RELOC_ALPHA_GPDISP)
+ {
+ if (strcmp (opcode->name, "ldah") == 0)
+ reloc = BFD_RELOC_ALPHA_GPDISP_HI16;
+ else if (strcmp (opcode->name, "lda") == 0)
+ reloc = BFD_RELOC_ALPHA_GPDISP_LO16;
+ else
+ as_bad (_("invalid relocation for instruction"));
+ }
+
+ /* If this is a real relocation (as opposed to a lituse hint), then
+ the relocation width should match the operand width. */
+ else if (reloc < BFD_RELOC_UNUSED)
+ {
+ reloc_howto_type *reloc_howto
+ = bfd_reloc_type_lookup (stdoutput, reloc);
+ if (reloc_howto->bitsize != reloc_operand->bits)
+ {
+ as_bad (_("invalid relocation for field"));
+ return;
+ }
+ }
+
+ fixup = &insn->fixups[insn->nfixups++];
+ if (reloc_exp)
+ fixup->exp = *reloc_exp;
+ else
+ fixup->exp.X_op = O_absent;
+ fixup->reloc = reloc;
+ }
+
insn->insn = image;
}
@@ -2483,12 +2429,9 @@ emit_insn (insn)
{
const struct alpha_operand *operand = (const struct alpha_operand *) 0;
struct alpha_fixup *fixup = &insn->fixups[i];
+ struct alpha_reloc_tag *info;
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)
@@ -2497,43 +2440,24 @@ emit_insn (insn)
size = 4;
pcrel = ((operand->flags & AXP_OPERAND_RELATIVE) != 0);
}
+ else if (fixup->reloc > BFD_RELOC_UNUSED
+ || fixup->reloc == BFD_RELOC_ALPHA_GPDISP_HI16
+ || fixup->reloc == BFD_RELOC_ALPHA_GPDISP_LO16)
+ {
+ size = 2;
+ pcrel = 0;
+ }
else
- switch (fixup->reloc)
- {
-#ifdef OBJ_ELF
- /* These relocation types are only used internally. */
- case BFD_RELOC_ALPHA_GPDISP_HI16:
- case BFD_RELOC_ALPHA_GPDISP_LO16:
- size = 2;
- pcrel = 0;
- break;
-#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
+ {
+ reloc_howto_type *reloc_howto
+ = bfd_reloc_type_lookup (stdoutput, fixup->reloc);
+ assert (reloc_howto);
- default:
- {
- reloc_howto_type *reloc_howto
- = bfd_reloc_type_lookup (stdoutput, fixup->reloc);
- assert (reloc_howto);
+ size = bfd_get_reloc_size (reloc_howto);
+ assert (size >= 1 && size <= 4);
- size = bfd_get_reloc_size (reloc_howto);
- pcrel = reloc_howto->pc_relative;
- }
- assert (size >= 1 && size <= 4);
- break;
- }
+ pcrel = reloc_howto->pc_relative;
+ }
fixP = fix_new_exp (frag_now, f - frag_now->fr_literal, size,
&fixup->exp, pcrel, fixup->reloc);
@@ -2542,79 +2466,75 @@ emit_insn (insn)
and copy in the sequence number for the explicit relocations. */
switch (fixup->reloc)
{
- case BFD_RELOC_ALPHA_GPDISP_LO16:
-#ifdef OBJ_ECOFF
- case BFD_RELOC_ALPHA_LITERAL:
-#endif
-#ifdef OBJ_ELF
- case BFD_RELOC_ALPHA_ELF_LITERAL:
-#endif
+ case BFD_RELOC_ALPHA_HINT:
case BFD_RELOC_GPREL32:
+ case BFD_RELOC_GPREL16:
+ case BFD_RELOC_ALPHA_GPREL_HI16:
+ case BFD_RELOC_ALPHA_GPREL_LO16:
fixP->fx_no_overflow = 1;
break;
-#ifdef RELOC_OP_P
- case BFD_RELOC_ALPHA_USER_LITERAL:
+ case BFD_RELOC_ALPHA_GPDISP_HI16:
fixP->fx_no_overflow = 1;
- sprintf (buffer, "!%u", insn->sequence[i]);
- info = ((struct alpha_literal_tag *)
- hash_find (alpha_literal_hash, buffer));
+ fixP->fx_addsy = section_symbol (now_seg);
+ fixP->fx_offset = 0;
- 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 = get_alpha_reloc_tag (insn->sequence);
+ if (++info->n_master > 1)
+ as_bad (_("too many ldah insns for !gpdisp!%ld"), insn->sequence);
+ if (info->segment != now_seg)
+ as_bad (_("both insns for !gpdisp!%ld must be in the same section"),
+ insn->sequence);
+ fixP->tc_fix_data.info = info;
+ break;
- ++info->n_literals;
+ case BFD_RELOC_ALPHA_GPDISP_LO16:
+ fixP->fx_no_overflow = 1;
+ info = get_alpha_reloc_tag (insn->sequence);
+ if (++info->n_slaves > 1)
+ as_bad (_("too many lda insns for !gpdisp!%ld"), insn->sequence);
if (info->segment != now_seg)
- info->multi_section_p = 1;
-
+ as_bad (_("both insns for !gpdisp!%ld must be in the same section"),
+ insn->sequence);
fixP->tc_fix_data.info = info;
+ info->slaves = fixP;
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));
+ case BFD_RELOC_ALPHA_LITERAL:
+ case BFD_RELOC_ALPHA_ELF_LITERAL:
+ fixP->fx_no_overflow = 1;
- 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;
+ info = get_alpha_reloc_tag (insn->sequence);
+ info->n_master++;
if (info->segment != now_seg)
info->multi_section_p = 1;
+ fixP->tc_fix_data.info = info;
+ break;
+ case DUMMY_RELOC_LITUSE_ADDR:
+ fixP->fx_offset = LITUSE_ADDR;
+ goto do_lituse;
+ case DUMMY_RELOC_LITUSE_BASE:
+ fixP->fx_offset = LITUSE_BASE;
+ goto do_lituse;
+ case DUMMY_RELOC_LITUSE_BYTOFF:
+ fixP->fx_offset = LITUSE_BYTOFF;
+ goto do_lituse;
+ case DUMMY_RELOC_LITUSE_JSR:
+ fixP->fx_offset = LITUSE_JSR;
+ do_lituse:
+ fixP->fx_addsy = section_symbol (now_seg);
+ fixP->fx_r_type = BFD_RELOC_ALPHA_LITUSE;
+
+ info = get_alpha_reloc_tag (insn->sequence);
+ info->n_slaves++;
+ fixP->tc_fix_data.info = info;
+ fixP->tc_fix_data.next_reloc = info->slaves;
+ info->slaves = fixP;
+ if (info->segment != now_seg)
+ info->multi_section_p = 1;
break;
-#endif
default:
if ((int) fixup->reloc < 0)
@@ -2650,7 +2570,7 @@ assemble_tokens_to_insn (opname, tok, ntok, insn)
opcode = find_opcode_match (opcode, tok, &ntok, &cpumatch);
if (opcode)
{
- assemble_insn (opcode, tok, ntok, insn);
+ assemble_insn (opcode, tok, ntok, insn, BFD_RELOC_UNUSED);
return;
}
else if (cpumatch)
@@ -2677,9 +2597,15 @@ assemble_tokens (opname, tok, ntok, local_macros_on)
const struct alpha_opcode *opcode;
const struct alpha_macro *macro;
int cpumatch = 1;
+ bfd_reloc_code_real_type reloc = BFD_RELOC_UNUSED;
- /* search macros */
- if (local_macros_on)
+ /* If a user-specified relocation is present, this is not a macro. */
+ if (ntok && USER_RELOC_P (tok[ntok - 1].X_op))
+ {
+ reloc = ALPHA_RELOC_TABLE (tok[ntok - 1].X_op)->reloc;
+ ntok--;
+ }
+ else if (local_macros_on)
{
macro = ((const struct alpha_macro *)
hash_find (alpha_macro_hash, opname));
@@ -2695,17 +2621,6 @@ 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)
@@ -2715,18 +2630,25 @@ assemble_tokens (opname, tok, ntok, local_macros_on)
if (opcode)
{
struct alpha_insn insn;
- assemble_insn (opcode, tok, ntok, &insn);
+ assemble_insn (opcode, tok, ntok, &insn, reloc);
+
+ /* Copy the sequence number for the reloc from the reloc token. */
+ if (reloc != BFD_RELOC_UNUSED)
+ insn.sequence = tok[ntok].X_add_number;
+
emit_insn (&insn);
return;
}
}
if (found_something)
- if (cpumatch)
- as_bad (_("inappropriate arguments for opcode `%s'"), opname);
- else
- as_bad (_("opcode `%s' not supported for target %s"), opname,
- alpha_target_name);
+ {
+ if (cpumatch)
+ as_bad (_("inappropriate arguments for opcode `%s'"), opname);
+ else
+ as_bad (_("opcode `%s' not supported for target %s"), opname,
+ alpha_target_name);
+ }
else
as_bad (_("unknown opcode `%s'"), opname);
}
@@ -2761,17 +2683,6 @@ FIXME
expressionS newtok[3];
expressionS addend;
-#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)
ecoff_set_gp_prolog_size (0);
@@ -2795,6 +2706,7 @@ FIXME
insn.nfixups = 1;
insn.fixups[0].exp = addend;
insn.fixups[0].reloc = BFD_RELOC_ALPHA_GPDISP_HI16;
+ insn.sequence = next_sequence_num;
emit_insn (&insn);
@@ -2809,6 +2721,7 @@ FIXME
insn.nfixups = 1;
insn.fixups[0].exp = addend;
insn.fixups[0].reloc = BFD_RELOC_ALPHA_GPDISP_LO16;
+ insn.sequence = next_sequence_num--;
emit_insn (&insn);
#endif /* OBJ_ECOFF || OBJ_ELF */
@@ -2888,18 +2801,18 @@ add_to_link_pool (basesym, sym, addend)
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. */
+ Finally, the return value is nonzero if the calling macro may emit
+ a LITUSE reloc if otherwise appropriate; the return value is the
+ sequence number to use. */
-static int
-load_expression (targreg, exp, pbasereg, poffset, explicit_reloc)
+static long
+load_expression (targreg, exp, pbasereg, poffset)
int targreg;
const expressionS *exp;
int *pbasereg;
expressionS *poffset;
- const expressionS *explicit_reloc;
{
- int emit_lituse = 0;
+ long emit_lituse = 0;
offsetT addend = exp->X_add_number;
int basereg = *pbasereg;
struct alpha_insn insn;
@@ -2949,9 +2862,9 @@ load_expression (targreg, exp, pbasereg, poffset, explicit_reloc)
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;
+ insn.sequence = emit_lituse = next_sequence_num--;
#endif /* OBJ_ECOFF */
#ifdef OBJ_ELF
/* emit "ldq r, gotoff(gp)" */
@@ -2988,25 +2901,14 @@ load_expression (targreg, exp, pbasereg, poffset, explicit_reloc)
assemble_tokens_to_insn ("ldq", newtok, 3, &insn);
assert (insn.nfixups == 1);
- 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
- }
+ insn.fixups[0].reloc = BFD_RELOC_ALPHA_ELF_LITERAL;
+ insn.sequence = emit_lituse = next_sequence_num--;
#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))
@@ -3048,8 +2950,6 @@ load_expression (targreg, exp, pbasereg, poffset, explicit_reloc)
emit_insn (&insn);
#ifndef OBJ_EVAX
- emit_lituse = 1;
-
if (basereg != alpha_gp_register && basereg != AXP_REG_ZERO)
{
/* emit "addq r, base, r" */
@@ -3065,14 +2965,12 @@ load_expression (targreg, exp, pbasereg, poffset, explicit_reloc)
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);
@@ -3099,8 +2997,9 @@ load_expression (targreg, exp, pbasereg, poffset, explicit_reloc)
if (!range_signed_32 (addend))
{
offsetT lit;
+ long seq_num = next_sequence_num--;
- /* for 64-bit addends, just put it in the literal pool */
+ /* For 64-bit addends, just put it in the literal pool. */
#ifdef OBJ_EVAX
/* emit "ldq targreg, lit(basereg)" */
@@ -3160,6 +3059,7 @@ load_expression (targreg, exp, pbasereg, poffset, explicit_reloc)
#ifdef OBJ_ELF
insn.fixups[0].reloc = BFD_RELOC_ALPHA_ELF_LITERAL;
#endif
+ insn.sequence = seq_num;
emit_insn (&insn);
@@ -3171,16 +3071,10 @@ load_expression (targreg, exp, pbasereg, poffset, explicit_reloc)
assemble_tokens_to_insn ("ldq", newtok, 3, &insn);
assert (insn.nfixups < MAX_INSN_FIXUPS);
- if (insn.nfixups > 0)
- {
- memmove (&insn.fixups[1], &insn.fixups[0],
- sizeof (struct alpha_fixup) * insn.nfixups);
- }
+ insn.fixups[insn.nfixups].reloc = DUMMY_RELOC_LITUSE_BASE;
+ insn.fixups[insn.nfixups].exp.X_op = O_absent;
insn.nfixups++;
- insn.fixups[0].reloc = BFD_RELOC_ALPHA_LITUSE;
- 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;
+ insn.sequence = seq_num;
emit_lituse = 0;
emit_insn (&insn);
@@ -3260,66 +3154,19 @@ load_expression (targreg, exp, pbasereg, poffset, explicit_reloc)
large constants. */
static void
-emit_lda (tok, ntok, opname)
+emit_lda (tok, ntok, unused)
const expressionS *tok;
int ntok;
- const PTR opname;
+ const PTR unused ATTRIBUTE_UNUSED;
{
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!%ld"), r->name,
- (long) 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, reloc);
+ (void) load_expression (tok[0].X_add_number, &tok[1], &basereg, NULL);
}
/* The ldah macro differs from the ldah instruction in that it has $31
@@ -3333,17 +3180,6 @@ emit_ldah (tok, ntok, 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);
@@ -3361,83 +3197,31 @@ emit_ir_load (tok, ntok, opname)
int ntok;
const PTR opname;
{
- int basereg, lituse;
+ int basereg;
+ long lituse;
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], (const expressionS *) 0);
+ &newtok[1]);
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);
- if (insn.nfixups > 0)
- {
- memmove (&insn.fixups[1], &insn.fixups[0],
- sizeof (struct alpha_fixup) * insn.nfixups);
- }
+ insn.fixups[insn.nfixups].reloc = DUMMY_RELOC_LITUSE_BASE;
+ insn.fixups[insn.nfixups].exp.X_op = O_absent;
insn.nfixups++;
- insn.fixups[0].reloc = BFD_RELOC_ALPHA_LITUSE;
- 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;
+ insn.sequence = lituse;
}
emit_insn (&insn);
@@ -3452,25 +3236,11 @@ emit_loadstore (tok, ntok, opname)
int ntok;
const PTR opname;
{
- int basereg, lituse;
+ int basereg;
+ long lituse;
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
@@ -3481,8 +3251,7 @@ emit_loadstore (tok, ntok, opname)
if (alpha_noat_on)
as_bad (_("macro requires $at register while noat in effect"));
- lituse = load_expression (AXP_REG_AT, &tok[1], &basereg, &newtok[1],
- (const expressionS *) 0);
+ lituse = load_expression (AXP_REG_AT, &tok[1], &basereg, &newtok[1]);
}
else
{
@@ -3495,35 +3264,13 @@ 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);
- if (insn.nfixups > 0)
- {
- memmove (&insn.fixups[1], &insn.fixups[0],
- sizeof (struct alpha_fixup) * insn.nfixups);
- }
+ insn.fixups[insn.nfixups].reloc = DUMMY_RELOC_LITUSE_BASE;
+ insn.fixups[insn.nfixups].exp.X_op = O_absent;
insn.nfixups++;
- insn.fixups[0].reloc = BFD_RELOC_ALPHA_LITUSE;
- 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;
+ insn.sequence = lituse;
}
emit_insn (&insn);
@@ -3542,41 +3289,57 @@ emit_ldXu (tok, ntok, vlgsize)
else
{
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
+ struct alpha_insn insn;
+ int basereg;
+ long lituse;
if (alpha_noat_on)
as_bad (_("macro requires $at register while noat in effect"));
+ if (ntok == 2)
+ basereg = (tok[1].X_op == O_constant
+ ? AXP_REG_ZERO : alpha_gp_register);
+ else
+ basereg = tok[2].X_add_number;
+
/* emit "lda $at, exp" */
- memcpy (newtok, tok, sizeof (expressionS) * ntok);
- newtok[0].X_add_number = AXP_REG_AT;
- assemble_tokens ("lda", newtok, ntok, 1);
+ lituse = load_expression (AXP_REG_AT, &tok[1], &basereg, NULL);
/* emit "ldq_u targ, 0($at)" */
newtok[0] = tok[0];
set_tok_const (newtok[1], 0);
- set_tok_preg (newtok[2], AXP_REG_AT);
- assemble_tokens ("ldq_u", newtok, 3, 1);
+ set_tok_preg (newtok[2], basereg);
+ assemble_tokens_to_insn ("ldq_u", newtok, 3, &insn);
+
+ if (lituse)
+ {
+ assert (insn.nfixups < MAX_INSN_FIXUPS);
+ insn.fixups[insn.nfixups].reloc = DUMMY_RELOC_LITUSE_BASE;
+ insn.fixups[insn.nfixups].exp.X_op = O_absent;
+ insn.nfixups++;
+ insn.sequence = lituse;
+ }
+
+ emit_insn (&insn);
/* emit "extXl targ, $at, targ" */
- set_tok_reg (newtok[1], AXP_REG_AT);
+ set_tok_reg (newtok[1], basereg);
newtok[2] = newtok[0];
- assemble_tokens (extXl_op[(long) vlgsize], newtok, 3, 1);
+ assemble_tokens_to_insn (extXl_op[(long) vlgsize], newtok, 3, &insn);
+
+ if (lituse)
+ {
+ assert (insn.nfixups < MAX_INSN_FIXUPS);
+ insn.fixups[insn.nfixups].reloc = DUMMY_RELOC_LITUSE_BYTOFF;
+ insn.fixups[insn.nfixups].exp.X_op = O_absent;
+ insn.nfixups++;
+ insn.sequence = lituse;
+ }
+
+ emit_insn (&insn);
}
}
@@ -3671,17 +3434,6 @@ emit_ldil (tok, ntok, 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);
@@ -3703,35 +3455,75 @@ emit_stX (tok, ntok, vlgsize)
else
{
expressionS newtok[3];
+ struct alpha_insn insn;
+ int basereg;
+ long lituse;
if (alpha_noat_on)
as_bad (_("macro requires $at register while noat in effect"));
+ if (ntok == 2)
+ basereg = (tok[1].X_op == O_constant
+ ? AXP_REG_ZERO : alpha_gp_register);
+ else
+ basereg = tok[2].X_add_number;
+
/* emit "lda $at, exp" */
- memcpy (newtok, tok, sizeof (expressionS) * ntok);
- newtok[0].X_add_number = AXP_REG_AT;
- assemble_tokens ("lda", newtok, ntok, 1);
+ lituse = load_expression (AXP_REG_AT, &tok[1], &basereg, NULL);
/* emit "ldq_u $t9, 0($at)" */
set_tok_reg (newtok[0], AXP_REG_T9);
set_tok_const (newtok[1], 0);
- set_tok_preg (newtok[2], AXP_REG_AT);
- assemble_tokens ("ldq_u", newtok, 3, 1);
+ set_tok_preg (newtok[2], basereg);
+ assemble_tokens_to_insn ("ldq_u", newtok, 3, &insn);
+
+ if (lituse)
+ {
+ assert (insn.nfixups < MAX_INSN_FIXUPS);
+ insn.fixups[insn.nfixups].reloc = DUMMY_RELOC_LITUSE_BASE;
+ insn.fixups[insn.nfixups].exp.X_op = O_absent;
+ insn.nfixups++;
+ insn.sequence = lituse;
+ }
+
+ emit_insn (&insn);
/* emit "insXl src, $at, $t10" */
newtok[0] = tok[0];
- set_tok_reg (newtok[1], AXP_REG_AT);
+ set_tok_reg (newtok[1], basereg);
set_tok_reg (newtok[2], AXP_REG_T10);
- assemble_tokens (insXl_op[lgsize], newtok, 3, 1);
+ assemble_tokens_to_insn (insXl_op[lgsize], newtok, 3, &insn);
+
+ if (lituse)
+ {
+ assert (insn.nfixups < MAX_INSN_FIXUPS);
+ insn.fixups[insn.nfixups].reloc = DUMMY_RELOC_LITUSE_BYTOFF;
+ insn.fixups[insn.nfixups].exp.X_op = O_absent;
+ insn.nfixups++;
+ insn.sequence = lituse;
+ }
+
+ emit_insn (&insn);
/* emit "mskXl $t9, $at, $t9" */
set_tok_reg (newtok[0], AXP_REG_T9);
newtok[2] = newtok[0];
- assemble_tokens (mskXl_op[lgsize], newtok, 3, 1);
+ assemble_tokens_to_insn (mskXl_op[lgsize], newtok, 3, &insn);
+
+ if (lituse)
+ {
+ assert (insn.nfixups < MAX_INSN_FIXUPS);
+ insn.fixups[insn.nfixups].reloc = DUMMY_RELOC_LITUSE_BYTOFF;
+ insn.fixups[insn.nfixups].exp.X_op = O_absent;
+ insn.nfixups++;
+ insn.sequence = lituse;
+ }
+
+ emit_insn (&insn);
/* emit "or $t9, $t10, $t9" */
@@ -3740,9 +3532,20 @@ emit_stX (tok, ntok, vlgsize)
/* emit "stq_u $t9, 0($at) */
- set_tok_const (newtok[1], 0);
+ set_tok_const(newtok[1], 0);
set_tok_preg (newtok[2], AXP_REG_AT);
- assemble_tokens ("stq_u", newtok, 3, 1);
+ assemble_tokens_to_insn ("stq_u", newtok, 3, &insn);
+
+ if (lituse)
+ {
+ assert (insn.nfixups < MAX_INSN_FIXUPS);
+ insn.fixups[insn.nfixups].reloc = DUMMY_RELOC_LITUSE_BASE;
+ insn.fixups[insn.nfixups].exp.X_op = O_absent;
+ insn.nfixups++;
+ insn.sequence = lituse;
+ }
+
+ emit_insn (&insn);
}
}
@@ -3846,19 +3649,6 @@ 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];
@@ -3905,17 +3695,6 @@ 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);
@@ -4015,17 +3794,6 @@ 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);
@@ -4120,18 +3888,8 @@ emit_jsrjmp (tok, ntok, vopname)
const char *opname = (const char *) vopname;
struct alpha_insn insn;
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
+ int r, tokidx = 0;
+ long lituse = 0;
if (tokidx < ntok && tok[tokidx].X_op == O_register)
r = regno (tok[tokidx++].X_add_number);
@@ -4149,8 +3907,7 @@ emit_jsrjmp (tok, ntok, vopname)
else
{
int basereg = alpha_gp_register;
- lituse = load_expression (r = AXP_REG_PV, &tok[tokidx], &basereg, NULL,
- (const expressionS *) 0);
+ lituse = load_expression (r = AXP_REG_PV, &tok[tokidx], &basereg, NULL);
}
#endif
@@ -4167,20 +3924,13 @@ emit_jsrjmp (tok, ntok, vopname)
assemble_tokens_to_insn (opname, newtok, 3, &insn);
- /* add the LITUSE fixup */
if (lituse)
{
assert (insn.nfixups < MAX_INSN_FIXUPS);
- if (insn.nfixups > 0)
- {
- memmove (&insn.fixups[1], &insn.fixups[0],
- sizeof (struct alpha_fixup) * insn.nfixups);
- }
+ insn.fixups[insn.nfixups].reloc = DUMMY_RELOC_LITUSE_JSR;
+ insn.fixups[insn.nfixups].exp.X_op = O_absent;
insn.nfixups++;
- insn.fixups[0].reloc = BFD_RELOC_ALPHA_LITUSE;
- 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;
+ insn.sequence = lituse;
}
emit_insn (&insn);
@@ -4199,17 +3949,6 @@ 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
@@ -4472,7 +4211,7 @@ s_alpha_ent (dummy)
input_line_pointer++;
SKIP_WHITESPACE ();
}
- if (isdigit (*input_line_pointer) || *input_line_pointer == '-')
+ if (ISDIGIT (*input_line_pointer) || *input_line_pointer == '-')
(void) get_absolute_expression ();
}
demand_empty_rest_of_line ();
@@ -5657,6 +5396,34 @@ select_gp_value ()
}
#endif /* OBJ_ECOFF */
+#ifdef OBJ_ELF
+/* Map 's' to SHF_ALPHA_GPREL. */
+
+int
+alpha_elf_section_letter (letter, ptr_msg)
+ int letter;
+ char **ptr_msg;
+{
+ if (letter == 's')
+ return SHF_ALPHA_GPREL;
+
+ *ptr_msg = _("Bad .section directive: want a,s,w,x,M,S in string");
+ return 0;
+}
+
+/* Map SHF_ALPHA_GPREL to SEC_SMALL_DATA. */
+
+flagword
+alpha_elf_section_flags (flags, attr, type)
+ flagword flags;
+ int attr, type ATTRIBUTE_UNUSED;
+{
+ if (attr & SHF_ALPHA_GPREL)
+ flags |= SEC_SMALL_DATA;
+ return flags;
+}
+#endif /* OBJ_ELF */
+
/* Called internally to handle all alignment needs. This takes care
of eliding calls to frag_align if'n the cached current alignment
says we've already got it, as well as taking care of the auto-align
@@ -5703,10 +5470,10 @@ void
alpha_handle_align (fragp)
fragS *fragp;
{
- static char const unop[4] = { 0x00, 0x00, 0xe0, 0x2f };
+ static char const unop[4] = { 0x00, 0x00, 0xfe, 0x2f };
static char const nopunop[8] = {
0x1f, 0x04, 0xff, 0x47,
- 0x00, 0x00, 0xe0, 0x2f
+ 0x00, 0x00, 0xfe, 0x2f
};
int bytes, fix;
diff --git a/contrib/binutils/gas/config/tc-alpha.h b/contrib/binutils/gas/config/tc-alpha.h
index 2fe20b7..fb428f9 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 1994, 1995, 1996, 1997, 1998, 1999, 2000
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
Written by Ken Raeburn <raeburn@cygnus.com>.
@@ -37,7 +37,6 @@
: "unknown-format")
#define NEED_LITERAL_POOL
-#define TC_HANDLES_FX_DONE
#define REPEAT_CONS_EXPRESSIONS
extern int alpha_force_relocation PARAMS ((struct fix *));
@@ -64,7 +63,7 @@ extern valueT alpha_gp_value;
#define md_convert_frag(b,s,f) as_fatal ("alpha 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 md_operand(x)
#ifdef OBJ_EVAX
@@ -107,6 +106,11 @@ extern void alpha_frob_file_before_adjust PARAMS ((void));
#define ELF_TC_SPECIAL_SECTIONS \
{ ".sdata", SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_ALPHA_GPREL }, \
{ ".sbss", SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_ALPHA_GPREL },
+
+#define md_elf_section_letter alpha_elf_section_letter
+extern int alpha_elf_section_letter PARAMS ((int, char **));
+#define md_elf_section_flags alpha_elf_section_flags
+extern flagword alpha_elf_section_flags PARAMS ((flagword, int, int));
#endif
/* Whether to add support for explict !relocation_op!sequence_number. At the
@@ -116,11 +120,10 @@ extern void alpha_frob_file_before_adjust PARAMS ((void));
#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.
- */
+/* 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));
@@ -132,14 +135,14 @@ extern void alpha_adjust_symtab PARAMS ((void));
struct alpha_fix_tag
{
- struct fix *next_lituse; /* next !lituse */
- struct alpha_literal_tag *info; /* other members with same sequence */
+ struct fix *next_reloc; /* next !lituse or !gpdisp */
+ struct alpha_reloc_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.next_reloc = (struct fix *)0; \
fixP->tc_fix_data.info = (struct alpha_literal_tag *)0; \
} while (0)
@@ -147,10 +150,9 @@ do { \
#define TC_FIX_DATA_PRINT(stream,fixP) \
do { \
if (fixP->tc_fix_data.info) \
- fprintf (stderr, "\tinfo = 0x%lx, next_lituse = 0x%lx\n", \
+ fprintf (stderr, "\tinfo = 0x%lx, next_reloc = 0x%lx\n", \
(long)fixP->tc_fix_data.info, \
- (long)fixP->tc_fix_data.next_lituse); \
+ (long)fixP->tc_fix_data.next_reloc); \
} while (0)
-#endif
#define DWARF2_LINE_MIN_INSN_LENGTH 4
diff --git a/contrib/binutils/gas/config/tc-arc.c b/contrib/binutils/gas/config/tc-arc.c
index 45f54ac..3e829fa 100644
--- a/contrib/binutils/gas/config/tc-arc.c
+++ b/contrib/binutils/gas/config/tc-arc.c
@@ -21,9 +21,9 @@
02111-1307, USA. */
#include <stdio.h>
-#include <ctype.h>
#include "libiberty.h"
#include "as.h"
+#include "safe-ctype.h"
#include "subsegs.h"
#include "opcode/arc.h"
#include "../opcodes/arc-ext.h"
@@ -46,9 +46,11 @@ static void arc_common PARAMS ((int));
static void arc_extinst PARAMS ((int));
static void arc_extoper PARAMS ((int));
static void arc_option PARAMS ((int));
-static int get_arc_exp_reloc_type PARAMS ((int, int, expressionS *,
+static int get_arc_exp_reloc_type PARAMS ((int, int, expressionS *,
expressionS *));
+static void init_opcode_tables PARAMS ((int));
+
const struct suffix_classes {
char *name;
int len;
@@ -393,7 +395,7 @@ md_assemble (str)
}
/* Skip leading white space. */
- while (isspace (*str))
+ while (ISSPACE (*str))
str++;
/* The instructions are stored in lists hashed by the first letter (though
@@ -544,7 +546,7 @@ md_assemble (str)
}
/* Pick the suffix out and look it up via the hash table. */
- for (t = s; *t && isalnum (*t); ++t)
+ for (t = s; *t && ISALNUM (*t); ++t)
continue;
c = *t;
*t = '\0';
@@ -736,7 +738,7 @@ md_assemble (str)
insn and it is assumed that longer versions of insns appear
before shorter ones (eg: lsr r2,r3,1 vs lsr r2,r3). */
- while (isspace (*str))
+ while (ISSPACE (*str))
++str;
if (!is_end_of_line[(unsigned char) *str])
@@ -832,7 +834,7 @@ md_assemble (str)
operands residing in the insn, but instead just use 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.
+ feature. We pick a BFD reloc type in md_apply_fix3.
Limm values (4 byte immediate "constants") must be treated
normally because they're not part of the actual insn word
@@ -913,8 +915,7 @@ arc_extoper (opertype)
p = name;
while (*p)
{
- if (isupper (*p))
- *p = tolower (*p);
+ *p = TOLOWER (*p);
p++;
}
@@ -1538,7 +1539,7 @@ arc_option (ignore)
char *
md_atof (type, litP, sizeP)
- char type;
+ int type;
char *litP;
int *sizeP;
{
@@ -1546,7 +1547,7 @@ md_atof (type, litP, sizeP)
LITTLENUM_TYPE words[MAX_LITTLENUMS];
LITTLENUM_TYPE *wordP;
char *t;
- char *atof_ieee ();
+ char * atof_ieee PARAMS ((char *, int, LITTLENUM_TYPE *));
switch (type)
{
@@ -1631,9 +1632,7 @@ void
arc_code_symbol (expressionP)
expressionS *expressionP;
{
- if (expressionP->X_op == O_symbol && expressionP->X_add_number == 0
- /* I think this test is unnecessary but just as a sanity check... */
- && expressionP->X_op_symbol == NULL)
+ if (expressionP->X_op == O_symbol && expressionP->X_add_number == 0)
{
expressionS two;
expressionP->X_op = O_right_shift;
@@ -1703,7 +1702,7 @@ md_operand (expressionP)
while (ext_oper)
{
l = strlen (ext_oper->operand.name);
- if (!strncmp (p, ext_oper->operand.name, l) && !isalnum(*(p + l)))
+ if (!strncmp (p, ext_oper->operand.name, l) && !ISALNUM (*(p + l)))
{
input_line_pointer += l + 1;
expressionP->X_op = O_register;
@@ -1715,7 +1714,7 @@ md_operand (expressionP)
for (i = 0; i < arc_reg_names_count; i++)
{
l = strlen (arc_reg_names[i].name);
- if (!strncmp (p, arc_reg_names[i].name, l) && !isalnum (*(p + l)))
+ if (!strncmp (p, arc_reg_names[i].name, l) && !ISALNUM (*(p + l)))
{
input_line_pointer += l + 1;
expressionP->X_op = O_register;
@@ -1881,16 +1880,16 @@ get_arc_exp_reloc_type (data_p, default_type, exp, expnew)
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)
+void
+md_apply_fix3 (fixP, valP, seg)
fixS *fixP;
- valueT *valueP;
+ valueT * valP;
segT seg;
{
#if 0
char *buf = fixP->fx_where + fixP->fx_frag->fr_literal;
#endif
- valueT value;
+ valueT value = * valP;
/* FIXME FIXME FIXME: The value we are passed in *valueP includes
the symbol values. Since we are using BFD_ASSEMBLER, if we are
@@ -1904,13 +1903,10 @@ md_apply_fix3 (fixP, valueP, seg)
result of md_pcrel_from. This is confusing. */
if (fixP->fx_addsy == (symbolS *) NULL)
- {
- value = *valueP;
- fixP->fx_done = 1;
- }
+ fixP->fx_done = 1;
+
else if (fixP->fx_pcrel)
{
- value = *valueP;
/* ELF relocations are against symbols.
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,
@@ -1963,7 +1959,7 @@ md_apply_fix3 (fixP, valueP, seg)
if (fixP->fx_done)
{
/* Nothing else to do here. */
- return 1;
+ return;
}
/* Determine a BFD reloc value based on the operand information.
@@ -1998,7 +1994,7 @@ md_apply_fix3 (fixP, valueP, seg)
as_bad_where (fixP->fx_file, fixP->fx_line,
"unresolved expression that must be resolved");
fixP->fx_done = 1;
- return 1;
+ return;
}
}
else
@@ -2038,8 +2034,6 @@ md_apply_fix3 (fixP, valueP, seg)
}
fixP->fx_addnumber = value;
-
- return 1;
}
/* Translate internal representation of relocation info to BFD target
diff --git a/contrib/binutils/gas/config/tc-arc.h b/contrib/binutils/gas/config/tc-arc.h
index 463400c..f144271 100644
--- a/contrib/binutils/gas/config/tc-arc.h
+++ b/contrib/binutils/gas/config/tc-arc.h
@@ -53,17 +53,13 @@ extern const char *arc_target_format;
#define LISTING_HEADER "ARC GAS "
-#define TC_HANDLES_FX_DONE
-
-#define MD_APPLY_FIX3
-
/* The ARC needs to parse reloc specifiers in .word. */
-extern void arc_parse_cons_expression ();
+extern void arc_parse_cons_expression PARAMS ((struct expressionS *, unsigned));
#define TC_PARSE_CONS_EXPRESSION(EXP, NBYTES) \
arc_parse_cons_expression (EXP, NBYTES)
-extern void arc_cons_fix_new ();
+extern void arc_cons_fix_new PARAMS ((struct frag *, int, int, struct expressionS *));
#define TC_CONS_FIX_NEW(FRAG, WHERE, NBYTES, EXP) \
arc_cons_fix_new (FRAG, WHERE, NBYTES, EXP)
diff --git a/contrib/binutils/gas/config/tc-arm.c b/contrib/binutils/gas/config/tc-arm.c
index a6e13a9..456e8c5 100644
--- a/contrib/binutils/gas/config/tc-arm.c
+++ b/contrib/binutils/gas/config/tc-arm.c
@@ -1,8 +1,9 @@
/* tc-arm.c -- Assemble for the ARM
- Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Contributed by Richard Earnshaw (rwe@pegasus.esprit.ec.org)
Modified by David Taylor (dtaylor@armltd.co.uk)
+ Cirrus coprocessor mods by Aldy Hernandez (aldyh@redhat.com)
This file is part of GAS, the GNU Assembler.
@@ -21,10 +22,10 @@
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"
+#include "safe-ctype.h"
/* Need TARGET_CPU. */
#include "config.h"
@@ -38,84 +39,132 @@
#include "dwarf2dbg.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_EXT_LONGMUL 0x00000010 /* Allow long multiplies. */
-#define ARM_EXT_HALFWORD 0x00000020 /* Allow half word loads. */
-#define ARM_EXT_THUMB 0x00000040 /* Allow BX instruction. */
-#define ARM_EXT_V5 0x00000080 /* Allow CLZ, etc. */
-#define ARM_EXT_V5E 0x00000100 /* "El Segundo". */
-#define ARM_EXT_XSCALE 0x00000200 /* Allow MIA etc. */
-
-/* Architectures are the sum of the base and extensions. */
-#define ARM_ARCH_V3M ARM_EXT_LONGMUL
-#define ARM_ARCH_V4 (ARM_ARCH_V3M | ARM_EXT_HALFWORD)
-#define ARM_ARCH_V4T (ARM_ARCH_V4 | ARM_EXT_THUMB)
-#define ARM_ARCH_V5 (ARM_ARCH_V4 | ARM_EXT_V5)
-#define ARM_ARCH_V5T (ARM_ARCH_V5 | ARM_EXT_THUMB)
-#define ARM_ARCH_V5TE (ARM_ARCH_V5T | ARM_EXT_V5E)
-#define ARM_ARCH_XSCALE (ARM_ARCH_V5TE | ARM_EXT_XSCALE)
+/* XXX Set this to 1 after the next binutils release */
+#define WARN_DEPRECATED 0
+
+/* The following bitmasks control CPU extensions: */
+#define ARM_EXT_V1 0x00000001 /* All processors (core set). */
+#define ARM_EXT_V2 0x00000002 /* Multiply instructions. */
+#define ARM_EXT_V2S 0x00000004 /* SWP instructions. */
+#define ARM_EXT_V3 0x00000008 /* MSR MRS. */
+#define ARM_EXT_V3M 0x00000010 /* Allow long multiplies. */
+#define ARM_EXT_V4 0x00000020 /* Allow half word loads. */
+#define ARM_EXT_V4T 0x00000040 /* Thumb v1. */
+#define ARM_EXT_V5 0x00000080 /* Allow CLZ, etc. */
+#define ARM_EXT_V5T 0x00000100 /* Thumb v2. */
+#define ARM_EXT_V5ExP 0x00000200 /* DSP core set. */
+#define ARM_EXT_V5E 0x00000400 /* DSP Double transfers. */
+#define ARM_EXT_V5J 0x00000800 /* Jazelle extension. */
+
+/* Co-processor space extensions. */
+#define ARM_CEXT_XSCALE 0x00800000 /* Allow MIA etc. */
+#define ARM_CEXT_MAVERICK 0x00400000 /* Use Cirrus/DSP coprocessor. */
+
+/* Architectures are the sum of the base and extensions. The ARM ARM (rev E)
+ defines the following: ARMv3, ARMv3M, ARMv4xM, ARMv4, ARMv4TxM, ARMv4T,
+ ARMv5xM, ARMv5, ARMv5TxM, ARMv5T, ARMv5TExP, ARMv5TE. To these we add
+ three more to cover cores prior to ARM6. Finally, there are cores which
+ implement further extensions in the co-processor space. */
+#define ARM_ARCH_V1 ARM_EXT_V1
+#define ARM_ARCH_V2 (ARM_ARCH_V1 | ARM_EXT_V2)
+#define ARM_ARCH_V2S (ARM_ARCH_V2 | ARM_EXT_V2S)
+#define ARM_ARCH_V3 (ARM_ARCH_V2S | ARM_EXT_V3)
+#define ARM_ARCH_V3M (ARM_ARCH_V3 | ARM_EXT_V3M)
+#define ARM_ARCH_V4xM (ARM_ARCH_V3 | ARM_EXT_V4)
+#define ARM_ARCH_V4 (ARM_ARCH_V3M | ARM_EXT_V4)
+#define ARM_ARCH_V4TxM (ARM_ARCH_V4xM | ARM_EXT_V4T)
+#define ARM_ARCH_V4T (ARM_ARCH_V4 | ARM_EXT_V4T)
+#define ARM_ARCH_V5xM (ARM_ARCH_V4xM | ARM_EXT_V5)
+#define ARM_ARCH_V5 (ARM_ARCH_V4 | ARM_EXT_V5)
+#define ARM_ARCH_V5TxM (ARM_ARCH_V5xM | ARM_EXT_V4T | ARM_EXT_V5T)
+#define ARM_ARCH_V5T (ARM_ARCH_V5 | ARM_EXT_V4T | ARM_EXT_V5T)
+#define ARM_ARCH_V5TExP (ARM_ARCH_V5T | ARM_EXT_V5ExP)
+#define ARM_ARCH_V5TE (ARM_ARCH_V5TExP | ARM_EXT_V5E)
+#define ARM_ARCH_V5TEJ (ARM_ARCH_V5TE | ARM_EXT_V5J)
+
+/* Processors with specific extensions in the co-processor space. */
+#define ARM_ARCH_XSCALE (ARM_ARCH_V5TE | ARM_CEXT_XSCALE)
/* Some useful combinations: */
-#define ARM_ANY 0x00ffffff
-#define ARM_2UP (ARM_ANY - ARM_1)
-#define ARM_ALL ARM_2UP /* Not arm1 only. */
-#define ARM_3UP 0x00fffffc
-#define ARM_6UP 0x00fffff8 /* Includes ARM7. */
+#define ARM_ANY 0x0000ffff /* Any basic core. */
+#define ARM_ALL 0x00ffffff /* Any core + co-processor */
+#define CPROC_ANY 0x00ff0000 /* Any co-processor */
+#define FPU_ANY 0xff000000 /* Note this is ~ARM_ALL. */
+
+
+#define FPU_FPA_EXT_V1 0x80000000 /* Base FPA instruction set. */
+#define FPU_FPA_EXT_V2 0x40000000 /* LFM/SFM. */
+#define FPU_VFP_EXT_NONE 0x20000000 /* Use VFP word-ordering. */
+#define FPU_VFP_EXT_V1xD 0x10000000 /* Base VFP instruction set. */
+#define FPU_VFP_EXT_V1 0x08000000 /* Double-precision insns. */
+#define FPU_VFP_EXT_V2 0x04000000 /* ARM10E VFPr1. */
+#define FPU_NONE 0
-#define FPU_CORE 0x80000000
-#define FPU_FPA10 0x40000000
-#define FPU_FPA11 0x40000000
-#define FPU_NONE 0
+#define FPU_ARCH_FPE FPU_FPA_EXT_V1
+#define FPU_ARCH_FPA (FPU_ARCH_FPE | FPU_FPA_EXT_V2)
-/* Some useful combinations. */
-#define FPU_ALL 0xff000000 /* Note this is ~ARM_ANY. */
-#define FPU_MEMMULTI 0x7f000000 /* Not fpu_core. */
+#define FPU_ARCH_VFP FPU_VFP_EXT_NONE
+#define FPU_ARCH_VFP_V1xD (FPU_VFP_EXT_V1xD | FPU_VFP_EXT_NONE)
+#define FPU_ARCH_VFP_V1 (FPU_ARCH_VFP_V1xD | FPU_VFP_EXT_V1)
+#define FPU_ARCH_VFP_V2 (FPU_ARCH_VFP_V1 | FPU_VFP_EXT_V2)
+
+/* Types of processor to assemble for. */
+#define ARM_1 ARM_ARCH_V1
+#define ARM_2 ARM_ARCH_V2
+#define ARM_3 ARM_ARCH_V2S
+#define ARM_250 ARM_ARCH_V2S
+#define ARM_6 ARM_ARCH_V3
+#define ARM_7 ARM_ARCH_V3
+#define ARM_8 ARM_ARCH_V4
+#define ARM_9 ARM_ARCH_V4T
+#define ARM_STRONG ARM_ARCH_V4
+#define ARM_CPU_MASK 0x0000000f /* XXX? */
#ifndef CPU_DEFAULT
#if defined __XSCALE__
-#define CPU_DEFAULT (ARM_9 | ARM_ARCH_XSCALE)
+#define CPU_DEFAULT (ARM_ARCH_XSCALE)
#else
#if defined __thumb__
-#define CPU_DEFAULT (ARM_7 | ARM_ARCH_V4T)
+#define CPU_DEFAULT (ARM_ARCH_V5T)
#else
-#define CPU_DEFAULT ARM_ALL
+#define CPU_DEFAULT ARM_ANY
#endif
#endif
#endif
+/* For backwards compatibility we default to the FPA. */
#ifndef FPU_DEFAULT
-#define FPU_DEFAULT FPU_ALL
+#define FPU_DEFAULT FPU_ARCH_FPA
#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 unsigned long cpu_variant;
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 atpcs = false;
-static boolean support_interwork = false;
-static boolean uses_apcs_float = false;
-static boolean pic_code = false;
-#endif
+static int uses_apcs_26 = false;
+static int atpcs = false;
+static int support_interwork = false;
+static int uses_apcs_float = false;
+static int pic_code = false;
+
+/* Variables that we set while parsing command-line options. Once all
+ options have been read we re-process these values to set the real
+ assembly flags. */
+static int legacy_cpu = -1;
+static int legacy_fpu = -1;
+
+static int mcpu_cpu_opt = -1;
+static int mcpu_fpu_opt = -1;
+static int march_cpu_opt = -1;
+static int march_fpu_opt = -1;
+static int mfpu_opt = -1;
/* 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[] = "@";
+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'
@@ -124,19 +173,19 @@ CONST char comment_chars[] = "@";
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[] = "#";
+const char line_comment_chars[] = "#";
-CONST char line_separator_chars[] = ";";
+const char line_separator_chars[] = ";";
/* Chars that can be used to separate mant
from exp in floating point numbers. */
-CONST char EXP_CHARS[] = "eE";
+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";
+const char FLT_CHARS[] = "rRsSfFdDxXeEpP";
/* Prefix characters that indicate the start of an immediate
value. */
@@ -148,7 +197,7 @@ symbolS * GOT_symbol;
#endif
/* Size of relocation record. */
-CONST int md_reloc_size = 8;
+const int md_reloc_size = 8;
/* 0: assemble for ARM,
1: assemble for Thumb,
@@ -163,9 +212,8 @@ typedef struct arm_fix
struct arm_it
{
- CONST char * error;
+ const char * error;
unsigned long instruction;
- int suffix;
int size;
struct
{
@@ -230,7 +278,7 @@ static const struct asm_shift_name shift_names [] =
#define NUM_FLOAT_VALS 8
-CONST char * fp_const[] =
+const char * fp_const[] =
{
"0.0", "1.0", "2.0", "3.0", "4.0", "5.0", "0.5", "10.0", 0
};
@@ -243,6 +291,10 @@ LITTLENUM_TYPE fp_values[NUM_FLOAT_VALS][MAX_LITTLENUMS];
#define FAIL (-1)
#define SUCCESS (0)
+/* Whether a Co-processor load/store operation accepts write-back forms. */
+#define CP_WB_OK 1
+#define CP_NO_WB 0
+
#define SUFF_S 1
#define SUFF_D 2
#define SUFF_E 3
@@ -256,20 +308,19 @@ LITTLENUM_TYPE fp_values[NUM_FLOAT_VALS][MAX_LITTLENUMS];
#define CONDS_BIT 0x00100000
#define LOAD_BIT 0x00100000
-#define TRANS_BIT 0x00200000
#define DOUBLE_LOAD_FLAG 0x00000001
struct asm_cond
{
- CONST char * template;
+ const char * template;
unsigned long value;
};
-/* This is to save a hash look-up in the common case. */
#define COND_ALWAYS 0xe0000000
+#define COND_MASK 0xf0000000
-static CONST struct asm_cond conds[] =
+static const struct asm_cond conds[] =
{
{"eq", 0x00000000},
{"ne", 0x10000000},
@@ -289,140 +340,9 @@ static CONST struct asm_cond conds[] =
{"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[] =
-{
- {"d", DOUBLE_LOAD_FLAG},
- {"b", 0x00400000},
- {"t", TRANS_BIT},
- {"bt", 0x00400000 | TRANS_BIT},
- {"h", 0x801000b0},
- {"sh", 0x801000f0},
- {"sb", 0x801000d0},
- {NULL, 0}
-};
-
-static CONST struct asm_flg str_flags[] =
-{
- {"d", DOUBLE_LOAD_FLAG},
- {"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", 0x00000000},
- {"ib", 0x01800000},
- {"ia", 0x00800000},
- {"db", 0x01000000},
- {"da", 0x00000000},
- {NULL, 0}
-};
-
-static CONST struct asm_flg stm_flags[] =
-{
- {"ed", 0x00000000},
- {"fd", 0x01000000},
- {"ea", 0x00800000},
- {"fa", 0x01800000},
- {"ib", 0x01800000},
- {"ia", 0x00800000},
- {"db", 0x01000000},
- {"da", 0x00000000},
- {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;
+ const char * template;
boolean cpsr;
unsigned long field;
};
@@ -438,7 +358,7 @@ struct asm_psr
#define PSR_s (1 << 2)
#define PSR_f (1 << 3)
-static CONST struct asm_psr psrs[] =
+static const struct asm_psr psrs[] =
{
{"CPSR", true, PSR_c | PSR_f},
{"CPSR_all", true, PSR_c | PSR_f},
@@ -579,77 +499,395 @@ static CONST struct asm_psr psrs[] =
{"SPSR_cxsf", false, PSR_c | PSR_x | PSR_s | PSR_f},
};
+enum vfp_dp_reg_pos
+{
+ VFP_REG_Dd, VFP_REG_Dm, VFP_REG_Dn
+};
+
+enum vfp_sp_reg_pos
+{
+ VFP_REG_Sd, VFP_REG_Sm, VFP_REG_Sn
+};
+
+enum vfp_ldstm_type
+{
+ VFP_LDSTMIA, VFP_LDSTMDB, VFP_LDSTMIAX, VFP_LDSTMDBX
+};
+
+/* VFP system registers. */
+struct vfp_reg
+{
+ const char *name;
+ unsigned long regno;
+};
+
+static const struct vfp_reg vfp_regs[] =
+{
+ {"fpsid", 0x00000000},
+ {"FPSID", 0x00000000},
+ {"fpscr", 0x00010000},
+ {"FPSCR", 0x00010000},
+ {"fpexc", 0x00080000},
+ {"FPEXC", 0x00080000}
+};
+
+/* Structure for a hash table entry for a register. */
+struct reg_entry
+{
+ const char * name;
+ int number;
+};
+
+/* Some well known registers that we refer to directly elsewhere. */
+#define REG_SP 13
+#define REG_LR 14
+#define REG_PC 15
+
+/* These are the standard names. Users can add aliases with .req. */
+/* Integer Register Numbers. */
+static const struct reg_entry rn_table[] =
+{
+ {"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},
+ /* ATPCS Synonyms. */
+ {"a1", 0}, {"a2", 1}, {"a3", 2}, {"a4", 3},
+ {"v1", 4}, {"v2", 5}, {"v3", 6}, {"v4", 7},
+ {"v5", 8}, {"v6", 9}, {"v7", 10}, {"v8", 11},
+ /* Well-known aliases. */
+ {"wr", 7},
+ {"sb", 9}, {"sl", 10}, {"fp", 11},
+ {"ip", 12}, {"sp", REG_SP}, {"lr", REG_LR}, {"pc", REG_PC},
+ {NULL, 0}
+};
+
+/* Co-processor Numbers. */
+static const struct reg_entry cp_table[] =
+{
+ {"p0", 0}, {"p1", 1}, {"p2", 2}, {"p3", 3},
+ {"p4", 4}, {"p5", 5}, {"p6", 6}, {"p7", 7},
+ {"p8", 8}, {"p9", 9}, {"p10", 10}, {"p11", 11},
+ {"p12", 12}, {"p13", 13}, {"p14", 14}, {"p15", 15},
+ {NULL, 0}
+};
+
+/* Co-processor Register Numbers. */
+static const struct reg_entry cn_table[] =
+{
+ {"c0", 0}, {"c1", 1}, {"c2", 2}, {"c3", 3},
+ {"c4", 4}, {"c5", 5}, {"c6", 6}, {"c7", 7},
+ {"c8", 8}, {"c9", 9}, {"c10", 10}, {"c11", 11},
+ {"c12", 12}, {"c13", 13}, {"c14", 14}, {"c15", 15},
+ /* Not really valid, but kept for back-wards compatibility. */
+ {"cr0", 0}, {"cr1", 1}, {"cr2", 2}, {"cr3", 3},
+ {"cr4", 4}, {"cr5", 5}, {"cr6", 6}, {"cr7", 7},
+ {"cr8", 8}, {"cr9", 9}, {"cr10", 10}, {"cr11", 11},
+ {"cr12", 12}, {"cr13", 13}, {"cr14", 14}, {"cr15", 15},
+ {NULL, 0}
+};
+
+/* FPA Registers. */
+static const struct reg_entry fn_table[] =
+{
+ {"f0", 0}, {"f1", 1}, {"f2", 2}, {"f3", 3},
+ {"f4", 4}, {"f5", 5}, {"f6", 6}, {"f7", 7},
+ {NULL, 0}
+};
+
+/* VFP SP Registers. */
+static const struct reg_entry sn_table[] =
+{
+ {"s0", 0}, {"s1", 1}, {"s2", 2}, {"s3", 3},
+ {"s4", 4}, {"s5", 5}, {"s6", 6}, {"s7", 7},
+ {"s8", 8}, {"s9", 9}, {"s10", 10}, {"s11", 11},
+ {"s12", 12}, {"s13", 13}, {"s14", 14}, {"s15", 15},
+ {"s16", 16}, {"s17", 17}, {"s18", 18}, {"s19", 19},
+ {"s20", 20}, {"s21", 21}, {"s22", 22}, {"s23", 23},
+ {"s24", 24}, {"s25", 25}, {"s26", 26}, {"s27", 27},
+ {"s28", 28}, {"s29", 29}, {"s30", 30}, {"s31", 31},
+ {NULL, 0}
+};
+
+/* VFP DP Registers. */
+static const struct reg_entry dn_table[] =
+{
+ {"d0", 0}, {"d1", 1}, {"d2", 2}, {"d3", 3},
+ {"d4", 4}, {"d5", 5}, {"d6", 6}, {"d7", 7},
+ {"d8", 8}, {"d9", 9}, {"d10", 10}, {"d11", 11},
+ {"d12", 12}, {"d13", 13}, {"d14", 14}, {"d15", 15},
+ {NULL, 0}
+};
+
+/* Maverick DSP coprocessor registers. */
+static const struct reg_entry mav_mvf_table[] =
+{
+ {"mvf0", 0}, {"mvf1", 1}, {"mvf2", 2}, {"mvf3", 3},
+ {"mvf4", 4}, {"mvf5", 5}, {"mvf6", 6}, {"mvf7", 7},
+ {"mvf8", 8}, {"mvf9", 9}, {"mvf10", 10}, {"mvf11", 11},
+ {"mvf12", 12}, {"mvf13", 13}, {"mvf14", 14}, {"mvf15", 15},
+ {NULL, 0}
+};
+
+static const struct reg_entry mav_mvd_table[] =
+{
+ {"mvd0", 0}, {"mvd1", 1}, {"mvd2", 2}, {"mvd3", 3},
+ {"mvd4", 4}, {"mvd5", 5}, {"mvd6", 6}, {"mvd7", 7},
+ {"mvd8", 8}, {"mvd9", 9}, {"mvd10", 10}, {"mvd11", 11},
+ {"mvd12", 12}, {"mvd13", 13}, {"mvd14", 14}, {"mvd15", 15},
+ {NULL, 0}
+};
+
+static const struct reg_entry mav_mvfx_table[] =
+{
+ {"mvfx0", 0}, {"mvfx1", 1}, {"mvfx2", 2}, {"mvfx3", 3},
+ {"mvfx4", 4}, {"mvfx5", 5}, {"mvfx6", 6}, {"mvfx7", 7},
+ {"mvfx8", 8}, {"mvfx9", 9}, {"mvfx10", 10}, {"mvfx11", 11},
+ {"mvfx12", 12}, {"mvfx13", 13}, {"mvfx14", 14}, {"mvfx15", 15},
+ {NULL, 0}
+};
+
+static const struct reg_entry mav_mvdx_table[] =
+{
+ {"mvdx0", 0}, {"mvdx1", 1}, {"mvdx2", 2}, {"mvdx3", 3},
+ {"mvdx4", 4}, {"mvdx5", 5}, {"mvdx6", 6}, {"mvdx7", 7},
+ {"mvdx8", 8}, {"mvdx9", 9}, {"mvdx10", 10}, {"mvdx11", 11},
+ {"mvdx12", 12}, {"mvdx13", 13}, {"mvdx14", 14}, {"mvdx15", 15},
+ {NULL, 0}
+};
+
+static const struct reg_entry mav_mvax_table[] =
+{
+ {"mvax0", 0}, {"mvax1", 1}, {"mvax2", 2}, {"mvax3", 3},
+ {NULL, 0}
+};
+
+static const struct reg_entry mav_dspsc_table[] =
+{
+ {"dspsc", 0},
+ {NULL, 0}
+};
+
+struct reg_map
+{
+ const struct reg_entry *names;
+ int max_regno;
+ struct hash_control *htab;
+ const char *expected;
+};
+
+struct reg_map all_reg_maps[] =
+{
+ {rn_table, 15, NULL, N_("ARM register expected")},
+ {cp_table, 15, NULL, N_("bad or missing co-processor number")},
+ {cn_table, 15, NULL, N_("co-processor register expected")},
+ {fn_table, 7, NULL, N_("FPA register expected")},
+ {sn_table, 31, NULL, N_("VFP single precision register expected")},
+ {dn_table, 15, NULL, N_("VFP double precision register expected")},
+ {mav_mvf_table, 15, NULL, N_("Maverick MVF register expected")},
+ {mav_mvd_table, 15, NULL, N_("Maverick MVD register expected")},
+ {mav_mvfx_table, 15, NULL, N_("Maverick MVFX register expected")},
+ {mav_mvdx_table, 15, NULL, N_("Maverick MVFX register expected")},
+ {mav_mvax_table, 3, NULL, N_("Maverick MVAX register expected")},
+ {mav_dspsc_table, 0, NULL, N_("Maverick DSPSC register expected")},
+};
+
+/* Enumeration matching entries in table above. */
+enum arm_reg_type
+{
+ REG_TYPE_RN = 0,
+#define REG_TYPE_FIRST REG_TYPE_RN
+ REG_TYPE_CP = 1,
+ REG_TYPE_CN = 2,
+ REG_TYPE_FN = 3,
+ REG_TYPE_SN = 4,
+ REG_TYPE_DN = 5,
+ REG_TYPE_MVF = 6,
+ REG_TYPE_MVD = 7,
+ REG_TYPE_MVFX = 8,
+ REG_TYPE_MVDX = 9,
+ REG_TYPE_MVAX = 10,
+ REG_TYPE_DSPSC = 11,
+
+ REG_TYPE_MAX = 12
+};
+
/* 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));
+static void do_arit PARAMS ((char *));
+static void do_cmp PARAMS ((char *));
+static void do_mov PARAMS ((char *));
+static void do_ldst PARAMS ((char *));
+static void do_ldstt PARAMS ((char *));
+static void do_ldmstm PARAMS ((char *));
+static void do_branch PARAMS ((char *));
+static void do_swi PARAMS ((char *));
+
/* 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));
-
-/* ARM_EXT_XScale. */
-static void do_mia PARAMS ((char *, unsigned long));
-static void do_mar PARAMS ((char *, unsigned long));
-static void do_mra PARAMS ((char *, unsigned long));
-static void do_pld PARAMS ((char *, unsigned long));
-static void do_ldrd PARAMS ((char *, unsigned long));
-
-/* ARM_EXT_V5. */
-static void do_blx PARAMS ((char *, unsigned long));
-static void do_bkpt PARAMS ((char *, unsigned long));
-static void do_clz PARAMS ((char *, unsigned long));
-static void do_lstc2 PARAMS ((char *, unsigned long));
-static void do_cdp2 PARAMS ((char *, unsigned long));
-static void do_co_reg2 PARAMS ((char *, unsigned long));
+static void do_adr PARAMS ((char *));
+static void do_adrl PARAMS ((char *));
+static void do_empty PARAMS ((char *));
-static void do_t_blx PARAMS ((char *));
-static void do_t_bkpt PARAMS ((char *));
+/* ARM v2. */
+static void do_mul PARAMS ((char *));
+static void do_mla PARAMS ((char *));
+
+/* ARM v2S. */
+static void do_swap PARAMS ((char *));
+
+/* ARM v3. */
+static void do_msr PARAMS ((char *));
+static void do_mrs PARAMS ((char *));
+
+/* ARM v3M. */
+static void do_mull PARAMS ((char *));
-/* ARM_EXT_V5E. */
-static void do_smla PARAMS ((char *, unsigned long));
-static void do_smlal PARAMS ((char *, unsigned long));
-static void do_smul PARAMS ((char *, unsigned long));
-static void do_qadd PARAMS ((char *, unsigned long));
-static void do_co_reg2c PARAMS ((char *, unsigned long));
+/* ARM v4. */
+static void do_ldstv4 PARAMS ((char *));
+
+/* ARM v4T. */
+static void do_bx PARAMS ((char *));
+
+/* ARM v5T. */
+static void do_blx PARAMS ((char *));
+static void do_bkpt PARAMS ((char *));
+static void do_clz PARAMS ((char *));
+static void do_lstc2 PARAMS ((char *));
+static void do_cdp2 PARAMS ((char *));
+static void do_co_reg2 PARAMS ((char *));
+
+/* ARM v5TExP. */
+static void do_smla PARAMS ((char *));
+static void do_smlal PARAMS ((char *));
+static void do_smul PARAMS ((char *));
+static void do_qadd PARAMS ((char *));
+
+/* ARM v5TE. */
+static void do_pld PARAMS ((char *));
+static void do_ldrd PARAMS ((char *));
+static void do_co_reg2c PARAMS ((char *));
+
+/* ARM v5TEJ. */
+static void do_bxj PARAMS ((char *));
/* 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 CONST struct asm_psr * arm_psr_parse PARAMS ((char **));
-static void symbol_locate PARAMS ((symbolS *, CONST char *, segT, valueT, fragS *));
+static void do_cdp PARAMS ((char *));
+static void do_lstc PARAMS ((char *));
+static void do_co_reg PARAMS ((char *));
+
+/* FPA instructions. */
+static void do_fpa_ctrl PARAMS ((char *));
+static void do_fpa_ldst PARAMS ((char *));
+static void do_fpa_ldmstm PARAMS ((char *));
+static void do_fpa_dyadic PARAMS ((char *));
+static void do_fpa_monadic PARAMS ((char *));
+static void do_fpa_cmp PARAMS ((char *));
+static void do_fpa_from_reg PARAMS ((char *));
+static void do_fpa_to_reg PARAMS ((char *));
+
+/* VFP instructions. */
+static void do_vfp_sp_monadic PARAMS ((char *));
+static void do_vfp_dp_monadic PARAMS ((char *));
+static void do_vfp_sp_dyadic PARAMS ((char *));
+static void do_vfp_dp_dyadic PARAMS ((char *));
+static void do_vfp_reg_from_sp PARAMS ((char *));
+static void do_vfp_sp_from_reg PARAMS ((char *));
+static void do_vfp_sp_reg2 PARAMS ((char *));
+static void do_vfp_reg_from_dp PARAMS ((char *));
+static void do_vfp_reg2_from_dp PARAMS ((char *));
+static void do_vfp_dp_from_reg PARAMS ((char *));
+static void do_vfp_dp_from_reg2 PARAMS ((char *));
+static void do_vfp_reg_from_ctrl PARAMS ((char *));
+static void do_vfp_ctrl_from_reg PARAMS ((char *));
+static void do_vfp_sp_ldst PARAMS ((char *));
+static void do_vfp_dp_ldst PARAMS ((char *));
+static void do_vfp_sp_ldstmia PARAMS ((char *));
+static void do_vfp_sp_ldstmdb PARAMS ((char *));
+static void do_vfp_dp_ldstmia PARAMS ((char *));
+static void do_vfp_dp_ldstmdb PARAMS ((char *));
+static void do_vfp_xp_ldstmia PARAMS ((char *));
+static void do_vfp_xp_ldstmdb PARAMS ((char *));
+static void do_vfp_sp_compare_z PARAMS ((char *));
+static void do_vfp_dp_compare_z PARAMS ((char *));
+static void do_vfp_dp_sp_cvt PARAMS ((char *));
+static void do_vfp_sp_dp_cvt PARAMS ((char *));
+
+/* XScale. */
+static void do_xsc_mia PARAMS ((char *));
+static void do_xsc_mar PARAMS ((char *));
+static void do_xsc_mra PARAMS ((char *));
+
+/* Maverick. */
+static void do_mav_binops PARAMS ((char *, int, enum arm_reg_type,
+ enum arm_reg_type));
+static void do_mav_binops_1a PARAMS ((char *));
+static void do_mav_binops_1b PARAMS ((char *));
+static void do_mav_binops_1c PARAMS ((char *));
+static void do_mav_binops_1d PARAMS ((char *));
+static void do_mav_binops_1e PARAMS ((char *));
+static void do_mav_binops_1f PARAMS ((char *));
+static void do_mav_binops_1g PARAMS ((char *));
+static void do_mav_binops_1h PARAMS ((char *));
+static void do_mav_binops_1i PARAMS ((char *));
+static void do_mav_binops_1j PARAMS ((char *));
+static void do_mav_binops_1k PARAMS ((char *));
+static void do_mav_binops_1l PARAMS ((char *));
+static void do_mav_binops_1m PARAMS ((char *));
+static void do_mav_binops_1n PARAMS ((char *));
+static void do_mav_binops_1o PARAMS ((char *));
+static void do_mav_binops_2a PARAMS ((char *));
+static void do_mav_binops_2b PARAMS ((char *));
+static void do_mav_binops_2c PARAMS ((char *));
+static void do_mav_binops_3a PARAMS ((char *));
+static void do_mav_binops_3b PARAMS ((char *));
+static void do_mav_binops_3c PARAMS ((char *));
+static void do_mav_binops_3d PARAMS ((char *));
+static void do_mav_triple PARAMS ((char *, int, enum arm_reg_type,
+ enum arm_reg_type,
+ enum arm_reg_type));
+static void do_mav_triple_4a PARAMS ((char *));
+static void do_mav_triple_4b PARAMS ((char *));
+static void do_mav_triple_5a PARAMS ((char *));
+static void do_mav_triple_5b PARAMS ((char *));
+static void do_mav_triple_5c PARAMS ((char *));
+static void do_mav_triple_5d PARAMS ((char *));
+static void do_mav_triple_5e PARAMS ((char *));
+static void do_mav_triple_5f PARAMS ((char *));
+static void do_mav_triple_5g PARAMS ((char *));
+static void do_mav_triple_5h PARAMS ((char *));
+static void do_mav_quad PARAMS ((char *, int, enum arm_reg_type,
+ enum arm_reg_type,
+ enum arm_reg_type,
+ enum arm_reg_type));
+static void do_mav_quad_6a PARAMS ((char *));
+static void do_mav_quad_6b PARAMS ((char *));
+static void do_mav_dspsc_1 PARAMS ((char *));
+static void do_mav_dspsc_2 PARAMS ((char *));
+static void do_mav_shift PARAMS ((char *, enum arm_reg_type,
+ enum arm_reg_type));
+static void do_mav_shift_1 PARAMS ((char *));
+static void do_mav_shift_2 PARAMS ((char *));
+static void do_mav_ldst PARAMS ((char *, enum arm_reg_type));
+static void do_mav_ldst_1 PARAMS ((char *));
+static void do_mav_ldst_2 PARAMS ((char *));
+static void do_mav_ldst_3 PARAMS ((char *));
+static void do_mav_ldst_4 PARAMS ((char *));
+
+static int mav_reg_required_here PARAMS ((char **, int,
+ enum arm_reg_type));
+static int mav_parse_offset PARAMS ((char **, int *));
+
+static void fix_new_arm PARAMS ((fragS *, int, short, expressionS *,
+ int, int));
+static int arm_reg_parse PARAMS ((char **, struct hash_control *));
+static enum arm_reg_type arm_reg_parse_any PARAMS ((char *));
+static const struct asm_psr * 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 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 *));
@@ -659,8 +897,16 @@ 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 vfp_sp_reg_required_here PARAMS ((char **, enum vfp_sp_reg_pos));
+static int vfp_dp_reg_required_here PARAMS ((char **, enum vfp_dp_reg_pos));
+static void vfp_sp_ldstm PARAMS ((char *, enum vfp_ldstm_type));
+static void vfp_dp_ldstm PARAMS ((char *, enum vfp_ldstm_type));
+static long vfp_sp_reg_list PARAMS ((char **, enum vfp_sp_reg_pos));
+static long vfp_dp_reg_list PARAMS ((char **));
+static int vfp_psr_required_here PARAMS ((char **str));
+static const struct vfp_reg *vfp_psr_parse PARAMS ((char **str));
static int cp_address_offset PARAMS ((char **));
-static int cp_address_required_here PARAMS ((char **));
+static int cp_address_required_here PARAMS ((char **, int));
static int my_get_float_expression PARAMS ((char **));
static int skip_past_comma PARAMS ((char **));
static int walk_no_bignums PARAMS ((symbolS *));
@@ -670,15 +916,24 @@ 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 int ldst_extend PARAMS ((char **));
+static int ldst_extend_v4 PARAMS ((char **));
static void thumb_add_sub PARAMS ((char *, int));
-static void insert_reg PARAMS ((int));
+static void insert_reg PARAMS ((const struct reg_entry *,
+ struct hash_control *));
static void thumb_shift PARAMS ((char *, int));
static void thumb_mov_compare PARAMS ((char *, int));
+static void build_arm_ops_hsh PARAMS ((void));
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));
+static void build_reg_hsh PARAMS ((struct reg_map *));
+static void insert_reg_alias PARAMS ((char *, int, struct hash_control *));
+static int create_register_alias PARAMS ((char *, char *));
+static void output_inst PARAMS ((const char *));
+static int accum0_required_here PARAMS ((char **));
+static int ld_mode_required_here PARAMS ((char **));
+static void do_branch25 PARAMS ((char *));
+static symbolS * find_real_start PARAMS ((symbolS *));
#ifdef OBJ_ELF
static bfd_reloc_code_real_type arm_parse_reloc PARAMS ((void));
#endif
@@ -687,202 +942,869 @@ static bfd_reloc_code_real_type arm_parse_reloc PARAMS ((void));
take 2: */
#define INSN_SIZE 4
-/* LONGEST_INST is the longest basic instruction name without
- conditions or flags. ARM7M has 4 of length 5. El Segundo
- has one basic instruction name of length 7 (SMLALxy). */
-#define LONGEST_INST 7
+/* "INSN<cond> X,Y" where X:bit12, Y:bit16. */
+#define MAV_MODE1 0x100c
+
+/* "INSN<cond> X,Y" where X:bit16, Y:bit12. */
+#define MAV_MODE2 0x0c10
+
+/* "INSN<cond> X,Y" where X:0, Y:bit16. */
+#define MAV_MODE3 0x1000
+
+/* "INSN<cond> X,Y,Z" where X:16, Y:0, Z:12. */
+#define MAV_MODE4 0x0c0010
+
+/* "INSN<cond> X,Y,Z" where X:12, Y:16, Z:0. */
+#define MAV_MODE5 0x00100c
+
+/* "INSN<cond> W,X,Y,Z" where W:5, X:12, Y:16, Z:0. */
+#define MAV_MODE6 0x00100c05
struct asm_opcode
{
/* Basic string to match. */
- CONST char * template;
+ const char * template;
/* Basic instruction code. */
unsigned long value;
- /* Compulsory suffix that must follow conds. If "", then the
- instruction is not conditional and must have no suffix. */
- CONST char * comp_suffix;
+ /* Offset into the template where the condition code (if any) will be.
+ If zero, then the instruction is never conditional. */
+ unsigned cond_offset;
- /* Bits to toggle if flag 'n' set. */
- CONST struct asm_flg * flags;
-
- /* Which CPU variants this exists for. */
- unsigned long variants;
+ /* Which architecture variant provides this instruction. */
+ unsigned long variant;
/* Function to call to parse args. */
- void (* parms) PARAMS ((char *, unsigned long));
+ void (* parms) PARAMS ((char *));
};
-static CONST struct asm_opcode insns[] =
-{
-/* Intel XScale extensions to ARM V5 ISA. */
- {"mia", 0x0e200010, NULL, NULL, ARM_EXT_XSCALE, do_mia},
- {"miaph", 0x0e280010, NULL, NULL, ARM_EXT_XSCALE, do_mia},
- {"miabb", 0x0e2c0010, NULL, NULL, ARM_EXT_XSCALE, do_mia},
- {"miabt", 0x0e2d0010, NULL, NULL, ARM_EXT_XSCALE, do_mia},
- {"miatb", 0x0e2e0010, NULL, NULL, ARM_EXT_XSCALE, do_mia},
- {"miatt", 0x0e2f0010, NULL, NULL, ARM_EXT_XSCALE, do_mia},
- {"mar", 0x0c400000, NULL, NULL, ARM_EXT_XSCALE, do_mar},
- {"mra", 0x0c500000, NULL, NULL, ARM_EXT_XSCALE, do_mra},
- {"pld", 0xf450f000, "", NULL, ARM_EXT_XSCALE, do_pld},
- {"ldr", 0x000000d0, NULL, ldr_flags, ARM_ANY, do_ldrd},
- {"str", 0x000000f0, NULL, str_flags, ARM_ANY, do_ldrd},
-
-/* ARM Instructions. */
- {"and", 0x00000000, NULL, s_flag, ARM_ANY, do_arit},
- {"eor", 0x00200000, NULL, s_flag, ARM_ANY, do_arit},
- {"sub", 0x00400000, NULL, s_flag, ARM_ANY, do_arit},
- {"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},
+static const struct asm_opcode insns[] =
+{
+ /* Core ARM Instructions. */
+ {"and", 0xe0000000, 3, ARM_EXT_V1, do_arit},
+ {"ands", 0xe0100000, 3, ARM_EXT_V1, do_arit},
+ {"eor", 0xe0200000, 3, ARM_EXT_V1, do_arit},
+ {"eors", 0xe0300000, 3, ARM_EXT_V1, do_arit},
+ {"sub", 0xe0400000, 3, ARM_EXT_V1, do_arit},
+ {"subs", 0xe0500000, 3, ARM_EXT_V1, do_arit},
+ {"rsb", 0xe0600000, 3, ARM_EXT_V1, do_arit},
+ {"rsbs", 0xe0700000, 3, ARM_EXT_V1, do_arit},
+ {"add", 0xe0800000, 3, ARM_EXT_V1, do_arit},
+ {"adds", 0xe0900000, 3, ARM_EXT_V1, do_arit},
+ {"adc", 0xe0a00000, 3, ARM_EXT_V1, do_arit},
+ {"adcs", 0xe0b00000, 3, ARM_EXT_V1, do_arit},
+ {"sbc", 0xe0c00000, 3, ARM_EXT_V1, do_arit},
+ {"sbcs", 0xe0d00000, 3, ARM_EXT_V1, do_arit},
+ {"rsc", 0xe0e00000, 3, ARM_EXT_V1, do_arit},
+ {"rscs", 0xe0f00000, 3, ARM_EXT_V1, do_arit},
+ {"orr", 0xe1800000, 3, ARM_EXT_V1, do_arit},
+ {"orrs", 0xe1900000, 3, ARM_EXT_V1, do_arit},
+ {"bic", 0xe1c00000, 3, ARM_EXT_V1, do_arit},
+ {"bics", 0xe1d00000, 3, ARM_EXT_V1, do_arit},
+
+ {"tst", 0xe1100000, 3, ARM_EXT_V1, do_cmp},
+ {"tsts", 0xe1100000, 3, ARM_EXT_V1, do_cmp},
+ {"tstp", 0xe110f000, 3, ARM_EXT_V1, do_cmp},
+ {"teq", 0xe1300000, 3, ARM_EXT_V1, do_cmp},
+ {"teqs", 0xe1300000, 3, ARM_EXT_V1, do_cmp},
+ {"teqp", 0xe130f000, 3, ARM_EXT_V1, do_cmp},
+ {"cmp", 0xe1500000, 3, ARM_EXT_V1, do_cmp},
+ {"cmps", 0xe1500000, 3, ARM_EXT_V1, do_cmp},
+ {"cmpp", 0xe150f000, 3, ARM_EXT_V1, do_cmp},
+ {"cmn", 0xe1700000, 3, ARM_EXT_V1, do_cmp},
+ {"cmns", 0xe1700000, 3, ARM_EXT_V1, do_cmp},
+ {"cmnp", 0xe170f000, 3, ARM_EXT_V1, do_cmp},
+
+ {"mov", 0xe1a00000, 3, ARM_EXT_V1, do_mov},
+ {"movs", 0xe1b00000, 3, ARM_EXT_V1, do_mov},
+ {"mvn", 0xe1e00000, 3, ARM_EXT_V1, do_mov},
+ {"mvns", 0xe1f00000, 3, ARM_EXT_V1, do_mov},
+
+ {"ldr", 0xe4100000, 3, ARM_EXT_V1, do_ldst},
+ {"ldrb", 0xe4500000, 3, ARM_EXT_V1, do_ldst},
+ {"ldrt", 0xe4300000, 3, ARM_EXT_V1, do_ldstt},
+ {"ldrbt", 0xe4700000, 3, ARM_EXT_V1, do_ldstt},
+ {"str", 0xe4000000, 3, ARM_EXT_V1, do_ldst},
+ {"strb", 0xe4400000, 3, ARM_EXT_V1, do_ldst},
+ {"strt", 0xe4200000, 3, ARM_EXT_V1, do_ldstt},
+ {"strbt", 0xe4600000, 3, ARM_EXT_V1, do_ldstt},
+
+ {"stmia", 0xe8800000, 3, ARM_EXT_V1, do_ldmstm},
+ {"stmib", 0xe9800000, 3, ARM_EXT_V1, do_ldmstm},
+ {"stmda", 0xe8000000, 3, ARM_EXT_V1, do_ldmstm},
+ {"stmdb", 0xe9000000, 3, ARM_EXT_V1, do_ldmstm},
+ {"stmfd", 0xe9000000, 3, ARM_EXT_V1, do_ldmstm},
+ {"stmfa", 0xe9800000, 3, ARM_EXT_V1, do_ldmstm},
+ {"stmea", 0xe8800000, 3, ARM_EXT_V1, do_ldmstm},
+ {"stmed", 0xe8000000, 3, ARM_EXT_V1, do_ldmstm},
+
+ {"ldmia", 0xe8900000, 3, ARM_EXT_V1, do_ldmstm},
+ {"ldmib", 0xe9900000, 3, ARM_EXT_V1, do_ldmstm},
+ {"ldmda", 0xe8100000, 3, ARM_EXT_V1, do_ldmstm},
+ {"ldmdb", 0xe9100000, 3, ARM_EXT_V1, do_ldmstm},
+ {"ldmfd", 0xe8900000, 3, ARM_EXT_V1, do_ldmstm},
+ {"ldmfa", 0xe8100000, 3, ARM_EXT_V1, do_ldmstm},
+ {"ldmea", 0xe9100000, 3, ARM_EXT_V1, do_ldmstm},
+ {"ldmed", 0xe9900000, 3, ARM_EXT_V1, do_ldmstm},
+
+ {"swi", 0xef000000, 3, ARM_EXT_V1, do_swi},
#ifdef TE_WINCE
- {"bl", 0x0b000000, NULL, NULL, ARM_ANY, do_branch},
- {"b", 0x0a000000, NULL, NULL, ARM_ANY, do_branch},
+ /* XXX This is the wrong place to do this. Think multi-arch. */
+ {"bl", 0xeb000000, 2, ARM_EXT_V1, do_branch},
+ {"b", 0xea000000, 1, ARM_EXT_V1, do_branch},
#else
- {"bl", 0x0bfffffe, NULL, NULL, ARM_ANY, do_branch},
- {"b", 0x0afffffe, NULL, NULL, ARM_ANY, do_branch},
+ {"bl", 0xebfffffe, 2, ARM_EXT_V1, do_branch},
+ {"b", 0xeafffffe, 1, ARM_EXT_V1, 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 through 19 are
- handled by the PSR_xxx defines above. */
-
-/* ARM 7M long multiplies - need signed/unsigned flags! */
- {"smull", 0x00c00090, NULL, s_flag, ARM_EXT_LONGMUL, do_mull},
- {"umull", 0x00800090, NULL, s_flag, ARM_EXT_LONGMUL, do_mull},
- {"smlal", 0x00e00090, NULL, s_flag, ARM_EXT_LONGMUL, do_mull},
- {"umlal", 0x00a00090, NULL, s_flag, ARM_EXT_LONGMUL, do_mull},
-
-/* ARM THUMB interworking. */
- {"bx", 0x012fff10, NULL, NULL, ARM_EXT_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},
-
-/* ARM ISA extension 5. */
-/* Note: blx is actually 2 opcodes, so the .value is set dynamically.
- And it's sometimes conditional and sometimes not. */
- {"blx", 0, NULL, NULL, ARM_EXT_V5, do_blx},
- {"clz", 0x016f0f10, NULL, NULL, ARM_EXT_V5, do_clz},
- {"bkpt", 0xe1200070, "", NULL, ARM_EXT_V5, do_bkpt},
- {"ldc2", 0xfc100000, "", cplong_flag, ARM_EXT_V5, do_lstc2},
- {"stc2", 0xfc000000, "", cplong_flag, ARM_EXT_V5, do_lstc2},
- {"cdp2", 0xfe000000, "", NULL, ARM_EXT_V5, do_cdp2},
- {"mcr2", 0xfe000010, "", NULL, ARM_EXT_V5, do_co_reg2},
- {"mrc2", 0xfe100010, "", NULL, ARM_EXT_V5, do_co_reg2},
-
-/* ARM ISA extension 5E, El Segundo. */
- {"smlabb", 0x01000080, NULL, NULL, ARM_EXT_V5E, do_smla},
- {"smlatb", 0x010000a0, NULL, NULL, ARM_EXT_V5E, do_smla},
- {"smlabt", 0x010000c0, NULL, NULL, ARM_EXT_V5E, do_smla},
- {"smlatt", 0x010000e0, NULL, NULL, ARM_EXT_V5E, do_smla},
-
- {"smlawb", 0x01200080, NULL, NULL, ARM_EXT_V5E, do_smla},
- {"smlawt", 0x012000c0, NULL, NULL, ARM_EXT_V5E, do_smla},
-
- {"smlalbb",0x01400080, NULL, NULL, ARM_EXT_V5E, do_smlal},
- {"smlaltb",0x014000a0, NULL, NULL, ARM_EXT_V5E, do_smlal},
- {"smlalbt",0x014000c0, NULL, NULL, ARM_EXT_V5E, do_smlal},
- {"smlaltt",0x014000e0, NULL, NULL, ARM_EXT_V5E, do_smlal},
-
- {"smulbb", 0x01600080, NULL, NULL, ARM_EXT_V5E, do_smul},
- {"smultb", 0x016000a0, NULL, NULL, ARM_EXT_V5E, do_smul},
- {"smulbt", 0x016000c0, NULL, NULL, ARM_EXT_V5E, do_smul},
- {"smultt", 0x016000e0, NULL, NULL, ARM_EXT_V5E, do_smul},
-
- {"smulwb", 0x012000a0, NULL, NULL, ARM_EXT_V5E, do_smul},
- {"smulwt", 0x012000e0, NULL, NULL, ARM_EXT_V5E, do_smul},
-
- {"qadd", 0x01000050, NULL, NULL, ARM_EXT_V5E, do_qadd},
- {"qdadd", 0x01400050, NULL, NULL, ARM_EXT_V5E, do_qadd},
- {"qsub", 0x01200050, NULL, NULL, ARM_EXT_V5E, do_qadd},
- {"qdsub", 0x01600050, NULL, NULL, ARM_EXT_V5E, do_qadd},
-
- {"mcrr", 0x0c400000, NULL, NULL, ARM_EXT_V5E, do_co_reg2c},
- {"mrrc", 0x0c500000, NULL, NULL, ARM_EXT_V5E, do_co_reg2c},
+ /* Pseudo ops. */
+ {"adr", 0xe28f0000, 3, ARM_EXT_V1, do_adr},
+ {"adrl", 0xe28f0000, 3, ARM_EXT_V1, do_adrl},
+ {"nop", 0xe1a00000, 3, ARM_EXT_V1, do_empty},
+
+ /* ARM 2 multiplies. */
+ {"mul", 0xe0000090, 3, ARM_EXT_V2, do_mul},
+ {"muls", 0xe0100090, 3, ARM_EXT_V2, do_mul},
+ {"mla", 0xe0200090, 3, ARM_EXT_V2, do_mla},
+ {"mlas", 0xe0300090, 3, ARM_EXT_V2, do_mla},
+
+ /* Generic copressor instructions. */
+ {"cdp", 0xee000000, 3, ARM_EXT_V2, do_cdp},
+ {"ldc", 0xec100000, 3, ARM_EXT_V2, do_lstc},
+ {"ldcl", 0xec500000, 3, ARM_EXT_V2, do_lstc},
+ {"stc", 0xec000000, 3, ARM_EXT_V2, do_lstc},
+ {"stcl", 0xec400000, 3, ARM_EXT_V2, do_lstc},
+ {"mcr", 0xee000010, 3, ARM_EXT_V2, do_co_reg},
+ {"mrc", 0xee100010, 3, ARM_EXT_V2, do_co_reg},
+
+ /* ARM 3 - swp instructions. */
+ {"swp", 0xe1000090, 3, ARM_EXT_V2S, do_swap},
+ {"swpb", 0xe1400090, 3, ARM_EXT_V2S, do_swap},
+
+ /* ARM 6 Status register instructions. */
+ {"mrs", 0xe10f0000, 3, ARM_EXT_V3, do_mrs},
+ {"msr", 0xe120f000, 3, ARM_EXT_V3, do_msr},
+ /* ScottB: our code uses 0xe128f000 for msr.
+ NickC: but this is wrong because the bits 16 through 19 are
+ handled by the PSR_xxx defines above. */
+
+ /* ARM 7M long multiplies. */
+ {"smull", 0xe0c00090, 5, ARM_EXT_V3M, do_mull},
+ {"smulls", 0xe0d00090, 5, ARM_EXT_V3M, do_mull},
+ {"umull", 0xe0800090, 5, ARM_EXT_V3M, do_mull},
+ {"umulls", 0xe0900090, 5, ARM_EXT_V3M, do_mull},
+ {"smlal", 0xe0e00090, 5, ARM_EXT_V3M, do_mull},
+ {"smlals", 0xe0f00090, 5, ARM_EXT_V3M, do_mull},
+ {"umlal", 0xe0a00090, 5, ARM_EXT_V3M, do_mull},
+ {"umlals", 0xe0b00090, 5, ARM_EXT_V3M, do_mull},
+
+ /* ARM Architecture 4. */
+ {"ldrh", 0xe01000b0, 3, ARM_EXT_V4, do_ldstv4},
+ {"ldrsh", 0xe01000f0, 3, ARM_EXT_V4, do_ldstv4},
+ {"ldrsb", 0xe01000d0, 3, ARM_EXT_V4, do_ldstv4},
+ {"strh", 0xe00000b0, 3, ARM_EXT_V4, do_ldstv4},
+
+ /* ARM Architecture 4T. */
+ /* Note: bx (and blx) are required on V5, even if the processor does
+ not support Thumb. */
+ {"bx", 0xe12fff10, 2, ARM_EXT_V4T | ARM_EXT_V5, do_bx},
+
+ /* ARM Architecture 5T. */
+ /* Note: blx has 2 variants, so the .value is set dynamically.
+ Only one of the variants has conditional execution. */
+ {"blx", 0xe0000000, 3, ARM_EXT_V5, do_blx},
+ {"clz", 0xe16f0f10, 3, ARM_EXT_V5, do_clz},
+ {"bkpt", 0xe1200070, 0, ARM_EXT_V5, do_bkpt},
+ {"ldc2", 0xfc100000, 0, ARM_EXT_V5, do_lstc2},
+ {"ldc2l", 0xfc500000, 0, ARM_EXT_V5, do_lstc2},
+ {"stc2", 0xfc000000, 0, ARM_EXT_V5, do_lstc2},
+ {"stc2l", 0xfc400000, 0, ARM_EXT_V5, do_lstc2},
+ {"cdp2", 0xfe000000, 0, ARM_EXT_V5, do_cdp2},
+ {"mcr2", 0xfe000010, 0, ARM_EXT_V5, do_co_reg2},
+ {"mrc2", 0xfe100010, 0, ARM_EXT_V5, do_co_reg2},
+
+ /* ARM Architecture 5TExP. */
+ {"smlabb", 0xe1000080, 6, ARM_EXT_V5ExP, do_smla},
+ {"smlatb", 0xe10000a0, 6, ARM_EXT_V5ExP, do_smla},
+ {"smlabt", 0xe10000c0, 6, ARM_EXT_V5ExP, do_smla},
+ {"smlatt", 0xe10000e0, 6, ARM_EXT_V5ExP, do_smla},
+
+ {"smlawb", 0xe1200080, 6, ARM_EXT_V5ExP, do_smla},
+ {"smlawt", 0xe12000c0, 6, ARM_EXT_V5ExP, do_smla},
+
+ {"smlalbb", 0xe1400080, 7, ARM_EXT_V5ExP, do_smlal},
+ {"smlaltb", 0xe14000a0, 7, ARM_EXT_V5ExP, do_smlal},
+ {"smlalbt", 0xe14000c0, 7, ARM_EXT_V5ExP, do_smlal},
+ {"smlaltt", 0xe14000e0, 7, ARM_EXT_V5ExP, do_smlal},
+
+ {"smulbb", 0xe1600080, 6, ARM_EXT_V5ExP, do_smul},
+ {"smultb", 0xe16000a0, 6, ARM_EXT_V5ExP, do_smul},
+ {"smulbt", 0xe16000c0, 6, ARM_EXT_V5ExP, do_smul},
+ {"smultt", 0xe16000e0, 6, ARM_EXT_V5ExP, do_smul},
+
+ {"smulwb", 0xe12000a0, 6, ARM_EXT_V5ExP, do_smul},
+ {"smulwt", 0xe12000e0, 6, ARM_EXT_V5ExP, do_smul},
+
+ {"qadd", 0xe1000050, 4, ARM_EXT_V5ExP, do_qadd},
+ {"qdadd", 0xe1400050, 5, ARM_EXT_V5ExP, do_qadd},
+ {"qsub", 0xe1200050, 4, ARM_EXT_V5ExP, do_qadd},
+ {"qdsub", 0xe1600050, 5, ARM_EXT_V5ExP, do_qadd},
+
+ /* ARM Architecture 5TE. */
+ {"pld", 0xf450f000, 0, ARM_EXT_V5E, do_pld},
+ {"ldrd", 0xe00000d0, 3, ARM_EXT_V5E, do_ldrd},
+ {"strd", 0xe00000f0, 3, ARM_EXT_V5E, do_ldrd},
+
+ {"mcrr", 0xec400000, 4, ARM_EXT_V5E, do_co_reg2c},
+ {"mrrc", 0xec500000, 4, ARM_EXT_V5E, do_co_reg2c},
+
+ /* ARM Architecture 5TEJ. */
+ {"bxj", 0xe12fff20, 3, ARM_EXT_V5J, do_bxj},
+
+ /* Core FPA instruction set (V1). */
+ {"wfs", 0xee200110, 3, FPU_FPA_EXT_V1, do_fpa_ctrl},
+ {"rfs", 0xee300110, 3, FPU_FPA_EXT_V1, do_fpa_ctrl},
+ {"wfc", 0xee400110, 3, FPU_FPA_EXT_V1, do_fpa_ctrl},
+ {"rfc", 0xee500110, 3, FPU_FPA_EXT_V1, do_fpa_ctrl},
+
+ {"ldfs", 0xec100100, 3, FPU_FPA_EXT_V1, do_fpa_ldst},
+ {"ldfd", 0xec108100, 3, FPU_FPA_EXT_V1, do_fpa_ldst},
+ {"ldfe", 0xec500100, 3, FPU_FPA_EXT_V1, do_fpa_ldst},
+ {"ldfp", 0xec508100, 3, FPU_FPA_EXT_V1, do_fpa_ldst},
+
+ {"stfs", 0xec000100, 3, FPU_FPA_EXT_V1, do_fpa_ldst},
+ {"stfd", 0xec008100, 3, FPU_FPA_EXT_V1, do_fpa_ldst},
+ {"stfe", 0xec400100, 3, FPU_FPA_EXT_V1, do_fpa_ldst},
+ {"stfp", 0xec408100, 3, FPU_FPA_EXT_V1, do_fpa_ldst},
+
+ {"mvfs", 0xee008100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"mvfsp", 0xee008120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"mvfsm", 0xee008140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"mvfsz", 0xee008160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"mvfd", 0xee008180, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"mvfdp", 0xee0081a0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"mvfdm", 0xee0081c0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"mvfdz", 0xee0081e0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"mvfe", 0xee088100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"mvfep", 0xee088120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"mvfem", 0xee088140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"mvfez", 0xee088160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+
+ {"mnfs", 0xee108100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"mnfsp", 0xee108120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"mnfsm", 0xee108140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"mnfsz", 0xee108160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"mnfd", 0xee108180, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"mnfdp", 0xee1081a0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"mnfdm", 0xee1081c0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"mnfdz", 0xee1081e0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"mnfe", 0xee188100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"mnfep", 0xee188120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"mnfem", 0xee188140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"mnfez", 0xee188160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+
+ {"abss", 0xee208100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"abssp", 0xee208120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"abssm", 0xee208140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"abssz", 0xee208160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"absd", 0xee208180, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"absdp", 0xee2081a0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"absdm", 0xee2081c0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"absdz", 0xee2081e0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"abse", 0xee288100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"absep", 0xee288120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"absem", 0xee288140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"absez", 0xee288160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+
+ {"rnds", 0xee308100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"rndsp", 0xee308120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"rndsm", 0xee308140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"rndsz", 0xee308160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"rndd", 0xee308180, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"rnddp", 0xee3081a0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"rnddm", 0xee3081c0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"rnddz", 0xee3081e0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"rnde", 0xee388100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"rndep", 0xee388120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"rndem", 0xee388140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"rndez", 0xee388160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+
+ {"sqts", 0xee408100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"sqtsp", 0xee408120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"sqtsm", 0xee408140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"sqtsz", 0xee408160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"sqtd", 0xee408180, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"sqtdp", 0xee4081a0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"sqtdm", 0xee4081c0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"sqtdz", 0xee4081e0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"sqte", 0xee488100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"sqtep", 0xee488120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"sqtem", 0xee488140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"sqtez", 0xee488160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+
+ {"logs", 0xee508100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"logsp", 0xee508120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"logsm", 0xee508140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"logsz", 0xee508160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"logd", 0xee508180, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"logdp", 0xee5081a0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"logdm", 0xee5081c0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"logdz", 0xee5081e0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"loge", 0xee588100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"logep", 0xee588120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"logem", 0xee588140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"logez", 0xee588160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+
+ {"lgns", 0xee608100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"lgnsp", 0xee608120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"lgnsm", 0xee608140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"lgnsz", 0xee608160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"lgnd", 0xee608180, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"lgndp", 0xee6081a0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"lgndm", 0xee6081c0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"lgndz", 0xee6081e0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"lgne", 0xee688100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"lgnep", 0xee688120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"lgnem", 0xee688140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"lgnez", 0xee688160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+
+ {"exps", 0xee708100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"expsp", 0xee708120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"expsm", 0xee708140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"expsz", 0xee708160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"expd", 0xee708180, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"expdp", 0xee7081a0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"expdm", 0xee7081c0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"expdz", 0xee7081e0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"expe", 0xee788100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"expep", 0xee788120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"expem", 0xee788140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"expdz", 0xee788160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+
+ {"sins", 0xee808100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"sinsp", 0xee808120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"sinsm", 0xee808140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"sinsz", 0xee808160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"sind", 0xee808180, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"sindp", 0xee8081a0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"sindm", 0xee8081c0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"sindz", 0xee8081e0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"sine", 0xee888100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"sinep", 0xee888120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"sinem", 0xee888140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"sinez", 0xee888160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+
+ {"coss", 0xee908100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"cossp", 0xee908120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"cossm", 0xee908140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"cossz", 0xee908160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"cosd", 0xee908180, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"cosdp", 0xee9081a0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"cosdm", 0xee9081c0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"cosdz", 0xee9081e0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"cose", 0xee988100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"cosep", 0xee988120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"cosem", 0xee988140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"cosez", 0xee988160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+
+ {"tans", 0xeea08100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"tansp", 0xeea08120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"tansm", 0xeea08140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"tansz", 0xeea08160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"tand", 0xeea08180, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"tandp", 0xeea081a0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"tandm", 0xeea081c0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"tandz", 0xeea081e0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"tane", 0xeea88100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"tanep", 0xeea88120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"tanem", 0xeea88140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"tanez", 0xeea88160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+
+ {"asns", 0xeeb08100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"asnsp", 0xeeb08120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"asnsm", 0xeeb08140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"asnsz", 0xeeb08160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"asnd", 0xeeb08180, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"asndp", 0xeeb081a0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"asndm", 0xeeb081c0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"asndz", 0xeeb081e0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"asne", 0xeeb88100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"asnep", 0xeeb88120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"asnem", 0xeeb88140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"asnez", 0xeeb88160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+
+ {"acss", 0xeec08100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"acssp", 0xeec08120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"acssm", 0xeec08140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"acssz", 0xeec08160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"acsd", 0xeec08180, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"acsdp", 0xeec081a0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"acsdm", 0xeec081c0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"acsdz", 0xeec081e0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"acse", 0xeec88100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"acsep", 0xeec88120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"acsem", 0xeec88140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"acsez", 0xeec88160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+
+ {"atns", 0xeed08100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"atnsp", 0xeed08120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"atnsm", 0xeed08140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"atnsz", 0xeed08160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"atnd", 0xeed08180, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"atndp", 0xeed081a0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"atndm", 0xeed081c0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"atndz", 0xeed081e0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"atne", 0xeed88100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"atnep", 0xeed88120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"atnem", 0xeed88140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"atnez", 0xeed88160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+
+ {"urds", 0xeee08100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"urdsp", 0xeee08120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"urdsm", 0xeee08140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"urdsz", 0xeee08160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"urdd", 0xeee08180, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"urddp", 0xeee081a0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"urddm", 0xeee081c0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"urddz", 0xeee081e0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"urde", 0xeee88100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"urdep", 0xeee88120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"urdem", 0xeee88140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"urdez", 0xeee88160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+
+ {"nrms", 0xeef08100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"nrmsp", 0xeef08120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"nrmsm", 0xeef08140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"nrmsz", 0xeef08160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"nrmd", 0xeef08180, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"nrmdp", 0xeef081a0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"nrmdm", 0xeef081c0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"nrmdz", 0xeef081e0, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"nrme", 0xeef88100, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"nrmep", 0xeef88120, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"nrmem", 0xeef88140, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+ {"nrmez", 0xeef88160, 3, FPU_FPA_EXT_V1, do_fpa_monadic},
+
+ {"adfs", 0xee000100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"adfsp", 0xee000120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"adfsm", 0xee000140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"adfsz", 0xee000160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"adfd", 0xee000180, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"adfdp", 0xee0001a0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"adfdm", 0xee0001c0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"adfdz", 0xee0001e0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"adfe", 0xee080100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"adfep", 0xee080120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"adfem", 0xee080140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"adfez", 0xee080160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+
+ {"sufs", 0xee200100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"sufsp", 0xee200120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"sufsm", 0xee200140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"sufsz", 0xee200160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"sufd", 0xee200180, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"sufdp", 0xee2001a0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"sufdm", 0xee2001c0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"sufdz", 0xee2001e0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"sufe", 0xee280100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"sufep", 0xee280120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"sufem", 0xee280140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"sufez", 0xee280160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+
+ {"rsfs", 0xee300100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rsfsp", 0xee300120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rsfsm", 0xee300140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rsfsz", 0xee300160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rsfd", 0xee300180, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rsfdp", 0xee3001a0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rsfdm", 0xee3001c0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rsfdz", 0xee3001e0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rsfe", 0xee380100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rsfep", 0xee380120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rsfem", 0xee380140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rsfez", 0xee380160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+
+ {"mufs", 0xee100100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"mufsp", 0xee100120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"mufsm", 0xee100140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"mufsz", 0xee100160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"mufd", 0xee100180, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"mufdp", 0xee1001a0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"mufdm", 0xee1001c0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"mufdz", 0xee1001e0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"mufe", 0xee180100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"mufep", 0xee180120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"mufem", 0xee180140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"mufez", 0xee180160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+
+ {"dvfs", 0xee400100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"dvfsp", 0xee400120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"dvfsm", 0xee400140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"dvfsz", 0xee400160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"dvfd", 0xee400180, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"dvfdp", 0xee4001a0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"dvfdm", 0xee4001c0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"dvfdz", 0xee4001e0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"dvfe", 0xee480100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"dvfep", 0xee480120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"dvfem", 0xee480140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"dvfez", 0xee480160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+
+ {"rdfs", 0xee500100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rdfsp", 0xee500120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rdfsm", 0xee500140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rdfsz", 0xee500160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rdfd", 0xee500180, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rdfdp", 0xee5001a0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rdfdm", 0xee5001c0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rdfdz", 0xee5001e0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rdfe", 0xee580100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rdfep", 0xee580120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rdfem", 0xee580140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rdfez", 0xee580160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+
+ {"pows", 0xee600100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"powsp", 0xee600120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"powsm", 0xee600140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"powsz", 0xee600160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"powd", 0xee600180, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"powdp", 0xee6001a0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"powdm", 0xee6001c0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"powdz", 0xee6001e0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"powe", 0xee680100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"powep", 0xee680120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"powem", 0xee680140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"powez", 0xee680160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+
+ {"rpws", 0xee700100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rpwsp", 0xee700120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rpwsm", 0xee700140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rpwsz", 0xee700160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rpwd", 0xee700180, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rpwdp", 0xee7001a0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rpwdm", 0xee7001c0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rpwdz", 0xee7001e0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rpwe", 0xee780100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rpwep", 0xee780120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rpwem", 0xee780140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rpwez", 0xee780160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+
+ {"rmfs", 0xee800100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rmfsp", 0xee800120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rmfsm", 0xee800140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rmfsz", 0xee800160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rmfd", 0xee800180, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rmfdp", 0xee8001a0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rmfdm", 0xee8001c0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rmfdz", 0xee8001e0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rmfe", 0xee880100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rmfep", 0xee880120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rmfem", 0xee880140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"rmfez", 0xee880160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+
+ {"fmls", 0xee900100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"fmlsp", 0xee900120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"fmlsm", 0xee900140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"fmlsz", 0xee900160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"fmld", 0xee900180, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"fmldp", 0xee9001a0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"fmldm", 0xee9001c0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"fmldz", 0xee9001e0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"fmle", 0xee980100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"fmlep", 0xee980120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"fmlem", 0xee980140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"fmlez", 0xee980160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+
+ {"fdvs", 0xeea00100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"fdvsp", 0xeea00120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"fdvsm", 0xeea00140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"fdvsz", 0xeea00160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"fdvd", 0xeea00180, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"fdvdp", 0xeea001a0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"fdvdm", 0xeea001c0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"fdvdz", 0xeea001e0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"fdve", 0xeea80100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"fdvep", 0xeea80120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"fdvem", 0xeea80140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"fdvez", 0xeea80160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+
+ {"frds", 0xeeb00100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"frdsp", 0xeeb00120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"frdsm", 0xeeb00140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"frdsz", 0xeeb00160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"frdd", 0xeeb00180, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"frddp", 0xeeb001a0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"frddm", 0xeeb001c0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"frddz", 0xeeb001e0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"frde", 0xeeb80100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"frdep", 0xeeb80120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"frdem", 0xeeb80140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"frdez", 0xeeb80160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+
+ {"pols", 0xeec00100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"polsp", 0xeec00120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"polsm", 0xeec00140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"polsz", 0xeec00160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"pold", 0xeec00180, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"poldp", 0xeec001a0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"poldm", 0xeec001c0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"poldz", 0xeec001e0, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"pole", 0xeec80100, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"polep", 0xeec80120, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"polem", 0xeec80140, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+ {"polez", 0xeec80160, 3, FPU_FPA_EXT_V1, do_fpa_dyadic},
+
+ {"cmf", 0xee90f110, 3, FPU_FPA_EXT_V1, do_fpa_cmp},
+ {"cmfe", 0xeed0f110, 3, FPU_FPA_EXT_V1, do_fpa_cmp},
+ {"cnf", 0xeeb0f110, 3, FPU_FPA_EXT_V1, do_fpa_cmp},
+ {"cnfe", 0xeef0f110, 3, FPU_FPA_EXT_V1, do_fpa_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", 0xeed0f110, 4, FPU_FPA_EXT_V1, do_fpa_cmp},
+ {"cnfe", 0xeef0f110, 4, FPU_FPA_EXT_V1, do_fpa_cmp},
+
+ {"flts", 0xee000110, 3, FPU_FPA_EXT_V1, do_fpa_from_reg},
+ {"fltsp", 0xee000130, 3, FPU_FPA_EXT_V1, do_fpa_from_reg},
+ {"fltsm", 0xee000150, 3, FPU_FPA_EXT_V1, do_fpa_from_reg},
+ {"fltsz", 0xee000170, 3, FPU_FPA_EXT_V1, do_fpa_from_reg},
+ {"fltd", 0xee000190, 3, FPU_FPA_EXT_V1, do_fpa_from_reg},
+ {"fltdp", 0xee0001b0, 3, FPU_FPA_EXT_V1, do_fpa_from_reg},
+ {"fltdm", 0xee0001d0, 3, FPU_FPA_EXT_V1, do_fpa_from_reg},
+ {"fltdz", 0xee0001f0, 3, FPU_FPA_EXT_V1, do_fpa_from_reg},
+ {"flte", 0xee080110, 3, FPU_FPA_EXT_V1, do_fpa_from_reg},
+ {"fltep", 0xee080130, 3, FPU_FPA_EXT_V1, do_fpa_from_reg},
+ {"fltem", 0xee080150, 3, FPU_FPA_EXT_V1, do_fpa_from_reg},
+ {"fltez", 0xee080170, 3, FPU_FPA_EXT_V1, do_fpa_from_reg},
+
+ /* 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. */
+ {"fix", 0xee100110, 3, FPU_FPA_EXT_V1, do_fpa_to_reg},
+ {"fixp", 0xee100130, 3, FPU_FPA_EXT_V1, do_fpa_to_reg},
+ {"fixm", 0xee100150, 3, FPU_FPA_EXT_V1, do_fpa_to_reg},
+ {"fixz", 0xee100170, 3, FPU_FPA_EXT_V1, do_fpa_to_reg},
+ {"fixsp", 0xee100130, 3, FPU_FPA_EXT_V1, do_fpa_to_reg},
+ {"fixsm", 0xee100150, 3, FPU_FPA_EXT_V1, do_fpa_to_reg},
+ {"fixsz", 0xee100170, 3, FPU_FPA_EXT_V1, do_fpa_to_reg},
+ {"fixdp", 0xee100130, 3, FPU_FPA_EXT_V1, do_fpa_to_reg},
+ {"fixdm", 0xee100150, 3, FPU_FPA_EXT_V1, do_fpa_to_reg},
+ {"fixdz", 0xee100170, 3, FPU_FPA_EXT_V1, do_fpa_to_reg},
+ {"fixep", 0xee100130, 3, FPU_FPA_EXT_V1, do_fpa_to_reg},
+ {"fixem", 0xee100150, 3, FPU_FPA_EXT_V1, do_fpa_to_reg},
+ {"fixez", 0xee100170, 3, FPU_FPA_EXT_V1, do_fpa_to_reg},
+
+ /* Instructions that were new with the real FPA, call them V2. */
+ {"lfm", 0xec100200, 3, FPU_FPA_EXT_V2, do_fpa_ldmstm},
+ {"lfmfd", 0xec900200, 3, FPU_FPA_EXT_V2, do_fpa_ldmstm},
+ {"lfmea", 0xed100200, 3, FPU_FPA_EXT_V2, do_fpa_ldmstm},
+ {"sfm", 0xec000200, 3, FPU_FPA_EXT_V2, do_fpa_ldmstm},
+ {"sfmfd", 0xed000200, 3, FPU_FPA_EXT_V2, do_fpa_ldmstm},
+ {"sfmea", 0xec800200, 3, FPU_FPA_EXT_V2, do_fpa_ldmstm},
+
+ /* VFP V1xD (single precision). */
+ /* Moves and type conversions. */
+ {"fcpys", 0xeeb00a40, 5, FPU_VFP_EXT_V1xD, do_vfp_sp_monadic},
+ {"fmrs", 0xee100a10, 4, FPU_VFP_EXT_V1xD, do_vfp_reg_from_sp},
+ {"fmsr", 0xee000a10, 4, FPU_VFP_EXT_V1xD, do_vfp_sp_from_reg},
+ {"fmstat", 0xeef1fa10, 6, FPU_VFP_EXT_V1xD, do_empty},
+ {"fsitos", 0xeeb80ac0, 6, FPU_VFP_EXT_V1xD, do_vfp_sp_monadic},
+ {"fuitos", 0xeeb80a40, 6, FPU_VFP_EXT_V1xD, do_vfp_sp_monadic},
+ {"ftosis", 0xeebd0a40, 6, FPU_VFP_EXT_V1xD, do_vfp_sp_monadic},
+ {"ftosizs", 0xeebd0ac0, 7, FPU_VFP_EXT_V1xD, do_vfp_sp_monadic},
+ {"ftouis", 0xeebc0a40, 6, FPU_VFP_EXT_V1xD, do_vfp_sp_monadic},
+ {"ftouizs", 0xeebc0ac0, 7, FPU_VFP_EXT_V1xD, do_vfp_sp_monadic},
+ {"fmrx", 0xeef00a10, 4, FPU_VFP_EXT_V1xD, do_vfp_reg_from_ctrl},
+ {"fmxr", 0xeee00a10, 4, FPU_VFP_EXT_V1xD, do_vfp_ctrl_from_reg},
+
+ /* Memory operations. */
+ {"flds", 0xed100a00, 4, FPU_VFP_EXT_V1xD, do_vfp_sp_ldst},
+ {"fsts", 0xed000a00, 4, FPU_VFP_EXT_V1xD, do_vfp_sp_ldst},
+ {"fldmias", 0xec900a00, 7, FPU_VFP_EXT_V1xD, do_vfp_sp_ldstmia},
+ {"fldmfds", 0xec900a00, 7, FPU_VFP_EXT_V1xD, do_vfp_sp_ldstmia},
+ {"fldmdbs", 0xed300a00, 7, FPU_VFP_EXT_V1xD, do_vfp_sp_ldstmdb},
+ {"fldmeas", 0xed300a00, 7, FPU_VFP_EXT_V1xD, do_vfp_sp_ldstmdb},
+ {"fldmiax", 0xec900b00, 7, FPU_VFP_EXT_V1xD, do_vfp_xp_ldstmia},
+ {"fldmfdx", 0xec900b00, 7, FPU_VFP_EXT_V1xD, do_vfp_xp_ldstmia},
+ {"fldmdbx", 0xed300b00, 7, FPU_VFP_EXT_V1xD, do_vfp_xp_ldstmdb},
+ {"fldmeax", 0xed300b00, 7, FPU_VFP_EXT_V1xD, do_vfp_xp_ldstmdb},
+ {"fstmias", 0xec800a00, 7, FPU_VFP_EXT_V1xD, do_vfp_sp_ldstmia},
+ {"fstmeas", 0xec800a00, 7, FPU_VFP_EXT_V1xD, do_vfp_sp_ldstmia},
+ {"fstmdbs", 0xed200a00, 7, FPU_VFP_EXT_V1xD, do_vfp_sp_ldstmdb},
+ {"fstmfds", 0xed200a00, 7, FPU_VFP_EXT_V1xD, do_vfp_sp_ldstmdb},
+ {"fstmiax", 0xec800b00, 7, FPU_VFP_EXT_V1xD, do_vfp_xp_ldstmia},
+ {"fstmeax", 0xec800b00, 7, FPU_VFP_EXT_V1xD, do_vfp_xp_ldstmia},
+ {"fstmdbx", 0xed200b00, 7, FPU_VFP_EXT_V1xD, do_vfp_xp_ldstmdb},
+ {"fstmfdx", 0xed200b00, 7, FPU_VFP_EXT_V1xD, do_vfp_xp_ldstmdb},
+
+ /* Monadic operations. */
+ {"fabss", 0xeeb00ac0, 5, FPU_VFP_EXT_V1xD, do_vfp_sp_monadic},
+ {"fnegs", 0xeeb10a40, 5, FPU_VFP_EXT_V1xD, do_vfp_sp_monadic},
+ {"fsqrts", 0xeeb10ac0, 6, FPU_VFP_EXT_V1xD, do_vfp_sp_monadic},
+
+ /* Dyadic operations. */
+ {"fadds", 0xee300a00, 5, FPU_VFP_EXT_V1xD, do_vfp_sp_dyadic},
+ {"fsubs", 0xee300a40, 5, FPU_VFP_EXT_V1xD, do_vfp_sp_dyadic},
+ {"fmuls", 0xee200a00, 5, FPU_VFP_EXT_V1xD, do_vfp_sp_dyadic},
+ {"fdivs", 0xee800a00, 5, FPU_VFP_EXT_V1xD, do_vfp_sp_dyadic},
+ {"fmacs", 0xee000a00, 5, FPU_VFP_EXT_V1xD, do_vfp_sp_dyadic},
+ {"fmscs", 0xee100a00, 5, FPU_VFP_EXT_V1xD, do_vfp_sp_dyadic},
+ {"fnmuls", 0xee200a40, 6, FPU_VFP_EXT_V1xD, do_vfp_sp_dyadic},
+ {"fnmacs", 0xee000a40, 6, FPU_VFP_EXT_V1xD, do_vfp_sp_dyadic},
+ {"fnmscs", 0xee100a40, 6, FPU_VFP_EXT_V1xD, do_vfp_sp_dyadic},
+
+ /* Comparisons. */
+ {"fcmps", 0xeeb40a40, 5, FPU_VFP_EXT_V1xD, do_vfp_sp_monadic},
+ {"fcmpzs", 0xeeb50a40, 6, FPU_VFP_EXT_V1xD, do_vfp_sp_compare_z},
+ {"fcmpes", 0xeeb40ac0, 6, FPU_VFP_EXT_V1xD, do_vfp_sp_monadic},
+ {"fcmpezs", 0xeeb50ac0, 7, FPU_VFP_EXT_V1xD, do_vfp_sp_compare_z},
+
+ /* VFP V1 (Double precision). */
+ /* Moves and type conversions. */
+ {"fcpyd", 0xeeb00b40, 5, FPU_VFP_EXT_V1, do_vfp_dp_monadic},
+ {"fcvtds", 0xeeb70ac0, 6, FPU_VFP_EXT_V1, do_vfp_dp_sp_cvt},
+ {"fcvtsd", 0xeeb70bc0, 6, FPU_VFP_EXT_V1, do_vfp_sp_dp_cvt},
+ {"fmdhr", 0xee200b10, 5, FPU_VFP_EXT_V1, do_vfp_dp_from_reg},
+ {"fmdlr", 0xee000b10, 5, FPU_VFP_EXT_V1, do_vfp_dp_from_reg},
+ {"fmrdh", 0xee300b10, 5, FPU_VFP_EXT_V1, do_vfp_reg_from_dp},
+ {"fmrdl", 0xee100b10, 5, FPU_VFP_EXT_V1, do_vfp_reg_from_dp},
+ {"fsitod", 0xeeb80bc0, 6, FPU_VFP_EXT_V1, do_vfp_dp_sp_cvt},
+ {"fuitod", 0xeeb80b40, 6, FPU_VFP_EXT_V1, do_vfp_dp_sp_cvt},
+ {"ftosid", 0xeebd0b40, 6, FPU_VFP_EXT_V1, do_vfp_sp_dp_cvt},
+ {"ftosizd", 0xeebd0bc0, 7, FPU_VFP_EXT_V1, do_vfp_sp_dp_cvt},
+ {"ftouid", 0xeebc0b40, 6, FPU_VFP_EXT_V1, do_vfp_sp_dp_cvt},
+ {"ftouizd", 0xeebc0bc0, 7, FPU_VFP_EXT_V1, do_vfp_sp_dp_cvt},
+
+ /* Memory operations. */
+ {"fldd", 0xed100b00, 4, FPU_VFP_EXT_V1, do_vfp_dp_ldst},
+ {"fstd", 0xed000b00, 4, FPU_VFP_EXT_V1, do_vfp_dp_ldst},
+ {"fldmiad", 0xec900b00, 7, FPU_VFP_EXT_V1, do_vfp_dp_ldstmia},
+ {"fldmfdd", 0xec900b00, 7, FPU_VFP_EXT_V1, do_vfp_dp_ldstmia},
+ {"fldmdbd", 0xed300b00, 7, FPU_VFP_EXT_V1, do_vfp_dp_ldstmdb},
+ {"fldmead", 0xed300b00, 7, FPU_VFP_EXT_V1, do_vfp_dp_ldstmdb},
+ {"fstmiad", 0xec800b00, 7, FPU_VFP_EXT_V1, do_vfp_dp_ldstmia},
+ {"fstmead", 0xec800b00, 7, FPU_VFP_EXT_V1, do_vfp_dp_ldstmia},
+ {"fstmdbd", 0xed200b00, 7, FPU_VFP_EXT_V1, do_vfp_dp_ldstmdb},
+ {"fstmfdd", 0xed200b00, 7, FPU_VFP_EXT_V1, do_vfp_dp_ldstmdb},
+
+ /* Monadic operations. */
+ {"fabsd", 0xeeb00bc0, 5, FPU_VFP_EXT_V1, do_vfp_dp_monadic},
+ {"fnegd", 0xeeb10b40, 5, FPU_VFP_EXT_V1, do_vfp_dp_monadic},
+ {"fsqrtd", 0xeeb10bc0, 6, FPU_VFP_EXT_V1, do_vfp_dp_monadic},
+
+ /* Dyadic operations. */
+ {"faddd", 0xee300b00, 5, FPU_VFP_EXT_V1, do_vfp_dp_dyadic},
+ {"fsubd", 0xee300b40, 5, FPU_VFP_EXT_V1, do_vfp_dp_dyadic},
+ {"fmuld", 0xee200b00, 5, FPU_VFP_EXT_V1, do_vfp_dp_dyadic},
+ {"fdivd", 0xee800b00, 5, FPU_VFP_EXT_V1, do_vfp_dp_dyadic},
+ {"fmacd", 0xee000b00, 5, FPU_VFP_EXT_V1, do_vfp_dp_dyadic},
+ {"fmscd", 0xee100b00, 5, FPU_VFP_EXT_V1, do_vfp_dp_dyadic},
+ {"fnmuld", 0xee200b40, 6, FPU_VFP_EXT_V1, do_vfp_dp_dyadic},
+ {"fnmacd", 0xee000b40, 6, FPU_VFP_EXT_V1, do_vfp_dp_dyadic},
+ {"fnmscd", 0xee100b40, 6, FPU_VFP_EXT_V1, do_vfp_dp_dyadic},
+
+ /* Comparisons. */
+ {"fcmpd", 0xeeb40b40, 5, FPU_VFP_EXT_V1, do_vfp_dp_monadic},
+ {"fcmpzd", 0xeeb50b40, 6, FPU_VFP_EXT_V1, do_vfp_dp_compare_z},
+ {"fcmped", 0xeeb40bc0, 6, FPU_VFP_EXT_V1, do_vfp_dp_monadic},
+ {"fcmpezd", 0xeeb50bc0, 7, FPU_VFP_EXT_V1, do_vfp_dp_compare_z},
+
+ /* VFP V2. */
+ {"fmsrr", 0xec400a10, 5, FPU_VFP_EXT_V2, do_vfp_sp_reg2},
+ {"fmrrs", 0xec500a10, 5, FPU_VFP_EXT_V2, do_vfp_sp_reg2},
+ {"fmdrr", 0xec400b10, 5, FPU_VFP_EXT_V2, do_vfp_dp_from_reg2},
+ {"fmrrd", 0xec500b10, 5, FPU_VFP_EXT_V2, do_vfp_reg2_from_dp},
+
+ /* Intel XScale extensions to ARM V5 ISA. (All use CP0). */
+ {"mia", 0xee200010, 3, ARM_CEXT_XSCALE, do_xsc_mia},
+ {"miaph", 0xee280010, 5, ARM_CEXT_XSCALE, do_xsc_mia},
+ {"miabb", 0xee2c0010, 5, ARM_CEXT_XSCALE, do_xsc_mia},
+ {"miabt", 0xee2d0010, 5, ARM_CEXT_XSCALE, do_xsc_mia},
+ {"miatb", 0xee2e0010, 5, ARM_CEXT_XSCALE, do_xsc_mia},
+ {"miatt", 0xee2f0010, 5, ARM_CEXT_XSCALE, do_xsc_mia},
+ {"mar", 0xec400000, 3, ARM_CEXT_XSCALE, do_xsc_mar},
+ {"mra", 0xec500000, 3, ARM_CEXT_XSCALE, do_xsc_mra},
+
+ /* Cirrus Maverick instructions. */
+ {"cfldrs", 0xec100400, 6, ARM_CEXT_MAVERICK, do_mav_ldst_1},
+ {"cfldrd", 0xec500400, 6, ARM_CEXT_MAVERICK, do_mav_ldst_2},
+ {"cfldr32", 0xec100500, 7, ARM_CEXT_MAVERICK, do_mav_ldst_3},
+ {"cfldr64", 0xec500500, 7, ARM_CEXT_MAVERICK, do_mav_ldst_4},
+ {"cfstrs", 0xec000400, 6, ARM_CEXT_MAVERICK, do_mav_ldst_1},
+ {"cfstrd", 0xec400400, 6, ARM_CEXT_MAVERICK, do_mav_ldst_2},
+ {"cfstr32", 0xec000500, 7, ARM_CEXT_MAVERICK, do_mav_ldst_3},
+ {"cfstr64", 0xec400500, 7, ARM_CEXT_MAVERICK, do_mav_ldst_4},
+ {"cfmvsr", 0xee000450, 6, ARM_CEXT_MAVERICK, do_mav_binops_2a},
+ {"cfmvrs", 0xee100450, 6, ARM_CEXT_MAVERICK, do_mav_binops_1a},
+ {"cfmvdlr", 0xee000410, 7, ARM_CEXT_MAVERICK, do_mav_binops_2b},
+ {"cfmvrdl", 0xee100410, 7, ARM_CEXT_MAVERICK, do_mav_binops_1b},
+ {"cfmvdhr", 0xee000430, 7, ARM_CEXT_MAVERICK, do_mav_binops_2b},
+ {"cfmvrdh", 0xee100430, 7, ARM_CEXT_MAVERICK, do_mav_binops_1b},
+ {"cfmv64lr", 0xee000510, 8, ARM_CEXT_MAVERICK, do_mav_binops_2c},
+ {"cfmvr64l", 0xee100510, 8, ARM_CEXT_MAVERICK, do_mav_binops_1c},
+ {"cfmv64hr", 0xee000530, 8, ARM_CEXT_MAVERICK, do_mav_binops_2c},
+ {"cfmvr64h", 0xee100530, 8, ARM_CEXT_MAVERICK, do_mav_binops_1c},
+ {"cfmval32", 0xee100610, 8, ARM_CEXT_MAVERICK, do_mav_binops_3a},
+ {"cfmv32al", 0xee000610, 8, ARM_CEXT_MAVERICK, do_mav_binops_3b},
+ {"cfmvam32", 0xee100630, 8, ARM_CEXT_MAVERICK, do_mav_binops_3a},
+ {"cfmv32am", 0xee000630, 8, ARM_CEXT_MAVERICK, do_mav_binops_3b},
+ {"cfmvah32", 0xee100650, 8, ARM_CEXT_MAVERICK, do_mav_binops_3a},
+ {"cfmv32ah", 0xee000650, 8, ARM_CEXT_MAVERICK, do_mav_binops_3b},
+ {"cfmva32", 0xee100670, 7, ARM_CEXT_MAVERICK, do_mav_binops_3a},
+ {"cfmv32a", 0xee000670, 7, ARM_CEXT_MAVERICK, do_mav_binops_3b},
+ {"cfmva64", 0xee100690, 7, ARM_CEXT_MAVERICK, do_mav_binops_3c},
+ {"cfmv64a", 0xee000690, 7, ARM_CEXT_MAVERICK, do_mav_binops_3d},
+ {"cfmvsc32", 0xee1006b0, 8, ARM_CEXT_MAVERICK, do_mav_dspsc_1},
+ {"cfmv32sc", 0xee0006b0, 8, ARM_CEXT_MAVERICK, do_mav_dspsc_2},
+ {"cfcpys", 0xee000400, 6, ARM_CEXT_MAVERICK, do_mav_binops_1d},
+ {"cfcpyd", 0xee000420, 6, ARM_CEXT_MAVERICK, do_mav_binops_1e},
+ {"cfcvtsd", 0xee000460, 7, ARM_CEXT_MAVERICK, do_mav_binops_1f},
+ {"cfcvtds", 0xee000440, 7, ARM_CEXT_MAVERICK, do_mav_binops_1g},
+ {"cfcvt32s", 0xee000480, 8, ARM_CEXT_MAVERICK, do_mav_binops_1h},
+ {"cfcvt32d", 0xee0004a0, 8, ARM_CEXT_MAVERICK, do_mav_binops_1i},
+ {"cfcvt64s", 0xee0004c0, 8, ARM_CEXT_MAVERICK, do_mav_binops_1j},
+ {"cfcvt64d", 0xee0004e0, 8, ARM_CEXT_MAVERICK, do_mav_binops_1k},
+ {"cfcvts32", 0xee100580, 8, ARM_CEXT_MAVERICK, do_mav_binops_1l},
+ {"cfcvtd32", 0xee1005a0, 8, ARM_CEXT_MAVERICK, do_mav_binops_1m},
+ {"cftruncs32", 0xee1005c0, 10, ARM_CEXT_MAVERICK, do_mav_binops_1l},
+ {"cftruncd32", 0xee1005e0, 10, ARM_CEXT_MAVERICK, do_mav_binops_1m},
+ {"cfrshl32", 0xee000550, 8, ARM_CEXT_MAVERICK, do_mav_triple_4a},
+ {"cfrshl64", 0xee000570, 8, ARM_CEXT_MAVERICK, do_mav_triple_4b},
+ {"cfsh32", 0xee000500, 6, ARM_CEXT_MAVERICK, do_mav_shift_1},
+ {"cfsh64", 0xee200500, 6, ARM_CEXT_MAVERICK, do_mav_shift_2},
+ {"cfcmps", 0xee100490, 6, ARM_CEXT_MAVERICK, do_mav_triple_5a},
+ {"cfcmpd", 0xee1004b0, 6, ARM_CEXT_MAVERICK, do_mav_triple_5b},
+ {"cfcmp32", 0xee100590, 7, ARM_CEXT_MAVERICK, do_mav_triple_5c},
+ {"cfcmp64", 0xee1005b0, 7, ARM_CEXT_MAVERICK, do_mav_triple_5d},
+ {"cfabss", 0xee300400, 6, ARM_CEXT_MAVERICK, do_mav_binops_1d},
+ {"cfabsd", 0xee300420, 6, ARM_CEXT_MAVERICK, do_mav_binops_1e},
+ {"cfnegs", 0xee300440, 6, ARM_CEXT_MAVERICK, do_mav_binops_1d},
+ {"cfnegd", 0xee300460, 6, ARM_CEXT_MAVERICK, do_mav_binops_1e},
+ {"cfadds", 0xee300480, 6, ARM_CEXT_MAVERICK, do_mav_triple_5e},
+ {"cfaddd", 0xee3004a0, 6, ARM_CEXT_MAVERICK, do_mav_triple_5f},
+ {"cfsubs", 0xee3004c0, 6, ARM_CEXT_MAVERICK, do_mav_triple_5e},
+ {"cfsubd", 0xee3004e0, 6, ARM_CEXT_MAVERICK, do_mav_triple_5f},
+ {"cfmuls", 0xee100400, 6, ARM_CEXT_MAVERICK, do_mav_triple_5e},
+ {"cfmuld", 0xee100420, 6, ARM_CEXT_MAVERICK, do_mav_triple_5f},
+ {"cfabs32", 0xee300500, 7, ARM_CEXT_MAVERICK, do_mav_binops_1n},
+ {"cfabs64", 0xee300520, 7, ARM_CEXT_MAVERICK, do_mav_binops_1o},
+ {"cfneg32", 0xee300540, 7, ARM_CEXT_MAVERICK, do_mav_binops_1n},
+ {"cfneg64", 0xee300560, 7, ARM_CEXT_MAVERICK, do_mav_binops_1o},
+ {"cfadd32", 0xee300580, 7, ARM_CEXT_MAVERICK, do_mav_triple_5g},
+ {"cfadd64", 0xee3005a0, 7, ARM_CEXT_MAVERICK, do_mav_triple_5h},
+ {"cfsub32", 0xee3005c0, 7, ARM_CEXT_MAVERICK, do_mav_triple_5g},
+ {"cfsub64", 0xee3005e0, 7, ARM_CEXT_MAVERICK, do_mav_triple_5h},
+ {"cfmul32", 0xee100500, 7, ARM_CEXT_MAVERICK, do_mav_triple_5g},
+ {"cfmul64", 0xee100520, 7, ARM_CEXT_MAVERICK, do_mav_triple_5h},
+ {"cfmac32", 0xee100540, 7, ARM_CEXT_MAVERICK, do_mav_triple_5g},
+ {"cfmsc32", 0xee100560, 7, ARM_CEXT_MAVERICK, do_mav_triple_5g},
+ {"cfmadd32", 0xee000600, 8, ARM_CEXT_MAVERICK, do_mav_quad_6a},
+ {"cfmsub32", 0xee100600, 8, ARM_CEXT_MAVERICK, do_mav_quad_6a},
+ {"cfmadda32", 0xee200600, 9, ARM_CEXT_MAVERICK, do_mav_quad_6b},
+ {"cfmsuba32", 0xee300600, 9, ARM_CEXT_MAVERICK, do_mav_quad_6b},
};
/* Defines for various bits that we will want to toggle. */
@@ -896,8 +1818,9 @@ static CONST struct asm_opcode insns[] =
#define LDM_TYPE_2_OR_3 0x00400000
#define LITERAL_MASK 0xf000f000
-#define COND_MASK 0xf0000000
#define OPCODE_MASK 0xfe1fffff
+#define V4_STR_BIT 0x00000020
+
#define DATA_OP_SHIFT 21
/* Codes to distinguish the arithmetic instructions. */
@@ -918,6 +1841,7 @@ static CONST struct asm_opcode insns[] =
#define OPCODE_BIC 14
#define OPCODE_MVN 15
+/* Thumb v1 (ARMv4T). */
static void do_t_nop PARAMS ((char *));
static void do_t_arit PARAMS ((char *));
static void do_t_add PARAMS ((char *));
@@ -943,6 +1867,10 @@ static void do_t_sub PARAMS ((char *));
static void do_t_swi PARAMS ((char *));
static void do_t_adr PARAMS ((char *));
+/* Thumb v2 (ARMv5T). */
+static void do_t_blx PARAMS ((char *));
+static void do_t_bkpt PARAMS ((char *));
+
#define T_OPCODE_MUL 0x4340
#define T_OPCODE_TST 0x4200
#define T_OPCODE_CMN 0x42c0
@@ -1025,7 +1953,7 @@ static int thumb_reg PARAMS ((char ** str, int hi_lo));
struct thumb_opcode
{
/* Basic string to match. */
- CONST char * template;
+ const char * template;
/* Basic instruction code. */
unsigned long value;
@@ -1033,137 +1961,87 @@ struct thumb_opcode
int size;
/* Which CPU variants this exists for. */
- unsigned long variants;
+ unsigned long variant;
/* Function to call to parse args. */
void (* parms) PARAMS ((char *));
};
-static CONST struct thumb_opcode tinsns[] =
-{
- {"adc", 0x4140, 2, ARM_EXT_THUMB, do_t_arit},
- {"add", 0x0000, 2, ARM_EXT_THUMB, do_t_add},
- {"and", 0x4000, 2, ARM_EXT_THUMB, do_t_arit},
- {"asr", 0x0000, 2, ARM_EXT_THUMB, do_t_asr},
- {"b", T_OPCODE_BRANCH, 2, ARM_EXT_THUMB, do_t_branch12},
- {"beq", 0xd0fe, 2, ARM_EXT_THUMB, do_t_branch9},
- {"bne", 0xd1fe, 2, ARM_EXT_THUMB, do_t_branch9},
- {"bcs", 0xd2fe, 2, ARM_EXT_THUMB, do_t_branch9},
- {"bhs", 0xd2fe, 2, ARM_EXT_THUMB, do_t_branch9},
- {"bcc", 0xd3fe, 2, ARM_EXT_THUMB, do_t_branch9},
- {"bul", 0xd3fe, 2, ARM_EXT_THUMB, do_t_branch9},
- {"blo", 0xd3fe, 2, ARM_EXT_THUMB, do_t_branch9},
- {"bmi", 0xd4fe, 2, ARM_EXT_THUMB, do_t_branch9},
- {"bpl", 0xd5fe, 2, ARM_EXT_THUMB, do_t_branch9},
- {"bvs", 0xd6fe, 2, ARM_EXT_THUMB, do_t_branch9},
- {"bvc", 0xd7fe, 2, ARM_EXT_THUMB, do_t_branch9},
- {"bhi", 0xd8fe, 2, ARM_EXT_THUMB, do_t_branch9},
- {"bls", 0xd9fe, 2, ARM_EXT_THUMB, do_t_branch9},
- {"bge", 0xdafe, 2, ARM_EXT_THUMB, do_t_branch9},
- {"blt", 0xdbfe, 2, ARM_EXT_THUMB, do_t_branch9},
- {"bgt", 0xdcfe, 2, ARM_EXT_THUMB, do_t_branch9},
- {"ble", 0xddfe, 2, ARM_EXT_THUMB, do_t_branch9},
- {"bal", 0xdefe, 2, ARM_EXT_THUMB, do_t_branch9},
- {"bic", 0x4380, 2, ARM_EXT_THUMB, do_t_arit},
- {"bl", 0xf7fffffe, 4, ARM_EXT_THUMB, do_t_branch23},
- {"blx", 0, 0, ARM_EXT_V5, do_t_blx},
- {"bkpt", 0xbe00, 2, ARM_EXT_V5, do_t_bkpt},
- {"bx", 0x4700, 2, ARM_EXT_THUMB, do_t_bx},
- {"cmn", T_OPCODE_CMN, 2, ARM_EXT_THUMB, do_t_arit},
- {"cmp", 0x0000, 2, ARM_EXT_THUMB, do_t_compare},
- {"eor", 0x4040, 2, ARM_EXT_THUMB, do_t_arit},
- {"ldmia", 0xc800, 2, ARM_EXT_THUMB, do_t_ldmstm},
- {"ldr", 0x0000, 2, ARM_EXT_THUMB, do_t_ldr},
- {"ldrb", 0x0000, 2, ARM_EXT_THUMB, do_t_ldrb},
- {"ldrh", 0x0000, 2, ARM_EXT_THUMB, do_t_ldrh},
- {"ldrsb", 0x5600, 2, ARM_EXT_THUMB, do_t_lds},
- {"ldrsh", 0x5e00, 2, ARM_EXT_THUMB, do_t_lds},
- {"ldsb", 0x5600, 2, ARM_EXT_THUMB, do_t_lds},
- {"ldsh", 0x5e00, 2, ARM_EXT_THUMB, do_t_lds},
- {"lsl", 0x0000, 2, ARM_EXT_THUMB, do_t_lsl},
- {"lsr", 0x0000, 2, ARM_EXT_THUMB, do_t_lsr},
- {"mov", 0x0000, 2, ARM_EXT_THUMB, do_t_mov},
- {"mul", T_OPCODE_MUL, 2, ARM_EXT_THUMB, do_t_arit},
- {"mvn", T_OPCODE_MVN, 2, ARM_EXT_THUMB, do_t_arit},
- {"neg", T_OPCODE_NEG, 2, ARM_EXT_THUMB, do_t_arit},
- {"orr", 0x4300, 2, ARM_EXT_THUMB, do_t_arit},
- {"pop", 0xbc00, 2, ARM_EXT_THUMB, do_t_push_pop},
- {"push", 0xb400, 2, ARM_EXT_THUMB, do_t_push_pop},
- {"ror", 0x41c0, 2, ARM_EXT_THUMB, do_t_arit},
- {"sbc", 0x4180, 2, ARM_EXT_THUMB, do_t_arit},
- {"stmia", 0xc000, 2, ARM_EXT_THUMB, do_t_ldmstm},
- {"str", 0x0000, 2, ARM_EXT_THUMB, do_t_str},
- {"strb", 0x0000, 2, ARM_EXT_THUMB, do_t_strb},
- {"strh", 0x0000, 2, ARM_EXT_THUMB, do_t_strh},
- {"swi", 0xdf00, 2, ARM_EXT_THUMB, do_t_swi},
- {"sub", 0x0000, 2, ARM_EXT_THUMB, do_t_sub},
- {"tst", T_OPCODE_TST, 2, ARM_EXT_THUMB, do_t_arit},
+static const struct thumb_opcode tinsns[] =
+{
+ /* Thumb v1 (ARMv4T). */
+ {"adc", 0x4140, 2, ARM_EXT_V4T, do_t_arit},
+ {"add", 0x0000, 2, ARM_EXT_V4T, do_t_add},
+ {"and", 0x4000, 2, ARM_EXT_V4T, do_t_arit},
+ {"asr", 0x0000, 2, ARM_EXT_V4T, do_t_asr},
+ {"b", T_OPCODE_BRANCH, 2, ARM_EXT_V4T, do_t_branch12},
+ {"beq", 0xd0fe, 2, ARM_EXT_V4T, do_t_branch9},
+ {"bne", 0xd1fe, 2, ARM_EXT_V4T, do_t_branch9},
+ {"bcs", 0xd2fe, 2, ARM_EXT_V4T, do_t_branch9},
+ {"bhs", 0xd2fe, 2, ARM_EXT_V4T, do_t_branch9},
+ {"bcc", 0xd3fe, 2, ARM_EXT_V4T, do_t_branch9},
+ {"bul", 0xd3fe, 2, ARM_EXT_V4T, do_t_branch9},
+ {"blo", 0xd3fe, 2, ARM_EXT_V4T, do_t_branch9},
+ {"bmi", 0xd4fe, 2, ARM_EXT_V4T, do_t_branch9},
+ {"bpl", 0xd5fe, 2, ARM_EXT_V4T, do_t_branch9},
+ {"bvs", 0xd6fe, 2, ARM_EXT_V4T, do_t_branch9},
+ {"bvc", 0xd7fe, 2, ARM_EXT_V4T, do_t_branch9},
+ {"bhi", 0xd8fe, 2, ARM_EXT_V4T, do_t_branch9},
+ {"bls", 0xd9fe, 2, ARM_EXT_V4T, do_t_branch9},
+ {"bge", 0xdafe, 2, ARM_EXT_V4T, do_t_branch9},
+ {"blt", 0xdbfe, 2, ARM_EXT_V4T, do_t_branch9},
+ {"bgt", 0xdcfe, 2, ARM_EXT_V4T, do_t_branch9},
+ {"ble", 0xddfe, 2, ARM_EXT_V4T, do_t_branch9},
+ {"bal", 0xdefe, 2, ARM_EXT_V4T, do_t_branch9},
+ {"bic", 0x4380, 2, ARM_EXT_V4T, do_t_arit},
+ {"bl", 0xf7fffffe, 4, ARM_EXT_V4T, do_t_branch23},
+ {"bx", 0x4700, 2, ARM_EXT_V4T, do_t_bx},
+ {"cmn", T_OPCODE_CMN, 2, ARM_EXT_V4T, do_t_arit},
+ {"cmp", 0x0000, 2, ARM_EXT_V4T, do_t_compare},
+ {"eor", 0x4040, 2, ARM_EXT_V4T, do_t_arit},
+ {"ldmia", 0xc800, 2, ARM_EXT_V4T, do_t_ldmstm},
+ {"ldr", 0x0000, 2, ARM_EXT_V4T, do_t_ldr},
+ {"ldrb", 0x0000, 2, ARM_EXT_V4T, do_t_ldrb},
+ {"ldrh", 0x0000, 2, ARM_EXT_V4T, do_t_ldrh},
+ {"ldrsb", 0x5600, 2, ARM_EXT_V4T, do_t_lds},
+ {"ldrsh", 0x5e00, 2, ARM_EXT_V4T, do_t_lds},
+ {"ldsb", 0x5600, 2, ARM_EXT_V4T, do_t_lds},
+ {"ldsh", 0x5e00, 2, ARM_EXT_V4T, do_t_lds},
+ {"lsl", 0x0000, 2, ARM_EXT_V4T, do_t_lsl},
+ {"lsr", 0x0000, 2, ARM_EXT_V4T, do_t_lsr},
+ {"mov", 0x0000, 2, ARM_EXT_V4T, do_t_mov},
+ {"mul", T_OPCODE_MUL, 2, ARM_EXT_V4T, do_t_arit},
+ {"mvn", T_OPCODE_MVN, 2, ARM_EXT_V4T, do_t_arit},
+ {"neg", T_OPCODE_NEG, 2, ARM_EXT_V4T, do_t_arit},
+ {"orr", 0x4300, 2, ARM_EXT_V4T, do_t_arit},
+ {"pop", 0xbc00, 2, ARM_EXT_V4T, do_t_push_pop},
+ {"push", 0xb400, 2, ARM_EXT_V4T, do_t_push_pop},
+ {"ror", 0x41c0, 2, ARM_EXT_V4T, do_t_arit},
+ {"sbc", 0x4180, 2, ARM_EXT_V4T, do_t_arit},
+ {"stmia", 0xc000, 2, ARM_EXT_V4T, do_t_ldmstm},
+ {"str", 0x0000, 2, ARM_EXT_V4T, do_t_str},
+ {"strb", 0x0000, 2, ARM_EXT_V4T, do_t_strb},
+ {"strh", 0x0000, 2, ARM_EXT_V4T, do_t_strh},
+ {"swi", 0xdf00, 2, ARM_EXT_V4T, do_t_swi},
+ {"sub", 0x0000, 2, ARM_EXT_V4T, do_t_sub},
+ {"tst", T_OPCODE_TST, 2, ARM_EXT_V4T, do_t_arit},
/* Pseudo ops: */
- {"adr", 0x0000, 2, ARM_EXT_THUMB, do_t_adr},
- {"nop", 0x46C0, 2, ARM_EXT_THUMB, do_t_nop}, /* mov r8,r8 */
-};
-
-struct reg_entry
-{
- 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}
+ {"adr", 0x0000, 2, ARM_EXT_V4T, do_t_adr},
+ {"nop", 0x46C0, 2, ARM_EXT_V4T, do_t_nop}, /* mov r8,r8 */
+ /* Thumb v2 (ARMv5T). */
+ {"blx", 0, 0, ARM_EXT_V5T, do_t_blx},
+ {"bkpt", 0xbe00, 2, ARM_EXT_V5T, do_t_bkpt},
};
-#define BAD_ARGS _("Bad arguments to instruction")
+#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")
+#define BAD_COND _("instruction is not conditional")
#define ERR_NO_ACCUM _("acc0 expected")
static struct hash_control * arm_ops_hsh = NULL;
static struct hash_control * arm_tops_hsh = NULL;
static struct hash_control * arm_cond_hsh = NULL;
static struct hash_control * arm_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
@@ -1192,7 +2070,7 @@ static void s_arm_elf_cons PARAMS ((int));
static int my_get_expression PARAMS ((expressionS *, char **));
-CONST pseudo_typeS md_pseudo_table[] =
+const pseudo_typeS md_pseudo_table[] =
{
/* Never called becasue '.req' does not start line. */
{ "req", s_req, 0 },
@@ -1228,6 +2106,12 @@ CONST pseudo_typeS md_pseudo_table[] =
{ 0, 0, 0 }
};
+/* Other internal functions. */
+static int arm_parse_extension PARAMS ((char *, int *));
+static int arm_parse_cpu PARAMS ((char *));
+static int arm_parse_arch PARAMS ((char *));
+static int arm_parse_fpu PARAMS ((char *));
+
/* Stuff needed to resolve the label ambiguity
As:
...
@@ -1297,7 +2181,7 @@ add_to_lit_pool ()
{
if (next_literal_pool_place >= MAX_LITERAL_POOL_SIZE)
{
- inst.error = _("Literal Pool Overflow");
+ inst.error = _("literal pool overflow");
return FAIL;
}
@@ -1318,7 +2202,7 @@ add_to_lit_pool ()
static void
symbol_locate (symbolP, name, segment, valu, frag)
symbolS * symbolP;
- CONST char * name; /* It is copied, the caller can modify. */
+ const char * name; /* It is copied, the caller can modify. */
segT segment; /* Segment identifier (SEG_<something>). */
valueT valu; /* Symbol value. */
fragS * frag; /* Associated fragment. */
@@ -1439,7 +2323,7 @@ static void
s_req (a)
int a ATTRIBUTE_UNUSED;
{
- as_bad (_("Invalid syntax for .req directive."));
+ as_bad (_("invalid syntax for .req directive"));
}
static void
@@ -1514,10 +2398,10 @@ s_align (unused)
temp = get_absolute_expression ();
if (temp > max_alignment)
- as_bad (_("Alignment too large: %d. assumed."), temp = max_alignment);
+ as_bad (_("alignment too large: %d assumed"), temp = max_alignment);
else if (temp < 0)
{
- as_bad (_("Alignment negative. 0 assumed."));
+ as_bad (_("alignment negative. 0 assumed."));
temp = 0;
}
@@ -1601,7 +2485,7 @@ s_thumb_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;
@@ -1721,7 +2605,7 @@ opcode_select (width)
case 16:
if (! thumb_mode)
{
- if (! (cpu_variant & ARM_EXT_THUMB))
+ if (! (cpu_variant & ARM_EXT_V4T))
as_bad (_("selected processor does not support THUMB opcodes"));
thumb_mode = 1;
@@ -1734,7 +2618,7 @@ opcode_select (width)
case 32:
if (thumb_mode)
{
- if ((cpu_variant & ARM_ANY) == ARM_EXT_THUMB)
+ if ((cpu_variant & ARM_ALL) == ARM_EXT_V4T)
as_bad (_("selected processor does not support ARM opcodes"));
thumb_mode = 0;
@@ -1788,12 +2672,12 @@ s_code (unused)
static void
end_of_line (str)
- char * str;
+ char *str;
{
skip_whitespace (str);
- if (* str != '\0')
- inst.error = _("Garbage following instruction");
+ if (*str != '\0' && !inst.error)
+ inst.error = _("garbage following instruction");
}
static int
@@ -1831,7 +2715,7 @@ reg_required_here (str, shift)
int reg;
char * start = * str;
- if ((reg = arm_reg_parse (str)) != FAIL && int_register (reg))
+ if ((reg = arm_reg_parse (str, all_reg_maps[REG_TYPE_RN].htab)) != FAIL)
{
if (shift >= 0)
inst.instruction |= reg << shift;
@@ -1843,20 +2727,20 @@ reg_required_here (str, shift)
/* 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);
+ sprintf (buff, _("register expected, not '%.100s'"), start);
inst.error = buff;
return FAIL;
}
-static CONST struct asm_psr *
+static const struct asm_psr *
arm_psr_parse (ccp)
register char ** ccp;
{
char * start = * ccp;
char c;
char * p;
- CONST struct asm_psr * psr;
+ const struct asm_psr * psr;
p = start;
@@ -1865,7 +2749,7 @@ arm_psr_parse (ccp)
{
c = *p++;
}
- while (isalpha (c) || c == '_');
+ while (ISALPHA (c) || c == '_');
/* Terminate the word. */
*--p = 0;
@@ -1878,7 +2762,7 @@ arm_psr_parse (ccp)
strncpy (start, "SPSR", 4);
/* Now locate the word in the psr hash table. */
- psr = (CONST struct asm_psr *) hash_find (arm_psr_hsh, start);
+ psr = (const struct asm_psr *) hash_find (arm_psr_hsh, start);
/* Restore the input stream. */
*p = c;
@@ -1897,7 +2781,7 @@ psr_required_here (str)
char ** str;
{
char * start = * str;
- CONST struct asm_psr * psr;
+ const struct asm_psr * psr;
psr = arm_psr_parse (str);
@@ -1924,36 +2808,41 @@ psr_required_here (str)
static int
co_proc_number (str)
- char ** str;
+ char **str;
{
int processor, pchar;
+ char *start;
- skip_whitespace (* str);
+ skip_whitespace (*str);
+ start = *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')
+ if ((processor = arm_reg_parse (str, all_reg_maps[REG_TYPE_CP].htab))
+ == FAIL)
{
- processor = pchar - '0';
- if (**str >= '0' && **str <= '9')
+ *str = start;
+
+ pchar = *(*str)++;
+ if (pchar >= '0' && pchar <= '9')
{
- processor = processor * 10 + *(*str)++ - '0';
- if (processor > 15)
+ processor = pchar - '0';
+ if (**str >= '0' && **str <= '9')
{
- inst.error = _("Illegal co-processor number");
- return FAIL;
+ 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;
+ else
+ {
+ inst.error = _("bad or missing co-processor number");
+ return FAIL;
+ }
}
inst.instruction |= processor << 8;
@@ -1998,16 +2887,15 @@ cp_reg_required_here (str, where)
int reg;
char * start = *str;
- if ((reg = arm_reg_parse (str)) != FAIL && cp_register (reg))
+ if ((reg = arm_reg_parse (str, all_reg_maps[REG_TYPE_CN].htab)) != FAIL)
{
- 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");
+ inst.error = _("co-processor register expected");
/* Restore the start point. */
*str = start;
@@ -2022,16 +2910,15 @@ fp_reg_required_here (str, where)
int reg;
char * start = * str;
- if ((reg = arm_reg_parse (str)) != FAIL && fp_register (reg))
+ if ((reg = arm_reg_parse (str, all_reg_maps[REG_TYPE_FN].htab)) != FAIL)
{
- 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");
+ inst.error = _("floating point register expected");
/* Restore the start point. */
*str = start;
@@ -2087,8 +2974,9 @@ cp_address_offset (str)
}
static int
-cp_address_required_here (str)
+cp_address_required_here (str, wb_ok)
char ** str;
+ int wb_ok;
{
char * p = * str;
int pre_inc = 0;
@@ -2110,7 +2998,7 @@ cp_address_required_here (str)
{
p++;
- if (skip_past_comma (& p) == SUCCESS)
+ if (wb_ok && skip_past_comma (& p) == SUCCESS)
{
/* [Rn], #expr */
write_back = WRITE_BACK;
@@ -2152,7 +3040,7 @@ cp_address_required_here (str)
skip_whitespace (p);
- if (*p == '!')
+ if (wb_ok && *p == '!')
{
if (reg == REG_PC)
{
@@ -2183,20 +3071,17 @@ cp_address_required_here (str)
}
static void
-do_nop (str, flags)
+do_empty (str)
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)
+do_mrs (str)
char *str;
- unsigned long flags;
{
int skip = 0;
@@ -2230,7 +3115,7 @@ do_mrs (str, flags)
skip = 8;
else
{
- inst.error = _("{C|S}PSR expected");
+ inst.error = _("CPSR or SPSR expected");
return;
}
@@ -2238,7 +3123,6 @@ do_mrs (str, flags)
inst.instruction |= SPSR_BIT;
str += skip;
- inst.instruction |= flags;
end_of_line (str);
}
@@ -2247,9 +3131,8 @@ do_mrs (str, flags)
"{C|S}PSR_f, #expression". */
static void
-do_msr (str, flags)
+do_msr (str)
char * str;
- unsigned long flags;
{
skip_whitespace (str);
@@ -2267,7 +3150,6 @@ do_msr (str, flags)
if (reg_required_here (& str, 0) != FAIL)
{
inst.error = NULL;
- inst.instruction |= flags;
end_of_line (str);
return;
}
@@ -2301,7 +3183,7 @@ do_msr (str, flags)
}
#endif
- flags |= INST_IMMEDIATE;
+ inst.instruction |= INST_IMMEDIATE;
if (inst.reloc.exp.X_add_symbol)
{
@@ -2314,7 +3196,7 @@ do_msr (str, flags)
if (value == (unsigned) FAIL)
{
- inst.error = _("Invalid constant");
+ inst.error = _("invalid constant");
return;
}
@@ -2322,7 +3204,6 @@ do_msr (str, flags)
}
inst.error = NULL;
- inst.instruction |= flags;
end_of_line (str);
}
@@ -2333,9 +3214,8 @@ do_msr (str, flags)
SMLAL RdLo, RdHi, Rm, Rs. */
static void
-do_mull (str, flags)
+do_mull (str)
char * str;
- unsigned long flags;
{
int rdlo, rdhi, rm, rs;
@@ -2379,15 +3259,13 @@ do_mull (str, flags)
return;
}
- inst.instruction |= flags;
end_of_line (str);
return;
}
static void
-do_mul (str, flags)
+do_mul (str)
char * str;
- unsigned long flags;
{
int rd, rm;
@@ -2435,15 +3313,13 @@ do_mul (str, flags)
return;
}
- inst.instruction |= flags;
end_of_line (str);
return;
}
static void
-do_mla (str, flags)
+do_mla (str)
char * str;
- unsigned long flags;
{
int rd, rm;
@@ -2493,7 +3369,6 @@ do_mla (str, flags)
return;
}
- inst.instruction |= flags;
end_of_line (str);
return;
}
@@ -2518,7 +3393,7 @@ accum0_required_here (str)
*str = p; /* Advance caller's string pointer too. */
c = *p++;
- while (isalnum (c))
+ while (ISALNUM (c))
c = *p++;
*--p = 0; /* Aap nul into input buffer at non-alnum. */
@@ -2570,7 +3445,7 @@ ld_mode_required_here (string)
if (skip_past_comma (& str) == SUCCESS)
{
/* [Rn],... (post inc) */
- if (ldst_extend (& str, 1) == FAIL)
+ if (ldst_extend_v4 (&str) == FAIL)
return FAIL;
}
else /* [Rn] */
@@ -2597,7 +3472,7 @@ ld_mode_required_here (string)
pre_inc = 1;
- if (ldst_extend (& str, 1) == FAIL)
+ if (ldst_extend_v4 (&str) == FAIL)
return FAIL;
skip_whitespace (str);
@@ -2648,9 +3523,8 @@ ld_mode_required_here (string)
Error if any register is R15. */
static void
-do_smla (str, flags)
+do_smla (str)
char * str;
- unsigned long flags;
{
int rd, rm, rs, rn;
@@ -2668,9 +3542,6 @@ do_smla (str, flags)
else if (rd == REG_PC || rm == REG_PC || rs == REG_PC || rn == REG_PC)
inst.error = BAD_PC;
- else if (flags)
- inst.error = BAD_FLAGS;
-
else
end_of_line (str);
}
@@ -2681,9 +3552,8 @@ do_smla (str, flags)
Warning if Rdlo == Rdhi. */
static void
-do_smlal (str, flags)
+do_smlal (str)
char * str;
- unsigned long flags;
{
int rdlo, rdhi, rm, rs;
@@ -2710,10 +3580,7 @@ do_smlal (str, flags)
if (rdlo == rdhi)
as_tsktsk (_("rdhi and rdlo must be different"));
- if (flags)
- inst.error = BAD_FLAGS;
- else
- end_of_line (str);
+ end_of_line (str);
}
/* ARM V5E (El Segundo) signed-multiply (argument parse)
@@ -2721,9 +3588,8 @@ do_smlal (str, flags)
Error if any register is R15. */
static void
-do_smul (str, flags)
+do_smul (str)
char * str;
- unsigned long flags;
{
int rd, rm, rs;
@@ -2739,9 +3605,6 @@ do_smul (str, flags)
else if (rd == REG_PC || rm == REG_PC || rs == REG_PC)
inst.error = BAD_PC;
- else if (flags)
- inst.error = BAD_FLAGS;
-
else
end_of_line (str);
}
@@ -2751,9 +3614,8 @@ do_smul (str, flags)
Error if any register is R15. */
static void
-do_qadd (str, flags)
+do_qadd (str)
char * str;
- unsigned long flags;
{
int rd, rm, rn;
@@ -2769,9 +3631,6 @@ do_qadd (str, flags)
else if (rd == REG_PC || rm == REG_PC || rn == REG_PC)
inst.error = BAD_PC;
- else if (flags)
- inst.error = BAD_FLAGS;
-
else
end_of_line (str);
}
@@ -2786,9 +3645,8 @@ do_qadd (str, flags)
Result unpredicatable if Rd or Rn is R15. */
static void
-do_co_reg2c (str, flags)
+do_co_reg2c (str)
char * str;
- unsigned long flags;
{
int rd, rn;
@@ -2828,7 +3686,7 @@ do_co_reg2c (str, flags)
/* Unpredictable result if rd or rn is R15. */
if (rd == REG_PC || rn == REG_PC)
as_tsktsk
- (_("Warning: Instruction unpredictable when using r15"));
+ (_("Warning: instruction unpredictable when using r15"));
if (skip_past_comma (& str) == FAIL
|| cp_reg_required_here (& str, 0) == FAIL)
@@ -2838,9 +3696,6 @@ do_co_reg2c (str, flags)
return;
}
- if (flags)
- inst.error = BAD_COND;
-
end_of_line (str);
}
@@ -2850,18 +3705,11 @@ do_co_reg2c (str, flags)
Error if Rd or Rm are R15. */
static void
-do_clz (str, flags)
+do_clz (str)
char * str;
- unsigned long flags;
{
int rd, rm;
- if (flags)
- {
- as_bad (BAD_FLAGS);
- return;
- }
-
skip_whitespace (str);
if (((rd = reg_required_here (& str, 12)) == FAIL)
@@ -2883,13 +3731,9 @@ do_clz (str, flags)
Otherwise, it's the same as LDC/STC. */
static void
-do_lstc2 (str, flags)
+do_lstc2 (str)
char * str;
- unsigned long flags;
{
- if (flags)
- inst.error = BAD_COND;
-
skip_whitespace (str);
if (co_proc_number (& str) == FAIL)
@@ -2904,7 +3748,7 @@ do_lstc2 (str, flags)
inst.error = BAD_ARGS;
}
else if (skip_past_comma (& str) == FAIL
- || cp_address_required_here (& str) == FAIL)
+ || cp_address_required_here (&str, CP_WB_OK) == FAIL)
{
if (! inst.error)
inst.error = BAD_ARGS;
@@ -2919,9 +3763,8 @@ do_lstc2 (str, flags)
Otherwise, it's the same as CDP. */
static void
-do_cdp2 (str, flags)
+do_cdp2 (str)
char * str;
- unsigned long flags;
{
skip_whitespace (str);
@@ -2974,9 +3817,6 @@ do_cdp2 (str, flags)
}
}
- if (flags)
- inst.error = BAD_FLAGS;
-
end_of_line (str);
}
@@ -2987,9 +3827,8 @@ do_cdp2 (str, flags)
Otherwise, it's the same as MCR/MRC. */
static void
-do_co_reg2 (str, flags)
+do_co_reg2 (str)
char * str;
- unsigned long flags;
{
skip_whitespace (str);
@@ -3042,8 +3881,27 @@ do_co_reg2 (str, flags)
}
}
- if (flags)
- inst.error = BAD_COND;
+ end_of_line (str);
+}
+
+/* ARM v5TEJ. Jump to Jazelle code. */
+static void
+do_bxj (str)
+ char * str;
+{
+ int reg;
+
+ skip_whitespace (str);
+
+ if ((reg = reg_required_here (&str, 0)) == FAIL)
+ {
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ /* Note - it is not illegal to do a "bxj pc". Useless, but not illegal. */
+ if (reg == REG_PC)
+ as_tsktsk (_("use of r15 in bxj is not really useful"));
end_of_line (str);
}
@@ -3091,9 +3949,8 @@ do_t_bkpt (str)
new one that can cope with setting one extra bit (the H bit). */
static void
-do_branch25 (str, flags)
+do_branch25 (str)
char * str;
- unsigned long flags ATTRIBUTE_UNUSED;
{
if (my_get_expression (& inst.reloc.exp, & str))
return;
@@ -3146,19 +4003,12 @@ do_branch25 (str, flags)
Also, the <target_addr> can be 25 bits, hence has its own reloc. */
static void
-do_blx (str, flags)
+do_blx (str)
char * str;
- unsigned long flags;
{
char * mystr = str;
int rm;
- if (flags)
- {
- as_bad (BAD_FLAGS);
- return;
- }
-
skip_whitespace (mystr);
rm = reg_required_here (& mystr, 0);
@@ -3171,7 +4021,7 @@ do_blx (str, flags)
Use the condition code our caller put in inst.instruction.
Pass ourselves off as a BX with a funny opcode. */
inst.instruction |= 0x012fff30;
- do_bx (str, flags);
+ do_bx (str);
}
else
{
@@ -3186,7 +4036,7 @@ do_blx (str, flags)
/* Process like a B/BL, but with a different reloc.
Note that B/BL expecte fffffe, not 0, offset in the opcode table. */
- do_branch25 (str, flags);
+ do_branch25 (str);
}
}
@@ -3238,13 +4088,11 @@ do_t_blx (str)
BKPT <16 bit unsigned immediate>
Instruction is not conditional.
The bit pattern given in insns[] has the COND_ALWAYS condition,
- and it is an error if the caller tried to override that.
- Note "flags" is nonzero if a flag was supplied (which is an error). */
+ and it is an error if the caller tried to override that. */
static void
-do_bkpt (str, flags)
+do_bkpt (str)
char * str;
- unsigned long flags;
{
expressionS expr;
unsigned long number;
@@ -3279,9 +4127,6 @@ do_bkpt (str, flags)
inst.instruction |= number & 0xf;
end_of_line (str);
-
- if (flags)
- inst.error = BAD_FLAGS;
}
/* Xscale multiply-accumulate (argument parse)
@@ -3290,17 +4135,13 @@ do_bkpt (str, flags)
MIAxycc acc0,Rm,Rs. */
static void
-do_mia (str, flags)
+do_xsc_mia (str)
char * str;
- unsigned long flags;
{
int rs;
int rm;
- if (flags)
- as_bad (BAD_FLAGS);
-
- else if (accum0_required_here (& str) == FAIL)
+ if (accum0_required_here (& str) == FAIL)
inst.error = ERR_NO_ACCUM;
else if (skip_past_comma (& str) == FAIL
@@ -3324,16 +4165,12 @@ do_mia (str, flags)
MARcc acc0,RdLo,RdHi. */
static void
-do_mar (str, flags)
+do_xsc_mar (str)
char * str;
- unsigned long flags;
{
int rdlo, rdhi;
- if (flags)
- as_bad (BAD_FLAGS);
-
- else if (accum0_required_here (& str) == FAIL)
+ if (accum0_required_here (& str) == FAIL)
inst.error = ERR_NO_ACCUM;
else if (skip_past_comma (& str) == FAIL
@@ -3357,19 +4194,12 @@ do_mar (str, flags)
MRAcc RdLo,RdHi,acc0. */
static void
-do_mra (str, flags)
+do_xsc_mra (str)
char * str;
- unsigned long flags;
{
int rdlo;
int rdhi;
- if (flags)
- {
- as_bad (BAD_FLAGS);
- return;
- }
-
skip_whitespace (str);
if ((rdlo = reg_required_here (& str, 12)) == FAIL)
@@ -3393,25 +4223,18 @@ do_mra (str, flags)
end_of_line (str);
}
-/* Xscale: Preload-Cache
+/* ARMv5TE: Preload-Cache
PLD <addr_mode>
Syntactically, like LDR with B=1, W=0, L=1. */
static void
-do_pld (str, flags)
+do_pld (str)
char * str;
- unsigned long flags;
{
int rd;
- if (flags)
- {
- as_bad (BAD_FLAGS);
- return;
- }
-
skip_whitespace (str);
if (* str != '[')
@@ -3420,7 +4243,7 @@ do_pld (str, flags)
return;
}
- ++ str;
+ ++str;
skip_whitespace (str);
if ((rd = reg_required_here (& str, 16)) == FAIL)
@@ -3428,21 +4251,23 @@ do_pld (str, flags)
skip_whitespace (str);
- if (* str == ']')
+ if (*str == ']')
{
/* [Rn], ... ? */
- ++ str;
+ ++str;
skip_whitespace (str);
- if (skip_past_comma (& str) == SUCCESS)
+ /* Post-indexed addressing is not allowed with PLD. */
+ if (skip_past_comma (&str) == SUCCESS)
{
- if (ldst_extend (& str, 0) == FAIL)
- return;
+ inst.error
+ = _("post-indexed expression used in preload instruction");
+ return;
}
- else if (* str == '!') /* [Rn]! */
+ else if (*str == '!') /* [Rn]! */
{
inst.error = _("writeback used in preload instruction");
- ++ str;
+ ++str;
}
else /* [Rn] */
inst.instruction |= INDEX_UP | PRE_INDEX;
@@ -3455,7 +4280,7 @@ do_pld (str, flags)
return;
}
- if (ldst_extend (& str, 0) == FAIL)
+ if (ldst_extend (&str) == FAIL)
return;
skip_whitespace (str);
@@ -3481,49 +4306,19 @@ do_pld (str, flags)
end_of_line (str);
}
-/* Xscale load-consecutive (argument parse)
+/* ARMv5TE load-consecutive (argument parse)
Mode is like LDRH.
LDRccD R, mode
STRccD R, mode. */
static void
-do_ldrd (str, flags)
+do_ldrd (str)
char * str;
- unsigned long flags;
{
int rd;
int rn;
- if (flags != DOUBLE_LOAD_FLAG)
- {
- /* Change instruction pattern to normal ldr/str. */
- if (inst.instruction & 0x20)
- inst.instruction = (inst.instruction & COND_MASK) | 0x04000000; /* str */
- else
- inst.instruction = (inst.instruction & COND_MASK) | 0x04100000; /* ldr */
-
- /* Perform a normal load/store instruction parse. */
- do_ldst (str, flags);
-
- return;
- }
-
- if ((cpu_variant & ARM_EXT_XSCALE) != ARM_EXT_XSCALE)
- {
- static char buff[128];
-
- --str;
- while (isspace (*str))
- --str;
- str -= 4;
-
- /* Deny all knowledge. */
- sprintf (buff, _("bad instruction '%.100s'"), str);
- inst.error = buff;
- return;
- }
-
skip_whitespace (str);
if ((rd = reg_required_here (& str, 12)) == FAIL)
@@ -3543,22 +4338,32 @@ do_ldrd (str, flags)
/* inst.instruction has now been zapped with Rd and the addressing mode. */
if (rd & 1) /* Unpredictable result if Rd is odd. */
{
- inst.error = _("Destination register must be even");
+ inst.error = _("destination register must be even");
return;
}
- if (rd == REG_LR || rd == 12)
+ if (rd == REG_LR)
{
- inst.error = _("r12 or r14 not allowed here");
+ inst.error = _("r14 not allowed here");
return;
}
if (((rd == rn) || (rd + 1 == rn))
- &&
- ((inst.instruction & WRITE_BACK)
- || (!(inst.instruction & PRE_INDEX))))
+ && ((inst.instruction & WRITE_BACK)
+ || (!(inst.instruction & PRE_INDEX))))
as_warn (_("pre/post-indexing used when modified address register is destination"));
+ /* For an index-register load, the index register must not overlap the
+ destination (even if not write-back). */
+ if ((inst.instruction & V4_STR_BIT) == 0
+ && (inst.instruction & HWOFFSET_IMM) == 0)
+ {
+ int rm = inst.instruction & 0x0000000f;
+
+ if (rm == rd || (rm == rd + 1))
+ as_warn (_("ldrd destination registers must not overlap index register"));
+ }
+
end_of_line (str);
}
@@ -3651,6 +4456,8 @@ walk_no_bignums (sp)
return 0;
}
+static int in_my_get_expression = 0;
+
static int
my_get_expression (ep, str)
expressionS * ep;
@@ -3661,7 +4468,17 @@ my_get_expression (ep, str)
save_in = input_line_pointer;
input_line_pointer = *str;
+ in_my_get_expression = 1;
seg = expression (ep);
+ in_my_get_expression = 0;
+
+ if (ep->X_op == O_illegal)
+ {
+ /* We found a bad expression in md_operand(). */
+ *str = input_line_pointer;
+ input_line_pointer = save_in;
+ return 1;
+ }
#ifdef OBJ_AOUT
if (seg != absolute_section
@@ -3686,7 +4503,7 @@ my_get_expression (ep, str)
|| (ep->X_op_symbol
&& walk_no_bignums (ep->X_op_symbol)))))
{
- inst.error = _("Invalid constant");
+ inst.error = _("invalid constant");
*str = input_line_pointer;
input_line_pointer = save_in;
return 1;
@@ -3697,6 +4514,20 @@ my_get_expression (ep, str)
return 0;
}
+/* We handle all bad expressions here, so that we can report the faulty
+ instruction in the error message. */
+void
+md_operand (expr)
+ expressionS *expr;
+{
+ if (in_my_get_expression)
+ {
+ expr->X_op = O_illegal;
+ if (inst.error == NULL)
+ inst.error = _("bad expression");
+ }
+}
+
/* UNRESTRICT should be one if <shift> <register> is permitted for this
instruction. */
@@ -3711,12 +4542,12 @@ decode_shift (str, unrestrict)
skip_whitespace (* str);
- for (p = * str; isalpha (* p); p ++)
+ for (p = * str; ISALPHA (* p); p ++)
;
if (p == * str)
{
- inst.error = _("Shift expression expected");
+ inst.error = _("shift expression expected");
return FAIL;
}
@@ -3727,7 +4558,7 @@ decode_shift (str, unrestrict)
if (shift == NULL)
{
- inst.error = _("Shift expression expected");
+ inst.error = _("shift expression expected");
return FAIL;
}
@@ -3782,13 +4613,13 @@ decode_shift (str, unrestrict)
about this though. */
if (num == 0)
{
- as_warn (_("Shift of 0 ignored."));
+ as_warn (_("shift of 0 ignored."));
shift = & shift_names[0];
assert (shift->properties->index == SHIFT_LSL);
}
else
{
- inst.error = _("Invalid immediate shift");
+ inst.error = _("invalid immediate shift");
return FAIL;
}
}
@@ -3943,7 +4774,7 @@ data_op2 (str)
if (expr.X_op != O_constant)
{
- inst.error = _("Constant expression expected");
+ inst.error = _("constant expression expected");
return FAIL;
}
@@ -3952,7 +4783,7 @@ data_op2 (str)
|| (expr.X_add_number & 1) != 0
|| ((unsigned) inst.reloc.exp.X_add_number) > 255)
{
- inst.error = _("Invalid constant");
+ inst.error = _("invalid constant");
return FAIL;
}
inst.instruction |= INST_IMMEDIATE;
@@ -3972,7 +4803,7 @@ data_op2 (str)
inst.reloc.exp.X_add_number))
== FAIL)
{
- inst.error = _("Invalid constant");
+ inst.error = _("invalid constant");
return FAIL;
}
}
@@ -3985,7 +4816,7 @@ data_op2 (str)
}
(*str)++;
- inst.error = _("Register or shift expression expected");
+ inst.error = _("register or shift expression expected");
return FAIL;
}
}
@@ -4038,19 +4869,18 @@ fp_op2 (str)
return SUCCESS;
}
- inst.error = _("Invalid floating point immediate expression");
+ inst.error = _("invalid floating point immediate expression");
return FAIL;
}
inst.error =
- _("Floating point register or immediate expression expected");
+ _("floating point register or immediate expression expected");
return FAIL;
}
}
static void
-do_arit (str, flags)
+do_arit (str)
char * str;
- unsigned long flags;
{
skip_whitespace (str);
@@ -4065,15 +4895,13 @@ do_arit (str, flags)
return;
}
- inst.instruction |= flags;
end_of_line (str);
return;
}
static void
-do_adr (str, flags)
+do_adr (str)
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". */
@@ -4093,49 +4921,45 @@ do_adr (str, flags)
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);
}
static void
-do_adrl (str, flags)
+do_adrl (str)
char * str;
- unsigned long flags;
{
/* This is a pseudo-op of the form "adrl rd, label" to be converted
into a relative address of the form:
- add rd, pc, #low(label-.-8)"
- add rd, rd, #high(label-.-8)" */
+ add rd, 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 (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)
+do_cmp (str)
char * str;
- unsigned long flags;
{
skip_whitespace (str);
@@ -4154,18 +4978,13 @@ do_cmp (str, flags)
return;
}
- inst.instruction |= flags;
- if ((flags & 0x0000f000) == 0)
- inst.instruction |= CONDS_BIT;
-
end_of_line (str);
return;
}
static void
-do_mov (str, flags)
+do_mov (str)
char * str;
- unsigned long flags;
{
skip_whitespace (str);
@@ -4184,15 +5003,13 @@ do_mov (str, flags)
return;
}
- inst.instruction |= flags;
end_of_line (str);
return;
}
static int
-ldst_extend (str, hwse)
+ldst_extend (str)
char ** str;
- int hwse;
{
int add = INDEX_UP;
@@ -4208,8 +5025,7 @@ ldst_extend (str, hwse)
{
int value = inst.reloc.exp.X_add_number;
- if ((hwse && (value < -255 || value > 255))
- || (value < -4095 || value > 4095))
+ if (value < -4095 || value > 4095)
{
inst.error = _("address offset too large");
return FAIL;
@@ -4221,23 +5037,11 @@ ldst_extend (str, hwse)
add = 0;
}
- /* Halfword and signextension instructions have the
- immediate value split across bits 11..8 and bits 3..0. */
- if (hwse)
- inst.instruction |= (add | HWOFFSET_IMM
- | ((value >> 4) << 8) | (value & 0xF));
- else
- inst.instruction |= add | value;
+ 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.type = BFD_RELOC_ARM_OFFSET_IMM;
inst.reloc.pc_rel = 0;
}
return SUCCESS;
@@ -4254,49 +5058,353 @@ ldst_extend (str, hwse)
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);
- }
+ 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)
+do_ldst (str)
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)
+ 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 == '[')
{
- /* This is actually a load/store of a halfword, or a
- signed-extension load. */
- if ((cpu_variant & ARM_EXT_HALFWORD) == 0)
+ 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 == ']')
{
- inst.error
- = _("Processor does not support halfwords or signed bytes");
+ str ++;
+
+ if (skip_past_comma (&str) == SUCCESS)
+ {
+ /* [Rn],... (post inc) */
+ if (ldst_extend (&str) == FAIL)
+ return;
+ if (conflict_reg)
+ as_warn (_("%s register same as write-back base"),
+ ((inst.instruction & LOAD_BIT)
+ ? _("destination") : _("source")));
+ }
+ else
+ {
+ /* [Rn] */
+ 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;
+ }
+
+ inst.instruction |= INDEX_UP;
+ 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) == 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 == '=')
+ {
+ if ((inst.instruction & LOAD_BIT) == 0)
+ {
+ inst.error = _("invalid pseudo operation");
+ return;
+ }
+
+ /* 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);
+
+ if (value != FAIL)
+ {
+ /* This can be done with a mov instruction. */
+ inst.instruction &= LITERAL_MASK;
+ inst.instruction |= (INST_IMMEDIATE
+ | (OPCODE_MOV << DATA_OP_SHIFT));
+ inst.instruction |= value & 0xfff;
+ end_of_line (str);
+ return;
+ }
+
+ value = validate_immediate (~inst.reloc.exp.X_add_number);
+
+ if (value != FAIL)
+ {
+ /* This can be done with a mvn instruction. */
+ inst.instruction &= LITERAL_MASK;
+ inst.instruction |= (INST_IMMEDIATE
+ | (OPCODE_MVN << DATA_OP_SHIFT));
+ inst.instruction |= value & 0xfff;
+ end_of_line (str);
+ return;
+ }
+ }
+
+ /* 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. */
+ 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;
+
+ inst.reloc.type = BFD_RELOC_ARM_OFFSET_IMM;
+#ifndef TE_WINCE
+ /* PC rel adjust. */
+ inst.reloc.exp.X_add_number -= 8;
+#endif
+ inst.reloc.pc_rel = 1;
+ inst.instruction |= (REG_PC << 16);
+ pre_inc = 1;
+ }
+
+ inst.instruction |= (pre_inc ? PRE_INDEX : 0);
+ end_of_line (str);
+ return;
+}
+
+static void
+do_ldstt (str)
+ char * str;
+{
+ int conflict_reg;
+
+ 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;
+
+ /* ldrt/strt always use post-indexed addressing, so if the base is
+ the same as Rd, we warn. */
+ if (conflict_reg == reg)
+ as_warn (_("%s register same as write-back base"),
+ ((inst.instruction & LOAD_BIT)
+ ? _("destination") : _("source")));
+
+ skip_whitespace (str);
+
+ if (*str == ']')
+ {
+ str ++;
+
+ if (skip_past_comma (&str) == SUCCESS)
+ {
+ /* [Rn],... (post inc) */
+ if (ldst_extend (&str) == FAIL)
+ return;
+ }
+ else
+ {
+ /* [Rn] */
+ skip_whitespace (str);
+
+ /* Skip a write-back '!'. */
+ if (*str == '!')
+ str++;
+
+ inst.instruction |= INDEX_UP;
+ }
+ }
+ else
+ {
+ inst.error = _("post-indexed expression expected");
return;
}
+ }
+ else
+ {
+ inst.error = _("post-indexed expression expected");
+ return;
+ }
+
+ end_of_line (str);
+ return;
+}
+
+static int
+ldst_extend_v4 (str)
+ char ** str;
+{
+ 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 (value < -255 || value > 255)
+ {
+ 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. */
+ inst.instruction |= (add | HWOFFSET_IMM
+ | ((value >> 4) << 8) | (value & 0xF));
+ }
+ else
+ {
+ inst.instruction |= HWOFFSET_IMM;
+ inst.reloc.type = BFD_RELOC_ARM_OFFSET_IMM8;
+ inst.reloc.pc_rel = 0;
+ }
+ return SUCCESS;
- inst.instruction = ((inst.instruction & COND_MASK)
- | (flags & ~COND_MASK));
+ case '-':
+ add = 0;
+ /* Fall through. */
- flags = 0;
+ case '+':
+ (*str)++;
+ /* Fall through. */
+
+ default:
+ if (reg_required_here (str, 0) == FAIL)
+ return FAIL;
+
+ inst.instruction |= add;
+ return SUCCESS;
}
+}
+
+/* Halfword and signed-byte load/store operations. */
+static void
+do_ldstv4 (str)
+ char * str;
+{
+ int pre_inc = 0;
+ int conflict_reg;
+ int value;
skip_whitespace (str);
@@ -4309,7 +5417,7 @@ do_ldst (str, flags)
if (skip_past_comma (& str) == FAIL)
{
- inst.error = _("Address expected");
+ inst.error = _("address expected");
return;
}
@@ -4336,25 +5444,17 @@ do_ldst (str, flags)
if (skip_past_comma (&str) == SUCCESS)
{
/* [Rn],... (post inc) */
- if (ldst_extend (&str, halfword) == FAIL)
+ if (ldst_extend_v4 (&str) == FAIL)
return;
if (conflict_reg)
- {
- if (flags & TRANS_BIT)
- as_warn (_("Rn and Rd must be different in %s"),
- ((inst.instruction & LOAD_BIT)
- ? "LDRT" : "STRT"));
- else
- as_warn (_("%s register same as write-back base"),
- ((inst.instruction & LOAD_BIT)
- ? _("destination") : _("source")));
- }
+ as_warn (_("%s register same as write-back base"),
+ ((inst.instruction & LOAD_BIT)
+ ? _("destination") : _("source")));
}
else
{
/* [Rn] */
- if (halfword)
- inst.instruction |= HWOFFSET_IMM;
+ inst.instruction |= HWOFFSET_IMM;
skip_whitespace (str);
@@ -4368,16 +5468,8 @@ do_ldst (str, flags)
inst.instruction |= WRITE_BACK;
}
- flags |= INDEX_UP;
- if (flags & TRANS_BIT)
- {
- if (conflict_reg)
- as_warn (_("Rn and Rd must be different in %s"),
- ((inst.instruction & LOAD_BIT)
- ? "LDRT" : "STRT"));
- }
- else
- pre_inc = 1;
+ inst.instruction |= INDEX_UP;
+ pre_inc = 1;
}
}
else
@@ -4390,7 +5482,7 @@ do_ldst (str, flags)
}
pre_inc = 1;
- if (ldst_extend (&str, halfword) == FAIL)
+ if (ldst_extend_v4 (&str) == FAIL)
return;
skip_whitespace (str);
@@ -4416,6 +5508,13 @@ do_ldst (str, flags)
}
else if (*str == '=')
{
+ if ((inst.instruction & LOAD_BIT) == 0)
+ {
+ inst.error = _("invalid pseudo operation");
+ return;
+ }
+
+ /* XXX Does this work correctly for half-word/byte ops? */
/* Parse an "ldr Rd, =expr" instruction; this is another pseudo op. */
str++;
@@ -4427,7 +5526,7 @@ do_ldst (str, flags)
if (inst.reloc.exp.X_op != O_constant
&& inst.reloc.exp.X_op != O_symbol)
{
- inst.error = _("Constant expression expected");
+ inst.error = _("constant expression expected");
return;
}
@@ -4440,7 +5539,7 @@ do_ldst (str, flags)
/* 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);
+ inst.instruction |= value & 0xfff;
end_of_line (str);
return;
}
@@ -4452,7 +5551,7 @@ do_ldst (str, flags)
/* This can be done with a mvn instruction. */
inst.instruction &= LITERAL_MASK;
inst.instruction |= INST_IMMEDIATE | (OPCODE_MVN << DATA_OP_SHIFT);
- inst.instruction |= (flags & COND_MASK) | (value & 0xfff);
+ inst.instruction |= value & 0xfff;
end_of_line (str);
return;
}
@@ -4467,13 +5566,8 @@ do_ldst (str, flags)
}
/* 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.instruction |= HWOFFSET_IMM;
+ inst.reloc.type = BFD_RELOC_ARM_HWLITERAL;
inst.reloc.pc_rel = 1;
inst.instruction |= (REG_PC << 16);
pre_inc = 1;
@@ -4483,13 +5577,8 @@ do_ldst (str, flags)
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;
+ inst.instruction |= HWOFFSET_IMM;
+ inst.reloc.type = BFD_RELOC_ARM_OFFSET_IMM8;
#ifndef TE_WINCE
/* PC rel adjust. */
inst.reloc.exp.X_add_number -= 8;
@@ -4499,10 +5588,7 @@ do_ldst (str, flags)
pre_inc = 1;
}
- if (pre_inc && (flags & TRANS_BIT))
- inst.error = _("Pre-increment instruction with translate");
-
- inst.instruction |= flags | (pre_inc ? PRE_INDEX : 0);
+ inst.instruction |= (pre_inc ? PRE_INDEX : 0);
end_of_line (str);
return;
}
@@ -4541,7 +5627,7 @@ reg_list (strp)
if (reg <= cur_reg)
{
- inst.error = _("Bad range in register list");
+ inst.error = _("bad range in register list");
return FAIL;
}
@@ -4549,7 +5635,7 @@ reg_list (strp)
{
if (range & (1 << i))
as_tsktsk
- (_("Warning: Duplicated register (r%d) in register list"),
+ (_("Warning: duplicated register (r%d) in register list"),
i);
else
range |= 1 << i;
@@ -4558,10 +5644,10 @@ reg_list (strp)
}
if (range & (1 << reg))
- as_tsktsk (_("Warning: Duplicated register (r%d) in register list"),
+ 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"));
+ as_tsktsk (_("Warning: register range not in ascending order"));
range |= 1 << reg;
cur_reg = reg;
@@ -4573,7 +5659,7 @@ reg_list (strp)
if (*str++ != '}')
{
- inst.error = _("Missing `}'");
+ inst.error = _("missing `}'");
return FAIL;
}
}
@@ -4600,7 +5686,7 @@ reg_list (strp)
regno &= -regno;
regno = (1 << regno) - 1;
as_tsktsk
- (_("Warning: Duplicated register (r%d) in register list"),
+ (_("Warning: duplicated register (r%d) in register list"),
regno);
}
@@ -4635,9 +5721,8 @@ reg_list (strp)
}
static void
-do_ldmstm (str, flags)
+do_ldmstm (str)
char * str;
- unsigned long flags;
{
int base_reg;
long range;
@@ -4657,7 +5742,7 @@ do_ldmstm (str, flags)
if (*str == '!')
{
- flags |= WRITE_BACK;
+ inst.instruction |= WRITE_BACK;
str++;
}
@@ -4672,18 +5757,17 @@ do_ldmstm (str, flags)
if (*str == '^')
{
str++;
- flags |= LDM_TYPE_2_OR_3;
+ inst.instruction |= LDM_TYPE_2_OR_3;
}
- inst.instruction |= flags | range;
+ inst.instruction |= range;
end_of_line (str);
return;
}
static void
-do_swi (str, flags)
+do_swi (str)
char * str;
- unsigned long flags;
{
skip_whitespace (str);
@@ -4696,17 +5780,14 @@ do_swi (str, flags)
inst.reloc.type = BFD_RELOC_ARM_SWI;
inst.reloc.pc_rel = 0;
- inst.instruction |= flags;
-
end_of_line (str);
return;
}
static void
-do_swap (str, flags)
+do_swap (str)
char * str;
- unsigned long flags;
{
int reg;
@@ -4761,15 +5842,13 @@ do_swap (str, flags)
return;
}
- inst.instruction |= flags;
end_of_line (str);
return;
}
static void
-do_branch (str, flags)
+do_branch (str)
char * str;
- unsigned long flags ATTRIBUTE_UNUSED;
{
if (my_get_expression (&inst.reloc.exp, &str))
return;
@@ -4813,9 +5892,8 @@ do_branch (str, flags)
}
static void
-do_bx (str, flags)
+do_bx (str)
char * str;
- unsigned long flags ATTRIBUTE_UNUSED;
{
int reg;
@@ -4829,15 +5907,14 @@ do_bx (str, flags)
/* Note - it is not illegal to do a "bx pc". Useless, but not illegal. */
if (reg == REG_PC)
- as_tsktsk (_("Use of r15 in bx in ARM mode is not really useful"));
+ as_tsktsk (_("use of r15 in bx in ARM mode is not really useful"));
end_of_line (str);
}
static void
-do_cdp (str, flags)
+do_cdp (str)
char * str;
- unsigned long flags ATTRIBUTE_UNUSED;
{
/* Co-processor data operation.
Format: CDP{cond} CP#,<expr>,CRd,CRn,CRm{,<expr>} */
@@ -4897,9 +5974,8 @@ do_cdp (str, flags)
}
static void
-do_lstc (str, flags)
+do_lstc (str)
char * str;
- unsigned long flags;
{
/* Co-processor register load/store.
Format: <LDC|STC{cond}[L] CP#,CRd,<address> */
@@ -4922,22 +5998,20 @@ do_lstc (str, flags)
}
if (skip_past_comma (&str) == FAIL
- || cp_address_required_here (&str) == FAIL)
+ || cp_address_required_here (&str, CP_WB_OK) == FAIL)
{
if (! inst.error)
inst.error = BAD_ARGS;
return;
}
- inst.instruction |= flags;
end_of_line (str);
return;
}
static void
-do_co_reg (str, flags)
+do_co_reg (str)
char * str;
- unsigned long flags;
{
/* Co-processor register transfer.
Format: <MCR|MRC>{cond} CP#,<expr1>,Rd,CRn,CRm{,<expr2>} */
@@ -4992,19 +6066,14 @@ do_co_reg (str, flags)
return;
}
}
- if (flags)
- {
- inst.error = BAD_COND;
- }
end_of_line (str);
return;
}
static void
-do_fp_ctrl (str, flags)
+do_fpa_ctrl (str)
char * str;
- unsigned long flags ATTRIBUTE_UNUSED;
{
/* FP control registers.
Format: <WFS|RFS|WFC|RFC>{cond} Rn */
@@ -5023,29 +6092,11 @@ do_fp_ctrl (str, flags)
}
static void
-do_fp_ldst (str, flags)
+do_fpa_ldst (str)
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)
@@ -5054,7 +6105,7 @@ do_fp_ldst (str, flags)
}
if (skip_past_comma (&str) == FAIL
- || cp_address_required_here (&str) == FAIL)
+ || cp_address_required_here (&str, CP_WB_OK) == FAIL)
{
if (!inst.error)
inst.error = BAD_ARGS;
@@ -5065,9 +6116,8 @@ do_fp_ldst (str, flags)
}
static void
-do_fp_ldmstm (str, flags)
+do_fpa_ldmstm (str)
char * str;
- unsigned long flags;
{
int num_regs;
@@ -5091,7 +6141,7 @@ do_fp_ldmstm (str, flags)
if (inst.reloc.exp.X_op != O_constant)
{
- inst.error = _("Constant value required for number of registers");
+ inst.error = _("constant value required for number of registers");
return;
}
@@ -5120,7 +6170,7 @@ do_fp_ldmstm (str, flags)
abort ();
}
- if (flags)
+ if (inst.instruction & (CP_T_Pre | CP_T_UD)) /* ea/fd format. */
{
int reg;
int write_back;
@@ -5160,41 +6210,41 @@ do_fp_ldmstm (str, flags)
if (reg == REG_PC)
{
inst.error =
- _("R15 not allowed as base register with write-back");
+ _("r15 not allowed as base register with write-back");
return;
}
}
else
write_back = 0;
- if (flags & CP_T_Pre)
+ if (inst.instruction & CP_T_Pre)
{
/* Pre-decrement. */
offset = 3 * num_regs;
if (write_back)
- flags |= CP_T_WB;
+ inst.instruction |= CP_T_WB;
}
else
{
/* Post-increment. */
if (write_back)
{
- flags |= CP_T_WB;
+ inst.instruction |= 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;
+ inst.instruction |= CP_T_Pre | CP_T_UD;
offset = 0;
}
}
- inst.instruction |= flags | offset;
+ inst.instruction |= offset;
}
else if (skip_past_comma (&str) == FAIL
- || cp_address_required_here (&str) == FAIL)
+ || cp_address_required_here (&str, CP_WB_OK) == FAIL)
{
if (! inst.error)
inst.error = BAD_ARGS;
@@ -5205,26 +6255,11 @@ do_fp_ldmstm (str, flags)
}
static void
-do_fp_dyadic (str, flags)
+do_fpa_dyadic (str)
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)
@@ -5248,33 +6283,42 @@ do_fp_dyadic (str, flags)
return;
}
- inst.instruction |= flags;
end_of_line (str);
return;
}
static void
-do_fp_monadic (str, flags)
+do_fpa_monadic (str)
char * str;
- unsigned long flags;
{
skip_whitespace (str);
- switch (inst.suffix)
+ if (fp_reg_required_here (&str, 12) == FAIL)
{
- case SUFF_S:
- break;
- case SUFF_D:
- inst.instruction |= 0x00000080;
- break;
- case SUFF_E:
- inst.instruction |= 0x00080000;
- break;
- default:
- abort ();
+ if (! inst.error)
+ inst.error = BAD_ARGS;
+ return;
}
- if (fp_reg_required_here (&str, 12) == FAIL)
+ if (skip_past_comma (&str) == FAIL
+ || fp_op2 (&str) == FAIL)
+ {
+ if (! inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ end_of_line (str);
+ return;
+}
+
+static void
+do_fpa_cmp (str)
+ char * str;
+{
+ skip_whitespace (str);
+
+ if (fp_reg_required_here (&str, 16) == FAIL)
{
if (! inst.error)
inst.error = BAD_ARGS;
@@ -5289,15 +6333,13 @@ do_fp_monadic (str, flags)
return;
}
- inst.instruction |= flags;
end_of_line (str);
return;
}
static void
-do_fp_cmp (str, flags)
+do_fpa_from_reg (str)
char * str;
- unsigned long flags;
{
skip_whitespace (str);
@@ -5309,46 +6351,263 @@ do_fp_cmp (str, flags)
}
if (skip_past_comma (&str) == FAIL
- || fp_op2 (&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_from_reg (str, flags)
+do_fpa_to_reg (str)
char * str;
- unsigned long flags;
{
skip_whitespace (str);
- switch (inst.suffix)
+ if (reg_required_here (&str, 12) == FAIL)
+ return;
+
+ if (skip_past_comma (&str) == FAIL
+ || fp_reg_required_here (&str, 0) == FAIL)
{
- case SUFF_S:
- break;
- case SUFF_D:
- inst.instruction |= 0x00000080;
- break;
- case SUFF_E:
- inst.instruction |= 0x00080000;
- break;
- default:
- abort ();
+ if (! inst.error)
+ inst.error = BAD_ARGS;
+ return;
}
- if (fp_reg_required_here (&str, 16) == FAIL)
+ end_of_line (str);
+ return;
+}
+
+static int
+vfp_sp_reg_required_here (str, pos)
+ char **str;
+ enum vfp_sp_reg_pos pos;
+{
+ int reg;
+ char *start = *str;
+
+ if ((reg = arm_reg_parse (str, all_reg_maps[REG_TYPE_SN].htab)) != FAIL)
+ {
+ switch (pos)
+ {
+ case VFP_REG_Sd:
+ inst.instruction |= ((reg >> 1) << 12) | ((reg & 1) << 22);
+ break;
+
+ case VFP_REG_Sn:
+ inst.instruction |= ((reg >> 1) << 16) | ((reg & 1) << 7);
+ break;
+
+ case VFP_REG_Sm:
+ inst.instruction |= ((reg >> 1) << 0) | ((reg & 1) << 5);
+ break;
+
+ default:
+ abort ();
+ }
+ return reg;
+ }
+
+ /* In the few cases where we might be able to accept something else
+ this error can be overridden. */
+ inst.error = _(all_reg_maps[REG_TYPE_SN].expected);
+
+ /* Restore the start point. */
+ *str = start;
+ return FAIL;
+}
+
+static int
+vfp_dp_reg_required_here (str, pos)
+ char **str;
+ enum vfp_sp_reg_pos pos;
+{
+ int reg;
+ char *start = *str;
+
+ if ((reg = arm_reg_parse (str, all_reg_maps[REG_TYPE_DN].htab)) != FAIL)
+ {
+ switch (pos)
+ {
+ case VFP_REG_Dd:
+ inst.instruction |= reg << 12;
+ break;
+
+ case VFP_REG_Dn:
+ inst.instruction |= reg << 16;
+ break;
+
+ case VFP_REG_Dm:
+ inst.instruction |= reg << 0;
+ break;
+
+ default:
+ abort ();
+ }
+ return reg;
+ }
+
+ /* In the few cases where we might be able to accept something else
+ this error can be overridden. */
+ inst.error = _(all_reg_maps[REG_TYPE_DN].expected);
+
+ /* Restore the start point. */
+ *str = start;
+ return FAIL;
+}
+
+static void
+do_vfp_sp_monadic (str)
+ char *str;
+{
+ skip_whitespace (str);
+
+ if (vfp_sp_reg_required_here (&str, VFP_REG_Sd) == FAIL)
+ return;
+
+ if (skip_past_comma (&str) == FAIL
+ || vfp_sp_reg_required_here (&str, VFP_REG_Sm) == FAIL)
+ {
+ if (! inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ end_of_line (str);
+ return;
+}
+
+static void
+do_vfp_dp_monadic (str)
+ char *str;
+{
+ skip_whitespace (str);
+
+ if (vfp_dp_reg_required_here (&str, VFP_REG_Dd) == FAIL)
+ return;
+
+ if (skip_past_comma (&str) == FAIL
+ || vfp_dp_reg_required_here (&str, VFP_REG_Dm) == FAIL)
+ {
+ if (! inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ end_of_line (str);
+ return;
+}
+
+static void
+do_vfp_sp_dyadic (str)
+ char *str;
+{
+ skip_whitespace (str);
+
+ if (vfp_sp_reg_required_here (&str, VFP_REG_Sd) == FAIL)
+ return;
+
+ if (skip_past_comma (&str) == FAIL
+ || vfp_sp_reg_required_here (&str, VFP_REG_Sn) == FAIL
+ || skip_past_comma (&str) == FAIL
+ || vfp_sp_reg_required_here (&str, VFP_REG_Sm) == FAIL)
+ {
+ if (! inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ end_of_line (str);
+ return;
+}
+
+static void
+do_vfp_dp_dyadic (str)
+ char *str;
+{
+ skip_whitespace (str);
+
+ if (vfp_dp_reg_required_here (&str, VFP_REG_Dd) == FAIL)
+ return;
+
+ if (skip_past_comma (&str) == FAIL
+ || vfp_dp_reg_required_here (&str, VFP_REG_Dn) == FAIL
+ || skip_past_comma (&str) == FAIL
+ || vfp_dp_reg_required_here (&str, VFP_REG_Dm) == FAIL)
+ {
+ if (! inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ end_of_line (str);
+ return;
+}
+
+static void
+do_vfp_reg_from_sp (str)
+ char *str;
+{
+ skip_whitespace (str);
+
+ if (reg_required_here (&str, 12) == FAIL)
+ return;
+
+ if (skip_past_comma (&str) == FAIL
+ || vfp_sp_reg_required_here (&str, VFP_REG_Sn) == FAIL)
{
if (! inst.error)
inst.error = BAD_ARGS;
return;
}
+ end_of_line (str);
+ return;
+}
+
+static void
+do_vfp_sp_reg2 (str)
+ char *str;
+{
+ skip_whitespace (str);
+
+ if (reg_required_here (&str, 12) == FAIL)
+ return;
+
+ if (skip_past_comma (&str) == FAIL
+ || reg_required_here (&str, 16) == FAIL
+ || skip_past_comma (&str) == FAIL)
+ {
+ if (! inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ /* We require exactly two consecutive SP registers. */
+ if (vfp_sp_reg_list (&str, VFP_REG_Sm) != 2)
+ {
+ if (! inst.error)
+ inst.error = _("only two consecutive VFP SP registers allowed here");
+ }
+
+ end_of_line (str);
+ return;
+}
+
+static void
+do_vfp_sp_from_reg (str)
+ char *str;
+{
+ skip_whitespace (str);
+
+ if (vfp_sp_reg_required_here (&str, VFP_REG_Sn) == FAIL)
+ return;
+
if (skip_past_comma (&str) == FAIL
|| reg_required_here (&str, 12) == FAIL)
{
@@ -5357,15 +6616,13 @@ do_fp_from_reg (str, flags)
return;
}
- inst.instruction |= flags;
end_of_line (str);
return;
}
static void
-do_fp_to_reg (str, flags)
- char * str;
- unsigned long flags;
+do_vfp_reg_from_dp (str)
+ char *str;
{
skip_whitespace (str);
@@ -5373,14 +6630,656 @@ do_fp_to_reg (str, flags)
return;
if (skip_past_comma (&str) == FAIL
- || fp_reg_required_here (&str, 0) == FAIL)
+ || vfp_dp_reg_required_here (&str, VFP_REG_Dn) == FAIL)
+ {
+ if (! inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ end_of_line (str);
+ return;
+}
+
+static void
+do_vfp_reg2_from_dp (str)
+ char *str;
+{
+ skip_whitespace (str);
+
+ if (reg_required_here (&str, 12) == FAIL)
+ return;
+
+ if (skip_past_comma (&str) == FAIL
+ || reg_required_here (&str, 16) == FAIL
+ || skip_past_comma (&str) == FAIL
+ || vfp_dp_reg_required_here (&str, VFP_REG_Dm) == FAIL)
+ {
+ if (! inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ end_of_line (str);
+ return;
+}
+
+static void
+do_vfp_dp_from_reg (str)
+ char *str;
+{
+ skip_whitespace (str);
+
+ if (vfp_dp_reg_required_here (&str, VFP_REG_Dn) == FAIL)
+ return;
+
+ if (skip_past_comma (&str) == FAIL
+ || reg_required_here (&str, 12) == FAIL)
+ {
+ if (! inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ end_of_line (str);
+ return;
+}
+
+static void
+do_vfp_dp_from_reg2 (str)
+ char *str;
+{
+ skip_whitespace (str);
+
+ if (vfp_dp_reg_required_here (&str, VFP_REG_Dm) == FAIL)
+ return;
+
+ if (skip_past_comma (&str) == FAIL
+ || reg_required_here (&str, 12) == FAIL
+ || skip_past_comma (&str) == FAIL
+ || reg_required_here (&str, 16))
+ {
+ if (! inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ end_of_line (str);
+ return;
+}
+
+static const struct vfp_reg *
+vfp_psr_parse (str)
+ char **str;
+{
+ char *start = *str;
+ char c;
+ char *p;
+ const struct vfp_reg *vreg;
+
+ p = start;
+
+ /* Find the end of the current token. */
+ do
+ {
+ c = *p++;
+ }
+ while (ISALPHA (c));
+
+ /* Mark it. */
+ *--p = 0;
+
+ for (vreg = vfp_regs + 0;
+ vreg < vfp_regs + sizeof (vfp_regs) / sizeof (struct vfp_reg);
+ vreg++)
+ {
+ if (strcmp (start, vreg->name) == 0)
+ {
+ *p = c;
+ *str = p;
+ return vreg;
+ }
+ }
+
+ *p = c;
+ return NULL;
+}
+
+static int
+vfp_psr_required_here (str)
+ char **str;
+{
+ char *start = *str;
+ const struct vfp_reg *vreg;
+
+ vreg = vfp_psr_parse (str);
+
+ if (vreg)
+ {
+ inst.instruction |= vreg->regno;
+ return SUCCESS;
+ }
+
+ inst.error = _("VFP system register expected");
+
+ *str = start;
+ return FAIL;
+}
+
+static void
+do_vfp_reg_from_ctrl (str)
+ char *str;
+{
+ skip_whitespace (str);
+
+ if (reg_required_here (&str, 12) == FAIL)
+ return;
+
+ if (skip_past_comma (&str) == FAIL
+ || vfp_psr_required_here (&str) == FAIL)
+ {
+ if (! inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ end_of_line (str);
+ return;
+}
+
+static void
+do_vfp_ctrl_from_reg (str)
+ char *str;
+{
+ skip_whitespace (str);
+
+ if (vfp_psr_required_here (&str) == FAIL)
+ return;
+
+ if (skip_past_comma (&str) == FAIL
+ || reg_required_here (&str, 12) == FAIL)
+ {
+ if (! inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ end_of_line (str);
+ return;
+}
+
+static void
+do_vfp_sp_ldst (str)
+ char *str;
+{
+ skip_whitespace (str);
+
+ if (vfp_sp_reg_required_here (&str, VFP_REG_Sd) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (skip_past_comma (&str) == FAIL
+ || cp_address_required_here (&str, CP_NO_WB) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ end_of_line (str);
+ return;
+}
+
+static void
+do_vfp_dp_ldst (str)
+ char *str;
+{
+ skip_whitespace (str);
+
+ if (vfp_dp_reg_required_here (&str, VFP_REG_Dd) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (skip_past_comma (&str) == FAIL
+ || cp_address_required_here (&str, CP_NO_WB) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ end_of_line (str);
+ return;
+}
+
+/* Parse and encode a VFP SP register list, storing the initial
+ register in position POS and returning the range as the result. If
+ the string is invalid return FAIL (an invalid range). */
+static long
+vfp_sp_reg_list (str, pos)
+ char **str;
+ enum vfp_sp_reg_pos pos;
+{
+ long range = 0;
+ int base_reg = 0;
+ int new_base;
+ long base_bits = 0;
+ int count = 0;
+ long tempinst;
+ unsigned long mask = 0;
+ int warned = 0;
+
+ if (**str != '{')
+ return FAIL;
+
+ (*str)++;
+ skip_whitespace (*str);
+
+ tempinst = inst.instruction;
+
+ do
+ {
+ inst.instruction = 0;
+
+ if ((new_base = vfp_sp_reg_required_here (str, pos)) == FAIL)
+ return FAIL;
+
+ if (count == 0 || base_reg > new_base)
+ {
+ base_reg = new_base;
+ base_bits = inst.instruction;
+ }
+
+ if (mask & (1 << new_base))
+ {
+ inst.error = _("invalid register list");
+ return FAIL;
+ }
+
+ if ((mask >> new_base) != 0 && ! warned)
+ {
+ as_tsktsk (_("register list not in ascending order"));
+ warned = 1;
+ }
+
+ mask |= 1 << new_base;
+ count++;
+
+ skip_whitespace (*str);
+
+ if (**str == '-') /* We have the start of a range expression */
+ {
+ int high_range;
+
+ (*str)++;
+
+ if ((high_range
+ = arm_reg_parse (str, all_reg_maps[REG_TYPE_SN].htab))
+ == FAIL)
+ {
+ inst.error = _(all_reg_maps[REG_TYPE_SN].expected);
+ return FAIL;
+ }
+
+ if (high_range <= new_base)
+ {
+ inst.error = _("register range not in ascending order");
+ return FAIL;
+ }
+
+ for (new_base++; new_base <= high_range; new_base++)
+ {
+ if (mask & (1 << new_base))
+ {
+ inst.error = _("invalid register list");
+ return FAIL;
+ }
+
+ mask |= 1 << new_base;
+ count++;
+ }
+ }
+ }
+ while (skip_past_comma (str) != FAIL);
+
+ if (**str != '}')
+ {
+ inst.error = _("invalid register list");
+ return FAIL;
+ }
+
+ (*str)++;
+
+ range = count;
+
+ /* Sanity check -- should have raised a parse error above. */
+ if (count == 0 || count > 32)
+ abort();
+
+ /* Final test -- the registers must be consecutive. */
+ while (count--)
+ {
+ if ((mask & (1 << base_reg++)) == 0)
+ {
+ inst.error = _("non-contiguous register range");
+ return FAIL;
+ }
+ }
+
+ inst.instruction = tempinst | base_bits;
+ return range;
+}
+
+static long
+vfp_dp_reg_list (str)
+ char **str;
+{
+ long range = 0;
+ int base_reg = 0;
+ int new_base;
+ int count = 0;
+ long tempinst;
+ unsigned long mask = 0;
+ int warned = 0;
+
+ if (**str != '{')
+ return FAIL;
+
+ (*str)++;
+ skip_whitespace (*str);
+
+ tempinst = inst.instruction;
+
+ do
+ {
+ inst.instruction = 0;
+
+ if ((new_base = vfp_dp_reg_required_here (str, VFP_REG_Dd)) == FAIL)
+ return FAIL;
+
+ if (count == 0 || base_reg > new_base)
+ {
+ base_reg = new_base;
+ range = inst.instruction;
+ }
+
+ if (mask & (1 << new_base))
+ {
+ inst.error = _("invalid register list");
+ return FAIL;
+ }
+
+ if ((mask >> new_base) != 0 && ! warned)
+ {
+ as_tsktsk (_("register list not in ascending order"));
+ warned = 1;
+ }
+
+ mask |= 1 << new_base;
+ count++;
+
+ skip_whitespace (*str);
+
+ if (**str == '-') /* We have the start of a range expression */
+ {
+ int high_range;
+
+ (*str)++;
+
+ if ((high_range
+ = arm_reg_parse (str, all_reg_maps[REG_TYPE_DN].htab))
+ == FAIL)
+ {
+ inst.error = _(all_reg_maps[REG_TYPE_DN].expected);
+ return FAIL;
+ }
+
+ if (high_range <= new_base)
+ {
+ inst.error = _("register range not in ascending order");
+ return FAIL;
+ }
+
+ for (new_base++; new_base <= high_range; new_base++)
+ {
+ if (mask & (1 << new_base))
+ {
+ inst.error = _("invalid register list");
+ return FAIL;
+ }
+
+ mask |= 1 << new_base;
+ count++;
+ }
+ }
+ }
+ while (skip_past_comma (str) != FAIL);
+
+ if (**str != '}')
+ {
+ inst.error = _("invalid register list");
+ return FAIL;
+ }
+
+ (*str)++;
+
+ range |= 2 * count;
+
+ /* Sanity check -- should have raised a parse error above. */
+ if (count == 0 || count > 16)
+ abort();
+
+ /* Final test -- the registers must be consecutive. */
+ while (count--)
+ {
+ if ((mask & (1 << base_reg++)) == 0)
+ {
+ inst.error = _("non-contiguous register range");
+ return FAIL;
+ }
+ }
+
+ inst.instruction = tempinst;
+ return range;
+}
+
+static void
+vfp_sp_ldstm(str, ldstm_type)
+ char *str;
+ enum vfp_ldstm_type ldstm_type;
+{
+ long range;
+
+ skip_whitespace (str);
+
+ if (reg_required_here (&str, 16) == FAIL)
+ return;
+
+ skip_whitespace (str);
+
+ if (*str == '!')
+ {
+ inst.instruction |= WRITE_BACK;
+ str++;
+ }
+ else if (ldstm_type != VFP_LDSTMIA)
+ {
+ inst.error = _("this addressing mode requires base-register writeback");
+ return;
+ }
+
+ if (skip_past_comma (&str) == FAIL
+ || (range = vfp_sp_reg_list (&str, VFP_REG_Sd)) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ inst.instruction |= range;
+ end_of_line (str);
+}
+
+static void
+vfp_dp_ldstm(str, ldstm_type)
+ char *str;
+ enum vfp_ldstm_type ldstm_type;
+{
+ long range;
+
+ skip_whitespace (str);
+
+ if (reg_required_here (&str, 16) == FAIL)
+ return;
+
+ skip_whitespace (str);
+
+ if (*str == '!')
+ {
+ inst.instruction |= WRITE_BACK;
+ str++;
+ }
+ else if (ldstm_type != VFP_LDSTMIA && ldstm_type != VFP_LDSTMIAX)
+ {
+ inst.error = _("this addressing mode requires base-register writeback");
+ return;
+ }
+
+ if (skip_past_comma (&str) == FAIL
+ || (range = vfp_dp_reg_list (&str)) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ if (ldstm_type == VFP_LDSTMIAX || ldstm_type == VFP_LDSTMDBX)
+ range += 1;
+
+ inst.instruction |= range;
+ end_of_line (str);
+}
+
+static void
+do_vfp_sp_ldstmia (str)
+ char *str;
+{
+ vfp_sp_ldstm (str, VFP_LDSTMIA);
+}
+
+static void
+do_vfp_sp_ldstmdb (str)
+ char *str;
+{
+ vfp_sp_ldstm (str, VFP_LDSTMDB);
+}
+
+static void
+do_vfp_dp_ldstmia (str)
+ char *str;
+{
+ vfp_dp_ldstm (str, VFP_LDSTMIA);
+}
+
+static void
+do_vfp_dp_ldstmdb (str)
+ char *str;
+{
+ vfp_dp_ldstm (str, VFP_LDSTMDB);
+}
+
+static void
+do_vfp_xp_ldstmia (str)
+ char *str;
+{
+ vfp_dp_ldstm (str, VFP_LDSTMIAX);
+}
+
+static void
+do_vfp_xp_ldstmdb (str)
+ char *str;
+{
+ vfp_dp_ldstm (str, VFP_LDSTMDBX);
+}
+
+static void
+do_vfp_sp_compare_z (str)
+ char *str;
+{
+ skip_whitespace (str);
+
+ if (vfp_sp_reg_required_here (&str, VFP_REG_Sd) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ end_of_line (str);
+ return;
+}
+
+static void
+do_vfp_dp_compare_z (str)
+ char *str;
+{
+ skip_whitespace (str);
+
+ if (vfp_dp_reg_required_here (&str, VFP_REG_Dd) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ end_of_line (str);
+ return;
+}
+
+static void
+do_vfp_dp_sp_cvt (str)
+ char *str;
+{
+ skip_whitespace (str);
+
+ if (vfp_dp_reg_required_here (&str, VFP_REG_Dd) == FAIL)
+ return;
+
+ if (skip_past_comma (&str) == FAIL
+ || vfp_sp_reg_required_here (&str, VFP_REG_Sm) == FAIL)
+ {
+ if (! inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ end_of_line (str);
+ return;
+}
+
+static void
+do_vfp_sp_dp_cvt (str)
+ char *str;
+{
+ skip_whitespace (str);
+
+ if (vfp_sp_reg_required_here (&str, VFP_REG_Sd) == FAIL)
+ return;
+
+ if (skip_past_comma (&str) == FAIL
+ || vfp_dp_reg_required_here (&str, VFP_REG_Dm) == FAIL)
{
if (! inst.error)
inst.error = BAD_ARGS;
return;
}
- inst.instruction |= flags;
end_of_line (str);
return;
}
@@ -5687,7 +7586,7 @@ thumb_shift (str, shift)
if (shift_value > 32 || (shift_value == 32 && shift == THUMB_LSL))
{
- inst.error = _("Invalid immediate for shift");
+ inst.error = _("invalid immediate for shift");
return;
}
@@ -5846,6 +7745,12 @@ thumb_load_store (str, load_store, size)
}
else if (*str == '=')
{
+ if (load_store != THUMB_LOAD)
+ {
+ inst.error = _("invalid pseudo operation");
+ return;
+ }
+
/* Parse an "ldr Rd, =expr" instruction; this is another pseudo op. */
str++;
@@ -5911,12 +7816,12 @@ thumb_load_store (str, load_store, size)
}
else if (Rb == REG_PC && load_store != THUMB_LOAD)
{
- inst.error = _("R15 based store not allowed");
+ inst.error = _("r15 based store not allowed");
return;
}
else if (Ro != FAIL)
{
- inst.error = _("Invalid base register for register offset");
+ inst.error = _("invalid base register for register offset");
return;
}
@@ -5969,7 +7874,7 @@ thumb_load_store (str, load_store, size)
if (offset & ~(0x1f << size))
{
- inst.error = _("Invalid offset");
+ inst.error = _("invalid offset");
return;
}
inst.instruction |= (offset >> size) << 6;
@@ -5996,6 +7901,646 @@ thumb_load_store (str, load_store, size)
end_of_line (str);
}
+/* A 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
+mav_reg_required_here (str, shift, regtype)
+ char ** str;
+ int shift;
+ enum arm_reg_type regtype;
+{
+ int reg;
+ char *start = *str;
+
+ if ((reg = arm_reg_parse (str, all_reg_maps[regtype].htab)) != FAIL)
+ {
+ if (shift >= 0)
+ inst.instruction |= reg << shift;
+
+ return reg;
+ }
+
+ /* Restore the start point. */
+ *str = start;
+
+ /* In the few cases where we might be able to accept something else
+ this error can be overridden. */
+ inst.error = _(all_reg_maps[regtype].expected);
+
+ return FAIL;
+}
+
+/* Cirrus Maverick Instructions. */
+
+/* Wrapper functions. */
+
+static void
+do_mav_binops_1a (str)
+ char * str;
+{
+ do_mav_binops (str, MAV_MODE1, REG_TYPE_RN, REG_TYPE_MVF);
+}
+
+static void
+do_mav_binops_1b (str)
+ char * str;
+{
+ do_mav_binops (str, MAV_MODE1, REG_TYPE_RN, REG_TYPE_MVD);
+}
+
+static void
+do_mav_binops_1c (str)
+ char * str;
+{
+ do_mav_binops (str, MAV_MODE1, REG_TYPE_RN, REG_TYPE_MVDX);
+}
+
+static void
+do_mav_binops_1d (str)
+ char * str;
+{
+ do_mav_binops (str, MAV_MODE1, REG_TYPE_MVF, REG_TYPE_MVF);
+}
+
+static void
+do_mav_binops_1e (str)
+ char * str;
+{
+ do_mav_binops (str, MAV_MODE1, REG_TYPE_MVD, REG_TYPE_MVD);
+}
+
+static void
+do_mav_binops_1f (str)
+ char * str;
+{
+ do_mav_binops (str, MAV_MODE1, REG_TYPE_MVD, REG_TYPE_MVF);
+}
+
+static void
+do_mav_binops_1g (str)
+ char * str;
+{
+ do_mav_binops (str, MAV_MODE1, REG_TYPE_MVF, REG_TYPE_MVD);
+}
+
+static void
+do_mav_binops_1h (str)
+ char * str;
+{
+ do_mav_binops (str, MAV_MODE1, REG_TYPE_MVF, REG_TYPE_MVFX);
+}
+
+static void
+do_mav_binops_1i (str)
+ char * str;
+{
+ do_mav_binops (str, MAV_MODE1, REG_TYPE_MVD, REG_TYPE_MVFX);
+}
+
+static void
+do_mav_binops_1j (str)
+ char * str;
+{
+ do_mav_binops (str, MAV_MODE1, REG_TYPE_MVF, REG_TYPE_MVDX);
+}
+
+static void
+do_mav_binops_1k (str)
+ char * str;
+{
+ do_mav_binops (str, MAV_MODE1, REG_TYPE_MVD, REG_TYPE_MVDX);
+}
+
+static void
+do_mav_binops_1l (str)
+ char * str;
+{
+ do_mav_binops (str, MAV_MODE1, REG_TYPE_MVFX, REG_TYPE_MVF);
+}
+
+static void
+do_mav_binops_1m (str)
+ char * str;
+{
+ do_mav_binops (str, MAV_MODE1, REG_TYPE_MVFX, REG_TYPE_MVD);
+}
+
+static void
+do_mav_binops_1n (str)
+ char * str;
+{
+ do_mav_binops (str, MAV_MODE1, REG_TYPE_MVFX, REG_TYPE_MVFX);
+}
+
+static void
+do_mav_binops_1o (str)
+ char * str;
+{
+ do_mav_binops (str, MAV_MODE1, REG_TYPE_MVDX, REG_TYPE_MVDX);
+}
+
+static void
+do_mav_binops_2a (str)
+ char * str;
+{
+ do_mav_binops (str, MAV_MODE2, REG_TYPE_MVF, REG_TYPE_RN);
+}
+
+static void
+do_mav_binops_2b (str)
+ char * str;
+{
+ do_mav_binops (str, MAV_MODE2, REG_TYPE_MVD, REG_TYPE_RN);
+}
+
+static void
+do_mav_binops_2c (str)
+ char * str;
+{
+ do_mav_binops (str, MAV_MODE2, REG_TYPE_MVDX, REG_TYPE_RN);
+}
+
+static void
+do_mav_binops_3a (str)
+ char * str;
+{
+ do_mav_binops (str, MAV_MODE3, REG_TYPE_MVAX, REG_TYPE_MVFX);
+}
+
+static void
+do_mav_binops_3b (str)
+ char * str;
+{
+ do_mav_binops (str, MAV_MODE3, REG_TYPE_MVFX, REG_TYPE_MVAX);
+}
+
+static void
+do_mav_binops_3c (str)
+ char * str;
+{
+ do_mav_binops (str, MAV_MODE3, REG_TYPE_MVAX, REG_TYPE_MVDX);
+}
+
+static void
+do_mav_binops_3d (str)
+ char * str;
+{
+ do_mav_binops (str, MAV_MODE3, REG_TYPE_MVDX, REG_TYPE_MVAX);
+}
+
+static void
+do_mav_triple_4a (str)
+ char * str;
+{
+ do_mav_triple (str, MAV_MODE4, REG_TYPE_MVFX, REG_TYPE_MVFX, REG_TYPE_RN);
+}
+
+static void
+do_mav_triple_4b (str)
+ char * str;
+{
+ do_mav_triple (str, MAV_MODE4, REG_TYPE_MVDX, REG_TYPE_MVDX, REG_TYPE_RN);
+}
+
+static void
+do_mav_triple_5a (str)
+ char * str;
+{
+ do_mav_triple (str, MAV_MODE5, REG_TYPE_RN, REG_TYPE_MVF, REG_TYPE_MVF);
+}
+
+static void
+do_mav_triple_5b (str)
+ char * str;
+{
+ do_mav_triple (str, MAV_MODE5, REG_TYPE_RN, REG_TYPE_MVD, REG_TYPE_MVD);
+}
+
+static void
+do_mav_triple_5c (str)
+ char * str;
+{
+ do_mav_triple (str, MAV_MODE5, REG_TYPE_RN, REG_TYPE_MVFX, REG_TYPE_MVFX);
+}
+
+static void
+do_mav_triple_5d (str)
+ char * str;
+{
+ do_mav_triple (str, MAV_MODE5, REG_TYPE_RN, REG_TYPE_MVDX, REG_TYPE_MVDX);
+}
+
+static void
+do_mav_triple_5e (str)
+ char * str;
+{
+ do_mav_triple (str, MAV_MODE5, REG_TYPE_MVF, REG_TYPE_MVF, REG_TYPE_MVF);
+}
+
+static void
+do_mav_triple_5f (str)
+ char * str;
+{
+ do_mav_triple (str, MAV_MODE5, REG_TYPE_MVD, REG_TYPE_MVD, REG_TYPE_MVD);
+}
+
+static void
+do_mav_triple_5g (str)
+ char * str;
+{
+ do_mav_triple (str, MAV_MODE5, REG_TYPE_MVFX, REG_TYPE_MVFX, REG_TYPE_MVFX);
+}
+
+static void
+do_mav_triple_5h (str)
+ char * str;
+{
+ do_mav_triple (str, MAV_MODE5, REG_TYPE_MVDX, REG_TYPE_MVDX, REG_TYPE_MVDX);
+}
+
+static void
+do_mav_quad_6a (str)
+ char * str;
+{
+ do_mav_quad (str, MAV_MODE6, REG_TYPE_MVAX, REG_TYPE_MVFX, REG_TYPE_MVFX,
+ REG_TYPE_MVFX);
+}
+
+static void
+do_mav_quad_6b (str)
+ char * str;
+{
+ do_mav_quad (str, MAV_MODE6, REG_TYPE_MVAX, REG_TYPE_MVAX, REG_TYPE_MVFX,
+ REG_TYPE_MVFX);
+}
+
+/* cfmvsc32<cond> DSPSC,MVFX[15:0]. */
+static void
+do_mav_dspsc_1 (str)
+ char * str;
+{
+ skip_whitespace (str);
+
+ /* cfmvsc32. */
+ if (mav_reg_required_here (&str, -1, REG_TYPE_DSPSC) == FAIL
+ || skip_past_comma (&str) == FAIL
+ || mav_reg_required_here (&str, 16, REG_TYPE_MVFX) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+
+ return;
+ }
+
+ end_of_line (str);
+}
+
+/* cfmv32sc<cond> MVFX[15:0],DSPSC. */
+static void
+do_mav_dspsc_2 (str)
+ char * str;
+{
+ skip_whitespace (str);
+
+ /* cfmv32sc. */
+ if (mav_reg_required_here (&str, 0, REG_TYPE_MVFX) == FAIL
+ || skip_past_comma (&str) == FAIL
+ || mav_reg_required_here (&str, -1, REG_TYPE_DSPSC) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+
+ return;
+ }
+
+ end_of_line (str);
+}
+
+static void
+do_mav_shift_1 (str)
+ char * str;
+{
+ do_mav_shift (str, REG_TYPE_MVFX, REG_TYPE_MVFX);
+}
+
+static void
+do_mav_shift_2 (str)
+ char * str;
+{
+ do_mav_shift (str, REG_TYPE_MVDX, REG_TYPE_MVDX);
+}
+
+static void
+do_mav_ldst_1 (str)
+ char * str;
+{
+ do_mav_ldst (str, REG_TYPE_MVF);
+}
+
+static void
+do_mav_ldst_2 (str)
+ char * str;
+{
+ do_mav_ldst (str, REG_TYPE_MVD);
+}
+
+static void
+do_mav_ldst_3 (str)
+ char * str;
+{
+ do_mav_ldst (str, REG_TYPE_MVFX);
+}
+
+static void
+do_mav_ldst_4 (str)
+ char * str;
+{
+ do_mav_ldst (str, REG_TYPE_MVDX);
+}
+
+/* Isnsn like "foo X,Y". */
+
+static void
+do_mav_binops (str, mode, reg0, reg1)
+ char * str;
+ int mode;
+ enum arm_reg_type reg0;
+ enum arm_reg_type reg1;
+{
+ int shift0, shift1;
+
+ shift0 = mode & 0xff;
+ shift1 = (mode >> 8) & 0xff;
+
+ skip_whitespace (str);
+
+ if (mav_reg_required_here (&str, shift0, reg0) == FAIL
+ || skip_past_comma (&str) == FAIL
+ || mav_reg_required_here (&str, shift1, reg1) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ }
+ else
+ end_of_line (str);
+}
+
+/* Isnsn like "foo X,Y,Z". */
+
+static void
+do_mav_triple (str, mode, reg0, reg1, reg2)
+ char * str;
+ int mode;
+ enum arm_reg_type reg0;
+ enum arm_reg_type reg1;
+ enum arm_reg_type reg2;
+{
+ int shift0, shift1, shift2;
+
+ shift0 = mode & 0xff;
+ shift1 = (mode >> 8) & 0xff;
+ shift2 = (mode >> 16) & 0xff;
+
+ skip_whitespace (str);
+
+ if (mav_reg_required_here (&str, shift0, reg0) == FAIL
+ || skip_past_comma (&str) == FAIL
+ || mav_reg_required_here (&str, shift1, reg1) == FAIL
+ || skip_past_comma (&str) == FAIL
+ || mav_reg_required_here (&str, shift2, reg2) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ }
+ else
+ end_of_line (str);
+}
+
+/* Isnsn like "foo W,X,Y,Z".
+ where W=MVAX[0:3] and X,Y,Z=MVFX[0:15]. */
+
+static void
+do_mav_quad (str, mode, reg0, reg1, reg2, reg3)
+ char * str;
+ int mode;
+ enum arm_reg_type reg0;
+ enum arm_reg_type reg1;
+ enum arm_reg_type reg2;
+ enum arm_reg_type reg3;
+{
+ int shift0, shift1, shift2, shift3;
+
+ shift0= mode & 0xff;
+ shift1 = (mode >> 8) & 0xff;
+ shift2 = (mode >> 16) & 0xff;
+ shift3 = (mode >> 24) & 0xff;
+
+ skip_whitespace (str);
+
+ if (mav_reg_required_here (&str, shift0, reg0) == FAIL
+ || skip_past_comma (&str) == FAIL
+ || mav_reg_required_here (&str, shift1, reg1) == FAIL
+ || skip_past_comma (&str) == FAIL
+ || mav_reg_required_here (&str, shift2, reg2) == FAIL
+ || skip_past_comma (&str) == FAIL
+ || mav_reg_required_here (&str, shift3, reg3) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ }
+ else
+ end_of_line (str);
+}
+
+/* Maverick shift immediate instructions.
+ cfsh32<cond> MVFX[15:0],MVFX[15:0],Shift[6:0].
+ cfsh64<cond> MVDX[15:0],MVDX[15:0],Shift[6:0]. */
+
+static void
+do_mav_shift (str, reg0, reg1)
+ char * str;
+ enum arm_reg_type reg0;
+ enum arm_reg_type reg1;
+{
+ int error;
+ int imm, neg = 0;
+
+ skip_whitespace (str);
+
+ error = 0;
+
+ if (mav_reg_required_here (&str, 12, reg0) == FAIL
+ || skip_past_comma (&str) == FAIL
+ || mav_reg_required_here (&str, 16, reg1) == FAIL
+ || skip_past_comma (&str) == FAIL)
+ {
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ return;
+ }
+
+ /* Calculate the immediate operand.
+ The operand is a 7bit signed number. */
+ skip_whitespace (str);
+
+ if (*str == '#')
+ ++str;
+
+ if (!ISDIGIT (*str) && *str != '-')
+ {
+ inst.error = _("expecting immediate, 7bit operand");
+ return;
+ }
+
+ if (*str == '-')
+ {
+ neg = 1;
+ ++str;
+ }
+
+ for (imm = 0; *str && ISDIGIT (*str); ++str)
+ imm = imm * 10 + *str - '0';
+
+ if (imm > 64)
+ {
+ inst.error = _("immediate out of range");
+ return;
+ }
+
+ /* Make negative imm's into 7bit signed numbers. */
+ if (neg)
+ {
+ imm = -imm;
+ imm &= 0x0000007f;
+ }
+
+ /* Bits 0-3 of the insn should have bits 0-3 of the immediate.
+ Bits 5-7 of the insn should have bits 4-6 of the immediate.
+ Bit 4 should be 0. */
+ imm = (imm & 0xf) | ((imm & 0x70) << 1);
+
+ inst.instruction |= imm;
+ end_of_line (str);
+}
+
+static int
+mav_parse_offset (str, negative)
+ char ** str;
+ int *negative;
+{
+ char * p = *str;
+ int offset;
+
+ *negative = 0;
+
+ skip_whitespace (p);
+
+ if (*p == '#')
+ ++p;
+
+ if (*p == '-')
+ {
+ *negative = 1;
+ ++p;
+ }
+
+ if (!ISDIGIT (*p))
+ {
+ inst.error = _("offset expected");
+ return 0;
+ }
+
+ for (offset = 0; *p && ISDIGIT (*p); ++p)
+ offset = offset * 10 + *p - '0';
+
+ if (offset > 0xff)
+ {
+ inst.error = _("offset out of range");
+ return 0;
+ }
+
+ *str = p;
+
+ return *negative ? -offset : offset;
+}
+
+/* Maverick load/store instructions.
+ <insn><cond> CRd,[Rn,<offset>]{!}.
+ <insn><cond> CRd,[Rn],<offset>. */
+
+static void
+do_mav_ldst (str, reg0)
+ char * str;
+ enum arm_reg_type reg0;
+{
+ int offset, negative;
+
+ skip_whitespace (str);
+
+ if (mav_reg_required_here (&str, 12, reg0) == FAIL
+ || skip_past_comma (&str) == FAIL
+ || *str++ != '['
+ || reg_required_here (&str, 16) == FAIL)
+ goto fail_ldst;
+
+ if (skip_past_comma (&str) == SUCCESS)
+ {
+ /* You are here: "<offset>]{!}". */
+ inst.instruction |= PRE_INDEX;
+
+ offset = mav_parse_offset (&str, &negative);
+
+ if (inst.error)
+ return;
+
+ if (*str++ != ']')
+ {
+ inst.error = _("missing ]");
+ return;
+ }
+
+ if (*str == '!')
+ {
+ inst.instruction |= WRITE_BACK;
+ ++str;
+ }
+ }
+ else
+ {
+ /* You are here: "], <offset>". */
+ if (*str++ != ']')
+ {
+ inst.error = _("missing ]");
+ return;
+ }
+
+ if (skip_past_comma (&str) == FAIL
+ || (offset = mav_parse_offset (&str, &negative), inst.error))
+ goto fail_ldst;
+
+ inst.instruction |= CP_T_WB; /* Post indexed, set bit W. */
+ }
+
+ if (negative)
+ offset = -offset;
+ else
+ inst.instruction |= CP_T_UD; /* Postive, so set bit U. */
+
+ inst.instruction |= offset >> 2;
+ end_of_line (str);
+ return;
+
+fail_ldst:
+ if (!inst.error)
+ inst.error = BAD_ARGS;
+ return;
+}
+
static void
do_t_nop (str)
char * str;
@@ -6196,7 +8741,7 @@ do_t_ldmstm (str)
return;
if (*str != '!')
- as_warn (_("Inserted missing '!': load/store multiple always writes back base register"));
+ as_warn (_("inserted missing '!': load/store multiple always writes back base register"));
else
str++;
@@ -6212,7 +8757,7 @@ do_t_ldmstm (str)
{
/* This really doesn't seem worth it. */
inst.reloc.type = BFD_RELOC_NONE;
- inst.error = _("Expression too complex");
+ inst.error = _("expression too complex");
return;
}
@@ -6264,7 +8809,7 @@ do_t_lds (str)
|| *str++ != ']')
{
if (! inst.error)
- inst.error = _("Syntax: ldrs[b] Rd, [Rb, Ro]");
+ inst.error = _("syntax: ldrs[b] Rd, [Rb, Ro]");
return;
}
@@ -6312,7 +8857,7 @@ do_t_push_pop (str)
{
/* This really doesn't seem worth it. */
inst.reloc.type = BFD_RELOC_NONE;
- inst.error = _("Expression too complex");
+ inst.error = _("expression too complex");
return;
}
@@ -6409,10 +8954,11 @@ do_t_adr (str)
}
static void
-insert_reg (entry)
- int entry;
+insert_reg (r, htab)
+ const struct reg_entry *r;
+ struct hash_control *htab;
{
- int len = strlen (reg_table[entry].name) + 2;
+ int len = strlen (r->name) + 2;
char * buf = (char *) xmalloc (len);
char * buf2 = (char *) xmalloc (len);
int i = 0;
@@ -6421,21 +8967,35 @@ insert_reg (entry)
buf[i++] = REGISTER_PREFIX;
#endif
- strcpy (buf + i, reg_table[entry].name);
+ strcpy (buf + i, r->name);
for (i = 0; buf[i]; i++)
- buf2[i] = islower (buf[i]) ? toupper (buf[i]) : buf[i];
+ buf2[i] = TOUPPER (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]);
+ hash_insert (htab, buf, (PTR) r);
+ hash_insert (htab, buf2, (PTR) r);
+}
+
+static void
+build_reg_hsh (map)
+ struct reg_map *map;
+{
+ const struct reg_entry *r;
+
+ if ((map->htab = hash_new ()) == NULL)
+ as_fatal (_("virtual memory exhausted"));
+
+ for (r = map->names; r->name != NULL; r++)
+ insert_reg (r, map->htab);
}
static void
-insert_reg_alias (str, regnum)
+insert_reg_alias (str, regnum, htab)
char *str;
int regnum;
+ struct hash_control *htab;
{
struct reg_entry *new =
(struct reg_entry *) xmalloc (sizeof (struct reg_entry));
@@ -6445,9 +9005,95 @@ insert_reg_alias (str, regnum)
new->name = name;
new->number = regnum;
- hash_insert (arm_reg_hsh, name, (PTR) new);
+ hash_insert (htab, name, (PTR) new);
}
+/* Look for the .req directive. This is of the form:
+
+ newname .req existing_name
+
+ If we find one, or if it looks sufficiently like one that we want to
+ handle any error here, return non-zero. Otherwise return zero. */
+static int
+create_register_alias (newname, p)
+ char *newname;
+ char *p;
+{
+ char *q;
+ char c;
+
+ q = p;
+ skip_whitespace (q);
+
+ c = *p;
+ *p = '\0';
+
+ if (*q && !strncmp (q, ".req ", 5))
+ {
+ char *copy_of_str;
+ char *r;
+
+#ifdef IGNORE_OPCODE_CASE
+ newname = original_case_string;
+#endif
+ copy_of_str = newname;
+
+ q += 4;
+ skip_whitespace (q);
+
+ for (r = q; *r != '\0'; r++)
+ if (*r == ' ')
+ break;
+
+ if (r != q)
+ {
+ enum arm_reg_type new_type, old_type;
+ int old_regno;
+ char d = *r;
+
+ *r = '\0';
+ old_type = arm_reg_parse_any (q);
+ *r = d;
+
+ new_type = arm_reg_parse_any (newname);
+
+ if (new_type == REG_TYPE_MAX)
+ {
+ if (old_type != REG_TYPE_MAX)
+ {
+ old_regno = arm_reg_parse (&q, all_reg_maps[old_type].htab);
+ insert_reg_alias (newname, old_regno,
+ all_reg_maps[old_type].htab);
+ }
+ else
+ as_warn (_("register '%s' does not exist\n"), q);
+ }
+ else if (old_type == REG_TYPE_MAX)
+ {
+ as_warn (_("ignoring redefinition of register alias '%s' to non-existant register '%s'"),
+ copy_of_str, q);
+ }
+ else
+ {
+ /* Do not warn about redefinitions to the same alias. */
+ if (new_type != old_type
+ || (arm_reg_parse (&q, all_reg_maps[old_type].htab)
+ != arm_reg_parse (&q, all_reg_maps[new_type].htab)))
+ as_warn (_("ignoring redefinition of register alias '%s'"),
+ copy_of_str);
+
+ }
+ }
+ else
+ as_warn (_("ignoring incomplete .req pseuso op"));
+
+ *p = c;
+ return 1;
+ }
+ *p = c;
+ return 0;
+}
+
static void
set_constant_flonums ()
{
@@ -6458,6 +9104,54 @@ set_constant_flonums ()
abort ();
}
+/* Iterate over the base tables to create the instruction patterns. */
+static void
+build_arm_ops_hsh ()
+{
+ unsigned int i;
+ unsigned int j;
+ static struct obstack insn_obstack;
+
+ obstack_begin (&insn_obstack, 4000);
+
+ for (i = 0; i < sizeof (insns) / sizeof (struct asm_opcode); i++)
+ {
+ const struct asm_opcode *insn = insns + i;
+
+ if (insn->cond_offset != 0)
+ {
+ /* Insn supports conditional execution. Build the varaints
+ and insert them in the hash table. */
+ for (j = 0; j < sizeof (conds) / sizeof (struct asm_cond); j++)
+ {
+ unsigned len = strlen (insn->template);
+ struct asm_opcode *new;
+ char *template;
+
+ new = obstack_alloc (&insn_obstack, sizeof (struct asm_opcode));
+ /* All condition codes are two characters. */
+ template = obstack_alloc (&insn_obstack, len + 3);
+
+ strncpy (template, insn->template, insn->cond_offset);
+ strcpy (template + insn->cond_offset, conds[j].template);
+ if (len > insn->cond_offset)
+ strcpy (template + insn->cond_offset + 2,
+ insn->template + insn->cond_offset);
+ new->template = template;
+ new->cond_offset = 0;
+ new->variant = insn->variant;
+ new->parms = insn->parms;
+ new->value = (insn->value & ~COND_MASK) | conds[j].value;
+
+ hash_insert (arm_ops_hsh, new->template, (PTR) new);
+ }
+ }
+ /* Finally, insert the unconditional insn in the table directly;
+ no need to build a copy. */
+ hash_insert (arm_ops_hsh, insn->template, (PTR) insn);
+ }
+}
+
void
md_begin ()
{
@@ -6468,12 +9162,10 @@ md_begin ()
|| (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"));
+ 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));
+ build_arm_ops_hsh ();
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++)
@@ -6483,11 +9175,55 @@ md_begin ()
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);
+ for (i = (int) REG_TYPE_FIRST; i < (int) REG_TYPE_MAX; i++)
+ build_reg_hsh (all_reg_maps + i);
set_constant_flonums ();
+ /* Set the cpu variant based on the command-line options. We prefer
+ -mcpu= over -march= if both are set (as for GCC); and we prefer
+ -mfpu= over any other way of setting the floating point unit.
+ Use of legacy options with new options are faulted. */
+ if (legacy_cpu != -1)
+ {
+ if (mcpu_cpu_opt != -1 || march_cpu_opt != -1)
+ as_bad (_("use of old and new-style options to set CPU type"));
+
+ mcpu_cpu_opt = legacy_cpu;
+ }
+ else if (mcpu_cpu_opt == -1)
+ mcpu_cpu_opt = march_cpu_opt;
+
+ if (legacy_fpu != -1)
+ {
+ if (mfpu_opt != -1)
+ as_bad (_("use of old and new-style options to set FPU type"));
+
+ mfpu_opt = legacy_fpu;
+ }
+ else if (mfpu_opt == -1)
+ {
+ if (mcpu_fpu_opt != -1)
+ mfpu_opt = mcpu_fpu_opt;
+ else
+ mfpu_opt = march_fpu_opt;
+ }
+
+ if (mfpu_opt == -1)
+ {
+ if (mcpu_cpu_opt == -1)
+ mfpu_opt = FPU_DEFAULT;
+ else if (mcpu_cpu_opt & ARM_EXT_V5)
+ mfpu_opt = FPU_ARCH_VFP_V2;
+ else
+ mfpu_opt = FPU_ARCH_FPA;
+ }
+
+ if (mcpu_cpu_opt == -1)
+ mcpu_cpu_opt = CPU_DEFAULT;
+
+ cpu_variant = mcpu_cpu_opt | mfpu_opt;
+
#if defined OBJ_COFF || defined OBJ_ELF
{
unsigned int flags = 0;
@@ -6497,7 +9233,12 @@ md_begin ()
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;
+ if ((cpu_variant & FPU_ANY) == FPU_NONE
+ || (cpu_variant & FPU_ANY) == FPU_ARCH_VFP) /* VFP layout only. */
+ flags |= F_SOFT_FLOAT;
+ /* Using VFP conventions (even if soft-float). */
+ if (cpu_variant & FPU_VFP_EXT_NONE) flags |= F_VFP_FLOAT;
+
bfd_set_private_flags (stdoutput, flags);
@@ -6532,36 +9273,35 @@ md_begin ()
mach = bfd_mach_arm_2a;
break;
- default:
- case ARM_6 | ARM_3 | ARM_2: /* Actually no CPU type defined. */
- mach = bfd_mach_arm_4;
+ case ARM_6: /* Also ARM_7. */
+ mach = bfd_mach_arm_3;
break;
- case ARM_7: /* Also ARM_6. */
- mach = bfd_mach_arm_3;
+ default:
+ mach = bfd_mach_arm_4;
break;
}
/* Catch special cases. */
- if (cpu_variant & ARM_EXT_XSCALE)
+ if (cpu_variant & ARM_CEXT_XSCALE)
mach = bfd_mach_arm_XScale;
else if (cpu_variant & ARM_EXT_V5E)
mach = bfd_mach_arm_5TE;
else if (cpu_variant & ARM_EXT_V5)
{
- if (cpu_variant & ARM_EXT_THUMB)
+ if (cpu_variant & ARM_EXT_V4T)
mach = bfd_mach_arm_5T;
else
mach = bfd_mach_arm_5;
}
- else if (cpu_variant & ARM_EXT_HALFWORD)
+ else if (cpu_variant & ARM_EXT_V4)
{
- if (cpu_variant & ARM_EXT_THUMB)
+ if (cpu_variant & ARM_EXT_V4T)
mach = bfd_mach_arm_4T;
else
mach = bfd_mach_arm_4;
}
- else if (cpu_variant & ARM_EXT_LONGMUL)
+ else if (cpu_variant & ARM_EXT_V3M)
mach = bfd_mach_arm_3M;
bfd_set_arch_mach (stdoutput, TARGET_ARCH, mach);
@@ -6667,7 +9407,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);
@@ -6685,14 +9425,21 @@ md_atof (type, litP, sizeP)
}
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;
- }
+ if (cpu_variant & FPU_ARCH_VFP)
+ for (i = prec - 1; i >= 0; 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;
@@ -6773,8 +9520,9 @@ md_undefined_symbol (name)
advance the pointer. */
static int
-arm_reg_parse (ccp)
+arm_reg_parse (ccp, htab)
register char ** ccp;
+ struct hash_control *htab;
{
char * start = * ccp;
char c;
@@ -6792,15 +9540,15 @@ arm_reg_parse (ccp)
p++, start++;
#endif
#endif
- if (!isalpha (*p) || !is_name_beginner (*p))
+ if (!ISALPHA (*p) || !is_name_beginner (*p))
return FAIL;
c = *p++;
- while (isalpha (c) || isdigit (c) || c == '_')
+ while (ISALPHA (c) || ISDIGIT (c) || c == '_')
c = *p++;
*--p = 0;
- reg = (struct reg_entry *) hash_find (arm_reg_hsh, start);
+ reg = (struct reg_entry *) hash_find (htab, start);
*p = c;
if (reg)
@@ -6812,13 +9560,29 @@ arm_reg_parse (ccp)
return FAIL;
}
-int
-md_apply_fix3 (fixP, val, seg)
+/* Search for the following register name in each of the possible reg name
+ tables. Return the classification if found, or REG_TYPE_MAX if not
+ present. */
+static enum arm_reg_type
+arm_reg_parse_any (cp)
+ char *cp;
+{
+ int i;
+
+ for (i = (int) REG_TYPE_FIRST; i < (int) REG_TYPE_MAX; i++)
+ if (arm_reg_parse (&cp, all_reg_maps[i].htab) != FAIL)
+ return (enum arm_reg_type) i;
+
+ return REG_TYPE_MAX;
+}
+
+void
+md_apply_fix3 (fixP, valP, seg)
fixS * fixP;
- valueT * val;
+ valueT * valP;
segT seg;
{
- offsetT value = * val;
+ offsetT value = * valP;
offsetT newval;
unsigned int newimm;
unsigned long temp;
@@ -6909,7 +9673,7 @@ md_apply_fix3 (fixP, val, seg)
else
{
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Unable to compute ADRL instructions for PC offset of 0x%lx"),
+ _("unable to compute ADRL instructions for PC offset of 0x%lx"),
value);
break;
}
@@ -7019,7 +9783,7 @@ md_apply_fix3 (fixP, val, seg)
{
if (((unsigned long) value) > 0xff)
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Invalid swi expression"));
+ _("invalid swi expression"));
newval = md_chars_to_number (buf, THUMB_SIZE) & 0xff00;
newval |= value;
md_number_to_chars (buf, newval, THUMB_SIZE);
@@ -7028,7 +9792,7 @@ md_apply_fix3 (fixP, val, seg)
{
if (((unsigned long) value) > 0x00ffffff)
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Invalid swi expression"));
+ _("invalid swi expression"));
newval = md_chars_to_number (buf, INSN_SIZE) & 0xff000000;
newval |= value;
md_number_to_chars (buf, newval, INSN_SIZE);
@@ -7038,7 +9802,7 @@ md_apply_fix3 (fixP, val, seg)
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"));
+ _("invalid expression in load/store multiple"));
newval = value | md_chars_to_number (buf, INSN_SIZE);
md_number_to_chars (buf, newval, INSN_SIZE);
break;
@@ -7078,7 +9842,7 @@ md_apply_fix3 (fixP, val, seg)
&& S_GET_SEGMENT (fixP->fx_addsy) == seg)
{
/* Get pc relative value to go into the branch. */
- value = * val;
+ value = * valP;
/* Permit a backward branch provided that enough bits
are set. Allow a forwards branch, provided that
@@ -7091,7 +9855,7 @@ md_apply_fix3 (fixP, val, seg)
if (! fixP->fx_done)
#endif
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("gas can't handle same-section branch dest >= 0x04000000"));
+ _("GAS can't handle same-section branch dest >= 0x04000000"));
}
value >>= 2;
@@ -7133,7 +9897,7 @@ md_apply_fix3 (fixP, val, seg)
value += diff;
if ((value & ~0xff) && ((value & ~0xff) != ~0xff))
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Branch out of range"));
+ _("branch out of range"));
newval = (newval & 0xff00) | ((value & 0x1ff) >> 1);
}
md_number_to_chars (buf, newval, THUMB_SIZE);
@@ -7149,7 +9913,7 @@ md_apply_fix3 (fixP, val, seg)
value += diff;
if ((value & ~0x7ff) && ((value & ~0x7ff) != ~0x7ff))
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Branch out of range"));
+ _("branch out of range"));
newval = (newval & 0xf800) | ((value & 0xfff) >> 1);
}
md_number_to_chars (buf, newval, THUMB_SIZE);
@@ -7172,7 +9936,7 @@ md_apply_fix3 (fixP, val, seg)
value += diff;
if ((value & ~0x3fffff) && ((value & ~0x3fffff) != ~0x3fffff))
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Branch with link out of range"));
+ _("branch with link out of range"));
newval = (newval & 0xf800) | ((value & 0x7fffff) >> 12);
newval2 = (newval2 & 0xf800) | ((value & 0xfff) >> 1);
@@ -7248,7 +10012,7 @@ md_apply_fix3 (fixP, val, seg)
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"));
+ _("illegal value for co-processor offset"));
if (value < 0)
value = -value;
newval = md_chars_to_number (buf, INSN_SIZE) & 0xff7fff00;
@@ -7272,13 +10036,13 @@ md_apply_fix3 (fixP, val, seg)
if ((fixP->fx_frag->fr_address + fixP->fx_where + value) & 3)
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Invalid offset, target not word aligned (0x%08X)"),
+ _("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%08lX)"), value);
+ _("invalid offset, value too big (0x%08lX)"), value);
/* Round up, since pc will be rounded down. */
newval |= (value + 2) >> 2;
@@ -7287,28 +10051,28 @@ md_apply_fix3 (fixP, val, seg)
case 9: /* SP load/store. */
if (value & ~0x3fc)
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Invalid offset, value too big (0x%08lX)"), value);
+ _("invalid offset, value too big (0x%08lX)"), 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%08lX)"), value);
+ _("invalid offset, value too big (0x%08lX)"), 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%08lX)"), value);
+ _("invalid offset, value too big (0x%08lX)"), 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%08lX)"), value);
+ _("invalid offset, value too big (0x%08lX)"), value);
newval |= value << 5; /* 6 - 1. */
break;
@@ -7347,7 +10111,7 @@ md_apply_fix3 (fixP, val, seg)
{
if (value & ~0x1fc)
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Invalid immediate for stack address calculation"));
+ _("invalid immediate for stack address calculation"));
newval = subtract ? T_OPCODE_SUB_ST : T_OPCODE_ADD_ST;
newval |= value >> 2;
}
@@ -7356,7 +10120,7 @@ md_apply_fix3 (fixP, val, seg)
if (subtract ||
value & ~0x3fc)
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Invalid immediate for address calculation (value = 0x%08lX)"),
+ _("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;
@@ -7366,7 +10130,7 @@ md_apply_fix3 (fixP, val, seg)
{
if (value & ~0xff)
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Invalid 8bit immediate"));
+ _("invalid 8bit immediate"));
newval = subtract ? T_OPCODE_SUB_I8 : T_OPCODE_ADD_I8;
newval |= (rd << 8) | value;
}
@@ -7374,7 +10138,7 @@ md_apply_fix3 (fixP, val, seg)
{
if (value & ~0x7)
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Invalid 3bit immediate"));
+ _("invalid 3bit immediate"));
newval = subtract ? T_OPCODE_SUB_I3 : T_OPCODE_ADD_I3;
newval |= rd | (rs << 3) | (value << 6);
}
@@ -7390,7 +10154,7 @@ md_apply_fix3 (fixP, val, seg)
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"),
+ _("invalid immediate: %ld is too large"),
(long) value);
newval |= value;
break;
@@ -7405,7 +10169,7 @@ md_apply_fix3 (fixP, val, seg)
/* 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);
+ _("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);
@@ -7414,15 +10178,13 @@ md_apply_fix3 (fixP, val, seg)
case BFD_RELOC_VTABLE_INHERIT:
case BFD_RELOC_VTABLE_ENTRY:
fixP->fx_done = 0;
- return 1;
+ return;
case BFD_RELOC_NONE:
default:
as_bad_where (fixP->fx_file, fixP->fx_line,
- _("Bad relocation fixup type (%d)"), fixP->fx_r_type);
+ _("bad relocation fixup type (%d)"), fixP->fx_r_type);
}
-
- return 1;
}
/* Translate internal representation of relocation info to BFD target
@@ -7492,7 +10254,7 @@ tc_gen_reloc (section, fixp)
/* 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?)"));
+ _("literal referenced across section boundary (Implicit dump?)"));
return NULL;
#ifdef OBJ_ELF
@@ -7505,7 +10267,7 @@ tc_gen_reloc (section, fixp)
case BFD_RELOC_ARM_IMMEDIATE:
as_bad_where (fixp->fx_file, fixp->fx_line,
- _("Internal_relocation (type %d) not fixed up (IMMEDIATE)"),
+ _("internal relocation (type %d) not fixed up (IMMEDIATE)"),
fixp->fx_r_type);
return NULL;
@@ -7516,7 +10278,7 @@ tc_gen_reloc (section, fixp)
case BFD_RELOC_ARM_OFFSET_IMM:
as_bad_where (fixp->fx_file, fixp->fx_line,
- _("Internal_relocation (type %d) not fixed up (OFFSET_IMM)"),
+ _("internal_relocation (type %d) not fixed up (OFFSET_IMM)"),
fixp->fx_r_type);
return NULL;
@@ -7540,7 +10302,7 @@ tc_gen_reloc (section, fixp)
default: type = _("<unknown>"); break;
}
as_bad_where (fixp->fx_file, fixp->fx_line,
- _("Cannot represent %s relocation in this object file format"),
+ _("cannot represent %s relocation in this object file format"),
type);
return NULL;
}
@@ -7561,7 +10323,7 @@ tc_gen_reloc (section, fixp)
if (reloc->howto == NULL)
{
as_bad_where (fixp->fx_file, fixp->fx_line,
- _("Can not represent %s relocation in this object file format"),
+ _("cannot represent %s relocation in this object file format"),
bfd_get_reloc_code_name (code));
return NULL;
}
@@ -7584,13 +10346,14 @@ md_estimate_size_before_relax (fragP, segtype)
}
static void
-output_inst PARAMS ((void))
+output_inst (str)
+ const char *str;
{
char * to = NULL;
if (inst.error)
{
- as_bad (inst.error);
+ as_bad ("%s -- `%s'", inst.error, str);
return;
}
@@ -7625,10 +10388,9 @@ void
md_assemble (str)
char * str;
{
- char c;
- char * p;
- char * q;
- char * start;
+ char c;
+ char *p;
+ char *start;
/* Align the instruction.
This may not be the right thing to do but ... */
@@ -7658,261 +10420,100 @@ md_assemble (str)
if (p == str)
{
- as_bad (_("No operator -- statement `%s'\n"), str);
+ as_bad (_("no operator -- statement `%s'\n"), str);
return;
}
if (thumb_mode)
{
- CONST struct thumb_opcode * opcode;
+ const struct thumb_opcode * opcode;
c = *p;
*p = '\0';
- opcode = (CONST struct thumb_opcode *) hash_find (arm_tops_hsh, str);
+ 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)
+ if (thumb_mode == 1 && (opcode->variant & cpu_variant) == 0)
{
- as_bad (_("selected processor does not support this opcode"));
+ as_bad (_("selected processor does not support `%s'"), str);
return;
}
inst.instruction = opcode->value;
inst.size = opcode->size;
(*opcode->parms) (p);
- output_inst ();
+ output_inst (str);
return;
}
}
else
{
- CONST struct asm_opcode * opcode;
- unsigned long cond_code;
+ const struct asm_opcode * opcode;
- 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;
+ c = *p;
+ *p = '\0';
+ opcode = (const struct asm_opcode *) hash_find (arm_ops_hsh, str);
+ *p = c;
- for (; q != str; q--)
+ if (opcode)
{
- c = *q;
- *q = '\0';
-
- opcode = (CONST struct asm_opcode *) hash_find (arm_ops_hsh, str);
- *q = c;
-
- if (opcode && opcode->template)
+ /* Check that this instruction is supported for this CPU. */
+ if ((opcode->variant & cpu_variant) == 0)
{
- 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 ();
+ as_bad (_("selected processor does not support `%s'"), str);
return;
}
- try_shorter:
- ;
+ inst.instruction = opcode->value;
+ inst.size = INSN_SIZE;
+ (*opcode->parms) (p);
+ output_inst (str);
+ return;
}
}
/* 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;
- char * r;
-
-#ifdef IGNORE_OPCODE_CASE
- str = original_case_string;
-#endif
- copy_of_str = str;
-
- q += 4;
- skip_whitespace (q);
-
- for (r = q; *r != '\0'; r++)
- if (*r == ' ')
- break;
-
- if (r != q)
- {
- int regnum;
- 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;
- }
+ if (create_register_alias (str, p))
+ 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:
+ See if it's a processor-specific option.
+
+ This routine is somewhat complicated by the need for backwards
+ compatibility (since older releases of gcc can't be changed).
+ The new options try to make the interface as compatible as
+ possible with GCC.
+
+ New options (supported) are:
+
+ -mcpu=<cpu name> Assemble for selected processor
+ -march=<architecture name> Assemble for selected architecture
+ -mfpu=<fpu architecture> Assemble for selected FPU.
+ -EB/-mbig-endian Big-endian
+ -EL/-mlittle-endian Little-endian
+ -k Generate PIC code
+ -mthumb Start in Thumb mode
+ -mthumb-interwork Code supports ARM/Thumb interworking
+
+ For now we will also provide support for
+
+ -mapcs-32 32-bit Program counter
+ -mapcs-26 26-bit Program counter
+ -macps-float Floats passed in FP registers
+ -mapcs-reentrant Reentrant code
+ -matpcs
+ (sometime these will probably be replaced with -mapcs=<list of options>
+ and -matpcs=<list of options>)
+
+ The remaining options are only supported for back-wards compatibility.
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
@@ -7928,382 +10529,567 @@ _("Warning: Use of the 'nv' conditional is deprecated\n"));
FP variants:
-mfpa10, -mfpa11 FPA10 and 11 co-processor instructions
-mfpe-old (No float load/store multiples)
+ -mvfpxd VFP Single precision
+ -mvfp All VFP
-mno-fpu Disable all floating point instructions
- Run-time endian selection:
- -EB big endian cpu
- -EL little endian cpu
- ARM Procedure Calling Standard:
- -mapcs-32 32 bit APCS
- -mapcs-26 26 bit APCS
- -mapcs-float Pass floats in float regs
- -mapcs-reentrant Position independent code
- -mthumb-interwork Code supports Arm/Thumb interworking
- -matpcs ARM/Thumb Procedure Call Standard
- -moabi Old ELF ABI */
+
+ The following CPU names are recognized:
+ arm1, arm2, arm250, arm3, arm6, arm600, arm610, arm620,
+ arm7, arm7m, arm7d, arm7dm, arm7di, arm7dmi, arm70, arm700,
+ arm700i, arm710 arm710t, arm720, arm720t, arm740t, arm710c,
+ arm7100, arm7500, arm7500fe, arm7tdmi, arm8, arm810, arm9,
+ arm920, arm920t, arm940t, arm946, arm966, arm9tdmi, arm9e,
+ arm10t arm10e, arm1020t, arm1020e, arm10200e,
+ strongarm, strongarm110, strongarm1100, strongarm1110, xscale.
+
+ */
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},
+#else
+#if TARGET_BYTES_BIG_ENDIAN
+#define OPTION_EB (OPTION_MD_BASE + 0)
+#else
+#define OPTION_EL (OPTION_MD_BASE + 1)
+#endif
+#endif
+
+struct option md_longopts[] =
+{
+#ifdef OPTION_EB
+ {"EB", no_argument, NULL, OPTION_EB},
#endif
+#ifdef OPTION_EL
+ {"EL", no_argument, NULL, OPTION_EL},
#endif
{NULL, no_argument, NULL, 0}
};
size_t md_longopts_size = sizeof (md_longopts);
-int
-md_parse_option (c, arg)
- int c;
- char * arg;
+struct arm_option_table
{
- char * str = arg;
+ char *option; /* Option name to match. */
+ char *help; /* Help information. */
+ int *var; /* Variable to change. */
+ int value; /* What to change it to. */
+ char *deprecated; /* If non-null, print this message. */
+};
- switch (c)
+struct arm_option_table arm_opts[] =
+{
+ {"k", N_("generate PIC code"), &pic_code, 1, NULL},
+ {"mthumb", N_("assemble Thumb code"), &thumb_mode, 1, NULL},
+ {"mthumb-interwork", N_("support ARM/Thumb interworking"),
+ &support_interwork, 1, NULL},
+ {"moabi", N_("use old ABI (ELF only)"), &target_oabi, 1, NULL},
+ {"mapcs-32", N_("code uses 32-bit program counter"), &uses_apcs_26, 0, NULL},
+ {"mapcs-26", N_("code uses 26-bit program counter"), &uses_apcs_26, 1, NULL},
+ {"mapcs-float", N_("floating point args are in fp regs"), &uses_apcs_float,
+ 1, NULL},
+ {"mapcs-reentrant", N_("re-entrant code"), &pic_code, 1, NULL},
+ {"matpcs", N_("code is ATPCS conformant"), &atpcs, 1, NULL},
+ {"mbig-endian", N_("assemble for big-endian"), &target_big_endian, 1, NULL},
+ {"mlittle-endian", N_("assemble for little-endian"), &target_big_endian, 1,
+ NULL},
+
+ /* These are recognized by the assembler, but have no affect on code. */
+ {"mapcs-frame", N_("use frame pointer"), NULL, 0, NULL},
+ {"mapcs-stack-check", N_("use stack size checking"), NULL, 0, NULL},
+
+ /* DON'T add any new processors to this list -- we want the whole list
+ to go away... Add them to the processors table instead. */
+ {"marm1", NULL, &legacy_cpu, ARM_ARCH_V1, N_("use -mcpu=arm1")},
+ {"m1", NULL, &legacy_cpu, ARM_ARCH_V1, N_("use -mcpu=arm1")},
+ {"marm2", NULL, &legacy_cpu, ARM_ARCH_V2, N_("use -mcpu=arm2")},
+ {"m2", NULL, &legacy_cpu, ARM_ARCH_V2, N_("use -mcpu=arm2")},
+ {"marm250", NULL, &legacy_cpu, ARM_ARCH_V2S, N_("use -mcpu=arm250")},
+ {"m250", NULL, &legacy_cpu, ARM_ARCH_V2S, N_("use -mcpu=arm250")},
+ {"marm3", NULL, &legacy_cpu, ARM_ARCH_V2S, N_("use -mcpu=arm3")},
+ {"m3", NULL, &legacy_cpu, ARM_ARCH_V2S, N_("use -mcpu=arm3")},
+ {"marm6", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm6")},
+ {"m6", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm6")},
+ {"marm600", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm600")},
+ {"m600", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm600")},
+ {"marm610", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm610")},
+ {"m610", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm610")},
+ {"marm620", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm620")},
+ {"m620", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm620")},
+ {"marm7", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm7")},
+ {"m7", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm7")},
+ {"marm70", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm70")},
+ {"m70", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm70")},
+ {"marm700", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm700")},
+ {"m700", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm700")},
+ {"marm700i", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm700i")},
+ {"m700i", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm700i")},
+ {"marm710", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm710")},
+ {"m710", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm710")},
+ {"marm710c", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm710c")},
+ {"m710c", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm710c")},
+ {"marm720", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm720")},
+ {"m720", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm720")},
+ {"marm7d", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm7d")},
+ {"m7d", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm7d")},
+ {"marm7di", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm7di")},
+ {"m7di", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm7di")},
+ {"marm7m", NULL, &legacy_cpu, ARM_ARCH_V3M, N_("use -mcpu=arm7m")},
+ {"m7m", NULL, &legacy_cpu, ARM_ARCH_V3M, N_("use -mcpu=arm7m")},
+ {"marm7dm", NULL, &legacy_cpu, ARM_ARCH_V3M, N_("use -mcpu=arm7dm")},
+ {"m7dm", NULL, &legacy_cpu, ARM_ARCH_V3M, N_("use -mcpu=arm7dm")},
+ {"marm7dmi", NULL, &legacy_cpu, ARM_ARCH_V3M, N_("use -mcpu=arm7dmi")},
+ {"m7dmi", NULL, &legacy_cpu, ARM_ARCH_V3M, N_("use -mcpu=arm7dmi")},
+ {"marm7100", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm7100")},
+ {"m7100", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm7100")},
+ {"marm7500", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm7500")},
+ {"m7500", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm7500")},
+ {"marm7500fe", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm7500fe")},
+ {"m7500fe", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -mcpu=arm7500fe")},
+ {"marm7t", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm7tdmi")},
+ {"m7t", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm7tdmi")},
+ {"marm7tdmi", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm7tdmi")},
+ {"m7tdmi", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm7tdmi")},
+ {"marm710t", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm710t")},
+ {"m710t", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm710t")},
+ {"marm720t", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm720t")},
+ {"m720t", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm720t")},
+ {"marm740t", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm740t")},
+ {"m740t", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm740t")},
+ {"marm8", NULL, &legacy_cpu, ARM_ARCH_V4, N_("use -mcpu=arm8")},
+ {"m8", NULL, &legacy_cpu, ARM_ARCH_V4, N_("use -mcpu=arm8")},
+ {"marm810", NULL, &legacy_cpu, ARM_ARCH_V4, N_("use -mcpu=arm810")},
+ {"m810", NULL, &legacy_cpu, ARM_ARCH_V4, N_("use -mcpu=arm810")},
+ {"marm9", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm9")},
+ {"m9", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm9")},
+ {"marm9tdmi", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm9tdmi")},
+ {"m9tdmi", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm9tdmi")},
+ {"marm920", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm920")},
+ {"m920", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm920")},
+ {"marm940", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm940")},
+ {"m940", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -mcpu=arm940")},
+ {"mstrongarm", NULL, &legacy_cpu, ARM_ARCH_V4, N_("use -mcpu=strongarm")},
+ {"mstrongarm110", NULL, &legacy_cpu, ARM_ARCH_V4,
+ N_("use -mcpu=strongarm110")},
+ {"mstrongarm1100", NULL, &legacy_cpu, ARM_ARCH_V4,
+ N_("use -mcpu=strongarm1100")},
+ {"mstrongarm1110", NULL, &legacy_cpu, ARM_ARCH_V4,
+ N_("use -mcpu=strongarm1110")},
+ {"mxscale", NULL, &legacy_cpu, ARM_ARCH_XSCALE, N_("use -mcpu=xscale")},
+ {"mall", NULL, &legacy_cpu, ARM_ANY, N_("use -mcpu=all")},
+
+ /* Architecture variants -- don't add any more to this list either. */
+ {"mv2", NULL, &legacy_cpu, ARM_ARCH_V2, N_("use -march=armv2")},
+ {"marmv2", NULL, &legacy_cpu, ARM_ARCH_V2, N_("use -march=armv2")},
+ {"mv2a", NULL, &legacy_cpu, ARM_ARCH_V2S, N_("use -march=armv2a")},
+ {"marmv2a", NULL, &legacy_cpu, ARM_ARCH_V2S, N_("use -march=armv2a")},
+ {"mv3", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -march=armv3")},
+ {"marmv3", NULL, &legacy_cpu, ARM_ARCH_V3, N_("use -march=armv3")},
+ {"mv3m", NULL, &legacy_cpu, ARM_ARCH_V3M, N_("use -march=armv3m")},
+ {"marmv3m", NULL, &legacy_cpu, ARM_ARCH_V3M, N_("use -march=armv3m")},
+ {"mv4", NULL, &legacy_cpu, ARM_ARCH_V4, N_("use -march=armv4")},
+ {"marmv4", NULL, &legacy_cpu, ARM_ARCH_V4, N_("use -march=armv4")},
+ {"mv4t", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -march=armv4t")},
+ {"marmv4t", NULL, &legacy_cpu, ARM_ARCH_V4T, N_("use -march=armv4t")},
+ {"mv5", NULL, &legacy_cpu, ARM_ARCH_V5, N_("use -march=armv5")},
+ {"marmv5", NULL, &legacy_cpu, ARM_ARCH_V5, N_("use -march=armv5")},
+ {"mv5t", NULL, &legacy_cpu, ARM_ARCH_V5T, N_("use -march=armv5t")},
+ {"marmv5t", NULL, &legacy_cpu, ARM_ARCH_V5T, N_("use -march=armv5t")},
+ {"mv5e", NULL, &legacy_cpu, ARM_ARCH_V5TE, N_("use -march=armv5te")},
+ {"marmv5e", NULL, &legacy_cpu, ARM_ARCH_V5TE, N_("use -march=armv5te")},
+
+ /* Floating point variants -- don't add any more to this list either. */
+ {"mfpe-old", NULL, &legacy_fpu, FPU_ARCH_FPE, N_("use -mfpu=fpe")},
+ {"mfpa10", NULL, &legacy_fpu, FPU_ARCH_FPA, N_("use -mfpu=fpa10")},
+ {"mfpa11", NULL, &legacy_fpu, FPU_ARCH_FPA, N_("use -mfpu=fpa11")},
+ {"mno-fpu", NULL, &legacy_fpu, 0,
+ N_("use either -mfpu=softfpa or -mfpu=softvfp")},
+
+ {NULL, NULL, NULL, 0, NULL}
+};
+
+struct arm_cpu_option_table
+{
+ char *name;
+ int value;
+ /* For some CPUs we assume an FPU unless the user explicitly sets
+ -mfpu=... */
+ int default_fpu;
+};
+
+/* This list should, at a minimum, contain all the cpu names
+ recognized by GCC. */
+static struct arm_cpu_option_table arm_cpus[] =
+{
+ {"all", ARM_ANY, FPU_ARCH_FPA},
+ {"arm1", ARM_ARCH_V1, FPU_ARCH_FPA},
+ {"arm2", ARM_ARCH_V2, FPU_ARCH_FPA},
+ {"arm250", ARM_ARCH_V2S, FPU_ARCH_FPA},
+ {"arm3", ARM_ARCH_V2S, FPU_ARCH_FPA},
+ {"arm6", ARM_ARCH_V3, FPU_ARCH_FPA},
+ {"arm60", ARM_ARCH_V3, FPU_ARCH_FPA},
+ {"arm600", ARM_ARCH_V3, FPU_ARCH_FPA},
+ {"arm610", ARM_ARCH_V3, FPU_ARCH_FPA},
+ {"arm620", ARM_ARCH_V3, FPU_ARCH_FPA},
+ {"arm7", ARM_ARCH_V3, FPU_ARCH_FPA},
+ {"arm7m", ARM_ARCH_V3M, FPU_ARCH_FPA},
+ {"arm7d", ARM_ARCH_V3, FPU_ARCH_FPA},
+ {"arm7dm", ARM_ARCH_V3M, FPU_ARCH_FPA},
+ {"arm7di", ARM_ARCH_V3, FPU_ARCH_FPA},
+ {"arm7dmi", ARM_ARCH_V3M, FPU_ARCH_FPA},
+ {"arm70", ARM_ARCH_V3, FPU_ARCH_FPA},
+ {"arm700", ARM_ARCH_V3, FPU_ARCH_FPA},
+ {"arm700i", ARM_ARCH_V3, FPU_ARCH_FPA},
+ {"arm710", ARM_ARCH_V3, FPU_ARCH_FPA},
+ {"arm710t", ARM_ARCH_V4T, FPU_ARCH_FPA},
+ {"arm720", ARM_ARCH_V3, FPU_ARCH_FPA},
+ {"arm720t", ARM_ARCH_V4T, FPU_ARCH_FPA},
+ {"arm740t", ARM_ARCH_V4T, FPU_ARCH_FPA},
+ {"arm710c", ARM_ARCH_V3, FPU_ARCH_FPA},
+ {"arm7100", ARM_ARCH_V3, FPU_ARCH_FPA},
+ {"arm7500", ARM_ARCH_V3, FPU_ARCH_FPA},
+ {"arm7500fe", ARM_ARCH_V3, FPU_ARCH_FPA},
+ {"arm7t", ARM_ARCH_V4T, FPU_ARCH_FPA},
+ {"arm7tdmi", ARM_ARCH_V4T, FPU_ARCH_FPA},
+ {"arm8", ARM_ARCH_V4, FPU_ARCH_FPA},
+ {"arm810", ARM_ARCH_V4, FPU_ARCH_FPA},
+ {"strongarm", ARM_ARCH_V4, FPU_ARCH_FPA},
+ {"strongarm1", ARM_ARCH_V4, FPU_ARCH_FPA},
+ {"strongarm110", ARM_ARCH_V4, FPU_ARCH_FPA},
+ {"strongarm1100", ARM_ARCH_V4, FPU_ARCH_FPA},
+ {"strongarm1110", ARM_ARCH_V4, FPU_ARCH_FPA},
+ {"arm9", ARM_ARCH_V4T, FPU_ARCH_FPA},
+ {"arm920", ARM_ARCH_V4T, FPU_ARCH_FPA},
+ {"arm920t", ARM_ARCH_V4T, FPU_ARCH_FPA},
+ {"arm922t", ARM_ARCH_V4T, FPU_ARCH_FPA},
+ {"arm940t", ARM_ARCH_V4T, FPU_ARCH_FPA},
+ {"arm9tdmi", ARM_ARCH_V4T, FPU_ARCH_FPA},
+ /* For V5 or later processors we default to using VFP; but the user
+ should really set the FPU type explicitly. */
+ {"arm9e-r0", ARM_ARCH_V5TExP, FPU_ARCH_VFP_V2},
+ {"arm9e", ARM_ARCH_V5TE, FPU_ARCH_VFP_V2},
+ {"arm926ej", ARM_ARCH_V5TEJ, FPU_ARCH_VFP_V2},
+ {"arm946e-r0", ARM_ARCH_V5TExP, FPU_ARCH_VFP_V2},
+ {"arm946e", ARM_ARCH_V5TE, FPU_ARCH_VFP_V2},
+ {"arm966e-r0", ARM_ARCH_V5TExP, FPU_ARCH_VFP_V2},
+ {"arm966e", ARM_ARCH_V5TE, FPU_ARCH_VFP_V2},
+ {"arm10t", ARM_ARCH_V5T, FPU_ARCH_VFP_V1},
+ {"arm10e", ARM_ARCH_V5TE, FPU_ARCH_VFP_V2},
+ {"arm1020", ARM_ARCH_V5TE, FPU_ARCH_VFP_V2},
+ {"arm1020t", ARM_ARCH_V5T, FPU_ARCH_VFP_V1},
+ {"arm1020e", ARM_ARCH_V5TE, FPU_ARCH_VFP_V2},
+ /* ??? XSCALE is really an architecture. */
+ {"xscale", ARM_ARCH_XSCALE, FPU_ARCH_VFP_V2},
+ {"i80200", ARM_ARCH_XSCALE, FPU_ARCH_VFP_V2},
+ /* Maverick */
+ {"ep9312", ARM_ARCH_V4T | ARM_CEXT_MAVERICK, FPU_NONE},
+ {NULL, 0, 0}
+};
+
+struct arm_arch_option_table
+{
+ char *name;
+ int value;
+ int default_fpu;
+};
+
+/* This list should, at a minimum, contain all the architecture names
+ recognized by GCC. */
+static struct arm_arch_option_table arm_archs[] =
+{
+ {"all", ARM_ANY, FPU_ARCH_FPA},
+ {"armv1", ARM_ARCH_V1, FPU_ARCH_FPA},
+ {"armv2", ARM_ARCH_V2, FPU_ARCH_FPA},
+ {"armv2a", ARM_ARCH_V2S, FPU_ARCH_FPA},
+ {"armv2s", ARM_ARCH_V2S, FPU_ARCH_FPA},
+ {"armv3", ARM_ARCH_V3, FPU_ARCH_FPA},
+ {"armv3m", ARM_ARCH_V3M, FPU_ARCH_FPA},
+ {"armv4", ARM_ARCH_V4, FPU_ARCH_FPA},
+ {"armv4xm", ARM_ARCH_V4xM, FPU_ARCH_FPA},
+ {"armv4t", ARM_ARCH_V4T, FPU_ARCH_FPA},
+ {"armv4txm", ARM_ARCH_V4TxM, FPU_ARCH_FPA},
+ {"armv5", ARM_ARCH_V5, FPU_ARCH_VFP},
+ {"armv5t", ARM_ARCH_V5T, FPU_ARCH_VFP},
+ {"armv5txm", ARM_ARCH_V5TxM, FPU_ARCH_VFP},
+ {"armv5te", ARM_ARCH_V5TE, FPU_ARCH_VFP},
+ {"armv5texp", ARM_ARCH_V5TExP, FPU_ARCH_VFP},
+ {"armv5tej", ARM_ARCH_V5TEJ, FPU_ARCH_VFP},
+ {"xscale", ARM_ARCH_XSCALE, FPU_ARCH_VFP},
+ {NULL, 0, 0}
+};
+
+/* ISA extensions in the co-processor space. */
+struct arm_arch_extension_table
+{
+ char *name;
+ int value;
+};
+
+static struct arm_arch_extension_table arm_extensions[] =
+{
+ {"maverick", ARM_CEXT_MAVERICK},
+ {"xscale", ARM_CEXT_XSCALE},
+ {NULL, 0}
+};
+
+struct arm_fpu_option_table
+{
+ char *name;
+ int value;
+};
+
+/* This list should, at a minimum, contain all the fpu names
+ recognized by GCC. */
+static struct arm_fpu_option_table arm_fpus[] =
+{
+ {"softfpa", FPU_NONE},
+ {"fpe", FPU_ARCH_FPE},
+ {"fpe2", FPU_ARCH_FPE},
+ {"fpe3", FPU_ARCH_FPA}, /* Third release supports LFM/SFM. */
+ {"fpa", FPU_ARCH_FPA},
+ {"fpa10", FPU_ARCH_FPA},
+ {"fpa11", FPU_ARCH_FPA},
+ {"arm7500fe", FPU_ARCH_FPA},
+ {"softvfp", FPU_ARCH_VFP},
+ {"softvfp+vfp", FPU_ARCH_VFP_V2},
+ {"vfp", FPU_ARCH_VFP_V2},
+ {"vfp9", FPU_ARCH_VFP_V2},
+ {"vfp10", FPU_ARCH_VFP_V2},
+ {"vfp10-r0", FPU_ARCH_VFP_V1},
+ {"vfpxd", FPU_ARCH_VFP_V1xD},
+ {"arm1020t", FPU_ARCH_VFP_V1},
+ {"arm1020e", FPU_ARCH_VFP_V2},
+ {NULL, 0}
+};
+
+struct arm_long_option_table
+{
+ char *option; /* Substring to match. */
+ char *help; /* Help information. */
+ int (*func) PARAMS ((char *subopt)); /* Function to decode sub-option. */
+ char *deprecated; /* If non-null, print this message. */
+};
+
+static int
+arm_parse_extension (str, opt_p)
+ char *str;
+ int *opt_p;
+{
+ while (str != NULL && *str != 0)
{
-#ifdef ARM_BI_ENDIAN
- case OPTION_EB:
- target_big_endian = 1;
- break;
- case OPTION_EL:
- target_big_endian = 0;
- break;
-#endif
+ struct arm_arch_extension_table *opt;
+ char *ext;
+ int optlen;
- case 'm':
- switch (*str)
+ if (*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;
+ as_bad (_("invalid architectural extension"));
+ return 0;
+ }
- case 'n':
- if (streq (str, "no-fpu"))
- cpu_variant &= ~FPU_ALL;
- break;
+ str++;
+ ext = strchr (str, '+');
-#ifdef OBJ_ELF
- case 'o':
- if (streq (str, "oabi"))
- target_oabi = true;
- break;
-#endif
+ if (ext != NULL)
+ optlen = ext - str;
+ else
+ optlen = strlen (str);
- case 't':
- /* Limit assembler to generating only Thumb instructions: */
- if (streq (str, "thumb"))
- {
- cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_EXT_THUMB;
- cpu_variant = (cpu_variant & ~FPU_ALL) | FPU_NONE;
- thumb_mode = 1;
- }
- else if (streq (str, "thumb-interwork"))
- {
- if ((cpu_variant & ARM_EXT_THUMB) == 0)
- cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_ARCH_V4T;
-#if defined OBJ_COFF || defined OBJ_ELF
- support_interwork = true;
-#endif
- }
- else
- goto bad;
- break;
+ if (optlen == 0)
+ {
+ as_bad (_("missing architectural extension"));
+ return 0;
+ }
- 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. */
+ for (opt = arm_extensions; opt->name != NULL; opt++)
+ if (strncmp (opt->name, str, optlen) == 0)
+ {
+ *opt_p |= opt->value;
+ break;
+ }
- str += 5;
+ if (opt->name == NULL)
+ {
+ as_bad (_("unknown architectural extnsion `%s'"), str);
+ return 0;
+ }
- 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. */
+ str = ext;
+ };
- 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. */
+ return 1;
+}
- 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;
- }
+static int
+arm_parse_cpu (str)
+ char *str;
+{
+ struct arm_cpu_option_table *opt;
+ char *ext = strchr (str, '+');
+ int optlen;
- as_bad (_("Unrecognised APCS switch -m%s"), arg);
- return 0;
- }
+ if (ext != NULL)
+ optlen = ext - str;
+ else
+ optlen = strlen (str);
- if (! strcmp (str, "atpcs"))
- {
- atpcs = true;
- return 1;
- }
-#endif
- /* Strip off optional "arm". */
- if (! strncmp (str, "arm", 3))
- str += 3;
+ if (optlen == 0)
+ {
+ as_bad (_("missing cpu name `%s'"), str);
+ return 0;
+ }
- switch (*str)
- {
- case '1':
- if (streq (str, "1"))
- cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_1;
- else
- goto bad;
- break;
+ for (opt = arm_cpus; opt->name != NULL; opt++)
+ if (strncmp (opt->name, str, optlen) == 0)
+ {
+ mcpu_cpu_opt = opt->value;
+ mcpu_fpu_opt = opt->default_fpu;
- 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;
+ if (ext != NULL)
+ return arm_parse_extension (ext, &mcpu_cpu_opt);
- case '3':
- if (streq (str, "3"))
- cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_3;
- else
- goto bad;
- break;
+ return 1;
+ }
- 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;
+ as_bad (_("unknown cpu `%s'"), str);
+ return 0;
+}
- case '7':
- /* Eat the processor name. */
- switch (strtol (str, & str, 10))
- {
- 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_ARCH_V4T;
- break;
+static int
+arm_parse_arch (str)
+ char *str;
+{
+ struct arm_arch_option_table *opt;
+ char *ext = strchr (str, '+');
+ int optlen;
- case 'm':
- cpu_variant |= ARM_EXT_LONGMUL;
- break;
+ if (ext != NULL)
+ optlen = ext - str;
+ else
+ optlen = strlen (str);
- case 'f': /* fe => fp enabled cpu. */
- if (str[1] == 'e')
- ++ str;
- else
- goto bad;
+ if (optlen == 0)
+ {
+ as_bad (_("missing architecture name `%s'"), str);
+ return 0;
+ }
- 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;
+ for (opt = arm_archs; opt->name != NULL; opt++)
+ if (strcmp (opt->name, str) == 0)
+ {
+ march_cpu_opt = opt->value;
+ march_fpu_opt = opt->default_fpu;
- case '8':
- if (streq (str, "8") || streq (str, "810"))
- cpu_variant = (cpu_variant & ~ARM_ANY)
- | ARM_8 | ARM_ARCH_V4;
- else
- goto bad;
- break;
+ if (ext != NULL)
+ return arm_parse_extension (ext, &march_cpu_opt);
- case '9':
- if (streq (str, "9"))
- cpu_variant = (cpu_variant & ~ARM_ANY)
- | ARM_9 | ARM_ARCH_V4T;
- else if (streq (str, "920"))
- cpu_variant = (cpu_variant & ~ARM_ANY)
- | ARM_9 | ARM_ARCH_V4;
- else if (streq (str, "920t"))
- cpu_variant = (cpu_variant & ~ARM_ANY)
- | ARM_9 | ARM_ARCH_V4T;
- else if (streq (str, "9tdmi"))
- cpu_variant = (cpu_variant & ~ARM_ANY)
- | ARM_9 | ARM_ARCH_V4T;
- else
- goto bad;
- break;
+ return 1;
+ }
- case 's':
- if (streq (str, "strongarm")
- || streq (str, "strongarm110")
- || streq (str, "strongarm1100"))
- cpu_variant = (cpu_variant & ~ARM_ANY)
- | ARM_8 | ARM_ARCH_V4;
- else
- goto bad;
- break;
+ as_bad (_("unknown architecture `%s'\n"), str);
+ return 0;
+}
- case 'x':
- if (streq (str, "xscale"))
- cpu_variant = ARM_9 | ARM_ARCH_XSCALE;
- else
- goto bad;
- break;
-
- case 'v':
- /* Select variant based on architecture rather than
- processor. */
- 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;
+static int
+arm_parse_fpu (str)
+ char *str;
+{
+ struct arm_fpu_option_table *opt;
- case '3':
- cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_7;
+ for (opt = arm_fpus; opt->name != NULL; opt++)
+ if (strcmp (opt->name, str) == 0)
+ {
+ mfpu_opt = opt->value;
+ return 1;
+ }
- switch (*++str)
- {
- case 'm': cpu_variant |= ARM_EXT_LONGMUL; break;
- case 0: break;
- default:
- as_bad (_("Invalid architecture variant -m%s"), arg);
- break;
- }
- break;
+ as_bad (_("unknown floating point format `%s'\n"), str);
+ return 0;
+}
- case '4':
- cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_7 | ARM_ARCH_V4;
+struct arm_long_option_table arm_long_opts[] =
+{
+ {"mcpu=", N_("<cpu name>\t assemble for CPU <cpu name>"),
+ arm_parse_cpu, NULL},
+ {"march=", N_("<arch name>\t assemble for architecture <arch name>"),
+ arm_parse_arch, NULL},
+ {"mfpu=", N_("<fpu name>\t assemble for FPU architecture <fpu name>"),
+ arm_parse_fpu, NULL},
+ {NULL, NULL, 0, NULL}
+};
- switch (*++str)
- {
- case 't': cpu_variant |= ARM_EXT_THUMB; break;
- case 0: break;
- default:
- as_bad (_("Invalid architecture variant -m%s"), arg);
- break;
- }
- break;
+int
+md_parse_option (c, arg)
+ int c;
+ char * arg;
+{
+ struct arm_option_table *opt;
+ struct arm_long_option_table *lopt;
- case '5':
- cpu_variant = (cpu_variant & ~ARM_ANY) | ARM_9 | ARM_ARCH_V5;
- switch (*++str)
- {
- case 't': cpu_variant |= ARM_EXT_THUMB; break;
- case 'e': cpu_variant |= ARM_EXT_V5E; break;
- case 0: break;
- default:
- as_bad (_("Invalid architecture variant -m%s"), arg);
- break;
- }
- break;
+ switch (c)
+ {
+#ifdef OPTION_EB
+ case OPTION_EB:
+ target_big_endian = 1;
+ break;
+#endif
- default:
- as_bad (_("Invalid architecture variant -m%s"), arg);
- break;
- }
- break;
+#ifdef OPTION_EL
+ case OPTION_EL:
+ target_big_endian = 0;
+ break;
+#endif
- default:
- bad:
- as_bad (_("Invalid processor variant -m%s"), arg);
- return 0;
+ case 'a':
+ /* Listing option. Just ignore these, we don't support additional
+ ones. */
+ return 0;
+
+ default:
+ for (opt = arm_opts; opt->option != NULL; opt++)
+ {
+ if (c == opt->option[0]
+ && ((arg == NULL && opt->option[1] == 0)
+ || strcmp (arg, opt->option + 1) == 0))
+ {
+#if WARN_DEPRECATED
+ /* If the option is deprecated, tell the user. */
+ if (opt->deprecated != NULL)
+ as_tsktsk (_("option `-%c%s' is deprecated: %s"), c,
+ arg ? arg : "", _(opt->deprecated));
+#endif
+
+ if (opt->var != NULL)
+ *opt->var = opt->value;
+
+ return 1;
}
}
- break;
-#if defined OBJ_ELF || defined OBJ_COFF
- case 'k':
- pic_code = 1;
- break;
+ for (lopt = arm_long_opts; lopt->option != NULL; lopt++)
+ {
+ /* These options are expected to have an argument. */
+ if (c == lopt->option[0]
+ && arg != NULL
+ && strncmp (arg, lopt->option + 1,
+ strlen (lopt->option + 1)) == 0)
+ {
+#if WARN_DEPRECATED
+ /* If the option is deprecated, tell the user. */
+ if (lopt->deprecated != NULL)
+ as_tsktsk (_("option `-%c%s' is deprecated: %s"), c, arg,
+ _(lopt->deprecated));
#endif
- default:
+ /* Call the sup-option parser. */
+ return (*lopt->func)(arg + strlen (lopt->option) - 1);
+ }
+ }
+
+ as_bad (_("unrecognized option `-%c%s'"), c, arg ? arg : "");
return 0;
}
@@ -8314,32 +11100,27 @@ void
md_show_usage (fp)
FILE * fp;
{
+ struct arm_option_table *opt;
+ struct arm_long_option_table *lopt;
+
+ fprintf (fp, _(" ARM-specific assembler options:\n"));
+
+ for (opt = arm_opts; opt->option != NULL; opt++)
+ if (opt->help != NULL)
+ fprintf (fp, " -%-23s%s\n", opt->option, _(opt->help));
+
+ for (lopt = arm_long_opts; lopt->option != NULL; lopt++)
+ if (lopt->help != NULL)
+ fprintf (fp, " -%s%s\n", lopt->option, _(lopt->help));
+
+#ifdef OPTION_EB
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\
- -matpcs use ARM/Thumb Procedure Calling Standard\n\
- -mapcs-float floating point args are passed in FP regs\n\
- -mapcs-reentrant the code is position independent/reentrant\n"));
-#endif
-#ifdef OBJ_ELF
- fprintf (fp, _("\
- -moabi support the old ELF ABI\n"));
+ -EB assemble code for a big-endian cpu\n"));
#endif
-#ifdef ARM_BI_ENDIAN
+
+#ifdef OPTION_EL
fprintf (fp, _("\
- -EB assemble code for a big endian cpu\n\
- -EL assemble code for a little endian cpu\n"));
+ -EL assemble code for a little-endian cpu\n"));
#endif
}
@@ -8741,9 +11522,9 @@ arm_parse_reloc ()
};
for (i = 0, ip = input_line_pointer;
- i < sizeof (id) && (isalnum (*ip) || ispunct (*ip));
+ i < sizeof (id) && (ISALNUM (*ip) || ISPUNCT (*ip));
i++, ip++)
- id[i] = tolower (*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)
diff --git a/contrib/binutils/gas/config/tc-arm.h b/contrib/binutils/gas/config/tc-arm.h
index 8de5704..2de9674 100644
--- a/contrib/binutils/gas/config/tc-arm.h
+++ b/contrib/binutils/gas/config/tc-arm.h
@@ -169,12 +169,6 @@ void armelf_frob_symbol PARAMS ((symbolS *, int *));
#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
diff --git a/contrib/binutils/gas/config/tc-ia64.c b/contrib/binutils/gas/config/tc-ia64.c
index 0e1c578..701752f 100644
--- a/contrib/binutils/gas/config/tc-ia64.c
+++ b/contrib/binutils/gas/config/tc-ia64.c
@@ -1,5 +1,5 @@
/* tc-ia64.c -- Assembler for the HP/Intel IA-64 architecture.
- Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of GAS, the GNU Assembler.
@@ -43,6 +43,7 @@
*/
#include "as.h"
+#include "safe-ctype.h"
#include "dwarf2dbg.h"
#include "subsegs.h"
@@ -61,13 +62,17 @@
enum special_section
{
+ /* IA-64 ABI section pseudo-ops. */
SPECIAL_SECTION_BSS = 0,
SPECIAL_SECTION_SBSS,
SPECIAL_SECTION_SDATA,
SPECIAL_SECTION_RODATA,
SPECIAL_SECTION_COMMENT,
SPECIAL_SECTION_UNWIND,
- SPECIAL_SECTION_UNWIND_INFO
+ SPECIAL_SECTION_UNWIND_INFO,
+ /* HPUX specific section pseudo-ops. */
+ SPECIAL_SECTION_INIT_ARRAY,
+ SPECIAL_SECTION_FINI_ARRAY,
};
enum reloc_func
@@ -81,6 +86,7 @@ enum reloc_func
FUNC_SEG_RELATIVE,
FUNC_LTV_RELATIVE,
FUNC_LT_FPTR_RELATIVE,
+ FUNC_IPLT_RELOC,
};
enum reg_symbol
@@ -279,6 +285,9 @@ static struct
int g_reg_set_conditionally[128];
} last_groups[3];
int group_idx;
+
+ int pointer_size; /* size in bytes of a pointer */
+ int pointer_size_shift; /* shift size of a pointer for alignment */
}
md;
@@ -476,6 +485,7 @@ pseudo_func[] =
{ "segrel", PSEUDO_FUNC_RELOC, { 0 } },
{ "ltv", PSEUDO_FUNC_RELOC, { 0 } },
{ "", 0, { 0 } }, /* placeholder for FUNC_LT_FPTR_RELATIVE */
+ { "iplt", PSEUDO_FUNC_RELOC, { 0 } },
/* mbtype4 constants: */
{ "alt", PSEUDO_FUNC_CONST, { 0xa } },
@@ -523,7 +533,13 @@ static const bfd_vma nop[IA64_NUM_UNITS] =
static char special_section_name[][20] =
{
{".bss"}, {".sbss"}, {".sdata"}, {".rodata"}, {".comment"},
- {".IA_64.unwind"}, {".IA_64.unwind_info"}
+ {".IA_64.unwind"}, {".IA_64.unwind_info"},
+ {".init_array"}, {".fini_array"}
+ };
+
+static char *special_linkonce_name[] =
+ {
+ ".gnu.linkonce.ia64unw.", ".gnu.linkonce.ia64unwi."
};
/* The best template for a particular sequence of up to three
@@ -703,6 +719,7 @@ static enum operand_match_result operand_match PARAMS ((const struct ia64_opcode
expressionS *e));
static int parse_operand PARAMS ((expressionS *e));
static struct ia64_opcode * parse_operands PARAMS ((struct ia64_opcode *));
+static int errata_nop_necessary_p PARAMS ((struct slot *, enum ia64_unit));
static void build_insn PARAMS ((struct slot *, bfd_vma *));
static void emit_one_bundle PARAMS ((void));
static void fix_insn PARAMS ((fixS *, const struct ia64_operand *, valueT));
@@ -716,6 +733,7 @@ static void add_qp_imply PARAMS((int p1, int p2));
static void clear_qp_branch_flag PARAMS((valueT mask));
static void clear_qp_mutex PARAMS((valueT mask));
static void clear_qp_implies PARAMS((valueT p1_mask, valueT p2_mask));
+static int has_suffix_p PARAMS((const char *, const char *));
static void clear_register_values PARAMS ((void));
static void print_dependency PARAMS ((const char *action, int depind));
static void instruction_serialization PARAMS ((void));
@@ -851,12 +869,21 @@ static int generate_unwind_image PARAMS ((const char *));
stack, so this must be a macro... */
#define make_unw_section_name(special, text_name, result) \
{ \
- char *_prefix = special_section_name[special]; \
- size_t _prefix_len = strlen (_prefix), _text_len = strlen (text_name); \
- char *_result = alloca (_prefix_len + _text_len + 1); \
- memcpy(_result, _prefix, _prefix_len); \
- memcpy(_result + _prefix_len, text_name, _text_len); \
- _result[_prefix_len + _text_len] = '\0'; \
+ const char *_prefix = special_section_name[special]; \
+ const char *_suffix = text_name; \
+ size_t _prefix_len, _suffix_len; \
+ char *_result; \
+ if (strncmp (text_name, ".gnu.linkonce.t.", \
+ sizeof (".gnu.linkonce.t.") - 1) == 0) \
+ { \
+ _prefix = special_linkonce_name[special - SPECIAL_SECTION_UNWIND]; \
+ _suffix += sizeof (".gnu.linkonce.t.") - 1; \
+ } \
+ _prefix_len = strlen (_prefix), _suffix_len = strlen (_suffix); \
+ _result = alloca (_prefix_len + _suffix_len + 1); \
+ memcpy (_result, _prefix, _prefix_len); \
+ memcpy (_result + _prefix_len, _suffix, _suffix_len); \
+ _result[_prefix_len + _suffix_len] = '\0'; \
result = _result; \
} \
while (0)
@@ -892,6 +919,20 @@ set_section (name)
input_line_pointer = saved_input_line_pointer;
}
+/* Map 's' to SHF_IA_64_SHORT. */
+
+int
+ia64_elf_section_letter (letter, ptr_msg)
+ int letter;
+ char **ptr_msg;
+{
+ if (letter == 's')
+ return SHF_IA_64_SHORT;
+
+ *ptr_msg = _("Bad .section directive: want a,s,w,x,M,S in string");
+ return 0;
+}
+
/* Map SHF_IA_64_SHORT to SEC_SMALL_DATA. */
flagword
@@ -909,15 +950,28 @@ ia64_elf_section_type (str, len)
const char *str;
size_t len;
{
- len = sizeof (ELF_STRING_ia64_unwind_info) - 1;
- if (strncmp (str, ELF_STRING_ia64_unwind_info, len) == 0)
+#define STREQ(s) ((len == sizeof (s) - 1) && (strncmp (str, s, sizeof (s) - 1) == 0))
+
+ if (STREQ (ELF_STRING_ia64_unwind_info))
return SHT_PROGBITS;
- len = sizeof (ELF_STRING_ia64_unwind) - 1;
- if (strncmp (str, ELF_STRING_ia64_unwind, len) == 0)
+ if (STREQ (ELF_STRING_ia64_unwind_info_once))
+ return SHT_PROGBITS;
+
+ if (STREQ (ELF_STRING_ia64_unwind))
+ return SHT_IA_64_UNWIND;
+
+ if (STREQ (ELF_STRING_ia64_unwind_once))
return SHT_IA_64_UNWIND;
+ if (STREQ ("init_array"))
+ return SHT_INIT_ARRAY;
+
+ if (STREQ ("fini_array"))
+ return SHT_FINI_ARRAY;
+
return -1;
+#undef STREQ
}
static unsigned int
@@ -2735,6 +2789,47 @@ fixup_unw_records (list)
}
}
+/* Helper routine for output_unw_records. Emits the header for the unwind
+ info. */
+
+static int
+setup_unwind_header (int size, unsigned char **mem)
+{
+ int x, extra = 0;
+ valueT flag_value;
+
+ /* pad to pointer-size boundry. */
+ x = size % md.pointer_size;
+ if (x != 0)
+ extra = md.pointer_size - x;
+
+ /* Add 8 for the header + a pointer for the
+ personality offset. */
+ *mem = xmalloc (size + extra + 8 + md.pointer_size);
+
+ /* Clear the padding area and personality. */
+ memset (*mem + 8 + size, 0 , extra + md.pointer_size);
+
+ /* Initialize the header area. */
+ if (unwind.personality_routine)
+ {
+ if (md.flags & EF_IA_64_ABI64)
+ flag_value = (bfd_vma) 3 << 32;
+ else
+ /* 32-bit unwind info block. */
+ flag_value = (bfd_vma) 0x1003 << 32;
+ }
+ else
+ flag_value = 0;
+
+ md_number_to_chars (*mem, (((bfd_vma) 1 << 48) /* Version. */
+ | flag_value /* U & E handler flags. */
+ | ((size + extra) / md.pointer_size)), /* Length. */
+ 8);
+
+ return extra;
+}
+
/* Generate an unwind image from a record list. Returns the number of
bytes in the resulting image. The memory image itselof is returned
in the 'ptr' parameter. */
@@ -2743,7 +2838,7 @@ output_unw_records (list, ptr)
unw_rec_list *list;
void **ptr;
{
- int size, x, extra = 0;
+ int size, extra;
unsigned char *mem;
*ptr = NULL;
@@ -2752,35 +2847,17 @@ output_unw_records (list, ptr)
fixup_unw_records (list);
size = calc_record_size (list);
- /* pad to 8 byte boundry. */
- x = size % 8;
- if (x != 0)
- extra = 8 - x;
-
if (size > 0 || unwind.force_unwind_entry)
{
unwind.force_unwind_entry = 0;
-
- /* Add 8 for the header + 8 more bytes for the personality offset. */
- mem = xmalloc (size + extra + 16);
+ extra = setup_unwind_header (size, &mem);
vbyte_mem_ptr = mem + 8;
- /* Clear the padding area and personality. */
- memset (mem + 8 + size, 0 , extra + 8);
- /* Initialize the header area. */
- md_number_to_chars (mem,
- (((bfd_vma) 1 << 48) /* version */
- | (unwind.personality_routine
- ? ((bfd_vma) 3 << 32) /* U & E handler flags */
- : 0)
- | ((size + extra) / 8)), /* length (dwords) */
- 8);
-
process_unw_records (list, output_vbyte_mem);
*ptr = mem;
- size += extra + 16;
+ size += extra + 8 + md.pointer_size;
}
return size;
}
@@ -3149,24 +3226,26 @@ generate_unwind_image (text_name)
/* Generate the unwind record. */
size = output_unw_records (unwind.list, (void **) &unw_rec);
- if (size % 8 != 0)
- as_bad ("Unwind record is not a multiple of 8 bytes.");
-
+ if (size % md.pointer_size != 0)
+ as_bad ("Unwind record is not a multiple of %d bytes.", md.pointer_size);
+
/* If there are unwind records, switch sections, and output the info. */
if (size != 0)
{
unsigned char *where;
char *sec_name;
expressionS exp;
+ bfd_reloc_code_real_type reloc;
make_unw_section_name (SPECIAL_SECTION_UNWIND_INFO, text_name, sec_name);
set_section (sec_name);
bfd_set_section_flags (stdoutput, now_seg,
SEC_LOAD | SEC_ALLOC | SEC_READONLY);
- /* Make sure the section has 8 byte alignment. */
- frag_align (3, 0, 0);
- record_alignment (now_seg, 3);
+ /* Make sure the section has 4 byte alignment for ILP32 and
+ 8 byte alignment for LP64. */
+ frag_align (md.pointer_size_shift, 0, 0);
+ record_alignment (now_seg, md.pointer_size_shift);
/* Set expression which points to start of unwind descriptor area. */
unwind.info = expr_build_dot ();
@@ -3186,8 +3265,24 @@ generate_unwind_image (text_name)
exp.X_op = O_symbol;
exp.X_add_symbol = unwind.personality_routine;
exp.X_add_number = 0;
- fix_new_exp (frag_now, frag_now_fix () - 8, 8,
- &exp, 0, BFD_RELOC_IA64_LTOFF_FPTR64LSB);
+
+ if (md.flags & EF_IA_64_BE)
+ {
+ if (md.flags & EF_IA_64_ABI64)
+ reloc = BFD_RELOC_IA64_LTOFF_FPTR64MSB;
+ else
+ reloc = BFD_RELOC_IA64_LTOFF_FPTR32MSB;
+ }
+ else
+ {
+ if (md.flags & EF_IA_64_ABI64)
+ reloc = BFD_RELOC_IA64_LTOFF_FPTR64LSB;
+ else
+ reloc = BFD_RELOC_IA64_LTOFF_FPTR32LSB;
+ }
+
+ fix_new_exp (frag_now, frag_now_fix () - md.pointer_size,
+ md.pointer_size, & exp, 0, reloc);
unwind.personality_routine = 0;
}
}
@@ -3797,6 +3892,8 @@ dot_endp (dummy)
segT saved_seg;
subsegT saved_subseg;
const char *sec_name, *text_name;
+ char *name, *p, c;
+ symbolS *sym;
if (unwind.saved_text_seg)
{
@@ -3820,6 +3917,8 @@ dot_endp (dummy)
.text .IA_64.unwind
.text.foo .IA_64.unwind.text.foo
.foo .IA_64.unwind.foo
+ .gnu.linkonce.t.foo
+ .gnu.linkonce.ia64unw.foo
_info .IA_64.unwind_info gas issues error message (ditto)
_infoFOO .IA_64.unwind_infoFOO gas issues error message (ditto)
@@ -3851,9 +3950,6 @@ dot_endp (dummy)
if (strcmp (text_name, ".text") == 0)
text_name = "";
- expression (&e);
- demand_empty_rest_of_line ();
-
insn_group_break (1, 0, 0);
/* If there wasn't a .handlerdata, we haven't generated an image yet. */
@@ -3870,11 +3966,14 @@ dot_endp (dummy)
bfd_set_section_flags (stdoutput, now_seg,
SEC_LOAD | SEC_ALLOC | SEC_READONLY);
- /* Make sure the section has 8 byte alignment. */
- record_alignment (now_seg, 3);
+ /* Make sure that section has 4 byte alignment for ILP32 and
+ 8 byte alignment for LP64. */
+ record_alignment (now_seg, md.pointer_size_shift);
- ptr = frag_more (24);
- where = frag_now_fix () - 24;
+ /* Need space for 3 pointers for procedure start, procedure end,
+ and unwind info. */
+ ptr = frag_more (3 * md.pointer_size);
+ where = frag_now_fix () - (3 * md.pointer_size);
bytes_per_address = bfd_arch_bits_per_address (stdoutput) / 8;
/* Issue the values of a) Proc Begin, b) Proc End, c) Unwind Record. */
@@ -3906,6 +4005,50 @@ dot_endp (dummy)
}
subseg_set (saved_seg, saved_subseg);
+
+ /* Parse names of main and alternate entry points and set symbol sizes. */
+ while (1)
+ {
+ SKIP_WHITESPACE ();
+ name = input_line_pointer;
+ c = get_symbol_end ();
+ p = input_line_pointer;
+ sym = symbol_find (name);
+ if (sym && unwind.proc_start
+ && (symbol_get_bfdsym (sym)->flags & BSF_FUNCTION)
+ && S_GET_SIZE (sym) == 0 && symbol_get_obj (sym)->size == NULL)
+ {
+ fragS *fr = symbol_get_frag (unwind.proc_start);
+ fragS *frag = symbol_get_frag (sym);
+
+ /* Check whether the function label is at or beyond last
+ .proc directive. */
+ while (fr && fr != frag)
+ fr = fr->fr_next;
+ if (fr)
+ {
+ if (frag == frag_now && SEG_NORMAL (now_seg))
+ S_SET_SIZE (sym, frag_now_fix () - S_GET_VALUE (sym));
+ else
+ {
+ 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 (FAKE_LABEL_NAME, 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;
+ }
+ }
+ }
+ *p = c;
+ SKIP_WHITESPACE ();
+ if (*input_line_pointer != ',')
+ break;
+ ++input_line_pointer;
+ }
+ demand_empty_rest_of_line ();
unwind.proc_start = unwind.proc_end = unwind.info = 0;
}
@@ -4406,7 +4549,7 @@ dot_pred_rel (type)
valueT bit = 1;
int regno;
- if (toupper (*input_line_pointer) != 'P'
+ if (TOUPPER (*input_line_pointer) != 'P'
|| (regno = atoi (++input_line_pointer)) < 0
|| regno > 63)
{
@@ -4414,7 +4557,7 @@ dot_pred_rel (type)
ignore_rest_of_line ();
return;
}
- while (isdigit (*input_line_pointer))
+ while (ISDIGIT (*input_line_pointer))
++input_line_pointer;
if (p1 == -1)
p1 = regno;
@@ -4431,7 +4574,7 @@ dot_pred_rel (type)
valueT stop = 1;
++input_line_pointer;
- if (toupper (*input_line_pointer) != 'P'
+ if (TOUPPER (*input_line_pointer) != 'P'
|| (regno = atoi (++input_line_pointer)) < 0
|| regno > 63)
{
@@ -4439,7 +4582,7 @@ dot_pred_rel (type)
ignore_rest_of_line ();
return;
}
- while (isdigit (*input_line_pointer))
+ while (ISDIGIT (*input_line_pointer))
++input_line_pointer;
stop <<= regno;
if (bit >= stop)
@@ -4582,6 +4725,8 @@ const pseudo_typeS md_pseudo_table[] =
{ "comment", dot_special_section, SPECIAL_SECTION_COMMENT },
{ "ia_64.unwind", dot_special_section, SPECIAL_SECTION_UNWIND },
{ "ia_64.unwind_info", dot_special_section, SPECIAL_SECTION_UNWIND_INFO },
+ { "init_array", dot_special_section, SPECIAL_SECTION_INIT_ARRAY },
+ { "fini_array", dot_special_section, SPECIAL_SECTION_FINI_ARRAY },
{ "proc", dot_proc, 0 },
{ "body", dot_body, 0 },
{ "prologue", dot_prologue, 0 },
@@ -4677,6 +4822,15 @@ const pseudo_typeS md_pseudo_table[] =
{ "explicit", dot_dv_mode, 'e' },
{ "default", dot_dv_mode, 'd' },
+ /* ??? These are needed to make gas/testsuite/gas/elf/ehopt.s work.
+ IA-64 aligns data allocation pseudo-ops by default, so we have to
+ tell it that these ones are supposed to be unaligned. Long term,
+ should rewrite so that only IA-64 specific data allocation pseudo-ops
+ are aligned by default. */
+ {"2byte", stmt_cons_ua, 2},
+ {"4byte", stmt_cons_ua, 4},
+ {"8byte", stmt_cons_ua, 8},
+
{ NULL, 0, 0 }
};
@@ -4693,6 +4847,7 @@ pseudo_opcode[] =
{ "data2", cons, 2 },
{ "data4", cons, 4 },
{ "data8", cons, 8 },
+ { "data16", cons, 16 },
{ "real4", stmt_float_cons, 'f' },
{ "real8", stmt_float_cons, 'd' },
{ "real10", stmt_float_cons, 'x' },
@@ -4703,6 +4858,7 @@ pseudo_opcode[] =
{ "data2.ua", stmt_cons_ua, 2 },
{ "data4.ua", stmt_cons_ua, 4 },
{ "data8.ua", stmt_cons_ua, 8 },
+ { "data16.ua", stmt_cons_ua, 16 },
{ "real4.ua", float_cons, 'f' },
{ "real8.ua", float_cons, 'd' },
{ "real10.ua", float_cons, 'x' },
@@ -5256,7 +5412,10 @@ operand_match (idesc, index, e)
case O_symbol:
fix = CURR_SLOT.fixup + CURR_SLOT.num_fixups;
- fix->code = ia64_gen_real_reloc_type (e->X_op_symbol, 0);
+ /* There are no external relocs for TAG13/TAG13b fields, so we
+ create a dummy reloc. This will not live past md_apply_fix3. */
+ fix->code = BFD_RELOC_UNUSED;
+ fix->code = ia64_gen_real_reloc_type (e->X_op_symbol, fix->code);
fix->opnd = idesc->operands[index];
fix->expr = *e;
fix->is_pcrel = 1;
@@ -6058,6 +6217,7 @@ md_parse_option (c, arg)
int c;
char *arg;
{
+
switch (c)
{
/* Switches from the Intel assembler. */
@@ -6184,6 +6344,13 @@ IA-64 options:\n\
stream);
}
+void
+ia64_after_parse_args ()
+{
+ if (debug_type == DEBUG_STABS)
+ as_fatal (_("--gstabs is not supported for ia64"));
+}
+
/* Return true if TYPE fits in TEMPL at SLOT. */
static int
@@ -6274,6 +6441,10 @@ md_begin ()
symbol_new (".<ltoff.fptr>", undefined_section, FUNC_LT_FPTR_RELATIVE,
&zero_address_frag);
+ pseudo_func[FUNC_IPLT_RELOC].u.sym =
+ symbol_new (".<iplt>", undefined_section, FUNC_IPLT_RELOC,
+ &zero_address_frag);
+
/* Compute the table of best templates. We compute goodness as a
base 4 value, in which each match counts for 3, each F counts
for 2, each B counts for 1. This should maximize the number of
@@ -6446,6 +6617,19 @@ md_begin ()
if (! ok)
as_warn (_("Could not set architecture and machine"));
+ /* Set the pointer size and pointer shift size depending on md.flags */
+
+ if (md.flags & EF_IA_64_ABI64)
+ {
+ md.pointer_size = 8; /* pointers are 8 bytes */
+ md.pointer_size_shift = 3; /* alignment is 8 bytes = 2^2 */
+ }
+ else
+ {
+ md.pointer_size = 4; /* pointers are 4 bytes */
+ md.pointer_size_shift = 2; /* alignment is 4 bytes = 2^2 */
+ }
+
md.mem_offset.hint = 0;
md.path = 0;
md.maxpaths = 0;
@@ -6462,9 +6646,7 @@ ia64_init (argc, argv)
int argc ATTRIBUTE_UNUSED;
char **argv ATTRIBUTE_UNUSED;
{
- md.flags = EF_IA_64_ABI64;
- if (TARGET_BYTES_BIG_ENDIAN)
- md.flags |= EF_IA_64_BE;
+ md.flags = MD_FLAGS_DEFAULT;
}
/* Return a string for the target object file format. */
@@ -6477,16 +6659,36 @@ ia64_target_format ()
if (md.flags & EF_IA_64_BE)
{
if (md.flags & EF_IA_64_ABI64)
+#if defined(TE_AIX50)
+ return "elf64-ia64-aix-big";
+#elif defined(TE_HPUX)
+ return "elf64-ia64-hpux-big";
+#else
return "elf64-ia64-big";
+#endif
else
+#if defined(TE_AIX50)
+ return "elf32-ia64-aix-big";
+#elif defined(TE_HPUX)
+ return "elf32-ia64-hpux-big";
+#else
return "elf32-ia64-big";
+#endif
}
else
{
if (md.flags & EF_IA_64_ABI64)
+#ifdef TE_AIX50
+ return "elf64-ia64-aix-little";
+#else
return "elf64-ia64-little";
+#endif
else
+#ifdef TE_AIX50
+ return "elf32-ia64-aix-little";
+#else
return "elf32-ia64-little";
+#endif
}
}
else
@@ -6621,10 +6823,10 @@ ia64_unrecognized_line (ch)
c = get_symbol_end ();
}
else if (LOCAL_LABELS_FB
- && isdigit ((unsigned char) *input_line_pointer))
+ && ISDIGIT (*input_line_pointer))
{
temp = 0;
- while (isdigit ((unsigned char) *input_line_pointer))
+ while (ISDIGIT (*input_line_pointer))
temp = (temp * 10) + *input_line_pointer++ - '0';
fb_label_instance_inc (temp);
s = fb_label_name (temp, 0);
@@ -6797,7 +6999,7 @@ ia64_parse_name (name, e)
switch (name[0])
{
case 'i':
- if (name[1] == 'n' && isdigit (name[2]))
+ if (name[1] == 'n' && ISDIGIT (name[2]))
{
dr = &md.in;
name += 2;
@@ -6805,7 +7007,7 @@ ia64_parse_name (name, e)
break;
case 'l':
- if (name[1] == 'o' && name[2] == 'c' && isdigit (name[3]))
+ if (name[1] == 'o' && name[2] == 'c' && ISDIGIT (name[3]))
{
dr = &md.loc;
name += 3;
@@ -6813,7 +7015,7 @@ ia64_parse_name (name, e)
break;
case 'o':
- if (name[1] == 'u' && name[2] == 't' && isdigit (name[3]))
+ if (name[1] == 'u' && name[2] == 't' && ISDIGIT (name[3]))
{
dr = &md.out;
name += 3;
@@ -6870,19 +7072,29 @@ ia64_canonicalize_symbol_name (name)
return name;
}
-/* Return true if idesc is a conditional branch instruction. */
+/* Return true if idesc is a conditional branch instruction. This excludes
+ the modulo scheduled branches, and br.ia. Mod-sched branches are excluded
+ because they always read/write resources regardless of the value of the
+ qualifying predicate. br.ia must always use p0, and hence is always
+ taken. Thus this function returns true for branches which can fall
+ through, and which use no resources if they do fall through. */
static int
is_conditional_branch (idesc)
struct ia64_opcode *idesc;
{
/* br is a conditional branch. Everything that starts with br. except
- br.ia is a conditional branch. Everything that starts with brl is a
- conditional branch. */
+ br.ia, br.c{loop,top,exit}, and br.w{top,exit} is a conditional branch.
+ Everything that starts with brl is a conditional branch. */
return (idesc->name[0] == 'b' && idesc->name[1] == 'r'
&& (idesc->name[2] == '\0'
- || (idesc->name[2] == '.' && idesc->name[3] != 'i')
- || idesc->name[2] == 'l'));
+ || (idesc->name[2] == '.' && idesc->name[3] != 'i'
+ && idesc->name[3] != 'c' && idesc->name[3] != 'w')
+ || idesc->name[2] == 'l'
+ /* br.cond, br.call, br.clr */
+ || (idesc->name[2] == '.' && idesc->name[3] == 'c'
+ && (idesc->name[4] == 'a' || idesc->name[4] == 'o'
+ || (idesc->name[4] == 'l' && idesc->name[5] == 'r')))));
}
/* Return whether the given opcode is a taken branch. If there's any doubt,
@@ -7616,8 +7828,8 @@ dep->name, idesc->name, (rsrc_write?"write":"read"), note)
{
int p1 = CURR_SLOT.opnd[0].X_add_number - REG_P;
int p2 = CURR_SLOT.opnd[1].X_add_number - REG_P;
- int or_andcm = strstr(idesc->name, "or.andcm") != NULL;
- int and_orcm = strstr(idesc->name, "and.orcm") != NULL;
+ int or_andcm = strstr (idesc->name, "or.andcm") != NULL;
+ int and_orcm = strstr (idesc->name, "and.orcm") != NULL;
if ((idesc->operands[0] == IA64_OPND_P1
|| idesc->operands[0] == IA64_OPND_P2)
@@ -7738,8 +7950,8 @@ dep->name, idesc->name, (rsrc_write?"write":"read"), note)
{
int p1 = CURR_SLOT.opnd[0].X_add_number - REG_P;
int p2 = CURR_SLOT.opnd[1].X_add_number - REG_P;
- int or_andcm = strstr(idesc->name, "or.andcm") != NULL;
- int and_orcm = strstr(idesc->name, "and.orcm") != NULL;
+ int or_andcm = strstr (idesc->name, "or.andcm") != NULL;
+ int and_orcm = strstr (idesc->name, "and.orcm") != NULL;
if ((idesc->operands[0] == IA64_OPND_P1
|| idesc->operands[0] == IA64_OPND_P2)
@@ -8201,8 +8413,8 @@ dep->name, idesc->name, (rsrc_write?"write":"read"), note)
{
int p1 = CURR_SLOT.opnd[0].X_add_number - REG_P;
int p2 = CURR_SLOT.opnd[1].X_add_number - REG_P;
- int or_andcm = strstr(idesc->name, "or.andcm") != NULL;
- int and_orcm = strstr(idesc->name, "and.orcm") != NULL;
+ int or_andcm = strstr (idesc->name, "or.andcm") != NULL;
+ int and_orcm = strstr (idesc->name, "and.orcm") != NULL;
if (p1 == 63
&& (idesc->operands[0] == IA64_OPND_P1
@@ -8453,6 +8665,19 @@ add_qp_mutex (mask)
qp_mutexes[qp_mutexeslen++].prmask = mask;
}
+static int
+has_suffix_p (name, suffix)
+ const char *name;
+ const char *suffix;
+{
+ size_t namelen = strlen (name);
+ size_t sufflen = strlen (suffix);
+
+ if (namelen <= sufflen)
+ return 0;
+ return strcmp (name + namelen - sufflen, suffix) == 0;
+}
+
static void
clear_register_values ()
{
@@ -8570,21 +8795,19 @@ note_register_values (idesc)
}
/* In general, clear mutexes and implies which include P1 or P2,
with the following exceptions. */
- else if (strstr (idesc->name, ".or.andcm") != NULL)
+ else if (has_suffix_p (idesc->name, ".or.andcm")
+ || has_suffix_p (idesc->name, ".and.orcm"))
{
add_qp_mutex (p1mask | p2mask);
clear_qp_implies (p2mask, p1mask);
}
- else if (strstr (idesc->name, ".and.orcm") != NULL)
- {
- add_qp_mutex (p1mask | p2mask);
- clear_qp_implies (p1mask, p2mask);
- }
- else if (strstr (idesc->name, ".and") != NULL)
+ else if (has_suffix_p (idesc->name, ".andcm")
+ || has_suffix_p (idesc->name, ".and"))
{
clear_qp_implies (0, p1mask | p2mask);
}
- else if (strstr (idesc->name, ".or") != NULL)
+ else if (has_suffix_p (idesc->name, ".orcm")
+ || has_suffix_p (idesc->name, ".or"))
{
clear_qp_mutex (p1mask | p2mask);
clear_qp_implies (p1mask | p2mask, 0);
@@ -8592,7 +8815,7 @@ note_register_values (idesc)
else
{
clear_qp_implies (p1mask | p2mask, p1mask | p2mask);
- if (strstr (idesc->name, ".unc") != NULL)
+ if (has_suffix_p (idesc->name, ".unc"))
{
add_qp_mutex (p1mask | p2mask);
if (CURR_SLOT.qp_regno != 0)
@@ -9680,6 +9903,21 @@ ia64_cons_fix_new (f, where, nbytes, exp)
code = BFD_RELOC_IA64_DIR64LSB;
break;
+ case 16:
+ if (exp->X_op == O_pseudo_fixup
+ && exp->X_op_symbol
+ && S_GET_VALUE (exp->X_op_symbol) == FUNC_IPLT_RELOC)
+ {
+ if (target_big_endian)
+ code = BFD_RELOC_IA64_IPLTMSB;
+ else
+ code = BFD_RELOC_IA64_IPLTLSB;
+
+ exp->X_op = O_symbol;
+ break;
+ }
+ /* FALLTHRU */
+
default:
as_bad ("Unsupported fixup size %d", nbytes);
ignore_rest_of_line ();
@@ -9691,10 +9929,11 @@ ia64_cons_fix_new (f, where, nbytes, exp)
exp->X_op = O_symbol;
code = ia64_gen_real_reloc_type (exp->X_op_symbol, code);
}
+
fix = fix_new_exp (f, where, nbytes, exp, 0, code);
/* We need to store the byte order in effect in case we're going
to fix an 8 or 16 bit relocation (for which there no real
- relocs available). See md_apply_fix(). */
+ relocs available). See md_apply_fix3(). */
fix->tc_fix_data.bigendian = target_big_endian;
}
@@ -9818,6 +10057,10 @@ ia64_gen_real_reloc_type (sym, r_type)
break;
}
break;
+
+ case FUNC_IPLT_RELOC:
+ break;
+
default:
abort ();
}
@@ -9916,14 +10159,15 @@ fix_insn (fix, odesc, value)
If fixp->fx_addsy is non-NULL, we'll have to generate a reloc entry
(if possible). */
-int
-md_apply_fix3 (fix, valuep, seg)
+
+void
+md_apply_fix3 (fix, valP, seg)
fixS *fix;
- valueT *valuep;
+ valueT * valP;
segT seg ATTRIBUTE_UNUSED;
{
char *fixpos;
- valueT value = *valuep;
+ valueT value = * valP;
int adjust = 0;
fixpos = fix->fx_frag->fr_literal + fix->fx_where;
@@ -9958,16 +10202,15 @@ md_apply_fix3 (fix, valuep, seg)
}
if (fix->fx_addsy)
{
- switch (fix->fx_r_type)
+ if (fix->fx_r_type == (int) BFD_RELOC_UNUSED)
{
- case 0:
+ /* This must be a TAG13 or TAG13b operand. There are no external
+ relocs defined for them, so we must give an error. */
as_bad_where (fix->fx_file, fix->fx_line,
"%s must have a constant value",
elf64_ia64_operands[fix->tc_fix_data.opnd].desc);
- break;
-
- default:
- break;
+ fix->fx_done = 1;
+ return;
}
/* ??? This is a hack copied from tc-i386.c to make PCREL relocs
@@ -9982,15 +10225,12 @@ md_apply_fix3 (fix, valuep, seg)
else
number_to_chars_littleendian (fixpos, value, fix->fx_size);
fix->fx_done = 1;
- return 1;
}
else
{
fix_insn (fix, elf64_ia64_operands + fix->tc_fix_data.opnd, value);
fix->fx_done = 1;
- return 1;
}
- return 1;
}
/* Generate the BFD reloc to be stuck in the object file from the
diff --git a/contrib/binutils/gas/config/tc-ia64.h b/contrib/binutils/gas/config/tc-ia64.h
index 12ae411..53dab86 100644
--- a/contrib/binutils/gas/config/tc-ia64.h
+++ b/contrib/binutils/gas/config/tc-ia64.h
@@ -1,5 +1,5 @@
/* tc-ia64.h -- Header file for tc-ia64.c.
- Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>
This file is part of GAS, the GNU Assembler.
@@ -28,9 +28,11 @@
#ifdef TE_HPUX
#define md_number_to_chars number_to_chars_bigendian
#define TARGET_BYTES_BIG_ENDIAN 1
+#define MD_FLAGS_DEFAULT EF_IA_64_BE
#else
#define md_number_to_chars number_to_chars_littleendian
#define TARGET_BYTES_BIG_ENDIAN 0
+#define MD_FLAGS_DEFAULT EF_IA_64_ABI64
#endif /* TE_HPUX */
/* We need to set the default object file format in ia64_init and not in
@@ -46,7 +48,6 @@ extern const char *ia64_target_format PARAMS ((void));
#define TARGET_ARCH bfd_arch_ia64
#define DOUBLESLASH_LINE_COMMENTS /* allow //-style comments */
-#define TC_HANDLES_FX_DONE
#define NEED_LITERAL_POOL /* need gp literal pool */
#define RELOC_REQUIRES_SYMBOL
@@ -81,29 +82,32 @@ extern void ia64_cons_fix_new PARAMS ((fragS *f, int where, int nbytes,
expressionS *exp));
extern void ia64_validate_fix PARAMS ((struct fix *fix));
extern char * ia64_canonicalize_symbol_name PARAMS ((char *));
+extern int ia64_elf_section_letter PARAMS ((int, char **));
extern flagword ia64_elf_section_flags PARAMS ((flagword, int, int));
extern int ia64_elf_section_type PARAMS ((const char *, size_t len));
extern long ia64_pcrel_from_section PARAMS ((struct fix *fix, segT sec));
extern void ia64_md_do_align PARAMS ((int, const char *, int, int));
extern void ia64_handle_align PARAMS ((fragS *f));
+extern void ia64_after_parse_args PARAMS ((void));
#define md_end() ia64_end_of_source ()
#define md_start_line_hook() ia64_start_line ()
#define tc_unrecognized_line(ch) ia64_unrecognized_line (ch)
#define tc_frob_label(s) ia64_frob_label (s)
#define md_flush_pending_output() ia64_flush_pending_output ()
-#define md_parse_name(s,e) ia64_parse_name (s, e)
+#define md_parse_name(s,e,c) ia64_parse_name (s, e)
#define tc_canonicalize_symbol_name(s) ia64_canonicalize_symbol_name (s)
#define md_optimize_expr(l,o,r) ia64_optimize_expr (l, o, r)
#define md_cons_align(n) ia64_cons_align (n)
#define TC_FORCE_RELOCATION(f) ia64_force_relocation (f)
#define tc_fix_adjustable(f) ia64_fix_adjustable (f)
#define md_convert_frag(b,s,f) as_fatal ("ia64_convert_frag")
-#define md_create_long_jump(p,f,t,fr,s) as_fatal("ia64_create_long_jump")
+#define md_create_long_jump(p,f,t,fr,s) as_fatal ("ia64_create_long_jump")
#define md_create_short_jump(p,f,t,fr,s) \
- as_fatal("ia64_create_short_jump")
+ as_fatal ("ia64_create_short_jump")
#define md_estimate_size_before_relax(f,s) \
(as_fatal ("ia64_estimate_size_before_relax"), 1)
+#define md_elf_section_letter ia64_elf_section_letter
#define md_elf_section_flags ia64_elf_section_flags
#define TC_FIX_TYPE struct ia64_fix
#define TC_INIT_FIX_DATA(f) { f->tc_fix_data.opnd = 0; }
@@ -113,15 +117,15 @@ extern void ia64_handle_align PARAMS ((fragS *f));
#define md_do_align(n,f,l,m,j) ia64_md_do_align (n,f,l,m)
#define HANDLE_ALIGN(f) ia64_handle_align (f)
#define md_elf_section_type(str,len) ia64_elf_section_type (str, len)
+#define md_after_parse_args() ia64_after_parse_args ()
#define MAX_MEM_FOR_RS_ALIGN_CODE (15 + 16)
-/* Call md_apply_fix3 with segment instead of md_apply_fix. */
-#define MD_APPLY_FIX3
-
#define WORKING_DOT_WORD /* don't do broken word processing for now */
#define ELF_TC_SPECIAL_SECTIONS \
+{ ".init_array",SHT_INIT_ARRAY, SHF_ALLOC + SHF_WRITE }, \
+{ ".fini_array",SHT_FINI_ARRAY, SHF_ALLOC + SHF_WRITE }, \
{ ".sbss", SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_IA_64_SHORT }, \
{ ".sdata", SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_IA_64_SHORT },
@@ -252,9 +256,12 @@ typedef struct unwind_record
True if we are willing to perform this relocation while building
the .o file. This is only used for pcrel relocations. */
+/* If the reloc type is BFD_RELOC_UNUSED, then this is for a TAG13/TAG13b field
+ which has no external reloc, so we must resolve the value now. */
+
#define TC_RELOC_RTSYM_LOC_FIXUP(FIX) \
((FIX)->fx_addsy == NULL \
- || (FIX)->fx_r_type == 0 \
+ || (FIX)->fx_r_type == BFD_RELOC_UNUSED \
|| (! S_IS_EXTERNAL ((FIX)->fx_addsy) \
&& ! S_IS_WEAK ((FIX)->fx_addsy) \
&& S_IS_DEFINED ((FIX)->fx_addsy) \
diff --git a/contrib/binutils/gas/config/tc-ppc.c b/contrib/binutils/gas/config/tc-ppc.c
index ef70871..8bf09db 100644
--- a/contrib/binutils/gas/config/tc-ppc.c
+++ b/contrib/binutils/gas/config/tc-ppc.c
@@ -21,8 +21,8 @@
02111-1307, USA. */
#include <stdio.h>
-#include <ctype.h>
#include "as.h"
+#include "safe-ctype.h"
#include "subsegs.h"
#include "opcode/ppc.h"
@@ -53,6 +53,36 @@ static int set_target_endian = 0;
#endif
#endif
+/* Macros for calculating LO, HI, HA, HIGHER, HIGHERA, HIGHEST,
+ HIGHESTA. */
+
+/* #lo(value) denotes the least significant 16 bits of the indicated. */
+#define PPC_LO(v) ((v) & 0xffff)
+
+/* #hi(value) denotes bits 16 through 31 of the indicated value. */
+#define PPC_HI(v) (((v) >> 16) & 0xffff)
+
+/* #ha(value) denotes the high adjusted value: bits 16 through 31 of
+ the indicated value, compensating for #lo() being treated as a
+ signed number. */
+#define PPC_HA(v) PPC_HI ((v) + 0x8000)
+
+/* #higher(value) denotes bits 32 through 47 of the indicated value. */
+#define PPC_HIGHER(v) (((v) >> 32) & 0xffff)
+
+/* #highera(value) denotes bits 32 through 47 of the indicated value,
+ compensating for #lo() being treated as a signed number. */
+#define PPC_HIGHERA(v) PPC_HIGHER ((v) + 0x8000)
+
+/* #highest(value) denotes bits 48 through 63 of the indicated value. */
+#define PPC_HIGHEST(v) (((v) >> 48) & 0xffff)
+
+/* #highesta(value) denotes bits 48 through 63 of the indicated value,
+ compensating for #lo being treated as a signed number. */
+#define PPC_HIGHESTA(v) PPC_HIGHEST ((v) + 0x8000)
+
+#define SEX16(val) ((((val) & 0xffff) ^ 0x8000) - 0x8000)
+
static boolean reg_names_p = TARGET_REG_NAMES_P;
static boolean register_name PARAMS ((expressionS *));
@@ -62,8 +92,12 @@ static unsigned long ppc_insert_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));
+
+#if defined (OBJ_XCOFF) || defined (OBJ_ELF)
static int ppc_is_toc_sym PARAMS ((symbolS *sym));
static void ppc_tc PARAMS ((int));
+static void ppc_machine PARAMS ((int));
+#endif
#ifdef OBJ_XCOFF
static void ppc_comm PARAMS ((int));
@@ -87,7 +121,6 @@ static void ppc_stabx PARAMS ((int));
static void ppc_rename PARAMS ((int));
static void ppc_toc PARAMS ((int));
static void ppc_xcoff_cons PARAMS ((int));
-static void ppc_machine PARAMS ((int));
static void ppc_vbyte PARAMS ((int));
#endif
@@ -188,10 +221,11 @@ const pseudo_typeS md_pseudo_table[] =
{ "word", ppc_xcoff_cons, 1 },
{ "short", ppc_xcoff_cons, 1 },
{ "vbyte", ppc_vbyte, 0 },
- { "machine", ppc_machine, 0 },
#endif
#ifdef OBJ_ELF
+ { "llong", ppc_elf_cons, 8 },
+ { "quad", ppc_elf_cons, 8 },
{ "long", ppc_elf_cons, 4 },
{ "word", ppc_elf_cons, 2 },
{ "short", ppc_elf_cons, 2 },
@@ -203,7 +237,7 @@ const pseudo_typeS md_pseudo_table[] =
#endif
#ifdef TE_PE
- /* Pseudo-ops specific to the Windows NT PowerPC PE (coff) format */
+ /* Pseudo-ops specific to the Windows NT PowerPC PE (coff) format. */
{ "previous", ppc_previous, 0 },
{ "pdata", ppc_pdata, 0 },
{ "ydata", ppc_ydata, 0 },
@@ -218,16 +252,18 @@ const pseudo_typeS md_pseudo_table[] =
{ "tocd", ppc_pe_tocd, 0 },
#endif
- /* This pseudo-op is used even when not generating XCOFF output. */
+#if defined (OBJ_XCOFF) || defined (OBJ_ELF)
{ "tc", ppc_tc, 0 },
+ { "machine", ppc_machine, 0 },
+#endif
{ 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. */
+/* 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
@@ -555,7 +591,7 @@ reg_name_search (regs, regcount, name)
}
/*
- * Summary of register_name().
+ * Summary of register_name.
*
* in: Input_line_pointer points to 1st char of operand.
*
@@ -575,36 +611,35 @@ register_name (expressionP)
char *start;
char c;
- /* Find the spelling of the operand */
+ /* Find the spelling of the operand. */
start = name = input_line_pointer;
- if (name[0] == '%' && isalpha (name[1]))
+ if (name[0] == '%' && ISALPHA (name[1]))
name = ++input_line_pointer;
- else if (!reg_names_p || !isalpha (name[0]))
+ 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 */
+ /* Put back the delimiting char. */
+ *input_line_pointer = c;
+
+ /* Look to see if it's in the register table. */
if (reg_number >= 0)
{
expressionP->X_op = O_register;
expressionP->X_add_number = reg_number;
- /* make the rest nice */
+ /* Make the rest nice. */
expressionP->X_add_symbol = NULL;
expressionP->X_op_symbol = NULL;
- *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;
- }
+
+ /* Reset the line as if we had not done anything. */
+ input_line_pointer = start;
+ return false;
}
/* This function is called for each symbol seen in an expression. It
@@ -664,9 +699,11 @@ 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;
+static unsigned long ppc_size = (BFD_DEFAULT_TARGET_SIZE == 64
+ ? PPC_OPCODE_64
+ : PPC_OPCODE_32);
-/* Whether to target xcoff64 */
+/* Whether to target xcoff64. */
static int ppc_xcoff64 = 0;
/* Opcode hash table. */
@@ -676,10 +713,10 @@ static struct hash_control *ppc_hash;
static struct hash_control *ppc_macro_hash;
#ifdef OBJ_ELF
-/* What type of shared library support to use */
+/* What type of shared library support to use. */
static enum { SHLIB_NONE, SHLIB_PIC, SHLIB_MRELOCATABLE } shlib = SHLIB_NONE;
-/* Flags to set in the elf header */
+/* Flags to set in the elf header. */
static flagword ppc_flags = 0;
/* Whether this is Solaris or not. */
@@ -759,14 +796,14 @@ symbolS *GOT_symbol; /* Pre-defined "_GLOBAL_OFFSET_TABLE" */
#endif /* OBJ_ELF */
#ifdef OBJ_ELF
-CONST char *md_shortopts = "b:l:usm:K:VQ:";
+const char *const md_shortopts = "b:l:usm:K:VQ:";
#else
-CONST char *md_shortopts = "um:";
+const char *const md_shortopts = "um:";
#endif
-struct option md_longopts[] = {
+const struct option md_longopts[] = {
{NULL, no_argument, NULL, 0}
};
-size_t md_longopts_size = sizeof (md_longopts);
+const size_t md_longopts_size = sizeof (md_longopts);
int
md_parse_option (c, arg)
@@ -783,7 +820,7 @@ md_parse_option (c, arg)
#ifdef OBJ_ELF
case 'l':
/* Solaris as takes -le (presumably for little endian). For completeness
- sake, recognize -be also. */
+ sake, recognize -be also. */
if (strcmp (arg, "e") == 0)
{
target_big_endian = 0;
@@ -806,7 +843,7 @@ md_parse_option (c, arg)
break;
case 'K':
- /* Recognize -K PIC */
+ /* Recognize -K PIC. */
if (strcmp (arg, "PIC") == 0 || strcmp (arg, "pic") == 0)
{
shlib = SHLIB_PIC;
@@ -829,38 +866,63 @@ md_parse_option (c, arg)
break;
case 'm':
+ /* Most CPU's are 32 bit. Exceptions are listed below. */
+ ppc_size = PPC_OPCODE_32;
+
/* -mpwrx and -mpwr2 mean to assemble for the IBM POWER/2
- (RIOS2). */
+ (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. */
+ 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. */
+ Motorola PowerPC 603/604. */
else if (strcmp (arg, "ppc") == 0
|| strcmp (arg, "ppc32") == 0
- || strcmp (arg, "403") == 0
- || strcmp (arg, "405") == 0
|| strcmp (arg, "603") == 0
|| strcmp (arg, "604") == 0)
ppc_cpu = PPC_OPCODE_PPC;
- else if (strcmp (arg, "7400") == 0)
- ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_ALTIVEC;
+ /* -m403 and -m405 mean to assemble for the Motorola PowerPC 403/405. */
+ else if (strcmp (arg, "403") == 0
+ || strcmp (arg, "405") == 0)
+ ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_403;
+ else if (strcmp (arg, "7400") == 0
+ || strcmp (arg, "7410") == 0
+ || strcmp (arg, "7450") == 0
+ || strcmp (arg, "7455") == 0)
+ ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_ALTIVEC;
+ else if (strcmp (arg, "altivec") == 0)
+ {
+ if (ppc_cpu == 0)
+ ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_ALTIVEC;
+ else
+ ppc_cpu |= PPC_OPCODE_ALTIVEC;
+ }
/* -mppc64 and -m620 mean to assemble for the 64-bit PowerPC
- 620. */
+ 620. */
else if (strcmp (arg, "ppc64") == 0 || strcmp (arg, "620") == 0)
{
- ppc_cpu = PPC_OPCODE_PPC;
+ ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_64;
ppc_size = PPC_OPCODE_64;
}
else if (strcmp (arg, "ppc64bridge") == 0)
{
- ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_64_BRIDGE;
+ ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_64_BRIDGE | PPC_OPCODE_64;
+ ppc_size = PPC_OPCODE_64;
+ }
+ /* -mbooke/-mbooke32 mean enable 32-bit BookE support. */
+ else if (strcmp (arg, "booke") == 0 || strcmp (arg, "booke32") == 0)
+ ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_BOOKE;
+ /* -mbooke64 means enable 64-bit BookE support. */
+ else if (strcmp (arg, "booke64") == 0)
+ {
+ ppc_cpu = PPC_OPCODE_PPC | PPC_OPCODE_BOOKE |
+ PPC_OPCODE_BOOKE64 | PPC_OPCODE_64;
ppc_size = PPC_OPCODE_64;
}
/* -mcom means assemble for the common intersection between Power
@@ -879,7 +941,8 @@ md_parse_option (c, arg)
reg_names_p = false;
#ifdef OBJ_ELF
- /* -mrelocatable/-mrelocatable-lib -- warn about initializations that require relocation */
+ /* -mrelocatable/-mrelocatable-lib -- warn about initializations
+ that require relocation. */
else if (strcmp (arg, "relocatable") == 0)
{
shlib = SHLIB_MRELOCATABLE;
@@ -892,12 +955,13 @@ md_parse_option (c, arg)
ppc_flags |= EF_PPC_RELOCATABLE_LIB;
}
- /* -memb, set embedded bit */
+ /* -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)
+ /* -mlittle/-mbig set the endianess. */
+ else if (strcmp (arg, "little") == 0
+ || strcmp (arg, "little-endian") == 0)
{
target_big_endian = 0;
set_target_endian = 1;
@@ -966,10 +1030,16 @@ PowerPC options:\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, -m405, -m603, -m604\n\
+-mppc, -mppc32, -m603, -m604\n\
generate code for Motorola PowerPC 603/604\n\
+-m403, -m405 generate code for Motorola PowerPC 403/405\n\
+-m7400, -m7410, -m7450, -m7455\n\
+ generate code For Motorola PowerPC 7400/7410/7450/7455\n\
-mppc64, -m620 generate code for Motorola PowerPC 620\n\
-mppc64bridge generate code for PowerPC 64, including bridge insns\n\
+-mbooke64 generate code for 64-bit PowerPC BookE\n\
+-mbooke, mbooke32 generate code for 32-bit PowerPC BookE\n\
+-maltivec generate code for AltiVec\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\
@@ -1006,11 +1076,11 @@ ppc_set_cpu ()
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)
+ else if (strncmp (default_cpu, "powerpc", 7) == 0)
ppc_cpu = PPC_OPCODE_PPC;
else
- as_fatal (_("Unknown default cpu = %s, os = %s"), default_cpu, default_os);
+ as_fatal (_("Unknown default cpu = %s, os = %s"),
+ default_cpu, default_os);
}
}
@@ -1030,8 +1100,7 @@ ppc_arch ()
{
if (strcmp (default_cpu, "rs6000") == 0)
return bfd_arch_rs6000;
- else if (strcmp (default_cpu, "powerpc") == 0
- || strcmp (default_cpu, "powerpcle") == 0)
+ else if (strncmp (default_cpu, "powerpc", 7) == 0)
return bfd_arch_powerpc;
}
@@ -1042,31 +1111,35 @@ ppc_arch ()
unsigned long
ppc_mach ()
{
- return (ppc_size == PPC_OPCODE_64) ? 620 : 0;
+ return ppc_size == PPC_OPCODE_64 ? 620 : 0;
}
+#ifdef OBJ_XCOFF
int
-ppc_subseg_align()
+ppc_subseg_align ()
{
- return (ppc_xcoff64) ? 3 : 2;
+ return ppc_xcoff64 ? 3 : 2;
}
+#endif
extern char*
-ppc_target_format()
+ppc_target_format ()
{
#ifdef OBJ_COFF
#ifdef TE_PE
- return (target_big_endian ? "pe-powerpc" : "pe-powerpcle");
+ return target_big_endian ? "pe-powerpc" : "pe-powerpcle";
#elif TE_POWERMAC
-#else
- return (ppc_xcoff64 ? "aixcoff64-rs6000" : "aixcoff-rs6000");
-#endif
-#ifdef TE_POWERMAC
return "xcoff-powermac";
+#else
+ return ppc_xcoff64 ? "aixcoff64-rs6000" : "aixcoff-rs6000";
#endif
#endif
#ifdef OBJ_ELF
- return (target_big_endian ? "elf32-powerpc" : "elf32-powerpcle");
+ boolean is64 = BFD_DEFAULT_TARGET_SIZE == 64 && ppc_size == PPC_OPCODE_64;
+
+ return (target_big_endian
+ ? (is64 ? "elf64-powerpc" : "elf32-powerpc")
+ : (is64 ? "elf64-powerpcle" : "elf32-powerpcle"));
#endif
}
@@ -1109,12 +1182,13 @@ md_begin ()
retval = hash_insert (ppc_hash, op->name, (PTR) op);
if (retval != (const char *) NULL)
{
- /* Ignore Power duplicates for -m601 */
+ /* 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);
+ as_bad (_("Internal assembler error for instruction %s"),
+ op->name);
dup_insn = true;
}
}
@@ -1142,7 +1216,8 @@ md_begin ()
if (dup_insn)
abort ();
- /* Tell the main code what the endianness is if it is not overidden by the user. */
+ /* Tell the main code what the endianness is if it is not overidden
+ by the user. */
if (!set_target_endian)
{
set_target_endian = 1;
@@ -1225,10 +1300,7 @@ ppc_insert_operand (insn, operand, val, file, line)
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);
+ as_bad_where (file, line, err, buf, min, max);
}
}
@@ -1237,9 +1309,9 @@ ppc_insert_operand (insn, operand, val, file, line)
const char *errmsg;
errmsg = NULL;
- insn = (*operand->insert) (insn, (long) val, &errmsg);
+ insn = (*operand->insert) (insn, (long) val, ppc_cpu | ppc_size, &errmsg);
if (errmsg != (const char *) NULL)
- as_bad (errmsg);
+ as_bad_where (file, line, errmsg);
}
else
insn |= (((long) val & ((1 << operand->bits) - 1))
@@ -1259,7 +1331,7 @@ ppc_elf_suffix (str_p, exp_p)
struct map_bfd {
char *string;
int length;
- bfd_reloc_code_real_type reloc;
+ int reloc;
};
char ident[20];
@@ -1267,55 +1339,65 @@ ppc_elf_suffix (str_p, exp_p)
char *str2;
int ch;
int len;
- struct map_bfd *ptr;
+ const 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 }
+ static const struct map_bfd mapping[] = {
+ MAP ("l", (int) BFD_RELOC_LO16),
+ MAP ("h", (int) BFD_RELOC_HI16),
+ MAP ("ha", (int) BFD_RELOC_HI16_S),
+ MAP ("brtaken", (int) BFD_RELOC_PPC_B16_BRTAKEN),
+ MAP ("brntaken", (int) BFD_RELOC_PPC_B16_BRNTAKEN),
+ MAP ("got", (int) BFD_RELOC_16_GOTOFF),
+ MAP ("got@l", (int) BFD_RELOC_LO16_GOTOFF),
+ MAP ("got@h", (int) BFD_RELOC_HI16_GOTOFF),
+ MAP ("got@ha", (int) BFD_RELOC_HI16_S_GOTOFF),
+ MAP ("fixup", (int) BFD_RELOC_CTOR), /* warning with -mrelocatable */
+ MAP ("plt", (int) BFD_RELOC_24_PLT_PCREL),
+ MAP ("pltrel24", (int) BFD_RELOC_24_PLT_PCREL),
+ MAP ("copy", (int) BFD_RELOC_PPC_COPY),
+ MAP ("globdat", (int) BFD_RELOC_PPC_GLOB_DAT),
+ MAP ("local24pc", (int) BFD_RELOC_PPC_LOCAL24PC),
+ MAP ("local", (int) BFD_RELOC_PPC_LOCAL24PC),
+ MAP ("pltrel", (int) BFD_RELOC_32_PLT_PCREL),
+ MAP ("plt@l", (int) BFD_RELOC_LO16_PLTOFF),
+ MAP ("plt@h", (int) BFD_RELOC_HI16_PLTOFF),
+ MAP ("plt@ha", (int) BFD_RELOC_HI16_S_PLTOFF),
+ MAP ("sdarel", (int) BFD_RELOC_GPREL16),
+ MAP ("sectoff", (int) BFD_RELOC_32_BASEREL),
+ MAP ("sectoff@l", (int) BFD_RELOC_LO16_BASEREL),
+ MAP ("sectoff@h", (int) BFD_RELOC_HI16_BASEREL),
+ MAP ("sectoff@ha", (int) BFD_RELOC_HI16_S_BASEREL),
+ MAP ("naddr", (int) BFD_RELOC_PPC_EMB_NADDR32),
+ MAP ("naddr16", (int) BFD_RELOC_PPC_EMB_NADDR16),
+ MAP ("naddr@l", (int) BFD_RELOC_PPC_EMB_NADDR16_LO),
+ MAP ("naddr@h", (int) BFD_RELOC_PPC_EMB_NADDR16_HI),
+ MAP ("naddr@ha", (int) BFD_RELOC_PPC_EMB_NADDR16_HA),
+ MAP ("sdai16", (int) BFD_RELOC_PPC_EMB_SDAI16),
+ MAP ("sda2rel", (int) BFD_RELOC_PPC_EMB_SDA2REL),
+ MAP ("sda2i16", (int) BFD_RELOC_PPC_EMB_SDA2I16),
+ MAP ("sda21", (int) BFD_RELOC_PPC_EMB_SDA21),
+ MAP ("mrkref", (int) BFD_RELOC_PPC_EMB_MRKREF),
+ MAP ("relsect", (int) BFD_RELOC_PPC_EMB_RELSEC16),
+ MAP ("relsect@l", (int) BFD_RELOC_PPC_EMB_RELST_LO),
+ MAP ("relsect@h", (int) BFD_RELOC_PPC_EMB_RELST_HI),
+ MAP ("relsect@ha", (int) BFD_RELOC_PPC_EMB_RELST_HA),
+ MAP ("bitfld", (int) BFD_RELOC_PPC_EMB_BIT_FLD),
+ MAP ("relsda", (int) BFD_RELOC_PPC_EMB_RELSDA),
+ MAP ("xgot", (int) BFD_RELOC_PPC_TOC16),
+#if BFD_DEFAULT_TARGET_SIZE == 64
+ MAP ("higher", - (int) BFD_RELOC_PPC64_HIGHER),
+ MAP ("highera", - (int) BFD_RELOC_PPC64_HIGHER_S),
+ MAP ("highest", - (int) BFD_RELOC_PPC64_HIGHEST),
+ MAP ("highesta", - (int) BFD_RELOC_PPC64_HIGHEST_S),
+ MAP ("tocbase", - (int) BFD_RELOC_PPC64_TOC),
+ MAP ("toc", - (int) BFD_RELOC_PPC_TOC16),
+ MAP ("toc@l", - (int) BFD_RELOC_PPC64_TOC16_LO),
+ MAP ("toc@h", - (int) BFD_RELOC_PPC64_TOC16_HI),
+ MAP ("toc@ha", - (int) BFD_RELOC_PPC64_TOC16_HA),
+#endif
+ { (char *) 0, 0, (int) BFD_RELOC_UNUSED }
};
if (*str++ != '@')
@@ -1323,10 +1405,10 @@ ppc_elf_suffix (str_p, exp_p)
for (ch = *str, str2 = ident;
(str2 < ident + sizeof (ident) - 1
- && (isalnum (ch) || ch == '@'));
+ && (ISALNUM (ch) || ch == '@'));
ch = *++str)
{
- *str2++ = (islower (ch)) ? ch : tolower (ch);
+ *str2++ = TOLOWER (ch);
}
*str2 = '\0';
@@ -1338,14 +1420,23 @@ ppc_elf_suffix (str_p, exp_p)
&& len == ptr->length
&& memcmp (ident, ptr->string, ptr->length) == 0)
{
+ int reloc = ptr->reloc;
+
+ if (BFD_DEFAULT_TARGET_SIZE == 64 && reloc < 0)
+ {
+ if (ppc_size != PPC_OPCODE_64)
+ return BFD_RELOC_UNUSED;
+ reloc = -reloc;
+ }
+
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))
+ && (reloc == (int) BFD_RELOC_16_GOTOFF
+ || reloc == (int) BFD_RELOC_LO16_GOTOFF
+ || reloc == (int) BFD_RELOC_HI16_GOTOFF
+ || reloc == (int) BFD_RELOC_HI16_S_GOTOFF))
as_warn (_("identifier+constant@got means identifier@got+constant"));
- /* Now check for identifier@suffix+constant */
+ /* Now check for identifier@suffix+constant. */
if (*str == '-' || *str == '+')
{
char *orig_line = input_line_pointer;
@@ -1362,20 +1453,29 @@ ppc_elf_suffix (str_p, exp_p)
if (&input_line_pointer != str_p)
input_line_pointer = orig_line;
}
-
*str_p = str;
- return ptr->reloc;
+
+ if (BFD_DEFAULT_TARGET_SIZE == 64
+ && reloc == (int) BFD_RELOC_PPC64_TOC
+ && exp_p->X_op == O_symbol)
+ {
+ /* This reloc type ignores the symbol. Change the symbol
+ so that the dummy .TOC. symbol can be omitted from the
+ object file. */
+ exp_p->X_add_symbol = &abs_symbol;
+ }
+
+ return (bfd_reloc_code_real_type) reloc;
}
return BFD_RELOC_UNUSED;
}
-/* Like normal .long/.short/.word, except support @got, etc. */
-/* clobbers input_line_pointer, checks */
-/* end-of-line. */
+/* 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 */
+ register int nbytes; /* 1=.byte, 2=.word, 4=.long, 8=.llong. */
{
expressionS exp;
bfd_reloc_code_real_type reloc;
@@ -1391,20 +1491,31 @@ ppc_elf_cons (nbytes)
expression (&exp);
if (exp.X_op == O_symbol
&& *input_line_pointer == '@'
- && (reloc = ppc_elf_suffix (&input_line_pointer, &exp)) != BFD_RELOC_UNUSED)
+ && (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);
+ reloc_howto_type *reloc_howto;
+ int size;
- if (size > nbytes)
- as_bad (_("%s relocations do not fit in %d bytes\n"), reloc_howto->name, nbytes);
+ reloc_howto = bfd_reloc_type_lookup (stdoutput, reloc);
+ 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);
+ char *p;
+ int offset;
+
+ p = frag_more (nbytes);
+ offset = 0;
+ if (target_big_endian)
+ offset = nbytes - size;
+ fix_new_exp (frag_now, p - frag_now->fr_literal + offset, size,
+ &exp, 0, reloc);
}
}
else
@@ -1412,7 +1523,8 @@ ppc_elf_cons (nbytes)
}
while (*input_line_pointer++ == ',');
- input_line_pointer--; /* Put terminator back into stream. */
+ /* Put terminator back into stream. */
+ input_line_pointer--;
demand_empty_rest_of_line ();
}
@@ -1424,16 +1536,16 @@ ppc_elf_rdata (xxx)
char *save_line = input_line_pointer;
static char section[] = ".rodata\n";
- /* Just pretend this is .section .rodata */
+ /* 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 */
+/* Pseudo op to make file scope bss items. */
static void
-ppc_elf_lcomm(xxx)
+ppc_elf_lcomm (xxx)
int xxx ATTRIBUTE_UNUSED;
{
register char *name;
@@ -1450,7 +1562,7 @@ ppc_elf_lcomm(xxx)
name = input_line_pointer;
c = get_symbol_end ();
- /* just after name is now '\0' */
+ /* just after name is now '\0'. */
p = input_line_pointer;
*p = c;
SKIP_WHITESPACE ();
@@ -1506,12 +1618,12 @@ ppc_elf_lcomm(xxx)
return;
}
- /* allocate_bss: */
+ /* Allocate_bss. */
old_sec = now_seg;
old_subsec = now_subseg;
if (align)
{
- /* convert to a power of 2 alignment */
+ /* Convert to a power of 2 alignment. */
for (align2 = 0; (align & 1) == 0; align >>= 1, ++align2);
if (align != 1)
{
@@ -1566,11 +1678,11 @@ ppc_elf_validate_fix (fixp, seg)
&& 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
+ && (seg->flags & SEC_LOAD) != 0
&& 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)
@@ -1585,12 +1697,31 @@ ppc_elf_validate_fix (fixp, seg)
return;
}
}
+
+#if BFD_DEFAULT_TARGET_SIZE == 64
+/* Don't emit .TOC. symbol. */
+int
+ppc_elf_frob_symbol (sym)
+ symbolS *sym;
+{
+ const char *name;
+
+ name = S_GET_NAME (sym);
+ if (name != NULL && strcmp (name, ".TOC.") == 0)
+ {
+ S_CLEAR_EXTERNAL (sym);
+ return 1;
+ }
+
+ return 0;
+}
+#endif
#endif /* OBJ_ELF */
#ifdef TE_PE
/*
- * Summary of parse_toc_entry().
+ * Summary of parse_toc_entry.
*
* in: Input_line_pointer points to the '[' in one of:
*
@@ -1623,7 +1754,7 @@ enum toc_size_qualifier
};
static int
-parse_toc_entry(toc_kind)
+parse_toc_entry (toc_kind)
enum toc_size_qualifier *toc_kind;
{
char *start;
@@ -1631,43 +1762,43 @@ parse_toc_entry(toc_kind)
char c;
enum toc_size_qualifier t;
- /* save the input_line_pointer */
+ /* Save the input_line_pointer. */
start = input_line_pointer;
- /* skip over the '[' , and whitespace */
+ /* Skip over the '[' , and whitespace. */
++input_line_pointer;
SKIP_WHITESPACE ();
- /* find the spelling of the operand */
+ /* Find the spelling of the operand. */
toc_spec = input_line_pointer;
c = get_symbol_end ();
- if (strcmp(toc_spec, "toc") == 0)
+ if (strcmp (toc_spec, "toc") == 0)
{
t = default_toc;
}
- else if (strcmp(toc_spec, "tocv") == 0)
+ else if (strcmp (toc_spec, "tocv") == 0)
{
t = data_in_toc;
}
- else if (strcmp(toc_spec, "toc32") == 0)
+ else if (strcmp (toc_spec, "toc32") == 0)
{
t = must_be_32;
}
- else if (strcmp(toc_spec, "toc64") == 0)
+ else if (strcmp (toc_spec, "toc64") == 0)
{
t = must_be_64;
}
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 */
+ *input_line_pointer = c;
+ input_line_pointer = start;
return 0;
}
- /* now find the ']' */
- *input_line_pointer = c; /* put back the delimiting char */
+ /* Now find the ']'. */
+ *input_line_pointer = c;
SKIP_WHITESPACE (); /* leading whitespace could be there. */
c = *input_line_pointer++; /* input_line_pointer->past char in c. */
@@ -1675,11 +1806,11 @@ parse_toc_entry(toc_kind)
if (c != ']')
{
as_bad (_("syntax error: expected `]', found `%c'"), c);
- input_line_pointer = start; /* reset input_line pointer */
+ input_line_pointer = start;
return 0;
}
- *toc_kind = t; /* set return value */
+ *toc_kind = t;
return 1;
}
#endif
@@ -1720,7 +1851,7 @@ md_assemble (str)
#endif
/* Get the opcode. */
- for (s = str; *s != '\0' && ! isspace (*s); s++)
+ for (s = str; *s != '\0' && ! ISSPACE (*s); s++)
;
if (*s != '\0')
*s++ = '\0';
@@ -1743,7 +1874,7 @@ md_assemble (str)
insn = opcode->opcode;
str = s;
- while (isspace (*str))
+ while (ISSPACE (*str))
++str;
/* PowerPC operands are just expressions. The only real issue is
@@ -1816,7 +1947,7 @@ md_assemble (str)
from the input. */
if ((operand->flags & PPC_OPERAND_FAKE) != 0)
{
- insn = (*operand->insert) (insn, 0L, &errmsg);
+ insn = (*operand->insert) (insn, 0L, ppc_cpu | ppc_size, &errmsg);
if (errmsg != (const char *) NULL)
as_bad (errmsg);
continue;
@@ -1829,7 +1960,7 @@ md_assemble (str)
{
if (operand->insert)
{
- insn = (*operand->insert) (insn, 0L, &errmsg);
+ insn = (*operand->insert) (insn, 0L, ppc_cpu | ppc_size, &errmsg);
if (errmsg != (const char *) NULL)
as_bad (errmsg);
}
@@ -1846,91 +1977,92 @@ md_assemble (str)
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.
- */
+ *
+ * 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);
+ /* 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; ? */
+ /* 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);
+ /* 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. */
+ /* 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. */
+ /* 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"));
+ 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? */
+ /* 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 */
+ /* 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);
+ _("Unexpected return value [%d] from parse_toc_entry!\n"),
+ toc_kind);
abort ();
break;
}
@@ -1944,8 +2076,8 @@ md_assemble (str)
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 */
+ /* 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;
@@ -1992,36 +2124,67 @@ md_assemble (str)
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)
+ something which cleared it, we always produce a
+ signed value. */
+ if (ex.X_unsigned && ! (operand->flags & PPC_OPERAND_SIGNED))
ex.X_add_number &= 0xffff;
else
- ex.X_add_number = (((ex.X_add_number & 0xffff)
- ^ 0x8000)
- - 0x8000);
+ ex.X_add_number = SEX16 (ex.X_add_number);
break;
case BFD_RELOC_HI16:
- ex.X_add_number = (ex.X_add_number >> 16) & 0xffff;
+ if (ex.X_unsigned && ! (operand->flags & PPC_OPERAND_SIGNED))
+ ex.X_add_number = PPC_HI (ex.X_add_number);
+ else
+ ex.X_add_number = SEX16 (PPC_HI (ex.X_add_number));
break;
case BFD_RELOC_HI16_S:
- ex.X_add_number = ((((ex.X_add_number >> 16) & 0xffff)
- + ((ex.X_add_number >> 15) & 1))
- & 0xffff);
+ if (ex.X_unsigned && ! (operand->flags & PPC_OPERAND_SIGNED))
+ ex.X_add_number = PPC_HA (ex.X_add_number);
+ else
+ ex.X_add_number = SEX16 (PPC_HA (ex.X_add_number));
+ break;
+
+#if BFD_DEFAULT_TARGET_SIZE == 64
+ case BFD_RELOC_PPC64_HIGHER:
+ if (ex.X_unsigned && ! (operand->flags & PPC_OPERAND_SIGNED))
+ ex.X_add_number = PPC_HIGHER (ex.X_add_number);
+ else
+ ex.X_add_number = SEX16 (PPC_HIGHER (ex.X_add_number));
+ break;
+
+ case BFD_RELOC_PPC64_HIGHER_S:
+ if (ex.X_unsigned && ! (operand->flags & PPC_OPERAND_SIGNED))
+ ex.X_add_number = PPC_HIGHERA (ex.X_add_number);
+ else
+ ex.X_add_number = SEX16 (PPC_HIGHERA (ex.X_add_number));
break;
+
+ case BFD_RELOC_PPC64_HIGHEST:
+ if (ex.X_unsigned && ! (operand->flags & PPC_OPERAND_SIGNED))
+ ex.X_add_number = PPC_HIGHEST (ex.X_add_number);
+ else
+ ex.X_add_number = SEX16 (PPC_HIGHEST (ex.X_add_number));
+ break;
+
+ case BFD_RELOC_PPC64_HIGHEST_S:
+ if (ex.X_unsigned && ! (operand->flags & PPC_OPERAND_SIGNED))
+ ex.X_add_number = PPC_HIGHESTA (ex.X_add_number);
+ else
+ ex.X_add_number = SEX16 (PPC_HIGHESTA (ex.X_add_number));
+ break;
+#endif /* BFD_DEFAULT_TARGET_SIZE == 64 */
}
-#endif
+#endif /* OBJ_ELF */
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. */
+ /* For the absolute forms of branches, convert the PC
+ relative form back into the absolute. */
if ((operand->flags & PPC_OPERAND_ABSOLUTE) != 0)
{
switch (reloc)
@@ -2043,6 +2206,51 @@ md_assemble (str)
}
}
+ if (BFD_DEFAULT_TARGET_SIZE == 64
+ && ppc_size == PPC_OPCODE_64
+ && (operand->flags & PPC_OPERAND_DS) != 0)
+ {
+ switch (reloc)
+ {
+ case BFD_RELOC_16:
+ reloc = BFD_RELOC_PPC64_ADDR16_DS;
+ break;
+ case BFD_RELOC_LO16:
+ reloc = BFD_RELOC_PPC64_ADDR16_LO_DS;
+ break;
+ case BFD_RELOC_16_GOTOFF:
+ reloc = BFD_RELOC_PPC64_GOT16_DS;
+ break;
+ case BFD_RELOC_LO16_GOTOFF:
+ reloc = BFD_RELOC_PPC64_GOT16_LO_DS;
+ break;
+ case BFD_RELOC_LO16_PLTOFF:
+ reloc = BFD_RELOC_PPC64_PLT16_LO_DS;
+ break;
+ case BFD_RELOC_32_BASEREL:
+ reloc = BFD_RELOC_PPC64_SECTOFF_DS;
+ break;
+ case BFD_RELOC_LO16_BASEREL:
+ reloc = BFD_RELOC_PPC64_SECTOFF_LO_DS;
+ break;
+ case BFD_RELOC_PPC_TOC16:
+ reloc = BFD_RELOC_PPC64_TOC16_DS;
+ break;
+ case BFD_RELOC_PPC64_TOC16_LO:
+ reloc = BFD_RELOC_PPC64_TOC16_LO_DS;
+ break;
+ case BFD_RELOC_PPC64_PLTGOT16:
+ reloc = BFD_RELOC_PPC64_PLTGOT16_DS;
+ break;
+ case BFD_RELOC_PPC64_PLTGOT16_LO:
+ reloc = BFD_RELOC_PPC64_PLTGOT16_LO_DS;
+ break;
+ default:
+ as_bad (_("unsupported relocation for DS offset field"));
+ break;
+ }
+ }
+
/* We need to generate a fixup for this expression. */
if (fc >= MAX_INSN_FIXUPS)
as_fatal (_("too many fixups"));
@@ -2090,7 +2298,7 @@ md_assemble (str)
++str;
}
- while (isspace (*str))
+ while (ISSPACE (*str))
++str;
if (*str != '\0')
@@ -2109,7 +2317,7 @@ md_assemble (str)
BFD_RELOC_UNUSED plus the operand index. This lets us easily
handle fixups for any operand type, although that is admittedly
not a very exciting feature. We pick a BFD reloc type in
- md_apply_fix. */
+ md_apply_fix3. */
for (i = 0; i < fc; i++)
{
const struct powerpc_operand *operand;
@@ -2117,11 +2325,12 @@ md_assemble (str)
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);
+ reloc_howto_type *reloc_howto;
int size;
int offset;
fixS *fixP;
+ reloc_howto = bfd_reloc_type_lookup (stdoutput, fixups[i].reloc);
if (!reloc_howto)
abort ();
@@ -2131,8 +2340,11 @@ md_assemble (str)
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,
+ 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
@@ -2144,6 +2356,14 @@ md_assemble (str)
case BFD_RELOC_LO16:
case BFD_RELOC_HI16:
case BFD_RELOC_HI16_S:
+#ifdef OBJ_ELF
+#if BFD_DEFAULT_TARGET_SIZE == 64
+ case BFD_RELOC_PPC64_HIGHER:
+ case BFD_RELOC_PPC64_HIGHER_S:
+ case BFD_RELOC_PPC64_HIGHEST:
+ case BFD_RELOC_PPC64_HIGHEST_S:
+#endif
+#endif
fixP->fx_no_overflow = 1;
break;
default:
@@ -2151,11 +2371,13 @@ md_assemble (str)
}
}
else
- fix_new_exp (frag_now, f - frag_now->fr_literal, 4,
+ 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)));
+ (fixups[i].opindex + (int) BFD_RELOC_UNUSED)));
}
}
@@ -2240,7 +2462,7 @@ ppc_macro (str, macro)
}
#ifdef OBJ_ELF
-/* For ELF, add support for SHF_EXCLUDE and SHT_ORDERED */
+/* For ELF, add support for SHF_EXCLUDE and SHT_ORDERED. */
int
ppc_section_letter (letter, ptr_msg)
@@ -2250,7 +2472,7 @@ ppc_section_letter (letter, ptr_msg)
if (letter == 'e')
return SHF_EXCLUDE;
- *ptr_msg = _("Bad .section directive: want a,w,x,e in string");
+ *ptr_msg = _("Bad .section directive: want a,e,w,x,M,S in string");
return 0;
}
@@ -2585,8 +2807,8 @@ ppc_change_csect (sym)
}
/* 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. */
+ 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;
@@ -2813,8 +3035,8 @@ ppc_stabx (ignore)
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. */
+ fail at some later point, but this is probably the right
+ thing to do here. */
symbol_set_value_expression (sym, &exp);
break;
}
@@ -2843,23 +3065,23 @@ ppc_stabx (ignore)
symbol_get_tc (sym)->output = 1;
if (S_GET_STORAGE_CLASS (sym) == C_STSYM) {
-
+
symbol_get_tc (sym)->within = ppc_current_block;
/* In this case :
-
+
.bs name
.stabx "z",arrays_,133,0
.es
-
+
.comm arrays_,13768,3
-
+
resolve_symbol_value will copy the exp's "within" into sym's when the
offset is 0. Since this seems to be corner case problem,
only do the correction for storage class C_STSYM. A better solution
- would be to have the tc field updated in ppc_symbol_new_hook. */
-
- if (exp.X_op == O_symbol)
+ would be to have the tc field updated in ppc_symbol_new_hook. */
+
+ if (exp.X_op == O_symbol)
{
symbol_get_tc (exp.X_add_symbol)->within = ppc_current_block;
}
@@ -2977,7 +3199,10 @@ ppc_function (ignore)
}
/* The .bf pseudo-op. This is just like a COFF C_FCN symbol named
- ".bf". */
+ ".bf". If the pseudo op .bi was seen before .bf, patch the .bi sym
+ with the correct line number */
+
+static symbolS *saved_bi_sym = 0;
static void
ppc_bf (ignore)
@@ -2996,6 +3221,14 @@ ppc_bf (ignore)
S_SET_NUMBER_AUXILIARY (sym, 1);
SA_SET_SYM_LNNO (sym, coff_line_base);
+ /* Line number for bi. */
+ if (saved_bi_sym)
+ {
+ S_SET_VALUE (saved_bi_sym, coff_n_line_nos);
+ saved_bi_sym = 0;
+ }
+
+
symbol_get_tc (sym)->output = 1;
ppc_frob_label (sym);
@@ -3029,7 +3262,8 @@ ppc_ef (ignore)
/* 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. */
+ the symbol list. The value of .bi will be know when the next .bf
+ is encountered. */
static void
ppc_biei (ei)
@@ -3059,6 +3293,12 @@ ppc_biei (ei)
S_SET_STORAGE_CLASS (sym, ei ? C_EINCL : C_BINCL);
symbol_get_tc (sym)->output = 1;
+ /* Save bi. */
+ if (ei)
+ saved_bi_sym = 0;
+ else
+ saved_bi_sym = sym;
+
for (look = last_biei ? last_biei : symbol_rootP;
(look != (symbolS *) NULL
&& (S_GET_STORAGE_CLASS (look) == C_FILE
@@ -3293,14 +3533,6 @@ ppc_xcoff_cons (log_size)
}
static void
-ppc_machine(dummy)
- int dummy ATTRIBUTE_UNUSED;
-{
- discard_rest_of_line();
- /* What does aix use this for? */
-}
-
-static void
ppc_vbyte (dummy)
int dummy ATTRIBUTE_UNUSED;
{
@@ -3328,15 +3560,18 @@ ppc_vbyte (dummy)
}
#endif /* OBJ_XCOFF */
+#if defined (OBJ_XCOFF) || defined (OBJ_ELF)
/* 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
+ TC. The rest of the arguments are N-byte values to actually put at
this location in the TOC; often there is just one more argument, a
- relocateable symbol reference.
+ relocateable symbol reference. The size of the value to store
+ depends on target word size. A 32-bit target uses 4-byte values, a
+ 64-bit target uses 8-byte values.
When not generating XCOFF output, the arguments are the same, but
the first argument is simply ignored. */
@@ -3399,7 +3634,9 @@ ppc_tc (ignore)
ppc_frob_label (sym);
}
-#else /* ! defined (OBJ_XCOFF) */
+#endif /* OBJ_XCOFF */
+#ifdef OBJ_ELF
+ int align;
/* Skip the TOC symbol name. */
while (is_part_of_name (*input_line_pointer)
@@ -3409,11 +3646,11 @@ ppc_tc (ignore)
|| *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) */
+ /* Align to a four/eight byte boundary. */
+ align = BFD_DEFAULT_TARGET_SIZE == 64 && ppc_size == PPC_OPCODE_64 ? 3 : 2;
+ frag_align (align, 0, 0);
+ record_alignment (now_seg, align);
+#endif /* OBJ_ELF */
if (*input_line_pointer != ',')
demand_empty_rest_of_line ();
@@ -3423,10 +3660,44 @@ ppc_tc (ignore)
cons ((ppc_size == PPC_OPCODE_64) ? 8 : 4);
}
}
+
+/* Pseudo-op .machine. */
+/* FIXME: `.machine' is a nop for the moment. It would be nice to
+ accept this directive on the first line of input and set ppc_size
+ and the target format accordingly. Unfortunately, the target
+ format is selected in output-file.c:output_file_create before we
+ even get to md_begin, so it's not possible without changing
+ as.c:main. */
+
+static void
+ppc_machine (ignore)
+ int ignore ATTRIBUTE_UNUSED;
+{
+ discard_rest_of_line ();
+}
+
+/* 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;
+#endif
+#ifdef OBJ_ELF
+ const char *sname = segment_name (S_GET_SEGMENT (sym));
+ if (BFD_DEFAULT_TARGET_SIZE == 64 && ppc_size == PPC_OPCODE_64)
+ return strcmp (sname, ".toc") == 0;
+ else
+ return strcmp (sname, ".got") == 0;
+#endif
+}
+#endif /* defined (OBJ_XCOFF) || defined (OBJ_ELF) */
#ifdef TE_PE
-/* Pseudo-ops specific to the Windows NT PowerPC PE (coff) format */
+/* Pseudo-ops specific to the Windows NT PowerPC PE (coff) format. */
/* Set the current section. */
static void
@@ -3440,23 +3711,23 @@ ppc_set_current_section (new)
/* pseudo-op: .previous
behaviour: toggles the current section with the previous section.
errors: None
- warnings: "No previous section"
-*/
+ warnings: "No previous section" */
+
static void
-ppc_previous(ignore)
+ppc_previous (ignore)
int ignore ATTRIBUTE_UNUSED;
{
symbolS *tmp;
if (ppc_previous_section == NULL)
{
- as_warn(_("No previous section to return to. Directive ignored."));
+ as_warn (_("No previous section to return to. Directive ignored."));
return;
}
- subseg_set(ppc_previous_section, 0);
+ subseg_set (ppc_previous_section, 0);
- ppc_set_current_section(ppc_previous_section);
+ ppc_set_current_section (ppc_previous_section);
}
/* pseudo-op: .pdata
@@ -3472,11 +3743,10 @@ ppc_previous(ignore)
commentary:
Tag index tables (also known as the function table) for exception
- handling, debugging, etc.
+ handling, debugging, etc. */
-*/
static void
-ppc_pdata(ignore)
+ppc_pdata (ignore)
int ignore ATTRIBUTE_UNUSED;
{
if (pdata_section == 0)
@@ -3491,9 +3761,9 @@ ppc_pdata(ignore)
}
else
{
- pdata_section = subseg_new(".pdata", 0);
+ pdata_section = subseg_new (".pdata", 0);
}
- ppc_set_current_section(pdata_section);
+ ppc_set_current_section (pdata_section);
}
/* pseudo-op: .ydata
@@ -3508,18 +3778,18 @@ ppc_pdata(ignore)
3 - double word aligned (that would be 4 byte boundary)
commentary:
Tag tables (also known as the scope table) for exception handling,
- debugging, etc.
-*/
+ debugging, etc. */
+
static void
-ppc_ydata(ignore)
+ppc_ydata (ignore)
int ignore ATTRIBUTE_UNUSED;
{
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 ));
+ (SEC_ALLOC | SEC_LOAD | SEC_RELOC
+ | SEC_READONLY | SEC_DATA ));
bfd_set_section_alignment (stdoutput, ydata_section, 3);
}
@@ -3527,7 +3797,7 @@ ppc_ydata(ignore)
{
ydata_section = subseg_new (".ydata", 0);
}
- ppc_set_current_section(ydata_section);
+ ppc_set_current_section (ydata_section);
}
/* pseudo-op: .reldata
@@ -3545,10 +3815,10 @@ ppc_ydata(ignore)
commentary:
Like .data, but intended to hold data subject to relocation, such as
- function descriptors, etc.
-*/
+ function descriptors, etc. */
+
static void
-ppc_reldata(ignore)
+ppc_reldata (ignore)
int ignore ATTRIBUTE_UNUSED;
{
if (reldata_section == 0)
@@ -3556,8 +3826,8 @@ ppc_reldata(ignore)
reldata_section = subseg_new (".reldata", 0);
bfd_set_section_flags (stdoutput, reldata_section,
- ( SEC_ALLOC | SEC_LOAD | SEC_RELOC
- | SEC_DATA ));
+ (SEC_ALLOC | SEC_LOAD | SEC_RELOC
+ | SEC_DATA));
bfd_set_section_alignment (stdoutput, reldata_section, 2);
}
@@ -3565,7 +3835,7 @@ ppc_reldata(ignore)
{
reldata_section = subseg_new (".reldata", 0);
}
- ppc_set_current_section(reldata_section);
+ ppc_set_current_section (reldata_section);
}
/* pseudo-op: .rdata
@@ -3576,10 +3846,10 @@ ppc_reldata(ignore)
initial: .section .rdata "dr3"
d - initialized data
r - readable
- 3 - double word aligned (that would be 4 byte boundary)
-*/
+ 3 - double word aligned (that would be 4 byte boundary) */
+
static void
-ppc_rdata(ignore)
+ppc_rdata (ignore)
int ignore ATTRIBUTE_UNUSED;
{
if (rdata_section == 0)
@@ -3595,7 +3865,7 @@ ppc_rdata(ignore)
{
rdata_section = subseg_new (".rdata", 0);
}
- ppc_set_current_section(rdata_section);
+ ppc_set_current_section (rdata_section);
}
/* pseudo-op: .ualong
@@ -3603,14 +3873,14 @@ ppc_rdata(ignore)
performed.
FIXME: test the alignment statement
errors: None
- warnings: None
-*/
+ warnings: None */
+
static void
-ppc_ualong(ignore)
+ppc_ualong (ignore)
int ignore ATTRIBUTE_UNUSED;
{
- /* try for long */
- cons ( 4 );
+ /* Try for long. */
+ cons (4);
}
/* pseudo-op: .znop <symbol name>
@@ -3618,20 +3888,17 @@ ppc_ualong(ignore)
Issue a IMAGE_REL_PPC_IFGLUE relocation against it, using
the supplied symbol name.
errors: None
- warnings: Missing symbol name
-*/
+ warnings: Missing symbol name */
+
static void
-ppc_znop(ignore)
+ppc_znop (ignore)
int ignore ATTRIBUTE_UNUSED;
{
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;
@@ -3639,6 +3906,7 @@ ppc_znop(ignore)
flagword flags;
asection *sec;
+ /* Strip out the symbol name. */
symbol_name = input_line_pointer;
c = get_symbol_end ();
@@ -3654,7 +3922,7 @@ ppc_znop(ignore)
/* Look up the opcode in the hash table. */
opcode = (const struct powerpc_opcode *) hash_find (ppc_hash, "nop");
- /* stick in the nop */
+ /* Stick in the nop. */
insn = opcode->opcode;
/* Write out the instruction. */
@@ -3673,10 +3941,10 @@ ppc_znop(ignore)
/* pseudo-op:
behaviour:
errors:
- warnings:
-*/
+ warnings: */
+
static void
-ppc_pe_comm(lcomm)
+ppc_pe_comm (lcomm)
int lcomm;
{
register char *name;
@@ -3689,7 +3957,7 @@ ppc_pe_comm(lcomm)
name = input_line_pointer;
c = get_symbol_end ();
- /* just after name is now '\0' */
+ /* just after name is now '\0'. */
p = input_line_pointer;
*p = c;
SKIP_WHITESPACE ();
@@ -3808,7 +4076,7 @@ void
ppc_pe_section (ignore)
int ignore ATTRIBUTE_UNUSED;
{
- /* Strip out the section name */
+ /* Strip out the section name. */
char *section_name;
char c;
char *name;
@@ -3851,7 +4119,8 @@ ppc_pe_section (ignore)
align = 1;
}
else
- align = 4; /* default alignment to 16 byte boundary */
+ /* Default alignment to 16 byte boundary. */
+ align = 4;
if (*input_line_pointer == ',')
{
@@ -3939,8 +4208,8 @@ ppc_pe_section (ignore)
break;
default:
- as_bad(_("unknown section attribute '%c'"),
- *input_line_pointer);
+ as_bad (_("unknown section attribute '%c'"),
+ *input_line_pointer);
break;
}
++input_line_pointer;
@@ -3952,7 +4221,7 @@ ppc_pe_section (ignore)
sec = subseg_new (name, (subsegT) exp);
- ppc_set_current_section(sec);
+ ppc_set_current_section (sec);
if (flags != SEC_NO_FLAGS)
{
@@ -3962,7 +4231,7 @@ ppc_pe_section (ignore)
bfd_errmsg (bfd_get_error ()));
}
- bfd_set_section_alignment(stdoutput, sec, align);
+ bfd_set_section_alignment (stdoutput, sec, align);
}
@@ -3996,10 +4265,10 @@ ppc_pe_tocd (ignore)
if (tocdata_section == 0)
{
tocdata_section = subseg_new (".tocd", 0);
- /* FIXME: section flags won't work */
+ /* FIXME: section flags won't work. */
bfd_set_section_flags (stdoutput, tocdata_section,
(SEC_ALLOC | SEC_LOAD | SEC_RELOC
- | SEC_READONLY | SEC_DATA ));
+ | SEC_READONLY | SEC_DATA));
bfd_set_section_alignment (stdoutput, tocdata_section, 2);
}
@@ -4008,7 +4277,7 @@ ppc_pe_tocd (ignore)
rdata_section = subseg_new (".tocd", 0);
}
- ppc_set_current_section(tocdata_section);
+ ppc_set_current_section (tocdata_section);
demand_empty_rest_of_line ();
}
@@ -4055,8 +4324,7 @@ ppc_canonicalize_symbol_name (name)
}
for (s++; *s != '\0' && *s != brac; s++)
- if (islower (*s))
- *s = toupper (*s);
+ *s = TOUPPER (*s);
if (*s == '\0' || s[1] != '\0')
as_bad (_("bad symbol suffix"));
@@ -4238,7 +4506,7 @@ ppc_frob_symbol (sym)
ppc_last_function = sym;
if (symbol_get_tc (sym)->size != (symbolS *) NULL)
{
- resolve_symbol_value (symbol_get_tc (sym)->size, 1);
+ resolve_symbol_value (symbol_get_tc (sym)->size);
SA_SET_SYM_FSIZE (sym,
(long) S_GET_VALUE (symbol_get_tc (sym)->size));
}
@@ -4298,7 +4566,7 @@ ppc_frob_symbol (sym)
- S_GET_VALUE (sym));
else
{
- resolve_symbol_value (symbol_get_tc (sym)->next, 1);
+ resolve_symbol_value (symbol_get_tc (sym)->next);
a->x_csect.x_scnlen.l = (S_GET_VALUE (symbol_get_tc (sym)->next)
- S_GET_VALUE (sym));
}
@@ -4317,7 +4585,7 @@ ppc_frob_symbol (sym)
else if (S_GET_SEGMENT (sym) == absolute_section)
{
/* This is an absolute symbol. The csect will be created by
- ppc_adjust_symtab. */
+ ppc_adjust_symtab. */
ppc_saw_abs = true;
a->x_csect.x_smtyp = XTY_LD;
if (symbol_get_tc (sym)->class == -1)
@@ -4351,7 +4619,7 @@ ppc_frob_symbol (sym)
}
else
{
- resolve_symbol_value (next, 1);
+ resolve_symbol_value (next);
a->x_csect.x_scnlen.l = (S_GET_VALUE (next)
- S_GET_VALUE (sym));
}
@@ -4382,7 +4650,7 @@ ppc_frob_symbol (sym)
{
while (symbol_get_tc (csect)->next != (symbolS *) NULL)
{
- resolve_symbol_value (symbol_get_tc (csect)->next, 1);
+ resolve_symbol_value (symbol_get_tc (csect)->next);
if (S_GET_VALUE (symbol_get_tc (csect)->next)
> S_GET_VALUE (sym))
break;
@@ -4428,15 +4696,15 @@ ppc_frob_symbol (sym)
/* 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);
+ resolve_symbol_value (csect);
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. */
+ 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;
}
@@ -4645,7 +4913,7 @@ ppc_fix_adjustable (fix)
{
valueT val;
- resolve_symbol_value (fix->fx_addsy, 1);
+ resolve_symbol_value (fix->fx_addsy);
val = S_GET_VALUE (fix->fx_addsy);
if (ppc_toc_csect != (symbolS *) NULL
&& fix->fx_addsy != (symbolS *) NULL
@@ -4665,7 +4933,7 @@ ppc_fix_adjustable (fix)
continue;
if (symbol_get_tc (sy)->class != XMC_TC)
break;
- resolve_symbol_value (sy, 1);
+ resolve_symbol_value (sy);
if (val == S_GET_VALUE (sy))
{
fix->fx_addsy = sy;
@@ -4710,9 +4978,9 @@ ppc_fix_adjustable (fix)
<= 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. */
+ 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))
{
@@ -4729,7 +4997,7 @@ ppc_fix_adjustable (fix)
}
/* If we found the symbol before the next csect
- symbol, then this is the csect we want. */
+ symbol, then this is the csect we want. */
if (scan == fix->fx_addsy)
break;
}
@@ -4749,7 +5017,7 @@ ppc_fix_adjustable (fix)
&& 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);
+ resolve_symbol_value (symbol_get_frag (fix->fx_addsy)->fr_symbol);
fix->fx_offset +=
(S_GET_VALUE (fix->fx_addsy)
- S_GET_VALUE (symbol_get_frag (fix->fx_addsy)->fr_symbol));
@@ -4786,18 +5054,27 @@ ppc_force_relocation (fix)
#endif /* OBJ_XCOFF */
-/* See whether a symbol is in the TOC section. */
-
-static int
-ppc_is_toc_sym (sym)
- symbolS *sym;
+#ifdef OBJ_ELF
+int
+ppc_fix_adjustable (fix)
+ fixS *fix;
{
-#ifdef OBJ_XCOFF
- return symbol_get_tc (sym)->class == XMC_TC;
-#else
- return strcmp (segment_name (S_GET_SEGMENT (sym)), ".got") == 0;
-#endif
+ return (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)));
}
+#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
@@ -4808,36 +5085,33 @@ ppc_is_toc_sym (sym)
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;
+void
+md_apply_fix3 (fixP, valP, seg)
+ fixS *fixP;
+ valueT * valP;
+ segT seg ATTRIBUTE_UNUSED;
{
- valueT value;
+ valueT value = * valP;
#ifdef OBJ_ELF
- value = *valuep;
- if (fixp->fx_addsy != NULL)
+ 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);
+ 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;
+ if (fixP->fx_pcrel)
+ value += fixP->fx_frag->fr_address + fixP->fx_where;
}
else
- {
- fixp->fx_done = 1;
- }
+ 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
@@ -4849,163 +5123,171 @@ md_apply_fix3 (fixp, valuep, seg)
*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;
+ if (fixP->fx_addsy == (symbolS *) NULL)
+ fixP->fx_done = 1;
+
+ else if (fixP->fx_pcrel)
+ ;
+
else
{
- value = fixp->fx_offset;
- if (fixp->fx_subsy != (symbolS *) NULL)
+ 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);
+ 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,
+ as_bad_where (fixP->fx_file, fixP->fx_line,
_("expression too complex"));
}
}
}
#endif
- if ((int) fixp->fx_r_type >= (int) BFD_RELOC_UNUSED)
+ 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;
+ 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. */
+ /* An instruction like `lwz 9,sym(30)' when `sym' is not a TOC symbol
+ does not generate a reloc. It uses the offset of `sym' within its
+ csect. Other usages, such as `.long sym', generate relocs. This
+ is the documented behaviour of non-TOC symbols. */
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)
+ && 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;
+ 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;
+ 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);
+ 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;
- }
+ if (fixP->fx_done)
+ /* Nothing else to do here. */
+ return;
+
+ assert (fixP->fx_addsy != NULL);
/* 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. */
+ relocs. */
if ((operand->flags & PPC_OPERAND_RELATIVE) != 0
&& operand->bits == 26
&& operand->shift == 0)
- fixp->fx_r_type = BFD_RELOC_PPC_B26;
+ 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;
+ 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;
+ 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;
+ fixP->fx_r_type = BFD_RELOC_PPC_BA16;
+#if defined (OBJ_XCOFF) || defined (OBJ_ELF)
else if ((operand->flags & PPC_OPERAND_PARENS) != 0
&& operand->bits == 16
&& operand->shift == 0
- && fixp->fx_addsy != NULL
- && ppc_is_toc_sym (fixp->fx_addsy))
+ && ppc_is_toc_sym (fixP->fx_addsy))
{
- fixp->fx_size = 2;
+ fixP->fx_r_type = BFD_RELOC_PPC_TOC16;
+#ifdef OBJ_ELF
+ if (BFD_DEFAULT_TARGET_SIZE == 64
+ && ppc_size == PPC_OPCODE_64
+ && (operand->flags & PPC_OPERAND_DS) != 0)
+ fixP->fx_r_type = BFD_RELOC_PPC64_TOC16_DS;
+#endif
+ fixP->fx_size = 2;
if (target_big_endian)
- fixp->fx_where += 2;
- fixp->fx_r_type = BFD_RELOC_PPC_TOC16;
+ fixP->fx_where += 2;
}
+#endif /* defined (OBJ_XCOFF) || defined (OBJ_ELF) */
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,
+ 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;
+ as_bad_where (fixP->fx_file, fixP->fx_line,
+ _("unsupported relocation against %s"),
+ S_GET_NAME (fixP->fx_addsy));
+ fixP->fx_done = 1;
+ return;
}
}
else
{
#ifdef OBJ_ELF
- ppc_elf_validate_fix (fixp, seg);
+ ppc_elf_validate_fix (fixP, seg);
#endif
- switch (fixp->fx_r_type)
+ 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 */
+ if (BFD_DEFAULT_TARGET_SIZE == 64 && ppc_size == PPC_OPCODE_64)
+ goto ctor64;
+ /* fall through */
+
+ case BFD_RELOC_32:
+ 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,
+ md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where,
value, 4);
break;
case BFD_RELOC_64:
- if (fixp->fx_pcrel)
- fixp->fx_r_type = BFD_RELOC_64_PCREL;
- /* fall through */
+ ctor64:
+ if (fixP->fx_pcrel)
+ fixP->fx_r_type = BFD_RELOC_64_PCREL;
+ /* fall through */
+
case BFD_RELOC_64_PCREL:
- md_number_to_chars (fixp->fx_frag->fr_literal + fixp->fx_where,
+ md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where,
value, 8);
break;
+
case BFD_RELOC_LO16:
case BFD_RELOC_16:
case BFD_RELOC_GPREL16:
@@ -5030,20 +5312,27 @@ md_apply_fix3 (fixp, valuep, seg)
case BFD_RELOC_PPC_EMB_RELST_HA:
case BFD_RELOC_PPC_EMB_RELSDA:
case BFD_RELOC_PPC_TOC16:
- if (fixp->fx_pcrel)
+#ifdef OBJ_ELF
+#if BFD_DEFAULT_TARGET_SIZE == 64
+ case BFD_RELOC_PPC64_TOC16_LO:
+ case BFD_RELOC_PPC64_TOC16_HI:
+ case BFD_RELOC_PPC64_TOC16_HA:
+#endif
+#endif
+ if (fixP->fx_pcrel)
{
- if (fixp->fx_addsy != NULL)
- as_bad_where (fixp->fx_file, fixp->fx_line,
+ 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));
+ 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,
+ as_bad_where (fixP->fx_file, fixP->fx_line,
_("cannot emit PC relative %s relocation"),
- bfd_get_reloc_code_name (fixp->fx_r_type));
+ bfd_get_reloc_code_name (fixP->fx_r_type));
}
- md_number_to_chars (fixp->fx_frag->fr_literal + fixp->fx_where,
+ md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where,
value, 2);
break;
@@ -5051,109 +5340,177 @@ md_apply_fix3 (fixp, valuep, seg)
lis %r3,(L1-L2)@ha
where L1 and L2 are defined later. */
case BFD_RELOC_HI16:
- if (fixp->fx_pcrel)
+ if (fixP->fx_pcrel)
abort ();
- md_number_to_chars (fixp->fx_frag->fr_literal + fixp->fx_where,
- value >> 16, 2);
+ md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where,
+ PPC_HI (value), 2);
break;
+
case BFD_RELOC_HI16_S:
- if (fixp->fx_pcrel)
+ if (fixP->fx_pcrel)
+ abort ();
+ md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where,
+ PPC_HA (value), 2);
+ break;
+
+#ifdef OBJ_ELF
+#if BFD_DEFAULT_TARGET_SIZE == 64
+ case BFD_RELOC_PPC64_HIGHER:
+ if (fixP->fx_pcrel)
+ abort ();
+ md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where,
+ PPC_HIGHER (value), 2);
+ break;
+
+ case BFD_RELOC_PPC64_HIGHER_S:
+ if (fixP->fx_pcrel)
+ abort ();
+ md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where,
+ PPC_HIGHERA (value), 2);
+ break;
+
+ case BFD_RELOC_PPC64_HIGHEST:
+ if (fixP->fx_pcrel)
+ abort ();
+ md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where,
+ PPC_HIGHEST (value), 2);
+ break;
+
+ case BFD_RELOC_PPC64_HIGHEST_S:
+ if (fixP->fx_pcrel)
abort ();
- md_number_to_chars (fixp->fx_frag->fr_literal + fixp->fx_where,
- (value + 0x8000) >> 16, 2);
+ md_number_to_chars (fixP->fx_frag->fr_literal + fixP->fx_where,
+ PPC_HIGHESTA (value), 2);
break;
+ case BFD_RELOC_PPC64_ADDR16_DS:
+ case BFD_RELOC_PPC64_ADDR16_LO_DS:
+ case BFD_RELOC_PPC64_GOT16_DS:
+ case BFD_RELOC_PPC64_GOT16_LO_DS:
+ case BFD_RELOC_PPC64_PLT16_LO_DS:
+ case BFD_RELOC_PPC64_SECTOFF_DS:
+ case BFD_RELOC_PPC64_SECTOFF_LO_DS:
+ case BFD_RELOC_PPC64_TOC16_DS:
+ case BFD_RELOC_PPC64_TOC16_LO_DS:
+ case BFD_RELOC_PPC64_PLTGOT16_DS:
+ case BFD_RELOC_PPC64_PLTGOT16_LO_DS:
+ if (fixP->fx_pcrel)
+ abort ();
+ {
+ unsigned char *where = fixP->fx_frag->fr_literal + fixP->fx_where;
+ unsigned long val;
+
+ if (target_big_endian)
+ val = bfd_getb16 (where);
+ else
+ val = bfd_getl16 (where);
+ val |= (value & 0xfffc);
+ if (target_big_endian)
+ bfd_putb16 ((bfd_vma) val, where);
+ else
+ bfd_putl16 ((bfd_vma) val, where);
+ }
+ break;
+#endif
+#endif
/* Because SDA21 modifies the register field, the size is set to 4
- bytes, rather than 2, so offset it here appropriately */
+ bytes, rather than 2, so offset it here appropriately. */
case BFD_RELOC_PPC_EMB_SDA21:
- if (fixp->fx_pcrel)
+ if (fixP->fx_pcrel)
abort ();
- md_number_to_chars (fixp->fx_frag->fr_literal + fixp->fx_where
+ 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)
+ if (fixP->fx_pcrel)
abort ();
- md_number_to_chars (fixp->fx_frag->fr_literal + fixp->fx_where,
+ 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)
+ 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);
- }
+ 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"),
+ (long) 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);
+ 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;
+ fixP->fx_done = 0;
break;
+#ifdef OBJ_ELF
+#if BFD_DEFAULT_TARGET_SIZE == 64
+ /* Generated by reference to `sym@tocbase'. The sym is
+ ignored by the linker. */
+ case BFD_RELOC_PPC64_TOC:
+ fixP->fx_done = 0;
+ break;
+#endif
+#endif
default:
fprintf (stderr,
- _("Gas failure, reloc value %d\n"), fixp->fx_r_type);
- fflush(stderr);
+ _("Gas failure, reloc value %d\n"), fixP->fx_r_type);
+ fflush (stderr);
abort ();
}
}
#ifdef OBJ_ELF
- fixp->fx_addnumber = value;
+ fixP->fx_addnumber = value;
#else
- if (fixp->fx_r_type != BFD_RELOC_PPC_TOC16)
- fixp->fx_addnumber = 0;
+ if (fixP->fx_r_type != BFD_RELOC_PPC_TOC16)
+ fixP->fx_addnumber = 0;
else
{
#ifdef TE_PE
- fixp->fx_addnumber = 0;
+ 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));
+ fixP->fx_addnumber =
+ - bfd_get_section_vma (stdoutput, S_GET_SEGMENT (fixP->fx_addsy));
#endif
}
#endif
-
- return 1;
}
/* Generate a reloc for a fixup. */
@@ -5174,7 +5531,8 @@ tc_gen_reloc (seg, fixp)
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);
+ _("reloc %d not supported by object file format"),
+ (int) fixp->fx_r_type);
return NULL;
}
reloc->addend = fixp->fx_addnumber;
diff --git a/contrib/binutils/gas/config/tc-ppc.h b/contrib/binutils/gas/config/tc-ppc.h
index c2876bf..f4d2f86 100644
--- a/contrib/binutils/gas/config/tc-ppc.h
+++ b/contrib/binutils/gas/config/tc-ppc.h
@@ -1,5 +1,5 @@
/* tc-ppc.h -- Header file for tc-ppc.c.
- Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support.
@@ -56,7 +56,7 @@ extern int target_big_endian;
/* The target BFD format. */
#define TARGET_FORMAT (ppc_target_format ())
-extern char* ppc_target_format ();
+extern char *ppc_target_format PARAMS ((void));
/* Permit temporary numeric labels. */
#define LOCAL_LABELS_FB 1
@@ -82,8 +82,34 @@ extern char* ppc_target_format ();
/* 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
+#define MAX_MEM_FOR_RS_ALIGN_CODE 4
+#define HANDLE_ALIGN(FRAGP) \
+ if ((FRAGP)->fr_type == rs_align_code) \
+ { \
+ valueT count = ((FRAGP)->fr_next->fr_address \
+ - ((FRAGP)->fr_address + (FRAGP)->fr_fix)); \
+ if (count != 0 && (count & 3) == 0) \
+ { \
+ unsigned char *dest = (FRAGP)->fr_literal + (FRAGP)->fr_fix; \
+ \
+ (FRAGP)->fr_var = 4; \
+ if (target_big_endian) \
+ { \
+ *dest++ = 0x60; \
+ *dest++ = 0; \
+ *dest++ = 0; \
+ *dest++ = 0; \
+ } \
+ else \
+ { \
+ *dest++ = 0; \
+ *dest++ = 0; \
+ *dest++ = 0; \
+ *dest++ = 0x60; \
+ } \
+ } \
+ }
+
#ifdef TE_PE
@@ -197,6 +223,8 @@ do { \
|| (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 \
+ || (BFD_DEFAULT_TARGET_SIZE == 64 \
+ && (FIXP)->fx_r_type == BFD_RELOC_PPC64_TOC) \
|| (FIXP)->fx_r_type == BFD_RELOC_VTABLE_INHERIT \
|| (FIXP)->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
@@ -216,6 +244,12 @@ extern int ppc_section_flags PARAMS ((int, int, int));
#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)
+#if BFD_DEFAULT_TARGET_SIZE == 64
+/* Extra sections for 64-bit ELF PPC. */
+#define ELF_TC_SPECIAL_SECTIONS \
+ { ".toc", SHT_PROGBITS, SHF_ALLOC + SHF_WRITE}, \
+ { ".tocbss", SHT_NOBITS, SHF_ALLOC + SHF_WRITE},
+#else
/* 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. */
@@ -227,26 +261,14 @@ extern int ppc_section_flags PARAMS ((int, int, int));
{ ".sbss2", SHT_PROGBITS, SHF_ALLOC }, \
{ ".PPC.EMB.sdata0", SHT_PROGBITS, SHF_ALLOC }, \
{ ".PPC.EMB.sbss0", SHT_PROGBITS, SHF_ALLOC },
+#endif
#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)))
+#define tc_fix_adjustable(fixp) ppc_fix_adjustable (fixp)
+extern int ppc_fix_adjustable PARAMS ((struct fix *));
/* We must never ever try to resolve references to externally visible
symbols in the assembler, because the .o file might go into a shared
@@ -258,17 +280,20 @@ extern const char *ppc_comment_chars;
&& S_IS_DEFINED ((FIX)->fx_addsy) \
&& ! S_IS_COMMON ((FIX)->fx_addsy)))
+#if BFD_DEFAULT_TARGET_SIZE == 64
+/* Finish up the symbol. */
+#define tc_frob_symbol(sym, punt) punt = ppc_elf_frob_symbol (sym)
+extern int ppc_elf_frob_symbol PARAMS ((symbolS *));
+#endif
+
#define DWARF2_LINE_MIN_INSN_LENGTH 4
#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)
+#define md_parse_name(name, exp, c) 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 558dc89..fe9f3f7 100644
--- a/contrib/binutils/gas/config/tc-sparc.c
+++ b/contrib/binutils/gas/config/tc-sparc.c
@@ -20,9 +20,9 @@
Boston, MA 02111-1307, USA. */
#include <stdio.h>
-#include <ctype.h>
#include "as.h"
+#include "safe-ctype.h"
#include "subsegs.h"
#include "opcode/sparc.h"
@@ -632,12 +632,12 @@ md_show_usage (stream)
continue;
if (arch != &sparc_arch_table[0])
fprintf (stream, " | ");
- if (column + strlen(arch->name) > 70)
+ if (column + strlen (arch->name) > 70)
{
column = 0;
fputc ('\n', stream);
}
- column += 5 + 2 + strlen(arch->name);
+ column += 5 + 2 + strlen (arch->name);
fprintf (stream, "-A%s", arch->name);
}
for (arch = &sparc_arch_table[0]; arch->name; arch++)
@@ -645,12 +645,12 @@ md_show_usage (stream)
if (!arch->user_option_p)
continue;
fprintf (stream, " | ");
- if (column + strlen(arch->name) > 65)
+ if (column + strlen (arch->name) > 65)
{
column = 0;
fputc ('\n', stream);
}
- column += 5 + 7 + strlen(arch->name);
+ column += 5 + 7 + strlen (arch->name);
fprintf (stream, "-xarch=%s", arch->name);
}
fprintf (stream, _("\n\
@@ -1385,11 +1385,11 @@ sparc_ip (str, pinsn)
int special_case = SPECIAL_CASE_NONE;
s = str;
- if (islower ((unsigned char) *s))
+ if (ISLOWER (*s))
{
do
++s;
- while (islower ((unsigned char) *s) || isdigit ((unsigned char) *s));
+ while (ISLOWER (*s) || ISDIGIT (*s));
}
switch (*s)
@@ -1617,11 +1617,11 @@ sparc_ip (str, pinsn)
{
s += 4;
- if (isdigit ((unsigned char) *s))
+ if (ISDIGIT (*s))
{
long num = 0;
- while (isdigit ((unsigned char) *s))
+ while (ISDIGIT (*s))
{
num = num * 10 + *s - '0';
++s;
@@ -1825,9 +1825,9 @@ sparc_ip (str, pinsn)
break;
case '#': /* Must be at least one digit. */
- if (isdigit ((unsigned char) *s++))
+ if (ISDIGIT (*s++))
{
- while (isdigit ((unsigned char) *s))
+ while (ISDIGIT (*s))
{
++s;
}
@@ -1846,10 +1846,10 @@ sparc_ip (str, pinsn)
case 'b': /* Next operand is a coprocessor register. */
case 'c':
case 'D':
- if (*s++ == '%' && *s++ == 'c' && isdigit ((unsigned char) *s))
+ if (*s++ == '%' && *s++ == 'c' && ISDIGIT (*s))
{
mask = *s++;
- if (isdigit ((unsigned char) *s))
+ if (ISDIGIT (*s))
{
mask = 10 * (mask - '0') + (*s++ - '0');
if (mask >= 32)
@@ -1942,7 +1942,7 @@ sparc_ip (str, pinsn)
goto error;
case 'r': /* any register */
- if (!isdigit ((unsigned char) (c = *s++)))
+ if (!ISDIGIT ((c = *s++)))
{
goto error;
}
@@ -1957,7 +1957,7 @@ sparc_ip (str, pinsn)
case '7':
case '8':
case '9':
- if (isdigit ((unsigned char) *s))
+ if (ISDIGIT (*s))
{
if ((c = 10 * (c - '0') + (*s++ - '0')) >= 32)
{
@@ -2022,9 +2022,9 @@ sparc_ip (str, pinsn)
if (*s++ == '%'
&& ((format = *s) == 'f')
- && isdigit ((unsigned char) *++s))
+ && ISDIGIT (*++s))
{
- for (mask = 0; isdigit ((unsigned char) *s); ++s)
+ for (mask = 0; ISDIGIT (*s); ++s)
{
mask = 10 * mask + (*s - '0');
} /* read the number */
@@ -2240,7 +2240,7 @@ sparc_ip (str, pinsn)
for (s1 = s; *s1 && *s1 != ',' && *s1 != ']'; s1++)
;
- if (s1 != s && isdigit ((unsigned char) s1[-1]))
+ if (s1 != s && ISDIGIT (s1[-1]))
{
if (s1[-2] == '%' && s1[-3] == '+')
s1 -= 3;
@@ -2663,7 +2663,7 @@ parse_keyword_arg (lookup_fn, input_pointerP, valueP)
p = *input_pointerP;
for (q = p + (*p == '#' || *p == '%');
- isalnum ((unsigned char) *q) || *q == '_';
+ ISALNUM (*q) || *q == '_';
++q)
continue;
c = *q;
@@ -2881,18 +2881,16 @@ md_number_to_chars (buf, val, n)
/* Apply a fixS to the frags, now that we know the value it ought to
hold. */
-int
-md_apply_fix3 (fixP, value, segment)
+void
+md_apply_fix3 (fixP, valP, segment)
fixS *fixP;
- valueT *value;
+ valueT *valP;
segT segment;
{
char *buf = fixP->fx_where + fixP->fx_frag->fr_literal;
- offsetT val;
+ offsetT val = * (offsetT *) valP;
long insn;
- val = *value;
-
assert (fixP->fx_r_type < BFD_RELOC_UNUSED);
fixP->fx_addnumber = val; /* Remember value for emit_reloc. */
@@ -2905,22 +2903,25 @@ md_apply_fix3 (fixP, value, segment)
don't want to include the value of an externally visible symbol. */
if (fixP->fx_addsy != NULL)
{
- if (symbol_used_in_reloc_p (fixP->fx_addsy)
- && (S_IS_EXTERNAL (fixP->fx_addsy)
- || S_IS_WEAK (fixP->fx_addsy)
+ symbolS * sym = fixP->fx_addsy;
+ segT seg = S_GET_SEGMENT (sym);
+
+ if (symbol_used_in_reloc_p (sym)
+ && (S_IS_EXTERNAL (sym)
+ || S_IS_WEAK (sym)
+ || (seg->flags & SEC_MERGE)
|| (sparc_pic_code && ! fixP->fx_pcrel)
- || (S_GET_SEGMENT (fixP->fx_addsy) != segment
- && ((bfd_get_section_flags (stdoutput,
- S_GET_SEGMENT (fixP->fx_addsy))
- & SEC_LINK_ONCE) != 0
- || strncmp (segment_name (S_GET_SEGMENT (fixP->fx_addsy)),
- ".gnu.linkonce",
- sizeof ".gnu.linkonce" - 1) == 0)))
- && 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)))
- fixP->fx_addnumber -= S_GET_VALUE (fixP->fx_addsy);
- return 1;
+ || (seg != segment
+ && (((bfd_get_section_flags (stdoutput, seg) & SEC_LINK_ONCE) != 0)
+ || (strncmp (segment_name (seg),
+ ".gnu.linkonce",
+ sizeof ".gnu.linkonce" - 1) == 0))))
+ && seg != absolute_section
+ && seg != undefined_section
+ && ! bfd_is_com_section (seg))
+ fixP->fx_addnumber -= S_GET_VALUE (sym);
+
+ return;
}
#endif
@@ -2991,7 +2992,7 @@ md_apply_fix3 (fixP, value, segment)
|| fixP->fx_r_type == BFD_RELOC_VTABLE_ENTRY)
{
fixP->fx_done = 0;
- return 1;
+ return;
}
else
{
@@ -3163,14 +3164,10 @@ md_apply_fix3 (fixP, value, segment)
case BFD_RELOC_SPARC_LM22:
case BFD_RELOC_HI22:
if (!fixP->fx_addsy)
- {
- insn |= (val >> 10) & 0x3fffff;
- }
+ insn |= (val >> 10) & 0x3fffff;
else
- {
- /* FIXME: Need comment explaining why we do this. */
- insn &= ~0xffff;
- }
+ /* FIXME: Need comment explaining why we do this. */
+ insn &= ~0xffff;
break;
case BFD_RELOC_SPARC22:
@@ -3186,14 +3183,10 @@ md_apply_fix3 (fixP, value, segment)
case BFD_RELOC_LO10:
if (!fixP->fx_addsy)
- {
- insn |= val & 0x3ff;
- }
+ insn |= val & 0x3ff;
else
- {
- /* FIXME: Need comment explaining why we do this. */
- insn &= ~0xff;
- }
+ /* FIXME: Need comment explaining why we do this. */
+ insn &= ~0xff;
break;
case BFD_RELOC_SPARC_OLO10:
@@ -3264,8 +3257,6 @@ md_apply_fix3 (fixP, value, segment)
/* Are we finished with this relocation now? */
if (fixP->fx_addsy == 0 && !fixP->fx_pcrel)
fixP->fx_done = 1;
-
- return 1;
}
/* Translate internal representation of relocation info to BFD target
@@ -3322,6 +3313,12 @@ tc_gen_reloc (section, fixp)
case BFD_RELOC_SPARC_UA16:
case BFD_RELOC_SPARC_UA32:
case BFD_RELOC_SPARC_UA64:
+ case BFD_RELOC_8_PCREL:
+ case BFD_RELOC_16_PCREL:
+ case BFD_RELOC_32_PCREL:
+ case BFD_RELOC_64_PCREL:
+ case BFD_RELOC_SPARC_PLT32:
+ case BFD_RELOC_SPARC_PLT64:
case BFD_RELOC_VTABLE_ENTRY:
case BFD_RELOC_VTABLE_INHERIT:
code = fixp->fx_r_type;
@@ -3411,9 +3408,11 @@ tc_gen_reloc (section, fixp)
#else /* elf or coff */
- if (reloc->howto->pc_relative == 0
- || code == BFD_RELOC_SPARC_PC10
- || code == BFD_RELOC_SPARC_PC22)
+ if (code != BFD_RELOC_32_PCREL_S2
+ && code != BFD_RELOC_SPARC_WDISP22
+ && code != BFD_RELOC_SPARC_WDISP16
+ && code != BFD_RELOC_SPARC_WDISP19
+ && code != BFD_RELOC_SPARC_WPLT30)
reloc->addend = fixp->fx_addnumber;
else if (symbol_section_p (fixp->fx_addsy))
reloc->addend = (section->vma
@@ -3909,6 +3908,11 @@ s_proc (ignore)
static int sparc_no_align_cons = 0;
+/* This static variable is set by sparc_cons to emit requested types
+ of relocations in cons_fix_new_sparc. */
+
+static const char *sparc_cons_special_reloc;
+
/* This handles the unaligned space allocation pseudo-ops, such as
.uaword. .uaword is just like .word, but the value does not need
to be aligned. */
@@ -3920,6 +3924,7 @@ s_uacons (bytes)
/* Tell sparc_cons_align not to align this value. */
sparc_no_align_cons = 1;
cons (bytes);
+ sparc_no_align_cons = 0;
}
/* This handles the native word allocation pseudo-op .nword.
@@ -4180,6 +4185,134 @@ sparc_elf_final_processing ()
else if (current_architecture == SPARC_OPCODE_ARCH_V9B)
elf_elfheader (stdoutput)->e_flags |= EF_SPARC_SUN_US1|EF_SPARC_SUN_US3;
}
+
+void
+sparc_cons (exp, size)
+ expressionS *exp;
+ int size;
+{
+ char *save;
+
+ SKIP_WHITESPACE ();
+ sparc_cons_special_reloc = NULL;
+ save = input_line_pointer;
+ if (input_line_pointer[0] == '%'
+ && input_line_pointer[1] == 'r'
+ && input_line_pointer[2] == '_')
+ {
+ if (strncmp (input_line_pointer + 3, "disp", 4) == 0)
+ {
+ input_line_pointer += 7;
+ sparc_cons_special_reloc = "disp";
+ }
+ else if (strncmp (input_line_pointer + 3, "plt", 3) == 0)
+ {
+ if (size != 4 && size != 8)
+ as_bad (_("Illegal operands: %%r_plt in %d-byte data field"), size);
+ else
+ {
+ input_line_pointer += 6;
+ sparc_cons_special_reloc = "plt";
+ }
+ }
+ if (sparc_cons_special_reloc)
+ {
+ int bad = 0;
+
+ switch (size)
+ {
+ case 1:
+ if (*input_line_pointer != '8')
+ bad = 1;
+ input_line_pointer--;
+ break;
+ case 2:
+ if (input_line_pointer[0] != '1' || input_line_pointer[1] != '6')
+ bad = 1;
+ break;
+ case 4:
+ if (input_line_pointer[0] != '3' || input_line_pointer[1] != '2')
+ bad = 1;
+ break;
+ case 8:
+ if (input_line_pointer[0] != '6' || input_line_pointer[1] != '4')
+ bad = 1;
+ break;
+ default:
+ bad = 1;
+ break;
+ }
+
+ if (bad)
+ {
+ as_bad (_("Illegal operands: Only %%r_%s%d allowed in %d-byte data fields"),
+ sparc_cons_special_reloc, size * 8, size);
+ }
+ else
+ {
+ input_line_pointer += 2;
+ if (*input_line_pointer != '(')
+ {
+ as_bad (_("Illegal operands: %%r_%s%d requires arguments in ()"),
+ sparc_cons_special_reloc, size * 8);
+ bad = 1;
+ }
+ }
+
+ if (bad)
+ {
+ input_line_pointer = save;
+ sparc_cons_special_reloc = NULL;
+ }
+ else
+ {
+ int c;
+ char *end = ++input_line_pointer;
+ int npar = 0;
+
+ while (! is_end_of_line[(c = *end)])
+ {
+ if (c == '(')
+ npar++;
+ else if (c == ')')
+ {
+ if (!npar)
+ break;
+ npar--;
+ }
+ end++;
+ }
+
+ if (c != ')')
+ as_bad (_("Illegal operands: %%r_%s%d requires arguments in ()"),
+ sparc_cons_special_reloc, size * 8);
+ else
+ {
+ *end = '\0';
+ expression (exp);
+ *end = c;
+ if (input_line_pointer != end)
+ {
+ as_bad (_("Illegal operands: %%r_%s%d requires arguments in ()"),
+ sparc_cons_special_reloc, size * 8);
+ }
+ else
+ {
+ input_line_pointer++;
+ SKIP_WHITESPACE ();
+ c = *input_line_pointer;
+ if (! is_end_of_line[c] && c != ',')
+ as_bad (_("Illegal operands: garbage after %%r_%s%d()"),
+ sparc_cons_special_reloc, size * 8);
+ }
+ }
+ }
+ }
+ }
+ if (sparc_cons_special_reloc == NULL)
+ expression (exp);
+}
+
#endif
/* This is called by emit_expr via TC_CONS_FIX_NEW when creating a
@@ -4204,7 +4337,25 @@ cons_fix_new_sparc (frag, where, nbytes, exp)
&& now_seg->flags & SEC_ALLOC)
r = BFD_RELOC_SPARC_REV32;
- if (sparc_no_align_cons)
+ if (sparc_cons_special_reloc)
+ {
+ if (*sparc_cons_special_reloc == 'd')
+ switch (nbytes)
+ {
+ case 1: r = BFD_RELOC_8_PCREL; break;
+ case 2: r = BFD_RELOC_16_PCREL; break;
+ case 4: r = BFD_RELOC_32_PCREL; break;
+ case 8: r = BFD_RELOC_64_PCREL; break;
+ default: abort ();
+ }
+ else
+ switch (nbytes)
+ {
+ case 4: r = BFD_RELOC_SPARC_PLT32; break;
+ case 8: r = BFD_RELOC_SPARC_PLT64; break;
+ }
+ }
+ else if (sparc_no_align_cons)
{
switch (nbytes)
{
@@ -4213,8 +4364,7 @@ cons_fix_new_sparc (frag, where, nbytes, exp)
case 8: r = BFD_RELOC_SPARC_UA64; break;
default: abort ();
}
- sparc_no_align_cons = 0;
- }
+ }
fix_new_exp (frag, where, (int) nbytes, exp, 0, r);
}
diff --git a/contrib/binutils/gas/config/tc-sparc.h b/contrib/binutils/gas/config/tc-sparc.h
index ce19f5d..5d545de 100644
--- a/contrib/binutils/gas/config/tc-sparc.h
+++ b/contrib/binutils/gas/config/tc-sparc.h
@@ -1,6 +1,6 @@
/* tc-sparc.h - Macros and type defines for the sparc.
Copyright 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000 Free Software Foundation, Inc.
+ 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -54,7 +54,7 @@ extern const char *sparc_target_format PARAMS ((void));
#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 "
@@ -110,9 +110,6 @@ extern void sparc_handle_align PARAMS ((struct frag *));
extern int elf32_sparc_force_relocation PARAMS ((struct fix *));
#endif
-#define MD_APPLY_FIX3
-#define TC_HANDLES_FX_DONE
-
#ifdef OBJ_ELF
/* Keep relocations against global symbols. Don't turn them into
relocations against sections. This is required for the dynamic
@@ -169,6 +166,11 @@ extern void sparc_md_end PARAMS ((void));
#endif
+#ifdef OBJ_ELF
+#define TC_PARSE_CONS_EXPRESSION(EXP, NBYTES) sparc_cons (EXP, NBYTES)
+extern void sparc_cons PARAMS ((expressionS *, int));
+#endif
+
#define TC_CONS_FIX_NEW cons_fix_new_sparc
extern void cons_fix_new_sparc
PARAMS ((struct frag *, int, unsigned int, struct expressionS *));
diff --git a/contrib/binutils/gas/depend.c b/contrib/binutils/gas/depend.c
index c6538dd..3c6049d 100644
--- a/contrib/binutils/gas/depend.c
+++ b/contrib/binutils/gas/depend.c
@@ -1,5 +1,5 @@
/* depend.c - Handle dependency tracking.
- Copyright 1997, 1998, 2000 Free Software Foundation, Inc.
+ Copyright 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -21,15 +21,16 @@
#include "as.h"
/* The file to write to, or NULL if no dependencies being kept. */
-static char *dep_file = NULL;
+static char * dep_file = NULL;
-struct dependency {
- char *file;
- struct dependency *next;
-};
+struct dependency
+ {
+ char * file;
+ struct dependency * next;
+ };
/* All the files we depend on. */
-static struct dependency *dep_chain = NULL;
+static struct dependency * dep_chain = NULL;
/* Current column in output file. */
static int column = 0;
@@ -86,9 +87,11 @@ quote_string_for_make (file, src)
{
char *p = src;
int i = 0;
+
for (;;)
{
char c = *p++;
+
switch (c)
{
case '\0':
@@ -102,6 +105,7 @@ quote_string_for_make (file, src)
the end of a file name; and backslashes in other
contexts should not be doubled. */
char *q;
+
for (q = p - 1; src < q && q[-1] == '\\'; q--)
{
if (file)
@@ -190,10 +194,10 @@ print_dependencies ()
if (dep_file == NULL)
return;
- f = fopen (dep_file, "w");
+ f = fopen (dep_file, FOPEN_WT);
if (f == NULL)
{
- as_warn (_("Can't open `%s' for writing"), dep_file);
+ as_warn (_("can't open `%s' for writing"), dep_file);
return;
}
@@ -205,5 +209,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 60761a4..566038c 100644
--- a/contrib/binutils/gas/doc/Makefile.am
+++ b/contrib/binutils/gas/doc/Makefile.am
@@ -5,6 +5,14 @@ AUTOMAKE_OPTIONS = cygnus
# What version of the manual you want; "all" includes everything
CONFIG=all
+# Options to extract the man page from as.texinfo
+MANCONF = -Dman
+
+TEXI2POD = perl $(top_srcdir)/../etc/texi2pod.pl
+
+POD2MAN = pod2man --center="GNU Development Tools" \
+ --release="binutils-$(VERSION)" --section=1
+
man_MANS = as.1
info_TEXINFOS = as.texinfo gasp.texi
@@ -30,9 +38,13 @@ CPU_DOCS = \
c-m32r.texi \
c-m68hc11.texi \
c-m68k.texi \
+ c-m88k.texi \
c-mips.texi \
+ c-mmix.texi \
c-ns32k.texi \
+ c-pdp11.texi \
c-pj.texi \
+ c-ppc.texi \
c-sh.texi \
c-sparc.texi \
c-tic54x.texi \
@@ -54,3 +66,20 @@ noinst_TEXINFOS = internals.texi
DISTCLEANFILES = asconfig.texi
MAINTAINERCLEANFILES = gasver.texi
+
+# Maintenance
+
+# We need it for the taz target in ../../Makefile.in.
+info: $(MANS)
+
+# Build the man page from the texinfo file
+# The sed command removes the no-adjust Nroff command so that
+# the man output looks standard.
+as.1: $(srcdir)/as.texinfo
+ touch $@
+ -$(TEXI2POD) $(MANCONF) < $(srcdir)/as.texinfo > as.pod
+ -($(POD2MAN) as.pod | \
+ sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || \
+ (rm -f $@.T$$$$ && exit 1)
+ rm -f as.pod
diff --git a/contrib/binutils/gas/doc/Makefile.in b/contrib/binutils/gas/doc/Makefile.in
index 1f48577..147c5e7 100644
--- a/contrib/binutils/gas/doc/Makefile.in
+++ b/contrib/binutils/gas/doc/Makefile.in
@@ -121,6 +121,15 @@ AUTOMAKE_OPTIONS = cygnus
# What version of the manual you want; "all" includes everything
CONFIG = all
+# Options to extract the man page from as.texinfo
+MANCONF = -Dman
+
+TEXI2POD = perl $(top_srcdir)/../etc/texi2pod.pl
+
+POD2MAN = pod2man --center="GNU Development Tools" \
+ --release="binutils-$(VERSION)" --section=1
+
+
man_MANS = as.1
info_TEXINFOS = as.texinfo gasp.texi
@@ -140,9 +149,13 @@ CPU_DOCS = \
c-m32r.texi \
c-m68hc11.texi \
c-m68k.texi \
+ c-m88k.texi \
c-mips.texi \
+ c-mmix.texi \
c-ns32k.texi \
+ c-pdp11.texi \
c-pj.texi \
+ c-ppc.texi \
c-sh.texi \
c-sparc.texi \
c-tic54x.texi \
@@ -447,6 +460,23 @@ gasver.texi: Makefile
as.info: $(srcdir)/as.texinfo asconfig.texi gasver.texi $(CPU_DOCS)
as.dvi: $(srcdir)/as.texinfo asconfig.texi gasver.texi $(CPU_DOCS)
+# Maintenance
+
+# We need it for the taz target in ../../Makefile.in.
+info: $(MANS)
+
+# Build the man page from the texinfo file
+# The sed command removes the no-adjust Nroff command so that
+# the man output looks standard.
+as.1: $(srcdir)/as.texinfo
+ touch $@
+ -$(TEXI2POD) $(MANCONF) < $(srcdir)/as.texinfo > as.pod
+ -($(POD2MAN) as.pod | \
+ sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || \
+ (rm -f $@.T$$$$ && exit 1)
+ rm -f as.pod
+
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/contrib/binutils/gas/doc/all.texi b/contrib/binutils/gas/doc/all.texi
index 719c80a..9253203 100644
--- a/contrib/binutils/gas/doc/all.texi
+++ b/contrib/binutils/gas/doc/all.texi
@@ -41,9 +41,13 @@
@set M32R
@set M68HC11
@set M680X0
+@set M880X0
@set MCORE
@set MIPS
+@set MMIX
+@set PDP11
@set PJ
+@set PPC
@set SH
@set SPARC
@set C54X
diff --git a/contrib/binutils/gas/doc/as.texinfo b/contrib/binutils/gas/doc/as.texinfo
index 01b3c50..3d7fef5 100644
--- a/contrib/binutils/gas/doc/as.texinfo
+++ b/contrib/binutils/gas/doc/as.texinfo
@@ -13,12 +13,50 @@
@c %**start of header
@setfilename as.info
@c ---config---
+@macro gcctabopt{body}
+@code{\body\}
+@end macro
@c defaults, config file may override:
@set have-stabs
@c ---
@include asconfig.texi
@include gasver.texi
@c ---
+@c man begin NAME
+@ifset man
+@c Configure for the generation of man pages
+@set AS as
+@set TARGET TARGET
+@set GENERIC
+@set A29K
+@set ARC
+@set ARM
+@set D10V
+@set D30V
+@set H8/300
+@set H8/500
+@set HPPA
+@set I370
+@set I80386
+@set I860
+@set I960
+@set M32R
+@set M68HC11
+@set M680X0
+@set M880X0
+@set MCORE
+@set MIPS
+@set MMIX
+@set PDP11
+@set PJ
+@set PPC
+@set SH
+@set SPARC
+@set C54X
+@set V850
+@set VAX
+@end ifset
+@c man end
@c common OR combinations of conditions
@ifset AOUT
@set aout-bout
@@ -88,14 +126,17 @@ END-INFO-DIR-ENTRY
@ifinfo
This file documents the GNU Assembler "@value{AS}".
+@c man begin COPYRIGHT
Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc.
- Permission is granted to copy, distribute and/or modify this document
- under the terms of the GNU Free Documentation License, Version 1.1
- or any later version published by the Free Software Foundation;
- with no Invariant Sections, with no Front-Cover Texts, and with no
- Back-Cover Texts. A copy of the license is included in the
- section entitled "GNU Free Documentation License".
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.1
+or any later version published by the Free Software Foundation;
+with no Invariant Sections, with no Front-Cover Texts, and with no
+Back-Cover Texts. A copy of the license is included in the
+section entitled "GNU Free Documentation License".
+
+@c man end
@ignore
Permission is granted to process this file through Tex and print the
@@ -118,7 +159,7 @@ notice identical to this one except for the removal of this paragraph
@sp 13
The Free Software Foundation Inc. thanks The Nice Computer
Company of Australia for loaning Dean Elsner to write the
-first (Vax) version of @code{as} for Project @sc{gnu}.
+first (Vax) version of @command{as} for Project @sc{gnu}.
The proprietors, management and staff of TNCCA thank FSF for
distracting the boss while they got some work
done.
@@ -154,10 +195,10 @@ Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Sof
@node Top
@top Using @value{AS}
-This file is a user guide to the @sc{gnu} assembler @code{@value{AS}} version
+This file is a user guide to the @sc{gnu} assembler @command{@value{AS}} version
@value{VERSION}.
@ifclear GENERIC
-This version of the file describes @code{@value{AS}} configured to generate
+This version of the file describes @command{@value{AS}} configured to generate
code for @value{TARGET} architectures.
@end ifclear
@@ -184,9 +225,9 @@ section entitled "GNU Free Documentation License".
@node Overview
@chapter Overview
@iftex
-This manual is a user guide to the @sc{gnu} assembler @code{@value{AS}}.
+This manual is a user guide to the @sc{gnu} assembler @command{@value{AS}}.
@ifclear GENERIC
-This version of the manual describes @code{@value{AS}} configured to generate
+This version of the manual describes @command{@value{AS}} configured to generate
code for @value{TARGET} architectures.
@end ifclear
@end iftex
@@ -194,45 +235,64 @@ code for @value{TARGET} architectures.
@cindex invocation summary
@cindex option summary
@cindex summary of options
-Here is a brief summary of how to invoke @code{@value{AS}}. For details,
+Here is a brief summary of how to invoke @command{@value{AS}}. For details,
@pxref{Invoking,,Comand-Line Options}.
+@c man title AS the portable GNU assembler.
+
+@ignore
+@c man begin SEEALSO
+gcc(1), ld(1), and the Info entries for @file{binutils} and @file{ld}.
+@c man end
+@end ignore
+
@c We don't use deffn and friends for the following because they seem
@c to be limited to one line for the header.
@smallexample
-@value{AS} [ -a[cdhlns][=file] ] [ -D ] [ --defsym @var{sym}=@var{val} ]
- [ -f ] [ --gstabs ] [ --gdwarf2 ] [ --help ] [ -I @var{dir} ] [ -J ] [ -K ] [ -L ]
- [ --keep-locals ] [ -o @var{objfile} ] [ -R ] [ --statistics ] [ -v ]
- [ -version ] [ --version ] [ -W ] [ --warn ] [ --fatal-warnings ]
- [ -w ] [ -x ] [ -Z ] [ --target-help ]
+@c man begin SYNOPSIS
+@value{AS} [@b{-a}[@b{cdhlns}][=@var{file}]] [@b{-D}] [@b{--defsym} @var{sym}=@var{val}]
+ [@b{-f}] [@b{--gstabs}] [@b{--gdwarf2}] [@b{--help}] [@b{-I} @var{dir}]
+ [@b{-J}] [@b{-K}] [@b{-L}]
+ [@b{--listing-lhs-width}=@var{NUM}] [@b{--listing-lhs-width2}=@var{NUM}]
+ [@b{--listing-rhs-width}=@var{NUM}] [@b{--listing-cont-lines}=@var{NUM}]
+ [@b{--keep-locals}] [@b{-o} @var{objfile}] [@b{-R}] [@b{--statistics}] [@b{-v}]
+ [@b{-version}] [@b{--version}] [@b{-W}] [@b{--warn}] [@b{--fatal-warnings}]
+ [@b{-w}] [@b{-x}] [@b{-Z}] [@b{--target-help}] [@var{target-options}]
+ [@b{--}|@var{files} @dots{}]
+@c
+@c Target dependent options are listed below. Keep the list sorted.
+@c Add an empty line for separation.
@ifset A29K
@c am29k has no machine-dependent assembler options
@end ifset
@ifset ARC
- [ -marc[5|6|7|8] ]
- [ -EB | -EL ]
+
+@emph{Target ARC options:}
+ [@b{-marc[5|6|7|8]}]
+ [@b{-EB}|@b{-EL}]
@end ifset
@ifset ARM
- [ -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 | -[arm]v5te ]
- [ -mthumb | -mall ]
- [ -mfpa10 | -mfpa11 | -mfpe-old | -mno-fpu ]
- [ -EB | -EL ]
- [ -mapcs-32 | -mapcs-26 | -mapcs-float | -mapcs-reentrant ]
- [ -mthumb-interwork ]
- [ -moabi ]
- [ -k ]
+
+@emph{Target ARM options:}
+@c Don't document the deprecated options
+ [@b{-mcpu}=@var{processor}[+@var{extension}@dots{}]]
+ [@b{-march}=@var{architecture}[+@var{extension}@dots{}]]
+ [@b{-mfpu}=@var{floating-point-fromat}]
+ [@b{-mthumb}]
+ [@b{-EB}|@b{-EL}]
+ [@b{-mapcs-32}|@b{-mapcs-26}|@b{-mapcs-float}|
+ @b{-mapcs-reentrant}]
+ [@b{-mthumb-interwork}] [@b{-moabi}] [@b{-k}]
@end ifset
@ifset D10V
- [ -O ]
+
+@emph{Target D10V options:}
+ [@b{-O}]
@end ifset
@ifset D30V
- [ -O | -n | -N ]
+
+@emph{Target D30V options:}
+ [@b{-O}|@b{-n}|@b{-N}]
@end ifset
@ifset H8
@c Hitachi family chips have no machine-dependent assembler options
@@ -240,58 +300,113 @@ Here is a brief summary of how to invoke @code{@value{AS}}. For details,
@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
- -Av8plus | -Av8plusa | -Av9 | -Av9a ]
- [ -xarch=v8plus | -xarch=v8plusa ] [ -bump ] [ -32 | -64 ]
-@end ifset
-@ifset TIC54X
- [ -mcpu=54[123589] | -mcpu=54[56]lp ] [ -mfar-mode | -mf ]
- [ -merrors-to-file <filename> | -me <filename> ]
-@end ifset
-@ifset Z8000
-@c Z8000 has no machine-dependent assembler options
+@ifset I80386
+
+@emph{Target i386 options:}
+ [@b{--32}|@b{--64}]
@end ifset
@ifset I960
+
+@emph{Target i960 options:}
@c see md_parse_option in tc-i960.c
- [ -ACA | -ACA_A | -ACB | -ACC | -AKA | -AKB | -AKC | -AMC ]
- [ -b ] [ -no-relax ]
+ [@b{-ACA}|@b{-ACA_A}|@b{-ACB}|@b{-ACC}|@b{-AKA}|@b{-AKB}|
+ @b{-AKC}|@b{-AMC}]
+ [@b{-b}] [@b{-no-relax}]
@end ifset
@ifset M32R
- [ --m32rx | --[no-]warn-explicit-parallel-conflicts | --W[n]p ]
+
+@emph{Target M32R options:}
+ [@b{--m32rx}|@b{--[no-]warn-explicit-parallel-conflicts}|
+ @b{--W[n]p}]
@end ifset
@ifset M680X0
- [ -l ] [ -m68000 | -m68010 | -m68020 | ... ]
-@end ifset
-@ifset MCORE
- [ -jsri2bsr ] [ -sifilter ] [ -relax ]
- [ -mcpu=[210|340] ]
+
+@emph{Target M680X0 options:}
+ [@b{-l}] [@b{-m68000}|@b{-m68010}|@b{-m68020}|@dots{}]
@end ifset
@ifset M68HC11
- [ -m68hc11 | -m68hc12 ]
- [ --force-long-branchs ] [ --short-branchs ] [ --strict-direct-mode ]
- [ --print-insn-syntax ] [ --print-opcodes ] [ --generate-example ]
+
+@emph{Target M68HC11 options:}
+ [@b{-m68hc11}|@b{-m68hc12}]
+ [@b{--force-long-branchs}] [@b{--short-branchs}]
+ [@b{--strict-direct-mode}] [@b{--print-insn-syntax}]
+ [@b{--print-opcodes}] [@b{--generate-example}]
+@end ifset
+@ifset MCORE
+
+@emph{Target MCORE options:}
+ [@b{-jsri2bsr}] [@b{-sifilter}] [@b{-relax}]
+ [@b{-mcpu=[210|340]}]
@end ifset
@ifset MIPS
- [ -nocpp ] [ -EL ] [ -EB ] [ -G @var{num} ] [ -mcpu=@var{CPU} ]
- [ -mips1 ] [ -mips2 ] [ -mips3 ] [ -mips4 ] [ -mips5 ]
- [ -mips32 ] [ -mips64 ]
- [ -m4650 ] [ -no-m4650 ]
- [ --trap ] [ --break ]
- [ --emulation=@var{name} ]
-@end ifset
- [ -- | @var{files} @dots{} ]
+
+@emph{Target MIPS options:}
+ [@b{-nocpp}] [@b{-EL}] [@b{-EB}] [@b{-G} @var{num}] [@b{-mcpu}=@var{CPU} ]
+ [@b{-mips1}] [@b{-mips2}] [@b{-mips3}] [@b{-mips4}] [@b{-mips5}]
+ [@b{-mips32}] [@b{-mips64}]
+ [@b{-m4650}] [@b{-no-m4650}]
+ [@b{--trap}] [@b{--break}] [@b{-n}]
+ [@b{--emulation}=@var{name} ]
+@end ifset
+@ifset MMIX
+
+@emph{Target MMIX options:}
+ [@b{--fixed-special-register-names}] [@b{--globalize-symbols}]
+ [@b{--gnu-syntax}] [@b{--relax}] [@b{--no-predefined-symbols}]
+ [@b{--no-expand}] [@b{--no-merge-gregs}] [@b{-x}]
+@end ifset
+@ifset PDP11
+
+@emph{Target PDP11 options:}
+ [@b{-mpic}|@b{-mno-pic}] [@b{-mall}] [@b{-mno-extensions}]
+ [@b{-m}@var{extension}|@b{-mno-}@var{extension}]
+ [@b{-m}@var{cpu}] [@b{-m}@var{machine}]
+@end ifset
+@ifset PJ
+
+@emph{Target picoJava options:}
+ [@b{-mb}|@b{-me}]
+@end ifset
+@ifset PPC
+
+@emph{Target PowerPC options:}
+ [@b{-mpwrx}|@b{-mpwr2}|@b{-mpwr}|@b{-m601}|@b{-mppc}|@b{-mppc32}|@b{-m603}|@b{-m604}|
+ @b{-m403}|@b{-m405}|@b{-mppc64}|@b{-m620}|@b{-mppc64bridge}|@b{-mbooke}|
+ @b{-mbooke32}|@b{-mbooke64}]
+ [@b{-mcom}|@b{-many}|@b{-maltivec}] [@b{-memb}]
+ [@b{-mregnames}|@b{-mno-regnames}]
+ [@b{-mrelocatable}|@b{-mrelocatable-lib}]
+ [@b{-mlittle}|@b{-mlittle-endian}|@b{-mbig}|@b{-mbig-endian}]
+ [@b{-msolaris}|@b{-mno-solaris}]
+@end ifset
+@ifset SPARC
+
+@emph{Target SPARC options:}
+@c The order here is important. See c-sparc.texi.
+ [@b{-Av6}|@b{-Av7}|@b{-Av8}|@b{-Asparclet}|@b{-Asparclite}
+ @b{-Av8plus}|@b{-Av8plusa}|@b{-Av9}|@b{-Av9a}]
+ [@b{-xarch=v8plus}|@b{-xarch=v8plusa}] [@b{-bump}]
+ [@b{-32}|@b{-64}]
+@end ifset
+@ifset TIC54X
+
+@emph{Target TIC54X options:}
+ [@b{-mcpu=54[123589]}|@b{-mcpu=54[56]lp}] [@b{-mfar-mode}|@b{-mf}]
+ [@b{-merrors-to-file} @var{<filename>}|@b{-me} @var{<filename>}]
+@end ifset
+@ifset Z8000
+@c Z8000 has no machine-dependent assembler options
+@end ifset
+@c man end
@end smallexample
-@table @code
+@c man begin OPTIONS
+
+@table @gcctabopt
@item -a[cdhlmns]
Turn on listings, in any of a variety of ways:
-@table @code
+@table @gcctabopt
@item -ac
omit false conditionals
@@ -369,8 +484,24 @@ Keep (in the symbol table) local symbols. On traditional a.out systems
these start with @samp{L}, but different systems have different local
label prefixes.
+@item --listing-lhs-width=@var{number}
+Set the maximum width, in words, of the output data column for an assembler
+listing to @var{number}.
+
+@item --listing-lhs-width2=@var{number}
+Set the maximum width, in words, of the output data column for continuation
+lines in an assembler listing to @var{number}.
+
+@item --listing-rhs-width=@var{number}
+Set the maximum width of an input source line, as displayed in a listing, to
+@var{number} bytes.
+
+@item --listing-cont-lines=@var{number}
+Set the maximum number of lines printed in a listing for a single line of input
+to @var{number} + 1.
+
@item -o @var{objfile}
-Name the object-file output from @code{@value{AS}} @var{objfile}.
+Name the object-file output from @command{@value{AS}} @var{objfile}.
@item -R
Fold the data section into the text section.
@@ -384,10 +515,10 @@ Remove local absolute symbols from the outgoing symbol table.
@item -v
@itemx -version
-Print the @code{as} version.
+Print the @command{as} version.
@item --version
-Print the @code{as} version and exit.
+Print the @command{as} version and exit.
@item -W
@itemx --no-warn
@@ -417,7 +548,7 @@ Standard input, or source files to assemble.
The following options are available when @value{AS} is configured for
an ARC processor.
-@table @code
+@table @gcctabopt
@item -marc[5|6|7|8]
This option selects the core processor variant.
@item -EB | -EL
@@ -429,15 +560,15 @@ Select either big-endian (-EB) or little-endian (-EL) output.
The following options are available when @value{AS} is configured for the ARM
processor family.
-@table @code
-@item -m[arm][1|2|3|6|7|8|9][...]
+@table @gcctabopt
+@item -mcpu=@var{processor}[+@var{extension}@dots{}]
Specify which ARM processor variant is the target.
-@item -m[arm]v[2|2a|3|3m|4|4t|5|5t]
+@item -march=@var{architecture}[+@var{extension}@dots{}]
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
+@item -mfpu=@var{floating-point-format}
Select which Floating Point architecture is the target.
+@item -mthumb
+Enable Thumb only instruction decoding.
@item -mapcs-32 | -mapcs-26 | -mapcs-float | -mapcs-reentrant | -moabi
Select which procedure calling convention is in use.
@item -EB | -EL
@@ -453,7 +584,7 @@ Specify that PIC code has been generated.
@ifset D10V
The following options are available when @value{AS} is configured for
a D10V processor.
-@table @code
+@table @gcctabopt
@cindex D10V optimization
@cindex optimization, D10V
@item -O
@@ -464,7 +595,7 @@ Optimize output by parallelizing instructions.
@ifset D30V
The following options are available when @value{AS} is configured for a D30V
processor.
-@table @code
+@table @gcctabopt
@cindex D30V optimization
@cindex optimization, D30V
@item -O
@@ -484,7 +615,7 @@ Warn when a nop after a 32-bit multiply instruction is generated.
The following options are available when @value{AS} is configured for the
Intel 80960 processor.
-@table @code
+@table @gcctabopt
@item -ACA | -ACA_A | -ACB | -ACC | -AKA | -AKB | -AKC | -AMC
Specify which variant of the 960 architecture is the target.
@@ -502,7 +633,7 @@ error if necessary.
The following options are available when @value{AS} is configured for the
Mitsubishi M32R series.
-@table @code
+@table @gcctabopt
@item --m32rx
Specify which processor in the M32R family is the target. The default
@@ -523,13 +654,14 @@ encountered.
The following options are available when @value{AS} is configured for the
Motorola 68000 series.
-@table @code
+@table @gcctabopt
@item -l
Shorten references to undefined symbols, to one word instead of two.
-@item -m68000 | -m68008 | -m68010 | -m68020 | -m68030 | -m68040 | -m68060
-@itemx | -m68302 | -m68331 | -m68332 | -m68333 | -m68340 | -mcpu32 | -m5200
+@item -m68000 | -m68008 | -m68010 | -m68020 | -m68030
+@itemx | -m68040 | -m68060 | -m68302 | -m68331 | -m68332
+@itemx | -m68333 | -m68340 | -mcpu32 | -m5200
Specify what processor in the 68000 family is the target. The default
is normally the 68020, but this can be changed at configuration time.
@@ -547,11 +679,42 @@ unit coprocessor. The default is to assume an MMU for 68020 and up.
@end table
@end ifset
+@ifset PDP11
+
+For details about the PDP-11 machine dependent features options,
+see @ref{PDP-11-Options}.
+
+@table @gcctabopt
+@item -mpic | -mno-pic
+Generate position-independent (or position-dependent) code. The
+default is @option{-mpic}.
+
+@item -mall
+@itemx -mall-extensions
+Enable all instruction set extensions. This is the default.
+
+@item -mno-extensions
+Disable all instruction set extensions.
+
+@item -m@var{extension} | -mno-@var{extension}
+Enable (or disable) a particular instruction set extension.
+
+@item -m@var{cpu}
+Enable the instruction set extensions supported by a particular CPU, and
+disable all other extensions.
+
+@item -m@var{machine}
+Enable the instruction set extensions supported by a particular machine
+model, and disable all other extensions.
+@end table
+
+@end ifset
+
@ifset PJ
The following options are available when @value{AS} is configured for
a picoJava processor.
-@table @code
+@table @gcctabopt
@cindex PJ endianness
@cindex endianness, PJ
@@ -570,7 +733,7 @@ Generate ``little endian'' format output.
The following options are available when @value{AS} is configured for the
Motorola 68HC11 or 68HC12 series.
-@table @code
+@table @gcctabopt
@item -m68hc11 | -m68hc12
Specify what processor is the target. The default is
@@ -597,16 +760,16 @@ print the list of instructions with syntax and then exit.
@item --generate-example
print an example of instruction for each possible instruction and then exit.
-This option is only useful for testing @code{@value{AS}}.
+This option is only useful for testing @command{@value{AS}}.
@end table
@end ifset
@ifset SPARC
-The following options are available when @code{@value{AS}} is configured
+The following options are available when @command{@value{AS}} is configured
for the SPARC architecture:
-@table @code
+@table @gcctabopt
@item -Av6 | -Av7 | -Av8 | -Asparclet | -Asparclite
@itemx -Av8plus | -Av8plusa | -Av9 | -Av9a
Explicitly select a variant of the SPARC architecture.
@@ -630,7 +793,7 @@ Warn when the assembler switches to another architecture.
The following options are available when @value{AS} is configured for the 'c54x
architecture.
-@table @code
+@table @gcctabopt
@item -mfar-mode
Enable extended addressing mode. All addresses and relocations will assume
extended addressing (usually 23 bits).
@@ -646,7 +809,7 @@ behaviour in the shell.
The following options are available when @value{AS} is configured for
a MIPS processor.
-@table @code
+@table @gcctabopt
@item -G @var{num}
This option sets the largest size of an object that can be referenced
implicitly with the @code{gp} register. It is only accepted for targets that
@@ -668,6 +831,7 @@ Generate ``little endian'' format output.
@itemx -mips3
@itemx -mips4
@itemx -mips32
+@itemx -mips64
Generate code for a particular MIPS Instruction Set Architecture level.
@samp{-mips1} corresponds to the @sc{r2000} and @sc{r3000} processors,
@samp{-mips2} to the @sc{r6000} processor, and @samp{-mips3} to the @sc{r4000}
@@ -690,7 +854,7 @@ understood.
@cindex emulation
@item --emulation=@var{name}
-This option causes @code{@value{AS}} to emulate @code{@value{AS}} configured
+This option causes @command{@value{AS}} to emulate @command{@value{AS}} configured
for some other target, in all respects, including output format (choosing
between ELF and ECOFF only), handling of pseudo-opcodes which may generate
debugging information or store symbol table information, and default
@@ -703,7 +867,7 @@ in the name. Using @samp{-EB} or @samp{-EL} will override the endianness
selection in any case.
This option is currently supported only when the primary target
-@code{@value{AS}} is configured for is a MIPS ELF or ECOFF target.
+@command{@value{AS}} is configured for is a MIPS ELF or ECOFF target.
Furthermore, the primary target or others specified with
@samp{--enable-targets=@dots{}} at configuration time must include support for
the other format, if both are to be available. For example, the Irix 5
@@ -714,7 +878,7 @@ fine-grained control over the assembler's behavior, and will be supported for
more processors.
@item -nocpp
-@code{@value{AS}} ignores this option. It is accepted for compatibility with
+@command{@value{AS}} ignores this option. It is accepted for compatibility with
the native tools.
@need 900
@@ -727,6 +891,10 @@ Control how to deal with multiplication overflow and division by zero.
(and only work for Instruction Set Architecture level 2 and higher);
@samp{--break} or @samp{--no-trap} (also synonyms, and the default) take a
break exception.
+
+@item -n
+When this option is used, @command{@value{AS}} will issue a warning every
+time it generates a nop instruction from a macro.
@end table
@end ifset
@@ -734,7 +902,7 @@ break exception.
The following options are available when @value{AS} is configured for
an MCore processor.
-@table @code
+@table @gcctabopt
@item -jsri2bsr
@itemx -nojsri2bsr
Enable or disable the JSRI to BSR transformation. By default this is enabled.
@@ -761,6 +929,12 @@ Assemble for a little endian target.
@end table
@end ifset
+@ifset MMIX
+See the info pages for documentation of the MMIX-specific options.
+@end ifset
+
+@c man end
+
@menu
* Manual:: Structure of this Manual
* GNU Assembler:: The GNU Assembler
@@ -776,13 +950,13 @@ Assemble for a little endian target.
@cindex manual, structure and purpose
This manual is intended to describe what you need to know to use
-@sc{gnu} @code{@value{AS}}. We cover the syntax expected in source files, including
+@sc{gnu} @command{@value{AS}}. We cover the syntax expected in source files, including
notation for symbols, constants, and expressions; the directives that
-@code{@value{AS}} understands; and of course how to invoke @code{@value{AS}}.
+@command{@value{AS}} understands; and of course how to invoke @command{@value{AS}}.
@ifclear GENERIC
We also cover special features in the @value{TARGET}
-configuration of @code{@value{AS}}, including assembler directives.
+configuration of @command{@value{AS}}, including assembler directives.
@end ifclear
@ifset GENERIC
This manual also describes some of the machine-dependent features of
@@ -828,10 +1002,10 @@ computer (in particular, the kinds of computers that @sc{gnu} can run on);
once this assumption is granted examples and definitions need less
qualification.
-@code{@value{AS}} is part of a team of programs that turn a high-level
+@command{@value{AS}} is part of a team of programs that turn a high-level
human-readable series of instructions into a low-level
computer-readable series of instructions. Different versions of
-@code{@value{AS}} are used for different kinds of computer.
+@command{@value{AS}} are used for different kinds of computer.
@end ignore
@c There used to be a section "Terminology" here, which defined
@@ -846,9 +1020,11 @@ computer-readable series of instructions. Different versions of
@node GNU Assembler
@section The GNU Assembler
-@sc{gnu} @code{as} is really a family of assemblers.
+@c man begin DESCRIPTION
+
+@sc{gnu} @command{as} is really a family of assemblers.
@ifclear GENERIC
-This manual describes @code{@value{AS}}, a member of that family which is
+This manual describes @command{@value{AS}}, a member of that family which is
configured for the @value{TARGET} architectures.
@end ifclear
If you use (or have used) the @sc{gnu} assembler on one architecture, you
@@ -858,9 +1034,9 @@ including object file formats, most assembler directives (often called
@dfn{pseudo-ops}) and assembler syntax.@refill
@cindex purpose of @sc{gnu} assembler
-@code{@value{AS}} is primarily intended to assemble the output of the
+@command{@value{AS}} is primarily intended to assemble the output of the
@sc{gnu} C compiler @code{@value{GCC}} for use by the linker
-@code{@value{LD}}. Nevertheless, we've tried to make @code{@value{AS}}
+@code{@value{LD}}. Nevertheless, we've tried to make @command{@value{AS}}
assemble correctly everything that other assemblers for the same
machine would assemble.
@ifset VAX
@@ -869,12 +1045,14 @@ Any exceptions are documented explicitly (@pxref{Machine Dependencies}).
@ifset M680X0
@c This remark should appear in generic version of manual; assumption
@c here is that generic version sets M680x0.
-This doesn't mean @code{@value{AS}} always uses the same syntax as another
+This doesn't mean @command{@value{AS}} always uses the same syntax as another
assembler for the same architecture; for example, we know of several
incompatible versions of 680x0 assembly language syntax.
@end ifset
-Unlike older assemblers, @code{@value{AS}} is designed to assemble a source
+@c man end
+
+Unlike older assemblers, @command{@value{AS}} is designed to assemble a source
program in one pass of the source file. This has a subtle impact on the
@kbd{.org} directive (@pxref{Org,,@code{.org}}).
@@ -889,20 +1067,20 @@ are typically different in different file formats. @xref{Symbol
Attributes,,Symbol Attributes}.
@ifclear GENERIC
@ifclear MULTI-OBJ
-On the @value{TARGET}, @code{@value{AS}} is configured to produce
+On the @value{TARGET}, @command{@value{AS}} is configured to produce
@value{OBJ-NAME} format object files.
@end ifclear
@c The following should exhaust all configs that set MULTI-OBJ, ideally
@ifset A29K
-On the @value{TARGET}, @code{@value{AS}} can be configured to produce either
+On the @value{TARGET}, @command{@value{AS}} can be configured to produce either
@code{a.out} or COFF format object files.
@end ifset
@ifset I960
-On the @value{TARGET}, @code{@value{AS}} can be configured to produce either
+On the @value{TARGET}, @command{@value{AS}} can be configured to produce either
@code{b.out} or COFF format object files.
@end ifset
@ifset HPPA
-On the @value{TARGET}, @code{@value{AS}} can be configured to produce either
+On the @value{TARGET}, @command{@value{AS}} can be configured to produce either
SOM or ELF format object files.
@end ifset
@end ifclear
@@ -911,7 +1089,8 @@ SOM or ELF format object files.
@section Command Line
@cindex command line conventions
-After the program name @code{@value{AS}}, the command line may contain
+
+After the program name @command{@value{AS}}, the command line may contain
options and file names. Options may appear in any order, and may be
before, after, or between file names. The order of file names is
significant.
@@ -919,12 +1098,12 @@ significant.
@cindex standard input, as input file
@kindex --
@file{--} (two hyphens) by itself names the standard input file
-explicitly, as one of the files for @code{@value{AS}} to assemble.
+explicitly, as one of the files for @command{@value{AS}} to assemble.
@cindex options, command line
Except for @samp{--} any command line argument that begins with a
hyphen (@samp{-}) is an option. Each option changes the behavior of
-@code{@value{AS}}. No option changes the way another option works. An
+@command{@value{AS}}. No option changes the way another option works. An
option is a @samp{-} followed by one or more letters; the case of
the letter is important. All options are optional.
@@ -945,7 +1124,7 @@ standard). These two command lines are equivalent:
@cindex source program
@cindex files, input
We use the phrase @dfn{source program}, abbreviated @dfn{source}, to
-describe the program input to one run of @code{@value{AS}}. The program may
+describe the program input to one run of @command{@value{AS}}. The program may
be in one or more files; how the source is partitioned into files
doesn't change the meaning of the source.
@@ -954,26 +1133,29 @@ doesn't change the meaning of the source.
The source program is a concatenation of the text in all the files, in the
order specified.
-Each time you run @code{@value{AS}} it assembles exactly one source
+@c man begin DESCRIPTION
+Each time you run @command{@value{AS}} it assembles exactly one source
program. The source program is made up of one or more files.
(The standard input is also a file.)
-You give @code{@value{AS}} a command line that has zero or more input file
+You give @command{@value{AS}} a command line that has zero or more input file
names. The input files are read (from left file name to right). A
command line argument (in any position) that has no special meaning
is taken to be an input file name.
-If you give @code{@value{AS}} no file names it attempts to read one input file
-from the @code{@value{AS}} standard input, which is normally your terminal. You
-may have to type @key{ctl-D} to tell @code{@value{AS}} there is no more program
+If you give @command{@value{AS}} no file names it attempts to read one input file
+from the @command{@value{AS}} standard input, which is normally your terminal. You
+may have to type @key{ctl-D} to tell @command{@value{AS}} there is no more program
to assemble.
Use @samp{--} if you need to explicitly name the standard input file
in your command line.
-If the source is empty, @code{@value{AS}} produces a small, empty object
+If the source is empty, @command{@value{AS}} produces a small, empty object
file.
+@c man end
+
@subheading Filenames and Line-numbers
@cindex input file linenumbers
@@ -984,12 +1166,12 @@ number in a physical file; the other refers to a line number in a
``logical'' file. @xref{Errors, ,Error and Warning Messages}.
@dfn{Physical files} are those files named in the command line given
-to @code{@value{AS}}.
+to @command{@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. @code{@value{AS}} understands the
+error messages reflect the original source file, when @command{@value{AS}} source
+is itself synthesized from other files. @command{@value{AS}} understands the
@samp{#} directives emitted by the @code{@value{GCC}} preprocessor. See also
@ref{File,,@code{.file}}.
@@ -1000,7 +1182,7 @@ is itself synthesized from other files. @code{@value{AS}} understands the
@cindex output file
@kindex a.out
@kindex .o
-Every time you run @code{@value{AS}} it produces an output file, which is
+Every time you run @command{@value{AS}} it produces an output file, which is
your assembly language program translated into numbers. This file
is the object file. Its default name is
@ifclear BOUT
@@ -1010,9 +1192,9 @@ is the object file. Its default name is
@ifset GENERIC
@code{a.out}, or
@end ifset
-@code{b.out} when @code{@value{AS}} is configured for the Intel 80960.
+@code{b.out} when @command{@value{AS}} is configured for the Intel 80960.
@end ifset
-You can give it another name by using the @code{-o} option. Conventionally,
+You can give it another name by using the @option{-o} option. Conventionally,
object file names end with @file{.o}. The default name is used for historical
reasons: older assemblers were capable of assembling self-contained programs
directly into a runnable program. (For some formats, this isn't currently
@@ -1031,15 +1213,19 @@ information for the debugger.
@node Errors
@section Error and Warning Messages
+@c man begin DESCRIPTION
+
@cindex error messages
@cindex warning messages
@cindex messages from assembler
-@code{@value{AS}} may write warnings and error messages to the standard error
+@command{@value{AS}} may write warnings and error messages to the standard error
file (usually your terminal). This should not happen when a compiler
-runs @code{@value{AS}} automatically. Warnings report an assumption made so
-that @code{@value{AS}} could keep assembling a flawed program; errors report a
+runs @command{@value{AS}} automatically. Warnings report an assumption made so
+that @command{@value{AS}} could keep assembling a flawed program; errors report a
grave problem that stops the assembly.
+@c man end
+
@cindex format of warning messages
Warning messages have the format
@@ -1090,7 +1276,9 @@ 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),
+@c man begin DESCRIPTION
+
+If you are invoking @command{@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:
@@ -1110,6 +1298,8 @@ command-line options are automatically passed to the assembler by the compiler.
precisely what options it passes to each compilation pass, including the
assembler.)
+@c man end
+
@menu
* a:: -a[cdhlns] enable listings
* D:: -D for compatibility
@@ -1123,6 +1313,7 @@ assembler.)
@end ifset
* L:: -L to retain local labels
+* listing:: --listing-XXX to configure listing output
* M:: -M or --mri to assemble in MRI compatibility mode
* MD:: --MD for dependency tracking
* o:: -o to name the object file
@@ -1135,7 +1326,7 @@ assembler.)
@end menu
@node a
-@section Enable Listings: @code{-a[cdhlns]}
+@section Enable Listings: @option{-a[cdhlns]}
@kindex -a
@kindex -ac
@@ -1176,20 +1367,27 @@ listing-control directives have no effect.
The letters after @samp{-a} may be combined into one option,
@emph{e.g.}, @samp{-aln}.
+Note if the assembler source is coming from the standard input (eg because it
+is being created by @code{@value{GCC}} and the @samp{-pipe} command line switch
+is being used) then the listing will not contain any comments or preprocessor
+directives. This is because the listing code buffers input source lines from
+stdin only after they have been preprocessed by the assembler. This reduces
+memory usage and makes the code more efficient.
+
@node D
-@section @code{-D}
+@section @option{-D}
@kindex -D
This option has no effect whatsoever, but it is accepted to make it more
likely that scripts written for other assemblers also work with
-@code{@value{AS}}.
+@command{@value{AS}}.
@node f
-@section Work Faster: @code{-f}
+@section Work Faster: @option{-f}
@kindex -f
@cindex trusted compiler
-@cindex faster processing (@code{-f})
+@cindex faster processing (@option{-f})
@samp{-f} should only be used when assembling programs written by a
(trusted) compiler. @samp{-f} stops the assembler from doing whitespace
and comment preprocessing on
@@ -1198,27 +1396,27 @@ the input file(s) before assembling them. @xref{Preprocessing,
@quotation
@emph{Warning:} if you use @samp{-f} when the files actually need to be
-preprocessed (if they contain comments, for example), @code{@value{AS}} does
+preprocessed (if they contain comments, for example), @command{@value{AS}} does
not work correctly.
@end quotation
@node I
-@section @code{.include} search path: @code{-I} @var{path}
+@section @code{.include} search path: @option{-I} @var{path}
@kindex -I @var{path}
@cindex paths for @code{.include}
@cindex search path for @code{.include}
@cindex @code{include} directive search path
Use this option to add a @var{path} to the list of directories
-@code{@value{AS}} searches for files specified in @code{.include}
-directives (@pxref{Include,,@code{.include}}). You may use @code{-I} as
+@command{@value{AS}} searches for files specified in @code{.include}
+directives (@pxref{Include,,@code{.include}}). You may use @option{-I} as
many times as necessary to include a variety of paths. The current
-working directory is always searched first; after that, @code{@value{AS}}
+working directory is always searched first; after that, @command{@value{AS}}
searches any @samp{-I} directories in the same order as they were
specified (left to right) on the command line.
@node K
-@section Difference Tables: @code{-K}
+@section Difference Tables: @option{-K}
@kindex -K
@ifclear DIFF-TBL-KLUGE
@@ -1233,14 +1431,14 @@ alteration on other platforms.
@ifset DIFF-TBL-KLUGE
@cindex difference tables, warning
@cindex warning for altered difference tables
-@code{@value{AS}} sometimes alters the code emitted for directives of the form
+@command{@value{AS}} sometimes alters the code emitted for directives of the form
@samp{.word @var{sym1}-@var{sym2}}; @pxref{Word,,@code{.word}}.
You can use the @samp{-K} option if you want a warning issued when this
is done.
@end ifset
@node L
-@section Include Local Labels: @code{-L}
+@section Include Local Labels: @option{-L}
@kindex -L
@cindex local labels, retaining in output
@@ -1248,10 +1446,10 @@ Labels beginning with @samp{L} (upper case only) are called @dfn{local
labels}. @xref{Symbol Names}. Normally you do not see such labels when
debugging, because they are intended for the use of programs (like
compilers) that compose assembler programs, not for your notice.
-Normally both @code{@value{AS}} and @code{@value{LD}} discard such labels, so you do not
+Normally both @command{@value{AS}} and @code{@value{LD}} discard such labels, so you do not
normally debug with them.
-This option tells @code{@value{AS}} to retain those @samp{L@dots{}} symbols
+This option tells @command{@value{AS}} to retain those @samp{L@dots{}} symbols
in the object file. Usually if you do this you also tell the linker
@code{@value{LD}} to preserve symbols whose names begin with @samp{L}.
@@ -1261,19 +1459,58 @@ target is allowed to redefine the local label prefix.
On the HPPA local labels begin with @samp{L$}.
@end ifset
+@node listing
+@section Configuring listing output: @option{--listing}
+
+The listing feature of the assembler can be enabled via the command line switch
+@samp{-a} (@pxref{a}). This feature combines the input source file(s) with a
+hex dump of the corresponding locations in the output object file, and displays
+them as a listing file. The format of this listing can be controlled by pseudo
+ops inside the assembler source (@pxref{List} @pxref{Title} @pxref{Sbttl}
+@pxref{Psize} @pxref{Eject}) and also by the following switches:
+
+@table @gcctabopt
+@item --listing-lhs-width=@samp{number}
+@kindex --listing-lhs-width
+@cindex Width of first line disassembly output
+Sets the maximum width, in words, of the first line of the hex byte dump. This
+dump appears on the left hand side of the listing output.
+
+@item --listing-lhs-width2=@samp{number}
+@kindex --listing-lhs-width2
+@cindex Width of continuation lines of disassembly output
+Sets the maximum width, in words, of any further lines of the hex byte dump for
+a given inut source line. If this value is not specified, it defaults to being
+the same as the value specified for @samp{--listing-lhs-width}. If neither
+switch is used the default is to one.
+
+@item --listing-rhs-width=@samp{number}
+@kindex --listing-rhs-width
+@cindex Width of source line output
+Sets the maximum width, in characters, of the source line that is displayed
+alongside the hex dump. The default value for this parameter is 100. The
+source line is displayed on the right hand side of the listing output.
+
+@item --listing-cont-lines=@samp{number}
+@kindex --listing-cont-lines
+@cindex Maximum number of continuation lines
+Sets the maximum number of continuation lines of hex dump that will be
+displayed for a given single line of source input. The default value is 4.
+@end table
+
@node M
-@section Assemble in MRI Compatibility Mode: @code{-M}
+@section Assemble in MRI Compatibility Mode: @option{-M}
@kindex -M
@cindex MRI compatibility mode
-The @code{-M} or @code{--mri} option selects MRI compatibility mode. This
-changes the syntax and pseudo-op handling of @code{@value{AS}} to make it
+The @option{-M} or @option{--mri} option selects MRI compatibility mode. This
+changes the syntax and pseudo-op handling of @command{@value{AS}} to make it
compatible with the @code{ASM68K} or the @code{ASM960} (depending upon the
configured target) assembler from Microtec Research. The exact nature of the
MRI syntax will not be documented here; see the MRI manuals for more
information. Note in particular that the handling of macros and macro
arguments is somewhat different. The purpose of this option is to permit
-assembling existing MRI assembler code using @code{@value{AS}}.
+assembling existing MRI assembler code using @command{@value{AS}}.
The MRI compatibility is not complete. Certain operations of the MRI assembler
depend upon its object file format, and can not be supported using other object
@@ -1284,7 +1521,7 @@ individually. These are:
@item global symbols in common section
The m68k MRI assembler supports common sections which are merged by the linker.
-Other object file formats do not support this. @code{@value{AS}} handles
+Other object file formats do not support this. @command{@value{AS}} handles
common sections by treating them as a single common symbol. It permits local
symbols to be defined within a common section, but it can not support global
symbols, since it has no way to describe them.
@@ -1299,7 +1536,7 @@ are not support by other object file formats.
The MRI @code{END} pseudo-op permits the specification of a start address.
This is not supported by other object file formats. The start address may
-instead be specified using the @code{-e} option to the linker, or in a linker
+instead be specified using the @option{-e} option to the linker, or in a linker
script.
@item @code{IDNT}, @code{.ident} and @code{NAME} pseudo-ops
@@ -1310,14 +1547,14 @@ name to the output file. This is not supported by other object file formats.
@item @code{ORG} pseudo-op
The m68k MRI @code{ORG} pseudo-op begins an absolute section at a given
-address. This differs from the usual @code{@value{AS}} @code{.org} pseudo-op,
+address. This differs from the usual @command{@value{AS}} @code{.org} pseudo-op,
which changes the location within the current section. Absolute sections are
not supported by other object file formats. The address of a section may be
assigned within a linker script.
@end itemize
There are some other features of the MRI assembler which are not supported by
-@code{@value{AS}}, typically either because they are difficult or because they
+@command{@value{AS}}, typically either because they are difficult or because they
seem of little consequence. Some of these may be supported in future releases.
@itemize @bullet
@@ -1342,7 +1579,7 @@ The m68k @code{NOOBJ} pseudo-op is not supported.
@item @code{OPT} branch control options
The m68k @code{OPT} branch control options---@code{B}, @code{BRS}, @code{BRB},
-@code{BRL}, and @code{BRW}---are ignored. @code{@value{AS}} automatically
+@code{BRL}, and @code{BRW}---are ignored. @command{@value{AS}} automatically
relaxes all branches, whether forward or backward, to an appropriate size, so
these options serve no purpose.
@@ -1393,13 +1630,13 @@ The i960 @code{.setreal} pseudo-op is not supported.
@end itemize
@node MD
-@section Dependency tracking: @code{--MD}
+@section Dependency tracking: @option{--MD}
@kindex --MD
@cindex dependency tracking
@cindex make rules
-@code{@value{AS}} can generate a dependency file for the file it creates. This
+@command{@value{AS}} can generate a dependency file for the file it creates. This
file consists of a single rule suitable for @code{make} describing the
dependencies of the main source file.
@@ -1408,12 +1645,12 @@ The rule is written to the file named in its argument.
This feature is used in the automatic updating of makefiles.
@node o
-@section Name the Object File: @code{-o}
+@section Name the Object File: @option{-o}
@kindex -o
@cindex naming object file
@cindex object file name
-There is always one object file output when you run @code{@value{AS}}. By
+There is always one object file output when you run @command{@value{AS}}. By
default it has the name
@ifset GENERIC
@ifset I960
@@ -1434,65 +1671,65 @@ default it has the name
You use this option (which takes exactly one filename) to give the
object file a different name.
-Whatever the object file is called, @code{@value{AS}} overwrites any
+Whatever the object file is called, @command{@value{AS}} overwrites any
existing file of the same name.
@node R
-@section Join Data and Text Sections: @code{-R}
+@section Join Data and Text Sections: @option{-R}
@kindex -R
@cindex data and text sections, joining
@cindex text and data sections, joining
@cindex joining text and data sections
@cindex merging text and data sections
-@code{-R} tells @code{@value{AS}} to write the object file as if all
+@option{-R} tells @command{@value{AS}} to write the object file as if all
data-section data lives in the text section. This is only done at
the very last moment: your binary data are the same, but data
section parts are relocated differently. The data section part of
your object file is zero bytes long because all its bytes are
appended to the text section. (@xref{Sections,,Sections and Relocation}.)
-When you specify @code{-R} it would be possible to generate shorter
+When you specify @option{-R} it would be possible to generate shorter
address displacements (because we do not have to cross between text and
data section). We refrain from doing this simply for compatibility with
-older versions of @code{@value{AS}}. In future, @code{-R} may work this way.
+older versions of @command{@value{AS}}. In future, @option{-R} may work this way.
@ifset COFF
-When @code{@value{AS}} is configured for COFF output,
+When @command{@value{AS}} is configured for COFF output,
this option is only useful if you use sections named @samp{.text} and
@samp{.data}.
@end ifset
@ifset HPPA
-@code{-R} is not supported for any of the HPPA targets. Using
-@code{-R} generates a warning from @code{@value{AS}}.
+@option{-R} is not supported for any of the HPPA targets. Using
+@option{-R} generates a warning from @command{@value{AS}}.
@end ifset
@node statistics
-@section Display Assembly Statistics: @code{--statistics}
+@section Display Assembly Statistics: @option{--statistics}
@kindex --statistics
@cindex statistics, about assembly
@cindex time, total for assembly
@cindex space used, maximum for assembly
Use @samp{--statistics} to display two statistics about the resources used by
-@code{@value{AS}}: the maximum amount of space allocated during the assembly
+@command{@value{AS}}: the maximum amount of space allocated during the assembly
(in bytes), and the total execution time taken for the assembly (in @sc{cpu}
seconds).
@node traditional-format
-@section Compatible output: @code{--traditional-format}
+@section Compatible output: @option{--traditional-format}
@kindex --traditional-format
-For some targets, the output of @code{@value{AS}} is different in some ways
+For some targets, the output of @command{@value{AS}} is different in some ways
from the output of some existing assembler. This switch requests
-@code{@value{AS}} to use the traditional format instead.
+@command{@value{AS}} to use the traditional format instead.
For example, it disables the exception frame optimizations which
-@code{@value{AS}} normally does by default on @code{@value{GCC}} output.
+@command{@value{AS}} normally does by default on @code{@value{GCC}} output.
@node v
-@section Announce Version: @code{-v}
+@section Announce Version: @option{-v}
@kindex -v
@kindex -version
@@ -1503,41 +1740,41 @@ option @samp{-v} (which you can also spell as @samp{-version}) on the
command line.
@node W
-@section Control Warnings: @code{-W}, @code{--warn}, @code{--no-warn}, @code{--fatal-warnings}
+@section Control Warnings: @option{-W}, @option{--warn}, @option{--no-warn}, @option{--fatal-warnings}
-@code{@value{AS}} should never give a warning or error message when
+@command{@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
+cause @command{@value{AS}} to give a warning that a particular assumption was
made. All such warnings are directed to the standard error file.
@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.
+If you use the @option{-W} and @option{--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,
+how @command{@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
+If you use the @option{--fatal-warnings} option, @command{@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
+You can switch these options off again by specifying @option{--warn}, which
causes warnings to be output as usual.
@node Z
-@section Generate Object File in Spite of Errors: @code{-Z}
+@section Generate Object File in Spite of Errors: @option{-Z}
@cindex object file, after errors
@cindex errors, continuing after
-After an error message, @code{@value{AS}} normally produces no output. If for
+After an error message, @command{@value{AS}} normally produces no output. If for
some reason you are interested in object file output even after
-@code{@value{AS}} gives an error message on your program, use the @samp{-Z}
-option. If there are any errors, @code{@value{AS}} continues anyways, and
+@command{@value{AS}} gives an error message on your program, use the @samp{-Z}
+option. If there are any errors, @command{@value{AS}} continues anyways, and
writes an object file after a final warning message of the form @samp{@var{n}
errors, @var{m} warnings, generating bad object file.}
@@ -1547,13 +1784,13 @@ errors, @var{m} warnings, generating bad object file.}
@cindex machine-independent syntax
@cindex syntax, machine-independent
This chapter describes the machine-independent syntax allowed in a
-source file. @code{@value{AS}} syntax is similar to what many other
+source file. @command{@value{AS}} syntax is similar to what many other
assemblers use; it is inspired by the BSD 4.2
@ifclear VAX
assembler.
@end ifclear
@ifset VAX
-assembler, except that @code{@value{AS}} does not assemble Vax bit-fields.
+assembler, except that @command{@value{AS}} does not assemble Vax bit-fields.
@end ifset
@menu
@@ -1569,7 +1806,7 @@ assembler, except that @code{@value{AS}} does not assemble Vax bit-fields.
@section Preprocessing
@cindex preprocessing
-The @code{@value{AS}} internal preprocessor:
+The @command{@value{AS}} internal preprocessor:
@itemize @bullet
@cindex whitespace, removed by preprocessor
@item
@@ -1626,7 +1863,7 @@ as exactly one space.
@section Comments
@cindex comments
-There are two ways of rendering comments to @code{@value{AS}}. In both
+There are two ways of rendering comments to @command{@value{AS}}. In both
cases the comment is equivalent to one space.
Anything from @samp{/*} through the next @samp{*/} is a comment.
@@ -1668,9 +1905,15 @@ is considered a comment and is ignored. The line comment character is
@ifset I960
@samp{#} on the i960;
@end ifset
+@ifset PDP11
+@samp{;} for the PDP-11;
+@end ifset
@ifset PJ
@samp{;} for picoJava;
@end ifset
+@ifset PPC
+@samp{;} for Motorola PowerPC;
+@end ifset
@ifset SH
@samp{!} for the Hitachi SH;
@end ifset
@@ -1686,6 +1929,9 @@ is considered a comment and is ignored. The line comment character is
@ifset M68HC11
@samp{#} on the 68HC11 and 68HC12;
@end ifset
+@ifset M880X0
+@samp{;} on the M880x0;
+@end ifset
@ifset VAX
@samp{#} on the Vax;
@end ifset
@@ -1696,7 +1942,7 @@ is considered a comment and is ignored. The line comment character is
@samp{#} on the V850;
@end ifset
see @ref{Machine Dependencies}. @refill
-@c FIXME What about m88k, i860?
+@c FIXME What about i860?
@ifset GENERIC
On some machines there are two different line comment characters. One
@@ -1729,7 +1975,7 @@ the line is ignored. (Just like a comment.)
# This is logical line # 36.
@end smallexample
This feature is deprecated, and may disappear from future versions
-of @code{@value{AS}}.
+of @command{@value{AS}}.
@node Symbol Intro
@section Symbols
@@ -1827,7 +2073,7 @@ directive: typically valid for any computer. If the symbol begins with
a letter the statement is an assembly language @dfn{instruction}: it
assembles into a machine language instruction.
@ifset GENERIC
-Different versions of @code{@value{AS}} for different computers
+Different versions of @command{@value{AS}} for different computers
recognize different instructions. In fact, the same symbol may
represent a different instruction in a different computer's assembly
language.@refill
@@ -1898,8 +2144,8 @@ double-quotes or null characters. The way to get special characters
into a string is to @dfn{escape} these characters: precede them with
a backslash @samp{\} character. For example @samp{\\} represents
one backslash: the first @code{\} is an escape which tells
-@code{@value{AS}} to interpret the second character literally as a backslash
-(which prevents @code{@value{AS}} from recognizing the second @code{\} as an
+@command{@value{AS}} to interpret the second character literally as a backslash
+(which prevents @command{@value{AS}} from recognizing the second @code{\} as an
escape character). The complete list of escapes follows.
@cindex escape codes, character
@@ -1982,8 +2228,8 @@ this character, because an unescaped @samp{"} would end the string.
Any other character when escaped by @kbd{\} gives a warning, but
assembles as if the @samp{\} was not present. The idea is that if
you used an escape sequence you clearly didn't want the literal
-interpretation of the following character. However @code{@value{AS}} has no
-other interpretation, so @code{@value{AS}} knows it is giving you the wrong
+interpretation of the following character. However @command{@value{AS}} has no
+other interpretation, so @command{@value{AS}} knows it is giving you the wrong
code and warns you of the fact.
@end table
@@ -2023,7 +2269,7 @@ H8/500)
immediately following an acute accent is taken as a literal character
and does not count as the end of a statement. The value of a character
constant in a numeric expression is the machine's byte-wide code for
-that character. @code{@value{AS}} assumes your character code is ASCII:
+that character. @command{@value{AS}} assumes your character code is ASCII:
@kbd{'A} means 65, @kbd{'B} means 66, and so on. @refill
@node Numbers
@@ -2031,7 +2277,7 @@ that character. @code{@value{AS}} assumes your character code is ASCII:
@cindex constants, number
@cindex number constants
-@code{@value{AS}} distinguishes three kinds of numbers according to how they
+@command{@value{AS}} distinguishes three kinds of numbers according to how they
are stored in the target machine. @emph{Integers} are numbers that
would fit into an @code{int} in the C language. @emph{Bignums} are
integers, but they are stored in more than 32 bits. @emph{Flonums}
@@ -2096,10 +2342,10 @@ integers are permitted while bignums are not.
@cindex precision, floating point
A @dfn{flonum} represents a floating point number. The translation is
indirect: a decimal floating point number from the text is converted by
-@code{@value{AS}} to a generic binary floating point number of more than
+@command{@value{AS}} to a generic binary floating point number of more than
sufficient precision. This generic floating point number is converted
to a particular computer's floating point format (or formats) by a
-portion of @code{@value{AS}} specialized to that computer.
+portion of @command{@value{AS}} specialized to that computer.
A flonum is written by writing (in order)
@itemize @bullet
@@ -2110,7 +2356,7 @@ The digit @samp{0}.
@end ifset
@item
-A letter, to tell @code{@value{AS}} the rest of the number is a flonum.
+A letter, to tell @command{@value{AS}} the rest of the number is a flonum.
@ifset GENERIC
@kbd{e} is recommended. Case is not important.
@ignore
@@ -2179,9 +2425,9 @@ One or more decimal digits.
At least one of the integer part or the fractional part must be
present. The floating point number has the usual base-10 value.
-@code{@value{AS}} does all processing using integers. Flonums are computed
+@command{@value{AS}} does all processing using integers. Flonums are computed
independently of any floating point hardware in the computer running
-@code{@value{AS}}.
+@command{@value{AS}}.
@ifclear GENERIC
@ifset I960
@@ -2199,7 +2445,7 @@ specify two numbers separated by a colon---
@var{mask}:@var{value}
@end example
@noindent
-@code{@value{AS}} applies a bitwise @sc{and} between @var{mask} and
+@command{@value{AS}} applies a bitwise @sc{and} between @var{mask} and
@var{value}.
The resulting number is then packed
@@ -2241,11 +2487,11 @@ For example there may be a ``read only'' section.
@cindex linker, and assembler
@cindex assembler, and linker
The linker @code{@value{LD}} reads many object files (partial programs) and
-combines their contents to form a runnable program. When @code{@value{AS}}
+combines their contents to form a runnable program. When @command{@value{AS}}
emits an object file, the partial program is assumed to start at address 0.
@code{@value{LD}} assigns the final addresses for the partial program, so that
different partial programs do not overlap. This is actually an
-oversimplification, but it suffices to explain how @code{@value{AS}} uses
+oversimplification, but it suffices to explain how @command{@value{AS}} uses
sections.
@code{@value{LD}} moves blocks of bytes of your program to their run-time
@@ -2258,12 +2504,12 @@ the proper run-time addresses.
@ifset H8
For the H8/300 and H8/500,
and for the Hitachi SH,
-@code{@value{AS}} pads sections if needed to
+@command{@value{AS}} pads sections if needed to
ensure they end on a word (sixteen bit) boundary.
@end ifset
@cindex standard assembler sections
-An object file written by @code{@value{AS}} has at least three sections, any
+An object file written by @command{@value{AS}} has at least three sections, any
of which may be empty. These are named @dfn{text}, @dfn{data} and
@dfn{bss} sections.
@@ -2271,7 +2517,7 @@ of which may be empty. These are named @dfn{text}, @dfn{data} and
@ifset GENERIC
When it generates COFF output,
@end ifset
-@code{@value{AS}} can also generate whatever other named sections you specify
+@command{@value{AS}} can also generate whatever other named sections you specify
using the @samp{.section} directive (@pxref{Section,,@code{.section}}).
If you do not use any directives that place output in the @samp{.text}
or @samp{.data} sections, these sections still exist, but are empty.
@@ -2279,16 +2525,16 @@ or @samp{.data} sections, these sections still exist, but are empty.
@ifset HPPA
@ifset GENERIC
-When @code{@value{AS}} generates SOM or ELF output for the HPPA,
+When @command{@value{AS}} generates SOM or ELF output for the HPPA,
@end ifset
-@code{@value{AS}} can also generate whatever other named sections you
+@command{@value{AS}} can also generate whatever other named sections you
specify using the @samp{.space} and @samp{.subspace} directives. See
@cite{HP9000 Series 800 Assembly Language Reference Manual}
(HP 92432-90001) for details on the @samp{.space} and @samp{.subspace}
assembler directives.
@ifset SOM
-Additionally, @code{@value{AS}} uses different names for the standard
+Additionally, @command{@value{AS}} uses different names for the standard
text, data, and bss sections when generating SOM output. Program text
is placed into the @samp{$CODE$} section, data into @samp{$DATA$}, and
BSS into @samp{$BSS$}.
@@ -2305,7 +2551,7 @@ section starts at address @code{0}, the data section at address
@end ifset
To let @code{@value{LD}} know which data changes when the sections are
-relocated, and how to change that data, @code{@value{AS}} also writes to the
+relocated, and how to change that data, @command{@value{AS}} also writes to the
object file details of the relocation needed. To perform relocation
@code{@value{LD}} must know, each time an address in the object
file is mentioned:
@@ -2326,12 +2572,12 @@ Is the reference to an address ``Program-Counter relative''?
@cindex addresses, format of
@cindex section-relative addressing
-In fact, every address @code{@value{AS}} ever uses is expressed as
+In fact, every address @command{@value{AS}} ever uses is expressed as
@display
(@var{section}) + (@var{offset into section})
@end display
@noindent
-Further, most expressions @code{@value{AS}} computes have this section-relative
+Further, most expressions @command{@value{AS}} computes have this section-relative
nature.
@ifset SOM
(For some object formats, such as SOM for the HPPA, some expressions are
@@ -2367,7 +2613,7 @@ the addresses of all partial programs' text sections. Likewise for
data and bss sections.
Some sections are manipulated by @code{@value{LD}}; others are invented for
-use of @code{@value{AS}} and have no meaning except during assembly.
+use of @command{@value{AS}} and have no meaning except during assembly.
@node Ld Sections
@section Linker Sections
@@ -2386,7 +2632,7 @@ use of @code{@value{AS}} and have no meaning except during assembly.
@itemx text section
@itemx data section
@end ifset
-These sections hold your program. @code{@value{AS}} and @code{@value{LD}} treat them as
+These sections hold your program. @command{@value{AS}} and @code{@value{LD}} treat them as
separate but equal sections. Anything you can say of one section is
true another.
@ifset aout-bout
@@ -2479,11 +2725,11 @@ DDDD}\boxit{2cm}{\tt 00000}\ \dots\hfil}
@cindex internal assembler sections
@cindex sections in messages, internal
-These sections are meant only for the internal use of @code{@value{AS}}. They
+These sections are meant only for the internal use of @command{@value{AS}}. They
have no meaning at run-time. You do not really need to know about these
-sections for most purposes; but they can be mentioned in @code{@value{AS}}
+sections for most purposes; but they can be mentioned in @command{@value{AS}}
warning messages, so it might be helpful to have an idea of their
-meanings to @code{@value{AS}}. These sections are used to permit the
+meanings to @command{@value{AS}}. These sections are used to permit the
value of every expression in your assembly language program to be a
section-relative address.
@@ -2529,7 +2775,7 @@ text or data
@end ifset
@end ifclear
that you want to end up near to each other in the object file, even though they
-are not contiguous in the assembler source. @code{@value{AS}} allows you to
+are not contiguous in the assembler source. @command{@value{AS}} allows you to
use @dfn{subsections} for this purpose. Within each section, there can be
numbered subsections with values from 0 to 8192. Objects assembled into the
same subsection go into the object file together with other objects in the same
@@ -2545,7 +2791,7 @@ goes in subsection number zero.
@ifset GENERIC
Each subsection is zero-padded up to a multiple of four bytes.
(Subsections may be padded a different amount on different flavors
-of @code{@value{AS}}.)
+of @command{@value{AS}}.)
@end ifset
@ifclear GENERIC
@ifset H8
@@ -2607,7 +2853,7 @@ begins in @code{text 0}. For instance:
Each section has a @dfn{location counter} incremented by one for every byte
assembled into that section. Because subsections are merely a convenience
-restricted to @code{@value{AS}} there is no concept of a subsection location
+restricted to @command{@value{AS}} there is no concept of a subsection location
counter. There is no way to directly manipulate a location counter---but the
@code{.align} directive changes it, and any label definition captures its
current value. The location counter of the section where statements are being
@@ -2648,7 +2894,7 @@ to debug.
@quotation
@cindex debuggers, and symbol order
-@emph{Warning:} @code{@value{AS}} does not place symbols in the object file in
+@emph{Warning:} @command{@value{AS}} does not place symbols in the object file in
the same order they were declared. This may break some debuggers.
@end quotation
@@ -2674,7 +2920,7 @@ definitions.
@ifset HPPA
On the HPPA, the usual form for a label need not be immediately followed by a
colon, but instead must start in column zero. Only one label may be defined on
-a single line. To work around this, the HPPA version of @code{@value{AS}} also
+a single line. To work around this, the HPPA version of @command{@value{AS}} also
provides a special directive @code{.label} for defining labels more flexibly.
@end ifset
@@ -2729,56 +2975,92 @@ in a program.
@cindex temporary symbol names
@cindex symbol names, temporary
Local symbols help compilers and programmers use names temporarily.
-There are ten local symbol names, which are re-used throughout the
-program. You may refer to them using the names @samp{0} @samp{1}
-@dots{} @samp{9}. To define a local symbol, write a label of the form
-@samp{@b{N}:} (where @b{N} represents any digit). To refer to the most
-recent previous definition of that symbol write @samp{@b{N}b}, using the
-same digit as when you defined the label. To refer to the next
-definition of a local label, write @samp{@b{N}f}---where @b{N} gives you
-a choice of 10 forward references. The @samp{b} stands for
-``backwards'' and the @samp{f} stands for ``forwards''.
-
-Local symbols are not emitted by the current @sc{gnu} C compiler.
-
-There is no restriction on how you can use these labels, but
-remember that at any point in the assembly you can refer to at most
-10 prior local labels and to at most 10 forward local labels.
-
-Local symbol names are only a notation device. They are immediately
-transformed into more conventional symbol names before the assembler
-uses them. The symbol names stored in the symbol table, appearing in
-error messages and optionally emitted to the object file have these
+They create symbols which are guaranteed to be unique over the entire scope of
+the input source code and which can be referred to by a simple notation.
+To define a local symbol, write a label of the form @samp{@b{N}:} (where @b{N}
+represents any positive integer). To refer to the most recent previous
+definition of that symbol write @samp{@b{N}b}, using the same number as when
+you defined the label. To refer to the next definition of a local label, write
+@samp{@b{N}f}--- The @samp{b} stands for``backwards'' and the @samp{f} stands
+for ``forwards''.
+
+There is no restriction on how you can use these labels, and you can reuse them
+too. So that it is possible to repeatedly define the same local label (using
+the same number @samp{@b{N}}), although you can only refer to the most recently
+defined local label of that number (for a backwards reference) or the next
+definition of a specific local label for a forward reference. It is also worth
+noting that the first 10 local labels (@samp{@b{0:}}@dots{}@samp{@b{9:}}) are
+implemented in a slightly more efficient manner than the others.
+
+Here is an example:
+
+@smallexample
+1: branch 1f
+2: branch 1b
+1: branch 2f
+2: branch 1b
+@end smallexample
+
+Which is the equivalent of:
+
+@smallexample
+label_1: branch label_3
+label_2: branch label_1
+label_3: branch label_4
+label_4: branch label_3
+@end smallexample
+
+Local symbol names are only a notational device. They are immediately
+transformed into more conventional symbol names before the assembler uses them.
+The symbol names stored in the symbol table, appearing in error messages and
+optionally emitted to the object file. The names are constructed using these
parts:
@table @code
@item L
-All local labels begin with @samp{L}. Normally both @code{@value{AS}} and
+All local labels begin with @samp{L}. Normally both @command{@value{AS}} and
@code{@value{LD}} forget symbols that start with @samp{L}. These labels are
used for symbols you are never intended to see. If you use the
-@samp{-L} option then @code{@value{AS}} retains these symbols in the
+@samp{-L} option then @command{@value{AS}} retains these symbols in the
object file. If you also instruct @code{@value{LD}} to retain these symbols,
you may use them in debugging.
-@item @var{digit}
-If the label is written @samp{0:} then the digit is @samp{0}.
-If the label is written @samp{1:} then the digit is @samp{1}.
-And so on up through @samp{9:}.
+@item @var{number}
+This is the number that was used in the local label definition. So if the
+label is written @samp{55:} then the number is @samp{55}.
-@item @kbd{C-A}
-This unusual character is included so you do not accidentally invent
-a symbol of the same name. The character has ASCII value
-@samp{\001}.
+@item @kbd{C-B}
+This unusual character is included so you do not accidentally invent a symbol
+of the same name. The character has ASCII value of @samp{\002} (control-B).
@item @emph{ordinal number}
-This is a serial number to keep the labels distinct. The first
-@samp{0:} gets the number @samp{1}; The 15th @samp{0:} gets the
-number @samp{15}; @emph{etc.}. Likewise for the other labels @samp{1:}
-through @samp{9:}.
+This is a serial number to keep the labels distinct. The first definition of
+@samp{0:} gets the number @samp{1}. The 15th definition of @samp{0:} gets the
+number @samp{15}, and so on. Likewise the first definition of @samp{1:} gets
+the number @samp{1} and its 15th defintion gets @samp{15} as well.
@end table
-For instance, the first @code{1:} is named @code{L1@kbd{C-A}1}, the 44th
-@code{3:} is named @code{L3@kbd{C-A}44}.
+So for example, the first @code{1:} is named @code{L1@kbd{C-B}1}, the 44th
+@code{3:} is named @code{L3@kbd{C-B}44}.
+
+@subheading Dollar Local Labels
+@cindex dollar local symbols
+
+@code{@value{AS}} also supports an even more local form of local labels called
+dollar labels. These labels go out of scope (ie they become undefined) as soon
+as a non-local label is defined. Thus they remain valid for only a small
+region of the input source code. Normal local labels, by contrast, remain in
+scope for the entire file, or until they are redefined by another occurrence of
+the same local label.
+
+Dollar labels are defined in exactly the same way as ordinary local labels,
+except that instead of being terminated by a colon, they are terminated by a
+dollar sign. eg @samp{@b{55$}}.
+
+They can also be distinguished from ordinary local labels by their transformed
+name which uses ASCII character @samp{\001} (control-A) as the magic character
+to distinguish them from ordinary labels. Thus the 5th defintion of @samp{6$}
+is named @samp{L6@kbd{C-A}5}.
@node Dot
@section The Special Dot Symbol
@@ -2788,7 +3070,7 @@ For instance, the first @code{1:} is named @code{L1@kbd{C-A}1}, the 44th
@cindex current address
@cindex location counter
The special symbol @samp{.} refers to the current address that
-@code{@value{AS}} is assembling into. Thus, the expression @samp{melvin:
+@command{@value{AS}} is assembling into. Thus, the expression @samp{melvin:
.long .} defines @code{melvin} to contain its own address.
Assigning a value to @code{.} is treated the same as a @code{.org}
directive. Thus, the expression @samp{.=.+4} is the same as saying
@@ -2813,7 +3095,7 @@ attributes.
The detailed definitions are in @file{a.out.h}.
@end ifset
-If you use a symbol without defining it, @code{@value{AS}} assumes zero for
+If you use a symbol without defining it, @command{@value{AS}} assumes zero for
all these attributes, and probably won't warn you. This makes the
symbol an externally defined symbol, which is generally what you
would want.
@@ -2885,7 +3167,7 @@ format depends on the object-code output format in use.
@cindex @code{b.out} symbol attributes
@cindex symbol attributes, @code{b.out}
-These symbol attributes appear only when @code{@value{AS}} is configured for
+These symbol attributes appear only when @command{@value{AS}} is configured for
one of the Berkeley-descended object output formats---@code{a.out} or
@code{b.out}.
@@ -2919,13 +3201,13 @@ one of the Berkeley-descended object output formats---@code{a.out} or
This is an arbitrary 16-bit value. You may establish a symbol's
descriptor value by using a @code{.desc} statement
(@pxref{Desc,,@code{.desc}}). A descriptor value means nothing to
-@code{@value{AS}}.
+@command{@value{AS}}.
@node Symbol Other
@subsubsection Other
@cindex other attribute, of @code{a.out} symbol
-This is an arbitrary 8-bit value. It means nothing to @code{@value{AS}}.
+This is an arbitrary 8-bit value. It means nothing to @command{@value{AS}}.
@end ifset
@ifset COFF
@@ -2948,7 +3230,7 @@ respectively, with @code{.val} and @code{.type}.
@subsubsection Auxiliary Attributes
@cindex auxiliary attributes, COFF symbols
-The @code{@value{AS}} directives @code{.dim}, @code{.line}, @code{.scl},
+The @command{@value{AS}} directives @code{.dim}, @code{.line}, @code{.scl},
@code{.size}, and @code{.tag} can generate auxiliary symbol table
information for COFF.
@end ifset
@@ -2979,10 +3261,10 @@ Whitespace may precede and/or follow an expression.
The result of an expression must be an absolute number, or else an offset into
a particular section. If an expression is not absolute, and there is not
-enough information when @code{@value{AS}} sees the expression to know its
+enough information when @command{@value{AS}} sees the expression to know its
section, a second pass over the source program might be necessary to interpret
the expression---but the second pass is currently not implemented.
-@code{@value{AS}} aborts with an error message in this situation.
+@command{@value{AS}} aborts with an error message in this situation.
@menu
* Empty Exprs:: Empty Expressions
@@ -2996,7 +3278,7 @@ the expression---but the second pass is currently not implemented.
@cindex expressions, empty
An empty expression has no value: it is just whitespace or null.
Wherever an absolute expression is required, you may omit the
-expression, and @code{@value{AS}} assumes a value of (absolute) 0. This
+expression, and @command{@value{AS}} assumes a value of (absolute) 0. This
is compatible with other assemblers.
@node Integer Exprs
@@ -3036,7 +3318,7 @@ integer.
Numbers are usually integers.
A number can be a flonum or bignum. In this case, you are warned
-that only the low order 32 bits are used, and @code{@value{AS}} pretends
+that only the low order 32 bits are used, and @command{@value{AS}} pretends
these 32 bits are an integer. You may write integer-manipulating
instructions that act on exotic constants, compatible with other
assemblers.
@@ -3061,7 +3343,7 @@ whitespace.
@subsection Prefix Operator
@cindex prefix operators
-@code{@value{AS}} has the following @dfn{prefix operators}. They each take
+@command{@value{AS}} has the following @dfn{prefix operators}. They each take
one argument, which must be absolute.
@c the tex/end tex stuff surrounding this small table is meant to make
@@ -3089,7 +3371,7 @@ one argument, which must be absolute.
@cindex operators, permitted arguments
@dfn{Infix operators} take two arguments, one on either side. Operators
have precedence, but operations with equal precedence are performed left
-to right. Apart from @code{+} or @code{-}, both arguments must be
+to right. Apart from @code{+} or @option{-}, both arguments must be
absolute, and the result is absolute.
@enumerate
@@ -3274,6 +3556,7 @@ Some machine configurations provide additional directives.
* hword:: @code{.hword @var{expressions}}
* Ident:: @code{.ident}
* If:: @code{.if @var{absolute expression}}
+* Incbin:: @code{.incbin "@var{file}"[,@var{skip}[,@var{count}]]}
* Include:: @code{.include "@var{file}"}
* Int:: @code{.int @var{expressions}}
@ifset ELF
@@ -3375,7 +3658,7 @@ Some machine configurations provide additional directives.
This directive stops the assembly immediately. It is for
compatibility with other assemblers. The original idea was that the
assembly language source would be piped into the assembler. If the sender
-of the source quit, it could use this directive tells @code{@value{AS}} to
+of the source quit, it could use this directive tells @command{@value{AS}} to
quit also. One day @code{.abort} will not be supported.
@ifset COFF
@@ -3383,11 +3666,11 @@ quit also. One day @code{.abort} will not be supported.
@section @code{.ABORT}
@cindex @code{ABORT} directive
-When producing COFF output, @code{@value{AS}} accepts this directive as a
+When producing COFF output, @command{@value{AS}} accepts this directive as a
synonym for @samp{.abort}.
@ifset BOUT
-When producing @code{b.out} output, @code{@value{AS}} accepts this directive,
+When producing @code{b.out} output, @command{@value{AS}} accepts this directive,
but ignores it.
@end ifset
@end ifset
@@ -3519,7 +3802,7 @@ example, an alignment of 16 means that the least significant 4 bits of the
address should be zero). The alignment must be an absolute expression, and it
must be a power of two. If @code{@value{LD}} allocates uninitialized memory
for the common symbol, it will use the alignment when placing the symbol. If
-no alignment is specified, @code{@value{AS}} will set the alignment to the
+no alignment is specified, @command{@value{AS}} will set the alignment to the
largest power of two less than or equal to the size of the symbol, up to a
maximum of 16.
@end ifset
@@ -3533,7 +3816,7 @@ The syntax for @code{.comm} differs slightly on the HPPA. The syntax is
@section @code{.data @var{subsection}}
@cindex @code{data} directive
-@code{.data} tells @code{@value{AS}} to assemble the following statements onto the
+@code{.data} tells @command{@value{AS}} to assemble the following statements onto the
end of the data subsection numbered @var{subsection} (which is an
absolute expression). If @var{subsection} is omitted, it defaults
to zero.
@@ -3549,7 +3832,7 @@ Begin defining debugging information for a symbol @var{name}; the
definition extends until the @code{.endef} directive is encountered.
@ifset BOUT
-This directive is only observed when @code{@value{AS}} is configured for COFF
+This directive is only observed when @command{@value{AS}} is configured for COFF
format output; when producing @code{b.out}, @samp{.def} is recognized,
but ignored.
@end ifset
@@ -3566,9 +3849,9 @@ This directive sets the descriptor of the symbol (@pxref{Symbol Attributes})
to the low 16 bits of an absolute expression.
@ifset COFF
-The @samp{.desc} directive is not available when @code{@value{AS}} is
+The @samp{.desc} directive is not available when @command{@value{AS}} is
configured for COFF output; it is only for @code{a.out} or @code{b.out}
-object format. For the sake of compatibility, @code{@value{AS}} accepts
+object format. For the sake of compatibility, @command{@value{AS}} accepts
it, but produces no output, when configured for COFF.
@end ifset
@end ifset
@@ -3586,7 +3869,7 @@ information in the symbol table. It is only permitted inside
@ifset BOUT
@samp{.dim} is only meaningful when generating COFF format output; when
-@code{@value{AS}} is generating @code{b.out}, it accepts this directive but
+@command{@value{AS}} is generating @code{b.out}, it accepts this directive but
ignores it.
@end ifset
@end ifset
@@ -3600,7 +3883,7 @@ ignores it.
assembles floating point numbers.
@ifset GENERIC
The exact kind of floating point numbers emitted depends on how
-@code{@value{AS}} is configured. @xref{Machine Dependencies}.
+@command{@value{AS}} is configured. @xref{Machine Dependencies}.
@end ifset
@ifclear GENERIC
@ifset IEEEFLOAT
@@ -3622,7 +3905,7 @@ Force a page break at this point, when generating assembly listings.
@section @code{.else}
@cindex @code{else} directive
-@code{.else} is part of the @code{@value{AS}} support for conditional
+@code{.else} is part of the @command{@value{AS}} support for conditional
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.
@@ -3631,7 +3914,7 @@ was false.
@section @code{.elseif}
@cindex @code{elseif} directive
-@code{.elseif} is part of the @code{@value{AS}} support for conditional
+@code{.elseif} is part of the @command{@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.
@@ -3639,7 +3922,7 @@ assembly; @pxref{If,,@code{.if}}. It is shorthand for beginning a new
@section @code{.end}
@cindex @code{end} directive
-@code{.end} marks the end of the assembly file. @code{@value{AS}} does not
+@code{.end} marks the end of the assembly file. @command{@value{AS}} does not
process anything in the file past the @code{.end} directive.
@ifset COFF
@@ -3652,7 +3935,7 @@ This directive flags the end of a symbol definition begun with
@ifset BOUT
@samp{.endef} is only meaningful when generating COFF format output; if
-@code{@value{AS}} is configured to generate @code{b.out}, it accepts this
+@command{@value{AS}} is configured to generate @code{b.out}, it accepts this
directive but ignores it.
@end ifset
@end ifset
@@ -3666,7 +3949,7 @@ directive but ignores it.
@section @code{.endif}
@cindex @code{endif} directive
-@code{.endif} is part of the @code{@value{AS}} support for conditional assembly;
+@code{.endif} is part of the @command{@value{AS}} support for conditional assembly;
it marks the end of a block of code that is only assembled
conditionally. @xref{If,,@code{.if}}.
@@ -3701,8 +3984,8 @@ Except for the contents of the error message, this is roughly equivalent to
@node Err
@section @code{.err}
@cindex @code{err} directive
-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
+If @command{@value{AS}} assembles a @code{.err} directive, it will print an error
+message and, unless the @option{-Z} option was used, it will not generate an
object file. This can be used to signal error an conditionally compiled code.
@node Exitm
@@ -3714,7 +3997,7 @@ Exit early from the current macro definition. @xref{Macro}.
@cindex @code{extern} directive
@code{.extern} is accepted in the source program---for compatibility
-with other assemblers---but it is ignored. @code{@value{AS}} treats
+with other assemblers---but it is ignored. @command{@value{AS}} treats
all undefined symbols as external.
@node Fail
@@ -3722,8 +4005,8 @@ all undefined symbols as external.
@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
+or more, @command{@value{AS}} will print a warning message. If the value is less
+than 500, @command{@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.
@@ -3734,14 +4017,14 @@ complex nested macros or conditional assembly.
@cindex @code{file} directive
@cindex logical file name
@cindex file name, logical
-@code{.file} tells @code{@value{AS}} that we are about to start a new logical
+@code{.file} tells @command{@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.
+old @command{@value{AS}} programs.
@ifset A29K
-In some configurations of @code{@value{AS}}, @code{.file} has already been
+In some configurations of @command{@value{AS}}, @code{.file} has already been
removed to avoid conflicts with other assemblers. @xref{Machine Dependencies}.
@end ifset
@end ifclear
@@ -3752,14 +4035,14 @@ removed to avoid conflicts with other assemblers. @xref{Machine Dependencies}.
@cindex @code{fill} directive
@cindex writing patterns in memory
@cindex patterns, writing in memory
-@var{result}, @var{size} and @var{value} are absolute expressions.
+@var{repeat}, @var{size} and @var{value} are absolute expressions.
This emits @var{repeat} copies of @var{size} bytes. @var{Repeat}
may be zero or more. @var{Size} may be zero or more, but if it is
more than 8, then it is deemed to have the value 8, compatible with
other people's assemblers. The contents of each @var{repeat} bytes
is taken from an 8-byte number. The highest order 4 bytes are
zero. The lowest order 4 bytes are @var{value} rendered in the
-byte-order of an integer on the computer @code{@value{AS}} is assembling for.
+byte-order of an integer on the computer @command{@value{AS}} is assembling for.
Each @var{size} bytes in a repetition is taken from the lowest order
@var{size} bytes of this number. Again, this bizarre behavior is
compatible with other people's assemblers.
@@ -3778,7 +4061,7 @@ This directive assembles zero or more flonums, separated by commas. It
has the same effect as @code{.single}.
@ifset GENERIC
The exact kind of floating point numbers emitted depends on how
-@code{@value{AS}} is configured.
+@command{@value{AS}} is configured.
@xref{Machine Dependencies}.
@end ifset
@ifclear GENERIC
@@ -3864,7 +4147,7 @@ This directive is a synonym for both @samp{.short} and @samp{.word}.
@cindex @code{ident} directive
This directive is used by some assemblers to place tags in object files.
-@code{@value{AS}} simply accepts the directive for source-file
+@command{@value{AS}} simply accepts the directive for source-file
compatibility with such assemblers, but does not actually emit anything
for it.
@@ -3946,6 +4229,22 @@ 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 Incbin
+@section @code{.incbin "@var{file}"[,@var{skip}[,@var{count}]]}
+
+@cindex @code{incbin} directive
+@cindex binary files, including
+The @code{incbin} directive includes @var{file} verbatim at the current
+location. You can control the search paths used with the @samp{-I} command-line
+option (@pxref{Invoking,,Command-Line Options}). Quotation marks are required
+around @var{file}.
+
+The @var{skip} argument skips a number of bytes from the start of the
+@var{file}. The @var{count} argument indicates the maximum number of bytes to
+read. Note that the data is not aligned in any way, so it is the user's
+responsibility to make sure that proper alignment is provided both before and
+after the @code{incbin} directive.
+
@node Include
@section @code{.include "@var{file}"}
@@ -4078,7 +4377,7 @@ The syntax for @code{.lcomm} differs slightly on the HPPA. The syntax is
@section @code{.lflags}
@cindex @code{lflags} directive (ignored)
-@code{@value{AS}} accepts this directive, for compatibility with other
+@command{@value{AS}} accepts this directive, for compatibility with other
assemblers, but ignores it.
@ifclear no-line-dir
@@ -4099,7 +4398,7 @@ Change the logical line number. @var{line-number} must be an absolute
expression. The next line has that logical line number. Therefore any other
statements on the current line (after a statement separator character) are
reported as on logical line number @var{line-number} @minus{} 1. One day
-@code{@value{AS}} will no longer support this directive: it is recognized only
+@command{@value{AS}} will no longer support this directive: it is recognized only
for compatibility with existing assembler programs.
@ifset GENERIC
@@ -4112,7 +4411,7 @@ not available; use the synonym @code{.ln} in that context.
@ifclear no-line-dir
Even though this is a directive associated with the @code{a.out} or
-@code{b.out} object-code formats, @code{@value{AS}} still recognizes it
+@code{b.out} object-code formats, @command{@value{AS}} still recognizes it
when producing COFF output, and treats @samp{.line} as though it
were the COFF @samp{.ln} @emph{if} it is found outside a
@code{.def}/@code{.endef} pair.
@@ -4167,14 +4466,14 @@ Warn if any of the duplicates do not have exactly the same contents.
@samp{.ln} is a synonym for @samp{.line}.
@end ifclear
@ifset no-line-dir
-Tell @code{@value{AS}} to change the logical line number. @var{line-number}
+Tell @command{@value{AS}} to change the logical line number. @var{line-number}
must be an absolute expression. The next line has that logical
line number, so any other statements on the current line (after a
statement separator character @code{;}) are reported as on logical
line number @var{line-number} @minus{} 1.
@ifset BOUT
-This directive is accepted, but ignored, when @code{@value{AS}} is
+This directive is accepted, but ignored, when @command{@value{AS}} is
configured for @code{b.out}; its effect is only associated with COFF
output format.
@end ifset
@@ -4185,8 +4484,8 @@ output format.
@cindex @code{mri} directive
@cindex MRI mode, temporarily
-If @var{val} is non-zero, this tells @code{@value{AS}} to enter MRI mode. If
-@var{val} is zero, this tells @code{@value{AS}} to exit MRI mode. This change
+If @var{val} is non-zero, this tells @command{@value{AS}} to enter MRI mode. If
+@var{val} is zero, this tells @command{@value{AS}} to exit MRI mode. This change
affects code assembled until the next @code{.mri} directive, or until the end
of the file. @xref{M, MRI mode, MRI mode}.
@@ -4307,7 +4606,7 @@ Exit early from the current macro definition.
@cindex number of macros executed
@cindex macros, count executed
@item \@@
-@code{@value{AS}} maintains a counter of how many macros it has
+@command{@value{AS}} maintains a counter of how many macros it has
executed in this pseudo-variable; you can copy that number to your
output with @samp{\@@}, but @emph{only within a macro definition}.
@@ -4362,7 +4661,7 @@ expression with the same section as the current subsection. That is,
you can't use @code{.org} to cross sections: if @var{new-lc} has the
wrong section, the @code{.org} directive is ignored. To be compatible
with former assemblers, if the section of @var{new-lc} is absolute,
-@code{@value{AS}} issues a warning, then pretends the section of @var{new-lc}
+@command{@value{AS}} issues a warning, then pretends the section of @var{new-lc}
is the same as the current subsection.
@code{.org} may only increase the location counter, or leave it
@@ -4372,7 +4671,7 @@ backwards.
@c double negative used below "not undefined" because this is a specific
@c reference to "undefined" (as SEG_UNKNOWN is called in this manual)
@c section. doc@cygnus.com 18feb91
-Because @code{@value{AS}} tries to assemble programs in one pass, @var{new-lc}
+Because @command{@value{AS}} tries to assemble programs in one pass, @var{new-lc}
may not be undefined. If you really detest this restriction we eagerly await
a chance to share your improved assembler.
@@ -4462,7 +4761,7 @@ stack.
@section @code{.print @var{string}}
@cindex @code{print} directive
-@code{@value{AS}} will print @var{string} on the standard output during
+@command{@value{AS}} will print @var{string} on the standard output during
assembly. You must put @var{string} in double quotes.
@ifset ELF
@@ -4495,7 +4794,7 @@ If you do not use @code{.psize}, listings use a default line-count
of 60. You may omit the comma and @var{columns} specification; the
default width is 200 columns.
-@code{@value{AS}} generates formfeeds whenever the specified number of
+@command{@value{AS}} generates formfeeds whenever the specified number of
lines is exceeded (or whenever you explicitly request one, using
@code{.eject}).
@@ -4596,7 +4895,7 @@ symbolic debugging information.
@ifset BOUT
The @samp{.scl} directive is primarily associated with COFF output; when
-configured to generate @code{b.out} output format, @code{@value{AS}}
+configured to generate @code{b.out} output format, @command{@value{AS}}
accepts this directive but ignores it.
@end ifset
@end ifset
@@ -4642,7 +4941,9 @@ shared section (meaningful for PE targets)
If no flags are specified, the default flags depend upon the section name. If
the section name is not recognized, the default will be for the section to be
-loaded and writable.
+loaded and writable. Note the @code{n} and @code{w} flags remove attributes
+from the section, rather than adding them, so if they are used on their own it
+will be as if no flags had been specified at all.
If the optional argument to the @code{.section} directive is not quoted, it is
taken as a subsegment number (@pxref{Sub-Sections}).
@@ -4663,7 +4964,7 @@ This is one of the ELF section stack manipulation directives. The others are
For ELF targets, the @code{.section} directive is used like this:
@smallexample
-.section @var{name} [, "@var{flags}"[, @@@var{type}]]
+.section @var{name} [, "@var{flags}"[, @@@var{type}[, @@@var{entsize}]]]
@end smallexample
The optional @var{flags} argument is a quoted string which may contain any
@@ -4675,6 +4976,10 @@ section is allocatable
section is writable
@item x
section is executable
+@item M
+section is mergeable
+@item S
+section contains zero terminated strings
@end table
The optional @var{type} argument may contain one of the following constants:
@@ -4685,6 +4990,13 @@ section contains data
section does not contain data (i.e., section only occupies space)
@end table
+If @var{flags} contains @code{M} flag, @var{type} argument must be specified
+as well as @var{entsize} argument. Sections with @code{M} flag but not
+@code{S} flag must contain fixed size constants, each @var{entsize} octets
+long. Sections with both @code{M} and @code{S} must contain zero terminated
+strings where each character is @var{entsize} bytes long. The linker may remove
+duplicates within sections with the same name, same entity size and same flags.
+
If no flags are specified, the default flags depend upon the section name. If
the section name is not recognized, the default will be for the section to have
none of the above flags: it will not be allocated in memory, nor writable, nor
@@ -4763,7 +5075,7 @@ This directive assembles zero or more flonums, separated by commas. It
has the same effect as @code{.float}.
@ifset GENERIC
The exact kind of floating point numbers emitted depends on how
-@code{@value{AS}} is configured. @xref{Machine Dependencies}.
+@command{@value{AS}} is configured. @xref{Machine Dependencies}.
@end ifset
@ifclear GENERIC
@ifset IEEEFLOAT
@@ -4782,7 +5094,7 @@ information in the symbol table. It is only permitted inside
@ifset BOUT
@samp{.size} is only meaningful when generating COFF format output; when
-@code{@value{AS}} is generating @code{b.out}, it accepts this directive but
+@command{@value{AS}} is generating @code{b.out}, it accepts this directive but
ignores it.
@end ifset
@@ -4857,7 +5169,7 @@ compatibility with other AMD 29K assemblers.
@cindex @code{stab@var{x}} directives
There are three directives that begin @samp{.stab}.
All emit symbols (@pxref{Symbols}), for use by symbolic debuggers.
-The symbols are not entered in the @code{@value{AS}} hash table: they
+The symbols are not entered in the @command{@value{AS}} hash table: they
cannot be referenced elsewhere in the source file.
Up to five fields are required:
@@ -5032,7 +5344,7 @@ definitions in the symbol table with instances of those structures.
@ifset BOUT
@samp{.tag} is only used when generating COFF format output; when
-@code{@value{AS}} is generating @code{b.out}, it accepts this directive but
+@command{@value{AS}} is generating @code{b.out}, it accepts this directive but
ignores it.
@end ifset
@end ifset
@@ -5041,7 +5353,7 @@ ignores it.
@section @code{.text @var{subsection}}
@cindex @code{text} directive
-Tells @code{@value{AS}} to assemble the following statements onto the end of
+Tells @command{@value{AS}} to assemble the following statements onto the end of
the text subsection numbered @var{subsection}, which is an absolute
expression. If @var{subsection} is omitted, subsection number zero
is used.
@@ -5068,7 +5380,7 @@ records the integer @var{int} as the type attribute of a symbol table entry.
@ifset BOUT
@samp{.type} is associated only with COFF format output; when
-@code{@value{AS}} is configured for @code{b.out} output, it accepts this
+@command{@value{AS}} is configured for @code{b.out} output, it accepts this
directive but ignores it.
@end ifset
@@ -5119,7 +5431,7 @@ records the address @var{addr} as the value attribute of a symbol table
entry.
@ifset BOUT
-@samp{.val} is used only for COFF output; when @code{@value{AS}} is
+@samp{.val} is used only for COFF output; when @command{@value{AS}} is
configured for @code{b.out}, it accepts this directive but ignores it.
@end ifset
@end ifset
@@ -5168,10 +5480,10 @@ This directive expects zero or more @var{expressions}, of any section,
separated by commas.
@ifclear GENERIC
@ifset W32
-For each expression, @code{@value{AS}} emits a 32-bit number.
+For each expression, @command{@value{AS}} emits a 32-bit number.
@end ifset
@ifset W16
-For each expression, @code{@value{AS}} emits a 16-bit number.
+For each expression, @command{@value{AS}} emits a 16-bit number.
@end ifset
@end ifclear
@ifset GENERIC
@@ -5197,11 +5509,11 @@ interest to you does 32-bit addressing (or doesn't require it;
@end ifset
In order to assemble compiler output into something that works,
-@code{@value{AS}} occasionally does strange things to @samp{.word} directives.
+@command{@value{AS}} occasionally does strange things to @samp{.word} directives.
Directives of the form @samp{.word sym1-sym2} are often emitted by
-compilers as part of jump tables. Therefore, when @code{@value{AS}} assembles a
+compilers as part of jump tables. Therefore, when @command{@value{AS}} assembles a
directive of the form @samp{.word sym1-sym2}, and the difference between
-@code{sym1} and @code{sym2} does not fit in 16 bits, @code{@value{AS}}
+@code{sym1} and @code{sym2} does not fit in 16 bits, @command{@value{AS}}
creates a @dfn{secondary jump table}, immediately before the next label.
This secondary jump table is preceded by a short-jump to the
first byte after the secondary table. This short-jump prevents the flow
@@ -5219,7 +5531,7 @@ minus the address of the long-jump to @code{sym4}; and so on, for as many
entries in the original jump table as necessary.
@ifset INTERNALS
-@emph{This feature may be disabled by compiling @code{@value{AS}} with the
+@emph{This feature may be disabled by compiling @command{@value{AS}} with the
@samp{-DWORKING_DOT_WORD} option.} This feature is likely to confuse
assembly language programmers.
@end ifset
@@ -5244,11 +5556,11 @@ They are included for compatibility with older assemblers.
@cindex machine dependencies
The machine instruction sets are (almost by definition) different on
-each machine where @code{@value{AS}} runs. Floating point representations
-vary as well, and @code{@value{AS}} often supports a few additional
+each machine where @command{@value{AS}} runs. Floating point representations
+vary as well, and @command{@value{AS}} often supports a few additional
directives or command-line options for compatibility with other
assemblers on a particular platform. Finally, some versions of
-@code{@value{AS}} support special pseudo-instructions for branch
+@command{@value{AS}} support special pseudo-instructions for branch
optimization.
This chapter discusses most of these differences, though it does not
@@ -5301,15 +5613,27 @@ subject, see the hardware manufacturer's manual.
@ifset M68HC11
* M68HC11-Dependent:: M68HC11 and 68HC12 Dependent Features
@end ifset
+@ifset M880X0
+* M88K-Dependent:: M880x0 Dependent Features
+@end ifset
@ifset MIPS
* MIPS-Dependent:: MIPS Dependent Features
@end ifset
+@ifset MMIX
+* MMIX-Dependent:: MMIX Dependent Features
+@end ifset
@ifset SH
* SH-Dependent:: Hitachi SH Dependent Features
@end ifset
+@ifset PDP11
+* PDP-11-Dependent:: PDP-11 Dependent Features
+@end ifset
@ifset PJ
* PJ-Dependent:: picoJava Dependent Features
@end ifset
+@ifset PPC
+* PPC-Dependent:: PowerPC Dependent Features
+@end ifset
@ifset SPARC
* Sparc-Dependent:: SPARC Dependent Features
@end ifset
@@ -5357,7 +5681,7 @@ subject, see the hardware manufacturer's manual.
The machine instruction sets are different on each Hitachi chip family,
and there are also some syntax differences among the families. This
-chapter describes the specific @code{@value{AS}} features for each
+chapter describes the specific @command{@value{AS}} features for each
family.
@menu
@@ -5417,18 +5741,34 @@ family.
@include c-m68hc11.texi
@end ifset
+@ifset M880X0
+@include c-m88k.texi
+@end ifset
+
@ifset MIPS
@include c-mips.texi
@end ifset
+@ifset MMIX
+@include c-mmix.texi
+@end ifset
+
@ifset NS32K
@include c-ns32k.texi
@end ifset
+@ifset PDP11
+@include c-pdp11.texi
+@end ifset
+
@ifset PJ
@include c-pj.texi
@end ifset
+@ifset PPC
+@include c-ppc.texi
+@end ifset
+
@ifset SH
@include c-sh.texi
@end ifset
@@ -5463,12 +5803,12 @@ family.
@cindex bugs in assembler
@cindex reporting bugs in assembler
-Your bug reports play an essential role in making @code{@value{AS}} reliable.
+Your bug reports play an essential role in making @command{@value{AS}} reliable.
Reporting a bug may help you by bringing a solution to your problem, or it may
not. But in any case the principal function of a bug report is to help the
-entire community by making the next version of @code{@value{AS}} work better.
-Bug reports are your contribution to the maintenance of @code{@value{AS}}.
+entire community by making the next version of @command{@value{AS}} work better.
+Bug reports are your contribution to the maintenance of @command{@value{AS}}.
In order for a bug report to serve its purpose, you must include the
information that enables us to fix the bug.
@@ -5490,21 +5830,21 @@ If you are not sure whether you have found a bug, here are some guidelines:
@cindex crash of assembler
@item
If the assembler gets a fatal signal, for any input whatever, that is a
-@code{@value{AS}} bug. Reliable assemblers never crash.
+@command{@value{AS}} bug. Reliable assemblers never crash.
@cindex error on valid input
@item
-If @code{@value{AS}} produces an error message for valid input, that is a bug.
+If @command{@value{AS}} produces an error message for valid input, that is a bug.
@cindex invalid input
@item
-If @code{@value{AS}} does not produce an error message for invalid input, that
+If @command{@value{AS}} does not produce an error message for invalid input, that
is a bug. However, you should note that your idea of ``invalid input'' might
be our idea of ``an extension'' or ``support for traditional practice''.
@item
If you are an experienced user of assemblers, your suggestions for improvement
-of @code{@value{AS}} are welcome in any case.
+of @command{@value{AS}} are welcome in any case.
@end itemize
@node Bug Reporting
@@ -5513,14 +5853,14 @@ of @code{@value{AS}} are welcome in any case.
@cindex assembler bugs, reporting
A number of companies and individuals offer support for @sc{gnu} products. If
-you obtained @code{@value{AS}} from a support organization, we recommend you
+you obtained @command{@value{AS}} from a support organization, we recommend you
contact that organization first.
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{@value{AS}}
+In any event, we also recommend that you send bug reports for @command{@value{AS}}
to @samp{bug-binutils@@gnu.org}.
The fundamental principle of reporting bugs usefully is this:
@@ -5550,21 +5890,21 @@ To enable us to fix the bug, you should include all these things:
@itemize @bullet
@item
-The version of @code{@value{AS}}. @code{@value{AS}} announces it if you start
+The version of @command{@value{AS}}. @command{@value{AS}} announces it if you start
it with the @samp{--version} argument.
Without this, we will not know whether there is any point in looking for
-the bug in the current version of @code{@value{AS}}.
+the bug in the current version of @command{@value{AS}}.
@item
-Any patches you may have applied to the @code{@value{AS}} source.
+Any patches you may have applied to the @command{@value{AS}} source.
@item
The type of machine you are using, and the operating system name and
version number.
@item
-What compiler (and its version) was used to compile @code{@value{AS}}---e.g.
+What compiler (and its version) was used to compile @command{@value{AS}}---e.g.
``@code{gcc-2.7}''.
@item
@@ -5582,20 +5922,20 @@ high level language source. Most compilers will produce the assembler source
when run with the @samp{-S} option. If you are using @code{@value{GCC}}, use
the options @samp{-v --save-temps}; this will save the assembler source in a
file with an extension of @file{.s}, and also show you exactly how
-@code{@value{AS}} is being run.
+@command{@value{AS}} is being run.
@item
A description of what behavior you observe that you believe is
incorrect. For example, ``It gets a fatal signal.''
-Of course, if the bug is that @code{@value{AS}} gets a fatal signal, then we
+Of course, if the bug is that @command{@value{AS}} gets a fatal signal, then we
will certainly notice it. But if the bug is incorrect output, we might 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 copy of
-@code{@value{AS}} is out of synch, or you have encountered a bug in the C
+@command{@value{AS}} 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 ours fails to crash, we
would know that the bug was not happening for us. If you had not told us to
@@ -5603,10 +5943,10 @@ expect a crash, then we would not be able to draw any conclusion from our
observations.
@item
-If you wish to suggest changes to the @code{@value{AS}} source, send us context
+If you wish to suggest changes to the @command{@value{AS}} 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{@value{AS}} source, refer to it by context, not
+discuss something in the @command{@value{AS}} source, refer to it by context, not
by line number.
The line numbers in our development sources will not match those in your
@@ -5644,7 +5984,7 @@ the necessary information, such as the test case, on the assumption that
a patch is all we need. We might see problems with your patch and decide
to fix the problem another way, or we might not understand it at all.
-Sometimes with a program as complicated as @code{@value{AS}} it is very hard to
+Sometimes with a program as complicated as @command{@value{AS}} it is very hard to
construct an example that will make the program follow a certain path through
the code. If you do not send us the example, we will not be able to construct
one, so we will not be able to verify that the bug is fixed.
@@ -5663,7 +6003,7 @@ things without first using the debugger to find the facts.
@node Acknowledgements
@chapter Acknowledgements
-If you have contributed to @code{@value{AS}} and your name isn't listed here,
+If you have contributed to @command{@value{AS}} and your name isn't listed here,
it is not meant as a slight. We just don't know about it. Send mail to the
maintainer, and we'll correct the situation. Currently
@c (January 1994),
@@ -5724,7 +6064,7 @@ Ian Lance Taylor of Cygnus Support merged the Motorola and MIT syntax for the
added support for MIPS ECOFF and ELF targets, wrote the initial RS/6000 and
PowerPC assembler, and made a few other minor patches.
-Steve Chamberlain made @code{@value{AS}} able to generate listings.
+Steve Chamberlain made @command{@value{AS}} able to generate listings.
Hewlett-Packard contributed support for the HP9000/300.
diff --git a/contrib/binutils/gas/doc/c-arm.texi b/contrib/binutils/gas/doc/c-arm.texi
index 2c67222..022faa0 100644
--- a/contrib/binutils/gas/doc/c-arm.texi
+++ b/contrib/binutils/gas/doc/c-arm.texi
@@ -31,41 +31,149 @@
@table @code
-@cindex @code{-marm} command line option, ARM
-@item -marm@code{[2|250|3|6|60|600|610|620|7|7m|7d|7dm|7di|7dmi|70|700|700i|710|710c|7100|7500|7500fe|7tdmi|8|810|9|9tdmi|920|strongarm|strongarm110|strongarm1100]}
-@itemx -mxscale
+@cindex @code{-mcpu=} command line option, ARM
+@item -mcpu=@var{processor}[+@var{extension}@dots{}]
This option specifies the target processor. The assembler will issue an
error message if an attempt is made to assemble an instruction which
-will not execute on the target processor.
-
-@cindex @code{-marmv} command line option, ARM
-@item -marmv@code{[2|2a|3|3m|4|4t|5|5t|5te]}
+will not execute on the target processor. The following processor names are
+recognized:
+@code{arm1},
+@code{arm2},
+@code{arm250},
+@code{arm3},
+@code{arm6},
+@code{arm60},
+@code{arm600},
+@code{arm610},
+@code{arm620},
+@code{arm7},
+@code{arm7m},
+@code{arm7d},
+@code{arm7dm},
+@code{arm7di},
+@code{arm7dmi},
+@code{arm70},
+@code{arm700},
+@code{arm700i},
+@code{arm710},
+@code{arm710t},
+@code{arm720},
+@code{arm720t},
+@code{arm740t},
+@code{arm710c},
+@code{arm7100},
+@code{arm7500},
+@code{arm7500fe},
+@code{arm7t},
+@code{arm7tdmi},
+@code{arm8},
+@code{arm810},
+@code{strongarm},
+@code{strongarm1},
+@code{strongarm110},
+@code{strongarm1100},
+@code{strongarm1110},
+@code{arm9},
+@code{arm920},
+@code{arm920t},
+@code{arm922t},
+@code{arm940t},
+@code{arm9tdmi},
+@code{arm9e},
+@code{arm946e-r0},
+@code{arm946e},
+@code{arm966e-r0},
+@code{arm966e},
+@code{arm10t},
+@code{arm10e},
+@code{arm1020},
+@code{arm1020t},
+@code{arm1020e},
+@code{ep9312} (ARM920 with Cirrus Maverick coprocessor),
+@code{i80200} (Intel XScale processor)
+and
+@code{xscale}.
+The special name @code{all} may be used to allow the
+assembler to accept instructions valid for any ARM processor.
+
+In addition to the basic instruction set, the assembler can be told to
+accept various extension mnemonics that extend the processor using the
+co-processor instruction space. For example, @code{-mcpu=arm920+maverick}
+is equivalent to specifying @code{-mcpu=ep9312}. The following extensions
+are currently supported:
+@code{+maverick}
+and
+@code{+xscale}.
+
+@cindex @code{-march=} command line option, ARM
+@item -march=@var{architecture}[+@var{extension}@dots{}]
This option specifies the target architecture. The assembler will issue
an error message if an attempt is made to assemble an instruction which
-will not execute on the target architecture.
-The option @code{-marmv5te} specifies that v5t architecture should be
-used with the El Segundo extensions enabled.
+will not execute on the target architecture. The following architecture
+names are recognized:
+@code{armv1},
+@code{armv2},
+@code{armv2a},
+@code{armv2s},
+@code{armv3},
+@code{armv3m},
+@code{armv4},
+@code{armv4xm},
+@code{armv4t},
+@code{armv4txm},
+@code{armv5},
+@code{armv5t},
+@code{armv5txm},
+@code{armv5te},
+@code{armv5texp}
+and
+@code{xscale}.
+If both @code{-mcpu} and
+@code{-march} are specified, the assembler will use
+the setting for @code{-mcpu}.
+
+The architecture option can be extended with the same instruction set
+extension options as the @code{-mcpu} option.
+
+@cindex @code{-mfpu=} command line option, ARM
+@item -mfpu=@var{floating-point-format}
+
+This option specifies the floating point format to assemble for. The
+assembler will issue an error message if an attempt is made to assemble
+an instruction which will not execute on the target floating point unit.
+The following format options are recognized:
+@code{softfpa},
+@code{fpe},
+@code{fpe2},
+@code{fpe3},
+@code{fpa},
+@code{fpa10},
+@code{fpa11},
+@code{arm7500fe},
+@code{softvfp},
+@code{softvfp+vfp},
+@code{vfp},
+@code{vfp10},
+@code{vfp10-r0},
+@code{vfp9},
+@code{vfpxd},
+@code{arm1020t}
+and
+@code{arm1020e}.
+
+In addition to determining which instructions are assembled, this option
+also affects the way in which the @code{.double} assembler directive behaves
+when assembling little-endian code.
+
+The default is dependent on the processor selected. For Architecture 5 or
+later, the default is to assembler for VFP instructions; for earlier
+architectures the default is to assemble for FPA instructions.
@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 @code{[10|11]}
-This option specifies the floating point architecture in use on the
-target processor.
-
-@cindex @code{-mfpe-old} command line option, ARM
-@item -mfpe-old
-Do not allow the assembly 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.
+This option specifies that the assembler should start assembling Thumb
+instructions; that is, it should behave as though the file starts with a
+@code{.code 16} directive.
@cindex @code{-mthumb-interwork} command line option, ARM
@item -mthumb-interwork
diff --git a/contrib/binutils/gas/doc/c-ppc.texi b/contrib/binutils/gas/doc/c-ppc.texi
new file mode 100644
index 0000000..cae9e23
--- /dev/null
+++ b/contrib/binutils/gas/doc/c-ppc.texi
@@ -0,0 +1,95 @@
+@c Copyright 2001
+@c Free Software Foundation, Inc.
+@c This is part of the GAS manual.
+@c For copying conditions, see the file as.texinfo.
+@ifset GENERIC
+@page
+@node PPC-Dependent
+@chapter PowerPC Dependent Features
+@end ifset
+@ifclear GENERIC
+@node Machine Dependencies
+@chapter PowerPC Dependent Features
+@end ifclear
+
+@cindex PowerPC support
+@menu
+* PowerPC-Opts:: Options
+@end menu
+
+@node PowerPC-Opts
+@section Options
+
+@cindex options for PowerPC
+@cindex PowerPC options
+@cindex architectures, PowerPC
+@cindex PowerPC architectures
+The PowerPC 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.
+
+The following table lists all available PowerPC options.
+
+@table @code
+@item -mpwrx | -mpwr2
+Generate code for IBM POWER/2 (RIOS2).
+
+@item -mpwr
+Generate code for IBM POWER (RIOS1)
+
+@item -m601
+Generate code for Motorola PowerPC 601.
+
+@item -mppc, -mppc32, -m603, -m604
+Generate code for Motorola PowerPC 603/604.
+
+@item -m403, -m405
+Generate code for Motorola PowerPC 403/405.
+
+@item -mppc64, -m620
+Generate code for Motorola PowerPC 620.
+
+@item -mppc64bridge
+Generate code for PowerPC 64, including bridge insns.
+
+@item -mbooke64
+Generate code for 64-bit Motorola BookE.
+
+@item -mbooke, mbooke32
+Generate code for 32-bit Motorola BookE.
+
+@item -mcom
+Generate code Power/PowerPC common instructions.
+
+@item -many
+Generate code for any architecture (PWR/PWRX/PPC).
+
+@item -mregnames
+Allow symbolic names for registers.
+
+@item -mno-regnames
+Do not allow symbolic names for registers.
+
+@item -mrelocatable
+Support for GCC's -mrelocatble option.
+
+@item -mrelocatable-lib
+Support for GCC's -mrelocatble-lib option.
+
+@item -memb
+Set PPC_EMB bit in ELF flags.
+
+@item -mlittle, -mlittle-endian
+Generate code for a little endian machine.
+
+@item -mbig, -mbig-endian
+Generate code for a big endian machine.
+
+@item -msolaris
+Generate code for Solaris.
+
+@item -mno-solaris
+Do not generate code for Solaris.
+@end table
diff --git a/contrib/binutils/gas/doc/internals.texi b/contrib/binutils/gas/doc/internals.texi
index eebb9bb..e7d3009 100644
--- a/contrib/binutils/gas/doc/internals.texi
+++ b/contrib/binutils/gas/doc/internals.texi
@@ -130,11 +130,12 @@ Symbol structures contain the following fields:
@item sy_value
This is an @code{expressionS} that describes the value of the symbol. It might
refer to one or more other symbols; if so, its true value may not be known
-until @code{resolve_symbol_value} is called in @code{write_object_file}.
+until @code{resolve_symbol_value} is called with @var{finalize_syms} non-zero
+in @code{write_object_file}.
The expression is often simply a constant. Before @code{resolve_symbol_value}
-is called, the value is the offset from the frag (@pxref{Frags}). Afterward,
-the frag address has been added in.
+is called with @var{finalize_syms} set, the value is the offset from the frag
+(@pxref{Frags}). Afterward, the frag address has been added in.
@item sy_resolved
This field is non-zero if the symbol's value has been completely resolved. It
@@ -208,9 +209,7 @@ Set the symbol's value.
@item S_GET_VALUE
@cindex S_GET_VALUE
Get the symbol's value. This will cause @code{resolve_symbol_value} to be
-called if necessary, so @code{S_GET_VALUE} should only be called when it is
-safe to resolve symbols (i.e., after the entire input file has been read and
-all symbols have been defined).
+called if necessary.
@item S_SET_SEGMENT
@cindex S_SET_SEGMENT
@@ -513,7 +512,7 @@ A number which is added into the fixup.
@item fx_addnumber
Some CPU backends use this field to convey information between
-@code{md_apply_fix} and @code{tc_gen_reloc}. The machine independent code does
+@code{md_apply_fix3} and @code{tc_gen_reloc}. The machine independent code does
not use it.
@item fx_next
@@ -844,11 +843,13 @@ zero if the target is little endian.
@itemx md_longopts_size
@itemx md_parse_option
@itemx md_show_usage
+@itemx md_after_parse_args
@cindex md_shortopts
@cindex md_longopts
@cindex md_longopts_size
@cindex md_parse_option
@cindex md_show_usage
+@cindex md_after_parse_args
GAS uses these variables and functions during option processing.
@code{md_shortopts} is a @code{const char *} which GAS adds to the machine
independent string passed to @code{getopt}. @code{md_longopts} is a
@@ -860,6 +861,9 @@ GAS will call @code{md_parse_option} whenever @code{getopt} returns an
unrecognized code, presumably indicating a special code value which appears in
@code{md_longopts}. GAS will call @code{md_show_usage} when a usage message is
printed; it should print a description of the machine specific options.
+@code{md_after_pase_args}, if defined, is called after all options are
+processed, to let the backend override settings done by the generic option
+parsing.
@item md_begin
@cindex md_begin
@@ -1131,6 +1135,22 @@ the MIPS which support options to change the endianness, which function to call
is a runtime decision. On other targets, @code{md_number_to_chars} can be a
simple macro.
+@item md_atof (@var{type},@var{litP},@var{sizeP})
+@cindex md_atof
+This function is called to convert an ASCII string into a floating point value
+in format used by the CPU. It takes three arguments. The first is @var{type}
+which is a byte describing the type of floating point number to be created.
+Possible values are @var{'f'} or @var{'s'} for single precision, @var{'d'} or
+@var{'r'} for double precision and @var{'x'} or @var{'p'} for extended
+precision. Either lower or upper case versions of these letters can be used.
+
+The second parameter is @var{litP} which is a pointer to a byte array where the
+converted value should be stored. The third argument is @var{sizeP}, which is
+a pointer to a integer that should be filled in with the number of
+@var{LITTLENUM}s emitted into the byte array. (@var{LITTLENUM} is defined in
+gas/bignum.h). The function should return NULL upon success or an error string
+upon failure.
+
@item md_reloc_size
@cindex md_reloc_size
This variable is only used in the original version of gas (not
@@ -1209,17 +1229,28 @@ The instruction is completed using the data from the relaxation pass.
It may also create any necessary relocations.
@xref{Relaxation}.
-@item md_apply_fix
-@cindex md_apply_fix
+@item TC_FINALIZE_SYMS_BEFORE_SIZE_SEG
+@cindex TC_FINALIZE_SYMS_BEFORE_SIZE_SEG
+Specifies the value to be assigned to @code{finalize_syms} before the function
+@code{size_segs} is called. Since @code{size_segs} calls @code{cvt_frag_to_fill}
+which can call @code{md_convert_frag}, this constant governs whether the symbols
+accessed in @code{md_convert_frag} will be fully resolved. In particular it
+governs whether local symbols will have been resolved, and had their frag
+information removed. Depending upon the processing performed by
+@code{md_convert_frag} the frag information may or may not be necessary, as may
+the resolved values of the symbols. The default value is 1.
+
+@item md_apply_fix3
+@cindex md_apply_fix3
GAS will call this for each fixup. It should store the correct value in the
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
+@code{valueT *val} argument after @code{md_apply_fix3} returns. If the overflow
+check is relevant for the target machine, then @code{md_apply_fix3} should
modify @code{valueT *val}, typically to the value stored in the object file.
@item TC_HANDLES_FX_DONE
@cindex TC_HANDLES_FX_DONE
-If this macro is defined, it means that @code{md_apply_fix} correctly sets the
+If this macro is defined, it means that @code{md_apply_fix3} correctly sets the
@code{fx_done} field in the fixup.
@item tc_gen_reloc
@@ -1248,12 +1279,14 @@ You may define this macro to indicate whether a fixup against a locally defined
symbol should be adjusted to be against the section symbol. It should return a
non-zero value if the adjustment is acceptable.
-@item MD_PCREL_FROM_SECTION
+@item MD_PCREL_FROM_SECTION (@var{fixp}, @var{section})
@cindex MD_PCREL_FROM_SECTION
-If you define this macro, it should return the offset between the address of a
-PC relative fixup and the position from which the PC relative adjustment should
-be made. On many processors, the base of a PC relative instruction is the next
-instruction, so this macro would return the length of an instruction.
+If you define this macro, it should return the position from which the PC
+relative adjustment for a PC relative fixup should be made. On many
+processors, the base of a PC relative instruction is the next instruction,
+so this macro would return the length of an instruction, plus the address of
+the PC relative fixup. The latter can be calculated as
+@var{fixp}->fx_where + @var{fixp}->fx_frag->fr_address .
@item md_pcrel_from
@cindex md_pcrel_from
diff --git a/contrib/binutils/gas/dwarf2dbg.c b/contrib/binutils/gas/dwarf2dbg.c
index ea76069..6e62206 100644
--- a/contrib/binutils/gas/dwarf2dbg.c
+++ b/contrib/binutils/gas/dwarf2dbg.c
@@ -230,11 +230,20 @@ dwarf2_gen_line_info (ofs, loc)
{
struct line_subseg *ss;
struct line_entry *e;
+ static unsigned int line = -1;
+ static unsigned int filenum = -1;
/* Early out for as-yet incomplete location information. */
if (loc->filenum == 0 || loc->line == 0)
return;
+ /* Don't emit sequences of line symbols for the same line. */
+ if (line == loc->line && filenum == loc->filenum)
+ return;
+
+ line = loc->line;
+ filenum = loc->filenum;
+
e = (struct line_entry *) xmalloc (sizeof (*e));
e->next = NULL;
e->frag = frag_now;
@@ -341,13 +350,13 @@ dwarf2_directive_file (dummy)
if (num < 1)
{
- as_bad (_("File number less than one"));
+ as_bad (_("file number less than one"));
return;
}
- if (num < files_in_use && files[num].filename != 0)
+ if (num < (int) files_in_use && files[num].filename != 0)
{
- as_bad (_("File number %ld already allocated"), (long) num);
+ as_bad (_("file number %ld already allocated"), (long) num);
return;
}
@@ -383,12 +392,12 @@ dwarf2_directive_loc (dummy)
if (filenum < 1)
{
- as_bad (_("File number less than one"));
+ as_bad (_("file number less than one"));
return;
}
if (filenum >= (int) files_in_use || files[filenum].filename == 0)
{
- as_bad (_("Unassigned file number %ld"), (long) filenum);
+ as_bad (_("unassigned file number %ld"), (long) filenum);
return;
}
@@ -524,8 +533,9 @@ get_frag_fix (frag)
for (fr = frchain_root; fr; fr = fr->frch_next)
if (fr->frch_last == frag)
{
- return ((char *) obstack_next_free (&fr->frch_obstack)
- - frag->fr_literal);
+ long align_mask = -1 << get_recorded_alignment (fr->frch_seg);
+ return (((char *) obstack_next_free (&fr->frch_obstack)
+ - frag->fr_literal) + ~align_mask) & align_mask;
}
abort ();
@@ -772,7 +782,7 @@ dwarf2dbg_estimate_size_before_relax (frag)
offsetT addr_delta;
int size;
- addr_delta = resolve_symbol_value (frag->fr_symbol, 0);
+ addr_delta = resolve_symbol_value (frag->fr_symbol);
size = size_inc_line_addr (frag->fr_offset, addr_delta);
frag->fr_subtype = size;
@@ -806,7 +816,7 @@ dwarf2dbg_convert_frag (frag)
{
offsetT addr_diff;
- addr_diff = resolve_symbol_value (frag->fr_symbol, 1);
+ addr_diff = resolve_symbol_value (frag->fr_symbol);
/* fr_var carries the max_chars that we created the fragment with.
fr_subtype carries the current expected length. We must, of
@@ -933,7 +943,7 @@ out_file_list ()
{
if (files[i].filename == NULL)
{
- as_bad (_("Unassigned file number %u"), i);
+ as_bad (_("unassigned file number %ld"), (long) i);
continue;
}
@@ -1212,7 +1222,7 @@ dwarf2_finish ()
struct line_seg *s;
/* If no debug information was recorded, nothing to do. */
- if (all_segs == NULL)
+ if (all_segs == NULL && files_in_use <= 1)
return;
/* Calculate the size of an address for the target machine. */
@@ -1239,7 +1249,7 @@ dwarf2_finish ()
/* If this is assembler generated line info, we need .debug_info
and .debug_abbrev sections as well. */
- if (debug_type == DEBUG_DWARF2)
+ if (all_segs != NULL && debug_type == DEBUG_DWARF2)
{
segT abbrev_seg;
segT info_seg;
diff --git a/contrib/binutils/gas/ecoff.c b/contrib/binutils/gas/ecoff.c
index cc94bf6..ed11921 100644
--- a/contrib/binutils/gas/ecoff.c
+++ b/contrib/binutils/gas/ecoff.c
@@ -37,7 +37,7 @@
#include "coff/symconst.h"
#include "aout/stab_gnu.h"
-#include <ctype.h>
+#include "safe-ctype.h"
/* Why isn't this in coff/sym.h? */
#define ST_RFDESCAPE 0xfff
@@ -1553,7 +1553,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)
@@ -1579,7 +1579,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);
}
@@ -2042,7 +2042,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;
}
@@ -2298,7 +2298,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. */
@@ -2538,7 +2538,7 @@ ecoff_directive_def (ignore)
if (coff_sym_name != (char *) NULL)
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)
@@ -2591,7 +2591,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;
}
}
@@ -2604,7 +2604,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];
@@ -2666,7 +2666,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;
}
}
@@ -2679,7 +2679,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];
@@ -2720,7 +2720,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;
}
@@ -2862,7 +2862,7 @@ ecoff_directive_endef (ignore)
if (coff_type.num_sizes != 1 || diff < 0)
{
- as_warn (_("Bad COFF debugging info"));
+ as_warn (_("bad COFF debugging information"));
return;
}
@@ -2911,7 +2911,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;
}
@@ -2943,7 +2943,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
@@ -3010,7 +3010,6 @@ ecoff_directive_end (ignore)
{
char *name;
char name_end;
- register int ch;
symbolS *ent;
if (cur_file_ptr == (efdr_t *) NULL)
@@ -3030,8 +3029,7 @@ ecoff_directive_end (ignore)
name = input_line_pointer;
name_end = get_symbol_end ();
- ch = *name;
- if (! is_name_beginner (ch))
+ if (name == input_line_pointer)
{
as_warn (_(".end directive has no name"));
*input_line_pointer = name_end;
@@ -3067,7 +3065,6 @@ ecoff_directive_ent (ignore)
{
char *name;
char name_end;
- register int ch;
if (cur_file_ptr == (efdr_t *) NULL)
add_file ((const char *) NULL, 0, 1);
@@ -3082,8 +3079,7 @@ ecoff_directive_ent (ignore)
name = input_line_pointer;
name_end = get_symbol_end ();
- ch = *name;
- if (! is_name_beginner (ch))
+ if (name == input_line_pointer)
{
as_warn (_(".ent directive has no name"));
*input_line_pointer = name_end;
@@ -3105,7 +3101,7 @@ ecoff_directive_ent (ignore)
++input_line_pointer;
SKIP_WHITESPACE ();
}
- if (isdigit ((unsigned char) *input_line_pointer)
+ if (ISDIGIT (*input_line_pointer)
|| *input_line_pointer == '-')
(void) get_absolute_expression ();
@@ -3149,7 +3145,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;
}
@@ -3181,7 +3177,7 @@ ecoff_directive_fmask (ignore)
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;
@@ -3214,7 +3210,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;
@@ -3251,7 +3247,7 @@ ecoff_directive_mask (ignore)
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;
@@ -3400,7 +3396,7 @@ ecoff_directive_weakext (ignore)
{
if (S_IS_DEFINED (symbolP))
{
- as_bad (_("Ignoring attempt to redefine symbol `%s'."),
+ as_bad (_("symbol `%s' is already defined"),
S_GET_NAME (symbolP));
ignore_rest_of_line ();
return;
@@ -3526,7 +3522,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;
}
@@ -3550,7 +3546,7 @@ ecoff_stab (sec, what, string, type, other, desc)
listing_source_file (string);
#endif
- if (isdigit ((unsigned char) *input_line_pointer)
+ if (ISDIGIT (*input_line_pointer)
|| *input_line_pointer == '-'
|| *input_line_pointer == '+')
{
@@ -3562,7 +3558,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
@@ -3620,7 +3616,7 @@ ecoff_frob_symbol (sym)
{
if (S_IS_COMMON (sym)
&& S_GET_VALUE (sym) > 0
- && S_GET_VALUE (sym) <= (unsigned) bfd_get_gp_size (stdoutput))
+ && S_GET_VALUE (sym) <= bfd_get_gp_size (stdoutput))
{
static asection scom_section;
static asymbol scom_symbol;
@@ -3645,7 +3641,7 @@ ecoff_frob_symbol (sym)
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));
}
}
@@ -4085,7 +4081,7 @@ ecoff_build_symbols (backend, buf, bufend, offset)
s = symbol_get_obj (as_sym)->ecoff_extern_size;
if (s == 0
- || s > (unsigned) bfd_get_gp_size (stdoutput))
+ || s > bfd_get_gp_size (stdoutput))
sc = sc_Undefined;
else
{
@@ -4100,7 +4096,7 @@ ecoff_build_symbols (backend, buf, bufend, offset)
{
if (S_GET_VALUE (as_sym) > 0
&& (S_GET_VALUE (as_sym)
- <= (unsigned) bfd_get_gp_size (stdoutput)))
+ <= bfd_get_gp_size (stdoutput)))
sc = sc_SCommon;
else
sc = sc_Common;
@@ -4740,7 +4736,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;
}
}
diff --git a/contrib/binutils/gas/ehopt.c b/contrib/binutils/gas/ehopt.c
index 64ea7e0..ad6e028 100644
--- a/contrib/binutils/gas/ehopt.c
+++ b/contrib/binutils/gas/ehopt.c
@@ -462,7 +462,7 @@ eh_frame_estimate_size_before_relax (frag)
int ca = frag->fr_subtype >> 3;
int ret;
- diff = resolve_symbol_value (frag->fr_symbol, 0);
+ diff = resolve_symbol_value (frag->fr_symbol);
if (ca > 0 && diff % ca == 0 && diff / ca < 0x40)
ret = 0;
@@ -508,7 +508,7 @@ eh_frame_convert_frag (frag)
loc4_frag = (fragS *) frag->fr_opcode;
loc4_fix = (int) frag->fr_offset;
- diff = resolve_symbol_value (frag->fr_symbol, 1);
+ diff = resolve_symbol_value (frag->fr_symbol);
switch (frag->fr_subtype & 7)
{
diff --git a/contrib/binutils/gas/emul-target.h b/contrib/binutils/gas/emul-target.h
index 8f18684..4c1a02a 100644
--- a/contrib/binutils/gas/emul-target.h
+++ b/contrib/binutils/gas/emul-target.h
@@ -50,14 +50,15 @@
#define emul_fake_label_name 0
#endif
-struct emulation emul_struct_name = {
- 0,
- emul_name,
- emul_init,
- emul_bfd_name,
- emul_local_labels_fb, emul_local_labels_dollar,
- emul_leading_underscore, emul_strip_underscore,
- emul_default_endian,
- emul_fake_label_name,
- emul_format,
-};
+struct emulation emul_struct_name =
+ {
+ 0,
+ emul_name,
+ emul_init,
+ emul_bfd_name,
+ emul_local_labels_fb, emul_local_labels_dollar,
+ emul_leading_underscore, emul_strip_underscore,
+ emul_default_endian,
+ emul_fake_label_name,
+ emul_format,
+ };
diff --git a/contrib/binutils/gas/emul.h b/contrib/binutils/gas/emul.h
index 465f844..b665260 100644
--- a/contrib/binutils/gas/emul.h
+++ b/contrib/binutils/gas/emul.h
@@ -21,23 +21,24 @@
#ifndef EMUL_DEFS
#define EMUL_DEFS
-struct emulation {
- void (*match) PARAMS ((const char *));
- const char *name;
- void (*init) PARAMS ((void));
- const char *(*bfd_name) PARAMS ((void));
- unsigned local_labels_fb : 1;
- unsigned local_labels_dollar : 1;
- unsigned leading_underscore : 2;
- unsigned strip_underscore : 1;
- unsigned default_endian : 2;
- const char *fake_label_name;
- const struct format_ops *format;
-};
-
-COMMON struct emulation *this_emulation;
-
-extern const char *default_emul_bfd_name PARAMS ((void));
+struct emulation
+ {
+ void (* match) PARAMS ((const char *));
+ const char * name;
+ void (* init) PARAMS ((void));
+ const char *(* bfd_name) PARAMS ((void));
+ unsigned local_labels_fb : 1;
+ unsigned local_labels_dollar : 1;
+ unsigned leading_underscore : 2;
+ unsigned strip_underscore : 1;
+ unsigned default_endian : 2;
+ const char * fake_label_name;
+ const struct format_ops * format;
+ };
+
+COMMON struct emulation * this_emulation;
+
+extern const char * default_emul_bfd_name PARAMS ((void));
extern void common_emul_init PARAMS ((void));
#endif
diff --git a/contrib/binutils/gas/expr.c b/contrib/binutils/gas/expr.c
index 3b49ac7..74c49d9 100644
--- a/contrib/binutils/gas/expr.c
+++ b/contrib/binutils/gas/expr.c
@@ -25,11 +25,11 @@
(It also gives smaller files to re-compile.)
Here, "operand"s are of expressions, not instructions. */
-#include <ctype.h>
#include <string.h>
#define min(a, b) ((a) < (b) ? (a) : (b))
#include "as.h"
+#include "safe-ctype.h"
#include "obstack.h"
static void floating_constant PARAMS ((expressionS * expressionP));
@@ -81,9 +81,9 @@ make_expr_symbol (expressionP)
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"));
+ as_bad (_("bignum invalid"));
else
- as_bad (_("floating point number invalid; zero assumed"));
+ as_bad (_("floating point number invalid"));
zero.X_op = O_constant;
zero.X_add_number = 0;
zero.X_unsigned = 0;
@@ -105,7 +105,7 @@ make_expr_symbol (expressionP)
symbol_set_value_expression (symbolP, expressionP);
if (expressionP->X_op == O_constant)
- resolve_symbol_value (symbolP, 1);
+ resolve_symbol_value (symbolP);
n = (struct expr_symbol_line *) xmalloc (sizeof *n);
n->sym = symbolP;
@@ -243,11 +243,12 @@ 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"));
}
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;
@@ -330,9 +331,7 @@ integer_constant (radix, expressionP)
/* In MRI mode, the number may have a suffix indicating the
radix. For that matter, it might actually be a floating
point constant. */
- for (suffix = input_line_pointer;
- isalnum ((unsigned char) *suffix);
- suffix++)
+ for (suffix = input_line_pointer; ISALNUM (*suffix); suffix++)
{
if (*suffix == 'e' || *suffix == 'E')
flt = 1;
@@ -346,8 +345,7 @@ integer_constant (radix, expressionP)
else
{
c = *--suffix;
- if (islower ((unsigned char) c))
- c = toupper (c);
+ c = TOUPPER (c);
if (c == 'B')
radix = 2;
else if (c == 'D')
@@ -427,7 +425,7 @@ integer_constant (radix, expressionP)
/* Check for 8 digit per word max. */
if (ndigit > 8)
- as_bad (_("A 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. */
@@ -450,7 +448,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. */
@@ -573,7 +571,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 (_("backward ref to unknown label \"%d:\""),
(int) number);
expressionP->X_op = O_constant;
}
@@ -696,7 +694,7 @@ mri_char_constant (expressionP)
if (i < 0)
{
- as_bad (_("Character constant too large"));
+ as_bad (_("character constant too large"));
i = 0;
}
@@ -761,7 +759,7 @@ current_location (expressionp)
/* In: Input_line_pointer points to 1st char of operand, which may
be a space.
- Out: A expressionS.
+ Out: An expressionS.
The operand may have been empty: in this case X_op == O_absent.
Input_line_pointer->(next non-blank) char after operand. */
@@ -810,6 +808,9 @@ operand (expressionP)
#ifdef LITERAL_PREFIXDOLLAR_HEX
case '$':
+ /* $L is the start of a local label, not a hex constant. */
+ if (* input_line_pointer == 'L')
+ goto isname;
integer_constant (16, expressionP);
break;
#endif
@@ -858,8 +859,7 @@ operand (expressionP)
{
input_line_pointer++;
floating_constant (expressionP);
- expressionP->X_add_number =
- - (isupper ((unsigned char) c) ? tolower (c) : c);
+ expressionP->X_add_number = - TOLOWER (c);
}
else
{
@@ -981,8 +981,7 @@ operand (expressionP)
case 'G':
input_line_pointer++;
floating_constant (expressionP);
- expressionP->X_add_number =
- - (isupper ((unsigned char) c) ? tolower (c) : c);
+ expressionP->X_add_number = - TOLOWER (c);
break;
case '$':
@@ -1010,7 +1009,7 @@ operand (expressionP)
#ifdef RELAX_PAREN_GROUPING
if (c != '(')
#endif
- as_bad (_("Missing '%c' assumed"), c == '(' ? ')' : ']');
+ as_bad (_("missing '%c'"), c == '(' ? ')' : ']');
}
else
input_line_pointer++;
@@ -1231,7 +1230,7 @@ operand (expressionP)
specially in certain contexts. If a name always has a
specific value, it can often be handled by simply
entering it in the symbol table. */
- if (md_parse_name (name, expressionP))
+ if (md_parse_name (name, expressionP, &c))
{
*input_line_pointer = c;
break;
@@ -1312,7 +1311,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;
}
@@ -1343,7 +1342,7 @@ operand (expressionP)
/* Internal. Simplify a struct expression for use by expr (). */
-/* In: address of a expressionS.
+/* In: address of an expressionS.
The X_op field of the expressionS may only take certain values.
Elsewise we waste time special-case testing. Sigh. Ditto SEG_ABSENT.
@@ -1400,7 +1399,7 @@ clean_up_expression (expressionP)
Unary operators and parenthetical expressions are treated as operands.
As usual, Q==quantity==operand, O==operator, X==expression mnemonics.
- We used to do a aho/ullman shift-reduce parser, but the logic got so
+ We used to do an aho/ullman shift-reduce parser, but the logic got so
warped that I flushed it and wrote a recursive-descent parser instead.
Now things are stable, would anybody like to write a fast parser?
Most expressions are either register (which does not even reach here)
@@ -1456,7 +1455,7 @@ static const operatorT op_encoding[256] = {
0 operand, (expression)
1 ||
2 &&
- 3 = <> < <= >= >
+ 3 == <> < <= >= >
4 + -
5 used for * / % in MRI mode
6 & ^ ! |
@@ -1695,21 +1694,6 @@ expr (rankarg, resultP)
}
}
- if (retval == undefined_section)
- {
- if (SEG_NORMAL (rightseg))
- retval = rightseg;
- }
- else if (! SEG_NORMAL (retval))
- retval = rightseg;
- else if (SEG_NORMAL (rightseg)
- && retval != rightseg
-#ifdef DIFF_EXPR_OK
- && op_left != O_subtract
-#endif
- )
- as_bad (_("operation combines symbols in different segments"));
-
op_right = operator (&op_chars);
know (op_right == O_illegal
@@ -1765,8 +1749,7 @@ expr (rankarg, resultP)
&& resultP->X_op == O_symbol
&& (symbol_get_frag (right.X_add_symbol)
== symbol_get_frag (resultP->X_add_symbol))
- && SEG_NORMAL (S_GET_SEGMENT (right.X_add_symbol)))
-
+ && SEG_NORMAL (rightseg))
{
resultP->X_add_number -= right.X_add_number;
resultP->X_add_number += (S_GET_VALUE (resultP->X_add_symbol)
@@ -1861,7 +1844,14 @@ expr (rankarg, resultP)
if (op_left == O_add)
resultP->X_add_number += right.X_add_number;
else if (op_left == O_subtract)
- resultP->X_add_number -= right.X_add_number;
+ {
+ resultP->X_add_number -= right.X_add_number;
+ if (retval == rightseg && SEG_NORMAL (retval))
+ {
+ retval = absolute_section;
+ rightseg = absolute_section;
+ }
+ }
}
else
{
@@ -1873,6 +1863,21 @@ expr (rankarg, resultP)
resultP->X_unsigned = 1;
}
+ if (retval != rightseg)
+ {
+ if (! SEG_NORMAL (retval))
+ {
+ if (retval != undefined_section || SEG_NORMAL (rightseg))
+ retval = rightseg;
+ }
+ else if (SEG_NORMAL (rightseg)
+#ifdef DIFF_EXPR_OK
+ && op_left != O_subtract
+#endif
+ )
+ as_bad (_("operation combines symbols in different segments"));
+ }
+
op_left = op_right;
} /* While next operator is >= this rank. */
diff --git a/contrib/binutils/gas/frags.c b/contrib/binutils/gas/frags.c
index 4dc2a7d..8d7ed2f 100644
--- a/contrib/binutils/gas/frags.c
+++ b/contrib/binutils/gas/frags.c
@@ -84,7 +84,7 @@ frag_grow (nchars)
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 %u chars"), nchars);
}
/* Call this to close off a completed frag, and start up a new (empty)
diff --git a/contrib/binutils/gas/frags.h b/contrib/binutils/gas/frags.h
index e4cb050..df259b8 100644
--- a/contrib/binutils/gas/frags.h
+++ b/contrib/binutils/gas/frags.h
@@ -43,8 +43,9 @@ struct obstack;
struct frag {
/* Object file address (as an octet offset). */
addressT fr_address;
- /* Chain forward; ascending address order. Rooted in frch_root. */
- struct frag *fr_next;
+ /* When relaxing multiple times, remember the address the frag had
+ in the last relax pass. */
+ addressT last_fr_address;
/* (Fixed) number of octets we know we have. May be 0. */
offsetT fr_fix;
@@ -52,12 +53,19 @@ struct frag {
The generic frag handling code no longer makes any use of fr_var. */
offsetT fr_var;
/* For variable-length tail. */
- symbolS *fr_symbol;
- /* For variable-length tail. */
offsetT fr_offset;
+ /* For variable-length tail. */
+ symbolS *fr_symbol;
/* Points to opcode low addr byte, for relaxation. */
char *fr_opcode;
+ /* Chain forward; ascending address order. Rooted in frch_root. */
+ struct frag *fr_next;
+
+ /* Where the frag was created, or where it became a variant frag. */
+ char *fr_file;
+ unsigned int fr_line;
+
#ifndef NO_LISTING
struct list_info_struct *line;
#endif
@@ -86,10 +94,6 @@ struct frag {
TC_FRAG_TYPE tc_frag_data;
#endif
- /* Where the frag was created, or where it became a variant frag. */
- char *fr_file;
- unsigned int fr_line;
-
/* Data begins here. */
char fr_literal[1];
};
diff --git a/contrib/binutils/gas/gasp.c b/contrib/binutils/gas/gasp.c
index ad33a46..73b4d88 100644
--- a/contrib/binutils/gas/gasp.c
+++ b/contrib/binutils/gas/gasp.c
@@ -1,5 +1,5 @@
/* gasp.c - Gnu assembler preprocessor main program.
- Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Written by Steve and Judy Chamberlain of Cygnus Support,
@@ -51,7 +51,6 @@ suitable for gas to consume.
#include <stdio.h>
#include <string.h>
#include <getopt.h>
-#include <ctype.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
@@ -63,6 +62,7 @@ extern char *malloc ();
#include "ansidecl.h"
#include "libiberty.h"
+#include "safe-ctype.h"
#include "sb.h"
#include "macro.h"
#include "asintl.h"
@@ -539,7 +539,7 @@ sb_strtol (idx, string, base, ptr)
{
int ch = string->ptr[idx];
int dig = 0;
- if (isdigit (ch))
+ if (ISDIGIT (ch))
dig = ch - '0';
else if (ch >= 'a' && ch <= 'f')
dig = ch - 'a' + 10;
@@ -574,7 +574,7 @@ level_0 (idx, string, lhs)
lhs->value = 0;
- if (isdigit ((unsigned char) string->ptr[idx]))
+ if (ISDIGIT (string->ptr[idx]))
{
idx = sb_strtol (idx, string, 10, &lhs->value);
}
@@ -1132,7 +1132,7 @@ change_base (idx, in, out)
idx++;
}
}
- else if (isdigit ((unsigned char) in->ptr[idx]))
+ else if (ISDIGIT (in->ptr[idx]))
{
int value;
/* All numbers must start with a digit, let's chew it and
@@ -1549,6 +1549,7 @@ get_any_string (idx, in, out, expand, pretend_quoted)
int val;
char buf[20];
/* Turns the next expression into a string. */
+ /* xgettext: no-c-format */
idx = exp_get_abs (_("% operator needs absolute expression"),
idx + 1,
in,
@@ -1676,7 +1677,7 @@ doinstr (idx, in, out)
idx = sb_skip_comma (idx, in);
idx = get_and_process (idx, in, &search);
idx = sb_skip_comma (idx, in);
- if (isdigit ((unsigned char) in->ptr[idx]))
+ if (ISDIGIT (in->ptr[idx]))
{
idx = exp_get_abs (_(".instr needs absolute expresson.\n"), idx, in, &start);
}
@@ -1776,26 +1777,26 @@ process_assigns (idx, in, buf)
}
else if (idx + 3 < in->len
&& in->ptr[idx] == '.'
- && toupper ((unsigned char) in->ptr[idx + 1]) == 'L'
- && toupper ((unsigned char) in->ptr[idx + 2]) == 'E'
- && toupper ((unsigned char) in->ptr[idx + 3]) == 'N')
+ && TOUPPER (in->ptr[idx + 1]) == 'L'
+ && TOUPPER (in->ptr[idx + 2]) == 'E'
+ && TOUPPER (in->ptr[idx + 3]) == 'N')
idx = dolen (idx + 4, in, buf);
else if (idx + 6 < in->len
&& in->ptr[idx] == '.'
- && toupper ((unsigned char) in->ptr[idx + 1]) == 'I'
- && toupper ((unsigned char) in->ptr[idx + 2]) == 'N'
- && toupper ((unsigned char) in->ptr[idx + 3]) == 'S'
- && toupper ((unsigned char) in->ptr[idx + 4]) == 'T'
- && toupper ((unsigned char) in->ptr[idx + 5]) == 'R')
+ && TOUPPER (in->ptr[idx + 1]) == 'I'
+ && TOUPPER (in->ptr[idx + 2]) == 'N'
+ && TOUPPER (in->ptr[idx + 3]) == 'S'
+ && TOUPPER (in->ptr[idx + 4]) == 'T'
+ && TOUPPER (in->ptr[idx + 5]) == 'R')
idx = doinstr (idx + 6, in, buf);
else if (idx + 7 < in->len
&& in->ptr[idx] == '.'
- && toupper ((unsigned char) in->ptr[idx + 1]) == 'S'
- && toupper ((unsigned char) in->ptr[idx + 2]) == 'U'
- && toupper ((unsigned char) in->ptr[idx + 3]) == 'B'
- && toupper ((unsigned char) in->ptr[idx + 4]) == 'S'
- && toupper ((unsigned char) in->ptr[idx + 5]) == 'T'
- && toupper ((unsigned char) in->ptr[idx + 6]) == 'R')
+ && TOUPPER (in->ptr[idx + 1]) == 'S'
+ && TOUPPER (in->ptr[idx + 2]) == 'U'
+ && TOUPPER (in->ptr[idx + 3]) == 'B'
+ && TOUPPER (in->ptr[idx + 4]) == 'S'
+ && TOUPPER (in->ptr[idx + 5]) == 'T'
+ && TOUPPER (in->ptr[idx + 6]) == 'R')
idx = dosubstr (idx + 7, in, buf);
else if (ISFIRSTCHAR (in->ptr[idx]))
{
@@ -2130,8 +2131,8 @@ whatcond (idx, in, val)
char a, b;
p = in->ptr + idx;
- a = toupper ((unsigned char) p[0]);
- b = toupper ((unsigned char) p[1]);
+ a = TOUPPER (p[0]);
+ b = TOUPPER (p[1]);
if (a == 'E' && b == 'Q')
cond = EQ;
else if (a == 'N' && b == 'E')
@@ -2980,13 +2981,13 @@ chartype_init ()
int x;
for (x = 0; x < 256; x++)
{
- if (isalpha (x) || x == '_' || x == '$')
+ if (ISALPHA (x) || x == '_' || x == '$')
chartype[x] |= FIRSTBIT;
if (mri && x == '.')
chartype[x] |= FIRSTBIT;
- if (isdigit (x) || isalpha (x) || x == '_' || x == '$')
+ if (ISDIGIT (x) || ISALPHA (x) || x == '_' || x == '$')
chartype[x] |= NEXTBIT;
if (x == ' ' || x == '\t' || x == ',' || x == '"' || x == ';'
@@ -3537,6 +3538,8 @@ show_help ()
show_usage (stdout, 0);
}
+int main PARAMS ((int, char **));
+
int
main (argc, argv)
int argc;
@@ -3552,6 +3555,9 @@ main (argc, argv)
#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
setlocale (LC_MESSAGES, "");
#endif
+#if defined (HAVE_SETLOCALE)
+ setlocale (LC_CTYPE, "");
+#endif
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
diff --git a/contrib/binutils/gas/hash.c b/contrib/binutils/gas/hash.c
index ab28396..e993136 100644
--- a/contrib/binutils/gas/hash.c
+++ b/contrib/binutils/gas/hash.c
@@ -1,6 +1,6 @@
/* hash.c -- gas hash table code
Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999,
- 2000
+ 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -30,6 +30,7 @@
structure. */
#include "as.h"
+#include "safe-ctype.h"
#include "obstack.h"
/* The default number of entries to use when creating a hash table. */
@@ -458,8 +459,7 @@ main ()
printf ("hash_test command: ");
gets (answer);
command = answer[0];
- if (isupper (command))
- command = tolower (command); /* Ecch! */
+ command = TOLOWER (command); /* Ecch! */
switch (command)
{
case '#':
diff --git a/contrib/binutils/gas/input-file.c b/contrib/binutils/gas/input-file.c
index f001e52..798f327 100644
--- a/contrib/binutils/gas/input-file.c
+++ b/contrib/binutils/gas/input-file.c
@@ -1,5 +1,5 @@
/* input_file.c - Deal with Input Files -
- Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1999, 2000
+ Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -19,50 +19,44 @@
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
-/*
- * Confines all details of reading source bytes to this module.
- * All O/S specific crocks should live here.
- * What we lose in "efficiency" we gain in modularity.
- * Note we don't need to #include the "as.h" file. No common coupling!
- */
+/* Confines all details of reading source bytes to this module.
+ All O/S specific crocks should live here.
+ What we lose in "efficiency" we gain in modularity.
+ Note we don't need to #include the "as.h" file. No common coupling! */
#include <stdio.h>
#include <string.h>
-
#include "as.h"
#include "input-file.h"
+#include "safe-ctype.h"
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.
- */
+ preprocessed by app. It is zero if the file can be read straight in. */
int preprocess = 0;
-/*
- * This code opens a file, then delivers BUFFER_SIZE character
- * chunks of the file on demand.
- * BUFFER_SIZE is supposed to be a number chosen for speed.
- * The caller only asks once what BUFFER_SIZE is, and asks before
- * the nature of the input files (if any) is known.
- */
+/* This code opens a file, then delivers BUFFER_SIZE character
+ chunks of the file on demand.
+ BUFFER_SIZE is supposed to be a number chosen for speed.
+ The caller only asks once what BUFFER_SIZE is, and asks before
+ the nature of the input files (if any) is known. */
#define BUFFER_SIZE (32 * 1024)
-/*
- * We use static data: the data area is not sharable.
- */
+/* We use static data: the data area is not sharable. */
static FILE *f_in;
static char *file_name;
/* Struct for saving the state of this module for file includes. */
-struct saved_file {
- FILE *f_in;
- char *file_name;
- int preprocess;
- char *app_save;
-};
+struct saved_file
+ {
+ FILE * f_in;
+ char * file_name;
+ int preprocess;
+ char * app_save;
+ };
/* These hooks accomodate most operating systems. */
@@ -92,6 +86,7 @@ input_file_is_open ()
/* Push the state of our input, returning a pointer to saved info that
can be restored with input_file_pop (). */
+
char *
input_file_push ()
{
@@ -105,7 +100,8 @@ input_file_push ()
if (preprocess)
saved->app_save = app_push ();
- input_file_begin (); /* Initialize for new file */
+ /* Initialize for new file. */
+ input_file_begin ();
return (char *) saved;
}
@@ -116,7 +112,7 @@ input_file_pop (arg)
{
register struct saved_file *saved = (struct saved_file *) arg;
- input_file_end (); /* Close out old file */
+ input_file_end (); /* Close out old file. */
f_in = saved->f_in;
file_name = saved->file_name;
@@ -140,7 +136,7 @@ input_file_open (filename, pre)
assert (filename != 0); /* Filename may not be NULL. */
if (filename[0])
{ /* We have a file name. Suck it and see. */
- f_in = fopen (filename, "r");
+ f_in = fopen (filename, FOPEN_RT);
file_name = filename;
}
else
@@ -150,42 +146,54 @@ input_file_open (filename, pre)
}
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;
}
c = getc (f_in);
if (c == '#')
- { /* Begins with comment, may not want to preprocess */
+ {
+ /* Begins with comment, may not want to preprocess. */
c = getc (f_in);
if (c == 'N')
- {
- fgets (buf, 80, f_in);
- if (!strcmp (buf, "O_APP\n"))
- preprocess = 0;
- if (!strchr (buf, '\n'))
- ungetc ('#', f_in); /* It was longer */
- else
- ungetc ('\n', f_in);
- }
+ {
+ fgets (buf, 80, f_in);
+ if (!strncmp (buf, "O_APP", 5) && ISSPACE (buf[5]))
+ preprocess = 0;
+ if (!strchr (buf, '\n'))
+ ungetc ('#', f_in); /* It was longer. */
+ else
+ ungetc ('\n', f_in);
+ }
+ else if (c == 'A')
+ {
+ fgets (buf, 80, f_in);
+ if (!strncmp (buf, "PP", 2) && ISSPACE (buf[2]))
+ preprocess = 1;
+ if (!strchr (buf, '\n'))
+ ungetc ('#', f_in);
+ else
+ ungetc ('\n', f_in);
+ }
else if (c == '\n')
- ungetc ('\n', f_in);
+ ungetc ('\n', f_in);
else
- ungetc ('#', f_in);
+ ungetc ('#', f_in);
}
else
ungetc (c, f_in);
}
/* Close input file. */
+
void
input_file_close ()
{
+ /* Don't close a null file pointer. */
if (f_in != NULL)
- {
- fclose (f_in);
- } /* don't close a null file pointer */
+ fclose (f_in);
+
f_in = 0;
}
@@ -218,12 +226,10 @@ input_file_give_next_buffer (where)
if (f_in == (FILE *) 0)
return 0;
- /*
- * fflush (stdin); could be done here if you want to synchronise
- * stdin and stdout, for the case where our input file is stdin.
- * Since the assembler shouldn't do any output to stdout, we
- * don't bother to synch output and input.
- */
+ /* fflush (stdin); could be done here if you want to synchronise
+ stdin and stdout, for the case where our input file is stdin.
+ Since the assembler shouldn't do any output to stdout, we
+ don't bother to synch output and input. */
if (preprocess)
size = do_scrub_chars (input_file_get, where, BUFFER_SIZE);
else
@@ -242,5 +248,6 @@ input_file_give_next_buffer (where)
f_in = (FILE *) 0;
return_value = 0;
}
- return (return_value);
+
+ return return_value;
}
diff --git a/contrib/binutils/gas/input-scrub.c b/contrib/binutils/gas/input-scrub.c
index e9c7240..d343711 100644
--- a/contrib/binutils/gas/input-scrub.c
+++ b/contrib/binutils/gas/input-scrub.c
@@ -394,7 +394,7 @@ 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. */
diff --git a/contrib/binutils/gas/itbl-lex.l b/contrib/binutils/gas/itbl-lex.l
index 4ac0946..ed0be64 100644
--- a/contrib/binutils/gas/itbl-lex.l
+++ b/contrib/binutils/gas/itbl-lex.l
@@ -1,5 +1,5 @@
/* itbl-lex.l
- Copyright 1997, 1998 Free Software Foundation, Inc.
+ Copyright 1997, 1998, 2001 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -22,7 +22,6 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-#include <ctype.h>
#include "itbl-parse.h"
#ifdef DEBUG
diff --git a/contrib/binutils/gas/itbl-ops.c b/contrib/binutils/gas/itbl-ops.c
index d3650cd..d67a986 100644
--- a/contrib/binutils/gas/itbl-ops.c
+++ b/contrib/binutils/gas/itbl-ops.c
@@ -183,17 +183,18 @@ itbl_parse (char *insntbl)
{
extern FILE *yyin;
extern int yyparse (void);
- yyin = fopen (insntbl, "r");
+
+ yyin = fopen (insntbl, FOPEN_RT);
if (yyin == 0)
{
printf ("Can't open processor instruction specification file \"%s\"\n",
insntbl);
return 1;
}
- else
- {
- while (yyparse ());
- }
+
+ while (yyparse ())
+ ;
+
fclose (yyin);
itbl_have_entries = 1;
return 0;
@@ -506,7 +507,7 @@ itbl_assemble (char *name, char *s)
int processor;
if (!name || !*name)
- return 0; /* error! must have a opcode name/expr */
+ return 0; /* error! must have an opcode name/expr */
/* find entry in list of instructions for all processors */
for (processor = 0; processor < e_nprocs; processor++)
diff --git a/contrib/binutils/gas/listing.c b/contrib/binutils/gas/listing.c
index 8168ebe..c92f2db 100644
--- a/contrib/binutils/gas/listing.c
+++ b/contrib/binutils/gas/listing.c
@@ -91,10 +91,9 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
on a line
*/
-#include <ctype.h>
-
#include "as.h"
#include <obstack.h>
+#include "safe-ctype.h"
#include "input-file.h"
#include "subsegs.h"
@@ -370,7 +369,7 @@ listing_newline (ps)
unsigned char c = *src++;
/* Omit control characters in the listing. */
- if (isascii (c) && ! iscntrl (c))
+ if (!ISCNTRL (c))
*dest++ = c;
}
@@ -485,7 +484,7 @@ buffer_line (file, line, size)
}
last_open_file_info = file;
- last_open_file = fopen (file->filename, "r");
+ last_open_file = fopen (file->filename, FOPEN_RT);
if (last_open_file == NULL)
{
file->at_end = 1;
@@ -514,9 +513,12 @@ buffer_line (file, line, size)
if (c == EOF)
{
file->at_end = 1;
- *p++ = '.';
- *p++ = '.';
- *p++ = '.';
+ if (count + 2 < size)
+ {
+ *p++ = '.';
+ *p++ = '.';
+ *p++ = '.';
+ }
}
file->linenum++;
*p++ = 0;
@@ -908,7 +910,7 @@ debugging_pseudo (list, line)
was_debug = in_debug;
in_debug = 0;
- while (isspace ((unsigned char) *line))
+ while (ISSPACE (*line))
line++;
if (*line != '.')
@@ -1121,7 +1123,7 @@ listing_print (name)
}
else
{
- list_file = fopen (name, "w");
+ list_file = fopen (name, FOPEN_WT);
if (list_file != NULL)
using_stdout = 0;
else
@@ -1295,7 +1297,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/macro.c b/contrib/binutils/gas/macro.c
index 8512208..11d6511 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 1994, 1995, 1996, 1997, 1998, 1999, 2000
+ Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
Free Software Foundation, Inc.
Written by Steve and Judy Chamberlain of Cygnus Support,
@@ -24,20 +24,14 @@
#include "config.h"
-/* AIX requires this to be the first thing in the file. */
-#ifdef __GNUC__
-# ifndef alloca
-# ifdef __STDC__
-extern void *alloca ();
-# else
-extern char *alloca ();
-# endif
-# endif
-#else
+#ifndef __GNUC__
# if HAVE_ALLOCA_H
# include <alloca.h>
# else
# ifdef _AIX
+/* Indented so that pre-ansi C compilers will ignore it, rather than
+ choke on it. Some versions of AIX require this to be the first
+ thing in the file. */
#pragma alloca
# else
# ifndef alloca /* predefined by HP cc +Olibcalls */
@@ -49,7 +43,7 @@ extern void *alloca ();
# endif /* alloca */
# endif /* _AIX */
# endif /* HAVE_ALLOCA_H */
-#endif
+#endif /* __GNUC__ */
#include <stdio.h>
#ifdef HAVE_STRING_H
@@ -57,11 +51,11 @@ extern void *alloca ();
#else
#include <strings.h>
#endif
-#include <ctype.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
#include "libiberty.h"
+#include "safe-ctype.h"
#include "sb.h"
#include "hash.h"
#include "macro.h"
@@ -189,7 +183,7 @@ buffer_and_nest (from, to, ptr, get_line)
/* Skip over a label. */
while (i < ptr->len
- && (isalnum ((unsigned char) ptr->ptr[i])
+ && (ISALNUM (ptr->ptr[i])
|| ptr->ptr[i] == '_'
|| ptr->ptr[i] == '$'))
i++;
@@ -212,11 +206,11 @@ buffer_and_nest (from, to, ptr, get_line)
i++;
if (strncasecmp (ptr->ptr + i, from, from_len) == 0
&& (ptr->len == (i + from_len)
- || ! isalnum (ptr->ptr[i + from_len])))
+ || ! ISALNUM (ptr->ptr[i + from_len])))
depth++;
if (strncasecmp (ptr->ptr + i, to, to_len) == 0
&& (ptr->len == (i + to_len)
- || ! isalnum (ptr->ptr[i + to_len])))
+ || ! ISALNUM (ptr->ptr[i + to_len])))
{
depth--;
if (depth == 0)
@@ -247,13 +241,13 @@ get_token (idx, in, name)
sb *name;
{
if (idx < in->len
- && (isalpha ((unsigned char) in->ptr[idx])
+ && (ISALPHA (in->ptr[idx])
|| in->ptr[idx] == '_'
|| in->ptr[idx] == '$'))
{
sb_add_char (name, in->ptr[idx++]);
while (idx < in->len
- && (isalnum ((unsigned char) in->ptr[idx])
+ && (ISALNUM (in->ptr[idx])
|| in->ptr[idx] == '_'
|| in->ptr[idx] == '$'))
{
@@ -384,6 +378,7 @@ get_any_string (idx, in, out, expand, pretend_quoted)
int val;
char buf[20];
/* Turns the next expression into a string. */
+ /* xgettext: no-c-format */
idx = (*macro_expr) (_("% operator needs absolute expression"),
idx + 1,
in,
@@ -573,8 +568,7 @@ define_macro (idx, in, label, get_line, namep)
/* And stick it in the macro hash table. */
for (idx = 0; idx < name.len; idx++)
- if (isupper ((unsigned char) name.ptr[idx]))
- name.ptr[idx] = tolower (name.ptr[idx]);
+ name.ptr[idx] = TOLOWER (name.ptr[idx]);
namestr = sb_terminate (&name);
hash_jam (macro_hash, namestr, (PTR) macro);
@@ -732,15 +726,14 @@ macro_expand_body (in, out, formals, formal_hash, comment_char, locals)
sb_add_char (out, '&');
src++;
}
- else if (macro_mri
- && isalnum ((unsigned char) in->ptr[src]))
+ else if (macro_mri && ISALNUM (in->ptr[src]))
{
int ind;
formal_entry *f;
- if (isdigit ((unsigned char) in->ptr[src]))
+ if (ISDIGIT (in->ptr[src]))
ind = in->ptr[src] - '0';
- else if (isupper ((unsigned char) in->ptr[src]))
+ else if (ISUPPER (in->ptr[src]))
ind = in->ptr[src] - 'A' + 10;
else
ind = in->ptr[src] - 'a' + 10;
@@ -764,7 +757,7 @@ macro_expand_body (in, out, formals, formal_hash, comment_char, locals)
}
}
else if ((macro_alternate || macro_mri)
- && (isalpha ((unsigned char) in->ptr[src])
+ && (ISALPHA (in->ptr[src])
|| in->ptr[src] == '_'
|| in->ptr[src] == '$')
&& (! inquote
@@ -935,21 +928,29 @@ macro_expand (idx, in, m, out, comment_char)
/* The macro may be called with an optional qualifier, which may
be referred to in the macro body as \0. */
if (idx < in->len && in->ptr[idx] == '.')
- {
- formal_entry *n;
-
- n = (formal_entry *) xmalloc (sizeof (formal_entry));
- sb_new (&n->name);
- sb_new (&n->def);
- sb_new (&n->actual);
- n->index = QUAL_INDEX;
-
- n->next = m->formals;
- m->formals = n;
-
- idx = get_any_string (idx + 1, in, &n->actual, 1, 0);
- }
- }
+ {
+ /* The Microtec assembler ignores this if followed by a white space.
+ (Macro invocation with empty extension) */
+ idx++;
+ if ( idx < in->len
+ && in->ptr[idx] != ' '
+ && in->ptr[idx] != '\t')
+ {
+ formal_entry *n;
+
+ n = (formal_entry *) xmalloc (sizeof (formal_entry));
+ sb_new (&n->name);
+ sb_new (&n->def);
+ sb_new (&n->actual);
+ n->index = QUAL_INDEX;
+
+ n->next = m->formals;
+ m->formals = n;
+
+ idx = get_any_string (idx, in, &n->actual, 1, 0);
+ }
+ }
+ }
/* Peel off the actuals and store them away in the hash tables' actuals. */
idx = sb_skip_white (idx, in);
@@ -1105,14 +1106,14 @@ check_macro (line, expand, comment_char, error, info)
macro_entry *macro;
sb line_sb;
- if (! isalpha ((unsigned char) *line)
+ if (! ISALPHA (*line)
&& *line != '_'
&& *line != '$'
&& (! macro_mri || *line != '.'))
return 0;
s = line + 1;
- while (isalnum ((unsigned char) *s)
+ while (ISALNUM (*s)
|| *s == '_'
|| *s == '$')
++s;
@@ -1121,8 +1122,7 @@ check_macro (line, expand, comment_char, error, info)
memcpy (copy, line, s - line);
copy[s - line] = '\0';
for (cs = copy; *cs != '\0'; cs++)
- if (isupper ((unsigned char) *cs))
- *cs = tolower (*cs);
+ *cs = TOLOWER (*cs);
macro = (macro_entry *) hash_find (macro_hash, copy);
diff --git a/contrib/binutils/gas/output-file.c b/contrib/binutils/gas/output-file.c
index bcd49b5..531e35f 100644
--- a/contrib/binutils/gas/output-file.c
+++ b/contrib/binutils/gas/output-file.c
@@ -1,5 +1,5 @@
/* output-file.c - Deal with the output file
- Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1996, 1998, 1999
+ Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1996, 1998, 1999, 2001
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -16,7 +16,8 @@
You should have received a copy of the GNU General Public License
along with GAS; see the file COPYING. If not, write to
- the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+ 02111-1307, USA. */
#include <stdio.h>
@@ -44,14 +45,14 @@ output_file_create (name)
char *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);
#ifdef BFD_ASSEMBLER
bfd_set_arch_mach (stdoutput, TARGET_ARCH, TARGET_MACH);
@@ -69,18 +70,18 @@ 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 */
+ /* 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
- stdoutput = NULL; /* Trust nobody! */
+ stdoutput = NULL; /* Trust nobody! */
}
#ifndef BFD_ASSEMBLER
@@ -108,15 +109,10 @@ output_file_create (name)
return;
}
- stdoutput = fopen (name, "wb");
-
- /* Some systems don't grok "b" in fopen modes. */
- if (stdoutput == NULL)
- stdoutput = fopen (name, "w");
-
+ stdoutput = fopen (name, FOPEN_WB);
if (stdoutput == NULL)
{
- as_perror (_("FATAL: Can't create %s"), name);
+ as_perror (_("FATAL: can't create %s"), name);
exit (EXIT_FAILURE);
}
}
@@ -127,30 +123,32 @@ 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! */
+
+ /* Trust nobody! */
+ stdoutput = NULL;
}
void
output_file_append (where, length, filename)
- char *where;
- long length;
- char *filename;
+ char * where;
+ long length;
+ char * filename;
{
for (; length; length--, where++)
{
(void) putc (*where, stdoutput);
+
if (ferror (stdoutput))
/* if ( EOF == (putc( *where, stdoutput )) ) */
{
as_perror (_("Failed to emit an object byte"), filename);
- as_fatal (_("Can't continue"));
+ as_fatal (_("can't continue"));
}
}
}
#endif
-/* end of output-file.c */
diff --git a/contrib/binutils/gas/po/POTFILES.in b/contrib/binutils/gas/po/POTFILES.in
index f0a7cd6..d1d5c97 100644
--- a/contrib/binutils/gas/po/POTFILES.in
+++ b/contrib/binutils/gas/po/POTFILES.in
@@ -86,16 +86,24 @@ config/tc-mcore.c
config/tc-mcore.h
config/tc-mips.c
config/tc-mips.h
+config/tc-mmix.c
+config/tc-mmix.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-openrisc.c
+config/tc-openrisc.h
+config/tc-pdp11.c
+config/tc-pdp11.h
config/tc-pj.c
config/tc-pj.h
config/tc-ppc.c
config/tc-ppc.h
+config/tc-s390.c
+config/tc-s390.h
config/tc-sh.c
config/tc-sh.h
config/tc-sparc.c
@@ -114,6 +122,8 @@ config/tc-vax.c
config/tc-vax.h
config/tc-w65.c
config/tc-w65.h
+config/tc-xstormy16.c
+config/tc-xstormy16.h
config/tc-z8k.c
config/tc-z8k.h
depend.c
diff --git a/contrib/binutils/gas/po/gas.pot b/contrib/binutils/gas/po/gas.pot
index 4428b64..f477568 100644
--- a/contrib/binutils/gas/po/gas.pot
+++ b/contrib/binutils/gas/po/gas.pot
@@ -6,84 +6,80 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2001-01-11 12:04-0800\n"
+"POT-Creation-Date: 2002-01-17 12:56+0000\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"
+"Content-Transfer-Encoding: 8bit\n"
-#: app.c:464 app.c:478
+#: app.c:476 app.c:490
msgid "end of file in comment"
msgstr ""
-#: app.c:557
-msgid "end of file in string: inserted '\"'"
+#: app.c:569
+msgid "end of file in string; inserted '\"'"
msgstr ""
-#: app.c:623
+#: app.c:635
#, c-format
-msgid "Unknown escape '\\%c' in string: Ignored"
+msgid "unknown escape '\\%c' in string; ignored"
msgstr ""
-#: app.c:632
-msgid "End of file in string: '\"' inserted"
+#: app.c:644
+msgid "end of file in string; '\"' inserted"
msgstr ""
-#: app.c:752
+#: app.c:764
msgid "end of file not at end of a line; newline inserted"
msgstr ""
-#: app.c:910
+#: app.c:923
msgid "end of file in multiline comment"
msgstr ""
-#: app.c:974
+#: app.c:987
msgid "end of file after a one-character quote; \\0 inserted"
msgstr ""
-#: app.c:982
+#: app.c:995
msgid "end of file in escape character"
msgstr ""
-#: app.c:994
-msgid "Missing close quote: (assumed)"
+#: app.c:1007
+msgid "missing close quote; (assumed)"
msgstr ""
-#: app.c:1057 app.c:1111 app.c:1186
+#: app.c:1075 app.c:1129 app.c:1139 app.c:1204
msgid "end of file in comment; newline inserted"
msgstr ""
-#: app.c:1121
-msgid "EOF in Comment: Newline inserted"
-msgstr ""
-
-#: as.c:147
+#: as.c:148
msgid "missing emulation mode name"
msgstr ""
-#: as.c:162
+#: as.c:163
#, c-format
msgid "unrecognized emulation name `%s'"
msgstr ""
-#: as.c:209
+#: as.c:210
#, c-format
msgid "GNU assembler version %s (%s) using BFD version %s"
msgstr ""
-#: as.c:212
+#: as.c:213
#, c-format
msgid "GNU assembler version %s (%s)"
msgstr ""
-#: as.c:221
+#: as.c:222
#, c-format
msgid "Usage: %s [option...] [asmfile...]\n"
msgstr ""
-#: as.c:223
+#: as.c:224
msgid ""
"Options:\n"
" -a[sub-option...]\t turn on listings\n"
@@ -95,8 +91,6 @@ msgid ""
" \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 ""
@@ -168,8 +162,8 @@ msgstr ""
#: as.c:283
msgid ""
-" -o OBJFILE name the object-file output OBJFILE (default "
-"a.out)\n"
+" -o OBJFILE name the object-file output OBJFILE (default a."
+"out)\n"
msgstr ""
#: as.c:285
@@ -252,7 +246,7 @@ msgid ""
" for the output data column of the listing\n"
msgstr ""
-#: as.c:327 gasp.c:3527
+#: as.c:327 gasp.c:3528
#, c-format
msgid "Report bugs to %s\n"
msgstr ""
@@ -264,10 +258,10 @@ msgid "GNU assembler %s\n"
msgstr ""
#: as.c:528
-msgid "Copyright 2000 Free Software Foundation, Inc.\n"
+msgid "Copyright 2001 Free Software Foundation, Inc.\n"
msgstr ""
-#: as.c:529 gasp.c:3621
+#: as.c:529 gasp.c:3627
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"
@@ -316,35 +310,35 @@ msgid "bad defsym; format is --defsym name=value"
msgstr ""
#: as.c:590
-msgid "No file name following -t option\n"
+msgid "no file name following -t option"
msgstr ""
-#: as.c:606
+#: as.c:605
#, c-format
-msgid "Failed to read instruction table %s\n"
+msgid "failed to read instruction table %s\n"
msgstr ""
-#: as.c:723
+#: as.c:720
#, c-format
msgid "invalid listing option `%c'"
msgstr ""
-#: as.c:922
+#: as.c:928
#, c-format
msgid "%d warnings, treating warnings as errors"
msgstr ""
-#: as.c:953
+#: as.c:959
#, c-format
msgid "%s: total time in assembly: %ld.%06ld\n"
msgstr ""
-#: as.c:956
+#: as.c:962
#, c-format
msgid "%s: data size %ld\n"
msgstr ""
-#: as.h:225
+#: as.h:216
#, c-format
msgid "Case value %ld unexpected at line %d of file \"%s\"\n"
msgstr ""
@@ -353,73 +347,71 @@ msgstr ""
#. * We have a GROSS internal error.
#. * This should never happen.
#.
-#: atof-generic.c:437 config/tc-a29k.c:544 config/tc-i860.c:340
-#: config/tc-i860.c:832 config/tc-m68k.c:3176 config/tc-m68k.c:3205
-#: config/tc-sparc.c:2543
-msgid "failed sanity check."
+#: atof-generic.c:437 config/tc-m68k.c:2879
+msgid "failed sanity check"
msgstr ""
-#: cond.c:77
+#: cond.c:79
msgid "invalid identifier for \".ifdef\""
msgstr ""
-#: cond.c:131
+#: cond.c:133
msgid "non-constant expression in \".if\" statement"
msgstr ""
-#: cond.c:227
+#: cond.c:229
msgid "bad format for ifc or ifnc"
msgstr ""
-#: cond.c:261
-msgid "\".elseif\" without matching \".if\" - ignored"
+#: cond.c:260
+msgid "\".elseif\" without matching \".if\""
msgstr ""
-#: cond.c:266
-msgid "\".elseif\" after \".else\" - ignored"
+#: cond.c:264
+msgid "\".elseif\" after \".else\""
msgstr ""
-#: cond.c:269 cond.c:378
+#: cond.c:267 cond.c:375
msgid "here is the previous \"else\""
msgstr ""
-#: cond.c:272 cond.c:381
+#: cond.c:270 cond.c:378
msgid "here is the previous \"if\""
msgstr ""
-#: cond.c:305
+#: cond.c:299
msgid "non-constant expression in \".elseif\" statement"
msgstr ""
-#: cond.c:340
+#: cond.c:338
msgid "\".endif\" without \".if\""
msgstr ""
-#: cond.c:370
-msgid ".else without matching .if - ignored"
+#: cond.c:368
+msgid "\".else\" without matching \".if\""
msgstr ""
-#: cond.c:375
-msgid "duplicate \"else\" - ignored"
+#: cond.c:372
+msgid "duplicate \"else\""
msgstr ""
-#: cond.c:426
+#: cond.c:424
msgid ".ifeqs syntax error"
msgstr ""
-#: cond.c:509
+#: cond.c:507
msgid "end of macro inside conditional"
msgstr ""
-#: cond.c:511
+#: cond.c:509
msgid "end of file inside conditional"
msgstr ""
-#: cond.c:514
+#: cond.c:512
msgid "here is the start of the unterminated conditional"
msgstr ""
-#: cond.c:518
+#: cond.c:516
msgid "here is the \"else\" of the unterminated conditional"
msgstr ""
@@ -433,17 +425,16 @@ msgstr ""
msgid "Attempt to put an undefined symbol into set %s"
msgstr ""
-#: config/obj-aout.c:197 config/obj-coff.c:1246 config/obj-elf.c:1739
-#: ecoff.c:3647
+#: config/obj-aout.c:197 config/obj-coff.c:1274
#, c-format
msgid "Symbol `%s' can not be both weak and common"
msgstr ""
-#: config/obj-aout.c:255 config/obj-coff.c:1982
+#: config/obj-aout.c:255 config/obj-coff.c:2010
msgid "unresolved relocation"
msgstr ""
-#: config/obj-aout.c:257 config/obj-coff.c:1984
+#: config/obj-aout.c:257 config/obj-coff.c:2012
#, c-format
msgid "bad relocation: symbol `%s' not in symbol table"
msgstr ""
@@ -453,7 +444,7 @@ msgstr ""
msgid "%s: bad type for weak symbol"
msgstr ""
-#: config/obj-aout.c:458 config/obj-coff.c:2913 write.c:1868
+#: config/obj-aout.c:458 config/obj-coff.c:2940 write.c:1933
#, c-format
msgid "%s: global symbols not supported in common sections"
msgstr ""
@@ -467,181 +458,181 @@ msgstr ""
msgid "subsegment index too high"
msgstr ""
-#: config/obj-bout.c:319 config/obj-vms.c:561
+#: config/obj-bout.c:319 config/obj-vms.c:562
#, c-format
msgid "Local symbol %s never defined"
msgstr ""
-#: config/obj-coff.c:156
+#: config/obj-coff.c:166
#, 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:451
+#: config/obj-coff.c:469
msgid "Line numbers must be positive integers\n"
msgstr ""
-#: config/obj-coff.c:484 config/obj-coff.c:2328
+#: config/obj-coff.c:503 config/obj-coff.c:2355
msgid ".ln pseudo-op inside .def/.endef: ignored."
msgstr ""
-#: config/obj-coff.c:527 ecoff.c:3283
+#: config/obj-coff.c:546 ecoff.c:3280
msgid ".loc outside of .text"
msgstr ""
-#: config/obj-coff.c:534
+#: config/obj-coff.c:553
msgid ".loc pseudo-op inside .def/.endef: ignored."
msgstr ""
-#: config/obj-coff.c:622 config/obj-coff.c:2385
+#: config/obj-coff.c:641 config/obj-coff.c:2412
msgid ".def pseudo-op used inside of .def/.endef: ignored."
msgstr ""
-#: config/obj-coff.c:668 config/obj-coff.c:2437
+#: config/obj-coff.c:687 config/obj-coff.c:2464
msgid ".endef pseudo-op used outside of .def/.endef: ignored."
msgstr ""
-#: config/obj-coff.c:706
+#: config/obj-coff.c:725
#, c-format
msgid "`%s' symbol without preceding function"
msgstr ""
-#: config/obj-coff.c:793 config/obj-coff.c:2512
+#: config/obj-coff.c:812 config/obj-coff.c:2539
#, c-format
msgid "unexpected storage class %d"
msgstr ""
-#: config/obj-coff.c:906 config/obj-coff.c:2619
+#: config/obj-coff.c:925 config/obj-coff.c:2646
msgid ".dim pseudo-op used outside of .def/.endef: ignored."
msgstr ""
-#: config/obj-coff.c:926 config/obj-coff.c:2639
+#: config/obj-coff.c:945 config/obj-coff.c:2666
msgid "badly formed .dim directive ignored"
msgstr ""
-#: config/obj-coff.c:977 config/obj-coff.c:2702
+#: config/obj-coff.c:996 config/obj-coff.c:2729
msgid ".size pseudo-op used outside of .def/.endef ignored."
msgstr ""
-#: config/obj-coff.c:993 config/obj-coff.c:2718
+#: config/obj-coff.c:1012 config/obj-coff.c:2745
msgid ".scl pseudo-op used outside of .def/.endef ignored."
msgstr ""
-#: config/obj-coff.c:1011 config/obj-coff.c:2736
+#: config/obj-coff.c:1030 config/obj-coff.c:2763
msgid ".tag pseudo-op used outside of .def/.endef ignored."
msgstr ""
-#: config/obj-coff.c:1030 config/obj-coff.c:2754
+#: config/obj-coff.c:1049 config/obj-coff.c:2781
#, c-format
msgid "tag not found for .tag %s"
msgstr ""
-#: config/obj-coff.c:1045 config/obj-coff.c:2769
+#: config/obj-coff.c:1064 config/obj-coff.c:2796
msgid ".type pseudo-op used outside of .def/.endef ignored."
msgstr ""
-#: config/obj-coff.c:1067 config/obj-coff.c:2791
+#: config/obj-coff.c:1086 config/obj-coff.c:2818
msgid ".val pseudo-op used outside of .def/.endef ignored."
msgstr ""
-#: config/obj-coff.c:1207 config/obj-coff.c:2986
+#: config/obj-coff.c:1231 config/obj-coff.c:3013
msgid "mismatched .eb"
msgstr ""
-#: config/obj-coff.c:1225 config/obj-coff.c:3026
+#: config/obj-coff.c:1252 config/obj-coff.c:3053
msgid "C_EFCN symbol out of scope"
msgstr ""
#. STYP_INFO
#. STYP_LIB
#. STYP_OVER
-#: config/obj-coff.c:1447
+#: config/obj-coff.c:1476
#, c-format
msgid "unsupported section attribute '%c'"
msgstr ""
-#: config/obj-coff.c:1452 config/obj-coff.c:3726 config/tc-ppc.c:3925
+#: config/obj-coff.c:1481 config/obj-coff.c:3758 config/tc-ppc.c:4211
#, c-format
msgid "unknown section attribute '%c'"
msgstr ""
-#: config/obj-coff.c:1482 config/tc-ppc.c:3943 read.c:2512
+#: config/obj-coff.c:1511 config/tc-ppc.c:4229 config/tc-tic54x.c:4130
+#: read.c:2555
#, c-format
msgid "error setting flags for \"%s\": %s"
msgstr ""
-#: config/obj-coff.c:1493 config/obj-elf.c:723
+#: config/obj-coff.c:1522
#, c-format
msgid "Ignoring changed section attributes for %s"
msgstr ""
-#: config/obj-coff.c:1629
+#: config/obj-coff.c:1658
#, c-format
msgid "0x%lx: \"%s\" type = %ld, class = %d, segment = %d\n"
msgstr ""
-#: config/obj-coff.c:1809 config/obj-ieee.c:69
+#: config/obj-coff.c:1838 config/obj-ieee.c:69
msgid "Out of step\n"
msgstr ""
-#: config/obj-coff.c:2244
+#: config/obj-coff.c:2271
msgid "bfd_coff_swap_scnhdr_out failed"
msgstr ""
-#: config/obj-coff.c:2469
+#: config/obj-coff.c:2496
msgid "`.bf' symbol without preceding function\n"
msgstr ""
-#: config/obj-coff.c:3422 config/obj-ieee.c:507 output-file.c:52
-#: output-file.c:119
+#: config/obj-coff.c:3450 config/obj-ieee.c:507
#, c-format
msgid "FATAL: Can't create %s"
msgstr ""
-#: config/obj-coff.c:3600
+#: config/obj-coff.c:3632
#, c-format
msgid "Can't close %s: %s"
msgstr ""
-#: config/obj-coff.c:3634
+#: config/obj-coff.c:3666
#, c-format
msgid "Too many new sections; can't add \"%s\""
msgstr ""
-#: config/obj-coff.c:4041 config/tc-m88k.c:1257 config/tc-sparc.c:3531
+#: config/obj-coff.c:4073 config/tc-sparc.c:3537
msgid "Expected comma after name"
msgstr ""
-#: config/obj-coff.c:4047 read.c:1956
+#: config/obj-coff.c:4079
msgid "Missing size expression"
msgstr ""
-#: config/obj-coff.c:4053
+#: config/obj-coff.c:4085
#, c-format
msgid "lcomm length (%d.) <0! Ignored."
msgstr ""
-#: config/obj-coff.c:4081 read.c:2190
+#: config/obj-coff.c:4113
#, c-format
msgid "Symbol %s already defined"
msgstr ""
-#: config/obj-coff.c:4176 config/tc-i960.c:3215
+#: config/obj-coff.c:4208 config/tc-i960.c:3206
#, c-format
msgid "No 'bal' entry point for leafproc %s"
msgstr ""
-#: config/obj-coff.c:4255 write.c:2575
+#: config/obj-coff.c:4287
#, c-format
msgid "Negative of non-absolute symbol %s"
msgstr ""
-#: config/obj-coff.c:4276 write.c:2589
+#: config/obj-coff.c:4308
msgid "callj to difference of 2 symbols"
msgstr ""
-#: config/obj-coff.c:4322
+#: config/obj-coff.c:4354
#, c-format
msgid "Can't emit reloc {- %s-seg symbol \"%s\"} @ file address %ld."
msgstr ""
@@ -649,159 +640,196 @@ 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:4411 config/tc-i960.c:3235 write.c:2733
+#: config/obj-coff.c:4443 config/tc-i960.c:3226 write.c:2826
msgid "can't use COBR format with external label"
msgstr ""
-#: config/obj-coff.c:4490
+#: config/obj-coff.c:4518
#, c-format
msgid "Value of %ld too large for field of %d bytes at 0x%lx"
msgstr ""
-#: config/obj-coff.c:4504 write.c:2823
+#: config/obj-coff.c:4532
#, c-format
msgid "Signed .word overflow; switch may be too large; %ld at 0x%lx"
msgstr ""
-#: config/obj-ecoff.c:241
+#: config/obj-ecoff.c:227
msgid "Can't set GP value"
msgstr ""
-#: config/obj-ecoff.c:248
+#: config/obj-ecoff.c:234
msgid "Can't set register masks"
msgstr ""
-#: config/obj-elf.c:308 config/tc-sparc.c:3674 config/tc-v850.c:259
-msgid "Expected comma after symbol-name"
+#: config/obj-elf.c:308
+msgid "expected comma after symbol-name"
msgstr ""
-#: config/obj-elf.c:315 config/tc-sparc.c:3684
+#: config/obj-elf.c:315 config/tc-sparc.c:3690
#, c-format
msgid ".COMMon length (%d.) <0! Ignored."
msgstr ""
-#: config/obj-elf.c:325 config/tc-alpha.c:4335 config/tc-sparc.c:3694
-#: config/tc-v850.c:282
-msgid "Ignoring attempt to re-define symbol"
+#: config/obj-elf.c:325 ecoff.c:3399 read.c:1403 read.c:1504 read.c:2137
+#: read.c:2226 read.c:2856 read.c:4937 symbols.c:361 symbols.c:460
+#, c-format
+msgid "symbol `%s' is already defined"
msgstr ""
-#: config/obj-elf.c:333 config/tc-sparc.c:3702 config/tc-v850.c:292
+#: config/obj-elf.c:333
#, c-format
-msgid "Length of .comm \"%s\" is already %ld. Not changed to %d."
+msgid "length of .comm \"%s\" is already %ld; not changed to %d"
msgstr ""
-#: config/obj-elf.c:356 config/tc-v850.c:319
-msgid "Common alignment negative; 0 assumed"
+#: config/obj-elf.c:356
+msgid "common alignment negative; 0 assumed"
msgstr ""
-#: config/obj-elf.c:375 config/tc-m32r.c:1286 config/tc-ppc.c:1518
-#: config/tc-v850.c:382
-msgid "Common alignment not a power of 2"
+#: config/obj-elf.c:375
+msgid "common alignment not a power of 2"
msgstr ""
-#: config/obj-elf.c:438 config/tc-sparc.c:3826 config/tc-v850.c:564
+#: config/obj-elf.c:438 config/tc-sparc.c:3832 config/tc-v850.c:565
#, c-format
msgid "bad .common segment %s"
msgstr ""
-#: config/obj-elf.c:664
+#: config/obj-elf.c:668
#, c-format
-msgid "Setting incorrect section type for %s"
+msgid "setting incorrect section type for %s"
msgstr ""
-#: config/obj-elf.c:668
+#: config/obj-elf.c:672
+#, c-format
+msgid "ignoring incorrect section type for %s"
+msgstr ""
+
+#: config/obj-elf.c:685
+#, c-format
+msgid "setting incorrect section attributes for %s"
+msgstr ""
+
+#: config/obj-elf.c:732
+#, c-format
+msgid "ignoring changed section attributes for %s"
+msgstr ""
+
+#: config/obj-elf.c:734
#, c-format
-msgid "Ignoring incorrect section type for %s"
+msgid "ignoring changed section entity size for %s"
msgstr ""
-#: config/obj-elf.c:681
+#: config/obj-elf.c:737
#, c-format
-msgid "Setting incorrect section attributes for %s"
+msgid "ignoring new section group for %s"
msgstr ""
-#: config/obj-elf.c:753
-msgid "Unrecognized .section attribute: want a,w,x"
+#: config/obj-elf.c:788
+msgid "unrecognized .section attribute: want a,w,x,M,S,G"
msgstr ""
-#: config/obj-elf.c:793
-msgid "Unrecognized section attribute"
+#: config/obj-elf.c:828
+msgid "unrecognized section attribute"
msgstr ""
-#: config/obj-elf.c:815
-msgid "Unrecognized section type"
+#: config/obj-elf.c:850 read.c:2538
+msgid "unrecognized section type"
msgstr ""
-#: config/obj-elf.c:866
-msgid "Missing section name"
+#: config/obj-elf.c:880
+msgid "missing name"
msgstr ""
-#: config/obj-elf.c:932
-msgid "Bad .section directive - character following name is not '#'"
+#: config/obj-elf.c:987
+msgid "invalid merge entity size"
msgstr ""
-#: config/obj-elf.c:1033
+#: config/obj-elf.c:994
+msgid "entity size for SHF_MERGE not specified"
+msgstr ""
+
+#: config/obj-elf.c:1007
+msgid "group name for SHF_GROUP not specified"
+msgstr ""
+
+#: config/obj-elf.c:1020
+msgid "character following name is not '#'"
+msgstr ""
+
+#: config/obj-elf.c:1121
msgid ".previous without corresponding .section; ignored"
msgstr ""
-#: config/obj-elf.c:1060
+#: config/obj-elf.c:1148
msgid ".popsection without corresponding .pushsection; ignored"
msgstr ""
-#: config/obj-elf.c:1113
+#: config/obj-elf.c:1202
msgid "expected comma after name in .symver"
msgstr ""
-#: config/obj-elf.c:1137
+#: config/obj-elf.c:1225
#, c-format
msgid "missing version name in `%s' for symbol `%s'"
msgstr ""
-#: config/obj-elf.c:1148
+#: config/obj-elf.c:1236
#, c-format
msgid "multiple versions [`%s'|`%s'] for symbol `%s'"
msgstr ""
-#: config/obj-elf.c:1361 config/obj-som.c:155 config/obj-som.c:201
-msgid "Expected quoted string"
+#: config/obj-elf.c:1470
+msgid "expected quoted string"
msgstr ""
-#: config/obj-elf.c:1382
+#: config/obj-elf.c:1491
#, c-format
msgid "expected comma after name `%s' in .size directive"
msgstr ""
-#: config/obj-elf.c:1391
+#: config/obj-elf.c:1500
msgid "missing expression in .size directive"
msgstr ""
-#: config/obj-elf.c:1467
+#: config/obj-elf.c:1583
#, c-format
-msgid "ignoring unrecognized symbol type \"%s\""
+msgid "unrecognized symbol type \"%s\""
msgstr ""
-#: config/obj-elf.c:1648
+#: config/obj-elf.c:1764
msgid ".size expression too complicated to fix up"
msgstr ""
-#: config/obj-elf.c:1680
+#: config/obj-elf.c:1796
#, c-format
msgid ""
"invalid attempt to declare external version name as default in symbol `%s'"
msgstr ""
-#: config/obj-elf.c:1862
+#: config/obj-elf.c:1855 ecoff.c:3644
+#, c-format
+msgid "symbol `%s' can not be both weak and common"
+msgstr ""
+
+#: config/obj-elf.c:1971
+#, c-format
+msgid "can't create group: %s"
+msgstr ""
+
+#: config/obj-elf.c:2068
#, c-format
-msgid "Failed to set up debugging information: %s"
+msgid "failed to set up debugging information: %s"
msgstr ""
-#: config/obj-elf.c:1882
+#: config/obj-elf.c:2088
#, c-format
-msgid "Can't start writing .mdebug section: %s"
+msgid "can't start writing .mdebug section: %s"
msgstr ""
-#: config/obj-elf.c:1890
+#: config/obj-elf.c:2096
#, c-format
-msgid "Could not write .mdebug section: %s"
+msgid "could not write .mdebug section: %s"
msgstr ""
#: config/obj-ieee.c:455
@@ -812,6 +840,10 @@ msgstr ""
msgid "Only one .version pseudo-op per file!"
msgstr ""
+#: config/obj-som.c:155 config/obj-som.c:201
+msgid "Expected quoted string"
+msgstr ""
+
#: config/obj-som.c:164
#, c-format
msgid "FATAL: Attaching version header %s"
@@ -826,44 +858,45 @@ msgstr ""
msgid "FATAL: Attaching copyright header %s"
msgstr ""
-#: config/obj-vms.c:462
+#: config/obj-vms.c:463
#, c-format
msgid "compiler emitted zero-size common symbol `%s' already defined"
msgstr ""
-#: config/obj-vms.c:472
+#: config/obj-vms.c:473
#, c-format
msgid "compiler redefined zero-size common symbol `%s'"
msgstr ""
-#: config/obj-vms.c:591
+#: config/obj-vms.c:592
#, c-format
msgid "Couldn't create VMS object file \"%s\""
msgstr ""
-#: config/obj-vms.c:616
+#: config/obj-vms.c:617
msgid "I/O error writing VMS object file (length prefix)"
msgstr ""
-#: config/obj-vms.c:630
+#: config/obj-vms.c:631
msgid "I/O error writing VMS object file"
msgstr ""
-#: config/obj-vms.c:1220
+#: config/obj-vms.c:1221
+#, c-format
msgid "Couldn't find source file \"%s\", status=%%X%x"
msgstr ""
-#: config/obj-vms.c:1718 config/obj-vms.c:2894
+#: config/obj-vms.c:1719 config/obj-vms.c:2895
#, c-format
msgid "debugger forward reference error, dbx type %d"
msgstr ""
-#: config/obj-vms.c:1793
+#: config/obj-vms.c:1794
#, c-format
msgid "Variable descriptor %d too complicated. Defined as `void *'."
msgstr ""
-#: config/obj-vms.c:2107
+#: config/obj-vms.c:2108
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"
@@ -874,92 +907,92 @@ msgid ""
" I didn't warn you! \n"
msgstr ""
-#: config/obj-vms.c:2421
+#: config/obj-vms.c:2422
#, c-format
msgid "debugginer output: %d is an unknown untyped variable."
msgstr ""
-#: config/obj-vms.c:2639
+#: config/obj-vms.c:2640
#, c-format
msgid "debugger output: structure element `%s' has undefined type"
msgstr ""
-#: config/obj-vms.c:2750
+#: config/obj-vms.c:2751
#, c-format
msgid "debugger output: %d is an unknown type of variable."
msgstr ""
-#: config/obj-vms.c:2883
+#: config/obj-vms.c:2884
#, c-format
msgid "debugger output: Unable to resolve %d circular references."
msgstr ""
-#: config/obj-vms.c:3085
+#: config/obj-vms.c:3086
#, c-format
msgid "Module name truncated: %s\n"
msgstr ""
-#: config/obj-vms.c:3363
+#: config/obj-vms.c:3364
#, c-format
msgid "Symbol %s replaced by %s\n"
msgstr ""
#. impossible
-#: config/obj-vms.c:3646
+#: config/obj-vms.c:3647
#, c-format
msgid "Unknown VMS psect type (%ld)"
msgstr ""
-#: config/obj-vms.c:3687
+#: config/obj-vms.c:3688
#, c-format
msgid "Globalsymbol attribute for symbol %s was unexpected."
msgstr ""
-#: config/obj-vms.c:3836
+#: config/obj-vms.c:3837
msgid "Invalid data type for globalvalue"
msgstr ""
-#: config/obj-vms.c:3848
+#: config/obj-vms.c:3849
#, c-format
msgid "Invalid globalvalue of %s"
msgstr ""
-#: config/obj-vms.c:4198
+#: config/obj-vms.c:4199
msgid "Couldn't find fixup fragment when checking for indirect reference"
msgstr ""
-#: config/obj-vms.c:4541 config/obj-vms.c:4682
+#: config/obj-vms.c:4542 config/obj-vms.c:4683
msgid "Fixup data addsy and subsy don't have the same type"
msgstr ""
-#: config/obj-vms.c:4545 config/obj-vms.c:4686
+#: config/obj-vms.c:4546 config/obj-vms.c:4687
msgid "Fixup data addsy and subsy don't have an appropriate type"
msgstr ""
-#: config/obj-vms.c:4548 config/obj-vms.c:4689
+#: config/obj-vms.c:4549 config/obj-vms.c:4690
msgid "Fixup data is erroneously \"pcrel\""
msgstr ""
-#: config/obj-vms.c:4564 config/obj-vms.c:4708
+#: config/obj-vms.c:4565 config/obj-vms.c:4709
msgid "Fixup datum is not a longword"
msgstr ""
-#: config/obj-vms.c:4568 config/obj-vms.c:4712
+#: config/obj-vms.c:4569 config/obj-vms.c:4713
msgid "Fixup datum is not \"fixP->fx_addsy\""
msgstr ""
-#: config/obj-vms.c:4783
+#: config/obj-vms.c:4784
#, 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:4915
+#: config/obj-vms.c:4916
msgid "Can't handle global xtors symbols yet."
msgstr ""
-#: config/obj-vms.c:4918
+#: config/obj-vms.c:4919
#, c-format
msgid "Unknown %s"
msgstr ""
@@ -967,109 +1000,116 @@ msgstr ""
#.
#. * Error otherwise.
#.
-#: config/obj-vms.c:5003
+#: config/obj-vms.c:5004
#, c-format
msgid "unhandled stab type %d"
msgstr ""
-#: config/tc-a29k.c:160 config/tc-sparc.c:3878
+#: config/tc-a29k.c:160 config/tc-sparc.c:3884
msgid "Unknown segment type"
msgstr ""
#. Probably a memory allocation problem? Give up now.
-#: config/tc-a29k.c:330 config/tc-hppa.c:1412 config/tc-mips.c:1030
-#: config/tc-mips.c:1072 config/tc-sparc.c:846
+#: config/tc-a29k.c:330 config/tc-hppa.c:1462 config/tc-mips.c:1251
+#: config/tc-mips.c:1293 config/tc-sparc.c:847
msgid "Broken assembler. No assembly attempted."
msgstr ""
-#: config/tc-a29k.c:375 config/tc-avr.c:1124 config/tc-d10v.c:532
-#: config/tc-d30v.c:552 config/tc-h8300.c:296 config/tc-h8500.c:294
-#: config/tc-mcore.c:655 config/tc-mn10200.c:954 config/tc-mn10300.c:1335
-#: config/tc-ppc.c:1974 config/tc-sh.c:838 config/tc-tic80.c:282
-#: config/tc-v850.c:2076 config/tc-w65.c:248 config/tc-z8k.c:336
+#: config/tc-a29k.c:375 config/tc-avr.c:1131 config/tc-d10v.c:540
+#: config/tc-d30v.c:552 config/tc-h8300.c:313 config/tc-h8500.c:284
+#: config/tc-mcore.c:655 config/tc-mmix.c:468 config/tc-mn10200.c:940
+#: config/tc-mn10300.c:1311 config/tc-ppc.c:2106 config/tc-s390.c:1054
+#: config/tc-sh.c:869 config/tc-tic80.c:283 config/tc-v850.c:2073
+#: config/tc-w65.c:241 config/tc-z8k.c:343
msgid "missing operand"
msgstr ""
-#: config/tc-a29k.c:415 config/tc-cris.c:913 config/tc-cris.c:921
-#: config/tc-hppa.c:1545 config/tc-i860.c:431 config/tc-i860.c:448
-#: config/tc-sparc.c:1408 config/tc-sparc.c:1414
+#: config/tc-a29k.c:414 config/tc-cris.c:950 config/tc-cris.c:958
+#: config/tc-hppa.c:1598 config/tc-i860.c:431 config/tc-i860.c:448
+#: config/tc-sparc.c:1409 config/tc-sparc.c:1415
#, c-format
msgid "Unknown opcode: `%s'"
msgstr ""
-#: config/tc-a29k.c:420
+#: config/tc-a29k.c:419
#, c-format
msgid "Unknown opcode `%s'."
msgstr ""
-#: config/tc-a29k.c:452
+#: config/tc-a29k.c:451
#, c-format
msgid "Too many operands: %s"
msgstr ""
-#: config/tc-a29k.c:474 config/tc-a29k.c:505
+#: config/tc-a29k.c:473 config/tc-a29k.c:504
#, c-format
msgid "Immediate value of %ld is too large"
msgstr ""
-#: config/tc-a29k.c:890
+#: config/tc-a29k.c:543 config/tc-i860.c:340 config/tc-i860.c:832
+#: config/tc-m68k.c:3181 config/tc-m68k.c:3210 config/tc-sparc.c:2544
+msgid "failed sanity check."
+msgstr ""
+
+#: config/tc-a29k.c:889
#, c-format
msgid "bad relocation type: 0x%02x"
msgstr ""
-#: config/tc-a29k.c:914
+#: config/tc-a29k.c:916
#, c-format
msgid "need %o3\n"
msgstr ""
-#: config/tc-a29k.c:930
+#: config/tc-a29k.c:932
msgid "a29k_convert_frag\n"
msgstr ""
-#: config/tc-a29k.c:939
+#: config/tc-a29k.c:941
msgid "a29k_estimate_size_before_relax\n"
msgstr ""
-#: config/tc-a29k.c:1090
+#: config/tc-a29k.c:1092
#, c-format
msgid "label \"$%d\" redefined"
msgstr ""
-#: config/tc-a29k.c:1163
+#: config/tc-a29k.c:1165
+#, c-format
msgid "Invalid expression after %%%%\n"
msgstr ""
-#: config/tc-a29k.c:1174
+#: config/tc-a29k.c:1176
msgid "Invalid register in & expression"
msgstr ""
-#: config/tc-alpha.c:837
+#: config/tc-alpha.c:789
#, c-format
msgid "internal error: can't hash opcode `%s': %s"
msgstr ""
-#: config/tc-alpha.c:871
+#: config/tc-alpha.c:824
#, c-format
msgid "internal error: can't hash macro `%s': %s"
msgstr ""
-#: config/tc-alpha.c:954 config/tc-i960.c:2700
+#: config/tc-alpha.c:906 config/tc-i960.c:2701
msgid "syntax error"
msgstr ""
-#: config/tc-alpha.c:1028 config/tc-arm.c:6629 config/tc-h8300.c:1373
-#: config/tc-h8500.c:1197 config/tc-hppa.c:3939 config/tc-i860.c:931
-#: config/tc-m68hc11.c:478 config/tc-m68k.c:4179 config/tc-m88k.c:1105
-#: config/tc-ns32k.c:1663 config/tc-sparc.c:2830 config/tc-z8k.c:1324
+#: config/tc-alpha.c:980 config/tc-h8300.c:1413 config/tc-h8500.c:1187
+#: config/tc-hppa.c:4017 config/tc-i860.c:931 config/tc-m68hc11.c:500
+#: config/tc-m68k.c:4201 config/tc-m88k.c:1011 config/tc-ns32k.c:1663
+#: config/tc-sparc.c:2831 config/tc-z8k.c:1321
msgid "Bad call to MD_ATOF()"
msgstr ""
-#: config/tc-alpha.c:1078
+#: config/tc-alpha.c:1030
#, c-format
msgid "Unknown CPU identifier `%s'"
msgstr ""
-#: config/tc-alpha.c:1122
+#: config/tc-alpha.c:1074
msgid ""
"Alpha options:\n"
"-32addr\t\t\ttreat addresses as 32-bit values\n"
@@ -1080,952 +1120,1046 @@ msgid ""
"\t\t\tthese variants include PALcode opcodes\n"
msgstr ""
-#: config/tc-alpha.c:1132
+#: config/tc-alpha.c:1084
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:1305
+#: config/tc-alpha.c:1242
#, c-format
msgid "unhandled relocation type %s"
msgstr ""
-#: config/tc-alpha.c:1318
+#: config/tc-alpha.c:1255
msgid "non-absolute expression in constant field"
msgstr ""
-#: config/tc-alpha.c:1332
+#: config/tc-alpha.c:1269
#, c-format
msgid "type %d reloc done?\n"
msgstr ""
-#: config/tc-alpha.c:1383 config/tc-alpha.c:1390 config/tc-mips.c:7356
+#: config/tc-alpha.c:1317 config/tc-alpha.c:1324 config/tc-mips.c:7965
msgid "Used $at without \".set noat\""
msgstr ""
-#: config/tc-alpha.c:1572
+#: config/tc-alpha.c:1481
#, c-format
msgid "cannot represent `%s' relocation in object file"
msgstr ""
-#: config/tc-alpha.c:1579
+#: config/tc-alpha.c:1488
#, c-format
msgid "internal error? cannot generate `%s' relocation"
msgstr ""
-#: config/tc-alpha.c:1633
+#: config/tc-alpha.c:1543
#, c-format
msgid "frame reg expected, using $%d."
msgstr ""
-#: config/tc-alpha.c:1758
+#: config/tc-alpha.c:1646
#, c-format
-msgid "No !literal!%d was found"
+msgid "No !literal!%ld was found"
+msgstr ""
+
+#: config/tc-alpha.c:1654
+#, c-format
+msgid "No ldah !gpdisp!%ld was found"
+msgstr ""
+
+#: config/tc-alpha.c:1705
+#, c-format
+msgid "No lda !gpdisp!%ld was found"
msgstr ""
#. only support one relocation op per insn
-#: config/tc-alpha.c:1946
+#: config/tc-alpha.c:1841
msgid "More than one relocation op per insn"
msgstr ""
-#: config/tc-alpha.c:1963
+#: config/tc-alpha.c:1857
msgid "No relocation operand"
msgstr ""
-#: config/tc-alpha.c:1969
+#: config/tc-alpha.c:1867
#, c-format
-msgid "No !sequence-number after !%s"
+msgid "Unknown relocation operand: !%s"
msgstr ""
-#: config/tc-alpha.c:1982
+#: config/tc-alpha.c:1877
#, c-format
-msgid "Unknown relocation operand: !%s"
+msgid "no sequence number after !%s"
msgstr ""
-#: config/tc-alpha.c:1995
+#: config/tc-alpha.c:1887
+#, c-format
+msgid "!%s does not use a sequence number"
+msgstr ""
+
+#: config/tc-alpha.c:1897
#, c-format
msgid "Bad sequence number: !%s!%s"
msgstr ""
-#: config/tc-alpha.c:2346
+#: config/tc-alpha.c:2224
#, c-format
msgid "operand out of range (%s not between %d and %d)"
msgstr ""
-#: config/tc-alpha.c:2445 config/tc-d10v.c:621 config/tc-d30v.c:640
-#: config/tc-mn10200.c:1009 config/tc-mn10300.c:1406 config/tc-ppc.c:1940
-#: config/tc-ppc.c:2048 config/tc-ppc.c:2060 config/tc-v850.c:1856
-#: config/tc-v850.c:1879 config/tc-v850.c:2099
+#: config/tc-alpha.c:2338 config/tc-alpha.c:2362 config/tc-d10v.c:629
+#: config/tc-d30v.c:640 config/tc-mn10200.c:995 config/tc-mn10300.c:1382
+#: config/tc-ppc.c:2072 config/tc-ppc.c:2256 config/tc-ppc.c:2268
+#: config/tc-s390.c:1064 config/tc-s390.c:1121 config/tc-v850.c:1853
+#: config/tc-v850.c:1876 config/tc-v850.c:2096
msgid "too many fixups"
msgstr ""
-#: config/tc-alpha.c:2660 config/tc-alpha.c:2729
+#: config/tc-alpha.c:2374
+msgid "invalid relocation for instruction"
+msgstr ""
+
+#: config/tc-alpha.c:2385
+msgid "invalid relocation for field"
+msgstr ""
+
+#: config/tc-alpha.c:2484
#, c-format
-msgid "inappropriate arguments for opcode `%s'"
+msgid "too many ldah insns for !gpdisp!%ld"
msgstr ""
-#: config/tc-alpha.c:2662 config/tc-alpha.c:2731
+#: config/tc-alpha.c:2486 config/tc-alpha.c:2498
#, c-format
-msgid "opcode `%s' not supported for target %s"
+msgid "both insns for !gpdisp!%ld must be in the same section"
msgstr ""
-#: config/tc-alpha.c:2666 config/tc-alpha.c:2734 config/tc-avr.c:1090
+#: config/tc-alpha.c:2496
#, c-format
-msgid "unknown opcode `%s'"
+msgid "too many lda insns for !gpdisp!%ld"
+msgstr ""
+
+#: config/tc-alpha.c:2577 config/tc-alpha.c:2647
+#, c-format
+msgid "inappropriate arguments for opcode `%s'"
+msgstr ""
+
+#: config/tc-alpha.c:2579 config/tc-alpha.c:2649
+#, c-format
+msgid "opcode `%s' not supported for target %s"
msgstr ""
-#: config/tc-alpha.c:2706 config/tc-alpha.c:2773 config/tc-alpha.c:3284
-#: config/tc-alpha.c:3344 config/tc-alpha.c:3396 config/tc-alpha.c:3471
-#: config/tc-alpha.c:3556 config/tc-alpha.c:3682 config/tc-alpha.c:3859
-#: config/tc-alpha.c:3916 config/tc-alpha.c:4026 config/tc-alpha.c:4133
-#: config/tc-alpha.c:4210
+#: config/tc-alpha.c:2583 config/tc-alpha.c:2653 config/tc-avr.c:1097
#, c-format
-msgid "Cannot use !%s!%d with %s"
+msgid "unknown opcode `%s'"
msgstr ""
-#: config/tc-alpha.c:2794
+#: config/tc-alpha.c:2701
msgid "can not resolve expression"
msgstr ""
-#: config/tc-alpha.c:2936 config/tc-alpha.c:3128
+#: config/tc-alpha.c:2845 config/tc-alpha.c:3024
msgid "overflow in literal (.lita) table"
msgstr ""
-#: config/tc-alpha.c:2943 config/tc-alpha.c:2966 config/tc-alpha.c:3141
-#: config/tc-alpha.c:3485 config/tc-alpha.c:3563 config/tc-alpha.c:3611
-#: config/tc-alpha.c:3711 config/tc-alpha.c:3936 config/tc-alpha.c:4048
+#: config/tc-alpha.c:2852 config/tc-alpha.c:2875 config/tc-alpha.c:3037
+#: config/tc-alpha.c:3252 config/tc-alpha.c:3297 config/tc-alpha.c:3371
+#: config/tc-alpha.c:3463 config/tc-alpha.c:3712 config/tc-alpha.c:3813
msgid "macro requires $at register while noat in effect"
msgstr ""
-#: config/tc-alpha.c:2945 config/tc-alpha.c:2968 config/tc-alpha.c:3143
+#: config/tc-alpha.c:2854 config/tc-alpha.c:2877 config/tc-alpha.c:3039
msgid "macro requires $at while $at in use"
msgstr ""
-#: config/tc-alpha.c:3090 expr.c:83 read.c:3164
+#: config/tc-alpha.c:2985
msgid "bignum invalid; zero assumed"
msgstr ""
-#: config/tc-alpha.c:3092 expr.c:85 read.c:3166 read.c:3499 read.c:4397
+#: config/tc-alpha.c:2987
msgid "floating point number invalid; zero assumed"
msgstr ""
-#: config/tc-alpha.c:3097
+#: config/tc-alpha.c:2992
msgid "can't handle expression"
msgstr ""
-#: config/tc-alpha.c:3134
+#: config/tc-alpha.c:3030
msgid "overflow in literal (.lit8) table"
msgstr ""
-#: config/tc-alpha.c:3306
+#: config/tc-alpha.c:4042 config/tc-ppc.c:1579 config/tc-ppc.c:3974
#, c-format
-msgid "bad instruction format for lda !%s!%ld"
+msgid ".COMMon length (%ld.) <0! Ignored."
msgstr ""
-#: config/tc-alpha.c:4306 config/tc-ppc.c:1467 config/tc-ppc.c:3689
-#: read.c:1369
-#, c-format
-msgid ".COMMon length (%ld.) <0! Ignored."
+#: config/tc-alpha.c:4071 config/tc-sparc.c:3700 config/tc-v850.c:283
+msgid "Ignoring attempt to re-define symbol"
msgstr ""
-#: config/tc-alpha.c:4344 config/tc-alpha.c:4353 config/tc-ppc.c:3726
-#: read.c:1393
+#: config/tc-alpha.c:4080 config/tc-alpha.c:4089 config/tc-ppc.c:4011
#, c-format
msgid "Length of .comm \"%s\" is already %ld. Not changed to %ld."
msgstr ""
-#: config/tc-alpha.c:4455 ecoff.c:3087
+#: config/tc-alpha.c:4191 ecoff.c:3084
msgid ".ent directive has no name"
msgstr ""
-#: config/tc-alpha.c:4463
+#: config/tc-alpha.c:4199
msgid "nested .ent directives"
msgstr ""
-#: config/tc-alpha.c:4499 ecoff.c:3035
+#: config/tc-alpha.c:4235 ecoff.c:3034
msgid ".end directive has no name"
msgstr ""
-#: config/tc-alpha.c:4508
+#: config/tc-alpha.c:4244
msgid ".end directive names different symbol than .ent"
msgstr ""
-#: config/tc-alpha.c:4585
+#: config/tc-alpha.c:4321
#, c-format
msgid "Invalid argument %d to .prologue."
msgstr ""
-#: config/tc-alpha.c:4677
+#: config/tc-alpha.c:4413
msgid "ECOFF debugging is disabled."
msgstr ""
-#: config/tc-alpha.c:4698
+#: config/tc-alpha.c:4434
msgid "Unknown section directive"
msgstr ""
-#: config/tc-alpha.c:4734
+#: config/tc-alpha.c:4470
msgid ".ent directive has no symbol"
msgstr ""
-#: config/tc-alpha.c:4761
+#: config/tc-alpha.c:4497
msgid "Bad .frame directive 1./2. param"
msgstr ""
-#: config/tc-alpha.c:4773
+#: config/tc-alpha.c:4509
msgid "Bad .frame directive 3./4. param"
msgstr ""
-#: config/tc-alpha.c:4798
+#: config/tc-alpha.c:4534
msgid ".pdesc directive not in link (.link) section"
msgstr ""
-#: config/tc-alpha.c:4806
+#: config/tc-alpha.c:4542
msgid ".pdesc has no matching .ent"
msgstr ""
-#: config/tc-alpha.c:4817
+#: config/tc-alpha.c:4553
msgid ".pdesc directive has no entry symbol"
msgstr ""
-#: config/tc-alpha.c:4830
+#: config/tc-alpha.c:4566
msgid "No comma after .pdesc <entryname>"
msgstr ""
-#: config/tc-alpha.c:4853
+#: config/tc-alpha.c:4589
msgid "unknown procedure kind"
msgstr ""
-#: config/tc-alpha.c:4947
+#: config/tc-alpha.c:4682
msgid ".name directive not in link (.link) section"
msgstr ""
-#: config/tc-alpha.c:4955
+#: config/tc-alpha.c:4690
msgid ".name directive has no symbol"
msgstr ""
-#: config/tc-alpha.c:4989
+#: config/tc-alpha.c:4724
msgid "No symbol after .linkage"
msgstr ""
-#: config/tc-alpha.c:5017
+#: config/tc-alpha.c:4752
msgid "No symbol after .code_address"
msgstr ""
-#: config/tc-alpha.c:5050 ecoff.c:3253
+#: config/tc-alpha.c:4785
msgid "Bad .mask directive"
msgstr ""
-#: config/tc-alpha.c:5071 ecoff.c:3183
+#: config/tc-alpha.c:4806
msgid "Bad .fmask directive"
msgstr ""
-#: config/tc-alpha.c:5241 config/tc-arm.c:1593 read.c:2150 read.c:2737
-#: stabs.c:464
+#: config/tc-alpha.c:4976
#, c-format
msgid "Expected comma after name \"%s\""
msgstr ""
#. *symbol_get_obj (symbolP) = (signed char) temp;
-#: config/tc-alpha.c:5252
+#: config/tc-alpha.c:4987
#, c-format
msgid "unhandled: .proc %s,%d"
msgstr ""
-#: config/tc-alpha.c:5287
+#: config/tc-alpha.c:5022
#, c-format
msgid "Tried to .set unrecognized mode `%s'"
msgstr ""
#. not fatal, but it might not work in the end
-#: config/tc-alpha.c:5304
+#: config/tc-alpha.c:5039
msgid "File overrides no-base-register option."
msgstr ""
-#: config/tc-alpha.c:5321
+#: config/tc-alpha.c:5056
#, c-format
msgid "Bad base register, using $%d."
msgstr ""
-#: config/tc-alpha.c:5343
+#: config/tc-alpha.c:5078
#, c-format
msgid "Alignment too large: %d. assumed"
msgstr ""
-#: config/tc-alpha.c:5347 config/tc-d30v.c:2219
+#: config/tc-alpha.c:5082 config/tc-d30v.c:2214
msgid "Alignment negative: 0 assumed"
msgstr ""
-#: config/tc-alpha.c:5662
+#: config/tc-alpha.c:5394
#, c-format
msgid "Chose GP value of %lx\n"
msgstr ""
-#: config/tc-arc.c:1618 config/tc-arm.c:7532
+#: config/tc-alpha.c:5410 config/tc-ia64.c:932
+msgid "Bad .section directive: want a,s,w,x,M,S in string"
+msgstr ""
+
+#: config/tc-arc.c:1616 config/tc-arm.c:10246
msgid "md_estimate_size_before_relax\n"
msgstr ""
-#: config/tc-arc.c:1630
+#: config/tc-arc.c:1628
msgid "md_convert_frag\n"
msgstr ""
-#: config/tc-arm.c:1156
-msgid "Bad arguments to instruction"
+#: config/tc-arm.c:664
+msgid "ARM register expected"
msgstr ""
-#: config/tc-arm.c:1157
-msgid "r15 not allowed here"
+#: config/tc-arm.c:665 config/tc-arm.c:2814
+msgid "bad or missing co-processor number"
+msgstr ""
+
+#. In the few cases where we might be able to accept something else
+#. this error can be overridden.
+#: config/tc-arm.c:666 config/tc-arm.c:2869
+msgid "co-processor register expected"
+msgstr ""
+
+#: config/tc-arm.c:667
+msgid "FPA register expected"
+msgstr ""
+
+#: config/tc-arm.c:668
+msgid "VFP single precision register expected"
+msgstr ""
+
+#: config/tc-arm.c:669
+msgid "VFP double precision register expected"
+msgstr ""
+
+#: config/tc-arm.c:670
+msgid "Maverick MVF register expected"
+msgstr ""
+
+#: config/tc-arm.c:671
+msgid "Maverick MVD register expected"
msgstr ""
-#: config/tc-arm.c:1158
-msgid "Instruction should not have flags"
+#: config/tc-arm.c:672 config/tc-arm.c:673
+msgid "Maverick MVFX register expected"
msgstr ""
-#: config/tc-arm.c:1159
-msgid "Instruction is not conditional"
+#: config/tc-arm.c:674
+msgid "Maverick MVAX register expected"
msgstr ""
-#: config/tc-arm.c:1160
+#: config/tc-arm.c:675
+msgid "Maverick DSPSC register expected"
+msgstr ""
+
+#: config/tc-arm.c:2013
+msgid "bad arguments to instruction"
+msgstr ""
+
+#: config/tc-arm.c:2014
+msgid "r15 not allowed here"
+msgstr ""
+
+#: config/tc-arm.c:2015
+msgid "instruction is not conditional"
+msgstr ""
+
+#: config/tc-arm.c:2016
msgid "acc0 expected"
msgstr ""
-#: config/tc-arm.c:1289
-msgid "Literal Pool Overflow"
+#: config/tc-arm.c:2155
+msgid "literal pool overflow"
msgstr ""
-#: config/tc-arm.c:1431
-msgid "Invalid syntax for .req directive."
+#: config/tc-arm.c:2297
+msgid "invalid syntax for .req directive"
msgstr ""
-#: config/tc-arm.c:1506 config/tc-mips.c:9916 read.c:2035
+#: config/tc-arm.c:2372
#, c-format
-msgid "Alignment too large: %d. assumed."
+msgid "alignment too large: %d assumed"
msgstr ""
-#: config/tc-arm.c:1509 read.c:2040
-msgid "Alignment negative. 0 assumed."
+#: config/tc-arm.c:2375
+msgid "alignment negative. 0 assumed."
+msgstr ""
+
+#: config/tc-arm.c:2459
+#, c-format
+msgid "expected comma after name \"%s\""
msgstr ""
-#: config/tc-arm.c:1643 config/tc-m32r.c:417 read.c:2795 read.c:4857
+#: config/tc-arm.c:2509 config/tc-m32r.c:418
#, c-format
msgid "symbol `%s' already defined"
msgstr ""
-#: config/tc-arm.c:1714
+#: config/tc-arm.c:2580
msgid "selected processor does not support THUMB opcodes"
msgstr ""
-#: config/tc-arm.c:1727
+#: config/tc-arm.c:2593
msgid "selected processor does not support ARM opcodes"
msgstr ""
-#: config/tc-arm.c:1739
+#: config/tc-arm.c:2605
#, c-format
msgid "invalid instruction size selected (%d)"
msgstr ""
-#: config/tc-arm.c:1774
+#: config/tc-arm.c:2640
#, c-format
msgid "invalid operand to .code directive (%d) (expecting 16 or 32)"
msgstr ""
-#: config/tc-arm.c:1785
-msgid "Garbage following instruction"
+#: config/tc-arm.c:2651
+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:1835
+#: config/tc-arm.c:2701
#, c-format
-msgid "Register expected, not '%.100s'"
+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:1907
+#: config/tc-arm.c:2773
msgid "flag for {c}psr instruction expected"
msgstr ""
-#: config/tc-arm.c:1937
-msgid "Illegal co-processor number"
+#: config/tc-arm.c:2807
+msgid "illegal co-processor number"
msgstr ""
-#: config/tc-arm.c:1944
-msgid "Bad or missing co-processor number"
-msgstr ""
-
-#: config/tc-arm.c:1968 config/tc-arm.c:3054 config/tc-arm.c:3246
+#: config/tc-arm.c:2839 config/tc-arm.c:3877 config/tc-arm.c:4059
msgid "bad or missing expression"
msgstr ""
-#: config/tc-arm.c:1974
+#: config/tc-arm.c:2845
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:1999
-msgid "Co-processor register expected"
-msgstr ""
-
-#. In the few cases where we might be able to accept something else
-#. this error can be overridden.
-#: config/tc-arm.c:2023
-msgid "Floating point register expected"
+#: config/tc-arm.c:2892
+msgid "floating point register expected"
msgstr ""
-#: config/tc-arm.c:2040
+#: config/tc-arm.c:2909
msgid "immediate expression expected"
msgstr ""
-#: config/tc-arm.c:2055
+#: config/tc-arm.c:2924
msgid "co-processor address must be word aligned"
msgstr ""
-#: config/tc-arm.c:2061
+#: config/tc-arm.c:2930
msgid "offset too large"
msgstr ""
-#: config/tc-arm.c:2109
+#: config/tc-arm.c:2979
msgid "pc may not be used in post-increment"
msgstr ""
-#: config/tc-arm.c:2125 config/tc-arm.c:2578 config/tc-arm.c:3438
-#: config/tc-arm.c:4358
+#: config/tc-arm.c:2995 config/tc-arm.c:3440 config/tc-arm.c:4228
+#: config/tc-arm.c:5095 config/tc-arm.c:5429
msgid "pre-indexed expression expected"
msgstr ""
-#: config/tc-arm.c:2138 config/tc-arm.c:2591 config/tc-arm.c:3449
-#: config/tc-arm.c:4370 config/tc-arm.c:4716
+#: config/tc-arm.c:3008 config/tc-arm.c:3453 config/tc-arm.c:4239
+#: config/tc-arm.c:5107 config/tc-arm.c:5441 config/tc-arm.c:5790
+#: config/tc-arm.c:8452 config/tc-arm.c:8467
msgid "missing ]"
msgstr ""
-#: config/tc-arm.c:2148
+#: config/tc-arm.c:3018
msgid "pc may not be used with write-back"
msgstr ""
-#: config/tc-arm.c:2203
+#: config/tc-arm.c:3070
msgid "comma expected after register name"
msgstr ""
-#: config/tc-arm.c:2222
-msgid "{C|S}PSR expected"
+#: config/tc-arm.c:3089
+msgid "CPSR or SPSR expected"
msgstr ""
-#: config/tc-arm.c:2250
+#: config/tc-arm.c:3115
msgid "comma missing after psr flags"
msgstr ""
-#: config/tc-arm.c:2267 config/tc-arm.c:2277
+#: config/tc-arm.c:3131 config/tc-arm.c:3141
msgid "only a register or immediate value can follow a psr flag"
msgstr ""
-#: config/tc-arm.c:2284
+#: config/tc-arm.c:3152
msgid "immediate value cannot be used to set this field"
msgstr ""
-#: config/tc-arm.c:2301 config/tc-arm.c:3673 config/tc-arm.c:3939
-#: config/tc-arm.c:3959
-msgid "Invalid constant"
+#: config/tc-arm.c:3170 config/tc-arm.c:4455 config/tc-arm.c:4735
+#: config/tc-arm.c:4755 config/tc-i960.c:1924
+msgid "invalid constant"
msgstr ""
-#: config/tc-arm.c:2351
+#: config/tc-arm.c:3218
msgid "rdhi, rdlo and rm must all be different"
msgstr ""
-#: config/tc-arm.c:2407
+#: config/tc-arm.c:3272
msgid "rd and rm should be different in mul"
msgstr ""
-#: config/tc-arm.c:2463
+#: config/tc-arm.c:3326
msgid "rd and rm should be different in mla"
msgstr ""
-#: config/tc-arm.c:2512
+#: config/tc-arm.c:3374
#, c-format
msgid "acc0 expected, not '%.100s'"
msgstr ""
-#: config/tc-arm.c:2695
+#: config/tc-arm.c:3552
msgid "rdhi and rdlo must be different"
msgstr ""
-#: config/tc-arm.c:2815
-msgid "Warning: Instruction unpredictable when using r15"
+#: config/tc-arm.c:3660
+msgid "Warning: instruction unpredictable when using r15"
msgstr ""
-#: config/tc-arm.c:3063 config/tc-arm.c:3255 config/tc-arm.c:5503
-#: config/tc-arm.c:5536 config/tc-arm.c:5546
+#: config/tc-arm.c:3886 config/tc-arm.c:4068 config/tc-arm.c:7395
+#: config/tc-arm.c:7428 config/tc-arm.c:7438
msgid "immediate value out of range"
msgstr ""
-#: config/tc-arm.c:3403
+#: config/tc-arm.c:4191
msgid "'[' expected after PLD mnemonic"
msgstr ""
-#: config/tc-arm.c:3428 config/tc-arm.c:3458
-msgid "writeback used in preload instruction"
+#: config/tc-arm.c:4213
+msgid "post-indexed expression used in preload instruction"
msgstr ""
-#. Deny all knowledge.
-#: config/tc-arm.c:3506
-#, c-format
-msgid "bad instruction '%.100s'"
+#: config/tc-arm.c:4218 config/tc-arm.c:4248
+msgid "writeback used in preload instruction"
msgstr ""
-#: config/tc-arm.c:3530
-msgid "Destination register must be even"
+#: config/tc-arm.c:4290
+msgid "destination register must be even"
msgstr ""
-#: config/tc-arm.c:3536
-msgid "r12 or r14 not allowed here"
+#: config/tc-arm.c:4296
+msgid "r14 not allowed here"
msgstr ""
-#: config/tc-arm.c:3544
+#: config/tc-arm.c:4303
msgid "pre/post-indexing used when modified address register is destination"
msgstr ""
-#: config/tc-arm.c:3657
+#: config/tc-arm.c:4313
+msgid "ldrd destination registers must not overlap index register"
+msgstr ""
+
+#: config/tc-arm.c:4439
msgid "bad_segment"
msgstr ""
-#: config/tc-arm.c:3703 config/tc-arm.c:3714
-msgid "Shift expression expected"
+#: config/tc-arm.c:4476 expr.c:1314 read.c:2198
+msgid "bad expression"
+msgstr ""
+
+#: config/tc-arm.c:4499 config/tc-arm.c:4510
+msgid "shift expression expected"
msgstr ""
-#: config/tc-arm.c:3738
+#: config/tc-arm.c:4534
msgid "shift requires register or #expression"
msgstr ""
-#: config/tc-arm.c:3739
+#: config/tc-arm.c:4535
msgid "shift requires #expression"
msgstr ""
-#: config/tc-arm.c:3769
-msgid "Shift of 0 ignored."
+#: config/tc-arm.c:4565
+msgid "shift of 0 ignored."
msgstr ""
-#: config/tc-arm.c:3775
-msgid "Invalid immediate shift"
+#: config/tc-arm.c:4571
+msgid "invalid immediate shift"
msgstr ""
-#: config/tc-arm.c:3930 config/tc-arm.c:4400
-msgid "Constant expression expected"
+#: config/tc-arm.c:4726 config/tc-arm.c:5143 config/tc-arm.c:5478
+#: config/tc-arm.c:6087 config/tc-v850.c:1956 config/tc-v850.c:1977
+msgid "constant expression expected"
msgstr ""
-#: config/tc-arm.c:3972
-msgid "Register or shift expression expected"
+#: config/tc-arm.c:4768
+msgid "register or shift expression expected"
msgstr ""
-#: config/tc-arm.c:4025
-msgid "Invalid floating point immediate expression"
+#: config/tc-arm.c:4821
+msgid "invalid floating point immediate expression"
msgstr ""
-#: config/tc-arm.c:4029
-msgid "Floating point register or immediate expression expected"
+#: config/tc-arm.c:4825
+msgid "floating point register or immediate expression expected"
msgstr ""
-#: config/tc-arm.c:4198
+#: config/tc-arm.c:4979 config/tc-arm.c:5309
msgid "address offset too large"
msgstr ""
-#: config/tc-arm.c:4275
-msgid "Processor does not support halfwords or signed bytes"
-msgstr ""
-
-#: config/tc-arm.c:4296
-msgid "Address expected"
+#: config/tc-arm.c:5037 config/tc-arm.c:5227 config/tc-arm.c:5369
+msgid "address expected"
msgstr ""
-#: config/tc-arm.c:4326 config/tc-arm.c:4341 config/tc-arm.c:4379
+#: config/tc-arm.c:5067 config/tc-arm.c:5079 config/tc-arm.c:5116
+#: config/tc-arm.c:5245 config/tc-arm.c:5399 config/tc-arm.c:5413
+#: config/tc-arm.c:5450
#, c-format
msgid "%s register same as write-back base"
msgstr ""
-#: config/tc-arm.c:4328 config/tc-arm.c:4343 config/tc-arm.c:4381
+#: config/tc-arm.c:5069 config/tc-arm.c:5081 config/tc-arm.c:5118
+#: config/tc-arm.c:5247 config/tc-arm.c:5401 config/tc-arm.c:5415
+#: config/tc-arm.c:5452
msgid "destination"
msgstr ""
-#: config/tc-arm.c:4328 config/tc-arm.c:4343 config/tc-arm.c:4381
+#: config/tc-arm.c:5069 config/tc-arm.c:5081 config/tc-arm.c:5118
+#: config/tc-arm.c:5247 config/tc-arm.c:5401 config/tc-arm.c:5415
+#: config/tc-arm.c:5452
msgid "source"
msgstr ""
-#: config/tc-arm.c:4420
+#: config/tc-arm.c:5128 config/tc-arm.c:5462 config/tc-arm.c:7699
+msgid "invalid pseudo operation"
+msgstr ""
+
+#: config/tc-arm.c:5180 config/tc-arm.c:5513
msgid "literal pool insertion failed"
msgstr ""
-#: config/tc-arm.c:4459
-msgid "Pre-increment instruction with translate"
+#: config/tc-arm.c:5275 config/tc-arm.c:5281
+msgid "post-indexed expression expected"
msgstr ""
-#: config/tc-arm.c:4500
-msgid "Bad range in register list"
+#: config/tc-arm.c:5579
+msgid "bad range in register list"
msgstr ""
-#: config/tc-arm.c:4508 config/tc-arm.c:4517 config/tc-arm.c:4559
+#: config/tc-arm.c:5587 config/tc-arm.c:5596 config/tc-arm.c:5638
#, c-format
-msgid "Warning: Duplicated register (r%d) in register list"
+msgid "Warning: duplicated register (r%d) in register list"
msgstr ""
-#: config/tc-arm.c:4520
-msgid "Warning: Register range not in ascending order"
+#: config/tc-arm.c:5599
+msgid "Warning: register range not in ascending order"
msgstr ""
-#: config/tc-arm.c:4532
-msgid "Missing `}'"
+#: config/tc-arm.c:5611
+msgid "missing `}'"
msgstr ""
-#: config/tc-arm.c:4548
+#: config/tc-arm.c:5627
msgid "invalid register mask"
msgstr ""
-#: config/tc-arm.c:4569 config/tc-avr.c:852 config/tc-cris.c:2733
-#: config/tc-d10v.c:1560 config/tc-d30v.c:1865 config/tc-mips.c:3230
-#: config/tc-mips.c:4162 config/tc-mips.c:4947 config/tc-mips.c:5493
-#: config/tc-ppc.c:4854 config/tc-v850.c:2385
+#: config/tc-arm.c:5648 config/tc-arm.c:8709 config/tc-arm.c:8809
+#: config/tc-avr.c:860 config/tc-cris.c:3006 config/tc-d10v.c:1563
+#: config/tc-d30v.c:1863 config/tc-mips.c:3641 config/tc-mips.c:4630
+#: config/tc-mips.c:5486 config/tc-mips.c:6091 config/tc-ppc.c:5143
+#: config/tc-v850.c:2376
msgid "expression too complex"
msgstr ""
-#: config/tc-arm.c:4608
+#: config/tc-arm.c:5686
msgid "r15 not allowed as base register"
msgstr ""
-#: config/tc-arm.c:4676 config/tc-arm.c:4690
+#: config/tc-arm.c:5750 config/tc-arm.c:5764
msgid "r15 not allowed in swap"
msgstr ""
-#: config/tc-arm.c:4788
-msgid "Use of r15 in bx in ARM mode is not really useful"
+#: config/tc-arm.c:5859
+msgid "use of r15 in bx in ARM mode is not really useful"
msgstr ""
-#: config/tc-arm.c:5044 config/tc-v850.c:1959 config/tc-v850.c:1980
-msgid "constant expression expected"
+#: config/tc-arm.c:6093
+msgid "constant value required for number of registers"
msgstr ""
-#: config/tc-arm.c:5050
-msgid "Constant value required for number of registers"
+#: config/tc-arm.c:6101
+msgid "number of registers must be in the range [1:4]"
msgstr ""
-#: config/tc-arm.c:5058
-msgid "number of registers must be in the range [1:4]"
+#: config/tc-arm.c:6162
+msgid "r15 not allowed as base register with write-back"
+msgstr ""
+
+#: config/tc-arm.c:6544
+msgid "only two consecutive VFP SP registers allowed here"
+msgstr ""
+
+#: config/tc-arm.c:6712
+msgid "VFP system register expected"
+msgstr ""
+
+#: config/tc-arm.c:6850 config/tc-arm.c:6889 config/tc-arm.c:6902
+#: config/tc-arm.c:6963 config/tc-arm.c:7002 config/tc-arm.c:7015
+#: config/tc-mips.c:9060 config/tc-mips.c:9090
+msgid "invalid register list"
+msgstr ""
+
+#: config/tc-arm.c:6856 config/tc-arm.c:6969
+msgid "register list not in ascending order"
msgstr ""
-#: config/tc-arm.c:5119
-msgid "R15 not allowed as base register with write-back"
+#: config/tc-arm.c:6881 config/tc-arm.c:6994
+msgid "register range not in ascending order"
msgstr ""
-#: config/tc-arm.c:5367
+#: config/tc-arm.c:6919 config/tc-arm.c:7032
+msgid "non-contiguous register range"
+msgstr ""
+
+#: config/tc-arm.c:7062 config/tc-arm.c:7099
+msgid "this addressing mode requires base-register writeback"
+msgstr ""
+
+#: config/tc-arm.c:7259
msgid "lo register required"
msgstr ""
-#: config/tc-arm.c:5375
+#: config/tc-arm.c:7267
msgid "hi register required"
msgstr ""
-#: config/tc-arm.c:5445
+#: config/tc-arm.c:7337 config/tc-arm.c:8541
msgid "dest and source1 must be the same register"
msgstr ""
-#: config/tc-arm.c:5452
+#: config/tc-arm.c:7344
msgid "subtract valid only on lo regs"
msgstr ""
-#: config/tc-arm.c:5476
+#: config/tc-arm.c:7368
msgid "invalid Hi register with immediate"
msgstr ""
-#: config/tc-arm.c:5514
+#: config/tc-arm.c:7406
msgid "invalid immediate value for stack adjust"
msgstr ""
-#: config/tc-arm.c:5525
+#: config/tc-arm.c:7417
msgid "invalid immediate for address calculation"
msgstr ""
-#: config/tc-arm.c:5612
+#: config/tc-arm.c:7504
msgid "source1 and dest must be same register"
msgstr ""
-#: config/tc-arm.c:5646
-msgid "Invalid immediate for shift"
+#: config/tc-arm.c:7538
+msgid "invalid immediate for shift"
msgstr ""
-#: config/tc-arm.c:5725
+#: config/tc-arm.c:7617
msgid "only lo regs allowed with immediate"
msgstr ""
-#: config/tc-arm.c:5744
+#: config/tc-arm.c:7636
msgid "invalid immediate"
msgstr ""
-#: config/tc-arm.c:5798
+#: config/tc-arm.c:7690
msgid "expected ']'"
msgstr ""
-#: config/tc-arm.c:5865
+#: config/tc-arm.c:7763
msgid "byte or halfword not valid for base register"
msgstr ""
-#: config/tc-arm.c:5870
-msgid "R15 based store not allowed"
+#: config/tc-arm.c:7768
+msgid "r15 based store not allowed"
msgstr ""
-#: config/tc-arm.c:5875
-msgid "Invalid base register for register offset"
+#: config/tc-arm.c:7773
+msgid "invalid base register for register offset"
msgstr ""
-#: config/tc-arm.c:5893
+#: config/tc-arm.c:7791 config/tc-arm.c:7826
msgid "invalid offset"
msgstr ""
-#: config/tc-arm.c:5904
+#: config/tc-arm.c:7802
msgid "invalid base register in load/store"
msgstr ""
-#: config/tc-arm.c:5928
-msgid "Invalid offset"
+#: config/tc-arm.c:8345
+msgid "expecting immediate, 7bit operand"
msgstr ""
-#: config/tc-arm.c:6003
-msgid "dest and source1 one must be the same register"
+#: config/tc-arm.c:8360
+msgid "immediate out of range"
msgstr ""
-#: config/tc-arm.c:6011
-msgid "Rs and Rd must be different in MUL"
+#: config/tc-arm.c:8403
+msgid "offset expected"
msgstr ""
-#: config/tc-arm.c:6155
-msgid ""
-"Inserted missing '!': load/store multiple always writes back base register"
+#: config/tc-arm.c:8412 config/tc-pj.c:528 config/tc-sh.c:3030
+msgid "offset out of range"
msgstr ""
-#: config/tc-arm.c:6171 config/tc-arm.c:6271
-msgid "Expression too complex"
+#: config/tc-arm.c:8549
+msgid "Rs and Rd must be different in MUL"
msgstr ""
-#: config/tc-arm.c:6177
-msgid "only lo-regs valid in load/store multiple"
+#: config/tc-arm.c:8693
+msgid ""
+"inserted missing '!': load/store multiple always writes back base register"
msgstr ""
-#: config/tc-arm.c:6223
-msgid "Syntax: ldrs[b] Rd, [Rb, Ro]"
+#: config/tc-arm.c:8715
+msgid "only lo-regs valid in load/store multiple"
msgstr ""
-#: config/tc-arm.c:6287
-msgid "invalid register list to push/pop instruction"
+#: config/tc-arm.c:8761
+msgid "syntax: ldrs[b] Rd, [Rb, Ro]"
msgstr ""
-#: config/tc-arm.c:6429 config/tc-cris.c:664
-msgid "Virtual memory exhausted"
+#: config/tc-arm.c:8825
+msgid "invalid register list to push/pop instruction"
msgstr ""
-#: config/tc-arm.c:6835
-#, c-format
-msgid "invalid constant (%lx) after fixup"
+#: config/tc-arm.c:8937 config/tc-arm.c:9115
+msgid "virtual memory exhausted"
msgstr ""
-#: config/tc-arm.c:6871
+#: config/tc-arm.c:9018
#, c-format
-msgid "Unable to compute ADRL instructions for PC offset of 0x%lx"
+msgid "register '%s' does not exist\n"
msgstr ""
-#: config/tc-arm.c:6901
+#: config/tc-arm.c:9022
#, c-format
-msgid "bad immediate value for offset (%ld)"
-msgstr ""
-
-#: config/tc-arm.c:6923 config/tc-arm.c:6945
-msgid "invalid literal constant: pool needs to be closer"
+msgid ""
+"ignoring redefinition of register alias '%s' to non-existant register '%s'"
msgstr ""
-#: config/tc-arm.c:6925
+#: config/tc-arm.c:9031
#, c-format
-msgid "bad immediate value for half-word offset (%ld)"
+msgid "ignoring redefinition of register alias '%s'"
msgstr ""
-#: config/tc-arm.c:6962
-msgid "shift expression is too large"
+#: config/tc-arm.c:9037
+msgid "ignoring incomplete .req pseuso op"
msgstr ""
-#: config/tc-arm.c:6981 config/tc-arm.c:6990
-msgid "Invalid swi expression"
+#: config/tc-arm.c:9312
+msgid "bad call to MD_ATOF()"
msgstr ""
-#: config/tc-arm.c:7000
-msgid "Invalid expression in load/store multiple"
+#: config/tc-arm.c:9542
+#, c-format
+msgid "invalid constant (%lx) after fixup"
msgstr ""
-#: config/tc-arm.c:7053
-msgid "gas can't handle same-section branch dest >= 0x04000000"
+#: config/tc-arm.c:9578
+#, c-format
+msgid "unable to compute ADRL instructions for PC offset of 0x%lx"
msgstr ""
-#: config/tc-arm.c:7062
-msgid "out of range branch"
+#: config/tc-arm.c:9608
+#, c-format
+msgid "bad immediate value for offset (%ld)"
msgstr ""
-#: config/tc-arm.c:7095 config/tc-arm.c:7111 config/tc-mips.c:9743
-msgid "Branch out of range"
+#: config/tc-arm.c:9630 config/tc-arm.c:9652
+msgid "invalid literal constant: pool needs to be closer"
msgstr ""
-#: config/tc-arm.c:7134
-msgid "Branch with link out of range"
+#: config/tc-arm.c:9632
+#, c-format
+msgid "bad immediate value for half-word offset (%ld)"
msgstr ""
-#: config/tc-arm.c:7201
-msgid "Illegal value for co-processor offset"
+#: config/tc-arm.c:9669
+msgid "shift expression is too large"
msgstr ""
-#: config/tc-arm.c:7225
-#, c-format
-msgid "Invalid offset, target not word aligned (0x%08X)"
+#: config/tc-arm.c:9688 config/tc-arm.c:9697
+msgid "invalid swi expression"
msgstr ""
-#: config/tc-arm.c:7231 config/tc-arm.c:7240 config/tc-arm.c:7247
-#: config/tc-arm.c:7254 config/tc-arm.c:7261
-#, c-format
-msgid "Invalid offset, value too big (0x%08lX)"
+#: config/tc-arm.c:9707
+msgid "invalid expression in load/store multiple"
msgstr ""
-#: config/tc-arm.c:7300
-msgid "Invalid immediate for stack address calculation"
+#: config/tc-arm.c:9760
+msgid "GAS can't handle same-section branch dest >= 0x04000000"
msgstr ""
-#: config/tc-arm.c:7309
-#, c-format
-msgid "Invalid immediate for address calculation (value = 0x%08lX)"
+#: config/tc-arm.c:9769
+msgid "out of range branch"
msgstr ""
-#: config/tc-arm.c:7319
-msgid "Invalid 8bit immediate"
+#: config/tc-arm.c:9802 config/tc-arm.c:9818
+msgid "branch out of range"
msgstr ""
-#: config/tc-arm.c:7327
-msgid "Invalid 3bit immediate"
+#: config/tc-arm.c:9841
+msgid "branch with link out of range"
msgstr ""
-#: config/tc-arm.c:7343
-#, c-format
-msgid "Invalid immediate: %ld is too large"
+#: config/tc-arm.c:9917
+msgid "illegal value for co-processor offset"
msgstr ""
-#: config/tc-arm.c:7358
+#: config/tc-arm.c:9941
#, c-format
-msgid "Illegal Thumb shift value: %ld"
+msgid "invalid offset, target not word aligned (0x%08X)"
msgstr ""
-#: config/tc-arm.c:7372 config/tc-mn10300.c:1961
+#: config/tc-arm.c:9947 config/tc-arm.c:9956 config/tc-arm.c:9963
+#: config/tc-arm.c:9970 config/tc-arm.c:9977
#, c-format
-msgid "Bad relocation fixup type (%d)"
+msgid "invalid offset, value too big (0x%08lX)"
msgstr ""
-#: config/tc-arm.c:7445
-msgid "Literal referenced across section boundary (Implicit dump?)"
+#: config/tc-arm.c:10016
+msgid "invalid immediate for stack address calculation"
msgstr ""
-#: config/tc-arm.c:7458
+#: config/tc-arm.c:10025
#, c-format
-msgid "Internal_relocation (type %d) not fixed up (IMMEDIATE)"
+msgid "invalid immediate for address calculation (value = 0x%08lX)"
msgstr ""
-#: config/tc-arm.c:7464
-msgid "ADRL used for a symbol not defined in the same file"
+#: config/tc-arm.c:10035
+msgid "invalid 8bit immediate"
msgstr ""
-#: config/tc-arm.c:7469
-#, c-format
-msgid "Internal_relocation (type %d) not fixed up (OFFSET_IMM)"
+#: config/tc-arm.c:10043
+msgid "invalid 3bit immediate"
msgstr ""
-#: config/tc-arm.c:7490 config/tc-cris.c:2672 config/tc-mcore.c:2109
-#: config/tc-ns32k.c:2369
-msgid "<unknown>"
-msgstr ""
-
-#: config/tc-arm.c:7493
+#: config/tc-arm.c:10059
#, c-format
-msgid "Cannot represent %s relocation in this object file format"
+msgid "invalid immediate: %ld is too large"
msgstr ""
-#: config/tc-arm.c:7514 config/tc-mips.c:11261 config/tc-sh.c:3177
+#: config/tc-arm.c:10074
#, c-format
-msgid "Can not represent %s relocation in this object file format"
+msgid "illegal Thumb shift value: %ld"
msgstr ""
-#: config/tc-arm.c:7611
+#: config/tc-arm.c:10088
#, c-format
-msgid "No operator -- statement `%s'\n"
+msgid "bad relocation fixup type (%d)"
msgstr ""
-#: config/tc-arm.c:7629
-msgid "selected processor does not support this opcode"
+#: config/tc-arm.c:10159
+msgid "literal referenced across section boundary (Implicit dump?)"
msgstr ""
-#: config/tc-arm.c:7675
+#: config/tc-arm.c:10172
#, c-format
-msgid "Opcode `%s' must have suffix from list: <%s>"
+msgid "internal relocation (type %d) not fixed up (IMMEDIATE)"
msgstr ""
-#: config/tc-arm.c:7706
-msgid "Warning: Use of the 'nv' conditional is deprecated\n"
+#: config/tc-arm.c:10178
+msgid "ADRL used for a symbol not defined in the same file"
msgstr ""
-#: config/tc-arm.c:7723
+#: config/tc-arm.c:10183
#, c-format
-msgid "Opcode `%s' is unconditional\n"
+msgid "internal_relocation (type %d) not fixed up (OFFSET_IMM)"
msgstr ""
-#: config/tc-arm.c:7747
-#, c-format
-msgid "Opcode `%s' must have suffix from <%s>\n"
+#: config/tc-arm.c:10204 config/tc-cris.c:2940 config/tc-mcore.c:2104
+#: config/tc-mmix.c:2840 config/tc-ns32k.c:2350
+msgid "<unknown>"
msgstr ""
-#: config/tc-arm.c:7838
+#: config/tc-arm.c:10207 config/tc-arm.c:10228
#, c-format
-msgid "register '%s' does not exist\n"
+msgid "cannot represent %s relocation in this object file format"
msgstr ""
-#: config/tc-arm.c:7843
+#: config/tc-arm.c:10325
#, c-format
-msgid "ignoring redefinition of register alias '%s'"
+msgid "no operator -- statement `%s'\n"
msgstr ""
-#: config/tc-arm.c:7849
+#: config/tc-arm.c:10343 config/tc-arm.c:10368
#, c-format
-msgid ""
-"ignoring redefinition of register alias '%s' to non-existant register '%s'"
-msgstr ""
-
-#: config/tc-arm.c:7853
-msgid "ignoring incomplete .req pseuso op"
+msgid "selected processor does not support `%s'"
msgstr ""
-#: config/tc-arm.c:7860
+#: config/tc-arm.c:10385
#, c-format
msgid "bad instruction `%s'"
msgstr ""
-#: config/tc-arm.c:8035
+#: config/tc-arm.c:10583
#, c-format
-msgid "Unrecognised APCS switch -m%s"
+msgid "unrecognised APCS switch -m%s"
msgstr ""
-#: config/tc-arm.c:8192 config/tc-arm.c:8205 config/tc-arm.c:8218
-#: config/tc-arm.c:8231 config/tc-arm.c:8237
+#: config/tc-arm.c:10738 config/tc-arm.c:10751 config/tc-arm.c:10764
+#: config/tc-arm.c:10777 config/tc-arm.c:10783
#, c-format
-msgid "Invalid architecture variant -m%s"
+msgid "invalid architecture variant -m%s"
msgstr ""
-#: config/tc-arm.c:8244
+#: config/tc-arm.c:10790
#, c-format
-msgid "Invalid processor variant -m%s"
+msgid "invalid processor variant -m%s"
msgstr ""
-#: config/tc-arm.c:8267
+#: config/tc-arm.c:10813
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"
+" -marm9e allow Cirrus/DSP instructions\n"
" -mthumb only allow Thumb instructions\n"
" -mthumb-interwork mark the assembled code as supporting "
"interworking\n"
@@ -2033,11 +2167,13 @@ msgid ""
" -mfpa10, -mfpa11 select floating point architecture\n"
" -mfpe-old don't allow floating-point multiple "
"instructions\n"
+" -mvfpxd allow vfp single-precision instructions\n"
+" -mvfp allow all vfp instructions\n"
" -mno-fpu don't allow any floating-point instructions.\n"
" -k generate PIC code.\n"
msgstr ""
-#: config/tc-arm.c:8279
+#: config/tc-arm.c:10828
msgid ""
" -mapcs-32, -mapcs-26 specify which ARM Procedure Calling Standard to "
"use\n"
@@ -2046,30 +2182,34 @@ msgid ""
" -mapcs-reentrant the code is position independent/reentrant\n"
msgstr ""
-#: config/tc-arm.c:8286
+#: config/tc-arm.c:10835
msgid " -moabi support the old ELF ABI\n"
msgstr ""
-#: config/tc-arm.c:8290
+#: config/tc-arm.c:10839
msgid ""
" -EB assemble code for a big endian cpu\n"
" -EL assemble code for a little endian cpu\n"
msgstr ""
-#: config/tc-arm.c:8443
+#: config/tc-arm.c:11023
#, c-format
msgid "%s: unexpected function type: %d"
msgstr ""
+#: config/tc-arm.c:11389
+msgid "alignments greater than 32 bytes not supported in .text sections."
+msgstr ""
+
#: config/tc-arm.h:98
msgid "arm convert_frag\n"
msgstr ""
-#: config/tc-avr.c:185
+#: config/tc-avr.c:197
msgid "Known MCU names:"
msgstr ""
-#: config/tc-avr.c:254
+#: config/tc-avr.c:266
msgid ""
"AVR options:\n"
" -mmcu=[avr-name] select microcontroller variant\n"
@@ -2082,7 +2222,7 @@ msgid ""
" or immediate microcontroller name.\n"
msgstr ""
-#: config/tc-avr.c:264
+#: config/tc-avr.c:276
msgid ""
" -mall-opcodes accept all AVR opcodes, even if not supported by MCU\n"
" -mno-skip-bug disable warnings for skipping two-word instructions\n"
@@ -2091,320 +2231,359 @@ msgid ""
" (default for avr3, avr5)\n"
msgstr ""
-#: config/tc-avr.c:312
+#: config/tc-avr.c:324
#, c-format
msgid "unknown MCU: %s\n"
msgstr ""
-#: config/tc-avr.c:321
+#: config/tc-avr.c:333
#, c-format
msgid "redefinition of mcu type `%s' to `%s'"
msgstr ""
-#: config/tc-avr.c:372 config/tc-d10v.c:313 config/tc-d30v.c:366
-#: config/tc-mips.c:8789 config/tc-mn10200.c:375 config/tc-pj.c:356
-#: config/tc-ppc.c:4518 config/tc-sh.c:2058 config/tc-v850.c:1291
+#: config/tc-avr.c:384 config/tc-d10v.c:314 config/tc-d30v.c:366
+#: config/tc-mips.c:9586 config/tc-mmix.c:2233 config/tc-mn10200.c:361
+#: config/tc-pj.c:357 config/tc-ppc.c:4803 config/tc-sh.c:2090
+#: config/tc-v850.c:1292
msgid "bad call to md_atof"
msgstr ""
-#: config/tc-avr.c:435
+#: config/tc-avr.c:447
msgid "constant value required"
msgstr ""
-#: config/tc-avr.c:438
+#: config/tc-avr.c:450
#, c-format
msgid "number must be less than %d"
msgstr ""
-#: config/tc-avr.c:490
+#: config/tc-avr.c:502
msgid "`,' required"
msgstr ""
-#: config/tc-avr.c:509
+#: config/tc-avr.c:521
msgid "undefined combination of operands"
msgstr ""
-#: config/tc-avr.c:518
+#: config/tc-avr.c:530
msgid "skipping two-word instruction"
msgstr ""
-#: config/tc-avr.c:580
+#: config/tc-avr.c:592
msgid "register r16-r23 required"
msgstr ""
-#: config/tc-avr.c:586
+#: config/tc-avr.c:598
msgid "register number above 15 required"
msgstr ""
-#: config/tc-avr.c:592
+#: config/tc-avr.c:604
msgid "even register number required"
msgstr ""
-#: config/tc-avr.c:598
+#: config/tc-avr.c:610
msgid "register r24, r26, r28 or r30 required"
msgstr ""
-#: config/tc-avr.c:604
+#: config/tc-avr.c:616
msgid "register name or number from 0 to 31 required"
msgstr ""
-#: config/tc-avr.c:622
+#: config/tc-avr.c:634
msgid "pointer register (X, Y or Z) required"
msgstr ""
-#: config/tc-avr.c:629
+#: config/tc-avr.c:641
msgid "cannot both predecrement and postincrement"
msgstr ""
-#: config/tc-avr.c:637
+#: config/tc-avr.c:649
msgid "addressing mode not supported"
msgstr ""
-#: config/tc-avr.c:643
+#: config/tc-avr.c:655
msgid "can't predecrement"
msgstr ""
-#: config/tc-avr.c:646
+#: config/tc-avr.c:658
msgid "pointer register Z required"
msgstr ""
-#: config/tc-avr.c:664
+#: config/tc-avr.c:676
msgid "pointer register (Y or Z) required"
msgstr ""
-#: config/tc-avr.c:769
+#: config/tc-avr.c:781
#, c-format
msgid "unknown constraint `%c'"
msgstr ""
-#: config/tc-avr.c:882 config/tc-avr.c:898 config/tc-avr.c:999
+#: config/tc-avr.c:890 config/tc-avr.c:906 config/tc-avr.c:1007
#, c-format
msgid "odd address operand: %ld"
msgstr ""
-#: config/tc-avr.c:890 config/tc-avr.c:909
+#: config/tc-avr.c:898 config/tc-avr.c:917
#, c-format
msgid "operand out of range: %ld"
msgstr ""
-#: config/tc-avr.c:1008 config/tc-d10v.c:1631 config/tc-d30v.c:1990
+#: config/tc-avr.c:1016 config/tc-d10v.c:1634 config/tc-d30v.c:1987
#, c-format
msgid "line %d: unknown relocation type: 0x%x"
msgstr ""
-#: config/tc-avr.c:1022
+#: config/tc-avr.c:1030
msgid "only constant expression allowed"
msgstr ""
-#: config/tc-avr.c:1060 config/tc-d10v.c:1495 config/tc-d30v.c:1807
-#: config/tc-mn10200.c:1254 config/tc-mn10300.c:1810 config/tc-ppc.c:5161
-#: config/tc-v850.c:2301
+#: config/tc-avr.c:1067 config/tc-d10v.c:1498 config/tc-d30v.c:1807
+#: config/tc-mn10200.c:1240 config/tc-mn10300.c:1774 config/tc-ppc.c:5534
+#: config/tc-v850.c:2296
#, c-format
msgid "reloc %d not supported by object file format"
msgstr ""
-#: config/tc-avr.c:1084 config/tc-d10v.c:1102 config/tc-d10v.c:1116
-#: config/tc-h8300.c:1239 config/tc-h8500.c:1098 config/tc-mcore.c:988
-#: config/tc-pj.c:265 config/tc-sh.c:1640 config/tc-z8k.c:1195
+#: config/tc-avr.c:1091 config/tc-d10v.c:1100 config/tc-d10v.c:1114
+#: config/tc-h8300.c:1275 config/tc-h8500.c:1088 config/tc-mcore.c:988
+#: config/tc-pj.c:266 config/tc-sh.c:1670 config/tc-z8k.c:1192
msgid "can't find opcode "
msgstr ""
-#: config/tc-avr.c:1101
+#: config/tc-avr.c:1108
#, c-format
msgid "illegal opcode %s for mcu %s"
msgstr ""
-#: config/tc-avr.c:1109
+#: config/tc-avr.c:1116
msgid "garbage at end of line"
msgstr ""
-#: config/tc-avr.c:1173
+#: config/tc-avr.c:1180 read.c:3219
msgid "illegal expression"
msgstr ""
-#: config/tc-avr.c:1199 config/tc-avr.c:1265
+#: config/tc-avr.c:1206 config/tc-avr.c:1272
msgid "`)' required"
msgstr ""
-#: config/tc-avr.c:1219
+#: config/tc-avr.c:1226
#, c-format
msgid "constant out of 8-bit range: %d"
msgstr ""
-#: config/tc-avr.c:1222
+#: config/tc-avr.c:1229
msgid "expression possibly out of 8-bit range"
msgstr ""
-#: config/tc-avr.c:1293 config/tc-avr.c:1300
+#: config/tc-avr.c:1300 config/tc-avr.c:1307
#, c-format
msgid "illegal %srelocation size: %d"
msgstr ""
-#: config/tc-cris.c:672
+#: config/tc-cris.c:681
+msgid "Virtual memory exhausted"
+msgstr ""
+
+#: config/tc-cris.c:689
#, c-format
msgid "Can't hash `%s': %s\n"
msgstr ""
-#: config/tc-cris.c:673
+#: config/tc-cris.c:690
msgid "(unknown reason)"
msgstr ""
-#: config/tc-cris.c:677
+#: config/tc-cris.c:694
#, c-format
msgid "Buggy opcode: `%s' \"%s\"\n"
msgstr ""
-#: config/tc-cris.c:1002
+#: config/tc-cris.c:1039
#, c-format
msgid "Immediate value not in 5 bit unsigned range: %ld"
msgstr ""
-#: config/tc-cris.c:1018
+#: config/tc-cris.c:1055
#, c-format
msgid "Immediate value not in 4 bit unsigned range: %ld"
msgstr ""
-#: config/tc-cris.c:1057
+#: config/tc-cris.c:1094
#, c-format
msgid "Immediate value not in 6 bit range: %ld"
msgstr ""
-#: config/tc-cris.c:1072
+#: config/tc-cris.c:1109
#, c-format
msgid "Immediate value not in 6 bit unsigned range: %ld"
msgstr ""
#. Others have a generic warning.
-#: config/tc-cris.c:1159
+#: config/tc-cris.c:1199
#, c-format
msgid "Unimplemented register `%s' specified"
msgstr ""
#. We've come to the end of instructions with this
#. opcode, so it must be an error.
-#: config/tc-cris.c:1309
+#: config/tc-cris.c:1358
msgid "Illegal operands"
msgstr ""
-#: config/tc-cris.c:1341 config/tc-cris.c:1372
+#: config/tc-cris.c:1389 config/tc-cris.c:1420
#, c-format
msgid "Immediate value not in 8 bit range: %ld"
msgstr ""
-#: config/tc-cris.c:1351 config/tc-cris.c:1379
+#: config/tc-cris.c:1399 config/tc-cris.c:1427
#, c-format
msgid "Immediate value not in 16 bit range: %ld"
msgstr ""
-#. FIXME: Find out and change to as_warn_where. Add testcase.
-#: config/tc-cris.c:2316
+#: config/tc-cris.c:1448
+msgid "PIC relocation size does not match operand size"
+msgstr ""
+
+#: config/tc-cris.c:2447
msgid "32-bit conditional branch generated"
msgstr ""
+#: config/tc-cris.c:2501
+msgid "Complex expression not supported"
+msgstr ""
+
#. FIXME: Is this function mentioned in the internals.texi manual? If
#. not, add it.
-#: config/tc-cris.c:2395
+#: config/tc-cris.c:2622
msgid "Bad call to md_atof () - floating point formats are not supported"
msgstr ""
-#: config/tc-cris.c:2456
+#: config/tc-cris.c:2669
+msgid "PC-relative relocation must be trivially resolved"
+msgstr ""
+
+#: config/tc-cris.c:2712
#, c-format
msgid "Value not in 16 bit range: %ld"
msgstr ""
-#: config/tc-cris.c:2466
+#: config/tc-cris.c:2723
#, c-format
msgid "Value not in 8 bit range: %ld"
msgstr ""
-#: config/tc-cris.c:2473
+#: config/tc-cris.c:2730
#, c-format
msgid "Value not in 4 bit unsigned range: %ld"
msgstr ""
-#: config/tc-cris.c:2480
+#: config/tc-cris.c:2737
#, c-format
msgid "Value not in 5 bit unsigned range: %ld"
msgstr ""
-#: config/tc-cris.c:2487
+#: config/tc-cris.c:2744
#, c-format
msgid "Value not in 6 bit range: %ld"
msgstr ""
-#: config/tc-cris.c:2494
+#: config/tc-cris.c:2751
#, c-format
msgid "Value not in 6 bit unsigned range: %ld"
msgstr ""
-#: config/tc-cris.c:2542
+#: config/tc-cris.c:2799
msgid "Please use --help to see usage and options for this assembler.\n"
msgstr ""
-#: config/tc-cris.c:2554
+#: config/tc-cris.c:2811
msgid "--no-underscore is invalid with a.out format"
msgstr ""
-#: config/tc-cris.c:2619
+#: config/tc-cris.c:2887
msgid ""
"Semantics error. This type of operand can not be relocated, it must be an "
"assembly-time constant"
msgstr ""
-#: config/tc-cris.c:2673
+#: config/tc-cris.c:2941
#, c-format
msgid "Cannot generate relocation type for symbol %s, code %s"
msgstr ""
-#: config/tc-cris.c:2686
+#. The messages are formatted to line up with the generic options.
+#: config/tc-cris.c:2955
msgid "CRIS-specific options:\n"
msgstr ""
-#: config/tc-cris.c:2688
+#: config/tc-cris.c:2957
msgid ""
" -h, -H Don't execute, print this help text. Deprecated.\n"
msgstr ""
-#: config/tc-cris.c:2690
+#: config/tc-cris.c:2959
msgid " -N Warn when branches are expanded to jumps.\n"
msgstr ""
-#: config/tc-cris.c:2692
+#: config/tc-cris.c:2961
msgid ""
" --underscore User symbols are normally prepended with "
"underscore.\n"
msgstr ""
-#: config/tc-cris.c:2694
+#: config/tc-cris.c:2963
msgid " Registers will not need any prefix.\n"
msgstr ""
-#: config/tc-cris.c:2696
+#: config/tc-cris.c:2965
msgid " --no-underscore User symbols do not have any prefix.\n"
msgstr ""
-#: config/tc-cris.c:2698
+#: config/tc-cris.c:2967
msgid " Registers will require a `$'-prefix.\n"
msgstr ""
-#: config/tc-cris.c:2718
+#: config/tc-cris.c:2969
+msgid " --pic\t\t\tEnable generation of position-independent code.\n"
+msgstr ""
+
+#: config/tc-cris.c:2992
msgid "Invalid relocation"
msgstr ""
-#: config/tc-cris.c:2758
+#: config/tc-cris.c:3033
msgid "Invalid pc-relative relocation"
msgstr ""
-#: config/tc-cris.c:2796
+#: config/tc-cris.c:3084
#, c-format
msgid "Adjusted signed .word (%ld) overflows: `switch'-statement too large."
msgstr ""
-#: config/tc-cris.c:2870
+#: config/tc-cris.c:3111
+#, c-format
+msgid ".syntax %s requires command-line option `--underscore'"
+msgstr ""
+
+#: config/tc-cris.c:3120
+#, c-format
+msgid ".syntax %s requires command-line option `--no-underscore'"
+msgstr ""
+
+#: config/tc-cris.c:3158
msgid "Unknown .syntax operand"
msgstr ""
-#: config/tc-d10v.c:246
+#: config/tc-cris.c:3169
+msgid "Pseudodirective .file is only valid when generating ELF"
+msgstr ""
+
+#: config/tc-cris.c:3182
+msgid "Pseudodirective .loc is only valid when generating ELF"
+msgstr ""
+
+#: config/tc-d10v.c:247
msgid ""
"D10V options:\n"
"-O Optimize. Will do some operations in parallel.\n"
@@ -2414,26 +2593,26 @@ msgid ""
" instructions together.\n"
msgstr ""
-#: config/tc-d10v.c:530 config/tc-d30v.c:550 config/tc-mn10200.c:951
-#: config/tc-mn10300.c:1332 config/tc-ppc.c:1972 config/tc-tic80.c:278
-#: config/tc-v850.c:2073
+#: config/tc-d10v.c:538 config/tc-d30v.c:550 config/tc-mn10200.c:937
+#: config/tc-mn10300.c:1308 config/tc-ppc.c:2104 config/tc-s390.c:1052
+#: config/tc-tic80.c:279 config/tc-v850.c:2070
msgid "illegal operand"
msgstr ""
-#: config/tc-d10v.c:573 config/tc-d10v.c:655 config/tc-d30v.c:656
+#: config/tc-d10v.c:581 config/tc-d10v.c:663 config/tc-d30v.c:656
#, c-format
msgid "operand out of range: %d"
msgstr ""
-#: config/tc-d10v.c:716
+#: config/tc-d10v.c:724
msgid "Instruction must be executed in parallel with another instruction."
msgstr ""
-#: config/tc-d10v.c:772
+#: config/tc-d10v.c:780
msgid "Instruction must be executed in parallel"
msgstr ""
-#: config/tc-d10v.c:775
+#: config/tc-d10v.c:783
msgid "Long instructions may not be combined."
msgstr ""
@@ -2445,8 +2624,8 @@ msgstr ""
msgid "Two IU instructions may not be executed in parallel"
msgstr ""
-#: config/tc-d10v.c:823 config/tc-d10v.c:831 config/tc-d10v.c:848
-#: config/tc-d10v.c:865 config/tc-d30v.c:878 config/tc-d30v.c:887
+#: config/tc-d10v.c:823 config/tc-d10v.c:831 config/tc-d10v.c:844
+#: config/tc-d10v.c:859 config/tc-d30v.c:878 config/tc-d30v.c:887
msgid "Swapping instruction order"
msgstr ""
@@ -2454,38 +2633,38 @@ msgstr ""
msgid "Two MU instructions may not be executed in parallel"
msgstr ""
-#: config/tc-d10v.c:852 config/tc-d30v.c:904
+#: config/tc-d10v.c:848 config/tc-d30v.c:904
msgid "IU instruction may not be in the left container"
msgstr ""
-#: config/tc-d10v.c:854 config/tc-d10v.c:871
+#: config/tc-d10v.c:850 config/tc-d10v.c:865
msgid ""
"Instruction in R container is squashed by flow control instruction in L "
"container."
msgstr ""
-#: config/tc-d10v.c:869 config/tc-d30v.c:915
+#: config/tc-d10v.c:863 config/tc-d30v.c:915
msgid "MU instruction may not be in the right container"
msgstr ""
-#: config/tc-d10v.c:877 config/tc-d30v.c:927
+#: config/tc-d10v.c:869 config/tc-d30v.c:927
msgid "unknown execution type passed to write_2_short()"
msgstr ""
-#: config/tc-d10v.c:1130 config/tc-d10v.c:1151 config/tc-d30v.c:1411
+#: config/tc-d10v.c:1128 config/tc-d10v.c:1149 config/tc-d30v.c:1411
msgid "Unable to mix instructions as specified"
msgstr ""
-#: config/tc-d10v.c:1198 config/tc-d30v.c:1548
+#: config/tc-d10v.c:1196 config/tc-d30v.c:1548
#, c-format
msgid "unknown opcode: %s"
msgstr ""
-#: config/tc-d10v.c:1280 config/tc-d10v.c:1451 config/tc-tic80.c:535
+#: config/tc-d10v.c:1279 config/tc-d10v.c:1451 config/tc-tic80.c:536
msgid "bad opcode or operands"
msgstr ""
-#: config/tc-d10v.c:1353 config/tc-m68k.c:4286
+#: config/tc-d10v.c:1352 config/tc-m68k.c:4310
msgid "value out of range"
msgstr ""
@@ -2493,11 +2672,15 @@ msgstr ""
msgid "illegal operand - register name found where none expected"
msgstr ""
-#: config/tc-d10v.c:1462 config/tc-tic80.c:546
+#: config/tc-d10v.c:1462 config/tc-tic80.c:547
msgid "Register number must be EVEN"
msgstr ""
-#: config/tc-d10v.c:1611
+#: config/tc-d10v.c:1465
+msgid "Unsupported use of sp"
+msgstr ""
+
+#: config/tc-d10v.c:1614
#, c-format
msgid "line %d: rep or repi must include at least 4 instructions"
msgstr ""
@@ -2609,37 +2792,37 @@ msgstr ""
msgid "Odd numbered register used as target of multi-register instruction"
msgstr ""
-#: config/tc-d30v.c:1879
+#: config/tc-d30v.c:1876
#, c-format
msgid "line %d: unable to place address of symbol '%s' into a byte"
msgstr ""
-#: config/tc-d30v.c:1882
+#: config/tc-d30v.c:1879
#, c-format
msgid "line %d: unable to place value %x into a byte"
msgstr ""
-#: config/tc-d30v.c:1890
+#: config/tc-d30v.c:1887
#, c-format
msgid "line %d: unable to place address of symbol '%s' into a short"
msgstr ""
-#: config/tc-d30v.c:1893
+#: config/tc-d30v.c:1890
#, c-format
msgid "line %d: unable to place value %x into a short"
msgstr ""
-#: config/tc-d30v.c:1901
+#: config/tc-d30v.c:1898
#, c-format
msgid "line %d: unable to place address of symbol '%s' into a quad"
msgstr ""
-#: config/tc-d30v.c:2072
+#: config/tc-d30v.c:2067
#, c-format
msgid "value too large to fit in %d bits"
msgstr ""
-#: config/tc-d30v.c:2215
+#: config/tc-d30v.c:2210
#, c-format
msgid "Alignment too large: %d assumed"
msgstr ""
@@ -2648,933 +2831,956 @@ msgstr ""
msgid " FR30 specific command line options:\n"
msgstr ""
-#: config/tc-fr30.c:143
+#: config/tc-fr30.c:143 config/tc-openrisc.c:150
#, c-format
msgid "Instruction %s not allowed in a delay slot."
msgstr ""
-#: config/tc-fr30.c:380 config/tc-m32r.c:1555
+#: config/tc-fr30.c:383 config/tc-m32r.c:1559
msgid "Addend to unresolved symbol not on word boundary."
msgstr ""
-#: config/tc-fr30.c:538 config/tc-i960.c:772 config/tc-m32r.c:1864
+#: config/tc-fr30.c:540 config/tc-i960.c:773 config/tc-m32r.c:1867
+#: config/tc-openrisc.c:468
msgid "Bad call to md_atof()"
msgstr ""
-#: config/tc-h8300.c:245 config/tc-h8300.c:253
+#: config/tc-h8300.c:64 config/tc-h8300.c:75 config/tc-h8300.c:134
+#: config/tc-hppa.c:1422 config/tc-hppa.c:6915 config/tc-hppa.c:6921
+#: config/tc-hppa.c:6927 config/tc-hppa.c:6933 config/tc-mn10300.c:900
+#: config/tc-mn10300.c:2164
+msgid "could not set architecture and machine"
+msgstr ""
+
+#: config/tc-h8300.c:262 config/tc-h8300.c:270
msgid "Reg not valid for H8/300"
msgstr ""
-#: config/tc-h8300.c:413 config/tc-h8300.c:416 config/tc-h8300.c:419
-#: config/tc-h8300.c:423
+#: config/tc-h8300.c:430 config/tc-h8300.c:433 config/tc-h8300.c:436
+#: config/tc-h8300.c:440
msgid "Invalid register list for ldm/stm\n"
msgstr ""
-#: config/tc-h8300.c:475 config/tc-h8300.c:537 config/tc-h8300.c:544
+#: config/tc-h8300.c:492 config/tc-h8300.c:554 config/tc-h8300.c:561
msgid "Wrong size pointer register for architecture."
msgstr ""
-#: config/tc-h8300.c:502 config/tc-h8300.c:511 config/tc-h8300.c:521
+#: config/tc-h8300.c:519 config/tc-h8300.c:528 config/tc-h8300.c:538
msgid "expected @(exp, reg16)"
msgstr ""
-#: config/tc-h8300.c:600
+#: config/tc-h8300.c:617
msgid "expect :8 or :16 here"
msgstr ""
-#: config/tc-h8300.c:801
+#: config/tc-h8300.c:818
#, c-format
msgid "operand %s0x%lx out of range."
msgstr ""
-#: config/tc-h8300.c:889
+#: config/tc-h8300.c:906
msgid "Can't work out size of operand.\n"
msgstr ""
-#: config/tc-h8300.c:937
+#: config/tc-h8300.c:954
#, c-format
msgid "Opcode `%s' with these operand types not available in H8/300 mode"
msgstr ""
-#: config/tc-h8300.c:988 config/tc-h8300.c:1008
+#: config/tc-h8300.c:1005 config/tc-h8300.c:1025
msgid "Need #1 or #2 here"
msgstr ""
-#: config/tc-h8300.c:1003
+#: config/tc-h8300.c:1020
msgid "#4 not valid on H8/300."
msgstr ""
-#: config/tc-h8300.c:1089 config/tc-h8300.c:1121
+#: config/tc-h8300.c:1107 config/tc-h8300.c:1157
#, c-format
msgid "branch operand has odd offset (%lx)\n"
msgstr ""
-#: config/tc-h8300.c:1159
+#: config/tc-h8300.c:1195
msgid "destination operand must be 16 bit register"
msgstr ""
-#: config/tc-h8300.c:1168
+#: config/tc-h8300.c:1204
msgid "source operand must be 8 bit register"
msgstr ""
-#: config/tc-h8300.c:1176
+#: config/tc-h8300.c:1212
msgid "destination operand must be 16bit absolute address"
msgstr ""
-#: config/tc-h8300.c:1183
+#: config/tc-h8300.c:1219
msgid "destination operand must be 8 bit register"
msgstr ""
-#: config/tc-h8300.c:1191
+#: config/tc-h8300.c:1227
msgid "source operand must be 16bit absolute address"
msgstr ""
-#: config/tc-h8300.c:1199
+#. This seems more sane than saying "too many operands". We'll
+#. get here only if the trailing trash starts with a comma.
+#: config/tc-h8300.c:1235 config/tc-mmix.c:452 config/tc-mmix.c:464
+#: config/tc-mmix.c:2485 config/tc-mmix.c:2509 config/tc-mmix.c:2774
msgid "invalid operands"
msgstr ""
-#: config/tc-h8300.c:1250 config/tc-h8500.c:1104 config/tc-mips.c:7984
-#: config/tc-sh.c:1877 config/tc-w65.c:740 config/tc-z8k.c:1205
+#: config/tc-h8300.c:1286 config/tc-h8500.c:1094 config/tc-mips.c:8649
+#: config/tc-sh.c:1907 config/tc-w65.c:733 config/tc-z8k.c:1202
msgid "unknown opcode"
msgstr ""
-#: config/tc-h8300.c:1296
+#: config/tc-h8300.c:1332
msgid "mismatch between opcode size and operand size"
msgstr ""
-#: config/tc-h8300.c:1307 config/tc-h8500.c:1131 config/tc-sh.c:2013
-#: config/tc-w65.c:770 config/tc-z8k.c:1258
+#: config/tc-h8300.c:1344 config/tc-h8500.c:1121 config/tc-sh.c:2045
+#: config/tc-w65.c:763 config/tc-z8k.c:1255
msgid "call to tc_crawl_symbol_chain \n"
msgstr ""
-#: config/tc-h8300.c:1321 config/tc-h8500.c:1145 config/tc-sh.c:2020
-#: config/tc-w65.c:784 config/tc-z8k.c:1272
+#: config/tc-h8300.c:1360 config/tc-h8500.c:1135 config/tc-sh.c:2052
+#: config/tc-w65.c:777 config/tc-z8k.c:1269
msgid "call to tc_headers_hook \n"
msgstr ""
-#: config/tc-h8300.c:1412 config/tc-h8500.c:1235 config/tc-z8k.c:1386
+#: config/tc-h8300.c:1452 config/tc-h8500.c:1225 config/tc-z8k.c:1383
msgid "call to tc_aout_fix_to_chars \n"
msgstr ""
-#: config/tc-h8300.c:1422 config/tc-z8k.c:1396
+#: config/tc-h8300.c:1466 config/tc-z8k.c:1393
msgid "call to md_convert_frag \n"
msgstr ""
-#: config/tc-h8300.c:1467 config/tc-z8k.c:1477
+#: config/tc-h8300.c:1528 config/tc-z8k.c:1479
msgid "call tomd_estimate_size_before_relax \n"
msgstr ""
-#: config/tc-h8500.c:333
+#: config/tc-h8300.c:1649 config/tc-mcore.c:2413 config/tc-pj.c:572
+#: config/tc-sh.c:3367
+#, c-format
+msgid "Cannot represent relocation type %s"
+msgstr ""
+
+#: config/tc-h8500.c:323
msgid ":24 not valid for this opcode"
msgstr ""
-#: config/tc-h8500.c:340
+#: config/tc-h8500.c:330
msgid "expect :8,:16 or :24"
msgstr ""
-#: config/tc-h8500.c:397
+#: config/tc-h8500.c:387
msgid "syntax error in reg list"
msgstr ""
-#: config/tc-h8500.c:415
+#: config/tc-h8500.c:405
msgid "missing final register in range"
msgstr ""
-#: config/tc-h8500.c:502 config/tc-h8500.c:509 config/tc-h8500.c:515
+#: config/tc-h8500.c:492 config/tc-h8500.c:499 config/tc-h8500.c:505
msgid "expected @(exp, Rn)"
msgstr ""
-#: config/tc-h8500.c:531
+#: config/tc-h8500.c:521
msgid "@Rn+ needs word register"
msgstr ""
-#: config/tc-h8500.c:541
+#: config/tc-h8500.c:531
msgid "@Rn needs word register"
msgstr ""
-#: config/tc-h8500.c:838 config/tc-sh.c:1357
+#: config/tc-h8500.c:828 config/tc-sh.c:1403
#, c-format
msgid "unhandled %d\n"
msgstr ""
-#: config/tc-h8500.c:866 config/tc-sh.c:1382
+#: config/tc-h8500.c:856
#, c-format
msgid "operand must be absolute in range %d..%d"
msgstr ""
-#: config/tc-h8500.c:955 config/tc-sh.c:1580
+#: config/tc-h8500.c:945 config/tc-sh.c:1610
#, c-format
msgid "failed for %d\n"
msgstr ""
-#: config/tc-h8500.c:1120 config/tc-sh.c:1681 config/tc-sh.c:1926
-#: config/tc-w65.c:759
+#: config/tc-h8500.c:1110 config/tc-sh.c:1711 config/tc-sh.c:1956
+#: config/tc-w65.c:752
msgid "invalid operands for opcode"
msgstr ""
#. Simple range checking for FIELD againt HIGH and LOW bounds.
#. IGNORE is used to suppress the error message.
-#: config/tc-hppa.c:1119
+#: config/tc-hppa.c:1155 config/tc-hppa.c:1169
#, c-format
msgid "Field out of range [%d..%d] (%d)."
msgstr ""
#. Simple alignment checking for FIELD againt ALIGN (a power of two).
#. IGNORE is used to suppress the error message.
-#: config/tc-hppa.c:1133
+#: config/tc-hppa.c:1183
#, c-format
msgid "Field not properly aligned [%d] (%d)."
msgstr ""
-#: config/tc-hppa.c:1162
+#: config/tc-hppa.c:1212
msgid "Missing .exit\n"
msgstr ""
-#: config/tc-hppa.c:1165
+#: config/tc-hppa.c:1215
msgid "Missing .procend\n"
msgstr ""
-#: config/tc-hppa.c:1345
+#: config/tc-hppa.c:1395
+#, c-format
msgid "Invalid field selector. Assuming F%%."
msgstr ""
-#: config/tc-hppa.c:1372 config/tc-hppa.c:6839 config/tc-hppa.c:6845
-#: config/tc-hppa.c:6851 config/tc-hppa.c:6857 config/tc-mn10300.c:924
-#: config/tc-mn10300.c:2133
-msgid "could not set architecture and machine"
-msgstr ""
-
-#: config/tc-hppa.c:1378
+#: config/tc-hppa.c:1428
msgid "-R option not supported on this target."
msgstr ""
-#: config/tc-hppa.c:1394 config/tc-sparc.c:802 config/tc-sparc.c:838
+#: config/tc-hppa.c:1444 config/tc-sparc.c:803 config/tc-sparc.c:839
#, c-format
msgid "Internal error: can't hash `%s': %s\n"
msgstr ""
-#: config/tc-hppa.c:1402 config/tc-i860.c:190
+#: config/tc-hppa.c:1452 config/tc-i860.c:190
#, c-format
msgid "internal error: losing opcode: `%s' \"%s\"\n"
msgstr ""
-#: config/tc-hppa.c:1471 config/tc-hppa.c:6978 config/tc-hppa.c:7033
+#: config/tc-hppa.c:1523 config/tc-hppa.c:7054 config/tc-hppa.c:7111
msgid "Missing function name for .PROC (corrupted label chain)"
msgstr ""
-#: config/tc-hppa.c:1474 config/tc-hppa.c:7036
+#: config/tc-hppa.c:1526 config/tc-hppa.c:7114
msgid "Missing function name for .PROC"
msgstr ""
-#: config/tc-hppa.c:1582 config/tc-hppa.c:4812
+#: config/tc-hppa.c:1633 config/tc-hppa.c:4911
msgid "could not update architecture and machine"
msgstr ""
-#: config/tc-hppa.c:1789
+#: config/tc-hppa.c:1841
msgid "Invalid Indexed Load Completer."
msgstr ""
-#: config/tc-hppa.c:1794
+#: config/tc-hppa.c:1846
msgid "Invalid Indexed Load Completer Syntax."
msgstr ""
-#: config/tc-hppa.c:1830
+#: config/tc-hppa.c:1883
msgid "Invalid Short Load/Store Completer."
msgstr ""
-#: config/tc-hppa.c:1889 config/tc-hppa.c:1894
+#: config/tc-hppa.c:1943 config/tc-hppa.c:1948
msgid "Invalid Store Bytes Short Completer"
msgstr ""
-#: config/tc-hppa.c:2205 config/tc-hppa.c:2211
+#: config/tc-hppa.c:2259 config/tc-hppa.c:2265
msgid "Invalid left/right combination completer"
msgstr ""
-#: config/tc-hppa.c:2260 config/tc-hppa.c:2267
+#: config/tc-hppa.c:2314 config/tc-hppa.c:2321
msgid "Invalid permutation completer"
msgstr ""
-#: config/tc-hppa.c:2368
+#: config/tc-hppa.c:2422
#, c-format
msgid "Invalid Add Condition: %s"
msgstr ""
-#: config/tc-hppa.c:2379 config/tc-hppa.c:2389
-#, c-format
-msgid "Invalid Add and Branch Condition: %c"
+#: config/tc-hppa.c:2433 config/tc-hppa.c:2443
+msgid "Invalid Add and Branch Condition"
msgstr ""
-#: config/tc-hppa.c:2410
+#: config/tc-hppa.c:2464 config/tc-hppa.c:2602
msgid "Invalid Compare/Subtract Condition"
msgstr ""
-#: config/tc-hppa.c:2450
+#: config/tc-hppa.c:2504
#, c-format
msgid "Invalid Bit Branch Condition: %c"
msgstr ""
-#: config/tc-hppa.c:2536
+#: config/tc-hppa.c:2590
#, c-format
msgid "Invalid Compare/Subtract Condition: %s"
msgstr ""
-#: config/tc-hppa.c:2548
-#, c-format
-msgid "Invalid Compare/Subtract Condition: %c"
-msgstr ""
-
-#: config/tc-hppa.c:2563
-msgid "Invalid Compare and Branch Condition."
+#: config/tc-hppa.c:2617
+msgid "Invalid Compare and Branch Condition"
msgstr ""
-#: config/tc-hppa.c:2659
+#: config/tc-hppa.c:2713
msgid "Invalid Logical Instruction Condition."
msgstr ""
-#: config/tc-hppa.c:2714
+#: config/tc-hppa.c:2768
msgid "Invalid Shift/Extract/Deposit Condition."
msgstr ""
-#: config/tc-hppa.c:2826
+#: config/tc-hppa.c:2880
msgid "Invalid Unit Instruction Condition."
msgstr ""
-#: config/tc-hppa.c:3174 config/tc-hppa.c:3205 config/tc-hppa.c:3238
-#: config/tc-hppa.c:3270
+#: config/tc-hppa.c:3257 config/tc-hppa.c:3289 config/tc-hppa.c:3320
+#: config/tc-hppa.c:3350
msgid "Branch to unaligned address"
msgstr ""
-#: config/tc-hppa.c:3450
+#: config/tc-hppa.c:3528
msgid "Invalid SFU identifier"
msgstr ""
-#: config/tc-hppa.c:3500
+#: config/tc-hppa.c:3578
msgid "Invalid COPR identifier"
msgstr ""
-#: config/tc-hppa.c:3629
+#: config/tc-hppa.c:3707
msgid "Invalid Floating Point Operand Format."
msgstr ""
-#: config/tc-hppa.c:3746 config/tc-hppa.c:3766 config/tc-hppa.c:3786
-#: config/tc-hppa.c:3806 config/tc-hppa.c:3826
+#: config/tc-hppa.c:3824 config/tc-hppa.c:3844 config/tc-hppa.c:3864
+#: config/tc-hppa.c:3884 config/tc-hppa.c:3904
msgid "Invalid register for single precision fmpyadd or fmpysub"
msgstr ""
-#: config/tc-hppa.c:3883
+#: config/tc-hppa.c:3961
#, c-format
msgid "Invalid operands %s"
msgstr ""
-#: config/tc-hppa.c:4001
-#, c-format
-msgid "Cannot handle fixup at %s:%d"
+#: config/tc-hppa.c:4079
+msgid "Cannot handle fixup"
msgstr ""
-#: config/tc-hppa.c:4296
+#: config/tc-hppa.c:4380
msgid " -Q ignored\n"
msgstr ""
-#: config/tc-hppa.c:4300
+#: config/tc-hppa.c:4384
msgid " -c print a warning if a comment is found\n"
msgstr ""
-#: config/tc-hppa.c:4366
+#: config/tc-hppa.c:4455
#, c-format
-msgid "no hppa_fixup entry for fixup type 0x%x at %s:%d"
+msgid "no hppa_fixup entry for fixup type 0x%x"
msgstr ""
-#: config/tc-hppa.c:4533
+#: config/tc-hppa.c:4633
msgid "Unknown relocation encountered in md_apply_fix."
msgstr ""
-#: config/tc-hppa.c:4676 config/tc-hppa.c:4701
+#: config/tc-hppa.c:4775 config/tc-hppa.c:4800
#, c-format
msgid "Undefined register: '%s'."
msgstr ""
-#: config/tc-hppa.c:4735
+#: config/tc-hppa.c:4834
#, c-format
msgid "Non-absolute symbol: '%s'."
msgstr ""
-#: config/tc-hppa.c:4750
+#: config/tc-hppa.c:4849
#, c-format
msgid "Undefined absolute constant: '%s'."
msgstr ""
-#: config/tc-hppa.c:4851
+#: config/tc-hppa.c:4950
#, c-format
msgid "Invalid FP Compare Condition: %s"
msgstr ""
-#: config/tc-hppa.c:4907
+#: config/tc-hppa.c:5006
#, c-format
msgid "Invalid FTEST completer: %s"
msgstr ""
-#: config/tc-hppa.c:4974 config/tc-hppa.c:5012
+#: config/tc-hppa.c:5073 config/tc-hppa.c:5111
#, c-format
msgid "Invalid FP Operand Format: %3s"
msgstr ""
-#: config/tc-hppa.c:5091
+#: config/tc-hppa.c:5190
msgid "Bad segment in expression."
msgstr ""
-#: config/tc-hppa.c:5150
+#: config/tc-hppa.c:5249
msgid "Bad segment (should be absolute)."
msgstr ""
-#: config/tc-hppa.c:5193
+#: config/tc-hppa.c:5292
#, c-format
msgid "Invalid argument location: %s\n"
msgstr ""
-#: config/tc-hppa.c:5224
+#: config/tc-hppa.c:5323
#, c-format
msgid "Invalid argument description: %d"
msgstr ""
-#: config/tc-hppa.c:5247
+#: config/tc-hppa.c:5346
#, c-format
msgid "Invalid Nullification: (%c)"
msgstr ""
-#: config/tc-hppa.c:5983
+#: config/tc-hppa.c:6066
#, c-format
msgid "Invalid .CALL argument: %s"
msgstr ""
-#: config/tc-hppa.c:6114
+#: config/tc-hppa.c:6188
msgid ".callinfo is not within a procedure definition"
msgstr ""
-#: config/tc-hppa.c:6134
+#: config/tc-hppa.c:6208
#, c-format
msgid "FRAME parameter must be a multiple of 8: %d\n"
msgstr ""
-#: config/tc-hppa.c:6153
+#: config/tc-hppa.c:6227
msgid "Value for ENTRY_GR must be in the range 3..18\n"
msgstr ""
-#: config/tc-hppa.c:6165
+#: config/tc-hppa.c:6239
msgid "Value for ENTRY_FR must be in the range 12..21\n"
msgstr ""
-#: config/tc-hppa.c:6175
+#: config/tc-hppa.c:6249
msgid "Value for ENTRY_SR must be 3\n"
msgstr ""
-#: config/tc-hppa.c:6231
+#: config/tc-hppa.c:6305
#, c-format
msgid "Invalid .CALLINFO argument: %s"
msgstr ""
-#: config/tc-hppa.c:6342
+#: config/tc-hppa.c:6416
msgid "The .ENTER pseudo-op is not supported"
msgstr ""
-#: config/tc-hppa.c:6358
+#: config/tc-hppa.c:6432
msgid "Misplaced .entry. Ignored."
msgstr ""
-#: config/tc-hppa.c:6362
+#: config/tc-hppa.c:6436
msgid "Missing .callinfo."
msgstr ""
-#: config/tc-hppa.c:6426
+#: config/tc-hppa.c:6502
msgid ".REG expression must be a register"
msgstr ""
-#: config/tc-hppa.c:6442 read.c:4728
+#: config/tc-hppa.c:6518
msgid "bad or irreducible absolute expression; zero assumed"
msgstr ""
-#: config/tc-hppa.c:6453
+#: config/tc-hppa.c:6529
msgid ".REG must use a label"
msgstr ""
-#: config/tc-hppa.c:6455
+#: config/tc-hppa.c:6531
msgid ".EQU must use a label"
msgstr ""
-#: config/tc-hppa.c:6508
+#: config/tc-hppa.c:6584
msgid ".EXIT must appear within a procedure"
msgstr ""
-#: config/tc-hppa.c:6512
+#: config/tc-hppa.c:6588
msgid "Missing .callinfo"
msgstr ""
-#: config/tc-hppa.c:6516
+#: config/tc-hppa.c:6592
msgid "No .ENTRY for this .EXIT"
msgstr ""
-#: config/tc-hppa.c:6543
+#: config/tc-hppa.c:6619
#, c-format
msgid "Cannot define export symbol: %s\n"
msgstr ""
-#: config/tc-hppa.c:6601
+#: config/tc-hppa.c:6677
#, c-format
msgid "Using ENTRY rather than CODE in export directive for %s"
msgstr ""
-#: config/tc-hppa.c:6718
+#: config/tc-hppa.c:6794
#, c-format
msgid "Undefined .EXPORT/.IMPORT argument (ignored): %s"
msgstr ""
-#: config/tc-hppa.c:6800
+#: config/tc-hppa.c:6876
msgid "Missing label name on .LABEL"
msgstr ""
-#: config/tc-hppa.c:6805
+#: config/tc-hppa.c:6881
msgid "extra .LABEL arguments ignored."
msgstr ""
-#: config/tc-hppa.c:6822
+#: config/tc-hppa.c:6898
msgid "The .LEAVE pseudo-op is not supported"
msgstr ""
-#: config/tc-hppa.c:6861
+#: config/tc-hppa.c:6937
msgid "Unrecognized .LEVEL argument\n"
msgstr ""
-#: config/tc-hppa.c:6897
+#: config/tc-hppa.c:6973
#, c-format
msgid "Cannot define static symbol: %s\n"
msgstr ""
-#: config/tc-hppa.c:6932
+#: config/tc-hppa.c:7008
msgid "Nested procedures"
msgstr ""
-#: config/tc-hppa.c:6942
+#: config/tc-hppa.c:7018
msgid "Cannot allocate unwind descriptor\n"
msgstr ""
-#: config/tc-hppa.c:7040
+#: config/tc-hppa.c:7118
msgid "misplaced .procend"
msgstr ""
-#: config/tc-hppa.c:7043
+#: config/tc-hppa.c:7121
msgid "Missing .callinfo for this procedure"
msgstr ""
-#: config/tc-hppa.c:7046
+#: config/tc-hppa.c:7124
msgid "Missing .EXIT for a .ENTRY"
msgstr ""
-#: config/tc-hppa.c:7084
+#: config/tc-hppa.c:7162
msgid "Not in a space.\n"
msgstr ""
-#: config/tc-hppa.c:7087
+#: config/tc-hppa.c:7165
msgid "Not in a subspace.\n"
msgstr ""
-#: config/tc-hppa.c:7178
+#: config/tc-hppa.c:7256
msgid "Invalid .SPACE argument"
msgstr ""
-#: config/tc-hppa.c:7225
+#: config/tc-hppa.c:7303
msgid "Can't change spaces within a procedure definition. Ignored"
msgstr ""
-#: config/tc-hppa.c:7354
+#: config/tc-hppa.c:7432
#, c-format
msgid "Undefined space: '%s' Assuming space number = 0."
msgstr ""
-#: config/tc-hppa.c:7378
+#: config/tc-hppa.c:7456
msgid "Must be in a space before changing or declaring subspaces.\n"
msgstr ""
-#: config/tc-hppa.c:7382
+#: config/tc-hppa.c:7460
msgid "Can't change subspaces within a procedure definition. Ignored"
msgstr ""
-#: config/tc-hppa.c:7417
+#: config/tc-hppa.c:7495
msgid "Parameters of an existing subspace can't be modified"
msgstr ""
-#: config/tc-hppa.c:7468
+#: config/tc-hppa.c:7546
msgid "Alignment must be a power of 2"
msgstr ""
-#: config/tc-hppa.c:7510
+#: config/tc-hppa.c:7588
msgid "FIRST not supported as a .SUBSPACE argument"
msgstr ""
-#: config/tc-hppa.c:7512
+#: config/tc-hppa.c:7590
msgid "Invalid .SUBSPACE argument"
msgstr ""
-#: config/tc-hppa.c:7692
+#: config/tc-hppa.c:7770
#, c-format
msgid "Internal error: Unable to find containing space for %s."
msgstr ""
-#: config/tc-hppa.c:7731
+#: config/tc-hppa.c:7809
#, c-format
msgid "Out of memory: could not allocate new space chain entry: %s\n"
msgstr ""
-#: config/tc-hppa.c:7817
+#: config/tc-hppa.c:7895
#, c-format
msgid "Out of memory: could not allocate new subspace chain entry: %s\n"
msgstr ""
-#: config/tc-hppa.c:8511
+#: config/tc-hppa.c:8589
#, c-format
msgid "Symbol '%s' could not be created."
msgstr ""
-#: config/tc-hppa.c:8515
+#: config/tc-hppa.c:8593
msgid "No memory for symbol name."
msgstr ""
-#: config/tc-i386.c:581
+#: config/tc-i386.c:594
#, c-format
msgid "%s shortened to %s"
msgstr ""
-#: config/tc-i386.c:636
+#: config/tc-i386.c:649
msgid "same type of prefix used twice"
msgstr ""
-#: config/tc-i386.c:654
+#: config/tc-i386.c:667
msgid "64bit mode not supported on this CPU."
msgstr ""
-#: config/tc-i386.c:658
+#: config/tc-i386.c:671
msgid "32bit mode not supported on this CPU."
msgstr ""
-#: config/tc-i386.c:691
+#: config/tc-i386.c:704
msgid "bad argument to syntax directive."
msgstr ""
-#: config/tc-i386.c:734
+#: config/tc-i386.c:748
#, c-format
msgid "no such architecture: `%s'"
msgstr ""
-#: config/tc-i386.c:739
+#: config/tc-i386.c:753
msgid "missing cpu architecture"
msgstr ""
-#: config/tc-i386.c:812 config/tc-i386.c:835 config/tc-m68k.c:3802
+#: config/tc-i386.c:767
+#, c-format
+msgid "no such architecture modifier: `%s'"
+msgstr ""
+
+#: config/tc-i386.c:821 config/tc-i386.c:4628
+msgid "Unknown architecture"
+msgstr ""
+
+#: config/tc-i386.c:856 config/tc-i386.c:879 config/tc-m68k.c:3826
#, c-format
msgid "Internal Error: Can't hash %s: %s"
msgstr ""
-#: config/tc-i386.c:1088
+#: config/tc-i386.c:1132
msgid "There are no unsigned pc-relative relocations"
msgstr ""
-#: config/tc-i386.c:1095 config/tc-i386.c:4622
+#: config/tc-i386.c:1139 config/tc-i386.c:4827
#, c-format
msgid "can not do %d byte pc-relative relocation"
msgstr ""
-#: config/tc-i386.c:1112
+#: config/tc-i386.c:1156
#, c-format
msgid "can not do %s %d byte relocation"
msgstr ""
-#: config/tc-i386.c:1221 config/tc-i386.c:1314
+#: config/tc-i386.c:1263 config/tc-i386.c:1357
#, c-format
msgid "no such instruction: `%s'"
msgstr ""
-#: config/tc-i386.c:1230
+#: config/tc-i386.c:1273 config/tc-i386.c:1389
#, c-format
msgid "invalid character %s in mnemonic"
msgstr ""
-#: config/tc-i386.c:1237
+#: config/tc-i386.c:1280
msgid "expecting prefix; got nothing"
msgstr ""
-#: config/tc-i386.c:1239
+#: config/tc-i386.c:1282
msgid "expecting mnemonic; got nothing"
msgstr ""
-#: config/tc-i386.c:1257
+#: config/tc-i386.c:1300
#, c-format
msgid "redundant %s prefix"
msgstr ""
-#: config/tc-i386.c:1325
+#: config/tc-i386.c:1398
#, c-format
msgid "`%s' is not supported on `%s'"
msgstr ""
-#: config/tc-i386.c:1330
+#: config/tc-i386.c:1403
msgid "use .code16 to ensure correct addressing mode"
msgstr ""
-#: config/tc-i386.c:1338
+#: config/tc-i386.c:1410
#, c-format
msgid "expecting string instruction after `%s'"
msgstr ""
-#: config/tc-i386.c:1359
+#: config/tc-i386.c:1431
#, c-format
msgid "invalid character %s before operand %d"
msgstr ""
-#: config/tc-i386.c:1373
+#: config/tc-i386.c:1445
#, c-format
msgid "unbalanced parenthesis in operand %d."
msgstr ""
-#: config/tc-i386.c:1376
+#: config/tc-i386.c:1448
#, c-format
msgid "unbalanced brackets in operand %d."
msgstr ""
-#: config/tc-i386.c:1385
+#: config/tc-i386.c:1457
#, c-format
msgid "invalid character %s in operand %d"
msgstr ""
-#: config/tc-i386.c:1412
+#: config/tc-i386.c:1484
#, c-format
msgid "spurious operands; (%d operands/instruction max)"
msgstr ""
-#: config/tc-i386.c:1435
+#: config/tc-i386.c:1507
msgid "expecting operand after ','; got nothing"
msgstr ""
-#: config/tc-i386.c:1440
+#: config/tc-i386.c:1512
msgid "expecting operand before ','; got nothing"
msgstr ""
#. We found no match.
-#: config/tc-i386.c:1782
+#: config/tc-i386.c:1856
#, c-format
msgid "suffix or operands invalid for `%s'"
msgstr ""
-#: config/tc-i386.c:1793
+#: config/tc-i386.c:1867
#, 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:1801
+#: config/tc-i386.c:1875
#, c-format
msgid "stand-alone `%s' prefix"
msgstr ""
-#: config/tc-i386.c:1837 config/tc-i386.c:1852
+#: config/tc-i386.c:1911 config/tc-i386.c:1926
+#, c-format
msgid "`%s' operand %d must use `%%es' segment"
msgstr ""
-#: config/tc-i386.c:1867
-msgid "Extended register `%%%s' available only in 64bit mode."
-msgstr ""
-
#. Prohibit these changes in the 64bit mode, since
#. the lowering is more complicated.
-#: config/tc-i386.c:1938 config/tc-i386.c:1989 config/tc-i386.c:2004
-#: config/tc-i386.c:2032 config/tc-i386.c:2060
+#: config/tc-i386.c:1999 config/tc-i386.c:2053 config/tc-i386.c:2068
+#: config/tc-i386.c:2096 config/tc-i386.c:2124
+#, c-format
msgid "Incorrect register `%%%s' used with`%c' suffix"
msgstr ""
-#: config/tc-i386.c:1944 config/tc-i386.c:1994 config/tc-i386.c:2065
+#: config/tc-i386.c:2005 config/tc-i386.c:2058 config/tc-i386.c:2129
+#, c-format
msgid "using `%%%s' instead of `%%%s' due to `%c' suffix"
msgstr ""
-#: config/tc-i386.c:1957 config/tc-i386.c:1975 config/tc-i386.c:2019
-#: config/tc-i386.c:2046
+#: config/tc-i386.c:2021 config/tc-i386.c:2039 config/tc-i386.c:2083
+#: config/tc-i386.c:2110
+#, c-format
msgid "`%%%s' not allowed with `%s%c'"
msgstr ""
-#: config/tc-i386.c:2106
+#: config/tc-i386.c:2170
msgid "no instruction mnemonic suffix given; can't determine immediate size"
msgstr ""
-#: config/tc-i386.c:2132
+#: config/tc-i386.c:2196
#, c-format
msgid ""
"no instruction mnemonic suffix given; can't determine immediate size %x %c"
msgstr ""
-#: config/tc-i386.c:2157
+#: config/tc-i386.c:2221
msgid ""
"no instruction mnemonic suffix given and no register operands; can't size "
"instruction"
msgstr ""
-#: config/tc-i386.c:2205
+#: config/tc-i386.c:2269
msgid "64bit operations available only in 64bit modes."
msgstr ""
#. Reversed arguments on faddp, fsubp, etc.
-#: config/tc-i386.c:2273
+#: config/tc-i386.c:2337
+#, c-format
msgid "translating to `%s %%%s,%%%s'"
msgstr ""
#. Extraneous `l' suffix on fp insn.
-#: config/tc-i386.c:2280
+#: config/tc-i386.c:2344
+#, c-format
msgid "translating to `%s %%%s'"
msgstr ""
-#: config/tc-i386.c:2551
+#: config/tc-i386.c:2617
+#, c-format
msgid "you can't `pop %%cs'"
msgstr ""
#. UnixWare fsub no args is alias for fsubp, fadd -> faddp, etc.
-#: config/tc-i386.c:2584
+#: config/tc-i386.c:2650
#, c-format
msgid "translating to `%sp'"
msgstr ""
-#: config/tc-i386.c:2627
+#: config/tc-i386.c:2693
+#, c-format
msgid ""
"Can't encode registers '%%%s' in the instruction requiring REX prefix.\n"
msgstr ""
-#: config/tc-i386.c:2679 config/tc-i386.c:2751 config/tc-i386.c:2798
+#: config/tc-i386.c:2755 config/tc-i386.c:2845 config/tc-i386.c:2881
msgid "skipping prefixes on this instruction"
msgstr ""
-#: config/tc-i386.c:2819
+#: config/tc-i386.c:2901
msgid "16-bit jump out of range"
msgstr ""
-#: config/tc-i386.c:2828
+#: config/tc-i386.c:2910
#, c-format
msgid "can't handle non absolute segment in `%s'"
msgstr ""
-#: config/tc-i386.c:3085
-msgid "only 1 or 2 immediate operands are allowed"
-msgstr ""
-
-#: config/tc-i386.c:3115 config/tc-i386.c:3353
-msgid "GOT relocations not supported in 16 bit mode"
+#: config/tc-i386.c:3217
+#, c-format
+msgid "@%s reloc is not supported in %s bit mode"
msgstr ""
-#: config/tc-i386.c:3152 config/tc-i386.c:3389
-msgid "bad reloc specifier in expression"
+#: config/tc-i386.c:3293
+msgid "only 1 or 2 immediate operands are allowed"
msgstr ""
-#: config/tc-i386.c:3170 config/tc-i386.c:3424
+#: config/tc-i386.c:3316 config/tc-i386.c:3504
#, c-format
-msgid "ignoring junk `%s' after expression"
+msgid "junk `%s' after expression"
msgstr ""
#. Missing or bad expr becomes absolute 0.
-#: config/tc-i386.c:3177
+#: config/tc-i386.c:3327
#, c-format
msgid "missing or invalid immediate expression `%s' taken as 0"
msgstr ""
-#: config/tc-i386.c:3208 config/tc-i386.c:3454
+#: config/tc-i386.c:3358 config/tc-i386.c:3565
#, c-format
msgid "unimplemented segment %s in operand"
msgstr ""
-#: config/tc-i386.c:3210 config/tc-i386.c:3456
+#: config/tc-i386.c:3360 config/tc-i386.c:3567
#, c-format
msgid "unimplemented segment type %d in operand"
msgstr ""
-#: config/tc-i386.c:3252 config/tc-i386.c:5392
+#: config/tc-i386.c:3404 config/tc-i386.c:5588
#, c-format
msgid "expecting scale factor of 1, 2, 4, or 8: got `%s'"
msgstr ""
-#: config/tc-i386.c:3258
+#: config/tc-i386.c:3411
#, c-format
msgid "scale factor of %d without an index register"
msgstr ""
+#: config/tc-i386.c:3524
+#, c-format
+msgid "bad expression used with @%s"
+msgstr ""
+
#. Missing or bad expr becomes absolute 0.
-#: config/tc-i386.c:3435
+#: config/tc-i386.c:3546
#, c-format
msgid "missing or invalid displacement expression `%s' taken as 0"
msgstr ""
-#: config/tc-i386.c:3541
+#: config/tc-i386.c:3652
#, c-format
msgid "`%s' is not a valid base/index expression"
msgstr ""
-#: config/tc-i386.c:3545
+#: config/tc-i386.c:3656
#, c-format
msgid "`%s' is not a valid %s bit base/index expression"
msgstr ""
-#: config/tc-i386.c:3620
+#: config/tc-i386.c:3731
#, c-format
msgid "bad memory operand `%s'"
msgstr ""
-#: config/tc-i386.c:3635
+#: config/tc-i386.c:3746
#, c-format
msgid "junk `%s' after register"
msgstr ""
-#: config/tc-i386.c:3644 config/tc-i386.c:3759 config/tc-i386.c:3795
+#: config/tc-i386.c:3755 config/tc-i386.c:3870 config/tc-i386.c:3908
#, c-format
msgid "bad register name `%s'"
msgstr ""
-#: config/tc-i386.c:3652
+#: config/tc-i386.c:3763
msgid "immediate operand illegal with absolute jump"
msgstr ""
-#: config/tc-i386.c:3674
+#: config/tc-i386.c:3785
#, c-format
msgid "too many memory references for `%s'"
msgstr ""
-#: config/tc-i386.c:3752
+#: config/tc-i386.c:3863
#, c-format
msgid "expecting `,' or `)' after index register in `%s'"
msgstr ""
-#: config/tc-i386.c:3774
+#: config/tc-i386.c:3887
#, c-format
msgid "expecting `)' after scale factor in `%s'"
msgstr ""
-#: config/tc-i386.c:3781
+#: config/tc-i386.c:3894
#, c-format
msgid "expecting index register or scale factor after `,'; got '%c'"
msgstr ""
-#: config/tc-i386.c:3788
+#: config/tc-i386.c:3901
#, c-format
msgid "expecting `,' or `)' after base register in `%s'"
msgstr ""
#. It's not a memory operand; argh!
-#: config/tc-i386.c:3829
+#: config/tc-i386.c:3942
#, c-format
msgid "invalid char %s beginning operand %d `%s'"
msgstr ""
-#: config/tc-i386.c:4267
+#: config/tc-i386.c:4117
+msgid "long jump required"
+msgstr ""
+
+#: config/tc-i386.c:4417
msgid "Bad call to md_atof ()"
msgstr ""
-#: config/tc-i386.c:4431 config/tc-sparc.c:548
-#, c-format
-msgid "No compiled in support for %d bit object file format"
+#: config/tc-i386.c:4581
+msgid "No compiled in support for x86_64"
msgstr ""
-#: config/tc-i386.c:4449
+#: config/tc-i386.c:4602
msgid ""
" -Q ignored\n"
" -V print assembler version number\n"
@@ -3583,67 +3789,63 @@ msgid ""
" -s ignored\n"
msgstr ""
-#: config/tc-i386.c:4456
+#: config/tc-i386.c:4609
msgid " -q quieten some warnings\n"
msgstr ""
-#: config/tc-i386.c:4475
-msgid "Unknown architecture"
-msgstr ""
-
-#: config/tc-i386.c:4515
+#: config/tc-i386.c:4710 config/tc-s390.c:1592
msgid "GOT already in symbol table"
msgstr ""
-#: config/tc-i386.c:4636
+#: config/tc-i386.c:4842
#, c-format
msgid "can not do %d byte relocation"
msgstr ""
-#: config/tc-i386.c:4697
+#: config/tc-i386.c:4894 config/tc-s390.c:1957
#, c-format
msgid "cannot represent relocation type %s"
msgstr ""
-#: config/tc-i386.c:4994
+#: config/tc-i386.c:5190
#, c-format
msgid "too many memory references for '%s'"
msgstr ""
-#: config/tc-i386.c:5157
+#: config/tc-i386.c:5353
#, c-format
msgid "Unknown operand modifier `%s'\n"
msgstr ""
-#: config/tc-i386.c:5364
+#: config/tc-i386.c:5560
#, c-format
msgid "`%s' is not a valid segment register"
msgstr ""
-#: config/tc-i386.c:5374 config/tc-i386.c:5495
+#: config/tc-i386.c:5570 config/tc-i386.c:5691
msgid "Register scaling only allowed in memory operands."
msgstr ""
-#: config/tc-i386.c:5405
+#: config/tc-i386.c:5601
msgid "Too many register references in memory operand.\n"
msgstr ""
-#: config/tc-i386.c:5474
+#: config/tc-i386.c:5670
#, c-format
msgid "Syntax error. Expecting a constant. Got `%s'.\n"
msgstr ""
-#: config/tc-i386.c:5544
+#: config/tc-i386.c:5740
#, c-format
msgid "Unrecognized token '%s'"
msgstr ""
-#: config/tc-i386.c:5561
+#: config/tc-i386.c:5757
#, c-format
msgid "Unexpected token `%s'\n"
msgstr ""
-#: config/tc-i386.c:5705
+#: config/tc-i386.c:5901
#, c-format
msgid "Unrecognized token `%s'\n"
msgstr ""
@@ -3652,7 +3854,7 @@ msgstr ""
msgid "Unknown temporary pseudo register"
msgstr ""
-#: config/tc-i860.c:181 config/tc-mips.c:1027
+#: config/tc-i860.c:181 config/tc-mips.c:1248
#, c-format
msgid "internal error: can't hash `%s': %s\n"
msgstr ""
@@ -3689,7 +3891,7 @@ msgstr ""
msgid "Illegal operands for %s"
msgstr ""
-#: config/tc-i860.c:873 config/tc-sparc.c:2730
+#: config/tc-i860.c:873 config/tc-sparc.c:2731
msgid "bad segment"
msgstr ""
@@ -3743,54 +3945,54 @@ msgstr ""
msgid "5-bit field must be absolute"
msgstr ""
-#: config/tc-i860.c:1306 config/tc-i860.c:1329
+#: config/tc-i860.c:1305 config/tc-i860.c:1328
msgid "A branch offset requires 0 MOD 4 alignment"
msgstr ""
-#: config/tc-i860.c:1350
+#: config/tc-i860.c:1349
#, c-format
msgid "Unrecognized fix-up (0x%08x)"
msgstr ""
-#: config/tc-i860.h:82
+#: config/tc-i860.h:80
msgid "i860_convert_frag\n"
msgstr ""
-#: config/tc-i960.c:549
+#: config/tc-i960.c:550
#, c-format
msgid "Hashing returned \"%s\"."
msgstr ""
#. Offset of last character in opcode mnemonic
-#: config/tc-i960.c:583
+#: config/tc-i960.c:584
msgid "branch prediction invalid on this opcode"
msgstr ""
-#: config/tc-i960.c:623
+#: config/tc-i960.c:624
#, c-format
msgid "invalid opcode, \"%s\"."
msgstr ""
-#: config/tc-i960.c:628
+#: config/tc-i960.c:629
#, c-format
msgid "improper number of operands. expecting %d, got %d"
msgstr ""
-#: config/tc-i960.c:860
+#: config/tc-i960.c:861
#, c-format
msgid "Fixup of %ld too large for field width of %d"
msgstr ""
-#: config/tc-i960.c:977
+#: config/tc-i960.c:978
#, c-format
msgid "invalid architecture %s"
msgstr ""
-#: config/tc-i960.c:997
+#: config/tc-i960.c:998
msgid "I960 options:\n"
msgstr ""
-#: config/tc-i960.c:1000
+#: config/tc-i960.c:1001
msgid ""
"\n"
"\t\t\tspecify variant of 960 architecture\n"
@@ -3801,205 +4003,208 @@ msgid ""
"\t\t\tlong displacements\n"
msgstr ""
-#: config/tc-i960.c:1403
+#: config/tc-i960.c:1404
msgid "too many operands"
msgstr ""
-#: config/tc-i960.c:1462 config/tc-i960.c:1689
+#: config/tc-i960.c:1463 config/tc-i960.c:1690
msgid "expression syntax error"
msgstr ""
-#: config/tc-i960.c:1500
+#: config/tc-i960.c:1501
msgid "attempt to branch into different segment"
msgstr ""
-#: config/tc-i960.c:1504
+#: config/tc-i960.c:1505
#, c-format
msgid "target of %s instruction must be a label"
msgstr ""
-#: config/tc-i960.c:1543
+#: config/tc-i960.c:1544
msgid "unmatched '['"
msgstr ""
-#: config/tc-i960.c:1554
+#: config/tc-i960.c:1555
msgid "garbage after index spec ignored"
msgstr ""
#. We never moved: there was no opcode either!
-#: config/tc-i960.c:1620
+#: config/tc-i960.c:1621
msgid "missing opcode"
msgstr ""
-#: config/tc-i960.c:1923
-msgid "invalid constant"
-msgstr ""
-
-#: config/tc-i960.c:2035
+#: config/tc-i960.c:2036
msgid "invalid index register"
msgstr ""
-#: config/tc-i960.c:2058
+#: config/tc-i960.c:2059
msgid "invalid scale factor"
msgstr ""
-#: config/tc-i960.c:2241
+#: config/tc-i960.c:2242
msgid "unaligned register"
msgstr ""
-#: config/tc-i960.c:2264
+#: config/tc-i960.c:2265
msgid "no such sfr in this architecture"
msgstr ""
-#: config/tc-i960.c:2302
+#: config/tc-i960.c:2303
msgid "illegal literal"
msgstr ""
#. Should not happen: see block comment above
-#: config/tc-i960.c:2532
+#: config/tc-i960.c:2533
#, c-format
msgid "Trying to 'bal' to %s"
msgstr ""
-#: config/tc-i960.c:2543
+#: config/tc-i960.c:2544
msgid "Looks like a proc, but can't tell what kind.\n"
msgstr ""
-#: config/tc-i960.c:2574
+#: config/tc-i960.c:2575
msgid "should have 1 or 2 operands"
msgstr ""
-#: config/tc-i960.c:2583 config/tc-i960.c:2602
+#: config/tc-i960.c:2584 config/tc-i960.c:2603
#, c-format
msgid "Redefining leafproc %s"
msgstr ""
-#: config/tc-i960.c:2633
+#: config/tc-i960.c:2634
msgid "should have two operands"
msgstr ""
-#: config/tc-i960.c:2643
+#: config/tc-i960.c:2644
msgid "'entry_num' must be absolute number in [0,31]"
msgstr ""
-#: config/tc-i960.c:2652
+#: config/tc-i960.c:2653
#, c-format
msgid "Redefining entrynum for sysproc %s"
msgstr ""
-#: config/tc-i960.c:2759
+#: config/tc-i960.c:2760
msgid "architecture of opcode conflicts with that of earlier instruction(s)"
msgstr ""
-#: config/tc-i960.c:2780
+#: config/tc-i960.c:2781
msgid "big endian mode is not supported"
msgstr ""
-#: config/tc-i960.c:2782
+#: config/tc-i960.c:2783
#, c-format
msgid "ignoring unrecognized .endian type `%s'"
msgstr ""
-#: config/tc-i960.c:3064
+#: config/tc-i960.c:3055
#, c-format
msgid "leafproc symbol '%s' undefined"
msgstr ""
-#: config/tc-i960.c:3074
+#: config/tc-i960.c:3065
#, c-format
msgid "Warning: making leafproc entries %s and %s both global\n"
msgstr ""
-#: config/tc-i960.c:3183
+#: config/tc-i960.c:3174
msgid "option --link-relax is only supported in b.out format"
msgstr ""
-#: config/tc-i960.c:3226
+#: config/tc-i960.c:3217 write.c:2670
msgid "callj to difference of two symbols"
msgstr ""
-#: config/tc-ia64.c:4077
+#: config/tc-ia64.c:1052
+msgid "Unwind directive not followed by an instruction."
+msgstr ""
+
+#: config/tc-ia64.c:4416
msgid "Register name expected"
msgstr ""
-#: config/tc-ia64.c:4082 config/tc-ia64.c:4368
+#: config/tc-ia64.c:4421 config/tc-ia64.c:4707
msgid "Comma expected"
msgstr ""
-#: config/tc-ia64.c:4090
+#: config/tc-ia64.c:4429
msgid "Register value annotation ignored"
msgstr ""
-#: config/tc-ia64.c:4114
+#: config/tc-ia64.c:4453
msgid "Directive invalid within a bundle"
msgstr ""
-#: config/tc-ia64.c:4181
+#: config/tc-ia64.c:4520
msgid "Missing predicate relation type"
msgstr ""
-#: config/tc-ia64.c:4197
+#: config/tc-ia64.c:4536
msgid "Unrecognized predicate relation type"
msgstr ""
-#: config/tc-ia64.c:4217 config/tc-ia64.c:4242
+#: config/tc-ia64.c:4556 config/tc-ia64.c:4581
msgid "Predicate register expected"
msgstr ""
-#: config/tc-ia64.c:4229
+#: config/tc-ia64.c:4568
msgid "Duplicate predicate register ignored"
msgstr ""
-#: config/tc-ia64.c:4251
+#: config/tc-ia64.c:4590
msgid "Bad register range"
msgstr ""
-#: config/tc-ia64.c:4279
+#: config/tc-ia64.c:4618
msgid "Predicate source and target required"
msgstr ""
-#: config/tc-ia64.c:4281 config/tc-ia64.c:4293
+#: config/tc-ia64.c:4620 config/tc-ia64.c:4632
msgid "Use of p0 is not valid in this context"
msgstr ""
-#: config/tc-ia64.c:4288
+#: config/tc-ia64.c:4627
msgid "At least two PR arguments expected"
msgstr ""
-#: config/tc-ia64.c:4302
+#: config/tc-ia64.c:4641
msgid "At least one PR argument expected"
msgstr ""
-#: config/tc-ia64.c:4338
+#: config/tc-ia64.c:4677
#, c-format
msgid "Inserting \"%s\" into entry hint table failed: %s"
msgstr ""
#. FIXME -- need 62-bit relocation type
-#: config/tc-ia64.c:4758
+#: config/tc-ia64.c:5147
msgid "62-bit relocation not yet implemented"
msgstr ""
-#: config/tc-ia64.c:4820
+#. XXX technically, this is wrong: we should not be issuing warning
+#. messages until we're sure this instruction pattern is going to
+#. be used!
+#: config/tc-ia64.c:5220
msgid "lower 16 bits of mask ignored"
msgstr ""
-#: config/tc-ia64.c:5317
+#: config/tc-ia64.c:5775
msgid "Value truncated to 62 bits"
msgstr ""
-#: config/tc-ia64.c:5668
+#: config/tc-ia64.c:6126
msgid ""
"Additional NOP may be necessary to workaround Itanium processor A/B step "
"errata"
msgstr ""
-#: config/tc-ia64.c:5849
+#: config/tc-ia64.c:6309
#, c-format
msgid "Unrecognized option '-x%s'"
msgstr ""
-#: config/tc-ia64.c:5877
+#: config/tc-ia64.c:6337
msgid ""
"IA-64 options:\n"
" -milp32|-milp64|-mlp64|-mp64\tselect data model (default -mlp64)\n"
@@ -4009,33 +4214,37 @@ msgid ""
" -xdebug\t\t debug dependency violation checker\n"
msgstr ""
-#: config/tc-ia64.c:6147 config/tc-mips.c:1014
+#: config/tc-ia64.c:6351
+msgid "--gstabs is not supported for ia64"
+msgstr ""
+
+#: config/tc-ia64.c:6618 config/tc-mips.c:1227
msgid "Could not set architecture and machine"
msgstr ""
-#: config/tc-ia64.c:6223
+#: config/tc-ia64.c:6725
msgid "Explicit stops are ignored in auto mode"
msgstr ""
-#: config/tc-ia64.c:6273
+#: config/tc-ia64.c:6775
msgid "Found '{' after explicit switch to automatic mode"
msgstr ""
-#: config/tc-ia64.c:6686
+#: config/tc-ia64.c:7222
#, c-format
msgid "Unhandled dependency %s for %s (%s), note %d"
msgstr ""
-#: config/tc-ia64.c:7962
+#: config/tc-ia64.c:8498
#, c-format
msgid "Unrecognized dependency specifier %d\n"
msgstr ""
-#: config/tc-ia64.c:8753
+#: config/tc-ia64.c:9300
msgid "Only the first path encountering the conflict is reported"
msgstr ""
-#: config/tc-ia64.c:8756
+#: config/tc-ia64.c:9303
msgid "This is the location of the conflicting usage"
msgstr ""
@@ -4115,91 +4324,94 @@ msgstr ""
msgid " -cpu-desc provide runtime cpu description file\n"
msgstr ""
-#: config/tc-m32r.c:688
+#: config/tc-m32r.c:691
msgid "Instructions write to the same destination register."
msgstr ""
-#: config/tc-m32r.c:696
+#: config/tc-m32r.c:699
msgid "Instructions do not use parallel execution pipelines."
msgstr ""
-#: config/tc-m32r.c:703
+#: config/tc-m32r.c:706
msgid "Instructions share the same execution pipeline"
msgstr ""
-#: config/tc-m32r.c:773 config/tc-m32r.c:870
+#: config/tc-m32r.c:776 config/tc-m32r.c:872
#, c-format
msgid "not a 16 bit instruction '%s'"
msgstr ""
-#: config/tc-m32r.c:780 config/tc-m32r.c:877 config/tc-m32r.c:1033
+#: config/tc-m32r.c:783 config/tc-m32r.c:879 config/tc-m32r.c:1035
#, c-format
msgid "unknown instruction '%s'"
msgstr ""
-#: config/tc-m32r.c:789 config/tc-m32r.c:884 config/tc-m32r.c:1040
+#: config/tc-m32r.c:792 config/tc-m32r.c:886 config/tc-m32r.c:1042
#, c-format
msgid "instruction '%s' is for the M32RX only"
msgstr ""
-#: config/tc-m32r.c:798 config/tc-m32r.c:893
+#: config/tc-m32r.c:801 config/tc-m32r.c:895
#, c-format
msgid "instruction '%s' cannot be executed in parallel."
msgstr ""
-#: config/tc-m32r.c:854 config/tc-m32r.c:918 config/tc-m32r.c:1090
+#: config/tc-m32r.c:856 config/tc-m32r.c:920 config/tc-m32r.c:1092
msgid "internal error: lookup/get operands failed"
msgstr ""
-#: config/tc-m32r.c:903
+#: config/tc-m32r.c:905
#, c-format
msgid "'%s': only the NOP instruction can be issued in parallel on the m32r"
msgstr ""
-#: config/tc-m32r.c:932
+#: config/tc-m32r.c:934
#, 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:936
+#: config/tc-m32r.c:938
#, 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:1250 config/tc-ppc.c:1459 config/tc-ppc.c:3681 read.c:1358
+#: config/tc-m32r.c:1252 config/tc-ppc.c:1571 config/tc-ppc.c:3966
msgid "Expected comma after symbol-name: rest of line ignored."
msgstr ""
-#: config/tc-m32r.c:1260
+#: config/tc-m32r.c:1262
#, c-format
msgid ".SCOMMon length (%ld.) <0! Ignored."
msgstr ""
-#: config/tc-m32r.c:1274 config/tc-ppc.c:1481 config/tc-ppc.c:2392
-#: config/tc-ppc.c:3705
+#: config/tc-m32r.c:1276 config/tc-ppc.c:1593 config/tc-ppc.c:2615
+#: config/tc-ppc.c:3990
msgid "ignoring bad alignment"
msgstr ""
-#: config/tc-m32r.c:1301 config/tc-ppc.c:1492 config/tc-ppc.c:3717 read.c:1382
-#: read.c:2108
+#: config/tc-m32r.c:1288 config/tc-ppc.c:1630 config/tc-v850.c:383
+msgid "Common alignment not a power of 2"
+msgstr ""
+
+#: config/tc-m32r.c:1303 config/tc-ppc.c:1604 config/tc-ppc.c:4002
#, c-format
msgid "Ignoring attempt to re-define symbol `%s'."
msgstr ""
-#: config/tc-m32r.c:1310
+#: config/tc-m32r.c:1312
#, c-format
msgid "Length of .scomm \"%s\" is already %ld. Not changed to %ld."
msgstr ""
-#: config/tc-m32r.c:1786
+#: config/tc-m32r.c:1789
msgid "Unmatched high/shigh reloc"
msgstr ""
-#: config/tc-m68hc11.c:305
+#: config/tc-m68hc11.c:327
#, c-format
msgid ""
"Motorola 68HC11/68HC12 options:\n"
@@ -4215,55 +4427,55 @@ msgid ""
" (used for testing)\n"
msgstr ""
-#: config/tc-m68hc11.c:346
+#: config/tc-m68hc11.c:368
#, c-format
msgid "Default target `%s' is not supported."
msgstr ""
#. Dump the opcode statistics table.
-#: config/tc-m68hc11.c:365
+#: config/tc-m68hc11.c:387
msgid "Name # Modes Min ops Max ops Modes mask # Used\n"
msgstr ""
-#: config/tc-m68hc11.c:415
+#: config/tc-m68hc11.c:437
#, c-format
msgid "Option `%s' is not recognized."
msgstr ""
-#: config/tc-m68hc11.c:636
+#: config/tc-m68hc11.c:658
msgid "#<imm8>"
msgstr ""
-#: config/tc-m68hc11.c:645
+#: config/tc-m68hc11.c:667
msgid "#<imm16>"
msgstr ""
-#: config/tc-m68hc11.c:654 config/tc-m68hc11.c:663
+#: config/tc-m68hc11.c:676 config/tc-m68hc11.c:685
msgid "<imm8>,X"
msgstr ""
-#: config/tc-m68hc11.c:681
+#: config/tc-m68hc11.c:703
msgid "*<abs8>"
msgstr ""
-#: config/tc-m68hc11.c:693
+#: config/tc-m68hc11.c:715
msgid "#<mask>"
msgstr ""
-#: config/tc-m68hc11.c:703
+#: config/tc-m68hc11.c:725
#, c-format
msgid "symbol%d"
msgstr ""
-#: config/tc-m68hc11.c:705
+#: config/tc-m68hc11.c:727
msgid "<abs>"
msgstr ""
-#: config/tc-m68hc11.c:724
+#: config/tc-m68hc11.c:746
msgid "<label>"
msgstr ""
-#: config/tc-m68hc11.c:740
+#: config/tc-m68hc11.c:762
#, c-format
msgid ""
"# Example of `%s' instructions\n"
@@ -4271,596 +4483,604 @@ msgid ""
"_start:\n"
msgstr ""
-#: config/tc-m68hc11.c:788
+#: config/tc-m68hc11.c:810
#, c-format
msgid "Instruction `%s' is not recognized."
msgstr ""
-#: config/tc-m68hc11.c:793
+#: config/tc-m68hc11.c:815
#, c-format
msgid "Instruction formats for `%s':"
msgstr ""
-#: config/tc-m68hc11.c:926
+#: config/tc-m68hc11.c:948
#, c-format
msgid "Immediate operand is not allowed for operand %d."
msgstr ""
-#: config/tc-m68hc11.c:952
+#: config/tc-m68hc11.c:974
msgid "Indirect indexed addressing is not valid for 68HC11."
msgstr ""
-#: config/tc-m68hc11.c:972
+#: config/tc-m68hc11.c:994
msgid "Spurious `,' or bad indirect register addressing mode."
msgstr ""
-#: config/tc-m68hc11.c:988
+#: config/tc-m68hc11.c:1010
msgid "Missing second register or offset for indexed-indirect mode."
msgstr ""
-#: config/tc-m68hc11.c:998
+#: config/tc-m68hc11.c:1020
msgid "Missing second register for indexed-indirect mode."
msgstr ""
-#: config/tc-m68hc11.c:1014
+#: config/tc-m68hc11.c:1036
msgid "Missing `]' to close indexed-indirect mode."
msgstr ""
-#: config/tc-m68hc11.c:1058
+#: config/tc-m68hc11.c:1080
msgid "Illegal operand."
msgstr ""
-#: config/tc-m68hc11.c:1063
+#: config/tc-m68hc11.c:1085
msgid "Missing operand."
msgstr ""
-#: config/tc-m68hc11.c:1115
+#: config/tc-m68hc11.c:1137
msgid "Pre-increment mode is not valid for 68HC11"
msgstr ""
-#: config/tc-m68hc11.c:1128
+#: config/tc-m68hc11.c:1150
msgid "Wrong register in register indirect mode."
msgstr ""
-#: config/tc-m68hc11.c:1136
+#: config/tc-m68hc11.c:1158
msgid "Missing `]' to close register indirect operand."
msgstr ""
-#: config/tc-m68hc11.c:1153
+#: config/tc-m68hc11.c:1175
msgid "Post-decrement mode is not valid for 68HC11."
msgstr ""
-#: config/tc-m68hc11.c:1161
+#: config/tc-m68hc11.c:1183
msgid "Post-increment mode is not valid for 68HC11."
msgstr ""
-#: config/tc-m68hc11.c:1178
+#: config/tc-m68hc11.c:1200
msgid "Invalid indexed indirect mode."
msgstr ""
-#: config/tc-m68hc11.c:1272
+#: config/tc-m68hc11.c:1294
#, c-format
msgid "Trap id `%ld' is out of range."
msgstr ""
-#: config/tc-m68hc11.c:1276
+#: config/tc-m68hc11.c:1298
msgid "Trap id must be within [0x30..0x39] or [0x40..0xff]."
msgstr ""
-#: config/tc-m68hc11.c:1283
+#: config/tc-m68hc11.c:1305
#, c-format
msgid "Operand out of 8-bit range: `%ld'."
msgstr ""
-#: config/tc-m68hc11.c:1290
+#: config/tc-m68hc11.c:1312
msgid "The trap id must be a constant."
msgstr ""
-#: config/tc-m68hc11.c:1315
+#: config/tc-m68hc11.c:1337
#, c-format
msgid "Operand `%x' not recognized in fixup8."
msgstr ""
-#: config/tc-m68hc11.c:1335
+#: config/tc-m68hc11.c:1357
#, c-format
msgid "Operand out of 16-bit range: `%ld'."
msgstr ""
-#: config/tc-m68hc11.c:1356
+#: config/tc-m68hc11.c:1378
#, c-format
msgid "Operand `%x' not recognized in fixup16."
msgstr ""
-#: config/tc-m68hc11.c:1374
+#: config/tc-m68hc11.c:1396
#, c-format
msgid "Unexpected branch conversion with `%x'"
msgstr ""
-#: config/tc-m68hc11.c:1463 config/tc-m68hc11.c:1592
+#: config/tc-m68hc11.c:1483 config/tc-m68hc11.c:1612
#, c-format
msgid "Operand out of range for a relative branch: `%ld'"
msgstr ""
-#: config/tc-m68hc11.c:1560
+#: config/tc-m68hc11.c:1580
msgid "Invalid register for dbcc/tbcc instruction."
msgstr ""
-#: config/tc-m68hc11.c:1651
+#: config/tc-m68hc11.c:1671
#, c-format
msgid "Increment/decrement value is out of range: `%ld'."
msgstr ""
-#: config/tc-m68hc11.c:1662
+#: config/tc-m68hc11.c:1682
msgid "Expecting a register."
msgstr ""
-#: config/tc-m68hc11.c:1677
+#: config/tc-m68hc11.c:1697
msgid "Invalid register for post/pre increment."
msgstr ""
-#: config/tc-m68hc11.c:1707
+#: config/tc-m68hc11.c:1727
msgid "Invalid register."
msgstr ""
-#: config/tc-m68hc11.c:1714
+#: config/tc-m68hc11.c:1734
#, c-format
msgid "Offset out of 16-bit range: %ld."
msgstr ""
-#: config/tc-m68hc11.c:1719
+#: config/tc-m68hc11.c:1739
#, c-format
msgid "Offset out of 5-bit range for movw/movb insn: %ld."
msgstr ""
-#: config/tc-m68hc11.c:1774
+#: config/tc-m68hc11.c:1805
msgid "Expecting register D for indexed indirect mode."
msgstr ""
-#: config/tc-m68hc11.c:1776
+#: config/tc-m68hc11.c:1807
msgid "Indexed indirect mode is not allowed for movb/movw."
msgstr ""
-#: config/tc-m68hc11.c:1793
+#: config/tc-m68hc11.c:1824
msgid "Invalid accumulator register."
msgstr ""
-#: config/tc-m68hc11.c:1818
+#: config/tc-m68hc11.c:1849
msgid "Invalid indexed register."
msgstr ""
-#: config/tc-m68hc11.c:1826
+#: config/tc-m68hc11.c:1857
msgid "Addressing mode not implemented yet."
msgstr ""
-#: config/tc-m68hc11.c:1841
+#: config/tc-m68hc11.c:1872
msgid "Invalid source register for this instruction, use 'tfr'."
msgstr ""
-#: config/tc-m68hc11.c:1843
+#: config/tc-m68hc11.c:1874
msgid "Invalid source register."
msgstr ""
-#: config/tc-m68hc11.c:1848
+#: config/tc-m68hc11.c:1879
msgid "Invalid destination register for this instruction, use 'tfr'."
msgstr ""
-#: config/tc-m68hc11.c:1850
+#: config/tc-m68hc11.c:1881
msgid "Invalid destination register."
msgstr ""
-#: config/tc-m68hc11.c:1939
+#: config/tc-m68hc11.c:1966
msgid "Invalid indexed register, expecting register X."
msgstr ""
-#: config/tc-m68hc11.c:1941
+#: config/tc-m68hc11.c:1968
msgid "Invalid indexed register, expecting register Y."
msgstr ""
-#: config/tc-m68hc11.c:2238
+#: config/tc-m68hc11.c:2260
msgid "No instruction or missing opcode."
msgstr ""
-#: config/tc-m68hc11.c:2303
+#: config/tc-m68hc11.c:2325
#, c-format
msgid "Opcode `%s' is not recognized."
msgstr ""
-#: config/tc-m68hc11.c:2325
+#: config/tc-m68hc11.c:2347
#, c-format
msgid "Garbage at end of instruction: `%s'."
msgstr ""
-#: config/tc-m68hc11.c:2348
+#: config/tc-m68hc11.c:2370
#, c-format
msgid "Invalid operand for `%s'"
msgstr ""
-#: config/tc-m68hc11.c:2405
+#: config/tc-m68hc11.c:2427
#, c-format
msgid "Relocation %d is not supported by object file format."
msgstr ""
-#: config/tc-m68hc11.c:2571
+#: config/tc-m68hc11.c:2606
msgid "bra or bsr with undefined symbol."
msgstr ""
-#: config/tc-m68hc11.c:2683
+#: config/tc-m68hc11.c:2676 config/tc-m68hc11.c:2726
#, c-format
msgid "Subtype %d is not recognized."
msgstr ""
-#: config/tc-m68hc11.c:2720
+#: config/tc-m68hc11.c:2759
msgid "Expression too complex."
msgstr ""
-#: config/tc-m68hc11.c:2749
+#: config/tc-m68hc11.c:2787
msgid "Value out of 16-bit range."
msgstr ""
-#: config/tc-m68hc11.c:2772
+#: config/tc-m68hc11.c:2810
#, c-format
msgid "Value %ld too large for 8-bit PC-relative branch."
msgstr ""
-#: config/tc-m68hc11.c:2779
+#: config/tc-m68hc11.c:2817
#, c-format
msgid "Auto increment/decrement offset '%ld' is out of range."
msgstr ""
-#: config/tc-m68hc11.c:2790
+#: config/tc-m68hc11.c:2828
#, c-format
msgid "Line %d: unknown relocation type: 0x%x."
msgstr ""
-#: config/tc-m68k.c:680
+#: config/tc-m68k.c:684
msgid "Unknown PC relative instruction"
msgstr ""
-#: config/tc-m68k.c:806
+#: config/tc-m68k.c:823
#, c-format
msgid "Can not do %d byte pc-relative relocation"
msgstr ""
-#: config/tc-m68k.c:808
+#: config/tc-m68k.c:825
#, c-format
msgid "Can not do %d byte pc-relative pic relocation"
msgstr ""
-#: config/tc-m68k.c:813
+#: config/tc-m68k.c:830
#, c-format
msgid "Can not do %d byte relocation"
msgstr ""
-#: config/tc-m68k.c:815
+#: config/tc-m68k.c:832
#, c-format
msgid "Can not do %d byte pic relocation"
msgstr ""
-#: config/tc-m68k.c:919 config/tc-mips.c:11242
+#: config/tc-m68k.c:904
+#, c-format
+msgid "Unable to produce reloc against symbol '%s'"
+msgstr ""
+
+#: config/tc-m68k.c:948 config/tc-mips.c:12429
#, c-format
msgid "Cannot make %s relocation PC relative"
msgstr ""
-#: config/tc-m68k.c:1032 config/tc-tahoe.c:1503 config/tc-vax.c:1766
+#: config/tc-m68k.c:1041 config/tc-tahoe.c:1495 config/tc-vax.c:1762
msgid "No operator"
msgstr ""
-#: config/tc-m68k.c:1062 config/tc-tahoe.c:1520 config/tc-vax.c:1783
+#: config/tc-m68k.c:1071 config/tc-tahoe.c:1512 config/tc-vax.c:1779
msgid "Unknown operator"
msgstr ""
-#: config/tc-m68k.c:1837
+#: config/tc-m68k.c:1846
msgid "invalid instruction for this architecture; needs "
msgstr ""
-#: config/tc-m68k.c:1842
+#: config/tc-m68k.c:1851
msgid "fpu (68040, 68060 or 68881/68882)"
msgstr ""
-#: config/tc-m68k.c:1845
+#: config/tc-m68k.c:1854
msgid "mmu (68030 or 68851)"
msgstr ""
-#: config/tc-m68k.c:1848
+#: config/tc-m68k.c:1857
msgid "68020 or higher"
msgstr ""
-#: config/tc-m68k.c:1851
+#: config/tc-m68k.c:1860
msgid "68000 or higher"
msgstr ""
-#: config/tc-m68k.c:1854
+#: config/tc-m68k.c:1863
msgid "68010 or higher"
msgstr ""
-#: config/tc-m68k.c:1883
+#: config/tc-m68k.c:1892
msgid "operands mismatch"
msgstr ""
-#: config/tc-m68k.c:1940 config/tc-m68k.c:1946 config/tc-m68k.c:1952
+#: config/tc-m68k.c:1949 config/tc-m68k.c:1955 config/tc-m68k.c:1961
+#: config/tc-mmix.c:2448 config/tc-mmix.c:2472
msgid "operand out of range"
msgstr ""
-#: config/tc-m68k.c:2009
+#: config/tc-m68k.c:2018
#, c-format
msgid "Bignum too big for %c format; truncated"
msgstr ""
-#: config/tc-m68k.c:2077
+#: config/tc-m68k.c:2086
msgid "displacement too large for this architecture; needs 68020 or higher"
msgstr ""
-#: config/tc-m68k.c:2187
+#: config/tc-m68k.c:2196
msgid ""
"scale factor invalid on this architecture; needs cpu32 or 68020 or higher"
msgstr ""
-#: config/tc-m68k.c:2192
+#: config/tc-m68k.c:2201
msgid "invalid index size for coldfire"
msgstr ""
-#: config/tc-m68k.c:2245
+#: config/tc-m68k.c:2254
msgid "Forcing byte displacement"
msgstr ""
-#: config/tc-m68k.c:2247
+#: config/tc-m68k.c:2256
msgid "byte displacement out of range"
msgstr ""
-#: config/tc-m68k.c:2294 config/tc-m68k.c:2332
+#: config/tc-m68k.c:2303 config/tc-m68k.c:2341
msgid "invalid operand mode for this architecture; needs 68020 or higher"
msgstr ""
-#: config/tc-m68k.c:2318 config/tc-m68k.c:2352
+#: config/tc-m68k.c:2327 config/tc-m68k.c:2361
msgid ":b not permitted; defaulting to :w"
msgstr ""
-#: config/tc-m68k.c:2429
+#: config/tc-m68k.c:2438
msgid "unsupported byte value; use a different suffix"
msgstr ""
-#: config/tc-m68k.c:2443
+#: config/tc-m68k.c:2452
msgid "unknown/incorrect operand"
msgstr ""
-#: config/tc-m68k.c:2476 config/tc-m68k.c:2484 config/tc-m68k.c:2491
-#: config/tc-m68k.c:2498
+#: config/tc-m68k.c:2485 config/tc-m68k.c:2493 config/tc-m68k.c:2500
+#: config/tc-m68k.c:2507
msgid "out of range"
msgstr ""
-#: config/tc-m68k.c:2548
+#: config/tc-m68k.c:2553
msgid "Can't use long branches on 68000/68010/5200"
msgstr ""
-#: config/tc-m68k.c:2658
+#: config/tc-m68k.c:2663
msgid "Expression out of range, using 0"
msgstr ""
-#: config/tc-m68k.c:2770 config/tc-m68k.c:2786
+#: config/tc-m68k.c:2775 config/tc-m68k.c:2791
msgid "Floating point register in register list"
msgstr ""
-#: config/tc-m68k.c:2776
+#: config/tc-m68k.c:2781
msgid "Wrong register in floating-point reglist"
msgstr ""
-#: config/tc-m68k.c:2792
+#: config/tc-m68k.c:2797
msgid "incorrect register in reglist"
msgstr ""
-#: config/tc-m68k.c:2798
+#: config/tc-m68k.c:2803
msgid "wrong register in floating-point reglist"
msgstr ""
-#: config/tc-m68k.c:2874
-msgid "failed sanity check"
-msgstr ""
-
#. ERROR
-#: config/tc-m68k.c:3239
+#: config/tc-m68k.c:3244
msgid "Extra )"
msgstr ""
#. ERROR
-#: config/tc-m68k.c:3250
+#: config/tc-m68k.c:3255
msgid "Missing )"
msgstr ""
-#: config/tc-m68k.c:3267
+#: config/tc-m68k.c:3272
msgid "Missing operand"
msgstr ""
-#: config/tc-m68k.c:3599
+#: config/tc-m68k.c:3604
#, c-format
msgid "%s -- statement `%s' ignored"
msgstr ""
-#: config/tc-m68k.c:3643
+#: config/tc-m68k.c:3653
#, c-format
msgid "Don't know how to figure width of %c in md_assemble()"
msgstr ""
-#: config/tc-m68k.c:3811 config/tc-m68k.c:3849
+#: config/tc-m68k.c:3835 config/tc-m68k.c:3873
#, c-format
msgid "Internal Error: Can't find %s in hash table"
msgstr ""
-#: config/tc-m68k.c:3814 config/tc-m68k.c:3852
+#: config/tc-m68k.c:3838 config/tc-m68k.c:3876
#, c-format
msgid "Internal Error: Can't hash %s: %s"
msgstr ""
-#: config/tc-m68k.c:3980
+#: config/tc-m68k.c:4002
#, c-format
msgid "unrecognized default cpu `%s' ???"
msgstr ""
-#: config/tc-m68k.c:3992
+#: config/tc-m68k.c:4014
msgid "68040 and 68851 specified; mmu instructions may assemble incorrectly"
msgstr ""
-#: config/tc-m68k.c:4012
+#: config/tc-m68k.c:4034
msgid "options for 68881 and no-68881 both given"
msgstr ""
-#: config/tc-m68k.c:4014
+#: config/tc-m68k.c:4036
msgid "options for 68851 and no-68851 both given"
msgstr ""
-#: config/tc-m68k.c:4085
+#: config/tc-m68k.c:4107
#, c-format
msgid "text label `%s' aligned to odd boundary"
msgstr ""
-#: config/tc-m68k.c:4302
+#: config/tc-m68k.c:4326
msgid "invalid byte branch offset"
msgstr ""
-#: config/tc-m68k.c:4360
+#: config/tc-m68k.c:4363
msgid "short branch with zero offset: use :w"
msgstr ""
-#: config/tc-m68k.c:4896 config/tc-m68k.c:4907
+#: config/tc-m68k.c:4832 config/tc-m68k.c:4843
msgid "expression out of range: defaulting to 1"
msgstr ""
-#: config/tc-m68k.c:4939
+#: config/tc-m68k.c:4875
msgid "expression out of range: defaulting to 0"
msgstr ""
-#: config/tc-m68k.c:4972 config/tc-m68k.c:4984
+#: config/tc-m68k.c:4908 config/tc-m68k.c:4920
#, c-format
msgid "Can't deal with expression; defaulting to %ld"
msgstr ""
-#: config/tc-m68k.c:4998
+#: config/tc-m68k.c:4934
msgid "expression doesn't fit in BYTE"
msgstr ""
-#: config/tc-m68k.c:5002
+#: config/tc-m68k.c:4938
msgid "expression doesn't fit in WORD"
msgstr ""
-#: config/tc-m68k.c:5095
+#: config/tc-m68k.c:5031
#, c-format
msgid "%s: unrecognized processor name"
msgstr ""
-#: config/tc-m68k.c:5160
+#: config/tc-m68k.c:5096
msgid "bad coprocessor id"
msgstr ""
-#: config/tc-m68k.c:5166
+#: config/tc-m68k.c:5102
msgid "unrecognized fopt option"
msgstr ""
-#: config/tc-m68k.c:5300
+#: config/tc-m68k.c:5236
#, c-format
msgid "option `%s' may not be negated"
msgstr ""
-#: config/tc-m68k.c:5311
+#: config/tc-m68k.c:5247
#, c-format
msgid "option `%s' not recognized"
msgstr ""
-#: config/tc-m68k.c:5344
+#: config/tc-m68k.c:5280
msgid "bad format of OPT NEST=depth"
msgstr ""
-#: config/tc-m68k.c:5407
+#: config/tc-m68k.c:5343
msgid "missing label"
msgstr ""
-#: config/tc-m68k.c:5431 config/tc-m68k.c:5460
+#: config/tc-m68k.c:5367 config/tc-m68k.c:5396
msgid "bad register list"
msgstr ""
-#: config/tc-m68k.c:5433
+#: config/tc-m68k.c:5369
#, c-format
msgid "bad register list: %s"
msgstr ""
-#: config/tc-m68k.c:5531
+#: config/tc-m68k.c:5467
msgid "restore without save"
msgstr ""
-#: config/tc-m68k.c:5708 config/tc-m68k.c:6057
+#: config/tc-m68k.c:5641 config/tc-m68k.c:6026
msgid "syntax error in structured control directive"
msgstr ""
-#: config/tc-m68k.c:5759
+#: config/tc-m68k.c:5690
msgid "missing condition code in structured control directive"
msgstr ""
-#: config/tc-m68k.c:6091
+#: config/tc-m68k.c:5762
+#, c-format
+msgid ""
+"Condition <%c%c> in structured control directive can not be encoded correctly"
+msgstr ""
+
+#: config/tc-m68k.c:6069
msgid "missing then"
msgstr ""
-#: config/tc-m68k.c:6173
+#: config/tc-m68k.c:6151
msgid "else without matching if"
msgstr ""
-#: config/tc-m68k.c:6207
+#: config/tc-m68k.c:6185
msgid "endi without matching if"
msgstr ""
-#: config/tc-m68k.c:6248
+#: config/tc-m68k.c:6226
msgid "break outside of structured loop"
msgstr ""
-#: config/tc-m68k.c:6287
+#: config/tc-m68k.c:6265
msgid "next outside of structured loop"
msgstr ""
-#: config/tc-m68k.c:6339
+#: config/tc-m68k.c:6317
msgid "missing ="
msgstr ""
-#: config/tc-m68k.c:6377
+#: config/tc-m68k.c:6355
msgid "missing to or downto"
msgstr ""
-#: config/tc-m68k.c:6413 config/tc-m68k.c:6447 config/tc-m68k.c:6657
+#: config/tc-m68k.c:6391 config/tc-m68k.c:6425 config/tc-m68k.c:6644
msgid "missing do"
msgstr ""
-#: config/tc-m68k.c:6550
+#: config/tc-m68k.c:6528
msgid "endf without for"
msgstr ""
-#: config/tc-m68k.c:6606
+#: config/tc-m68k.c:6584
msgid "until without repeat"
msgstr ""
-#: config/tc-m68k.c:6693
+#: config/tc-m68k.c:6680
msgid "endw without while"
msgstr ""
-#: config/tc-m68k.c:6817
+#: config/tc-m68k.c:6804
#, c-format
msgid "unrecognized option `%s'"
msgstr ""
-#: config/tc-m68k.c:6862
+#: config/tc-m68k.c:6849
#, c-format
msgid "unrecognized architecture specification `%s'"
msgstr ""
-#: config/tc-m68k.c:6932
+#: config/tc-m68k.c:6919
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"
+"-m68000 | -m68008 | -m68010 | -m68020 | -m68030 | -m68040 | -m68060 |\n"
+"-m68302 | -m68331 | -m68332 | -m68333 | -m68340 | -m68360 | -mcpu32 |\n"
+"-m5200 | -m5202 | -m5204 | -m5206 | -m5206e | -m5307 | -m5407\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:6942
+#: config/tc-m68k.c:6929
msgid ""
"-m68851 | -mno-68851\n"
"\t\t\ttarget has/lacks memory-management unit coprocessor\n"
@@ -4873,7 +5093,7 @@ msgid ""
"--bitwise-or\t\tdo not treat `|' as a comment character\n"
msgstr ""
-#: config/tc-m68k.c:6952
+#: config/tc-m68k.c:6939
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"
@@ -4881,82 +5101,68 @@ msgid ""
"--disp-size-default-32\tdisplacement with unknown size is 32 bits (default)\n"
msgstr ""
-#: config/tc-m68k.c:6987
+#: config/tc-m68k.c:6974
#, c-format
msgid "Error %s in %s\n"
msgstr ""
-#: config/tc-m68k.c:6991
+#: config/tc-m68k.c:6978
#, c-format
msgid "Opcode(%d.%s): "
msgstr ""
-#: config/tc-m88k.c:205
+#: config/tc-m88k.c:201
#, c-format
msgid "Can't hash instruction '%s':%s"
msgstr ""
-#: config/tc-m88k.c:257
+#: config/tc-m88k.c:250
#, c-format
msgid "Invalid mnemonic '%s'"
msgstr ""
-#: config/tc-m88k.c:277
+#: config/tc-m88k.c:268
msgid "Parameter syntax error"
msgstr ""
-#: config/tc-m88k.c:332
+#: config/tc-m88k.c:321
msgid "Unknown relocation type"
msgstr ""
#. Having this here repeats the warning somtimes.
#. But can't we stand that?
-#: config/tc-m88k.c:445
+#: config/tc-m88k.c:434
msgid "Use of obsolete instruction"
msgstr ""
-#: config/tc-m88k.c:562
+#: config/tc-m88k.c:551
msgid "Expression truncated to 16 bits"
msgstr ""
-#: config/tc-m88k.c:628 config/tc-m88k.c:650
+#: config/tc-m88k.c:617 config/tc-m88k.c:639
msgid "Expression truncated to 5 bits"
msgstr ""
-#: config/tc-m88k.c:872
+#: config/tc-m88k.c:856
msgid "Expression truncated to 9 bits"
msgstr ""
-#: config/tc-m88k.c:894
+#: config/tc-m88k.c:878
msgid "Removed lower 2 bits of expression"
msgstr ""
-#: config/tc-m88k.c:1033
-msgid "Bad relocation type"
-msgstr ""
-
-#: config/tc-m88k.c:1046
+#: config/tc-m88k.c:952
msgid "md_number_to_disp not defined"
msgstr ""
-#: config/tc-m88k.c:1056
+#: config/tc-m88k.c:962
msgid "md_number_to_field not defined"
msgstr ""
-#: config/tc-m88k.c:1169
+#: config/tc-m88k.c:1077
msgid "Relaxation should never occur"
msgstr ""
-#: config/tc-m88k.c:1264 config/tc-sparc.c:3540 read.c:1962
-#, c-format
-msgid "BSS length (%d.) <0! Ignored."
-msgstr ""
-
-#: config/tc-m88k.c:1308
-#, c-format
-msgid "Ignoring attempt to re-define symbol %s."
-msgstr ""
-
#: config/tc-m88k.h:78
msgid "m88k convert_frag\n"
msgstr ""
@@ -5109,7 +5315,7 @@ msgstr ""
msgid "ignoring operands: %s "
msgstr ""
-#: config/tc-mcore.c:1767 config/tc-w65.c:836
+#: config/tc-mcore.c:1767 config/tc-w65.c:829
msgid "Bad call to MD_NTOF()"
msgstr ""
@@ -5136,381 +5342,472 @@ msgstr ""
msgid "failed sanity check: long_jump"
msgstr ""
-#: config/tc-mcore.c:1916
+#: config/tc-mcore.c:1915
#, c-format
msgid "odd displacement at %x"
msgstr ""
-#: config/tc-mcore.c:2104
+#: config/tc-mcore.c:2099
msgid "unknown"
msgstr ""
-#: config/tc-mcore.c:2135
+#: config/tc-mcore.c:2130
#, c-format
msgid "odd distance branch (0x%x bytes)"
msgstr ""
-#: config/tc-mcore.c:2139
+#: config/tc-mcore.c:2134
#, c-format
msgid "pcrel for branch to %s too far (0x%x)"
msgstr ""
-#: config/tc-mcore.c:2158
+#: config/tc-mcore.c:2153
#, c-format
msgid "pcrel for lrw/jmpi/jsri to %s too far (0x%x)"
msgstr ""
-#: config/tc-mcore.c:2169
+#: config/tc-mcore.c:2164
#, c-format
msgid "pcrel for loopt too far (0x%x)"
msgstr ""
-#: config/tc-mcore.c:2400
+#: config/tc-mcore.c:2394
#, c-format
msgid "Can not do %d byte %srelocation"
msgstr ""
-#: config/tc-mcore.c:2402
+#: config/tc-mcore.c:2396
msgid "pc-relative"
msgstr ""
-#: config/tc-mcore.c:2419 config/tc-pj.c:569 config/tc-sh.c:3326
-#, c-format
-msgid "Cannot represent relocation type %s"
-msgstr ""
-
-#: config/tc-mips.c:642
+#: config/tc-mips.c:659
#, c-format
msgid "internal Error, line %d, %s"
msgstr ""
-#: config/tc-mips.c:644
+#: config/tc-mips.c:661
msgid "MIPS internal Error"
msgstr ""
-#: config/tc-mips.c:927
+#: config/tc-mips.c:1028
msgid "-G not supported in this configuration."
msgstr ""
-#: config/tc-mips.c:996
+#: config/tc-mips.c:1056
+msgid ""
+"The -mcpu option can't be used together with -march. Use -mtune instead of -"
+"mcpu."
+msgstr ""
+
+#: config/tc-mips.c:1064
+msgid ""
+"The -mcpu option can't be used together with -mtune. Use -march instead of -"
+"mcpu."
+msgstr ""
+
+#: config/tc-mips.c:1113 config/tc-mips.c:1138
+msgid "The -mcpu option is deprecated. Please use -march and -mtune instead."
+msgstr ""
+
+#. This really should be an error instead of a warning, but old
+#. compilers only have -mcpu which sets both arch and tune. For
+#. now, we discard arch and preserve tune.
+#: config/tc-mips.c:1158
+msgid "The -march option is incompatible to -mipsN and therefore ignored."
+msgstr ""
+
+#: config/tc-mips.c:1210
msgid "trap exception not supported at ISA 1"
msgstr ""
-#: config/tc-mips.c:1053
+#: config/tc-mips.c:1274
#, c-format
msgid "internal: can't hash `%s': %s"
msgstr ""
-#: config/tc-mips.c:1061
+#: config/tc-mips.c:1282
#, c-format
msgid "internal error: bad mips16 opcode: %s %s\n"
msgstr ""
-#: config/tc-mips.c:1229
+#: config/tc-mips.c:1456
#, c-format
msgid "returned from mips_ip(%s) insn_opcode = 0x%x\n"
msgstr ""
-#: config/tc-mips.c:1782 config/tc-mips.c:11374
+#: config/tc-mips.c:2012 config/tc-mips.c:12574
msgid "extended instruction in delay slot"
msgstr ""
-#: config/tc-mips.c:1804 config/tc-mips.c:1811
+#: config/tc-mips.c:2056 config/tc-mips.c:2067
#, c-format
msgid "jump to misaligned address (0x%lx)"
msgstr ""
-#: config/tc-mips.c:2460 config/tc-mips.c:2814
+#: config/tc-mips.c:2060 config/tc-mips.c:2071
+#, c-format
+msgid "jump address range overflow (0x%lx)"
+msgstr ""
+
+#: config/tc-mips.c:2864 config/tc-mips.c:3222
msgid "Macro instruction expanded into multiple instructions"
msgstr ""
-#: config/tc-mips.c:2867
+#: config/tc-mips.c:3275
msgid "unsupported large constant"
msgstr ""
-#: config/tc-mips.c:2869
+#: config/tc-mips.c:3277
#, c-format
msgid "Instruction %s requires absolute expression"
msgstr ""
-#: config/tc-mips.c:3015
-msgid "Number larger than 32 bits"
+#: config/tc-mips.c:3423
+#, c-format
+msgid "Number (0x%lx) larger than 32 bits"
msgstr ""
-#: config/tc-mips.c:3036
+#: config/tc-mips.c:3445
msgid "Number larger than 64 bits"
msgstr ""
-#: config/tc-mips.c:3304 config/tc-mips.c:3376 config/tc-mips.c:5055
-#: config/tc-mips.c:5106 config/tc-mips.c:5642 config/tc-mips.c:5705
+#: config/tc-mips.c:3765 config/tc-mips.c:3823 config/tc-mips.c:5671
+#: config/tc-mips.c:5715 config/tc-mips.c:6235 config/tc-mips.c:6293
msgid "PIC code offset overflow (max 16 signed bits)"
msgstr ""
-#: config/tc-mips.c:3615
+#: config/tc-mips.c:4070
#, c-format
msgid "Branch %s is always false (nop)"
msgstr ""
-#: config/tc-mips.c:3620
+#: config/tc-mips.c:4078
#, c-format
msgid "Branch likely %s is always false"
msgstr ""
-#: config/tc-mips.c:3627 config/tc-mips.c:3701 config/tc-mips.c:3804
-#: config/tc-mips.c:3859 config/tc-mips.c:6742 config/tc-mips.c:6751
-#: config/tc-mips.c:6759 config/tc-mips.c:6868
+#: config/tc-mips.c:4086 config/tc-mips.c:4155 config/tc-mips.c:4250
+#: config/tc-mips.c:4300 config/tc-mips.c:7343 config/tc-mips.c:7351
+#: config/tc-mips.c:7359 config/tc-mips.c:7468
msgid "Unsupported large constant"
msgstr ""
#. result is always true
-#: config/tc-mips.c:3663
+#: config/tc-mips.c:4120
#, c-format
msgid "Branch %s is always true"
msgstr ""
-#: config/tc-mips.c:3935 config/tc-mips.c:4042
+#: config/tc-mips.c:4372 config/tc-mips.c:4484
msgid "Divide by zero."
msgstr ""
-#: config/tc-mips.c:4626
+#: config/tc-mips.c:5112
msgid "MIPS PIC call to register other than $25"
msgstr ""
-#: config/tc-mips.c:4631 config/tc-mips.c:4743
+#: config/tc-mips.c:5119 config/tc-mips.c:5130 config/tc-mips.c:5232
+#: config/tc-mips.c:5243
msgid "No .cprestore pseudo-op used in PIC code"
msgstr ""
-#: config/tc-mips.c:4816 config/tc-mips.c:4905 config/tc-mips.c:5393
-#: config/tc-mips.c:5434 config/tc-mips.c:5452 config/tc-mips.c:6081
+#: config/tc-mips.c:5124 config/tc-mips.c:5237
+msgid "No .frame pseudo-op used in PIC code"
+msgstr ""
+
+#: config/tc-mips.c:5315 config/tc-mips.c:5404 config/tc-mips.c:5986
+#: config/tc-mips.c:6027 config/tc-mips.c:6045 config/tc-mips.c:6676
msgid "opcode not supported on this processor"
msgstr ""
-#: config/tc-mips.c:5912 config/tc-mips.c:6636
+#: config/tc-mips.c:6490 config/tc-mips.c:7234
msgid "Macro used $at after \".set noat\""
msgstr ""
-#: config/tc-mips.c:6052 config/tc-mips.c:6070
+#: config/tc-mips.c:6642 config/tc-mips.c:6664
msgid "rotate count too large"
msgstr ""
-#: config/tc-mips.c:6121
+#: config/tc-mips.c:6716
#, c-format
msgid "Instruction %s: result is always false"
msgstr ""
-#: config/tc-mips.c:6290
+#: config/tc-mips.c:6889
#, c-format
msgid "Instruction %s: result is always true"
msgstr ""
-#: config/tc-mips.c:6429 config/tc-mips.c:6456 config/tc-mips.c:6528
-#: config/tc-mips.c:6553
+#: config/tc-mips.c:7028 config/tc-mips.c:7057 config/tc-mips.c:7127
+#: config/tc-mips.c:7153
msgid "operand overflow"
msgstr ""
#. FIXME: Check if this is one of the itbl macros, since they
#. are added dynamically.
-#: config/tc-mips.c:6632
+#: config/tc-mips.c:7230
#, c-format
msgid "Macro %s not implemented yet"
msgstr ""
-#: config/tc-mips.c:6902
+#: config/tc-mips.c:7501
#, c-format
msgid "internal: bad mips opcode (mask error): %s %s"
msgstr ""
-#: config/tc-mips.c:6958
+#: config/tc-mips.c:7557
#, c-format
msgid "internal: bad mips opcode (unknown operand type `%c'): %s %s"
msgstr ""
-#: config/tc-mips.c:6965
+#: config/tc-mips.c:7564
#, c-format
msgid "internal: bad mips opcode (bits 0x%lx undefined): %s %s"
msgstr ""
-#: config/tc-mips.c:7073
+#: config/tc-mips.c:7676
#, c-format
msgid "opcode not supported on this processor: %s (%s)"
msgstr ""
-#: config/tc-mips.c:7144
+#: config/tc-mips.c:7753
#, c-format
msgid "Improper shift amount (%ld)"
msgstr ""
-#: config/tc-mips.c:7170 config/tc-mips.c:8324 config/tc-mips.c:8439
+#: config/tc-mips.c:7779 config/tc-mips.c:8992 config/tc-mips.c:9107
#, c-format
msgid "Invalid value for `%s' (%lu)"
msgstr ""
-#: config/tc-mips.c:7188
+#: config/tc-mips.c:7797
#, c-format
msgid "Illegal break code (%ld)"
msgstr ""
-#: config/tc-mips.c:7202
+#: config/tc-mips.c:7811
#, c-format
msgid "Illegal lower break code (%ld)"
msgstr ""
-#: config/tc-mips.c:7215
+#: config/tc-mips.c:7824
#, c-format
msgid "Illegal 20-bit code (%ld)"
msgstr ""
-#: config/tc-mips.c:7227
+#: config/tc-mips.c:7836
#, c-format
msgid "Coproccesor code > 25 bits (%ld)"
msgstr ""
-#: config/tc-mips.c:7240
+#: config/tc-mips.c:7849
#, c-format
msgid "Illegal 19-bit code (%ld)"
msgstr ""
-#: config/tc-mips.c:7252
+#: config/tc-mips.c:7861
#, c-format
-msgid "Invalidate performance regster (%ld)"
+msgid "Invalid performance register (%ld)"
msgstr ""
-#: config/tc-mips.c:7289
+#: config/tc-mips.c:7898
#, c-format
msgid "Invalid register number (%d)"
msgstr ""
-#: config/tc-mips.c:7453
+#: config/tc-mips.c:8063
#, c-format
msgid "Invalid float register number (%d)"
msgstr ""
-#: config/tc-mips.c:7463
+#: config/tc-mips.c:8073
#, c-format
msgid "Float register should be even, was %d"
msgstr ""
-#: config/tc-mips.c:7514
+#: config/tc-mips.c:8124
msgid "absolute expression required"
msgstr ""
-#: config/tc-mips.c:7575
+#: config/tc-mips.c:8192
#, c-format
msgid "Bad floating point constant: %s"
msgstr ""
-#: config/tc-mips.c:7697
+#: config/tc-mips.c:8320
msgid "Can't use floating point insn in this section"
msgstr ""
-#: config/tc-mips.c:7751
+#: config/tc-mips.c:8361 config/tc-mips.c:8366 config/tc-mips.c:8497
+#: config/tc-mips.c:8502
+msgid "bad composition of relocations"
+msgstr ""
+
+#: config/tc-mips.c:8399
msgid "16 bit expression not in range 0..65535"
msgstr ""
-#: config/tc-mips.c:7788
+#: config/tc-mips.c:8436
msgid "16 bit expression not in range -32768..32767"
msgstr ""
-#: config/tc-mips.c:7859
+#: config/tc-mips.c:8521
msgid "lui expression not in range 0..65535"
msgstr ""
-#: config/tc-mips.c:7883
+#: config/tc-mips.c:8545
#, c-format
msgid "invalid condition code register $fcc%d"
msgstr ""
-#: config/tc-mips.c:7908
+#: config/tc-mips.c:8570
msgid "invalid coprocessor sub-selection value (0-7)"
msgstr ""
-#: config/tc-mips.c:7913
+#: config/tc-mips.c:8575
#, c-format
msgid "bad char = '%c'\n"
msgstr ""
-#: config/tc-mips.c:7926 config/tc-mips.c:8464
+#: config/tc-mips.c:8586 config/tc-mips.c:8591 config/tc-mips.c:9132
msgid "illegal operands"
msgstr ""
-#: config/tc-mips.c:7993
+#: config/tc-mips.c:8658
msgid "unrecognized opcode"
msgstr ""
-#: config/tc-mips.c:8102
+#: config/tc-mips.c:8770
#, c-format
msgid "invalid register number (%d)"
msgstr ""
-#: config/tc-mips.c:8183
+#: config/tc-mips.c:8851
msgid "used $at without \".set noat\""
msgstr ""
-#: config/tc-mips.c:8358
+#: config/tc-mips.c:9026
msgid "can't parse register list"
msgstr ""
-#: config/tc-mips.c:8392 config/tc-mips.c:8422
-msgid "invalid register list"
-msgstr ""
-
-#: config/tc-mips.c:8590
+#: config/tc-mips.c:9258
msgid "extended operand requested but not required"
msgstr ""
-#: config/tc-mips.c:8592
+#: config/tc-mips.c:9260
msgid "invalid unextended operand value"
msgstr ""
-#: config/tc-mips.c:8620
+#: config/tc-mips.c:9288
msgid "operand value out of range for instruction"
msgstr ""
-#: config/tc-mips.c:9005
+#: config/tc-mips.c:9520
+msgid "internal error"
+msgstr ""
+
+#: config/tc-mips.c:9840
+#, c-format
+msgid "invalid architecture -mtune=%s"
+msgstr ""
+
+#: config/tc-mips.c:9843
+#, c-format
+msgid "invalid architecture -march=%s"
+msgstr ""
+
+#: config/tc-mips.c:9846
#, c-format
msgid "invalid architecture -mcpu=%s"
msgstr ""
-#: config/tc-mips.c:9054
+#: config/tc-mips.c:9858
+#, c-format
+msgid "A different -mtune= was already specified, is now -mtune=%s"
+msgstr ""
+
+#: config/tc-mips.c:9864
+#, c-format
+msgid "A different -march= was already specified, is now -march=%s"
+msgstr ""
+
+#: config/tc-mips.c:9870
+#, c-format
+msgid "A different -mcpu= was already specified, is now -mcpu=%s"
+msgstr ""
+
+#: config/tc-mips.c:9880
+msgid "A different -march= or -mtune= was already specified, is now -m4650"
+msgstr ""
+
+#: config/tc-mips.c:9892
+msgid "A different -march= or -mtune= was already specified, is now -m4010"
+msgstr ""
+
+#: config/tc-mips.c:9904
+msgid "A different -march= or -mtune= was already specified, is now -m4100"
+msgstr ""
+
+#: config/tc-mips.c:9916
+msgid "A different -march= or -mtune= was already specified, is now -m3900"
+msgstr ""
+
+#: config/tc-mips.c:9939
msgid "-G may not be used with embedded PIC code"
msgstr ""
-#: config/tc-mips.c:9066
+#: config/tc-mips.c:9952
msgid "-call_shared is supported only for ELF format"
msgstr ""
-#: config/tc-mips.c:9072 config/tc-mips.c:10158 config/tc-mips.c:10332
+#: config/tc-mips.c:9958 config/tc-mips.c:11148 config/tc-mips.c:11350
msgid "-G may not be used with SVR4 PIC code"
msgstr ""
-#: config/tc-mips.c:9081
+#: config/tc-mips.c:9967
msgid "-non_shared is supported only for ELF format"
msgstr ""
-#: config/tc-mips.c:9097
+#: config/tc-mips.c:9984
msgid "-G is not supported for this configuration"
msgstr ""
-#: config/tc-mips.c:9102
+#: config/tc-mips.c:9989
msgid "-G may not be used with SVR4 or embedded PIC code"
msgstr ""
-#: config/tc-mips.c:9126
+#: config/tc-mips.c:10003
+msgid "-32 is supported for ELF format only"
+msgstr ""
+
+#: config/tc-mips.c:10012
+msgid "-n32 is supported for ELF format only"
+msgstr ""
+
+#: config/tc-mips.c:10021
+msgid "-64 is supported for ELF format only"
+msgstr ""
+
+#: config/tc-mips.c:10026 config/tc-mips.c:10065
msgid "No compiled in support for 64 bit object file format"
msgstr ""
-#: config/tc-mips.c:9218
+#: config/tc-mips.c:10052
+msgid "-mabi is supported for ELF format only"
+msgstr ""
+
+#: config/tc-mips.c:10126
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, -g2\t\t\tdo not remove unneeded 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:9226
+#: config/tc-mips.c:10134
msgid ""
"-mips1\t\t\tgenerate MIPS ISA I instructions\n"
"-mips2\t\t\tgenerate MIPS ISA II instructions\n"
@@ -5519,245 +5816,508 @@ msgid ""
"-mips5 generate MIPS ISA V instructions\n"
"-mips32 generate MIPS32 ISA instructions\n"
"-mips64 generate MIPS64 ISA instructions\n"
-"-mcpu=CPU\t\tgenerate code for CPU, where CPU is one of:\n"
+"-march=CPU/-mtune=CPU\tgenerate code/schedule for CPU, where CPU is one of:\n"
msgstr ""
-#: config/tc-mips.c:9257
+#: config/tc-mips.c:10170
msgid ""
-"-mCPU\t\t\tequivalent to -mcpu=CPU.\n"
+"-mCPU\t\t\tequivalent to -march=CPU -mtune=CPU. Deprecated.\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:9270
+#: config/tc-mips.c:10183
msgid ""
"-mips16\t\t\tgenerate mips16 instructions\n"
"-no-mips16\t\tdo not generate mips16 instructions\n"
msgstr ""
-#: config/tc-mips.c:9273
+#: config/tc-mips.c:10186
msgid ""
+"-mgp32\t\t\tuse 32-bit GPRs, regardless of the chosen ISA\n"
+"-mfp32\t\t\tuse 32-bit FPRs, regardless of the chosen ISA\n"
"-O0\t\t\tremove unneeded NOPs, do not swap branches\n"
"-O\t\t\tremove unneeded NOPs and swap branches\n"
+"-n\t\t\twarn about NOPs generated from macros\n"
"--[no-]construct-floats [dis]allow floating point values to be constructed\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:9280
+#: config/tc-mips.c:10196
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"
+"-mabi=ABI\t\tcreate ABI conformant object file for:\n"
msgstr ""
-#: config/tc-mips.c:9337
-#, c-format
-msgid "Unsupported reloc size %d"
+#: config/tc-mips.c:10212
+msgid ""
+"-32\t\t\tcreate o32 ABI object file (default)\n"
+"-n32\t\t\tcreate n32 ABI object file\n"
+"-64\t\t\tcreate 64 ABI object file\n"
msgstr ""
-#: config/tc-mips.c:9440
+#: config/tc-mips.c:10342
+#, c-format
msgid "Unmatched %%hi reloc"
msgstr ""
-#: config/tc-mips.c:9563
+#: config/tc-mips.c:10554
msgid "Invalid PC relative reloc"
msgstr ""
-#: config/tc-mips.c:9673 config/tc-sparc.c:3101 config/tc-sparc.c:3108
-#: config/tc-sparc.c:3115 config/tc-sparc.c:3122 config/tc-sparc.c:3129
-#: config/tc-sparc.c:3138 config/tc-sparc.c:3149 config/tc-sparc.c:3175
-#: config/tc-sparc.c:3203 write.c:992 write.c:1056
+#: config/tc-mips.c:10662 config/tc-sparc.c:3106 config/tc-sparc.c:3113
+#: config/tc-sparc.c:3120 config/tc-sparc.c:3127 config/tc-sparc.c:3134
+#: config/tc-sparc.c:3143 config/tc-sparc.c:3154 config/tc-sparc.c:3176
+#: config/tc-sparc.c:3200 write.c:1026 write.c:1089
msgid "relocation overflow"
msgstr ""
-#: config/tc-mips.c:9689
+#: config/tc-mips.c:10673
#, c-format
msgid "Branch to odd address (%lx)"
msgstr ""
-#: config/tc-mips.c:9853
+#: config/tc-mips.c:10735
+msgid "Branch out of range"
+msgstr ""
+
+#: config/tc-mips.c:10843
#, c-format
msgid "%08lx UNDEFINED\n"
msgstr ""
-#: config/tc-mips.c:9919
+#: config/tc-mips.c:10906
+#, c-format
+msgid "Alignment too large: %d. assumed."
+msgstr ""
+
+#: config/tc-mips.c:10909
msgid "Alignment negative: 0 assumed."
msgstr ""
-#: config/tc-mips.c:10007
+#: config/tc-mips.c:10997
msgid "No read only data section in this object file format"
msgstr ""
-#: config/tc-mips.c:10030
+#: config/tc-mips.c:11020
msgid "Global pointers not supported; recompile -G 0"
msgstr ""
-#: config/tc-mips.c:10116
+#: config/tc-mips.c:11106
#, c-format
msgid "%s: no such section"
msgstr ""
-#: config/tc-mips.c:10153
+#: config/tc-mips.c:11143
#, c-format
msgid ".option pic%d not supported"
msgstr ""
-#: config/tc-mips.c:10164
+#: config/tc-mips.c:11154
#, c-format
msgid "Unrecognized option \"%s\""
msgstr ""
-#: config/tc-mips.c:10227
+#: config/tc-mips.c:11217
msgid "`noreorder' must be set before `nomacro'"
msgstr ""
-#: config/tc-mips.c:10269
-msgid "unknown ISA level"
+#: config/tc-mips.c:11273 config/tc-mips.c:11287
+#, c-format
+msgid "unknown ISA level %s"
msgstr ""
-#: config/tc-mips.c:10291
+#: config/tc-mips.c:11309
msgid ".set pop with no .set push"
msgstr ""
-#: config/tc-mips.c:10315
+#: config/tc-mips.c:11333
#, c-format
msgid "Tried to set unrecognized symbol: %s\n"
msgstr ""
-#: config/tc-mips.c:10365
+#: config/tc-mips.c:11384
msgid ".cpload not in noreorder section"
msgstr ""
-#: config/tc-mips.c:10447
+#: config/tc-mips.c:11441 config/tc-mips.c:11454
+msgid "missing argument separator ',' for .cpsetup"
+msgstr ""
+
+#: config/tc-mips.c:11638
msgid "Unsupported use of .gpword"
msgstr ""
-#: config/tc-mips.c:10584
+#: config/tc-mips.c:11774
msgid "expected `$'"
msgstr ""
-#: config/tc-mips.c:10592
+#: config/tc-mips.c:11782
msgid "Bad register number"
msgstr ""
-#: config/tc-mips.c:10608
+#: config/tc-mips.c:11798
msgid "Unrecognized register name"
msgstr ""
-#: config/tc-mips.c:10807
+#: config/tc-mips.c:11983
msgid "unsupported PC relative reference to different section"
msgstr ""
-#: config/tc-mips.c:10916
+#: config/tc-mips.c:12096
msgid "unsupported relocation"
msgstr ""
-#: config/tc-mips.c:11020
+#: config/tc-mips.c:12200
msgid "AT used after \".set noat\" or macro used after \".set nomacro\""
msgstr ""
-#: config/tc-mips.c:11083
+#: config/tc-mips.c:12269
msgid "Double check fx_r_type in tc-mips.c:tc_gen_reloc"
msgstr ""
-#: config/tc-mips.c:11596
-msgid "missing `.end' at end of assembly"
+#: config/tc-mips.c:12461 config/tc-sh.c:3218
+#, c-format
+msgid "Can not represent %s relocation in this object file format"
+msgstr ""
+
+#: config/tc-mips.c:12800
+msgid "missing .end at end of assembly"
msgstr ""
-#: config/tc-mips.c:11611
-msgid "Expected simple number."
+#: config/tc-mips.c:12815
+msgid "expected simple number"
msgstr ""
-#: config/tc-mips.c:11637
+#: config/tc-mips.c:12841
#, c-format
msgid " *input_line_pointer == '%c' 0x%02x\n"
msgstr ""
-#: config/tc-mips.c:11639
-msgid "Invalid number"
+#: config/tc-mips.c:12843
+msgid "invalid number"
msgstr ""
-#: config/tc-mips.c:11693
+#: config/tc-mips.c:12901
msgid ".end not in text section"
msgstr ""
-#: config/tc-mips.c:11697
+#: config/tc-mips.c:12905
msgid ".end directive without a preceding .ent directive."
msgstr ""
-#: config/tc-mips.c:11706
+#: config/tc-mips.c:12914
msgid ".end symbol does not match .ent symbol."
msgstr ""
-#: config/tc-mips.c:11709
+#: config/tc-mips.c:12917
msgid ".end directive missing or unknown symbol"
msgstr ""
-#: config/tc-mips.c:11784
+#: config/tc-mips.c:12990
msgid ".ent or .aent not in text section."
msgstr ""
-#: config/tc-mips.c:11787
-msgid "missing `.end'"
+#: config/tc-mips.c:12993
+msgid "missing .end"
msgstr ""
-#: config/tc-mips.c:11820 ecoff.c:3205
+#: config/tc-mips.c:13030 ecoff.c:3202
msgid ".frame outside of .ent"
msgstr ""
-#: config/tc-mips.c:11831 ecoff.c:3216
+#: config/tc-mips.c:13041
msgid "Bad .frame directive"
msgstr ""
-#: config/tc-mips.c:11861
+#: config/tc-mips.c:13071
msgid ".mask/.fmask outside of .ent"
msgstr ""
-#: config/tc-mips.c:11868
+#: config/tc-mips.c:13078
msgid "Bad .mask/.fmask directive"
msgstr ""
-#: config/tc-mn10200.c:333
+#: config/tc-mmix.c:669
+msgid " MMIX-specific command line options:\n"
+msgstr ""
+
+#: config/tc-mmix.c:670
+msgid ""
+" -fixed-special-register-names\n"
+" Allow only the original special register names.\n"
+msgstr ""
+
+#: config/tc-mmix.c:673
+msgid " -globalize-symbols Make all symbols global.\n"
+msgstr ""
+
+#: config/tc-mmix.c:675
+msgid " -gnu-syntax Turn off mmixal syntax compatibility.\n"
+msgstr ""
+
+#: config/tc-mmix.c:677
+msgid " -relax Create linker relaxable code.\n"
+msgstr ""
+
+#: config/tc-mmix.c:679
+msgid ""
+" -no-predefined-syms Do not provide mmixal built-in constants.\n"
+" Implies -fixed-special-register-names.\n"
+msgstr ""
+
+#: config/tc-mmix.c:682
+msgid ""
+" -no-expand Do not expand GETA, branches, PUSHJ or JUMP\n"
+" into multiple instructions.\n"
+msgstr ""
+
+#: config/tc-mmix.c:685
+msgid ""
+" -no-merge-gregs Do not merge GREG definitions with nearby values.\n"
+msgstr ""
+
+#: config/tc-mmix.c:687
+msgid ""
+" -x Do not warn when an operand to GETA, a branch,\n"
+" PUSHJ or JUMP is not known to be within range.\n"
+" The linker will catch any errors.\n"
+msgstr ""
+
+#: config/tc-mmix.c:813
+#, c-format
+msgid "unknown opcode: `%s'"
+msgstr ""
+
+#: config/tc-mmix.c:935 config/tc-mmix.c:950
+msgid "specified location wasn't TETRA-aligned"
+msgstr ""
+
+#: config/tc-mmix.c:937 config/tc-mmix.c:952 config/tc-mmix.c:4055
+#: config/tc-mmix.c:4071
+msgid "unaligned data at an absolute location is not supported"
+msgstr ""
+
+#: config/tc-mmix.c:1062
+#, c-format
+msgid "invalid operand to opcode %s: `%s'"
+msgstr ""
+
+#: config/tc-mmix.c:1084 config/tc-mmix.c:1111 config/tc-mmix.c:1144
+#: config/tc-mmix.c:1152 config/tc-mmix.c:1169 config/tc-mmix.c:1197
+#: config/tc-mmix.c:1218 config/tc-mmix.c:1243 config/tc-mmix.c:1291
+#: config/tc-mmix.c:1389 config/tc-mmix.c:1414 config/tc-mmix.c:1446
+#: config/tc-mmix.c:1478 config/tc-mmix.c:1508 config/tc-mmix.c:1561
+#: config/tc-mmix.c:1578 config/tc-mmix.c:1605 config/tc-mmix.c:1633
+#: config/tc-mmix.c:1660 config/tc-mmix.c:1686 config/tc-mmix.c:1702
+#: config/tc-mmix.c:1728 config/tc-mmix.c:1744 config/tc-mmix.c:1760
+#: config/tc-mmix.c:1823 config/tc-mmix.c:1839
+#, c-format
+msgid "invalid operands to opcode %s: `%s'"
+msgstr ""
+
+#: config/tc-mmix.c:1816
+#, c-format
+msgid "unsupported operands to %s: `%s'"
+msgstr ""
+
+#: config/tc-mmix.c:1944
+msgid "internal: mmix_prefix_name but empty prefix"
+msgstr ""
+
+#: config/tc-mmix.c:1989
+#, c-format
+msgid "too many GREG registers allocated (max %d)"
+msgstr ""
+
+#: config/tc-mmix.c:2049
+msgid "BSPEC already active. Nesting is not supported."
+msgstr ""
+
+#: config/tc-mmix.c:2058
+msgid "invalid BSPEC expression"
+msgstr ""
+
+#: config/tc-mmix.c:2074
+#, c-format
+msgid "can't create section %s"
+msgstr ""
+
+#: config/tc-mmix.c:2079
+#, c-format
+msgid "can't set section flags for section %s"
+msgstr ""
+
+#: config/tc-mmix.c:2101
+msgid "ESPEC without preceding BSPEC"
+msgstr ""
+
+#: config/tc-mmix.c:2131
+msgid "missing local expression"
+msgstr ""
+
+#: config/tc-mmix.c:2346
+msgid "operand out of range, instruction expanded"
+msgstr ""
+
+#. The BFD_RELOC_MMIX_LOCAL-specific message is supposed to be
+#. user-friendly, though a little bit non-substantial.
+#: config/tc-mmix.c:2598
+msgid "directive LOCAL must be placed in code or data"
+msgstr ""
+
+#: config/tc-mmix.c:2599
+msgid "internal confusion: relocation in a section without contents"
+msgstr ""
+
+#: config/tc-mmix.c:2714
+msgid "internal: BFD_RELOC_MMIX_BASE_PLUS_OFFSET not resolved to section"
+msgstr ""
+
+#: config/tc-mmix.c:2754
+msgid "no suitable GREG definition for operands"
+msgstr ""
+
+#: config/tc-mmix.c:2813
+msgid "operands were not reducible at assembly-time"
+msgstr ""
+
+#: config/tc-mmix.c:2841
+#, c-format
+msgid "cannot generate relocation type for symbol %s, code %s"
+msgstr ""
+
+#: config/tc-mmix.c:2861
+#, c-format
+msgid "internal: unhandled label %s"
+msgstr ""
+
+#: config/tc-mmix.c:2915
+msgid "[0-9]H labels may not appear alone on a line"
+msgstr ""
+
+#: config/tc-mmix.c:2924
+msgid "[0-9]H labels do not mix with dot-pseudos"
+msgstr ""
+
+#: config/tc-mmix.c:2988
+msgid "invalid characters in input"
+msgstr ""
+
+#: config/tc-mmix.c:3092
+msgid "empty label field for IS"
+msgstr ""
+
+#: config/tc-mmix.c:3342
+#, c-format
+msgid "internal: unexpected relax type %d:%d"
+msgstr ""
+
+#: config/tc-mmix.c:3364
+msgid "BSPEC without ESPEC."
+msgstr ""
+
+#: config/tc-mmix.c:3566
+msgid "GREG expression too complicated"
+msgstr ""
+
+#: config/tc-mmix.c:3579
+msgid "internal: GREG expression not resolved to section"
+msgstr ""
+
+#: config/tc-mmix.c:3630
+msgid "register section has contents\n"
+msgstr ""
+
+#: config/tc-mmix.c:3808
+msgid "section change from within a BSPEC/ESPEC pair is not supported"
+msgstr ""
+
+#: config/tc-mmix.c:3830
+msgid "directive LOC from within a BSPEC/ESPEC pair is not supported"
+msgstr ""
+
+#: config/tc-mmix.c:3841
+msgid "invalid LOC expression"
+msgstr ""
+
+#: config/tc-mmix.c:3866 config/tc-mmix.c:3892
+msgid "LOC expression stepping backwards is not supported"
+msgstr ""
+
+#. We will only get here in rare cases involving #NO_APP,
+#. where the unterminated string is not recognized by the
+#. preformatting pass.
+#: config/tc-mmix.c:3976 config/tc-mmix.c:4137
+msgid "unterminated string"
+msgstr ""
+
+#: config/tc-mmix.c:3993
+msgid "BYTE expression not a pure number"
+msgstr ""
+
+#. Note that mmixal does not allow negative numbers in
+#. BYTE sequences, so neither should we.
+#: config/tc-mmix.c:4002
+msgid "BYTE expression not in the range 0..255"
+msgstr ""
+
+#: config/tc-mmix.c:4053 config/tc-mmix.c:4069
+msgid "data item with alignment larger than location"
+msgstr ""
+
+#. Since integer_constant is local to expr.c, we have to make this a
+#. macro. FIXME: Do it cleaner.
+#: config/tc-mmix.h:103
+msgid "`&' serial number operator is not supported"
+msgstr ""
+
+#: config/tc-mn10200.c:319
msgid ""
"MN10200 options:\n"
"none yet\n"
msgstr ""
-#: config/tc-mn10200.c:807 config/tc-mn10300.c:953 config/tc-ppc.c:1736
-#: config/tc-v850.c:1728
+#: config/tc-mn10200.c:793 config/tc-mn10300.c:929 config/tc-ppc.c:1867
+#: config/tc-s390.c:1290 config/tc-v850.c:1725
#, c-format
msgid "Unrecognized opcode: `%s'"
msgstr ""
-#: config/tc-mn10200.c:1050 config/tc-mn10300.c:1476 config/tc-ppc.c:2097
-#: config/tc-v850.c:2152
+#: config/tc-mn10200.c:1036 config/tc-mn10300.c:1452 config/tc-ppc.c:2305
+#: config/tc-s390.c:1216 config/tc-v850.c:2149
#, c-format
msgid "junk at end of line: `%s'"
msgstr ""
-#: config/tc-mn10200.c:1374 config/tc-mn10300.c:2045 config/tc-ppc.c:1224
-#: config/tc-v850.c:1656
+#: config/tc-mn10200.c:1349 config/tc-mn10300.c:2076 config/tc-ppc.c:1299
+#: config/tc-v850.c:1654
#, c-format
msgid "operand out of range (%s not between %ld and %ld)"
msgstr ""
-#: config/tc-mn10300.c:542
+#: config/tc-mn10300.c:518
msgid ""
"MN10300 options:\n"
"none yet\n"
msgstr ""
-#: config/tc-mn10300.c:970
+#: config/tc-mn10300.c:946
msgid "Invalid opcode/operands"
msgstr ""
-#: config/tc-mn10300.c:1447
+#: config/tc-mn10300.c:1423
msgid "Invalid register specification."
msgstr ""
+#: config/tc-mn10300.c:1976
+#, c-format
+msgid "Bad relocation fixup type (%d)"
+msgstr ""
+
#: config/tc-ns32k.c:446
msgid "Invalid syntax in PC-relative addressing mode"
msgstr ""
@@ -5910,51 +6470,47 @@ msgstr ""
msgid "Bit field out of range"
msgstr ""
-#: config/tc-ns32k.c:2176
+#: config/tc-ns32k.c:2157
#, c-format
msgid "invalid architecture option -m%s"
msgstr ""
-#: config/tc-ns32k.c:2192
+#: config/tc-ns32k.c:2173
msgid ""
"NS32K options:\n"
"-m32032 | -m32532\tselect variant of NS32K architecture\n"
msgstr ""
-#: config/tc-ns32k.c:2370
+#: config/tc-ns32k.c:2351
#, c-format
msgid "Cannot find relocation type for symbol %s, code %d"
msgstr ""
-#: config/tc-pj.c:66 config/tc-pj.c:74
+#: config/tc-pj.c:67 config/tc-pj.c:75
msgid "confusing relocation expressions"
msgstr ""
-#: config/tc-pj.c:165
+#: config/tc-pj.c:166
msgid "can't have relocation for ipush"
msgstr ""
-#: config/tc-pj.c:272
+#: config/tc-pj.c:273
#, c-format
msgid "unknown opcode %s"
msgstr ""
-#: config/tc-pj.c:421
+#: config/tc-pj.c:422
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:458 config/tc-sh.c:2899 config/tc-sh.c:2906
-#: config/tc-sh.c:2913 config/tc-sh.c:2920
+#: config/tc-pj.c:460 config/tc-sh.c:2922 config/tc-sh.c:2929
+#: config/tc-sh.c:2936 config/tc-sh.c:2943
msgid "pcrel too far"
msgstr ""
-#: config/tc-pj.c:526 config/tc-sh.c:3011
-msgid "offset out of range"
-msgstr ""
-
#: config/tc-pj.h:38
msgid "convert_frag\n"
msgstr ""
@@ -5963,29 +6519,35 @@ msgstr ""
msgid "estimate size\n"
msgstr ""
-#: config/tc-ppc.c:926
+#: config/tc-ppc.c:990 config/tc-s390.c:378
#, c-format
msgid "invalid switch -m%s"
msgstr ""
-#: config/tc-ppc.c:963
+#: config/tc-ppc.c:1027
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, -m405, -m603, -m604\n"
+"-mppc, -mppc32, -m603, -m604\n"
"\t\t\tgenerate code for Motorola PowerPC 603/604\n"
+"-m403, -m405 generate code for Motorola PowerPC 403/405\n"
+"-m7400, -m7410, -m7450, -m7455\n"
+"\t\t\tgenerate code For Motorola PowerPC 7400/7410/7450/7455\n"
"-mppc64, -m620\t\tgenerate code for Motorola PowerPC 620\n"
"-mppc64bridge\t\tgenerate code for PowerPC 64, including bridge insns\n"
+"-mbooke64\t\tgenerate code for 64-bit PowerPC BookE\n"
+"-mbooke, mbooke32\tgenerate code for 32-bit PowerPC BookE\n"
+"-maltivec\t\tgenerate code for AltiVec\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:978
+#: config/tc-ppc.c:1048
msgid ""
"-mrelocatable\t\tsupport for GCC's -mrelocatble option\n"
"-mrelocatable-lib\tsupport for GCC's -mrelocatble-lib option\n"
@@ -5999,406 +6561,515 @@ msgid ""
"-Qy, -Qn\t\tignored\n"
msgstr ""
-#: config/tc-ppc.c:1013
+#: config/tc-ppc.c:1082
#, c-format
msgid "Unknown default cpu = %s, os = %s"
msgstr ""
-#: config/tc-ppc.c:1038
+#: config/tc-ppc.c:1107
msgid "Neither Power nor PowerPC opcodes were selected."
msgstr ""
-#: config/tc-ppc.c:1117
+#: config/tc-ppc.c:1190 config/tc-s390.c:471
#, c-format
msgid "Internal assembler error for instruction %s"
msgstr ""
-#: config/tc-ppc.c:1136
+#: config/tc-ppc.c:1210
#, c-format
msgid "Internal assembler error for macro %s"
msgstr ""
-#: config/tc-ppc.c:1346
+#: config/tc-ppc.c:1437
msgid "identifier+constant@got means identifier@got+constant"
msgstr ""
-#: config/tc-ppc.c:1400 config/tc-sh.c:341 config/tc-sh.c:369
+#: config/tc-ppc.c:1505 config/tc-sh.c:388 config/tc-sh.c:416
#, c-format
msgid "%s relocations do not fit in %d bytes\n"
msgstr ""
-#: config/tc-ppc.c:1500
+#: config/tc-ppc.c:1612
#, c-format
msgid "Length of .lcomm \"%s\" is already %ld. Not changed to %ld."
msgstr ""
-#: config/tc-ppc.c:1582
+#: config/tc-ppc.c:1694
msgid "Relocation cannot be done when using -mrelocatable"
msgstr ""
-#: config/tc-ppc.c:1663
+#: config/tc-ppc.c:1794
#, c-format
msgid "syntax error: invalid toc specifier `%s'"
msgstr ""
-#: config/tc-ppc.c:1677
+#: config/tc-ppc.c:1808
#, c-format
msgid "syntax error: expected `]', found `%c'"
msgstr ""
-#: config/tc-ppc.c:1912
+#: config/tc-ppc.c:2044
msgid "[tocv] symbol is not a toc symbol"
msgstr ""
-#: config/tc-ppc.c:1923
+#: config/tc-ppc.c:2055
msgid "Unimplemented toc32 expression modifier"
msgstr ""
-#: config/tc-ppc.c:1928
+#: config/tc-ppc.c:2060
msgid "Unimplemented toc64 expression modifier"
msgstr ""
-#: config/tc-ppc.c:1932
+#: config/tc-ppc.c:2064
#, c-format
msgid "Unexpected return value [%d] from parse_toc_entry!\n"
msgstr ""
-#: config/tc-ppc.c:2085
+#: config/tc-ppc.c:2249
+msgid "unsupported relocation for DS offset field"
+msgstr ""
+
+#: config/tc-ppc.c:2293
#, c-format
msgid "syntax error; found `%c' but expected `%c'"
msgstr ""
-#: config/tc-ppc.c:2197
+#: config/tc-ppc.c:2419
msgid "wrong number of operands"
msgstr ""
-#: config/tc-ppc.c:2253
-msgid "Bad .section directive: want a,w,x,e in string"
+#: config/tc-ppc.c:2475
+msgid "Bad .section directive: want a,e,w,x,M,S in string"
msgstr ""
-#: config/tc-ppc.c:2367
+#: config/tc-ppc.c:2590
msgid "missing size"
msgstr ""
-#: config/tc-ppc.c:2376
+#: config/tc-ppc.c:2599
msgid "negative size"
msgstr ""
-#: config/tc-ppc.c:2417
+#: config/tc-ppc.c:2636
msgid "missing real symbol name"
msgstr ""
-#: config/tc-ppc.c:2438
+#: config/tc-ppc.c:2657
msgid "attempt to redefine symbol"
msgstr ""
-#: config/tc-ppc.c:2672
+#: config/tc-ppc.c:2891
msgid "The XCOFF file format does not support arbitrary sections"
msgstr ""
-#: config/tc-ppc.c:2749
+#: config/tc-ppc.c:2968
msgid "missing rename string"
msgstr ""
-#: config/tc-ppc.c:2780 config/tc-ppc.c:3305 read.c:2992
+#: config/tc-ppc.c:2999 config/tc-ppc.c:3554 read.c:3053
msgid "missing value"
msgstr ""
-#: config/tc-ppc.c:2798
+#: config/tc-ppc.c:3017
msgid "illegal .stabx expression; zero assumed"
msgstr ""
-#: config/tc-ppc.c:2830
+#: config/tc-ppc.c:3049
msgid "missing class"
msgstr ""
-#: config/tc-ppc.c:2839
+#: config/tc-ppc.c:3058
msgid "missing type"
msgstr ""
-#: config/tc-ppc.c:2900
+#: config/tc-ppc.c:3139
msgid "missing symbol name"
msgstr ""
-#: config/tc-ppc.c:3076
+#: config/tc-ppc.c:3333
msgid "nested .bs blocks"
msgstr ""
-#: config/tc-ppc.c:3109
+#: config/tc-ppc.c:3366
msgid ".es without preceding .bs"
msgstr ""
-#: config/tc-ppc.c:3297
+#: config/tc-ppc.c:3546
msgid "non-constant byte count"
msgstr ""
-#: config/tc-ppc.c:3342
+#: config/tc-ppc.c:3594
msgid ".tc not in .toc section"
msgstr ""
-#: config/tc-ppc.c:3361
+#: config/tc-ppc.c:3613
msgid ".tc with no label"
msgstr ""
-#: config/tc-ppc.c:3436
+#: config/tc-ppc.c:3724
msgid "No previous section to return to. Directive ignored."
msgstr ""
#. Section Contents
#. unknown
-#: config/tc-ppc.c:3855
+#: config/tc-ppc.c:4141
msgid "Unsupported section attribute -- 'a'"
msgstr ""
-#: config/tc-ppc.c:4045
+#: config/tc-ppc.c:4330
msgid "bad symbol suffix"
msgstr ""
-#: config/tc-ppc.c:4138
+#: config/tc-ppc.c:4423
msgid "Unrecognized symbol suffix"
msgstr ""
-#: config/tc-ppc.c:4220
+#: config/tc-ppc.c:4505
msgid "two .function pseudo-ops with no intervening .ef"
msgstr ""
-#: config/tc-ppc.c:4233
+#: config/tc-ppc.c:4518
msgid ".ef with no preceding .function"
msgstr ""
-#: config/tc-ppc.c:4361
+#: config/tc-ppc.c:4646
#, c-format
msgid "warning: symbol %s has no csect"
msgstr ""
-#: config/tc-ppc.c:4662
+#: config/tc-ppc.c:4946
msgid "symbol in .toc does not match any .tc"
msgstr ""
-#: config/tc-ppc.c:4956 config/tc-v850.c:2431
+#: config/tc-ppc.c:5246 config/tc-s390.c:1797 config/tc-v850.c:2420
msgid "unresolved expression that must be resolved"
msgstr ""
-#: config/tc-ppc.c:4959
-msgid "unsupported relocation type"
+#: config/tc-ppc.c:5249
+#, c-format
+msgid "unsupported relocation against %s"
msgstr ""
-#: config/tc-ppc.c:5021
+#: config/tc-ppc.c:5326
#, c-format
msgid "cannot emit PC relative %s relocation against %s"
msgstr ""
-#: config/tc-ppc.c:5026
+#: config/tc-ppc.c:5331
#, c-format
msgid "cannot emit PC relative %s relocation"
msgstr ""
-#: config/tc-ppc.c:5088
+#: config/tc-ppc.c:5454
msgid "must branch to an address a multiple of 4"
msgstr ""
-#: config/tc-ppc.c:5092
+#: config/tc-ppc.c:5458
#, c-format
msgid "@local or @plt branch destination is too far away, %ld bytes"
msgstr ""
-#: config/tc-ppc.c:5116
+#: config/tc-ppc.c:5491
#, c-format
msgid "Gas failure, reloc value %d\n"
msgstr ""
-#: config/tc-sh.c:878
+#: config/tc-s390.c:421
+msgid ""
+" S390 options:\n"
+" -mregnames Allow symbolic names for registers\n"
+" -mwarn-areg-zero Warn about zero base/index registers\n"
+" -mno-regnames Do not allow symbolic names for registers\n"
+msgstr ""
+
+#: config/tc-s390.c:426
+msgid ""
+" -V print assembler version number\n"
+" -Qy, -Qn ignored\n"
+msgstr ""
+
+#: config/tc-s390.c:456
+#, c-format
+msgid "Internal assembler error for instruction format %s"
+msgstr ""
+
+#: config/tc-s390.c:652
+#, c-format
+msgid "identifier+constant@%s means identifier@%s+constant"
+msgstr ""
+
+#: config/tc-s390.c:735
+msgid "Can't handle O_big in s390_exp_compare"
+msgstr ""
+
+#: config/tc-s390.c:819
+msgid "Invalid suffix for literal pool entry"
+msgstr ""
+
+#: config/tc-s390.c:876
+msgid "Big number is too big"
+msgstr ""
+
+#: config/tc-s390.c:964 config/tc-s390.c:1473
+#, c-format
+msgid "%s relocations do not fit in %d bytes"
+msgstr ""
+
+#: config/tc-s390.c:974
+msgid "relocation not applicable"
+msgstr ""
+
+#: config/tc-s390.c:1117
+msgid "invalid operand suffix"
+msgstr ""
+
+#: config/tc-s390.c:1140
+msgid "syntax error; missing '(' after displacement"
+msgstr ""
+
+#: config/tc-s390.c:1150 config/tc-s390.c:1183 config/tc-s390.c:1202
+msgid "syntax error; expected ,"
+msgstr ""
+
+#: config/tc-s390.c:1177
+msgid "syntax error; missing ')' after base register"
+msgstr ""
+
+#: config/tc-s390.c:1195
+msgid "syntax error; ')' not allowed here"
+msgstr ""
+
+#: config/tc-s390.c:1353 config/tc-s390.c:1373 config/tc-s390.c:1386
+msgid "Invalid .insn format\n"
+msgstr ""
+
+#: config/tc-s390.c:1361
+#, c-format
+msgid "Unrecognized opcode format: `%s'"
+msgstr ""
+
+#: config/tc-s390.c:1389
+msgid "second operand of .insn not a constant\n"
+msgstr ""
+
+#: config/tc-s390.c:1392
+msgid "missing comma after insn constant\n"
+msgstr ""
+
+#: config/tc-s390.c:1703
+msgid "unresolved fx_subsy symbol that must be resolved"
+msgstr ""
+
+#: config/tc-s390.c:1800
+msgid "unsupported relocation type"
+msgstr ""
+
+#: config/tc-sh.c:89
+msgid "directive .big encountered when option -big required"
+msgstr ""
+
+#: config/tc-sh.c:100
+msgid "directive .little encountered when option -little required"
+msgstr ""
+
+#: config/tc-sh.c:909
msgid "illegal register after @-"
msgstr ""
-#: config/tc-sh.c:894
+#: config/tc-sh.c:925
msgid "must be @(r0,...)"
msgstr ""
-#: config/tc-sh.c:910
+#: config/tc-sh.c:949
msgid "syntax error in @(r0,...)"
msgstr ""
-#: config/tc-sh.c:943 config/tc-sh.c:948
+#: config/tc-sh.c:954
+msgid "syntax error in @(r0...)"
+msgstr ""
+
+#: config/tc-sh.c:987 config/tc-sh.c:992
msgid "syntax error in @(disp,[Rn, gbr, pc])"
msgstr ""
-#: config/tc-sh.c:953
+#: config/tc-sh.c:997
msgid "expecting )"
msgstr ""
-#: config/tc-sh.c:962
+#: config/tc-sh.c:1005
msgid "illegal register after @"
msgstr ""
-#: config/tc-sh.c:1523
+#: config/tc-sh.c:1553
#, c-format
msgid "Invalid register: 'r%d'"
msgstr ""
-#: config/tc-sh.c:1686
+#: config/tc-sh.c:1716
msgid "insn can't be combined with parallel processing insn"
msgstr ""
-#: config/tc-sh.c:1693 config/tc-sh.c:1704
+#: config/tc-sh.c:1723 config/tc-sh.c:1734
msgid "multiple movx specifications"
msgstr ""
-#: config/tc-sh.c:1698 config/tc-sh.c:1725
+#: config/tc-sh.c:1728 config/tc-sh.c:1755
msgid "multiple movy specifications"
msgstr ""
-#: config/tc-sh.c:1706
+#: config/tc-sh.c:1736
msgid "invalid movx address register"
msgstr ""
-#: config/tc-sh.c:1712 config/tc-sh.c:1717
+#: config/tc-sh.c:1742 config/tc-sh.c:1747
msgid "invalid movx dsp register"
msgstr ""
-#: config/tc-sh.c:1734 config/tc-sh.c:1739
+#: config/tc-sh.c:1764 config/tc-sh.c:1769
msgid "invalid movy dsp register"
msgstr ""
-#: config/tc-sh.c:1743
+#: config/tc-sh.c:1773
msgid "invalid movy address register"
msgstr ""
-#: config/tc-sh.c:1749
+#: config/tc-sh.c:1779
msgid "dsp immediate shift value not constant"
msgstr ""
-#: config/tc-sh.c:1756 config/tc-sh.c:1769
+#: config/tc-sh.c:1786 config/tc-sh.c:1799
msgid "multiple parallel processing specifications"
msgstr ""
-#: config/tc-sh.c:1762
+#: config/tc-sh.c:1792
msgid "multiple condition specifications"
msgstr ""
-#: config/tc-sh.c:1778
+#: config/tc-sh.c:1808
msgid "insn cannot be combined with pmuls"
msgstr ""
-#: config/tc-sh.c:1795
+#: config/tc-sh.c:1825
msgid "bad padd / psub pmuls output operand"
msgstr ""
-#: config/tc-sh.c:1805
+#: config/tc-sh.c:1835
msgid "condition not followed by conditionalizable insn"
msgstr ""
-#: config/tc-sh.c:1815
+#: config/tc-sh.c:1845
msgid "unrecognized characters at end of parallel processing insn"
msgstr ""
-#: config/tc-sh.c:1931
+#: config/tc-sh.c:1961
#, c-format
msgid "excess operands: '%s'"
msgstr ""
-#: config/tc-sh.c:2099
+#: config/tc-sh.c:2131
msgid ".uses pseudo-op seen when not relaxing"
msgstr ""
-#: config/tc-sh.c:2105
+#: config/tc-sh.c:2137
msgid "bad .uses format"
msgstr ""
-#: config/tc-sh.c:2166
+#: config/tc-sh.c:2203
msgid ""
"SH options:\n"
"-little\t\t\tgenerate little endian code\n"
+"-big\t\t\tgenerate big 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:2177 config/tc-w65.c:862
-msgid "call to tc_Nout_fix_to_chars \n"
-msgstr ""
-
-#: config/tc-sh.c:2261
+#: config/tc-sh.c:2292
msgid ".uses does not refer to a local symbol in the same section"
msgstr ""
-#: config/tc-sh.c:2280
+#: config/tc-sh.c:2311
msgid "can't find fixup pointed to by .uses"
msgstr ""
-#: config/tc-sh.c:2303
+#: config/tc-sh.c:2334
msgid ".uses target does not refer to a local symbol in the same section"
msgstr ""
-#: config/tc-sh.c:2401
+#: config/tc-sh.c:2432
msgid "displacement overflows 12-bit field"
msgstr ""
-#: config/tc-sh.c:2404
+#: config/tc-sh.c:2435
#, c-format
msgid "displacement to defined symbol %s overflows 12-bit field"
msgstr ""
-#: config/tc-sh.c:2408
+#: config/tc-sh.c:2439
#, c-format
msgid "displacement to undefined symbol %s overflows 12-bit field"
msgstr ""
-#: config/tc-sh.c:2486
+#: config/tc-sh.c:2517
msgid "displacement overflows 8-bit field"
msgstr ""
-#: config/tc-sh.c:2489
+#: config/tc-sh.c:2520
#, c-format
msgid "displacement to defined symbol %s overflows 8-bit field"
msgstr ""
-#: config/tc-sh.c:2493
+#: config/tc-sh.c:2524
#, c-format
msgid "displacement to undefined symbol %s overflows 8-bit field "
msgstr ""
-#: config/tc-sh.c:2506
+#: config/tc-sh.c:2537
#, c-format
msgid "overflow in branch to %s; converted into longer instruction sequence"
msgstr ""
-#: config/tc-sh.c:2581 config/tc-sh.c:2629 config/tc-sparc.c:4084
-#: config/tc-sparc.c:4109
+#: config/tc-sh.c:2612 config/tc-sh.c:2660 config/tc-sparc.c:4093
+#: config/tc-sparc.c:4118
msgid "misaligned data"
msgstr ""
-#: config/tc-sh.c:3003
+#: config/tc-sh.c:3022
msgid "misaligned offset"
msgstr ""
-#: config/tc-sparc.c:280
+#: config/tc-sparc.c:281
msgid "Invalid default architecture, broken assembler."
msgstr ""
-#: config/tc-sparc.c:284 config/tc-sparc.c:487
+#: config/tc-sparc.c:285 config/tc-sparc.c:488
msgid "Bad opcode table, broken assembler."
msgstr ""
-#: config/tc-sparc.c:479
+#: config/tc-sparc.c:480
#, c-format
msgid "invalid architecture -xarch=%s"
msgstr ""
-#: config/tc-sparc.c:481
+#: config/tc-sparc.c:482
#, c-format
msgid "invalid architecture -A%s"
msgstr ""
-#: config/tc-sparc.c:585
+#: config/tc-sparc.c:549
+#, c-format
+msgid "No compiled in support for %d bit object file format"
+msgstr ""
+
+#: config/tc-sparc.c:586
msgid "Unrecognized option following -K"
msgstr ""
-#: config/tc-sparc.c:626
+#: config/tc-sparc.c:627
msgid "SPARC options:\n"
msgstr ""
-#: config/tc-sparc.c:655
+#: config/tc-sparc.c:656
msgid ""
"\n"
"\t\t\tspecify variant of SPARC architecture\n"
@@ -6409,34 +7080,34 @@ msgid ""
"-no-relax\t\tavoid changing any jumps and branches\n"
msgstr ""
-#: config/tc-sparc.c:663
+#: config/tc-sparc.c:664
msgid "-k\t\t\tgenerate PIC\n"
msgstr ""
-#: config/tc-sparc.c:667
+#: config/tc-sparc.c:668
msgid ""
"-32\t\t\tcreate 32 bit object file\n"
"-64\t\t\tcreate 64 bit object file\n"
msgstr ""
-#: config/tc-sparc.c:670
+#: config/tc-sparc.c:671
#, c-format
msgid "\t\t\t[default is %d]\n"
msgstr ""
-#: config/tc-sparc.c:672
+#: config/tc-sparc.c:673
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:676
+#: config/tc-sparc.c:677
#, c-format
msgid "\t\t\t[default is %s]\n"
msgstr ""
-#: config/tc-sparc.c:678
+#: config/tc-sparc.c:679
msgid ""
"-KPIC\t\t\tgenerate PIC\n"
"-V\t\t\tprint assembler version number\n"
@@ -6449,7 +7120,7 @@ msgid ""
"-s\t\t\tignored\n"
msgstr ""
-#: config/tc-sparc.c:690
+#: config/tc-sparc.c:691
msgid ""
"-EL\t\t\tgenerate code for a little endian machine\n"
"-EB\t\t\tgenerate code for a big endian machine\n"
@@ -6457,275 +7128,314 @@ msgid ""
" instructions and little endian data.\n"
msgstr ""
-#: config/tc-sparc.c:810
+#: config/tc-sparc.c:811
#, c-format
msgid "Internal error: losing opcode: `%s' \"%s\"\n"
msgstr ""
-#: config/tc-sparc.c:829
+#: config/tc-sparc.c:830
#, c-format
msgid "Internal error: can't find opcode `%s' for `%s'\n"
msgstr ""
-#: config/tc-sparc.c:975
+#: config/tc-sparc.c:976
msgid "Support for 64-bit arithmetic not compiled in."
msgstr ""
-#: config/tc-sparc.c:1022
+#: config/tc-sparc.c:1023
msgid "set: number not in 0..4294967295 range"
msgstr ""
-#: config/tc-sparc.c:1029
+#: config/tc-sparc.c:1030
msgid "set: number not in -2147483648..4294967295 range"
msgstr ""
-#: config/tc-sparc.c:1089
+#: config/tc-sparc.c:1090
msgid "setsw: number not in -2147483648..4294967295 range"
msgstr ""
-#: config/tc-sparc.c:1138
+#: config/tc-sparc.c:1139
msgid "setx: temporary register same as destination register"
msgstr ""
-#: config/tc-sparc.c:1209
+#: config/tc-sparc.c:1210
msgid "setx: illegal temporary register g0"
msgstr ""
-#: config/tc-sparc.c:1306
+#: config/tc-sparc.c:1307
msgid "FP branch in delay slot"
msgstr ""
-#: config/tc-sparc.c:1322
+#: config/tc-sparc.c:1323
msgid "FP branch preceded by FP instruction; NOP inserted"
msgstr ""
-#: config/tc-sparc.c:1362
+#: config/tc-sparc.c:1363
msgid "failed special case insn sanity check"
msgstr ""
-#: config/tc-sparc.c:1450
+#: config/tc-sparc.c:1451
msgid ": invalid membar mask name"
msgstr ""
-#: config/tc-sparc.c:1466
+#: config/tc-sparc.c:1467
msgid ": invalid membar mask expression"
msgstr ""
-#: config/tc-sparc.c:1471
+#: config/tc-sparc.c:1472
msgid ": invalid membar mask number"
msgstr ""
-#: config/tc-sparc.c:1486
+#: config/tc-sparc.c:1487
msgid ": invalid siam mode expression"
msgstr ""
-#: config/tc-sparc.c:1491
+#: config/tc-sparc.c:1492
msgid ": invalid siam mode number"
msgstr ""
-#: config/tc-sparc.c:1507
+#: config/tc-sparc.c:1508
msgid ": invalid prefetch function name"
msgstr ""
-#: config/tc-sparc.c:1515
+#: config/tc-sparc.c:1516
msgid ": invalid prefetch function expression"
msgstr ""
-#: config/tc-sparc.c:1520
+#: config/tc-sparc.c:1521
msgid ": invalid prefetch function number"
msgstr ""
-#: config/tc-sparc.c:1548 config/tc-sparc.c:1560
+#: config/tc-sparc.c:1549 config/tc-sparc.c:1561
msgid ": unrecognizable privileged register"
msgstr ""
-#: config/tc-sparc.c:1584 config/tc-sparc.c:1609
+#: config/tc-sparc.c:1585 config/tc-sparc.c:1610
msgid ": unrecognizable v9a or v9b ancillary state register"
msgstr ""
-#: config/tc-sparc.c:1589
+#: config/tc-sparc.c:1590
msgid ": rd on write only ancillary state register"
msgstr ""
#. %sys_tick and %sys_tick_cmpr are v9bnotv9a
-#: config/tc-sparc.c:1597
+#: config/tc-sparc.c:1598
msgid ": unrecognizable v9a ancillary state register"
msgstr ""
-#: config/tc-sparc.c:1633
+#: config/tc-sparc.c:1634
msgid ": asr number must be between 16 and 31"
msgstr ""
-#: config/tc-sparc.c:1641
+#: config/tc-sparc.c:1642
msgid ": asr number must be between 0 and 31"
msgstr ""
-#: config/tc-sparc.c:1651
+#: config/tc-sparc.c:1652
msgid ": expecting %asrN"
msgstr ""
-#: config/tc-sparc.c:1979
+#: config/tc-sparc.c:1980
msgid "detected global register use not covered by .register pseudo-op"
msgstr ""
-#: config/tc-sparc.c:2050
+#: config/tc-sparc.c:2051
msgid ": There are only 64 f registers; [0-63]"
msgstr ""
-#: config/tc-sparc.c:2052 config/tc-sparc.c:2064
+#: config/tc-sparc.c:2053 config/tc-sparc.c:2065
msgid ": There are only 32 f registers; [0-31]"
msgstr ""
-#: config/tc-sparc.c:2182 config/tc-sparc.c:2218
+#: config/tc-sparc.c:2183 config/tc-sparc.c:2219
+#, c-format
msgid "Illegal operands: %%%s requires arguments in ()"
msgstr ""
-#: config/tc-sparc.c:2230
+#: config/tc-sparc.c:2231
+#, c-format
msgid ""
"Illegal operands: Can't do arithmetics other than + and - involving %%%s()"
msgstr ""
-#: config/tc-sparc.c:2340
+#: config/tc-sparc.c:2341
+#, c-format
msgid "Illegal operands: Can't add non-constant expression to %%%s()"
msgstr ""
-#: config/tc-sparc.c:2350
+#: config/tc-sparc.c:2351
+#, c-format
msgid ""
"Illegal operands: Can't do arithmetics involving %%%s() of a relocatable "
"symbol"
msgstr ""
-#: config/tc-sparc.c:2368
+#: config/tc-sparc.c:2369
msgid ": PC-relative operand can't be a constant"
msgstr ""
-#: config/tc-sparc.c:2401
+#: config/tc-sparc.c:2402
msgid ": invalid ASI name"
msgstr ""
-#: config/tc-sparc.c:2409
+#: config/tc-sparc.c:2410
msgid ": invalid ASI expression"
msgstr ""
-#: config/tc-sparc.c:2414
+#: config/tc-sparc.c:2415
msgid ": invalid ASI number"
msgstr ""
-#: config/tc-sparc.c:2511
+#: config/tc-sparc.c:2512
msgid "OPF immediate operand out of range (0-0x1ff)"
msgstr ""
-#: config/tc-sparc.c:2516
+#: config/tc-sparc.c:2517
msgid "non-immediate OPF operand, ignored"
msgstr ""
-#: config/tc-sparc.c:2535
+#: config/tc-sparc.c:2536
msgid ": invalid cpreg name"
msgstr ""
-#: config/tc-sparc.c:2564
+#: config/tc-sparc.c:2565
#, c-format
msgid "Illegal operands%s"
msgstr ""
-#: config/tc-sparc.c:2598
+#: config/tc-sparc.c:2599
#, c-format
msgid "architecture bumped from \"%s\" to \"%s\" on \"%s\""
msgstr ""
-#: config/tc-sparc.c:2634
+#: config/tc-sparc.c:2635
#, c-format
msgid "Architecture mismatch on \"%s\"."
msgstr ""
-#: config/tc-sparc.c:2635
+#: config/tc-sparc.c:2636
#, c-format
msgid " (Requires %s; requested architecture is %s.)"
msgstr ""
-#: config/tc-sparc.c:3249
+#: config/tc-sparc.c:3246
#, c-format
msgid "bad or unhandled relocation type: 0x%02x"
msgstr ""
-#: config/tc-sparc.c:3380
+#: config/tc-sparc.c:3384
#, c-format
msgid "internal error: can't export reloc type %d (`%s')"
msgstr ""
-#: config/tc-sparc.c:3552
+#: config/tc-sparc.c:3546
+#, c-format
+msgid "BSS length (%d.) <0! Ignored."
+msgstr ""
+
+#: config/tc-sparc.c:3558
msgid "bad .reserve segment -- expected BSS segment"
msgstr ""
-#: config/tc-sparc.c:3569
+#: config/tc-sparc.c:3575 read.c:2040
msgid "missing alignment"
msgstr ""
-#: config/tc-sparc.c:3580 config/tc-sparc.c:3730
+#: config/tc-sparc.c:3586 config/tc-sparc.c:3736
#, c-format
msgid "alignment too large; assuming %d"
msgstr ""
-#: config/tc-sparc.c:3586 config/tc-sparc.c:3736
+#: config/tc-sparc.c:3592 config/tc-sparc.c:3742
msgid "negative alignment"
msgstr ""
-#: config/tc-sparc.c:3596 config/tc-sparc.c:3759
+#: config/tc-sparc.c:3602 config/tc-sparc.c:3765 read.c:1249 read.c:2056
msgid "alignment not a power of 2"
msgstr ""
-#: config/tc-sparc.c:3716
+#: config/tc-sparc.c:3680 config/tc-v850.c:260
+msgid "Expected comma after symbol-name"
+msgstr ""
+
+#: config/tc-sparc.c:3708 config/tc-v850.c:293
+#, c-format
+msgid "Length of .comm \"%s\" is already %ld. Not changed to %d."
+msgstr ""
+
+#: config/tc-sparc.c:3722
msgid "Expected comma after common length"
msgstr ""
-#: config/tc-sparc.c:3951 config/tc-sparc.c:3961
+#: config/tc-sparc.c:3963 config/tc-sparc.c:3973
+#, c-format
msgid "register syntax is .register %%g[2367],{#scratch|symbolname|#ignore}"
msgstr ""
-#: config/tc-sparc.c:3979
+#: config/tc-sparc.c:3991
msgid "redefinition of global register"
msgstr ""
-#: config/tc-sparc.c:3990
+#: config/tc-sparc.c:4002
#, c-format
msgid "Register symbol %s already defined."
msgstr ""
-#: config/tc-sparc.h:54
+#: config/tc-sparc.c:4211
+#, c-format
+msgid "Illegal operands: %%r_plt in %d-byte data field"
+msgstr ""
+
+#: config/tc-sparc.c:4248
+#, c-format
+msgid "Illegal operands: Only %%r_%s%d allowed in %d-byte data fields"
+msgstr ""
+
+#: config/tc-sparc.c:4256 config/tc-sparc.c:4287 config/tc-sparc.c:4296
+#, c-format
+msgid "Illegal operands: %%r_%s%d requires arguments in ()"
+msgstr ""
+
+#: config/tc-sparc.c:4305
+#, c-format
+msgid "Illegal operands: garbage after %%r_%s%d()"
+msgstr ""
+
+#: config/tc-sparc.h:55
msgid "sparc convert_frag\n"
msgstr ""
-#: config/tc-sparc.h:56
+#: config/tc-sparc.h:57
msgid "estimate_size_before_relax called"
msgstr ""
-#: config/tc-tahoe.c:386
+#: config/tc-tahoe.c:403
msgid "The -a option doesn't exist. (Despite what the man page says!"
msgstr ""
-#: config/tc-tahoe.c:390 config/tc-vax.c:3132
+#: config/tc-tahoe.c:407 config/tc-vax.c:3125
#, c-format
msgid "Displacement length %s ignored!"
msgstr ""
-#: config/tc-tahoe.c:394 config/tc-vax.c:3124
+#: config/tc-tahoe.c:411 config/tc-vax.c:3117
msgid "SYMBOL TABLE not implemented"
msgstr ""
-#: config/tc-tahoe.c:398 config/tc-vax.c:3128
+#: config/tc-tahoe.c:415 config/tc-vax.c:3121
msgid "TOKEN TRACE not implemented"
msgstr ""
-#: config/tc-tahoe.c:402 config/tc-vax.c:3136
+#: config/tc-tahoe.c:419 config/tc-vax.c:3129
#, c-format
msgid "I don't need or use temp. file \"%s\"."
msgstr ""
-#: config/tc-tahoe.c:406 config/tc-vax.c:3140
+#: config/tc-tahoe.c:423 config/tc-vax.c:3133
msgid "I don't use an interpass file! -V ignored"
msgstr ""
-#: config/tc-tahoe.c:420
+#: config/tc-tahoe.c:437
msgid ""
"Tahoe options:\n"
"-a\t\t\tignored\n"
@@ -6737,1047 +7447,1051 @@ msgid ""
"-V\t\t\tignored\n"
msgstr ""
-#: config/tc-tahoe.c:1074
+#: config/tc-tahoe.c:1066
msgid "Casting a branch displacement is bad form, and is ignored."
msgstr ""
-#: config/tc-tahoe.c:1130
+#: config/tc-tahoe.c:1122
msgid "Couldn't parse the [index] in this operand."
msgstr ""
-#: config/tc-tahoe.c:1136
+#: config/tc-tahoe.c:1128
msgid "Couldn't find the opening '[' for the index of this operand."
msgstr ""
-#: config/tc-tahoe.c:1176
+#: config/tc-tahoe.c:1168
msgid "Couldn't find the opening '(' for the deref of this operand."
msgstr ""
-#: config/tc-tahoe.c:1186
+#: config/tc-tahoe.c:1178
msgid "Operand can't be both pre-inc and post-dec."
msgstr ""
-#: config/tc-tahoe.c:1216
+#: config/tc-tahoe.c:1208
msgid "I parsed 2 registers in this operand."
msgstr ""
-#: config/tc-tahoe.c:1266
+#: config/tc-tahoe.c:1258
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:1273
+#: config/tc-tahoe.c:1265
msgid "Expression is too large for a 32 bits."
msgstr ""
-#: config/tc-tahoe.c:1278
+#: config/tc-tahoe.c:1270
msgid "Junk at end of expression."
msgstr ""
-#: config/tc-tahoe.c:1317
+#: config/tc-tahoe.c:1309
msgid "Syntax error in direct register mode."
msgstr ""
-#: config/tc-tahoe.c:1319
+#: config/tc-tahoe.c:1311
msgid "You can't index a register in direct register mode."
msgstr ""
-#: config/tc-tahoe.c:1322
+#: config/tc-tahoe.c:1314
msgid "SP can't be the source operand with direct register addressing."
msgstr ""
-#: config/tc-tahoe.c:1324
+#: config/tc-tahoe.c:1316
msgid "Can't take the address of a register."
msgstr ""
-#: config/tc-tahoe.c:1326
+#: config/tc-tahoe.c:1318
msgid "Direct Register can't be used in a branch."
msgstr ""
-#: config/tc-tahoe.c:1328
+#: config/tc-tahoe.c:1320
msgid "For quad access, the register must be even and < 14."
msgstr ""
-#: config/tc-tahoe.c:1330
+#: config/tc-tahoe.c:1322
msgid "You can't cast a direct register."
msgstr ""
-#: config/tc-tahoe.c:1336
+#: config/tc-tahoe.c:1328
msgid "Using reg 14 for quadwords can tromp the FP register."
msgstr ""
-#: config/tc-tahoe.c:1348
+#: config/tc-tahoe.c:1340
msgid "Syntax error in auto-dec mode."
msgstr ""
-#: config/tc-tahoe.c:1350
+#: config/tc-tahoe.c:1342
msgid "You can't have an index auto dec mode."
msgstr ""
-#: config/tc-tahoe.c:1352
+#: config/tc-tahoe.c:1344
msgid "Auto dec mode cant be used for reading."
msgstr ""
-#: config/tc-tahoe.c:1354
+#: config/tc-tahoe.c:1346
msgid "Auto dec only works of the SP register."
msgstr ""
-#: config/tc-tahoe.c:1356
+#: config/tc-tahoe.c:1348
msgid "Auto dec can't be used in a branch."
msgstr ""
-#: config/tc-tahoe.c:1358
+#: config/tc-tahoe.c:1350
msgid "Auto dec won't work with quadwords."
msgstr ""
-#: config/tc-tahoe.c:1365
+#: config/tc-tahoe.c:1357
msgid "Syntax error in one of the auto-inc modes."
msgstr ""
-#: config/tc-tahoe.c:1371
+#: config/tc-tahoe.c:1363
msgid "Auto inc deferred only works of the SP register."
msgstr ""
-#: config/tc-tahoe.c:1373
+#: config/tc-tahoe.c:1365
msgid "You can't have an index auto inc deferred mode."
msgstr ""
-#: config/tc-tahoe.c:1375 config/tc-tahoe.c:1386
+#: config/tc-tahoe.c:1367 config/tc-tahoe.c:1378
msgid "Auto inc can't be used in a branch."
msgstr ""
-#: config/tc-tahoe.c:1382
+#: config/tc-tahoe.c:1374
msgid "You can't write to an auto inc register."
msgstr ""
-#: config/tc-tahoe.c:1384
+#: config/tc-tahoe.c:1376
msgid "Auto inc only works of the SP register."
msgstr ""
-#: config/tc-tahoe.c:1388
+#: config/tc-tahoe.c:1380
msgid "Auto inc won't work with quadwords."
msgstr ""
-#: config/tc-tahoe.c:1390
+#: config/tc-tahoe.c:1382
msgid "You can't have an index in auto inc mode."
msgstr ""
-#: config/tc-tahoe.c:1398
+#: config/tc-tahoe.c:1390
msgid "You can't index the sp register."
msgstr ""
-#: config/tc-tahoe.c:1404
+#: config/tc-tahoe.c:1396
msgid "Syntax error in register displaced mode."
msgstr ""
-#: config/tc-tahoe.c:1423
+#: config/tc-tahoe.c:1415
msgid "An offest is needed for this operand."
msgstr ""
-#: config/tc-tahoe.c:1435
+#: config/tc-tahoe.c:1427
msgid "You can't index a register in immediate mode."
msgstr ""
-#: config/tc-tahoe.c:1437
+#: config/tc-tahoe.c:1429
msgid "Immediate access can't be used as an address."
msgstr ""
-#: config/tc-tahoe.c:1548
+#: config/tc-tahoe.c:1540
#, c-format
msgid "Compiler bug: ODD number of bytes in arg structure %s."
msgstr ""
-#: config/tc-tahoe.c:1575 config/tc-vax.c:1839
+#: config/tc-tahoe.c:1567 config/tc-vax.c:1835
msgid "Not enough operands"
msgstr ""
-#: config/tc-tahoe.c:1585 config/tc-vax.c:1846
+#: config/tc-tahoe.c:1577 config/tc-vax.c:1842
msgid "Too many operands"
msgstr ""
-#: config/tc-tahoe.c:1636 config/tc-vax.c:364
+#: config/tc-tahoe.c:1628 config/tc-vax.c:378
#, c-format
msgid "Ignoring statement due to \"%s\""
msgstr ""
-#: config/tc-tahoe.c:1731
+#: config/tc-tahoe.c:1723
#, c-format
msgid "Compliler bug: Got a case (%d) I wasn't expecting."
msgstr ""
-#: config/tc-tahoe.c:1825
+#: config/tc-tahoe.c:1817
msgid "Real branch displacements must be expressions."
msgstr ""
-#: config/tc-tahoe.c:1828
+#: config/tc-tahoe.c:1820
#, c-format
msgid "Complier error: I got an unknown synthetic branch :%c"
msgstr ""
-#: config/tc-tahoe.c:1969
+#: config/tc-tahoe.c:1961
#, c-format
msgid "Barf, bad mode %x\n"
msgstr ""
#. Only word (et al.), align, or conditionals are allowed within
#. .struct/.union.
-#: config/tc-tic54x.c:75
+#: config/tc-tic54x.c:80
msgid "pseudo-op illegal within .struct/.union"
msgstr ""
-#: config/tc-tic54x.c:84
+#: config/tc-tic54x.c:89
msgid "C54x-specific command line options:\n"
msgstr ""
-#: config/tc-tic54x.c:85
+#: config/tc-tic54x.c:90
msgid "-mfar-mode | -mf Use extended addressing\n"
msgstr ""
-#: config/tc-tic54x.c:86
+#: config/tc-tic54x.c:91
msgid "-mcpu=<CPU version> Specify the CPU version\n"
msgstr ""
-#: config/tc-tic54x.c:88
+#: config/tc-tic54x.c:93
msgid "-mcoff-version={0|1|2} Select COFF version\n"
msgstr ""
-#: config/tc-tic54x.c:90
+#: config/tc-tic54x.c:95
msgid "-merrors-to-file <filename>\n"
msgstr ""
-#: config/tc-tic54x.c:91
+#: config/tc-tic54x.c:96
msgid "-me <filename> Redirect errors to a file\n"
msgstr ""
-#: config/tc-tic54x.c:351
+#: config/tc-tic54x.c:348
msgid "Comma and symbol expected for '.asg STRING, SYMBOL'"
msgstr ""
-#: config/tc-tic54x.c:405
+#: config/tc-tic54x.c:401
msgid "Unterminated string after absolute expression"
msgstr ""
-#: config/tc-tic54x.c:413
+#: config/tc-tic54x.c:409
msgid "Comma and symbol expected for '.eval EXPR, SYMBOL'"
msgstr ""
-#: config/tc-tic54x.c:425
+#: config/tc-tic54x.c:421
msgid "symbols assigned with .eval must begin with a letter"
msgstr ""
-#: config/tc-tic54x.c:682
+#: config/tc-tic54x.c:675
msgid "Offset on nested structures is ignored"
msgstr ""
-#: config/tc-tic54x.c:732
+#: config/tc-tic54x.c:725
#, c-format
msgid ".end%s without preceding .%s"
msgstr ""
-#: config/tc-tic54x.c:799
+#: config/tc-tic54x.c:791
#, c-format
msgid "Unrecognized struct/union tag '%s'"
msgstr ""
-#: config/tc-tic54x.c:801
+#: config/tc-tic54x.c:793
msgid ".tag requires a structure tag"
msgstr ""
-#: config/tc-tic54x.c:807
+#: config/tc-tic54x.c:799
msgid "Label required for .tag"
msgstr ""
-#: config/tc-tic54x.c:825
+#: config/tc-tic54x.c:817
#, c-format
msgid ".tag target '%s' undefined"
msgstr ""
-#: config/tc-tic54x.c:887
+#: config/tc-tic54x.c:879
#, c-format
msgid ".field count '%d' out of range (1 <= X <= 32)"
msgstr ""
-#: config/tc-tic54x.c:917
+#: config/tc-tic54x.c:909
#, c-format
msgid "Unrecognized field type '%c'"
msgstr ""
#. Disallow .byte with a non constant expression that will
#. require relocation.
-#: config/tc-tic54x.c:1052
+#: config/tc-tic54x.c:1044
msgid "Relocatable values require at least WORD storage"
msgstr ""
-#: config/tc-tic54x.c:1114
+#: config/tc-tic54x.c:1105
msgid "Use of .def/.ref is deprecated. Use .global instead"
msgstr ""
-#: config/tc-tic54x.c:1305
+#: config/tc-tic54x.c:1298
msgid ".space/.bes repeat count is negative, ignored"
msgstr ""
-#: config/tc-tic54x.c:1310
+#: config/tc-tic54x.c:1303
msgid ".space/.bes repeat count is zero, ignored"
msgstr ""
-#: config/tc-tic54x.c:1388
+#: config/tc-tic54x.c:1380
msgid "Missing size argument"
msgstr ""
-#: config/tc-tic54x.c:1525
+#: config/tc-tic54x.c:1514
msgid "CPU version has already been set"
msgstr ""
-#: config/tc-tic54x.c:1529
+#: config/tc-tic54x.c:1518
#, c-format
msgid "Unrecognized version '%s'"
msgstr ""
-#: config/tc-tic54x.c:1535
+#: config/tc-tic54x.c:1524
msgid "Changing of CPU version on the fly not supported"
msgstr ""
-#: config/tc-tic54x.c:1670
+#: config/tc-tic54x.c:1657
msgid "p2align not supported on this target"
msgstr ""
-#: config/tc-tic54x.c:1683
+#: config/tc-tic54x.c:1669
msgid "Argument to .even ignored"
msgstr ""
-#: config/tc-tic54x.c:1730
+#: config/tc-tic54x.c:1715
msgid "Invalid field size, must be from 1 to 32"
msgstr ""
-#: config/tc-tic54x.c:1743
+#: config/tc-tic54x.c:1728
msgid "field size must be 16 when value is relocatable"
msgstr ""
-#: config/tc-tic54x.c:1757
+#: config/tc-tic54x.c:1742
msgid "field value truncated"
msgstr ""
-#: config/tc-tic54x.c:1863 config/tc-tic54x.c:2175
+#: config/tc-tic54x.c:1846 config/tc-tic54x.c:2148
#, c-format
msgid "Unrecognized section '%s'"
msgstr ""
-#: config/tc-tic54x.c:1872
+#: config/tc-tic54x.c:1855
msgid "Current section is unitialized, section name required for .clink"
msgstr ""
-#: config/tc-tic54x.c:2084
+#: config/tc-tic54x.c:2061
msgid "ENDLOOP without corresponding LOOP"
msgstr ""
-#: config/tc-tic54x.c:2127
+#: config/tc-tic54x.c:2101
msgid "Mixing of normal and extended addressing not supported"
msgstr ""
-#: config/tc-tic54x.c:2133
+#: config/tc-tic54x.c:2107
msgid "Extended addressing not supported on the specified CPU"
msgstr ""
-#: config/tc-tic54x.c:2181
+#: config/tc-tic54x.c:2154
msgid ".sblock may be used for initialized sections only"
msgstr ""
-#: config/tc-tic54x.c:2212
+#: config/tc-tic54x.c:2184
msgid "Symbol missing for .set/.equ"
msgstr ""
-#: config/tc-tic54x.c:2269
+#: config/tc-tic54x.c:2240
msgid ".var may only be used within a macro definition"
msgstr ""
-#: config/tc-tic54x.c:2277
+#: config/tc-tic54x.c:2248
msgid "Substitution symbols must begin with a letter"
msgstr ""
-#: config/tc-tic54x.c:2368
+#: config/tc-tic54x.c:2338
#, c-format
msgid "Can't open macro library file '%s' for reading."
msgstr ""
-#: config/tc-tic54x.c:2375
+#: config/tc-tic54x.c:2345
#, c-format
msgid "File '%s' not in macro archive format"
msgstr ""
-#: config/tc-tic54x.c:2532
+#: config/tc-tic54x.c:2504
#, c-format
msgid "Bad COFF version '%s'"
msgstr ""
-#: config/tc-tic54x.c:2541
+#: config/tc-tic54x.c:2513
#, c-format
msgid "Bad CPU version '%s'"
msgstr ""
-#: config/tc-tic54x.c:2553 config/tc-tic54x.c:2556
+#: config/tc-tic54x.c:2525 config/tc-tic54x.c:2528
#, c-format
msgid "Can't redirect stderr to the file '%s'"
msgstr ""
-#: config/tc-tic54x.c:2702
+#: config/tc-tic54x.c:2662
#, c-format
msgid "Undefined substitution symbol '%s'"
msgstr ""
-#: config/tc-tic54x.c:3390
+#: config/tc-tic54x.c:3335
msgid "Badly formed address expression"
msgstr ""
-#: config/tc-tic54x.c:3655
+#: config/tc-tic54x.c:3593
#, c-format
msgid "Invalid dmad syntax '%s'"
msgstr ""
-#: config/tc-tic54x.c:3771
+#: config/tc-tic54x.c:3707
msgid "Address mode *+ARx is write-only. Results of reading are undefined."
msgstr ""
-#: config/tc-tic54x.c:3791
+#: config/tc-tic54x.c:3727
#, c-format
msgid "Unrecognized indirect address format \"%s\""
msgstr ""
-#: config/tc-tic54x.c:3828
+#: config/tc-tic54x.c:3762
#, c-format
msgid "Operand '%s' out of range (%d <= x <= %d)"
msgstr ""
-#: config/tc-tic54x.c:3848
+#: config/tc-tic54x.c:3782
msgid "Error in relocation handling"
msgstr ""
-#: config/tc-tic54x.c:3869 config/tc-tic54x.c:3933 config/tc-tic54x.c:3963
+#: config/tc-tic54x.c:3801 config/tc-tic54x.c:3863 config/tc-tic54x.c:3889
#, c-format
msgid "Unrecognized condition code \"%s\""
msgstr ""
-#: config/tc-tic54x.c:3886
+#: config/tc-tic54x.c:3818
#, c-format
msgid "Condition \"%s\" does not match preceding group"
msgstr ""
-#: config/tc-tic54x.c:3894
+#: config/tc-tic54x.c:3826
#, c-format
msgid ""
"Condition \"%s\" uses a different accumulator from a preceding condition"
msgstr ""
-#: config/tc-tic54x.c:3901
+#: config/tc-tic54x.c:3833
msgid "Only one comparison conditional allowed"
msgstr ""
-#: config/tc-tic54x.c:3906
+#: config/tc-tic54x.c:3838
msgid "Only one overflow conditional allowed"
msgstr ""
-#: config/tc-tic54x.c:3914
+#: config/tc-tic54x.c:3846
#, c-format
msgid "Duplicate %s conditional"
msgstr ""
-#: config/tc-tic54x.c:3948
+#: config/tc-tic54x.c:3876
msgid "Invalid auxiliary register (use AR0-AR7)"
msgstr ""
-#: config/tc-tic54x.c:3983
+#: config/tc-tic54x.c:3909
msgid "lk addressing modes are invalid for memory-mapped register addressing"
msgstr ""
-#: config/tc-tic54x.c:3991
+#: config/tc-tic54x.c:3917
msgid ""
"Address mode *+ARx is not allowed in memory-mapped register addressing. "
"Resulting behavior is undefined."
msgstr ""
-#: config/tc-tic54x.c:4017
+#: config/tc-tic54x.c:3943
msgid ""
"Destination accumulator for each part of this parallel instruction must be "
"different"
msgstr ""
-#: config/tc-tic54x.c:4066
+#: config/tc-tic54x.c:3992
#, c-format
msgid "Memory mapped register \"%s\" out of range"
msgstr ""
-#: config/tc-tic54x.c:4105
+#: config/tc-tic54x.c:4031
msgid "Invalid operand (use 1, 2, or 3)"
msgstr ""
-#: config/tc-tic54x.c:4130
+#: config/tc-tic54x.c:4056
msgid "A status register or status bit name is required"
msgstr ""
-#: config/tc-tic54x.c:4140
+#: config/tc-tic54x.c:4066
#, c-format
msgid "Unrecognized status bit \"%s\""
msgstr ""
-#: config/tc-tic54x.c:4163
+#: config/tc-tic54x.c:4089
#, c-format
msgid "Invalid status register \"%s\""
msgstr ""
-#: config/tc-tic54x.c:4175
+#: config/tc-tic54x.c:4101
#, c-format
msgid "Operand \"%s\" out of range (use 1 or 2)"
msgstr ""
-#: config/tc-tic54x.c:4375
+#: config/tc-tic54x.c:4302
#, c-format
msgid "Unrecognized instruction \"%s\""
msgstr ""
-#: config/tc-tic54x.c:4404
+#: config/tc-tic54x.c:4331
#, c-format
msgid "Unrecognized operand list '%s' for instruction '%s'"
msgstr ""
-#: config/tc-tic54x.c:4436
+#: config/tc-tic54x.c:4360
#, c-format
msgid "Unrecognized parallel instruction \"%s\""
msgstr ""
-#: config/tc-tic54x.c:4488
+#: config/tc-tic54x.c:4410
#, c-format
msgid "Invalid operand (s) for parallel instruction \"%s\""
msgstr ""
-#: config/tc-tic54x.c:4491
+#: config/tc-tic54x.c:4413
#, c-format
msgid "Unrecognized parallel instruction combination \"%s || %s\""
msgstr ""
-#: config/tc-tic54x.c:4723
+#: config/tc-tic54x.c:4645
#, c-format
msgid "%s symbol recursion stopped at second appearance of '%s'"
msgstr ""
-#: config/tc-tic54x.c:4762
+#: config/tc-tic54x.c:4684
msgid "Unrecognized substitution symbol function"
msgstr ""
-#: config/tc-tic54x.c:4767
+#: config/tc-tic54x.c:4689
msgid "Missing '(' after substitution symbol function"
msgstr ""
-#: config/tc-tic54x.c:4781
+#: config/tc-tic54x.c:4703
msgid "Expecting second argument"
msgstr ""
-#: config/tc-tic54x.c:4794 config/tc-tic54x.c:4843
+#: config/tc-tic54x.c:4716 config/tc-tic54x.c:4765
msgid "Extra junk in function call, expecting ')'"
msgstr ""
-#: config/tc-tic54x.c:4819
+#: config/tc-tic54x.c:4741
msgid "Function expects two arguments"
msgstr ""
-#: config/tc-tic54x.c:4832
+#: config/tc-tic54x.c:4754
msgid "Expecting character constant argument"
msgstr ""
-#: config/tc-tic54x.c:4838
+#: config/tc-tic54x.c:4760
msgid "Both arguments must be substitution symbols"
msgstr ""
-#: config/tc-tic54x.c:4891
+#: config/tc-tic54x.c:4813
#, c-format
msgid "Invalid subscript (use 1 to %d)"
msgstr ""
-#: config/tc-tic54x.c:4901
+#: config/tc-tic54x.c:4823
#, c-format
msgid "Invalid length (use 0 to %d"
msgstr ""
-#: config/tc-tic54x.c:4911
+#: config/tc-tic54x.c:4833
msgid "Missing ')' in subscripted substitution symbol expression"
msgstr ""
-#: config/tc-tic54x.c:4931
+#: config/tc-tic54x.c:4853
msgid "Missing forced substitution terminator ':'"
msgstr ""
-#: config/tc-tic54x.c:5104
+#: config/tc-tic54x.c:5026
#, c-format
msgid ""
"Instruction does not fit in available delay slots (%d-word insn, %d slots "
"left)"
msgstr ""
-#: config/tc-tic54x.c:5145
+#: config/tc-tic54x.c:5067
#, c-format
msgid "Unrecognized parallel instruction '%s'"
msgstr ""
-#: config/tc-tic54x.c:5157
+#: config/tc-tic54x.c:5079
#, c-format
msgid "Instruction '%s' requires an LP cpu version"
msgstr ""
-#: config/tc-tic54x.c:5164
+#: config/tc-tic54x.c:5086
#, c-format
msgid "Instruction '%s' requires far mode addressing"
msgstr ""
-#: config/tc-tic54x.c:5176
+#: config/tc-tic54x.c:5098
#, c-format
msgid ""
"Instruction does not fit in available delay slots (%d-word insn, %d slots "
"left). Resulting behavior is undefined."
msgstr ""
-#: config/tc-tic54x.c:5186
+#: config/tc-tic54x.c:5108
msgid ""
"Instructions which cause PC discontinuity are not allowed in a delay slot. "
"Resulting behavior is undefined."
msgstr ""
-#: config/tc-tic54x.c:5197
+#: config/tc-tic54x.c:5119
#, c-format
msgid "'%s' is not repeatable. Resulting behavior is undefined."
msgstr ""
-#: config/tc-tic54x.c:5201
+#: config/tc-tic54x.c:5123
msgid ""
"Instructions using long offset modifiers or absolute addresses are not "
"repeatable. Resulting behavior is undefined."
msgstr ""
-#: config/tc-tic54x.c:5392
+#: config/tc-tic54x.c:5314
#, c-format
msgid "Unsupported relocation size %d"
msgstr ""
-#: config/tc-tic54x.c:5544
+#: config/tc-tic54x.c:5468
msgid "non-absolute value used with .space/.bes"
msgstr ""
-#: config/tc-tic54x.c:5548
+#: config/tc-tic54x.c:5472
#, c-format
msgid "negative value ignored in %s"
msgstr ""
-#: config/tc-tic54x.c:5635
+#: config/tc-tic54x.c:5559
#, c-format
msgid "attempt to .space/.bes backwards? (%ld)"
msgstr ""
-#: config/tc-tic54x.c:5668
+#: config/tc-tic54x.c:5592
#, c-format
msgid "Invalid label '%s'"
msgstr ""
-#: config/tc-tic80.c:25
+#: config/tc-tic80.c:26
#, c-format
msgid "internal error:%s:%d: %s\n"
msgstr ""
-#: config/tc-tic80.c:28
+#: config/tc-tic80.c:29
#, c-format
msgid "internal error:%s:%d: %s %d\n"
msgstr ""
-#: config/tc-tic80.c:90
+#: config/tc-tic80.c:91
msgid "Relaxation is a luxury we can't afford"
msgstr ""
-#: config/tc-tic80.c:140
+#: config/tc-tic80.c:141
msgid "bad call to md_atof ()"
msgstr ""
-#: config/tc-tic80.c:238
+#: config/tc-tic80.c:239
msgid "':' not followed by 'm' or 's'"
msgstr ""
-#: config/tc-tic80.c:251
+#: config/tc-tic80.c:252
msgid "paren nesting"
msgstr ""
-#: config/tc-tic80.c:265
+#: config/tc-tic80.c:266
msgid "mismatched parenthesis"
msgstr ""
-#: config/tc-tic80.c:467
+#: config/tc-tic80.c:468
msgid "unhandled expression type"
msgstr ""
-#: config/tc-tic80.c:681
+#: config/tc-tic80.c:682
msgid "symbol reloc that is not PC relative or 32 bits"
msgstr ""
-#: config/tc-tic80.c:710
+#: config/tc-tic80.c:711
msgid "unhandled operand modifier"
msgstr ""
-#: config/tc-tic80.c:752
+#: config/tc-tic80.c:753
msgid "unhandled expression"
msgstr ""
-#: config/tc-tic80.c:801
+#: config/tc-tic80.c:802
#, c-format
msgid "Invalid mnemonic: '%s'"
msgstr ""
-#: config/tc-tic80.c:814
+#: config/tc-tic80.c:815
#, c-format
msgid "Invalid operands: '%s'"
msgstr ""
-#: config/tc-tic80.c:892
+#: config/tc-tic80.c:893
msgid "unhandled predefined symbol bits"
msgstr ""
-#: config/tc-tic80.c:984
+#: config/tc-tic80.c:987
#, c-format
msgid "PC offset 0x%lx outside range 0x%lx-0x%lx"
msgstr ""
-#: config/tc-tic80.c:999
+#: config/tc-tic80.c:1002
msgid "unhandled relocation type in fixup"
msgstr ""
-#: config/tc-tic80.c:1035
+#: config/tc-tic80.c:1041
msgid "md_convert_frag() not implemented yet"
msgstr ""
-#: config/tc-v850.c:270
+#: config/tc-v850.c:271
#, c-format
msgid ".COMMon length (%d.) < 0! Ignored."
msgstr ""
-#: config/tc-v850.c:1013
+#: config/tc-v850.c:320
+msgid "Common alignment negative; 0 assumed"
+msgstr ""
+
+#: config/tc-v850.c:1014
#, c-format
msgid "unknown operand shift: %x\n"
msgstr ""
-#: config/tc-v850.c:1014
+#: config/tc-v850.c:1015
msgid "internal failure in parse_register_list"
msgstr ""
-#: config/tc-v850.c:1031
+#: config/tc-v850.c:1032
msgid "constant expression or register list expected"
msgstr ""
-#: config/tc-v850.c:1036 config/tc-v850.c:1049 config/tc-v850.c:1068
+#: config/tc-v850.c:1037 config/tc-v850.c:1050 config/tc-v850.c:1069
msgid "high bits set in register list expression"
msgstr ""
-#: config/tc-v850.c:1108 config/tc-v850.c:1172
+#: config/tc-v850.c:1109 config/tc-v850.c:1173
msgid "illegal register included in list"
msgstr ""
-#: config/tc-v850.c:1115
+#: config/tc-v850.c:1116
msgid "system registers cannot be included in list"
msgstr ""
-#: config/tc-v850.c:1120
+#: config/tc-v850.c:1121
msgid "PSW cannot be included in list"
msgstr ""
-#: config/tc-v850.c:1127
+#: config/tc-v850.c:1128
msgid "High value system registers cannot be included in list"
msgstr ""
-#: config/tc-v850.c:1151
+#: config/tc-v850.c:1152
msgid "second register should follow dash in register list"
msgstr ""
-#: config/tc-v850.c:1198
+#: config/tc-v850.c:1199
msgid " V850 options:\n"
msgstr ""
-#: config/tc-v850.c:1199
+#: config/tc-v850.c:1200
msgid " -mwarn-signed-overflow Warn if signed immediate values overflow\n"
msgstr ""
-#: config/tc-v850.c:1200
+#: config/tc-v850.c:1201
msgid ""
" -mwarn-unsigned-overflow Warn if unsigned immediate values overflow\n"
msgstr ""
-#: config/tc-v850.c:1201
+#: config/tc-v850.c:1202
msgid " -mv850 The code is targeted at the v850\n"
msgstr ""
-#: config/tc-v850.c:1202
+#: config/tc-v850.c:1203
msgid " -mv850e The code is targeted at the v850e\n"
msgstr ""
-#: config/tc-v850.c:1203
+#: config/tc-v850.c:1204
msgid " -mv850ea The code is targeted at the v850ea\n"
msgstr ""
-#: config/tc-v850.c:1204
+#: config/tc-v850.c:1205
msgid ""
" -mv850any The code is generic, despite any processor "
"specific instructions\n"
msgstr ""
-#: config/tc-v850.c:1216 config/tc-v850.c:1254
+#: config/tc-v850.c:1217 config/tc-v850.c:1255
#, c-format
msgid "unknown command line option: -%c%s\n"
msgstr ""
-#: config/tc-v850.c:1407
+#: config/tc-v850.c:1405
#, c-format
msgid "Unable to determine default target processor from string: %s"
msgstr ""
-#: config/tc-v850.c:1455
+#: config/tc-v850.c:1453
msgid "ctoff() relocation used on an instruction which does not support it"
msgstr ""
-#: config/tc-v850.c:1477
+#: config/tc-v850.c:1475
msgid "sdaoff() relocation used on an instruction which does not support it"
msgstr ""
-#: config/tc-v850.c:1499
+#: config/tc-v850.c:1497
msgid "zdaoff() relocation used on an instruction which does not support it"
msgstr ""
-#: config/tc-v850.c:1532
+#: config/tc-v850.c:1530
msgid "tdaoff() relocation used on an instruction which does not support it"
msgstr ""
-#: config/tc-v850.c:1749
+#: config/tc-v850.c:1746
msgid "Target processor does not support this instruction."
msgstr ""
-#: config/tc-v850.c:1839 config/tc-v850.c:1869 config/tc-v850.c:2057
+#: config/tc-v850.c:1836 config/tc-v850.c:1866 config/tc-v850.c:2054
msgid "immediate operand is too large"
msgstr ""
-#: config/tc-v850.c:1851
+#: config/tc-v850.c:1848
msgid "AAARG -> unhandled constant reloc"
msgstr ""
-#: config/tc-v850.c:1895
+#: config/tc-v850.c:1892
msgid "invalid register name"
msgstr ""
-#: config/tc-v850.c:1900
+#: config/tc-v850.c:1897
msgid "register r0 cannot be used here"
msgstr ""
-#: config/tc-v850.c:1912
+#: config/tc-v850.c:1909
msgid "invalid system register name"
msgstr ""
-#: config/tc-v850.c:1925
+#: config/tc-v850.c:1922
msgid "expected EP register"
msgstr ""
-#: config/tc-v850.c:1942
+#: config/tc-v850.c:1939
msgid "invalid condition code name"
msgstr ""
-#: config/tc-v850.c:1963 config/tc-v850.c:1967
+#: config/tc-v850.c:1960 config/tc-v850.c:1964
msgid "constant too big to fit into instruction"
msgstr ""
-#: config/tc-v850.c:2020
+#: config/tc-v850.c:2017
msgid "syntax error: value is missing before the register name"
msgstr ""
-#: config/tc-v850.c:2022
+#: config/tc-v850.c:2019
msgid "syntax error: register not expected"
msgstr ""
-#: config/tc-v850.c:2036
+#: config/tc-v850.c:2033
msgid "syntax error: system register not expected"
msgstr ""
-#: config/tc-v850.c:2041
+#: config/tc-v850.c:2038
msgid "syntax error: condition code not expected"
msgstr ""
-#: config/tc-v850.c:2082
+#: config/tc-v850.c:2079
msgid "invalid operand"
msgstr ""
-#: config/tc-vax.c:259
+#: config/tc-vax.c:267
#, c-format
msgid "VIP_BEGIN error:%s"
msgstr ""
-#: config/tc-vax.c:383
+#: config/tc-vax.c:397
#, c-format
msgid "Ignoring statement because \"%s\""
msgstr ""
-#: config/tc-vax.c:430
+#: config/tc-vax.c:444
msgid "Can't relocate expression"
msgstr ""
-#: config/tc-vax.c:533
+#: config/tc-vax.c:547
msgid "Bignum not permitted in short literal. Immediate mode assumed."
msgstr ""
-#: config/tc-vax.c:542
+#: config/tc-vax.c:556
msgid "Can't do flonum short literal: immediate mode used."
msgstr ""
-#: config/tc-vax.c:587
+#: config/tc-vax.c:601
#, c-format
msgid "A bignum/flonum may not be a displacement: 0x%lx used"
msgstr ""
-#: config/tc-vax.c:908
+#: config/tc-vax.c:922
#, c-format
msgid "Short literal overflow(%ld.), immediate mode assumed."
msgstr ""
-#: config/tc-vax.c:917
+#: config/tc-vax.c:931
#, c-format
msgid "Forced short literal to immediate mode. now_seg=%s to_seg=%s"
msgstr ""
-#: config/tc-vax.c:976
+#: config/tc-vax.c:990
msgid "Length specification ignored. Address mode 9F used"
msgstr ""
-#: config/tc-vax.c:1025
+#: config/tc-vax.c:1039
msgid "Invalid operand: immediate value used as base address."
msgstr ""
-#: config/tc-vax.c:1027
+#: config/tc-vax.c:1041
msgid "Invalid operand: immediate value used as address."
msgstr ""
-#: config/tc-vax.c:1818
+#: config/tc-vax.c:1814
msgid "odd number of bytes in operand description"
msgstr ""
-#: config/tc-vax.c:1834
+#: config/tc-vax.c:1830
msgid "Bad operand"
msgstr ""
-#: config/tc-vax.c:2390
+#: config/tc-vax.c:2383
msgid "no '[' to match ']'"
msgstr ""
-#: config/tc-vax.c:2408
+#: config/tc-vax.c:2401
msgid "bad register in []"
msgstr ""
-#: config/tc-vax.c:2410
+#: config/tc-vax.c:2403
msgid "[PC] index banned"
msgstr ""
-#: config/tc-vax.c:2445
+#: config/tc-vax.c:2438
msgid "no '(' to match ')'"
msgstr ""
-#: config/tc-vax.c:2580
+#: config/tc-vax.c:2573
msgid "invalid branch operand"
msgstr ""
-#: config/tc-vax.c:2609
+#: config/tc-vax.c:2602
msgid "address prohibits @"
msgstr ""
-#: config/tc-vax.c:2611
+#: config/tc-vax.c:2604
msgid "address prohibits #"
msgstr ""
-#: config/tc-vax.c:2615
+#: config/tc-vax.c:2608
msgid "address prohibits -()"
msgstr ""
-#: config/tc-vax.c:2617
+#: config/tc-vax.c:2610
msgid "address prohibits ()+"
msgstr ""
-#: config/tc-vax.c:2620
+#: config/tc-vax.c:2613
msgid "address prohibits ()"
msgstr ""
-#: config/tc-vax.c:2622
+#: config/tc-vax.c:2615
msgid "address prohibits []"
msgstr ""
-#: config/tc-vax.c:2624
+#: config/tc-vax.c:2617
msgid "address prohibits register"
msgstr ""
-#: config/tc-vax.c:2626
+#: config/tc-vax.c:2619
msgid "address prohibits displacement length specifier"
msgstr ""
-#: config/tc-vax.c:2656
+#: config/tc-vax.c:2649
msgid "invalid operand of S^#"
msgstr ""
-#: config/tc-vax.c:2673
+#: config/tc-vax.c:2666
msgid "S^# needs expression"
msgstr ""
-#: config/tc-vax.c:2680
+#: config/tc-vax.c:2673
msgid "S^# may only read-access"
msgstr ""
-#: config/tc-vax.c:2705
+#: config/tc-vax.c:2698
msgid "invalid operand of -()"
msgstr ""
-#: config/tc-vax.c:2711
+#: config/tc-vax.c:2704
msgid "-(PC) unpredictable"
msgstr ""
-#: config/tc-vax.c:2713
+#: config/tc-vax.c:2706
msgid "[]index same as -()register: unpredictable"
msgstr ""
-#: config/tc-vax.c:2749
+#: config/tc-vax.c:2742
msgid "invalid operand of ()+"
msgstr ""
-#: config/tc-vax.c:2755
+#: config/tc-vax.c:2748
msgid "(PC)+ unpredictable"
msgstr ""
-#: config/tc-vax.c:2757
+#: config/tc-vax.c:2750
msgid "[]index same as ()+register: unpredictable"
msgstr ""
-#: config/tc-vax.c:2782
+#: config/tc-vax.c:2775
msgid "# conflicts length"
msgstr ""
-#: config/tc-vax.c:2784
+#: config/tc-vax.c:2777
msgid "# bars register"
msgstr ""
-#: config/tc-vax.c:2806
+#: config/tc-vax.c:2799
msgid "writing or modifying # is unpredictable"
msgstr ""
-#: config/tc-vax.c:2836
+#: config/tc-vax.c:2829
msgid "length not needed"
msgstr ""
-#: config/tc-vax.c:2843
+#: config/tc-vax.c:2836
msgid "can't []index a register, because it has no address"
msgstr ""
-#: config/tc-vax.c:2845
+#: config/tc-vax.c:2838
msgid "a register has no address"
msgstr ""
-#: config/tc-vax.c:2856
+#: config/tc-vax.c:2849
msgid "PC part of operand unpredictable"
msgstr ""
-#: config/tc-vax.c:3185
+#: config/tc-vax.c:3178
msgid ""
"VAX options:\n"
"-d LENGTH\t\tignored\n"
@@ -7788,7 +8502,7 @@ msgid ""
"-V\t\t\tignored\n"
msgstr ""
-#: config/tc-vax.c:3194
+#: config/tc-vax.c:3187
msgid ""
"VMS options:\n"
"-+\t\t\thash encode names longer than 31 characters\n"
@@ -7799,50 +8513,54 @@ msgid ""
"-v\"VERSION\"\t\tcode being assembled was produced by compiler \"VERSION\"\n"
msgstr ""
-#: config/tc-w65.c:127
+#: config/tc-w65.c:144
msgid "need on or off."
msgstr ""
-#: config/tc-w65.c:311 config/tc-w65.c:354
+#: config/tc-w65.c:304 config/tc-w65.c:347
msgid "syntax error after <exp"
msgstr ""
-#: config/tc-z8k.c:286
+#: config/tc-w65.c:855
+msgid "call to tc_Nout_fix_to_chars \n"
+msgstr ""
+
+#: config/tc-z8k.c:285
#, c-format
msgid "register rr%d, out of range."
msgstr ""
-#: config/tc-z8k.c:294
+#: config/tc-z8k.c:295
#, c-format
msgid "register rh%d, out of range."
msgstr ""
-#: config/tc-z8k.c:302
+#: config/tc-z8k.c:305
#, c-format
msgid "register rl%d, out of range."
msgstr ""
-#: config/tc-z8k.c:311
+#: config/tc-z8k.c:316
#, c-format
msgid "register rq%d, out of range."
msgstr ""
-#: config/tc-z8k.c:319
+#: config/tc-z8k.c:326
#, c-format
msgid "register r%d, out of range."
msgstr ""
-#: config/tc-z8k.c:364
+#: config/tc-z8k.c:371
#, c-format
msgid "expected %c"
msgstr ""
-#: config/tc-z8k.c:381
+#: config/tc-z8k.c:388
#, c-format
msgid "register is wrong size for a word %s"
msgstr ""
-#: config/tc-z8k.c:397
+#: config/tc-z8k.c:404
#, c-format
msgid "register is wrong size for address %s"
msgstr ""
@@ -7856,194 +8574,194 @@ msgstr ""
msgid "operand %s0x%x out of range."
msgstr ""
-#: config/tc-z8k.c:1070
+#: config/tc-z8k.c:1060
msgid "immediate must be 1 or 2"
msgstr ""
-#: config/tc-z8k.c:1073
+#: config/tc-z8k.c:1063
msgid "immediate 1 or 2 expected"
msgstr ""
-#: config/tc-z8k.c:1099
+#: config/tc-z8k.c:1089
msgid "can't use R0 here"
msgstr ""
-#: config/tc-z8k.c:1246
+#: config/tc-z8k.c:1243
msgid "Can't find opcode to match operands"
msgstr ""
-#: config/tc-z8k.c:1361
+#: config/tc-z8k.c:1358
#, c-format
msgid "invalid architecture -z%s"
msgstr ""
-#: config/tc-z8k.c:1377
+#: config/tc-z8k.c:1374
msgid ""
"Z8K options:\n"
"-z8001\t\t\tgenerate segmented code\n"
"-z8002\t\t\tgenerate unsegmented code\n"
msgstr ""
-#: config/tc-z8k.c:1521
+#: config/tc-z8k.c:1523
#, c-format
msgid "Can't subtract symbols in different sections %s %s"
msgstr ""
-#: depend.c:196
+#: depend.c:200
#, c-format
-msgid "Can't open `%s' for writing"
+msgid "can't open `%s' for writing"
msgstr ""
-#: depend.c:208
+#: depend.c:212
#, c-format
-msgid "Can't close `%s'"
+msgid "can't close `%s'"
+msgstr ""
+
+#: dwarf2dbg.c:353 dwarf2dbg.c:395
+msgid "file number less than one"
msgstr ""
-#: dwarf2dbg.c:345 dwarf2dbg.c:379
-msgid "File number less than zero"
+#: dwarf2dbg.c:359
+#, c-format
+msgid "file number %ld already allocated"
msgstr ""
-#: dwarf2dbg.c:385
+#: dwarf2dbg.c:400 dwarf2dbg.c:946
#, c-format
-msgid "Unassigned file number %ld"
+msgid "unassigned file number %ld"
msgstr ""
-#: dwarf2dbg.c:1255 dwarf2dbg.c:1263 dwarf2dbg.c:1271 dwarf2dbg.c:1284
-#: dwarf2dbg.c:1291
+#: dwarf2dbg.c:1284 dwarf2dbg.c:1292 dwarf2dbg.c:1300 dwarf2dbg.c:1320
msgid "dwarf2 is not supported for this object file format"
msgstr ""
-#: ecoff.c:1555
+#: ecoff.c:1556
#, c-format
-msgid "String too big (%lu bytes)"
+msgid "string too big (%lu bytes)"
msgstr ""
-#: ecoff.c:1581
+#: ecoff.c:1582
#, c-format
-msgid "Inserting \"%s\" into string hash table: %s"
+msgid "inserting \"%s\" into string hash table: %s"
msgstr ""
-#: ecoff.c:1613 ecoff.c:1807 ecoff.c:1832 ecoff.c:1864 ecoff.c:2018
-#: ecoff.c:2132
+#: ecoff.c:1614 ecoff.c:1808 ecoff.c:1833 ecoff.c:1865 ecoff.c:2019
+#: ecoff.c:2133
msgid "no current file pointer"
msgstr ""
-#: ecoff.c:1700
+#: ecoff.c:1701
msgid "too many st_End's"
msgstr ""
-#: ecoff.c:2044
+#: ecoff.c:2045
#, c-format
-msgid "Inserting \"%s\" into tag hash table: %s"
+msgid "inserting \"%s\" into tag hash table: %s"
msgstr ""
-#: ecoff.c:2210
+#: ecoff.c:2211
msgid "fake .file after real one"
msgstr ""
-#: ecoff.c:2300
-msgid "Filename goes over one page boundary."
+#: ecoff.c:2301
+msgid "filename goes over one page boundary"
msgstr ""
-#: ecoff.c:2435
+#: ecoff.c:2436
msgid ".begin directive without a preceding .file directive"
msgstr ""
-#: ecoff.c:2442
+#: ecoff.c:2443
msgid ".begin directive without a preceding .ent directive"
msgstr ""
-#: ecoff.c:2474
+#: ecoff.c:2475
msgid ".bend directive without a preceding .file directive"
msgstr ""
-#: ecoff.c:2481
+#: ecoff.c:2482
msgid ".bend directive without a preceding .ent directive"
msgstr ""
-#: ecoff.c:2494
+#: ecoff.c:2495
msgid ".bend directive names unknown symbol"
msgstr ""
-#: ecoff.c:2538
+#: ecoff.c:2539
msgid ".def pseudo-op used inside of .def/.endef; ignored"
msgstr ""
-#: ecoff.c:2540
-msgid "Empty symbol name in .def; ignored"
+#: ecoff.c:2541
+msgid "empty symbol name in .def; ignored"
msgstr ""
-#: ecoff.c:2578
+#: ecoff.c:2579
msgid ".dim pseudo-op used outside of .def/.endef; ignored"
msgstr ""
-#: ecoff.c:2593
-msgid "Badly formed .dim directive"
+#: ecoff.c:2594
+msgid "badly formed .dim directive"
msgstr ""
-#: ecoff.c:2606
-msgid "Too many .dim entries"
+#: ecoff.c:2607
+msgid "too many .dim entries"
msgstr ""
-#: ecoff.c:2627
+#: ecoff.c:2628
msgid ".scl pseudo-op used outside of .def/.endef; ignored"
msgstr ""
-#: ecoff.c:2653
+#: ecoff.c:2654
msgid ".size pseudo-op used outside of .def/.endef; ignored"
msgstr ""
-#: ecoff.c:2668
-msgid "Badly formed .size directive"
+#: ecoff.c:2669
+msgid "badly formed .size directive"
msgstr ""
-#: ecoff.c:2681
-msgid "Too many .size entries"
+#: ecoff.c:2682
+msgid "too many .size entries"
msgstr ""
-#: ecoff.c:2704
+#: ecoff.c:2705
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:2722
+#: ecoff.c:2723
#, c-format
-msgid "The type of %s is too complex; it will be simplified"
+msgid "the type of %s is too complex; it will be simplified"
msgstr ""
-#: ecoff.c:2733
+#: ecoff.c:2734
msgid "Unrecognized .type argument"
msgstr ""
-#: ecoff.c:2772
+#: ecoff.c:2773
msgid ".tag pseudo-op used outside of .def/.endef; ignored"
msgstr ""
-#: ecoff.c:2799
+#: ecoff.c:2800
msgid ".val pseudo-op used outside of .def/.endef; ignored"
msgstr ""
-#: ecoff.c:2807
+#: ecoff.c:2808
msgid ".val expression is too copmlex"
msgstr ""
-#: ecoff.c:2838
+#: ecoff.c:2839
msgid ".endef pseudo-op used before .def; ignored"
msgstr ""
-#: ecoff.c:2864
-msgid "Bad COFF debugging info"
+#: ecoff.c:2865 ecoff.c:2946
+msgid "bad COFF debugging information"
msgstr ""
-#: ecoff.c:2913
+#: ecoff.c:2914
#, c-format
-msgid "No tag specified for %s"
-msgstr ""
-
-#: ecoff.c:2945
-msgid "Bad COFF debugging information"
+msgid "no tag specified for %s"
msgstr ""
#: ecoff.c:3017
@@ -8054,114 +8772,128 @@ msgstr ""
msgid ".end directive without a preceding .ent directive"
msgstr ""
-#: ecoff.c:3047
+#: ecoff.c:3046
msgid ".end directive names unknown symbol"
msgstr ""
-#: ecoff.c:3076
+#: ecoff.c:3074
msgid "second .ent directive found before .end directive"
msgstr ""
-#: ecoff.c:3151
-msgid "No way to handle .file within .ent/.end section"
+#: ecoff.c:3148
+msgid "no way to handle .file within .ent/.end section"
msgstr ""
-#: ecoff.c:3176
+#: ecoff.c:3173
msgid ".fmask outside of .ent"
msgstr ""
-#: ecoff.c:3246
+#: ecoff.c:3180
+msgid "bad .fmask directive"
+msgstr ""
+
+#: ecoff.c:3213
+msgid "bad .frame directive"
+msgstr ""
+
+#: ecoff.c:3243
msgid ".mask outside of .ent"
msgstr ""
-#: ecoff.c:3276
-msgid ".loc before .file"
+#: ecoff.c:3250
+msgid "bad .mask directive"
msgstr ""
-#: ecoff.c:3402
-#, c-format
-msgid "Ignoring attempt to redefine symbol `%s'."
+#: ecoff.c:3273
+msgid ".loc before .file"
msgstr ""
-#: ecoff.c:3415
+#: ecoff.c:3412
msgid "bad .weakext directive"
msgstr ""
-#: ecoff.c:3484
+#: ecoff.c:3481
#, c-format
msgid ".stab%c is not supported"
msgstr ""
-#: ecoff.c:3494
+#: ecoff.c:3491
#, c-format
msgid ".stab%c: ignoring non-zero other field"
msgstr ""
-#: ecoff.c:3528
+#: ecoff.c:3525
#, c-format
msgid ""
-"Line number (%d) for .stab%c directive cannot fit in index field (20 bits)"
+"line number (%d) for .stab%c directive cannot fit in index field (20 bits)"
msgstr ""
-#: ecoff.c:3564
+#: ecoff.c:3561
#, c-format
-msgid "Illegal .stab%c directive, bad character"
+msgid "illegal .stab%c directive, bad character"
msgstr ""
-#: ecoff.c:4026 ecoff.c:4215 ecoff.c:4240
+#: ecoff.c:4023 ecoff.c:4212 ecoff.c:4237
msgid ".begin/.bend in different segments"
msgstr ""
-#: ecoff.c:4741
-msgid "Missing .end or .bend at end of file"
+#: ecoff.c:4739
+msgid "missing .end or .bend at end of file"
msgstr ""
-#: ecoff.c:5231
+#: ecoff.c:5229
msgid "GP prologue size exceeds field size, using 0 instead"
msgstr ""
-#: expr.c:245
-msgid ""
-"bad floating-point constant: exponent overflow, probably assembling junk"
+#: expr.c:84 read.c:3225
+msgid "bignum invalid"
+msgstr ""
+
+#: expr.c:86 read.c:3227 read.c:3560 read.c:4459
+msgid "floating point number invalid"
+msgstr ""
+
+#: expr.c:246
+msgid "bad floating-point constant: exponent overflow"
msgstr ""
-#: expr.c:249
+#: expr.c:250
#, c-format
-msgid "bad floating-point constant: unknown error code=%d."
+msgid "bad floating-point constant: unknown error code=%d"
msgstr ""
-#: expr.c:429
+#: expr.c:428
msgid ""
-"A bignum with underscores may not have more than 8 hex digits in any word."
+"a bignum with underscores may not have more than 8 hex digits in any word"
msgstr ""
-#: expr.c:452
-msgid "A bignum with underscores must have exactly 4 words."
+#: expr.c:451
+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:575
+#: expr.c:574
#, c-format
-msgid "backw. ref to unknown label \"%d:\", 0 assumed."
+msgid "backward ref to unknown label \"%d:\""
msgstr ""
-#: expr.c:698
-msgid "Character constant too large"
+#: expr.c:697
+msgid "character constant too large"
msgstr ""
-#: expr.c:949
+#: expr.c:950
#, c-format
msgid "expr.c(operand): bad atof_generic return val %d"
msgstr ""
#: expr.c:1012
#, c-format
-msgid "Missing '%c' assumed"
+msgid "missing '%c'"
msgstr ""
-#: expr.c:1024 read.c:3869
+#: expr.c:1024 read.c:3930
msgid "EBCDIC constants are not supported"
msgstr ""
@@ -8174,48 +8906,44 @@ msgstr ""
msgid "syntax error in .startof. or .sizeof."
msgstr ""
-#: expr.c:1314
-msgid "Bad expression"
-msgstr ""
-
-#: expr.c:1674
+#: expr.c:1677
msgid "missing operand; zero assumed"
msgstr ""
-#: expr.c:1707
-msgid "operation combines symbols in different segments"
-msgstr ""
-
-#: expr.c:1724
+#: expr.c:1712
msgid "left operand is a bignum; integer 0 assumed"
msgstr ""
-#: expr.c:1726
+#: expr.c:1714
msgid "left operand is a float; integer 0 assumed"
msgstr ""
-#: expr.c:1735
+#: expr.c:1723
msgid "right operand is a bignum; integer 0 assumed"
msgstr ""
-#: expr.c:1737
+#: expr.c:1725
msgid "right operand is a float; integer 0 assumed"
msgstr ""
-#: expr.c:1793 symbols.c:1089
+#: expr.c:1780 symbols.c:1121
msgid "division by zero"
msgstr ""
-#: frags.c:86
+#: expr.c:1878
+msgid "operation combines symbols in different segments"
+msgstr ""
+
+#: frags.c:87
#, c-format
-msgid "Can't extend frag %d. chars"
+msgid "can't extend frag %u chars"
msgstr ""
-#: frags.c:167
+#: frags.c:168
msgid "attempt to allocate data in absolute section"
msgstr ""
-#: frags.c:173
+#: frags.c:174
msgid "attempt to allocate data in common section"
msgstr ""
@@ -8304,188 +9032,188 @@ msgid "form COL= needs absolute expresssion.\n"
msgstr ""
#. Turns the next expression into a string.
-#: gasp.c:1552 macro.c:387
-#, c-format
+#: gasp.c:1553 macro.c:382
+#, no-c-format
msgid "% operator needs absolute expression"
msgstr ""
-#: gasp.c:1614
+#: gasp.c:1615
msgid "misplaced ( .\n"
msgstr ""
-#: gasp.c:1629
+#: gasp.c:1630
msgid "misplaced ).\n"
msgstr ""
-#: gasp.c:1681
+#: gasp.c:1682
msgid ".instr needs absolute expresson.\n"
msgstr ""
-#: gasp.c:1718
+#: gasp.c:1719
msgid "need absolute position.\n"
msgstr ""
-#: gasp.c:1720
+#: gasp.c:1721
msgid "need absolute length.\n"
msgstr ""
-#: gasp.c:1966
+#: gasp.c:1967
msgid "END missing from end of file.\n"
msgstr ""
-#: gasp.c:1992
+#: gasp.c:1993
msgid ".ASSIGNA needs constant expression argument.\n"
msgstr ""
-#: gasp.c:1996
+#: gasp.c:1997
msgid ".ASSIGNA without label.\n"
msgstr ""
-#: gasp.c:2021
+#: gasp.c:2022
msgid ".ASSIGNS without label.\n"
msgstr ""
-#: gasp.c:2085
+#: gasp.c:2086
#, c-format
msgid "Can't find preprocessor variable %s.\n"
msgstr ""
-#: gasp.c:2150
+#: gasp.c:2151
msgid "Comparison operator must be one of EQ, NE, LT, LE, GT or GE.\n"
msgstr ""
-#: gasp.c:2185
+#: gasp.c:2186
msgid "Comparison operator for strings must be EQ or NE\n"
msgstr ""
-#: gasp.c:2197 gasp.c:2207 gasp.c:2310
+#: gasp.c:2198 gasp.c:2208 gasp.c:2311
msgid "Conditional operator must have absolute operands.\n"
msgstr ""
-#: gasp.c:2202
+#: gasp.c:2203
msgid "String compared against expression.\n"
msgstr ""
-#: gasp.c:2253
+#: gasp.c:2254
msgid "AIF nesting unreasonable.\n"
msgstr ""
-#: gasp.c:2268
+#: gasp.c:2269
msgid "Multiple AELSEs in AIF.\n"
msgstr ""
-#: gasp.c:2284
+#: gasp.c:2285
msgid "AENDI without AIF.\n"
msgstr ""
-#: gasp.c:2307 gasp.c:2389
+#: gasp.c:2308 gasp.c:2390
msgid "IF nesting unreasonable.\n"
msgstr ""
-#: gasp.c:2399
+#: gasp.c:2400
msgid "Bad format for IF or IFNC.\n"
msgstr ""
-#: gasp.c:2420
+#: gasp.c:2421
msgid "AENDR without a AREPEAT.\n"
msgstr ""
-#: gasp.c:2422
+#: gasp.c:2423
msgid "ENDR without a REPT.\n"
msgstr ""
-#: gasp.c:2444
+#: gasp.c:2445
#, c-format
msgid "AWHILE without a AENDW at %d.\n"
msgstr ""
-#: gasp.c:2481
+#: gasp.c:2482
msgid "AENDW without a AENDW.\n"
msgstr ""
-#: gasp.c:2525
+#: gasp.c:2526
msgid "AREPEAT must have absolute operand.\n"
msgstr ""
-#: gasp.c:2531
+#: gasp.c:2532
#, c-format
msgid "AREPEAT without a AENDR at %d.\n"
msgstr ""
-#: gasp.c:2573
+#: gasp.c:2574
msgid ".ENDM without a matching .MACRO.\n"
msgstr ""
-#: gasp.c:2607
+#: gasp.c:2608
msgid "LOCAL outside of MACRO"
msgstr ""
-#: gasp.c:2620
+#: gasp.c:2621
#, c-format
msgid "macro at line %d: %s\n"
msgstr ""
-#: gasp.c:2643
+#: gasp.c:2644
msgid "macro expansion"
msgstr ""
-#: gasp.c:2697
+#: gasp.c:2698
msgid "Character code in string must be absolute expression.\n"
msgstr ""
-#: gasp.c:2702
+#: gasp.c:2703
msgid "Missing > for character code.\n"
msgstr ""
-#: gasp.c:2761
+#: gasp.c:2762
#, c-format
msgid "string for SDATAC longer than 255 characters (%d).\n"
msgstr ""
-#: gasp.c:2790
+#: gasp.c:2791
#, c-format
msgid "illegal character in SDATA line (0x%x).\n"
msgstr ""
-#: gasp.c:2812
+#: gasp.c:2813
msgid "Must have absolute SDATAB repeat count.\n"
msgstr ""
-#: gasp.c:2815
+#: gasp.c:2816
#, c-format
msgid "Must have positive SDATAB repeat count (%d).\n"
msgstr ""
-#: gasp.c:2843
+#: gasp.c:2844
#, c-format
msgid "Unreasonable include depth (%ld).\n"
msgstr ""
-#: gasp.c:2897
+#: gasp.c:2898
#, c-format
msgid "Can't open include file `%s'.\n"
msgstr ""
-#: gasp.c:2971
+#: gasp.c:2972
msgid "Unreasonable expansion (-u turns off check).\n"
msgstr ""
#. This one causes lots of pain when trying to preprocess
#. ordinary code.
-#: gasp.c:3185
+#: gasp.c:3186
#, c-format
msgid "Unrecognised pseudo op `%s'.\n"
msgstr ""
-#: gasp.c:3254
+#: gasp.c:3255
msgid "ORG command not allowed.\n"
msgstr ""
-#: gasp.c:3467
+#: gasp.c:3468
msgid "Invalid expression on command line.\n"
msgstr ""
-#: gasp.c:3510
+#: gasp.c:3511
#, c-format
msgid ""
"Usage: %s \n"
@@ -8498,7 +9226,7 @@ msgid ""
" [-p] [--print] print line numbers\n"
msgstr ""
-#: gasp.c:3519
+#: gasp.c:3520
msgid ""
" [-s] [--copysource] copy source through as comments \n"
" [-u] [--unreasonable] allow unreasonable nesting\n"
@@ -8509,37 +9237,37 @@ msgid ""
" [in-file]\n"
msgstr ""
-#: gasp.c:3536
+#: gasp.c:3537
#, c-format
msgid "%s: Gnu Assembler Macro Preprocessor\n"
msgstr ""
#. This output is intended to follow the GNU standards document.
-#: gasp.c:3619
+#: gasp.c:3625
#, c-format
msgid "GNU assembler pre-processor %s\n"
msgstr ""
-#: gasp.c:3620
+#: gasp.c:3626
msgid "Copyright 1996 Free Software Foundation, Inc.\n"
msgstr ""
-#: gasp.c:3643
+#: gasp.c:3649
#, c-format
msgid "%s: Can't open output file `%s'.\n"
msgstr ""
-#: gasp.c:3667
+#: gasp.c:3673
#, c-format
msgid "%s: Can't open input file `%s'.\n"
msgstr ""
-#: gasp.c:3686
+#: gasp.c:3692
#, c-format
msgid "Internal error, aborting at %s line %d"
msgstr ""
-#: gasp.c:3689
+#: gasp.c:3695
msgid ""
"\n"
"Please report this bug.\n"
@@ -8556,38 +9284,34 @@ msgstr ""
#. 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:149 input-scrub.c:241 listing.c:344
+#: input-file.c:145 input-scrub.c:242 listing.c:344
msgid "{standard input}"
msgstr ""
-#: input-file.c:153
+#: input-file.c:149
#, c-format
-msgid "Can't open %s for reading."
+msgid "can't open %s for reading"
msgstr ""
-#: input-file.c:204 input-file.c:233
+#: input-file.c:212 input-file.c:239
#, c-format
msgid "Can't read from %s"
msgstr ""
-#: input-file.c:241
+#: input-file.c:247
#, c-format
msgid "Can't close %s"
msgstr ""
-#: input-scrub.c:271
+#: input-scrub.c:272
msgid "macros nested too deeply"
msgstr ""
-#: input-scrub.c:374
+#: input-scrub.c:375 input-scrub.c:397
msgid "partial line at end of file ignored"
msgstr ""
-#: input-scrub.c:396
-msgid "Partial line at end of file ignored"
-msgstr ""
-
-#: itbl-ops.c:350
+#: itbl-ops.c:351
msgid "Unable to allocate memory for new instructions\n"
msgstr ""
@@ -8599,49 +9323,49 @@ msgstr ""
msgid "Error:"
msgstr ""
-#: listing.c:1125
+#: listing.c:1131
#, c-format
msgid "can't open list file: %s"
msgstr ""
-#: listing.c:1149
+#: listing.c:1155
#, c-format
msgid "error closing list file: %s"
msgstr ""
-#: listing.c:1228
+#: listing.c:1234
msgid "strange paper height, set to no form"
msgstr ""
-#: listing.c:1294
-msgid "New line in title"
+#: listing.c:1300
+msgid "new line in title"
msgstr ""
-#: macro.c:550
+#: macro.c:545
msgid "unexpected end of file in macro definition"
msgstr ""
-#: macro.c:559
+#: macro.c:554
msgid "missing ) after formals"
msgstr ""
-#: macro.c:716
+#: macro.c:710
msgid "missplaced )"
msgstr ""
-#: macro.c:978
+#: macro.c:979
msgid "confusion in formal parameters"
msgstr ""
-#: macro.c:983
+#: macro.c:984
msgid "macro formal argument does not exist"
msgstr ""
-#: macro.c:998
+#: macro.c:999
msgid "can't mix positional and keyword arguments"
msgstr ""
-#: macro.c:1006
+#: macro.c:1007
msgid "too many positional arguments"
msgstr ""
@@ -8665,59 +9389,64 @@ msgstr ""
msgid "Error: "
msgstr ""
-#: messages.c:413 messages.c:429
+#: messages.c:413 messages.c:433
msgid "Fatal error: "
msgstr ""
-#: messages.c:446
+#: messages.c:450
msgid "Internal error!\n"
msgstr ""
-#: messages.c:448
+#: messages.c:452
#, c-format
msgid "Assertion failure in %s at %s line %d.\n"
msgstr ""
-#: messages.c:451
+#: messages.c:455
#, c-format
msgid "Assertion failure at %s line %d.\n"
msgstr ""
-#: messages.c:452 messages.c:471
+#: messages.c:456 messages.c:475
msgid "Please report this bug.\n"
msgstr ""
-#: messages.c:466
+#: messages.c:470
#, c-format
msgid "Internal error, aborting at %s line %d in %s\n"
msgstr ""
-#: messages.c:469
+#: messages.c:473
#, 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 "
+msgid "can't open a bfd on stdout %s"
msgstr ""
-#: output-file.c:72 output-file.c:79
+#: output-file.c:52 output-file.c:115
#, c-format
-msgid "FATAL: Can't close %s\n"
+msgid "FATAL: can't create %s"
msgstr ""
-#: output-file.c:130
+#: output-file.c:73 output-file.c:80
#, c-format
-msgid "FATAL: Can't close %s"
+msgid "FATAL: can't close %s\n"
msgstr ""
-#: output-file.c:148
+#: output-file.c:126
+#, c-format
+msgid "FATAL: can't close %s"
+msgstr ""
+
+#: output-file.c:147
msgid "Failed to emit an object byte"
msgstr ""
-#: output-file.c:149
-msgid "Can't continue"
+#: output-file.c:148
+msgid "can't continue"
msgstr ""
#: read.c:445
@@ -8725,463 +9454,514 @@ msgstr ""
msgid "error constructing %s pseudo-op table: %s"
msgstr ""
-#: read.c:802
+#: read.c:801
#, c-format
-msgid "Unknown pseudo-op: `%s'"
+msgid "unknown pseudo-op: `%s'"
msgstr ""
-#: read.c:934
+#: read.c:932
#, c-format
msgid "label \"%d$\" redefined"
msgstr ""
-#: read.c:1152
+#: read.c:1150
msgid ".abort detected. Abandoning ship."
msgstr ""
-#: read.c:1238 read.c:2027
-msgid "Alignment not a power of 2"
+#: read.c:1172 read.c:2406
+msgid "ignoring fill value in absolute section"
msgstr ""
-#: read.c:1247
+#: read.c:1258
#, c-format
-msgid "Alignment too large: %u assumed"
+msgid "alignment too large: %u assumed"
msgstr ""
-#: read.c:1279
+#: read.c:1290
msgid "expected fill pattern missing"
msgstr ""
-#: read.c:1483
+#: read.c:1368 read.c:1968 read.c:2176 read.c:2788
+msgid "expected symbol name"
+msgstr ""
+
+#: read.c:1378 read.c:2186 read.c:2798 stabs.c:472
+#, c-format
+msgid "expected comma after \"%s\""
+msgstr ""
+
+#: read.c:1390
+#, c-format
+msgid ".COMMon length (%ld) < 0 ignored"
+msgstr ""
+
+#: read.c:1414
#, c-format
-msgid "attempt to re-define symbol `%s'"
+msgid "length of .comm \"%s\" is already %ld; not changing to %ld"
msgstr ""
#. Some of the back ends can't deal with non-positive line numbers.
#. Besides, it's silly.
-#: read.c:1607
+#: read.c:1628
#, c-format
-msgid "Line numbers must be positive; line number %d rejected."
+msgid "line numbers must be positive; line number %d rejected"
msgstr ""
-#: read.c:1635
+#: read.c:1656
msgid "start address not supported"
msgstr ""
-#: read.c:1645
+#: read.c:1666
msgid ".err encountered"
msgstr ""
-#: read.c:1664 read.c:1666
+#: read.c:1685 read.c:1687
#, c-format
msgid ".fail %ld encountered"
msgstr ""
-#: read.c:1703
+#: read.c:1724
#, c-format
-msgid ".fill size clamped to %d."
+msgid ".fill size clamped to %d"
msgstr ""
-#: read.c:1708
-msgid "Size negative: .fill ignored."
+#: read.c:1729
+msgid "size negative; .fill ignored"
msgstr ""
-#: read.c:1714
-msgid "Repeat < 0, .fill ignored"
+#: read.c:1735
+msgid "repeat < 0; .fill ignored"
msgstr ""
-#: read.c:1874
+#: read.c:1895
#, c-format
msgid "unrecognized .linkonce type `%s'"
msgstr ""
-#: read.c:1887 read.c:1913
+#: read.c:1908 read.c:1934
msgid ".linkonce is not supported for this object file format"
msgstr ""
-#: read.c:1909
+#: read.c:1930
#, c-format
msgid "bfd_set_section_flags: %s"
msgstr ""
-#: read.c:1978
+#: read.c:1985
+msgid "missing size expression"
+msgstr ""
+
+#: read.c:1991
+#, c-format
+msgid "BSS length (%d) < 0 ignored"
+msgstr ""
+
+#: read.c:2007
#, c-format
msgid "error setting flags for \".sbss\": %s"
msgstr ""
-#: read.c:2001
-msgid "Expected comma after size"
+#: read.c:2030
+msgid "expected comma after size"
msgstr ""
-#: read.c:2011
-msgid "Missing alignment"
+#: read.c:2064
+#, c-format
+msgid "alignment too large; %d assumed"
msgstr ""
-#: read.c:2162
-msgid "bad expression"
+#: read.c:2069
+msgid "alignment negative; 0 assumed"
msgstr ""
-#: read.c:2299
+#: read.c:2335
#, c-format
msgid "attempt to redefine pseudo-op `%s' ignored"
msgstr ""
-#: read.c:2365
+#: read.c:2401
#, c-format
-msgid "invalid segment \"%s\"; segment \"%s\" assumed"
-msgstr ""
-
-#: read.c:2371
-msgid "ignoring fill value in absolute section"
+msgid "invalid segment \"%s\""
msgstr ""
-#: read.c:2374
+#: read.c:2409
msgid "only constant offsets supported in absolute section"
msgstr ""
-#: read.c:2406
+#: read.c:2449
msgid "MRI style ORG pseudo-op not supported"
msgstr ""
-#: read.c:2495
-msgid "unrecognized section type"
-msgstr ""
-
-#: read.c:2563
+#: read.c:2606
#, c-format
msgid "unrecognized section type `%s'"
msgstr ""
-#: read.c:2577
+#: read.c:2620
msgid "absolute sections are not supported"
msgstr ""
-#: read.c:2592
+#: read.c:2635
#, c-format
msgid "unrecognized section command `%s'"
msgstr ""
-#: read.c:2680
+#: read.c:2701
+msgid ".endr encountered without preceeding .rept, .irc, or .irp"
+msgstr ""
+
+#: read.c:2733
#, c-format
msgid "%s without %s"
msgstr ""
-#: read.c:2881
-msgid "Unsupported variable size or fill value"
+#: read.c:2942
+msgid "unsupported variable size or fill value"
msgstr ""
-#: read.c:2906
+#: read.c:2967
msgid ".space repeat count is zero, ignored"
msgstr ""
-#: read.c:2908
+#: read.c:2969
msgid ".space repeat count is negative, ignored"
msgstr ""
-#: read.c:2937
+#: read.c:2998
msgid "space allocation too complex in absolute section"
msgstr ""
-#: read.c:2943
+#: read.c:3004
msgid "space allocation too complex in common section"
msgstr ""
-#: read.c:3031 read.c:4114
+#: read.c:3092 read.c:4175
#, c-format
-msgid "Bad floating literal: %s"
+msgid "bad floating literal: %s"
msgstr ""
-#: read.c:3104
+#: read.c:3165
#, c-format
-msgid "Rest of line ignored. First ignored character is `%c'."
+msgid "rest of line ignored; first ignored character is `%c'"
msgstr ""
-#: read.c:3107
+#: read.c:3168
#, c-format
-msgid "Rest of line ignored. First ignored character valued 0x%x."
-msgstr ""
-
-#: read.c:3158
-msgid "illegal expression; zero assumed"
+msgid "rest of line ignored; first ignored character valued 0x%x"
msgstr ""
-#: read.c:3160
-msgid "missing expression; zero assumed"
+#: read.c:3221
+msgid "missing expression"
msgstr ""
-#: read.c:3331
+#: read.c:3392
msgid "rva without symbol"
msgstr ""
-#: read.c:3455
+#: read.c:3516
msgid "attempt to store value in absolute section"
msgstr ""
-#: read.c:3493 read.c:4391
+#: read.c:3554 read.c:4453
msgid "zero assumed for missing expression"
msgstr ""
-#: read.c:3505 read.c:4403
+#: read.c:3566 read.c:4465 write.c:293
msgid "register value used as expression"
msgstr ""
#. Leading bits contain both 0s & 1s.
-#: read.c:3595
+#: read.c:3656
#, c-format
-msgid "Value 0x%lx truncated to 0x%lx."
+msgid "value 0x%lx truncated to 0x%lx"
msgstr ""
-#: read.c:3611
+#: read.c:3672
#, c-format
-msgid "Bignum truncated to %d bytes"
+msgid "bignum truncated to %d bytes"
msgstr ""
-#: read.c:3688
+#: read.c:3749
#, c-format
msgid "unsupported BFD relocation size %u"
msgstr ""
-#: read.c:3778
+#: read.c:3839
msgid "using a bit field width of zero"
msgstr ""
-#: read.c:3786
+#: read.c:3847
#, c-format
msgid "field width \"%s\" too complex for a bitfield"
msgstr ""
-#: read.c:3794
+#: read.c:3855
#, c-format
msgid "field width %lu too big to fit in %d bytes: truncated to %d bits"
msgstr ""
-#: read.c:3816
+#: read.c:3877
#, c-format
msgid "field value \"%s\" too complex for a bitfield"
msgstr ""
-#: read.c:3942
-msgid "Unresolvable or nonpositive repeat count; using 1"
+#: read.c:4003 read.c:4197
+msgid "unresolvable or nonpositive repeat count; using 1"
msgstr ""
-#: read.c:3993
+#: read.c:4054
#, c-format
-msgid "Unknown floating type type '%c'"
-msgstr ""
-
-#: read.c:4015
-msgid "Floating point constant too large"
+msgid "unknown floating type type '%c'"
msgstr ""
-#: read.c:4136
-msgid "unresolvable or nonpositive repeat count; using 1"
+#: read.c:4076
+msgid "floating point constant too large"
msgstr ""
-#: read.c:4534
-msgid "Expected <nn>"
+#: read.c:4607
+msgid "expected <nn>"
msgstr ""
#. To be compatible with BSD 4.2 as: give the luser a linefeed!!
-#: read.c:4567 read.c:4653
-msgid "Unterminated string: Newline inserted."
+#: read.c:4640 read.c:4726
+msgid "unterminated string; newline inserted"
msgstr ""
-#: read.c:4661
-msgid "Bad escaped character in string, '?' assumed"
+#: read.c:4734
+msgid "bad escaped character in string"
msgstr ""
-#: read.c:4687
-msgid "expected address expression; zero assumed"
+#: read.c:4760
+msgid "expected address expression"
msgstr ""
-#: read.c:4707
+#: read.c:4780
#, c-format
msgid "symbol \"%s\" undefined; zero assumed"
msgstr ""
-#: read.c:4710
+#: read.c:4783
msgid "some symbol undefined; zero assumed"
msgstr ""
-#: read.c:4763
-msgid "This string may not contain '\\0'"
+#: read.c:4801
+msgid "bad or irreducible absolute expression"
+msgstr ""
+
+#: read.c:4836
+msgid "this string may not contain '\\0'"
+msgstr ""
+
+#: read.c:4873
+msgid "missing string"
msgstr ""
-#: read.c:4800
-msgid "Missing string"
+#: read.c:4996
+#, c-format
+msgid ".incbin count zero, ignoring `%s'"
msgstr ""
#: read.c:5022
-msgid "missing .func"
+#, c-format
+msgid "file not found: %s"
msgstr ""
-#: read.c:5039
-msgid ".endfunc missing for previous .func"
+#: read.c:5036
+#, c-format
+msgid "seek to end of .incbin file failed `%s'"
msgstr ""
-#: stabs.c:213
-msgid ".stabs: Missing comma"
+#: read.c:5047
+#, c-format
+msgid "skip (%ld) + count (%ld) larger than file size (%ld)"
msgstr ""
-#: stabs.c:221 stabs.c:229 stabs.c:240
+#: read.c:5054
#, c-format
-msgid ".stab%c: Missing comma"
+msgid "could not skip to %ld in file `%s'"
msgstr ""
-#: stabs.c:419
-msgid "comma missing in .xstabs"
+#: read.c:5063
+#, c-format
+msgid "truncated file `%s', %ld of %ld bytes read"
+msgstr ""
+
+#: read.c:5226
+msgid "missing .func"
+msgstr ""
+
+#: read.c:5243
+msgid ".endfunc missing for previous .func"
msgstr ""
-#: subsegs.c:376
+#: stabs.c:220 stabs.c:228 stabs.c:236 stabs.c:247
#, c-format
-msgid "Attempt to switch to nonexistent segment \"%s\""
+msgid ".stab%c: missing comma"
+msgstr ""
+
+#: stabs.c:427
+msgid "comma missing in .xstabs"
msgstr ""
-#: symbols.c:357 symbols.c:456
+#: subsegs.c:377
#, c-format
-msgid "Symbol %s already defined."
+msgid "attempt to switch to nonexistent segment \"%s\""
msgstr ""
-#: symbols.c:442
+#: symbols.c:446
#, c-format
-msgid "Symbol \"%s\" is already defined as \"%s\"/%s%ld."
+msgid "symbol `%s' is already defined as \"%s\"/%s%ld"
msgstr ""
-#: symbols.c:519 symbols.c:526
+#: symbols.c:523 symbols.c:530
#, c-format
-msgid "Inserting \"%s\" into symbol table failed: %s"
+msgid "inserting \"%s\" into symbol table failed: %s"
msgstr ""
-#: symbols.c:872
+#: symbols.c:873
#, c-format
-msgid "Symbol definition loop encountered at %s"
+msgid "symbol definition loop encountered at `%s'"
msgstr ""
-#: symbols.c:1050 symbols.c:1054
+#: symbols.c:1082 symbols.c:1086
#, c-format
-msgid "undefined symbol %s in operation"
+msgid "undefined symbol `%s' in operation"
msgstr ""
-#: symbols.c:1059
+#: symbols.c:1091
msgid "invalid section for operation"
msgstr ""
-#: symbols.c:1064 symbols.c:1068
+#: symbols.c:1096 symbols.c:1100
#, c-format
-msgid "undefined symbol %s in operation setting %s"
+msgid "undefined symbol `%s' in operation setting `%s'"
msgstr ""
-#: symbols.c:1073
+#: symbols.c:1105
#, c-format
-msgid "invalid section for operation setting %s"
+msgid "invalid section for operation setting `%s'"
msgstr ""
-#: symbols.c:1091
+#: symbols.c:1123
#, c-format
-msgid "division by zero when setting %s"
+msgid "division by zero when setting `%s'"
msgstr ""
-#: symbols.c:1163 write.c:1945
+#: symbols.c:1202 write.c:2009
#, c-format
-msgid "can't resolve value for symbol \"%s\""
+msgid "can't resolve value for symbol `%s'"
msgstr ""
-#: symbols.c:1533
+#: symbols.c:1596
#, c-format
msgid "\"%d\" (instance number %d of a %s label)"
msgstr ""
-#: symbols.c:1589
+#: symbols.c:1633
#, c-format
-msgid "Attempt to get value of unresolved symbol %s"
+msgid "attempt to get value of unresolved symbol `%s'"
+msgstr ""
+
+#: symbols.c:1869
+msgid "section symbols are already global"
msgstr ""
-#: write.c:172
+#: write.c:179
#, c-format
msgid "field fx_size too small to hold %d"
msgstr ""
-#: write.c:309
+#: write.c:320
msgid "rva not supported"
msgstr ""
-#: write.c:517
+#: write.c:528
#, c-format
msgid "attempt to .org/.space backwards? (%ld)"
msgstr ""
-#: write.c:995
+#: write.c:1029
msgid "relocation out of range"
msgstr ""
-#: write.c:998
+#: write.c:1032
#, c-format
msgid "%s:%u: bad return from bfd_install_relocation: %x"
msgstr ""
-#: write.c:1043
+#: write.c:1076
msgid "internal error: fixup not contained within frag"
msgstr ""
-#: write.c:1059
+#: write.c:1092
#, c-format
msgid "%s:%u: bad return from bfd_install_relocation"
msgstr ""
-#: write.c:1146 write.c:1170
+#: write.c:1179 write.c:1203
#, c-format
msgid "FATAL: Can't write %s"
msgstr ""
-#: write.c:1202
-msgid "Cannot write to output file."
+#: write.c:1235
+msgid "cannot write to output file"
msgstr ""
-#: write.c:1451
+#: write.c:1484
#, c-format
-msgid "%d error%s, %d warning%s, generating bad object file.\n"
+msgid "%d error%s, %d warning%s, generating bad object file"
msgstr ""
-#: write.c:1458
+#: write.c:1491
#, c-format
-msgid "%d error%s, %d warning%s, no object file generated.\n"
+msgid "%d error%s, %d warning%s, no object file generated"
msgstr ""
-#: write.c:1882
+#: write.c:1947
#, c-format
-msgid "local label %s is not defined"
+msgid "local label `%s' is not defined"
msgstr ""
-#: write.c:2187
+#: write.c:2245
#, c-format
msgid "alignment padding (%lu bytes) not a multiple of %ld"
msgstr ""
-#: write.c:2297
+#: write.c:2362
#, c-format
msgid ".word %s-%s+%s didn't fit"
msgstr ""
-#: write.c:2378
-msgid "attempt to .org backwards ignored"
+#: write.c:2447
+msgid "attempt to .org backwards"
msgstr ""
-#: write.c:2402
+#: write.c:2475
msgid ".space specifies non-absolute value"
msgstr ""
-#: write.c:2406
+#: write.c:2482
msgid ".space or .fill with negative value, ignored"
msgstr ""
-#: write.c:2657
+#: write.c:2656
+#, c-format
+msgid "negative of non-absolute symbol `%s'"
+msgstr ""
+
+#: write.c:2750
#, c-format
msgid ""
-"Subtraction of two symbols in different sections \"%s\" {%s section} - "
-"\"%s\" {%s section} at file address %s."
+"subtraction of two symbols in different sections `%s' {%s section} - `%s' {%"
+"s section} at file address %s"
+msgstr ""
+
+#: write.c:2886
+#, c-format
+msgid "value of %s too large for field of %d bytes at %s"
msgstr ""
-#: write.c:2811
+#: write.c:2898
#, c-format
-msgid "Value of %s too large for field of %d bytes at %s"
+msgid "signed .word overflow; switch may be too large; %ld at 0x%lx"
msgstr ""
diff --git a/contrib/binutils/gas/read.c b/contrib/binutils/gas/read.c
index 32050c4..b0446c8d 100644
--- a/contrib/binutils/gas/read.c
+++ b/contrib/binutils/gas/read.c
@@ -1,6 +1,6 @@
/* read.c - read a source file -
Copyright 1986, 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
- 1998, 1999, 2000 Free Software Foundation, Inc.
+ 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -35,10 +35,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
/* Routines that read assembler source text to build spagetti in memory.
Another group of these functions is in the expr.c module. */
-/* For isdigit (). */
-#include <ctype.h>
-
#include "as.h"
+#include "safe-ctype.h"
#include "subsegs.h"
#include "sb.h"
#include "macro.h"
@@ -317,6 +315,7 @@ static const pseudo_typeS potable[] = {
{"endc", s_endif, 0},
{"endfunc", s_func, 1},
{"endif", s_endif, 0},
+ {"endr", s_bad_endr, 0},
/* endef */
{"equ", s_set, 0},
{"equiv", s_set, 1},
@@ -349,6 +348,7 @@ static const pseudo_typeS potable[] = {
{"ifne", s_if, (int) O_ne},
{"ifnes", s_ifeqs, 1},
{"ifnotdef", s_ifdef, 1},
+ {"incbin", s_incbin, 0},
{"include", s_include, 0},
{"int", cons, 4},
{"irp", s_irp, 0},
@@ -738,8 +738,7 @@ read_a_source_file (name)
while (*s2)
{
- if (isupper ((unsigned char) *s2))
- *s2 = tolower (*s2);
+ *s2 = TOLOWER (*s2);
s2++;
}
}
@@ -799,7 +798,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;
@@ -906,8 +905,7 @@ read_a_source_file (name)
if (is_end_of_line[(unsigned char) c])
continue;
- if ((LOCAL_LABELS_DOLLAR || LOCAL_LABELS_FB)
- && isdigit ((unsigned char) c))
+ if ((LOCAL_LABELS_DOLLAR || LOCAL_LABELS_FB) && ISDIGIT (c))
{
/* local label ("4:") */
char *backup = input_line_pointer;
@@ -917,7 +915,7 @@ read_a_source_file (name)
temp = c - '0';
/* Read the whole number. */
- while (isdigit ((unsigned char) *input_line_pointer))
+ while (ISDIGIT (*input_line_pointer))
{
temp = (temp * 10) + *input_line_pointer - '0';
++input_line_pointer;
@@ -1052,8 +1050,8 @@ read_a_source_file (name)
if (tc_unrecognized_line (c))
continue;
#endif
- /* as_warn (_("Junk character %d."),c); Now done by ignore_rest. */
- input_line_pointer--; /* Report unknown char as ignored. */
+ input_line_pointer--;
+ /* Report unknown char as ignored. */
ignore_rest_of_line ();
}
@@ -1165,6 +1163,19 @@ do_align (n, fill, len, max)
int len;
int max;
{
+ if (now_seg == absolute_section)
+ {
+ if (fill != NULL)
+ while (len-- > 0)
+ if (*fill++ != '\0')
+ {
+ as_warn (_("ignoring fill value in absolute section"));
+ break;
+ }
+ fill = NULL;
+ len = 0;
+ }
+
#ifdef md_do_align
md_do_align (n, fill, len, max, just_record_alignment);
#endif
@@ -1235,7 +1246,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;
}
@@ -1244,7 +1255,7 @@ s_align (arg, bytes_p)
if (align > 15)
{
align = 15;
- as_bad (_("Alignment too large: %u assumed"), align);
+ as_warn (_("alignment too large: %u assumed"), align);
}
if (*input_line_pointer != ',')
@@ -1351,11 +1362,21 @@ s_comm (ignore)
/* Just after name is now '\0'. */
p = input_line_pointer;
*p = c;
+
+ if (name == p)
+ {
+ as_bad (_("expected symbol name"));
+ discard_rest_of_line ();
+ return;
+ }
+
SKIP_WHITESPACE ();
if (*input_line_pointer != ',')
{
- as_bad (_("Expected comma after symbol-name: rest of line ignored."));
+ *p = 0;
+ as_bad (_("expected comma after \"%s\""), name);
+ *p = c;
ignore_rest_of_line ();
if (flag_mri)
mri_comment_end (stop, stopc);
@@ -1366,7 +1387,7 @@ s_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 ();
if (flag_mri)
mri_comment_end (stop, stopc);
@@ -1379,7 +1400,7 @@ s_comm (ignore)
if (S_IS_DEFINED (symbolP) && !S_IS_COMMON (symbolP))
{
- as_bad (_("Ignoring attempt to re-define symbol `%s'."),
+ as_bad (_("symbol `%s' is already defined"),
S_GET_NAME (symbolP));
ignore_rest_of_line ();
if (flag_mri)
@@ -1390,7 +1411,7 @@ s_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 changing to %ld"),
S_GET_NAME (symbolP),
(long) S_GET_VALUE (symbolP),
(long) temp);
@@ -1442,7 +1463,7 @@ s_mri_common (small)
SKIP_WHITESPACE ();
name = input_line_pointer;
- if (!isdigit ((unsigned char) *name))
+ if (!ISDIGIT (*name))
c = get_symbol_end ();
else
{
@@ -1450,7 +1471,7 @@ s_mri_common (small)
{
++input_line_pointer;
}
- while (isdigit ((unsigned char) *input_line_pointer));
+ while (ISDIGIT (*input_line_pointer));
c = *input_line_pointer;
*input_line_pointer = '\0';
@@ -1480,7 +1501,7 @@ 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));
+ as_bad (_("symbol `%s' is already defined"), S_GET_NAME (sym));
ignore_rest_of_line ();
mri_comment_end (stop, stopc);
return;
@@ -1604,7 +1625,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."),
+ as_warn (_("line numbers must be positive; line number %d rejected"),
l + 1);
else
{
@@ -1700,18 +1721,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;
}
@@ -1753,10 +1774,10 @@ s_fill (ignore)
memset (p, 0, (unsigned int) size);
/* The magic number BSD_FILL_SIZE_CROCK_4 is from BSD 4.2 VAX
- flavoured AS. The following bizzare behaviour is to be
+ flavoured AS. The following bizarre behaviour is to be
compatible with above. I guess they tried to take up to 8
bytes from a 4-byte expression and they forgot to sign
- extend. Un*x Sux. */
+ extend. */
#define BSD_FILL_SIZE_CROCK_4 (4)
md_number_to_chars (p, (valueT) fill,
(size > BSD_FILL_SIZE_CROCK_4
@@ -1797,7 +1818,7 @@ s_globl (ignore)
{
input_line_pointer++;
SKIP_WHITESPACE ();
- if (*input_line_pointer == '\n')
+ if (is_end_of_line[(unsigned char) *input_line_pointer])
c = '\n';
}
}
@@ -1941,6 +1962,14 @@ s_lcomm_internal (needs_align, bytes_p)
c = get_symbol_end ();
p = input_line_pointer;
*p = c;
+
+ if (name == p)
+ {
+ as_bad (_("expected symbol name"));
+ discard_rest_of_line ();
+ return;
+ }
+
SKIP_WHITESPACE ();
/* Accept an optional comma after the name. The comma used to be
@@ -1951,15 +1980,15 @@ s_lcomm_internal (needs_align, bytes_p)
SKIP_WHITESPACE ();
}
- if (*input_line_pointer == '\n')
+ if (is_end_of_line[(unsigned char) *input_line_pointer])
{
- 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;
}
@@ -1969,7 +1998,7 @@ s_lcomm_internal (needs_align, bytes_p)
|| OUTPUT_FLAVOR == bfd_target_elf_flavour)
{
/* For MIPS and Alpha ECOFF or ELF, small objects are put in .sbss. */
- if (temp <= bfd_get_gp_size (stdoutput))
+ if ((unsigned) temp <= bfd_get_gp_size (stdoutput))
{
bss_seg = subseg_new (".sbss", 1);
seg_info (bss_seg)->bss = 1;
@@ -1998,7 +2027,7 @@ s_lcomm_internal (needs_align, bytes_p)
if (*input_line_pointer != ',')
{
- as_bad (_("Expected comma after size"));
+ as_bad (_("expected comma after size"));
ignore_rest_of_line ();
return;
}
@@ -2006,9 +2035,9 @@ s_lcomm_internal (needs_align, bytes_p)
input_line_pointer++;
SKIP_WHITESPACE ();
- if (*input_line_pointer == '\n')
+ if (is_end_of_line[(unsigned char) *input_line_pointer])
{
- as_bad (_("Missing alignment"));
+ as_bad (_("missing alignment"));
return;
}
@@ -2024,7 +2053,7 @@ 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;
}
}
@@ -2032,12 +2061,12 @@ s_lcomm_internal (needs_align, bytes_p)
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);
@@ -2105,8 +2134,7 @@ s_lcomm_internal (needs_align, bytes_p)
#endif
}
else
- as_bad (_("Ignoring attempt to re-define symbol `%s'."),
- S_GET_NAME (symbolP));
+ as_bad (_("symbol `%s' is already defined"), S_GET_NAME (symbolP));
subseg_set (current_seg, current_subseg);
@@ -2142,12 +2170,20 @@ s_lsym (ignore)
c = get_symbol_end ();
p = input_line_pointer;
*p = c;
+
+ if (name == p)
+ {
+ as_bad (_("expected symbol name"));
+ discard_rest_of_line ();
+ return;
+ }
+
SKIP_WHITESPACE ();
if (*input_line_pointer != ',')
{
*p = 0;
- as_bad (_("Expected comma after name \"%s\""), name);
+ as_bad (_("expected comma after \"%s\""), name);
*p = c;
ignore_rest_of_line ();
return;
@@ -2187,7 +2223,7 @@ s_lsym (ignore)
}
else
{
- as_bad (_("Symbol %s already defined"), name);
+ as_bad (_("symbol `%s' is already defined"), name);
}
*p = c;
@@ -2362,8 +2398,7 @@ do_org (segment, exp, fill)
int fill;
{
if (segment != now_seg && segment != absolute_section)
- as_bad (_("invalid segment \"%s\"; segment \"%s\" assumed"),
- segment_name (segment), segment_name (now_seg));
+ as_bad (_("invalid segment \"%s\""), segment_name (segment));
if (now_seg == absolute_section)
{
@@ -2463,7 +2498,7 @@ s_mri_sect (type)
SKIP_WHITESPACE ();
name = input_line_pointer;
- if (!isdigit ((unsigned char) *name))
+ if (!ISDIGIT (*name))
c = get_symbol_end ();
else
{
@@ -2471,7 +2506,7 @@ s_mri_sect (type)
{
++input_line_pointer;
}
- while (isdigit ((unsigned char) *input_line_pointer));
+ while (ISDIGIT (*input_line_pointer));
c = *input_line_pointer;
*input_line_pointer = '\0';
@@ -2496,7 +2531,7 @@ s_mri_sect (type)
if (*input_line_pointer == ',')
{
c = *++input_line_pointer;
- c = toupper ((unsigned char) c);
+ c = TOUPPER (c);
if (c == 'C' || c == 'D' || c == 'M' || c == 'R')
*type = c;
else
@@ -2660,6 +2695,16 @@ s_purgem (ignore)
/* Handle the .rept pseudo-op. */
void
+s_bad_endr (ignore)
+ int ignore ATTRIBUTE_UNUSED;
+{
+ as_warn (_(".endr encountered without preceeding .rept, .irc, or .irp"));
+ demand_empty_rest_of_line ();
+}
+
+/* Handle the .rept pseudo-op. */
+
+void
s_rept (ignore)
int ignore ATTRIBUTE_UNUSED;
{
@@ -2737,12 +2782,20 @@ s_set (equiv)
delim = get_symbol_end ();
end_name = input_line_pointer;
*end_name = delim;
+
+ if (name == end_name)
+ {
+ as_bad (_("expected symbol name"));
+ discard_rest_of_line ();
+ return;
+ }
+
SKIP_WHITESPACE ();
if (*input_line_pointer != ',')
{
*end_name = 0;
- as_bad (_("Expected comma after name \"%s\""), name);
+ as_bad (_("expected comma after \"%s\""), name);
*end_name = delim;
ignore_rest_of_line ();
return;
@@ -2800,7 +2853,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' is already defined"), S_GET_NAME (symbolP));
pseudo_set (symbolP);
demand_empty_rest_of_line ();
@@ -2886,7 +2939,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;
@@ -3011,7 +3064,7 @@ s_float_space (float_type)
/* Skip any 0{letter} that may be present. Don't even check if the
* letter is legal. */
if (input_line_pointer[0] == '0'
- && isalpha ((unsigned char) input_line_pointer[1]))
+ && ISALPHA (input_line_pointer[1]))
input_line_pointer += 2;
/* Accept :xxxx, where the x's are hex digits, for a floating point
@@ -3036,7 +3089,7 @@ 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);
@@ -3108,12 +3161,12 @@ 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'."),
- *input_line_pointer);
+ if (ISPRINT (*input_line_pointer))
+ as_warn (_("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."),
- *input_line_pointer);
+ as_warn (_("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])
@@ -3163,15 +3216,15 @@ pseudo_set (symbolP)
(void) expression (&exp);
if (exp.X_op == O_illegal)
- as_bad (_("illegal expression; zero assumed"));
+ as_bad (_("illegal expression"));
else if (exp.X_op == O_absent)
- as_bad (_("missing expression; zero assumed"));
+ as_bad (_("missing expression"));
else if (exp.X_op == O_big)
{
if (exp.X_add_number > 0)
- as_bad (_("bignum invalid; zero assumed"));
+ as_bad (_("bignum invalid"));
else
- as_bad (_("floating point number invalid; zero assumed"));
+ as_bad (_("floating point number invalid"));
}
else if (exp.X_op == O_subtract
&& (S_GET_SEGMENT (exp.X_add_symbol)
@@ -3216,7 +3269,7 @@ pseudo_set (symbolP)
|| exp.X_add_number != 0)
symbol_set_value_expression (symbolP, &exp);
else if (symbol_section_p (symbolP))
- as_bad ("invalid attempt to set value of section symbol");
+ as_bad ("attempt to set value of section symbol");
else
{
symbolS *s = exp.X_add_symbol;
@@ -3504,7 +3557,7 @@ emit_expr (exp, nbytes)
}
else if (op == O_big && exp->X_add_number <= 0)
{
- as_bad (_("floating point number invalid; zero assumed"));
+ as_bad (_("floating point number invalid"));
exp->X_add_number = 0;
op = O_constant;
}
@@ -3600,7 +3653,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. */
@@ -3616,7 +3669,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;
}
@@ -3630,7 +3683,7 @@ emit_expr (exp, nbytes)
}
nums = generic_bignum + size / CHARS_PER_LITTLENUM;
- while (size > 0)
+ while (size >= CHARS_PER_LITTLENUM)
{
--nums;
md_number_to_chars (p, (valueT) *nums, CHARS_PER_LITTLENUM);
@@ -3641,7 +3694,7 @@ emit_expr (exp, nbytes)
else
{
nums = generic_bignum;
- while (size > 0)
+ while (size >= CHARS_PER_LITTLENUM)
{
md_number_to_chars (p, (valueT) *nums, CHARS_PER_LITTLENUM);
++nums;
@@ -3650,7 +3703,7 @@ emit_expr (exp, nbytes)
nbytes -= CHARS_PER_LITTLENUM;
}
- while (nbytes > 0)
+ while (nbytes >= CHARS_PER_LITTLENUM)
{
md_number_to_chars (p, extra_digit, CHARS_PER_LITTLENUM);
nbytes -= CHARS_PER_LITTLENUM;
@@ -3947,7 +4000,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;
}
@@ -3998,7 +4051,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;
}
@@ -4020,7 +4073,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;
@@ -4097,7 +4150,7 @@ float_cons (float_type)
has no use for such information. Lusers beware: you get
diagnostics if your input is ill-conditioned. */
if (input_line_pointer[0] == '0'
- && isalpha ((unsigned char) input_line_pointer[1]))
+ && ISALPHA (input_line_pointer[1]))
input_line_pointer += 2;
/* Accept :xxxx, where the x's are hex digits, for a floating
@@ -4119,7 +4172,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;
}
@@ -4403,7 +4456,7 @@ emit_leb128_expr (exp, sign)
}
else if (op == O_big && exp->X_add_number <= 0)
{
- as_bad (_("floating point number invalid; zero assumed"));
+ as_bad (_("floating point number invalid"));
exp->X_add_number = 0;
op = O_constant;
}
@@ -4551,7 +4604,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;
@@ -4584,7 +4637,7 @@ next_char_of_string ()
break;
case '\n':
- as_warn (_("Unterminated string: Newline inserted."));
+ as_warn (_("unterminated string; newline inserted"));
bump_line_counters ();
break;
@@ -4635,7 +4688,7 @@ next_char_of_string ()
int i;
for (i = 0, number = 0;
- isdigit (c) && i < 3;
+ ISDIGIT (c) && i < 3;
c = *input_line_pointer++, i++)
{
number = number * 8 + c - '0';
@@ -4653,11 +4706,11 @@ next_char_of_string ()
number = 0;
c = *input_line_pointer++;
- while (isxdigit (c))
+ while (ISXDIGIT (c))
{
- if (isdigit (c))
+ if (ISDIGIT (c))
number = number * 16 + c - '0';
- else if (isupper (c))
+ else if (ISUPPER (c))
number = number * 16 + c - 'A' + 10;
else
number = number * 16 + c - 'a' + 10;
@@ -4670,7 +4723,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;
@@ -4678,7 +4731,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"));
c = '?';
#endif /* ONLY_STANDARD_ESCAPES */
@@ -4704,7 +4757,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"));
expP->X_op = O_constant;
expP->X_add_number = 0;
retval = absolute_section;
@@ -4745,7 +4798,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"));
exp.X_add_number = 0;
}
return exp.X_add_number;
@@ -4780,7 +4833,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\'"));
}
}
}
@@ -4817,7 +4870,7 @@ demand_copy_string (lenP)
}
else
{
- as_warn (_("Missing string"));
+ as_warn (_("missing string"));
retval = NULL;
ignore_rest_of_line ();
}
@@ -4881,7 +4934,7 @@ 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' is already defined"), S_GET_NAME (symbolP));
#ifdef OBJ_COFF
/* "set" symbols are local unless otherwise specified. */
@@ -4900,6 +4953,123 @@ equals (sym_name, reassign)
}
}
+/* .incbin -- include a file verbatim at the current location. */
+
+void
+s_incbin (x)
+ int x ATTRIBUTE_UNUSED;
+{
+ FILE * binfile;
+ char * path;
+ char * filename;
+ char * binfrag;
+ long skip = 0;
+ long count = 0;
+ long bytes;
+ int len;
+
+#ifdef md_flush_pending_output
+ md_flush_pending_output ();
+#endif
+
+ SKIP_WHITESPACE ();
+ filename = demand_copy_string (& len);
+ if (filename == NULL)
+ return;
+
+ SKIP_WHITESPACE ();
+
+ /* Look for optional skip and count. */
+ if (* input_line_pointer == ',')
+ {
+ ++ input_line_pointer;
+ skip = get_absolute_expression ();
+
+ SKIP_WHITESPACE ();
+
+ if (* input_line_pointer == ',')
+ {
+ ++ input_line_pointer;
+
+ count = get_absolute_expression ();
+ if (count == 0)
+ as_warn (_(".incbin count zero, ignoring `%s'"), filename);
+
+ SKIP_WHITESPACE ();
+ }
+ }
+
+ demand_empty_rest_of_line ();
+
+ /* Try opening absolute path first, then try include dirs. */
+ binfile = fopen (filename, FOPEN_RB);
+ if (binfile == NULL)
+ {
+ int i;
+
+ path = xmalloc ((unsigned long) len + include_dir_maxlen + 5);
+
+ for (i = 0; i < include_dir_count; i++)
+ {
+ sprintf (path, "%s/%s", include_dirs[i], filename);
+
+ binfile = fopen (path, FOPEN_RB);
+ if (binfile != NULL)
+ break;
+ }
+
+ if (binfile == NULL)
+ as_bad (_("file not found: %s"), filename);
+ }
+ else
+ path = xstrdup (filename);
+
+ if (binfile)
+ {
+ long file_len;
+
+ register_dependency (path);
+
+ /* Compute the length of the file. */
+ if (fseek (binfile, 0, SEEK_END) != 0)
+ {
+ as_bad (_("seek to end of .incbin file failed `%s'"), path);
+ goto done;
+ }
+ file_len = ftell (binfile);
+
+ /* If a count was not specified use the size of the file. */
+ if (count == 0)
+ count = file_len;
+
+ if (skip + count > file_len)
+ {
+ as_bad (_("skip (%ld) + count (%ld) larger than file size (%ld)"),
+ skip, count, file_len);
+ goto done;
+ }
+
+ if (fseek (binfile, skip, SEEK_SET) != 0)
+ {
+ as_bad (_("could not skip to %ld in file `%s'"), skip, path);
+ goto done;
+ }
+
+ /* Allocate frag space and store file contents in it. */
+ binfrag = frag_more (count);
+
+ bytes = fread (binfrag, 1, count, binfile);
+ if (bytes < count)
+ as_warn (_("truncated file `%s', %ld of %ld bytes read"),
+ path, bytes, count);
+ }
+done:
+ if (binfile != NULL)
+ fclose (binfile);
+ if (path)
+ free (path);
+}
+
/* .include -- include a file at this point. */
void
@@ -4948,7 +5118,7 @@ s_include (arg)
strcpy (path, include_dirs[i]);
strcat (path, "/");
strcat (path, filename);
- if (0 != (try = fopen (path, "r")))
+ if (0 != (try = fopen (path, FOPEN_RT)))
{
fclose (try);
goto gotit;
diff --git a/contrib/binutils/gas/read.h b/contrib/binutils/gas/read.h
index d19deec..60b4bed 100644
--- a/contrib/binutils/gas/read.h
+++ b/contrib/binutils/gas/read.h
@@ -139,6 +139,7 @@ extern void s_align_bytes PARAMS ((int arg));
extern void s_align_ptwo PARAMS ((int));
extern void s_app_file PARAMS ((int));
extern void s_app_line PARAMS ((int));
+extern void s_bad_endr PARAMS ((int));
extern void s_comm PARAMS ((int));
extern void s_data PARAMS ((int));
extern void s_desc PARAMS ((int));
@@ -181,3 +182,4 @@ extern void s_text PARAMS ((int));
extern void stringer PARAMS ((int append_zero));
extern void s_xstab PARAMS ((int what));
extern void s_rva PARAMS ((int));
+extern void s_incbin PARAMS ((int));
diff --git a/contrib/binutils/gas/stabs.c b/contrib/binutils/gas/stabs.c
index eed11b3..60b03c4 100644
--- a/contrib/binutils/gas/stabs.c
+++ b/contrib/binutils/gas/stabs.c
@@ -217,7 +217,7 @@ s_stab_generic (what, stab_secname, stabstr_secname)
input_line_pointer++;
else
{
- as_warn (_(".stabs: Missing comma"));
+ as_warn (_(".stab%c: missing comma"), what);
ignore_rest_of_line ();
return;
}
@@ -225,7 +225,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;
}
@@ -233,7 +233,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;
}
@@ -244,7 +244,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;
}
@@ -469,7 +469,7 @@ s_desc (ignore)
if (*input_line_pointer != ',')
{
*p = 0;
- as_bad (_("Expected comma after name \"%s\""), name);
+ as_bad (_("expected comma after \"%s\""), name);
*p = c;
ignore_rest_of_line ();
}
@@ -539,7 +539,7 @@ generate_asm_file (type, file)
while (tmp < endp)
{
char *bslash = strchr (tmp, '\\');
- int len = (bslash ? (bslash - tmp + 1) : strlen (tmp));
+ size_t len = (bslash) ? (size_t) (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
@@ -580,10 +580,9 @@ stabs_generate_asm_lineno ()
unsigned int lineno;
char *buf;
char sym[30];
-
- /* Let the world know that we are in the middle of generating a
- piece of stabs line debugging information. */
- outputting_stabs_line_debug = 1;
+ /* Remember the last file/line and avoid duplicates. */
+ static unsigned int prev_lineno = -1;
+ static char *prev_file = NULL;
/* 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
@@ -594,6 +593,34 @@ stabs_generate_asm_lineno ()
as_where (&file, &lineno);
+ /* Don't emit sequences of stabs for the same line. */
+ if (prev_file == NULL)
+ {
+ /* First time thru. */
+ prev_file = xstrdup (file);
+ prev_lineno = lineno;
+ }
+ else if (lineno == prev_lineno
+ && strcmp (file, prev_file) == 0)
+ {
+ /* Same file/line as last time. */
+ return;
+ }
+ else
+ {
+ /* Remember file/line for next time. */
+ prev_lineno = lineno;
+ if (strcmp (file, prev_file) != 0)
+ {
+ free (prev_file);
+ prev_file = xstrdup (file);
+ }
+ }
+
+ /* Let the world know that we are in the middle of generating a
+ piece of stabs line debugging information. */
+ outputting_stabs_line_debug = 1;
+
generate_asm_file (N_SOL, file);
sprintf (sym, "%sL%d", FAKE_LABEL_NAME, label_count);
diff --git a/contrib/binutils/gas/struc-symbol.h b/contrib/binutils/gas/struc-symbol.h
index 6573f2c..90945c4 100644
--- a/contrib/binutils/gas/struc-symbol.h
+++ b/contrib/binutils/gas/struc-symbol.h
@@ -122,14 +122,14 @@ struct local_symbol
/* 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. */
+ symbol, and lsy_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
+ lsy_section. If the symbol has been fully resolved, lsy_frag is
set to NULL. */
union
{
@@ -137,8 +137,12 @@ struct local_symbol
symbolS *lsy_sym;
} u;
- /* The offset within the frag. */
- valueT lsy_offset;
+ /* The value of the symbol. */
+ valueT lsy_value;
+
+#ifdef TC_LOCAL_SYMFIELD_TYPE
+ TC_LOCAL_SYMFIELD_TYPE lsy_tc;
+#endif
};
#define local_symbol_converted_p(l) ((l)->lsy_section == reg_section)
diff --git a/contrib/binutils/gas/subsegs.c b/contrib/binutils/gas/subsegs.c
index 611d64c..c815953 100644
--- a/contrib/binutils/gas/subsegs.c
+++ b/contrib/binutils/gas/subsegs.c
@@ -374,7 +374,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
}
@@ -587,7 +587,7 @@ subseg_text_p (sec)
#else /* ! BFD_ASSEMBLER */
const char * const *p;
- if (sec == data_section || sec == bss_section)
+ if (sec == data_section || sec == bss_section || sec == absolute_section)
return 0;
for (p = nontext_section_names; *p != NULL; ++p)
diff --git a/contrib/binutils/gas/symbols.c b/contrib/binutils/gas/symbols.c
index a72ba42..5dd3040 100644
--- a/contrib/binutils/gas/symbols.c
+++ b/contrib/binutils/gas/symbols.c
@@ -22,10 +22,9 @@
/* #define DEBUG_SYMS / * to debug symbol list maintenance. */
-#include <ctype.h>
-
#include "as.h"
+#include "safe-ctype.h"
#include "obstack.h" /* For "symbols.h" */
#include "subsegs.h"
@@ -61,6 +60,7 @@ symbolS abs_symbol;
struct obstack notes;
+static char *save_symbol_name PARAMS ((const char *));
static void fb_label_init PARAMS ((void));
static long dollar_label_instance PARAMS ((long));
static long fb_label_instance PARAMS ((long));
@@ -123,11 +123,10 @@ save_symbol_name (name)
if (! symbols_case_sensitive)
{
- unsigned char *s;
+ char *s;
- for (s = (unsigned char *) ret; *s != '\0'; s++)
- if (islower (*s))
- *s = toupper (*s);
+ for (s = ret; *s != '\0'; s++)
+ *s = TOUPPER (*s);
}
return ret;
@@ -206,10 +205,10 @@ static unsigned long local_symbol_conversion_count;
/* Create a local symbol and insert it into the local hash table. */
static struct local_symbol *
-local_symbol_make (name, section, offset, frag)
+local_symbol_make (name, section, value, frag)
const char *name;
segT section;
- valueT offset;
+ valueT value;
fragS *frag;
{
char *name_copy;
@@ -224,7 +223,7 @@ local_symbol_make (name, section, offset, frag)
ret->lsy_name = name_copy;
ret->lsy_section = section;
local_symbol_set_frag (ret, frag);
- ret->lsy_offset = offset;
+ ret->lsy_value = value;
hash_jam (local_hash, name_copy, (PTR) ret);
@@ -246,7 +245,7 @@ local_symbol_convert (locsym)
++local_symbol_conversion_count;
- ret = symbol_new (locsym->lsy_name, locsym->lsy_section, locsym->lsy_offset,
+ ret = symbol_new (locsym->lsy_name, locsym->lsy_section, locsym->lsy_value,
local_symbol_get_frag (locsym));
if (local_symbol_resolved_p (locsym))
@@ -255,6 +254,10 @@ local_symbol_convert (locsym)
/* Local symbols are always either defined or used. */
ret->sy_used = 1;
+#ifdef TC_LOCAL_SYMFIELD_CONVERT
+ TC_LOCAL_SYMFIELD_CONVERT (locsym, ret);
+#endif
+
symbol_table_insert (ret);
local_symbol_mark_converted (locsym);
@@ -353,15 +356,15 @@ colon (sym_name) /* Just seen "x:" - rattle symbols & frags. */
if (locsym->lsy_section != undefined_section
&& (local_symbol_get_frag (locsym) != frag_now
|| locsym->lsy_section != now_seg
- || locsym->lsy_offset != frag_now_fix ()))
+ || locsym->lsy_value != frag_now_fix ()))
{
- as_bad (_("Symbol %s already defined."), sym_name);
+ as_bad (_("symbol `%s' is already defined"), sym_name);
return symbolP;
}
locsym->lsy_section = now_seg;
local_symbol_set_frag (locsym, frag_now);
- locsym->lsy_offset = frag_now_fix ();
+ locsym->lsy_value = frag_now_fix ();
#endif
}
else if (!S_IS_DEFINED (symbolP) || S_IS_COMMON (symbolP))
@@ -440,7 +443,7 @@ colon (sym_name) /* Just seen "x:" - rattle symbols & frags. */
S_GET_OTHER (symbolP),
S_GET_DESC (symbolP));
#endif
- as_bad (_("Symbol \"%s\" is already defined as \"%s\"/%s%ld."),
+ as_bad (_("symbol `%s' is already defined as \"%s\"/%s%ld"),
sym_name,
segment_name (S_GET_SEGMENT (symbolP)),
od_buf,
@@ -454,7 +457,7 @@ 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_bad (_("Symbol %s already defined."), sym_name);
+ as_bad (_("symbol `%s' is already defined"), sym_name);
}
}
@@ -517,14 +520,14 @@ symbol_table_insert (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"),
+ 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 */
}
@@ -625,9 +628,7 @@ symbol_find_base (name, strip_underscore)
while ((c = *orig++) != '\0')
{
- if (islower (c))
- c = toupper (c);
- *copy++ = c;
+ *copy++ = TOUPPER (c);
}
*copy = '\0';
}
@@ -827,9 +828,8 @@ verify_symbol_chain_2 (sym)
values. */
valueT
-resolve_symbol_value (symp, finalize)
+resolve_symbol_value (symp)
symbolS *symp;
- int finalize;
{
int resolved;
valueT final_val;
@@ -840,15 +840,15 @@ resolve_symbol_value (symp, finalize)
{
struct local_symbol *locsym = (struct local_symbol *) symp;
+ final_val = locsym->lsy_value;
if (local_symbol_resolved_p (locsym))
- return locsym->lsy_offset / bfd_octets_per_byte (stdoutput);
+ return final_val;
- final_val = (local_symbol_get_frag (locsym)->fr_address
- + locsym->lsy_offset) / bfd_octets_per_byte (stdoutput);
+ final_val += local_symbol_get_frag (locsym)->fr_address / OCTETS_PER_BYTE;
- if (finalize)
+ if (finalize_syms)
{
- locsym->lsy_offset = final_val;
+ locsym->lsy_value = final_val;
local_symbol_mark_resolved (locsym);
}
@@ -869,8 +869,8 @@ resolve_symbol_value (symp, finalize)
if (symp->sy_resolving)
{
- if (finalize)
- as_bad (_("Symbol definition loop encountered at %s"),
+ if (finalize_syms)
+ as_bad (_("symbol definition loop encountered at `%s'"),
S_GET_NAME (symp));
final_val = 0;
resolved = 1;
@@ -909,19 +909,22 @@ resolve_symbol_value (symp, finalize)
case O_symbol:
case O_symbol_rva:
- left = resolve_symbol_value (add_symbol, finalize);
- do_symbol:
+ left = resolve_symbol_value (add_symbol);
+ seg_left = S_GET_SEGMENT (add_symbol);
+ if (finalize_syms)
+ symp->sy_value.X_op_symbol = NULL;
+ do_symbol:
if (symp->sy_mri_common)
{
/* This is a symbol inside an MRI common section. The
- relocation routines are going to handle it specially.
- Don't change the value. */
+ relocation routines are going to handle it specially.
+ Don't change the value. */
resolved = symbol_resolved_p (add_symbol);
break;
}
- if (finalize && final_val == 0)
+ if (finalize_syms && final_val == 0)
{
if (LOCAL_SYMBOL_CHECK (add_symbol))
add_symbol = local_symbol_convert ((struct local_symbol *)
@@ -929,30 +932,51 @@ resolve_symbol_value (symp, finalize)
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
- X_add_number. This permits the routine which writes out
- relocation to detect this case, and convert the
- relocation to be against the symbol to which this symbol
- is equated. */
+ /* If we have equated this symbol to an undefined or common
+ symbol, keep X_op set to O_symbol, and don't change
+ X_add_number. This permits the routine which writes out
+ relocation to detect this case, and convert the
+ relocation to be against the symbol to which this symbol
+ is equated. */
if (! S_IS_DEFINED (add_symbol) || S_IS_COMMON (add_symbol))
{
- if (finalize)
+ if (finalize_syms)
{
- 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;
+ /* Use X_op_symbol as a flag. */
+ symp->sy_value.X_op_symbol = add_symbol;
+ final_seg = seg_left;
}
final_val = 0;
resolved = symbol_resolved_p (add_symbol);
+ symp->sy_resolving = 0;
+ goto exit_dont_set_value;
+ }
+ else if (finalize_syms && final_seg == expr_section
+ && seg_left != expr_section)
+ {
+ /* If the symbol is an expression symbol, do similarly
+ as for undefined and common syms above. Handles
+ "sym +/- expr" where "expr" cannot be evaluated
+ immediately, and we want relocations to be against
+ "sym", eg. because it is weak. */
+ symp->sy_value.X_op = O_symbol;
+ symp->sy_value.X_add_symbol = add_symbol;
+ symp->sy_value.X_add_number = final_val;
+ symp->sy_value.X_op_symbol = add_symbol;
+ final_seg = seg_left;
+ final_val += symp->sy_frag->fr_address + left;
+ resolved = symbol_resolved_p (add_symbol);
+ symp->sy_resolving = 0;
goto exit_dont_set_value;
}
else
{
final_val += symp->sy_frag->fr_address + left;
if (final_seg == expr_section || final_seg == undefined_section)
- final_seg = S_GET_SEGMENT (add_symbol);
+ final_seg = seg_left;
}
resolved = symbol_resolved_p (add_symbol);
@@ -961,7 +985,7 @@ resolve_symbol_value (symp, finalize)
case O_uminus:
case O_bit_not:
case O_logical_not:
- left = resolve_symbol_value (add_symbol, finalize);
+ left = resolve_symbol_value (add_symbol);
if (op == O_uminus)
left = -left;
@@ -996,50 +1020,57 @@ resolve_symbol_value (symp, finalize)
case O_gt:
case O_logical_and:
case O_logical_or:
- left = resolve_symbol_value (add_symbol, finalize);
- right = resolve_symbol_value (op_symbol, finalize);
+ left = resolve_symbol_value (add_symbol);
+ right = resolve_symbol_value (op_symbol);
seg_left = S_GET_SEGMENT (add_symbol);
seg_right = S_GET_SEGMENT (op_symbol);
/* Simplify addition or subtraction of a constant by folding the
constant into X_add_number. */
- if (op == O_add || op == O_subtract)
+ if (op == O_add)
{
if (seg_right == absolute_section)
{
- if (op == O_add)
- final_val += right;
- else
- final_val -= right;
- op = O_symbol;
- op_symbol = NULL;
+ final_val += right;
goto do_symbol;
}
- else if (seg_left == absolute_section && op == O_add)
+ else if (seg_left == absolute_section)
{
- op = O_symbol;
final_val += left;
add_symbol = op_symbol;
left = right;
- op_symbol = NULL;
+ seg_left = seg_right;
+ goto do_symbol;
+ }
+ }
+ else if (op == O_subtract)
+ {
+ if (seg_right == absolute_section)
+ {
+ final_val -= right;
goto do_symbol;
}
}
- /* Subtraction is permitted if both operands are in the same
- section. Otherwise, both operands must be absolute. We
- already handled the case of addition or subtraction of a
- constant above. This will probably need to be changed
- for an object file format which supports arbitrary
- expressions, such as IEEE-695. */
- /* Don't emit messages unless we're finalizing the symbol value,
+ /* Equality and non-equality tests are permitted on anything.
+ Subtraction, and other comparison operators are permitted if
+ both operands are in the same section. Otherwise, both
+ operands must be absolute. We already handled the case of
+ addition or subtraction of a constant above. This will
+ probably need to be changed for an object file format which
+ supports arbitrary 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
+ if (op != O_eq && op != O_ne
+ && (seg_left != absolute_section
+ || seg_right != absolute_section)
+ && ((op != O_subtract
+ && op != O_lt && op != O_le && op != O_ge && op != O_gt)
|| seg_left != seg_right
- || seg_left == undefined_section)
- && finalize)
+ || (seg_left == undefined_section
+ && add_symbol != op_symbol))
+ && finalize_syms)
{
char *file;
unsigned int line;
@@ -1048,11 +1079,11 @@ 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)
@@ -1062,16 +1093,16 @@ resolve_symbol_value (symp, finalize)
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));
}
}
@@ -1080,8 +1111,8 @@ resolve_symbol_value (symp, finalize)
if ((op == O_divide || op == O_modulus) && right == 0)
{
/* If seg_right is not absolute_section, then we've
- already issued a warning about using a bad symbol. */
- if (seg_right == absolute_section && finalize)
+ already issued a warning about using a bad symbol. */
+ if (seg_right == absolute_section && finalize_syms)
{
char *file;
unsigned int line;
@@ -1089,7 +1120,7 @@ resolve_symbol_value (symp, finalize)
if (expr_symbol_where (symp, &file, &line))
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));
}
@@ -1109,8 +1140,15 @@ resolve_symbol_value (symp, finalize)
case O_bit_and: left &= right; break;
case O_add: left += right; break;
case O_subtract: left -= right; break;
- case O_eq: left = left == right ? ~ (offsetT) 0 : 0; break;
- case O_ne: left = left != right ? ~ (offsetT) 0 : 0; break;
+ case O_eq:
+ case O_ne:
+ left = (left == right && seg_left == seg_right
+ && (seg_left != undefined_section
+ || add_symbol == op_symbol)
+ ? ~ (offsetT) 0 : 0);
+ if (symp->sy_value.X_op == O_ne)
+ left = ~left;
+ break;
case O_lt: left = left < right ? ~ (offsetT) 0 : 0; break;
case O_le: left = left <= right ? ~ (offsetT) 0 : 0; break;
case O_ge: left = left >= right ? ~ (offsetT) 0 : 0; break;
@@ -1141,27 +1179,27 @@ resolve_symbol_value (symp, finalize)
symp->sy_resolving = 0;
}
- if (finalize)
- {
- S_SET_VALUE (symp, final_val);
+ if (finalize_syms)
+ S_SET_VALUE (symp, final_val);
+exit_dont_set_value:
+ /* Always set the segment, even if not finalizing the value.
+ The segment is used to determine whether a symbol is defined. */
#if defined (OBJ_AOUT) && ! defined (BFD_ASSEMBLER)
- /* The old a.out backend does not handle S_SET_SEGMENT correctly
- for a stab symbol, so we use this bad hack. */
- if (final_seg != S_GET_SEGMENT (symp))
+ /* The old a.out backend does not handle S_SET_SEGMENT correctly
+ for a stab symbol, so we use this bad hack. */
+ if (final_seg != S_GET_SEGMENT (symp))
#endif
- S_SET_SEGMENT (symp, final_seg);
- }
+ S_SET_SEGMENT (symp, final_seg);
-exit_dont_set_value:
/* Don't worry if we can't resolve an expr_section symbol. */
- if (finalize)
+ if (finalize_syms)
{
if (resolved)
symp->sy_resolved = 1;
else if (S_GET_SEGMENT (symp) != expr_section)
{
- 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;
}
@@ -1182,7 +1220,7 @@ resolve_local_symbol (key, value)
PTR value;
{
if (value != NULL)
- resolve_symbol_value (value, 1);
+ resolve_symbol_value (value);
}
#endif
@@ -1542,7 +1580,7 @@ decode_local_label_name (s)
if (s[index] != 'L')
return s;
- for (label_number = 0, p = s + index + 1; isdigit ((unsigned char) *p); ++p)
+ for (label_number = 0, p = s + index + 1; ISDIGIT (*p); ++p)
label_number = (10 * label_number) + *p - '0';
if (*p == DOLLAR_LABEL_CHAR)
@@ -1552,7 +1590,7 @@ decode_local_label_name (s)
else
return s;
- for (instance_number = 0, p++; isdigit ((unsigned char) *p); ++p)
+ for (instance_number = 0, p++; ISDIGIT (*p); ++p)
instance_number = (10 * instance_number) + *p - '0';
message_format = _("\"%d\" (instance number %d of a %s label)");
@@ -1570,11 +1608,15 @@ S_GET_VALUE (s)
{
#ifdef BFD_ASSEMBLER
if (LOCAL_SYMBOL_CHECK (s))
- return ((struct local_symbol *) s)->lsy_offset;
+ return resolve_symbol_value (s);
#endif
- if (!s->sy_resolved && s->sy_value.X_op != O_constant)
- resolve_symbol_value (s, 1);
+ if (!s->sy_resolved)
+ {
+ valueT val = resolve_symbol_value (s);
+ if (!finalize_syms)
+ return val;
+ }
if (s->sy_value.X_op != O_constant)
{
static symbolS *recur;
@@ -1588,7 +1630,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;
}
@@ -1605,7 +1647,7 @@ S_SET_VALUE (s, val)
#ifdef BFD_ASSEMBLER
if (LOCAL_SYMBOL_CHECK (s))
{
- ((struct local_symbol *) s)->lsy_offset = val;
+ ((struct local_symbol *) s)->lsy_value = val;
return;
}
#endif
@@ -1824,7 +1866,7 @@ S_SET_EXTERNAL (s)
/* Do not reassign section symbols. */
as_where (& file, & line);
as_warn_where (file, line,
- _("Section symbols are already global"));
+ _("section symbols are already global"));
return;
}
s->bsym->flags |= BSF_GLOBAL;
@@ -2137,6 +2179,24 @@ symbol_equated_p (s)
return s->sy_value.X_op == O_symbol;
}
+/* Return whether a symbol is equated to another symbol, and should be
+ treated specially when writing out relocs. */
+
+int
+symbol_equated_reloc_p (s)
+ symbolS *s;
+{
+ if (LOCAL_SYMBOL_CHECK (s))
+ return 0;
+ /* X_op_symbol, normally not used for O_symbol, is set by
+ resolve_symbol_value to flag expression syms that have been
+ equated. */
+ return (s->sy_value.X_op == O_symbol
+ && ((s->sy_resolved && s->sy_value.X_op_symbol != NULL)
+ || ! S_IS_DEFINED (s)
+ || S_IS_COMMON (s)));
+}
+
/* Return whether a symbol has a constant value. */
int
@@ -2333,7 +2393,7 @@ print_symbol_value_1 (file, sym)
#ifdef BFD_ASSEMBLER
if (LOCAL_SYMBOL_CHECK (sym))
fprintf (file, "constant %lx",
- (long) ((struct local_symbol *) sym)->lsy_offset);
+ (long) ((struct local_symbol *) sym)->lsy_value);
else
#endif
print_expr_1 (file, &sym->sy_value);
diff --git a/contrib/binutils/gas/symbols.h b/contrib/binutils/gas/symbols.h
index ad2cde0..a80ca8c 100644
--- a/contrib/binutils/gas/symbols.h
+++ b/contrib/binutils/gas/symbols.h
@@ -61,7 +61,7 @@ void local_colon PARAMS ((int n));
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));
+valueT resolve_symbol_value PARAMS ((symbolS *));
void resolve_local_symbol_values PARAMS ((void));
void print_symbol_value PARAMS ((symbolS *));
@@ -185,6 +185,7 @@ 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_equated_reloc_p PARAMS ((symbolS *));
extern int symbol_constant_p PARAMS ((symbolS *));
#ifdef BFD_ASSEMBLER
diff --git a/contrib/binutils/gas/tc.h b/contrib/binutils/gas/tc.h
index 6becfb8..c8cb13c 100644
--- a/contrib/binutils/gas/tc.h
+++ b/contrib/binutils/gas/tc.h
@@ -71,11 +71,9 @@ void md_number_to_chars PARAMS ((char *buf, valueT val, int n));
void md_operand PARAMS ((expressionS * expressionP));
#endif
-#ifdef MD_APPLY_FIX3
-int md_apply_fix3 PARAMS ((fixS * fixP, valueT *val, segT seg));
-#endif
+void md_apply_fix3 PARAMS ((fixS *, valueT *, segT));
+
#ifdef BFD_ASSEMBLER
-int md_apply_fix PARAMS ((fixS * fixP, valueT *val));
#ifndef md_convert_frag
void md_convert_frag PARAMS ((bfd * headers, segT sec, fragS * fragP));
#endif
@@ -88,7 +86,6 @@ extern arelent *tc_gen_reloc PARAMS ((asection *, fixS *));
extern arelent **tc_gen_reloc PARAMS ((asection *, fixS *));
#endif
#else /* not BFD_ASSEMBLER */
-void md_apply_fix PARAMS ((fixS * fixP, long val));
#ifndef md_convert_frag
void md_convert_frag PARAMS ((object_headers * headers, segT, fragS * fragP));
#endif
diff --git a/contrib/binutils/gas/write.c b/contrib/binutils/gas/write.c
index cfdc9b5..9b20f90 100644
--- a/contrib/binutils/gas/write.c
+++ b/contrib/binutils/gas/write.c
@@ -52,6 +52,10 @@
#define TC_FIX_ADJUSTABLE(fix) 1
#endif
+#ifndef TC_FINALIZE_SYMS_BEFORE_SIZE_SEG
+#define TC_FINALIZE_SYMS_BEFORE_SIZE_SEG 1
+#endif
+
#ifndef MD_PCREL_FROM_SECTION
#define MD_PCREL_FROM_SECTION(FIXP, SEC) md_pcrel_from(FIXP)
#endif
@@ -61,6 +65,9 @@ extern CONST int md_short_jump_size;
extern CONST int md_long_jump_size;
#endif
+/* Used to control final evaluation of expressions. */
+int finalize_syms = 0;
+
int symbol_table_frozen;
void print_fixup PARAMS ((fixS *));
@@ -122,8 +129,6 @@ static fragS *chain_frchains_together_1 PARAMS ((segT, struct frchain *));
#ifdef BFD_ASSEMBLER
static void chain_frchains_together PARAMS ((bfd *, segT, PTR));
static void cvt_frag_to_fill PARAMS ((segT, fragS *));
-static void relax_seg PARAMS ((bfd *, asection *, PTR));
-static void size_seg PARAMS ((bfd *, asection *, PTR));
static void adjust_reloc_syms PARAMS ((bfd *, asection *, PTR));
static void write_relocs PARAMS ((bfd *, asection *, PTR));
static void write_contents PARAMS ((bfd *, asection *, PTR));
@@ -598,20 +603,24 @@ cvt_frag_to_fill (headersP, sec, fragP)
#endif /* defined (BFD_ASSEMBLER) || !defined (BFD) */
#ifdef BFD_ASSEMBLER
+static void relax_seg PARAMS ((bfd *, asection *, PTR));
static void
-relax_seg (abfd, sec, do_code)
- bfd *abfd;
+relax_seg (abfd, sec, xxx)
+ bfd *abfd ATTRIBUTE_UNUSED;
asection *sec;
- PTR do_code;
+ PTR xxx;
{
- flagword flags = bfd_get_section_flags (abfd, sec);
segment_info_type *seginfo = seg_info (sec);
- if (!(flags & SEC_CODE) == !do_code
- && seginfo && seginfo->frchainP)
- relax_segment (seginfo->frchainP->frch_root, sec);
+ if (seginfo && seginfo->frchainP
+ && relax_segment (seginfo->frchainP->frch_root, sec))
+ {
+ int *result = (int *) xxx;
+ *result = 1;
+ }
}
+static void size_seg PARAMS ((bfd *, asection *, PTR));
static void
size_seg (abfd, sec, xxx)
bfd *abfd;
@@ -753,15 +762,14 @@ adjust_reloc_syms (abfd, sec, xxx)
symbols, though, since they are not in the regular symbol
table. */
if (sym != NULL)
- resolve_symbol_value (sym, 1);
+ resolve_symbol_value (sym);
if (fixp->fx_subsy != NULL)
- resolve_symbol_value (fixp->fx_subsy, 1);
+ resolve_symbol_value (fixp->fx_subsy);
/* If this symbol is equated to an undefined symbol, convert
the fixup to being against that symbol. */
- if (sym != NULL && symbol_equated_p (sym)
- && (! S_IS_DEFINED (sym) || S_IS_COMMON (sym)))
+ if (sym != NULL && symbol_equated_reloc_p (sym))
{
fixp->fx_offset += symbol_get_value_expression (sym)->X_add_number;
sym = symbol_get_value_expression (sym)->X_add_symbol;
@@ -865,6 +873,14 @@ adjust_reloc_syms (abfd, sec, xxx)
symbol_mark_used_in_reloc (fixp->fx_addsy);
goto done;
}
+
+ /* Never adjust a reloc against local symbol in a merge section
+ with non-zero addend. */
+ if ((symsec->flags & SEC_MERGE) && fixp->fx_offset)
+ {
+ symbol_mark_used_in_reloc (fixp->fx_addsy);
+ goto done;
+ }
#endif
/* Is there some other reason we can't adjust this one? (E.g.,
@@ -967,11 +983,10 @@ write_relocs (abfd, sec, xxx)
}
/* If this is an undefined symbol which was equated to another
- symbol, then use generate the reloc against the latter symbol
+ symbol, then generate the reloc against the latter symbol
rather than the former. */
sym = fixp->fx_addsy;
- while (symbol_equated_p (sym)
- && (! S_IS_DEFINED (sym) || S_IS_COMMON (sym)))
+ while (symbol_equated_reloc_p (sym))
{
symbolS *n;
@@ -1043,8 +1058,7 @@ write_relocs (abfd, sec, xxx)
symbol, then generate the reloc against the latter symbol
rather than the former. */
sym = fixp->fx_addsy;
- while (symbol_equated_p (sym)
- && (! S_IS_DEFINED (sym) || S_IS_COMMON (sym)))
+ while (symbol_equated_reloc_p (sym))
sym = symbol_get_value_expression (sym)->X_add_symbol;
fixp->fx_addsy = sym;
@@ -1218,7 +1232,7 @@ write_contents (abfd, sec, xxx)
(stdoutput, sec, 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;
}
}
@@ -1352,7 +1366,7 @@ set_symtab ()
asymbol **asympp;
symbolS *symp;
boolean result;
- extern PTR bfd_alloc PARAMS ((bfd *, size_t));
+ extern PTR bfd_alloc PARAMS ((bfd *, bfd_size_type));
/* Count symbols. We can't rely on a count made by the loop in
write_object_file, because *_frob_file may add a new symbol or
@@ -1364,9 +1378,9 @@ set_symtab ()
if (nsyms)
{
int i;
+ bfd_size_type amt = (bfd_size_type) nsyms * sizeof (asymbol *);
- asympp = (asymbol **) bfd_alloc (stdoutput,
- nsyms * sizeof (asymbol *));
+ asympp = (asymbol **) bfd_alloc (stdoutput, amt);
symp = symbol_rootP;
for (i = 0; i < nsyms; i++, symp = symbol_next (symp))
{
@@ -1467,14 +1481,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_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_errs, n_errs == 1 ? "" : "s",
n_warns, n_warns == 1 ? "" : "s");
}
@@ -1493,22 +1507,18 @@ write_object_file ()
#ifdef BFD_ASSEMBLER
/* Remove the sections created by gas for its own purposes. */
{
- asection **seclist, *sec;
+ asection **seclist;
int i;
seclist = &stdoutput->sections;
- while (seclist && *seclist)
+ while (*seclist)
{
- sec = *seclist;
- while (sec == reg_section || sec == expr_section)
+ if (*seclist == reg_section || *seclist == expr_section)
{
- sec = sec->next;
- *seclist = sec;
+ bfd_section_list_remove (stdoutput, seclist);
stdoutput->section_count--;
- if (!sec)
- break;
}
- if (*seclist)
+ else
seclist = &(*seclist)->next;
}
i = 0;
@@ -1533,13 +1543,53 @@ write_object_file ()
#endif
#ifdef BFD_ASSEMBLER
- bfd_map_over_sections (stdoutput, relax_seg, (char *) 1);
- bfd_map_over_sections (stdoutput, relax_seg, (char *) 0);
+ while (1)
+ {
+ int changed;
+
+#ifndef WORKING_DOT_WORD
+ /* We need to reset the markers in the broken word list and
+ associated frags between calls to relax_segment (via
+ relax_seg). Since the broken word list is global, we do it
+ once per round, rather than locally in relax_segment for each
+ segment. */
+ struct broken_word *brokp;
+
+ for (brokp = broken_words;
+ brokp != (struct broken_word *) NULL;
+ brokp = brokp->next_broken_word)
+ {
+ brokp->added = 0;
+
+ if (brokp->dispfrag != (fragS *) NULL
+ && brokp->dispfrag->fr_type == rs_broken_word)
+ brokp->dispfrag->fr_subtype = 0;
+ }
+#endif
+
+ changed = 0;
+ bfd_map_over_sections (stdoutput, relax_seg, &changed);
+ if (!changed)
+ break;
+ }
+
+ /* Note - Most ports will use the default value of
+ TC_FINALIZE_SYMS_BEFORE_SIZE_SEG, which 1. This will force
+ local symbols to be resolved, removing their frag information.
+ Some ports however, will not have finished relaxing all of
+ their frags and will still need the local symbol frag
+ information. These ports can set
+ TC_FINALIZE_SYMS_BEFORE_SIZE_SEG to 0. */
+ finalize_syms = TC_FINALIZE_SYMS_BEFORE_SIZE_SEG;
+
bfd_map_over_sections (stdoutput, size_seg, (char *) 0);
#else
relax_and_size_all_segments ();
#endif /* BFD_ASSEMBLER */
+ /* Relaxation has completed. Freeze all syms. */
+ finalize_syms = 1;
+
#if defined (BFD_ASSEMBLER) && defined (OBJ_COFF) && defined (TE_GO32)
/* Now that the segments have their final sizes, run through the
sections and set their vma and lma. !BFD gas sets them, and BFD gas
@@ -1694,9 +1744,6 @@ write_object_file ()
/* Patch the jump table. */
/* This is the offset from ??? to table_ptr+0. */
to_addr = table_addr - S_GET_VALUE (lie->sub);
-#ifdef BFD_ASSEMBLER
- to_addr -= symbol_get_frag (lie->sub)->fr_address;
-#endif
#ifdef TC_CHECK_ADJUSTED_BROKEN_DOT_WORD
TC_CHECK_ADJUSTED_BROKEN_DOT_WORD (to_addr, lie);
#endif
@@ -1713,9 +1760,6 @@ write_object_file ()
/* This is a long jump from table_ptr+0 to the final target. */
from_addr = table_addr;
to_addr = S_GET_VALUE (lie->add) + lie->addnum;
-#ifdef BFD_ASSEMBLER
- 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;
@@ -1833,8 +1877,8 @@ write_object_file ()
obj_emit_strings (&next_object_file_charP);
#ifdef BFD_HEADERS
- bfd_seek (stdoutput, 0, 0);
- bfd_write (the_object_file, 1, object_file_size, stdoutput);
+ bfd_seek (stdoutput, (file_ptr) 0, 0);
+ bfd_bwrite (the_object_file, (bfd_size_type) object_file_size, stdoutput);
#else
/* Write the data to the file. */
@@ -1858,7 +1902,7 @@ write_object_file ()
symbolS *symp;
for (symp = symbol_rootP; symp; symp = symbol_next (symp))
- resolve_symbol_value (symp, 1);
+ resolve_symbol_value (symp);
}
resolve_local_symbol_values ();
@@ -1900,18 +1944,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. */
- resolve_symbol_value (symp, 1);
+ resolve_symbol_value (symp);
/* Skip symbols which were equated to undefined or common
symbols. */
- if (symbol_equated_p (symp)
- && (! S_IS_DEFINED (symp) || S_IS_COMMON (symp)))
+ if (symbol_equated_reloc_p (symp))
{
symbol_remove (symp, &symbol_rootP, &symbol_lastP);
continue;
@@ -1963,7 +2006,7 @@ write_object_file ()
/* Make sure we really got a value for the symbol. */
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));
symbol_mark_resolved (symp);
}
@@ -2059,7 +2102,7 @@ relax_frag (segment, fragP, stretch)
#endif
know (!(S_GET_SEGMENT (symbolP) == absolute_section)
|| sym_frag == &zero_address_frag);
- target += S_GET_VALUE (symbolP) + sym_frag->fr_address;
+ target += S_GET_VALUE (symbolP);
/* If frag has yet to be reached on this pass,
assume it will move by STRETCH just as we did.
@@ -2157,13 +2200,15 @@ relax_align (address, alignment)
these frag addresses may not be the same as final object-file
addresses. */
-void
+int
relax_segment (segment_frag_root, segment)
struct frag *segment_frag_root;
segT segment;
{
register struct frag *fragP;
register relax_addressT address;
+ int ret;
+
#if !defined (MANY_SEGMENTS) && !defined (BFD_ASSEMBLER)
know (segment == SEG_DATA || segment == SEG_TEXT || segment == SEG_BSS);
#endif
@@ -2196,8 +2241,9 @@ relax_segment (segment_frag_root, segment)
if (offset % fragP->fr_var != 0)
{
- as_bad (_("alignment padding (%lu bytes) not a multiple of %ld"),
- (unsigned long) offset, (long) fragP->fr_var);
+ as_bad_where (fragP->fr_file, fragP->fr_line,
+ _("alignment padding (%lu bytes) not a multiple of %ld"),
+ (unsigned long) offset, (long) fragP->fr_var);
offset -= (offset % fragP->fr_var);
}
@@ -2211,6 +2257,12 @@ relax_segment (segment_frag_root, segment)
break;
case rs_machine_dependent:
+ /* If fr_symbol is an expression, this call to
+ resolve_symbol_value sets up the correct segment, which will
+ likely be needed in md_estimate_size_before_relax. */
+ if (fragP->fr_symbol)
+ resolve_symbol_value (fragP->fr_symbol);
+
address += md_estimate_size_before_relax (fragP, segment);
break;
@@ -2297,21 +2349,20 @@ relax_segment (segment_frag_root, segment)
if (lie->added)
continue;
- offset = (symbol_get_frag (lie->add)->fr_address
- + S_GET_VALUE (lie->add)
+ offset = (S_GET_VALUE (lie->add)
+ lie->addnum
- - (symbol_get_frag (lie->sub)->fr_address
- + S_GET_VALUE (lie->sub)));
+ - S_GET_VALUE (lie->sub));
if (offset <= -32768 || offset >= 32767)
{
if (flag_warn_displacement)
{
char buf[50];
sprint_value (buf, (addressT) lie->addnum);
- as_warn (_(".word %s-%s+%s didn't fit"),
- S_GET_NAME (lie->add),
- S_GET_NAME (lie->sub),
- buf);
+ as_warn_where (fragP->fr_file, fragP->fr_line,
+ _(".word %s-%s+%s didn't fit"),
+ S_GET_NAME (lie->add),
+ S_GET_NAME (lie->sub),
+ buf);
}
lie->added = 1;
if (fragP->fr_subtype == 0)
@@ -2376,9 +2427,13 @@ 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)
- + symbol_get_frag (symbolP)->fr_address);
- } /* if we have a symbol */
+ /* Convert from an actual address to an octet offset
+ into the section. Here it is assumed that the
+ section's VMA is zero, and can omit subtracting it
+ from the symbol's value to get the address offset. */
+ know (S_GET_SECTION (symbolP)->vma == 0);
+ target += S_GET_VALUE (symbolP) * OCTETS_PER_BYTE;
+ }
know (fragP->fr_next);
after = fragP->fr_next->fr_address;
@@ -2389,7 +2444,7 @@ relax_segment (segment_frag_root, segment)
cannot have fewer than 0 chars. That is, we can't
.org backwards. */
as_bad_where (fragP->fr_file, fragP->fr_line,
- _("attempt to .org backwards ignored"));
+ _("attempt to .org backwards"));
/* We've issued an error message. Change the
frag to avoid cascading errors. */
@@ -2406,23 +2461,31 @@ relax_segment (segment_frag_root, segment)
}
case rs_space:
+ growth = 0;
if (symbolP)
{
- growth = S_GET_VALUE (symbolP);
- if (symbol_get_frag (symbolP) != &zero_address_frag
+ offsetT amount;
+
+ amount = S_GET_VALUE (symbolP);
+ if (S_GET_SEGMENT (symbolP) != absolute_section
|| S_IS_COMMON (symbolP)
|| ! S_IS_DEFINED (symbolP))
- as_bad_where (fragP->fr_file, fragP->fr_line,
- _(".space specifies non-absolute value"));
- fragP->fr_symbol = 0;
- if (growth < 0)
{
- as_warn (_(".space or .fill with negative value, ignored"));
- growth = 0;
+ as_bad_where (fragP->fr_file, fragP->fr_line,
+ _(".space specifies non-absolute value"));
+ /* Prevent repeat of this error message. */
+ fragP->fr_symbol = 0;
}
+ else if (amount < 0)
+ {
+ as_warn_where (fragP->fr_file, fragP->fr_line,
+ _(".space or .fill with negative value, ignored"));
+ fragP->fr_symbol = 0;
+ }
+ else
+ growth = (was_address + fragP->fr_fix + amount
+ - fragP->fr_next->fr_address);
}
- else
- growth = 0;
break;
case rs_machine_dependent:
@@ -2442,7 +2505,7 @@ relax_segment (segment_frag_root, segment)
valueT value;
int size;
- value = resolve_symbol_value (fragP->fr_symbol, 0);
+ value = resolve_symbol_value (fragP->fr_symbol);
size = sizeof_leb128 (value, fragP->fr_subtype);
growth = size - fragP->fr_offset;
fragP->fr_offset = size;
@@ -2471,10 +2534,14 @@ relax_segment (segment_frag_root, segment)
while (stretched); /* Until nothing further to relax. */
} /* do_relax */
- /* We now have valid fr_address'es for each frag. */
-
- /* All fr_address's are correct, relative to their own segment.
- We have made all the fixS we will ever make. */
+ ret = 0;
+ for (fragP = segment_frag_root; fragP; fragP = fragP->fr_next)
+ if (fragP->last_fr_address != fragP->fr_address)
+ {
+ fragP->last_fr_address = fragP->fr_address;
+ ret = 1;
+ }
+ return ret;
}
#if defined (BFD_ASSEMBLER) || (!defined (BFD) && !defined (OBJ_VMS))
@@ -2488,7 +2555,7 @@ relax_segment (segment_frag_root, segment)
Go through all the fixS's in a segment and see which ones can be
handled now. (These consist of fixS where we have since discovered
the value of a symbol, or the address of the frag involved.)
- For each one, call md_apply_fix to put the fix into the frag data.
+ For each one, call md_apply_fix3 to put the fix into the frag data.
Result is a count of how many relocation structs will be needed to
handle the remaining fixS's that we couldn't completely handle here.
@@ -2561,7 +2628,7 @@ fixup_segment (fixP, this_segment_type)
if (sub_symbolP)
{
- resolve_symbol_value (sub_symbolP, 1);
+ resolve_symbol_value (sub_symbolP);
if (add_symbolP == NULL || add_symbol_segment == absolute_section)
{
if (add_symbolP != NULL)
@@ -2586,7 +2653,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
@@ -2600,10 +2667,17 @@ 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 two symbols"));
#endif /* TC_I960 */
- add_number += S_GET_VALUE (add_symbolP) -
- S_GET_VALUE (sub_symbolP);
+ add_number += (S_GET_VALUE (add_symbolP)
+ - S_GET_VALUE (sub_symbolP));
+ if (1
+#ifdef TC_M68K
+ /* See the comment below about 68k weirdness. */
+ && 0
+#endif
+ && pcrel)
+ add_number -= MD_PCREL_FROM_SECTION (fixP, this_segment_type);
add_symbolP = NULL;
pcrel = 0; /* No further pcrel processing. */
@@ -2628,21 +2702,26 @@ fixup_segment (fixP, this_segment_type)
add_number -= S_GET_VALUE (sub_symbolP);
#ifdef DIFF_EXPR_OK
- else if (S_GET_SEGMENT (sub_symbolP) == this_segment_type
-#if 0
- /* Do this even if it's already described as
- pc-relative. For example, on the m68k, an
- operand of "pc@(foo-.-2)" should address
- "foo" in a pc-relative mode. */
- && pcrel
-#endif
- )
+ else if (S_GET_SEGMENT (sub_symbolP) == this_segment_type)
{
/* Make it pc-relative. */
- add_number += (MD_PCREL_FROM_SECTION (fixP, this_segment_type)
- - S_GET_VALUE (sub_symbolP));
- pcrel = 1;
- fixP->fx_pcrel = 1;
+ if (0
+#ifdef TC_M68K
+ /* Do this for m68k even if it's already described
+ as pc-relative. On the m68k, an operand of
+ "pc@(foo-.-2)" should address "foo" in a
+ pc-relative mode. */
+ || 1
+#endif
+ || !pcrel)
+ {
+ add_number += MD_PCREL_FROM_SECTION (fixP,
+ this_segment_type);
+ pcrel = 1;
+ fixP->fx_pcrel = 1;
+ }
+
+ add_number -= S_GET_VALUE (sub_symbolP);
sub_symbolP = 0;
fixP->fx_subsy = 0;
}
@@ -2668,7 +2747,7 @@ 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,
- _("Subtraction of two symbols in different sections \"%s\" {%s section} - \"%s\" {%s section} at 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),
@@ -2784,25 +2863,7 @@ fixup_segment (fixP, this_segment_type)
}
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
- }
+ md_apply_fix3 (fixP, & add_number, this_segment_type);
if (!fixP->fx_bit_fixP && !fixP->fx_no_overflow && size > 0)
{
@@ -2822,7 +2883,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. */
}
@@ -2834,7 +2895,7 @@ 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
diff --git a/contrib/binutils/gas/write.h b/contrib/binutils/gas/write.h
index 5bab7a2..451215d 100644
--- a/contrib/binutils/gas/write.h
+++ b/contrib/binutils/gas/write.h
@@ -157,6 +157,8 @@ struct fix
typedef struct fix fixS;
+extern int finalize_syms;
+
#ifndef BFD_ASSEMBLER
extern char *next_object_file_charP;
@@ -182,7 +184,7 @@ extern int get_recorded_alignment PARAMS ((segT seg));
extern void subsegs_finish PARAMS ((void));
extern void write_object_file PARAMS ((void));
extern long relax_frag PARAMS ((segT, fragS *, long));
-extern void relax_segment
+extern int relax_segment
PARAMS ((struct frag * seg_frag_root, segT seg_type));
extern void number_to_chars_littleendian PARAMS ((char *, valueT, int));
diff --git a/contrib/binutils/include/ChangeLog b/contrib/binutils/include/ChangeLog
index ad96520..0ec6eb8 100644
--- a/contrib/binutils/include/ChangeLog
+++ b/contrib/binutils/include/ChangeLog
@@ -1,17 +1,277 @@
-2001-07-19 David O'Brien <obrien@FreeBSD.org>
+2002-01-15 Richard Earnshaw <rearnsha@arm.com>
- * libiberty.h: Add lbasename.
+ * coff/arm.h (F_VFP_FLOAT): Define.
+ * elf/arm.h (F_VFP_FLOAT, EF_ARM_VFP_FLOAT): Define.
+
+2001-12-14 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * dis-asm.h (INIT_DISASSEMBLE_INFO_NO_ARCH): Initialise the
+ disassembler_options field (to NULL).
+
+2001-12-13 Jakub Jelinek <jakub@redhat.com>
+
+ * elf/common.h (PT_GNU_EH_FRAME): Define.
+ * bfdlink.h (struct bfd_link_info): Add eh_frame_hdr field.
+
+2001-12-07 Geoffrey Keating <geoffk@redhat.com>
+
+ * dis-asm.h (print_insn_xstormy16): Declare.
+
+2001-12-06 Richard Henderson <rth@redhat.com>
+
+ * demangle.h (no_demangling): New.
+ (NO_DEMANGLING_STYLE_STRING): New.
+
+2001-11-14 Alan Modra <amodra@bigpond.net.au>
+
+ * dis-asm.h (print_insn_i386): Declare.
+
+2001-11-11 Timothy Wall <twall@alum.mit.edu>
+
+ * dis-asm.h: Fix comment to refer to octets rather than bytes.
+
+2001-10-30 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * dis-asm.h (print_insn_mmix): Add prototype.
+
+2001-10-24 Neil Booth <neil@daikokuya.demon.co.uk>
+
+ * include/safe-ctype.h (_sch_isbasic, IS_ISOBASIC): New.
+
+2001-10-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * libiberty.h (hex_init): Revert delete.
+
+ * libiberty.h (_hex_value): Const-ify.
+ (hex_init): Delete.
+
+2001-10-16 Christopher Faylor <cgf@redhat.com>
+
+ * filenames.h: Add cygwin to the list of dosish style path systems.
+
+2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * demangle.h (demangler_engine): Const-ify.
+ * libiberty.h (buildargv): Likewise.
+
+2001-10-03 Vassili Karpov <malc@pulsesoft.com>
+
+ * bfdlink.h (struct bfd_link_info): Add nocopyreloc field.
+
+2001-09-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * libiberty.h (reconcat): New function.
+
+2001-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * libiberty.h (concat, concat_length, concat_copy, concat_copy2,
+ ACONCAT): Improve comments.
+
+2001-09-18 Alan Modra <amodra@bigpond.net.au>
+
+ * objalloc.h (OBJALLOC_ALIGN): Define using offsetof.
+
+2001-09-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * libiberty.h (concat_length, concat_copy, concat_copy2,
+ libiberty_concat_ptr, ACONCAT): New.
+
+ * libiberty.h (ASTRDUP): New macro.
+ libiberty_optr, libiberty_nptr, libiberty_len): Declare.
+
+2001-09-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * libiberty.h (ASTRDUP): New macro.
+ libiberty_optr, libiberty_nptr, libiberty_len): Declare.
+
+2001-08-29 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * ansidecl.h: Update comments reflecting previous change.
+
+2001-08-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * ansidecl.h (VA_OPEN, VA_CLOSE): Allow multiple uses.
+
+2001-08-25 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * bfdlink.h (struct bfd_link_info): Change 'spare_dynamic_tags' to
+ unsigned to remove a compile time warning message.
+
+2001-08-24 H.J. Lu <hjl@gnu.org>
+
+ * bfdlink.h (bfd_link_hash_table_type): New. The linker hash
+ table type, bfd_link_generic_hash_table and
+ bfd_link_elf_hash_table.
+ (bfd_link_hash_table): Add a new field, type, for the linker
+ hash table type.
+
+2001-08-23 Jakub Jelinek <jakub@redhat.com>
+
+ * bfdlink.h (struct bfd_link_info): Add combreloc and
+ spare_dynamic_tags fields.
+
+2001-08-23 Lars Brinkhoff <lars@nocrew.org>
+
+ * dyn-string.h, fibheap.h, partition.h, sort.h, splay-tree.h:
+ replace "GNU CC" with "GCC".
+
+2001-08-21 Richard Henderson <rth@redhat.com>
+
+ * fibheap.h: Tidy formatting.
+ (fibnode_t): Limit degree to 31 bits to avoid warning.
+
+2001-08-20 Daniel Berlin <dan@cgsoftware.com>
+
+ * fibheap.h: New file. Fibonacci heap.
+
+2001-08-20 Andrew Cagney <ac131313@redhat.com>
-2001-06-07 Alan Modra <amodra@bigpond.net.au>
+ * floatformat.h (floatformat_arm_ext): Document as deprecated.
+ (floatformat_arm_ext_big, floatformat_arm_ext_littlebyte_bigword)
+ (floatformat_ia64_spill_little, floatformat_ia64_quad_little)
+ (floatformat_ia64_spill_big, floatformat_ia64_quad_big)
+ (floatformat_m88110_harris_ext): Declare.
- * Many files: Update copyright notices.
+2001-08-18 Zack Weinberg <zackw@panix.com>
-2001-05-28 Philip Blundell <philb@gnu.org>
+ * ansidecl.h: Reorganize for readability, remove documentation
+ of obsolete macros, document PARAMS and VPARAMS. Add new
+ macros VA_OPEN, VA_CLOSE, and VA_FIXEDARG for nicer variadic
+ function implementation.
+
+2001-08-16 Richard Henderson <rth@redhat.com>
+
+ * hashtab.h (htab_hash_string): Declare.
+
+2001-06-13 Andrew Cagney <ac131313@redhat.com>
+
+ * libiberty.h (lbasename): Change function declaration to return a
+ const char pointer.
+
+2001-08-10 Richard Sandiford <rsandifo@redhat.com>
+
+ * opcode/mips.h (INSN_GP32): Remove.
+ (OPCODE_IS_MEMBER): Remove gp32 parameter.
+ (M_MOVE): New macro identifier.
+
+2001-08-02 Mark Kettenis <kettenis@gnu.org>
+
+ * xregex.h (_REGEX_RE_COMP): Define.
+ (re_comp): Define to xre_comp.
+ (re_exec): Define to xre_exec.
+
+2001-08-02 Charles Wilson <cwilson@ece.gatech.edu>
+
+ * bfdlink.h (struct bfd_link_info): add new boolean
+ field pei386_auto_import.
+
+2001-08-01 Aldy Hernandez <aldyh@redhat.com>
+
+ * opcode/mips.h (INSN_ISA_MASK): Nuke bits 12-15.
+
+2001-07-18 Andreas Jaeger <aj@suse.de>
+
+ * xregex2.h: Place under LGPL version 2.1.
+
+2001-07-12 Jeff Johnston <jjohnstn@redhat.com>
+
+ * opcode/cgen.h (CGEN_INSN): Add regex support.
+ (build_insn_regex): Declare.
+
+2001-07-10 Jeff Johnston <jjohnstn@redhat.com>
+
+ * xregex.h: New file to support libiberty regex.
+ * xregex2.h: Ditto.
+
+2001-06-15 Hans-Peter Nilsson <hp@axis.com>
+
+ * bfdlink.h (struct bfd_link_info): New member export_dynamic.
+
+2001-05-16 Matt Kraai <kraai@alumni.carnegiemellon.edu>
+
+ * partition.h: Fix misspelling of `implementation'.
+
+2001-05-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * ansidecl.h (NULL_PTR): Delete.
+
+2001-05-11 Jakub Jelinek <jakub@redhat.com>
- From 2001-05-11 Jakub Jelinek <jakub@redhat.com>
* elf/ia64.h (ELF_STRING_ia64_unwind_once): Define.
(ELF_STRING_ia64_unwind_info_once): Define.
+2001-05-07 Zack Weinberg <zackw@stanford.edu>
+
+ * demangle.h: Use PARAMS for all prototypes.
+ * ternary.h: Use PARAMS for all prototypes. Use PTR, not void *.
+ Make arguments constant where possible.
+
+2001-05-07 Mark Mitchell <mark@codesourcery.com>
+
+ * splay-tree.h (splay_tree_max): New function.
+ (splay_tree_min): Likewise.
+
+2001-04-27 Johan Rydberg <jrydberg@opencores.org>
+
+ * dis-asm.h (print_insn_openrisc): Add prototype.
+
+2001-04-15 Daniel Berlin <dan@cgsoftware.com>
+
+ * ternary.h: New file - Ternary search tree header.
+
+2001-04-13 Jakub Jelinek <jakub@redhat.com>
+
+ * bfdlink.h (bfd_link_discard): Add discard_sec_merge.
+
+2001-04-03 Zack Weinberg <zackw@stanford.edu>
+
+ * ansidecl.h: All logic from gcc/gansidecl.h moved here.
+
+2001-03-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * libiberty.h (alloca): Handle setting C_ALLOCA.
+
+2001-03-20 Jim Blandy <jimb@redhat.com>
+
+ * demangle.h (enum gnu_v3_constructor_kinds,
+ is_gnu_v3_mangled_ctor, enum gnu_v3_destructor_kinds,
+ is_gnu_v3_mangled_dtor): New declarations.
+
+2001-03-14 Nick Clifton <nickc@redhat.com>
+
+ * ansidecl.h: Fix copyright dates.
+ * demangle.h: Fix copyright dates.
+ * floatformat.h: Fix copyright dates.
+ * fnmatch.h: Fix copyright dates.
+ * getopt.h: Fix copyright dates.
+ * libiberty.h: Add FSF copyright notice.
+ * md5.h: Fix copyright dates.
+ * obstack.h: Fix copyright dates.
+ * splay-tree.h: Fix copyright dates.
+
+2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
+ John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * libiberty.h: Add lbasename.
+
+2001-03-06 Zack Weinberg <zackw@stanford.edu>
+
+ * libiberty.h: Prototype C_alloca; define alloca to either
+ __builtin_alloca or C_alloca as appropriate.
+
+2001-03-01 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * safe-ctype.h (_sch_test): Cast enum bit to unsigned short int for pcc
+ compatibility.
+
+2001-02-18 lars brinkhoff <lars@nocrew.org>
+
+ * dis-asm.h: Add PDP-11 target.
+
+2001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * dis-asm.h: Add linux target for S/390.
+
2001-01-11 Peter Targett <peter.targett@arccores.com>
* dis-asm.h (arc_get_disassembler): Correct declaration.
@@ -1806,7 +2066,7 @@ Fri Oct 25 03:18:20 1991 John Gilmore (gnu at cygnus.com)
Thu Oct 24 22:11:11 1991 John Gilmore (gnu at cygnus.com)
- RS/6000 support, by Metin G. Ozisik, Mimi Phûông-Thåo Võ, and
+ RS/6000 support, by Metin G. Ozisik, Mimi Phûông-Thåo Võ, and
John Gilmore.
* a.out.gnu.h: Update slightly.
diff --git a/contrib/binutils/include/ansidecl.h b/contrib/binutils/include/ansidecl.h
index 545a621..9a7c577 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, 1993, 1994, 1995, 1996, 1998, 1999, 2000
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -21,165 +21,216 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
ANSI C is assumed if __STDC__ is #defined.
- Macro ANSI C definition Traditional C definition
- ----- ---- - ---------- ----------- - ----------
- PTR `void *' `char *'
- LONG_DOUBLE `long double' `double'
- VOLATILE `volatile' `'
- SIGNED `signed' `'
- PTRCONST `void *const' `char *'
- ANSI_PROTOTYPES 1 not defined
-
- CONST is also defined, but is obsolete. Just use const.
-
- obsolete -- DEFUN (name, arglist, args)
-
- Defines function NAME.
-
- ARGLIST lists the arguments, separated by commas and enclosed in
- parentheses. ARGLIST becomes the argument list in traditional C.
-
- ARGS list the arguments with their types. It becomes a prototype in
- ANSI C, and the type declarations in traditional C. Arguments should
- be separated with `AND'. For functions with a variable number of
- arguments, the last thing listed should be `DOTS'.
-
- obsolete -- DEFUN_VOID (name)
-
- Defines a function NAME, which takes no arguments.
-
- obsolete -- EXFUN (name, (prototype)) -- obsolete.
-
- Replaced by PARAMS. Do not use; will disappear someday soon.
- Was used in external function declarations.
- In ANSI C it is `NAME PROTOTYPE' (so PROTOTYPE should be enclosed in
- parentheses). In traditional C it is `NAME()'.
- For a function that takes no arguments, PROTOTYPE should be `(void)'.
-
- obsolete -- PROTO (type, name, (prototype) -- obsolete.
-
- This one has also been replaced by PARAMS. Do not use.
-
- PARAMS ((args))
-
- We could use the EXFUN macro to handle prototype declarations, but
- the name is misleading and the result is ugly. So we just define a
- simple macro to handle the parameter lists, as in:
-
- static int foo PARAMS ((int, char));
-
- This produces: `static int foo();' or `static int foo (int, char);'
-
- EXFUN would have done it like this:
-
- static int EXFUN (foo, (int, char));
-
- but the function is not external...and it's hard to visually parse
- the function name out of the mess. EXFUN should be considered
- obsolete; new code should be written to use PARAMS.
-
- DOTS is also obsolete.
-
- Examples:
-
- extern int printf PARAMS ((const char *format, ...));
-*/
+ Macro ANSI C definition Traditional C definition
+ ----- ---- - ---------- ----------- - ----------
+ ANSI_PROTOTYPES 1 not defined
+ PTR `void *' `char *'
+ PTRCONST `void *const' `char *'
+ LONG_DOUBLE `long double' `double'
+ const not defined `'
+ volatile not defined `'
+ signed not defined `'
+ VA_START(ap, var) va_start(ap, var) va_start(ap)
+
+ Note that it is safe to write "void foo();" indicating a function
+ with no return value, in all K+R compilers we have been able to test.
+
+ For declaring functions with prototypes, we also provide these:
+
+ PARAMS ((prototype))
+ -- for functions which take a fixed number of arguments. Use this
+ when declaring the function. When defining the function, write a
+ K+R style argument list. For example:
+
+ char *strcpy PARAMS ((char *dest, char *source));
+ ...
+ char *
+ strcpy (dest, source)
+ char *dest;
+ char *source;
+ { ... }
+
+
+ VPARAMS ((prototype, ...))
+ -- for functions which take a variable number of arguments. Use
+ PARAMS to declare the function, VPARAMS to define it. For example:
+
+ int printf PARAMS ((const char *format, ...));
+ ...
+ int
+ printf VPARAMS ((const char *format, ...))
+ {
+ ...
+ }
+
+ For writing functions which take variable numbers of arguments, we
+ also provide the VA_OPEN, VA_CLOSE, and VA_FIXEDARG macros. These
+ hide the differences between K+R <varargs.h> and C89 <stdarg.h> more
+ thoroughly than the simple VA_START() macro mentioned above.
+
+ VA_OPEN and VA_CLOSE are used *instead of* va_start and va_end.
+ Immediately after VA_OPEN, put a sequence of VA_FIXEDARG calls
+ corresponding to the list of fixed arguments. Then use va_arg
+ normally to get the variable arguments, or pass your va_list object
+ around. You do not declare the va_list yourself; VA_OPEN does it
+ for you.
+
+ Here is a complete example:
+
+ int
+ printf VPARAMS ((const char *format, ...))
+ {
+ int result;
+
+ VA_OPEN (ap, format);
+ VA_FIXEDARG (ap, const char *, format);
+
+ result = vfprintf (stdout, format, ap);
+ VA_CLOSE (ap);
+
+ return result;
+ }
+
+
+ You can declare variables either before or after the VA_OPEN,
+ VA_FIXEDARG sequence. Also, VA_OPEN and VA_CLOSE are the beginning
+ and end of a block. They must appear at the same nesting level,
+ and any variables declared after VA_OPEN go out of scope at
+ VA_CLOSE. Unfortunately, with a K+R compiler, that includes the
+ argument list. You can have multiple instances of VA_OPEN/VA_CLOSE
+ pairs in a single function in case you need to traverse the
+ argument list more than once.
+
+ For ease of writing code which uses GCC extensions but needs to be
+ portable to other compilers, we provide the GCC_VERSION macro that
+ simplifies testing __GNUC__ and __GNUC_MINOR__ together, and various
+ wrappers around __attribute__. Also, __extension__ will be #defined
+ to nothing if it doesn't work. See below.
+
+ This header also defines a lot of obsolete macros:
+ CONST, VOLATILE, SIGNED, PROTO, EXFUN, DEFUN, DEFUN_VOID,
+ AND, DOTS, NOARGS. Don't use them. */
#ifndef _ANSIDECL_H
-
-#define _ANSIDECL_H 1
-
+#define _ANSIDECL_H 1
/* Every source file includes this file,
so they will all get the switch for lint. */
/* LINTLIBRARY */
+/* 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 */
#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(_WIN32)
/* All known AIX compilers implement these things (but don't always
define __STDC__). The RISC/OS MIPS compiler defines these things
in SVR4 mode, but does not define __STDC__. */
-#define PTR void *
-#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
-
-#define VPARAMS(ARGS) ARGS
-#define VA_START(va_list,var) va_start(va_list,var)
+#define ANSI_PROTOTYPES 1
+#define PTR void *
+#define PTRCONST void *const
+#define LONG_DOUBLE long double
+
+#define PARAMS(ARGS) ARGS
+#define VPARAMS(ARGS) ARGS
+#define VA_START(VA_LIST, VAR) va_start(VA_LIST, VAR)
+
+/* variadic function helper macros */
+/* "struct Qdmy" swallows the semicolon after VA_OPEN/VA_FIXEDARG's
+ use without inhibiting further decls and without declaring an
+ actual variable. */
+#define VA_OPEN(AP, VAR) { va_list AP; va_start(AP, VAR); { struct Qdmy
+#define VA_CLOSE(AP) } va_end(AP); }
+#define VA_FIXEDARG(AP, T, N) struct Qdmy
+
+#undef const
+#undef volatile
+#undef signed
+
+/* inline requires special treatment; it's in C99, and GCC >=2.7 supports
+ it too, but it's not in C89. */
+#undef inline
+#if __STDC_VERSION__ > 199901L
+/* it's a keyword */
+#else
+# if GCC_VERSION >= 2007
+# define inline __inline__ /* __inline__ prevents -pedantic warnings */
+# else
+# define inline /* nothing */
+# endif
+#endif
/* These are obsolete. Do not use. */
#ifndef IN_GCC
-#define CONST const
-#define DOTS , ...
+#define CONST const
+#define VOLATILE volatile
+#define SIGNED signed
+
#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)
+#define AND ,
+#define DOTS , ...
+#define NOARGS void
#endif /* ! IN_GCC */
#else /* Not ANSI C. */
-#define PTR char *
-#define PTRCONST PTR
-#define LONG_DOUBLE double
+#undef ANSI_PROTOTYPES
+#define PTR char *
+#define PTRCONST PTR
+#define LONG_DOUBLE double
+
+#define PARAMS(args) ()
+#define VPARAMS(args) (va_alist) va_dcl
+#define VA_START(va_list, var) va_start(va_list)
+
+#define VA_OPEN(AP, VAR) { va_list AP; va_start(AP); { struct Qdmy
+#define VA_CLOSE(AP) } va_end(AP); }
+#define VA_FIXEDARG(AP, TYPE, NAME) TYPE NAME = va_arg(AP, TYPE)
+
+/* some systems define these in header files for non-ansi mode */
+#undef const
+#undef volatile
+#undef signed
+#undef inline
+#define const
+#define volatile
+#define signed
+#define inline
#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 PARAMS(paramlist) ()
-
-#define VPARAMS(ARGS) (va_alist) va_dcl
-#define VA_START(va_list,var) va_start(va_list)
-
-/* These are obsolete. Do not use. */
-#ifndef IN_GCC
#define CONST
-#define DOTS
+#define VOLATILE
+#define SIGNED
+
#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()
+#define AND ;
+#define DOTS
+#define NOARGS
#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. */
@@ -230,4 +281,15 @@ So instead we use the macro below and test it against specific values. */
#define __extension__
#endif
+/* Bootstrap support: Adjust certain macros defined by Autoconf,
+ which are only valid for the stage1 compiler. If we detect
+ a modern version of GCC, we are probably in stage2 or beyond,
+ so unconditionally reset the values. Note that const, inline,
+ etc. have been dealt with above. */
+#if (GCC_VERSION >= 2007)
+# ifndef HAVE_LONG_DOUBLE
+# define HAVE_LONG_DOUBLE 1
+# endif
+#endif /* GCC >= 2.7 */
+
#endif /* ansidecl.h */
diff --git a/contrib/binutils/include/aout/ChangeLog b/contrib/binutils/include/aout/ChangeLog
index e75a12f..d215c59 100644
--- a/contrib/binutils/include/aout/ChangeLog
+++ b/contrib/binutils/include/aout/ChangeLog
@@ -1,6 +1,10 @@
-2001-06-07 Alan Modra <amodra@bigpond.net.au>
+2001-09-18 Alan Modra <amodra@bigpond.net.au>
- * Many files: Update copyright notices.
+ * aout64.h: Formatting fixes.
+ (N_TXTADDR): Evaluate to a bfd_vma.
+ (N_DATADDR): Avoid negative unsigned warning.
+ * hp300hpux.h: Formatting fixes.
+ (N_DATADDR): Avoid negative unsigned warning.
Mon Apr 3 13:29:08 2000 Hans-Peter Nilsson <hp@axis.com>
@@ -41,6 +45,10 @@ Wed Jul 12 00:15:13 1995 Ken Raeburn <raeburn@kr-pc.cygnus.com>
* sun4.h (PAGE_SIZE): Undefine before defining.
+Sun Sep 04 17:58:10 1994 Richard Earnshaw (rwe@pegasus.esprit.ec.org)
+
+ * aout64.h: Only define QMAGIC if it isn't already defined.
+
Thu Jun 16 14:22:55 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
* aout64.h (BMAGIC): Define.
@@ -175,20 +183,20 @@ Thu Jun 11 01:12:07 1992 John Gilmore (gnu at cygnus.com)
Thu Jan 30 18:12:44 1992 John Gilmore (gnu at cygnus.com)
- * aout/aout64.h: N_TXTSIZE needs some more parentheses.
+ * aout64.h: N_TXTSIZE needs some more parentheses.
I don't trust C precedence.
Wed Dec 18 14:32:01 1991 Per Bothner (bothner at cygnus.com)
- * aout/aout64.h: Move common sunos-specific test
+ * aout64.h: Move common sunos-specific test
to recognize shared libraries into new macro N_SHARED_LIB.
- Use it to simplify&reformat N_TXTADDR, N_TXTOFF, N_TXTSIZE.
+ Use it to simplify & reformat N_TXTADDR, N_TXTOFF, N_TXTSIZE.
Sat Nov 30 20:34:52 1991 Steve Chamberlain (sac at rtl.cygnus.com)
- * ChangeLog, aout64.h, ar.h, encap.h, host.h, hp.h, ranlib.h,
- reloc.h, stab.def, stab_gnu.h, sun4.h: All moved from the
- devo/include directory
+ * aout64.h, ar.h, encap.h, host.h, hp.h, ranlib.h, reloc.h,
+ stab.def, stab_gnu.h, sun4.h: All moved from the devo/include
+ directory.
Local Variables:
diff --git a/contrib/binutils/include/aout/aout64.h b/contrib/binutils/include/aout/aout64.h
index a8a8cd1..bc96d2a 100644
--- a/contrib/binutils/include/aout/aout64.h
+++ b/contrib/binutils/include/aout/aout64.h
@@ -131,7 +131,8 @@ struct external_exec
/* This macro is only relevant for ZMAGIC files; QMAGIC always has the header
in the text. */
#ifndef N_HEADER_IN_TEXT
-#define N_HEADER_IN_TEXT(x) (((x).a_entry & (TARGET_PAGE_SIZE-1)) >= EXEC_BYTES_SIZE)
+#define N_HEADER_IN_TEXT(x) \
+ (((x).a_entry & (TARGET_PAGE_SIZE-1)) >= EXEC_BYTES_SIZE)
#endif
/* Sun shared libraries, not linux. This macro is only relevant for ZMAGIC
@@ -151,15 +152,17 @@ struct external_exec
#ifndef N_TXTADDR
#define N_TXTADDR(x) \
- (/* The address of a QMAGIC file is always one page in, */ \
- /* with the header in the text. */ \
- N_IS_QMAGIC (x) ? TARGET_PAGE_SIZE + EXEC_BYTES_SIZE : \
- N_MAGIC(x) != ZMAGIC ? 0 : /* object file or NMAGIC */\
- N_SHARED_LIB(x) ? 0 : \
- N_HEADER_IN_TEXT(x) ? \
- TEXT_START_ADDR + EXEC_BYTES_SIZE : /* no padding */\
- TEXT_START_ADDR /* a page of padding */\
- )
+ (/* The address of a QMAGIC file is always one page in, */ \
+ /* with the header in the text. */ \
+ N_IS_QMAGIC (x) \
+ ? (bfd_vma) TARGET_PAGE_SIZE + EXEC_BYTES_SIZE \
+ : (N_MAGIC (x) != ZMAGIC \
+ ? (bfd_vma) 0 /* object file or NMAGIC */ \
+ : (N_SHARED_LIB (x) \
+ ? (bfd_vma) 0 \
+ : (N_HEADER_IN_TEXT (x) \
+ ? (bfd_vma) TEXT_START_ADDR + EXEC_BYTES_SIZE \
+ : (bfd_vma) TEXT_START_ADDR))))
#endif
/* If N_HEADER_IN_TEXT is not true for ZMAGIC, there is some padding
@@ -177,14 +180,15 @@ struct external_exec
/* Offset in an a.out of the start of the text section. */
#ifndef N_TXTOFF
-#define N_TXTOFF(x) \
- (/* For {O,N,Q}MAGIC, no padding. */ \
- N_MAGIC(x) != ZMAGIC ? EXEC_BYTES_SIZE : \
- N_SHARED_LIB(x) ? 0 : \
- N_HEADER_IN_TEXT(x) ? \
- EXEC_BYTES_SIZE : /* no padding */\
- ZMAGIC_DISK_BLOCK_SIZE /* a page of padding */\
- )
+#define N_TXTOFF(x) \
+ (/* For {O,N,Q}MAGIC, no padding. */ \
+ N_MAGIC (x) != ZMAGIC \
+ ? EXEC_BYTES_SIZE \
+ : (N_SHARED_LIB (x) \
+ ? 0 \
+ : (N_HEADER_IN_TEXT (x) \
+ ? EXEC_BYTES_SIZE /* no padding */ \
+ : ZMAGIC_DISK_BLOCK_SIZE /* a page of padding */)))
#endif
/* Size of the text section. It's always as stated, except that we
offset it to `undo' the adjustment to N_TXTADDR and N_TXTOFF
@@ -193,25 +197,28 @@ struct external_exec
exec header to be part of the text segment.) */
#ifndef N_TXTSIZE
#define N_TXTSIZE(x) \
- (/* For QMAGIC, we don't consider the header part of the text section. */\
- N_IS_QMAGIC (x) ? (x).a_text - EXEC_BYTES_SIZE : \
- (N_MAGIC(x) != ZMAGIC || N_SHARED_LIB(x)) ? (x).a_text : \
- N_HEADER_IN_TEXT(x) ? \
- (x).a_text - EXEC_BYTES_SIZE: /* no padding */\
- (x).a_text /* a page of padding */\
- )
+ (/* For QMAGIC, we don't consider the header part of the text section. */\
+ N_IS_QMAGIC (x) \
+ ? (x).a_text - EXEC_BYTES_SIZE \
+ : ((N_MAGIC (x) != ZMAGIC || N_SHARED_LIB (x)) \
+ ? (x).a_text \
+ : (N_HEADER_IN_TEXT (x) \
+ ? (x).a_text - EXEC_BYTES_SIZE /* no padding */ \
+ : (x).a_text /* a page of padding */ )))
#endif
/* The address of the data segment in virtual memory.
It is the text segment address, plus text segment size, rounded
up to a N_SEGSIZE boundary for pure or pageable files. */
#ifndef N_DATADDR
#define N_DATADDR(x) \
- (N_MAGIC(x)==OMAGIC? (N_TXTADDR(x)+N_TXTSIZE(x)) \
- : (N_SEGSIZE(x) + ((N_TXTADDR(x)+N_TXTSIZE(x)-1) & ~(N_SEGSIZE(x)-1))))
+ (N_MAGIC (x) == OMAGIC \
+ ? (N_TXTADDR (x) + N_TXTSIZE (x)) \
+ : (N_SEGSIZE (x) + ((N_TXTADDR (x) + N_TXTSIZE (x) - 1) \
+ & ~ (bfd_vma) (N_SEGSIZE (x) - 1))))
#endif
/* The address of the BSS segment -- immediately after the data segment. */
-#define N_BSSADDR(x) (N_DATADDR(x) + (x).a_data)
+#define N_BSSADDR(x) (N_DATADDR (x) + (x).a_data)
/* Offsets of the various portions of the file after the text segment. */
@@ -228,21 +235,19 @@ struct external_exec
for NMAGIC. */
#ifndef N_DATOFF
-#define N_DATOFF(x) \
- (N_TXTOFF(x) + N_TXTSIZE(x))
+#define N_DATOFF(x) ( N_TXTOFF (x) + N_TXTSIZE (x) )
#endif
-
#ifndef N_TRELOFF
-#define N_TRELOFF(x) ( N_DATOFF(x) + (x).a_data )
+#define N_TRELOFF(x) ( N_DATOFF (x) + (x).a_data )
#endif
#ifndef N_DRELOFF
-#define N_DRELOFF(x) ( N_TRELOFF(x) + (x).a_trsize )
+#define N_DRELOFF(x) ( N_TRELOFF (x) + (x).a_trsize )
#endif
#ifndef N_SYMOFF
-#define N_SYMOFF(x) ( N_DRELOFF(x) + (x).a_drsize )
+#define N_SYMOFF(x) ( N_DRELOFF (x) + (x).a_drsize )
#endif
#ifndef N_STROFF
-#define N_STROFF(x) ( N_SYMOFF(x) + (x).a_syms )
+#define N_STROFF(x) ( N_SYMOFF (x) + (x).a_syms )
#endif
/* Symbols */
diff --git a/contrib/binutils/include/aout/sun4.h b/contrib/binutils/include/aout/sun4.h
index f42a0dd..623afc1 100644
--- a/contrib/binutils/include/aout/sun4.h
+++ b/contrib/binutils/include/aout/sun4.h
@@ -1,8 +1,24 @@
-/* SPARC-specific values for a.out files */
+/* SPARC-specific values for a.out files
+
+ Copyright 2001 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Some systems, e.g., AIX, may have defined this in header files already
included. */
-#undef TARGET_PAGE_SIZE
+#undef TARGET_PAGE_SIZE
#define TARGET_PAGE_SIZE 0x2000 /* 8K. aka NBPG in <sys/param.h> */
/* Note that some SPARCs have 4K pages, some 8K, some others. */
diff --git a/contrib/binutils/include/bfdlink.h b/contrib/binutils/include/bfdlink.h
index 29eeb66..c02a1e8 100644
--- a/contrib/binutils/include/bfdlink.h
+++ b/contrib/binutils/include/bfdlink.h
@@ -35,10 +35,21 @@ enum bfd_link_strip
if strip_all is used. */
enum bfd_link_discard
{
+ discard_sec_merge, /* Discard local temporary symbols in SEC_MERGE
+ sections. */
discard_none, /* Don't discard any locals. */
discard_l, /* Discard local temporary symbols. */
discard_all /* Discard all locals. */
};
+
+/* Describes the type of hash table entry structure being used.
+ Different hash table structure have different fields and so
+ support different linking features. */
+enum bfd_link_hash_table_type
+ {
+ bfd_link_generic_hash_table,
+ bfd_link_elf_hash_table
+ };
/* These are the possible types of an entry in the BFD link hash
table. */
@@ -144,6 +155,8 @@ struct bfd_link_hash_table
struct bfd_link_hash_entry *undefs;
/* Entries are added to the tail of the undefs list. */
struct bfd_link_hash_entry *undefs_tail;
+ /* The type of the ink hash table. */
+ enum bfd_link_hash_table_type type;
};
/* Look up an entry in a link hash table. If FOLLOW is true, this
@@ -189,6 +202,9 @@ struct bfd_link_info
boolean shared;
/* true if BFD should pre-bind symbols in a shared object. */
boolean symbolic;
+ /* true if BFD should export all symbols in the dynamic symbol table
+ of an executable, rather than only those used. */
+ boolean export_dynamic;
/* true if shared objects should be linked directly, not shared. */
boolean static_link;
/* true if the output file should be in a traditional format. This
@@ -269,6 +285,25 @@ struct bfd_link_info
/* May be used to set DT_FLAGS_1 for ELF. */
bfd_vma flags_1;
+
+ /* True if auto-import thunks for DATA items in pei386 DLLs
+ should be generated/linked against. */
+ boolean pei386_auto_import;
+
+ /* True if non-PLT relocs should be merged into one reloc section
+ and sorted so that relocs against the same symbol come together. */
+ boolean combreloc;
+
+ /* True if executable should not contain copy relocs.
+ Setting this true may result in a non-sharable text segment. */
+ boolean nocopyreloc;
+
+ /* True if .eh_frame_hdr section and PT_GNU_EH_FRAME ELF segment
+ should be created. */
+ boolean eh_frame_hdr;
+
+ /* How many spare .dynamic DT_NULL entries should be added? */
+ unsigned int spare_dynamic_tags;
};
/* This structures holds a set of callback functions. These are
diff --git a/contrib/binutils/include/coff/ChangeLog b/contrib/binutils/include/coff/ChangeLog
index efde1bf..b8882bc 100644
--- a/contrib/binutils/include/coff/ChangeLog
+++ b/contrib/binutils/include/coff/ChangeLog
@@ -1,17 +1,109 @@
-2001-06-11 Alan Modra <amodra@bigpond.net.au>
+2001-12-24 Tom Rix <trix@redhat.com>
- Merge from mainline.
- 2001-02-09 David Mosberger <davidm@hpl.hp.com>
- * pe.h (PEPAOUTSZ): Rename from PEP64AOUTSZ.
- Rename from PEPAOUTHDR.
+ * xcoff.h (xcoff_big_format_p): Make <bigaf> the default archive
+ format.
+ (XCOFFARMAG_ELEMENT_SIZE, XCOFFARMAGBIG_ELEMENT_SIZE): Define for
+ archive header ascii elements.
+
+
+2001-12-17 Tom Rix <trix@redhat.com>
+
+ * xcoff.h : Add .except and .typchk section string and styp flags.
+ Fix xcoff_big_format_p macro.
+
+2001-12-16 Tom Rix <trix@redhat.com>
+
+ * xcoff.h : Clean up formatting.
+
+2001-11-11 Timothy Wall <twall@alum.mit.edu>
+
+ * ti.h: Move arch-specific stuff from here...
+ (COFF_ADJUST_SYM_IN/OUT): Optionally put page flag into symbol
+ value.
+ * tic54x.h: ...to here.
+
+2001-10-26 Christian Groessler <cpg@aladdin.de>
+
+ * external.h (GET_LINENO_LNNO): Fix usage of H_GET_32/16.
+ (PUT_LINENO_LNNO): Likewise with H_PUT_32/16.
+
+2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * ti.h (GET_SCNHDR_PAGE): Fix compile time warning.
-2001-06-07 Alan Modra <amodra@bigpond.net.au>
+2001-09-18 Alan Modra <amodra@bigpond.net.au>
- * Many files: Update copyright notices.
+ * external.h (GET_LINENO_LNNO): Use H_GET_32/16.
+ (PUT_LINENO_LNNO): Use H_PUT_32/16.
+ * m88k.h (GET_LNSZ_SIZE, GET_LNSZ_LNNO, GET_SCN_NRELOC,
+ GET_SCN_NLINNO): Use H_GET_32.
+ (PUT_LNSZ_LNNO, PUT_LNSZ_SIZE, PUT_SCN_NRELOC, PUT_SCN_NLINNO):
+ Use H_PUT_32.
+ * ti.h: Formatting fixes. Make use of H_GET_* and H_PUT_* throughout.
+ * xcoff.h: White space changes.
+
+2001-09-05 Tom Rix <trix@redhat.com>
+
+ * xcoff.h : Add XCOFF_SYSCALL32 and XCOFF_SYSCALL64 hash table flags.
+
+2001-08-27 Andreas Jaeger <aj@suse.de>
+
+ * xcoff.h (struct __rtinit): Make proper prototype for rtl.
+
+Fri Aug 24 01:18:51 2001 J"orn Rennecke <amylaar@redhat.com>
+
+ * internal.h (R_JMP2, R_JMPL2, R_MOVL2): Comment spelling fix.
+
+2001-04-05 Tom Rix <trix@redhat.com>
+
+ * rs6000.h : move xcoff32 external structures from xcofflink.
+ * rs6k64.h : move xcoff64 external structures from xcofflink.
+ * internal.h : promote 32 bit structure elements to 64 bit
+ for xcoff64 support
+ * xcoff.h : New file.
+
+2001-03-23 Nick Clifton <nickc@redhat.com>
+
+ * a29k.h: Fix compile time warning.
+ * external.h: Fix compile time warning.
+ * m88k.h: Fix compile time warning.
+
+2001-03-13 Nick Clifton <nickc@redhat.com>
+
+ * external.h: New file. Common structure definitions found in
+ other COFF header files.
+
+ * a29k.h: Use external.h.
+ * apollo.h: Use external.h.
+ * arm.h: Use external.h.
+ * h8300.h: Use external.h.
+ * h8500.h: Use external.h.
+ * i386.h: Use external.h.
+ * i860.h: Use external.h.
+ * ia64.h: Use external.h.
+ * m68k.h: Use external.h.
+ * m88k.h: Use external.h.
+ * mcore.h: Use external.h.
+ * mips.h: Use external.h.
+ * mipspe.h: Use external.h.
+ * powerpc.h: Use external.h.
+ * rs6000.h: Use external.h.
+ * rs6k64.h: Use external.h.
+ * sh.h: Use external.h.
+ * sparc.h: Use external.h.
+ * tic30.h: Use external.h.
+ * tic80.h: Use external.h.
+ * w65.h: Use external.h.
+ * we32k.h: Use external.h.
+ * z8k.h: Use external.h.
+
+2001-02-09 David Mosberger <davidm@hpl.hp.com>
+
+ * pe.h (PEPAOUTSZ): Rename from PEP64AOUTSZ.
+ Rename from PEPAOUTHDR.
-2001-02-17 Philip Blundell <philb@gnu.org>
+2001-01-23 H.J. Lu <hjl@gnu.org>
- From 2001-01-23 H.J. Lu <hjl@gnu.org>
* pe.h (struct external_PEI_DOS_hdr): New.
(struct external_PEI_IMAGE_hdr): New.
diff --git a/contrib/binutils/include/coff/alpha.h b/contrib/binutils/include/coff/alpha.h
index 6cd915d..e5210a5 100644
--- a/contrib/binutils/include/coff/alpha.h
+++ b/contrib/binutils/include/coff/alpha.h
@@ -19,7 +19,8 @@
/********************** FILE HEADER **********************/
-struct external_filehdr {
+struct external_filehdr
+{
unsigned char f_magic[2]; /* magic number */
unsigned char f_nscns[2]; /* number of sections */
unsigned char f_timdat[4]; /* time & date stamp */
@@ -44,7 +45,6 @@ struct external_filehdr {
/********************** AOUT "OPTIONAL HEADER" **********************/
-
typedef struct external_aouthdr
{
unsigned char magic[2]; /* type of file */
@@ -70,7 +70,8 @@ typedef struct external_aouthdr
/********************** SECTION HEADER **********************/
-struct external_scnhdr {
+struct external_scnhdr
+{
unsigned char s_name[8]; /* section name */
unsigned char s_paddr[8]; /* physical address, aliased s_nlib */
unsigned char s_vaddr[8]; /* virtual address */
@@ -88,7 +89,8 @@ struct external_scnhdr {
/********************** RELOCATION DIRECTIVES **********************/
-struct external_reloc {
+struct external_reloc
+{
unsigned char r_vaddr[8];
unsigned char r_symndx[4];
unsigned char r_bits[4];
@@ -166,7 +168,8 @@ struct external_reloc {
/* File header as a set of bytes */
-struct hdr_ext {
+struct hdr_ext
+{
unsigned char h_magic[2];
unsigned char h_vstamp[2];
unsigned char h_ilineMax[4];
@@ -196,7 +199,8 @@ struct hdr_ext {
/* File descriptor external record */
-struct fdr_ext {
+struct fdr_ext
+{
unsigned char f_adr[8];
unsigned char f_cbLineOffset[8];
unsigned char f_cbLine[8];
diff --git a/contrib/binutils/include/coff/arm.h b/contrib/binutils/include/coff/arm.h
index a0d8883..bcfdcbe 100644
--- a/contrib/binutils/include/coff/arm.h
+++ b/contrib/binutils/include/coff/arm.h
@@ -1,5 +1,5 @@
/* ARM COFF support for BFD.
- Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -19,33 +19,23 @@
#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 */
-};
+#define L_LNNO_SIZE 2
+#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
+#include "coff/external.h"
/* 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
- */
+ 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)
@@ -60,6 +50,7 @@ struct external_filehdr
#define F_APCS_26 (0x0400)
#define F_APCS_SET (0x0800)
#define F_SOFT_FLOAT (0x2000)
+#define F_VFP_FLOAT (0x4000)
/* Bits stored in flags field of the internal_f structure */
@@ -77,13 +68,12 @@ struct external_filehdr
#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
- */
+ 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 */
@@ -95,36 +85,11 @@ struct external_filehdr
#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
@@ -132,151 +97,9 @@ AOUTHDR;
#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
diff --git a/contrib/binutils/include/coff/external.h b/contrib/binutils/include/coff/external.h
new file mode 100644
index 0000000..19636da
--- /dev/null
+++ b/contrib/binutils/include/coff/external.h
@@ -0,0 +1,254 @@
+/* external.h -- External COFF structures
+
+ Copyright 2001 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#ifndef COFF_EXTERNAL_H
+#define COFF_EXTERNAL_H
+
+#ifndef DO_NOT_DEFINE_FILHDR
+/********************** 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
+#endif
+
+#ifndef DO_NOT_DEFINE_AOUTHDR
+/********************** AOUT "OPTIONAL HEADER" **********************/
+
+typedef struct external_aouthdr
+ {
+ 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 AOUTHDRSZ 28
+#define AOUTSZ 28
+#endif
+
+#ifndef DO_NOT_DEFINE_SCNHDR
+/********************** 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"
+#endif /* not DO_NOT_DEFINE_SCNHDR */
+
+#ifndef DO_NOT_DEFINE_LINENO
+
+/********************** LINE NUMBERS **********************/
+
+#ifndef L_LNNO_SIZE
+#error L_LNNO_SIZE needs to be defined
+#endif
+
+/* 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[L_LNNO_SIZE]; /* line number */
+};
+
+#define LINENO struct external_lineno
+#define LINESZ (4 + L_LNNO_SIZE)
+
+#if L_LNNO_SIZE == 4
+#define GET_LINENO_LNNO(abfd, ext) H_GET_32 (abfd, (ext->l_lnno))
+#define PUT_LINENO_LNNO(abfd, val, ext) H_PUT_32 (abfd, val, (ext->l_lnno))
+#endif
+#if L_LNNO_SIZE == 2
+#define GET_LINENO_LNNO(abfd, ext) H_GET_16 (abfd, (ext->l_lnno))
+#define PUT_LINENO_LNNO(abfd, val, ext) H_PUT_16 (abfd, val, (ext->l_lnno))
+#endif
+
+#endif /* not DO_NOT_DEFINE_LINENO */
+
+#ifndef DO_NOT_DEFINE_SYMENT
+/********************** SYMBOLS **********************/
+
+#define E_SYMNMLEN 8 /* # characters in a symbol name */
+#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
+
+#ifndef N_BTMASK
+#define N_BTMASK 0xf
+#endif
+
+#ifndef N_TMASK
+#define N_TMASK 0x30
+#endif
+
+#ifndef N_BTSHFT
+#define N_BTSHFT 4
+#endif
+
+#ifndef N_TSHIFT
+#define N_TSHIFT 2
+#endif
+
+#endif /* not DO_NOT_DEFINE_SYMENT */
+
+#ifndef DO_NOT_DEFINE_AUXENT
+
+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 */
+#ifdef INCLUDE_COMDAT_FIELDS_IN_AUXENT
+ char x_checksum[4]; /* section COMDAT checksum */
+ char x_associated[2]; /* COMDAT associated section index */
+ char x_comdat[1]; /* COMDAT selection number */
+#endif
+ } 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 AUXENT union external_auxent
+#define AUXESZ 18
+
+#define _ETEXT "etext"
+
+#endif /* not DO_NOT_DEFINE_AUXENT */
+
+#endif /* COFF_EXTERNAL_H */
diff --git a/contrib/binutils/include/coff/i386.h b/contrib/binutils/include/coff/i386.h
index 407245f..484a3b1 100644
--- a/contrib/binutils/include/coff/i386.h
+++ b/contrib/binutils/include/coff/i386.h
@@ -16,34 +16,22 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/********************** FILE HEADER **********************/
-
-struct external_filehdr {
- 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 L_LNNO_SIZE 2
+#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
+#include "coff/external.h"
/* 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)
- */
+ 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)
-
-
#define I386MAGIC 0x14c
#define I386PTXMAGIC 0x154
#define I386AIXMAGIC 0x175
@@ -52,43 +40,16 @@ struct external_filehdr {
#define LYNXCOFFMAGIC 0415
-#define I386BADMAG(x) (((x).f_magic != I386MAGIC) \
+#define I386BADMAG(x) ( ((x).f_magic != I386MAGIC) \
&& (x).f_magic != I386AIXMAGIC \
&& (x).f_magic != I386PTXMAGIC \
&& (x).f_magic != LYNXCOFFMAGIC)
-#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
@@ -96,149 +57,15 @@ AOUTHDR;
#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"
-
-/********************** 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 **********************/
-
-
-struct external_reloc {
+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/ia64.h b/contrib/binutils/include/coff/ia64.h
index 496a877..f7ff0ee 100644
--- a/contrib/binutils/include/coff/ia64.h
+++ b/contrib/binutils/include/coff/ia64.h
@@ -16,18 +16,10 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
-/********************** FILE HEADER **********************/
-
-struct external_filehdr {
- 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 DO_NOT_DEFINE_AOUTHDR
+#define L_LNNO_SIZE 2
+#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
+#include "coff/external.h"
#define IA64MAGIC 0x200
@@ -46,14 +38,7 @@ struct external_filehdr {
#define F_LNNO (0x0004)
#define F_LSYMS (0x0008)
-
-#define FILHDR struct external_filehdr
-#define FILHSZ 20
-
-
/********************** AOUT "OPTIONAL HEADER" **********************/
-
-
typedef struct
{
char magic[2]; /* type of file */
@@ -82,7 +67,6 @@ AOUTHDR;
#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
@@ -90,149 +74,15 @@ AOUTHDR;
#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"
-
-/********************** 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 **********************/
-
-
-struct external_reloc {
+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/internal.h b/contrib/binutils/include/coff/internal.h
index 38ca309..4babbd4 100644
--- a/contrib/binutils/include/coff/internal.h
+++ b/contrib/binutils/include/coff/internal.h
@@ -61,7 +61,7 @@ struct internal_filehdr
{
struct internal_extra_pe_filehdr pe;
- /* standard coff internal info */
+ /* Standard coff internal info. */
unsigned short f_magic; /* magic number */
unsigned short f_nscns; /* number of sections */
long f_timdat; /* time & date stamp */
@@ -74,17 +74,16 @@ struct internal_filehdr
/* 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_AR16WR file is 16-bit little-endian
- * F_AR32WR file is 32-bit little-endian
- * F_AR32W file is 32-bit big-endian
- * F_DYNLOAD rs/6000 aix: dynamically loadable w/imports & exports
- * F_SHROBJ rs/6000 aix: file is a shared object
- * F_DLL PE format DLL
- */
+ 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_AR16WR file is 16-bit little-endian
+ F_AR32WR file is 32-bit little-endian
+ F_AR32W file is 32-bit big-endian
+ F_DYNLOAD rs/6000 aix: dynamically loadable w/imports & exports
+ F_SHROBJ rs/6000 aix: file is a shared object
+ F_DLL PE format DLL. */
#define F_RELFLG (0x0001)
#define F_EXEC (0x0002)
@@ -97,7 +96,7 @@ struct internal_filehdr
#define F_SHROBJ (0x2000)
#define F_DLL (0x2000)
-/* extra structure which is used in the optional header */
+/* Extra structure which is used in the optional header. */
typedef struct _IMAGE_DATA_DIRECTORY
{
bfd_vma VirtualAddress;
@@ -174,7 +173,7 @@ struct internal_aouthdr
unsigned long tagentries; /* number of tag entries to follow */
/* RS/6000 stuff */
- unsigned long o_toc; /* address of TOC */
+ bfd_vma o_toc; /* address of TOC */
short o_snentry; /* section number for entry point */
short o_sntext; /* section number for text */
short o_sndata; /* section number for data */
@@ -185,8 +184,8 @@ struct internal_aouthdr
short o_algndata; /* max alignment for data */
short o_modtype; /* Module type field, 1R,RE,RO */
short o_cputype; /* Encoded CPU type */
- unsigned long o_maxstack; /* max stack size allowed. */
- unsigned long o_maxdata; /* max data size allowed. */
+ bfd_vma o_maxstack; /* max stack size allowed. */
+ bfd_vma o_maxdata; /* max data size allowed. */
/* ECOFF stuff */
bfd_vma bss_start; /* Base of bss section. */
@@ -200,9 +199,7 @@ struct internal_aouthdr
long o_sri; /* Static Resource Information */
long vid[2]; /* Version id */
-
struct internal_extra_pe_aouthdr pe;
-
};
/********************** STORAGE CLASSES **********************/
@@ -322,9 +319,7 @@ struct internal_scnhdr
unsigned char s_page; /* TI COFF load page */
};
-/*
- * s_flags "type"
- */
+/* s_flags "type". */
#define STYP_REG (0x0000) /* "regular": allocated, relocated, loaded */
#define STYP_DSECT (0x0001) /* "dummy": relocated only*/
#define STYP_NOLOAD (0x0002) /* "noload": allocated, relocated, not loaded */
@@ -343,29 +338,27 @@ struct internal_scnhdr
#define STYP_OVER (0x0400) /* overlay: relocated not allocated or loaded */
#define STYP_LIB (0x0800) /* for .lib: same as INFO */
#define STYP_MERGE (0x2000) /* merge section -- combines with text, data or bss sections only */
-#define STYP_REVERSE_PAD (0x4000) /* section will be padded with no-op instructions wherever padding is necessary and there is a
-
- word of contiguous bytes
- beginning on a word boundary. */
+#define STYP_REVERSE_PAD (0x4000) /* section will be padded with no-op instructions
+ wherever padding is necessary and there is a
+ word of contiguous bytes beginning on a word
+ boundary. */
#define STYP_LIT 0x8020 /* Literal data (like STYP_TEXT) */
-
/********************** 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.
- */
+ 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 internal_lineno
{
union
{
- long l_symndx; /* function name symbol index, iff l_lnno == 0*/
- long l_paddr; /* (physical) address of line number */
+ bfd_signed_vma l_symndx; /* function name symbol index, iff l_lnno == 0*/
+ bfd_signed_vma l_paddr; /* (physical) address of line number */
} l_addr;
unsigned long l_lnno; /* line number */
};
@@ -388,7 +381,7 @@ struct internal_syment
} _n_n;
char *_n_nptr[2]; /* allows for overlaying */
} _n;
- long n_value; /* value of symbol */
+ bfd_vma n_value; /* value of symbol */
short n_scnum; /* section number */
unsigned short n_flags; /* copy of flags from filhdr */
unsigned short n_type; /* type and derived type */
@@ -400,9 +393,8 @@ struct internal_syment
#define n_zeroes _n._n_n._n_zeroes
#define n_offset _n._n_n._n_offset
-
/* Relocatable symbols have number of the section in which they are defined,
- or one of the following: */
+ or one of the following: */
#define N_UNDEF ((short)0) /* undefined symbol */
#define N_ABS ((short)-1) /* value of symbol is absolute */
@@ -410,9 +402,8 @@ struct internal_syment
#define N_TV ((short)-3) /* indicates symbol needs preload transfer vector */
#define P_TV ((short)-4) /* indicates symbol needs postload transfer vector*/
-/*
- * Type of a symbol, in low N bits of the word
- */
+/* Type of a symbol, in low N bits of the word. */
+
#define T_NULL 0
#define T_VOID 1 /* function argument (only used by compiler) */
#define T_CHAR 2 /* character */
@@ -431,9 +422,8 @@ struct internal_syment
#define T_ULONG 15 /* unsigned long */
#define T_LNGDBL 16 /* long double */
-/*
- * derived types, in n_type
-*/
+/* Derived types, in n_type. */
+
#define DT_NON (0) /* no derived type */
#define DT_PTR (1) /* pointer */
#define DT_FCN (2) /* function */
@@ -478,7 +468,7 @@ union internal_auxent
{
struct
{ /* if ISFCN, tag, or .bb */
- long x_lnnoptr; /* ptr to fcn line # */
+ bfd_signed_vma x_lnnoptr; /* ptr to fcn line # */
union
{ /* entry ndx past block end */
long l;
@@ -529,7 +519,7 @@ union internal_auxent
{
union
{ /* csect length or enclosing csect */
- long l;
+ bfd_signed_vma l;
struct coff_ptr_struct *p;
} x_scnlen;
long x_parmhash; /* parm type hash index */
@@ -649,7 +639,7 @@ struct internal_reloc
#define R_JMP1 0x43
/* This reloc identifies a bra with an 8-bit pc-relative
- target that was formerlly a jmp insn with a 16bit target. */
+ target that was formerly a jmp insn with a 16bit target. */
#define R_JMP2 0x44
/* ??? */
@@ -661,7 +651,7 @@ struct internal_reloc
#define R_JMPL1 0x46
/* This reloc identifies a bra with an 8-bit pc-relative
- target that was formerlly a jmp insn with a 24bit target. */
+ target that was formerly a jmp insn with a 24bit target. */
#define R_JMPL2 0x47
/* This reloc identifies mov.b instructions with a 24bit absolute
@@ -689,7 +679,7 @@ struct internal_reloc
insn with a 16bit absolute address. */
#define R_MOVL1 0x4c
-/* This reloc identifies mov.[wl] insns which formerlly had
+/* This reloc identifies mov.[wl] insns which formerly had
a 32/24bit absolute address and now have a 16bit absolute address. */
#define R_MOVL2 0x4d
diff --git a/contrib/binutils/include/coff/powerpc.h b/contrib/binutils/include/coff/powerpc.h
index 5af9b72..1d4d6fb 100644
--- a/contrib/binutils/include/coff/powerpc.h
+++ b/contrib/binutils/include/coff/powerpc.h
@@ -18,29 +18,16 @@
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
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
+#define L_LNNO_SIZE 2
+#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
+#include "coff/external.h"
/* 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)
- */
+ 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)
@@ -57,152 +44,10 @@ struct external_filehdr {
#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 {
+struct external_reloc
+{
char r_vaddr[4];
char r_symndx[4];
char r_type[2];
diff --git a/contrib/binutils/include/coff/rs6000.h b/contrib/binutils/include/coff/rs6000.h
index 0def1d9..0c34861 100644
--- a/contrib/binutils/include/coff/rs6000.h
+++ b/contrib/binutils/include/coff/rs6000.h
@@ -66,11 +66,6 @@ AOUTHDR;
#define SMALL_AOUTSZ (28)
#define AOUTHDRSZ 72
-#define RS6K_AOUTHDR_OMAGIC 0x0107 /* old: text & data writeable */
-#define RS6K_AOUTHDR_NMAGIC 0x0108 /* new: text r/o, data r/w */
-#define RS6K_AOUTHDR_ZMAGIC 0x010B /* paged: text r/o, both page-aligned */
-
-
/********************** SECTION HEADER **********************/
@@ -87,28 +82,9 @@ struct external_scnhdr {
char s_flags[4]; /* flags */
};
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-#define _PAD ".pad"
-#define _LOADER ".loader"
-
#define SCNHDR struct external_scnhdr
#define SCNHSZ 40
-/* XCOFF uses a special .loader section with type STYP_LOADER. */
-#define STYP_LOADER 0x1000
-
-/* XCOFF uses a special .debug section with type STYP_DEBUG. */
-#define STYP_DEBUG 0x2000
-
-/* XCOFF handles line number or relocation overflow by creating
- another section header with STYP_OVRFLO set. */
-#define STYP_OVRFLO 0x8000
-
/********************** LINE NUMBERS **********************/
/* 1 line number entry for every "breakpointable" source line in a section.
@@ -241,3 +217,51 @@ struct external_reloc {
#define DEFAULT_TEXT_SECTION_ALIGNMENT 4
/* For new sections we havn't heard of before */
#define DEFAULT_SECTION_ALIGNMENT 4
+
+/* The ldhdr structure. This appears at the start of the .loader
+ section. */
+
+struct external_ldhdr
+{
+ bfd_byte l_version[4];
+ bfd_byte l_nsyms[4];
+ bfd_byte l_nreloc[4];
+ bfd_byte l_istlen[4];
+ bfd_byte l_nimpid[4];
+ bfd_byte l_impoff[4];
+ bfd_byte l_stlen[4];
+ bfd_byte l_stoff[4];
+};
+
+#define LDHDRSZ (8 * 4)
+
+struct external_ldsym
+{
+ union
+ {
+ bfd_byte _l_name[SYMNMLEN];
+ struct
+ {
+ bfd_byte _l_zeroes[4];
+ bfd_byte _l_offset[4];
+ } _l_l;
+ } _l;
+ bfd_byte l_value[4];
+ bfd_byte l_scnum[2];
+ bfd_byte l_smtype[1];
+ bfd_byte l_smclas[1];
+ bfd_byte l_ifile[4];
+ bfd_byte l_parm[4];
+};
+
+#define LDSYMSZ (8 + 3 * 4 + 2 + 2)
+
+struct external_ldrel
+{
+ bfd_byte l_vaddr[4];
+ bfd_byte l_symndx[4];
+ bfd_byte l_rtype[2];
+ bfd_byte l_rsecnm[2];
+};
+
+#define LDRELSZ (2 * 4 + 2 * 2)
diff --git a/contrib/binutils/include/coff/rs6k64.h b/contrib/binutils/include/coff/rs6k64.h
index ed1098e..c9dd29f 100644
--- a/contrib/binutils/include/coff/rs6k64.h
+++ b/contrib/binutils/include/coff/rs6k64.h
@@ -72,11 +72,6 @@ AOUTHDR;
#define SMALL_AOUTSZ (0)
#define AOUTHDRSZ 72
-#define RS6K_AOUTHDR_OMAGIC 0x0107 /* old: text & data writeable */
-#define RS6K_AOUTHDR_NMAGIC 0x0108 /* new: text r/o, data r/w */
-#define RS6K_AOUTHDR_ZMAGIC 0x010B /* paged: text r/o, both page-aligned */
-
-
/********************** SECTION HEADER **********************/
@@ -94,29 +89,11 @@ struct external_scnhdr {
char s_pad[4]; /* padding */
};
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-#define _PAD ".pad"
-#define _LOADER ".loader"
#define SCNHDR struct external_scnhdr
#define SCNHSZ 72
-/* XCOFF uses a special .loader section with type STYP_LOADER. */
-#define STYP_LOADER 0x1000
-
-/* XCOFF uses a special .debug section with type STYP_DEBUG. */
-#define STYP_DEBUG 0x2000
-
-/* XCOFF handles line number or relocation overflow by creating
- another section header with STYP_OVRFLO set. */
-#define STYP_OVRFLO 0x8000
-
/********************** LINE NUMBERS **********************/
/* 1 line number entry for every "breakpointable" source line in a section.
@@ -126,7 +103,7 @@ struct external_scnhdr {
*/
struct external_lineno {
union {
- char l_symndx[8];/* function name symbol index, iff l_lnno == 0*/
+ char l_symndx[4];/* function name symbol index, iff l_lnno == 0*/
char l_paddr[8]; /* (physical) address of line number */
} l_addr;
char l_lnno[4]; /* line number */
@@ -146,9 +123,7 @@ struct external_lineno {
struct external_syment
{
- union {
- char e_value[8];
- } e;
+ char e_value[8];
char e_offset[4];
char e_scnum[2];
char e_type[2];
@@ -249,3 +224,44 @@ struct external_reloc {
#define DEFAULT_TEXT_SECTION_ALIGNMENT 4
/* For new sections we havn't heard of before */
#define DEFAULT_SECTION_ALIGNMENT 4
+
+/* The ldhdr structure. This appears at the start of the .loader
+ section. */
+
+struct external_ldhdr
+{
+ bfd_byte l_version[4];
+ bfd_byte l_nsyms[4];
+ bfd_byte l_nreloc[4];
+ bfd_byte l_istlen[4];
+ bfd_byte l_nimpid[4];
+ bfd_byte l_stlen[4];
+ bfd_byte l_impoff[8];
+ bfd_byte l_stoff[8];
+ bfd_byte l_symoff[8];
+ bfd_byte l_rldoff[8];
+};
+#define LDHDRSZ (56)
+
+struct external_ldsym
+{
+ bfd_byte l_value[8];
+ bfd_byte l_offset[4];
+ bfd_byte l_scnum[2];
+ bfd_byte l_smtype[1];
+ bfd_byte l_smclas[1];
+ bfd_byte l_ifile[4];
+ bfd_byte l_parm[4];
+};
+
+#define LDSYMSZ (24)
+
+struct external_ldrel
+{
+ bfd_byte l_vaddr[8];
+ bfd_byte l_rtype[2];
+ bfd_byte l_rsecnm[2];
+ bfd_byte l_symndx[4];
+};
+
+#define LDRELSZ (16)
diff --git a/contrib/binutils/include/coff/sh.h b/contrib/binutils/include/coff/sh.h
index 7ae32fc..c77316e 100644
--- a/contrib/binutils/include/coff/sh.h
+++ b/contrib/binutils/include/coff/sh.h
@@ -16,56 +16,23 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-/********************** FILE HEADER **********************/
-
-struct external_filehdr {
- 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 */
-};
-
-
+#ifdef COFF_WITH_PE
+#define L_LNNO_SIZE 2
+#else
+#define L_LNNO_SIZE 4
+#endif
+#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
+#include "coff/external.h"
#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
-#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 AOUTHDRSZ 28
-#define AOUTSZ 28
-
-
+ (((x).f_magic != SH_ARCH_MAGIC_BIG) && \
+ ((x).f_magic != SH_ARCH_MAGIC_WINCE) && \
+ ((x).f_magic != SH_ARCH_MAGIC_LITTLE))
/* Define some NT default values. */
/* #define NT_IMAGE_BASE 0x400000 moved to internal.h */
@@ -74,161 +41,15 @@ AOUTHDR;
#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 */
-};
-
-/*
- * names of "special" sections
- */
-#define _TEXT ".text"
-#define _DATA ".data"
-#define _BSS ".bss"
-
-
-#define SCNHDR struct external_scnhdr
-#define SCNHSZ 40
-
-
-/********************** 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;
-#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 **********************/
-
-#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 (017)
-#define N_TMASK (060)
-#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
-
-
-
/********************** RELOCATION DIRECTIVES **********************/
/* The external reloc has an offset field, because some of the reloc
types on the h8 don't have room in the instruction for the entire
- offset - eg the strange jump and high page addressing modes */
+ offset - eg the strange jump and high page addressing modes. */
#ifndef COFF_WITH_PE
-struct external_reloc {
+struct external_reloc
+{
char r_vaddr[4];
char r_symndx[4];
char r_offset[4];
@@ -236,14 +57,14 @@ struct external_reloc {
char r_stuff[2];
};
#else
-struct external_reloc {
+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
diff --git a/contrib/binutils/include/coff/sparc.h b/contrib/binutils/include/coff/sparc.h
index c7102ba..ac524d6 100644
--- a/contrib/binutils/include/coff/sparc.h
+++ b/contrib/binutils/include/coff/sparc.h
@@ -22,18 +22,10 @@
(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 L_LNNO_SIZE 2
+#define DO_NOT_DEFINE_SYMENT
+#define DO_NOT_DEFINE_AUXENT
+#include "coff/external.h"
#define F_RELFLG (0x0001) /* relocation info stripped */
#define F_EXEC (0x0002) /* file is executable */
@@ -46,80 +38,16 @@ struct external_filehdr
#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. */
+/* More 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 **********************/
@@ -213,7 +141,8 @@ union external_auxent
/********************** RELOCATION DIRECTIVES **********************/
-struct external_reloc {
+struct external_reloc
+{
char r_vaddr[4];
char r_symndx[4];
char r_type[2];
diff --git a/contrib/binutils/include/coff/ti.h b/contrib/binutils/include/coff/ti.h
index 8fa35e3..d98fc89 100644
--- a/contrib/binutils/include/coff/ti.h
+++ b/contrib/binutils/include/coff/ti.h
@@ -17,22 +17,24 @@
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-
#ifndef COFF_TI_H
#define COFF_TI_H
+/* Note "coff/external.h is not used because TI adds extra fields to the structures. */
+
/********************** 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 */
- char f_target_id[2]; /* magic no. (TI COFF-specific) */
-};
+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 */
+ char f_target_id[2]; /* magic no. (TI COFF-specific) */
+ };
/* COFF0 has magic number in f_magic, and omits f_target_id from the file
header; for later versions, f_magic is 0xC1 for COFF1 and 0xC2 for COFF2
@@ -89,17 +91,23 @@ struct external_filehdr {
/* we need to read/write an extra field in the coff file header */
#ifndef COFF_ADJUST_FILEHDR_IN_POST
-#define COFF_ADJUST_FILEHDR_IN_POST(abfd,src,dst) \
-do { ((struct internal_filehdr *)(dst))->f_target_id = \
-bfd_h_get_16(abfd, (bfd_byte *)(((FILHDR *)(src))->f_target_id)); \
-} while(0)
+#define COFF_ADJUST_FILEHDR_IN_POST(abfd, src, dst) \
+ do \
+ { \
+ ((struct internal_filehdr *)(dst))->f_target_id = \
+ H_GET_16 (abfd, ((FILHDR *)(src))->f_target_id); \
+ } \
+ while (0)
#endif
#ifndef COFF_ADJUST_FILEHDR_OUT_POST
-#define COFF_ADJUST_FILEHDR_OUT_POST(abfd,src,dst) \
-do { bfd_h_put_16(abfd, ((struct internal_filehdr *)(src))->f_target_id, \
- (bfd_byte *)(((FILHDR *)(dst))->f_target_id)); \
-} while(0)
+#define COFF_ADJUST_FILEHDR_OUT_POST(abfd, src, dst) \
+ do \
+ { \
+ H_PUT_16 (abfd, ((struct internal_filehdr *)(src))->f_target_id, \
+ ((FILHDR *)(dst))->f_target_id); \
+ } \
+ while (0)
#endif
#define FILHDR struct external_filehdr
@@ -198,74 +206,59 @@ struct external_scnhdr {
Assume we're dealing with the COFF2 scnhdr structure, and adjust
accordingly
*/
-#define GET_SCNHDR_NRELOC(ABFD,PTR) \
-(COFF2_P(ABFD) ? bfd_h_get_32 (ABFD,PTR) : bfd_h_get_16 (ABFD, PTR))
-#define PUT_SCNHDR_NRELOC(ABFD,VAL,PTR) \
-(COFF2_P(ABFD) ? bfd_h_put_32 (ABFD,VAL,PTR) : bfd_h_put_16 (ABFD,VAL,PTR))
-#define GET_SCNHDR_NLNNO(ABFD,PTR) \
-(COFF2_P(ABFD) ? bfd_h_get_32 (ABFD,PTR) : bfd_h_get_16 (ABFD, (PTR)-2))
-#define PUT_SCNHDR_NLNNO(ABFD,VAL,PTR) \
-(COFF2_P(ABFD) ? bfd_h_put_32 (ABFD,VAL,PTR) : bfd_h_put_16 (ABFD,VAL,(PTR)-2))
-#define GET_SCNHDR_FLAGS(ABFD,PTR) \
-(COFF2_P(ABFD) ? bfd_h_get_32 (ABFD,PTR) : bfd_h_get_16 (ABFD, (PTR)-4))
-#define PUT_SCNHDR_FLAGS(ABFD,VAL,PTR) \
-(COFF2_P(ABFD) ? bfd_h_put_32 (ABFD,VAL,PTR) : bfd_h_put_16 (ABFD,VAL,(PTR)-4))
-#define GET_SCNHDR_PAGE(ABFD,PTR) \
-(COFF2_P(ABFD) ? bfd_h_get_16 (ABFD,PTR) : bfd_h_get_8 (ABFD, (PTR)-7))
+#define GET_SCNHDR_NRELOC(ABFD, PTR) \
+ (COFF2_P (ABFD) ? H_GET_32 (ABFD, PTR) : H_GET_16 (ABFD, PTR))
+#define PUT_SCNHDR_NRELOC(ABFD, VAL, PTR) \
+ (COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, PTR) : H_PUT_16 (ABFD, VAL, PTR))
+#define GET_SCNHDR_NLNNO(ABFD, PTR) \
+ (COFF2_P (ABFD) ? H_GET_32 (ABFD, PTR) : H_GET_16 (ABFD, (PTR) -2))
+#define PUT_SCNHDR_NLNNO(ABFD, VAL, PTR) \
+ (COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, PTR) : H_PUT_16 (ABFD, VAL, (PTR) -2))
+#define GET_SCNHDR_FLAGS(ABFD, PTR) \
+ (COFF2_P (ABFD) ? H_GET_32 (ABFD, PTR) : H_GET_16 (ABFD, (PTR) -4))
+#define PUT_SCNHDR_FLAGS(ABFD, VAL, PTR) \
+ (COFF2_P (ABFD) ? H_PUT_32 (ABFD, VAL, PTR) : H_PUT_16 (ABFD, VAL, (PTR) -4))
+#define GET_SCNHDR_PAGE(ABFD, PTR) \
+ (COFF2_P (ABFD) ? H_GET_16 (ABFD, PTR) : (unsigned) H_GET_8 (ABFD, (PTR) -7))
/* on output, make sure that the "reserved" field is zero */
-#define PUT_SCNHDR_PAGE(ABFD,VAL,PTR) \
-(COFF2_P(ABFD) ? bfd_h_put_16 (ABFD,VAL,PTR) : \
-bfd_h_put_8 (ABFD,VAL,(PTR)-7), bfd_h_put_8 (ABFD, 0, (PTR)-8))
+#define PUT_SCNHDR_PAGE(ABFD, VAL, PTR) \
+ (COFF2_P (ABFD) \
+ ? H_PUT_16 (ABFD, VAL, PTR) \
+ : H_PUT_8 (ABFD, VAL, (PTR) -7), H_PUT_8 (ABFD, 0, (PTR) -8))
/* TI COFF stores section size as number of bytes (address units, not octets),
so adjust to be number of octets, which is what BFD expects */
-#define GET_SCNHDR_SIZE(ABFD,SZP) \
-(bfd_h_get_32(ABFD,SZP)*bfd_octets_per_byte(ABFD))
-#define PUT_SCNHDR_SIZE(ABFD,SZ,SZP) \
-bfd_h_put_32(ABFD,(SZ)/bfd_octets_per_byte(ABFD),SZP)
-
-#define COFF_ADJUST_SCNHDR_IN_POST(ABFD,EXT,INT) \
-do { ((struct internal_scnhdr *)(INT))->s_page = \
-GET_SCNHDR_PAGE(ABFD,(bfd_byte *)((SCNHDR *)(EXT))->s_page); \
-} while(0)
+#define GET_SCNHDR_SIZE(ABFD, SZP) \
+ (H_GET_32 (ABFD, SZP) * bfd_octets_per_byte (ABFD))
+#define PUT_SCNHDR_SIZE(ABFD, SZ, SZP) \
+ H_PUT_32 (ABFD, (SZ) / bfd_octets_per_byte (ABFD), SZP)
+
+#define COFF_ADJUST_SCNHDR_IN_POST(ABFD, EXT, INT) \
+ do \
+ { \
+ ((struct internal_scnhdr *)(INT))->s_page = \
+ GET_SCNHDR_PAGE (ABFD, ((SCNHDR *)(EXT))->s_page); \
+ } \
+ while (0)
/* The line number and reloc overflow checking in coff_swap_scnhdr_out in
coffswap.h doesn't use PUT_X for s_nlnno and s_nreloc.
Due to different sized v0/v1/v2 section headers, we have to re-write these
fields.
*/
-#define COFF_ADJUST_SCNHDR_OUT_POST(ABFD,INT,EXT) \
-do { \
-PUT_SCNHDR_NLNNO(ABFD,((struct internal_scnhdr *)(INT))->s_nlnno,\
- (bfd_byte *)((SCNHDR *)(EXT))->s_nlnno); \
-PUT_SCNHDR_NRELOC(ABFD,((struct internal_scnhdr *)(INT))->s_nreloc,\
- (bfd_byte *)((SCNHDR *)(EXT))->s_nreloc); \
-PUT_SCNHDR_FLAGS(ABFD,((struct internal_scnhdr *)(INT))->s_flags, \
- (bfd_byte *)((SCNHDR *)(EXT))->s_flags); \
-PUT_SCNHDR_PAGE(ABFD,((struct internal_scnhdr *)(INT))->s_page, \
- (bfd_byte *)((SCNHDR *)(EXT))->s_page); \
-} while(0)
-
-/* Page macros
-
- The first GDB port requires flags in its remote memory access commands to
- distinguish between data/prog space. Hopefully we can make this go away
- eventually. Stuff the page in the upper bits of a 32-bit address, since
- the c5x family only uses 16 or 23 bits.
-
- c2x, c5x and most c54x devices have 16-bit addresses, but the c548 has
- 23-bit program addresses. Make sure the page flags don't interfere.
- These flags are used by GDB to identify the destination page for
- addresses.
-*/
-
-/* recognized load pages */
-#define PG_PROG 0x0 /* PROG page */
-#define PG_DATA 0x1 /* DATA page */
-
-#define ADDR_MASK 0x00FFFFFF
-#define PG_TO_FLAG(p) (((unsigned long)(p) & 0xFF) << 24)
-#define FLAG_TO_PG(f) (((f) >> 24) & 0xFF)
+#define COFF_ADJUST_SCNHDR_OUT_POST(ABFD, INT, EXT) \
+ do \
+ { \
+ PUT_SCNHDR_NLNNO (ABFD, ((struct internal_scnhdr *)(INT))->s_nlnno, \
+ ((SCNHDR *)(EXT))->s_nlnno); \
+ PUT_SCNHDR_NRELOC (ABFD, ((struct internal_scnhdr *)(INT))->s_nreloc,\
+ ((SCNHDR *)(EXT))->s_nreloc); \
+ PUT_SCNHDR_FLAGS (ABFD, ((struct internal_scnhdr *)(INT))->s_flags, \
+ ((SCNHDR *)(EXT))->s_flags); \
+ PUT_SCNHDR_PAGE (ABFD, ((struct internal_scnhdr *)(INT))->s_page, \
+ ((SCNHDR *)(EXT))->s_page); \
+ } \
+ while (0)
/*
* names of "special" sections
@@ -384,51 +377,71 @@ union external_auxent {
#define AUXESZ 18
/* section lengths are in target bytes (not host bytes) */
-#define GET_SCN_SCNLEN(ABFD,EXT) \
-(bfd_h_get_32(ABFD,(bfd_byte *)(EXT)->x_scn.x_scnlen)*bfd_octets_per_byte(ABFD))
-#define PUT_SCN_SCNLEN(ABFD,INT,EXT) \
-bfd_h_put_32(ABFD,(INT)/bfd_octets_per_byte(ABFD),\
- (bfd_byte *)(EXT)->x_scn.x_scnlen)
+#define GET_SCN_SCNLEN(ABFD, EXT) \
+ (H_GET_32 (ABFD, (EXT)->x_scn.x_scnlen) * bfd_octets_per_byte (ABFD))
+#define PUT_SCN_SCNLEN(ABFD, INT, EXT) \
+ H_PUT_32 (ABFD, (INT) / bfd_octets_per_byte (ABFD), (EXT)->x_scn.x_scnlen)
/* lnsz size is in bits in COFF file, in bytes in BFD */
#define GET_LNSZ_SIZE(abfd, ext) \
-(bfd_h_get_16(abfd, (bfd_byte *)ext->x_sym.x_misc.x_lnsz.x_size) / \
- (class != C_FIELD ? 8 : 1))
+ (H_GET_16 (abfd, ext->x_sym.x_misc.x_lnsz.x_size) / (class != C_FIELD ? 8 : 1))
#define PUT_LNSZ_SIZE(abfd, in, ext) \
- bfd_h_put_16(abfd, ((class != C_FIELD) ? (in)*8 : (in)), \
- (bfd_byte*) ext->x_sym.x_misc.x_lnsz.x_size)
+ H_PUT_16 (abfd, ((class != C_FIELD) ? (in) * 8 : (in)), \
+ ext->x_sym.x_misc.x_lnsz.x_size)
-/* TI COFF stores offsets for MOS and MOU in bits; BFD expects bytes */
-#define COFF_ADJUST_SYM_IN_POST(ABFD,EXT,INT) \
-do { struct internal_syment *dst = (struct internal_syment *)(INT); \
-if (dst->n_sclass == C_MOS || dst->n_sclass == C_MOU) dst->n_value /= 8; \
-} while (0)
-
-#define COFF_ADJUST_SYM_OUT_POST(ABFD,INT,EXT) \
-do { struct internal_syment *src = (struct internal_syment *)(INT); \
-SYMENT *dst = (SYMENT *)(EXT); \
-if(src->n_sclass == C_MOU || src->n_sclass == C_MOS) \
-bfd_h_put_32(abfd,src->n_value * 8,(bfd_byte *)dst->e_value); \
-} while (0)
+/* TI COFF stores offsets for MOS and MOU in bits; BFD expects bytes
+ Also put the load page flag of the section into the symbol value if it's an
+ address. */
+#ifndef NEEDS_PAGE
+#define NEEDS_PAGE(X) 0
+#define PAGE_MASK 0
+#endif
+#define COFF_ADJUST_SYM_IN_POST(ABFD, EXT, INT) \
+ do \
+ { \
+ struct internal_syment *dst = (struct internal_syment *)(INT); \
+ if (dst->n_sclass == C_MOS || dst->n_sclass == C_MOU) \
+ dst->n_value /= 8; \
+ else if (NEEDS_PAGE (dst->n_sclass)) { \
+ asection *scn = coff_section_from_bfd_index (abfd, dst->n_scnum); \
+ dst->n_value |= (scn->lma & PAGE_MASK); \
+ } \
+ } \
+ while (0)
+
+#define COFF_ADJUST_SYM_OUT_POST(ABFD, INT, EXT) \
+ do \
+ { \
+ struct internal_syment *src = (struct internal_syment *)(INT); \
+ SYMENT *dst = (SYMENT *)(EXT); \
+ if (src->n_sclass == C_MOU || src->n_sclass == C_MOS) \
+ H_PUT_32 (abfd, src->n_value * 8, dst->e_value); \
+ else if (NEEDS_PAGE (src->n_sclass)) { \
+ H_PUT_32 (abfd, src->n_value &= ~PAGE_MASK, dst->e_value); \
+ } \
+ } \
+ while (0)
/* Detect section-relative absolute symbols so they get flagged with a sym
index of -1.
*/
-#define SECTION_RELATIVE_ABSOLUTE_SYMBOL_P(RELOC,SECT) \
-((*(RELOC)->sym_ptr_ptr)->section->output_section == (SECT) \
- && (RELOC)->howto->name[0] == 'A')
+#define SECTION_RELATIVE_ABSOLUTE_SYMBOL_P(RELOC, SECT) \
+ ((*(RELOC)->sym_ptr_ptr)->section->output_section == (SECT) \
+ && (RELOC)->howto->name[0] == 'A')
/********************** RELOCATION DIRECTIVES **********************/
-struct external_reloc_v0 {
+struct external_reloc_v0
+{
char r_vaddr[4];
char r_symndx[2];
char r_reserved[2];
char r_type[2];
};
-struct external_reloc {
+struct external_reloc
+{
char r_vaddr[4];
char r_symndx[4];
char r_reserved[2]; /* extended pmad byte for COFF2 */
diff --git a/contrib/binutils/include/demangle.h b/contrib/binutils/include/demangle.h
index 2b5a9f5..a898218 100644
--- a/contrib/binutils/include/demangle.h
+++ b/contrib/binutils/include/demangle.h
@@ -1,5 +1,5 @@
/* Defs for interface to demanglers.
- Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000
+ Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -54,6 +54,7 @@
extern enum demangling_styles
{
+ no_demangling = -1,
unknown_demangling = 0,
auto_demangling = DMGL_AUTO,
gnu_demangling = DMGL_GNU,
@@ -68,6 +69,7 @@ extern enum demangling_styles
/* Define string names for the various demangling styles. */
+#define NO_DEMANGLING_STYLE_STRING "none"
#define AUTO_DEMANGLING_STYLE_STRING "auto"
#define GNU_DEMANGLING_STYLE_STRING "gnu"
#define LUCID_DEMANGLING_STYLE_STRING "lucid"
@@ -94,11 +96,11 @@ extern enum demangling_styles
/* Provide information about the available demangle styles. This code is
pulled from gdb into libiberty because it is useful to binutils also. */
-extern struct demangler_engine
+extern const struct demangler_engine
{
- const char *demangling_style_name;
- enum demangling_styles demangling_style;
- const char *demangling_style_doc;
+ const char *const demangling_style_name;
+ const enum demangling_styles demangling_style;
+ const char *const demangling_style_doc;
} libiberty_demanglers[];
extern char *
@@ -121,8 +123,39 @@ cplus_demangle_set_style PARAMS ((enum demangling_styles style));
extern enum demangling_styles
cplus_demangle_name_to_style PARAMS ((const char *name));
-/* V3 ABI demangling entry point, defined in cp-demangle.c. */
+/* V3 ABI demangling entry points, defined in cp-demangle.c. */
extern char*
cplus_demangle_v3 PARAMS ((const char* mangled));
+extern char*
+java_demangle_v3 PARAMS ((const char* mangled));
+
+
+enum gnu_v3_ctor_kinds {
+ gnu_v3_complete_object_ctor = 1,
+ gnu_v3_base_object_ctor,
+ gnu_v3_complete_object_allocating_ctor
+};
+
+/* Return non-zero iff NAME is the mangled form of a constructor name
+ in the G++ V3 ABI demangling style. Specifically, return an `enum
+ gnu_v3_ctor_kinds' value indicating what kind of constructor
+ it is. */
+extern enum gnu_v3_ctor_kinds
+ is_gnu_v3_mangled_ctor PARAMS ((const char *name));
+
+
+enum gnu_v3_dtor_kinds {
+ gnu_v3_deleting_dtor = 1,
+ gnu_v3_complete_object_dtor,
+ gnu_v3_base_object_dtor
+};
+
+/* Return non-zero iff NAME is the mangled form of a destructor name
+ in the G++ V3 ABI demangling style. Specifically, return an `enum
+ gnu_v3_dtor_kinds' value, indicating what kind of destructor
+ it is. */
+extern enum gnu_v3_dtor_kinds
+ is_gnu_v3_mangled_dtor PARAMS ((const char *name));
+
#endif /* DEMANGLE_H */
diff --git a/contrib/binutils/include/dis-asm.h b/contrib/binutils/include/dis-asm.h
index c2e7ae3..4e16ed3 100644
--- a/contrib/binutils/include/dis-asm.h
+++ b/contrib/binutils/include/dis-asm.h
@@ -145,8 +145,7 @@ typedef struct disassemble_info {
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
- */
+ 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
@@ -172,12 +171,13 @@ typedef struct disassemble_info {
/* Standard disassemblers. Disassemble one instruction at the given
- target address. Return number of bytes processed. */
+ target address. Return number of octets processed. */
typedef int (*disassembler_ftype)
PARAMS((bfd_vma, disassemble_info *));
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_ia64 PARAMS ((bfd_vma, disassemble_info*));
@@ -192,38 +192,44 @@ extern int print_insn_h8300h PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_h8300s PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_h8500 PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_alpha PARAMS ((bfd_vma, disassemble_info*));
-extern disassembler_ftype arc_get_disassembler PARAMS ((void *));
extern int print_insn_big_arm PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_little_arm PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_sparc PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_big_a29k PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_little_a29k PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_avr 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_fr30 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_hppa PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_i860 PARAMS ((bfd_vma, disassemble_info*));
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_mmix 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*));
+extern int print_insn_openrisc PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_pdp11 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_pj PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_big_powerpc PARAMS ((bfd_vma, disassemble_info*));
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 disassembler_ftype cris_get_disassembler PARAMS ((bfd *));
-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_s390 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_tic30 PARAMS ((bfd_vma, disassemble_info*));
-extern int print_insn_vax PARAMS ((bfd_vma, disassemble_info*));
extern int print_insn_tic54x 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 int print_insn_v850 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_vax PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_w65 PARAMS ((bfd_vma, disassemble_info*));
+extern int print_insn_xstormy16 PARAMS ((bfd_vma, disassemble_info*));
+
+extern disassembler_ftype arc_get_disassembler PARAMS ((void *));
+extern disassembler_ftype cris_get_disassembler PARAMS ((bfd *));
extern void print_arm_disassembler_options PARAMS ((FILE *));
extern void parse_arm_disassembler_option PARAMS ((char *));
@@ -294,6 +300,7 @@ extern int generic_symbol_at_address
(INFO).bytes_per_line = 0, \
(INFO).bytes_per_chunk = 0, \
(INFO).display_endian = BFD_ENDIAN_UNKNOWN, \
+ (INFO).disassembler_options = NULL, \
(INFO).insn_info_valid = 0
#ifdef __cplusplus
diff --git a/contrib/binutils/include/dyn-string.h b/contrib/binutils/include/dyn-string.h
index 67f7ab7..315f63f 100644
--- a/contrib/binutils/include/dyn-string.h
+++ b/contrib/binutils/include/dyn-string.h
@@ -2,20 +2,20 @@
Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
Contributed by Mark Mitchell (mark@markmitchell.com).
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify
+GCC 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,
+GCC 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
+along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
diff --git a/contrib/binutils/include/elf/ChangeLog b/contrib/binutils/include/elf/ChangeLog
index d346b9d..a0b4f71 100644
--- a/contrib/binutils/include/elf/ChangeLog
+++ b/contrib/binutils/include/elf/ChangeLog
@@ -1,15 +1,125 @@
+2002-01-16 Alan Modra <amodra@bigpond.net.au>
+
+ * ppc.h (DT_PPC64_GLINK): Define.
+
+2002-01-09 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * common.h: Update copyright years.
+ (NT_NETBSDCORE_PROCINFO): Define.
+ (NT_NETBSDCORE_FIRSTMACH): Define.
+
+2002-01-06 Steve Ellcey <sje@cup.hp.com>
+
+ * ia64.h (ELF_STRING_ia64_unwind_hdr): New Macro for HP-UX.
+ (SHT_IA_64_HP_OPT_ANOT): Ditto
+ (PT_IA_64_HP_OPT_ANOT): Ditto
+ (PT_IA_64_HP_HSL_ANOT): Ditto
+ (PT_IA_64_HP_STACK): Ditto
+ (SHN_IA_64_ANSI_COMMON): Ditto
+
+2001-12-17 Alan Modra <amodra@bigpond.net.au>
+
+ * external.h (Elf_External_Sym_Shndx): Declare.
+ * internal.h (struct elf_internal_sym <st_shndx>): Make it an
+ unsigned int.
+ * common.h (SHN_BAD): Define.
+
+2001-12-11 Alan Modra <amodra@bigpond.net.au>
+
+ * common.h (SHN_XINDEX): Comment typo fix.
+ * internal.h (Elf_Internal_Ehdr): Change existing "unsigned short"
+ size, count and index fields to "unsigned int".
+
+2001-12-07 Geoffrey Keating <geoffk@redhat.com>
+ Richard Henderson <rth@redhat.com>
+
+ * common.h (EM_XSTORMY16): Define.
+ * xstormy16.h: New file.
+
+2001-11-15 Alan Modra <amodra@bigpond.net.au>
+
+ * common.h (NT_ARCH): Define. Remove incorrect comment.
+
+2001-11-11 Geoffrey Keating <geoffk@redhat.com>
+
+ * dwarf2.h (dwarf_line_number_ops): Add DWARF 3 opcodes.
+
+2001-10-30 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * mmix.h: New file.
+
+2001-10-23 Alan Modra <amodra@bigpond.net.au>
+
+ * internal.h: White space changes to keep lines under 80 chars.
+
+2001-10-16 Jeff Holcomb <jeffh@redhat.com>
+
+ * internal.h (elf_internal_shdr): Make contents a unsigned char *.
+
+2001-09-18 Alan Modra <amodra@bigpond.net.au>
+
+ * internal.h (elf_internal_rela): Make r_addend a bfd_vma.
+
+2001-09-13 Alexandre Oliva <aoliva@redhat.com>
+
+ * common.h (EM_OPENRISC_OLD): Renamed the old EM_OPENRISC entry.
+
+2001-09-12 Alexandre Oliva <aoliva@redhat.com>
+
+ * common.h (EM_AVR_OLD): Renamed from...
+ (EM_AVR): this, redefined as in the current ELF standard.
+ (EM_PJ_OLD): Renamed from...
+ (EM_PJ): this, redefined as in the current ELF standard.
+ (EM_R30, EM_D10V, EM_D30V, EM_V850, EM_M32R, EM_MN10300,
+ EM_MN10200, EM_OPENRISC, EM_ARC_A5, EM_XTENSA): Defined as in
+ the current ELF standard.
+ (EM_CYGNUS_ARC): Removed, unused for a long time.
+
+2001-09-04 Richard Henderson <rth@redhat.com>
+
+ * alpha.h (R_ALPHA_OP*, R_ALPHA_IMMED*, R_ALPHA_GPVALUE): Remove.
+ (R_ALPHA_GPREL16): Rename from R_ALPHA_IMMED_GP_16.
+
+2001-08-30 Eric Christopher <echristo@redhat.com>
+
+ * mips.h: Remove E_MIPS_MACH_MIPS32_4K.
+
+2001-08-29 Jeff Law <law@redhat.com>
+
+ * h8.h (EF_H8_MACH): New mask for encoded machine type.
+ (E_H8_MACH_H8300, E_H8_MACH_H8300H, E_H8_MACH_H8300S): New
+ machine types.
+
+Tue Aug 26 23:32:34 2001 J"orn Rennecke <amylaar@redhat.com>
+
+ * h8.h: New file.
+
+2001-08-27 Staffan Ulfberg <staffanu@swox.se>
+
+ * ppc.h: Add relocs from the 64-bit PowerPC ELF ABI revision 1.2.
+
+2001-06-30 Daniel Berlin <dan@cgsoftware.com>
+
+ * dwarf2.h: Remerge with gcc version,
+ including all new DWARF 2.1 extensions.
+
2001-06-29 James Cownie <jcownie@etnus.com>
* dwarf2.h: Add DWARF 2.1 attribues.
-2001-06-11 Alan Modra <amodra@bigpond.net.au>
+2001-06-15 Per Bothner <per@bothner.com>
+
+ * dwarf2.h: Partial merge with gcc version.
+ (enum dwarf_descrim_list): Fix typo -> dwarf_discrim_list.
+ (DW_LANG_Java): Use value from dwarf 2.1 draft (also used in gcc).
+
+2001-05-15 Ralf Baechle <ralf@gnu.org>
- Merge from mainline.
- 2001-05-15 Ralf Baechle <ralf@gnu.org>
* common.h: Remove definition of EM_MIPS_RS4_BE. The constant was
never in active use and is used otherwise by the ABI.
- 2001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+2001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
* external.h: Fix typo.
* mips.h: Add/Extend many comments with reference to the MIPS ELF64
spec v. 2.4, available at e.g.
@@ -28,15 +138,40 @@
(ELF64_MIPS_R_TYPE): Likewise.
(OHW_R10KLDL): Define.
- 2001-04-24 Todd Fries <todd@fries.net>
+2001-04-24 Todd Fries <todd@fries.net>
+
* sparc.h: Fix typo.
- 2001-03-23 Nick Clifton <nickc@redhat.com>
+2001-04-20 Johan Rydberg <jrydberg@opencores.org>
+
+ * openrisc.h: New file.
+ * common.h (EM_OPENRISC): New constant.
+
+2001-04-23 Bo Thorsen <bo@suse.de>
+
+ * x86-64.h: Add vtable support.
+
+2001-03-23 Nick Clifton <nickc@redhat.com>
+
* mips.h: Remove extraneous whitespace.
-2001-06-07 Alan Modra <amodra@bigpond.net.au>
+2001-03-22 Hans-Peter Nilsson <hp@axis.com>
+
+ * cris.h: Add leading comment about PC-relative location.
+ (R_CRIS_COPY, R_CRIS_GLOB_DAT, R_CRIS_JUMP_SLOT, R_CRIS_RELATIVE,
+ R_CRIS_16_GOT, R_CRIS_32_GOT, R_CRIS_16_GOTPLT, R_CRIS_32_GOTPLT,
+ R_CRIS_32_GOTREL, R_CRIS_32_PLT_GOTREL, R_CRIS_32_PLT_PCREL):
+ New relocs.
+
+2001-02-27 Philip Blundell <pb@futuretv.com>
+
+ * arm.h: Add new definitions from ARM document SWS ESPC 0003 B-01.
+ (EF_PIC, et al.): Rename to EF_ARM_xx.
+
+2001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
- * Many files: Update copyright notices.
+ * common.h: Add linux target for S/390.
+ * s390.h: New file.
2001-01-11 Peter Targett <peter.targett@arccores.com>
diff --git a/contrib/binutils/include/elf/alpha.h b/contrib/binutils/include/elf/alpha.h
index 8bf67bd..ab429d4 100644
--- a/contrib/binutils/include/elf/alpha.h
+++ b/contrib/binutils/include/elf/alpha.h
@@ -80,23 +80,15 @@ START_RELOC_NUMBERS (elf_alpha_reloc_type)
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. */
- 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. */
+ /* Skip 12 - 16; deprecated ECOFF relocs. */
+
+ RELOC_NUMBER (R_ALPHA_GPRELHIGH, 17) /* GP relative 32 bit, high 16 bits */
+ RELOC_NUMBER (R_ALPHA_GPRELLOW, 18) /* GP relative 32 bit, low 16 bits */
+ RELOC_NUMBER (R_ALPHA_GPREL16, 19) /* GP relative 16 bit */
+
+ /* Skip 20 - 23; deprecated ECOFF relocs. */
+
+ /* These relocations are specific to shared libraries. */
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 */
diff --git a/contrib/binutils/include/elf/arm.h b/contrib/binutils/include/elf/arm.h
index 28e87a8..269a225 100644
--- a/contrib/binutils/include/elf/arm.h
+++ b/contrib/binutils/include/elf/arm.h
@@ -1,5 +1,5 @@
/* ARM ELF support for BFD.
- Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -25,29 +25,34 @@
/* 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
-
-/* Other constants defined in the ARM ELF spec. version A-08. */
+#define EF_ARM_INTERWORK 0x04
+#define EF_ARM_APCS_26 0x08
+#define EF_ARM_APCS_FLOAT 0x10
+#define EF_ARM_PIC 0x20
+#define EF_ARM_ALIGN8 0x40 /* 8-bit structure alignment is in use. */
+#define EF_ARM_NEW_ABI 0x80
+#define EF_ARM_OLD_ABI 0x100
+#define EF_ARM_SOFT_FLOAT 0x200
+#define EF_ARM_VFP_FLOAT 0x400
+
+/* Other constants defined in the ARM ELF spec. version B-01. */
#define EF_ARM_SYMSARESORTED 0x04 /* NB conflicts with EF_INTERWORK */
+#define EF_ARM_DYNSYMSUSESEGIDX 0x08 /* NB conflicts with EF_APCS26 */
+#define EF_ARM_MAPSYMSFIRST 0x10 /* NB conflicts with EF_APCS_FLOAT */
#define EF_ARM_EABIMASK 0xFF000000
#define EF_ARM_EABI_VERSION(flags) ((flags) & EF_ARM_EABIMASK)
#define EF_ARM_EABI_UNKNOWN 0x00000000
#define EF_ARM_EABI_VER1 0x01000000
+#define EF_ARM_EABI_VER2 0x02000000
/* 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
+#define F_INTERWORK EF_ARM_INTERWORK
+#define F_APCS26 EF_ARM_APCS_26
+#define F_APCS_FLOAT EF_ARM_APCS_FLOAT
+#define F_PIC EF_ARM_PIC
+#define F_SOFT_FLOAT EF_ARM_SOFT_FLOAT
+#define F_VFP_FLOAT EF_ARM_VFP_FLOAT
/* Additional symbol types for Thumb. */
#define STT_ARM_TFUNC STT_LOPROC /* A Thumb function. */
@@ -109,13 +114,21 @@ START_RELOC_NUMBERS (elf_arm_reloc_type)
FAKE_RELOC (LAST_INVALID_RELOC, 249)
#else /* not OLD_ARM_ABI */
FAKE_RELOC (FIRST_INVALID_RELOC1, 28)
- FAKE_RELOC (LAST_INVALID_RELOC1, 99)
+ FAKE_RELOC (LAST_INVALID_RELOC1, 31)
+ RELOC_NUMBER (R_ARM_ALU_PCREL7_0, 32)
+ RELOC_NUMBER (R_ARM_ALU_PCREL15_8, 33)
+ RELOC_NUMBER (R_ARM_ALU_PCREL23_15, 34)
+ RELOC_NUMBER (R_ARM_LDR_SBREL11_0, 35)
+ RELOC_NUMBER (R_ARM_ALU_SBREL19_12, 36)
+ RELOC_NUMBER (R_ARM_ALU_SBREL27_20, 37)
+ FAKE_RELOC (FIRST_INVALID_RELOC2, 38)
+ FAKE_RELOC (LAST_INVALID_RELOC2, 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)
+ FAKE_RELOC (FIRST_INVALID_RELOC3, 104)
+ FAKE_RELOC (LAST_INVALID_RELOC3, 248)
RELOC_NUMBER (R_ARM_RXPC25, 249)
#endif /* not OLD_ARM_ABI */
RELOC_NUMBER (R_ARM_RSBREL32, 250)
diff --git a/contrib/binutils/include/elf/common.h b/contrib/binutils/include/elf/common.h
index 4c50b89..289d3f2 100644
--- a/contrib/binutils/include/elf/common.h
+++ b/contrib/binutils/include/elf/common.h
@@ -1,6 +1,6 @@
/* ELF support for BFD.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001
+ 2001, 2002
Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, from information published
@@ -114,6 +114,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define EM_960 19 /* Intel 80960 */
#define EM_PPC 20 /* PowerPC */
#define EM_PPC64 21 /* 64-bit PowerPC */
+#define EM_S390 22 /* IBM S/390 */
#define EM_V800 36 /* NEC V800 series */
#define EM_FR20 37 /* Fujitsu FR20 */
@@ -161,6 +162,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define EM_MMIX 80 /* Donald Knuth's educational 64-bit processor */
#define EM_HUANY 81 /* Harvard's machine-independent format */
#define EM_PRISM 82 /* SiTera Prism */
+#define EM_AVR 83 /* Atmel AVR 8-bit microcontroller */
+#define EM_FR30 84 /* Fujitsu FR30 */
+#define EM_D10V 85 /* Mitsubishi D10V */
+#define EM_D30V 86 /* Mitsubishi D30V */
+#define EM_V850 87 /* NEC v850 */
+#define EM_M32R 88 /* Mitsubishi M32R */
+#define EM_MN10300 89 /* Matsushita MN10300 */
+#define EM_MN10200 90 /* Matsushita MN10200 */
+#define EM_PJ 91 /* picoJava */
+#define EM_OPENRISC 92 /* OpenRISC 32-bit embedded processor */
+#define EM_ARC_A5 93 /* ARC Cores Tangent-A5 */
+#define EM_XTENSA 94 /* Tensilica Xtensa Architecture */
/* If it is necessary to assign new unofficial EM_* values, please pick large
random numbers (0x8523, 0xa7f2, etc.) to minimize the chances of collision
@@ -174,7 +187,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
unofficial e_machine number should eventually ask registry@sco.com for
an officially blessed number to be added to the list above. */
-#define EM_PJ 99 /* picoJava */
+#define EM_PJ_OLD 99 /* picoJava */
/* Cygnus PowerPC ELF backend. Written in the absence of an ABI. */
#define EM_CYGNUS_POWERPC 0x9025
@@ -186,15 +199,15 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Old version of PowerPC, this should be removed shortly. */
#define EM_PPC_OLD 17
-/* Cygnus ARC ELF backend. Written in the absence of an ABI. */
-#define EM_CYGNUS_ARC 0x9040
-
/* Cygnus M32R ELF backend. Written in the absence of an ABI. */
#define EM_CYGNUS_M32R 0x9041
/* Alpha backend magic number. Written in the absence of an ABI. */
#define EM_ALPHA 0x9026
+/* old S/390 backend magic number. Written in the absence of an ABI. */
+#define EM_S390_OLD 0xa390
+
/* D10V backend magic number. Written in the absence of an ABI. */
#define EM_CYGNUS_D10V 0x7650
@@ -214,7 +227,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* AVR magic number
Written in the absense of an ABI. */
-#define EM_AVR 0x1057
+#define EM_AVR_OLD 0x1057
+
+/* OpenRISC magic number
+ Written in the absense of an ABI. */
+#define EM_OPENRISC_OLD 0x3426
+
+#define EM_XSTORMY16 0xad45
/* See the above comment before you add a new EM_* value here. */
@@ -237,6 +256,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define PT_LOPROC 0x70000000 /* Processor-specific */
#define PT_HIPROC 0x7FFFFFFF /* Processor-specific */
+#define PT_GNU_EH_FRAME (PT_LOOS + 0x474e550)
+
/* Program segment permissions, in program header p_flags field. */
#define PF_X (1 << 0) /* Segment is executable */
@@ -321,10 +342,18 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define NT_LWPSINFO 17 /* Has a struct lwpsinfo_t */
#define NT_WIN32PSTATUS 18 /* Has a struct win32_pstatus */
+
+/* Note segments for core files on NetBSD systems. Note name
+ must start with "NetBSD-CORE". */
+
+#define NT_NETBSDCORE_PROCINFO 1 /* Has a struct procinfo */
+#define NT_NETBSDCORE_FIRSTMACH 32 /* start of machdep note types */
+
+
/* Values of note segment descriptor types for object files. */
-/* (Only for hppa right now. Should this be moved elsewhere?) */
#define NT_VERSION 1 /* Contains a version string. */
+#define NT_ARCH 2 /* Contains an architecture string. */
/* These three macros disassemble and assemble a symbol table st_info field,
which contains the symbol binding and symbol type. The STB_ and STT_
@@ -386,8 +415,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define SHN_HIOS 0xFF3F /* OS specific semantics, hi */
#define SHN_ABS 0xFFF1 /* Associated symbol is absolute */
#define SHN_COMMON 0xFFF2 /* Associated symbol is in common */
-#define SHN_XINDEX 0xFFFF /* Section index it held elsewhere */
+#define SHN_XINDEX 0xFFFF /* Section index is held elsewhere */
#define SHN_HIRESERVE 0xFFFF /* End range of reserved indices */
+#define SHN_BAD ((unsigned) -1) /* Used internally by bfd */
/* The following constants control how a symbol may be accessed once it has
become part of an executable or shared library. */
diff --git a/contrib/binutils/include/elf/cris.h b/contrib/binutils/include/elf/cris.h
index 8605375..3bd03e8 100644
--- a/contrib/binutils/include/elf/cris.h
+++ b/contrib/binutils/include/elf/cris.h
@@ -30,6 +30,8 @@ START_RELOC_NUMBERS (elf_cris_reloc_type)
RELOC_NUMBER (R_CRIS_8, 1)
RELOC_NUMBER (R_CRIS_16, 2)
RELOC_NUMBER (R_CRIS_32, 3)
+
+ /* The "PC" position is the location right after the relocation. */
RELOC_NUMBER (R_CRIS_8_PCREL, 4)
RELOC_NUMBER (R_CRIS_16_PCREL, 5)
RELOC_NUMBER (R_CRIS_32_PCREL, 6)
@@ -37,6 +39,58 @@ START_RELOC_NUMBERS (elf_cris_reloc_type)
RELOC_NUMBER (R_CRIS_GNU_VTINHERIT, 7)
RELOC_NUMBER (R_CRIS_GNU_VTENTRY, 8)
+ /* Copy contents at dynlinking. Generated by the linker.
+ The BFD equivalent is BFD_RELOC_CRIS_COPY. */
+ RELOC_NUMBER (R_CRIS_COPY, 9)
+
+ /* Create GOT entry. Generated by the linker.
+ The BFD equivalent is BFD_RELOC_CRIS_GLOB_DAT. */
+ RELOC_NUMBER (R_CRIS_GLOB_DAT, 10)
+
+ /* Create PLT entry. Generated by the linker.
+ The BFD equivalent is BFD_RELOC_CRIS_JUMP_SLOT. */
+ RELOC_NUMBER (R_CRIS_JUMP_SLOT, 11)
+
+ /* Adjust by program base. Generated by the linker.
+ The BFD equivalent is BFD_RELOC_CRIS_RELATIVE. */
+ RELOC_NUMBER (R_CRIS_RELATIVE, 12)
+
+ /* A 16-bit offset to entry in GOT and request to create GOT entry for
+ that symbol.
+ The BFD equivalent is BFD_RELOC_CRIS_16_GOT. */
+ RELOC_NUMBER (R_CRIS_16_GOT, 13)
+
+ /* A 32-bit offset to entry in GOT and request to create GOT entry for
+ that symbol.
+ The BFD equivalent is BFD_RELOC_CRIS_32_GOT. */
+ RELOC_NUMBER (R_CRIS_32_GOT, 14)
+
+ /* A 16-bit offset to entry in PLT part of GOT and request to create PLT
+ entry for that symbol.
+ The BFD equivalent is BFD_RELOC_CRIS_16_GOTPLT. */
+ RELOC_NUMBER (R_CRIS_16_GOTPLT, 15)
+
+ /* A 32-bit offset to entry in PLT part of GOT and request to create PLT
+ entry for that symbol.
+ The BFD equivalent is BFD_RELOC_CRIS_32_GOTPLT. */
+ RELOC_NUMBER (R_CRIS_32_GOTPLT, 16)
+
+ /* A 32-bit offset from GOT to (local) symbol: no GOT entry should be
+ necessary.
+ The BFD equivalent is BFD_RELOC_CRIS_32_GOTREL. */
+ RELOC_NUMBER (R_CRIS_32_GOTREL, 17)
+
+ /* A 32-bit offset from GOT to entry for this symbol in PLT and request
+ to create PLT entry for symbol.
+ The BFD equivalent is BFD_RELOC_CRIS_32_GOTREL. */
+ RELOC_NUMBER (R_CRIS_32_PLT_GOTREL, 18)
+
+ /* A 32-bit offset from location after this relocation (addend specifies
+ offset) to entry for this symbol in PLT and request to create PLT
+ entry for symbol.
+ The BFD equivalent is BFD_RELOC_CRIS_32_PLT_PCREL. */
+ RELOC_NUMBER (R_CRIS_32_PLT_PCREL, 19)
+
/* No other relocs must be visible outside the assembler. */
END_RELOC_NUMBERS (R_CRIS_max)
diff --git a/contrib/binutils/include/elf/dwarf2.h b/contrib/binutils/include/elf/dwarf2.h
index edaa664..a99dca7 100644
--- a/contrib/binutils/include/elf/dwarf2.h
+++ b/contrib/binutils/include/elf/dwarf2.h
@@ -32,7 +32,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
by UNIX International. Copies of this specification are available from
UNIX International, 20 Waterview Boulevard, Parsippany, NJ, 07054.
-
This file also now contains definitions from the DWARF 2.1 specification. */
/* This file is shared between GCC and GDB, and should not contain
@@ -178,6 +177,15 @@ enum dwarf_tag
DW_TAG_variant_part = 0x33,
DW_TAG_variable = 0x34,
DW_TAG_volatile_type = 0x35,
+ /* DWARF 2.1. */
+ DW_TAG_dwarf_procedure = 0x36,
+ DW_TAG_restrict_type = 0x37,
+ DW_TAG_interface_type = 0x38,
+ DW_TAG_namespace = 0x39,
+ DW_TAG_imported_module = 0x3a,
+ DW_TAG_unspecified_type = 0x3b,
+ DW_TAG_partial_unit = 0x3c,
+ DW_TAG_imported_unit = 0x3d,
/* SGI/MIPS Extensions. */
DW_TAG_MIPS_loop = 0x4081,
/* GNU extensions. */
@@ -493,7 +501,9 @@ enum dwarf_type
DW_ATE_signed = 0x5,
DW_ATE_signed_char = 0x6,
DW_ATE_unsigned = 0x7,
- DW_ATE_unsigned_char = 0x8
+ DW_ATE_unsigned_char = 0x8,
+ /* DWARF 2.1. */
+ DW_ATE_imaginary_float = 0x9
};
#define DW_ATE_lo_user 0x80
@@ -559,8 +569,8 @@ enum dwarf_inline_attribute
DW_INL_declared_inlined = 3
};
-/* Descriminant lists. */
-enum dwarf_descrim_list
+/* Discriminant lists. */
+enum dwarf_discrim_list
{
DW_DSC_label = 0,
DW_DSC_range = 1
@@ -578,7 +588,11 @@ enum dwarf_line_number_ops
DW_LNS_negate_stmt = 6,
DW_LNS_set_basic_block = 7,
DW_LNS_const_add_pc = 8,
- DW_LNS_fixed_advance_pc = 9
+ DW_LNS_fixed_advance_pc = 9,
+ /* DWARF 3 */
+ DW_LNS_set_prologue_end = 10,
+ DW_LNS_set_epilogue_begin = 11,
+ DW_LNS_set_isa = 12
};
/* Line number extended opcodes. */
@@ -651,7 +665,12 @@ enum dwarf_source_language
DW_LANG_Fortran90 = 0x0008,
DW_LANG_Pascal83 = 0x0009,
DW_LANG_Modula2 = 0x000a,
- DW_LANG_Java = 0x9af4,
+ DW_LANG_Java = 0x000b,
+ /* DWARF 2.1. */
+ DW_LANG_C99 = 0x000c,
+ DW_LANG_Ada95 = 0x000d,
+ DW_LANG_Fortran95 = 0x000e,
+ /* MIPS. */
DW_LANG_Mips_Assembler = 0x8001
};
@@ -668,4 +687,28 @@ enum dwarf_macinfo_record_type
DW_MACINFO_end_file = 4,
DW_MACINFO_vendor_ext = 255
};
+
+/* @@@ For use with GNU frame unwind information. */
+
+#define DW_EH_PE_absptr 0x00
+#define DW_EH_PE_omit 0xff
+
+#define DW_EH_PE_uleb128 0x01
+#define DW_EH_PE_udata2 0x02
+#define DW_EH_PE_udata4 0x03
+#define DW_EH_PE_udata8 0x04
+#define DW_EH_PE_sleb128 0x09
+#define DW_EH_PE_sdata2 0x0A
+#define DW_EH_PE_sdata4 0x0B
+#define DW_EH_PE_sdata8 0x0C
+#define DW_EH_PE_signed 0x08
+
+#define DW_EH_PE_pcrel 0x10
+#define DW_EH_PE_textrel 0x20
+#define DW_EH_PE_datarel 0x30
+#define DW_EH_PE_funcrel 0x40
+#define DW_EH_PE_aligned 0x50
+
+#define DW_EH_PE_indirect 0x80
+
#endif /* _ELF_DWARF2_H */
diff --git a/contrib/binutils/include/elf/external.h b/contrib/binutils/include/elf/external.h
index 38e6596..403ee62 100644
--- a/contrib/binutils/include/elf/external.h
+++ b/contrib/binutils/include/elf/external.h
@@ -143,6 +143,10 @@ typedef struct {
unsigned char st_size[8]; /* Associated symbol size */
} Elf64_External_Sym;
+typedef struct {
+ unsigned char est_shndx[4]; /* Section index */
+} Elf_External_Sym_Shndx;
+
/* Note segments */
typedef struct {
diff --git a/contrib/binutils/include/elf/h8.h b/contrib/binutils/include/elf/h8.h
new file mode 100644
index 0000000..ac9db56
--- /dev/null
+++ b/contrib/binutils/include/elf/h8.h
@@ -0,0 +1,96 @@
+/* H8300/h8500 ELF support for BFD.
+ Copyright 2001 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_H8_H
+#define _ELF_H8_H
+
+#include "elf/reloc-macros.h"
+
+/* Relocations. */
+/* Relocations 59..63 are GNU extensions. */
+START_RELOC_NUMBERS (elf_h8_reloc_type)
+ RELOC_NUMBER (R_H8_NONE, 0)
+ RELOC_NUMBER (R_H8_DIR32, 1)
+ RELOC_NUMBER (R_H8_DIR32_28, 2)
+ RELOC_NUMBER (R_H8_DIR32_24, 3)
+ RELOC_NUMBER (R_H8_DIR32_16, 4)
+ RELOC_NUMBER (R_H8_DIR32U, 6)
+ RELOC_NUMBER (R_H8_DIR32U_28, 7)
+ RELOC_NUMBER (R_H8_DIR32U_24, 8)
+ RELOC_NUMBER (R_H8_DIR32U_20, 9)
+ RELOC_NUMBER (R_H8_DIR32U_16, 10)
+ RELOC_NUMBER (R_H8_DIR24, 11)
+ RELOC_NUMBER (R_H8_DIR24_20, 12)
+ RELOC_NUMBER (R_H8_DIR24_16, 13)
+ RELOC_NUMBER (R_H8_DIR24U, 14)
+ RELOC_NUMBER (R_H8_DIR24U_20, 15)
+ RELOC_NUMBER (R_H8_DIR24U_16, 16)
+ RELOC_NUMBER (R_H8_DIR16, 17)
+ RELOC_NUMBER (R_H8_DIR16U, 18)
+ RELOC_NUMBER (R_H8_DIR16S_32, 19)
+ RELOC_NUMBER (R_H8_DIR16S_28, 20)
+ RELOC_NUMBER (R_H8_DIR16S_24, 21)
+ RELOC_NUMBER (R_H8_DIR16S_20, 22)
+ RELOC_NUMBER (R_H8_DIR16S, 23)
+ RELOC_NUMBER (R_H8_DIR8, 24)
+ RELOC_NUMBER (R_H8_DIR8U, 25)
+ RELOC_NUMBER (R_H8_DIR8Z_32, 26)
+ RELOC_NUMBER (R_H8_DIR8Z_28, 27)
+ RELOC_NUMBER (R_H8_DIR8Z_24, 28)
+ RELOC_NUMBER (R_H8_DIR8Z_20, 29)
+ RELOC_NUMBER (R_H8_DIR8Z_16, 30)
+ RELOC_NUMBER (R_H8_PCREL16, 31)
+ RELOC_NUMBER (R_H8_PCREL8, 32)
+ RELOC_NUMBER (R_H8_BPOS, 33)
+ FAKE_RELOC (R_H8_FIRST_INVALID_DIR_RELOC, 34)
+ FAKE_RELOC (R_H8_LAST_INVALID_DIR_RELOC, 58)
+ RELOC_NUMBER (R_H8_DIR16A8, 59)
+ RELOC_NUMBER (R_H8_DIR16R8, 60)
+ RELOC_NUMBER (R_H8_DIR24A8, 61)
+ RELOC_NUMBER (R_H8_DIR24R8, 62)
+ RELOC_NUMBER (R_H8_DIR32A16, 63)
+ RELOC_NUMBER (R_H8_ABS32, 65)
+ RELOC_NUMBER (R_H8_ABS32A16, 127)
+ RELOC_NUMBER (R_H8_SYM, 128)
+ RELOC_NUMBER (R_H8_OPneg, 129)
+ RELOC_NUMBER (R_H8_OPadd, 130)
+ RELOC_NUMBER (R_H8_OPsub, 131)
+ RELOC_NUMBER (R_H8_OPmul, 132)
+ RELOC_NUMBER (R_H8_OPdiv, 133)
+ RELOC_NUMBER (R_H8_OPshla, 134)
+ RELOC_NUMBER (R_H8_OPshra, 135)
+ RELOC_NUMBER (R_H8_OPsctsize, 136)
+ RELOC_NUMBER (R_H8_OPhword, 137)
+ RELOC_NUMBER (R_H8_OPlword, 138)
+ RELOC_NUMBER (R_H8_OPhigh, 139)
+ RELOC_NUMBER (R_H8_OPlow, 140)
+ RELOC_NUMBER (R_H8_OPscttop, 141)
+END_RELOC_NUMBERS (R_H8_max)
+
+/* 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_H8_MACH 0x00FF0000
+
+#define E_H8_MACH_H8300 0x00800000
+#define E_H8_MACH_H8300H 0x00810000
+#define E_H8_MACH_H8300S 0x00820000
+
+#endif
diff --git a/contrib/binutils/include/elf/ia64.h b/contrib/binutils/include/elf/ia64.h
index edfc7c5..5e632ed 100644
--- a/contrib/binutils/include/elf/ia64.h
+++ b/contrib/binutils/include/elf/ia64.h
@@ -49,6 +49,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define ELF_STRING_ia64_unwind_info ".IA_64.unwind_info"
#define ELF_STRING_ia64_unwind_once ".gnu.linkonce.ia64unw."
#define ELF_STRING_ia64_unwind_info_once ".gnu.linkonce.ia64unwi."
+/* .IA_64.unwind_hdr is only used by HP-UX. */
+#define ELF_STRING_ia64_unwind_hdr ".IA_64.unwind_hdr"
/* Bits in the sh_flags field of Elf64_Shdr: */
@@ -60,6 +62,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define SHT_IA_64_EXT (SHT_LOPROC + 0) /* extension bits */
#define SHT_IA_64_UNWIND (SHT_LOPROC + 1) /* unwind bits */
+/* SHT_IA_64_HP_OPT_ANOT is only generated by HPUX compilers for its
+ optimization annotation section. GCC does not generate it but we
+ want readelf to know what they are. Do not use two capital Ns in
+ annotate or sed will turn it into 32 or 64 during the build. */
+#define SHT_IA_64_HP_OPT_ANOT 0x60000004
+
/* Bits in the p_flags field of Elf64_Phdr: */
#define PF_IA_64_NORECOV 0x80000000
@@ -69,10 +77,24 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define PT_IA_64_ARCHEXT (PT_LOPROC + 0) /* arch extension bits */
#define PT_IA_64_UNWIND (PT_LOPROC + 1) /* ia64 unwind bits */
+/* HP-UX specific values for p_type in Elf64_Phdr.
+ These values are currently just used to make
+ readelf more usable on HP-UX. */
+
+#define PT_IA_64_HP_OPT_ANOT (PT_LOOS + 0x12)
+#define PT_IA_64_HP_HSL_ANOT (PT_LOOS + 0x13)
+#define PT_IA_64_HP_STACK (PT_LOOS + 0x14)
+
/* Possible values for d_tag in Elf64_Dyn: */
#define DT_IA_64_PLT_RESERVE (DT_LOPROC + 0)
+/* This section only used by HP-UX, The HP linker gives weak symbols
+ precedence over regular common symbols. We want common to override
+ weak. Using this common instead of SHN_COMMON does that. */
+
+#define SHN_IA_64_ANSI_COMMON 0xFF00
+
/* ia64-specific relocation types: */
/* Relocs apply to specific instructions within a bundle. The least
diff --git a/contrib/binutils/include/elf/internal.h b/contrib/binutils/include/elf/internal.h
index eb79917..5d39d3a 100644
--- a/contrib/binutils/include/elf/internal.h
+++ b/contrib/binutils/include/elf/internal.h
@@ -1,5 +1,5 @@
/* ELF support for BFD.
- Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1998, 2000
+ Copyright 1991, 1992, 1993, 1994, 1995, 1997, 1998, 2000, 2001
Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support, from information published
@@ -42,20 +42,20 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define EI_NIDENT 16 /* Size of e_ident[] */
typedef struct elf_internal_ehdr {
- unsigned char e_ident[EI_NIDENT]; /* ELF "magic number" */
- bfd_vma e_entry; /* Entry point virtual address */
- bfd_size_type e_phoff; /* Program header table file offset */
- bfd_size_type e_shoff; /* Section header table file offset */
- unsigned long e_version; /* Identifies object file version */
- unsigned long e_flags; /* Processor-specific flags */
- unsigned short e_type; /* Identifies object file type */
- unsigned short e_machine; /* Specifies required architecture */
- unsigned short e_ehsize; /* ELF header size in bytes */
- unsigned short e_phentsize; /* Program header table entry size */
- unsigned short e_phnum; /* Program header table entry count */
- unsigned short e_shentsize; /* Section header table entry size */
- unsigned short e_shnum; /* Section header table entry count */
- unsigned short e_shstrndx; /* Section header string table index */
+ unsigned char e_ident[EI_NIDENT]; /* ELF "magic number" */
+ bfd_vma e_entry; /* Entry point virtual address */
+ bfd_size_type e_phoff; /* Program header table file offset */
+ bfd_size_type e_shoff; /* Section header table file offset */
+ unsigned long e_version; /* Identifies object file version */
+ unsigned long e_flags; /* Processor-specific flags */
+ unsigned short e_type; /* Identifies object file type */
+ unsigned short e_machine; /* Specifies required architecture */
+ unsigned int e_ehsize; /* ELF header size in bytes */
+ unsigned int e_phentsize; /* Program header table entry size */
+ unsigned int e_phnum; /* Program header table entry count */
+ unsigned int e_shentsize; /* Section header table entry size */
+ unsigned int e_shnum; /* Section header table entry count */
+ unsigned int e_shstrndx; /* Section header string table index */
} Elf_Internal_Ehdr;
#define elf32_internal_ehdr elf_internal_ehdr
@@ -98,7 +98,7 @@ typedef struct elf_internal_shdr {
/* The internal rep also has some cached info associated with it. */
asection * bfd_section; /* Associated BFD section. */
- PTR contents; /* Section contents. */
+ unsigned char *contents; /* Section contents. */
} Elf_Internal_Shdr;
#define elf32_internal_shdr elf_internal_shdr
@@ -114,7 +114,7 @@ struct elf_internal_sym {
unsigned long st_name; /* Symbol name, index in string tbl */
unsigned char st_info; /* Type and binding attributes */
unsigned char st_other; /* Visibilty, and target specific */
- unsigned short st_shndx; /* Associated section index */
+ unsigned int st_shndx; /* Associated section index */
};
typedef struct elf_internal_sym Elf_Internal_Sym;
@@ -153,7 +153,7 @@ typedef struct elf_internal_rel {
typedef struct elf_internal_rela {
bfd_vma r_offset; /* Location at which to apply the action */
bfd_vma r_info; /* Index and Type of relocation */
- bfd_signed_vma r_addend; /* Constant addend used to compute value */
+ bfd_vma r_addend; /* Constant addend used to compute value */
} Elf_Internal_Rela;
#define elf32_internal_rela elf_internal_rela
diff --git a/contrib/binutils/include/elf/mips.h b/contrib/binutils/include/elf/mips.h
index 6ad8d5b..3b6fe99 100644
--- a/contrib/binutils/include/elf/mips.h
+++ b/contrib/binutils/include/elf/mips.h
@@ -172,12 +172,10 @@ END_RELOC_NUMBERS (R_MIPS_maxext)
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
-#define E_MIPS_MACH_MIPS32_4K 0x00890000
#define E_MIPS_MACH_SB1 0x008a0000
/* Processor specific section indices. These sections do not actually
diff --git a/contrib/binutils/include/elf/mmix.h b/contrib/binutils/include/elf/mmix.h
new file mode 100644
index 0000000..fa367e5
--- /dev/null
+++ b/contrib/binutils/include/elf/mmix.h
@@ -0,0 +1,151 @@
+/* MMIX support for BFD.
+ Copyright (C) 2001 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. */
+
+/* This file holds definitions specific to the MMIX ELF ABI. */
+#ifndef ELF_MMIX_H
+#define ELF_MMIX_H
+
+#include "elf/reloc-macros.h"
+
+/* Relocations. */
+START_RELOC_NUMBERS (elf_mmix_reloc_type)
+ RELOC_NUMBER (R_MMIX_NONE, 0)
+
+ /* Standard absolute relocations. */
+ RELOC_NUMBER (R_MMIX_8, 1)
+ RELOC_NUMBER (R_MMIX_16, 2)
+ RELOC_NUMBER (R_MMIX_24, 3)
+ RELOC_NUMBER (R_MMIX_32, 4)
+ RELOC_NUMBER (R_MMIX_64, 5)
+
+ /* Standard relative relocations. */
+ RELOC_NUMBER (R_MMIX_PC_8, 6)
+ RELOC_NUMBER (R_MMIX_PC_16, 7)
+ RELOC_NUMBER (R_MMIX_PC_24, 8)
+ RELOC_NUMBER (R_MMIX_PC_32, 9)
+ RELOC_NUMBER (R_MMIX_PC_64, 10)
+
+ /* GNU extensions for C++ vtables. */
+ RELOC_NUMBER (R_MMIX_GNU_VTINHERIT, 11)
+ RELOC_NUMBER (R_MMIX_GNU_VTENTRY, 12)
+
+ /* A GETA instruction. */
+ RELOC_NUMBER (R_MMIX_GETA, 13)
+ RELOC_NUMBER (R_MMIX_GETA_1, 14)
+ RELOC_NUMBER (R_MMIX_GETA_2, 15)
+ RELOC_NUMBER (R_MMIX_GETA_3, 16)
+
+ /* A conditional branch instruction. */
+ RELOC_NUMBER (R_MMIX_CBRANCH, 17)
+ RELOC_NUMBER (R_MMIX_CBRANCH_J, 18)
+ RELOC_NUMBER (R_MMIX_CBRANCH_1, 19)
+ RELOC_NUMBER (R_MMIX_CBRANCH_2, 20)
+ RELOC_NUMBER (R_MMIX_CBRANCH_3, 21)
+
+ /* A PUSHJ instruction. */
+ RELOC_NUMBER (R_MMIX_PUSHJ, 22)
+ RELOC_NUMBER (R_MMIX_PUSHJ_1, 23)
+ RELOC_NUMBER (R_MMIX_PUSHJ_2, 24)
+ RELOC_NUMBER (R_MMIX_PUSHJ_3, 25)
+
+ /* A JMP instruction. */
+ RELOC_NUMBER (R_MMIX_JMP, 26)
+ RELOC_NUMBER (R_MMIX_JMP_1, 27)
+ RELOC_NUMBER (R_MMIX_JMP_2, 28)
+ RELOC_NUMBER (R_MMIX_JMP_3, 29)
+
+ /* A relative address such as in a GETA or a branch. */
+ RELOC_NUMBER (R_MMIX_ADDR19, 30)
+
+ /* A relative address such as in a JMP (only). */
+ RELOC_NUMBER (R_MMIX_ADDR27, 31)
+
+ /* A general register or a number 0..255. */
+ RELOC_NUMBER (R_MMIX_REG_OR_BYTE, 32)
+
+ /* A general register. */
+ RELOC_NUMBER (R_MMIX_REG, 33)
+
+ /* A global register and an offset, equivalent of the expression. */
+ RELOC_NUMBER (R_MMIX_BASE_PLUS_OFFSET, 34)
+
+ /* A LOCAL assertion. */
+ RELOC_NUMBER (R_MMIX_LOCAL, 35)
+END_RELOC_NUMBERS (R_MMIX_max)
+
+
+/* Section Attributes. */
+/* A section containing necessary information for relaxation. */
+#define SHF_MMIX_CANRELAX 0x80000000
+
+/* Symbol attributes. */
+/* A symbol with this section-index is a register. */
+#define SHN_REGISTER SHN_LOPROC
+
+/* This section holds contents for each initialized register, at VMA
+ regno*8. A symbol relative to this section will be transformed to an
+ absolute symbol with the value corresponding to the register number at
+ final link time. A symbol with a value outside the inclusive range
+ 32*8 .. 254*8 is an error. It is highly recommended to only use an
+ upper bound of 253*8 or lower as specified in the (currently
+ unspecified) ABI. */
+#define MMIX_REG_CONTENTS_SECTION_NAME ".MMIX.reg_contents"
+
+/* This is a faked section holding symbols with SHN_REGISTER. Don't
+ confuse it with MMIX_REG_CONTENTS_SECTION_NAME; this one has no
+ contents, just values. It is an error for a value in this section to
+ be outside the range 32..255 and it must never become an actual section
+ in an object file. */
+#define MMIX_REG_SECTION_NAME "*REG*"
+
+/* Appended with a number N=0..65535, this is a representation of the
+ mmixal "BSPEC N" ... "ESPEC" directive pair; the contents go into an
+ ELF section by name ".MMIX.spec_data.N". */
+#define MMIX_OTHER_SPEC_SECTION_PREFIX ".MMIX.spec_data."
+
+/* A section SECNAME is noted to start at "__.MMIX.start.SECNAME" by the
+ presence of this symbol. Currently only implemented for ".text"
+ through the symbol "__.MMIX.start..text". */
+#define MMIX_LOC_SECTION_START_SYMBOL_PREFIX "__.MMIX.start."
+
+/* This symbol is always a function. */
+#define MMIX_START_SYMBOL_NAME "Main"
+
+
+/* We smuggle in a few MMO specifics here. We don't make a specific MMO
+ file, since we can't reasonably support MMO without ELF; we have to
+ include this file anyway. */
+
+#define MMO_TEXT_SECTION_NAME ".text"
+#define MMO_DATA_SECTION_NAME ".data"
+
+/* A definition for the flags we put in spec data in files. A copy of our
+ own of some flags to keep immune to BFD flag changes. See section.c of
+ 2001-07-18 for flag documentation. */
+#define MMO_SEC_ALLOC 0x001
+#define MMO_SEC_LOAD 0x002
+#define MMO_SEC_RELOC 0x004
+#define MMO_SEC_READONLY 0x010
+#define MMO_SEC_CODE 0x020
+#define MMO_SEC_DATA 0x040
+#define MMO_SEC_NEVER_LOAD 0x400
+#define MMO_SEC_IS_COMMON 0x8000
+#define MMO_SEC_DEBUGGING 0x10000
+
+#endif /* ELF_MMIX_H */
diff --git a/contrib/binutils/include/elf/openrisc.h b/contrib/binutils/include/elf/openrisc.h
new file mode 100644
index 0000000..c609906
--- /dev/null
+++ b/contrib/binutils/include/elf/openrisc.h
@@ -0,0 +1,39 @@
+/* OpenRISC ELF support for BFD.
+ Copyright 2001 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_OPENRISC_H
+#define _ELF_OPENRISC_H
+
+#include "elf/reloc-macros.h"
+
+/* Relocations. */
+START_RELOC_NUMBERS (elf_openrisc_reloc_type)
+ RELOC_NUMBER (R_OPENRISC_NONE, 0)
+ RELOC_NUMBER (R_OPENRISC_INSN_REL_26, 1)
+ RELOC_NUMBER (R_OPENRISC_INSN_ABS_26, 2)
+ RELOC_NUMBER (R_OPENRISC_LO_16_IN_INSN, 3)
+ RELOC_NUMBER (R_OPENRISC_HI_16_IN_INSN, 4)
+ RELOC_NUMBER (R_OPENRISC_8, 5)
+ RELOC_NUMBER (R_OPENRISC_16, 6)
+ RELOC_NUMBER (R_OPENRISC_32, 7)
+ RELOC_NUMBER (R_OPENRISC_GNU_VTINHERIT, 8)
+ RELOC_NUMBER (R_OPENRISC_GNU_VTENTRY, 9)
+END_RELOC_NUMBERS (R_OPENRISC_max)
+
+#endif /* _ELF_OPENRISC_H */
diff --git a/contrib/binutils/include/elf/ppc.h b/contrib/binutils/include/elf/ppc.h
index 426961e..8e4af62f 100644
--- a/contrib/binutils/include/elf/ppc.h
+++ b/contrib/binutils/include/elf/ppc.h
@@ -1,5 +1,5 @@
/* PPC ELF support for BFD.
- Copyright 1995, 1996, 1998, 2000 Free Software Foundation, Inc.
+ Copyright 1995, 1996, 1998, 2000, 2001 Free Software Foundation, Inc.
By Michael Meissner, Cygnus Support, <meissner@cygnus.com>, from information
in the System V Application Binary Interface, PowerPC Processor Supplement
@@ -68,6 +68,40 @@ START_RELOC_NUMBERS (elf_ppc_reloc_type)
RELOC_NUMBER (R_PPC_SECTOFF_LO, 34)
RELOC_NUMBER (R_PPC_SECTOFF_HI, 35)
RELOC_NUMBER (R_PPC_SECTOFF_HA, 36)
+ RELOC_NUMBER (R_PPC_ADDR30, 37)
+
+/* The following relocs are from the 64-bit PowerPC ELF ABI. */
+ RELOC_NUMBER (R_PPC64_ADDR64, 38)
+ RELOC_NUMBER (R_PPC64_ADDR16_HIGHER, 39)
+ RELOC_NUMBER (R_PPC64_ADDR16_HIGHERA, 40)
+ RELOC_NUMBER (R_PPC64_ADDR16_HIGHEST, 41)
+ RELOC_NUMBER (R_PPC64_ADDR16_HIGHESTA, 42)
+ RELOC_NUMBER (R_PPC64_UADDR64, 43)
+ RELOC_NUMBER (R_PPC64_REL64, 44)
+ RELOC_NUMBER (R_PPC64_PLT64, 45)
+ RELOC_NUMBER (R_PPC64_PLTREL64, 46)
+ RELOC_NUMBER (R_PPC64_TOC16, 47)
+ RELOC_NUMBER (R_PPC64_TOC16_LO, 48)
+ RELOC_NUMBER (R_PPC64_TOC16_HI, 49)
+ RELOC_NUMBER (R_PPC64_TOC16_HA, 50)
+ RELOC_NUMBER (R_PPC64_TOC, 51)
+ RELOC_NUMBER (R_PPC64_PLTGOT16, 52)
+ RELOC_NUMBER (R_PPC64_PLTGOT16_LO, 53)
+ RELOC_NUMBER (R_PPC64_PLTGOT16_HI, 54)
+ RELOC_NUMBER (R_PPC64_PLTGOT16_HA, 55)
+
+/* The following relocs were added in the 64-bit PowerPC ELF ABI revision 1.2. */
+ RELOC_NUMBER (R_PPC64_ADDR16_DS, 56)
+ RELOC_NUMBER (R_PPC64_ADDR16_LO_DS, 57)
+ RELOC_NUMBER (R_PPC64_GOT16_DS, 58)
+ RELOC_NUMBER (R_PPC64_GOT16_LO_DS, 59)
+ RELOC_NUMBER (R_PPC64_PLT16_LO_DS, 60)
+ RELOC_NUMBER (R_PPC64_SECTOFF_DS, 61)
+ RELOC_NUMBER (R_PPC64_SECTOFF_LO_DS, 62)
+ RELOC_NUMBER (R_PPC64_TOC16_DS, 63)
+ RELOC_NUMBER (R_PPC64_TOC16_LO_DS, 64)
+ RELOC_NUMBER (R_PPC64_PLTGOT16_DS, 65)
+ RELOC_NUMBER (R_PPC64_PLTGOT16_LO_DS, 66)
/* The remaining relocs are from the Embedded ELF ABI, and are not
in the SVR4 ELF ABI. */
@@ -98,6 +132,47 @@ START_RELOC_NUMBERS (elf_ppc_reloc_type)
END_RELOC_NUMBERS (R_PPC_max)
+/* Aliases for R_PPC64-relocs. */
+#define R_PPC64_NONE R_PPC_NONE
+#define R_PPC64_ADDR32 R_PPC_ADDR32
+#define R_PPC64_ADDR24 R_PPC_ADDR24
+#define R_PPC64_ADDR16 R_PPC_ADDR16
+#define R_PPC64_ADDR16_LO R_PPC_ADDR16_LO
+#define R_PPC64_ADDR16_HI R_PPC_ADDR16_HI
+#define R_PPC64_ADDR16_HA R_PPC_ADDR16_HA
+#define R_PPC64_ADDR14 R_PPC_ADDR14
+#define R_PPC64_ADDR14_BRTAKEN R_PPC_ADDR14_BRTAKEN
+#define R_PPC64_ADDR14_BRNTAKEN R_PPC_ADDR14_BRNTAKEN
+#define R_PPC64_REL24 R_PPC_REL24
+#define R_PPC64_REL14 R_PPC_REL14
+#define R_PPC64_REL14_BRTAKEN R_PPC_REL14_BRTAKEN
+#define R_PPC64_REL14_BRNTAKEN R_PPC_REL14_BRNTAKEN
+#define R_PPC64_GOT16 R_PPC_GOT16
+#define R_PPC64_GOT16_LO R_PPC_GOT16_LO
+#define R_PPC64_GOT16_HI R_PPC_GOT16_HI
+#define R_PPC64_GOT16_HA R_PPC_GOT16_HA
+#define R_PPC64_COPY R_PPC_COPY
+#define R_PPC64_GLOB_DAT R_PPC_GLOB_DAT
+#define R_PPC64_JMP_SLOT R_PPC_JMP_SLOT
+#define R_PPC64_RELATIVE R_PPC_RELATIVE
+#define R_PPC64_UADDR32 R_PPC_UADDR32
+#define R_PPC64_UADDR16 R_PPC_UADDR16
+#define R_PPC64_REL32 R_PPC_REL32
+#define R_PPC64_PLT32 R_PPC_PLT32
+#define R_PPC64_PLTREL32 R_PPC_PLTREL32
+#define R_PPC64_PLT16_LO R_PPC_PLT16_LO
+#define R_PPC64_PLT16_HI R_PPC_PLT16_HI
+#define R_PPC64_PLT16_HA R_PPC_PLT16_HA
+#define R_PPC64_SECTOFF R_PPC_SECTOFF
+#define R_PPC64_SECTOFF_LO R_PPC_SECTOFF_LO
+#define R_PPC64_SECTOFF_HI R_PPC_SECTOFF_HI
+#define R_PPC64_SECTOFF_HA R_PPC_SECTOFF_HA
+#define R_PPC64_ADDR30 R_PPC_ADDR30
+#define R_PPC64_GNU_VTINHERIT R_PPC_GNU_VTINHERIT
+#define R_PPC64_GNU_VTENTRY R_PPC_GNU_VTENTRY
+
+/* Specify the start of the .glink section. */
+#define DT_PPC64_GLINK DT_LOPROC
/* Processor specific flags for the ELF header e_flags field. */
diff --git a/contrib/binutils/include/elf/s390.h b/contrib/binutils/include/elf/s390.h
new file mode 100644
index 0000000..8b67c96
--- /dev/null
+++ b/contrib/binutils/include/elf/s390.h
@@ -0,0 +1,73 @@
+/* 390 ELF support for BFD.
+ Copyright 2000, 2001 Free Software Foundation, Inc.
+ Contributed by Carl B. Pedersen and Martin Schwidefsky.
+
+ 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_390_H
+#define _ELF_390_H
+
+/* Processor specific flags for the ELF header e_flags field. */
+
+/* Symbol types. */
+
+#define STACK_REG 15 /* Global Stack reg */
+#define BACKL_REG 14 /* Global Backlink reg */
+#define BASE_REG 13 /* Global Base reg */
+#define GOT_REG 12 /* Holds addr of GOT */
+
+#include "elf/reloc-macros.h"
+
+/* Relocation types. */
+
+START_RELOC_NUMBERS (elf_s390_reloc_type)
+ RELOC_NUMBER (R_390_NONE, 0) /* No reloc. */
+ RELOC_NUMBER (R_390_8, 1) /* Direct 8 bit. */
+ RELOC_NUMBER (R_390_12, 2) /* Direct 12 bit. */
+ RELOC_NUMBER (R_390_16, 3) /* Direct 16 bit. */
+ RELOC_NUMBER (R_390_32, 4) /* Direct 32 bit. */
+ RELOC_NUMBER (R_390_PC32, 5) /* PC relative 32 bit. */
+ RELOC_NUMBER (R_390_GOT12, 6) /* 12 bit GOT offset. */
+ RELOC_NUMBER (R_390_GOT32, 7) /* 32 bit GOT offset. */
+ RELOC_NUMBER (R_390_PLT32, 8) /* 32 bit PC relative PLT address. */
+ RELOC_NUMBER (R_390_COPY, 9) /* Copy symbol at runtime. */
+ RELOC_NUMBER (R_390_GLOB_DAT, 10) /* Create GOT entry. */
+ RELOC_NUMBER (R_390_JMP_SLOT, 11) /* Create PLT entry. */
+ RELOC_NUMBER (R_390_RELATIVE, 12) /* Adjust by program base. */
+ RELOC_NUMBER (R_390_GOTOFF, 13) /* 32 bit offset to GOT. */
+ RELOC_NUMBER (R_390_GOTPC, 14) /* 32 bit PC relative offset to GOT. */
+ RELOC_NUMBER (R_390_GOT16, 15) /* 16 bit GOT offset. */
+ RELOC_NUMBER (R_390_PC16, 16) /* PC relative 16 bit. */
+ RELOC_NUMBER (R_390_PC16DBL, 17) /* PC relative 16 bit shifted by 1. */
+ RELOC_NUMBER (R_390_PLT16DBL, 18) /* 16 bit PC rel. PLT shifted by 1. */
+ RELOC_NUMBER (R_390_PC32DBL, 19) /* PC relative 32 bit shifted by 1. */
+ RELOC_NUMBER (R_390_PLT32DBL, 20) /* 32 bit PC rel. PLT shifted by 1. */
+ RELOC_NUMBER (R_390_GOTPCDBL, 21) /* 32 bit PC rel. GOT shifted by 1. */
+ RELOC_NUMBER (R_390_64, 22) /* Direct 64 bit. */
+ RELOC_NUMBER (R_390_PC64, 23) /* PC relative 64 bit. */
+ RELOC_NUMBER (R_390_GOT64, 24) /* 64 bit GOT offset. */
+ RELOC_NUMBER (R_390_PLT64, 25) /* 64 bit PC relative PLT address. */
+ RELOC_NUMBER (R_390_GOTENT, 26) /* 32 bit PC rel. to GOT entry >> 1. */
+ /* These are GNU extensions to enable C++ vtable garbage collection. */
+ RELOC_NUMBER (R_390_GNU_VTINHERIT, 250)
+ RELOC_NUMBER (R_390_GNU_VTENTRY, 251)
+END_RELOC_NUMBERS (R_390_max)
+
+#endif /* _ELF_390_H */
+
+
diff --git a/contrib/binutils/include/elf/x86-64.h b/contrib/binutils/include/elf/x86-64.h
index a4da0a3..74febc2 100644
--- a/contrib/binutils/include/elf/x86-64.h
+++ b/contrib/binutils/include/elf/x86-64.h
@@ -41,6 +41,8 @@ START_RELOC_NUMBERS (elf_x86_64_reloc_type)
RELOC_NUMBER (R_X86_64_PC16, 13) /* 16 bit sign extended pc relative*/
RELOC_NUMBER (R_X86_64_8, 14) /* Direct 8 bit sign extended */
RELOC_NUMBER (R_X86_64_PC8, 15) /* 8 bit sign extended pc relative*/
+ RELOC_NUMBER (R_X86_64_GNU_VTINHERIT, 250) /* GNU C++ hack */
+ RELOC_NUMBER (R_X86_64_GNU_VTENTRY, 251) /* GNU C++ hack */
END_RELOC_NUMBERS (R_X86_64_max)
#endif
diff --git a/contrib/binutils/include/elf/xstormy16.h b/contrib/binutils/include/elf/xstormy16.h
new file mode 100644
index 0000000..ee6c551
--- /dev/null
+++ b/contrib/binutils/include/elf/xstormy16.h
@@ -0,0 +1,53 @@
+/* XSTORMY16 ELF support for BFD.
+ Copyright (C) 2001 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_XSTORMY16_H
+#define _ELF_XSTORMY16_H
+
+#include "elf/reloc-macros.h"
+
+/* Relocations. */
+START_RELOC_NUMBERS (elf_xstormy16_reloc_type)
+ RELOC_NUMBER (R_XSTORMY16_NONE, 0)
+
+ RELOC_NUMBER (R_XSTORMY16_32, 1)
+ RELOC_NUMBER (R_XSTORMY16_16, 2)
+ RELOC_NUMBER (R_XSTORMY16_8, 3)
+ RELOC_NUMBER (R_XSTORMY16_PC32, 4)
+ RELOC_NUMBER (R_XSTORMY16_PC16, 5)
+ RELOC_NUMBER (R_XSTORMY16_PC8, 6)
+
+ RELOC_NUMBER (R_XSTORMY16_REL_12, 7)
+ RELOC_NUMBER (R_XSTORMY16_24, 8)
+ RELOC_NUMBER (R_XSTORMY16_FPTR16, 9)
+
+ RELOC_NUMBER (R_XSTORMY16_GNU_VTINHERIT, 128)
+ RELOC_NUMBER (R_XSTORMY16_GNU_VTENTRY, 129)
+END_RELOC_NUMBERS (R_XSTORMY16_max)
+
+/* Define the data & instruction memory discriminator. In a linked
+ executable, an symbol should be deemed to point to an instruction
+ if ((address & XSTORMY16_INSN_MASK) == XSTORMY16_INSN_VALUE), and similarly
+ for the data space. See also `ld/emulparams/elf32xstormy16.sh'. */
+#define XSTORMY16_DATA_MASK 0xffc00000
+#define XSTORMY16_DATA_VALUE 0x00000000
+#define XSTORMY16_INSN_MASK 0xffc00000
+#define XSTORMY16_INSN_VALUE 0x00400000
+
+#endif /* _ELF_XSTORMY16_H */
diff --git a/contrib/binutils/include/fibheap.h b/contrib/binutils/include/fibheap.h
new file mode 100644
index 0000000..d109e4a
--- /dev/null
+++ b/contrib/binutils/include/fibheap.h
@@ -0,0 +1,81 @@
+/* A Fibonacci heap datatype.
+ Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Contributed by Daniel Berlin (dan@cgsoftware.com).
+
+This file is part of GCC.
+
+GCC 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.
+
+GCC 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 GCC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* Fibonacci heaps are somewhat complex, but, there's an article in
+ DDJ that explains them pretty well:
+
+ http://www.ddj.com/articles/1997/9701/9701o/9701o.htm?topic=algoritms
+
+ Introduction to algorithms by Corman and Rivest also goes over them.
+
+ The original paper that introduced them is "Fibonacci heaps and their
+ uses in improved network optimization algorithms" by Tarjan and
+ Fredman (JACM 34(3), July 1987).
+
+ Amortized and real worst case time for operations:
+
+ ExtractMin: O(lg n) amortized. O(n) worst case.
+ DecreaseKey: O(1) amortized. O(lg n) worst case.
+ Insert: O(2) amortized. O(1) actual.
+ Union: O(1) amortized. O(1) actual. */
+
+#ifndef _FIBHEAP_H_
+#define _FIBHEAP_H_
+
+#include <ansidecl.h>
+
+typedef long fibheapkey_t;
+
+typedef struct fibheap
+{
+ size_t nodes;
+ struct fibnode *min;
+ struct fibnode *root;
+} *fibheap_t;
+
+typedef struct fibnode
+{
+ struct fibnode *parent;
+ struct fibnode *child;
+ struct fibnode *left;
+ struct fibnode *right;
+ fibheapkey_t key;
+ void *data;
+ unsigned int degree : 31;
+ unsigned int mark : 1;
+} *fibnode_t;
+
+extern fibheap_t fibheap_new PARAMS ((void));
+extern fibnode_t fibheap_insert PARAMS ((fibheap_t, fibheapkey_t, void *));
+extern int fibheap_empty PARAMS ((fibheap_t));
+extern fibheapkey_t fibheap_min_key PARAMS ((fibheap_t));
+extern fibheapkey_t fibheap_replace_key PARAMS ((fibheap_t, fibnode_t,
+ fibheapkey_t));
+extern void *fibheap_replace_key_data PARAMS ((fibheap_t, fibnode_t,
+ fibheapkey_t, void *));
+extern void *fibheap_extract_min PARAMS ((fibheap_t));
+extern void *fibheap_min PARAMS ((fibheap_t));
+extern void *fibheap_replace_data PARAMS ((fibheap_t, fibnode_t, void *));
+extern void *fibheap_delete_node PARAMS ((fibheap_t, fibnode_t));
+extern void fibheap_delete PARAMS ((fibheap_t));
+extern fibheap_t fibheap_union PARAMS ((fibheap_t, fibheap_t));
+
+#endif /* _FIBHEAP_H_ */
diff --git a/contrib/binutils/include/filenames.h b/contrib/binutils/include/filenames.h
index ba933c85..ca9e273 100644
--- a/contrib/binutils/include/filenames.h
+++ b/contrib/binutils/include/filenames.h
@@ -5,7 +5,7 @@
use forward- and back-slash in path names interchangeably, and
some of them have case-insensitive file names.
- Copyright 2000 Free Software Foundation, Inc.
+ Copyright 2000, 2001 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef FILENAMES_H
#define FILENAMES_H
-#if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__)
+#if defined(__MSDOS__) || defined(_WIN32) || defined(__OS2__) || defined (__CYGWIN__)
#ifndef HAVE_DOS_BASED_FILE_SYSTEM
#define HAVE_DOS_BASED_FILE_SYSTEM 1
diff --git a/contrib/binutils/include/floatformat.h b/contrib/binutils/include/floatformat.h
index 4335401..0cd09be 100644
--- a/contrib/binutils/include/floatformat.h
+++ b/contrib/binutils/include/floatformat.h
@@ -95,7 +95,15 @@ extern const struct floatformat floatformat_i387_ext;
extern const struct floatformat floatformat_m68881_ext;
extern const struct floatformat floatformat_i960_ext;
extern const struct floatformat floatformat_m88110_ext;
-extern const struct floatformat floatformat_arm_ext;
+extern const struct floatformat floatformat_m88110_harris_ext;
+extern const struct floatformat floatformat_arm_ext; /* deprecated. */
+extern const struct floatformat floatformat_arm_ext_big;
+extern const struct floatformat floatformat_arm_ext_littlebyte_bigword;
+/* IA-64 Floating Point register spilt into memory. */
+extern const struct floatformat floatformat_ia64_spill_big;
+extern const struct floatformat floatformat_ia64_spill_little;
+extern const struct floatformat floatformat_ia64_quad_big;
+extern const struct floatformat floatformat_ia64_quad_little;
/* Convert from FMT to a double.
FROM is the address of the extended float.
diff --git a/contrib/binutils/include/hashtab.h b/contrib/binutils/include/hashtab.h
index a577c5e..8871710 100644
--- a/contrib/binutils/include/hashtab.h
+++ b/contrib/binutils/include/hashtab.h
@@ -145,6 +145,9 @@ extern htab_hash htab_hash_pointer;
/* An equality function for pointers. */
extern htab_eq htab_eq_pointer;
+/* A hash function for null-terminated strings. */
+extern hashval_t htab_hash_string PARAMS ((const PTR));
+
#ifdef __cplusplus
}
#endif /* __cplusplus */
diff --git a/contrib/binutils/include/libiberty.h b/contrib/binutils/include/libiberty.h
index d31ac77..455643d 100644
--- a/contrib/binutils/include/libiberty.h
+++ b/contrib/binutils/include/libiberty.h
@@ -51,7 +51,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 *)) ATTRIBUTE_MALLOC;
+extern char **buildargv PARAMS ((const char *)) ATTRIBUTE_MALLOC;
/* Free a vector returned by buildargv. */
@@ -83,13 +83,55 @@ extern char *basename ();
/* A well-defined basename () that is always compiled in. */
-extern char *lbasename PARAMS ((const char *));
+extern const char *lbasename PARAMS ((const char *));
-/* Concatenate an arbitrary number of strings, up to (char *) NULL.
- Allocates memory using xmalloc. */
+/* Concatenate an arbitrary number of strings. You must pass NULL as
+ the last argument of this function, to terminate the list of
+ strings. Allocates memory using xmalloc. */
extern char *concat PARAMS ((const char *, ...)) ATTRIBUTE_MALLOC;
+/* Concatenate an arbitrary number of strings. You must pass NULL as
+ the last argument of this function, to terminate the list of
+ strings. Allocates memory using xmalloc. The first argument is
+ not one of the strings to be concatenated, but if not NULL is a
+ pointer to be freed after the new string is created, similar to the
+ way xrealloc works. */
+
+extern char *reconcat PARAMS ((char *, const char *, ...)) ATTRIBUTE_MALLOC;
+
+/* Determine the length of concatenating an arbitrary number of
+ strings. You must pass NULL as the last argument of this function,
+ to terminate the list of strings. */
+
+extern unsigned long concat_length PARAMS ((const char *, ...));
+
+/* Concatenate an arbitrary number of strings into a SUPPLIED area of
+ memory. You must pass NULL as the last argument of this function,
+ to terminate the list of strings. The supplied memory is assumed
+ to be large enough. */
+
+extern char *concat_copy PARAMS ((char *, const char *, ...));
+
+/* Concatenate an arbitrary number of strings into a GLOBAL area of
+ memory. You must pass NULL as the last argument of this function,
+ to terminate the list of strings. The supplied memory is assumed
+ to be large enough. */
+
+extern char *concat_copy2 PARAMS ((const char *, ...));
+
+/* This is the global area used by concat_copy2. */
+
+extern char *libiberty_concat_ptr;
+
+/* Concatenate an arbitrary number of strings. You must pass NULL as
+ the last argument of this function, to terminate the list of
+ strings. Allocates memory using alloca. The arguments are
+ evaluated twice! */
+#define ACONCAT(ACONCAT_PARAMS) \
+ (libiberty_concat_ptr = alloca (concat_length ACONCAT_PARAMS + 1), \
+ concat_copy2 ACONCAT_PARAMS)
+
/* Check whether two file descriptors refer to the same file. */
extern int fdmatch PARAMS ((int fd1, int fd2));
@@ -198,7 +240,7 @@ extern PTR xmemdup PARAMS ((const PTR, size_t, size_t)) ATTRIBUTE_MALLOC;
#define _hex_array_size 256
#define _hex_bad 99
-extern char _hex_value[_hex_array_size];
+extern const char _hex_value[_hex_array_size];
extern void hex_init PARAMS ((void));
#define hex_p(c) (hex_value (c) != _hex_bad)
/* If you change this, note well: Some code relies on side effects in
@@ -235,6 +277,38 @@ extern int vasprintf PARAMS ((char **, const char *, va_list))
#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0]))
+/* Drastically simplified alloca configurator. If we're using GCC,
+ we use __builtin_alloca; otherwise we use the C alloca. The C
+ alloca is always available. You can override GCC by defining
+ USE_C_ALLOCA yourself. The canonical autoconf macro C_ALLOCA is
+ also set/unset as it is often used to indicate whether code needs
+ to call alloca(0). */
+extern PTR C_alloca PARAMS((size_t));
+#undef alloca
+#if GCC_VERSION >= 2000 && !defined USE_C_ALLOCA
+# define alloca(x) __builtin_alloca(x)
+# undef C_ALLOCA
+# define ASTRDUP(X) \
+ (__extension__ ({ const char *const libiberty_optr = (X); \
+ const unsigned long libiberty_len = strlen (libiberty_optr) + 1; \
+ char *const libiberty_nptr = alloca (libiberty_len); \
+ (char *) memcpy (libiberty_nptr, libiberty_optr, libiberty_len); }))
+#else
+# define alloca(x) C_alloca(x)
+# undef USE_C_ALLOCA
+# define USE_C_ALLOCA 1
+# undef C_ALLOCA
+# define C_ALLOCA 1
+extern const char *libiberty_optr;
+extern char *libiberty_nptr;
+extern unsigned long libiberty_len;
+# define ASTRDUP(X) \
+ (libiberty_optr = (X), \
+ libiberty_len = strlen (libiberty_optr) + 1, \
+ libiberty_nptr = alloca (libiberty_len), \
+ (char *) memcpy (libiberty_nptr, libiberty_optr, libiberty_len))
+#endif
+
#ifdef __cplusplus
}
#endif
diff --git a/contrib/binutils/include/objalloc.h b/contrib/binutils/include/objalloc.h
index 0b451cd..c710647 100644
--- a/contrib/binutils/include/objalloc.h
+++ b/contrib/binutils/include/objalloc.h
@@ -1,5 +1,5 @@
/* objalloc.h -- routines to allocate memory for objects
- Copyright 1997 Free Software Foundation, Inc.
+ Copyright 1997, 2001 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Solutions.
This program is free software; you can redistribute it and/or modify it
@@ -56,12 +56,11 @@ struct objalloc_align { char x; double d; };
#ifndef offsetof
#include <stddef.h>
#endif
-#define OBJALLOC_ALIGN \
- ((ptrdiff_t) ((char *) &((struct objalloc_align *) 0)->d - (char *) 0))
-#else
-#define OBJALLOC_ALIGN \
- ((long) ((char *) &((struct objalloc_align *) 0)->d - (char *) 0))
#endif
+#ifndef offsetof
+#define offsetof(TYPE, MEMBER) ((unsigned long) &((TYPE *)0)->MEMBER)
+#endif
+#define OBJALLOC_ALIGN offsetof (struct objalloc_align, d)
/* Create an objalloc structure. Returns NULL if malloc fails. */
diff --git a/contrib/binutils/include/opcode/ChangeLog b/contrib/binutils/include/opcode/ChangeLog
index 9e40d0c..dcde56b 100644
--- a/contrib/binutils/include/opcode/ChangeLog
+++ b/contrib/binutils/include/opcode/ChangeLog
@@ -1,26 +1,152 @@
-2001-06-11 Alan Modra <amodra@bigpond.net.au>
+2002-01-22 Graydon Hoare <graydon@redhat.com>
- Merge from mainline.
- 2001-05-23 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
- * mips.h (CPU_R12000): Define.
+ * cgen.h (CGEN_MAYBE_MULTI_IFLD): New structure.
+ (CGEN_OPERAND): Add CGEN_MAYBE_MULTI_IFLD field.
- 2001-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
- * mips.h (INSN_ISA_MASK): Define.
+2002-01-21 Thomas Klausner <wiz@danbala.ifoer.tuwien.ac.at>
- 2001-03-21 Kazu Hirata <kazu@hxi.com>
- * h8300.h: Fix formatting.
+ * h8300.h: Comment typo fix.
- 2001-02-28 Igor Shevlyakov <igor@windriver.com>
- * m68k.h: new defines for Coldfire V4. Update mcf to know
- about mcf5407.
+2002-01-03 matthew green <mrg@redhat.com>
- 2001-02-10 Nick Clifton <nickc@redhat.com>
- * mips.h: Remove extraneous whitespace. Formating change to allow
- for future contribution.
+ * ppc.h (PPC_OPCODE_BOOKE): BookE is not Motorola specific.
+ (PPC_OPCODE_BOOKE64): Likewise.
+
+Mon Dec 31 16:45:41 2001 Jeffrey A Law (law@cygnus.com)
+
+ * hppa.h (call, ret): Move to end of table.
+ (addb, addib): PA2.0 variants should have been PA2.0W.
+ (ldw, ldh, ldb, stw, sth, stb, stwa): Reorder to keep disassembler
+ happy.
+ (fldw, fldd, fstw, fstd, bb): Likewise.
+ (short loads/stores): Tweak format specifier slightly to keep
+ disassembler happy.
+ (indexed loads/stores): Likewise.
+ (absolute loads/stores): Likewise.
+
+2001-12-04 Alexandre Oliva <aoliva@redhat.com>
+
+ * d10v.h (OPERAND_NOSP): New macro.
+
+2001-11-29 Alexandre Oliva <aoliva@redhat.com>
+
+ * d10v.h (OPERAND_SP): New macro.
+
+2001-11-15 Alan Modra <amodra@bigpond.net.au>
+
+ * ppc.h (struct powerpc_operand <insert, extract>): Add dialect param.
+
+2001-11-11 Timothy Wall <twall@alum.mit.edu>
+
+ * tic54x.h: Revise opcode layout; don't really need a separate
+ structure for parallel opcodes.
+
+2001-11-13 Zack Weinberg <zack@codesourcery.com>
+ Alan Modra <amodra@bigpond.net.au>
+
+ * i386.h (i386_optab): Add entries for "sldr", "smsw" and "str" to
+ accept WordReg.
+
+2001-11-04 Chris Demetriou <cgd@broadcom.com>
+
+ * mips.h (OPCODE_IS_MEMBER): Remove extra space.
+
+2001-10-30 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * mmix.h: New file.
+
+2001-10-18 Chris Demetriou <cgd@broadcom.com>
+
+ * mips.h (OPCODE_IS_MEMBER): Add a no-op term to the end
+ of the expression, to make source code merging easier.
+
+2001-10-17 Chris Demetriou <cgd@broadcom.com>
+
+ * mips.h: Sort coprocessor instruction argument characters
+ in comment, add a few more words of description for "H".
+
+2001-10-17 Chris Demetriou <cgd@broadcom.com>
+
+ * mips.h (INSN_SB1): New cpu-specific instruction bit.
+ (OPCODE_IS_MEMBER): Allow instructions matching INSN_SB1
+ if cpu is CPU_SB1.
+
+2001-10-17 matthew green <mrg@redhat.com>
+
+ * ppc.h (PPC_OPCODE_BOOKE64): Fix typo.
+
+2001-10-12 matthew green <mrg@redhat.com>
+
+ * ppc.h (PPC_OPCODE_BOOKE, PPC_OPCODE_BOOKE64, PPC_OPCODE_403): New
+ opcode flags for BookE 32-bit, BookE 64-bit and PowerPC 403
+ instructions, respectively.
+
+2001-09-27 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * v850.h: Remove spurious comment.
+
+2001-09-21 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * h8300.h: Fix compile time warning messages
+
+2001-09-04 Richard Henderson <rth@redhat.com>
+
+ * alpha.h (struct alpha_operand): Pack elements into bitfields.
+
+2001-08-31 Eric Christopher <echristo@redhat.com>
+
+ * mips.h: Remove CPU_MIPS32_4K.
+
+2001-08-27 Torbjorn Granlund <tege@swox.com>
+
+ * ppc.h (PPC_OPERAND_DS): Define.
+
+2001-08-25 Andreas Jaeger <aj@suse.de>
+
+ * d30v.h: Fix declaration of reg_name_cnt.
+
+ * d10v.h: Fix declaration of d10v_reg_name_cnt.
+
+ * arc.h: Add prototypes from opcodes/arc-opc.c.
-2001-06-07 Alan Modra <amodra@bigpond.net.au>
+2001-08-16 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
- * Many files: Update copyright notices.
+ * mips.h (INSN_10000): Define.
+ (OPCODE_IS_MEMBER): Check for INSN_10000.
+
+2001-08-10 Alan Modra <amodra@one.net.au>
+
+ * ppc.h: Revert 2001-08-08.
+
+2001-08-08 Alan Modra <amodra@one.net.au>
+
+ 1999-10-25 Torbjorn Granlund <tege@swox.com>
+ * ppc.h (struct powerpc_operand): New field `reloc'.
+
+2001-07-11 Frank Ch. Eigler <fche@redhat.com>
+
+ * cgen.h (CGEN_MACH): Add insn_chunk_bitsize field.
+ (cgen_cpu_desc): Ditto.
+
+2001-07-07 Ben Elliston <bje@redhat.com>
+
+ * m88k.h: Clean up and reformat. Remove unused code.
+
+2001-06-14 Geoffrey Keating <geoffk@redhat.com>
+
+ * cgen.h (cgen_keyword): Add nonalpha_chars field.
+
+2001-05-23 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * mips.h (CPU_R12000): Define.
+
+2001-05-23 John Healy <jhealy@redhat.com>
+
+ * cgen.h: Increased CGEN_MAX_SYNTAX_ELEMENTS to 48.
+
+2001-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * mips.h (INSN_ISA_MASK): Define.
2001-05-12 Alan Modra <amodra@one.net.au>
@@ -33,11 +159,24 @@
* i386.h (i386_optab): Move InvMem to first operand of pmovmskb
and pextrw to swap reg/rm assignments.
+2001-04-05 Hans-Peter Nilsson <hp@axis.com>
+
+ * cris.h (enum cris_insn_version_usage): Correct comment for
+ cris_ver_v3p.
+
2001-03-24 Alan Modra <alan@linuxcare.com.au>
* i386.h (i386_optab): Correct entry for "movntdq". Add "punpcklqdq".
Add InvMem to first operand of "maskmovdqu".
+2001-03-22 Hans-Peter Nilsson <hp@axis.com>
+
+ * cris.h (ADD_PC_INCR_OPCODE): New macro.
+
+2001-03-21 Kazu Hirata <kazu@hxi.com>
+
+ * h8300.h: Fix formatting.
+
2001-03-22 Alan Modra <alan@linuxcare.com.au>
* i386.h (i386_optab): Add paddq, psubq.
@@ -46,11 +185,35 @@
* i386.h (REGNAM_AL, REGNAM_AX, REGNAM_EAX): Define.
-Mon Feb 12 17:39:31 CET 2001 Jan Hubicka <jh@suse.cz>
+2001-02-28 Igor Shevlyakov <igor@windriver.com>
+
+ * m68k.h: new defines for Coldfire V4. Update mcf to know
+ about mcf5407.
+
+2001-02-18 lars brinkhoff <lars@nocrew.org>
+
+ * pdp11.h: New file.
+
+2001-02-12 Jan Hubicka <jh@suse.cz>
* i386.h (i386_optab): SSE integer converison instructions have
64bit versions on x86-64.
+2001-02-10 Nick Clifton <nickc@redhat.com>
+
+ * mips.h: Remove extraneous whitespace. Formating change to allow
+ for future contribution.
+
+2001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * s390.h: New file.
+
+2001-02-02 Patrick Macdonald <patrickm@redhat.com>
+
+ * cgen.h (CGEN_SYNTAX_CHAR_TYPE): Typedef as unsigned short.
+ (CGEN_MAX_SYNTAX_ELEMENTS): Rename from CGEN_MAX_SYNTAX_BYTES.
+ (CGEN_SYNTAX): Define using CGEN_MAX_SYNTAX_ELEMENTS.
+
2001-01-24 Karsten Keil <kkeil@suse.de>
* i386.h (i386_optab): Fix swapgs
@@ -62,7 +225,7 @@ Mon Feb 12 17:39:31 CET 2001 Jan Hubicka <jh@suse.cz>
(pa_opcodes): Add entries for missing wide mode ldi,ldo,ldw,stw.
Remove duplicate "ldw j(s,b),x". Sort some entries.
-Sat Jan 13 09:56:32 MET 2001 Jan Hubicka <jh@suse.cz>
+2001-01-13 Jan Hubicka <jh@suse.cz>
* i386.h (i386_optab): Fix pusha and ret templates.
@@ -117,7 +280,7 @@ Sat Jan 13 09:56:32 MET 2001 Jan Hubicka <jh@suse.cz>
* i386.h (i386_optab): Replace "Imm" with "EncImm".
(i386_regtab): Add flags field.
-
+
2000-12-12 Nick Clifton <nickc@redhat.com>
* mips.h: Fix formatting.
@@ -142,7 +305,7 @@ Sat Jan 13 09:56:32 MET 2001 Jan Hubicka <jh@suse.cz>
(ISA_UNKNOWN): New constant to indicate unknown ISA.
(ISA_MIPS1, ISA_MIPS2, ISA_MIPS3, ISA_MIPS4, ISA_MIPS5,
ISA_MIPS32): New constants, defined to be the mask of INSN_*
- constants available at that ISA level.
+ constants available at that ISA level.
(CPU_UNKNOWN): New constant to indicate unknown CPU.
(CPU_4K, CPU_MIPS32_4K): Rename the former to the latter,
define it with a unique value.
@@ -150,7 +313,7 @@ Sat Jan 13 09:56:32 MET 2001 Jan Hubicka <jh@suse.cz>
constant meanings.
* mips.h (INSN_ISA64, ISA_MIPS5, ISA_MIPS64): New
- definitions.
+ definitions.
* mips.h (CPU_SB1): New constant.
@@ -164,21 +327,21 @@ Sat Jan 13 09:56:32 MET 2001 Jan Hubicka <jh@suse.cz>
* ia64.h (enum ia64_dependency_semantics): Add IA64_DVS_STOP.
2000-09-13 Anders Norlander <anorland@acc.umu.se>
-
+
* mips.h: Use defines instead of hard-coded processor numbers.
(CPU_R2000, CPU_R3000, CPU_R3900, CPU_R4000, CPU_R4010,
- CPU_VR4100, CPU_R4111, CPU_R4300, CPU_R4400, CPU_R4600, CPU_R4650,
+ CPU_VR4100, CPU_R4111, CPU_R4300, CPU_R4400, CPU_R4600, CPU_R4650,
CPU_R5000, CPU_R6000, CPU_R8000, CPU_R10000, CPU_MIPS32, CPU_4K,
CPU_4KC, CPU_4KM, CPU_4KP): Define..
(OPCODE_IS_MEMBER): Use new defines.
- (OP_MASK_SEL, OP_SH_SEL): Define.
+ (OP_MASK_SEL, OP_SH_SEL): Define.
(OP_MASK_CODE20, OP_SH_CODE20): Define.
- Add 'P' to used characters.
- Use 'H' for coprocessor select field.
+ Add 'P' to used characters.
+ Use 'H' for coprocessor select field.
Use 'm' for 20 bit breakpoint code.
- Document new arg characters and add to used characters.
- (INSN_MIPS32): New define for MIPS32 extensions.
- (OPCODE_IS_MEMBER): Recognize MIPS32 instructions.
+ Document new arg characters and add to used characters.
+ (INSN_MIPS32): New define for MIPS32 extensions.
+ (OPCODE_IS_MEMBER): Recognize MIPS32 instructions.
2000-09-05 Alan Modra <alan@linuxcare.com.au>
@@ -358,7 +521,7 @@ Fri Apr 21 13:20:53 2000 Richard Henderson <rth@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.
@@ -476,7 +639,7 @@ Sun Sep 19 10:40:59 1999 Jeffrey A Law (law@cygnus.com)
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.
+ in xmpyu.
* hppa.h (pa_opcodes): Fix mask for probe and probei.
@@ -562,7 +725,7 @@ Wed Jul 28 02:04:24 1999 Jerry Quinn <jquinn@nortelnetworks.com>
* hppa.h (pa_opcodes): Mark all PA2.0 opcodes with FLAG_STRICT.
- * hppa.h (pa_opcodes): Change xmpyu, fmpyfadd,
+ * 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>
@@ -590,7 +753,7 @@ Fri Jun 25 04:22:04 1999 Jerry Quinn <jquinn@nortelnetworks.com>
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.
+ integer logical instructions.
1999-05-28 Linus Nordberg <linus.nordberg@canit.se>
@@ -607,7 +770,7 @@ Thu May 27 04:13:54 1999 Joel Sherrill (joel@OARcorp.com
Wed May 26 16:57:44 1999 Jeffrey A Law (law@cygnus.com)
- * hppa.h (pa_opcodes): Add second entry for "comb", "comib",
+ * 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>
@@ -718,7 +881,7 @@ Sat Feb 13 14:13:44 1999 Richard Henderson <rth@cygnus.com>
(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.
@@ -741,7 +904,7 @@ Mon Feb 1 21:09:14 1999 Catherine Moore <clm@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)
+1999-01-16 Jeffrey A Law (law@cygnus.com)
* hppa.h (bv): Fix mask.
@@ -759,16 +922,16 @@ Sat Jan 16 01:29:25 1999 Jeffrey A Law (law@cygnus.com)
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.
+ <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.
+ 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.
+ status word instructions.
1998-11-30 Doug Evans <devans@casey.cygnus.com>
@@ -829,7 +992,7 @@ Fri Oct 9 13:38:13 1998 Doug Evans <devans@seba.cygnus.com>
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>
@@ -883,7 +1046,7 @@ 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.
@@ -1488,9 +1651,9 @@ Mon Nov 4 12:52:48 1996 Jeffrey A Law (law@cygnus.com)
Fri Nov 1 10:31:02 1996 Richard Henderson <rth@tamu.edu>
* alpha.h: Don't include "bfd.h"; private relocation types are now
- negative to minimize problems with shared libraries. Organize
- instruction subsets by AMASK extensions and PALcode
- implementation.
+ negative to minimize problems with shared libraries. Organize
+ instruction subsets by AMASK extensions and PALcode
+ implementation.
(struct alpha_operand): Move flags slot for better packing.
Tue Oct 29 12:19:10 1996 Jeffrey A Law (law@cygnus.com)
@@ -1543,9 +1706,9 @@ Fri Aug 23 10:39:08 1996 Jeffrey A Law (law@cygnus.com)
Thu Aug 22 16:51:25 1996 J.T. Conklin <jtc@rtl.cygnus.com>
* v850.h (v850_operands): Add insert and extract fields, pointers
- to functions used to handle unusual operand encoding.
+ to functions used to handle unusual operand encoding.
(V850_OPERAND_REG, V850_OPERAND_SRG, V850_OPERAND_CC,
- V850_OPERAND_SIGNED): Defined.
+ V850_OPERAND_SIGNED): Defined.
Wed Aug 21 17:45:10 1996 J.T. Conklin <jtc@rtl.cygnus.com>
@@ -1559,11 +1722,11 @@ Tue Aug 20 14:52:02 1996 J.T. Conklin <jtc@rtl.cygnus.com>
Fri Aug 16 14:44:15 1996 James G. Smith <jsmith@cygnus.co.uk>
* mips.h (OP_SH_LOCC, OP_SH_HICC, OP_MASK_CC, OP_SH_COP1NORM,
- OP_MASK_COP1NORM, OP_SH_COP1SPEC, OP_MASK_COP1SPEC,
- OP_MASK_COP1SCLR, OP_MASK_COP1CMP, OP_SH_COP1CMP, OP_SH_FORMAT,
- OP_MASK_FORMAT, OP_SH_TRUE, OP_MASK_TRUE, OP_SH_GE, OP_MASK_GE,
- OP_SH_UNSIGNED, OP_MASK_UNSIGNED, OP_SH_HINT, OP_MASK_HINT):
- Defined.
+ OP_MASK_COP1NORM, OP_SH_COP1SPEC, OP_MASK_COP1SPEC,
+ OP_MASK_COP1SCLR, OP_MASK_COP1CMP, OP_SH_COP1CMP, OP_SH_FORMAT,
+ OP_MASK_FORMAT, OP_SH_TRUE, OP_MASK_TRUE, OP_SH_GE, OP_MASK_GE,
+ OP_SH_UNSIGNED, OP_MASK_UNSIGNED, OP_SH_HINT, OP_MASK_HINT):
+ Defined.
Fri Aug 16 00:15:15 1996 Jeffrey A Law (law@cygnus.com)
@@ -1573,7 +1736,7 @@ Fri Aug 16 00:15:15 1996 Jeffrey A Law (law@cygnus.com)
Thu Aug 15 13:11:46 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* d10v.h: Add some additional defines to support the
- assembler in determining which operations can be done in parallel.
+ assembler in determining which operations can be done in parallel.
Tue Aug 6 11:13:22 1996 Jeffrey A Law (law@cygnus.com)
@@ -1589,7 +1752,7 @@ Fri Jul 26 11:47:10 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
Thu Jul 25 12:06:22 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
* d10v.h: Changes for divs, parallel-only instructions, and
- signed numbers.
+ signed numbers.
Mon Jul 22 11:21:15 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
@@ -1611,7 +1774,7 @@ Thu Jul 11 12:09:15 1996 Jeffrey A Law (law@cygnus.com)
Wed Jul 3 14:30:12 1996 J.T. Conklin <jtc@rtl.cygnus.com>
- * m68k.h (mcf5200): New macro.
+ * m68k.h (mcf5200): New macro.
Document names of coldfire control registers.
Tue Jul 2 23:05:45 1996 Jeffrey A Law (law@cygnus.com)
@@ -1761,7 +1924,7 @@ Tue Oct 24 10:49:10 1995 Jeffrey A Law (law@cygnus.com)
Mon Oct 23 11:09:16 1995 James G. Smith <jsmith@pasanda.cygnus.co.uk>
* mips.h: Added INSN_4100 flag to mark NEC VR4100 specific
- instructions.
+ instructions.
Mon Oct 16 10:28:15 1995 Michael Meissner <meissner@tiktok.cygnus.com>
diff --git a/contrib/binutils/include/opcode/alpha.h b/contrib/binutils/include/opcode/alpha.h
index 6f31e9a..487b696 100644
--- a/contrib/binutils/include/opcode/alpha.h
+++ b/contrib/binutils/include/opcode/alpha.h
@@ -81,16 +81,16 @@ extern const unsigned alpha_num_opcodes;
struct alpha_operand
{
/* The number of bits in the operand. */
- int bits;
+ unsigned int bits : 5;
/* How far the operand is left shifted in the instruction. */
- int shift;
+ unsigned int shift : 5;
/* The default relocation type for this operand. */
- int default_reloc;
+ signed int default_reloc : 16;
/* One bit syntax flags. */
- unsigned flags;
+ unsigned int flags : 16;
/* Insertion function. This is used by the assembler. To insert an
operand value into an instruction, check this field.
diff --git a/contrib/binutils/include/opcode/arc.h b/contrib/binutils/include/opcode/arc.h
index 81e5bd8..b137840 100644
--- a/contrib/binutils/include/opcode/arc.h
+++ b/contrib/binutils/include/opcode/arc.h
@@ -313,3 +313,9 @@ const struct arc_operand_value *arc_opcode_lookup_suffix
PARAMS ((const struct arc_operand *type, int value));
int arc_opcode_supported PARAMS ((const struct arc_opcode *));
int arc_opval_supported PARAMS ((const struct arc_operand_value *));
+int arc_limm_fixup_adjust PARAMS ((arc_insn));
+int arc_insn_is_j PARAMS ((arc_insn));
+int arc_insn_not_jl PARAMS ((arc_insn));
+int arc_operand_type PARAMS ((int));
+struct arc_operand_value *get_ext_suffix PARAMS ((char *));
+int arc_get_noshortcut_flag PARAMS ((void));
diff --git a/contrib/binutils/include/opcode/cgen.h b/contrib/binutils/include/opcode/cgen.h
index 8cf3123..e603b55 100644
--- a/contrib/binutils/include/opcode/cgen.h
+++ b/contrib/binutils/include/opcode/cgen.h
@@ -199,6 +199,8 @@ typedef struct {
const char *bfd_name;
/* one of enum mach_attr */
int num;
+ /* parameter from mach->cpu */
+ unsigned int insn_chunk_bitsize;
} CGEN_MACH;
/* Parse result (also extraction result).
@@ -513,6 +515,11 @@ typedef struct cgen_keyword
/* Pointer to null keyword "" entry if present. */
const CGEN_KEYWORD_ENTRY *null_entry;
+
+ /* String containing non-alphanumeric characters used
+ in keywords.
+ At present, the highest number of entries used is 1. */
+ char nonalpha_chars[8];
} CGEN_KEYWORD;
/* Structure used for searching. */
@@ -602,6 +609,23 @@ enum cgen_operand_type { CGEN_OPERAND_MAX };
/* "nil" indicator for the operand instance table */
#define CGEN_OPERAND_NIL CGEN_OPERAND_MAX
+/* A tree of these structs represents the multi-ifield
+ structure of an operand's hw-index value, if it exists. */
+
+struct cgen_ifld;
+
+typedef struct cgen_maybe_multi_ifield
+{
+ int count; /* 0: indexed by single cgen_ifld (possibly null: dead entry);
+ n: indexed by array of more cgen_maybe_multi_ifields. */
+ union
+ {
+ struct cgen_maybe_multi_ifield * multi;
+ struct cgen_ifld * leaf;
+ } val;
+}
+CGEN_MAYBE_MULTI_IFLD;
+
/* This struct defines each entry in the operand table. */
typedef struct
@@ -630,6 +654,11 @@ typedef struct
May be unused for a modifier. */
unsigned char length;
+ /* The (possibly-multi) ifield used as an index for this operand, if it
+ is indexed by a field at all. This substitutes / extends the start and
+ length fields above, but unsure at this time whether they are used
+ anywhere. */
+ CGEN_MAYBE_MULTI_IFLD index_fields;
#if 0 /* ??? Interesting idea but relocs tend to get too complicated,
and ABI dependent, for simple table lookups to work. */
/* Ideally this would be the internal (external?) reloc type. */
@@ -736,25 +765,21 @@ typedef struct
the data is recorded in the parse/insert/extract/print switch statements. */
/* This should be at least as large as necessary for any target. */
-#define CGEN_MAX_SYNTAX_BYTES 40
+#define CGEN_MAX_SYNTAX_ELEMENTS 48
/* A target may know its own precise maximum. Assert that it falls below
the above limit. */
-#ifdef CGEN_ACTUAL_MAX_SYNTAX_BYTES
-#if CGEN_ACTUAL_MAX_SYNTAX_BYTES > CGEN_MAX_SYNTAX_BYTES
-#error "CGEN_ACTUAL_MAX_SYNTAX_BYTES too high - enlarge CGEN_MAX_SYNTAX_BYTES"
+#ifdef CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS
+#if CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS > CGEN_MAX_SYNTAX_ELEMENTS
+#error "CGEN_ACTUAL_MAX_SYNTAX_ELEMENTS too high - enlarge CGEN_MAX_SYNTAX_ELEMENTS"
#endif
#endif
-#if !defined(MAX_OPERANDS) || MAX_OPERANDS <= 127
-typedef unsigned char CGEN_SYNTAX_CHAR_TYPE;
-#else
typedef unsigned short CGEN_SYNTAX_CHAR_TYPE;
-#endif
typedef struct
{
- CGEN_SYNTAX_CHAR_TYPE syntax[CGEN_MAX_SYNTAX_BYTES];
+ CGEN_SYNTAX_CHAR_TYPE syntax[CGEN_MAX_SYNTAX_ELEMENTS];
} CGEN_SYNTAX;
#define CGEN_SYNTAX_STRING(syn) (syn->syntax)
@@ -1006,6 +1031,11 @@ struct cgen_insn
const CGEN_IBASE *base;
const CGEN_OPCODE *opcode;
const CGEN_OPINST *opinst;
+
+ /* Regex to disambiguate overloaded opcodes */
+ void *rx;
+#define CGEN_INSN_RX(insn) ((insn)->rx)
+#define CGEN_MAX_RX_ELEMENTS (CGEN_MAX_SYNTAX_ELEMENTS * 5)
};
/* Instruction lists.
@@ -1165,6 +1195,10 @@ typedef struct cgen_cpu_desc
lazily fetch the data from there. */
unsigned int word_bitsize;
+ /* Instruction chunk size (in bits), for purposes of endianness
+ conversion. */
+ unsigned int insn_chunk_bitsize;
+
/* 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. */
@@ -1357,6 +1391,11 @@ extern void CGEN_SYM (cpu_close) PARAMS ((CGEN_CPU_DESC));
extern void CGEN_SYM (init_opcode_table) PARAMS ((CGEN_CPU_DESC cd_));
+/* build the insn selection regex.
+ called by init_opcode_table */
+
+extern char * CGEN_SYM(build_insn_regex) PARAMS ((CGEN_INSN *insn_));
+
/* Initialize the ibld table for use.
Called by init_asm/init_dis. */
diff --git a/contrib/binutils/include/opcode/i386.h b/contrib/binutils/include/opcode/i386.h
index 38de44a..571990e 100644
--- a/contrib/binutils/include/opcode/i386.h
+++ b/contrib/binutils/include/opcode/i386.h
@@ -553,9 +553,12 @@ static const template i386_optab[] = {
{"sgdt", 1, 0x0f01, 0, Cpu286, wlq_Suf|Modrm, { WordMem, 0, 0} },
{"sidt", 1, 0x0f01, 1, Cpu286, wlq_Suf|Modrm, { WordMem, 0, 0} },
-{"sldt", 1, 0x0f00, 0, Cpu286, wlq_Suf|Modrm, { WordReg|WordMem, 0, 0} },
-{"smsw", 1, 0x0f01, 4, Cpu286, wlq_Suf|Modrm, { WordReg|WordMem, 0, 0} },
-{"str", 1, 0x0f00, 1, Cpu286, w_Suf|Modrm|IgnoreSize,{ Reg16|ShortMem, 0, 0} },
+{"sldt", 1, 0x0f00, 0, Cpu286, wlq_Suf|Modrm, { WordReg|InvMem, 0, 0} },
+{"sldt", 1, 0x0f00, 0, Cpu286, w_Suf|Modrm|IgnoreSize,{ ShortMem, 0, 0} },
+{"smsw", 1, 0x0f01, 4, Cpu286, wlq_Suf|Modrm, { WordReg|InvMem, 0, 0} },
+{"smsw", 1, 0x0f01, 4, Cpu286, w_Suf|Modrm|IgnoreSize,{ ShortMem, 0, 0} },
+{"str", 1, 0x0f00, 1, Cpu286, wlq_Suf|Modrm, { WordReg|InvMem, 0, 0} },
+{"str", 1, 0x0f00, 1, Cpu286, w_Suf|Modrm|IgnoreSize,{ ShortMem, 0, 0} },
{"verr", 1, 0x0f00, 4, Cpu286, w_Suf|Modrm|IgnoreSize,{ Reg16|ShortMem, 0, 0} },
{"verw", 1, 0x0f00, 5, Cpu286, w_Suf|Modrm|IgnoreSize,{ Reg16|ShortMem, 0, 0} },
diff --git a/contrib/binutils/include/opcode/ppc.h b/contrib/binutils/include/opcode/ppc.h
index d23e1c6..dc3983e 100644
--- a/contrib/binutils/include/opcode/ppc.h
+++ b/contrib/binutils/include/opcode/ppc.h
@@ -1,5 +1,5 @@
/* ppc.h -- Header file for PowerPC opcode table
- Copyright 1994, 1995, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1994, 1995, 1999, 2000, 2001 Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support
This file is part of GDB, GAS, and the GNU binutils.
@@ -89,7 +89,16 @@ extern const int powerpc_num_opcodes;
#define PPC_OPCODE_64_BRIDGE (0400)
/* Opcode is supported by Altivec Vector Unit */
-#define PPC_OPCODE_ALTIVEC (01000)
+#define PPC_OPCODE_ALTIVEC (01000)
+
+/* Opcode is supported by PowerPC 403 processor. */
+#define PPC_OPCODE_403 (02000)
+
+/* Opcode is supported by PowerPC BookE processor. */
+#define PPC_OPCODE_BOOKE (04000)
+
+/* Opcode is only supported by 64-bit PowerPC BookE processor. */
+#define PPC_OPCODE_BOOKE64 (010000)
/* A macro to extract the major opcode from an instruction. */
#define PPC_OP(i) (((i) >> 26) & 0x3f)
@@ -121,6 +130,7 @@ struct powerpc_operand
operand value is legal, *ERRMSG will be unchanged (most operands
can accept any value). */
unsigned long (*insert) PARAMS ((unsigned long instruction, long op,
+ int dialect,
const char **errmsg));
/* Extraction function. This is used by the disassembler. To
@@ -140,7 +150,8 @@ struct powerpc_operand
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));
+ long (*extract) PARAMS ((unsigned long instruction, int dialect,
+ int *invalid));
/* One bit syntax flags. */
unsigned long flags;
@@ -229,6 +240,8 @@ extern const struct powerpc_operand powerpc_operands[];
prints these with a leading 'v'. */
#define PPC_OPERAND_VR (010000)
+/* This operand is for the DS field in a DS form instruction. */
+#define PPC_OPERAND_DS (020000)
/* The POWER and PowerPC assemblers use a few macros. We keep them
with the operands table for simplicity. The macro table is an
diff --git a/contrib/binutils/include/partition.h b/contrib/binutils/include/partition.h
index 091655a..851422a 100644
--- a/contrib/binutils/include/partition.h
+++ b/contrib/binutils/include/partition.h
@@ -2,20 +2,20 @@
Copyright (C) 2000, 2001 Free Software Foundation, Inc.
Contributed by CodeSourcery, LLC.
- This file is part of GNU CC.
+ This file is part of GCC.
- GNU CC is free software; you can redistribute it and/or modify
+ GCC 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,
+ GCC 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
+ along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
diff --git a/contrib/binutils/include/safe-ctype.h b/contrib/binutils/include/safe-ctype.h
index 6d4d10a..b2ad849 100644
--- a/contrib/binutils/include/safe-ctype.h
+++ b/contrib/binutils/include/safe-ctype.h
@@ -63,13 +63,15 @@ enum {
_sch_isalnum = _sch_isalpha|_sch_isdigit, /* A-Za-z0-9 */
_sch_isidnum = _sch_isidst|_sch_isdigit, /* A-Za-z0-9_ */
_sch_isgraph = _sch_isalnum|_sch_ispunct, /* isprint and not space */
- _sch_iscppsp = _sch_isvsp|_sch_isnvsp /* isspace + \0 */
+ _sch_iscppsp = _sch_isvsp|_sch_isnvsp, /* isspace + \0 */
+ _sch_isbasic = _sch_isprint|_sch_iscppsp /* basic charset of ISO C
+ (plus ` and @) */
};
/* Character classification. */
extern const unsigned short _sch_istable[256];
-#define _sch_test(c, bit) (_sch_istable[(c) & 0xff] & (bit))
+#define _sch_test(c, bit) (_sch_istable[(c) & 0xff] & (unsigned short)(bit))
#define ISALPHA(c) _sch_test(c, _sch_isalpha)
#define ISALNUM(c) _sch_test(c, _sch_isalnum)
@@ -86,6 +88,7 @@ extern const unsigned short _sch_istable[256];
#define ISIDNUM(c) _sch_test(c, _sch_isidnum)
#define ISIDST(c) _sch_test(c, _sch_isidst)
+#define IS_ISOBASIC(c) _sch_test(c, _sch_isbasic)
#define IS_VSPACE(c) _sch_test(c, _sch_isvsp)
#define IS_NVSPACE(c) _sch_test(c, _sch_isnvsp)
#define IS_SPACE_OR_NUL(c) _sch_test(c, _sch_iscppsp)
diff --git a/contrib/binutils/include/sort.h b/contrib/binutils/include/sort.h
index c8e1d55..b974059 100644
--- a/contrib/binutils/include/sort.h
+++ b/contrib/binutils/include/sort.h
@@ -2,20 +2,20 @@
Copyright (C) 2000 Free Software Foundation, Inc.
Contributed by Mark Mitchell <mark@codesourcery.com>.
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify it
+GCC 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
+GCC 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
+along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
diff --git a/contrib/binutils/include/splay-tree.h b/contrib/binutils/include/splay-tree.h
index e43d4b6..6903969 100644
--- a/contrib/binutils/include/splay-tree.h
+++ b/contrib/binutils/include/splay-tree.h
@@ -2,20 +2,20 @@
Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
Contributed by Mark Mitchell (mark@markmitchell.com).
-This file is part of GNU CC.
+This file is part of GCC.
-GNU CC is free software; you can redistribute it and/or modify it
+GCC 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
+GCC 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
+along with GCC; see the file COPYING. If not, write to
the Free Software Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
@@ -110,6 +110,10 @@ extern splay_tree_node splay_tree_predecessor
extern splay_tree_node splay_tree_successor
PARAMS((splay_tree,
splay_tree_key));
+extern splay_tree_node splay_tree_max
+ PARAMS((splay_tree));
+extern splay_tree_node splay_tree_min
+ PARAMS((splay_tree));
extern int splay_tree_foreach PARAMS((splay_tree,
splay_tree_foreach_fn,
void*));
diff --git a/contrib/binutils/include/ternary.h b/contrib/binutils/include/ternary.h
new file mode 100644
index 0000000..40d442e
--- /dev/null
+++ b/contrib/binutils/include/ternary.h
@@ -0,0 +1,51 @@
+/* ternary.h - Ternary Search Trees
+ Copyright 2001 Free Software Foundation, Inc.
+
+ Contributed by Daniel Berlin (dan@cgsoftware.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, 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 TERNARY_H_
+#define TERNARY_H_
+/* Ternary search trees */
+
+typedef struct ternary_node_def *ternary_tree;
+
+typedef struct ternary_node_def
+{
+ char splitchar;
+ ternary_tree lokid;
+ ternary_tree eqkid;
+ ternary_tree hikid;
+}
+ternary_node;
+
+/* Insert string S into tree P, associating it with DATA.
+ Return the data in the tree associated with the string if it's
+ already there, and replace is 0.
+ Otherwise, replaces if it it exists, inserts if it doesn't, and
+ returns the data you passed in. */
+PTR ternary_insert PARAMS ((ternary_tree *p, const char *s,
+ PTR data, int replace));
+
+/* Delete the ternary search tree rooted at P.
+ Does NOT delete the data you associated with the strings. */
+void ternary_cleanup PARAMS ((ternary_tree p));
+
+/* Search the ternary tree for string S, returning the data associated
+ with it if found. */
+PTR ternary_search PARAMS ((const ternary_node *p, const char *s));
+#endif
diff --git a/contrib/binutils/include/xregex.h b/contrib/binutils/include/xregex.h
new file mode 100644
index 0000000..645195b
--- /dev/null
+++ b/contrib/binutils/include/xregex.h
@@ -0,0 +1,28 @@
+/* This file redefines all regex external names before including
+ a renamed copy of glibc's regex.h. */
+
+#ifndef _XREGEX_H
+#define _XREGEX_H 1
+
+# define regfree xregfree
+# define regexec xregexec
+# define regcomp xregcomp
+# define regerror xregerror
+# define re_set_registers xre_set_registers
+# define re_match_2 xre_match_2
+# define re_match xre_match
+# define re_search xre_search
+# define re_compile_pattern xre_compile_pattern
+# define re_set_syntax xre_set_syntax
+# define re_search_2 xre_search_2
+# define re_compile_fastmap xre_compile_fastmap
+# define re_syntax_options xre_syntax_options
+# define re_max_failures xre_max_failures
+
+# define _REGEX_RE_COMP
+# define re_comp xre_comp
+# define re_exec xre_exec
+
+#include "xregex2.h"
+
+#endif /* xregex.h */
diff --git a/contrib/binutils/include/xregex2.h b/contrib/binutils/include/xregex2.h
new file mode 100644
index 0000000..b9c2d97
--- /dev/null
+++ b/contrib/binutils/include/xregex2.h
@@ -0,0 +1,565 @@
+/* Definitions for data structures and routines for the regular
+ expression library, version 0.12.
+ Copyright (C) 1985,1989-1993,1995-1998, 2000 Free Software Foundation, Inc.
+ This file is part of the GNU C Library. Its master source is NOT part of
+ the C library, however. The master source lives in /gd/gnu/lib.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#ifndef _REGEX_H
+#define _REGEX_H 1
+
+/* Allow the use in C++ code. */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* POSIX says that <sys/types.h> must be included (by the caller) before
+ <regex.h>. */
+
+#if !defined _POSIX_C_SOURCE && !defined _POSIX_SOURCE && defined VMS
+/* VMS doesn't have `size_t' in <sys/types.h>, even though POSIX says it
+ should be there. */
+# include <stddef.h>
+#endif
+
+/* The following two types have to be signed and unsigned integer type
+ wide enough to hold a value of a pointer. For most ANSI compilers
+ ptrdiff_t and size_t should be likely OK. Still size of these two
+ types is 2 for Microsoft C. Ugh... */
+typedef long int s_reg_t;
+typedef unsigned long int active_reg_t;
+
+/* The following bits are used to determine the regexp syntax we
+ recognize. The set/not-set meanings are chosen so that Emacs syntax
+ remains the value 0. The bits are given in alphabetical order, and
+ the definitions shifted by one from the previous bit; thus, when we
+ add or remove a bit, only one other definition need change. */
+typedef unsigned long int reg_syntax_t;
+
+/* If this bit is not set, then \ inside a bracket expression is literal.
+ If set, then such a \ quotes the following character. */
+#define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1)
+
+/* If this bit is not set, then + and ? are operators, and \+ and \? are
+ literals.
+ If set, then \+ and \? are operators and + and ? are literals. */
+#define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1)
+
+/* If this bit is set, then character classes are supported. They are:
+ [:alpha:], [:upper:], [:lower:], [:digit:], [:alnum:], [:xdigit:],
+ [:space:], [:print:], [:punct:], [:graph:], and [:cntrl:].
+ If not set, then character classes are not supported. */
+#define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1)
+
+/* If this bit is set, then ^ and $ are always anchors (outside bracket
+ expressions, of course).
+ If this bit is not set, then it depends:
+ ^ is an anchor if it is at the beginning of a regular
+ expression or after an open-group or an alternation operator;
+ $ is an anchor if it is at the end of a regular expression, or
+ before a close-group or an alternation operator.
+
+ This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because
+ POSIX draft 11.2 says that * etc. in leading positions is undefined.
+ We already implemented a previous draft which made those constructs
+ invalid, though, so we haven't changed the code back. */
+#define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1)
+
+/* If this bit is set, then special characters are always special
+ regardless of where they are in the pattern.
+ If this bit is not set, then special characters are special only in
+ some contexts; otherwise they are ordinary. Specifically,
+ * + ? and intervals are only special when not after the beginning,
+ open-group, or alternation operator. */
+#define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1)
+
+/* If this bit is set, then *, +, ?, and { cannot be first in an re or
+ immediately after an alternation or begin-group operator. */
+#define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1)
+
+/* If this bit is set, then . matches newline.
+ If not set, then it doesn't. */
+#define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1)
+
+/* If this bit is set, then . doesn't match NUL.
+ If not set, then it does. */
+#define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1)
+
+/* If this bit is set, nonmatching lists [^...] do not match newline.
+ If not set, they do. */
+#define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1)
+
+/* If this bit is set, either \{...\} or {...} defines an
+ interval, depending on RE_NO_BK_BRACES.
+ If not set, \{, \}, {, and } are literals. */
+#define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1)
+
+/* If this bit is set, +, ? and | aren't recognized as operators.
+ If not set, they are. */
+#define RE_LIMITED_OPS (RE_INTERVALS << 1)
+
+/* If this bit is set, newline is an alternation operator.
+ If not set, newline is literal. */
+#define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1)
+
+/* If this bit is set, then `{...}' defines an interval, and \{ and \}
+ are literals.
+ If not set, then `\{...\}' defines an interval. */
+#define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1)
+
+/* If this bit is set, (...) defines a group, and \( and \) are literals.
+ If not set, \(...\) defines a group, and ( and ) are literals. */
+#define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1)
+
+/* If this bit is set, then \<digit> matches <digit>.
+ If not set, then \<digit> is a back-reference. */
+#define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1)
+
+/* If this bit is set, then | is an alternation operator, and \| is literal.
+ If not set, then \| is an alternation operator, and | is literal. */
+#define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1)
+
+/* If this bit is set, then an ending range point collating higher
+ than the starting range point, as in [z-a], is invalid.
+ If not set, then when ending range point collates higher than the
+ starting range point, the range is ignored. */
+#define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1)
+
+/* If this bit is set, then an unmatched ) is ordinary.
+ If not set, then an unmatched ) is invalid. */
+#define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1)
+
+/* If this bit is set, succeed as soon as we match the whole pattern,
+ without further backtracking. */
+#define RE_NO_POSIX_BACKTRACKING (RE_UNMATCHED_RIGHT_PAREN_ORD << 1)
+
+/* If this bit is set, do not process the GNU regex operators.
+ If not set, then the GNU regex operators are recognized. */
+#define RE_NO_GNU_OPS (RE_NO_POSIX_BACKTRACKING << 1)
+
+/* If this bit is set, turn on internal regex debugging.
+ If not set, and debugging was on, turn it off.
+ This only works if regex.c is compiled -DDEBUG.
+ We define this bit always, so that all that's needed to turn on
+ debugging is to recompile regex.c; the calling code can always have
+ this bit set, and it won't affect anything in the normal case. */
+#define RE_DEBUG (RE_NO_GNU_OPS << 1)
+
+/* If this bit is set, a syntactically invalid interval is treated as
+ a string of ordinary characters. For example, the ERE 'a{1' is
+ treated as 'a\{1'. */
+#define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1)
+
+/* This global variable defines the particular regexp syntax to use (for
+ some interfaces). When a regexp is compiled, the syntax used is
+ stored in the pattern buffer, so changing this does not affect
+ already-compiled regexps. */
+extern reg_syntax_t re_syntax_options;
+
+/* Define combinations of the above bits for the standard possibilities.
+ (The [[[ comments delimit what gets put into the Texinfo file, so
+ don't delete them!) */
+/* [[[begin syntaxes]]] */
+#define RE_SYNTAX_EMACS 0
+
+#define RE_SYNTAX_AWK \
+ (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \
+ | RE_NO_BK_PARENS | RE_NO_BK_REFS \
+ | RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \
+ | RE_DOT_NEWLINE | RE_CONTEXT_INDEP_ANCHORS \
+ | RE_UNMATCHED_RIGHT_PAREN_ORD | RE_NO_GNU_OPS)
+
+#define RE_SYNTAX_GNU_AWK \
+ ((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DEBUG) \
+ & ~(RE_DOT_NOT_NULL | RE_INTERVALS | RE_CONTEXT_INDEP_OPS))
+
+#define RE_SYNTAX_POSIX_AWK \
+ (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS \
+ | RE_INTERVALS | RE_NO_GNU_OPS)
+
+#define RE_SYNTAX_GREP \
+ (RE_BK_PLUS_QM | RE_CHAR_CLASSES \
+ | RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS \
+ | RE_NEWLINE_ALT)
+
+#define RE_SYNTAX_EGREP \
+ (RE_CHAR_CLASSES | RE_CONTEXT_INDEP_ANCHORS \
+ | RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE \
+ | RE_NEWLINE_ALT | RE_NO_BK_PARENS \
+ | RE_NO_BK_VBAR)
+
+#define RE_SYNTAX_POSIX_EGREP \
+ (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES \
+ | RE_INVALID_INTERVAL_ORD)
+
+/* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */
+#define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC
+
+#define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC
+
+/* Syntax bits common to both basic and extended POSIX regex syntax. */
+#define _RE_SYNTAX_POSIX_COMMON \
+ (RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \
+ | RE_INTERVALS | RE_NO_EMPTY_RANGES)
+
+#define RE_SYNTAX_POSIX_BASIC \
+ (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM)
+
+/* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes
+ RE_LIMITED_OPS, i.e., \? \+ \| are not recognized. Actually, this
+ isn't minimal, since other operators, such as \`, aren't disabled. */
+#define RE_SYNTAX_POSIX_MINIMAL_BASIC \
+ (_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS)
+
+#define RE_SYNTAX_POSIX_EXTENDED \
+ (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \
+ | RE_CONTEXT_INDEP_OPS | RE_NO_BK_BRACES \
+ | RE_NO_BK_PARENS | RE_NO_BK_VBAR \
+ | RE_CONTEXT_INVALID_OPS | RE_UNMATCHED_RIGHT_PAREN_ORD)
+
+/* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INDEP_OPS is
+ removed and RE_NO_BK_REFS is added. */
+#define RE_SYNTAX_POSIX_MINIMAL_EXTENDED \
+ (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \
+ | RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES \
+ | RE_NO_BK_PARENS | RE_NO_BK_REFS \
+ | RE_NO_BK_VBAR | RE_UNMATCHED_RIGHT_PAREN_ORD)
+/* [[[end syntaxes]]] */
+
+/* Maximum number of duplicates an interval can allow. Some systems
+ (erroneously) define this in other header files, but we want our
+ value, so remove any previous define. */
+#ifdef RE_DUP_MAX
+# undef RE_DUP_MAX
+#endif
+/* If sizeof(int) == 2, then ((1 << 15) - 1) overflows. */
+#define RE_DUP_MAX (0x7fff)
+
+
+/* POSIX `cflags' bits (i.e., information for `regcomp'). */
+
+/* If this bit is set, then use extended regular expression syntax.
+ If not set, then use basic regular expression syntax. */
+#define REG_EXTENDED 1
+
+/* If this bit is set, then ignore case when matching.
+ If not set, then case is significant. */
+#define REG_ICASE (REG_EXTENDED << 1)
+
+/* If this bit is set, then anchors do not match at newline
+ characters in the string.
+ If not set, then anchors do match at newlines. */
+#define REG_NEWLINE (REG_ICASE << 1)
+
+/* If this bit is set, then report only success or fail in regexec.
+ If not set, then returns differ between not matching and errors. */
+#define REG_NOSUB (REG_NEWLINE << 1)
+
+
+/* POSIX `eflags' bits (i.e., information for regexec). */
+
+/* If this bit is set, then the beginning-of-line operator doesn't match
+ the beginning of the string (presumably because it's not the
+ beginning of a line).
+ If not set, then the beginning-of-line operator does match the
+ beginning of the string. */
+#define REG_NOTBOL 1
+
+/* Like REG_NOTBOL, except for the end-of-line. */
+#define REG_NOTEOL (1 << 1)
+
+
+/* If any error codes are removed, changed, or added, update the
+ `re_error_msg' table in regex.c. */
+typedef enum
+{
+#ifdef _XOPEN_SOURCE
+ REG_ENOSYS = -1, /* This will never happen for this implementation. */
+#endif
+
+ REG_NOERROR = 0, /* Success. */
+ REG_NOMATCH, /* Didn't find a match (for regexec). */
+
+ /* POSIX regcomp return error codes. (In the order listed in the
+ standard.) */
+ REG_BADPAT, /* Invalid pattern. */
+ REG_ECOLLATE, /* Not implemented. */
+ REG_ECTYPE, /* Invalid character class name. */
+ REG_EESCAPE, /* Trailing backslash. */
+ REG_ESUBREG, /* Invalid back reference. */
+ REG_EBRACK, /* Unmatched left bracket. */
+ REG_EPAREN, /* Parenthesis imbalance. */
+ REG_EBRACE, /* Unmatched \{. */
+ REG_BADBR, /* Invalid contents of \{\}. */
+ REG_ERANGE, /* Invalid range end. */
+ REG_ESPACE, /* Ran out of memory. */
+ REG_BADRPT, /* No preceding re for repetition op. */
+
+ /* Error codes we've added. */
+ REG_EEND, /* Premature end. */
+ REG_ESIZE, /* Compiled pattern bigger than 2^16 bytes. */
+ REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */
+} reg_errcode_t;
+
+/* This data structure represents a compiled pattern. Before calling
+ the pattern compiler, the fields `buffer', `allocated', `fastmap',
+ `translate', and `no_sub' can be set. After the pattern has been
+ compiled, the `re_nsub' field is available. All other fields are
+ private to the regex routines. */
+
+#ifndef RE_TRANSLATE_TYPE
+# define RE_TRANSLATE_TYPE char *
+#endif
+
+struct re_pattern_buffer
+{
+/* [[[begin pattern_buffer]]] */
+ /* Space that holds the compiled pattern. It is declared as
+ `unsigned char *' because its elements are
+ sometimes used as array indexes. */
+ unsigned char *buffer;
+
+ /* Number of bytes to which `buffer' points. */
+ unsigned long int allocated;
+
+ /* Number of bytes actually used in `buffer'. */
+ unsigned long int used;
+
+ /* Syntax setting with which the pattern was compiled. */
+ reg_syntax_t syntax;
+
+ /* Pointer to a fastmap, if any, otherwise zero. re_search uses
+ the fastmap, if there is one, to skip over impossible
+ starting points for matches. */
+ char *fastmap;
+
+ /* Either a translate table to apply to all characters before
+ comparing them, or zero for no translation. The translation
+ is applied to a pattern when it is compiled and to a string
+ when it is matched. */
+ RE_TRANSLATE_TYPE translate;
+
+ /* Number of subexpressions found by the compiler. */
+ size_t re_nsub;
+
+ /* Zero if this pattern cannot match the empty string, one else.
+ Well, in truth it's used only in `re_search_2', to see
+ whether or not we should use the fastmap, so we don't set
+ this absolutely perfectly; see `re_compile_fastmap' (the
+ `duplicate' case). */
+ unsigned can_be_null : 1;
+
+ /* If REGS_UNALLOCATED, allocate space in the `regs' structure
+ for `max (RE_NREGS, re_nsub + 1)' groups.
+ If REGS_REALLOCATE, reallocate space if necessary.
+ If REGS_FIXED, use what's there. */
+#define REGS_UNALLOCATED 0
+#define REGS_REALLOCATE 1
+#define REGS_FIXED 2
+ unsigned regs_allocated : 2;
+
+ /* Set to zero when `regex_compile' compiles a pattern; set to one
+ by `re_compile_fastmap' if it updates the fastmap. */
+ unsigned fastmap_accurate : 1;
+
+ /* If set, `re_match_2' does not return information about
+ subexpressions. */
+ unsigned no_sub : 1;
+
+ /* If set, a beginning-of-line anchor doesn't match at the
+ beginning of the string. */
+ unsigned not_bol : 1;
+
+ /* Similarly for an end-of-line anchor. */
+ unsigned not_eol : 1;
+
+ /* If true, an anchor at a newline matches. */
+ unsigned newline_anchor : 1;
+
+/* [[[end pattern_buffer]]] */
+};
+
+typedef struct re_pattern_buffer regex_t;
+
+/* Type for byte offsets within the string. POSIX mandates this. */
+typedef int regoff_t;
+
+
+/* This is the structure we store register match data in. See
+ regex.texinfo for a full description of what registers match. */
+struct re_registers
+{
+ unsigned num_regs;
+ regoff_t *start;
+ regoff_t *end;
+};
+
+
+/* If `regs_allocated' is REGS_UNALLOCATED in the pattern buffer,
+ `re_match_2' returns information about at least this many registers
+ the first time a `regs' structure is passed. */
+#ifndef RE_NREGS
+# define RE_NREGS 30
+#endif
+
+
+/* POSIX specification for registers. Aside from the different names than
+ `re_registers', POSIX uses an array of structures, instead of a
+ structure of arrays. */
+typedef struct
+{
+ regoff_t rm_so; /* Byte offset from string's start to substring's start. */
+ regoff_t rm_eo; /* Byte offset from string's start to substring's end. */
+} regmatch_t;
+
+/* Declarations for routines. */
+
+/* To avoid duplicating every routine declaration -- once with a
+ prototype (if we are ANSI), and once without (if we aren't) -- we
+ use the following macro to declare argument types. This
+ unfortunately clutters up the declarations a bit, but I think it's
+ worth it. */
+
+#if __STDC__
+
+# define _RE_ARGS(args) args
+
+#else /* not __STDC__ */
+
+# define _RE_ARGS(args) ()
+
+#endif /* not __STDC__ */
+
+/* Sets the current default syntax to SYNTAX, and return the old syntax.
+ You can also simply assign to the `re_syntax_options' variable. */
+extern reg_syntax_t re_set_syntax _RE_ARGS ((reg_syntax_t syntax));
+
+/* Compile the regular expression PATTERN, with length LENGTH
+ and syntax given by the global `re_syntax_options', into the buffer
+ BUFFER. Return NULL if successful, and an error string if not. */
+extern const char *re_compile_pattern
+ _RE_ARGS ((const char *pattern, size_t length,
+ struct re_pattern_buffer *buffer));
+
+
+/* Compile a fastmap for the compiled pattern in BUFFER; used to
+ accelerate searches. Return 0 if successful and -2 if was an
+ internal error. */
+extern int re_compile_fastmap _RE_ARGS ((struct re_pattern_buffer *buffer));
+
+
+/* Search in the string STRING (with length LENGTH) for the pattern
+ compiled into BUFFER. Start searching at position START, for RANGE
+ characters. Return the starting position of the match, -1 for no
+ match, or -2 for an internal error. Also return register
+ information in REGS (if REGS and BUFFER->no_sub are nonzero). */
+extern int re_search
+ _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string,
+ int length, int start, int range, struct re_registers *regs));
+
+
+/* Like `re_search', but search in the concatenation of STRING1 and
+ STRING2. Also, stop searching at index START + STOP. */
+extern int re_search_2
+ _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
+ int length1, const char *string2, int length2,
+ int start, int range, struct re_registers *regs, int stop));
+
+
+/* Like `re_search', but return how many characters in STRING the regexp
+ in BUFFER matched, starting at position START. */
+extern int re_match
+ _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string,
+ int length, int start, struct re_registers *regs));
+
+
+/* Relates to `re_match' as `re_search_2' relates to `re_search'. */
+extern int re_match_2
+ _RE_ARGS ((struct re_pattern_buffer *buffer, const char *string1,
+ int length1, const char *string2, int length2,
+ int start, struct re_registers *regs, int stop));
+
+
+/* Set REGS to hold NUM_REGS registers, storing them in STARTS and
+ ENDS. Subsequent matches using BUFFER and REGS will use this memory
+ for recording register information. STARTS and ENDS must be
+ allocated with malloc, and must each be at least `NUM_REGS * sizeof
+ (regoff_t)' bytes long.
+
+ If NUM_REGS == 0, then subsequent matches should allocate their own
+ register data.
+
+ Unless this function is called, the first search or match using
+ PATTERN_BUFFER will allocate its own register data, without
+ freeing the old data. */
+extern void re_set_registers
+ _RE_ARGS ((struct re_pattern_buffer *buffer, struct re_registers *regs,
+ unsigned num_regs, regoff_t *starts, regoff_t *ends));
+
+#if defined _REGEX_RE_COMP || defined _LIBC
+# ifndef _CRAY
+/* 4.2 bsd compatibility. */
+extern char *re_comp _RE_ARGS ((const char *));
+extern int re_exec _RE_ARGS ((const char *));
+# endif
+#endif
+
+/* GCC 2.95 and later have "__restrict"; C99 compilers have
+ "restrict", and "configure" may have defined "restrict". */
+#ifndef __restrict
+# if ! (2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__))
+# if defined restrict || 199901L <= __STDC_VERSION__
+# define __restrict restrict
+# else
+# define __restrict
+# endif
+# endif
+#endif
+/* For now unconditionally define __restrict_arr to expand to nothing.
+ Ideally we would have a test for the compiler which allows defining
+ it to restrict. */
+#define __restrict_arr
+
+/* POSIX compatibility. */
+extern int regcomp _RE_ARGS ((regex_t *__restrict __preg,
+ const char *__restrict __pattern,
+ int __cflags));
+
+extern int regexec _RE_ARGS ((const regex_t *__restrict __preg,
+ const char *__restrict __string, size_t __nmatch,
+ regmatch_t __pmatch[__restrict_arr],
+ int __eflags));
+
+extern size_t regerror _RE_ARGS ((int __errcode, const regex_t *__preg,
+ char *__errbuf, size_t __errbuf_size));
+
+extern void regfree _RE_ARGS ((regex_t *__preg));
+
+
+#ifdef __cplusplus
+}
+#endif /* C++ */
+
+#endif /* regex.h */
+
+/*
+Local variables:
+make-backup-files: t
+version-control: t
+trim-versions-without-asking: nil
+End:
+*/
diff --git a/contrib/binutils/ld/ChangeLog b/contrib/binutils/ld/ChangeLog
index 0399c95..de96a89 100644
--- a/contrib/binutils/ld/ChangeLog
+++ b/contrib/binutils/ld/ChangeLog
@@ -1,23 +1,1032 @@
-2001-10-17 Nick Clifton <nickc@cambridge.redhat.com>
+2002-01-26 Hans-Peter Nilsson <hp@bitrange.com>
- * ld.1: Remove .TP macro from SYNOPSIS section - it prevents
- successful translation to DocBook format.
+ * Makefile.am (install): Depend on install-info.
+ * Makefile.in: Regenerate.
-2001-09-30 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+2002-01-26 Christian Rose <menthos@menthos.com>
- Report 2001-08-03 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+ * ldmain.c (main): Use full sentences to ease translation.
- * scripttempl/elfm68hc12.sc (FINISH_CODE, FINISH_RELOC): New to handle
- .fini[0-4] sections used by _exit
- (CTOR, DTOR): Export ctor/dtor symbols; move them to ROM.
- (*.text,*.data,*.bss): Take into account .text.*, .data.*, .bss.*.
- * scripttempl/elfm68hc11.sc: Likewise.
+2002-01-26 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * po/fr.po: Updated version.
+
+2002-01-25 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * po/es.po: Updated version.
+
+2002-01-25 Andreas Jaeger <aj@suse.de>
+
+ * ldlex.l (yy_input): Correct error check.
+
+2002-01-25 Alan Modra <amodra@bigpond.net.au>
+
+ * ldmisc.c (demangle): Put back dots when string not demangled.
+
+2002-01-22 Richard Henderson <rth@redhat.com>
+
+ * emulparams/elf64alpha.sh (NOP): Use unop.
+
+2002-01-21 Andreas Jaeger <aj@suse.de>
+
+ * ldlex.l: Use fread instead of read.
+
+2002-01-21 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * configure.tgt (ia64-*-netbsd*): New target.
+
+2002-01-21 H.J. Lu <hjl@gnu.org>
+
+ * emulparams/elf32btsmip.sh (SHLIB_TEXT_START_ADDR): Change to
+ 0.
+ * emulparams/elf64btsmip.sh (SHLIB_TEXT_START_ADDR): Likewise.
+
+2002-01-18 Andreas Jaeger <aj@suse.de>
+
+ * ldver.c (ldversion): Update year.
+
+2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * po/ld.pot: Regenerate.
+
+2002-01-16 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am (eelf64ppc.c, eelf64lppc.c): Depend on ppc64elf.em.
+ * Makefile.in: Regenerate.
+ * emulparams/elf64ppc.sh (EXTRA_EM_FILE): Define.
+ * emultempl/ppc64elf.em: New file.
+
+2002-01-15 DJ Delorie <dj@redhat.com>
+
+ * scripttempl/pe.sc: Add support for constructor priorities.
+
+2002-01-07 Marek Michalkiewicz <marekm@amelek.gda.pl>
+
+ * emulparams/avr1200.sh (DATA_START): Define as 0x60.
+ * emulparams/avr23xx.sh: Likewise.
+ * emulparams/avr4433.sh: Likewise.
+ * emulparams/avr44x4.sh: Likewise.
+ * emulparams/avr85xx.sh: Likewise.
+ * emulparams/avrmega103.sh: Likewise.
+ * emulparams/avrmega161.sh: Likewise.
+ * emulparams/avrmega603.sh: Likewise.
+ * scripttempl/elf32avr.sc: Use DATA_START instead of 0x60.
+
+2002-01-08 Alexandre Oliva <aoliva@redhat.com>
+
+ * ldlang.c (walk_wild_section): Exclude object file if enclosing
+ archive is excluded.
+
+2002-01-07 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.am (ALL_EMULATIONS): Add eshelf_nbsd.o and eshlelf_nbsd.o.
+ (eshelf_nbsd.c): New rule.
+ (eshlelf_nbsd.c): New rule.
+ * Makefile.in: Regenerate.
+ * configure.tgt (sh*le-*-netbsdelf*): New target.
+ (sh*-*-netbsdelf*): New target.
+ * emulparams/shelf.sh: Document that shelf_nbsd.sh sources this file.
+ * ld/emulparams/shelf_nbsd.sh: New emulation.
+ * ld/emulparams/shlelf_nbsd.sh: New emulation.
+
+2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * po/es.po: New file: Spanish translation.
+ * configure.in (ALL_LINGUAS): Add es.
+ * configure: Regenerate.
+
+2002-01-06 John Marshall <jmarshall@acm.org>
+
+ * ld.texinfo: Note that --emit-relocs is currently only
+ implemented for ELF.
+
+2002-01-05 Alan Modra <amodra@bigpond.net.au>
+
+ * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Make use
+ of bfd_section_list_remove and bfd_section_list_insert macros.
+ * emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
+ * emultempl/mmo.em (mmo_place_orphan): Likewise.
+
+2002-01-04 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * configure.tgt (x86_64-*-netbsd*): New target.
+
+2001-12-21 Tom Rix <trix@redhat.com>
+
+ (gld*_create_output_section_statements): New function.
+ For -binitfini support.
+ * emultempl/aix.em (gld*_before_parse): Fix comment.
+ * emultempl/aix.em (gld*_parse_args): Fix comment.
+
+2001-12-20 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * configure.tgt (mips*-dec-netbsd*): Delete alias for
+ mips*el-*-netbsd*.
+ (sparc64-*-netbsd*): Add elf32_sparc to targ_extra_emuls.
+
+ * configure.tgt (arm-*-netbsdelf*): Add target.
+ (arm-*-netbsd*): Add armelf and armelf_nbsd to targ_extra_emuls.
+ * emulparams/armelf_nbsd.sh: Added.
+ * Makefile.am: Add rules for earmelf_nbsd.
+ * Makefile.in: Regenerate.
+
+2001-12-19 Andreas Jaeger <aj@suse.de>,
+ Susanne Oberhauser <froh@suse.de>
+
+ * configure.host: Add rules for x86_64-*linux-gnu. Change
+ s390x-linux entry to use gcc to report configuration, replace gcc
+ with $CC in s390-linux
+
+2001-12-19 Andreas Jaeger <aj@suse.de>
+
+ * ld.texinfo (VERSION): Fix markup.
+
+2001-12-18 matthew green <mrg@eterna.com.au>
+
+ * Makefile.am (ALL_EMULATIONS): Add m68kelfnbsd.o.
+ (m68kelfnbsd.c): New rule.
+ * Makefile.in: Regenerate.
+ * configure.tgt (m68*-hp-netbsd*): Renamed to ..
+ (m68*-*-netbsd*4k*): .. this.
+ (m68*-*-netbsdelf*): New target.
+ (m68*-*-netbsd*): Also include ELF support.
+ (m68*-*-netbsdaout*): New alias for m68*-*-netbsd*.
+ * emulparams/m68kelfnbsd.sh: New emulation.
+
+2001-12-18 Jakub Jelinek <jakub@redhat.com>
+
+ * ldgram.y (vers_node): Support anonymous version tags.
+ * ldlang.c (lang_register_vers_node): Ensure anonymous version
+ tag is not defined together with non-anonymous versions.
+ * ld.texinfo: Document it.
+
+2001-12-18 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * po/tr.po: New file: Turkish translation.
+ * configure.in (ALL_LINGUAS): Add tr.
+ * configure: Regenerate.
+
+2001-12-17 Jason Thorpe <thorpej@wasabisystems.com>
+
+ * Makefile.am: Add rules for eelf64alpha_nbsd.
+ * Makefile.in: Regenerate.
+ * configure.tgt (alpha*-*-netbsd*): Set
+ targ_emul to elf64alpha_nbsd.
+ * emulparams/elf64alpha_nbsd.sh: Added.
+
+2001-12-17 Alan Modra <amodra@bigpond.net.au>
+
+ * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Adjust
+ section_tail when fiddling with section list.
+ (gld${EMULATION_NAME}_list_options): Ensure sentences aren't
+ broken into separate strings to make translation easier.
+ * emultempl/mmo.em (mmo_place_orphan): Adjust section_tail when
+ fiddling with section list.
+ * emultempl/pe.em (gld_${EMULATION_NAME}_place_orphan): Likewise.
+
+2001-12-16 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * scripttempl/mmo.sc: Add .debug_ranges to listed sections.
+
+2001-12-15 Alan Modra <amodra@bigpond.net.au>
+
+ * ldmain.c (main): Initialise link_info.eh_frame_hdr.
+
+2001-12-13 Jakub Jelinek <jakub@redhat.com>
+
+ * emultempl/elf32.em (finish): Supply output_bfd
+ to bfd_elf*_discard_info.
+ (OPTION_EH_FRAME_HDR): Define.
+ (longopts): Add --eh-frame-hdr.
+ (parse_args): Handle it.
+ (list_options): Add --eh-frame-hdr to help.
+ * emultempl/hppaelf.em (finish): Supply output_bfd
+ to bfd_elf*_discard_info.
+ * scripttempl/elf.sc (.eh_frame_hdr): Add.
+
+2001-12-13 Alan Modra <amodra@bigpond.net.au>
+
+ * lexsup.c (parse_args): Don't pass shortopts to second call to
+ getopt functions. Restore optind rather than decrementing before
+ second call. Remove errind as it now duplicates last_optind.
+
+2001-12-11 Christopher Faylor <cgf@redhat.com>
+
+ * emultempl/pe.em (gld_${EMULATION_NAME}_list_options): Fix typo.
+
+2001-12-07 Geoffrey Keating <geoffk@redhat.com>
+ Richard Henderson <rth@redhat.com>
+
+ * Makefile.am: Add support for xstormy16.
+ * configure.tgt: Add support for xstormy16.
+ * Makefile.in: Regenerate.
+ * emulparams/elf32xstormy16.sh: New file.
+ * scripttempl/xstormy16.sc: New file.
+
+2001-10-01 Christopher Faylor <cgf@cygnus.com>
+
+ * Makefile.in (LIB_PATH): Make configurable.
+ (GENSCRIPTS): Set LIB_PATH in environment.
+ * configure.in: Substitute LIB_PATH.
+ * configure: Regenerate.
+ * configure.tgt (*cygwin): Set LIB_PATH for cross build.
+ * configure.host (*cygwin): Add /usr/lib/w32api to NATIVE_LIB_DIRS.
+
+2001-12-07 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * lexsup.c (ld_options): Insert 'PROGRAM' into the text string
+ describing the -N option so that it is easier to translate into
+ foreign languages.
+
+2001-12-05 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * emultempl/pe.em (..._list_options): Replace multiple fprintf
+ statements describing a single option with a single, newline
+ escaped fprintf. This allows better translation into other
+ languages.
+
+ * ldmain.c (add_archive_element): Combine multiple strings
+ into a single string to permit better translation into other
+ languages.
+
+2001-12-05 Tom Rix <trix@redhat.com>
+
+ * Makefile.am: Remove eaixppc64.
+ * Makefile.in: Regenerate.
+
+2001-12-04 Tom Rix <trix@redhat.com>
+
+ * emultempl/aix.em (choose_target): Change default target to
+ OUTPUT_FORMAT for ppcmacos. Add braces to remove compiler
+ warning.
+ (gld*_read_file): Fix typo.
+ (change_symbol_mode): Add prototype.
+ (is_syscall): Same.
+
+ * emulparams/aixppc.sh (SYSCALL_MASK, SYMBOL_MODE_MASK): Delete.
+ * emulparams/aixrs6.sh : Same.
+ * emulparams/ppcmacos.sh : Same.
+ * emulparams/aixppc64.sh : Delete file.
+ * emultempl/aix.em : Formatting changes.
+
+2001-12-04 Hans-Peter Nilsson <hp@axis.com>
+
+ * emulparams/criself.sh (NO_SMALL_DATA): Set, to yes.
+ (OTHER_BSS_END_SYMBOLS): Don't refer to .sbss when setting
+ __Sbss.
+ (OTHER_END_SYMBOLS): Fix formatting.
+ * emulparams/crislinux.sh (NO_SMALL_DATA): Set, to yes.
+ (OTHER_END_SYMBOLS): Fix formatting.
+
+2001-12-04 Alan Modra <amodra@bigpond.net.au>
+
+ * ldexp.c (exp_print_token): Correct "table" entry for RSHIFT.
+
+2001-12-02 Tom Rix <trix@redhat.com>
+
+ * configure.tgt : Remove eaixppc64 emulations.
+ * Makefile.in : Remove eaixppc64.c
+ * ldemul.c (ldemul_choose_target): New parameters argc, argv.
+ (ldemul_default_target): Same.
+ * emultempl/gld960.em (gld960_choose_target): Same.
+ * emultempl/gld960c.em (gld960_choose_target): Same.
+ * scripttempl/aix.sc: Remove OUTPUT_FORMAT.
+ * emultempl/aix.em (is_syscall): syscall_mask now a variable.
+ * emultempl/aix.em (gld*_read_file): symbol_mode_mask now a variable.
+ * emultempl/aix.em (gld*_parse_args): Handle -b32 -b64 emulation.
+ * emultempl/aix.em (choose_target): New function. Handle emulation of
+ -b32 and -b64.
+
+2001-11-27 H.J. Lu <hjl@gnu.org>
+
+ * emulparams/elf_i386.sh (NO_SMALL_DATA): Set to yes.
+ * emulparams/elf_i386_be.sh (NO_SMALL_DATA): Likewise.
+ * emulparams/elf_i386_chaos.sh (NO_SMALL_DATA): Likewise.
+ * emulparams/elf_i386_ldso.sh (NO_SMALL_DATA): Likewise.
+ * emulparams/elf_x86_64.sh (NO_SMALL_DATA): Likewise.
+ * emulparams/m68kelf.sh (NO_SMALL_DATA): Likewise.
+ * emulparams/elf32_sparc.sh (NO_SMALL_DATA): Likewise.
+ * emulparams/elf64_sparc.sh (NO_SMALL_DATA): Likewise.
+
+ * scripttempl/elf.sc (SBSS): New. Define if ${NO_SMALL_DATA}
+ is not empty.
+ (SDATA): Likewise.
+ (REL_SDATA): Likewise.
+ (REL_SBSS): Likewise.
+ (REL_SDATA2): Likewise.
+ (REL_SBSS2): Likewise.
+ (SBSS2): Define if ${NO_SMALL_DATA} is not empty.
+ (SDATA2): Likewise.
+
+2001-11-25 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * scripttempl/elfm68hc11.sc (CTOR, DTOR): Put constructor and
+ destructor in rom.
+ * scripttempl/elfm68hc12.sc (CTOR, DTOR): Likewise.
+
+2001-11-22 H.J. Lu <hjl@gnu.org>
+
+ * Makefile.in: Regenerated with automake based on automake
+ 1.4-8 in RedHat 7.1.
+
+2001-11-22 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am (CONFIG_STATUS_DEPENDENCIES): Define.
+ (config.status): Delete rule.
+ Add extra dependencies to cover sourced emulparams files.
+ * Makefile.in: Regenerate.
+
+ * scripttempl/elf.sc: Order <section>, <section>.* and
+ corresponding linkonce sections as seen in input files.
+ Formatting fixes. Zero vma of all sections if not relocating.
+ (STACK): Define and insert if STACK_ADDR defined.
+ (OTHER_RELOCATING_SECTIONS): Delete.
+ (OTHER_END_SYMBOLS): Define.
+ (OTHER_READONLY_SECTIONS): Always insert, not just when relocating.
+ (OTHER_READWRITE_SECTIONS): Likewise.
+ (OTHER_GOT_SECTIONS): Likewise.
+ (OTHER_SDATA_SECTIONS): Likewise.
+ (OTHER_BSS_SECTIONS): Likewise.
+ * scripttempl/elfi370.sc (OTHER_READONLY_SECTIONS): Likewise.
+ (OTHER_READWRITE_SECTIONS): Likewise.
+ * scripttempl/nw.sc (OTHER_READONLY_SECTIONS): Likewise.
+ (OTHER_READWRITE_SECTIONS): Likewise
+
+ * emulparams/armelf.sh (OTHER_RELOCATING_SECTIONS): Delete.
+ (STACK_ADDR): Define.
+ * emulparams/armelf_oabi.sh: As for armelf.sh.
+ * emulparams/elf32mcore.sh: As for armelf.sh.
+ * emulparams/h8300elf.sh: As for armelf.sh.
+ * emulparams/mn10200.sh: As for armelf.sh.
+ * emulparams/shelf.sh: As for armelf.sh.
+
+ * emulparams/elf32fr30.sh (OTHER_RELOCATING_SECTIONS): Delete.
+ (OTHER_END_SYMBOLS): Define.
+ * emulparams/m32relf.sh: As for elf32fr30.sh.
+ * emulparams/h8300helf.sh: As for elf32fr30.sh.
+ * emulparams/h8300self.sh: As for elf32fr30.sh.
+
+ * emulparams/criself.sh (OTHER_READONLY_SECTIONS): Protect symbol
+ defines with RELOCATING test.
+ (OTHER_SDATA_SECTIONS): Likewise.
+ (OTHER_RELOCATING_SECTIONS): Delete, replacing with..
+ (OTHER_END_SYMBOLS): ..this.
+ * emulparams/crislinux.sh: As for criself.sh.
+
+ * emulparams/elf32bmipn32.sh (OTHER_SDATA_SECTIONS): Zero vma
+ if not relocating.
+ (OTHER_RELOCATING_SECTIONS): Delete, replacing with..
+ (OTHER_SECTIONS): ..this. Zero vma if not relocating. Order
+ normal and linkonce sections as seen in input files.
+ * emulparams/elf32bmip.sh (DATA_ADDR): Don't define if EMBEDDED.
+ (TEXT_DYNAMIC): Likewise.
+ (INITIAL_READONLY_SECTIONS): Zero vma if not relocating.
+ (OTHER_SDATA_SECTIONS): Likewise.
+ * emulparams/elf32ppc.sh (OTHER_READWRITE_SECTIONS): Likewise.
+ * emulparams/shlelf_linux.sh (OTHER_READWRITE_SECTIONS): Likewise.
+ * emulparams/elf64alpha.sh (OTHER_READONLY_SECTIONS): Likewise.
+ * emulparams/hppalinux.sh (OTHER_READONLY_SECTIONS): Likewise.
+ * emulparams/elf64_aix.sh (OTHER_GOT_SECTIONS): Likewise.
+ (OTHER_PLT_RELOC_SECTIONS): Likewise.
+ (OTHER_READONLY_SECTIONS): Likewise. Order normal and linkonce
+ sections as seen in input files.
+ * emulparams/elf64_ia64.sh: As for emulparams/elf64_aix.sh.
+ * emulparams/hppa64linux.sh (OTHER_READONLY_SECTIONS): Zero vma
+ if not relocating.
+ (OTHER_READWRITE_SECTIONS, OTHER_BSS_SECTIONS): Likewise.
+ (OTHER_BSS_END_SYMBOLS): Merge from elf64hppa.sh.
+ * emulparams/elf64mmix.sh (OTHER_RELOCATING_SECTIONS): Delete.
+ (OTHER_SECTIONS): Instead, use this..
+ (OTHER_END_SYMBOLS): ..and this.
+
+ * emulparams/elf32b4300.sh: Source elf32bmip.sh, remove duplicates.
+ * emulparams/elf32bsmip.sh: Likewise.
+ * emulparams/elf32btsmip.sh: Likewise.
+ * emulparams/elf32ebmip.sh: Likewise.
+ * emulparams/elf32lmip.sh: Likewise.
+ * emulparams/elf32elmip.sh: Source elf32lmip.sh, remove duplicates.
+ * emulparams/elf32lsmip.sh: Likewise.
+ * emulparams/elf32ltsmip.sh: Source elf32btsmip.sh, remove duplicates.
+ * emulparams/elf32l4300.sh: Source elf32b4300.sh, remove duplicates.
+ * emulparams/elf64bmip.sh: Source elf32bmipn32.sh, remove duplicates.
+ * emulparams/elf64btsmip.sh: Likewise.
+ * emulparams/elf64ltsmip.sh: Source elf64btsmip.sh, remove duplicates.
+ * emulparams/elf32lppc.sh: Source elf32ppc.sh, remove duplicates.
+ * emulparams/elf32ppclinux.sh: Likewise.
+ * emulparams/elf32ppcsim.sh: Likewise.
+ * emulparams/elf32lppcsim.sh: Source elf32lppc.sh, remove duplicates.
+ * emulparams/elf64hppa.sh: Source hppa64linux.sh, remove duplicates.
+ * emulparams/h8300helf.sh: Source h8300elf.sh, remove duplicates.
+ * emulparams/h8300self.sh: Likewise.
+ * emulparams/mn10300.sh: Source mn10200.sh, remove duplicates.
+ * emulparams/sh.sh: Comment.
+ * emulparams/shl.sh: Source sh.sh, remove duplicates.
+ * emulparams/shlelf.sh: Source shelf.sh, remove duplicates.
+ * emulparams/shelf_linux.sh: Source shlelf_linux.sh, remove duplicates.
+
+2001-11-21 David Heine <dlheine@tensilica.com>
+ Alan Modra <amodra@bigpond.net.au>
+
+ * ldlang.c (map_input_to_output_sections): Replace "break"
+ accidentally removed with 2001-08-03 change.
+ (lang_gc_sections_1): Likewise.
+
+2001-11-21 Alan Modra <amodra@bigpond.net.au>
+
+ * ldlang.c (walk_wild_section): Move sec == NULL case out of loop.
+
+2001-11-20 Angela Marie Thomas <angela@redhat.com>
+
+ * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Use NULL instead
+ of false when calling lang_size_sections.
+ * emultempl/hppaelf.em (hppaelf_layout_sections_again): Likewise.
+
+2001-11-15 Alan Modra <amodra@bigpond.net.au>
+
+ * emultempl/elf32.em (gld${EMULATION_NAME}_finish): Only emit this
+ function when LDEMUL_FINISH isn't set to the same name. Don't
+ call ${LDEMUL_FINISH}.
+ (ld_${EMULATION_NAME}_emulation): Call $LDEMUL_FINISH if defined.
+ * emultempl/armelf.em (arm_elf_finish): Call
+ gld${EMULATION_NAME}_finish.
+ * emultempl/hppaelf.em (hppaelf_finish): Rename to
+ gld${EMULATION_NAME}_finish. Call bfd_elf32_discard_info and
+ hppaelf_layout_sections_again if necessary.
+ (need_laying_out): New var.
+ (hppaelf_layaout_sections_again): Rename to
+ hppaelf_layout_sections_again. Clear need_laying_out.
+ (PARSE_AND_LIST_OPTIONS): Format text.
+
+2001-11-14 H.J. Lu <hjl@gnu.org>
+
+ * emultempl/armelf.em (arm_elf_finish): Renamed from
+ gld${EMULATION_NAME}_finish.
+ (LDEMUL_FINISH): Set to arm_elf_finish.
+
+2001-11-14 Daniel Jacobowitz <drow@mvista.com>
+
+ * emultempl/elf32.em (gld${EMULATION_NAME}_finish): New.
+ (struct ld_emulation_xfer_struct): Use it.
+
+Tue Nov 13 11:27:14 2001 Ross Alexander <ross.alexander@uk.neceur.com>
+
+ * emulparams/elf64hppa.sh (OTHER_BSS_END_SYMBOLS): Add
+ additional symbols referenced by newer crt0.o files from HP.
+
+2001-11-12 Anthony Green <green@redhat.com>
+
+ * emulparams/armelf.sh (DATA_START_SYMBOLS): New symbol.
+
+2001-11-12 Alfred M. Szmidt <ams@kemisten.nu>
+
+ * Makefile.am (GENSCRIPTS): Quote ${exec_prefix}.
+ * Makefile.in: Regenerate.
+
+2001-11-02 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * ld.texinfo: Use @command for commands, @option for options.
+ * Makefile.am (POD2MAN): Use 'GNU Development Tools' for
+ the page man title.
+ * Makefile.in: Rebuild.
+
+2001-11-04 Chris Demetriou <cgd@broadcom.com>
+
+ * configure.tgt (mips*el-*-netbsd*, mips*-*-netbsd*):
+ Add support for targets.
+
+2001-11-02 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * configure.in (ALL_LINGUAS): Add "fr" and "sv"
+ * configure: Regernate.
+ * po/fr.po: New file.
+ * po/sv.po: New file.
+
+2001-11-01 NIIBE Yutaka <gniibe@m17n.org>
+
+ * configure.tgt (sh-*-linux): Set targ_emul, targ_extra_emuls
+ as little endian default and to support big endian.
+
+2001-11-01 Chris Demetriou <cgd@broadcom.com>
+
+ * ld.texinfo (Options): Document new option, -nostdlib.
+ * lexsup.c (OPTION_NOSTDLIB): New definition.
+ (ld_options): Add entry for "nostdlib".
+ (parse_args): Handle OPTIONS_NOSTDLIB.
+ * ldfile.c (ldfile_add_library_path): Don't add directories
+ to the search path if they weren't specified on the command line
+ and -nostdlib was specified.
+ * ld.h (ld_config_type): New member only_cmd_line_lib_dirs.
+
+2001-10-31 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * lexsup.c (parse_args): Prevent infinite parsing loop when
+ "-rpath.a" is specified on the command line.
+ Replace calls to fprintf with calls to einfo.
+
+2001-10-31 John Marshall <jmarshall@acm.org>
+
+ * ld.texinfo: A historical requirement that MEMORY and SECTIONS
+ appear only once across all the linker scripts involved in a link
+ invocation no longer applies. Make the documentation reflect
+ that.
+
+2001-10-31 NIIBE Yutaka <gniibe@m17n.org>
+
+ * configure.tgt: Supports sh3/sh4/sh3eb/sh4eb-unknown-linux-gnu
+ targets.
+ (sh-*-linux*): Added targ_extra_libpath.
+
+2001-10-31 David Heine <dlheine@tensilica.com>
+
+ * ldlang.c (lang_size_sections): Keep a valid output_offset field
+ for padding statements.
+
+2001-10-30 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * configure.tgt (mmix-*-*): New target.
+ * Makefile.am (ALL_EMULATIONS): Add eelf64mmix.o and emmo.o.
+ Add dependencies to match.
+ * emulparams/mmo.sh, emulparams/elf64mmix.sh, emultempl/mmo.em,
+ emultempl/mmix-elfnmmo.em, emultempl/mmixelf.em,
+ scripttempl/mmo.sc: New files.
+ * gen-doc.texi: @set MMIX.
+ * ld.texinfo: Ditto.
+ [MMIX] Add MMIX node.
+ * Makefile.in: Regenerate.
+
+2001-10-29 Kazu Hirata <kazu@hxi.com>
+
+ * ldlang.c: Fix a comment typo.
+
+2001-10-23 Alan Modra <amodra@bigpond.net.au>
+
+ * configure.host: Move alpha*-*-linux-gnu* entry to generic
+ entries, and match *-*-linux*.
+
+2001-10-20 Alan Modra <amodra@bigpond.net.au>
+
+ * ldgram.y (mri_script_command): Surround processing of INCLUDE
+ with ldlex_script, ldlex_popstate.
+ (ifile_p1): Likewise.
+ * ldlex.l (EOF): Don't BEGIN(SCRIPT). Restore lineno from the
+ correct slot.
+ (lex_push_file): Save current lineno to lineno_stack. Set lineno
+ to 1. Don't BEGIN(SCRIPT).
+ (lex_redirect): Similarly.
+ * ldmain.c (main): Set yydebug non-zero if YYDEBUG.
+
+2001-10-20 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * scripttempl/armcoff.sc: Define __EH_FRAME_BEGIN__ and
+ __EH_FRAME_END__ and accept eh frames into data section.
+ Add ctor and dtor sections.
+
+2001-10-19 Danny Smith <danny_r_smith_2001@yahoo.co.nz>
+
+ * pe-dll.c (autofilter_objectlist): Add gcrt0.o.
+ (auto-export): Fix indentation.
+
+2001-10-18 Danny Smith <danny_r_smith_2001@yahoo.co.nz>
+
+ * pe-dll.c (autofilter_objectlist): Add startup objects
+ for profiling.
+ (auto-export): Constify char * p.
+ Extract file basename and use strcmp rather than ststr
+ for object lookup.
+
+2001-10-18 Chris Demetriou <cgd@broadcom.com>
+
+ * ldmain.c (get_emulation): Improve comment about the handling
+ of -mipsN options.
+
+2001-10-17 Alan Modra <amodra@bigpond.net.au>
+
+ * po/POTFILES.in: Regenerate.
+
+2001-10-16 Vassili Karpov <malc@pulsesoft.com>
+
+ * emultempl/elf32.em (gld*_list_options): Remove extra '\t' from
+ -z nocopyreloc and -z nocombreloc usage strings.
+
+2001-10-12 Vassili Karpov <malc@pulsesoft.com>
+
+ * emultempl/elf32.em (gld*_list_options): Include -z nocopyreloc
+ in usage.
+
+2001-10-11 Aleksey Romanov <aromanov@ennovatenetworks.com>
+
+ * scripttempl/armaout.sc: Place .bss section after end of aligned
+ data section to match behaviour of aout code in constructrion of
+ header.
+
+2001-10-11 Danny Smith <danny_r_smith_2001@yahoo.co.nz>
+
+ * pe-dll.c (autofilter_entry_type autofilter_liblist: Add
+ startup files for mingw32 dlls to list.
+
+2001-10-10 Chris Demetriou <cgd@broadcom.com>
+
+ * emultempl/elf32.em: Fix shell 'if' usage for portability.
+
+2001-10-08 Aldy Hernandez <aldyh@redhat.com>
+
+ * configure.tgt (targ): Add arm9e-*-elf.
+
+2001-10-05 H.J. Lu <hjl@gnu.org>
+
+ * genscripts.sh: Fix a typo in the last change.
+
+2001-10-05 Jakub Jelinek <jakub@redhat.com>
+
+ * emultempl/elf32.em (gld_*_list_options): Include -z combreloc and
+ -z nocombreloc in usage.
+
+2001-10-03 Jim Blandy <jimb@redhat.com>
+
+ * genscripts.sh: Include a comment at the top of each generated
+ script, explaining its purpose.
+
+2001-10-03 Vassili Karpov <malc@pulsesoft.com>
+
+ * emultempl/elf32.em (parse_args): Handle -z nocopyreloc.
+ * NEWS: Mention -z nocopyreloc.
+ * ld.texinfo (Options): Describe nocopyreloc.
+
+2001-10-03 Alan Modra <amodra@bigpond.net.au>
+
+ * configure: Regenerate.
+
+2001-10-02 Alan Modra <amodra@bigpond.net.au>
+
+ * ldver.h (ld_program_version): Remove declaration.
+ * lexsup.c (parse_args): Move printing of copyright message..
+ * ldver.c (ldversion): .. to here.
+ Use BFD_VERSION_STRING in place of BFD_VERSION.
+ (ld_program_version): Remove.
+ * Makefile.am (Makefile): Depend on bfd/configure.in.
+ Run "make dep-am".
+ * Makefile.in: Regenerate.
+
+2001-09-30 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * Makefile.am: Update dependencies with "make dep-am".
+ * Makefile.in: Regenerate.
+
+2001-09-29 John Reiser <jreiser@BitWagon.com>
+
+ * ldlang.c (lang_common): Conditionally inhibit Common allocation.
+ * lexsup.c: Add --no-define-common commandline option.
+ * ldgram.y: Add INHIBIT_COMMON_ALLOCATION script command.
+ * ldlex.l: Likewise.
+ * ld.h: Add command_line.inhibit_common_definition.
+ * ldmain.c (main): Initialize.
+ * ld.texinfo: Document.
+
+2001-09-26 Alan Modra <amodra@bigpond.net.au>
+
+ * ldmisc.c (USE_STDARG): Remove.
+ (info_msg): Define using VPARAMS, VA_OPEN, VA_FIXEDARG, VA_CLOSE.
+ (einfo): Likewise.
+ (minfo): Likewise.
+ (lfinfo): Likewise.
+
+ * ldmisc.h: Remove #ifdef ANSI_PROTOTYPES and non-ansi
+ declarations. Update copyright.
+
+2001-09-24 Charles Wilson <cwilson@ece.gatech.edu>
+
+ * pe-dll.c: Remove obsoleted declaration of
+ pe_get_data_import_dll_name.
+ (pe_create_import_fixup): Fix thinko.
+
+ * ld.texinfo(enable-auto-import): Clarify the explanation.
+
+2001-09-24 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * pe-dll.c (pe_create_import_fixup): Revert previous patch.
+ * emultemp/pe.em (pe_data_import_dll): Move definition outside of
+ DLL_SUPPORT controlled code.
+
+2001-09-24 Charles Wilson <cwilson@ece.gatech.edu>
+
+ * emultempl/pe.em(pe_data_import_dll): Make static.
+ (pe_get_data_import_dll_name): New accessor function.
+ * pe-dll.c(pe_create_import_fixup): call
+ pe_get_data_import_dll_name() from pe.em, instead of
+ directly accessing pe_data_import_dll variable from pe.em.
+
+2001-09-18 Bruno Haible <haible@clisp.cons.org>
+
+ * deffilep.y: Include "safe-ctype.h" instead of <ctype.h>.
+ (def_file_add_directive): Use ISSPACE instead of isspace.
+ (def_lex): Use ISDIGIT/ISXDIGIT/ISALPHA/ISALNUM instead of
+ isdigit/isxdigit/isalpha/isalnum.
+ * emultempl/aix.em: Include "safe-ctype.h" instead of <ctype.h>.
+ (gld${EMULATION_NAME}_read_file): Use ISSPACE instead of isspace.
+ * emultempl/elf32.em: Include "safe-ctype.h" instead of <ctype.h>.
+ (gld${EMULATION_NAME}_place_orphan): Use ISALNUM instead of
+ isalnum.
+ * emultempl/gld960c.em: Include "safe-ctype.h" instead of <ctype.h>.
+ (gld960_set_output_arch): Use ISUPPER/TOLOWER instead of
+ isupper/tolower.
+ * emultempl/sunos.em: Include "safe-ctype.h" instead of <ctype.h>.
+ (gld${EMULATION_NAME}_search_dir): Use ISDIGIT instead of isdigit.
+ * ldctor.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (ctor_prio): Use ISDIGIT instead of isdigit.
+ * ldfile.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (ldfile_open_file_search): Use ISALPHA instead of isalpha.
+ (ldfile_add_arch): Use ISUPPER/TOLOWER instead of
+ isupper/tolower.
+ * ldlang.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (stricpy): Use TOLOWER instead of isupper/tolower.
+ (lang_leave_overlay_section): Use ISALNUM instead of isalnum.
+ * ldlex.l: Include "safe-ctype.h" instead of <ctype.h>.
+ (lex_warn_invalid): Use ISPRINT instead of isprint.
+ * ldmain.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (main): For gettext, also set the LC_CTYPE locate facet.
+ (add_keepsyms_file): Use ISSPACE instead of isspace.
+ * lexsup.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (is_num, parse_args): Use ISDIGIT instead of isdigit.
+ * mpw-elfmips.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (gldelf32ebmip_place_orphan): Use ISALNUM instead of isalnum.
+ * mpw-eppcmac.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (gldppcmacos_read_file): Use ISSPACE instead of isspace.
+ * pe-dll.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (quoteput): Use ISSPACE instead of isspace.
+ (pe_dll_generate_implib, pe_process_import_defs): Use ISALNUM
+ instead of isalnum.
+
+2001-09-18 Alan Modra <amodra@bigpond.net.au>
+
+ * deffilep.y (def_stash_module): Constify "name" param.
+
+ * pe-dll.c: Replace CONST with const throughout.
+ (quick_symbol): Constify "n1", "n2", "n3" params.
+ (make_singleton_name_thunk): Constify "import" param. Make
+ "buffer_len" a size_t.
+ (make_import_fixup_entry): Constify "name", "fixup_name",
+ "dll_symname" params.
+ (pe_get16): Cast args of bfd_seek. Replace bfd_read with bfd_bread.
+ (pe_get32): Likewise.
+ (pe_implied_import_dll): Likewise.
+
+ * emultempl/beos.em (sort_by_file_name): Constify "ra", "rb".
+ (sort_by_section_name): Likewise.
+
+ * emultempl/pe.em: Move defines for arm_epoc_pe before bfd.h included.
+ (make_import_fixup): Cast printf arg, rel->address to long rather
+ than int.
+ (gld_${EMULATION_NAME}_after_open): Don't compare NULL against int.
+
+2001-09-15 Alan Modra <amodra@bigpond.net.au>
+
+ * ldmain.c (main): Rename BufferSize to ld_bufsz because HPUX
+ defines BufferSize. Increase buffer size by one.
+
+2001-09-14 Ralf Habacker <Ralf.Habacker@freenet.de>
+
+ * pe-dll.c (pe_walk_relocs_of_symbol): Fix memory leak.
+
+2001-09-14 Kevin Lo <kevlo@openbsd.org>
+
+ * configure.tgt: Add arm-openbsd target.
+
+2001-09-12 H.J. Lu <hjl@gnu.org>
+
+ * Makefile.am (ALL_EMULATIONS): Move eelf64ppc.o and
+ eelf64lppc.o to ...
+ (ALL_64_EMULATIONS): Here.
+ * Makefile.in: Regenerated.
+
+2001-09-12 Paul Sokolovsky <Paul.Sokolovsky@technologist.com>
+
+ * emultempl/pe.em(make_import_fixup): change signature to
+ take asection as well as arelec; we need this for proper
+ error reporting. Only call pe_create_import_fixup() if
+ there is no attempt to add a constant addend to the reloc;
+ otherwise, report error condition.
+ * pe-dll.c(pe_walk_relocs_of_symbol): change signature,
+ since final argument is a pointer to make_import_fixup().
+ Change call to cb() to match make_import_fixup() signature.
+ (make_import_fixup_mark): make buffer_len unsigned.
+ * pe-dll.h: change signature of pe_walk_relocs_of_symbol.
+
+2001-09-12 Charles Wilson <cwilson@ece.gatech.edu>
+
+ * ld.texinfo: add verbose documentation for auto-import
+ direct-addressing workaround, to compliment the terse
+ error message.
+
+2001-09-12 Andrew MacLeod <amacleod@redhat.com>
+
+ * scripttempl/v850.sc: Add gcc_except_table sections.
+
+Fri Sep 7 11:34:24 2001 Jeffrey A Law (law@cygnus.com)
+
+ * emulparams/h8300helf.sh: Move stack to a much higher memory address.
+ * emulparams/h8300self.sh: Similarly.
+
+2001-09-05 Danny Smith <dannysmith@users.souceforge.net>
+
+ * ld.texinfo (Options, --stack): Correct default value for stack
+ reserve.
+
+2001-09-05 Tom Rix <trix@redhat.com>
+
+ * emultempl/aix.em : Handle import file XMC_XO and syscall symbols.
+
+2001-09-03 Andreas Jaeger <aj@suse.de>
+
+ * emultempl/beos.em: Declare prototypes for comparions functions,
+ adjust definitions.
+
+2001-09-02 Andreas Jaeger <aj@suse.de>
+
+ * emultempl/aix.em: Add missing prototype.
+ * emultempl/lnk960.em: Likewise.
+ * emultempl/vanilla.em: Likewise.
+ * emultempl/armcoff.em: Likewise.
+ * emultempl/armelf_oabi.em: Likewise.
+ * emultempl/beos.em: Likewise.
+ * emultempl/gld960c.em: Likewise.
+ * emultempl/gld960.em: Likewise.
+
+ * emulparams/elf64alpha.sh (PARSE_AND_LIST_PROLOGUE): Add parameter
+ for prototype declaration.
+
+2001-08-31 Eric Christopher <echristo@redhat.com>
+ Jason Eckhardt <jle@redhat.com>
+
+ * ldmain.c (get_emulation): Add support for -mips32 and -mips64.
+
+2001-08-31 Andreas Jaeger <aj@suse.de>
+
+ * emultempl/pe.em: Add missing prototypes.
+ (gld_${EMULATION_NAME}_after_open): Remove extra args to
+ pe_find_data_imports.
+ (pr_sym): Add unused attribute.
2001-08-29 Joel Sherrill <joel@OARcorp.com>
- * configure.tgt (i[3456]86-*-rtems*, m68*-*-rtems*): Change
+ * configure.tgt (i[3456]86-*-rtems*, m68*-*-rtems*): Change
default from coff to elf.
+2001-08-29 Jeff Law <law@redhat.com>
+
+ * emulparams/h8300helf.sh: Resync with h8300elf.sh. Update
+ ARCH specification.
+ * emulparams/h8300self.sh: Similarly.
+
+Wed Aug 28 13:37:20 2001 J"orn Rennecke <amylaar@redhat.com>
+
+ * Makefile.am (ALL_EMULATIONS): Add eh8300elf.o, eh8300elf.o and
+ eh8300self.o .
+ (eh8300elf.c, eh8300helf.c, eh8300self.c): New targets.
+ * configure.tgt (h8300-*-elf*): New case.
+ * emulparams/h8300elf.sh, emulparams/h8300helf.sh: New files.
+ * emulparams/h8300self.sh: New file.
+ * Makefile.in: Regenerated.
+
+2001-08-28 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * ldmain.c (main): Rename BSIZE to BufferSize to avoid collision
+ with macro name.
+
+2001-08-27 Linus Nordberg <linus@swox.com>
+ Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am (ALL_EMULATIONS): Add eelf64ppc.o and eelf64lppc.o.
+ (eelf64ppc.c, eelf64lppc.c): Add make targets.
+ Run "make dep-am"
+ * Makefile.in: Regenerate.
+ * configure.tgt: Add powerpc64 support. Move pdp11, pjl, pj
+ entries to correct alphabetical position.
+ * emulparams/elf64ppc.sh: New.
+ * emulparams/elf64lppc.sh: New.
+
+2001-08-27 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * ldmain.c (main): Declare BSIZE as static.
+
+2001-08-23 Jakub Jelinek <jakub@redhat.com>
+
+ * emultempl/elf32.em (place_orphan): Place orphan .rel* sections
+ into .rel.dyn resp. .rela.dyn if combreloc.
+ (get_script): If .x linker script is equal to .xn, only put it
+ once into the binary.
+ Add .xc and .xsc scripts.
+ (parse_args): Handle -z combreloc and -z nocombreloc.
+ * scripttempl/elf.sc (.rela.sbss): Fix a typo.
+ For .xc and .xsc scripts put all .rel* or .rela* input sections
+ but .rel*.plt and PLT-like sections into .rel.dyn resp. .rela.dyn.
+ * genscripts.sh (GENERATE_COMBRELOC_SCRIPT): Set if SCRIPT_NAME
+ is elf.
+ Strip trailing whitespace from script.
+ Generate .xc and .xsc scripts if requested.
+ * ldmain.c (main): Initialize link_info.combreloc and
+ link_info.spare_dynamic_tags.
+ * lexsup.c (OPTION_SPARE_DYNAMIC_TAGS): Define.
+ (ld_options): Add --spare-dynamic-tags option.
+ (parse_args): Likewise.
+ * ld.texinfo: Document -z combreloc and -z nocombreloc.
+ * ldint.texinfo: Document .xc and .xsc linker scripts.
+ * NEWS: Add notes about -z combreloc and SHF_MERGE.
+
+2001-08-22 H.J. Lu <hjl@gnu.org>
+
+ * emulparams/elf32fr30.sh: Add a newline.
+
+2001-08-21 Andreas Jaeger <aj@suse.de>
+
+ * deffilep.y: Add missing prototypes.
+ * pe-dll.c: Likewise.
+
+2001-08-20 Alan Modra <amodra@bigpond.net.au>
+
+ * ldlang.c (insert_pad): Fix typos in last patch.
+
+ * ldlang.c: When traversing lang_statement_union_type lists,
+ consistently use "header.next" rather than "next".
+ * mpw-eppcmac.c: Likewise.
+ * emultempl/beos.em: Likewise.
+ * emultempl/hppaelf.em: Likewise.
+ * emultempl/pe.em: Likewise.
+ * ldlang.h (union lang_statement_union): Remove "next" field.
+
+ * ldlang.c (insert_pad): Use offsetof macro.
+ (lang_size_sections): Always neuter padding statements.
+ * emultempl/hppaelf.em (hppaelf_delete_padding_statements): Delete.
+
+ * pe-dll.c (pe_dll_fill_sections): Correct type of "relax" param
+ passed to lang_size_sections.
+ (pe_exe_fill_sections): Likewise.
+ * emultempl/pe.em (output_prev_sec_find): Copied from elf32.em.
+ (gld_${EMULATION_NAME}_place_orphan): Merge from elf32.em.
+
+2001-08-18 Alan Modra <amodra@bigpond.net.au>
+
+ * emultempl/aix.em: Formatting fixes.
+
+2001-08-18 Alan Modra <amodra@bigpond.net.au>
+
+ * ldlang.c (insert_pad): Make use of an existing pad statement if
+ available. Move code calculating alignment, adjusting section
+ alignment power, and adjusting dot to ..
+ (size_input_section): .. here. Remove unused relax param.
+ (lang_size_sections): Change boolean `relax' param to boolean *.
+ Adjust call to size_input_section. Make use of insert_pad to
+ place pad after the assignment statement. If relaxing, zap
+ padding statements.
+ (reset_memory_regions): Reset output_bfd section sizes too.
+ (relax_again): Move to..
+ (lang_process): ..here. Adjust call to lang_size_sections, and
+ remove duplicated code.
+ * ldlang.h (lang_size_sections): Change `relax' param to boolean *.
+
+2001-08-17 Alan Modra <amodra@bigpond.net.au>
+
+ * ld.texinfo: Document that fill values now use the four least
+ significant bytes.
+ * emulparams/elf32fr30.sh (NOP): Update.
+ * emulparams/elf32mcore.sh: Likewise.
+ * emulparams/elf64_s390.sh: Likewise.
+ * emulparams/elf_i386.sh: Likewise.
+ * emulparams/elf_i386_be.sh: Likewise.
+ * emulparams/elf_i386_chaos.sh: Likewise.
+ * emulparams/elf_i386_ldso.sh: Likewise.
+ * emulparams/elf_s390.sh: Likewise.
+ * emulparams/elf_x86_64.sh: Likewise.
+ * emulparams/i386moss.sh: Likewise.
+ * emulparams/i386nw.sh: Likewise.
+ * emulparams/m68kelf.sh: Likewise.
+ * scripttempl/elf.sc: Update NOP comment.
+ * scripttempl/elfi370.sc: Likewise.
+ * scripttempl/elfm68hc11.sc: Likewise.
+ * scripttempl/elfm68hc12.sc: Likewise.
+ * scripttempl/nw.sc: Likewise.
+
+2001-08-15 Tom Rix <trix@redhat.com>
+
+ * ldgram.y (saved_script_handle): Initialize to NULL.
+ * ldmain.c (main): Change check on saved_script_handle.
+
+2001-08-14 Alan Modra <amodra@bigpond.net.au>
+
+ * emultempl/elf32.em: Formatting fixes.
+ (output_prev_sec_find): Test for bfd_ind_section too; do so by
+ looking at sec->owner.
+ (output_rel_find): Move function inside LDEMUL_PLACE_ORPHAN test.
+ (gld${EMULATION_NAME}_place_orphan): Add a few comments. Remove
+ unused code, and reorganize orphan section placement code.
+
+ * ldlang.c (wild_doit): Rename to lang_add_section.
+ * ldlang.h: Here too.
+ * mpw-elfmips.c: And here.
+ * emultempl/beos.em: And here.
+ * emultempl/elf32.em: And here.
+ * emultempl/hppaelf.em: And here.
+ * emultempl/pe.em: And here.
+
2001-08-13 Richard Henderson <rth@redhat.com>
* emultempl/needrelax.em: New file.
@@ -25,28 +1034,284 @@
* Makefile.am (eelf64_ia64.c): Depend on it.
* Makefile.in: Rebuild.
+2001-08-13 Alan Modra <amodra@bigpond.net.au>
+
+ * emultempl/elf32.em: For SEC_EXCLUDE sections, ensure that
+ output_section is set non-NULL.
+
+ * emultempl/elf32.em (gld${EMULATION_NAME}_place_orphan): Return
+ `true' for SEC_EXCLUDE sections so that the generic code doesn't
+ needlessly create an output_section_statement. Treat a correctly
+ named output_section_statement with NULL bfd_section as compatible.
+
+2001-08-13 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * emultempl/generic.em: Support EXTRA_EM_FILE.
+ (ld_${EMULATION_NAME}_emulation): Support emulation parameters
+ LDEMUL_BEFORE_PARSE, LDEMUL_SYSLIB, LDEMUL_HLL,
+ LDEMUL_AFTER_PARSE, LDEMUL_AFTER_OPEN, LDEMUL_AFTER_ALLOCATION,
+ LDEMUL_SET_OUTPUT_ARCH, LDEMUL_CHOOSE_TARGET,
+ LDEMUL_BEFORE_ALLOCATION, LDEMUL_GET_SCRIPT, LDEMUL_FINISH,
+ LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS,
+ LDEMUL_OPEN_DYNAMIC_ARCHIVE, LDEMUL_PLACE_ORPHAN,
+ LDEMUL_SET_SYMBOLS, LDEMUL_PARSE_ARGS, LDEMUL_UNRECOGNIZED_FILE,
+ LDEMUL_LIST_OPTIONS, LDEMUL_RECOGNIZED_FILE,
+ LDEMUL_FIND_POTENTIAL_LIBRARIES.
+
+2001-08-12 Richard Henderson <rth@redhat.com>
+
+ * scripttempl/elf.sc, scripttempl/elfd30v.sc,
+ scripttempl/elfm68hc11.sc, scripttempl/elfm68hc12.sc,
+ scripttempl/v850.sc: Keep .jcr data.
+
+2001-08-12 H.J. Lu <hjl@gnu.org>
+ Andrew Haley <aph@cambridge.redhat.com>
+ Nick Clifton <nickc@redhat.com>
+
+ * ldgram.y (had_script): Change name to saved_script_handle.
+ Change type to file handle.
+ * ld.h (had_script): Rename and retype.
+ * ldfile.c (ldfile_open_command_file): Save the file handle
+ used in saved_script_handle.
+ * lexsup.c (parse_args): Do not allow -c option to alter
+ saved_script_handle.
+ * ldmain.c (main): Print out the linker script used if
+ --verbose is given. Check saved_script_handle to obtain the
+ external linker script used, or if NULL, dump the builtin
+ script.
+ * ld.texinfo: Document that --verbose now dumps the linker
+ script used, regardless of whether it was an internal or an
+ external script.
+
+2001-08-10 Andreas Jaeger <aj@suse.de>
+
+ * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
+ to build warnings.
+ * configure: Regenerate.
+
+2001-08-09 Alan Modra <amodra@bigpond.net.au>
+
+ * emultempl/elf32.em (output_prev_sec_find): Add missing prototype.
+
+ * scripttempl/elf.sc: Move non-text .dynamic section before
+ .plt/.got/.sdata* group.
+ (OTHER_GOT_SECTIONS): Move to immediately after .got.
+ (OTHER_SDATA_SECTIONS): Add.
+ * emulparams/criself.sh: Use OTHER_SDATA_SECTIONS rather than
+ OTHER_GOT_SECTIONS.
+ * emulparams/crislinux.sh: Likewise.
+ * emulparams/elf32b4300.sh: Likewise.
+ * emulparams/elf32bmip.sh: Likewise.
+ * emulparams/elf32bmipn32.sh: Likewise.
+ * emulparams/elf32bsmip.sh: Likewise.
+ * emulparams/elf32btsmip.sh: Likewise.
+ * emulparams/elf32ebmip.sh: Likewise.
+ * emulparams/elf32elmip.sh: Likewise.
+ * emulparams/elf32l4300.sh: Likewise.
+ * emulparams/elf32lmip.sh: Likewise.
+ * emulparams/elf32lsmip.sh: Likewise.
+ * emulparams/elf32ltsmip.sh: Likewise.
+ * emulparams/elf64bmip.sh: Likewise.
+ * emulparams/elf64btsmip.sh: Likewise.
+ * emulparams/elf64ltsmip.sh: Likewise.
+
+2001-08-08 Alan Modra <amodra@bigpond.net.au>
+
+ * genscripts.sh: Source the emulparams script before each output
+ script is generated so that variables like `RELOCATING' may affect
+ variables defined in the emulparams script.
+
+2001-08-04 Alan Modra <amodra@bigpond.net.au>
+
+ * emultempl/aix.em: ldexp.h,ldlang.h,ldfile.h,ldemul.h go in this
+ order.
+
+ * emultempl/beos.em (sort_sections): Modify for 2001-08-03 change,
+ ie. iterate over wild_statement.section_list.
+ (gld${EMULATION_NAME}_place_orphan): Likewise.
+
+2001-08-03 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * scripttempl/elfm68hc12.sc (FINISH_CODE, FINISH_RELOC): New to handle
+ .fini[0-4] sections used by _exit
+ (CTOR, DTOR): Export ctor/dtor symbols; move them to ROM.
+ (*.text,*.data,*.bss): Take into account .text.*, .data.*, .bss.*.
+ * scripttempl/elfm68hc11.sc: Likewise.
+
+2001-08-03 H.J. Lu <hjl@gnu.org>
+
+ * emultempl/beos.em (init): Add the missing initialization.
+
+2001-08-03 Alan Modra <amodra@bigpond.net.au>
+
+ * ld.texinfo (Input Section Basics): Clarify ordering of output
+ sections.
+ * ldlang.c (callback_t): Add wildcard_list param.
+ (walk_wild_section): Remove "section" param. Rewrite for
+ lang_wild_statement_type change. Remove unique_section_p test.
+ (walk_wild_file): Remove "section" param.
+ (walk_wild): Remove "section" and "file" params.
+ (lang_gc_wild): Likewise.
+ (wild): Likewise. Modify for lang_wild_statement_type change.
+ (wild_sort): Likewise. Add "sec" param.
+ (gc_section_callback): Likewise.
+ (output_section_callback): Likewise. Do unique_section_p test.
+ (map_input_to_output_sections): Modify call to wild.
+ (lang_gc_sections_1): Likewise.
+ (print_wild_statement): Modify for lang_wild_statement_type
+ change.
+ (lang_add_wild): Replace filename, filenames_sorted param with
+ filespec. Replace section_name, sections_sorted,
+ exclude_filename_list with section_list.
+ * ldlang.h (lang_add_wild): Here too.
+ (lang_wild_statement_type): Replace section_name, sections_sorted,
+ and exclude_filename_list with section_list.
+ * ldgram.y (current_file): Delete.
+ (%union): Add wildcard_list.
+ (file_NAME_list): Set type to wildcard_list. Build a linked list
+ rather than calling lang_add_wild for each entry.
+ (input_section_spec_no_keep): Call lang_add_wild here instead.
+ * ld.h (struct wildcard_list): Declare.
+ * mri.c (mri_draw_tree): Modify to suit new lang_add_wild.
+
+2001-08-02 Charles Wilson <cwilson@ece.gatech.edu>
+
+ * ldmain.c (main): initialize link_info.pei386_auto_import
+ * pe-dll.c: new tables for auto-export filtering
+ (auto_export): change API, pass abfd for contextual filtering.
+ Loop thru tables of excluded symbols instead of comparing
+ "by hand".
+
+2001-08-02 Paul Sokolovsky <paul.sokolovsky@technologist.com>
+
+ * pe-dll.c: new variable pe_dll_enable_extra_debug. New
+ static variable current_sec (static struct sec *). Add
+ forward declaration for add_bfd_to_link.
+ (process_def_file): Don't export undefined symbols. Do not
+ export symbols starting with "_imp__". Call auto_export()
+ with new API.
+ (pe_walk_relocs_of_symbol): New function.
+ (generate_reloc): add optional extra debugging
+ (pe_dll_generate_def_file): eliminate extraneous initial blank
+ line in output
+ (make_one): enlarge symtab to make room for __nm__ symbols
+ (DATA auto-import support).
+ (make_singleton_name_thunk): New function.
+ (make_import_fixup_mark): New function.
+ (make_import_fixup_entry): New function.
+ (pe_create_import_fixup): New function.
+ (add_bfd_to_link): Specify that 'name' argument is a CONST
+ char *.
+ * pe-dll.h: declare new variable pe_dll_extra_pe_debug;
+ declare new functions pe_walk_relocs_of_symbol and
+ pe_create_import_fixup.
+ * emultempl/pe.em: add new options --enable-auto-import,
+ --disable-auto-import, and --enable-extra-pe-debug.
+ (make_import_fixup): New function.
+ (pe_find_data_imports): New function.
+ (pr_sym): New function.
+ (gld_${EMULATION_NAME}_after_open): Add optional extra pe
+ debugging. Call pe_find_data_imports. Mark .idata as DATA, not
+ CODE.
+
+2001-08-02 Charles Wilson <cwilson@ece.gatech.edu>
+
+ * ld.texinfo: add additional documentation for
+ --export-all-symbols. Document --out-implib,
+ --enable-auto-image-base, --disable-auto-image-base,
+ --dll-search-prefix, --enable-auto-import, and
+ --disable-auto-import.
+ * ldint.texinfo: Add detailed documentation on auto-import
+ implementation.
+
2001-07-30 Nick Clifton <nickc@cambridge.redhat.com>
* ld.texinfo (Simple Assignments): Fix computation in SECTIONS
example.
-2001-07-19 David O'Brien <obrien@FreeBSD.org>
+2001-07-24 Alan Modra <amodra@bigpond.net.au>
- * emultempl/elf32.em: Do not assuming that contents of the buffer
- returned from basename function will remain unchanged accross other
- function calls.
+ * Makefile.am: Update dependencies with "make dep-am".
+ * Makefile.in: Regenerate
+
+2001-07-23 Alan Modra <amodra@bigpond.net.au>
+
+ * ldcref.c (check_section_sym_xref): New function.
+ (check_nocrossrefs): Call it.
+ (check_nocrossref): Interate over h->refs here instead of..
+ (check_refs): ..here. Pass in the symbol name, section, and bfd
+ rather than hash_entry pointers.
+ (struct check_refs_info): Keep symbol name rather than hash entry.
+ Remove "same".
+ (check_reloc_refs): Tweak for above changes in check_refs_info.
+ Only report references to section syms when symname is NULL to
+ prevent duplicate messages for the same reloc.
2001-07-19 Nick Clifton <nickc@cambridge.redhat.com>
+ * ldexp.c (exp_print_tree): Use stderr if config.map_file is not
+ available. Do not print NULL trees.
+ (exp_print_token): Print unknown tokens with values > 126 as
+ decimal values not ASCII characters.
+
* ldlang.c (lang_leave_overlay): If a region is specified assign
it to all sections inside the overlay unless they have been
assigned to the own, non-default, memory region.
+ * README: Add header for consistency with other README files.
+
+2001-07-14 H.J. Lu <hjl@gnu.org>
+
+ * emultempl/elf32.em (output_prev_sec_find): Never return
+ bfd_abs_section_ptr, bfd_com_section_ptr nor
+ bfd_und_section_ptr.
+
+2001-07-14 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * Makefile.am (em32relf.c): Change dependency from generic.em to
+ elf32.em.
+ * Makefile.in: Regenerate.
+
2001-07-14 matthew green <mrg@eterna.com.au>
* configure.tgt (i386-*-netbsdelf*): New target.
(i386-*-netbsd*): Set targ_extra_emuls to `elf_i386'
+2001-07-13 Jakub Jelinek <jakub@redhat.com>
+
+ * emultempl/elf32.em (output_prev_sec_find): New.
+ (place_orphan): Use it.
+
+2001-07-11 H.J. Lu <hjl@gnu.org>
+
+ * ldmain.c (main): Fix typos in the last change.
+
+2001-07-11 Jakub Jelinek <jakub@redhat.com>
+
+ * ldmain.c (main): Disallow -F and -f without -shared.
+
+2001-07-11 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * emultempl/pe.em (after_open): Check for the output_bfd not
+ having any coff_data structure allocated to it.
+
+2001-07-09 David O'Brien <obrien@FreeBSD.org>
+
+ * emultempl/elf32.em: Do not assuming that contents of the buffer
+ returned from basename function will remain unchanged accross other
+ function calls.
+
+2001-07-03 H.J. Lu <hjl@gnu.org>
+
+ * scripttempl/elf.sc (DYNAMIC_PAD): Revert the change made on
+ 2001-07-03. It creates dynamic entries even for static binaries.
+
+2001-07-03 Jakub Jelinek <jakub@redhat.com>
+
+ * scripttempl/elf.sc (DYNAMIC_PAD): New variable.
+ (DYNAMIC): Use it to reserve few dynamic entries for
+ post-linking tools.
+
2001-06-27 Alan Modra <amodra@bigpond.net.au>
* emulparams/hppa64linux.sh: New file.
@@ -56,87 +1321,236 @@
Run "make dep-am".
* Makefile.in: Regenerate.
-2001-06-07 Andreas Jaeger <aj@suse.de>
+2001-06-21 Hans-Peter Nilsson <hp@axis.com>
- * elf_x86_64.sh (NONPAGED_TEXT_START_ADDR): Increase.
- (TEXT_START_ADDR): Likewise.
+ * ld.texinfo (Options, -r): Mention restrictions when using
+ different object formats.
-2001-06-11 Alan Modra <amodra@bigpond.net.au>
+2001-06-19 Hans-Peter Nilsson <hp@axis.com>
- Merge from mainline.
- 2001-06-05 Danny Smith <danny_r_smith_2001@yahoo.co.nz>
- * emultempl/pe.em (init): Reduce default stack reserve to 0x200000.
+ * ldlang.c (lang_check): Emit fatal error if relocatable link
+ between different object flavours with relocations in input.
- 2001-05-25 Alan Modra <amodra@one.net.au>
- * configure.host: Replace linuxoldld with linux*oldld.
- * configure.tgt: Likewise.
+2001-06-19 H.J. Lu <hjl@gnu.org>
- 2001-05-14 DJ Delorie <dj@delorie.com>
- * Makefile.am (ld.dvi): Search bfd/doc for texinfo files.
- * Makefile.in: Ditto.
+ * ld.texinfo (-E, --export-dynamic): Mention --version-script.
+ (--version-script): Mention the language support.
- 2001-04-05 Steven J. Hill <sjhill@cotw.com>
- * Makefile.am (ALL_EMULATIONS): Add eelf32ltsmip.o.
- (ALL_64_EMULATIONS): Add eelf64btsmip.o and eelf64ltsmip.o.
- (eelf32ltsmip.c): New target.
- (eelf64btsmip.c): Likewise.
- (eelf64ltsmip.c): Likewise.
+2001-06-19 H.J. Lu <hjl@gnu.org>
+
+ * ldlang.c (lang_check): Revert the change mode on 2001-06-15.
+
+2001-06-18 H.J. Lu <hjl@gnu.org>
+
+ * Makefile.am (ld.1): Remove the prefix `$(srcdir)/'.
+ (diststuff): Add $(MANS).
* Makefile.in: Regenerated.
- * configure.tgt (mips*el-*-linux-gnu): Uses traditional MIPS
- target.
- (mips*-*-linux-gnu*): Likewise.
- * emulparams/elf32ltsmip.sh: New. Traditional little endian
- MIPS taget.
- * emulparams/elf64btsmip.sh: New. Traditional 64bit big endian
- target.
- * emulparams/elf64ltsmip.sh: New. Traditional 64bit little
- endian target.
- 2001-02-27 Alan Modra <alan@linuxcare.com.au>
- * configure.in (BFD_VERSION): New.
- (AM_INIT_AUTOMAKE): Use $BFD_VERSION.
- * configure: Regenerate.
+ * ld.1: Removed.
- 2001-02-13 H.J. Lu <hjl@gnu.org>
- * ldexp.h (node_type): Add etree_provided.
- * ldexp.c (exp_fold_tree): Handle etree_provided. Set the node
- type to etree_provided if defined by PROVIDE. Allow updating
- for etree_provided.
- (exp_print_tree): Handle etree_provided.
- * mpw-elfmips.c (gldelf32ebmip_find_exp_assignment): Handle
- etree_provided.
+2001-06-18 Hans-Peter Nilsson <hp@axis.com>
-2001-06-10 Philip Blundell <philb@gnu.org>
+ * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
+ Update for API change in bfd_elf${ELFSIZE}_size_dynamic_sections.
+ * mpw-elfmips.c (gldelf32ebmip_before_allocation): Ditto.
+ * ld.h (args_type): Remove member export_dynamic. All users
+ changed to use struct bfd_link_info member.
- * configure.in: Set version to 2.11.1.
- * configure: Regenerate.
+ * Makefile.am (ecriself.c, ed10velf.c, ei386moss.c): Depend on
+ $(srcdir)/emultempl/elf32.em, not $(srcdir)/emultempl/generic.em.
+ * Makefile.in: Regenerate.
+
+2001-06-18 H.J. Lu <hjl@gnu.org>
+
+ * ldlang.c (init_os): Add the newline to the einfo call.
+ (lang_check): Likewise.
+ (lang_do_version_exports_section): Likewise.
+
+2001-06-15 H.J. Lu <hjl@gnu.org>
+
+ * lexsup.c (parse_args); Save optind to report unrecognized
+ option.
+
+2001-06-15 Hans-Peter Nilsson <hp@axis.com>
+
+ * ldlang.c (lang_check): Emit fatal error if relocatable link
+ between different object flavours.
+
+ * lexsup.c (parse_args) <case OPTION_EXPORT_DYNAMIC, case 'E'>:
+ Set new link_info member export_dynamic.
+ * ldmain.c (main): Initialize new link_info member export_dynamic.
+
+2001-06-12 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * ldlang.c (walk_wild): Only call walk_wild_file if
+ lookup_name returns something.
+ (lookup_name): If load_symbols fails, return NULL.
+ (load_symbols): Change to a boolean function.
+ (open_input_bfds): If load_symbols fails then do not make the
+ executable.
2001-06-08 Alan Modra <amodra@bigpond.net.au>
* ldlang.c (record_bfd_errors): Remove.
- Merge from mainline.
- 2001-05-31 H.J. Lu <hjl@gnu.org>
+ * emultempl/aix.em: Fix copyright dates.
+
+2001-06-07 Andreas Jaeger <aj@suse.de>
+
+ * elf_x86_64.sh (NONPAGED_TEXT_START_ADDR): Increase.
+ (TEXT_START_ADDR): Likewise.
+
+2001-06-06 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * configure.host: Set HOSTING_CRT0/HOSTING_LIBS correctly for s/390.
+
+2001-06-05 Danny Smith <danny_r_smith_2001@yahoo.co.nz>
+
+ * emultempl/pe.em (init): Reduce default stack reserve to 0x200000.
+
+2001-05-31 H.J. Lu <hjl@gnu.org>
+
* ldlang.c (open_input_bfds): Don't change the bfd error
handler whilst loading symbols.
- 2001-05-02 Nick Clifton <nickc@redhat.com>
- * emultempl/aix.em: Replace buystring with xstrdup.
- * emultempl/beos.em: Replace buystring with xstrdup.
+2001-05-28 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * configure.tgt: Remove i370-mvs architecture, it is not currently
+ supported.
+
+2001-05-25 H.J. Lu <hjl@gnu.org>
+
+ * emulparams/ppcmacos.sh: Add SYSCALL_MASK and SYMBOL_MODE_MASK
+ like emulparams/aixppc.sh.
+
+2001-05-25 H.J. Lu <hjl@gnu.org>
+
+ * emultempl/beos.em (gld${EMULATION_NAME}_before_parse): Move
+ setting of output_filename after bfd_scan_arch.
+ * emultempl/pe.em: Likewise.
+
+2001-05-25 H.J. Lu <hjl@gnu.org>
+
+ * emulparams/aixrs6.sh: Add SYSCALL_MASK and SYMBOL_MODE_MASK
+ like emulparams/aixppc.sh.
+
+ * emultempl/aix.em (sc): Use ${srcdir}/emultempl/ostring.sed
+ instead of ${srcdir}/emultempl/stringify.sed.
+
+2001-05-25 Timothy Wall <twall@oculustech.com>
-2001-06-07 Alan Modra <amodra@bigpond.net.au>
+ * emulparams/elf64_aix.sh: Change settings to match IBM linker
+ output.
- * Many files: Update copyright notices.
+2001-05-25 Alan Modra <amodra@one.net.au>
-2001-05-23 Alan Modra <amodra@one.net.au>
+ * configure.host: Replace linuxoldld with linux*oldld.
+ * configure.tgt: Likewise.
+
+2001-05-24 H.J. Lu <hjl@gnu.org>
+
+ * emultempl/stringify.sed: Removed again.
+
+2001-05-24 H.J. Lu <hjl@gnu.org>
+
+ * emultempl/aix.em (OUTPUT_ARCH): Defined.
+ (gld${EMULATION_NAME}_before_parse): Initialize
+ ldfile_output_architecture, ldfile_output_machine and
+ ldfile_output_machine_name from ${OUTPUT_ARCH} if possible.
+ * emultempl/beos.em: Likewise.
+ * emultempl/elf32.em: Likewise.
+ * emultempl/linux.em: Likewise.
+ * emultempl/mipsecoff.em: Likewise.
+ * emultempl/pe.em: Likewise.
+ * emultempl/sunos.em: Likewise.
+
+2001-05-24 Tom Rix <trix@redhat.com>
+
+ * emultempl/aix.em : (gld${EMULATION_NAME}_read_file)
+ udate import file format.
+ (change_symbol_mode) New, same
+ (is_syscall) New, same
+ * emulparams/aixppc.sh : add SYSCALL_MASK and SYMBOL_MODE_MASK
+ * emulparams/aixppc64.sh : same
+ * emulparams/aixrs6.sh : same
+ * emulparams/ppcmacos.sh : same
+ * emultempl/aix.em : use strtoull to parse options
+ * Makefile.am : add eaixppc64 emulation for xcoff64
+ * Makefile.in : same
+ * configure.tgt : same
+
+ * scripttempl/aix.sc : default text section offset to 0x10000000
+ default data section offset to 0x20000000
+ add .sv3264 and .sv64 pseudo sections
+ loader and debug sections use the currect section offset.
+
+ * emultempl/aix.em : Add xcoff64 support
+ Add -binitfini support
+ (gld${EMULATION_NAME}_before_parse) -binitfini
+ (gld${EMULATION_NAME}_parse_args) same
+ (gld${EMULATION_NAME}_before_allocation) format change for special
+ sections
+
+ * emulparams/aixppc64.sh : New file for xcoff64 support
+
+2001-05-23 Alexandre Oliva <aoliva@redhat.com>
+
+ * emultempl/elf32.em (ELF_INTERPRETER_SET_DEFAULT): Use this new
+ variable to avoid non-portable shell construct.
+
+2001-05-23 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * ldmain.c (get_emulation): Add -mips5 command line argument.
+
+2001-05-22 Alexandre Oliva <aoliva@redhat.com>
+
+ * emulparams/elf_i386_ldso.sh: New, copied from elf_i386.sh.
+ (ELF_INTERPRETER_NAME): Define it.
+ * emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation): Use
+ it.
+ * configure.tgt (targ_emul, targ_extra_emuls)
+ [i[3456]86-*-solaris2*, i[3456]86-*-solaris*]: Use elf_i386_ldso
+ as primary, elf_i386 as extra.
+ * Makefile.am (ALL_EMULATIONS): Added eelf_i386_ldso.o.
+ (eelf_i386_ldso.c): New rule.
+ * Makefile.in: Rebuilt.
+
+2001-05-22 Nick Clifton <nickc@redhat.com>
+
+ * lexsup.c (ld_options): Allow -I to be an alias for
+ --dynamic-linker. This is for Solaris compatability.
+ * ld.texinfo: Document that -I can be used.
+ * ld.1: Regenerate.
+
+2001-05-16 Alan Modra <amodra@one.net.au>
* ldlang.c (wild_doit): Use linker_has_input to reliably determine
whether an input section is the first one assigned to an output
section.
Assorted formatting fixes.
- Merge from mainline.
- 2001-05-03 H.J. Lu <hjl@gnu.org>
+2001-05-14 DJ Delorie <dj@delorie.com>
+
+ * Makefile.am (ld.dvi): Search bfd/doc for texinfo files.
+ * Makefile.in: Ditto.
+
+2001-05-11 Jakub Jelinek <jakub@redhat.com>
+
+ * emulparams/elf64_ia64.sh (OTHER_READONLY_SECTIONS): Put
+ .gnu.linkonce.ia64unw{,i} sections into corresponding .IA_64.unwind*
+ output sections.
+ * emulparams/elf64_aix.sh (OTHER_READONLY_SECTIONS): Likewise.
+
+2001-05-11 Jakub Jelinek <jakub@redhat.com>
+
+ * ldlang.c (lang_process): Call bfd_merge_sections.
+
+2001-05-07 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * ldgram.y: Fix typo.
+
+2001-05-03 H.J. Lu <hjl@gnu.org>
+
* emultempl/elf32.em: Include "libiberty.h".
(gld${EMULATION_NAME}_vercheck): Call basename () to get the
basename of the bfd filename.
@@ -144,22 +1558,32 @@
(gld${EMULATION_NAME}_try_needed): Likewise.
(gld${EMULATION_NAME}_open_dynamic_archive): Likewise.
- 2001-03-17 Ulrich Drepper <drepper@redhat.com>
- * emultmpl/elf32.em (OPTION_GROUP): New macro.
- Add new option Bgroup to longopts.
- (gld*_parse_args): Handle GROUP_OPTION and recognize -z defs.
- (gld*_list_options): Add -Bgroup and -z defs.
- * ld.1: Document -Bgroup and -z defs.
- * ld.texinfo: Likewise.
+2001-05-02 H.J. Lu <hjl@gnu.org>
- 2001-02-01 Nick Clifton <nickc@redhat.com>
- * ld.1: Replace occurances of -oformat with --oformat.
+ * emultempl/pe.em: Include <ctype.h>.
+
+2001-05-02 Johan Rydberg <jrydberg@opencores.org>
+
+ * emulparams/elf32openrisc.sh: New file.
+
+ * Makefile.am: Add OpenRISC target.
+ * Makefile.in: Regenerated.
+
+ * configure.tgt: Add openrisc-*-* mapping.
+
+2001-05-02 Nick Clifton <nickc@redhat.com>
+
+ * emultempl/aix.em: Replace buystring with xstrdup.
+ * emultempl/beos.em: Replace buystring with xstrdup.
+
+2001-05-02 H.J. Lu <hjl@gnu.org>
- 2001-05-02 H.J. Lu <hjl@gnu.org>
* ldfile.c: Include "libiberty.h".
* ldlex.l: Likewise.
+
* ldmisc.c (buystring): Removed.
* ldmisc.h: Likewise.
+
* ldfile.c: Replace buystring with xstrdup.
* ldlang.c: Likewise.
* ldlex.l: Likewise.
@@ -168,16 +1592,73 @@
* lexsup.c: Likewise.
* mpw-eppcmac.c: Likewise.
- 2001-04-28 Paul Sokolovsky <Paul.Sokolovsky@technologist.com>
+2001-04-30 Andreas Jaeger <aj@suse.de>
+
+ * emulparms/elf_x86_64.sh (MAXPAGESIZE): Fix value.
+
+2001-04-28 Paul Sokolovsky <Paul.Sokolovsky@technologist.com>
+
* ldlang.c (load_symbols): Give emulation a chance
to process unrecognized file before fatal error is
reported, not after.
- 2001-02-26 H.J. Lu <hjl@gnu.org>
- * ldlang.c (open_input_bfds): Set the bfd error handler so
- that problems can be caught whilst loading symbols.
- (record_bfd_errors): New function: Report BFD errors and mark
- the executable output as being invalid.
+2001-04-27 Sean McNeil <sean@mcneil.com>
+
+ * configure.tgt: Add arm-vxworks target.
+ * scripttempl/armcoff.sc: Support .text or .data as a section name
+ prefix.
+ Define _etext.
+
+2001-04-13 J.T. Conklin <jtc@redback.com>
+
+ * ld.texinfo: Document --fatal-warnings.
+ * ld.1: Regenerate.
+
+ * ldmisc.c (vfinfo): Set flag to inhibit making executable if
+ warnings have been turned into errors.
+ * lexsup.c (OPTION_WARN_FATAL): Define.
+ (ld_options): Entry for --fatal-warnings.
+ (parse_args): Handle OPTION_WARN_FATAL.
+ * ld.h (ld_config_type): Add fatal_warnings field.
+
+2001-04-13 Jakub Jelinek <jakub@redhat.com>
+
+ * ldmain.c (main): Default to discard_sec_merge.
+ * lexsup.c (OPTION_DISCARD_NONE): Define.
+ (ld_options): Add --discard-none.
+ (parse_args): Handle OPTION_DISCARD_NONE.
+ * ldlang.c (wild_doit): SEC_MERGE should be set in the output
+ section only if SEC_MERGE and SEC_STRINGS flags and entsize of
+ all its input sections match.
+
+2001-04-05 Steven J. Hill <sjhill@cotw.com>
+
+ * Makefile.am (ALL_EMULATIONS): Add eelf32ltsmip.o.
+ (ALL_64_EMULATIONS): Add eelf64btsmip.o and eelf64ltsmip.o.
+ (eelf32ltsmip.c): New target.
+ (eelf64btsmip.c): Likewise.
+ (eelf64ltsmip.c): Likewise.
+ * Makefile.in: Regenerated.
+
+ * configure.tgt (mips*el-*-linux-gnu): Uses traditional MIPS
+ target.
+ (mips*-*-linux-gnu*): Likewise.
+
+ * emulparams/elf32ltsmip.sh: New. Traditional little endian
+ MIPS taget.
+ * emulparams/elf64btsmip.sh: New. Traditional 64bit big endian
+ target.
+ * emulparams/elf64ltsmip.sh: New. Traditional 64bit little
+ endian target.
+
+2001-04-05 Hans-Peter Nilsson <hp@axis.com>
+
+ * emulparams/criself.sh (EXECUTABLE_SYMBOLS): Cannot provide
+ correct value of __Stext here.
+ (TEXT_START_SYMBOLS): Define; always define __Stext, to start of
+ .startup section.
+
+ * emulparams/crislinux.sh: Remove FIXME.
2001-04-02 Alan Modra <alan@linuxcare.com.au>
@@ -194,45 +1675,118 @@
* emulparams/hppalinux.sh (MAXPAGESIZE): Set to 0x4000.
(TEXT_START_ADDR, TARGET_PAGE_SIZE): Ditto.
+2001-03-26 Andreas Jaeger <aj@suse.de>
+
+ * ld.texinfo (Overview): Fix syntax in texi code.
+
+2001-03-25 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * ld.texinfo: Put @c man indications to generate the ld man page.
+ When generating man, define all the variables. Define SEEALSO
+ and SYNOPSIS. Re-organize some lines to avoid the cross references.
+ * Makefile.am (MANCONF, TEXI2POD, POD2MAN): New variables.
+ (ld.1): Generate from ld.texinfo.
+ * Makefile.in: Regenerate.
+
+2001-03-23 Mark Elbrecht <snowball3@bigfoot.com>
+
+ * scripttempl/i386go32.sc: Support the GCC flags '-ffunction-sections'
+ and '-fdata-sections'. Set the VMA of STABS sections to zero.
+
2001-03-17 Ulrich Drepper <drepper@redhat.com>
* emultmpl/elf32.em (gld${EMULATION_NAME}_search_needed): If NAME
is an absolute path look only for this file and not along the path.
-2001-03-16 Philip Blundell <philb@gnu.org>
+2001-03-17 Ulrich Drepper <drepper@redhat.com>
- * configure: Regenerate.
+ * emultempl/elf32.em (OPTION_GROUP): New macro.
+ Add new option Bgroup to longopts.
+ (gld*_parse_args): Handle GROUP_OPTION and recognize -z defs.
+ (gld*_list_options): Add -Bgroup and -z defs.
+ * ld.1: Document -Bgroup and -z defs.
+ * ld.texinfo: Likewise.
-2001-03-11 Philip Blundell <philb@gnu.org>
+2001-03-07 Michael Meissner <meissner@redhat.com>
- * configure.in: Set version to 2.11.
+ * scripttempl/elfd10v.sc (.rodata,.rodata1,.data1,.sdata): Deal
+ with sections created by -fdata-sections.
+ (.dynbss,.bss): Ditto.
2001-03-05 Alan Modra <alan@linuxcare.com.au>
* emultempl/m68kelf.em (m68k_elf_after_allocation): Call
after_allocation_default, not gld..._before_allocation.
-001-02-18 David O'Brien <obrien@FreeBSD.org>
+2001-02-27 Alan Modra <alan@linuxcare.com.au>
+
+ * configure.in (BFD_VERSION): New.
+ (AM_INIT_AUTOMAKE): Use $BFD_VERSION.
+ * configure: Regenerate.
+ * Makefile.am: Run "make dep-am"
+ * Makefile.in: Regenerate.
+
+2001-02-26 Timothy Wall <twall@cygnus.com>
+
+ * emulparams/elf64_aix.sh: Add additional read-only sections;
+ uncomment lines which are now required.
+
+2001-02-26 H.J. Lu <hjl@gnu.org>
+
+ * ldlang.c (open_input_bfds): Set the bfd error handler so
+ that problems can be caught whilst loading symbols.
+ (record_bfd_errors): New function: Report BFD errors and mark
+ the executable output as being invalid.
+
+2001-02-22 Timothy Wall <twall@cygnus.com>
+
+ * configure.host: Add configuration for ia64-*-aix*.
+ * Makefile.am (ALL_64_EMULATIONS): Add emulation for ia64-*-aix*.
+ Add dependencies for eelf64_aix.c.
+ * Makefile.in: Regenerate.
+ * configure.tgt: Add ia64-*-aix* mapping.
+ * emulparams/elf64_aix.sh: Add settings for elf64 on aix5.
+ * testsuite/ld-bootstrap/bootstrap.exp: Exclude ia64 flavor from
+ AIX-specific test.
+
+2001-02-20 H.J. Lu <hjl@gnu.org>
+
+ * ldfile.c (ldfile_open_file): Set entry->search_dirs_flag to
+ false if we found the file.
+
+2001-02-18 David O'Brien <obrien@FreeBSD.org>
* configure.tgt: Add FreeBSD/Alpha, FreeBSD/x86-64, FreeBSD/ia64,
FreeBSD/PowerPC, FreeBSD/arm, and FreeBSD/sparc64 entries.
+2001-02-18 lars brinkhoff <lars@nocrew.org>
+
+ * Makefile.am: Add PDP-11 target.
+ * configure.tgt: Likewise.
+ * emulparams/pdp11.sh: New file.
+
2001-02-17 David O'Brien <obrien@FreeBSD.org>
* configure.host: Add a generic FreeBSD configuration entry such that
all [modern] FreeBSD systems on all platforms will look the same.
+2001-02-14 H.J. Lu <hjl@gnu.org>
+
+ * configure.tgt: Remove mention of earmelf_linux26.
+
2001-02-13 Richard Henderson <rth@redhat.com>
* emulparams/elf64_ia64.sh (OTHER_GOT_SYMBOLS): Remove.
-2001-02-11 Philip Blundell <philb@gnu.org>
+2001-02-13 H.J. Lu <hjl@gnu.org>
- * Makefile.am: Remove mention of earmelf_linux26.o.
- * Makefile.in: Regenerate.
- * emulparams/armelf_linux.sh (TEXT_START_ADDR): Set to 0x8000.
- * emulparams/armelf_linux26.sh: Delete.
- * configure.tgt: Remove mention of armelf_linux26 emulation.
+ * ldexp.h (node_type): Add etree_provided.
+ * ldexp.c (exp_fold_tree): Handle etree_provided. Set the node
+ type to etree_provided if defined by PROVIDE. Allow updating
+ for etree_provided.
+ (exp_print_tree): Handle etree_provided.
+ * mpw-elfmips.c (gldelf32ebmip_find_exp_assignment): Handle
+ etree_provided.
2001-02-09 David Mosberger <davidm@hpl.hp.com>
@@ -240,6 +1794,36 @@
.IA_64.unwind.* pattern to unwind table section and
.IA_64.unwind_info* pattern to unwind info section.
+2001-02-09 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * Makefile.am: Add linux target for S/390.
+ * Makefile.in: Likewise.
+ * configure.host: Likewise.
+ * configure.tgt: Likewise.
+ * emulparams/elf64_s390.sh: New file.
+ * emulparams/elf_s390.sh: New file.
+
+2001-02-09 Jakub Jelinek <jakub@redhat.com>
+
+ * configure.tgt (sparc64-*-linux-gnu*): Add elf32_sparc into
+ targ_extra_libpath.
+ (sparc-*-linux-gnu*): Add elf64_sparc into targ_extra_libpath.
+
+2001-02-06 Philip Blundell <philb@gnu.org>
+
+ * Makefile.am: Remove mention of earmelf_linux26.
+ * Makefile.in: Regenerate.
+
+2001-02-04 Philip Blundell <philb@gnu.org>
+
+ * emulparams/armelf_linux.sh (TEXT_START_ADDR): Set to 0x8000.
+ * emulparams/armelf_linux26.sh: Delete.
+ * configure.tgt: Remove mention of armelf_linux26 emulation.
+
+2001-02-01 Nick Clifton <nickc@redhat.com>
+
+ * ld.1: Replace occurances of -oformat with --oformat.
+
2001-01-25 Jim Driftmyer <jdrift@stny.rr.com>
* ldlang.c (lang_leave_overlay): Don't set lma_region when
diff --git a/contrib/binutils/ld/ChangeLog-9197 b/contrib/binutils/ld/ChangeLog-9197
index a89a4ca..291326d 100644
--- a/contrib/binutils/ld/ChangeLog-9197
+++ b/contrib/binutils/ld/ChangeLog-9197
@@ -16,8 +16,8 @@ Thu Dec 11 09:00:15 1997 Michael Meissner <meissner@cygnus.com>
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.
+ * emulparams/d30v_{o,e}.sh: Rename from d30velf_{o,e}.
+ * emulparams/d30velf_{o,e}.sh: Deleted.
Wed Dec 10 17:40:08 1997 Nick Clifton <nickc@cygnus.com>
@@ -907,7 +907,7 @@ Fri Nov 1 10:01:27 1996 Ian Lance Taylor <ian@cygnus.com>
Thu Oct 31 09:28:59 1996 Jeffrey A Law (law@cygnus.com)
- * scriptempl/v850.sc (zdata): Handle reszdata, romzdata and
+ * scripttempl/v850.sc (zdata): Handle reszdata, romzdata and
romzbss too.
Tue Oct 29 12:33:05 1996 Martin M. Hunt <hunt@pizza.cygnus.com>
@@ -925,9 +925,9 @@ Mon Oct 28 15:37:00 1996 Doug Evans <dje@canuck.cygnus.com>
Wed Oct 23 16:17:22 1996 Jeffrey A Law (law@cygnus.com)
- * scriptempl/v850.sc (zdata): Fix typo "zrodata" -> "rozdata".
+ * scripttempl/v850.sc (zdata): Fix typo "zrodata" -> "rozdata".
- * scriptempl/v850.sc (zdata): Make sure this stays
+ * scripttempl/v850.sc (zdata): Make sure this stays
in lo-memory.
Tue Oct 22 11:36:47 1996 Jeffrey A Law (law@cygnus.com)
@@ -935,7 +935,7 @@ Tue Oct 22 11:36:47 1996 Jeffrey A Law (law@cygnus.com)
* scripttempl/v850.sc (__ep): Put it at the start
of the tda section.
- * scriptempl/v850.sc: Move all "normal" sections into
+ * scripttempl/v850.sc: Move all "normal" sections into
the external memory region (0x100000 - 0x200000).
Mon Oct 21 17:16:59 1996 Michael Meissner <meissner@wogglebug.tiac.net>
@@ -1050,7 +1050,7 @@ Thu Oct 3 15:41:24 1996 Jason Molenda (crash@godzilla.cygnus.co.jp)
Wed Oct 2 23:45:25 1996 Geoffrey Noer <noer@cygnus.com>
- * emultmpl/pe.em: increase size of stack reserve to 0x2000000
+ * emultempl/pe.em: increase size of stack reserve to 0x2000000
(necessary in order to compile parse.c in gcc sources under NT)
Wed Oct 2 14:49:10 1996 Ian Lance Taylor <ian@cygnus.com>
@@ -1690,7 +1690,7 @@ Thu May 9 08:52:23 1996 Rob Savoye <rob@chinadoll.cygnus.com>
Tue May 7 10:56:11 1996 Doug Evans <dje@canuck.cygnus.com>
- * scripttempl/pe.em (gld${EMULATION_NAME}_place_orphan): New function.
+ * emultempl/pe.em (gld${EMULATION_NAME}_place_orphan): New function.
(gld${EMULATION_NAME}_place_section): New function.
(hold_{section,use,text,rdata,data}): New static locals.
(ld_${EMULATION_NAME}_emulation): Update orphan field.
@@ -2036,8 +2036,8 @@ Wed Mar 6 18:08:18 1996 Ian Lance Taylor <ian@cygnus.com>
* ldemul.c (ldemul_unrecognized_file): New function.
* ldlang.c (load_symbols): If a file can not be recognized, call
ldemul_unrecognized_file before trying it as a linker script.
- * aix.em (gld${EMULATION_NAME}_unrecognized_file): New static
- function.
+ * emultempl/aix.em (gld${EMULATION_NAME}_unrecognized_file): New
+ static function.
(gld${EMULATION_NAME}_read_file): Use FOPEN_RT, not "r".
(ld_${EMULATION_NAME}_emulation): Initialize unrecognized_file.
@@ -2787,9 +2787,9 @@ Mon Oct 16 19:11:13 1995 Ian Lance Taylor <ian@cygnus.com>
* Makefile.in (ALL_EMULATIONS): Add eaixppc.o and eaixrs6.o.
(eaixppc.c, eaixrs6.c): New targets.
-Fri Oct 13 14:00:37 1995 steve chamberlain <sac@slash.cygnus.com>
+Fri Oct 13 14:00:37 1995 Steve Chamberlain <sac@slash.cygnus.com>
- * scripttemp/pe.sc (.reloc): Move to the end.
+ * scripttempl/pe.sc (.reloc): Move to the end.
Tue Oct 10 17:53:22 1995 Ian Lance Taylor <ian@cygnus.com>
@@ -2819,7 +2819,7 @@ Fri Oct 6 16:26:16 1995 Ken Raeburn <raeburn@cygnus.com>
Mon Sep 25 22:49:32 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
- * ld/ld.1: Fix formatting bugs.
+ * ld.1: Fix formatting bugs.
Wed Oct 4 17:37:46 1995 Ian Lance Taylor <ian@cygnus.com>
@@ -2947,7 +2947,7 @@ Fri Sep 15 23:28:05 1995 Andrew Cagney <cagney@highland.com.au>
Thu Sep 12 12:50:49 1995 steve chamberlain <sac@slash.cygnus.com>
- * scripttemp/pe.sc: Allow both spellings of .ctors/.dtors.
+ * scripttempl/pe.sc: Allow both spellings of .ctors/.dtors.
Start .text section on the right boundary. Always align
stabs.
@@ -3026,7 +3026,7 @@ Wed Sep 6 14:42:11 1995 Ian Lance Taylor <ian@cygnus.com>
* dep-in.sed: Use @SRCDIR@, not @srcdir@.
* genscripts.sh: Create ldscripts if it does not exist.
* ldemul.c, lexsup.c, mpw-emipsidt.c: Don't include "config.h".
- * mpw-esh.c, emultemp/*.em: Likewise.
+ * mpw-esh.c, emultempl/*.em: Likewise.
* ldmain.c: Likewise. Include <ctype.h>. Don't try to set
HAVE_SBRK here.
* config/*.mt, config/*.mh: Remove.
@@ -3408,7 +3408,7 @@ Sun Jun 11 15:20:46 1995 Ken Raeburn <raeburn@cujo.cygnus.com>
Thu Jun 8 14:17:33 1995 Steve Chamberlain <sac@slash.cygnus.com>
- * emulparams/armpe.sh, scriptempl/armpe.sc: Add end and stack.
+ * emulparams/armpe.sh, scripttempl/armpe.sc: Add end and stack.
Mon Jun 5 02:16:24 1995 Ken Raeburn <raeburn@kr-laptop.cygnus.com>
@@ -4060,8 +4060,11 @@ Tue Sep 27 14:56:20 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
instead of RUNTEST_CC, and likewise for CXX.
(cdtest targets): Comment out.
* config/solaris2.mh (HOSTING_LIBS): Only mention crtend.o once.
- * cdtest-bar.cc, cdtest-foo.cc, cdtest-foo.h: Remove.
- * cdtest-main.cc, cdtest.exp: Remove.
+ * testsuite/ld-cdtest/cdtest-bar.cc,
+ testsuite/ld-cdtest/cdtest-foo.cc,
+ testsuite/ld-cdtest/cdtest-foo.h,
+ testsuite/ld-cdtest/cdtest-main.cc,
+ testsuite/ld-cdtest/cdtest.exp: Remove.
Mon Sep 26 11:40:30 1994 Ian Lance Taylor (ian@sanguine.cygnus.com)
@@ -4659,8 +4662,8 @@ Thu Jun 9 00:17:20 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
Thu Jun 2 17:24:08 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
Add support for SunOS shared libraries.
- * aout.sc: Don't define __DYNAMIC here. Add new sections used by
- shared library support code.
+ * scripttempl/aout.sc: Don't define __DYNAMIC here. Add new
+ sections used by shared library support code.
* emultempl/sunos.em: New file.
* emulparams/sun4.sh (TEMPLATE_NAME): Define as sunos.
* emulparams/sun3.sh (TEMPLATE_NAME): Likewise.
@@ -4709,7 +4712,7 @@ Fri May 27 12:25:33 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
* emultempl/generic.em: Find emultempl/stringify.sed in ${srcdir}.
- * cdtest-bar.cc: Renamed from cdtest-func.cc.
+ * testsuite/ld-cdtest/cdtest-bar.cc: Renamed from cdtest-func.cc.
* Makefile.in: Noted change.
* scripttempl/a29k.sc: Don't include /lab3/u3/..../segments.o; I
@@ -4718,14 +4721,14 @@ Fri May 27 12:25:33 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
Wed May 11 22:32:00 1994 DJ Delorie (dj@ctron.com)
- * configure.bat: update to latest makefile.in
- * emulpara/go32.sh: set to coff-go32 not aout
- * emultemp/generic.em: strength-reduce the structure of
+ * configure.bat: update to latest Makefile.in
+ * emulparams/go32.sh: set to coff-go32 not aout
+ * emultempl/generic.em: strength-reduce the structure of
this shell script, since the only available shell for
DOS can't handle complex syntax.
- * emultemp/stringify.sed: for "sed -f" instead of inline.
- * makefile.in: depend on stringify.sed as well as genscripts.sh
- * scripttemp/go32coff.sc: correct for djgpp 1.11's COFF format
+ * emultempl/stringify.sed: for "sed -f" instead of inline.
+ * Makefile.in: depend on stringify.sed as well as genscripts.sh
+ * scripttempl/go32coff.sc: correct for djgpp 1.11's COFF format
* genscripts.sh: empty variables aren't always considered "set",
so set them to "y" instead.
@@ -4799,8 +4802,9 @@ Wed May 11 18:16:46 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
* ldver.c (ldversion): Updated version number.
- * cdtest-foo.cc: Use explicit "#pragma implementation".
- * cdtest-bar.cc: Renamed from cdtest-func.cc.
+ * testsuite/ld-cdtest/cdtest-foo.cc: Use explicit "#pragma
+ implementation".
+ * testsuite/ld-cdtest/cdtest-bar.cc: Renamed from cdtest-func.cc.
* Makefile.in: References to cdtest-func.o changed to
cdtest-bar.o.
@@ -5026,7 +5030,7 @@ Wed Mar 23 14:15:44 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
lang_do_assignments and lang_size_sections until relax_again
becomes false.
- * emultemp/gld960.em: Include libiberty.h
+ * emultempl/gld960.em: Include libiberty.h
(gld960_before_parse): Pass NULL as final argument to concat.
Tue Mar 22 13:08:28 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
@@ -5074,7 +5078,7 @@ Mon Mar 21 18:28:37 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
(cdtest-ur, cdtest-ur.out): New targets.
(check-cdtest): Now also check that -Ur works correctly.
- * scripttemp/alpha.sc: Align all sections to 16 byte boundaries.
+ * scripttempl/alpha.sc: Align all sections to 16 byte boundaries.
Thu Mar 17 12:45:41 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
@@ -5097,8 +5101,8 @@ Tue Mar 8 04:22:27 1994 David J. Mackenzie (djm@rtl.cygnus.com)
Mon Mar 7 15:23:24 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
- * elf.sc: Permit TEXT_START_SYMBOLS and DATA_START_SYMBOLS to be
- defined.
+ * scripttempl/elf.sc: Permit TEXT_START_SYMBOLS and
+ DATA_START_SYMBOLS to be defined.
* emulparams/elf32mipb.s (TEXT_START_SYMBOLS): Define _ftext.
(DATA_START_SYMBOLS): Define _fdata.
@@ -5432,7 +5436,7 @@ Mon Jan 10 19:49:05 1994 David J. Mackenzie (djm@thepub.cygnus.com)
Fri Jan 7 20:00:24 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
- * scripttempl/elf.c: Define __bss_start before the .sbss section.
+ * scripttempl/elf.sc: Define __bss_start before the .sbss section.
Thu Jan 6 00:13:10 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
@@ -5591,10 +5595,10 @@ Thu Dec 16 21:19:57 1993 Jeffrey A. Law (law@snake.cs.utah.edu)
* ldsym.c (write_file_locals): Use strncmp rather than a character
comparison for lprefix.
- * emultmpl/m88kbcs.em (before_parse): Set lprefix and lprefix_len
+ * emultempl/m88kbcs.em (before_parse): Set lprefix and lprefix_len
correctly.
- * emultmpl/hppaosf.em: Include ldexp.h.
+ * emultempl/hppaosf.em: Include ldexp.h.
(before_parse): Set lprefix and lprefix_len correctly.
Tue Dec 14 17:19:03 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
@@ -6323,10 +6327,12 @@ Wed Jun 16 11:45:32 1993 David J. Mackenzie (djm@thepub.cygnus.com)
* Move *.em to emultempl/*.em. Move *.sh to emulparams/*.sh.
Move *.sc-sh to scripttempl/*.sc.
* {emultempl,emulparams,scripttempl}/README: New files.
- * sh.em, st2000.em, z8ksim.em, h8300hms.em, h8500hms.em: Files
- removed, replaced with generic.em.
- * h8300.sh, h8500.sh, h8300.sc, h8500.sc: Renamed from
- h8[35]00hms.s[ch]. Change their contents to omit the "hms".
+ * emultempl/sh.em, emultempl/st2000.em, emultempl/z8ksim.em,
+ emultempl/h8300hms.em, emultempl/h8500hms.em: Files removed,
+ replaced with generic.em.
+ * emulparams/h8300.sh, emulparams/h8500.sh, scripttempl/h8300.sc,
+ scripttempl/h8500.sc: Renamed from h8[35]00hms.s[ch]. Change
+ their contents to omit the "hms".
* *.em (*_get_script): Return script name instead of script contents.
* ldlang.c (lang_process): Change caller.
@@ -6354,9 +6360,10 @@ Tue Jun 15 23:04:46 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
* Makefile.in (INCLUDES): Look in ../include, not ../bfd.
- * aout.sc-sh: Add SHLIB_PATH like STACKZERO. Make STACKZERO
- dependent on RELOCATING, not RELOCATION.
- * hp3hpux.sh (SHLIB_PATH): Define it.
+ * scripttempl/aout.sc, emulparams/aout.sh: Add SHLIB_PATH like
+ STACKZERO. Make STACKZERO dependent on RELOCATING, not
+ RELOCATION.
+ * emulparams/hp3hpux.sh (SHLIB_PATH): Define it.
Mon Jun 14 19:06:15 1993 David J. Mackenzie (djm@thepub.cygnus.com)
@@ -6374,10 +6381,12 @@ Thu Jun 10 14:00:06 1993 Ian Lance Taylor (ian@cygnus.com)
* ldgram.y (statement_list_opt): New nonterminal, either empty or
statement_list.
(section): Use statement_list_opt, not statement_list.
- * m68kcoff.sc-sh: Gather constructors and destructors and define
- __CTOR_LIST__ and __DTOR_LIST__ appropriately.
- * sa29200.sc-sh: Gather constructors and destructors and define
- ___CTOR_LIST__ and ___DTOR_LIST__ appropriately.
+ * scripttempl/m68kcoff.sc, emulparams/m68kcoff.sh: Gather
+ constructors and destructors and define __CTOR_LIST__ and
+ __DTOR_LIST__ appropriately.
+ * scripttempl/sa29200.sc, emulparams/sa29200.sh: Gather
+ constructors and destructors and define ___CTOR_LIST__ and
+ ___DTOR_LIST__ appropriately.
Mon Jun 7 12:53:28 1993 Per Bothner (bothner@rtl.cygnus.com)
@@ -6395,7 +6404,8 @@ Fri Jun 4 08:50:14 1993 Ian Lance Taylor (ian@cygnus.com)
* configure.in (mips-idt-ecoffl*): New target; use mips-idtl.
(mips-idt-ecoff*): Added trailing '*'.
* config/mips-idtl.mt: New file; use EMUL of mipsidtl.
- * mipsidtl.sh: New file; like mipsidt.sh, but little endian.
+ * emulparams/mipsidtl.sh: New file; like mipsidt.sh, but little
+ endian.
* Makefile.in (ALL_EMULATIONS): Added em_mipsidtl.o.
* config/sun3.mh (HOSTING_LIBS, HOSTING_EMU): Removed obsolete and
@@ -6415,16 +6425,17 @@ Tue May 25 15:34:25 1993 Ian Lance Taylor (ian@cygnus.com)
Thu May 20 13:56:16 1993 Per Bothner (bothner@deneb.cygnus.com)
- * mips.sc-sh: Define _etext, _edata, and _end, in addition
- to etext, edata, and end. Needed for IRIX 4.0.5F.
- Patch from mwp@iconix.oz.au (Michael Paddon).
+ * scripttempl/mips.sc, emulparams/mips.sh: Define _etext, _edata,
+ and _end, in addition to etext, edata, and end. Needed for IRIX
+ 4.0.5F. Patch from mwp@iconix.oz.au (Michael Paddon).
* Version 2.2.1 released.
Thu May 20 11:42:06 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
- * mipsbsd.sc-sh: Renamed from aout-mipsbsd.sc-sh.
- * mipsbsd.sh (EMULATION_NAME): Use new file name.
+ * scripttempl/mipsbsd.sc, emulparams/mipsbsd.sh: Renamed from
+ aout-mipsbsd.sc-sh.
+ * emulparams/mipsbsd.sh (EMULATION_NAME): Use new file name.
Tue May 18 17:10:24 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
@@ -6443,7 +6454,8 @@ Mon May 17 12:44:31 1993 Per Bothner (bothner@cygnus.com)
Fri May 14 11:26:24 1993 Ian Lance Taylor (ian@cygnus.com)
- * mips.sc-sh: Don't define BSS_VAR unless relocating.
+ * scripttempl/mips.sc, emulparams/mips.sh: Don't define BSS_VAR
+ unless relocating.
Wed May 12 13:33:29 1993 Ian Lance Taylor (ian@cygnus.com)
@@ -6455,11 +6467,12 @@ Tue May 4 21:58:56 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
* configure.in: Look for ${target_makefile_frag} relative to
${srcdir}, not relative to build directory.
- * hppaosf.em, hppaosf.sc-sh, hppaosf.sh: New files.
+ * emultempl/hppaosf.em, scripttempl/hppaosf.sc,
+ emulparams/hppaosf.sh: New files.
* configure.in: Recognize hppa*-hp-osf.
* Makefile.in (ALL_EMULATIONS): Include hppaosf emulation.
(em_hppaosf.c): Build it.
- * config/hppaosf.mh, hppaosf.mt: New files.
+ * config/hppaosf.mh, config/hppaosf.mt: New files.
* ld.h (ALIGN_N): Renamed from ALIGN, because that conflicted with
some system header files. All uses changed.
@@ -6468,26 +6481,27 @@ Tue May 4 21:58:56 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
targets.
* configure.in: Recognize m68*-*-hpux.
- * aout.sc-sh: If STACKZERO and RELOCATING are both defined, output
+ * scripttempl/aout.sc: If STACKZERO and RELOCATING are both defined, output
the value of STACKZERO.
* Makefile.in (ALL_EMULATIONS): Include hp300-hpux emulation.
(em_hp3hpux.c): Build it.
- * hp3hpux.sh, config/hp300hpux.mt: New files.
+ * emulparams/hp3hpux.sh, config/hp300hpux.mt: New files.
Tue May 4 12:37:35 1993 Ian Lance Taylor (ian@cygnus.com)
- * mips.sc-sh: Put constructors in the .data section.
+ * scripttempl/mips.sc: Put constructors in the .data section.
* Makefile.in (cdtest): Added dependency on ld.new.
Mon May 3 19:43:39 1993 Per Bothner (bothner@cygnus.com)
* Makefile.in: Change definition of $(tooldir) to match FSF.
- * vax.sh, config/vax.mt, configure.in, Makefile.in:
+ * emulparams/vax.sh, config/vax.mt, configure.in, Makefile.in:
Support VAX Ultrix and BSD.
Mon Apr 26 18:35:47 1993 Steve Chamberlain (sac@thepub.cygnus.com)
- * sh.em, sh.sh, sh.sc-sh: New files supporting Hitachi SH.
+ * emultempl/sh.em, emulparams/sh.sh, scripttempl/sh.sc: New
+ files supporting Hitachi SH.
Wed Apr 14 21:01:51 1993 John Gilmore (gnu@cygnus.com)
@@ -6559,7 +6573,7 @@ Thu Mar 4 12:44:33 1993 Ian Lance Taylor (ian@cygnus.com)
* mips.sc-sh: Added variables which may be overridden by a
specific emulation.
- * mipsidt.sh: New file; emulation for IDT MIPS board.
+ * emulparams/mipsidt.sh: New file; emulation for IDT MIPS board.
* Makefile.in (ALL_EMULATIONS): Added em_mipsidt.o.
(em_mipsidt.c): New target. Uses mipsidt.sh and mips.sc-sh.
* config/mips-idt.mt: New file; sets EMUL to mipsidt.
@@ -6567,9 +6581,9 @@ Thu Mar 4 12:44:33 1993 Ian Lance Taylor (ian@cygnus.com)
Sat Feb 27 00:00:14 1993 Ken Raeburn (raeburn@cambridge.cygnus.com)
- * aout-mipsbsd.sc-sh, mipsbsd.sh: New files from Ralph Campbell,
- ralphc@pyramid.com.
- * i386bsd.sh, config/i386bsd.mt: New files.
+ * aout-mipsbsd.sc-sh, emulparams/mipsbsd.sh: New files from Ralph
+ Campbell, ralphc@pyramid.com.
+ * emulparams/i386bsd.sh, config/i386bsd.mt: New files.
* configure.in, Makefile.in: Added support for mipsbsd and 386bsd.
Thu Feb 25 15:33:10 1993 Per Bothner (bothner@rtl.cygnus.com)
@@ -6596,7 +6610,7 @@ Thu Feb 18 17:58:45 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
Wed Feb 3 09:05:56 1993 Ian Lance Taylor (ian@cygnus.com)
- * mipsbig.sh: New file. Big endian MIPS emulation.
+ * emulparams/mipsbig.sh: New file. Big endian MIPS emulation.
* config/mips-big.mt: New file. Use mipsbig emulation.
* configure.in (mips-sgi-irix*): Use target mips-big.
* Makefile.in (ALL_EMULATIONS): Added em_mipsbig.o.
@@ -6638,7 +6652,7 @@ Fri Jan 22 14:22:44 1993 Ian Lance Taylor (ian@cygnus.com)
* mips.sc-sh: New file. Ultrix, and hopefully other MIPS ECOFF
targets, linker script.
- * mipslit.sh: New file. Little endian MIPS emulation.
+ * emulparams/mipslit.sh: New file. Little endian MIPS emulation.
* config/mips-lit.mt: New file. Use mipslit emulation.
* configure.in (mips-dec-ultrix*): Use target mips-lit.
* Makefile.in (ALL_EMULATIONS): Added em_mipslit.o.
@@ -6692,8 +6706,8 @@ Wed Jan 6 01:08:37 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
Mon Dec 28 11:15:35 1992 Ian Lance Taylor (ian@cygnus.com)
- * m68kcoff.sc-sh: define _end as well as end, for consistency with
- aout.sc-sh.
+ * scripttempl/m68kcoff.sc, emulparams/m68kcoff.sh: define _end as
+ well as end, for consistency with aout.sc-sh.
* configure.in: accept *-ericsson-ose for any m68k CPU.
@@ -6705,7 +6719,7 @@ Mon Dec 21 16:06:59 1992 Per Bothner (bothner@rtl.cygnus.com)
* ldexp.c, ldlang.c, ldmain.c, ldsym.c, ldwarn.c: Use new
macro bfd_asymbol_bfd as appropriate.
* Makefile.in: Un-duplicate ldlex.c dependency.
- * condigure.in: Replace my_host case table by sourcing
+ * configure.in: Replace my_host case table by sourcing
../bfd/configure.host. Allow std-host as the default.
* ldmisc.c: Change logic for C++ name demangling: There is
no initial '_' to remove from stab-derived function names.
@@ -6757,8 +6771,8 @@ Thu Nov 5 05:43:01 1992 John Gilmore (gnu@cygnus.com)
Tue Oct 20 10:56:06 1992 Ian Lance Taylor (ian@cygnus.com)
- * m68kcoff.sc-sh: don't use initial underscores for etext, edata
- and end.
+ * scripttempl/m68kcoff.sc, emulparams/m68kcoff.sh: don't use
+ initial underscores for etext, edata and end.
Mon Oct 19 09:45:38 1992 Ian Lance Taylor (ian@cygnus.com)
@@ -6792,8 +6806,9 @@ Tue Oct 6 13:08:54 1992 Ian Lance Taylor (ian@cygnus.com)
Mon Oct 5 14:07:37 1992 Ian Lance Taylor (ian@cygnus.com)
- * aout.sc-sh, m68kcoff.sc-sh: set __bss_start to the start of the
- .bss segment.
+ * scripttempl/aout.sc, emulparams/aout.sh,
+ scripttempl/m68kcoff.sc, emulparams/m68kcoff.sh: set __bss_start
+ to the start of the .bss segment.
Mon Oct 5 08:55:14 1992 Steve Chamberlain (sac@thepub.cygnus.com)
@@ -6832,7 +6847,8 @@ Fri Sep 25 13:49:52 1992 Ken Raeburn (raeburn@kyriath.cygnus.com)
Fri Sep 25 11:08:01 1992 Steve Chamberlain (sac@thepub.cygnus.com)
Added initial support for the z8k
- * z8ksim.em, z8ksim.sc-sh, z8ksim.sh: new files
+ * emultempl/z8ksim.em, z8ksim.sc-sh, emulparams/z8ksim.sh: new
+ files.
* configure.in, Makefile.in: modified to reflect above
* ldlang.c (lang_check): when linking conflicting architectures,
@@ -6850,16 +6866,18 @@ Fri Sep 11 10:24:22 1992 Steve Chamberlain (sac@thepub.cygnus.com)
Wed Sep 9 11:52:58 1992 Ian Lance Taylor (ian@cygnus.com)
- * Makefile.in, m68kcoff.sh, m68kcoff.sc-sh, config/m68k-coff.mt:
- added m68k-coff emulation mode, stolen from a29k emulation.
- Almost certainly wrong, but perhaps better than sun3.
+ * Makefile.in, emulparams/m68kcoff.sh, scripttempl/m68kcoff.sc,
+ emulparmas/m68kcoff.sh, config/m68k-coff.mt: added m68k-coff
+ emulation mode, stolen from a29k emulation. Almost certainly
+ wrong, but perhaps better than sun3.
Thu Sep 3 14:19:30 1992 Per Bothner (bothner@rtl.cygnus.com)
- * Makefile.in, Makefile.dos, generic.em, genscripts.sh,
- gld960.em, h8300hms.em, h8300xray.em, lnk960.em, st2000.em,
- vanilla.em: Rename all (generated) ld__*.c files to em_.c.
- This is one character shorter, and lets people build on
+ * Makefile.in, Makefile.dos, emultempl/generic.em, genscripts.sh,
+ emultempl/gld960.em, emultempl/h8300hms.em,
+ emultempl/h8300xray.em, emultempl/lnk960.em, emultempl/st2000.em,
+ emultempl/vanilla.em: Rename all (generated) ld__*.c files to
+ em_.c. This is one character shorter, and lets people build on
SVR3 system. (ld__h8300xray.[co] was the killer there;
h8300xray.sc-sh is also overlong, but seems harmless.)
Based on a patch from Jonathan Ryshpan <hitachi!amito!jon>.
@@ -6904,8 +6922,8 @@ Sun Aug 30 18:12:13 1992 Per Bothner (bothner@rtl.cygnus.com)
Thu Aug 27 16:38:42 1992 Ian Lance Taylor (ian@cygnus.com)
- * gld960.em (gld960_choose_target): default to little endian, not
- big endian.
+ * emultempl/gld960.em (gld960_choose_target): default to little
+ endian, not big endian.
Wed Aug 26 17:28:51 1992 Steve Chamberlain (sac@thepub.cygnus.com)
@@ -6913,7 +6931,7 @@ Wed Aug 26 17:28:51 1992 Steve Chamberlain (sac@thepub.cygnus.com)
abs_output_section is what is required.
* 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
+ * relax.c, relax.h (write_relaxnorel): use the passed malloc area rather
than alloca.
Mon Aug 24 14:42:06 1992 Ian Lance Taylor (ian@cygnus.com)
@@ -6951,7 +6969,8 @@ Fri Aug 7 12:31:10 1992 Steve Chamberlain (sac@thepub.cygnus.com)
(lang_enter_output_section_statement): set the field from the
NOLOAD keyword
* ldgram.y: new synax for NOLOAD. Removes a shift/reduce too.
- * h8300hms.sc-sh, h8300hms.em: get -r right.
+ * scripttempl/h8300hms.sc, emulparams/h8300.sh,
+ emultempl/h8300hms.em: get -r right.
Thu Aug 6 18:35:21 1992 Per Bothner (bothner@rtl.cygnus.com)
@@ -6960,10 +6979,13 @@ Thu Aug 6 18:35:21 1992 Per Bothner (bothner@rtl.cygnus.com)
Tue Aug 4 21:12:29 1992 Per Bothner (bothner@rtl.cygnus.com)
- * cdtest-main.cc, cdtest-func.cc, cdtest-foo.h, cdtest-foo.cc,
- cdtest.exp: A test program (copied from libg++/test-install)
- that tests that constructor and destructors are handled
- corrrectly.
+ * testsuite/ld-cdtest/cdtest-main.cc,
+ testsuite/ld-cdtest/cdtest-func.cc,
+ testsuite/ld-cdtest/cdtest-foo.h,
+ testsuite/ld-cdtest/cdtest-foo.cc,
+ testsuite/ld-cdtest/cdtest.exp: A test program (copied from
+ libg++/test-install) that tests that constructor and destructors
+ are handled corrrectly.
Mon Aug 3 14:58:19 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
@@ -7006,8 +7028,9 @@ Wed Jul 1 17:51:19 1992 Steve Chamberlain (sac@thepub.cygnus.com)
Thu Jun 18 09:38:56 1992 Steve Chamberlain (sac@thepub.cygnus.com)
- * h8300hms.em, h8300hms.sc-sh: do the right thing for -r
- * ldexp.c: lint
+ * emultempl/h8300hms.em, scripttempl/h8300hms.sc,
+ emulparams/h83000.sh: do the right thing for -r
+ * ldexp.c: lint
* ldlang.c(open_output): set the target arch and machine as soon
as we can. (lang_size_sections): use new macros for setting vma
* ldwrite.c: lint
@@ -7166,11 +7189,12 @@ 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.
* h8300*: fix bit rot and add support for h8300xray target
- * go32.sh: target emulation for go32.
+ * emulparams/go32.sh: target emulation for go32.
Mon Mar 16 14:53:29 1992 Steve Chamberlain (sac@rtl.cygnus.com)
- * gld960.em, i960.sc-sh. Fix i960 bit rot
+ * emultempl/gld960.em, scripttempl/i960.sc,
+ emulparamns/i960.sh. Fix i960 bit rot
Fri Mar 13 19:47:22 1992 K. Richard Pixley (rich@cygnus.com)
@@ -7375,7 +7399,8 @@ Mon Dec 9 16:26:43 1991 Per Bothner (bothner at cygnus.com)
* Makefile.in: Pass -y to bison. (Again;
accidentally deleted by Rich.)
- * news.sc, ldgld68k.sc: Define __end as well as _end.
+ * scripttempl/news.sc, scripttempl/ldgld68k.sc: Define __end as
+ well as _end.
Sat Dec 7 17:19:26 1991 Steve Chamberlain (sac at rtl.cygnus.com)
@@ -7434,7 +7459,7 @@ Wed Nov 13 15:17:43 1991 Per Bothner (bothner at cygnus.com)
Tue Nov 12 18:36:50 1991 Steve Chamberlain (sac at cygnus.com)
* Makefile.in: Take out the version number for install
- * m88kbcs.sc: put in contructor blocks.
+ * scripttempl/m88kbcs.sc: put in contructor blocks.
Mon Nov 11 18:47:33 1991 Per Bothner (bothner at cygnus.com)
@@ -7500,7 +7525,7 @@ Fri Oct 11 22:40:46 1991 John Gilmore (gnu at cygnus.com)
Fri Oct 11 16:42:22 1991 Per Bothner (bothner at cygnus.com)
- * news.sc: Add alignment for data segment.
+ * scripttempl/news.sc: Add alignment for data segment.
* ldtemplate: Add (yet another) script to get for -n or -N
options. (These need different alignment than ZMAGIC files.)
* Makefile.in: Add stuff for new foo.xn scripts.
@@ -7534,7 +7559,6 @@ Fri Oct 11 04:24:45 1991 John Gilmore (gnu at cygnus.com)
Restructure configuration scheme for bfd, binutils, ld.
- * include/sys/h-*.h: Move to bfd/hosts/h-*.h.
* configure.in: Revise to symlink sysdep.h to ../bfd/hosts/h-xxx.h.
Change some config names to match other dirs.
* *.c: Include bfd.h before sysdep.h, so ansidecl and PROTO()
@@ -7552,8 +7576,9 @@ Tue Oct 8 16:00:57 1991 Per Bothner (bothner at cygnus.com)
This is primarily intended for cross-linking, where you would
place libaries in a different place than native libraries.
Also, emulations made from ldtemplate now use $(srcdir).
- * ldglda29k.sc: Change SEARCH_DIR commands to a conventional
- form; people can use the Makefile's LIB_PATH to override.
+ * scripttempl/ldglda29k.sc: Change SEARCH_DIR commands to a
+ conventional form; people can use the Makefile's LIB_PATH to
+ override.
Tue Oct 8 14:51:21 1991 Roland H. Pesch (pesch at cygnus.com)
diff --git a/contrib/binutils/ld/ChangeLog-9899 b/contrib/binutils/ld/ChangeLog-9899
index 1f6533a..866e4a0 100644
--- a/contrib/binutils/ld/ChangeLog-9899
+++ b/contrib/binutils/ld/ChangeLog-9899
@@ -46,7 +46,7 @@ Wed Nov 3 23:31:19 1999 Jeffrey A Law (law@cygnus.com)
1999-10-27 Andreas Jaeger <aj@suse.de>
- * ld/configure.host: Added HOSTING_CRT0, HOSTING_LIBS for
+ * configure.host: Added HOSTING_CRT0, HOSTING_LIBS for
target "mips*-*-linux-gnu*".
1999-10-27 Scott Bambrough <scottb@netwinder.org>
@@ -187,7 +187,7 @@ Mon Sep 13 00:17:18 1999 Jeffrey A Law (law@cygnus.com)
1999-09-12 Ian Lance Taylor <ian@zembu.com>
- * pe.em: Don't include "../bfd/libbfd.h".
+ * emultempl/pe.em: Don't include "../bfd/libbfd.h".
(gld_${EMULATION_NAME}_after_open): Use xmalloc rather than
bfd_alloc.
@@ -291,7 +291,7 @@ Wed Sep 8 00:07:39 1999 Jeffrey A Law (law@cygnus.com)
1999-09-03 Scott Bambrough <scottb@netwinder.org>
- * ld/configure.host: Added HOSTING_CRT0, HOSTING_LIBS for
+ * configure.host: Added HOSTING_CRT0, HOSTING_LIBS for
target "arm*-*-linux-gnu*"
1999-09-04 Steve Chamberlain <sac@pobox.com>
@@ -330,7 +330,7 @@ Thu Sep 2 14:32:03 1999 Jeffrey A Law (law@cygnus.com)
* configure.tgt (arm-*-netbsd*): New target.
* Makefile.am (ALL_EMULATIONS): Add earmnbsd.o.
(earmnbsd.c): New rule with deps.
- * Makefile.on: Regenerate.
+ * Makefile.in: Regenerate.
* emulparams/armnbsd.sh: New file.
1999-08-23 Nick Clifton <nickc@cygnus.com>
@@ -683,7 +683,7 @@ Mon Jun 14 10:38:36 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
(..._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
+ * emultempl/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>
@@ -1270,7 +1270,7 @@ Wed Nov 4 16:39:18 1998 Nick Clifton <nickc@cygnus.com>
* configure.tgt: Add support for FR30 target.
* Makefile.in: Regenerate.
* emulparams/fr30.sh: New file.
- * scripttemp/fr30.sc: New file.
+ * scripttempl/fr30.sc: New file.
Mon Nov 2 14:47:15 1998 Catherine Moore <clm@cygnus.com>
@@ -1740,7 +1740,7 @@ Tue Apr 21 23:12:40 1998 Tom Tromey <tromey@scribbles.cygnus.com>
(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.
+ * po/Make-in, po/POTFILES.in, po/ld.pot: New files.
Tue Apr 21 23:07:07 1998 Ian Lance Taylor <ian@cygnus.com>
diff --git a/contrib/binutils/ld/Makefile.am b/contrib/binutils/ld/Makefile.am
index 0408dfb..1d59e83 100644
--- a/contrib/binutils/ld/Makefile.am
+++ b/contrib/binutils/ld/Makefile.am
@@ -41,6 +41,14 @@ MKDEP = gcc -MM
# What version of the manual to build
DOCVER = gen
+# Options to extract the man page from ld.texinfo
+MANCONF = -Dman
+
+TEXI2POD = perl $(BASEDIR)/etc/texi2pod.pl
+
+POD2MAN = pod2man --center="GNU Development Tools" \
+ --release="binutils-$(VERSION)" --section=1
+
#stuff for self hosting (can be overridden in config file).
HOSTING_CRT0 = @HOSTING_CRT0@
HOSTING_LIBS = @HOSTING_LIBS@
@@ -110,6 +118,7 @@ ALL_EMULATIONS = \
earmcoff.o \
earmelf.o \
earmelf_linux.o \
+ earmelf_nbsd.o \
earmelf_oabi.o \
earmnbsd.o \
earmpe.o \
@@ -148,17 +157,24 @@ ALL_EMULATIONS = \
eelf32lppc.o \
eelf32lppcsim.o \
eelf32mcore.o \
+ eelf32openrisc.o \
eelf32ppc.o \
eelf32ppclinux.o \
eelf32ppcsim.o \
+ eelf32xstormy16.o \
eelf_i386.o \
eelf_i386_be.o \
eelf_i386_chaos.o \
+ eelf_i386_ldso.o \
+ eelf_s390.o \
egld960.o \
egld960coff.o \
eh8300.o \
eh8300h.o \
eh8300s.o \
+ eh8300elf.o \
+ eh8300helf.o \
+ eh8300self.o \
eh8500.o \
eh8500b.o \
eh8500c.o \
@@ -192,6 +208,7 @@ ALL_EMULATIONS = \
em68kaux.o \
em68kcoff.o \
em68kelf.o \
+ em68kelfnbsd.o \
em68klinux.o \
em68klynx.o \
em68knbsd.o \
@@ -208,6 +225,7 @@ ALL_EMULATIONS = \
enews.o \
ens32knbsd.o \
epc532macha.o \
+ epdp11.o \
epjelf.o \
epjlelf.o \
eppcmacos.o \
@@ -219,6 +237,8 @@ ALL_EMULATIONS = \
eshelf.o \
eshelf_linux.o \
eshlelf_linux.o \
+ eshelf_nbsd.o \
+ eshlelf_nbsd.o \
eshl.o \
eshlelf.o \
eshpe.o \
@@ -241,14 +261,21 @@ ALL_EMULATIONS = \
ez8002.o
ALL_64_EMULATIONS = \
+ eelf64_aix.o \
eelf64_ia64.o \
eelf_x86_64.o \
+ eelf64_s390.o \
eelf64_sparc.o \
eelf64alpha.o \
+ eelf64alpha_nbsd.o \
eelf64bmip.o \
eelf64btsmip.o \
eelf64ltsmip.o \
eelf64hppa.o \
+ eelf64mmix.o \
+ emmo.o \
+ eelf64ppc.o \
+ eelf64lppc.o \
ehppa64linux.o
ALL_EMUL_EXTRA_OFILES = \
@@ -305,7 +332,7 @@ stringify.sed: ${srcdir}/emultempl/$(STRINGIFY)
# These all start with e so 'make clean' can find them.
-GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} ${exec_prefix} @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@"
+GENSCRIPTS = $(SHELL) $(srcdir)/genscripts.sh ${srcdir} ${libdir} "${exec_prefix}" @host@ @target@ @target_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@"
GEN_DEPENDS = $(srcdir)/genscripts.sh stringify.sed
@TDIRS@
@@ -335,6 +362,11 @@ earmelf_linux.c: $(srcdir)/emulparams/armelf_linux.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} armelf_linux "$(tdir_armelf_linux)"
+earmelf_nbsd.c: $(srcdir)/emulparams/armelf_nbsd.sh \
+ $(srcdir)/emulparams/armelf.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/armelf.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} armelf_nbsd "$(tdir_armelf_nbsd)"
earmaoutb.c: $(srcdir)/emulparams/armaoutb.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/armaout.sc ${GEN_DEPENDS}
${GENSCRIPTS} armaoutb "$(tdir_armaoutb)"
@@ -392,13 +424,13 @@ ecrisaout.c: $(srcdir)/emulparams/crisaout.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/crisaout.sc ${GEN_DEPENDS}
${GENSCRIPTS} crisaout "$(tdir_cris)"
ecriself.c: $(srcdir)/emulparams/criself.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} criself "$(tdir_cris)"
ecrislinux.c: $(srcdir)/emulparams/crislinux.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} crislinux "$(tdir_cris)"
ed10velf.c: $(srcdir)/emulparams/d10velf.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elfd10v.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/elf32.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}
@@ -415,6 +447,10 @@ edelta68.c: $(srcdir)/emulparams/delta68.sh \
eebmon29k.c: $(srcdir)/emulparams/ebmon29k.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/ebmon29k.sc ${GEN_DEPENDS}
${GENSCRIPTS} ebmon29k "$(tdir_ebmon29k)"
+eelf32xstormy16.c: $(srcdir)/emulparams/elf32xstormy16.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/needrelax.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32xstormy16 "$(tdir_xstormy16)"
eelf32fr30.c: $(srcdir)/emulparams/elf32fr30.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32fr30 "$(tdir_fr30)"
@@ -422,7 +458,7 @@ 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}
+ $(srcdir)/emultempl/elf32.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}
@@ -434,76 +470,121 @@ 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)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32b4300 "$(tdir_elf32b4300)"
eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32bmip "$(tdir_elf32bmip)"
eelf32bsmip.c: $(srcdir)/emulparams/elf32bsmip.sh \
+ $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32bsmip "$(tdir_elf32bsmip)"
eelf32btsmip.c: $(srcdir)/emulparams/elf32btsmip.sh \
+ $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32btsmip "$(tdir_elf32btsmip)"
eelf32ltsmip.c: $(srcdir)/emulparams/elf32ltsmip.sh \
+ $(srcdir)/emulparams/elf32btsmip.sh $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ltsmip "$(tdir_elf32ltsmip)"
eelf32ebmip.c: $(srcdir)/emulparams/elf32ebmip.sh \
+ $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ebmip "$(tdir_elf32ebmip)"
eelf32elmip.c: $(srcdir)/emulparams/elf32elmip.sh \
+ $(srcdir)/emulparams/elf32lmip.sh $(srcdir)/emulparams/elf32bmip.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)/emulparams/elf32b4300.sh $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32l4300 "$(tdir_elf32l4300)"
eelf32lmip.c: $(srcdir)/emulparams/elf32lmip.sh \
+ $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lmip "$(tdir_elf32lmip)"
eelf32lppc.c: $(srcdir)/emulparams/elf32lppc.sh \
+ $(srcdir)/emulparams/elf32ppc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lppc "$(tdir_elf32lppc)"
eelf32lppcsim.c: $(srcdir)/emulparams/elf32lppcsim.sh \
+ $(srcdir)/emulparams/elf32lppc.sh $(srcdir)/emulparams/elf32ppc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lppcsim "$(tdir_elf32lppcsim)"
eelf32lsmip.c: $(srcdir)/emulparams/elf32lsmip.sh \
+ $(srcdir)/emulparams/elf32lmip.sh $(srcdir)/emulparams/elf32bmip.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32lsmip "$(tdir_elf32lsmip)"
+eelf32openrisc.c: $(srcdir)/emulparams/elf32openrisc.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf32openrisc "$(tdir_openrisc)"
eelf32ppc.c: $(srcdir)/emulparams/elf32ppc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppc "$(tdir_elf32ppc)"
eelf32ppcsim.c: $(srcdir)/emulparams/elf32ppcsim.sh \
+ $(srcdir)/emulparams/elf32ppc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppcsim "$(tdir_elf32ppcsim)"
eelf32ppclinux.c: $(srcdir)/emulparams/elf32ppclinux.sh \
+ $(srcdir)/emulparams/elf32ppc.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf32ppclinux "$(tdir_elf32ppclinux)"
+eelf64ppc.c: $(srcdir)/emulparams/elf64ppc.sh $(srcdir)/emultempl/ppc64elf.em \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf64ppc "$(tdir_elf64ppc)"
+eelf64lppc.c: $(srcdir)/emulparams/elf64lppc.sh \
+ $(srcdir)/emulparams/elf64ppc.sh $(srcdir)/emultempl/ppc64elf.em \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf64lppc "$(tdir_elf64lppc)"
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)"
+eelf64alpha_nbsd.c: $(srcdir)/emulparams/elf64alpha_nbsd.sh \
+ $(srcdir)/emulparams/elf64alpha.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf64alpha_nbsd "$(tdir_elf64alpha_nbsd)"
eelf64hppa.c: $(srcdir)/emulparams/elf64hppa.sh \
+ $(srcdir)/emulparams/hppa64linux.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64hppa "$(tdir_elf64hppa)"
+eelf64_aix.c: $(srcdir)/emulparams/elf64_aix.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf64_aix "$(tdir_elf64_aix)"
eelf64_ia64.c: $(srcdir)/emulparams/elf64_ia64.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/needrelax.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64_ia64 "$(tdir_elf64_ia64)"
+eelf64_s390.c: $(srcdir)/emulparams/elf64_s390.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf64_s390 "$(tdir_elf64_s390)"
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)/emulparams/elf32bmipn32.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64bmip "$(tdir_elf64bmip)"
+eelf64mmix.c: $(srcdir)/emulparams/elf64mmix.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/mmix-elfnmmo.em \
+ $(srcdir)/emultempl/mmixelf.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf64mmix "$(tdir_elf64mmix)"
+emmo.c: $(srcdir)/emulparams/mmo.sh $(srcdir)/emultempl/mmix-elfnmmo.em \
+ $(srcdir)/emultempl/generic.em $(srcdir)/emultempl/mmo.em \
+ $(srcdir)/scripttempl/mmo.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} mmo "$(tdir_mmo)"
eelf64btsmip.c: $(srcdir)/emulparams/elf64btsmip.sh \
+ $(srcdir)/emulparams/elf32bmipn32.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64btsmip "$(tdir_elf64btsmip)"
eelf64ltsmip.c: $(srcdir)/emulparams/elf64ltsmip.sh \
+ $(srcdir)/emulparams/elf64btsmip.sh $(srcdir)/emulparams/elf32bmipn32.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf64ltsmip "$(tdir_elf64ltsmip)"
eelf_i386.c: $(srcdir)/emulparams/elf_i386.sh \
@@ -518,6 +599,12 @@ eelf_i386_be.c: $(srcdir)/emulparams/elf_i386_be.sh \
eelf_i386_chaos.c: $(srcdir)/emulparams/elf_i386_chaos.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} elf_i386_chaos "$(tdir_elf_i386_chaos)"
+eelf_i386_ldso.c: $(srcdir)/emulparams/elf_i386_ldso.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf_i386_ldso "$(tdir_elf_i386_ldso)"
+eelf_s390.c: $(srcdir)/emulparams/elf_s390.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} elf_s390 "$(tdir_elf_s390)"
egld960.c: $(srcdir)/emulparams/gld960.sh \
$(srcdir)/emultempl/gld960.em $(srcdir)/scripttempl/i960.sc ${GEN_DEPENDS}
${GENSCRIPTS} gld960 "$(tdir_gld960)"
@@ -533,6 +620,17 @@ eh8300h.c: $(srcdir)/emulparams/h8300h.sh \
eh8300s.c: $(srcdir)/emulparams/h8300s.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8300s.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8300s "$(tdir_h8300s)"
+eh8300elf.c: $(srcdir)/emulparams/h8300elf.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} h8300elf "$(tdir_h8300elf)"
+eh8300helf.c: $(srcdir)/emulparams/h8300helf.sh \
+ $(srcdir)/emulparams/h8300elf.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} h8300helf "$(tdir_h8300helf)"
+eh8300self.c: $(srcdir)/emulparams/h8300self.sh \
+ $(srcdir)/emulparams/h8300elf.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} h8300self "$(tdir_h8300self)"
eh8500.c: $(srcdir)/emulparams/h8500.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/h8500.sc ${GEN_DEPENDS}
${GENSCRIPTS} h8500 "$(tdir_h8500)"
@@ -590,7 +688,7 @@ ei386mach.c: $(srcdir)/emulparams/i386mach.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} i386mach "$(tdir_i386mach)"
ei386moss.c: $(srcdir)/emulparams/i386moss.sh \
- $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} i386moss "$(tdir_i386moss)"
ei386msdos.c: $(srcdir)/emulparams/i386msdos.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/i386msdos.sc ${GEN_DEPENDS}
@@ -638,6 +736,11 @@ em68kelf.c: $(srcdir)/emulparams/m68kelf.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/m68kelf.em \
$(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68kelf "$(tdir_m68kelf)"
+em68kelfnbsd.c: $(srcdir)/emulparams/m68kelfnbsd.sh \
+ $(srcdir)/emulparams/m68kelf.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/m68kelf.em \
+ $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} m68kelfnbsd "$(tdir_m68kelfnbsd)"
em68klinux.c: $(srcdir)/emulparams/m68klinux.sh \
$(srcdir)/emultempl/linux.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
${GENSCRIPTS} m68klinux "$(tdir_m68klinux)"
@@ -678,6 +781,7 @@ 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)/emulparams/mn10200.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} mn10300 "$(tdir_mn10300)"
emn10200.c: $(srcdir)/emulparams/mn10200.sh \
@@ -692,6 +796,9 @@ 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)"
+epdp11.c: $(srcdir)/emulparams/pdp11.sh \
+ $(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/aout.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} pdp11 "$(tdir_pdp11)"
epjelf.c: $(srcdir)/emulparams/pjelf.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} pjelf "$(tdir_pjelf)"
@@ -720,15 +827,27 @@ eshelf.c: $(srcdir)/emulparams/shelf.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf "$(tdir_shelf)"
eshelf_linux.c: $(srcdir)/emulparams/shelf_linux.sh \
+ $(srcdir)/emulparams/shlelf_linux.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shelf_linux "$(tdir_shelf_linux)"
eshlelf_linux.c: $(srcdir)/emulparams/shlelf_linux.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf_linux "$(tdir_shlelf_linux)"
+eshelf_nbsd.c: $(srcdir)/emulparams/shelf_nbsd.sh \
+ $(srcdir)/emulparams/shelf.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} shelf_nbsd "$(tdir_shelf_nbsd)"
+eshlelf_nbsd.c: $(srcdir)/emulparams/shlelf_nbsd.sh \
+ $(srcdir)/emulparams/shelf_nbsd.sh \
+ $(srcdir)/emulparams/shelf.sh \
+ $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+ ${GENSCRIPTS} shlelf_nbsd "$(tdir_shlelf_nbsd)"
eshlelf.c: $(srcdir)/emulparams/shlelf.sh \
+ $(srcdir)/emulparams/shelf.sh \
$(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
${GENSCRIPTS} shlelf "$(tdir_shlelf)"
eshl.c: $(srcdir)/emulparams/shl.sh \
+ $(srcdir)/emulparams/sh.sh \
$(srcdir)/emultempl/generic.em $(srcdir)/scripttempl/sh.sc ${GEN_DEPENDS}
${GENSCRIPTS} shl "$(tdir_shl)"
eshpe.c: $(srcdir)/emulparams/shpe.sh \
@@ -901,11 +1020,22 @@ ld.dvi: $(srcdir)/ld.texinfo configdoc.texi ldver.texi
TEXINPUTS=$(top_srcdir)/../texinfo:$$TEXINPUTS \
MAKEINFO="$(MAKEINFO) -I $(srcdir) -I $(BFDDIR)/doc" $(TEXI2DVI) -I $(BFDDIR)/doc $(srcdir)/ld.texinfo
+# Build the man page from the texinfo file
+# The sed command removes the no-adjust Nroff command so that
+# the man output looks standard.
+ld.1: $(srcdir)/ld.texinfo
+ touch $@
+ -$(TEXI2POD) $(MANCONF) < $(srcdir)/ld.texinfo > ld.pod
+ -($(POD2MAN) ld.pod | \
+ sed -e '/^.if n .na/d' > $@.T$$$$ && \
+ mv -f $@.T$$$$ $@) || \
+ (rm -f $@.T$$$$ && exit 1)
+ rm -f ld.pod
+
MAINTAINERCLEANFILES = ldver.texi
# We want to reconfigure if configure.host or configure.tgt changes.
-config.status: $(srcdir)/configure $(srcdir)/configure.host $(srcdir)/configure.tgt
- $(SHELL) ./config.status --recheck
+CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host $(srcdir)/configure.tgt
MOSTLYCLEANFILES = $(STAGESTUFF) ld1$(EXEEXT) ld2$(EXEEXT) ld3$(EXEEXT) \
ldemul-list.h crtbegin.o crtend.o ld.log ld.sum
@@ -938,13 +1068,15 @@ install-data-local:
# 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
-diststuff: $(LDDISTSTUFF) info
+EXTRA_DIST = ldgram.c ldgram.h ldlex.c $(man_MANS)
+diststuff: info $(EXTRA_DIST)
DISTCLEANFILES = tdirs site.exp site.bak stringify.sed
distclean-local:
rm -rf ldscripts
+Makefile: $(BFDDIR)/configure.in
+
# 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
@@ -991,70 +1123,77 @@ 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 $(INCDIR)/bin-bugs.h ldexp.h ldlang.h ldmisc.h \
- ldgram.h ldmain.h ldctor.h
+ $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.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 $(INCDIR)/bin-bugs.h \
- ldmisc.h ldexp.h ldlang.h ldfile.h ldemul.h ldmain.h \
- ldemul-list.h
+ $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ld.h $(INCDIR)/bin-bugs.h ldmisc.h ldexp.h ldlang.h \
+ ldfile.h ldemul.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 $(INCDIR)/bin-bugs.h ldmain.h ldmisc.h ldexp.h \
- ldgram.h ldlang.h
+ $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h ldmain.h \
+ ldmisc.h ldexp.h ldgram.h ldlang.h $(INCDIR)/libiberty.h
ldfile.o: ldfile.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/bfdlink.h \
- ld.h $(INCDIR)/bin-bugs.h ldmisc.h ldexp.h ldlang.h \
- ldfile.h ldmain.h ldgram.h ldlex.h ldemul.h $(INCDIR)/libiberty.h
+ $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/safe-ctype.h ld.h $(INCDIR)/bin-bugs.h \
+ ldmisc.h ldexp.h ldlang.h ldfile.h ldmain.h ldgram.h \
+ ldlex.h ldemul.h $(INCDIR)/libiberty.h
ldlang.o: ldlang.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
- $(INCDIR)/obstack.h $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h \
- ldmain.h ldgram.h ldexp.h ldlang.h ldlex.h ldmisc.h \
- ldctor.h ldfile.h ldemul.h $(INCDIR)/fnmatch.h $(INCDIR)/demangle.h
+ $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h $(INCDIR)/obstack.h \
+ $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h ldmain.h \
+ ldgram.h ldexp.h ldlang.h ldlex.h ldmisc.h ldctor.h \
+ ldfile.h ldemul.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 $(INCDIR)/filenames.h \
- ld.h $(INCDIR)/bin-bugs.h ldmain.h ldmisc.h ldwrite.h \
- ldgram.h ldexp.h ldlang.h ldlex.h ldfile.h ldemul.h \
- ldctor.h
+ $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/safe-ctype.h $(INCDIR)/libiberty.h $(INCDIR)/progress.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/filenames.h ld.h $(INCDIR)/bin-bugs.h \
+ ldmain.h ldmisc.h ldwrite.h ldgram.h ldexp.h ldlang.h \
+ ldlex.h ldfile.h ldemul.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 $(INCDIR)/bin-bugs.h ldmisc.h \
- ldexp.h ldlang.h ldgram.h ldlex.h ldmain.h ldfile.h
+ $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/libiberty.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 $(INCDIR)/bin-bugs.h \
- ldver.h ldexp.h ldlang.h ldfile.h ldemul.h ldmain.h
+ $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
+ ld.h $(INCDIR)/bin-bugs.h ldver.h ldexp.h ldlang.h \
+ ldfile.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 $(INCDIR)/bin-bugs.h ldexp.h \
- ldlang.h ldwrite.h ldmisc.h ldgram.h ldmain.h
+ $(INCDIR)/symcat.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
lexsup.o: lexsup.c ../bfd/bfd.h $(INCDIR)/ansidecl.h \
- sysdep.h config.h $(INCDIR)/fopen-same.h $(INCDIR)/libiberty.h \
- $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h ldmain.h \
- ldmisc.h ldexp.h ldlang.h ldgram.h ldlex.h ldfile.h \
- ldver.h ldemul.h $(INCDIR)/demangle.h
-mri.o: mri.c ../bfd/bfd.h $(INCDIR)/ansidecl.h sysdep.h \
- config.h $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h \
+ $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h $(INCDIR)/bfdlink.h \
+ ld.h $(INCDIR)/bin-bugs.h ldmain.h ldmisc.h ldexp.h \
+ ldlang.h ldgram.h ldlex.h ldfile.h ldver.h ldemul.h \
+ $(INCDIR)/demangle.h
+mri.o: mri.c ../bfd/bfd.h $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h \
+ sysdep.h config.h $(INCDIR)/fopen-same.h ld.h $(INCDIR)/bin-bugs.h \
ldexp.h ldlang.h ldmisc.h mri.h ldgram.h $(INCDIR)/libiberty.h
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 $(INCDIR)/bin-bugs.h ldmain.h \
- ldmisc.h ldexp.h ldlang.h
+ $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/bfdlink.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 ldfile.h \
- ldemul.h $(INCDIR)/coff/internal.h ../bfd/libcoff.h \
- deffile.h pe-dll.h
+ $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/bfdlink.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h \
+ ld.h $(INCDIR)/bin-bugs.h ldexp.h ldlang.h ldwrite.h \
+ ldmisc.h ldgram.h ldmain.h ldfile.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 $(INCDIR)/bin-bugs.h ldexp.h ldver.h ldlang.h \
- ldfile.h ldemul.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 \
+ $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/fopen-same.h \
+ $(INCDIR)/bfdlink.h ld.h $(INCDIR)/bin-bugs.h ldexp.h \
+ ldver.h ldlang.h ldfile.h ldemul.h ldmisc.h ldmain.h \
+ mri.h ldctor.h ldlex.h
+ldlex.o: ldlex.c ../bfd/bfd.h $(INCDIR)/symcat.h sysdep.h \
+ config.h $(INCDIR)/fopen-same.h $(INCDIR)/safe-ctype.h \
ld.h $(INCDIR)/bin-bugs.h ldgram.h ldmisc.h ldexp.h \
ldlang.h ldfile.h ldlex.h ldmain.h $(INCDIR)/libiberty.h
deffilep.o: deffilep.c $(INCDIR)/libiberty.h $(INCDIR)/ansidecl.h \
- ../bfd/bfd.h sysdep.h config.h $(INCDIR)/fopen-same.h \
- ld.h $(INCDIR)/bin-bugs.h ldmisc.h deffile.h
+ $(INCDIR)/safe-ctype.h ../bfd/bfd.h $(INCDIR)/symcat.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/NEWS b/contrib/binutils/ld/NEWS
index f1e7ece..70997ef 100644
--- a/contrib/binutils/ld/NEWS
+++ b/contrib/binutils/ld/NEWS
@@ -1,4 +1,13 @@
-*- text -*-
+* Support for -z nocopyreloc in the x86 ELF linker, which disables
+ production of copy relocs. Warning: using this option may result in
+ non-sharable applications.
+
+* Support for -z combreloc in the ELF linker, which puts dynamic
+ relocations against the same symbol together, so that dynamic linker
+ can use an one-entry symbol lookup cache.
+
+* Support for ELF SHF_MERGE section merging, by Jakub Jelinek.
* Support for AMD x86-64 architecture, by Jan Hubicka, SuSE Labs.
diff --git a/contrib/binutils/ld/README b/contrib/binutils/ld/README
index 8947d04..6fef769 100644
--- a/contrib/binutils/ld/README
+++ b/contrib/binutils/ld/README
@@ -1,3 +1,5 @@
+ README for LD
+
This is the GNU linker. It is distributed with other "binary
utilities" which should be in ../binutils. See ../binutils/README for
more general notes, including where to send bug reports.
diff --git a/contrib/binutils/ld/aclocal.m4 b/contrib/binutils/ld/aclocal.m4
index b468950..e68badb 100644
--- a/contrib/binutils/ld/aclocal.m4
+++ b/contrib/binutils/ld/aclocal.m4
@@ -27,6 +27,24 @@ AC_DEFUN([CY_WITH_NLS],)
AC_SUBST(INTLLIBS)
])
+#serial 1
+# This test replaces the one in autoconf.
+# Currently this macro should have the same name as the autoconf macro
+# because gettext's gettext.m4 (distributed in the automake package)
+# still uses it. Otherwise, the use in gettext.m4 makes autoheader
+# give these diagnostics:
+# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
+# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
+
+undefine([AC_ISC_POSIX])
+
+AC_DEFUN(AC_ISC_POSIX,
+ [
+ dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
+ AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
+ ]
+)
+
# Do all the work for Automake. This macro actually does too much --
# some checks are only needed if your package does certain things.
# But this isn't really a big deal.
diff --git a/contrib/binutils/ld/config.in b/contrib/binutils/ld/config.in
index 5e17bdc..c6c80ee 100644
--- a/contrib/binutils/ld/config.in
+++ b/contrib/binutils/ld/config.in
@@ -1,174 +1,175 @@
/* config.in. Generated automatically from configure.in by autoheader. */
-/* Define if using alloca.c. */
+/* 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 using `alloca.c'. */
#undef C_ALLOCA
-/* Define to empty if the keyword does not work. */
-#undef const
+/* Define to 1 if NLS is requested */
+#undef ENABLE_NLS
-/* 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
+/* Additional extension a shared object might have. */
+#undef EXTRA_SHLIB_EXTENSION
-/* Define if you have alloca, as a function or macro. */
+/* 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). */
+/* 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 if you have the <argz.h> header file. */
+#undef HAVE_ARGZ_H
-/* Define to `long' if <sys/types.h> doesn't define. */
-#undef off_t
+/* Define if you have the `dcgettext' function. */
+#undef HAVE_DCGETTEXT
-/* Define if you need to in order for stat and other things to work. */
-#undef _POSIX_SOURCE
+/* Define if you have the <dirent.h> header file, and it defines `DIR'. */
+#undef HAVE_DIRENT_H
-/* Define to `unsigned' if <sys/types.h> doesn't define. */
-#undef size_t
+/* Define if you have the `getcwd' function. */
+#undef HAVE_GETCWD
-/* 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 `getpagesize' function. */
+#undef HAVE_GETPAGESIZE
-/* Define if you have the ANSI C header files. */
-#undef STDC_HEADERS
+/* Define as 1 if you have gettext and don't want to use GNU gettext. */
+#undef HAVE_GETTEXT
-/* Define if lex declares yytext as a char * by default, not a char[]. */
-#undef YYTEXT_POINTER
+/* Define if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
-/* Define if you have the __argz_count function. */
-#undef HAVE___ARGZ_COUNT
+/* Define if your locale.h file contains LC_MESSAGES. */
+#undef HAVE_LC_MESSAGES
-/* Define if you have the __argz_next function. */
-#undef HAVE___ARGZ_NEXT
+/* Define if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
-/* Define if you have the __argz_stringify function. */
-#undef HAVE___ARGZ_STRINGIFY
+/* Define if you have the <locale.h> header file. */
+#undef HAVE_LOCALE_H
-/* Define if you have the dcgettext function. */
-#undef HAVE_DCGETTEXT
+/* Define if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
-/* Define if you have the getcwd function. */
-#undef HAVE_GETCWD
+/* Define if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
-/* Define if you have the getpagesize function. */
-#undef HAVE_GETPAGESIZE
+/* Define if you have a working `mmap' system call. */
+#undef HAVE_MMAP
-/* Define if you have the munmap function. */
+/* Define if you have the `munmap' function. */
#undef HAVE_MUNMAP
-/* Define if you have the putenv function. */
+/* Define if you have the <ndir.h> header file, and it defines `DIR'. */
+#undef HAVE_NDIR_H
+
+/* Define if you have the <nl_types.h> header file. */
+#undef HAVE_NL_TYPES_H
+
+/* Define if you have the `putenv' function. */
#undef HAVE_PUTENV
-/* Define if you have the sbrk function. */
+/* Define if you have the `sbrk' function. */
#undef HAVE_SBRK
-/* Define if you have the setenv function. */
+/* Define if you have the `setenv' function. */
#undef HAVE_SETENV
-/* Define if you have the setlocale function. */
+/* Define if you have the `setlocale' function. */
#undef HAVE_SETLOCALE
-/* Define if you have the stpcpy function. */
+/* Define if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define if you have the stpcpy function */
#undef HAVE_STPCPY
-/* Define if you have the strcasecmp function. */
+/* Define if you have the `strcasecmp' function. */
#undef HAVE_STRCASECMP
-/* Define if you have the strchr function. */
+/* 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
+/* Define if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
-/* Define if you have the <string.h> header file. */
+/* 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/dir.h> header file. */
+/* Define if you have the <sys/dir.h> header file, and it defines `DIR'. */
#undef HAVE_SYS_DIR_H
-/* Define if you have the <sys/ndir.h> header file. */
+/* Define if you have the <sys/ndir.h> header file, and it defines `DIR'. */
#undef HAVE_SYS_NDIR_H
-/* Define if you have the <sys/param.h> header file. */
+/* Define if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
-/* Define if you have the <unistd.h> header file. */
+/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
-/* Define if you have the <values.h> header file. */
+/* Define if you have the <values.h> header file. */
#undef HAVE_VALUES_H
-/* Name of package */
-#undef PACKAGE
+/* Define if you have the `__argz_count' function. */
+#undef HAVE___ARGZ_COUNT
-/* Version number of package */
-#undef VERSION
+/* Define if you have the `__argz_next' function. */
+#undef HAVE___ARGZ_NEXT
-/* Define if you have the stpcpy function */
-#undef HAVE_STPCPY
+/* Define if you have the `__argz_stringify' function. */
+#undef HAVE___ARGZ_STRINGIFY
-/* Define if your locale.h file contains LC_MESSAGES. */
-#undef HAVE_LC_MESSAGES
+/* Define if environ is not declared in system header files. */
+#undef NEED_DECLARATION_ENVIRON
-/* Define to 1 if NLS is requested */
-#undef ENABLE_NLS
+/* Define if free is not declared in system header files. */
+#undef NEED_DECLARATION_FREE
-/* Define as 1 if you have gettext and don't want to use GNU gettext. */
-#undef HAVE_GETTEXT
+/* Define if getenv is not declared in system header files. */
+#undef NEED_DECLARATION_GETENV
-/* Use b modifier when opening binary files? */
-#undef USE_BINARY_FOPEN
+/* Define if sbrk is not declared in system header files. */
+#undef NEED_DECLARATION_SBRK
/* 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
+/* Name of package */
+#undef PACKAGE
-/* Define if sbrk is not declared in system header files. */
-#undef NEED_DECLARATION_SBRK
+/* 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 getenv is not declared in system header files. */
-#undef NEED_DECLARATION_GETENV
+/* Define if you have the ANSI C header files. */
+#undef STDC_HEADERS
-/* 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
-/* Additional extension a shared object might have. */
-#undef EXTRA_SHLIB_EXTENSION
+/* Version number of package */
+#undef VERSION
+
+/* Define if `lex' declares `yytext' as a `char *' by default, not a `char[]'.
+ */
+#undef YYTEXT_POINTER
+/* Define to empty if `const' does not conform to ANSI C. */
+#undef const
+
+/* Define as `__inline' if that's what the C compiler calls it, or to nothing
+ if it is not supported. */
+#undef inline
+
+/* Define to `long' if <sys/types.h> does not define. */
+#undef off_t
+
+/* Define to `unsigned' if <sys/types.h> does not define. */
+#undef size_t
diff --git a/contrib/binutils/ld/configure b/contrib/binutils/ld/configure
index 2a211e2..4003cf8 100755
--- a/contrib/binutils/ld/configure
+++ b/contrib/binutils/ld/configure
@@ -53,7 +53,6 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
-sitefile=
srcdir=
target=NONE
verbose=
@@ -168,7 +167,6 @@ 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
@@ -339,11 +337,6 @@ 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=*)
@@ -509,16 +502,12 @@ fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
-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
+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
-else
- CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
@@ -557,12 +546,12 @@ else
fi
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:561: checking for Cygwin environment" >&5
+echo "configure:550: 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 566 "configure"
+#line 555 "configure"
#include "confdefs.h"
int main() {
@@ -573,7 +562,7 @@ int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:577: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:566: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
@@ -590,19 +579,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:594: checking for mingw32 environment" >&5
+echo "configure:583: 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 599 "configure"
+#line 588 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:595: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
@@ -667,7 +656,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:671: checking host system type" >&5
+echo "configure:660: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -688,7 +677,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:692: checking target system type" >&5
+echo "configure:681: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -706,7 +695,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:710: checking build system type" >&5
+echo "configure:699: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -728,249 +717,49 @@ test "$host_alias" != "$target_alias" &&
NONENONEs,x,x, &&
program_prefix=${target_alias}-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:735: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:765: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- 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:816: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
+echo "configure:723: checking for strerror in -lcposix" >&5
+ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="cl"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
- ;;
- esac
- fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:848: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 859 "configure"
+ ac_save_LIBS="$LIBS"
+LIBS="-lcposix $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 731 "configure"
#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char strerror();
-main(){return(0);}
+int main() {
+strerror()
+; return 0; }
EOF
-if { (eval echo configure:864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- ac_cv_prog_cc_works=yes
- # If we can't run a trivial program, we are probably using a cross compiler.
- if (./conftest; exit) 2>/dev/null; then
- ac_cv_prog_cc_cross=no
- else
- ac_cv_prog_cc_cross=yes
- fi
+if { (eval echo configure:742: \"$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
- ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:890: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:895: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:904: \"$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:923: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
+LIBS="$ac_save_LIBS"
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:955: checking for POSIXized ISC" >&5
-if test -d /etc/conf/kconfig.d &&
- grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
-then
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; 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
+ LIBS="$LIBS -lcposix"
else
echo "$ac_t""no" 1>&6
- ISC=
fi
+
+
BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${srcdir}/../bfd/configure.in`
# Find a good install program. We prefer a C program (faster),
@@ -985,7 +774,7 @@ BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${
# 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:989: checking for a BSD compatible install" >&5
+echo "configure:778: 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
@@ -1038,7 +827,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:1042: checking whether build environment is sane" >&5
+echo "configure:831: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
@@ -1095,7 +884,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:1099: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:888: 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
@@ -1141,7 +930,7 @@ EOF
missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:1145: checking for working aclocal" >&5
+echo "configure:934: 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.
@@ -1154,7 +943,7 @@ else
fi
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1158: checking for working autoconf" >&5
+echo "configure:947: 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.
@@ -1167,7 +956,7 @@ else
fi
echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:1171: checking for working automake" >&5
+echo "configure:960: 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.
@@ -1180,7 +969,7 @@ else
fi
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1184: checking for working autoheader" >&5
+echo "configure:973: 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.
@@ -1193,7 +982,7 @@ else
fi
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1197: checking for working makeinfo" >&5
+echo "configure:986: 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.
@@ -1211,7 +1000,7 @@ fi
if test "${enable_shared+set}" = set; then
enableval="$enable_shared"
p=${PACKAGE-default}
-case "$enableval" in
+case $enableval in
yes) enable_shared=yes ;;
no) enable_shared=no ;;
*)
@@ -1234,7 +1023,7 @@ fi
if test "${enable_static+set}" = set; then
enableval="$enable_static"
p=${PACKAGE-default}
-case "$enableval" in
+case $enableval in
yes) enable_static=yes ;;
no) enable_static=no ;;
*)
@@ -1257,7 +1046,7 @@ fi
if test "${enable_fast_install+set}" = set; then
enableval="$enable_fast_install"
p=${PACKAGE-default}
-case "$enableval" in
+case $enableval in
yes) enable_fast_install=yes ;;
no) enable_fast_install=no ;;
*)
@@ -1276,6 +1065,228 @@ else
enable_fast_install=yes
fi
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure: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=":"
+ 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:1102: 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:1153: 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:1185: 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 1196 "configure"
+#include "confdefs.h"
+
+main(){return(0);}
+EOF
+if { (eval echo configure:1201: \"$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:1227: 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:1232: 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:1241: \"$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:1260: checking whether ${CC-cc} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+ ac_cv_prog_cc_g=yes
+else
+ ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+
# Check whether --with-gnu-ld or --without-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then
withval="$with_gnu_ld"
@@ -1285,10 +1296,10 @@ else
fi
ac_prog=ld
-if test "$ac_cv_prog_gcc" = yes; then
+if test "$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:1292: checking for ld used by GCC" >&5
+echo "configure:1303: checking for ld used by GCC" >&5
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
@@ -1296,7 +1307,7 @@ echo "configure:1292: checking for ld used by GCC" >&5
*)
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
esac
- case "$ac_prog" in
+ case $ac_prog in
# Accept absolute paths.
[\\/]* | [A-Za-z]:[\\/]*)
re_direlt='/[^/][^/]*/\.\./'
@@ -1318,12 +1329,12 @@ echo "configure:1292: 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:1322: checking for GNU ld" >&5
+echo "configure:1333: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1325: checking for non-GNU ld" >&5
+echo "configure:1336: checking for non-GNU ld" >&5
fi
-if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
+if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -z "$LD"; then
@@ -1331,11 +1342,11 @@ else
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- ac_cv_path_LD="$ac_dir/$ac_prog"
+ lt_cv_path_LD="$ac_dir/$ac_prog"
# Check to see if the program is GNU ld. I'd rather use --version,
# but apparently some GNU ld's only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
- if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+ if "$lt_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
@@ -1344,11 +1355,11 @@ else
done
IFS="$ac_save_ifs"
else
- ac_cv_path_LD="$LD" # Let the user override the test with a path.
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
fi
fi
-LD="$ac_cv_path_LD"
+LD="$lt_cv_path_LD"
if test -n "$LD"; then
echo "$ac_t""$LD" 1>&6
else
@@ -1356,24 +1367,24 @@ else
fi
test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1360: checking if the linker ($LD) is GNU ld" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
+echo "configure:1371: checking if the linker ($LD) is GNU ld" >&5
+if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# I'd rather use --version here, but apparently some GNU ld's only accept -v.
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
- ac_cv_prog_gnu_ld=yes
+ lt_cv_prog_gnu_ld=yes
else
- ac_cv_prog_gnu_ld=no
+ lt_cv_prog_gnu_ld=no
fi
fi
-echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
-with_gnu_ld=$ac_cv_prog_gnu_ld
+echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
+with_gnu_ld=$lt_cv_prog_gnu_ld
echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
-echo "configure:1377: checking for $LD option to reload object files" >&5
+echo "configure:1388: checking for $LD option to reload object files" >&5
if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1385,13 +1396,13 @@ reload_flag=$lt_cv_ld_reload_flag
test -n "$reload_flag" && reload_flag=" $reload_flag"
echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1389: checking for BSD-compatible nm" >&5
-if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
+echo "configure:1400: checking for BSD-compatible nm" >&5
+if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$NM"; then
# Let the user override the test.
- ac_cv_path_NM="$NM"
+ lt_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
@@ -1403,27 +1414,27 @@ else
# nm: unknown option "B" ignored
# Tru64's nm complains that /dev/null is an invalid object file
if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
- ac_cv_path_NM="$tmp_nm -B"
+ lt_cv_path_NM="$tmp_nm -B"
break
elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$tmp_nm -p"
+ lt_cv_path_NM="$tmp_nm -p"
break
else
- ac_cv_path_NM=${ac_cv_path_NM="$tmp_nm"} # keep the first match, but
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
continue # so that we can try to find one that supports BSD flags
fi
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
+ test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
fi
fi
-NM="$ac_cv_path_NM"
+NM="$lt_cv_path_NM"
echo "$ac_t""$NM" 1>&6
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1427: checking whether ln -s works" >&5
+echo "configure:1438: 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
@@ -1444,7 +1455,7 @@ else
fi
echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
-echo "configure:1448: checking how to recognise dependant libraries" >&5
+echo "configure:1459: checking how to recognise dependant libraries" >&5
if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1462,8 +1473,8 @@ lt_cv_deplibs_check_method='unknown'
# If you have `file' or equivalent on your system and you're not sure
# whether `pass_all' will *always* work, you probably want this one.
-case "$host_os" in
-aix4*)
+case $host_os in
+aix*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -1472,8 +1483,8 @@ beos*)
;;
bsdi4*)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
lt_cv_file_magic_test_file=/shlib/libc.so
;;
@@ -1482,14 +1493,27 @@ cygwin* | mingw* |pw32*)
lt_cv_file_magic_cmd='$OBJDUMP -f'
;;
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ case "$host_os" in
+ rhapsody* | darwin1.012)
+ lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
+ ;;
+ *) # Darwin 1.3 on
+ lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
+ ;;
+ esac
+ ;;
+
freebsd* )
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- case "$host_cpu" in
+ case $host_cpu in
i*86 )
# Not sure whether the presence of OpenBSD here was a mistake.
# Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
;;
esac
@@ -1502,29 +1526,28 @@ gnu*)
lt_cv_deplibs_check_method=pass_all
;;
-hpux10.20*)
- # TODO: Does this work for hpux-11 too?
- lt_cv_deplibs_check_method='file_magic (s0-90-90-9|PA-RISC0-9.0-9) shared library'
+hpux10.20*|hpux11*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=/usr/lib/libc.sl
;;
irix5* | irix6*)
- case "$host_os" in
+ case $host_os in
irix5*)
# this will be overridden with pass_all, but let us keep it just in case
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
;;
*)
- case "$LD" in
+ case $LD in
*-32|*"-32 ") libmagic=32-bit;;
*-n32|*"-n32 ") libmagic=N32;;
*-64|*"-64 ") libmagic=64-bit;;
*) libmagic=never-match;;
esac
# this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
- ;;
+ lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
+ ;;
esac
lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
lt_cv_deplibs_check_method=pass_all
@@ -1532,25 +1555,30 @@ irix5* | irix6*)
# This must be Linux ELF.
linux-gnu*)
- case "$host_cpu" in
- alpha* | i*86 | powerpc* | sparc* | ia64* )
+ case $host_cpu in
+ alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
lt_cv_deplibs_check_method=pass_all ;;
*)
# glibc up to 2.1.1 does not perform some relocations on ARM
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
- esac
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
+ esac
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
;;
netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then :
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
else
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
fi
;;
+newsos6)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
+ ;;
+
osf3* | osf4* | osf5*)
# this will be overridden with pass_all, but let us keep it just in case
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
@@ -1567,14 +1595,18 @@ solaris*)
lt_cv_file_magic_test_file=/lib/libc.so
;;
+sysv5uw[78]* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- case "$host_vendor" in
+ case $host_vendor in
ncr)
lt_cv_deplibs_check_method=pass_all
;;
motorola)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
;;
esac
;;
@@ -1587,13 +1619,13 @@ file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:1591: checking for object suffix" >&5
+echo "configure:1623: checking for object suffix" >&5
if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftest*
echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:1597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1629: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
for ac_file in conftest.*; do
case $ac_file in
*.c) ;;
@@ -1613,7 +1645,7 @@ ac_objext=$ac_cv_objext
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1617: checking for executable suffix" >&5
+echo "configure:1649: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1623,10 +1655,10 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:1627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:1659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
- *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+ *.c | *.o | *.obj) ;;
*) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
esac
done
@@ -1652,15 +1684,15 @@ fi
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
# Only perform the check for file, if the check method requires it
-case "$deplibs_check_method" in
+case $deplibs_check_method in
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
-echo "configure:1660: checking for ${ac_tool_prefix}file" >&5
+echo "configure:1692: checking for ${ac_tool_prefix}file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- case "$MAGIC_CMD" in
+ case $MAGIC_CMD in
/*)
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
;;
@@ -1676,7 +1708,7 @@ else
if test -f $ac_dir/${ac_tool_prefix}file; then
lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
if test -n "$file_magic_test_file"; then
- case "$deplibs_check_method" in
+ case $deplibs_check_method in
"file_magic "*)
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
@@ -1718,11 +1750,11 @@ fi
if test -z "$lt_cv_path_MAGIC_CMD"; then
if test -n "$ac_tool_prefix"; then
echo $ac_n "checking for file""... $ac_c" 1>&6
-echo "configure:1722: checking for file" >&5
+echo "configure:1754: checking for file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- case "$MAGIC_CMD" in
+ case $MAGIC_CMD in
/*)
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
;;
@@ -1738,7 +1770,7 @@ else
if test -f $ac_dir/file; then
lt_cv_path_MAGIC_CMD="$ac_dir/file"
if test -n "$file_magic_test_file"; then
- case "$deplibs_check_method" in
+ case $deplibs_check_method in
"file_magic "*)
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
@@ -1789,7 +1821,7 @@ esac
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1793: checking for $ac_word" >&5
+echo "configure:1825: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1821,7 +1853,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1825: checking for $ac_word" >&5
+echo "configure:1857: 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
@@ -1856,7 +1888,7 @@ fi
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1860: checking for $ac_word" >&5
+echo "configure:1892: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1888,7 +1920,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1892: checking for $ac_word" >&5
+echo "configure:1924: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1926,8 +1958,8 @@ libtool_flags="--cache-file=$cache_file"
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
-test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
-test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
+test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
+test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
@@ -1952,12 +1984,12 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
# Some flags need to be propagated to the compiler or linker for good
# libtool support.
-case "$host" in
+case $host in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 1959 "configure"' > conftest.$ac_ext
- if { (eval echo configure:1960: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- case "`/usr/bin/file conftest.o`" in
+ echo '#line 1991 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:1992: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ case `/usr/bin/file conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -32"
;;
@@ -1977,7 +2009,7 @@ case "$host" in
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:1981: checking whether the C compiler needs -belf" >&5
+echo "configure:2013: 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
@@ -1990,14 +2022,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 1994 "configure"
+#line 2026 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:2001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2033: \"$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
@@ -2107,7 +2139,6 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
# clobbered by the next message.
exec 5>>./config.log
-
@@ -2136,7 +2167,7 @@ else
want64=false
fi
-build_warnings="-W -Wall"
+build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
# Check whether --enable-build-warnings or --disable-build-warnings was given.
if test "${enable_build_warnings+set}" = set; then
enableval="$enable_build_warnings"
@@ -2175,7 +2206,7 @@ fi
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2179: checking for $ac_word" >&5
+echo "configure:2210: 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
@@ -2205,7 +2236,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2209: checking for $ac_word" >&5
+echo "configure:2240: 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
@@ -2256,7 +2287,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2260: checking for $ac_word" >&5
+echo "configure:2291: 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
@@ -2288,7 +2319,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2292: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2323: 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.
@@ -2299,12 +2330,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 2303 "configure"
+#line 2334 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:2308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2339: \"$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
@@ -2330,12 +2361,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2334: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2365: 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:2339: checking whether we are using GNU C" >&5
+echo "configure:2370: 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
@@ -2344,7 +2375,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2379: \"$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
@@ -2363,7 +2394,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2367: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2398: 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
@@ -2406,7 +2437,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:2410: checking for a BSD compatible install" >&5
+echo "configure:2441: 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
@@ -2459,9 +2490,9 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-ALL_LINGUAS=
+ALL_LINGUAS="fr sv tr es"
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2465: checking how to run the C preprocessor" >&5
+echo "configure:2496: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -2476,13 +2507,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 2480 "configure"
+#line 2511 "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:2486: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2517: \"$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
:
@@ -2493,13 +2524,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 2497 "configure"
+#line 2528 "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:2503: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2534: \"$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
:
@@ -2510,13 +2541,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 2514 "configure"
+#line 2545 "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:2520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2551: \"$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
:
@@ -2543,7 +2574,7 @@ echo "$ac_t""$CPP" 1>&6
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2547: checking for $ac_word" >&5
+echo "configure:2578: 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
@@ -2571,12 +2602,12 @@ else
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2575: checking for ANSI C header files" >&5
+echo "configure:2606: 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 2580 "configure"
+#line 2611 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -2584,7 +2615,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2619: \"$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*
@@ -2601,7 +2632,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2605 "configure"
+#line 2636 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -2619,7 +2650,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2623 "configure"
+#line 2654 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -2640,7 +2671,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 2644 "configure"
+#line 2675 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -2651,7 +2682,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:2655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
:
else
@@ -2675,12 +2706,12 @@ EOF
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2679: checking for working const" >&5
+echo "configure:2710: 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 2684 "configure"
+#line 2715 "configure"
#include "confdefs.h"
int main() {
@@ -2729,7 +2760,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:2733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -2750,21 +2781,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:2754: checking for inline" >&5
+echo "configure:2785: 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 2761 "configure"
+#line 2792 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:2768: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -2790,12 +2821,12 @@ EOF
esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:2794: checking for off_t" >&5
+echo "configure:2825: 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 2799 "configure"
+#line 2830 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -2823,12 +2854,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:2827: checking for size_t" >&5
+echo "configure:2858: 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 2832 "configure"
+#line 2863 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -2858,19 +2889,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:2862: checking for working alloca.h" >&5
+echo "configure:2893: 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 2867 "configure"
+#line 2898 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:2874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2905: \"$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
@@ -2891,12 +2922,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:2895: checking for alloca" >&5
+echo "configure:2926: 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 2900 "configure"
+#line 2931 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -2924,7 +2955,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:2928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2959: \"$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
@@ -2956,12 +2987,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:2960: checking whether alloca needs Cray hooks" >&5
+echo "configure:2991: 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 2965 "configure"
+#line 2996 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -2986,12 +3017,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:2990: checking for $ac_func" >&5
+echo "configure:3021: 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 2995 "configure"
+#line 3026 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3014,7 +3045,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3049: \"$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
@@ -3041,7 +3072,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:3045: checking stack direction for C alloca" >&5
+echo "configure:3076: 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
@@ -3049,7 +3080,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 3053 "configure"
+#line 3084 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -3068,7 +3099,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:3072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3103: \"$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
@@ -3089,21 +3120,21 @@ EOF
fi
-for ac_hdr in unistd.h
+for ac_hdr in stdlib.h unistd.h sys/stat.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:3097: checking for $ac_hdr" >&5
+echo "configure:3128: 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 3102 "configure"
+#line 3133 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3107: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3138: \"$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*
@@ -3132,12 +3163,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3136: checking for $ac_func" >&5
+echo "configure:3167: 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 3141 "configure"
+#line 3172 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3160,7 +3191,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3164: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3195: \"$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
@@ -3185,7 +3216,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:3189: checking for working mmap" >&5
+echo "configure:3220: 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
@@ -3193,7 +3224,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 3197 "configure"
+#line 3228 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -3221,11 +3252,24 @@ else
#include <fcntl.h>
#include <sys/mman.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
/* 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
@@ -3333,7 +3377,7 @@ main()
}
EOF
-if { (eval echo configure:3337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3381: \"$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
@@ -3361,17 +3405,17 @@ unistd.h values.h sys/param.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3365: checking for $ac_hdr" >&5
+echo "configure:3409: 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 3370 "configure"
+#line 3414 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3375: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3419: \"$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*
@@ -3401,12 +3445,12 @@ done
__argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3405: checking for $ac_func" >&5
+echo "configure:3449: 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 3410 "configure"
+#line 3454 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3429,7 +3473,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3433: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3477: \"$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
@@ -3458,12 +3502,12 @@ done
for ac_func in stpcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3462: checking for $ac_func" >&5
+echo "configure:3506: 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 3467 "configure"
+#line 3511 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3486,7 +3530,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3534: \"$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
@@ -3520,19 +3564,19 @@ EOF
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:3524: checking for LC_MESSAGES" >&5
+echo "configure:3568: 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 3529 "configure"
+#line 3573 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:3536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3580: \"$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
@@ -3553,7 +3597,7 @@ EOF
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:3557: checking whether NLS is requested" >&5
+echo "configure:3601: 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"
@@ -3573,7 +3617,7 @@ fi
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:3577: checking whether included gettext is requested" >&5
+echo "configure:3621: 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"
@@ -3592,17 +3636,17 @@ fi
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:3596: checking for libintl.h" >&5
+echo "configure:3640: 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 3601 "configure"
+#line 3645 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3606: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3650: \"$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*
@@ -3619,19 +3663,19 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:3623: checking for gettext in libc" >&5
+echo "configure:3667: 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 3628 "configure"
+#line 3672 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:3635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3679: \"$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
@@ -3647,7 +3691,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
if test "$gt_cv_func_gettext_libc" != "yes"; then
echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:3651: checking for bindtextdomain in -lintl" >&5
+echo "configure:3695: 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
@@ -3655,7 +3699,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3659 "configure"
+#line 3703 "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
@@ -3666,7 +3710,7 @@ int main() {
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:3670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3714: \"$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
@@ -3682,19 +3726,19 @@ fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:3686: checking for gettext in libintl" >&5
+echo "configure:3730: 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 3691 "configure"
+#line 3735 "configure"
#include "confdefs.h"
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:3698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3742: \"$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
@@ -3722,7 +3766,7 @@ EOF
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3726: checking for $ac_word" >&5
+echo "configure:3770: 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
@@ -3756,12 +3800,12 @@ fi
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3760: checking for $ac_func" >&5
+echo "configure:3804: 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 3765 "configure"
+#line 3809 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3784,7 +3828,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3832: \"$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
@@ -3811,7 +3855,7 @@ done
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3815: checking for $ac_word" >&5
+echo "configure:3859: 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
@@ -3847,7 +3891,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3851: checking for $ac_word" >&5
+echo "configure:3895: 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
@@ -3879,7 +3923,7 @@ else
fi
cat > conftest.$ac_ext <<EOF
-#line 3883 "configure"
+#line 3927 "configure"
#include "confdefs.h"
int main() {
@@ -3887,7 +3931,7 @@ extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:3891: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
CATOBJEXT=.gmo
DATADIRNAME=share
@@ -3919,7 +3963,7 @@ fi
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3923: checking for $ac_word" >&5
+echo "configure:3967: 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
@@ -3953,7 +3997,7 @@ fi
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3957: checking for $ac_word" >&5
+echo "configure:4001: 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
@@ -3989,7 +4033,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3993: checking for $ac_word" >&5
+echo "configure:4037: 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
@@ -4079,7 +4123,7 @@ fi
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:4083: checking for catalogs to be installed" >&5
+echo "configure:4127: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
@@ -4107,17 +4151,17 @@ echo "configure:4083: checking for catalogs to be installed" >&5
if test "$CATOBJEXT" = ".cat"; then
ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:4111: checking for linux/version.h" >&5
+echo "configure:4155: 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 4116 "configure"
+#line 4160 "configure"
#include "confdefs.h"
#include <linux/version.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4121: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4165: \"$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*
@@ -4162,7 +4206,7 @@ fi
l=
- if test -d $srcdir/po; then
+ if test -f $srcdir/po/POTFILES.in; then
test -d po || mkdir po
if test "x$srcdir" != "x."; then
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
@@ -4182,7 +4226,7 @@ fi
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:4186: checking for executable suffix" >&5
+echo "configure:4230: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -4192,10 +4236,10 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:4196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:4240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
- *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+ *.c | *.o | *.obj) ;;
*) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
esac
done
@@ -4218,7 +4262,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4222: checking for $ac_word" >&5
+echo "configure:4266: 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
@@ -4254,7 +4298,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4258: checking for $ac_word" >&5
+echo "configure:4302: 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
@@ -4287,7 +4331,7 @@ test -n "$LEX" || LEX=""$missing_dir/missing flex""
# Extract the first word of "flex", so it can be a program name with args.
set dummy flex; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4291: checking for $ac_word" >&5
+echo "configure:4335: 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
@@ -4321,7 +4365,7 @@ then
*) ac_lib=l ;;
esac
echo $ac_n "checking for yywrap in -l$ac_lib""... $ac_c" 1>&6
-echo "configure:4325: checking for yywrap in -l$ac_lib" >&5
+echo "configure:4369: 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
@@ -4329,7 +4373,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-l$ac_lib $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4333 "configure"
+#line 4377 "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
@@ -4340,7 +4384,7 @@ int main() {
yywrap()
; return 0; }
EOF
-if { (eval echo configure:4344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4388: \"$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
@@ -4363,7 +4407,7 @@ fi
fi
echo $ac_n "checking lex output file root""... $ac_c" 1>&6
-echo "configure:4367: checking lex output file root" >&5
+echo "configure:4411: 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
@@ -4384,7 +4428,7 @@ echo "$ac_t""$ac_cv_prog_lex_root" 1>&6
LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
echo $ac_n "checking whether yytext is a pointer""... $ac_c" 1>&6
-echo "configure:4388: checking whether yytext is a pointer" >&5
+echo "configure:4432: 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
@@ -4396,14 +4440,14 @@ echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
ac_save_LIBS="$LIBS"
LIBS="$LIBS $LEXLIB"
cat > conftest.$ac_ext <<EOF
-#line 4400 "configure"
+#line 4444 "configure"
#include "confdefs.h"
`cat $LEX_OUTPUT_ROOT.c`
int main() {
; return 0; }
EOF
-if { (eval echo configure:4407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4451: \"$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
@@ -4426,7 +4470,7 @@ fi
echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
-echo "configure:4430: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:4474: 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"
@@ -4460,17 +4504,17 @@ for ac_hdr in string.h strings.h stdlib.h unistd.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:4464: checking for $ac_hdr" >&5
+echo "configure:4508: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4469 "configure"
+#line 4513 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -4499,12 +4543,12 @@ done
for ac_func in sbrk
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4503: checking for $ac_func" >&5
+echo "configure:4547: 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 4508 "configure"
+#line 4552 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -4527,7 +4571,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:4531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4575: \"$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
@@ -4556,12 +4600,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:4560: checking for $ac_hdr that defines DIR" >&5
+echo "configure:4604: 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 4565 "configure"
+#line 4609 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <$ac_hdr>
@@ -4569,7 +4613,7 @@ int main() {
DIR *dirp = 0;
; return 0; }
EOF
-if { (eval echo configure:4573: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
eval "ac_cv_header_dirent_$ac_safe=yes"
else
@@ -4594,7 +4638,7 @@ done
# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
if test $ac_header_dirent = dirent.h; then
echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:4598: checking for opendir in -ldir" >&5
+echo "configure:4642: 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
@@ -4602,7 +4646,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldir $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4606 "configure"
+#line 4650 "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
@@ -4613,7 +4657,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:4617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4635,7 +4679,7 @@ fi
else
echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:4639: checking for opendir in -lx" >&5
+echo "configure:4683: 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
@@ -4643,7 +4687,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lx $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4647 "configure"
+#line 4691 "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
@@ -4654,7 +4698,7 @@ int main() {
opendir()
; return 0; }
EOF
-if { (eval echo configure:4658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4702: \"$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
@@ -4687,12 +4731,12 @@ EOF
esac
echo $ac_n "checking whether strstr must be declared""... $ac_c" 1>&6
-echo "configure:4691: checking whether strstr must be declared" >&5
+echo "configure:4735: 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 4696 "configure"
+#line 4740 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4713,7 +4757,7 @@ int main() {
char *(*pfn) = (char *(*)) strstr
; return 0; }
EOF
-if { (eval echo configure:4717: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_strstr=no
else
@@ -4734,12 +4778,12 @@ EOF
fi
echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
-echo "configure:4738: checking whether free must be declared" >&5
+echo "configure:4782: 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 4743 "configure"
+#line 4787 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4760,7 +4804,7 @@ int main() {
char *(*pfn) = (char *(*)) free
; return 0; }
EOF
-if { (eval echo configure:4764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_free=no
else
@@ -4781,12 +4825,12 @@ EOF
fi
echo $ac_n "checking whether sbrk must be declared""... $ac_c" 1>&6
-echo "configure:4785: checking whether sbrk must be declared" >&5
+echo "configure:4829: 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 4790 "configure"
+#line 4834 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4807,7 +4851,7 @@ int main() {
char *(*pfn) = (char *(*)) sbrk
; return 0; }
EOF
-if { (eval echo configure:4811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_sbrk=no
else
@@ -4828,12 +4872,12 @@ EOF
fi
echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
-echo "configure:4832: checking whether getenv must be declared" >&5
+echo "configure:4876: 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 4837 "configure"
+#line 4881 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4854,7 +4898,7 @@ int main() {
char *(*pfn) = (char *(*)) getenv
; return 0; }
EOF
-if { (eval echo configure:4858: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_getenv=no
else
@@ -4875,12 +4919,12 @@ EOF
fi
echo $ac_n "checking whether environ must be declared""... $ac_c" 1>&6
-echo "configure:4879: checking whether environ must be declared" >&5
+echo "configure:4923: 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 4884 "configure"
+#line 4928 "configure"
#include "confdefs.h"
#include <stdio.h>
@@ -4901,7 +4945,7 @@ int main() {
char *(*pfn) = (char *(*)) environ
; return 0; }
EOF
-if { (eval echo configure:4905: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4949: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
bfd_cv_decl_needed_environ=no
else
@@ -4929,19 +4973,19 @@ fi
# constants, while still supporting pre-ANSI compilers which do not
# support string concatenation.
echo $ac_n "checking whether ANSI C string concatenation works""... $ac_c" 1>&6
-echo "configure:4933: checking whether ANSI C string concatenation works" >&5
+echo "configure:4977: checking whether ANSI C string concatenation works" >&5
if eval "test \"`echo '$''{'ld_cv_string_concatenation'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4938 "configure"
+#line 4982 "configure"
#include "confdefs.h"
int main() {
char *a = "a" "a";
; return 0; }
EOF
-if { (eval echo configure:4945: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:4989: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ld_cv_string_concatenation=yes
else
@@ -5215,7 +5259,6 @@ s%@build_alias@%$build_alias%g
s%@build_cpu@%$build_cpu%g
s%@build_vendor@%$build_vendor%g
s%@build_os@%$build_os%g
-s%@CC@%$CC%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
@@ -5227,6 +5270,7 @@ s%@AUTOMAKE@%$AUTOMAKE%g
s%@AUTOHEADER@%$AUTOHEADER%g
s%@MAKEINFO@%$MAKEINFO%g
s%@SET_MAKE@%$SET_MAKE%g
+s%@CC@%$CC%g
s%@LN_S@%$LN_S%g
s%@OBJEXT@%$OBJEXT%g
s%@EXEEXT@%$EXEEXT%g
diff --git a/contrib/binutils/ld/configure.in b/contrib/binutils/ld/configure.in
index 6a69408..34a6ad2 100644
--- a/contrib/binutils/ld/configure.in
+++ b/contrib/binutils/ld/configure.in
@@ -29,7 +29,7 @@ AC_ARG_ENABLE(64-bit-bfd,
*) AC_MSG_ERROR(bad value ${enableval} for 64-bit-bfd option) ;;
esac],[want64=false])dnl
-build_warnings="-W -Wall"
+build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
AC_ARG_ENABLE(build-warnings,
[ --enable-build-warnings Enable build-time compiler warnings if gcc is used],
[case "${enableval}" in
@@ -64,7 +64,7 @@ fi
AC_PROG_CC
AC_PROG_INSTALL
-ALL_LINGUAS=
+ALL_LINGUAS="fr sv tr es"
CY_GNU_GETTEXT
AC_EXEEXT
diff --git a/contrib/binutils/ld/deffilep.y b/contrib/binutils/ld/deffilep.y
index d6d32c8..51d17f8 100644
--- a/contrib/binutils/ld/deffilep.y
+++ b/contrib/binutils/ld/deffilep.y
@@ -1,6 +1,7 @@
%{ /* deffilep.y - parser for .def files */
-/* Copyright 1995, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+/* Copyright 1995, 1997, 1998, 1999, 2000, 2001
+ Free Software Foundation, Inc.
This file is part of GNU Binutils.
@@ -19,8 +20,8 @@ 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 "safe-ctype.h"
#include "bfd.h"
#include "sysdep.h"
#include "ld.h"
@@ -77,14 +78,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#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 def_file_module *def_stash_module PARAMS ((def_file *, const char *));
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 *));
@@ -93,6 +93,9 @@ 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 void put_buf PARAMS ((char));
+static int def_getc PARAMS ((void));
+static int def_ungetc PARAMS ((int));
static int def_lex PARAMS ((void));
static int lex_forced_token = 0;
@@ -493,7 +496,7 @@ def_file_add_export (def, external_name, internal_name, ordinal)
static def_file_module *
def_stash_module (def, name)
def_file *def;
- char *name;
+ const char *name;
{
def_file_module *s;
for (s=def->modules; s; s=s->next)
@@ -530,7 +533,7 @@ def_file_add_import (def, name, module, ordinal, internal_name)
if (name)
i->name = xstrdup (name);
if (module)
- i->module = def_stash_module(def, module);
+ i->module = def_stash_module (def, module);
i->ordinal = ordinal;
if (internal_name)
i->internal_name = xstrdup (internal_name);
@@ -569,10 +572,10 @@ def_file_add_directive (my_def, param, len)
while (param < pend)
{
- while (param < pend && isspace (*param))
+ while (param < pend && ISSPACE (*param))
param++;
for (tend = param + 1;
- tend < pend && !(isspace (tend[-1]) && *tend == '-');
+ tend < pend && !(ISSPACE (tend[-1]) && *tend == '-');
tend++);
for (i = 0; diropts[i].param; i++)
@@ -946,10 +949,10 @@ def_lex ()
/* must be something else */
saw_newline = 0;
- if (isdigit (c))
+ if (ISDIGIT (c))
{
bufptr = 0;
- while (c != EOF && (isxdigit (c) || (c == 'x')))
+ while (c != EOF && (ISXDIGIT (c) || (c == 'x')))
{
put_buf (c);
c = def_getc ();
@@ -963,10 +966,10 @@ def_lex ()
return NUMBER;
}
- if (isalpha (c) || strchr ("$:-_?", c))
+ if (ISALPHA (c) || strchr ("$:-_?", c))
{
bufptr = 0;
- while (c != EOF && (isalnum (c) || strchr ("$:-_?/@", c)))
+ while (c != EOF && (ISALNUM (c) || strchr ("$:-_?/@", c)))
{
put_buf (c);
c = def_getc ();
diff --git a/contrib/binutils/ld/emulparams/armelf.sh b/contrib/binutils/ld/emulparams/armelf.sh
index 338b9ce..0e8ebc5 100644
--- a/contrib/binutils/ld/emulparams/armelf.sh
+++ b/contrib/binutils/ld/emulparams/armelf.sh
@@ -10,6 +10,8 @@ OTHER_TEXT_SECTIONS='*(.glue_7t) *(.glue_7)'
OTHER_BSS_SYMBOLS='__bss_start__ = .;'
OTHER_BSS_END_SYMBOLS='_bss_end__ = . ; __bss_end__ = . ; __end__ = . ;'
+DATA_START_SYMBOLS='__data_start = . ;';
+
GENERATE_SHLIB_SCRIPT=yes
ARCH=arm
@@ -18,6 +20,5 @@ 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) }'
+# This sets the stack to the top of the simulator memory (2^19 bytes).
+STACK_ADDR=0x80000
diff --git a/contrib/binutils/ld/emulparams/armelf_nbsd.sh b/contrib/binutils/ld/emulparams/armelf_nbsd.sh
new file mode 100644
index 0000000..571483c
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/armelf_nbsd.sh
@@ -0,0 +1,6 @@
+. ${srcdir}/emulparams/armelf.sh
+MAXPAGESIZE=0x8000
+TEXT_START_ADDR=0x00008000
+
+unset STACK_ADDR
+unset EMBEDDED
diff --git a/contrib/binutils/ld/emulparams/armelf_oabi.sh b/contrib/binutils/ld/emulparams/armelf_oabi.sh
index d568328..f1c967d 100644
--- a/contrib/binutils/ld/emulparams/armelf_oabi.sh
+++ b/contrib/binutils/ld/emulparams/armelf_oabi.sh
@@ -16,6 +16,5 @@ 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) }'
+# This sets the stack to the top of the simulator memory (2^19 bytes).
+STACK_ADDR=0x80000
diff --git a/contrib/binutils/ld/emulparams/elf32_sparc.sh b/contrib/binutils/ld/emulparams/elf32_sparc.sh
index 74e2326..d8b81e7 100644
--- a/contrib/binutils/ld/emulparams/elf32_sparc.sh
+++ b/contrib/binutils/ld/emulparams/elf32_sparc.sh
@@ -9,3 +9,4 @@ MACHINE=
TEMPLATE_NAME=elf32
DATA_PLT=
GENERATE_SHLIB_SCRIPT=yes
+NO_SMALL_DATA=yes
diff --git a/contrib/binutils/ld/emulparams/elf32b4300.sh b/contrib/binutils/ld/emulparams/elf32b4300.sh
index 24f8d98..4bfdd6e 100644
--- a/contrib/binutils/ld/emulparams/elf32b4300.sh
+++ b/contrib/binutils/ld/emulparams/elf32b4300.sh
@@ -1,29 +1,10 @@
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-bigmips"
-BIG_OUTPUT_FORMAT="elf32-bigmips"
-LITTLE_OUTPUT_FORMAT="elf32-littlemips"
+# If you change this file, please also look at files which source this one:
+# elf32l4300.sh
+
+EMBEDDED=yes
+. ${srcdir}/emulparams/elf32bmip.sh
TEXT_START_ADDR=0xa0020000
-MAXPAGESIZE=0x40000
-INITIAL_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
-OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
-OTHER_GOT_SYMBOLS='
- _gp = ALIGN(16) + 0x7ff0;
-'
-OTHER_GOT_SECTIONS='
- .lit8 : { *(.lit8) }
- .lit4 : { *(.lit4) }
-'
-TEXT_START_SYMBOLS='_ftext = . ;'
-DATA_START_SYMBOLS='_fdata = . ;'
-OTHER_BSS_SYMBOLS='_fbss = .;'
+unset NONPAGED_TEXT_START_ADDR
+unset SHLIB_TEXT_START_ADDR
EXECUTABLE_SYMBOLS='_DYNAMIC_LINK = 0;'
-OTHER_SECTIONS='
- .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
- .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
-'
-ARCH=mips
-MACHINE=
-TEMPLATE_NAME=elf32
-GENERATE_SHLIB_SCRIPT=yes
DYNAMIC_LINK=false
-EMBEDDED=yes
diff --git a/contrib/binutils/ld/emulparams/elf32l4300.sh b/contrib/binutils/ld/emulparams/elf32l4300.sh
index 690de88..865792a 100644
--- a/contrib/binutils/ld/emulparams/elf32l4300.sh
+++ b/contrib/binutils/ld/emulparams/elf32l4300.sh
@@ -1,29 +1,4 @@
-SCRIPT_NAME=elf
+. ${srcdir}/emulparams/elf32b4300.sh
OUTPUT_FORMAT="elf32-littlemips"
BIG_OUTPUT_FORMAT="elf32-bigmips"
LITTLE_OUTPUT_FORMAT="elf32-littlemips"
-TEXT_START_ADDR=0xa0020000
-MAXPAGESIZE=0x40000
-INITIAL_READONLY_SECTIONS='.reginfo : { *(.reginfo) }'
-OTHER_TEXT_SECTIONS='*(.mips16.fn.*) *(.mips16.call.*)'
-OTHER_GOT_SYMBOLS='
- _gp = ALIGN(16) + 0x7ff0;
-'
-OTHER_GOT_SECTIONS='
- .lit8 : { *(.lit8) }
- .lit4 : { *(.lit4) }
-'
-TEXT_START_SYMBOLS='_ftext = . ;'
-DATA_START_SYMBOLS='_fdata = . ;'
-OTHER_BSS_SYMBOLS='_fbss = .;'
-EXECUTABLE_SYMBOLS='_DYNAMIC_LINK = 0;'
-OTHER_SECTIONS='
- .gptab.sdata : { *(.gptab.data) *(.gptab.sdata) }
- .gptab.sbss : { *(.gptab.bss) *(.gptab.sbss) }
-'
-ARCH=mips
-MACHINE=
-TEMPLATE_NAME=elf32
-GENERATE_SHLIB_SCRIPT=yes
-DYNAMIC_LINK=false
-EMBEDDED=yes
diff --git a/contrib/binutils/ld/emulparams/elf32lppc.sh b/contrib/binutils/ld/emulparams/elf32lppc.sh
index bc9125d..18cce48 100644
--- a/contrib/binutils/ld/emulparams/elf32lppc.sh
+++ b/contrib/binutils/ld/emulparams/elf32lppc.sh
@@ -1,18 +1,5 @@
-TEMPLATE_NAME=elf32
-# If you change this, please also look at:
-# elf32ppc.sh elf32ppcsim.sh elf32lppc.sh elf32lppcsim.sh elf32ppclinux.sh
-GENERATE_SHLIB_SCRIPT=yes
-SCRIPT_NAME=elf
+# If you change this file, please also look at files which source this one:
+# elf32lppcsim.sh
+
+. ${srcdir}/emulparams/elf32ppc.sh
OUTPUT_FORMAT="elf32-powerpcle"
-TEXT_START_ADDR=0x01800000
-MAXPAGESIZE=0x10000
-ARCH=powerpc
-MACHINE=
-BSS_PLT=
-EXECUTABLE_SYMBOLS='PROVIDE (__stack = 0); PROVIDE (___stack = 0);'
-OTHER_BSS_END_SYMBOLS='__end = .;'
-OTHER_READWRITE_SECTIONS='
- .fixup : { *(.fixup) }
- .got1 : { *(.got1) }
- .got2 : { *(.got2) }
-'
diff --git a/contrib/binutils/ld/emulparams/elf32lppcsim.sh b/contrib/binutils/ld/emulparams/elf32lppcsim.sh
index 74959f8..e743852 100644
--- a/contrib/binutils/ld/emulparams/elf32lppcsim.sh
+++ b/contrib/binutils/ld/emulparams/elf32lppcsim.sh
@@ -1,18 +1,2 @@
-TEMPLATE_NAME=elf32
-# If you change this, please also look at:
-# elf32ppc.sh elf32ppcsim.sh elf32lppc.sh elf32lppcsim.sh elf32ppclinux.sh
-GENERATE_SHLIB_SCRIPT=yes
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-powerpcle"
+. ${srcdir}/emulparams/elf32lppc.sh
TEXT_START_ADDR=0x10000000
-MAXPAGESIZE=0x10000
-ARCH=powerpc
-MACHINE=
-BSS_PLT=
-EXECUTABLE_SYMBOLS='PROVIDE (__stack = 0); PROVIDE (___stack = 0);'
-OTHER_BSS_END_SYMBOLS='__end = .;'
-OTHER_READWRITE_SECTIONS='
- .fixup : { *(.fixup) }
- .got1 : { *(.got1) }
- .got2 : { *(.got2) }
-'
diff --git a/contrib/binutils/ld/emulparams/elf32ppc.sh b/contrib/binutils/ld/emulparams/elf32ppc.sh
index 2220810..261e4bf 100644
--- a/contrib/binutils/ld/emulparams/elf32ppc.sh
+++ b/contrib/binutils/ld/emulparams/elf32ppc.sh
@@ -1,6 +1,7 @@
+# If you change this file, please also look at files which source this one:
+# elf32lppc.sh elf32ppclinux.sh elf32ppcsim.sh
+
TEMPLATE_NAME=elf32
-# If you change this, please also look at:
-# elf32ppc.sh elf32ppcsim.sh elf32lppc.sh elf32lppcsim.sh elf32ppclinux.sh
GENERATE_SHLIB_SCRIPT=yes
SCRIPT_NAME=elf
OUTPUT_FORMAT="elf32-powerpc"
@@ -11,8 +12,8 @@ MACHINE=
BSS_PLT=
EXECUTABLE_SYMBOLS='PROVIDE (__stack = 0); PROVIDE (___stack = 0);'
OTHER_BSS_END_SYMBOLS='__end = .;'
-OTHER_READWRITE_SECTIONS='
- .fixup : { *(.fixup) }
- .got1 : { *(.got1) }
- .got2 : { *(.got2) }
-'
+OTHER_READWRITE_SECTIONS="
+ .fixup ${RELOCATING-0} : { *(.fixup) }
+ .got1 ${RELOCATING-0} : { *(.got1) }
+ .got2 ${RELOCATING-0} : { *(.got2) }
+"
diff --git a/contrib/binutils/ld/emulparams/elf32ppclinux.sh b/contrib/binutils/ld/emulparams/elf32ppclinux.sh
index 7c458a2..5ced00d 100644
--- a/contrib/binutils/ld/emulparams/elf32ppclinux.sh
+++ b/contrib/binutils/ld/emulparams/elf32ppclinux.sh
@@ -1,18 +1,8 @@
-TEMPLATE_NAME=elf32
-# If you change this, please also look at:
-# elf32ppc.sh elf32ppcsim.sh elf32lppc.sh elf32lppcsim.sh elf32ppclinux.sh
-GENERATE_SHLIB_SCRIPT=yes
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-powerpc"
+. ${srcdir}/emulparams/elf32ppc.sh
TEXT_START_ADDR=0x10000000
-MAXPAGESIZE=0x10000
-ARCH=powerpc
-MACHINE=
-BSS_PLT=
-OTHER_RELOCATING_SECTIONS='
- /DISCARD/ : { *(.fixup) }
-'
-OTHER_READWRITE_SECTIONS='
- .got1 : { *(.got1) }
- .got2 : { *(.got2) }
-'
+unset EXECUTABLE_SYMBOLS
+unset OTHER_BSS_END_SYMBOLS
+test -z "${RELOCATING}" || OTHER_SECTIONS="/DISCARD/ : { *(.fixup) }"
+OTHER_READWRITE_SECTIONS="
+ .got1 ${RELOCATING-0} : { *(.got1) }
+ .got2 ${RELOCATING-0} : { *(.got2) }"
diff --git a/contrib/binutils/ld/emulparams/elf32ppcsim.sh b/contrib/binutils/ld/emulparams/elf32ppcsim.sh
index e25a170..c3466cf 100644
--- a/contrib/binutils/ld/emulparams/elf32ppcsim.sh
+++ b/contrib/binutils/ld/emulparams/elf32ppcsim.sh
@@ -1,18 +1,2 @@
-TEMPLATE_NAME=elf32
-# If you change this, please also look at:
-# elf32ppc.sh elf32ppcsim.sh elf32lppc.sh elf32lppcsim.sh elf32ppclinux.sh
-GENERATE_SHLIB_SCRIPT=yes
-SCRIPT_NAME=elf
-OUTPUT_FORMAT="elf32-powerpc"
+. ${srcdir}/emulparams/elf32ppc.sh
TEXT_START_ADDR=0x10000000
-MAXPAGESIZE=0x10000
-ARCH=powerpc
-MACHINE=
-BSS_PLT=
-EXECUTABLE_SYMBOLS='PROVIDE (__stack = 0); PROVIDE (___stack = 0);'
-OTHER_BSS_END_SYMBOLS='__end = .;'
-OTHER_READWRITE_SECTIONS='
- .fixup : { *(.fixup) }
- .got1 : { *(.got1) }
- .got2 : { *(.got2) }
-'
diff --git a/contrib/binutils/ld/emulparams/elf64_ia64.sh b/contrib/binutils/ld/emulparams/elf64_ia64.sh
index 158db9c..0699d3d 100644
--- a/contrib/binutils/ld/emulparams/elf64_ia64.sh
+++ b/contrib/binutils/ld/emulparams/elf64_ia64.sh
@@ -11,6 +11,11 @@ TEXT_START_ADDR="0x4000000000000000"
DATA_ADDR="0x6000000000000000 + (. & (${MAXPAGESIZE} - 1))"
GENERATE_SHLIB_SCRIPT=yes
NOP=0x00300000010070000002000001000400 # a bundle full of nops
-OTHER_GOT_SECTIONS='.IA_64.pltoff : { *(.IA_64.pltoff) }'
-OTHER_PLT_RELOC_SECTIONS='.rela.IA_64.pltoff : { *(.rela.IA_64.pltoff) }'
-OTHER_READONLY_SECTIONS='.opd : { *(.opd) } .IA_64.unwind_info : { *(.IA_64.unwind_info*) } .IA_64.unwind : { *(.IA_64.unwind*) }'
+OTHER_GOT_SECTIONS="
+ .IA_64.pltoff ${RELOCATING-0} : { *(.IA_64.pltoff) }"
+OTHER_PLT_RELOC_SECTIONS="
+ .rela.IA_64.pltoff ${RELOCATING-0} : { *(.rela.IA_64.pltoff) }"
+OTHER_READONLY_SECTIONS="
+ .opd ${RELOCATING-0} : { *(.opd) }
+ .IA_64.unwind_info ${RELOCATING-0} : { *(.IA_64.unwind_info*${RELOCATING+ .gnu.linkonce.ia64unwi.*}) }
+ .IA_64.unwind ${RELOCATING-0} : { *(.IA_64.unwind*${RELOCATING+ .gnu.linkonce.ia64unw.*}) }"
diff --git a/contrib/binutils/ld/emulparams/elf64_sparc.sh b/contrib/binutils/ld/emulparams/elf64_sparc.sh
index b0a58ea..dae3f21 100644
--- a/contrib/binutils/ld/emulparams/elf64_sparc.sh
+++ b/contrib/binutils/ld/emulparams/elf64_sparc.sh
@@ -8,6 +8,7 @@ MACHINE=
DATA_PLT=
GENERATE_SHLIB_SCRIPT=yes
NOP=0x01000000
+NO_SMALL_DATA=yes
case "$target" in
sparc*-solaris*)
diff --git a/contrib/binutils/ld/emulparams/elf64alpha_nbsd.sh b/contrib/binutils/ld/emulparams/elf64alpha_nbsd.sh
new file mode 100644
index 0000000..8116f48
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/elf64alpha_nbsd.sh
@@ -0,0 +1,2 @@
+. ${srcdir}/emulparams/elf64alpha.sh
+ENTRY=__start
diff --git a/contrib/binutils/ld/emulparams/elf64lppc.sh b/contrib/binutils/ld/emulparams/elf64lppc.sh
new file mode 100644
index 0000000..1c47493
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/elf64lppc.sh
@@ -0,0 +1,3 @@
+. ${srcdir}/emulparams/elf64ppc.sh
+OUTPUT_FORMAT="elf64-powerpcle"
+NOP=0x00000060
diff --git a/contrib/binutils/ld/emulparams/elf64ppc.sh b/contrib/binutils/ld/emulparams/elf64ppc.sh
new file mode 100644
index 0000000..2169862
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/elf64ppc.sh
@@ -0,0 +1,29 @@
+TEMPLATE_NAME=elf32
+EXTRA_EM_FILE=ppc64elf
+ELFSIZE=64
+GENERATE_SHLIB_SCRIPT=yes
+SCRIPT_NAME=elf
+OUTPUT_FORMAT="elf64-powerpc"
+TEXT_START_ADDR=0x10000000
+MAXPAGESIZE=0x40000
+ARCH=powerpc
+MACHINE=
+NOP=0x60000000
+EXECUTABLE_SYMBOLS='PROVIDE (__stack = 0); PROVIDE (___stack = 0);'
+OTHER_BSS_END_SYMBOLS='__end = .;'
+CTOR_START='PROVIDE (__CTOR_LIST__ = .); PROVIDE (___CTOR_LIST__ = .);'
+CTOR_END='PROVIDE (__CTOR_END__ = .); PROVIDE (___CTOR_END__ = .);'
+DTOR_START='PROVIDE (__DTOR_LIST__ = .); PROVIDE (___DTOR_LIST__ = .);'
+DTOR_END='PROVIDE (__DTOR_END__ = .); PROVIDE (___DTOR_END__ = .);'
+BSS_PLT=
+OTHER_BSS_SYMBOLS="
+ .tocbss ${RELOCATING-0}${RELOCATING+ALIGN(8)} : { *(.tocbss)}"
+OTHER_PLT_RELOC_SECTIONS="
+ .rela.tocbss ${RELOCATING-0} : { *(.rela.tocbss) }"
+OTHER_GOT_SECTIONS="
+ .toc ${RELOCATING-0}${RELOCATING+ALIGN(8)} : { *(.toc) }"
+OTHER_GOT_RELOC_SECTIONS="
+ .rela.toc ${RELOCATING-0} : { *(.rela.toc) }"
+OTHER_READWRITE_SECTIONS="
+ .toc1 ${RELOCATING-0}${RELOCATING+ALIGN(8)} : { *(.toc1) }
+ .opd ${RELOCATING-0}${RELOCATING+ALIGN(8)} : { *(.opd) }"
diff --git a/contrib/binutils/ld/emulparams/elf_i386.sh b/contrib/binutils/ld/emulparams/elf_i386.sh
index dff567b..53dd54b 100644
--- a/contrib/binutils/ld/emulparams/elf_i386.sh
+++ b/contrib/binutils/ld/emulparams/elf_i386.sh
@@ -5,6 +5,7 @@ MAXPAGESIZE=0x1000
NONPAGED_TEXT_START_ADDR=0x08048000
ARCH=i386
MACHINE=
-NOP=0x9090
+NOP=0x90909090
TEMPLATE_NAME=elf32
GENERATE_SHLIB_SCRIPT=yes
+NO_SMALL_DATA=yes
diff --git a/contrib/binutils/ld/emulparams/elf_i386_chaos.sh b/contrib/binutils/ld/emulparams/elf_i386_chaos.sh
index 32e7719..f7ad3cf 100644
--- a/contrib/binutils/ld/emulparams/elf_i386_chaos.sh
+++ b/contrib/binutils/ld/emulparams/elf_i386_chaos.sh
@@ -5,6 +5,7 @@ MAXPAGESIZE=0x1000
NONPAGED_TEXT_START_ADDR=0x40000000
ARCH=i386
MACHINE=
-NOP=0x9090
+NOP=0x90909090
TEMPLATE_NAME=elf32
GENERATE_SHLIB_SCRIPT=yes
+NO_SMALL_DATA=yes
diff --git a/contrib/binutils/ld/emulparams/elf_i386_ldso.sh b/contrib/binutils/ld/emulparams/elf_i386_ldso.sh
new file mode 100644
index 0000000..a477a69
--- /dev/null
+++ b/contrib/binutils/ld/emulparams/elf_i386_ldso.sh
@@ -0,0 +1,12 @@
+SCRIPT_NAME=elf
+OUTPUT_FORMAT="elf32-i386"
+TEXT_START_ADDR=0x08048000
+MAXPAGESIZE=0x1000
+NONPAGED_TEXT_START_ADDR=0x08048000
+ARCH=i386
+MACHINE=
+NOP=0x90909090
+TEMPLATE_NAME=elf32
+GENERATE_SHLIB_SCRIPT=yes
+ELF_INTERPRETER_NAME=\"/usr/lib/ld.so.1\"
+NO_SMALL_DATA=yes
diff --git a/contrib/binutils/ld/emulparams/elf_x86_64.sh b/contrib/binutils/ld/emulparams/elf_x86_64.sh
index 635748f..27931c7 100644
--- a/contrib/binutils/ld/emulparams/elf_x86_64.sh
+++ b/contrib/binutils/ld/emulparams/elf_x86_64.sh
@@ -6,6 +6,7 @@ MAXPAGESIZE=0x100000
NONPAGED_TEXT_START_ADDR=0x400000
ARCH=i386
MACHINE=
-NOP=0x9090
+NOP=0x90909090
TEMPLATE_NAME=elf32
GENERATE_SHLIB_SCRIPT=yes
+NO_SMALL_DATA=yes
diff --git a/contrib/binutils/ld/emulparams/i386moss.sh b/contrib/binutils/ld/emulparams/i386moss.sh
index a5e0e05..eece447 100644
--- a/contrib/binutils/ld/emulparams/i386moss.sh
+++ b/contrib/binutils/ld/emulparams/i386moss.sh
@@ -5,6 +5,6 @@ MAXPAGESIZE=0x1000
NONPAGED_TEXT_START_ADDR=0x00002000
ARCH=i386
MACHINE=
-NOP=0x9090
+NOP=0x90909090
TEMPLATE_NAME=elf32
GENERATE_SHLIB_SCRIPT=yes
diff --git a/contrib/binutils/ld/emulparams/i386nw.sh b/contrib/binutils/ld/emulparams/i386nw.sh
index e70ed67..621b475 100644
--- a/contrib/binutils/ld/emulparams/i386nw.sh
+++ b/contrib/binutils/ld/emulparams/i386nw.sh
@@ -4,6 +4,6 @@ TEXT_START_ADDR=0x08000000
MAXPAGESIZE=0x1000
NONPAGED_TEXT_START_ADDR=0x08000000
ARCH=i386
-NOP=0x9090
+NOP=0x90909090
TEMPLATE_NAME=elf32
GENERATE_SHLIB_SCRIPT=yes
diff --git a/contrib/binutils/ld/emulparams/sh.sh b/contrib/binutils/ld/emulparams/sh.sh
index 38844fb..52d1443 100644
--- a/contrib/binutils/ld/emulparams/sh.sh
+++ b/contrib/binutils/ld/emulparams/sh.sh
@@ -1,3 +1,6 @@
+# If you change this file, please also look at files which source this one:
+# shl.sh
+
SCRIPT_NAME=sh
OUTPUT_FORMAT="coff-sh"
TEXT_START_ADDR=0x8000
diff --git a/contrib/binutils/ld/emultempl/armcoff.em b/contrib/binutils/ld/emultempl/armcoff.em
index ab70843..783efa9 100644
--- a/contrib/binutils/ld/emultempl/armcoff.em
+++ b/contrib/binutils/ld/emultempl/armcoff.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 1991, 1993, 1996, 1997, 1998, 1999, 2000
+ Copyright 1991, 1993, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
Written by Steve Chamberlain steve@cygnus.com
@@ -46,6 +46,7 @@ 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 void gld${EMULATION_NAME}_after_open PARAMS ((void));
/* If true, then interworking stubs which support calls to old, non-interworking
aware ARM code should be generated. */
diff --git a/contrib/binutils/ld/emultempl/armelf.em b/contrib/binutils/ld/emultempl/armelf.em
index 0d1b8ed..c570486 100644
--- a/contrib/binutils/ld/emultempl/armelf.em
+++ b/contrib/binutils/ld/emultempl/armelf.em
@@ -97,13 +97,16 @@ arm_elf_before_allocation ()
}
-static void gld${EMULATION_NAME}_finish PARAMS ((void));
+static void arm_elf_finish PARAMS ((void));
static void
-gld${EMULATION_NAME}_finish PARAMS((void))
+arm_elf_finish ()
{
struct bfd_link_hash_entry * h;
+ /* Call the elf32.em routine. */
+ gld${EMULATION_NAME}_finish ();
+
if (thumb_entry_symbol == NULL)
return;
@@ -184,4 +187,4 @@ LDEMUL_BEFORE_ALLOCATION=arm_elf_before_allocation
LDEMUL_BEFORE_PARSE=gld"${EMULATION_NAME}"_before_parse
# Call the extra arm-elf function
-LDEMUL_FINISH=gld${EMULATION_NAME}_finish
+LDEMUL_FINISH=arm_elf_finish
diff --git a/contrib/binutils/ld/emultempl/armelf_oabi.em b/contrib/binutils/ld/emultempl/armelf_oabi.em
index 1f2deb38..b0c5669 100644
--- a/contrib/binutils/ld/emultempl/armelf_oabi.em
+++ b/contrib/binutils/ld/emultempl/armelf_oabi.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 1991, 1993, 1996, 1997, 1998, 1999, 2000
+ Copyright 1991, 1993, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
Written by Steve Chamberlain steve@cygnus.com
@@ -50,6 +50,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
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}_after_open PARAMS ((void));
static void
gld${EMULATION_NAME}_before_parse ()
diff --git a/contrib/binutils/ld/emultempl/generic.em b/contrib/binutils/ld/emultempl/generic.em
index cb5c30c..382150f 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 1991, 1992, 1994, 1996, 2000
+ Copyright 1991, 1992, 1994, 1996, 2000, 2001
Free Software Foundation, Inc.
Written by Steve Chamberlain steve@cygnus.com
@@ -42,6 +42,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
static void gld${EMULATION_NAME}_before_parse PARAMS ((void));
static char *gld${EMULATION_NAME}_get_script PARAMS ((int *isfile));
+EOF
+
+# Import any needed special functions and/or overrides.
+#
+if test -n "$EXTRA_EM_FILE" ; then
+. ${srcdir}/emultempl/${EXTRA_EM_FILE}.em
+fi
+
+if test x"$LDEMUL_BEFORE_PARSE" != xgld"$EMULATION_NAME"_before_parse; then
+cat >>e${EMULATION_NAME}.c <<EOF
+
static void
gld${EMULATION_NAME}_before_parse()
{
@@ -50,6 +61,12 @@ gld${EMULATION_NAME}_before_parse()
#endif /* not TARGET_ */
}
+EOF
+fi
+
+if test x"$LDEMUL_GET_SCRIPT" != xgld"$EMULATION_NAME"_get_script; then
+cat >>e${EMULATION_NAME}.c <<EOF
+
static char *
gld${EMULATION_NAME}_get_script(isfile)
int *isfile;
@@ -99,34 +116,34 @@ cat >>e${EMULATION_NAME}.c <<EOF
return "ldscripts/${EMULATION_NAME}.x";
}
EOF
-
+fi
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,
- after_open_default,
- after_allocation_default,
- set_output_arch_default,
- ldemul_default_target,
- before_allocation_default,
- gld${EMULATION_NAME}_get_script,
+ ${LDEMUL_BEFORE_PARSE-gld${EMULATION_NAME}_before_parse},
+ ${LDEMUL_SYSLIB-syslib_default},
+ ${LDEMUL_HLL-hll_default},
+ ${LDEMUL_AFTER_PARSE-after_parse_default},
+ ${LDEMUL_AFTER_OPEN-after_open_default},
+ ${LDEMUL_AFTER_ALLOCATION-after_allocation_default},
+ ${LDEMUL_SET_OUTPUT_ARCH-set_output_arch_default},
+ ${LDEMUL_CHOOSE_TARGET-ldemul_default_target},
+ ${LDEMUL_BEFORE_ALLOCATION-before_allocation_default},
+ ${LDEMUL_GET_SCRIPT-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 */
+ ${LDEMUL_FINISH-NULL},
+ ${LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS-NULL},
+ ${LDEMUL_OPEN_DYNAMIC_ARCHIVE-NULL},
+ ${LDEMUL_PLACE_ORPHAN-NULL},
+ ${LDEMUL_SET_SYMBOLS-NULL},
+ ${LDEMUL_PARSE_ARGS-NULL},
+ ${LDEMUL_UNRECOGNIZED_FILE-NULL},
+ ${LDEMUL_LIST_OPTIONS-NULL},
+ ${LDEMUL_RECOGNIZED_FILE-NULL},
+ ${LDEMUL_FIND_POTENTIAL_LIBRARIES-NULL}
};
EOF
diff --git a/contrib/binutils/ld/emultempl/linux.em b/contrib/binutils/ld/emultempl/linux.em
index 888a3dd..85ed138 100644
--- a/contrib/binutils/ld/emultempl/linux.em
+++ b/contrib/binutils/ld/emultempl/linux.em
@@ -1,5 +1,10 @@
# This shell script emits a C file. -*- C -*-
# It does some substitutions.
+if [ -z "$MACHINE" ]; then
+ OUTPUT_ARCH=${ARCH}
+else
+ OUTPUT_ARCH=${ARCH}:${MACHINE}
+fi
cat >e${EMULATION_NAME}.c <<EOF
/* This file is is generated by a shell script. DO NOT EDIT! */
@@ -52,7 +57,15 @@ static char *gld${EMULATION_NAME}_get_script PARAMS ((int *isfile));
static void
gld${EMULATION_NAME}_before_parse()
{
- ldfile_output_architecture = bfd_arch_${ARCH};
+ const bfd_arch_info_type *arch = bfd_scan_arch ("${OUTPUT_ARCH}");
+ if (arch)
+ {
+ ldfile_output_architecture = arch->arch;
+ ldfile_output_machine = arch->mach;
+ ldfile_output_machine_name = arch->printable_name;
+ }
+ else
+ ldfile_output_architecture = bfd_arch_${ARCH};
config.dynamic_link = true;
config.has_shared = true;
}
diff --git a/contrib/binutils/ld/emultempl/pe.em b/contrib/binutils/ld/emultempl/pe.em
index feab338..2f00269 100644
--- a/contrib/binutils/ld/emultempl/pe.em
+++ b/contrib/binutils/ld/emultempl/pe.em
@@ -1,10 +1,15 @@
# This shell script emits a C file. -*- C -*-
# It does some substitutions.
+if [ -z "$MACHINE" ]; then
+ OUTPUT_ARCH=${ARCH}
+else
+ OUTPUT_ARCH=${ARCH}:${MACHINE}
+fi
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, 1996, 1997, 1998, 1999, 2000
+ Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -26,8 +31,20 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
on whether certain switches were set, but these switches pertain to the
Linux system and that particular version of coff. In the NT case, we
only determine if the subsystem is console or windows in order to select
- the correct entry point by default. */
-
+ the correct entry point by default. */
+
+#define TARGET_IS_${EMULATION_NAME}
+
+/* Do this before including bfd.h, so we prototype the right functions. */
+#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
+
#include "bfd.h"
#include "sysdep.h"
#include "bfdlink.h"
@@ -52,7 +69,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "deffile.h"
#include "pe-dll.h"
-#define TARGET_IS_${EMULATION_NAME}
+#include <ctype.h>
/* Permit the emulation parameters to override the default section
alignment by setting OVERRIDE_SECTION_ALIGNMENT. FIXME: This makes
@@ -87,27 +104,42 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#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 asection *output_prev_sec_find
+ PARAMS ((lang_output_section_statement_type *));
static boolean gld_${EMULATION_NAME}_place_orphan
PARAMS ((lang_input_statement_type *, asection *));
static char *gld_${EMULATION_NAME}_get_script PARAMS ((int *));
static int gld_${EMULATION_NAME}_parse_args PARAMS ((int, char **));
static void gld_${EMULATION_NAME}_finish PARAMS ((void));
-static boolean gld_${EMULATION_NAME}_open_dynamic_archive
+static boolean gld_${EMULATION_NAME}_open_dynamic_archive
PARAMS ((const char *, search_dirs_type *, lang_input_statement_type *));
+static void gld_${EMULATION_NAME}_list_options PARAMS ((FILE *));
+static void set_pe_name PARAMS ((char *, long));
+static void set_pe_subsystem PARAMS ((void));
+static void set_pe_value PARAMS ((char *));
+static void set_pe_stack_heap PARAMS ((char *, char *));
+
+#ifdef DLL_SUPPORT
+static boolean pe_undef_cdecl_match
+ PARAMS ((struct bfd_link_hash_entry *, PTR));
+static void pe_fixup_stdcalls PARAMS ((void));
+static int make_import_fixup PARAMS ((arelent *, asection *));
+static void pe_find_data_imports PARAMS ((void));
+#endif
+
+static boolean pr_sym PARAMS ((struct bfd_hash_entry *, PTR string));
+static boolean gld_${EMULATION_NAME}_unrecognized_file
+ PARAMS ((lang_input_statement_type *));
+static boolean gld_${EMULATION_NAME}_recognized_file
+ PARAMS ((lang_input_statement_type *));
+static int gld_${EMULATION_NAME}_find_potential_libraries
+ PARAMS ((char *, lang_input_statement_type *));
+
static struct internal_extra_pe_aouthdr pe;
static int dll;
@@ -128,10 +160,20 @@ extern const char *output_filename;
static void
gld_${EMULATION_NAME}_before_parse()
{
+ const bfd_arch_info_type *arch = bfd_scan_arch ("${OUTPUT_ARCH}");
+ if (arch)
+ {
+ ldfile_output_architecture = arch->arch;
+ ldfile_output_machine = arch->mach;
+ ldfile_output_machine_name = arch->printable_name;
+ }
+ else
+ ldfile_output_architecture = bfd_arch_${ARCH};
output_filename = "${EXECUTABLE_NAME:-a.exe}";
- ldfile_output_architecture = bfd_arch_${ARCH};
#ifdef DLL_SUPPORT
+ config.dynamic_link = true;
config.has_shared = 1;
+/* link_info.pei386_auto_import = true; */
#if (PE_DEF_SUBSYSTEM == 9) || (PE_DEF_SUBSYSTEM == 2)
#if defined TARGET_IS_mipspe || defined TARGET_IS_armpe
@@ -176,13 +218,16 @@ gld_${EMULATION_NAME}_before_parse()
#define OPTION_DISABLE_AUTO_IMAGE_BASE (OPTION_ENABLE_AUTO_IMAGE_BASE + 1)
#define OPTION_DLL_SEARCH_PREFIX (OPTION_DISABLE_AUTO_IMAGE_BASE + 1)
#define OPTION_NO_DEFAULT_EXCLUDES (OPTION_DLL_SEARCH_PREFIX + 1)
+#define OPTION_DLL_ENABLE_AUTO_IMPORT (OPTION_NO_DEFAULT_EXCLUDES + 1)
+#define OPTION_DLL_DISABLE_AUTO_IMPORT (OPTION_DLL_ENABLE_AUTO_IMPORT + 1)
+#define OPTION_ENABLE_EXTRA_PE_DEBUG (OPTION_DLL_DISABLE_AUTO_IMPORT + 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},
+ {"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},
@@ -213,6 +258,9 @@ static struct option longopts[] = {
{"disable-auto-image-base", no_argument, NULL, OPTION_DISABLE_AUTO_IMAGE_BASE},
{"dll-search-prefix", required_argument, NULL, OPTION_DLL_SEARCH_PREFIX},
{"no-default-excludes", no_argument, NULL, OPTION_NO_DEFAULT_EXCLUDES},
+ {"enable-auto-import", no_argument, NULL, OPTION_DLL_ENABLE_AUTO_IMPORT},
+ {"disable-auto-import", no_argument, NULL, OPTION_DLL_DISABLE_AUTO_IMPORT},
+ {"enable-extra-pe-debug", no_argument, NULL, OPTION_ENABLE_EXTRA_PE_DEBUG},
#endif
{NULL, no_argument, NULL, 0}
};
@@ -290,14 +338,19 @@ gld_${EMULATION_NAME}_list_options (file)
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"));
- fprintf (file, _(" --enable-auto-image-base Automatically choose image base for DLLs\n"));
- fprintf (file, _(" unless user specifies one\n"));
+ fprintf (file, _(" --compat-implib Create backward compatible import libs;\n\
+ create __imp_<SYMBOL> as well.\n"));
+ fprintf (file, _(" --enable-auto-image-base Automatically choose image base for DLLs\n\
+ unless user specifies one\n"));
fprintf (file, _(" --disable-auto-image-base Do not auto-choose image base. (default)\n"));
- fprintf (file, _(" --dll-search-prefix=<string> When linking dynamically to a dll witout an\n"));
- fprintf (file, _(" importlib, use <string><basename>.dll \n"));
- fprintf (file, _(" in preference to lib<basename>.dll \n"));
+ fprintf (file, _(" --dll-search-prefix=<string> When linking dynamically to a dll without an\n\
+ importlib, use <string><basename>.dll \n\
+ in preference to lib<basename>.dll \n"));
+ fprintf (file, _(" --enable-auto-import Do sophistcated linking of _sym to \n\
+ __imp_sym for DATA references\n"));
+ fprintf (file, _(" --disable-auto-import Do not auto-import DATA items from DLLs\n"));
+ fprintf (file, _(" --enable-extra-pe-debug Enable verbose debug output when building\n\
+ or linking to DLLs (esp. auto-import)\n"));
#endif
}
@@ -327,7 +380,7 @@ set_pe_subsystem ()
const char *sver;
int len;
int i;
- static const struct
+ static const struct
{
const char *name;
const int value;
@@ -400,7 +453,7 @@ set_pe_subsystem ()
return;
}
}
-
+
einfo (_("%P%F: invalid subsystem type %s\n"), optarg);
}
@@ -409,12 +462,12 @@ set_pe_subsystem ()
static void
set_pe_value (name)
char *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);
@@ -427,7 +480,7 @@ set_pe_stack_heap (resname, comname)
char *comname;
{
set_pe_value (resname);
-
+
if (*optarg == ',')
{
optarg++;
@@ -480,10 +533,10 @@ gld_${EMULATION_NAME}_parse_args(argc, argv)
break;
/* PE options */
- case OPTION_HEAP:
+ case OPTION_HEAP:
set_pe_stack_heap ("__size_of_heap_reserve__", "__size_of_heap_commit__");
break;
- case OPTION_STACK:
+ case OPTION_STACK:
set_pe_stack_heap ("__size_of_stack_reserve__", "__size_of_stack_commit__");
break;
case OPTION_SUBSYSTEM:
@@ -568,6 +621,15 @@ gld_${EMULATION_NAME}_parse_args(argc, argv)
case OPTION_NO_DEFAULT_EXCLUDES:
pe_dll_do_default_excludes = 0;
break;
+ case OPTION_DLL_ENABLE_AUTO_IMPORT:
+ link_info.pei386_auto_import = true;
+ break;
+ case OPTION_DLL_DISABLE_AUTO_IMPORT:
+ link_info.pei386_auto_import = false;
+ break;
+ case OPTION_ENABLE_EXTRA_PE_DEBUG:
+ pe_dll_extra_pe_debug = 1;
+ break;
#endif
}
return 1;
@@ -575,7 +637,7 @@ gld_${EMULATION_NAME}_parse_args(argc, argv)
#ifdef DLL_SUPPORT
-static unsigned long
+static unsigned long
strhash (const char *str)
{
const unsigned char *s;
@@ -662,7 +724,7 @@ gld_${EMULATION_NAME}_set_symbols ()
}
/* Restore the pointer. */
stat_ptr = save;
-
+
if (pe.FileAlignment >
pe.SectionAlignment)
{
@@ -693,6 +755,13 @@ gld_${EMULATION_NAME}_after_parse ()
ldlang_add_undef (entry_symbol);
}
+/* pe-dll.c directly accesses pe_data_import_dll,
+ so it must be defined outside of #ifdef DLL_SUPPORT.
+ Note - this variable is deliberately not initialised.
+ This allows it to be treated as a common varaible, and only
+ exist in one incarnation in a multiple target enabled linker. */
+char * pe_data_import_dll;
+
#ifdef DLL_SUPPORT
static struct bfd_link_hash_entry *pe_undef_found_sym;
@@ -701,14 +770,15 @@ pe_undef_cdecl_match (h, string)
struct bfd_link_hash_entry *h;
PTR string;
{
- int sl = strlen (string);
+ int sl;
+ sl = strlen (string); /* silence compiler warning */
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;
- }
+ {
+ pe_undef_found_sym = h;
+ return false;
+ }
return true;
}
@@ -718,6 +788,11 @@ pe_fixup_stdcalls ()
static int gave_warning_message = 0;
struct bfd_link_hash_entry *undef, *sym;
char *at;
+ if (pe_dll_extra_pe_debug)
+ {
+ printf ("%s\n", __FUNCTION__);
+ }
+
for (undef = link_info.hash->undefs; undef; undef=undef->next)
if (undef->type == bfd_link_hash_undefined)
{
@@ -776,16 +851,141 @@ pe_fixup_stdcalls ()
}
}
}
+
+static int
+make_import_fixup (rel, s)
+ arelent *rel;
+ asection *s;
+{
+ struct symbol_cache_entry *sym = *rel->sym_ptr_ptr;
+
+ if (pe_dll_extra_pe_debug)
+ {
+ printf ("arelent: %s@%#lx: add=%li\n", sym->name,
+ (long) rel->address, (long) rel->addend);
+ }
+
+ {
+ int addend = 0;
+ if (!bfd_get_section_contents(s->owner, s, &addend, rel->address, sizeof(addend)))
+ {
+ einfo (_("%C: Cannot get section contents - auto-import exception\n"),
+ s->owner, s, rel->address);
+ }
+
+ if (addend == 0)
+ pe_create_import_fixup (rel);
+ else
+ {
+ einfo (_("%C: variable '%T' can't be auto-imported. Please read the documentation for ld's --enable-auto-import for details.\n"),
+ s->owner, s, rel->address, sym->name);
+ einfo ("%X");
+ }
+ }
+
+ return 1;
+}
+
+static void
+pe_find_data_imports ()
+{
+ struct bfd_link_hash_entry *undef, *sym;
+ for (undef = link_info.hash->undefs; undef; undef=undef->next)
+ {
+ if (undef->type == bfd_link_hash_undefined)
+ {
+ /* C++ symbols are *long* */
+ char buf[4096];
+ if (pe_dll_extra_pe_debug)
+ {
+ printf ("%s:%s\n", __FUNCTION__, undef->root.string);
+ }
+ sprintf (buf, "__imp_%s", undef->root.string);
+
+ sym = bfd_link_hash_lookup (link_info.hash, buf, 0, 0, 1);
+ if (sym && sym->type == bfd_link_hash_defined)
+ {
+ einfo (_("Warning: resolving %s by linking to %s (auto-import)\n"),
+ undef->root.string, buf);
+ {
+ bfd *b = sym->u.def.section->owner;
+ asymbol **symbols;
+ int nsyms, symsize, i;
+
+ symsize = bfd_get_symtab_upper_bound (b);
+ symbols = (asymbol **) xmalloc (symsize);
+ nsyms = bfd_canonicalize_symtab (b, symbols);
+
+ for (i = 0; i < nsyms; i++)
+ {
+ if (memcmp(symbols[i]->name, "__head_",
+ sizeof ("__head_") - 1))
+ continue;
+ if (pe_dll_extra_pe_debug)
+ {
+ printf ("->%s\n", symbols[i]->name);
+ }
+ pe_data_import_dll = (char*) (symbols[i]->name +
+ sizeof ("__head_") - 1);
+ break;
+ }
+ }
+
+ pe_walk_relocs_of_symbol (&link_info, undef->root.string,
+ make_import_fixup);
+
+ /* let's differentiate it somehow from defined */
+ undef->type = bfd_link_hash_defweak;
+ /* we replace original name with __imp_ prefixed, this
+ 1) may trash memory 2) leads to duplicate symbol generation.
+ Still, IMHO it's better than having name poluted. */
+ undef->root.string = sym->root.string;
+ undef->u.def.value = sym->u.def.value;
+ undef->u.def.section = sym->u.def.section;
+ }
+ }
+ }
+}
#endif /* DLL_SUPPORT */
+static boolean
+pr_sym (h, string)
+ struct bfd_hash_entry *h;
+ PTR string ATTRIBUTE_UNUSED;
+{
+ if (pe_dll_extra_pe_debug)
+ {
+ printf("+%s\n",h->string);
+ }
+ return true;
+}
+
+
static void
gld_${EMULATION_NAME}_after_open ()
{
+
+ if (pe_dll_extra_pe_debug)
+ {
+ bfd *a;
+ struct bfd_link_hash_entry *sym;
+ printf ("%s()\n", __FUNCTION__);
+
+ for (sym = link_info.hash->undefs; sym; sym=sym->next)
+ printf ("-%s\n", sym->root.string);
+ bfd_hash_traverse (&link_info.hash->table, pr_sym,NULL);
+
+ for (a = link_info.input_bfds; a; a = a->link_next)
+ {
+ printf("*%s\n",a->filename);
+ }
+ }
+
/* 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)
+
+ if (coff_data (output_bfd) == NULL || coff_data (output_bfd)->pe == 0)
einfo (_("%F%P: PE operations on non PE file.\n"));
pe_data (output_bfd)->pe_opthdr = pe;
@@ -795,6 +995,8 @@ gld_${EMULATION_NAME}_after_open ()
if (pe_enable_stdcall_fixup) /* -1=warn or 1=disable */
pe_fixup_stdcalls ();
+ pe_find_data_imports ();
+
pe_process_import_defs(output_bfd, &link_info);
if (link_info.shared)
pe_dll_build_sections (output_bfd, &link_info);
@@ -844,7 +1046,7 @@ gld_${EMULATION_NAME}_after_open ()
{
int idata2 = 0, reloc_count=0, is_imp = 0;
asection *sec;
-
+
/* See if this is an import library thunk. */
for (sec = is->the_bfd->sections; sec; sec = sec->next)
{
@@ -854,7 +1056,7 @@ gld_${EMULATION_NAME}_after_open ()
is_imp = 1;
reloc_count += sec->reloc_count;
}
-
+
if (is_imp && !idata2 && reloc_count)
{
/* It is, look for the reference to head and see if it's
@@ -867,22 +1069,22 @@ gld_${EMULATION_NAME}_after_open ()
asymbol **symbols;
arelent **relocs;
int nrelocs;
-
+
symsize = bfd_get_symtab_upper_bound (is->the_bfd);
if (symsize < 1)
break;
relsize = bfd_get_reloc_upper_bound (is->the_bfd, sec);
if (relsize < 1)
break;
-
+
symbols = (asymbol **) xmalloc (symsize);
- symsize = bfd_canonicalize_symtab (is->the_bfd, symbols);
+ symsize = bfd_canonicalize_symtab (is->the_bfd, symbols);
if (symsize < 0)
{
einfo ("%X%P: unable to process symbols: %E");
return;
}
-
+
relocs = (arelent **) xmalloc ((size_t) relsize);
nrelocs = bfd_canonicalize_reloc (is->the_bfd, sec,
relocs, symbols);
@@ -892,39 +1094,39 @@ gld_${EMULATION_NAME}_after_open ()
einfo ("%X%P: unable to process relocs: %E");
return;
}
-
+
for (i = 0; i < nrelocs; i++)
{
struct symbol_cache_entry *s;
struct bfd_link_hash_entry * blhe;
bfd *other_bfd;
char *n;
-
+
s = (relocs[i]->sym_ptr_ptr)[0];
-
+
if (s->flags & BSF_LOCAL)
continue;
-
+
/* Thunk section with reloc to another bfd. */
blhe = bfd_link_hash_lookup (link_info.hash,
s->name,
false, false, true);
-
+
if (blhe == NULL
|| blhe->type != bfd_link_hash_defined)
continue;
-
+
other_bfd = blhe->u.def.section->owner;
-
+
if (strcmp (is->the_bfd->my_archive->filename,
other_bfd->my_archive->filename) == 0)
continue;
-
+
/* Rename this implib to match the other. */
n = (char *) xmalloc (strlen (other_bfd->my_archive->filename) + 1);
-
+
strcpy (n, other_bfd->my_archive->filename);
-
+
is->the_bfd->my_archive->filename = n;
}
@@ -1002,7 +1204,7 @@ gld_${EMULATION_NAME}_after_open ()
}
}
-static void
+static void
gld_${EMULATION_NAME}_before_allocation()
{
#ifdef TARGET_IS_ppcpe
@@ -1144,7 +1346,7 @@ gld_${EMULATION_NAME}_unrecognized_file(entry)
}
#endif
return false;
-
+
}
static boolean
@@ -1183,7 +1385,7 @@ gld_${EMULATION_NAME}_finish ()
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)
@@ -1191,23 +1393,23 @@ gld_${EMULATION_NAME}_finish ()
{
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);
@@ -1232,13 +1434,49 @@ gld_${EMULATION_NAME}_finish ()
pe_exe_fill_sections (output_bfd, &link_info);
}
#endif
-
+
if (pe_out_def_filename)
pe_dll_generate_def_file (pe_out_def_filename);
#endif /* DLL_SUPPORT */
+
+ /* I don't know where .idata gets set as code, but it shouldn't be */
+ {
+ asection *asec = bfd_get_section_by_name (output_bfd, ".idata");
+ if (asec)
+ {
+ asec->flags &= ~SEC_CODE;
+ asec->flags |= SEC_DATA;
+ }
+ }
}
+/* Find the last output section before given output statement.
+ Used by place_orphan. */
+
+static asection *
+output_prev_sec_find (os)
+ lang_output_section_statement_type *os;
+{
+ asection *s = (asection *) NULL;
+ lang_statement_union_type *u;
+ lang_output_section_statement_type *lookup;
+
+ for (u = lang_output_section_statement.head;
+ u != (lang_statement_union_type *) NULL;
+ u = lookup->next)
+ {
+ lookup = &u->output_section_statement;
+ if (lookup == os)
+ return s;
+
+ if (lookup->bfd_section != NULL && lookup->bfd_section->owner != NULL)
+ s = lookup->bfd_section;
+ }
+
+ return NULL;
+}
+
/* Place an orphan section.
We use this to put sections in a reasonable place in the file, and
@@ -1289,10 +1527,13 @@ gld_${EMULATION_NAME}_place_orphan (file, s)
lang_list_init (&add_child);
if (os != NULL
- && os->bfd_section != NULL
- && ((s->flags ^ os->bfd_section->flags) & (SEC_LOAD | SEC_ALLOC)) == 0)
+ && (os->bfd_section == NULL
+ || ((s->flags ^ os->bfd_section->flags)
+ & (SEC_LOAD | SEC_ALLOC)) == 0))
{
- wild_doit (&add_child, s, os, file);
+ /* We already have an output section statement with this
+ name, and its bfd section, if any, has compatible flags. */
+ lang_add_section (&add_child, s, os, file);
}
else
{
@@ -1332,7 +1573,7 @@ gld_${EMULATION_NAME}_place_orphan (file, s)
/* 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. */
+ different loadable or allocatable characteristics. */
outsecname = xstrdup (hold_section_name);
if (bfd_get_section_by_name (output_bfd, outsecname) != NULL)
{
@@ -1371,7 +1612,7 @@ gld_${EMULATION_NAME}_place_orphan (file, s)
{
char *symname;
etree_type *e_align;
-
+
symname = (char *) xmalloc (ps - outsecname + sizeof "___start_");
sprintf (symname, "___start_%s", outsecname);
e_align = exp_unop (ALIGN_K,
@@ -1379,7 +1620,7 @@ gld_${EMULATION_NAME}_place_orphan (file, s)
lang_add_assignment (exp_assop ('=', symname, e_align));
}
}
-
+
if (link_info.relocateable || (s->flags & (SEC_LOAD | SEC_ALLOC)) == 0)
address = exp_intop ((bfd_vma) 0);
else
@@ -1396,7 +1637,7 @@ gld_${EMULATION_NAME}_place_orphan (file, s)
(etree_type *) NULL,
(etree_type *) NULL);
- wild_doit (&add_child, s, os, file);
+ lang_add_section (&add_child, s, os, file);
lang_leave_output_section_statement
((bfd_vma) 0, "*default*",
@@ -1410,7 +1651,7 @@ gld_${EMULATION_NAME}_place_orphan (file, s)
stat_ptr back where we want it. */
if (place != NULL)
stat_ptr = &add;
-
+
symname = (char *) xmalloc (ps - outsecname + sizeof "___stop_");
sprintf (symname, "___stop_%s", outsecname);
lang_add_assignment (exp_assop ('=', symname,
@@ -1424,50 +1665,73 @@ gld_${EMULATION_NAME}_place_orphan (file, s)
asection *snew, **pps;
snew = os->bfd_section;
- if (place->os->bfd_section != NULL || place->section != NULL)
+
+ /* Shuffle the bfd section list to make the output file look
+ neater. This is really only cosmetic. */
+ if (place->section == NULL)
{
- /* Shuffle the section to make the output file look neater. */
- if (place->section == NULL)
- {
-#if 0
- /* Finding the end of the list is a little tricky. We
- make a wild stab at it by comparing section flags. */
- flagword first_flags = place->os->bfd_section->flags;
- for (pps = &place->os->bfd_section->next;
- *pps != NULL && (*pps)->flags == first_flags;
- pps = &(*pps)->next)
- ;
- place->section = pps;
-#else
- /* Put orphans after the first section on the list. */
- place->section = &place->os->bfd_section->next;
-#endif
- }
+ asection *bfd_section = place->os->bfd_section;
- /* Unlink the section. */
- for (pps = &output_bfd->sections; *pps != snew; pps = &(*pps)->next)
- ;
- *pps = snew->next;
+ /* If the output statement hasn't been used to place
+ any input sections (and thus doesn't have an output
+ bfd_section), look for the closest prior output statement
+ having an output section. */
+ if (bfd_section == NULL)
+ bfd_section = output_prev_sec_find (place->os);
- /* Now tack it on to the "place->os" section list. */
- snew->next = *place->section;
- *place->section = snew;
+ if (bfd_section != NULL && bfd_section != snew)
+ place->section = &bfd_section->next;
}
- place->section = &snew->next; /* Save the end of this list. */
- if (place->stmt == NULL)
+ if (place->section != NULL)
{
- /* Put the new statement list right at the head. */
- *add.tail = place->os->header.next;
- place->os->header.next = add.head;
+ /* Unlink the section. */
+ for (pps = &output_bfd->sections;
+ *pps != snew;
+ pps = &(*pps)->next)
+ ;
+ bfd_section_list_remove (output_bfd, pps);
+
+ /* Now tack it on to the "place->os" section list. */
+ bfd_section_list_insert (output_bfd, place->section, snew);
}
- else
+
+ /* Save the end of this list. Further ophans of this type will
+ follow the one we've just added. */
+ place->section = &snew->next;
+
+ /* The following is non-cosmetic. We try to put the output
+ statements in some sort of reasonable order here, because
+ they determine the final load addresses of the orphan
+ sections. In addition, placing output statements in the
+ wrong order may require extra segments. For instance,
+ given a typical situation of all read-only sections placed
+ in one segment and following that a segment containing all
+ the read-write sections, we wouldn't want to place an orphan
+ read/write section before or amongst the read-only ones. */
+ if (add.head != NULL)
{
- /* Put it after the last orphan statement we added. */
- *add.tail = *place->stmt;
- *place->stmt = add.head;
+ if (place->stmt == NULL)
+ {
+ /* Put the new statement list right at the head. */
+ *add.tail = place->os->header.next;
+ place->os->header.next = add.head;
+ }
+ else
+ {
+ /* Put it after the last orphan statement we added. */
+ *add.tail = *place->stmt;
+ *place->stmt = add.head;
+ }
+
+ /* Fix the global list pointer if we happened to tack our
+ new list at the tail. */
+ if (*old->tail == add.head)
+ old->tail = add.tail;
+
+ /* Save the end of this list. */
+ place->stmt = add.tail;
}
- place->stmt = add.tail; /* Save the end of this list. */
}
}
@@ -1482,7 +1746,7 @@ gld_${EMULATION_NAME}_place_orphan (file, s)
sections. */
found_dollar = false;
- for ( ; *pl != NULL; pl = &(*pl)->next)
+ for ( ; *pl != NULL; pl = &(*pl)->header.next)
{
lang_input_section_type *ls;
const char *lname;
@@ -1509,7 +1773,7 @@ gld_${EMULATION_NAME}_place_orphan (file, s)
if (add_child.head != NULL)
{
- add_child.head->next = *pl;
+ add_child.head->header.next = *pl;
*pl = add_child.head;
}
}
@@ -1534,7 +1798,7 @@ gld_${EMULATION_NAME}_open_dynamic_archive (arch, search, entry)
filename = entry->filename;
string = (char *) xmalloc (strlen (search->name)
- + strlen (filename)
+ + strlen (filename)
+ sizeof "/lib.a.dll"
#ifdef DLL_SUPPORT
+ (pe_dll_search_prefix ? strlen (pe_dll_search_prefix) : 0)
@@ -1568,7 +1832,7 @@ gld_${EMULATION_NAME}_open_dynamic_archive (arch, search, entry)
{
#ifdef DLL_SUPPORT
if (pe_dll_search_prefix)
- {
+ {
/* Try "<prefix>foo.dll" (preferred dll name, if specified) */
sprintf (string, "%s/%s%s.dll", search->name, pe_dll_search_prefix, filename);
if (! ldfile_try_open_bfd (string, entry))
@@ -1588,7 +1852,7 @@ gld_${EMULATION_NAME}_open_dynamic_archive (arch, search, entry)
}
}
else /* pe_dll_search_prefix not specified */
-#endif
+#endif
{
/* Try "libfoo.dll" (preferred dll name) */
sprintf (string, "%s/lib%s.dll", search->name, filename);
@@ -1629,7 +1893,7 @@ EOF
sc="-f stringify.sed"
cat >>e${EMULATION_NAME}.c <<EOF
-{
+{
*isfile = 0;
if (link_info.relocateable == true && config.build_constructors == true)
@@ -1649,7 +1913,7 @@ echo '; }' >> e${EMULATION_NAME}
cat >>e${EMULATION_NAME}.c <<EOF
-struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
+struct ld_emulation_xfer_struct ld_${EMULATION_NAME}_emulation =
{
gld_${EMULATION_NAME}_before_parse,
syslib_default,
diff --git a/contrib/binutils/ld/emultempl/ppc64elf.em b/contrib/binutils/ld/emultempl/ppc64elf.em
new file mode 100644
index 0000000..655ddea
--- /dev/null
+++ b/contrib/binutils/ld/emultempl/ppc64elf.em
@@ -0,0 +1,99 @@
+# This shell script emits a C file. -*- C -*-
+# Copyright 2002 Free Software Foundation, Inc.
+#
+# 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.
+#
+
+# This file is sourced from elf32.em, and defines extra powerpc64-elf
+# specific routines.
+#
+cat >>e${EMULATION_NAME}.c <<EOF
+
+#include "elf64-ppc.h"
+
+static int need_laying_out = 0;
+
+static void gld${EMULATION_NAME}_after_allocation PARAMS ((void));
+static void gld${EMULATION_NAME}_finish PARAMS ((void));
+
+/* Call the back-end function to set TOC base after we have placed all
+ the sections. */
+static void
+gld${EMULATION_NAME}_after_allocation ()
+{
+ if (!ppc64_elf_set_toc (output_bfd, &link_info))
+ einfo ("%X%P: can not set TOC base: %E\n");
+}
+
+/* Final emulation specific call. PowerPC64 has 24 byte .plt entries,
+ and needs different call stubs for any entries that cross a 64k
+ boundary relative to the TOC. That means we need to wait until all
+ sections have been laid out to initialise the stubs. */
+
+static void
+gld${EMULATION_NAME}_finish ()
+{
+ /* If generating a relocatable output file, then we don't have any
+ stubs. */
+ if (link_info.relocateable)
+ return;
+
+ /* bfd_elf64_discard_info just plays with debugging sections,
+ ie. doesn't affect any code, so we can delay resizing the
+ sections. It's likely we'll resize everything in the process of
+ adjusting stub sizes. */
+ if (bfd_elf${ELFSIZE}_discard_info (output_bfd, &link_info))
+ need_laying_out = 1;
+
+ while (1)
+ {
+ /* Call into the BFD backend to do the real work. */
+ if (! ppc64_elf_size_stubs (output_bfd, &link_info, &need_laying_out))
+ {
+ einfo ("%X%P: can not size stub section: %E\n");
+ return;
+ }
+
+ if (!need_laying_out)
+ break;
+
+ /* If we have changed the size of the stub section, then we need
+ to recalculate all the section offsets. After this, we may
+ need to adjust the stub size again. */
+ need_laying_out = 0;
+
+ /* Resize the sections. */
+ lang_size_sections (stat_ptr->head, abs_output_section,
+ &stat_ptr->head, 0, (bfd_vma) 0, NULL);
+
+ /* Recalculate TOC base. */
+ ldemul_after_allocation ();
+
+ /* Do the assignments again. */
+ lang_do_assignments (stat_ptr->head, abs_output_section,
+ (fill_type) 0, (bfd_vma) 0);
+ }
+
+ if (! ppc64_elf_build_stubs (output_bfd, &link_info))
+ einfo ("%X%P: can not build stubs: %E\n");
+}
+EOF
+
+# Put these extra ppc64elf routines in ld_${EMULATION_NAME}_emulation
+#
+LDEMUL_AFTER_ALLOCATION=gld${EMULATION_NAME}_after_allocation
+LDEMUL_FINISH=gld${EMULATION_NAME}_finish
diff --git a/contrib/binutils/ld/emultempl/vanilla.em b/contrib/binutils/ld/emultempl/vanilla.em
index 3e6aed9..96ee34c 100644
--- a/contrib/binutils/ld/emultempl/vanilla.em
+++ b/contrib/binutils/ld/emultempl/vanilla.em
@@ -2,7 +2,7 @@
# It does some substitutions.
cat >e${EMULATION_NAME}.c <<EOF
/* A vanilla emulation with no defaults
- Copyright 1991, 1992, 1994, 2000 Free Software Foundation, Inc.
+ Copyright 1991, 1992, 1994, 2000, 2001 Free Software Foundation, Inc.
Written by Steve Chamberlain steve@cygnus.com
This file is part of GLD, the Gnu Linker.
@@ -34,6 +34,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "ldfile.h"
#include "ldemul.h"
+static void vanilla_before_parse PARAMS ((void));
+static void vanilla_set_output_arch PARAMS ((void));
+static char *vanilla_get_script PARAMS ((int *));
+
+
static void vanilla_before_parse()
{
}
diff --git a/contrib/binutils/ld/gen-doc.texi b/contrib/binutils/ld/gen-doc.texi
index 8d1acad..c0ebac7 100644
--- a/contrib/binutils/ld/gen-doc.texi
+++ b/contrib/binutils/ld/gen-doc.texi
@@ -5,6 +5,7 @@
@c 2. Specific target machines
@set H8300
@set I960
+@set MMIX
@set TICOFF
@c 3. Properties of this configuration
diff --git a/contrib/binutils/ld/genscripts.sh b/contrib/binutils/ld/genscripts.sh
index f6a2970..501a68c 100755
--- a/contrib/binutils/ld/genscripts.sh
+++ b/contrib/binutils/ld/genscripts.sh
@@ -84,6 +84,17 @@ LIB_SEARCH_DIRS=`echo ${LIB_PATH} | tr ':' ' ' | sed -e 's/\([^ ][^ ]*\)/SEARCH_
# A .xs script is for generating a shared library with the --shared
# flag; it is only generated if $GENERATE_SHLIB_SCRIPT is set by the
# emulation parameters.
+# A .xc script is for linking with -z combreloc; it is only generated if
+# $GENERATE_COMBRELOC_SCRIPT is set by the emulation parameters or
+# $SCRIPT_NAME is "elf".
+# A .xsc script is for linking with --shared -z combreloc; it is generated
+# if $GENERATE_COMBRELOC_SCRIPT is set by the emulation parameters or
+# $SCRIPT_NAME is "elf" and $GENERATE_SHLIB_SCRIPT is set by the emulation
+# parameters too.
+
+if [ "x$SCRIPT_NAME" = "xelf" ]; then
+ GENERATE_COMBRELOC_SCRIPT=yes
+fi
SEGMENT_SIZE=${SEGMENT_SIZE-${TARGET_PAGE_SIZE}}
@@ -99,39 +110,75 @@ DATA_ALIGNMENT_u="${DATA_ALIGNMENT_u-${DATA_ALIGNMENT_r}}"
LD_FLAG=r
DATA_ALIGNMENT=${DATA_ALIGNMENT_r}
DEFAULT_DATA_ALIGNMENT="ALIGN(${SEGMENT_SIZE})"
-(. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc) | sed -e '/^ *$/d' > \
- ldscripts/${EMULATION_NAME}.xr
+( echo "/* Script for ld -r: link without relocation */"
+ . ${srcdir}/emulparams/${EMULATION_NAME}.sh
+ . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xr
LD_FLAG=u
DATA_ALIGNMENT=${DATA_ALIGNMENT_u}
CONSTRUCTING=" "
-(. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc) | sed -e '/^ *$/d' > \
- ldscripts/${EMULATION_NAME}.xu
+( echo "/* Script for ld -Ur: link w/out relocation, do create constructors */"
+ . ${srcdir}/emulparams/${EMULATION_NAME}.sh
+ . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xu
LD_FLAG=
DATA_ALIGNMENT=${DATA_ALIGNMENT_}
RELOCATING=" "
-(. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc) | sed -e '/^ *$/d' > \
- ldscripts/${EMULATION_NAME}.x
+( echo "/* Default linker script, for normal executables */"
+ . ${srcdir}/emulparams/${EMULATION_NAME}.sh
+ . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.x
LD_FLAG=n
DATA_ALIGNMENT=${DATA_ALIGNMENT_n}
TEXT_START_ADDR=${NONPAGED_TEXT_START_ADDR-${TEXT_START_ADDR}}
-(. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc) | sed -e '/^ *$/d' > \
- ldscripts/${EMULATION_NAME}.xn
+( echo "/* Script for -n: mix text and data on same page */"
+ . ${srcdir}/emulparams/${EMULATION_NAME}.sh
+ . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xn
LD_FLAG=N
DATA_ALIGNMENT=${DATA_ALIGNMENT_N}
-(. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc) | sed -e '/^ *$/d' > \
- ldscripts/${EMULATION_NAME}.xbn
+( echo "/* Script for -N: mix text and data on same page; don't align data */"
+ . ${srcdir}/emulparams/${EMULATION_NAME}.sh
+ . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xbn
+
+if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
+ DATA_ALIGNMENT=${DATA_ALIGNMENT_c-${DATA_ALIGNMENT_}}
+ LD_FLAG=c
+ COMBRELOC=ldscripts/${EMULATION_NAME}.xc.tmp
+ ( echo "/* Script for -z combreloc: combine and sort reloc sections */"
+ . ${srcdir}/emulparams/${EMULATION_NAME}.sh
+ . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+ ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xc
+ rm -f ${COMBRELOC}
+ COMBRELOC=
+fi
if test -n "$GENERATE_SHLIB_SCRIPT"; then
LD_FLAG=shared
DATA_ALIGNMENT=${DATA_ALIGNMENT_s-${DATA_ALIGNMENT_}}
CREATE_SHLIB=" "
# Note that TEXT_START_ADDR is set to NONPAGED_TEXT_START_ADDR.
- (. ${srcdir}/scripttempl/${SCRIPT_NAME}.sc) | sed -e '/^ *$/d' > \
- ldscripts/${EMULATION_NAME}.xs
+ (
+ echo "/* Script for ld --shared: link shared library */"
+ . ${srcdir}/emulparams/${EMULATION_NAME}.sh
+ . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+ ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xs
+ if test -n "$GENERATE_COMBRELOC_SCRIPT"; then
+ LD_FLAG=cshared
+ DATA_ALIGNMENT=${DATA_ALIGNMENT_sc-${DATA_ALIGNMENT}}
+ COMBRELOC=ldscripts/${EMULATION_NAME}.xc.tmp
+ ( echo "/* Script for --shared -z combreloc: shared library, combine & sort relocs */"
+ . ${srcdir}/emulparams/${EMULATION_NAME}.sh
+ . ${srcdir}/scripttempl/${SCRIPT_NAME}.sc
+ ) | sed -e '/^ *$/d;s/[ ]*$//' > ldscripts/${EMULATION_NAME}.xsc
+ rm -f ${COMBRELOC}
+ COMBRELOC=
+ fi
fi
for i in $EMULATION_LIBPATH ; do
diff --git a/contrib/binutils/ld/ld.h b/contrib/binutils/ld/ld.h
index 620c3ba..e629e66 100644
--- a/contrib/binutils/ld/ld.h
+++ b/contrib/binutils/ld/ld.h
@@ -73,6 +73,11 @@ struct wildcard_spec {
boolean sorted;
};
+struct wildcard_list {
+ struct wildcard_list *next;
+ struct wildcard_spec spec;
+};
+
/* Extra information we hold on sections */
typedef struct user_section_struct {
/* Pointer to the section where this data will go */
@@ -97,6 +102,9 @@ typedef struct user_section_struct {
typedef struct {
/* 1 => assign space to common symbols even if `relocatable_output'. */
boolean force_common_definition;
+
+ /* 1 => do not assign addresses to common symbols. */
+ boolean inhibit_common_definition;
boolean relax;
/* Name of runtime interpreter to invoke. */
@@ -115,10 +123,6 @@ typedef struct {
/* Big or little endian as set on command line. */
enum { ENDIAN_UNSET = 0, ENDIAN_BIG, ENDIAN_LITTLE } endian;
- /* If true, export all symbols in the dynamic symbol table of an ELF
- executable. */
- boolean export_dynamic;
-
/* If true, build MIPS embedded PIC relocation tables in the output
file. */
boolean embedded_relocs;
@@ -192,6 +196,9 @@ typedef struct {
changes due to the alignment of an input section. */
boolean warn_section_align;
+ /* If true, warning messages are fatal */
+ boolean fatal_warnings;
+
boolean sort_common;
boolean text_read_only;
@@ -207,6 +214,10 @@ typedef struct {
unsigned int split_by_reloc;
bfd_size_type split_by_file;
+
+ /* If set, only search library directories explicitly selected
+ on the command line. */
+ boolean only_cmd_line_lib_dirs;
} ld_config_type;
extern ld_config_type config;
@@ -217,7 +228,7 @@ typedef enum {
lang_final_phase_enum
} lang_phase_type;
-extern boolean had_script;
+extern FILE * saved_script_handle;
extern boolean force_make_executable;
/* Non-zero if we are processing a --defsym from the command line. */
diff --git a/contrib/binutils/ld/ld.texinfo b/contrib/binutils/ld/ld.texinfo
index 8c4d98f..1069d03 100644
--- a/contrib/binutils/ld/ld.texinfo
+++ b/contrib/binutils/ld/ld.texinfo
@@ -9,6 +9,43 @@
@c @smallbook
+@macro gcctabopt{body}
+@code{\body\}
+@end macro
+
+@c man begin NAME
+@ifset man
+@c Configure for the generation of man pages
+@set UsesEnvVars
+@set GENERIC
+@set A29K
+@set ARC
+@set ARM
+@set D10V
+@set D30V
+@set H8/300
+@set H8/500
+@set HPPA
+@set I370
+@set I80386
+@set I860
+@set I960
+@set M32R
+@set M68HC11
+@set M680X0
+@set MCORE
+@set MIPS
+@set MMIX
+@set PDP11
+@set PJ
+@set SH
+@set SPARC
+@set C54X
+@set V850
+@set VAX
+@end ifset
+@c man end
+
@ifinfo
@format
START-INFO-DIR-ENTRY
@@ -20,7 +57,8 @@ END-INFO-DIR-ENTRY
@ifinfo
This file documents the @sc{gnu} linker LD version @value{VERSION}.
-Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
+Copyright (C) 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000,
+2001 Free Software Foundation, Inc.
@ignore
@@ -63,14 +101,16 @@ 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, 98, 99, 2000 Free Software Foundation, Inc.
+@c man begin COPYRIGHT
+Copyright @copyright{} 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000, 2001 Free Software Foundation, Inc.
- Permission is granted to copy, distribute and/or modify this document
- under the terms of the GNU Free Documentation License, Version 1.1
- or any later version published by the Free Software Foundation;
- with no Invariant Sections, with no Front-Cover Texts, and with no
- Back-Cover Texts. A copy of the license is included in the
- section entitled "GNU Free Documentation License".
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.1
+or any later version published by the Free Software Foundation;
+with no Invariant Sections, with no Front-Cover Texts, and with no
+Back-Cover Texts. A copy of the license is included in the
+section entitled "GNU Free Documentation License".
+@c man end
@end titlepage
@end iftex
@@ -123,17 +163,40 @@ section entitled "GNU Free Documentation License".
@cindex @sc{gnu} linker
@cindex what is this?
-@code{ld} combines a number of object and archive files, relocates
+
+@ifset man
+@c man begin SYNOPSIS
+ld [@b{options}] @var{objfile} @dots{}
+@c man end
+
+@c man begin SEEALSO
+ar(1), nm(1), objcopy(1), objdump(1), readelf(1) and
+the Info entries for @file{binutils} and
+@file{ld}.
+@c man end
+@end ifset
+
+@c man begin DESCRIPTION
+
+@command{ld} combines a number of object and archive files, relocates
their data and ties up symbol references. Usually the last step in
-compiling a program is to run @code{ld}.
+compiling a program is to run @command{ld}.
-@code{ld} accepts Linker Command Language files written in
+@command{ld} accepts Linker Command Language files written in
a superset of AT&T's Link Editor Command Language syntax,
to provide explicit and total control over the linking process.
+@ifset man
+@c For the man only
+This man page does not describe the command language; see the
+@command{ld} entry in @code{info}, or the manual
+ld: the GNU linker, for full details on the command language and
+on other aspects of the GNU linker.
+@end ifset
+
@ifclear SingleFormat
-This version of @code{ld} uses the general purpose BFD libraries
-to operate on object files. This allows @code{ld} to read, combine, and
+This version of @command{ld} uses the general purpose BFD libraries
+to operate on object files. This allows @command{ld} to read, combine, and
write object files in many different formats---for example, COFF or
@code{a.out}. Different formats may be linked together to produce any
available kind of object file. @xref{BFD}, for more information.
@@ -142,16 +205,22 @@ available kind of object file. @xref{BFD}, for more information.
Aside from its flexibility, the @sc{gnu} linker is more helpful than other
linkers in providing diagnostic information. Many linkers abandon
execution immediately upon encountering an error; whenever possible,
-@code{ld} continues executing, allowing you to identify other errors
+@command{ld} continues executing, allowing you to identify other errors
(or, in some cases, to get an output file in spite of the error).
+@c man end
+
@node Invocation
@chapter Invocation
-The @sc{gnu} linker @code{ld} is meant to cover a broad range of situations,
+@c man begin DESCRIPTION
+
+The @sc{gnu} linker @command{ld} is meant to cover a broad range of situations,
and to be as compatible as possible with other linkers. As a result,
you have many choices to control its behavior.
+@c man end
+
@ifset UsesEnvVars
@menu
* Options:: Command Line Options
@@ -164,10 +233,13 @@ you have many choices to control its behavior.
@cindex command line
@cindex options
+
+@c man begin OPTIONS
+
The linker supports a plethora of command-line options, but in actual
practice few of them are used in any particular context.
@cindex standard Unix system
-For instance, a frequent use of @code{ld} is to link standard Unix
+For instance, a frequent use of @command{ld} is to link standard Unix
object files on a standard, supported Unix system. On such a system, to
link a file @code{hello.o}:
@@ -175,12 +247,12 @@ link a file @code{hello.o}:
ld -o @var{output} /lib/crt0.o hello.o -lc
@end smallexample
-This tells @code{ld} to produce a file called @var{output} as the
+This tells @command{ld} to produce a file called @var{output} as the
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.)
-Some of the command-line options to @code{ld} may be specified at any
+Some of the command-line options to @command{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
@@ -209,10 +281,8 @@ linker script or the one specified by using @samp{-T}). This feature
permits the linker to link against a file which appears to be an object
or an archive, but actually merely defines some symbol values, or uses
@code{INPUT} or @code{GROUP} to load other objects. Note that
-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.
+specifying a script in this way merely augments the main linker script;
+use the @samp{-T} option to replace the default linker script entirely.
@xref{Scripts}.
For options whose names are a single letter,
@@ -251,7 +321,7 @@ 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
+@table @gcctabopt
@kindex -a@var{keyword}
@item -a@var{keyword}
This option is supported for HP/UX compatibility. The @var{keyword}
@@ -266,14 +336,14 @@ to @samp{-Bdynamic}. This option may be used any number of times.
@item -A@var{architecture}
@kindex --architecture=@var{arch}
@itemx --architecture=@var{architecture}
-In the current release of @code{ld}, this option is useful only for the
-Intel 960 family of architectures. In that @code{ld} configuration, the
+In the current release of @command{ld}, this option is useful only for the
+Intel 960 family of architectures. In that @command{ld} configuration, the
@var{architecture} argument identifies the particular architecture in
the 960 family, enabling some safeguards and modifying the
-archive-library search path. @xref{i960,,@code{ld} and the Intel 960
+archive-library search path. @xref{i960,,@command{ld} and the Intel 960
family}, for details.
-Future releases of @code{ld} may support similar functionality for
+Future releases of @command{ld} may support similar functionality for
other architecture families.
@end ifset
@@ -285,12 +355,12 @@ other architecture families.
@cindex input format
@item -b @var{input-format}
@itemx --format=@var{input-format}
-@code{ld} may be configured to support more than one kind of object
-file. If your @code{ld} is configured this way, you can use the
+@command{ld} may be configured to support more than one kind of object
+file. If your @command{ld} is configured this way, you can use the
@samp{-b} option to specify the binary format for input object files
-that follow this option on the command line. Even when @code{ld} is
+that follow this option on the command line. Even when @command{ld} is
configured to support alternative object formats, you don't usually need
-to specify this, as @code{ld} should be configured to expect as a
+to specify this, as @command{ld} should be configured to expect as a
default input format the most usual format on each machine.
@var{input-format} is a text string, the name of a particular format
supported by the BFD libraries. (You can list the available binary
@@ -309,7 +379,10 @@ The default format is taken from the environment variable
@xref{Environment}.
@end ifset
You can also define the input format from a script, using the command
-@code{TARGET}; see @ref{Format Commands}.
+@code{TARGET};
+@ifclear man
+see @ref{Format Commands}.
+@end ifclear
@end ifclear
@kindex -c @var{MRI-cmdfile}
@@ -317,12 +390,18 @@ You can also define the input format from a script, using the command
@cindex compatibility, MRI
@item -c @var{MRI-commandfile}
@itemx --mri-script=@var{MRI-commandfile}
-For compatibility with linkers produced by MRI, @code{ld} accepts script
+For compatibility with linkers produced by MRI, @command{ld} accepts script
files written in an alternate, restricted command language, described in
-@ref{MRI,,MRI Compatible Script Files}. Introduce MRI script files with
+@ifclear man
+@ref{MRI,,MRI Compatible Script Files}.
+@end ifclear
+@ifset man
+the MRI Compatible Script Files section of GNU ld documentation.
+@end ifset
+Introduce MRI script files with
the option @samp{-c}; use the @samp{-T} option to run linker
-scripts written in the general-purpose @code{ld} scripting language.
-If @var{MRI-cmdfile} does not exist, @code{ld} looks for it in the directories
+scripts written in the general-purpose @command{ld} scripting language.
+If @var{MRI-cmdfile} does not exist, @command{ld} looks for it in the directories
specified by any @samp{-L} options.
@cindex common allocation
@@ -369,6 +448,10 @@ 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.
+You can also use the version script to control what symbols should
+be added to the dynamic symbol table if the output format supports it.
+See the description of @samp{--version-script} in @ref{VERSION}.
+
@cindex big-endian objects
@cindex endianness
@kindex -EB
@@ -419,12 +502,12 @@ found in the shared object @var{name}. Thus the filter object can be
used to select a subset of the symbols provided by the object
@var{name}.
-Some older linkers used the @code{-F} option throughout a compilation
+Some older linkers used the @option{-F} option throughout a compilation
toolchain for specifying object-file format for both input and output
object files. The @sc{gnu} linker uses other mechanisms for this
-purpose: the @code{-b}, @code{--format}, @code{--oformat} options, the
+purpose: the @option{-b}, @option{--format}, @option{--oformat} options, the
@code{TARGET} command in linker scripts, and the @code{GNUTARGET}
-environment variable. The @sc{gnu} linker will ignore the @code{-F}
+environment variable. The @sc{gnu} linker will ignore the @option{-F}
option when not creating an ELF shared object.
@cindex finalization function
@@ -479,13 +562,13 @@ function to call.
@item -l@var{archive}
@itemx --library=@var{archive}
Add archive file @var{archive} to the list of files to link. This
-option may be used any number of times. @code{ld} will search its
+option may be used any number of times. @command{ld} will search its
path-list for occurrences of @code{lib@var{archive}.a} for every
@var{archive} specified.
-On systems which support shared libraries, @code{ld} may also search for
+On systems which support shared libraries, @command{ld} may also search for
libraries with extensions other than @code{.a}. Specifically, on ELF
-and SunOS systems, @code{ld} will search a directory for a library with
+and SunOS systems, @command{ld} will search a directory for a library with
an extension of @code{.so} before searching for one with an extension of
@code{.a}. By convention, a @code{.so} extension indicates a shared
library.
@@ -497,14 +580,14 @@ command line, the linker will include the appropriate file(s) from the
archive. However, an undefined symbol in an object appearing later on
the command line will not cause the linker to search the archive again.
-See the @code{-(} option for a way to force the linker to search
+See the @option{-(} option for a way to force the linker to search
archives multiple times.
You may list the same archive multiple times on the command line.
@ifset GENERIC
This type of archive searching is standard for Unix linkers. However,
-if you are using @code{ld} on AIX, note that it is different from the
+if you are using @command{ld} on AIX, note that it is different from the
behaviour of the AIX linker.
@end ifset
@@ -513,17 +596,17 @@ behaviour of the AIX linker.
@kindex --library-path=@var{dir}
@item -L@var{searchdir}
@itemx --library-path=@var{searchdir}
-Add path @var{searchdir} to the list of paths that @code{ld} will search
-for archive libraries and @code{ld} control scripts. You may use this
+Add path @var{searchdir} to the list of paths that @command{ld} will search
+for archive libraries and @command{ld} control scripts. You may use this
option any number of times. The directories are searched in the order
in which they are specified on the command line. Directories specified
on the command line are searched before the default directories. All
-@code{-L} options apply to all @code{-l} options, regardless of the
+@option{-L} options apply to all @option{-l} options, regardless of the
order in which the options appear.
@ifset UsesEnvVars
The default set of paths searched (without being specified with
-@samp{-L}) depends on which emulation mode @code{ld} is using, and in
+@samp{-L}) depends on which emulation mode @command{ld} is using, and in
some cases also on how it was configured. @xref{Environment}.
@end ifset
@@ -585,14 +668,14 @@ style magic numbers, mark the output as @code{OMAGIC}.
@cindex naming the output file
@item -o @var{output}
@itemx --output=@var{output}
-Use @var{output} as the name for the program produced by @code{ld}; if this
+Use @var{output} as the name for the program produced by @command{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
+If @var{level} is a numeric values greater than zero @command{ld} optimizes
the output. This might take significantly longer and therefore probably
should only be enabled for the final binary.
@@ -606,6 +689,8 @@ Post link analysis and optimization tools may need this information in
order to perform correct modifications of executables. This results
in larger executables.
+This option is currently only supported on ELF platforms.
+
@cindex partial link
@cindex relocatable output
@kindex -r
@@ -613,15 +698,21 @@ in larger executables.
@item -r
@itemx --relocateable
Generate relocatable output---i.e., generate an output file that can in
-turn serve as input to @code{ld}. This is often called @dfn{partial
+turn serve as input to @command{ld}. This is often called @dfn{partial
linking}. As a side effect, in environments that support standard Unix
magic numbers, this option also sets the output file's magic number to
@code{OMAGIC}.
-@c ; see @code{-N}.
+@c ; see @option{-N}.
If this option is not specified, an absolute file is produced. When
linking C++ programs, this option @emph{will not} resolve references to
constructors; to do that, use @samp{-Ur}.
+When an input file does not have the same format as the output file,
+partial linking is only supported if that input file does not contain any
+relocations. Different output formats can have further restrictions; for
+example some @code{a.out}-based formats do not support partial linking
+with input files in other formats at all.
+
This option does the same thing as @samp{-i}.
@kindex -R @var{file}
@@ -634,9 +725,9 @@ relocate it or include it in the output. This allows your output file
to refer symbolically to absolute locations of memory defined in other
programs. You may use this option more than once.
-For compatibility with other ELF linkers, if the @code{-R} option is
+For compatibility with other ELF linkers, if the @option{-R} option is
followed by a directory name, rather than a file name, it is treated as
-the @code{-rpath} option.
+the @option{-rpath} option.
@kindex -s
@kindex --strip-all
@@ -657,7 +748,7 @@ Omit debugger symbol information (but not all symbols) from the output file.
@cindex input files, displaying
@item -t
@itemx --trace
-Print the names of the input files as @code{ld} processes them.
+Print the names of the input files as @command{ld} processes them.
@kindex -T @var{script}
@kindex --script=@var{script}
@@ -665,14 +756,12 @@ Print the names of the input files as @code{ld} processes them.
@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
+@command{ld}'s default linker script (rather than adding to it), so
@var{commandfile} must specify everything necessary to describe the
-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{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.
+output file. @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}
@@ -690,7 +779,7 @@ option is equivalent to the @code{EXTERN} linker script command.
@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}
+turn serve as input to @command{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
@@ -714,7 +803,7 @@ in a linker script.
@item -v
@itemx --version
@itemx -V
-Display the version number for @code{ld}. The @code{-V} option also
+Display the version number for @command{ld}. The @option{-V} option also
lists the supported emulations.
@kindex -x
@@ -754,7 +843,9 @@ for Solaris compatibility.
@item -z @var{keyword}
The recognized keywords are @code{initfirst}, @code{interpose},
@code{loadfltr}, @code{nodefaultlib}, @code{nodelete}, @code{nodlopen},
-@code{nodump}, @code{now} and @code{origin}. The other keywords are
+@code{nodump}, @code{now}, @code{origin}, @code{combreloc}, @code{nocombreloc}
+and @code{nocopyreloc}.
+The other keywords are
ignored for Solaris compatibility. @code{initfirst} marks the object
to be initialized first at runtime before any other objects.
@code{interpose} marks the object that its symbol table interposes
@@ -768,6 +859,10 @@ of this object will ignore any default library search paths.
@code{now} marks the object with the non-lazy runtime binding.
@code{origin} marks the object may contain $ORIGIN.
@code{defs} disallows undefined symbols.
+@code{combreloc} combines multiple reloc sections and sorts them
+to make dynamic symbol lookup caching possible.
+@code{nocombreloc} disables multiple reloc sections combining.
+@code{nocopyreloc} disables production of copy relocs.
@kindex -(
@cindex groups of archives
@@ -804,14 +899,14 @@ for which shared libraries are supported. This option is normally the
default on such platforms. The different variants of this option are
for compatibility with various systems. You may use this option
multiple times on the command line: it affects library searching for
-@code{-l} options which follow it.
+@option{-l} options which follow it.
@kindex -Bgroup
@item -Bgroup
Set the @code{DF_1_GROUP} flag in the @code{DT_FLAGS_1} entry in the dynamic
section. This causes the runtime linker to handle lookups in this
object and its dependencies to be performed only inside the group.
-@code{--no-undefined} is implied. This option is only meaningful on ELF
+@option{--no-undefined} is implied. This option is only meaningful on ELF
platforms which support shared libraries.
@kindex -Bstatic
@@ -826,7 +921,7 @@ Do not link against shared libraries. This is only meaningful on
platforms for which shared libraries are supported. The different
variants of this option are for compatibility with various systems. You
may use this option multiple times on the command line: it affects
-library searching for @code{-l} options which follow it.
+library searching for @option{-l} options which follow it.
@kindex -Bsymbolic
@item -Bsymbolic
@@ -860,6 +955,24 @@ sorted by name. For each symbol, a list of file names is given. If the
symbol is defined, the first file listed is the location of the
definition. The remaining files contain references to the symbol.
+@cindex common allocation
+@kindex --no-define-common
+@item --no-define-common
+This option inhibits the assignment of addresses to common symbols.
+The script command @code{INHIBIT_COMMON_ALLOCATION} has the same effect.
+@xref{Miscellaneous Commands}.
+
+The @samp{--no-define-common} option allows decoupling
+the decision to assign addresses to Common symbols from the choice
+of the output file type; otherwise a non-Relocatable output type
+forces assigning addresses to Common symbols.
+Using @samp{--no-define-common} allows Common symbols that are referenced
+from a shared library to be assigned addresses only in the main program.
+This eliminates the unused duplicate space in the shared library,
+and also prevents any possible confusion over resolving to the wrong
+duplicate when there are many dynamic modules with specialized search
+paths for runtime symbol resolution.
+
@cindex symbols, from command line
@kindex --defsym @var{symbol}=@var{exp}
@item --defsym @var{symbol}=@var{expression}
@@ -891,6 +1004,7 @@ 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 -I@var{file}
@kindex --dynamic-linker @var{file}
@item --dynamic-linker @var{file}
Set the name of the dynamic linker. This is only meaningful when
@@ -907,6 +1021,11 @@ 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 --fatal-warnings
+@item --fatal-warnings
+Treat all warnings as errors.
+
@kindex --force-exe-suffix
@item --force-exe-suffix
Make sure that an output file has a .exe suffix.
@@ -947,10 +1066,10 @@ Print a link map to the file @var{mapfile}. See the description of the
@cindex memory usage
@kindex --no-keep-memory
@item --no-keep-memory
-@code{ld} normally optimizes for speed over memory usage by caching the
-symbol tables of input files in memory. This option tells @code{ld} to
+@command{ld} normally optimizes for speed over memory usage by caching the
+symbol tables of input files in memory. This option tells @command{ld} to
instead optimize for memory usage, by rereading the symbol tables as
-necessary. This may be required if @code{ld} runs out of memory space
+necessary. This may be required if @command{ld} runs out of memory space
while linking a large executable.
@kindex --no-undefined
@@ -959,7 +1078,7 @@ while linking a large executable.
@itemx -z defs
Normally when creating a non-symbolic shared library, undefined symbols
are allowed and left to be resolved by the runtime loader. These options
-disallow such undefined symbols.
+disallows such undefined symbols.
@kindex --allow-shlib-undefined
@item --allow-shlib-undefined
@@ -976,17 +1095,17 @@ is also normal for HPPA shared libraries to have undefined symbols.
@kindex --no-warn-mismatch
@item --no-warn-mismatch
-Normally @code{ld} will give an error if you try to link together input
+Normally @command{ld} will give an error if you try to link together input
files that are mismatched for some reason, perhaps because they have
been compiled for different processors or for different endiannesses.
-This option tells @code{ld} that it should silently permit such possible
+This option tells @command{ld} that it should silently permit such possible
errors. This option should only be used with care, in cases when you
have taken some special action that ensures that the linker errors are
inappropriate.
@kindex --no-whole-archive
@item --no-whole-archive
-Turn off the effect of the @code{--whole-archive} option for subsequent
+Turn off the effect of the @option{--whole-archive} option for subsequent
archive files.
@cindex output file after errors
@@ -1000,11 +1119,11 @@ when it issues any error whatsoever.
@ifclear SingleFormat
@kindex --oformat
@item --oformat @var{output-format}
-@code{ld} may be configured to support more than one kind of object
-file. If your @code{ld} is configured this way, you can use the
+@command{ld} may be configured to support more than one kind of object
+file. If your @command{ld} is configured this way, you can use the
@samp{--oformat} option to specify the binary format for the output
-object file. Even when @code{ld} is configured to support alternative
-object formats, you don't usually need to specify this, as @code{ld}
+object file. Even when @command{ld} is configured to support alternative
+object formats, you don't usually need to specify this, as @command{ld}
should be configured to produce as a default output format the most
usual format on each machine. @var{output-format} is a text string, the
name of a particular format supported by the BFD libraries. (You can
@@ -1030,10 +1149,10 @@ An option with machine dependent effects.
This option is only supported on a few targets.
@end ifset
@ifset H8300
-@xref{H8/300,,@code{ld} and the H8/300}.
+@xref{H8/300,,@command{ld} and the H8/300}.
@end ifset
@ifset I960
-@xref{i960,, @code{ld} and the Intel 960 family}.
+@xref{i960,, @command{ld} and the Intel 960 family}.
@end ifset
@@ -1078,26 +1197,26 @@ line. It overrides @samp{-s} and @samp{-S}.
@cindex runtime library search path
@kindex -rpath
Add a directory to the runtime library search path. This is used when
-linking an ELF executable with shared objects. All @code{-rpath}
+linking an ELF executable with shared objects. All @option{-rpath}
arguments are concatenated and passed to the runtime linker, which uses
-them to locate shared objects at runtime. The @code{-rpath} option is
+them to locate shared objects at runtime. The @option{-rpath} option is
also used when locating shared objects which are needed by shared
objects explicitly included in the link; see the description of the
-@code{-rpath-link} option. If @code{-rpath} is not used when linking an
+@option{-rpath-link} option. If @option{-rpath} is not used when linking an
ELF executable, the contents of the environment variable
@code{LD_RUN_PATH} will be used if it is defined.
-The @code{-rpath} option may also be used on SunOS. By default, on
+The @option{-rpath} option may also be used on SunOS. By default, on
SunOS, the linker will form a runtime search patch out of all the
-@code{-L} options it is given. If a @code{-rpath} option is used, the
-runtime search path will be formed exclusively using the @code{-rpath}
-options, ignoring the @code{-L} options. This can be useful when using
-gcc, which adds many @code{-L} options which may be on NFS mounted
+@option{-L} options it is given. If a @option{-rpath} option is used, the
+runtime search path will be formed exclusively using the @option{-rpath}
+options, ignoring the @option{-L} options. This can be useful when using
+gcc, which adds many @option{-L} options which may be on NFS mounted
filesystems.
-For compatibility with other ELF linkers, if the @code{-R} option is
+For compatibility with other ELF linkers, if the @option{-R} option is
followed by a directory name, rather than a file name, it is treated as
-the @code{-rpath} option.
+the @option{-rpath} option.
@end ifset
@ifset GENERIC
@@ -1111,9 +1230,9 @@ of the input files.
When the linker encounters such a dependency when doing a non-shared,
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
+explicitly. In such a case, the @option{-rpath-link} option
specifies the first set of directories to search. The
-@code{-rpath-link} option may specify a sequence of directory names
+@option{-rpath-link} option may specify a sequence of directory names
either by specifying a list of names separated by colons, or by
appearing multiple times.
@@ -1126,20 +1245,20 @@ The linker uses the following search paths to locate required shared
libraries.
@enumerate
@item
-Any directories specified by @code{-rpath-link} options.
+Any directories specified by @option{-rpath-link} options.
@item
-Any directories specified by @code{-rpath} options. The difference
-between @code{-rpath} and @code{-rpath-link} is that directories
-specified by @code{-rpath} options are included in the executable and
-used at runtime, whereas the @code{-rpath-link} option is only effective
+Any directories specified by @option{-rpath} options. The difference
+between @option{-rpath} and @option{-rpath-link} is that directories
+specified by @option{-rpath} options are included in the executable and
+used at runtime, whereas the @option{-rpath-link} option is only effective
at link time. It is for the native linker only.
@item
-On an ELF system, if the @code{-rpath} and @code{rpath-link} options
+On an ELF system, if the @option{-rpath} and @code{rpath-link} options
were not used, search the contents of the environment variable
@code{LD_RUN_PATH}. It is for the native linker only.
@item
-On SunOS, if the @code{-rpath} option was not used, search any
-directories specified using @code{-L} options.
+On SunOS, if the @option{-rpath} option was not used, search any
+directories specified using @option{-L} options.
@item
For a native linker, the contents of the environment variable
@code{LD_LIBRARY_PATH}.
@@ -1166,20 +1285,20 @@ warning and continue with the link.
@cindex shared libraries
Create a shared library. This is currently only supported on ELF, XCOFF
and SunOS platforms. On SunOS, the linker will automatically create a
-shared library if the @code{-e} option is not used and there are
+shared library if the @option{-e} option is not used and there are
undefined symbols in the link.
@item --sort-common
@kindex --sort-common
-This option tells @code{ld} to sort the common symbols by size when it
+This option tells @command{ld} to sort the common symbols by size when it
places them in the appropriate output sections. First come all the one
-byte symbols, then all the two bytes, then all the four bytes, and then
+byte symbols, then all the two byte, then all the four byte, and then
everything else. This is to prevent gaps between symbols due to
alignment constraints.
@kindex --split-by-file
@item --split-by-file [@var{size}]
-Similar to @code{--split-by-reloc} but creates a new output section for
+Similar to @option{--split-by-reloc} but creates a new output section for
each input file when @var{size} is reached. @var{size} defaults to a
size of 1 if not given.
@@ -1204,16 +1323,16 @@ as execution time and memory usage.
@kindex --traditional-format
@cindex traditional format
@item --traditional-format
-For some targets, the output of @code{ld} is different in some ways from
-the output of some existing linker. This switch requests @code{ld} to
+For some targets, the output of @command{ld} is different in some ways from
+the output of some existing linker. This switch requests @command{ld} to
use the traditional format instead.
@cindex dbx
-For example, on SunOS, @code{ld} combines duplicate entries in the
+For example, on SunOS, @command{ld} combines duplicate entries in the
symbol string table. This can reduce the size of an output file with
full debugging information by over 30 percent. Unfortunately, the SunOS
@code{dbx} program can not read the resulting program (@code{gdb} has no
-trouble). The @samp{--traditional-format} switch tells @code{ld} to not
+trouble). The @samp{--traditional-format} switch tells @command{ld} to not
combine duplicate entries.
@kindex --section-start @var{sectionname}=@var{org}
@@ -1245,9 +1364,9 @@ for compatibility with other linkers, you may omit the leading
@cindex verbose
@item --dll-verbose
@itemx --verbose
-Display the version number for @code{ld} and list the linker emulations
+Display the version number for @command{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.
+the linker script being used by the linker.
@kindex --version-script=@var{version-scriptfile}
@cindex version script, symbol versions
@@ -1258,7 +1377,7 @@ about the version heirarchy for the library being created. This option
is only meaningful on ELF platforms which support shared libraries.
@xref{VERSION}.
-@kindex --warn-comon
+@kindex --warn-common
@cindex warnings, on combining symbols
@cindex combining symbols, warnings on
@item --warn-common
@@ -1384,15 +1503,15 @@ the section (@pxref{SECTIONS}).
@cindex including an entire archive
@item --whole-archive
For each archive mentioned on the command line after the
-@code{--whole-archive} option, include every object file in the archive
+@option{--whole-archive} option, include every object file in the archive
in the link, rather than searching the archive for the required object
files. This is normally used to turn an archive file into a shared
library, forcing every object to be included in the resulting shared
library. This option may be used more than once.
Two notes when using this option from gcc: First, gcc doesn't know
-about this option, so you have to use @code{-Wl,-whole-archive}.
-Second, don't forget to use @code{-Wl,-no-whole-archive} after your
+about this option, so you have to use @option{-Wl,-whole-archive}.
+Second, don't forget to use @option{-Wl,-no-whole-archive} after your
list of archives, because gcc will add its own list of archives to
your link and you may not want this flag to affect those as well.
@@ -1419,13 +1538,13 @@ __wrap_malloc (int c)
@}
@end smallexample
-If you link other code with this file using @code{--wrap malloc}, then
+If you link other code with this file using @option{--wrap malloc}, then
all calls to @code{malloc} will call the function @code{__wrap_malloc}
instead. The call to @code{__real_malloc} in @code{__wrap_malloc} will
call the real @code{malloc} function.
You may wish to provide a @code{__real_malloc} function as well, so that
-links without the @code{--wrap} option will succeed. If you do this,
+links without the @option{--wrap} option will succeed. If you do this,
you should not put the definition of @code{__real_malloc} in the same
file as @code{__wrap_malloc}; if you do, the assembler may resolve the
call before the linker has a chance to wrap it to @code{malloc}.
@@ -1436,16 +1555,20 @@ call before the linker has a chance to wrap it to @code{malloc}.
@itemx --disable-new-dtags
This linker can create the new dynamic tags in ELF. But the older ELF
systems may not understand them. If you specify
-@code{--enable-new-dtags}, the dynamic tags will be created as needed.
-If you specify @code{--disable-new-dtags}, no new dynamic tags will be
+@option{--enable-new-dtags}, the dynamic tags will be created as needed.
+If you specify @option{--disable-new-dtags}, no new dynamic tags will be
created. By default, the new dynamic tags are not created. Note that
those options are only available for ELF systems.
@end table
+@c man end
+
@subsection Options specific to i386 PE targets
-The i386 PE linker supports the @code{-shared} option, which causes
+@c man begin OPTIONS
+
+The i386 PE linker supports the @option{-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
@@ -1459,7 +1582,7 @@ 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
+@table @gcctabopt
@kindex --add-stdcall-alias
@item --add-stdcall-alias
@@ -1475,7 +1598,7 @@ addresses of all the relocations needed for generating DLLs with
@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}
+@option{-shared} or specify a @code{LIBRARY} in a given @code{.def}
file.
@kindex --enable-stdcall-fixup
@@ -1491,9 +1614,9 @@ undefined symbol @code{_foo} might be linked to the function
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
+to be usable. If you specify @option{--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
+@option{--disable-stdcall-fixup}, this feature is disabled and such
mismatches are considered to be errors.
@cindex DLLs, creating
@@ -1505,8 +1628,22 @@ 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.
+@code{DllEntryPoint@@0}, @code{DllMainCRTStartup@@12}, and
+@code{impure_ptr} will not be automatically
+exported. Also, symbols imported from other DLLs will not be
+re-exported, nor will symbols specifying the DLL's internal layout
+such as those beginning with @code{_head_} or ending with
+@code{_iname}. In addition, no symbols from @code{libgcc},
+@code{libstd++}, @code{libmingw32}, or @code{crtX.o} will be exported.
+Symbols whose names begin with @code{__rtti_} or @code{__builtin_} will
+not be exported, to help with C++ DLLs. Finally, there is an
+extensive list of cygwin-private symbols that are not exported
+(obviously, this applies on when building DLLs for cygwin targets).
+These cygwin-excludes are: @code{_cygwin_dll_entry@@12},
+@code{_cygwin_crt0_common@@8}, @code{_cygwin_noncygwin_dll_entry@@12},
+@code{_fmode}, @code{_impure_ptr}, @code{cygwin_attach_dll},
+@code{cygwin_premain0}, @code{cygwin_premain1}, @code{cygwin_premain2},
+@code{cygwin_premain3}, and @code{environ}.
@kindex --exclude-symbols
@item --exclude-symbols @var{symbol},@var{symbol},...
@@ -1576,6 +1713,164 @@ file corresponding to the DLL the linker is generating. This DEF file
library with @code{dlltool} or may be used as a reference to
automatically or implicitly exported symbols.
+@cindex DLLs, creating
+@kindex --out-implib
+@item --out-implib @var{file}
+The linker will create the file @var{file} which will contain an
+import lib corresponding to the DLL the linker is generating. This
+import lib (which should be called @code{*.dll.a} or @code{*.a}
+may be used to link clients against the generated DLL; this behavior
+makes it possible to skip a separate @code{dlltool} import library
+creation step.
+
+@kindex --enable-auto-image-base
+@item --enable-auto-image-base
+Automatically choose the image base for DLLs, unless one is specified
+using the @code{--image-base} argument. By using a hash generated
+from the dllname to create unique image bases for each DLL, in-memory
+collisions and relocations which can delay program execution are
+avoided.
+
+@kindex --disable-auto-image-base
+@item --disable-auto-image-base
+Do not automatically generate a unique image base. If there is no
+user-specified image base (@code{--image-base}) then use the platform
+default.
+
+@cindex DLLs, linking to
+@kindex --dll-search-prefix
+@item --dll-search-prefix @var{string}
+When linking dynamically to a dll without an import library, i
+search for @code{<string><basename>.dll} in preference to
+@code{lib<basename>.dll}. This behavior allows easy distinction
+between DLLs built for the various "subplatforms": native, cygwin,
+uwin, pw, etc. For instance, cygwin DLLs typically use
+@code{--dll-search-prefix=cyg}.
+
+@kindex --enable-auto-import
+@item --enable-auto-import
+Do sophisticated linking of @code{_symbol} to @code{__imp__symbol} for
+DATA imports from DLLs, and create the necessary thunking symbols when
+building the DLLs with those DATA exports. This generally will 'just
+work' -- but sometimes you may see this message:
+
+"variable '<var>' can't be auto-imported. Please read the
+documentation for ld's @code{--enable-auto-import} for details."
+
+This message occurs when some (sub)expression accesses an address
+ultimately given by the sum of two constants (Win32 import tables only
+allow one). Instances where this may occur include accesses to member
+fields of struct variables imported from a DLL, as well as using a
+constant index into an array variable imported from a DLL. Any
+multiword variable (arrays, structs, long long, etc) may trigger
+this error condition. However, regardless of the exact data type
+of the offending exported variable, ld will always detect it, issue
+the warning, and exit.
+
+There are several ways to address this difficulty, regardless of the
+data type of the exported variable:
+
+One solution is to force one of the 'constants' to be a variable --
+that is, unknown and un-optimizable at compile time. For arrays,
+there are two possibilities: a) make the indexee (the array's address)
+a variable, or b) make the 'constant' index a variable. Thus:
+
+@example
+extern type extern_array[];
+extern_array[1] -->
+ @{ volatile type *t=extern_array; t[1] @}
+@end example
+
+or
+
+@example
+extern type extern_array[];
+extern_array[1] -->
+ @{ volatile int t=1; extern_array[t] @}
+@end example
+
+For structs (and most other multiword data types) the only option
+is to make the struct itself (or the long long, or the ...) variable:
+
+@example
+extern struct s extern_struct;
+extern_struct.field -->
+ @{ volatile struct s *t=&extern_struct; t->field @}
+@end example
+
+or
+
+@example
+extern long long extern_ll;
+extern_ll -->
+ @{ volatile long long * local_ll=&extern_ll; *local_ll @}
+@end example
+
+A second method of dealing with this difficulty is to abandon
+'auto-import' for the offending symbol and mark it with
+@code{__declspec(dllimport)}. However, in practice that
+requires using compile-time #defines to indicate whether you are
+building a DLL, building client code that will link to the DLL, or
+merely building/linking to a static library. In making the choice
+between the various methods of resolving the 'direct address with
+constant offset' problem, you should consider typical real-world usage:
+
+Original:
+@example
+--foo.h
+extern int arr[];
+--foo.c
+#include "foo.h"
+void main(int argc, char **argv)@{
+ printf("%d\n",arr[1]);
+@}
+@end example
+
+Solution 1:
+@example
+--foo.h
+extern int arr[];
+--foo.c
+#include "foo.h"
+void main(int argc, char **argv)@{
+ /* This workaround is for win32 and cygwin; do not "optimize" */
+ volatile int *parr = arr;
+ printf("%d\n",parr[1]);
+@}
+@end example
+
+Solution 2:
+@example
+--foo.h
+/* Note: auto-export is assumed (no __declspec(dllexport)) */
+#if (defined(_WIN32) || defined(__CYGWIN__)) && \
+ !(defined(FOO_BUILD_DLL) || defined(FOO_STATIC))
+#define FOO_IMPORT __declspec(dllimport)
+#else
+#define FOO_IMPORT
+#endif
+extern FOO_IMPORT int arr[];
+--foo.c
+#include "foo.h"
+void main(int argc, char **argv)@{
+ printf("%d\n",arr[1]);
+@}
+@end example
+
+A third way to avoid this problem is to re-code your
+library to use a functional interface rather than a data interface
+for the offending variables (e.g. set_foo() and get_foo() accessor
+functions).
+
+@kindex --disable-auto-import
+@item --disable-auto-import
+Do not attempt to do sophisticalted linking of @code{_symbol} to
+@code{__imp__symbol} for DATA imports from DLLs.
+
+@kindex --enable-extra-pe-debug
+@item --enable-extra-pe-debug
+Show additional debug info related to auto-import symbol thunking.
+
@kindex --section-alignment
@item --section-alignment
Sets the section alignment. Sections in memory will always begin at
@@ -1586,7 +1881,7 @@ addresses which are a multiple of this number. Defaults to 0x1000.
@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
+used as stack for this program. The default is 2Mb reserved, 4K
committed.
@kindex --subsystem
@@ -1600,11 +1895,15 @@ subsystem version also.
@end table
+@c man end
+
@ifset UsesEnvVars
@node Environment
@section Environment Variables
-You can change the behavior of @code{ld} with the environment variables
+@c man begin ENVIRONMENT
+
+You can change the behavior of @command{ld} with the environment variables
@code{GNUTARGET}, @code{LDEMULATION}, and @code{COLLECT_NO_DEMANGLE}.
@kindex GNUTARGET
@@ -1612,7 +1911,7 @@ You can change the behavior of @code{ld} with the environment variables
@code{GNUTARGET} determines the input-file object format if you don't
use @samp{-b} (or its synonym @samp{--format}). Its value should be one
of the BFD names for an input format (@pxref{BFD}). If there is no
-@code{GNUTARGET} in the environment, @code{ld} uses the natural format
+@code{GNUTARGET} in the environment, @command{ld} uses the natural format
of the target. If @code{GNUTARGET} is set to @code{default} then BFD
attempts to discover the input format by examining binary input files;
this method often succeeds, but there are potential ambiguities, since
@@ -1631,7 +1930,6 @@ available emulations with the @samp{--verbose} or @samp{-V} options. If
the @samp{-m} option is not used, and the @code{LDEMULATION} environment
variable is not defined, the default emulation depends upon how the
linker was configured.
-@end ifset
@kindex COLLECT_NO_DEMANGLE
@cindex demangling, default
@@ -1642,6 +1940,9 @@ a similar fashion by the @code{gcc} linker wrapper program. The default
may be overridden by the @samp{--demangle} and @samp{--no-demangle}
options.
+@c man end
+@end ifset
+
@node Scripts
@chapter Linker Scripts
@@ -1883,7 +2184,7 @@ Several linker script commands deal with files.
@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
+with the @option{-L} option. You can nest calls to @code{INCLUDE} up to
10 levels deep.
@item INPUT(@var{file}, @var{file}, @dots{})
@@ -1907,7 +2208,7 @@ 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
+If you use @samp{INPUT (-l@var{file})}, @command{ld} will transform the
name to @code{lib@var{file}.a}, as with the command line argument
@samp{-l}.
@@ -1942,7 +2243,7 @@ output file other than the usual default of @file{a.out}.
@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
+@command{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
@@ -2030,13 +2331,20 @@ command has the same effect as the @samp{-u} command-line option.
@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
+to make @command{ld} assign space to common symbols even if a relocatable
output file is specified (@samp{-r}).
+@item INHIBIT_COMMON_ALLOCATION
+@kindex INHIBIT_COMMON_ALLOCATION
+@cindex common allocation in linker script
+This command has the same effect as the @samp{--no-define-common}
+command-line option: to make @code{ld} omit the assignment of addresses
+to common symbols even for a non-relocatable output file.
+
@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
+This command may be used to tell @command{ld} to issue an error about any
references among certain output sections.
In certain types of programs, particularly on embedded systems when
@@ -2046,7 +2354,7 @@ errors. For example, it would be an error if code in one section called
a function defined in the other section.
The @code{NOCROSSREFS} command takes a list of output section names. If
-@code{ld} detects any cross references between the sections, it reports
+@command{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.
@@ -2374,7 +2682,8 @@ There are two ways to include more than one section:
@noindent
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
+first example, they will be intermingled, appearing in the same order as
+they are found in the linker input. In the second example, all
@samp{.text} input sections will appear first, followed by all
@samp{.rdata} input sections.
@@ -2615,16 +2924,16 @@ 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
+with the four 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}:
+value @samp{0x90}:
@smallexample
-FILL(0x9090)
+FILL(0x90909090)
@end smallexample
The @code{FILL} command is similar to the @samp{=@var{fillexp}} output
@@ -2910,7 +3219,7 @@ 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
+alignment of input sections) will be filled with the four least
significant bytes of the value, repeated as necessary.
You can also change the fill value with a @code{FILL} command in the
@@ -2919,7 +3228,7 @@ output section commands; see @ref{Output Section Data}.
Here is a simple example:
@smallexample
@group
-SECTIONS @{ .text : @{ *(.text) @} =0x9090 @}
+SECTIONS @{ .text : @{ *(.text) @} =0x90909090 @}
@end group
@end smallexample
@@ -3378,6 +3687,15 @@ 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.
+Node name can be omited, provided it is the only version node
+in the version script. Such version script doesn't assign any versions to
+symbols, only selects which symbols will be globally visible out and which
+won't.
+
+@smallexample
+@{ global: foo; bar; local: *; @}
+@end smallexample
+
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
@@ -3446,6 +3764,17 @@ 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.
+You can also specify the language in the version script:
+
+@smallexample
+VERSION extern "lang" @{ version-script-commands @}
+@end smallexample
+
+The supported @samp{lang}s are @samp{C}, @samp{C++}, and @samp{Java}.
+The linker will iterate over the list of symbols at the link time and
+demangle them according to @samp{lang} before matching them to the
+patterns specified in @samp{version-script-commands}.
+
@node Expressions
@section Expressions in Linker Scripts
@cindex expressions
@@ -3551,7 +3880,7 @@ SECTIONS
file2(.text)
. += 1000;
file3(.text)
- @} = 0x1234;
+ @} = 0x12345678;
@}
@end smallexample
@noindent
@@ -3559,7 +3888,7 @@ 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}
+@samp{.text} section from @file{file3}. The notation @samp{= 0x12345678}
specifies what data to write in the gaps (@pxref{Output Section Fill}).
@cindex dot inside sections
@@ -3937,8 +4266,8 @@ read. This can affect archive searching.
@chapter Machine Dependent Features
@cindex machine dependencies
-@code{ld} has additional features on some platforms; the following
-sections describe them. Machines where @code{ld} has no additional
+@command{ld} has additional features on some platforms; the following
+sections describe them. Machines where @command{ld} has no additional
functionality are not listed.
@menu
@@ -3946,8 +4275,11 @@ functionality are not listed.
* i960:: @code{ld} and the Intel 960 family
* ARM:: @code{ld} and the ARM family
* HPPA ELF32:: @code{ld} and HPPA 32-bit ELF
+@ifset MMIX
+* MMIX:: @code{ld} and MMIX
+@end ifset
@ifset TICOFF
-* TI COFF:: @code{ld} and TI COFF
+* TI COFF:: @command{ld} and TI COFF
@end ifset
@end menu
@end ifset
@@ -3960,16 +4292,16 @@ functionality are not listed.
@end ifclear
@node H8/300
-@section @code{ld} and the H8/300
+@section @command{ld} and the H8/300
@cindex H8/300 support
-For the H8/300, @code{ld} can perform these global optimizations when
+For the H8/300, @command{ld} can perform these global optimizations when
you specify the @samp{--relax} command-line option.
@table @emph
@cindex relaxing on H8/300
@item relaxing address modes
-@code{ld} finds all @code{jsr} and @code{jmp} instructions whose
+@command{ld} finds all @code{jsr} and @code{jmp} instructions whose
targets are within eight bits, and turns them into eight-bit
program-counter relative @code{bsr} and @code{bra} instructions,
respectively.
@@ -3977,7 +4309,7 @@ respectively.
@cindex synthesizing on H8/300
@item synthesizing instructions
@c FIXME: specifically mov.b, or any mov instructions really?
-@code{ld} finds all @code{mov.b} instructions which use the
+@command{ld} finds all @code{mov.b} instructions which use the
sixteen-bit absolute address form, but refer to the top
page of memory, and changes them to use the eight-bit address form.
(That is: the linker turns @samp{mov.b @code{@@}@var{aa}:16} into
@@ -3995,9 +4327,9 @@ top page of memory).
@c This stuff is pointless to say unless you're especially concerned
@c with Hitachi chips; don't enable it for generic case, please.
@node Hitachi
-@chapter @code{ld} and other Hitachi chips
+@chapter @command{ld} and other Hitachi chips
-@code{ld} also supports the H8/300H, the H8/500, and the Hitachi SH. No
+@command{ld} also supports the H8/300H, the H8/500, and the Hitachi SH. No
special features, commands, or command-line options are required for
these chips.
@end ifset
@@ -4009,7 +4341,7 @@ these chips.
@end ifclear
@node i960
-@section @code{ld} and the Intel 960 family
+@section @command{ld} and the Intel 960 family
@cindex i960 support
@@ -4021,7 +4353,7 @@ linker's search strategy for archive libraries, to support the use of
libraries specific to each particular architecture, by including in the
search loop names suffixed with the string identifying the architecture.
-For example, if your @code{ld} command line included @w{@samp{-ACA}} as
+For example, if your @command{ld} command line included @w{@samp{-ACA}} as
well as @w{@samp{-ltry}}, the linker would look (in its built-in search
paths, and in any paths you specify with @samp{-L}) for a library with
the names
@@ -4044,13 +4376,13 @@ the 960 architecture family allows combination of target architectures; each
use will add another pair of name variants to search for when @w{@samp{-l}}
specifies a library.
-@cindex @code{--relax} on i960
+@cindex @option{--relax} on i960
@cindex relaxing on i960
-@code{ld} supports the @samp{--relax} option for the i960 family. If
-you specify @samp{--relax}, @code{ld} finds all @code{balx} and
+@command{ld} supports the @samp{--relax} option for the i960 family. If
+you specify @samp{--relax}, @command{ld} finds all @code{balx} and
@code{calx} instructions whose targets are within 24 bits, and turns
them into 24-bit program-counter relative @code{bal} and @code{cal}
-instructions, respectively. @code{ld} also turns @code{cal}
+instructions, respectively. @command{ld} also turns @code{cal}
instructions into @code{bal} instructions when it determines that the
target subroutine is a leaf routine (that is, the target subroutine does
not itself call any subroutines).
@@ -4065,11 +4397,11 @@ not itself call any subroutines).
@end ifclear
@node ARM
-@section @code{ld}'s support for interworking between ARM and Thumb code
+@section @command{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
+For the ARM, @command{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
@@ -4090,18 +4422,18 @@ branched to using a BX instruction, and the program will start
executing in Thumb mode straight away.
@node HPPA ELF32
-@section @code{ld} and HPPA 32-bit ELF support
+@section @command{ld} and HPPA 32-bit ELF support
@cindex HPPA multiple sub-space stubs
@kindex --multi-subspace
-When generating a shared library, @code{ld} will by default generate
+When generating a shared library, @command{ld} will by default generate
import stubs suitable for use with a single sub-space application.
-The @samp{--multi-subspace} switch causes @code{ld} to generate export
+The @samp{--multi-subspace} switch causes @command{ld} to generate export
stubs, and different (larger) import stubs suitable for use with
multiple sub-spaces.
@cindex HPPA stub grouping
@kindex --stub-group-size=@var{N}
-Long branch stubs and import/export stubs are placed by @code{ld} in
+Long branch stubs and import/export stubs are placed by @command{ld} in
stub sections located between groups of input sections.
@samp{--stub-group-size} specifies the maximum size of a group of input
sections handled by one stub section. Since branch offsets are signed,
@@ -4112,7 +4444,7 @@ prediction) that stub sections only serve one group of input sections.
A negative value for @samp{N} chooses this scheme, ensuring that
branches to stubs always use a negative offset. Two special values of
@samp{N} are recognized, @samp{1} and @samp{-1}. These both instruct
-@code{ld} to automatically size input section groups for the branch types
+@command{ld} to automatically size input section groups for the branch types
detected, with the same behaviour regarding stub placement as other
positive or negative values of @samp{N} respectively.
@@ -4121,15 +4453,41 @@ single input section larger than the group size specified will of course
create a larger group (of one section). If input sections are too
large, it may not be possible for a branch to reach its stub.
+@ifset MMIX
+@node MMIX
+@section @code{ld} and MMIX
+For MMIX, there is choice of generating @code{ELF} object files or
+@code{mmo} object files when linking. The simulator @code{mmix}
+understands the @code{mmo} format. The binutils @code{objcopy} utility
+can translate between the two formats.
+
+There is one special section, the @samp{.MMIX.reg_contents} section.
+Contents in this section is assumed to correspond to that of global
+registers, and symbols referring to it are translated to special symbols,
+equal to registers. In a final link, the start address of the
+@samp{.MMIX.reg_contents} section corresponds to the first allocated
+global register multiplied by 8. Register @code{$255} is not included in
+this section; it is always set to the program entry, which is at the
+symbol @code{Main} for @code{mmo} files.
+
+Symbols with the prefix @code{__.MMIX.start.}, for example
+@code{__.MMIX.start..text} and @code{__.MMIX.start..data} are special;
+there must be only one each, even if they are local. The default linker
+script uses these to set the default start address of a section.
+
+Initial and trailing multiples of zero-valued 32-bit words in a section,
+are left out from an mmo file.
+@end ifset
+
@ifset TICOFF
@node TI COFF
-@section @code{ld}'s support for various TI COFF versions
+@section @command{ld}'s support for various TI COFF versions
@cindex TI COFF versions
@kindex --format=@var{version}
The @samp{--format} switch allows selection of one of the various
TI COFF versions. The latest of this writing is 2; versions 0 and 1 are
also supported. The TI COFF versions also vary in header byte-order
-format; @code{ld} will read any version or byte order, but the output
+format; @command{ld} will read any version or byte order, but the output
header format depends on the default specified by the specific target.
@end ifset
@@ -4182,16 +4540,16 @@ conversion and during output. @xref{BFD information loss}.
@node Reporting Bugs
@chapter Reporting Bugs
-@cindex bugs in @code{ld}
-@cindex reporting bugs in @code{ld}
+@cindex bugs in @command{ld}
+@cindex reporting bugs in @command{ld}
-Your bug reports play an essential role in making @code{ld} reliable.
+Your bug reports play an essential role in making @command{ld} reliable.
Reporting a bug may help you by bringing a solution to your problem, or
it may not. But in any case the principal function of a bug report is
-to help the entire community by making the next version of @code{ld}
+to help the entire community by making the next version of @command{ld}
work better. Bug reports are your contribution to the maintenance of
-@code{ld}.
+@command{ld}.
In order for a bug report to serve its purpose, you must include the
information that enables us to fix the bug.
@@ -4213,37 +4571,37 @@ If you are not sure whether you have found a bug, here are some guidelines:
@cindex crash of linker
@item
If the linker gets a fatal signal, for any input whatever, that is a
-@code{ld} bug. Reliable linkers never crash.
+@command{ld} bug. Reliable linkers never crash.
@cindex error on valid input
@item
-If @code{ld} produces an error message for valid input, that is a bug.
+If @command{ld} produces an error message for valid input, that is a bug.
@cindex invalid input
@item
-If @code{ld} does not produce an error message for invalid input, that
+If @command{ld} does not produce an error message for invalid input, that
may be a bug. In the general case, the linker can not verify that
object files are correct.
@item
If you are an experienced user of linkers, your suggestions for
-improvement of @code{ld} are welcome in any case.
+improvement of @command{ld} are welcome in any case.
@end itemize
@node Bug Reporting
@section How to report bugs
@cindex bug reports
-@cindex @code{ld} bugs, reporting
+@cindex @command{ld} bugs, reporting
A number of companies and individuals offer support for @sc{gnu}
-products. If you obtained @code{ld} from a support organization, we
+products. If you obtained @command{ld} from a support organization, we
recommend you contact that organization first.
You can find contact information for many support companies and
individuals in the file @file{etc/SERVICE} in the @sc{gnu} Emacs
distribution.
-Otherwise, send bug reports for @code{ld} to
+Otherwise, send bug reports for @command{ld} to
@samp{bug-binutils@@gnu.org}.
The fundamental principle of reporting bugs usefully is this:
@@ -4273,14 +4631,14 @@ To enable us to fix the bug, you should include all these things:
@itemize @bullet
@item
-The version of @code{ld}. @code{ld} announces it if you start it with
+The version of @command{ld}. @command{ld} announces it if you start it with
the @samp{--version} argument.
Without this, we will not know whether there is any point in looking for
-the bug in the current version of @code{ld}.
+the bug in the current version of @command{ld}.
@item
-Any patches you may have applied to the @code{ld} source, including any
+Any patches you may have applied to the @command{ld} source, including any
patches made to the @code{BFD} library.
@item
@@ -4288,7 +4646,7 @@ The type of machine you are using, and the operating system name and
version number.
@item
-What compiler (and its version) was used to compile @code{ld}---e.g.
+What compiler (and its version) was used to compile @command{ld}---e.g.
``@code{gcc-2.7}''.
@item
@@ -4317,14 +4675,14 @@ how @code{gas} or @code{gcc} were configured.
A description of what behavior you observe that you believe is
incorrect. For example, ``It gets a fatal signal.''
-Of course, if the bug is that @code{ld} gets a fatal signal, then we
+Of course, if the bug is that @command{ld} gets a fatal signal, then we
will certainly notice it. But if the bug is incorrect output, we might
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
-copy of @code{ld} is out of synch, or you have encountered a bug in the
+copy of @command{ld} 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 ours
fails to crash, we would know that the bug was not happening for us. If
@@ -4332,10 +4690,10 @@ you had not told us to expect a crash, then we would not be able to draw
any conclusion from our observations.
@item
-If you wish to suggest changes to the @code{ld} source, send us context
+If you wish to suggest changes to the @command{ld} 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
+If you even discuss something in the @command{ld} source, refer to it by
context, not by line number.
The line numbers in our development sources will not match those in your
@@ -4373,7 +4731,7 @@ the necessary information, such as the test case, on the assumption that
a patch is all we need. We might see problems with your patch and decide
to fix the problem another way, or we might not understand it at all.
-Sometimes with a program as complicated as @code{ld} it is very hard to
+Sometimes with a program as complicated as @command{ld} it is very hard to
construct an example that will make the program follow a certain path
through the code. If you do not send us the example, we will not be
able to construct one, so we will not be able to verify that the bug is
@@ -4393,12 +4751,12 @@ things without first using the debugger to find the facts.
@node MRI
@appendix MRI Compatible Script Files
@cindex MRI compatibility
-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
+To aid users making the transition to @sc{gnu} @command{ld} from the MRI
+linker, @command{ld} can use MRI compatible linker scripts as an
alternative to the more general-purpose linker scripting language
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
+@command{ld}. @sc{gnu} @command{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
@@ -4411,7 +4769,7 @@ You can specify a file containing an MRI-compatible script using the
Each command in an MRI-compatible script occupies its own line; each
command line starts with the keyword that identifies the command (though
blank lines are also allowed for punctuation). If a line of an
-MRI-compatible script begins with an unrecognized keyword, @code{ld}
+MRI-compatible script begins with an unrecognized keyword, @command{ld}
issues a warning message, but continues processing the script.
Lines beginning with @samp{*} are comments.
@@ -4424,7 +4782,7 @@ The following list shows only the upper-case form of each command.
@cindex @code{ABSOLUTE} (MRI)
@item ABSOLUTE @var{secname}
@itemx ABSOLUTE @var{secname}, @var{secname}, @dots{} @var{secname}
-Normally, @code{ld} includes in the output file all sections from all
+Normally, @command{ld} includes in the output file all sections from all
the input files. However, in an MRI-compatible script, you can use the
@code{ABSOLUTE} command to restrict the sections that will be present in
your output program. If the @code{ABSOLUTE} command is used at all in a
@@ -4479,7 +4837,7 @@ COFF (the @samp{coff-m68k} variant in BFD), if @var{output-format} is
@cindex @code{LIST} (MRI)
@item LIST @var{anything}@dots{}
Print (to the standard output file) a link map, as produced by the
-@code{ld} command-line option @samp{-M}.
+@command{ld} command-line option @samp{-M}.
The keyword @code{LIST} may be followed by anything on the
same line, with no change in its effect.
@@ -4488,19 +4846,19 @@ same line, with no change in its effect.
@item LOAD @var{filename}
@itemx LOAD @var{filename}, @var{filename}, @dots{} @var{filename}
Include one or more object file @var{filename} in the link; this has the
-same effect as specifying @var{filename} directly on the @code{ld}
+same effect as specifying @var{filename} directly on the @command{ld}
command line.
@cindex @code{NAME} (MRI)
@item NAME @var{output-name}
-@var{output-name} is the name for the program produced by @code{ld}; the
+@var{output-name} is the name for the program produced by @command{ld}; the
MRI-compatible command @code{NAME} is equivalent to the command-line
option @samp{-o} or the general script language command @code{OUTPUT}.
@cindex @code{ORDER} (MRI)
@item ORDER @var{secname}, @var{secname}, @dots{} @var{secname}
@itemx ORDER @var{secname} @var{secname} @var{secname}
-Normally, @code{ld} orders the sections in its output file in the
+Normally, @command{ld} orders the sections in its output file in the
order in which they first appear in the input files. In an MRI-compatible
script, you can override this ordering with the @code{ORDER} command. The
sections you list with @code{ORDER} will appear first in your output
@@ -4910,5 +5268,3 @@ to permit their use in free software.
@contents
@bye
-
-
diff --git a/contrib/binutils/ld/ldcref.c b/contrib/binutils/ld/ldcref.c
index 6b15ffd..c6ea18b 100644
--- a/contrib/binutils/ld/ldcref.c
+++ b/contrib/binutils/ld/ldcref.c
@@ -73,9 +73,9 @@ static boolean cref_fill_array PARAMS ((struct cref_hash_entry *, PTR));
static int cref_sort_array PARAMS ((const PTR, const PTR));
static void output_one_cref PARAMS ((FILE *, struct cref_hash_entry *));
static boolean check_nocrossref PARAMS ((struct cref_hash_entry *, PTR));
+static void check_section_sym_xref PARAMS ((lang_input_statement_type *));
static void check_refs
- PARAMS ((struct cref_hash_entry *, struct bfd_link_hash_entry *,
- struct lang_nocrossrefs *));
+ PARAMS ((const char *, asection *, bfd *, struct lang_nocrossrefs *));
static void check_reloc_refs PARAMS ((bfd *, asection *, PTR));
/* Look up an entry in the cref hash table. */
@@ -342,6 +342,41 @@ check_nocrossrefs ()
return;
cref_hash_traverse (&cref_table, check_nocrossref, (PTR) NULL);
+
+ lang_for_each_file (check_section_sym_xref);
+}
+
+/* Checks for prohibited cross references to section symbols. */
+
+static void
+check_section_sym_xref (statement)
+ lang_input_statement_type *statement;
+{
+ bfd *abfd;
+ asection *sec;
+
+ abfd = statement->the_bfd;
+ if (abfd == NULL)
+ return;
+
+ for (sec = abfd->sections; sec != NULL; sec = sec->next)
+ {
+ asection *outsec;
+
+ outsec = sec->output_section;
+ if (outsec != NULL)
+ {
+ const char *outsecname;
+ struct lang_nocrossrefs *ncrs;
+ struct lang_nocrossref *ncr;
+
+ outsecname = outsec->name;
+ for (ncrs = nocrossref_list; ncrs != NULL; ncrs = ncrs->next)
+ for (ncr = ncrs->list; ncr != NULL; ncr = ncr->next)
+ if (strcmp (ncr->name, outsecname) == 0)
+ check_refs (NULL, sec, abfd, ncrs);
+ }
+ }
}
/* Check one symbol to see if it is a prohibited cross reference. */
@@ -356,6 +391,7 @@ check_nocrossref (h, ignore)
const char *defsecname;
struct lang_nocrossrefs *ncrs;
struct lang_nocrossref *ncr;
+ struct cref_ref *ref;
hl = bfd_link_hash_lookup (link_info.hash, h->root.string, false,
false, true);
@@ -378,7 +414,8 @@ check_nocrossref (h, ignore)
for (ncrs = nocrossref_list; ncrs != NULL; ncrs = ncrs->next)
for (ncr = ncrs->list; ncr != NULL; ncr = ncr->next)
if (strcmp (ncr->name, defsecname) == 0)
- check_refs (h, hl, ncrs);
+ for (ref = h->refs; ref != NULL; ref = ref->next)
+ check_refs (hl->root.string, hl->u.def.section, ref->abfd, ncrs);
return true;
}
@@ -387,11 +424,10 @@ check_nocrossref (h, ignore)
check_reloc_refs through bfd_map_over_sections. */
struct check_refs_info {
- struct cref_hash_entry *h;
+ const char *sym_name;
asection *defsec;
struct lang_nocrossrefs *ncrs;
asymbol **asymbols;
- boolean same;
};
/* This function is called for each symbol defined in a section which
@@ -400,70 +436,59 @@ struct check_refs_info {
prohibited sections. */
static void
-check_refs (h, hl, ncrs)
- struct cref_hash_entry *h;
- struct bfd_link_hash_entry *hl;
+check_refs (name, sec, abfd, ncrs)
+ const char *name;
+ asection *sec;
+ bfd *abfd;
struct lang_nocrossrefs *ncrs;
{
- struct cref_ref *ref;
+ lang_input_statement_type *li;
+ asymbol **asymbols;
+ struct check_refs_info info;
- for (ref = h->refs; ref != NULL; ref = ref->next)
+ /* We need to look through the relocations for this BFD, to see
+ if any of the relocations which refer to this symbol are from
+ a prohibited section. Note that we need to do this even for
+ the BFD in which the symbol is defined, since even a single
+ BFD might contain a prohibited cross reference. */
+
+ li = (lang_input_statement_type *) abfd->usrdata;
+ if (li != NULL && li->asymbols != NULL)
+ asymbols = li->asymbols;
+ else
{
- lang_input_statement_type *li;
- asymbol **asymbols;
- struct check_refs_info info;
-
- /* We need to look through the relocations for this BFD, to see
- if any of the relocations which refer to this symbol are from
- a prohibited section. Note that we need to do this even for
- the BFD in which the symbol is defined, since even a single
- BFD might contain a prohibited cross reference; for this
- case, we set the SAME field in INFO, which will cause
- CHECK_RELOCS_REFS to check for relocations against the
- section as well as against the symbol. */
-
- li = (lang_input_statement_type *) ref->abfd->usrdata;
- if (li != NULL && li->asymbols != NULL)
- asymbols = li->asymbols;
- else
+ long symsize;
+ long symbol_count;
+
+ symsize = bfd_get_symtab_upper_bound (abfd);
+ if (symsize < 0)
+ 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);
+ if (li != NULL)
{
- long symsize;
- long symbol_count;
-
- symsize = bfd_get_symtab_upper_bound (ref->abfd);
- if (symsize < 0)
- 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);
- if (li != NULL)
- {
- li->asymbols = asymbols;
- li->symbol_count = symbol_count;
- }
+ li->asymbols = asymbols;
+ li->symbol_count = symbol_count;
}
-
- info.h = h;
- info.defsec = hl->u.def.section;
- info.ncrs = ncrs;
- info.asymbols = asymbols;
- if (ref->abfd == hl->u.def.section->owner)
- info.same = true;
- else
- info.same = false;
- bfd_map_over_sections (ref->abfd, check_reloc_refs, (PTR) &info);
-
- if (li == NULL)
- free (asymbols);
}
+
+ info.sym_name = name;
+ info.defsec = sec;
+ info.ncrs = ncrs;
+ info.asymbols = asymbols;
+ bfd_map_over_sections (abfd, check_reloc_refs, (PTR) &info);
+
+ if (li == NULL)
+ free (asymbols);
}
-/* This is called via bfd_map_over_sections. INFO->H is a symbol
+/* This is called via bfd_map_over_sections. INFO->SYM_NAME is a symbol
defined in INFO->DEFSECNAME. If this section maps into any of the
sections listed in INFO->NCRS, other than INFO->DEFSECNAME, then we
look through the relocations. If any of the relocations are to
- INFO->H, then we report a prohibited cross reference error. */
+ INFO->SYM_NAME, then we report a prohibited cross reference error. */
static void
check_reloc_refs (abfd, sec, iarg)
@@ -502,9 +527,10 @@ check_reloc_refs (abfd, sec, iarg)
/* This section is one for which cross references are prohibited.
Look through the relocations, and see if any of them are to
- INFO->H. */
+ INFO->SYM_NAME. If INFO->SYMNAME is NULL, check for relocations
+ against the section symbol. */
- symname = info->h->root.string;
+ symname = info->sym_name;
relsize = bfd_get_reloc_upper_bound (abfd, sec);
if (relsize < 0)
@@ -525,9 +551,10 @@ check_reloc_refs (abfd, sec, iarg)
if (q->sym_ptr_ptr != NULL
&& *q->sym_ptr_ptr != NULL
- && (strcmp (bfd_asymbol_name (*q->sym_ptr_ptr), symname) == 0
- || (info->same
- && bfd_get_section (*q->sym_ptr_ptr) == info->defsec)))
+ && (symname != NULL
+ ? strcmp (bfd_asymbol_name (*q->sym_ptr_ptr), symname) == 0
+ : (((*q->sym_ptr_ptr)->flags & BSF_SECTION_SYM) != 0
+ && bfd_get_section (*q->sym_ptr_ptr) == info->defsec)))
{
/* We found a reloc for the symbol. The symbol is defined
in OUTSECNAME. This reloc is from a section which is
diff --git a/contrib/binutils/ld/ldctor.c b/contrib/binutils/ld/ldctor.c
index 1c8439b..9e79921 100644
--- a/contrib/binutils/ld/ldctor.c
+++ b/contrib/binutils/ld/ldctor.c
@@ -1,5 +1,5 @@
/* ldctor.c -- constructor support routines
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
By Steve Chamberlain <sac@cygnus.com>
@@ -23,8 +23,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "bfd.h"
#include "sysdep.h"
#include "bfdlink.h"
-
-#include <ctype.h>
+#include "safe-ctype.h"
#include "ld.h"
#include "ldexp.h"
@@ -146,7 +145,7 @@ ctor_prio (name)
return -1;
if (name[1] != 'I' && name[1] != 'D')
return -1;
- if (! isdigit ((unsigned char) name[3]))
+ if (! ISDIGIT (name[3]))
return -1;
return atoi (name + 3);
diff --git a/contrib/binutils/ld/ldemul.c b/contrib/binutils/ld/ldemul.c
index 44c8c3e..6b96204 100644
--- a/contrib/binutils/ld/ldemul.c
+++ b/contrib/binutils/ld/ldemul.c
@@ -169,15 +169,20 @@ ldemul_recognized_file (entry)
}
char *
-ldemul_choose_target ()
+ldemul_choose_target (argc, argv)
+ int argc;
+ char **argv;
{
- return ld_emulation->choose_target ();
+ return ld_emulation->choose_target (argc, argv);
}
+
/* The default choose_target function. */
char *
-ldemul_default_target ()
+ldemul_default_target (argc, argv)
+ int argc ATTRIBUTE_UNUSED;
+ char **argv ATTRIBUTE_UNUSED;
{
char *from_outside = getenv (TARGET_ENVIRON);
if (from_outside != (char *) NULL)
diff --git a/contrib/binutils/ld/ldemul.h b/contrib/binutils/ld/ldemul.h
index 423a9d9..c49961c 100644
--- a/contrib/binutils/ld/ldemul.h
+++ b/contrib/binutils/ld/ldemul.h
@@ -25,7 +25,7 @@ extern void ldemul_after_open PARAMS ((void));
extern void ldemul_after_allocation PARAMS ((void));
extern void ldemul_before_allocation PARAMS ((void));
extern void ldemul_set_output_arch PARAMS ((void));
-extern char *ldemul_choose_target PARAMS ((void));
+extern char *ldemul_choose_target PARAMS ((int, char**));
extern void ldemul_choose_mode PARAMS ((char *));
extern void ldemul_list_emulations PARAMS ((FILE *));
extern void ldemul_list_emulation_options PARAMS ((FILE *));
@@ -43,7 +43,7 @@ extern boolean ldemul_recognized_file
extern boolean ldemul_open_dynamic_archive
PARAMS ((const char *, struct search_dirs *,
struct lang_input_statement_struct *));
-extern char *ldemul_default_target PARAMS ((void));
+extern char *ldemul_default_target PARAMS ((int, char**));
extern void after_parse_default PARAMS ((void));
extern void after_open_default PARAMS ((void));
extern void after_allocation_default PARAMS ((void));
@@ -78,7 +78,7 @@ typedef struct ld_emulation_xfer_struct {
void (*set_output_arch) PARAMS ((void));
/* Decide which target name to use. */
- char * (*choose_target) PARAMS ((void));
+ char * (*choose_target) PARAMS ((int, char**));
/* Run before allocating output sections. */
void (*before_allocation) PARAMS ((void));
diff --git a/contrib/binutils/ld/ldexp.c b/contrib/binutils/ld/ldexp.c
index ca622f6..ec449fd8d 100644
--- a/contrib/binutils/ld/ldexp.c
+++ b/contrib/binutils/ld/ldexp.c
@@ -38,6 +38,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "ldexp.h"
#include "ldgram.h"
#include "ldlang.h"
+#include "libiberty.h"
static void exp_print_token PARAMS ((token_code_type code));
static void make_abs PARAMS ((etree_value_type *ptr));
@@ -67,12 +68,14 @@ static void
exp_print_token (code)
token_code_type code;
{
- static CONST struct {
+ static CONST struct
+ {
token_code_type code;
- char *name;
- } table[] = {
+ char * name;
+ }
+ table[] =
+ {
{ INT, "int" },
- { REL, "relocateable" },
{ NAME, "NAME" },
{ PLUSEQ, "+=" },
{ MINUSEQ, "-=" },
@@ -89,40 +92,45 @@ exp_print_token (code)
{ LE, "<=" },
{ GE, ">=" },
{ LSHIFT, "<<" },
- { RSHIFT, ">>=" },
+ { RSHIFT, ">>" },
{ ALIGN_K, "ALIGN" },
{ BLOCK, "BLOCK" },
+ { QUAD, "QUAD" },
+ { SQUAD, "SQUAD" },
+ { LONG, "LONG" },
+ { SHORT, "SHORT" },
+ { BYTE, "BYTE" },
{ SECTIONS, "SECTIONS" },
{ SIZEOF_HEADERS, "SIZEOF_HEADERS" },
- { NEXT, "NEXT" },
- { SIZEOF, "SIZEOF" },
- { ADDR, "ADDR" },
- { LOADADDR, "LOADADDR" },
{ MEMORY, "MEMORY" },
{ DEFINED, "DEFINED" },
{ TARGET_K, "TARGET" },
{ SEARCH_DIR, "SEARCH_DIR" },
{ MAP, "MAP" },
- { QUAD, "QUAD" },
- { SQUAD, "SQUAD" },
- { LONG, "LONG" },
- { SHORT, "SHORT" },
- { BYTE, "BYTE" },
{ ENTRY, "ENTRY" },
- { 0, (char *) NULL }
+ { NEXT, "NEXT" },
+ { SIZEOF, "SIZEOF" },
+ { ADDR, "ADDR" },
+ { LOADADDR, "LOADADDR" },
+ { MAX_K, "MAX_K" },
+ { REL, "relocateable" },
};
unsigned int idx;
- for (idx = 0; table[idx].name != (char *) NULL; idx++)
+ for (idx = ARRAY_SIZE (table); idx--;)
{
if (table[idx].code == code)
{
- fprintf (config.map_file, "%s", table[idx].name);
+ fprintf (config.map_file, " %s ", table[idx].name);
return;
}
}
- /* Not in table, just print it alone */
- fprintf (config.map_file, "%c", code);
+
+ /* Not in table, just print it alone. */
+ if (code < 127)
+ fprintf (config.map_file, " %c ", code);
+ else
+ fprintf (config.map_file, " <code %d> ", code);
}
static void
@@ -335,6 +343,7 @@ fold_name (tree, current_section, allocation_done, dot)
bfd_vma dot;
{
etree_value_type result;
+
switch (tree->type.node_code)
{
case SIZEOF_HEADERS:
@@ -597,7 +606,7 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp)
case etree_provided:
if (tree->assign.dst[0] == '.' && tree->assign.dst[1] == 0)
{
- /* Assignment to dot can only be done during allocation */
+ /* Assignment to dot can only be done during allocation. */
if (tree->type.node_class != etree_assign)
einfo (_("%F%S can not PROVIDE assignment to location counter\n"));
if (allocation_done == lang_allocating_phase_enum
@@ -622,10 +631,8 @@ exp_fold_tree (tree, current_section, allocation_done, dot, dotp)
+ current_section->bfd_section->vma);
if (nextdot < dot
&& current_section != abs_output_section)
- {
- einfo (_("%F%S cannot move location counter backwards (from %V to %V)\n"),
- dot, nextdot);
- }
+ einfo (_("%F%S cannot move location counter backwards (from %V to %V)\n"),
+ dot, nextdot);
else
*dotp = nextdot;
}
@@ -740,9 +747,8 @@ exp_trinop (code, cond, lhs, rhs)
(lang_output_section_statement_type *) NULL,
lang_first_phase_enum);
if (r.valid_p)
- {
- return exp_intop (r.value);
- }
+ return exp_intop (r.value);
+
new = (etree_type *) stat_alloc (sizeof (new->trinary));
memcpy ((char *) new, (char *) &value, sizeof (new->trinary));
return new;
@@ -762,9 +768,8 @@ exp_unop (code, child)
r = exp_fold_tree_no_dot (&value, abs_output_section,
lang_first_phase_enum);
if (r.valid_p)
- {
- return exp_intop (r.value);
- }
+ return exp_intop (r.value);
+
new = (etree_type *) stat_alloc (sizeof (new->unary));
memcpy ((char *) new, (char *) &value, sizeof (new->unary));
return new;
@@ -785,9 +790,8 @@ exp_nameop (code, name)
(lang_output_section_statement_type *) NULL,
lang_first_phase_enum);
if (r.valid_p)
- {
- return exp_intop (r.value);
- }
+ return exp_intop (r.value);
+
new = (etree_type *) stat_alloc (sizeof (new->name));
memcpy ((char *) new, (char *) &value, sizeof (new->name));
return new;
@@ -810,9 +814,7 @@ exp_assop (code, dst, src)
#if 0
if (exp_fold_tree_no_dot (&value, &result))
- {
- return exp_intop (result);
- }
+ return exp_intop (result);
#endif
new = (etree_type *) stat_alloc (sizeof (new->assign));
memcpy ((char *) new, (char *) &value, sizeof (new->assign));
@@ -857,6 +859,15 @@ void
exp_print_tree (tree)
etree_type *tree;
{
+ if (config.map_file == NULL)
+ config.map_file = stderr;
+
+ if (tree == NULL)
+ {
+ minfo ("NULL TREE\n");
+ return;
+ }
+
switch (tree->type.node_class)
{
case etree_value:
@@ -870,14 +881,10 @@ exp_print_tree (tree)
case etree_assign:
#if 0
if (tree->assign.dst->sdefs != (asymbol *) NULL)
- {
- fprintf (config.map_file, "%s (%x) ", tree->assign.dst->name,
- tree->assign.dst->sdefs->value);
- }
+ fprintf (config.map_file, "%s (%x) ", tree->assign.dst->name,
+ tree->assign.dst->sdefs->value);
else
- {
- fprintf (config.map_file, "%s (UNDEFINED)", tree->assign.dst->name);
- }
+ fprintf (config.map_file, "%s (UNDEFINED)", tree->assign.dst->name);
#endif
fprintf (config.map_file, "%s", tree->assign.dst);
exp_print_token (tree->type.node_code);
@@ -981,12 +988,9 @@ exp_get_abs_int (tree, def, name, allocation_done)
res = exp_fold_tree_no_dot (tree, abs_output_section, allocation_done);
if (res.valid_p)
- {
- res.value += res.section->bfd_section->vma;
- }
+ 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/ldfile.c b/contrib/binutils/ld/ldfile.c
index 0e4d0ec..655ee60 100644
--- a/contrib/binutils/ld/ldfile.c
+++ b/contrib/binutils/ld/ldfile.c
@@ -24,6 +24,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "bfd.h"
#include "sysdep.h"
#include "bfdlink.h"
+#include "safe-ctype.h"
#include "ld.h"
#include "ldmisc.h"
#include "ldexp.h"
@@ -35,8 +36,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "ldemul.h"
#include "libiberty.h"
-#include <ctype.h>
-
const char *ldfile_input_filename;
boolean ldfile_assumed_script = false;
const char *ldfile_output_machine_name = "";
@@ -80,6 +79,9 @@ ldfile_add_library_path (name, cmdline)
{
search_dirs_type *new;
+ if (!cmdline && config.only_cmd_line_lib_dirs)
+ return;
+
new = (search_dirs_type *) xmalloc (sizeof (search_dirs_type));
new->next = NULL;
new->name = name;
@@ -190,7 +192,7 @@ ldfile_open_file_search (arch, entry, lib, suffix)
else if (entry->filename[0] == '/' || entry->filename[0] == '.'
#if defined (__MSDOS__) || defined (_WIN32)
|| entry->filename[0] == '\\'
- || (isalpha (entry->filename[0])
+ || (ISALPHA (entry->filename[0])
&& entry->filename[1] == ':')
#endif
)
@@ -350,7 +352,8 @@ ldfile_open_command_file (name)
ldfile_input_filename = name;
lineno = 1;
- had_script = true;
+
+ saved_script_handle = ldlex_input_stack;
}
#ifdef GNU960
@@ -425,8 +428,7 @@ ldfile_add_arch (in_name)
new->next = (search_arch_type *) NULL;
while (*name)
{
- if (isupper ((unsigned char) *name))
- *name = tolower ((unsigned char) *name);
+ *name = TOLOWER (*name);
name++;
}
*search_arch_tail_ptr = new;
diff --git a/contrib/binutils/ld/ldgram.y b/contrib/binutils/ld/ldgram.y
index e7f4a59..f1924a0 100644
--- a/contrib/binutils/ld/ldgram.y
+++ b/contrib/binutils/ld/ldgram.y
@@ -49,9 +49,8 @@ static enum section_type sectype;
lang_memory_region_type *region;
-struct wildcard_spec current_file;
boolean ldgram_want_filename = true;
-boolean had_script = false;
+FILE * saved_script_handle = NULL;
boolean force_make_executable = false;
boolean ldgram_in_script = false;
@@ -70,6 +69,7 @@ static int error_index;
char *name;
const char *cname;
struct wildcard_spec wildcard;
+ struct wildcard_list *wildcard_list;
struct name_list *name_list;
int token;
union etree_union *etree;
@@ -91,6 +91,7 @@ static int error_index;
%type <etree> opt_exp_without_type
%type <integer> fill_opt
%type <name_list> exclude_name_list
+%type <wildcard_list> file_NAME_list
%type <name> memspec_opt casesymlist
%type <name> memspec_at_opt
%type <cname> wildcard_name
@@ -124,6 +125,7 @@ static int error_index;
%token SECTIONS PHDRS SORT
%token '{' '}'
%token SIZEOF_HEADERS OUTPUT_FORMAT FORCE_COMMON_ALLOCATION OUTPUT_ARCH
+%token INHIBIT_COMMON_ALLOCATION
%token SIZEOF_HEADERS
%token INCLUDE
%token MEMORY DEFSYMEND
@@ -236,7 +238,9 @@ mri_script_command:
| CASE casesymlist
| EXTERN extern_name_list
| INCLUDE filename
- { ldfile_open_command_file ($2); } mri_script_lines END
+ { ldlex_script (); ldfile_open_command_file($2); }
+ mri_script_lines END
+ { ldlex_popstate (); }
| START NAME
{ lang_add_entry ($2, false); }
|
@@ -320,6 +324,8 @@ ifile_p1:
{ ldfile_set_output_arch($3); }
| FORCE_COMMON_ALLOCATION
{ command_line.force_common_definition = true ; }
+ | INHIBIT_COMMON_ALLOCATION
+ { command_line.inhibit_common_definition = true ; }
| INPUT '(' input_list ')'
| GROUP
{ lang_enter_group (); }
@@ -328,7 +334,9 @@ ifile_p1:
| MAP '(' filename ')'
{ lang_add_map($3); }
| INCLUDE filename
- { ldfile_open_command_file($2); } ifile_list END
+ { ldlex_script (); ldfile_open_command_file($2); }
+ ifile_list END
+ { ldlex_popstate (); }
| NOCROSSREFS '(' nocrossref_list ')'
{
lang_add_nocrossref ($3);
@@ -417,8 +425,6 @@ wildcard_spec:
}
;
-
-
exclude_name_list:
exclude_name_list wildcard_name
{
@@ -440,42 +446,42 @@ exclude_name_list:
;
file_NAME_list:
- wildcard_spec
+ file_NAME_list opt_comma wildcard_spec
{
- lang_add_wild ($1.name, $1.sorted,
- current_file.name,
- current_file.sorted,
- ldgram_had_keep, $1.exclude_name_list);
+ struct wildcard_list *tmp;
+ tmp = (struct wildcard_list *) xmalloc (sizeof *tmp);
+ tmp->next = $1;
+ tmp->spec = $3;
+ $$ = tmp;
}
- | file_NAME_list opt_comma wildcard_spec
+ |
+ wildcard_spec
{
- lang_add_wild ($3.name, $3.sorted,
- current_file.name,
- current_file.sorted,
- ldgram_had_keep, $3.exclude_name_list);
+ struct wildcard_list *tmp;
+ tmp = (struct wildcard_list *) xmalloc (sizeof *tmp);
+ tmp->next = NULL;
+ tmp->spec = $1;
+ $$ = tmp;
}
;
input_section_spec_no_keep:
NAME
{
- lang_add_wild (NULL, false, $1, false,
- ldgram_had_keep, NULL);
+ struct wildcard_spec tmp;
+ tmp.name = $1;
+ tmp.exclude_name_list = NULL;
+ tmp.sorted = false;
+ lang_add_wild (&tmp, NULL, ldgram_had_keep);
}
- | '['
+ | '[' file_NAME_list ']'
{
- current_file.name = NULL;
- current_file.sorted = false;
+ lang_add_wild (NULL, $2, ldgram_had_keep);
}
- file_NAME_list ']'
- | wildcard_spec
+ | wildcard_spec '(' file_NAME_list ')'
{
- current_file = $1;
- /* '*' matches any file name. */
- if (strcmp (current_file.name, "*") == 0)
- current_file.name = NULL;
+ lang_add_wild (&$1, $3, ldgram_had_keep);
}
- '(' file_NAME_list ')'
;
input_section_spec:
@@ -1055,7 +1061,11 @@ vers_nodes:
;
vers_node:
- VERS_TAG '{' vers_tag '}' ';'
+ '{' vers_tag '}' ';'
+ {
+ lang_register_vers_node (NULL, $2, NULL);
+ }
+ | VERS_TAG '{' vers_tag '}' ';'
{
lang_register_vers_node ($1, $3, NULL);
}
diff --git a/contrib/binutils/ld/ldint.texinfo b/contrib/binutils/ld/ldint.texinfo
index 37efae3..489750a 100644
--- a/contrib/binutils/ld/ldint.texinfo
+++ b/contrib/binutils/ld/ldint.texinfo
@@ -84,6 +84,7 @@ section entitled "GNU Free Documentation License".
* README:: The README File
* Emulations:: How linker emulations are generated
* Emulation Walkthrough:: A Walkthrough of a Typical Emulation
+* Architecture Specific:: Some Architecture Specific Notes
* GNU Free Documentation License:: GNU Free Documentation License
@end menu
@@ -238,7 +239,7 @@ If @code{SCRIPT_NAME} is set to @var{script}, @code{genscripts.sh} will
invoke @file{scripttempl/@var{script}.sc}.
The @file{genscripts.sh} script will invoke the @file{scripttempl}
-script 5 or 6 times. Each time it will set the shell variable
+script 5 to 8 times. Each time it will set the shell variable
@code{LD_FLAG} to a different value. When the linker is run, the
options used will direct it to select a particular script. (Script
selection is controlled by the @code{get_script} emulation entry point;
@@ -277,6 +278,22 @@ this value if @code{GENERATE_SHLIB_SCRIPT} is defined in the
this script at the appropriate time, normally when the linker is invoked
with the @code{-shared} option. The output has an extension of
@file{.xs}.
+@item c
+The @file{scripttempl} script is only invoked with @code{LD_FLAG} set to
+this value if @code{GENERATE_COMBRELOC_SCRIPT} is defined in the
+@file{emulparams} file or if @code{SCRIPT_NAME} is @code{elf}. The
+@file{emultempl} script must arrange to use this script at the appropriate
+time, normally when the linker is invoked with the @code{-z combreloc}
+option. The output has an extension of
+@file{.xc}.
+@item cshared
+The @file{scripttempl} script is only invoked with @code{LD_FLAG} set to
+this value if @code{GENERATE_COMBRELOC_SCRIPT} is defined in the
+@file{emulparams} file or if @code{SCRIPT_NAME} is @code{elf} and
+@code{GENERATE_SHLIB_SCRIPT} is defined in the @file{emulparms} file.
+The @file{emultempl} script must arrange to use this script at the
+appropriate time, normally when the linker is invoked with the @code{-shared
+-z combreloc} option. The output has an extension of @file{.xsc}.
@end table
Besides the shell variables set by the @file{emulparams} script, and the
@@ -300,6 +317,10 @@ page aligned, or to @samp{.} when generating the @code{-N} script.
@item CREATE_SHLIB
This will be set to a non-empty string when generating a @code{-shared}
script.
+
+@item COMBRELOC
+This will be set to a non-empty string when generating @code{-z combreloc}
+scripts to a temporary file name which can be used during script generation.
@end table
The conventional way to write a @file{scripttempl} script is to first
@@ -571,6 +592,105 @@ In summary,
@end itemize
+@node Architecture Specific
+@chapter Some Architecture Specific Notes
+
+This is the place for notes on the behavior of @code{ld} on
+specific platforms. Currently, only Intel x86 is documented (and
+of that, only the auto-import behavior for DLLs).
+
+@menu
+* ix86:: Intel x86
+@end menu
+
+@node ix86
+@section Intel x86
+
+@table @emph
+@code{ld} can create DLLs that operate with various runtimes available
+on a common x86 operating system. These runtimes include native (using
+the mingw "platform"), cygwin, and pw.
+
+@item auto-import from DLLs
+@enumerate
+@item
+With this feature on, DLL clients can import variables from DLL
+without any concern from their side (for example, without any source
+code modifications). Auto-import can be enabled using the
+@code{--enable-auto-import} flag, or disabled via the
+@code{--disable-auto-import} flag. Auto-import is disabled by default.
+
+@item
+This is done completely in bounds of the PE specification (to be fair,
+there's a minor violation of the spec at one point, but in practice
+auto-import works on all known variants of that common x86 operating
+system) So, the resulting DLL can be used with any other PE
+compiler/linker.
+
+@item
+Auto-import is fully compatible with standard import method, in which
+variables are decorated using attribute modifiers. Libraries of either
+type may be mixed together.
+
+@item
+Overhead (space): 8 bytes per imported symbol, plus 20 for each
+reference to it; Overhead (load time): negligible; Overhead
+(virtual/physical memory): should be less than effect of DLL
+relocation.
+@end enumerate
+
+Motivation
+
+The obvious and only way to get rid of dllimport insanity is
+to make client access variable directly in the DLL, bypassing
+the extra dereference imposed by ordinary DLL runtime linking.
+I.e., whenever client contains someting like
+
+@code{mov dll_var,%eax,}
+
+address of dll_var in the command should be relocated to point
+into loaded DLL. The aim is to make OS loader do so, and than
+make ld help with that. Import section of PE made following
+way: there's a vector of structures each describing imports
+from particular DLL. Each such structure points to two other
+parellel vectors: one holding imported names, and one which
+will hold address of corresponding imported name. So, the
+solution is de-vectorize these structures, making import
+locations be sparse and pointing directly into code.
+
+Implementation
+
+For each reference of data symbol to be imported from DLL (to
+set of which belong symbols with name <sym>, if __imp_<sym> is
+found in implib), the import fixup entry is generated. That
+entry is of type IMAGE_IMPORT_DESCRIPTOR and stored in .idata$3
+subsection. Each fixup entry contains pointer to symbol's address
+within .text section (marked with __fuN_<sym> symbol, where N is
+integer), pointer to DLL name (so, DLL name is referenced by
+multiple entries), and pointer to symbol name thunk. Symbol name
+thunk is singleton vector (__nm_th_<symbol>) pointing to
+IMAGE_IMPORT_BY_NAME structure (__nm_<symbol>) directly containing
+imported name. Here comes that "om the edge" problem mentioned above:
+PE specification rambles that name vector (OriginalFirstThunk) should
+run in parallel with addresses vector (FirstThunk), i.e. that they
+should have same number of elements and terminated with zero. We violate
+this, since FirstThunk points directly into machine code. But in
+practice, OS loader implemented the sane way: it goes thru
+OriginalFirstThunk and puts addresses to FirstThunk, not something
+else. It once again should be noted that dll and symbol name
+structures are reused across fixup entries and should be there
+anyway to support standard import stuff, so sustained overhead is
+20 bytes per reference. Other question is whether having several
+IMAGE_IMPORT_DESCRIPTORS for the same DLL is possible. Answer is yes,
+it is done even by native compiler/linker (libth32's functions are in
+fact resident in windows9x kernel32.dll, so if you use it, you have
+two IMAGE_IMPORT_DESCRIPTORS for kernel32.dll). Yet other question is
+whether referencing the same PE structures several times is valid.
+The answer is why not, prohibiting that (detecting violation) would
+require more work on behalf of loader than not doing it.
+
+@end table
+
@node GNU Free Documentation License
@chapter GNU Free Documentation License
diff --git a/contrib/binutils/ld/ldlang.c b/contrib/binutils/ld/ldlang.c
index 924e3ec..a7b53dd 100644
--- a/contrib/binutils/ld/ldlang.c
+++ b/contrib/binutils/ld/ldlang.c
@@ -1,6 +1,6 @@
/* Linker command language support.
Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
- 2001
+ 2001, 2002
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -23,6 +23,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "bfd.h"
#include "sysdep.h"
#include "libiberty.h"
+#include "safe-ctype.h"
#include "obstack.h"
#include "bfdlink.h"
@@ -39,8 +40,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "fnmatch.h"
#include "demangle.h"
-#include <ctype.h>
-
/* FORWARDS */
static lang_statement_union_type *new_statement
PARAMS ((enum statement_enum, size_t, lang_statement_list_type *));
@@ -78,16 +77,16 @@ static void already_linked_table_init PARAMS ((void));
static void already_linked_table_free PARAMS ((void));
static boolean wildcardp PARAMS ((const char *));
static lang_statement_union_type *wild_sort
- PARAMS ((lang_wild_statement_type *, lang_input_statement_type *,
- asection *));
+ PARAMS ((lang_wild_statement_type *, struct wildcard_list *,
+ lang_input_statement_type *, asection *));
static void output_section_callback
- PARAMS ((lang_wild_statement_type *, asection *,
+ PARAMS ((lang_wild_statement_type *, struct wildcard_list *, asection *,
lang_input_statement_type *, PTR));
static lang_input_statement_type *lookup_name PARAMS ((const char *));
-static void load_symbols
+static boolean load_symbols
PARAMS ((lang_input_statement_type *, lang_statement_list_type *));
static void wild
- PARAMS ((lang_wild_statement_type *, const char *, const char *,
+ PARAMS ((lang_wild_statement_type *,
const char *, lang_output_section_statement_type *));
static bfd *open_output PARAMS ((const char *));
static void ldlang_open_output PARAMS ((lang_statement_union_type *));
@@ -119,12 +118,12 @@ static void print_statement
static void print_statement_list
PARAMS ((lang_statement_union_type *, lang_output_section_statement_type *));
static void print_statements PARAMS ((void));
-static bfd_vma insert_pad
+static void insert_pad
PARAMS ((lang_statement_union_type **, fill_type,
unsigned int, asection *, bfd_vma));
static bfd_vma size_input_section
PARAMS ((lang_statement_union_type **, lang_output_section_statement_type *,
- fill_type, bfd_vma, boolean));
+ fill_type, bfd_vma));
static void lang_finish PARAMS ((void));
static void ignore_bfd_errors PARAMS ((const char *, ...));
static void lang_check PARAMS ((void));
@@ -135,11 +134,10 @@ static int topower PARAMS ((int));
static void lang_set_startof PARAMS ((void));
static void reset_memory_regions PARAMS ((void));
static void gc_section_callback
- PARAMS ((lang_wild_statement_type *, asection *,
+ PARAMS ((lang_wild_statement_type *, struct wildcard_list *, asection *,
lang_input_statement_type *, PTR));
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_wild PARAMS ((lang_wild_statement_type *));
static void lang_gc_sections_1 PARAMS ((lang_statement_union_type *));
static void lang_gc_sections PARAMS ((void));
static int lang_vers_match_lang_c
@@ -155,17 +153,18 @@ static void os_region_check
struct memory_region_struct *, etree_type *, bfd_vma));
typedef void (*callback_t) PARAMS ((lang_wild_statement_type *,
- asection *, lang_input_statement_type *,
+ struct wildcard_list *,
+ asection *,
+ lang_input_statement_type *,
PTR));
static void walk_wild
- PARAMS ((lang_wild_statement_type *, const char *, const char *,
- callback_t, PTR));
+ PARAMS ((lang_wild_statement_type *, callback_t, PTR));
static void walk_wild_section
- PARAMS ((lang_wild_statement_type *, const char *,
- lang_input_statement_type *, callback_t, PTR));
+ PARAMS ((lang_wild_statement_type *, lang_input_statement_type *,
+ callback_t, PTR));
static void walk_wild_file
- PARAMS ((lang_wild_statement_type *, const char *,
- lang_input_statement_type *, callback_t, PTR));
+ PARAMS ((lang_wild_statement_type *, lang_input_statement_type *,
+ callback_t, PTR));
static int get_target PARAMS ((const bfd_target *, PTR));
static void stricpy PARAMS ((char *, char *));
@@ -236,57 +235,74 @@ unique_section_p (secnam)
/* Generic traversal routines for finding matching sections. */
static void
-walk_wild_section (ptr, section, file, callback, data)
+walk_wild_section (ptr, file, callback, data)
lang_wild_statement_type *ptr;
- const char *section;
lang_input_statement_type *file;
callback_t callback;
PTR 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;
- else
- match = strcmp (list_tmp->name, file->filename) == 0;
+ asection *s;
- if (match)
- return;
- }
- }
+ if (file->just_syms_flag)
+ return;
- if (file->just_syms_flag == false)
+ for (s = file->the_bfd->sections; s != NULL; s = s->next)
{
- register asection *s;
- boolean wildcard = false;
+ struct wildcard_list *sec;
- if (section != NULL)
- wildcard = wildcardp (section);
+ sec = ptr->section_list;
+ if (sec == NULL)
+ (*callback) (ptr, sec, s, file, data);
- for (s = file->the_bfd->sections; s != NULL; s = s->next)
+ while (sec != NULL)
{
- boolean match;
- const char *sname = bfd_get_section_name (file->the_bfd, s);
+ boolean skip = false;
+ struct name_list *list_tmp;
+
+ /* Don't process sections from files which were
+ excluded. */
+ for (list_tmp = sec->spec.exclude_name_list;
+ list_tmp;
+ list_tmp = list_tmp->next)
+ {
+ if (wildcardp (list_tmp->name))
+ skip = fnmatch (list_tmp->name, file->filename, 0) == 0;
+ else
+ skip = strcmp (list_tmp->name, file->filename) == 0;
- if (section == NULL)
- match = true;
- else if (wildcard)
- match = fnmatch (section, sname, 0) == 0;
- else
- match = strcmp (section, sname) == 0;
+ /* If this file is part of an archive, and the archive is
+ excluded, exclude this file. */
+ if (! skip && file->the_bfd != NULL
+ && file->the_bfd->my_archive != NULL
+ && file->the_bfd->my_archive->filename != NULL)
+ {
+ if (wildcardp (list_tmp->name))
+ skip = fnmatch (list_tmp->name,
+ file->the_bfd->my_archive->filename,
+ 0) == 0;
+ else
+ skip = strcmp (list_tmp->name,
+ file->the_bfd->my_archive->filename) == 0;
+ }
+
+ if (skip)
+ break;
+ }
+
+ if (!skip && sec->spec.name != NULL)
+ {
+ const char *sname = bfd_get_section_name (file->the_bfd, s);
- /* If this is a wild-card output section statement, exclude
- sections that match UNIQUE_SECTION_LIST. */
- if (match && (data == NULL || !unique_section_p (sname)))
- (*callback) (ptr, s, file, data);
+ if (wildcardp (sec->spec.name))
+ skip = fnmatch (sec->spec.name, sname, 0) != 0;
+ else
+ skip = strcmp (sec->spec.name, sname) != 0;
+ }
+
+ if (!skip)
+ (*callback) (ptr, sec, s, file, data);
+
+ sec = sec->next;
}
}
}
@@ -294,16 +310,15 @@ walk_wild_section (ptr, section, file, callback, data)
/* Handle a wild statement for a single file F. */
static void
-walk_wild_file (s, section, f, callback, data)
+walk_wild_file (s, f, callback, data)
lang_wild_statement_type *s;
- const char *section;
lang_input_statement_type *f;
callback_t callback;
PTR data;
{
if (f->the_bfd == NULL
|| ! bfd_check_format (f->the_bfd, bfd_archive))
- walk_wild_section (s, section, f, callback, data);
+ walk_wild_section (s, f, callback, data);
else
{
bfd *member;
@@ -320,7 +335,7 @@ walk_wild_file (s, section, f, callback, data)
lang_input_statement. */
if (member->usrdata != NULL)
{
- walk_wild_section (s, section,
+ walk_wild_section (s,
(lang_input_statement_type *) member->usrdata,
callback, data);
}
@@ -331,27 +346,27 @@ walk_wild_file (s, section, f, callback, data)
}
static void
-walk_wild (s, section, file, callback, data)
+walk_wild (s, callback, data)
lang_wild_statement_type *s;
- const char *section;
- const char *file;
callback_t callback;
PTR data;
{
- if (file == (char *) NULL)
+ const char *file_spec = s->filename;
+
+ if (file_spec == NULL)
{
/* Perform the iteration over all files in the list. */
LANG_FOR_EACH_INPUT_STATEMENT (f)
{
- walk_wild_file (s, section, f, callback, data);
+ walk_wild_file (s, f, callback, data);
}
}
- else if (wildcardp (file))
+ else if (wildcardp (file_spec))
{
LANG_FOR_EACH_INPUT_STATEMENT (f)
{
- if (fnmatch (file, f->filename, FNM_FILE_NAME) == 0)
- walk_wild_file (s, section, f, callback, data);
+ if (fnmatch (file_spec, f->filename, FNM_FILE_NAME) == 0)
+ walk_wild_file (s, f, callback, data);
}
}
else
@@ -359,8 +374,9 @@ walk_wild (s, section, file, callback, data)
lang_input_statement_type *f;
/* Perform the iteration over a single file. */
- f = lookup_name (file);
- walk_wild_file (s, section, f, callback, data);
+ f = lookup_name (file_spec);
+ if (f)
+ walk_wild_file (s, f, callback, data);
}
}
@@ -372,7 +388,7 @@ lang_for_each_statement_worker (func, s)
void (*func) PARAMS ((lang_statement_union_type *));
lang_statement_union_type *s;
{
- for (; s != (lang_statement_union_type *) NULL; s = s->next)
+ for (; s != (lang_statement_union_type *) NULL; s = s->header.next)
{
func (s);
@@ -813,7 +829,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\n"), DISCARD_SECTION_NAME);
new = ((section_userdata_type *)
stat_alloc (sizeof (section_userdata_type)));
@@ -1007,13 +1023,10 @@ section_already_linked (abfd, sec, data)
break;
}
- /* Set the output_section field so that wild_doit does not
- 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. */
+ /* Set the output_section field so that lang_add_section
+ does not create a lang_input_section structure for this
+ section. */
sec->output_section = bfd_abs_section_ptr;
- sec->kept_section = l->sec;
return;
}
@@ -1071,7 +1084,7 @@ already_linked_table_free ()
/* Return true if the PATTERN argument is a wildcard pattern.
Although backslashes are treated specially if a pattern contains
wildcards, we do not consider the mere presence of a backslash to
- be enough to cause the the pattern to be treated as a wildcard.
+ be enough to cause the pattern to be treated as a wildcard.
That lets us handle DOS filenames more naturally. */
static boolean
@@ -1093,7 +1106,7 @@ wildcardp (pattern)
input file which holds SECTION. */
void
-wild_doit (ptr, section, output, file)
+lang_add_section (ptr, section, output, file)
lang_statement_list_type *ptr;
asection *section;
lang_output_section_statement_type *output;
@@ -1178,8 +1191,22 @@ wild_doit (ptr, section, output, file)
if (! first && (section->output_section->flags & SEC_READONLY) == 0)
flags &= ~ SEC_READONLY;
+ /* Keep SEC_MERGE and SEC_STRINGS only if they are the same. */
+ if (! first
+ && ((section->output_section->flags & (SEC_MERGE | SEC_STRINGS))
+ != (flags & (SEC_MERGE | SEC_STRINGS))
+ || ((flags & SEC_MERGE)
+ && section->output_section->entsize != section->entsize)))
+ {
+ section->output_section->flags &= ~ (SEC_MERGE | SEC_STRINGS);
+ flags &= ~ (SEC_MERGE | SEC_STRINGS);
+ }
+
section->output_section->flags |= flags;
+ if (flags & SEC_MERGE)
+ section->output_section->entsize = section->entsize;
+
/* If SEC_READONLY is not set in the input section, then clear
it from the output section. */
if ((section->flags & SEC_READONLY) == 0)
@@ -1227,19 +1254,20 @@ wild_doit (ptr, section, output, file)
new section should just go at the end of the current list. */
static lang_statement_union_type *
-wild_sort (wild, file, section)
+wild_sort (wild, sec, file, section)
lang_wild_statement_type *wild;
+ struct wildcard_list *sec;
lang_input_statement_type *file;
asection *section;
{
const char *section_name;
lang_statement_union_type *l;
- if (! wild->filenames_sorted && ! wild->sections_sorted)
+ if (!wild->filenames_sorted && (sec == NULL || !sec->spec.sorted))
return NULL;
section_name = bfd_get_section_name (file->the_bfd, section);
- for (l = wild->children.head; l != NULL; l = l->next)
+ for (l = wild->children.head; l != NULL; l = l->header.next)
{
lang_input_section_type *ls;
@@ -1309,7 +1337,7 @@ wild_sort (wild, file, section)
/* Here either the files are not sorted by name, or we are
looking at the sections for this file. */
- if (wild->sections_sorted)
+ if (sec != NULL && sec->spec.sorted)
{
if (strcmp (section_name,
bfd_get_section_name (ls->ifile->the_bfd,
@@ -1326,20 +1354,25 @@ wild_sort (wild, file, section)
NULL, in which case it is a wild card. */
static void
-output_section_callback (ptr, section, file, output)
+output_section_callback (ptr, sec, section, file, output)
lang_wild_statement_type *ptr;
+ struct wildcard_list *sec;
asection *section;
lang_input_statement_type *file;
PTR output;
{
lang_statement_union_type *before;
+ /* Exclude sections that match UNIQUE_SECTION_LIST. */
+ if (unique_section_p (bfd_get_section_name (file->the_bfd, section)))
+ return;
+
/* 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);
+ before = wild_sort (ptr, sec, file, section);
/* Here BEFORE points to the lang_input_section which
should follow the one we are about to add. If BEFORE
@@ -1347,31 +1380,31 @@ output_section_callback (ptr, section, file, output)
of the current list. */
if (before == NULL)
- wild_doit (&ptr->children, section,
- (lang_output_section_statement_type *) output,
- file);
+ lang_add_section (&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);
+ lang_add_section (&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);
+ ASSERT (list.head->header.next == NULL);
for (pp = &ptr->children.head;
*pp != before;
- pp = &(*pp)->next)
+ pp = &(*pp)->header.next)
ASSERT (*pp != NULL);
- list.head->next = *pp;
+ list.head->header.next = *pp;
*pp = list.head;
}
}
@@ -1411,14 +1444,15 @@ lookup_name (name)
|| search->filename == (const char *) NULL)
return search;
- load_symbols (search, (lang_statement_list_type *) NULL);
+ if (! load_symbols (search, (lang_statement_list_type *) NULL))
+ return NULL;
return search;
}
/* Get the symbols for an input file. */
-static void
+static boolean
load_symbols (entry, place)
lang_input_statement_type *entry;
lang_statement_list_type *place;
@@ -1426,7 +1460,7 @@ load_symbols (entry, place)
char **matching;
if (entry->loaded)
- return;
+ return true;
ldfile_open_file (entry);
@@ -1435,12 +1469,13 @@ load_symbols (entry, place)
{
bfd_error_type err;
lang_statement_list_type *hold;
-
+ boolean bad_load = true;
+
err = bfd_get_error ();
/* See if the emulation has some special knowledge. */
if (ldemul_unrecognized_file (entry))
- return;
+ return true;
if (err == bfd_error_file_ambiguously_recognized)
{
@@ -1454,8 +1489,10 @@ load_symbols (entry, place)
}
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);
+ else
+ bad_load = false;
+
bfd_close (entry->the_bfd);
entry->the_bfd = NULL;
@@ -1472,11 +1509,11 @@ load_symbols (entry, place)
stat_ptr = hold;
- return;
+ return ! bad_load;
}
if (ldemul_recognized_file (entry))
- return;
+ return true;
/* We don't call ldlang_add_file for an archive. Instead, the
add_symbols entry point will call ldlang_add_file, via the
@@ -1496,56 +1533,74 @@ load_symbols (entry, place)
case bfd_archive:
if (entry->whole_archive)
{
- bfd *member = bfd_openr_next_archived_file (entry->the_bfd,
- (bfd *) NULL);
- while (member != NULL)
+ bfd * member = NULL;
+ boolean loaded = true;
+
+ for (;;)
{
+ member = bfd_openr_next_archived_file (entry->the_bfd, member);
+
+ if (member == NULL)
+ break;
+
if (! bfd_check_format (member, bfd_object))
- einfo (_("%F%B: object %B in archive is not object\n"),
- entry->the_bfd, member);
+ {
+ einfo (_("%F%B: member %B in archive is not an object\n"),
+ entry->the_bfd, member);
+ loaded = false;
+ }
+
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);
- member = bfd_openr_next_archived_file (entry->the_bfd,
- member);
+ {
+ einfo (_("%F%B: could not read symbols: %E\n"), member);
+ loaded = false;
+ }
}
- entry->loaded = true;
-
- return;
+ entry->loaded = loaded;
+ return loaded;
}
+ break;
}
- if (! bfd_link_add_symbols (entry->the_bfd, &link_info))
+ if (bfd_link_add_symbols (entry->the_bfd, &link_info))
+ entry->loaded = true;
+ else
einfo (_("%F%B: could not read symbols: %E\n"), entry->the_bfd);
- entry->loaded = true;
+ return entry->loaded;
}
-/* Handle a wild statement. SECTION or FILE or both may be NULL,
- indicating that it is a wildcard. Separate lang_input_section
- statements are created for each part of the expansion; they are
- added after the wild statement S. OUTPUT is the output section. */
+/* Handle a wild statement. S->FILENAME or S->SECTION_LIST or both
+ may be NULL, indicating that it is a wildcard. Separate
+ lang_input_section statements are created for each part of the
+ expansion; they are added after the wild statement S. OUTPUT is
+ the output section. */
static void
-wild (s, section, file, target, output)
+wild (s, target, output)
lang_wild_statement_type *s;
- const char *section;
- const char *file;
const char *target ATTRIBUTE_UNUSED;
lang_output_section_statement_type *output;
{
- walk_wild (s, section, file, output_section_callback, (PTR) output);
+ struct wildcard_list *sec;
- if (section != (char *) NULL
- && strcmp (section, "COMMON") == 0
- && default_common_section == NULL)
+ walk_wild (s, output_section_callback, (PTR) output);
+
+ for (sec = s->section_list; sec != NULL; sec = sec->next)
{
- /* 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;
+ if (default_common_section != NULL)
+ break;
+ if (sec->spec.name != NULL && strcmp (sec->spec.name, "COMMON") == 0)
+ {
+ /* 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;
+ }
}
}
@@ -1571,12 +1626,7 @@ stricpy (dest, src)
char c;
while ((c = *src++) != 0)
- {
- if (isupper ((unsigned char) c))
- c = tolower (c);
-
- *dest++ = c;
- }
+ *dest++ = TOLOWER (c);
*dest = 0;
}
@@ -1859,7 +1909,7 @@ open_input_bfds (s, force)
lang_statement_union_type *s;
boolean force;
{
- for (; s != (lang_statement_union_type *) NULL; s = s->next)
+ for (; s != (lang_statement_union_type *) NULL; s = s->header.next)
{
switch (s->header.type)
{
@@ -1915,12 +1965,13 @@ open_input_bfds (s, force)
lang_list_init (&add);
- load_symbols (&s->input_statement, &add);
+ if (! load_symbols (&s->input_statement, &add))
+ config.make_executable = false;
if (add.head != NULL)
{
- *add.tail = s->next;
- s->next = add.head;
+ *add.tail = s->header.next;
+ s->header.next = add.head;
}
}
break;
@@ -2014,16 +2065,12 @@ map_input_to_output_sections (s, target, output_section_statement)
const char *target;
lang_output_section_statement_type *output_section_statement;
{
- for (; s != (lang_statement_union_type *) NULL; s = s->next)
+ for (; s != (lang_statement_union_type *) NULL; s = s->header.next)
{
switch (s->header.type)
{
-
case lang_wild_statement_enum:
- wild (&s->wild_statement, s->wild_statement.section_name,
- s->wild_statement.filename, target,
- output_section_statement);
-
+ wild (&s->wild_statement, target, output_section_statement);
break;
case lang_constructors_statement_enum:
map_input_to_output_sections (constructor_list.head,
@@ -2407,18 +2454,12 @@ print_wild_statement (w, os)
lang_wild_statement_type *w;
lang_output_section_statement_type *os;
{
+ struct wildcard_list *sec;
+
print_space ();
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
@@ -2427,14 +2468,25 @@ print_wild_statement (w, os)
minfo (")");
minfo ("(");
- if (w->sections_sorted)
- minfo ("SORT(");
- if (w->section_name != NULL)
- minfo ("%s", w->section_name);
- else
- minfo ("*");
- if (w->sections_sorted)
- minfo (")");
+ for (sec = w->section_list; sec; sec = sec->next)
+ {
+ if (sec->spec.sorted)
+ minfo ("SORT(");
+ if (sec->spec.exclude_name_list != NULL)
+ {
+ name_list *tmp;
+ minfo ("EXCLUDE_FILE ( %s", sec->spec.exclude_name_list->name);
+ for (tmp = sec->spec.exclude_name_list->next; tmp; tmp = tmp->next)
+ minfo (", %s", tmp->name);
+ minfo (")");
+ }
+ if (sec->spec.name != NULL)
+ minfo ("%s", sec->spec.name);
+ else
+ minfo ("*");
+ if (sec->spec.sorted)
+ minfo (")");
+ }
minfo (")");
print_nl ();
@@ -2465,7 +2517,7 @@ print_statement_list (s, os)
while (s != NULL)
{
print_statement (s, os);
- s = s->next;
+ s = s->header.next;
}
}
@@ -2571,94 +2623,97 @@ dprint_statement (s, n)
while (s && --n >= 0)
{
print_statement (s, abs_output_section);
- s = s->next;
+ s = s->header.next;
}
}
config.map_file = map_save;
}
-static bfd_vma
-insert_pad (this_ptr, fill, power, output_section_statement, dot)
- lang_statement_union_type **this_ptr;
+static void
+insert_pad (ptr, fill, alignment_needed, output_section, dot)
+ lang_statement_union_type **ptr;
fill_type fill;
- unsigned int power;
- asection *output_section_statement;
+ unsigned int alignment_needed;
+ asection *output_section;
bfd_vma dot;
{
- /* Align this section first to the
- input sections requirement, then
- to the output section's requirement.
- If this alignment is > than any seen before,
- then record it too. Perform the alignment by
- 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;
+ lang_statement_union_type *pad;
- if (alignment_needed != 0)
+ pad = ((lang_statement_union_type *)
+ ((char *) ptr - offsetof (lang_statement_union_type, header.next)));
+ if (ptr != &statement_list.head
+ && pad->header.type == lang_padding_statement_enum
+ && pad->padding_statement.output_section == output_section)
{
- lang_statement_union_type *new =
- ((lang_statement_union_type *)
- stat_alloc (sizeof (lang_padding_statement_type)));
-
- /* Link into existing chain. */
- new->header.next = *this_ptr;
- *this_ptr = new;
- new->header.type = lang_padding_statement_enum;
- new->padding_statement.output_section = output_section_statement;
- new->padding_statement.output_offset =
- dot - output_section_statement->vma;
- new->padding_statement.fill = fill;
- new->padding_statement.size = alignment_needed * opb;
+ /* Use the existing pad statement. The above test on output
+ section is probably redundant, but it doesn't hurt to check. */
}
-
- /* Remember the most restrictive alignment. */
- if (power > output_section_statement->alignment_power)
+ else
{
- output_section_statement->alignment_power = power;
+ /* Make a new padding statement, linked into existing chain. */
+ pad = ((lang_statement_union_type *)
+ stat_alloc (sizeof (lang_padding_statement_type)));
+ pad->header.next = *ptr;
+ *ptr = pad;
+ pad->header.type = lang_padding_statement_enum;
+ pad->padding_statement.output_section = output_section;
+ pad->padding_statement.fill = fill;
}
- output_section_statement->_raw_size += alignment_needed * opb;
-
- return dot + alignment_needed;
+ pad->padding_statement.output_offset = dot - output_section->vma;
+ pad->padding_statement.size = alignment_needed;
+ output_section->_raw_size += alignment_needed;
}
/* Work out how much this section will move the dot point. */
static bfd_vma
-size_input_section (this_ptr, output_section_statement, fill, dot, relax)
+size_input_section (this_ptr, output_section_statement, fill, dot)
lang_statement_union_type **this_ptr;
lang_output_section_statement_type *output_section_statement;
fill_type fill;
bfd_vma dot;
- 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)
{
+ unsigned opb = bfd_arch_mach_octets_per_byte (ldfile_output_architecture,
+ ldfile_output_machine);
+ unsigned int alignment_needed;
+ asection *o;
+
+ /* Align this section first to the input sections requirement,
+ then to the output section's requirement. If this alignment
+ is greater than any seen before, then record it too. Perform
+ the alignment by inserting a magic 'padding' statement. */
+
if (output_section_statement->subsection_alignment != -1)
- i->alignment_power =
- output_section_statement->subsection_alignment;
+ i->alignment_power = output_section_statement->subsection_alignment;
+
+ o = output_section_statement->bfd_section;
+ if (o->alignment_power < i->alignment_power)
+ o->alignment_power = i->alignment_power;
- dot = insert_pad (this_ptr, fill, i->alignment_power,
- output_section_statement->bfd_section, dot);
+ alignment_needed = align_power (dot, i->alignment_power) - dot;
+
+ if (alignment_needed != 0)
+ {
+ insert_pad (this_ptr, fill, alignment_needed * opb, o, dot);
+ dot += alignment_needed;
+ }
/* Remember where in the output section this input section goes. */
- i->output_offset = dot - output_section_statement->bfd_section->vma;
+ i->output_offset = dot - o->vma;
/* Mark how big the output section must be to contain this now. */
if (i->_cooked_size != 0)
dot += i->_cooked_size / opb;
else
dot += i->_raw_size / opb;
- output_section_statement->bfd_section->_raw_size =
- (dot - output_section_statement->bfd_section->vma) * opb;
+ o->_raw_size = (dot - o->vma) * opb;
}
else
{
@@ -2729,11 +2784,6 @@ _("%X%P: section %s [%V -> %V] overlaps section %s [%V -> %V]\n"),
}
}
-/* 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
@@ -2780,13 +2830,13 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
lang_statement_union_type **prev;
fill_type fill;
bfd_vma dot;
- boolean relax;
+ boolean *relax;
{
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)
+ for (; s != (lang_statement_union_type *) NULL; s = s->header.next)
{
switch (s->header.type)
{
@@ -2809,7 +2859,7 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
asection *input;
if (os->children.head == NULL
- || os->children.head->next != NULL
+ || os->children.head->header.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);
@@ -2899,9 +2949,8 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
os->bfd_section->output_offset = 0;
}
- (void) lang_size_sections (os->children.head, os,
- &os->children.head,
- os->fill, dot, relax);
+ 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. */
@@ -2972,8 +3021,7 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
dot = lang_size_sections (constructor_list.head,
output_section_statement,
&s->wild_statement.children.head,
- fill,
- dot, relax);
+ fill, dot, relax);
break;
case lang_data_statement_enum:
@@ -3065,12 +3113,10 @@ lang_size_sections (s, output_section_statement, prev, 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;
+ *relax = 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);
}
break;
case lang_input_statement_enum:
@@ -3093,31 +3139,22 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
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)
+ 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) * opb;
- output_section_statement->bfd_section->_raw_size +=
- new->padding_statement.size;
+ /* Insert a pad after this statement. We can't
+ put the pad before when relaxing, in case the
+ assignment references dot. */
+ insert_pad (&s->header.next, fill, (newdot - dot) * opb,
+ output_section_statement->bfd_section, dot);
+
+ /* Don't neuter the pad below when relaxing. */
+ s = s->header.next;
}
dot = newdot;
@@ -3126,16 +3163,20 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
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;
+ /* If this is the first time lang_size_sections is called,
+ we won't have any padding statements. If this is the
+ second or later passes when relaxing, we should allow
+ padding to shrink. If padding is needed on this pass, it
+ will be added back in. */
+ s->padding_statement.size = 0;
+
+ /* Make sure output_offset is valid. If relaxation shrinks
+ the section and this pad isn't needed, it's possible to
+ have output_offset larger than the final size of the
+ section. bfd_set_section_contents will complain even for
+ a pad size of zero. */
+ s->padding_statement.output_offset
+ = dot - output_section_statement->bfd_section->vma;
break;
case lang_group_statement_enum:
@@ -3149,8 +3190,7 @@ lang_size_sections (s, output_section_statement, prev, fill, dot, relax)
FAIL ();
break;
- /* This can only get here when relaxing is turned on. */
-
+ /* We can only get here when relaxing is turned on. */
case lang_address_statement_enum:
break;
}
@@ -3169,7 +3209,7 @@ lang_do_assignments (s, output_section_statement, fill, 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)
+ for (; s != (lang_statement_union_type *) NULL; s = s->header.next)
{
switch (s->header.type)
{
@@ -3486,6 +3526,18 @@ lang_check ()
bfd_printable_name (input_bfd), input_bfd,
bfd_printable_name (output_bfd));
}
+ else if (link_info.relocateable
+ /* In general it is not possible to perform a relocatable
+ link between differing object formats when the input
+ file has relocations, because the relocations in the
+ input format may not have equivalent representations in
+ the output format (and besides BFD does not translate
+ relocs for other link purposes than a final link). */
+ && bfd_get_flavour (input_bfd) != bfd_get_flavour (output_bfd)
+ && (bfd_get_file_flags (input_bfd) & HAS_RELOC) != 0)
+ einfo (_("%P%F: Relocatable linking with relocations from format %s (%B) to format %s (%B) is not supported\n"),
+ bfd_get_target (input_bfd), input_bfd,
+ bfd_get_target (output_bfd), output_bfd);
else if (bfd_count_sections (input_bfd))
{
/* If the input bfd has no contents, it shouldn't set the
@@ -3519,6 +3571,8 @@ lang_check ()
static void
lang_common ()
{
+ if (command_line.inhibit_common_definition)
+ return;
if (link_info.relocateable
&& ! command_line.force_common_definition)
return;
@@ -3679,18 +3733,18 @@ lang_place_orphans ()
lang_output_section_statement_lookup (".bss");
}
- wild_doit (&default_common_section->children, s,
- default_common_section, file);
+ lang_add_section (&default_common_section->children, s,
+ default_common_section, file);
}
}
else if (ldemul_place_orphan (file, s))
;
else
{
- lang_output_section_statement_type *os =
- lang_output_section_statement_lookup (s->name);
+ lang_output_section_statement_type *os;
- wild_doit (&os->children, s, os, file);
+ os = lang_output_section_statement_lookup (s->name);
+ lang_add_section (&os->children, s, os, file);
}
}
}
@@ -3922,6 +3976,7 @@ static void
reset_memory_regions ()
{
lang_memory_region_type *p = lang_memory_region_list;
+ asection *o;
for (p = lang_memory_region_list;
p != (lang_memory_region_type *) NULL;
@@ -3930,34 +3985,33 @@ reset_memory_regions ()
p->old_length = (bfd_size_type) (p->current - p->origin);
p->current = p->origin;
}
+
+ for (o = output_bfd->sections; o != NULL; o = o->next)
+ o->_raw_size = 0;
}
-/* 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. */
+/* If the wild pattern was marked KEEP, the member sections
+ should be as well. */
static void
-gc_section_callback (ptr, section, file, data)
+gc_section_callback (ptr, sec, section, file, data)
lang_wild_statement_type *ptr;
+ struct wildcard_list *sec ATTRIBUTE_UNUSED;
asection *section;
lang_input_statement_type *file ATTRIBUTE_UNUSED;
PTR 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. */
+/* Handle a wild statement, marking it against GC. */
static void
-lang_gc_wild (s, section, file)
+lang_gc_wild (s)
lang_wild_statement_type *s;
- const char *section;
- const char *file;
{
- walk_wild (s, section, file, gc_section_callback, NULL);
+ walk_wild (s, gc_section_callback, NULL);
}
/* Iterate over sections marking them against GC. */
@@ -3966,14 +4020,12 @@ static void
lang_gc_sections_1 (s)
lang_statement_union_type *s;
{
- for (; s != (lang_statement_union_type *) NULL; s = s->next)
+ for (; s != (lang_statement_union_type *) NULL; s = s->header.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);
+ lang_gc_wild (&s->wild_statement);
break;
case lang_constructors_statement_enum:
lang_gc_sections_1 (constructor_list.head);
@@ -4072,6 +4124,12 @@ lang_process ()
if (command_line.gc_sections)
lang_gc_sections ();
+ /* If there were any SEC_MERGE sections, finish their merging, so that
+ section sizes can be computed. This has to be done after GC of sections,
+ so that GCed sections are not merged, but before assigning output
+ sections, since removing whole input sections is hard then. */
+ bfd_merge_sections (output_bfd, &link_info);
+
/* Size up the common data. */
lang_common ();
@@ -4089,16 +4147,17 @@ lang_process ()
section positions, since they will affect SIZEOF_HEADERS. */
lang_record_phdrs ();
+ /* Size up the sections. */
+ lang_size_sections (statement_list.head,
+ abs_output_section,
+ &statement_list.head, 0, (bfd_vma) 0, NULL);
+
/* Now run around and relax if we can. */
if (command_line.relax)
{
- /* First time round is a trial run to get the 'worst case'
- addresses of the objects if there was no relaxing. */
- lang_size_sections (statement_list.head,
- abs_output_section,
- &(statement_list.head), 0, (bfd_vma) 0, false);
-
/* Keep relaxing until bfd_relax_section gives up. */
+ boolean relax_again;
+
do
{
reset_memory_regions ();
@@ -4119,17 +4178,11 @@ lang_process ()
globals are, so can make better guess. */
lang_size_sections (statement_list.head,
abs_output_section,
- &(statement_list.head), 0, (bfd_vma) 0, true);
+ &(statement_list.head), 0, (bfd_vma) 0,
+ &relax_again);
}
while (relax_again);
}
- else
- {
- /* Size up the sections. */
- lang_size_sections (statement_list.head,
- abs_output_section,
- &(statement_list.head), 0, (bfd_vma) 0, false);
- }
/* See if anything special should be done now we know how big
everything is. */
@@ -4159,32 +4212,44 @@ lang_process ()
/* EXPORTED TO YACC */
void
-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;
+lang_add_wild (filespec, section_list, keep_sections)
+ struct wildcard_spec *filespec;
+ struct wildcard_list *section_list;
boolean keep_sections;
- struct name_list *exclude_filename_list;
{
- lang_wild_statement_type *new = new_stat (lang_wild_statement,
- stat_ptr);
+ struct wildcard_list *curr, *next;
+ lang_wild_statement_type *new;
+
+ /* Reverse the list as the parser puts it back to front. */
+ for (curr = section_list, section_list = NULL;
+ curr != NULL;
+ section_list = curr, curr = next)
+ {
+ if (curr->spec.name != NULL && strcmp (curr->spec.name, "COMMON") == 0)
+ placed_commons = true;
+
+ next = curr->next;
+ curr->next = section_list;
+ }
- if (section_name != (char *) NULL && strcmp (section_name, "COMMON") == 0)
+ if (filespec != NULL && filespec->name != NULL)
{
- placed_commons = true;
+ if (strcmp (filespec->name, "*") == 0)
+ filespec->name = NULL;
+ else if (! wildcardp (filespec->name))
+ lang_has_input_file = true;
}
- if (filename != NULL && ! wildcardp (filename))
+
+ new = new_stat (lang_wild_statement, stat_ptr);
+ new->filename = NULL;
+ new->filenames_sorted = false;
+ if (filespec != NULL)
{
- lang_has_input_file = true;
+ new->filename = filespec->name;
+ new->filenames_sorted = filespec->sorted;
}
- new->section_name = section_name;
- new->sections_sorted = sections_sorted;
- new->filename = filename;
- new->filenames_sorted = filenames_sorted;
+ new->section_list = section_list;
new->keep_sections = keep_sections;
- new->exclude_filename_list = exclude_filename_list;
lang_list_init (&new->children);
}
@@ -4736,7 +4801,7 @@ lang_leave_overlay_section (fill, phdrs)
clean = xmalloc (strlen (name) + 1);
s2 = clean;
for (s1 = name; *s1 != '\0'; s1++)
- if (isalnum ((unsigned char) *s1) || *s1 == '_')
+ if (ISALNUM (*s1) || *s1 == '_')
*s2++ = *s1;
*s2 = '\0';
@@ -4981,6 +5046,16 @@ lang_register_vers_node (name, version, deps)
struct bfd_elf_version_tree *t, **pp;
struct bfd_elf_version_expr *e1;
+ if (name == NULL)
+ name = "";
+
+ if ((name[0] == '\0' && lang_elf_version_info != NULL)
+ || (lang_elf_version_info && lang_elf_version_info->name[0] == '\0'))
+ {
+ einfo (_("%X%P: anonymous version tag cannot be combined with other version tags\n"));
+ return;
+ }
+
/* 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)
@@ -5017,8 +5092,13 @@ lang_register_vers_node (name, version, deps)
version->deps = deps;
version->name = name;
- ++version_index;
- version->vernum = version_index;
+ if (name[0] != '\0')
+ {
+ ++version_index;
+ version->vernum = version_index;
+ }
+ else
+ version->vernum = 0;
for (pp = &lang_elf_version_info; *pp != NULL; pp = &(*pp)->next)
;
@@ -5069,7 +5149,7 @@ lang_do_version_exports_section ()
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);
+ einfo (_("%X%P: unable to read .exports section contents\n"), sec);
p = contents;
while (p < contents + len)
diff --git a/contrib/binutils/ld/ldlang.h b/contrib/binutils/ld/ldlang.h
index 348529a..983d34c 100644
--- a/contrib/binutils/ld/ldlang.h
+++ b/contrib/binutils/ld/ldlang.h
@@ -257,12 +257,10 @@ typedef struct {
typedef struct lang_wild_statement_struct {
lang_statement_header_type header;
- const char *section_name;
- boolean sections_sorted;
const char *filename;
boolean filenames_sorted;
+ struct wildcard_list *section_list;
boolean keep_sections;
- struct name_list *exclude_filename_list;
lang_statement_list_type children;
} lang_wild_statement_type;
@@ -292,7 +290,6 @@ typedef struct {
typedef union lang_statement_union {
lang_statement_header_type header;
- union lang_statement_union *next;
lang_wild_statement_type wild_statement;
lang_data_statement_type data_statement;
lang_reloc_statement_type reloc_statement;
@@ -385,7 +382,7 @@ 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 *, boolean, const char *, boolean, boolean, name_list *));
+ PARAMS ((struct wildcard_spec *, struct wildcard_list *, boolean));
extern void lang_add_map PARAMS ((const char *));
extern void lang_add_fill PARAMS ((int));
extern lang_assignment_statement_type * lang_add_assignment PARAMS ((union etree_union *));
@@ -443,10 +440,10 @@ extern bfd_vma lang_size_sections
PARAMS ((lang_statement_union_type *s,
lang_output_section_statement_type *output_section_statement,
lang_statement_union_type **prev, fill_type fill,
- bfd_vma dot, boolean relax));
+ bfd_vma dot, boolean *relax));
extern void lang_enter_group PARAMS ((void));
extern void lang_leave_group PARAMS ((void));
-extern void wild_doit
+extern void lang_add_section
PARAMS ((lang_statement_list_type *ptr, asection *section,
lang_output_section_statement_type *output,
lang_input_statement_type *file));
diff --git a/contrib/binutils/ld/ldlex.l b/contrib/binutils/ld/ldlex.l
index eecb902..0b15ca2 100644
--- a/contrib/binutils/ld/ldlex.l
+++ b/contrib/binutils/ld/ldlex.l
@@ -1,7 +1,7 @@
%{
-/* Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
- Free Software Foundation, Inc.
+/* Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2001, 2002 Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -28,7 +28,6 @@ This was written by steve chamberlain
#include <ansidecl.h>
#include <stdio.h>
-#include <ctype.h>
#ifdef MPW
/* Prevent enum redefinition problems. */
@@ -37,6 +36,7 @@ This was written by steve chamberlain
#include "bfd.h"
#include "sysdep.h"
+#include "safe-ctype.h"
#include "ld.h"
#include "ldgram.h"
#include "ldmisc.h"
@@ -260,6 +260,7 @@ V_IDENTIFIER [*?.$_a-zA-Z]([*?.$_a-zA-Z0-9]|::)*
<BOTH,SCRIPT>"CREATE_OBJECT_SYMBOLS" { RTOKEN(CREATE_OBJECT_SYMBOLS);}
<BOTH,SCRIPT>"CONSTRUCTORS" { RTOKEN( CONSTRUCTORS);}
<BOTH,SCRIPT>"FORCE_COMMON_ALLOCATION" { RTOKEN(FORCE_COMMON_ALLOCATION);}
+<BOTH,SCRIPT>"INHIBIT_COMMON_ALLOCATION" { RTOKEN(INHIBIT_COMMON_ALLOCATION);}
<BOTH,SCRIPT>"SECTIONS" { RTOKEN(SECTIONS);}
<BOTH,SCRIPT>"FILL" { RTOKEN(FILL);}
<BOTH,SCRIPT>"STARTUP" { RTOKEN(STARTUP);}
@@ -417,11 +418,10 @@ V_IDENTIFIER [*?.$_a-zA-Z]([*?.$_a-zA-Z0-9]|::)*
else
{
yy_switch_to_buffer(include_stack[include_stack_ptr]);
-
}
- BEGIN(SCRIPT);
+
ldfile_input_filename = file_name_stack[include_stack_ptr - 1];
- lineno = lineno_stack[include_stack_ptr - 1];
+ lineno = lineno_stack[include_stack_ptr];
return END;
}
@@ -445,13 +445,13 @@ lex_push_file (file, name)
einfo("%F:includes nested too deeply\n");
}
file_name_stack[include_stack_ptr] = name;
- lineno_stack[include_stack_ptr] = 1;
+ lineno_stack[include_stack_ptr] = lineno;
include_stack[include_stack_ptr] = YY_CURRENT_BUFFER;
include_stack_ptr++;
+ lineno = 1;
yyin = file;
yy_switch_to_buffer(yy_create_buffer(yyin, YY_BUF_SIZE));
- BEGIN (SCRIPT);
}
/* Return a newly created flex input buffer containing STRING,
@@ -511,12 +511,12 @@ lex_redirect (string)
einfo("%F: macros nested too deeply\n");
}
file_name_stack[include_stack_ptr] = "redirect";
- lineno_stack[include_stack_ptr] = 0;
+ lineno_stack[include_stack_ptr] = lineno;
include_stack[include_stack_ptr] = YY_CURRENT_BUFFER;
include_stack_ptr++;
+ lineno = 1;
tmp = yy_create_string_buffer (string, strlen (string));
yy_switch_to_buffer (tmp);
- BEGIN (SCRIPT);
}
/* Functions to switch to a different flex start condition,
@@ -595,8 +595,8 @@ yy_input (buf, result, max_size)
{
if (yyin)
{
- *result = read (fileno (yyin), (char *) buf, max_size);
- if (*result < 0)
+ *result = fread ((char *) buf, 1, max_size, yyin);
+ if (*result < max_size && ferror (yyin))
einfo ("%F%P: read in flex scanner failed\n");
}
}
@@ -658,7 +658,7 @@ lex_warn_invalid (where, what)
einfo ("%F%s: file not recognized: %E\n", ldfile_input_filename);
}
- if (! isprint ((unsigned char) *what))
+ if (! ISPRINT (*what))
{
sprintf (buf, "\\%03o", (unsigned int) *what);
what = buf;
diff --git a/contrib/binutils/ld/ldmain.c b/contrib/binutils/ld/ldmain.c
index 0b8120f..eac23ae 100644
--- a/contrib/binutils/ld/ldmain.c
+++ b/contrib/binutils/ld/ldmain.c
@@ -1,5 +1,5 @@
/* Main program of GNU linker.
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
Free Software Foundation, Inc.
Written by Steve Chamberlain steve@cygnus.com
@@ -23,7 +23,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "bfd.h"
#include "sysdep.h"
#include <stdio.h>
-#include <ctype.h>
+#include "safe-ctype.h"
#include "libiberty.h"
#include "progress.h"
#include "bfdlink.h"
@@ -169,6 +169,9 @@ main (argc, argv)
#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
setlocale (LC_MESSAGES, "");
#endif
+#if defined (HAVE_SETLOCALE)
+ setlocale (LC_CTYPE, "");
+#endif
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
@@ -193,6 +196,13 @@ main (argc, argv)
xexit (1);
}
+#if YYDEBUG
+ {
+ extern int yydebug;
+ yydebug = 1;
+ }
+#endif
+
/* Initialize the data about options. */
trace_files = trace_file_tries = version_printed = false;
whole_archive = false;
@@ -202,6 +212,7 @@ main (argc, argv)
config.split_by_reloc = (unsigned) -1;
config.split_by_file = (bfd_size_type) -1;
command_line.force_common_definition = false;
+ command_line.inhibit_common_definition = false;
command_line.interpreter = NULL;
command_line.rpath = NULL;
command_line.warn_mismatch = true;
@@ -219,13 +230,14 @@ main (argc, argv)
link_info.emitrelocations = false;
link_info.shared = false;
link_info.symbolic = false;
+ link_info.export_dynamic = false;
link_info.static_link = false;
link_info.traditional_format = false;
link_info.optimize = false;
link_info.no_undefined = false;
link_info.allow_shlib_undefined = false;
link_info.strip = strip_none;
- link_info.discard = discard_none;
+ link_info.discard = discard_sec_merge;
link_info.keep_memory = true;
link_info.input_bfds = NULL;
link_info.create_object_symbols_section = NULL;
@@ -240,8 +252,12 @@ main (argc, argv)
link_info.init_function = "_init";
link_info.fini_function = "_fini";
link_info.new_dtags = false;
+ link_info.eh_frame_hdr = false;
link_info.flags = (bfd_vma) 0;
link_info.flags_1 = (bfd_vma) 0;
+ link_info.pei386_auto_import = false;
+ link_info.combreloc = false;
+ link_info.spare_dynamic_tags = 5;
ldfile_add_arch ("");
@@ -252,7 +268,7 @@ main (argc, argv)
emulation = get_emulation (argc, argv);
ldemul_choose_mode (emulation);
- default_target = ldemul_choose_target ();
+ default_target = ldemul_choose_target (argc, argv);
lang_init ();
ldemul_before_parse ();
lang_has_input_file = false;
@@ -272,13 +288,21 @@ main (argc, argv)
einfo (_("%P%F: -r and -shared may not be used together\n"));
}
+ if (! link_info.shared)
+ {
+ if (command_line.filter_shlib)
+ einfo (_("%P%F: -F may not be used without -shared\n"));
+ if (command_line.auxiliary_filters)
+ einfo (_("%P%F: -f may not be used without -shared\n"));
+ }
+
/* Treat ld -r -s as ld -r -S -x (i.e., strip all local symbols). I
don't see how else this can be handled, since in this case we
must preserve all externally visible symbols. */
if (link_info.relocateable && link_info.strip == strip_all)
{
link_info.strip = strip_debugger;
- if (link_info.discard == discard_none)
+ if (link_info.discard == discard_sec_merge)
link_info.discard = discard_all;
}
@@ -286,23 +310,17 @@ main (argc, argv)
the -L's in argv have been processed. */
set_scripts_dir ();
- if (had_script == false)
+ /* If we have not already opened and parsed a linker script
+ read the emulation's appropriate default script. */
+ if (saved_script_handle == NULL)
{
- /* Read the emulation's appropriate default script. */
int isfile;
- char *s = ldemul_get_script (&isfile);
+ char *s = ldemul_get_script (& isfile);
if (isfile)
ldfile_open_command_file (s);
else
- {
- if (trace_file_tries)
- {
- info_msg (_("using internal linker script:\n"));
- info_msg ("==================================================\n");
- info_msg (s);
- info_msg ("\n==================================================\n");
- }
+ {
lex_string = s;
lex_redirect (s);
}
@@ -311,6 +329,39 @@ main (argc, argv)
lex_string = NULL;
}
+ if (trace_file_tries)
+ {
+ if (saved_script_handle)
+ info_msg (_("using external linker script:"));
+ else
+ info_msg (_("using internal linker script:"));
+ info_msg ("\n==================================================\n");
+
+ if (saved_script_handle)
+ {
+ static const int ld_bufsz = 8193;
+ size_t n;
+ char *buf = xmalloc (ld_bufsz);
+
+ rewind (saved_script_handle);
+ while ((n = fread (buf, 1, ld_bufsz - 1, saved_script_handle)) > 0)
+ {
+ buf [n] = 0;
+ info_msg (buf);
+ }
+ rewind (saved_script_handle);
+ free (buf);
+ }
+ else
+ {
+ int isfile;
+
+ info_msg (ldemul_get_script (& isfile));
+ }
+
+ info_msg ("\n==================================================\n");
+ }
+
lang_final ();
if (lang_has_input_file == false)
@@ -502,9 +553,12 @@ get_emulation (argc, argv)
else if (strcmp (argv[i], "-mips1") == 0
|| strcmp (argv[i], "-mips2") == 0
|| strcmp (argv[i], "-mips3") == 0
- || strcmp (argv[i], "-mips4") == 0)
+ || strcmp (argv[i], "-mips32") == 0
+ || strcmp (argv[i], "-mips64") == 0
+ || strcmp (argv[i], "-mips4") == 0
+ || strcmp (argv[i], "-mips5") == 0)
{
- /* FIXME: The arguments -mips1, -mips2 and -mips3 are
+ /* FIXME: The arguments -mips1, -mips2, -mips3, etc. are
passed to the linker by some MIPS compilers. They
generally tell the linker to use a slightly different
library path. Perhaps someday these should be
@@ -681,14 +735,14 @@ add_keepsyms_file (filename)
c = getc (file);
while (c != EOF)
{
- while (isspace (c))
+ while (ISSPACE (c))
c = getc (file);
if (c != EOF)
{
size_t len = 0;
- while (! isspace (c) && c != EOF)
+ while (! ISSPACE (c) && c != EOF)
{
buf[len] = c;
++len;
@@ -785,8 +839,7 @@ add_archive_element (info, abfd, name)
{
char buf[100];
- sprintf (buf, "%-29s %s\n\n", _("Archive member included"),
- _("because of file (symbol)"));
+ sprintf (buf, _("Archive member included because of file (symbol)\n\n"));
minfo ("%s", buf);
header_printed = true;
}
diff --git a/contrib/binutils/ld/ldmisc.c b/contrib/binutils/ld/ldmisc.c
index 12dbdf3..42adcee 100644
--- a/contrib/binutils/ld/ldmisc.c
+++ b/contrib/binutils/ld/ldmisc.c
@@ -1,5 +1,6 @@
/* ldmisc.c
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2002
Free Software Foundation, Inc.
Written by Steve Chamberlain of Cygnus Support.
@@ -27,10 +28,8 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#ifdef ANSI_PROTOTYPES
#include <stdarg.h>
-#define USE_STDARG 1
#else
#include <varargs.h>
-#define USE_STDARG 0
#endif
#include "ld.h"
@@ -71,18 +70,20 @@ demangle (string)
const char *string;
{
char *res;
+ const char *p;
if (output_bfd != NULL
&& bfd_get_symbol_leading_char (output_bfd) == string[0])
++string;
- /* This is a hack for better error reporting on XCOFF, or the MS PE
- format. Xcoff has a single '.', while the NT PE for PPC has
- '..'. So we remove all of them. */
- while (string[0] == '.')
- ++string;
+ /* This is a hack for better error reporting on XCOFF, PowerPC64-ELF
+ or the MS PE format. These formats have a number of leading '.'s
+ on at least some symbols, so we remove all dots. */
+ p = string;
+ while (*p == '.')
+ ++p;
- res = cplus_demangle (string, DMGL_ANSI | DMGL_PARAMS);
+ res = cplus_demangle (p, DMGL_ANSI | DMGL_PARAMS);
return res ? res : xstrdup (string);
}
@@ -399,6 +400,9 @@ vfinfo (fp, fmt, arg)
}
}
+ if (config.fatal_warnings)
+ config.make_executable = false;
+
if (fatal == true)
xexit (1);
}
@@ -409,51 +413,25 @@ vfinfo (fp, fmt, arg)
would hosed by LynxOS, which defines that name in its libc.) */
void
-#if USE_STDARG
-info_msg (const char *fmt, ...)
-#else
-info_msg (va_alist)
- va_dcl
-#endif
+info_msg VPARAMS ((const char *fmt, ...))
{
- va_list arg;
-
-#if ! USE_STDARG
- const char *fmt;
-
- va_start (arg);
- fmt = va_arg (arg, const char *);
-#else
- va_start (arg, fmt);
-#endif
+ VA_OPEN (arg, fmt);
+ VA_FIXEDARG (arg, const char *, fmt);
vfinfo (stdout, fmt, arg);
- va_end (arg);
+ VA_CLOSE (arg);
}
/* ('e' for error.) Format info message and print on stderr. */
void
-#if USE_STDARG
-einfo (const char *fmt, ...)
-#else
-einfo (va_alist)
- va_dcl
-#endif
+einfo VPARAMS ((const char *fmt, ...))
{
- va_list arg;
-
-#if ! USE_STDARG
- const char *fmt;
-
- va_start (arg);
- fmt = va_arg (arg, const char *);
-#else
- va_start (arg, fmt);
-#endif
+ VA_OPEN (arg, fmt);
+ VA_FIXEDARG (arg, const char *, fmt);
vfinfo (stderr, fmt, arg);
- va_end (arg);
+ VA_CLOSE (arg);
}
void
@@ -467,50 +445,24 @@ info_assert (file, line)
/* ('m' for map) Format info message and print on map. */
void
-#if USE_STDARG
-minfo (const char *fmt, ...)
-#else
-minfo (va_alist)
- va_dcl
-#endif
+minfo VPARAMS ((const char *fmt, ...))
{
- va_list arg;
-
-#if ! USE_STDARG
- const char *fmt;
- va_start (arg);
- fmt = va_arg (arg, const char *);
-#else
- va_start (arg, fmt);
-#endif
+ VA_OPEN (arg, fmt);
+ VA_FIXEDARG (arg, const char *, fmt);
vfinfo (config.map_file, fmt, arg);
- va_end (arg);
+ VA_CLOSE (arg);
}
void
-#if USE_STDARG
-lfinfo (FILE *file, const char *fmt, ...)
-#else
-lfinfo (va_alist)
- va_dcl
-#endif
+lfinfo VPARAMS ((FILE *file, const char *fmt, ...))
{
- va_list arg;
-
-#if ! USE_STDARG
- FILE *file;
- const char *fmt;
-
- va_start (arg);
- file = va_arg (arg, FILE *);
- fmt = va_arg (arg, const char *);
-#else
- va_start (arg, fmt);
-#endif
+ VA_OPEN (arg, fmt);
+ VA_FIXEDARG (arg, FILE *, file);
+ VA_FIXEDARG (arg, const char *, fmt);
vfinfo (file, fmt, arg);
- va_end (arg);
+ VA_CLOSE (arg);
}
/* Functions to print the link map. */
diff --git a/contrib/binutils/ld/ldmisc.h b/contrib/binutils/ld/ldmisc.h
index 998fb4f..aa3f6af 100644
--- a/contrib/binutils/ld/ldmisc.h
+++ b/contrib/binutils/ld/ldmisc.h
@@ -1,5 +1,5 @@
/* ldmisc.h -
- Copyright 1991, 1992, 1993, 1994, 1996, 1997
+ Copyright 1991, 1992, 1993, 1994, 1996, 1997, 2001
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -15,28 +15,17 @@
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 LDMISC_H
#define LDMISC_H
-#ifdef ANSI_PROTOTYPES
extern void einfo PARAMS ((const char *, ...));
extern void minfo PARAMS ((const char *, ...));
extern void info_msg PARAMS ((const char *, ...));
extern void lfinfo PARAMS ((FILE *, const char *, ...));
-#else
-/* VARARGS*/
-extern void einfo ();
-/* VARARGS*/
-extern void minfo ();
-/* VARARGS*/
-extern void info_msg ();
-/*VARARGS*/
-extern void lfinfo ();
-#endif
-
extern void info_assert PARAMS ((const char *, unsigned int));
extern void yyerror PARAMS ((const char *));
extern PTR xmalloc PARAMS ((size_t));
diff --git a/contrib/binutils/ld/ldver.c b/contrib/binutils/ld/ldver.c
index a50b548..f81884c 100644
--- a/contrib/binutils/ld/ldver.c
+++ b/contrib/binutils/ld/ldver.c
@@ -1,5 +1,5 @@
/* ldver.c -- Print linker version.
- Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000
+ Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002
Free Software Foundation, Inc.
This file is part of GLD, the Gnu Linker.
@@ -30,16 +30,22 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "ldemul.h"
#include "ldmain.h"
-const char *ld_program_version = VERSION;
-
void
ldversion (noisy)
int noisy;
{
- fprintf (stdout, _("GNU ld version %s (with BFD %s)\n"),
- ld_program_version, BFD_VERSION);
+ /* Output for noisy == 2 is intended to follow the GNU standards. */
+ fprintf (stdout, _("GNU ld version %s\n"), BFD_VERSION_STRING);
+
+ if (noisy & 2)
+ {
+ printf (_("Copyright 2002 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"));
+ }
- if (noisy)
+ if (noisy & 1)
{
ld_emulation_xfer_type **ptr = ld_emulations;
diff --git a/contrib/binutils/ld/ldver.h b/contrib/binutils/ld/ldver.h
index a5ba624..ef06937 100644
--- a/contrib/binutils/ld/ldver.h
+++ b/contrib/binutils/ld/ldver.h
@@ -17,6 +17,4 @@ 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. */
-extern const char *ld_program_version;
-
void ldversion PARAMS ((int));
diff --git a/contrib/binutils/ld/lexsup.c b/contrib/binutils/ld/lexsup.c
index 77a37b2..ca2e9a1 100644
--- a/contrib/binutils/ld/lexsup.c
+++ b/contrib/binutils/ld/lexsup.c
@@ -25,7 +25,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "libiberty.h"
#include <stdio.h>
#include <string.h>
-#include <ctype.h>
+#include "safe-ctype.h"
#include "getopt.h"
#include "bfdlink.h"
#include "ld.h"
@@ -109,7 +109,8 @@ int parsing_defsym = 0;
#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_FATAL (OPTION_WARN_CONSTRUCTORS + 1)
+#define OPTION_WARN_MULTIPLE_GP (OPTION_WARN_FATAL + 1)
#define OPTION_WARN_ONCE (OPTION_WARN_MULTIPLE_GP + 1)
#define OPTION_WARN_SECTION_ALIGN (OPTION_WARN_ONCE + 1)
#define OPTION_SPLIT_BY_RELOC (OPTION_WARN_SECTION_ALIGN + 1)
@@ -129,6 +130,10 @@ int parsing_defsym = 0;
#define OPTION_UNIQUE (OPTION_SECTION_START + 1)
#define OPTION_TARGET_HELP (OPTION_UNIQUE + 1)
#define OPTION_ALLOW_SHLIB_UNDEFINED (OPTION_TARGET_HELP + 1)
+#define OPTION_DISCARD_NONE (OPTION_ALLOW_SHLIB_UNDEFINED + 1)
+#define OPTION_SPARE_DYNAMIC_TAGS (OPTION_DISCARD_NONE + 1)
+#define OPTION_NO_DEFINE_COMMON (OPTION_SPARE_DYNAMIC_TAGS + 1)
+#define OPTION_NOSTDLIB (OPTION_NO_DEFINE_COMMON + 1)
/* The long options. This structure is used for both the option
parsing and the help text. */
@@ -199,6 +204,8 @@ static const struct ld_option ld_options[] =
TWO_DASHES },
{ {"soname", required_argument, NULL, OPTION_SONAME},
'h', N_("FILENAME"), N_("Set internal name of shared library"), ONE_DASH },
+ { {"dynamic-linker", required_argument, NULL, OPTION_DYNAMIC_LINKER},
+ 'I', N_("PROGRAM"), N_("Set PROGRAM as the dynamic linker to use"), TWO_DASHES },
{ {"library", required_argument, NULL, 'l'},
'l', N_("LIBNAME"), N_("Search for library LIBNAME"), TWO_DASHES },
{ {"library-path", required_argument, NULL, 'L'},
@@ -248,7 +255,9 @@ static const struct ld_option ld_options[] =
{ {"discard-all", no_argument, NULL, 'x'},
'x', NULL, N_("Discard all local symbols"), TWO_DASHES },
{ {"discard-locals", no_argument, NULL, 'X'},
- 'X', NULL, N_("Discard temporary local symbols"), TWO_DASHES },
+ 'X', NULL, N_("Discard temporary local symbols (default)"), TWO_DASHES },
+ { {"discard-none", no_argument, NULL, OPTION_DISCARD_NONE},
+ '\0', NULL, N_("Don't discard any local symbols"), TWO_DASHES },
{ {"trace-symbol", required_argument, NULL, 'y'},
'y', N_("SYMBOL"), N_("Trace mentions of SYMBOL"), TWO_DASHES },
{ {NULL, required_argument, NULL, '\0'},
@@ -286,8 +295,6 @@ static const struct ld_option ld_options[] =
'\0', N_("SYMBOL=EXPRESSION"), N_("Define a symbol"), TWO_DASHES },
{ {"demangle", optional_argument, NULL, OPTION_DEMANGLE},
'\0', N_("[=STYLE]"), N_("Demangle symbol names [using STYLE]"), TWO_DASHES },
- { {"dynamic-linker", required_argument, NULL, OPTION_DYNAMIC_LINKER},
- '\0', N_("PROGRAM"), N_("Set the dynamic linker to use"), TWO_DASHES },
{ {"embedded-relocs", no_argument, NULL, OPTION_EMBEDDED_RELOCS},
'\0', NULL, N_("Generate embedded relocs"), TWO_DASHES},
{ {"fini", required_argument, NULL, OPTION_FINI},
@@ -306,6 +313,8 @@ static const struct ld_option ld_options[] =
'\0', N_("SYMBOL"), N_("Call SYMBOL at load-time"), ONE_DASH },
{ {"Map", required_argument, NULL, OPTION_MAP},
'\0', N_("FILE"), N_("Write a map file"), ONE_DASH },
+ { {"no-define-common", no_argument, NULL, OPTION_NO_DEFINE_COMMON},
+ '\0', NULL, N_("Do not define Common storage"), TWO_DASHES },
{ {"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},
@@ -322,6 +331,8 @@ static const struct ld_option ld_options[] =
'\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 },
+ { {"nostdlib", no_argument, NULL, OPTION_NOSTDLIB},
+ '\0', NULL, N_("Only use library directories specified on\n\t\t\t\tthe command line"), ONE_DASH },
{ {"oformat", required_argument, NULL, OPTION_OFORMAT},
'\0', N_("TARGET"), N_("Specify target of output file"), EXACTLY_TWO_DASHES },
{ {"qmagic", no_argument, NULL, OPTION_IGNORE},
@@ -343,6 +354,8 @@ static const struct ld_option ld_options[] =
'\0', NULL, N_("Sort common symbols by size"), TWO_DASHES },
{ {"sort_common", no_argument, NULL, OPTION_SORT_COMMON},
'\0', NULL, NULL, NO_HELP },
+ { {"spare-dynamic-tags", required_argument, NULL, OPTION_SPARE_DYNAMIC_TAGS},
+ '\0', N_("COUNT"), N_("How many tags to reserve in .dynamic section"), TWO_DASHES },
{ {"split-by-file", optional_argument, NULL, OPTION_SPLIT_BY_FILE},
'\0', N_("[=SIZE]"), N_("Split output sections every SIZE octets"), TWO_DASHES },
{ {"split-by-reloc", optional_argument, NULL, OPTION_SPLIT_BY_RELOC},
@@ -385,6 +398,9 @@ static const struct ld_option ld_options[] =
{ {"warn-section-align", no_argument, NULL, OPTION_WARN_SECTION_ALIGN},
'\0', NULL, N_("Warn if start of section changes due to alignment"),
TWO_DASHES },
+ { {"fatal-warnings", no_argument, NULL, OPTION_WARN_FATAL},
+ '\0', NULL, N_("Treat warnings as errors"),
+ TWO_DASHES },
{ {"whole-archive", no_argument, NULL, OPTION_WHOLE_ARCHIVE},
'\0', NULL, N_("Include all objects from following archives"), TWO_DASHES },
{ {"wrap", required_argument, NULL, OPTION_WRAP},
@@ -409,7 +425,7 @@ is_num (string, min, max, err)
for (; *string; ++string)
{
- if (! isdigit (*string))
+ if (! ISDIGIT (*string))
{
result = err;
break;
@@ -494,7 +510,7 @@ parse_args (argc, argv)
for (i = 1; i < argc; i++)
if (strcmp (argv[i], "-G") == 0
&& (i + 1 >= argc
- || ! isdigit ((unsigned char) argv[i + 1][0])))
+ || ! ISDIGIT (argv[i + 1][0])))
argv[i] = (char *) "--shared";
/* Because we permit long options to start with a single dash, and
@@ -536,20 +552,18 @@ parse_args (argc, argv)
-nx, in which the -n is parsed as a single option, and we
loop around to pick up the -x. */
if (optind != last_optind)
- {
- if (ldemul_parse_args (argc, argv))
- continue;
- last_optind = optind;
- }
+ if (ldemul_parse_args (argc, argv))
+ continue;
/* getopt_long_only is like getopt_long, but '-' as well as '--'
can indicate a long option. */
opterr = 0;
+ last_optind = optind;
optc = getopt_long_only (argc, argv, shortopts, longopts, &longind);
if (optc == '?')
{
- --optind;
- optc = getopt_long (argc, argv, shortopts, really_longopts, &longind);
+ optind = last_optind;
+ optc = getopt_long (argc, argv, "-", really_longopts, &longind);
}
if (optc == -1)
@@ -558,13 +572,10 @@ parse_args (argc, argv)
switch (optc)
{
case '?':
- fprintf (stderr, _("%s: unrecognized option '%s'\n"),
- program_name, argv[optind - 1]);
+ einfo (_("%P: unrecognized option '%s'\n"), argv[last_optind]);
default:
- fprintf (stderr,
- _("%s: use the --help option for usage information\n"),
- program_name);
- xexit (1);
+ einfo (_("%P%F: use the --help option for usage information\n"));
+
case 1: /* File name. */
lang_add_input_file (optarg, lang_input_file_is_file_enum,
(char *) NULL);
@@ -644,6 +655,7 @@ parse_args (argc, argv)
cplus_demangle_set_style (style);
}
break;
+ case 'I': /* Used on Solaris. */
case OPTION_DYNAMIC_LINKER:
command_line.interpreter = optarg;
break;
@@ -658,7 +670,7 @@ parse_args (argc, argv)
break;
case OPTION_EXPORT_DYNAMIC:
case 'E': /* HP/UX compatibility. */
- command_line.export_dynamic = true;
+ link_info.export_dynamic = true;
break;
case 'e':
lang_add_entry (optarg, true);
@@ -735,6 +747,9 @@ parse_args (argc, argv)
config.magic_demand_paged = false;
config.dynamic_link = false;
break;
+ case OPTION_NO_DEFINE_COMMON:
+ command_line.inhibit_common_definition = true;
+ break;
case OPTION_NO_DEMANGLE:
demangling = false;
break;
@@ -756,6 +771,9 @@ parse_args (argc, argv)
case OPTION_NOINHIBIT_EXEC:
force_make_executable = true;
break;
+ case OPTION_NOSTDLIB:
+ config.only_cmd_line_lib_dirs = true;
+ break;
case OPTION_NO_WHOLE_ARCHIVE:
whole_archive = false;
break;
@@ -780,6 +798,17 @@ parse_args (argc, argv)
break;
case 'i':
case 'r':
+ if (optind == last_optind)
+ /* This can happen if the user put "-rpath,a" on the command
+ line. (Or something similar. The comma is important).
+ Getopt becomes confused and thinks that this is a -r option
+ but it cannot parse the text after the -r so it refuses to
+ increment the optind counter. Detect this case and issue
+ an error message here. We cannot just make this a warning,
+ increment optind, and continue because getopt is too confused
+ and will seg-fault the next time around. */
+ einfo(_("%P%F: bad -rpath option\n"));
+
link_info.relocateable = true;
config.build_constructors = false;
config.magic_demand_paged = false;
@@ -821,6 +850,7 @@ parse_args (argc, argv)
do
{
size_t idx = 0;
+
while (optarg[idx] != '\0' && optarg[idx] == cp[idx])
++idx;
if (optarg[idx] == '\0'
@@ -907,23 +937,13 @@ parse_args (argc, argv)
/* Check for <something>=<somthing>... */
optarg2 = strchr (optarg, '=');
if (optarg2 == NULL)
- {
- fprintf (stderr,
- _("%s: Invalid argument to option \"--section-start\"\n"),
- program_name);
- xexit (1);
- }
+ einfo (_("%P%F: invalid argument to option \"--section-start\"\n"));
optarg2++;
/* So far so good. Are all the args present? */
if ((*optarg == '\0') || (*optarg2 == '\0'))
- {
- fprintf (stderr,
- _("%s: Missing argument(s) to option \"--section-start\"\n"),
- program_name);
- xexit (1);
- }
+ einfo (_("%P%F: missing argument(s) to option \"--section-start\"\n"));
/* We must copy the section name as set_section_start
doesn't do it for us. */
@@ -985,22 +1005,7 @@ parse_args (argc, argv)
version_printed = true;
break;
case OPTION_VERSION:
- /* This output is intended to follow the GNU standards document. */
- printf ("GNU ld %s\n", ld_program_version);
- printf (_("Copyright 2001 Free Software Foundation, Inc.\n"));
- printf (_("\
-This program is free software; you may redistribute it under the terms of\n\
-the GNU General Public License. This program has absolutely no warranty.\n"));
- {
- ld_emulation_xfer_type **ptr = ld_emulations;
-
- printf (_(" Supported emulations:\n"));
- while (*ptr)
- {
- printf (" %s\n", (*ptr)->emulation_name);
- ptr++;
- }
- }
+ ldversion (2);
xexit (0);
break;
case OPTION_VERSION_SCRIPT:
@@ -1008,11 +1013,11 @@ the GNU General Public License. This program has absolutely no warranty.\n"));
version information. Read it, but don't assume that
we've seen a linker script. */
{
- boolean hold_had_script;
+ FILE * hold_script_handle;
- hold_had_script = had_script;
+ hold_script_handle = saved_script_handle;
ldfile_open_command_file (optarg);
- had_script = hold_had_script;
+ saved_script_handle = hold_script_handle;
parser_input = input_version_script;
yyparse ();
}
@@ -1029,6 +1034,9 @@ the GNU General Public License. This program has absolutely no warranty.\n"));
case OPTION_WARN_CONSTRUCTORS:
config.warn_constructors = true;
break;
+ case OPTION_WARN_FATAL:
+ config.fatal_warnings = true;
+ break;
case OPTION_WARN_MULTIPLE_GP:
config.warn_multiple_gp = true;
break;
@@ -1044,6 +1052,9 @@ the GNU General Public License. This program has absolutely no warranty.\n"));
case OPTION_WRAP:
add_wrap (optarg);
break;
+ case OPTION_DISCARD_NONE:
+ link_info.discard = discard_none;
+ break;
case 'X':
link_info.discard = discard_l;
break;
@@ -1058,6 +1069,9 @@ the GNU General Public License. This program has absolutely no warranty.\n"));
case 'y':
add_ysym (optarg);
break;
+ case OPTION_SPARE_DYNAMIC_TAGS:
+ link_info.spare_dynamic_tags = strtoul (optarg, NULL, 0);
+ break;
case OPTION_SPLIT_BY_RELOC:
if (optarg != NULL)
config.split_by_reloc = strtoul (optarg, NULL, 0);
@@ -1078,41 +1092,31 @@ the GNU General Public License. This program has absolutely no warranty.\n"));
break;
case '(':
if (ingroup)
- {
- fprintf (stderr,
- _("%s: may not nest groups (--help for usage)\n"),
- program_name);
- xexit (1);
- }
+ einfo (_("%P%F: may not nest groups (--help for usage)\n"));
+
lang_enter_group ();
ingroup = 1;
break;
case ')':
if (! ingroup)
- {
- fprintf (stderr,
- _("%s: group ended before it began (--help for usage)\n"),
- program_name);
- xexit (1);
- }
+ einfo (_("%P%F: group ended before it began (--help for usage)\n"));
+
lang_leave_group ();
ingroup = 0;
break;
case OPTION_MPC860C0:
- link_info.mpc860c0 = 20; /* default value (in bytes) */
+ /* Default value (in bytes). */
+ link_info.mpc860c0 = 20;
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 */
+ einfo (_("%P%F: invalid argument to option \"mpc860c0\"\n"));
+
+ /* Convert words to bytes. */
+ link_info.mpc860c0 = words * 4;
}
command_line.relax = true;
break;
diff --git a/contrib/binutils/ld/mri.c b/contrib/binutils/ld/mri.c
index f4094cb..6ec0ab8 100644
--- a/contrib/binutils/ld/mri.c
+++ b/contrib/binutils/ld/mri.c
@@ -220,6 +220,7 @@ mri_draw_tree ()
struct section_name_struct *aptr;
etree_type *align = 0;
etree_type *subalign = 0;
+ struct wildcard_list *tmp;
/* See if an alignment has been specified. */
for (aptr = alignment; aptr; aptr = aptr->next)
@@ -238,12 +239,24 @@ mri_draw_tree ()
1, align, subalign,
(etree_type *) NULL);
base = 0;
- lang_add_wild (p->name, false, (char *) NULL, false, false, NULL);
+ tmp = (struct wildcard_list *) xmalloc (sizeof *tmp);
+ tmp->next = NULL;
+ tmp->spec.name = p->name;
+ tmp->spec.exclude_name_list = NULL;
+ tmp->spec.sorted = false;
+ lang_add_wild (NULL, tmp, false);
/* 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, false, (char *) NULL, false, false, NULL);
+ {
+ tmp = (struct wildcard_list *) xmalloc (sizeof *tmp);
+ tmp->next = NULL;
+ tmp->spec.name = aptr->name;
+ tmp->spec.exclude_name_list = NULL;
+ tmp->spec.sorted = false;
+ lang_add_wild (NULL, tmp, false);
+ }
lang_leave_output_section_statement
(0, "*default*", (struct lang_output_section_phdr_list *) NULL,
diff --git a/contrib/binutils/ld/pe-dll.c b/contrib/binutils/ld/pe-dll.c
index 717426f..945564c 100644
--- a/contrib/binutils/ld/pe-dll.c
+++ b/contrib/binutils/ld/pe-dll.c
@@ -1,5 +1,5 @@
/* Routines to help build PEI-format DLLs (Win32 etc)
- Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
Written by DJ Delorie <dj@cygnus.com>
This file is part of GLD, the Gnu Linker.
@@ -23,9 +23,9 @@
#include "sysdep.h"
#include "bfdlink.h"
#include "libiberty.h"
+#include "safe-ctype.h"
#include <time.h>
-#include <ctype.h>
#include "ld.h"
#include "ldexp.h"
@@ -41,57 +41,133 @@
#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. */
+
+/* Auto-import feature by Paul Sokolovsky
+
+ Quick facts:
+
+ 1. With this feature on, DLL clients can import variables from DLL
+ without any concern from their side (for example, without any source
+ code modifications).
+
+ 2. This is done completely in bounds of the PE specification (to be fair,
+ there's a place where it pokes nose out of, but in practise it works).
+ So, resulting module can be used with any other PE compiler/linker.
+
+ 3. Auto-import is fully compatible with standard import method and they
+ can be mixed together.
+
+ 4. Overheads: space: 8 bytes per imported symbol, plus 20 for each
+ reference to it; load time: negligible; virtual/physical memory: should be
+ less than effect of DLL relocation, and I sincerely hope it doesn't affect
+ DLL sharability (too much).
+
+ Idea
+
+ The obvious and only way to get rid of dllimport insanity is to make client
+ access variable directly in the DLL, bypassing extra dereference. I.e.,
+ whenever client contains someting like
+
+ mov dll_var,%eax,
+
+ address of dll_var in the command should be relocated to point into loaded
+ DLL. The aim is to make OS loader do so, and than make ld help with that.
+ Import section of PE made following way: there's a vector of structures
+ each describing imports from particular DLL. Each such structure points
+ to two other parellel vectors: one holding imported names, and one which
+ will hold address of corresponding imported name. So, the solution is
+ de-vectorize these structures, making import locations be sparse and
+ pointing directly into code. Before continuing, it is worth a note that,
+ while authors strives to make PE act ELF-like, there're some other people
+ make ELF act PE-like: elfvector, ;-) .
+
+ Implementation
+
+ For each reference of data symbol to be imported from DLL (to set of which
+ belong symbols with name <sym>, if __imp_<sym> is found in implib), the
+ import fixup entry is generated. That entry is of type
+ IMAGE_IMPORT_DESCRIPTOR and stored in .idata$3 subsection. Each
+ fixup entry contains pointer to symbol's address within .text section
+ (marked with __fuN_<sym> symbol, where N is integer), pointer to DLL name
+ (so, DLL name is referenced by multiple entries), and pointer to symbol
+ name thunk. Symbol name thunk is singleton vector (__nm_th_<symbol>)
+ pointing to IMAGE_IMPORT_BY_NAME structure (__nm_<symbol>) directly
+ containing imported name. Here comes that "om the edge" problem mentioned
+ above: PE specification rambles that name vector (OriginalFirstThunk)
+ should run in parallel with addresses vector (FirstThunk), i.e. that they
+ should have same number of elements and terminated with zero. We violate
+ this, since FirstThunk points directly into machine code. But in practise,
+ OS loader implemented the sane way: it goes thru OriginalFirstThunk and
+ puts addresses to FirstThunk, not something else. It once again should be
+ noted that dll and symbol name structures are reused across fixup entries
+ and should be there anyway to support standard import stuff, so sustained
+ overhead is 20 bytes per reference. Other question is whether having several
+ IMAGE_IMPORT_DESCRIPTORS for the same DLL is possible. Answer is yes, it is
+ done even by native compiler/linker (libth32's functions are in fact reside
+ in windows9x kernel32.dll, so if you use it, you have two
+ IMAGE_IMPORT_DESCRIPTORS for kernel32.dll). Yet other question is whether
+ referencing the same PE structures several times is valid. The answer is why
+ not, prohibitting that (detecting violation) would require more work on
+ behalf of loader than not doing it.
+
+ See also: ld/emultempl/pe.em. */
- 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
-
- ************************************************************************/
+static void
+add_bfd_to_link PARAMS ((bfd *, const char *, struct bfd_link_info *));
-/* for emultempl/pe.em */
+/* For emultempl/pe.em. */
-def_file *pe_def_file = 0;
+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;
+int pe_dll_extra_pe_debug = 0;
-/************************************************************************
-
- static variables and types
-
- ************************************************************************/
+/* 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;
+typedef struct
+ {
+ char *target_name;
+ char *object_target;
+ unsigned int imagebase_reloc;
+ int pe_arch;
+ int bfd_arch;
+ int underscored;
+ }
+pe_details_type;
+
+typedef struct
+ {
+ char *name;
+ int len;
+ }
+autofilter_entry_type;
#define PE_ARCH_i386 1
#define PE_ARCH_sh 2
#define PE_ARCH_mips 3
#define PE_ARCH_arm 4
+#define PE_ARCH_arm_epoc 5
-static pe_details_type pe_detail_list[] = {
+static pe_details_type pe_detail_list[] =
+{
{
"pei-i386",
"pe-i386",
@@ -124,18 +200,112 @@ static pe_details_type pe_detail_list[] = {
bfd_arch_arm,
0
},
+ {
+ "epoc-pei-arm-little",
+ "epoc-pe-arm-little",
+ 11 /* ARM_RVA32 */,
+ PE_ARCH_arm_epoc,
+ bfd_arch_arm,
+ 0
+ },
{ NULL, NULL, 0, 0, 0, 0 }
};
static pe_details_type *pe_details;
+static autofilter_entry_type autofilter_symbollist[] =
+{
+ { "DllMain@12", 10 },
+ { "DllEntryPoint@0", 15 },
+ { "DllMainCRTStartup@12", 20 },
+ { "_cygwin_dll_entry@12", 20 },
+ { "_cygwin_crt0_common@8", 21 },
+ { "_cygwin_noncygwin_dll_entry@12", 30 },
+ { "impure_ptr", 10 },
+ { NULL, 0 }
+};
+
+/* Do not specify library suffix explicitly, to allow for dllized versions. */
+static autofilter_entry_type autofilter_liblist[] =
+{
+ { "libgcc.", 7 },
+ { "libstdc++.", 10 },
+ { "libmingw32.", 11 },
+ { NULL, 0 }
+};
+
+static autofilter_entry_type autofilter_objlist[] =
+{
+ { "crt0.o", 6 },
+ { "crt1.o", 6 },
+ { "crt2.o", 6 },
+ { "dllcrt1.o", 9 },
+ { "dllcrt2.o", 9 },
+ { "gcrt0.o", 7 },
+ { "gcrt1.o", 7 },
+ { "gcrt2.o", 7 },
+ { NULL, 0 }
+};
+
+static autofilter_entry_type autofilter_symbolprefixlist[] =
+{
+ /* { "__imp_", 6 }, */
+ /* Do __imp_ explicitly to save time. */
+ { "__rtti_", 7 },
+ { "__builtin_", 10 },
+ /* Don't export symbols specifying internal DLL layout. */
+ { "_head_", 6 },
+ { "_fmode", 6 },
+ { "_impure_ptr", 11 },
+ { "cygwin_attach_dll", 17 },
+ { "cygwin_premain0", 15 },
+ { "cygwin_premain1", 15 },
+ { "cygwin_premain2", 15 },
+ { "cygwin_premain3", 15 },
+ { "environ", 7 },
+ { NULL, 0 }
+};
+
+static autofilter_entry_type autofilter_symbolsuffixlist[] =
+{
+ { "_iname", 6 },
+ { NULL, 0 }
+};
+
#define U(str) (pe_details->underscored ? "_" str : str)
+static int reloc_sort PARAMS ((const void *, const void *));
+static int pe_export_sort PARAMS ((const void *, const void *));
+static int auto_export PARAMS ((bfd *, def_file *, const char *));
+static void process_def_file PARAMS ((bfd *, struct bfd_link_info *));
+static void build_filler_bfd PARAMS ((int));
+static void generate_edata PARAMS ((bfd *, struct bfd_link_info *));
+static void fill_exported_offsets PARAMS ((bfd *, struct bfd_link_info *));
+static void fill_edata PARAMS ((bfd *, struct bfd_link_info *));
+static void generate_reloc PARAMS ((bfd *, struct bfd_link_info *));
+static void quoteput PARAMS ((char *, FILE *, int));
+static asection *quick_section PARAMS ((bfd *, const char *, int, int));
+static void quick_symbol
+ PARAMS ((bfd *, const char *, const char *, const char *,
+ asection *, int, int));
+static void quick_reloc PARAMS ((bfd *, int, int, int));
+static bfd *make_head PARAMS ((bfd *));
+static bfd *make_tail PARAMS ((bfd *));
+static bfd *make_one PARAMS ((def_file_export *, bfd *));
+static bfd *make_singleton_name_thunk PARAMS ((const char *, bfd *));
+static char *make_import_fixup_mark PARAMS ((arelent *));
+static bfd *make_import_fixup_entry
+ PARAMS ((const char *, const char *, const char *, bfd *));
+static unsigned int pe_get16 PARAMS ((bfd *, int));
+static unsigned int pe_get32 PARAMS ((bfd *, int));
+static unsigned int pe_as32 PARAMS ((void *));
+
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
|| strcmp (pe_detail_list[i].object_target, target) == 0)
@@ -147,18 +317,16 @@ pe_dll_id_target (target)
exit (1);
}
-/************************************************************************
-
- Helper functions for qsort. Relocs must be sorted so that we can write
- them out by pages.
+/* 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;
+typedef struct
+ {
+ bfd_vma vma;
+ char type;
+ short extra;
+ }
+reloc_data_type;
static int
reloc_sort (va, vb)
@@ -166,6 +334,7 @@ reloc_sort (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);
}
@@ -175,14 +344,11 @@ pe_export_sort (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
-
- ************************************************************************/
+/* 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
@@ -190,7 +356,6 @@ pe_export_sort (va, vb)
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;
@@ -199,10 +364,12 @@ 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;
+typedef struct exclude_list_struct
+ {
+ char *string;
+ struct exclude_list_struct *next;
+ }
+exclude_list_struct;
static struct exclude_list_struct *excludes = 0;
@@ -231,28 +398,106 @@ pe_dll_add_excludes (new_excludes)
free (local_copy);
}
+/* abfd is a bfd containing n (or NULL)
+ It can be used for contextual checks. */
+
static int
-auto_export (d, n)
+auto_export (abfd, d, n)
+ bfd *abfd;
def_file *d;
const char *n;
{
int i;
struct exclude_list_struct *ex;
+ autofilter_entry_type *afptr;
+
+ /* We should not re-export imported stuff. */
+ if (strncmp (n, "_imp__", 6) == 0)
+ return 0;
+
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;
+ const char * p;
+ int len;
+
+ if (pe_dll_extra_pe_debug)
+ printf ("considering exporting: %s, abfd=%p, abfd->my_arc=%p\n",
+ n, abfd, abfd->my_archive);
+
+ /* First of all, make context checks:
+ Don't export anything from libgcc. */
+ if (abfd && abfd->my_archive)
+ {
+ afptr = autofilter_liblist;
+
+ while (afptr->name)
+ {
+ if (strstr (abfd->my_archive->filename, afptr->name))
+ return 0;
+ afptr++;
+ }
+ }
+
+ /* Next, exclude symbols from certain startup objects. */
+
+ if (abfd && (p = lbasename (abfd->filename)))
+ {
+ afptr = autofilter_objlist;
+ while (afptr->name)
+ {
+ if ( strcmp (p, afptr->name) == 0 )
+ return 0;
+ afptr++;
+ }
+ }
+
+ /* Don't try to blindly exclude all symbols
+ that begin with '__'; this was tried and
+ it is too restrictive. */
+
+ /* Then, exclude specific symbols. */
+ afptr = autofilter_symbollist;
+ while (afptr->name)
+ {
+ if (strcmp (n, afptr->name) == 0)
+ return 0;
+
+ afptr ++;
+ }
+
+ /* Next, exclude symbols starting with ... */
+ afptr = autofilter_symbolprefixlist;
+ while (afptr->name)
+ {
+ if (strncmp (n, afptr->name, afptr->len) == 0)
+ return 0;
+
+ afptr ++;
+ }
+
+ /* Finally, exclude symbols ending with ... */
+ len = strlen (n);
+ afptr = autofilter_symbolsuffixlist;
+ while (afptr->name)
+ {
+ if ((len >= afptr->len) &&
+ /* Add 1 to insure match with trailing '\0'. */
+ strncmp (n + len - afptr->len, afptr->name,
+ afptr->len + 1) == 0)
+ return 0;
+
+ afptr ++;
+ }
}
+
for (ex = excludes; ex; ex = ex->next)
if (strcmp (n, ex->string) == 0)
return 0;
+
return 1;
}
@@ -272,7 +517,6 @@ process_def_file (abfd, info)
/* 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");
@@ -280,6 +524,7 @@ process_def_file (abfd, info)
{
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);
@@ -287,7 +532,6 @@ process_def_file (abfd, info)
}
/* 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)
@@ -302,20 +546,37 @@ process_def_file (abfd, info)
for (j = 0; j < nsyms; j++)
{
/* We should export symbols which are either global or not
- anything at all. (.bss data is the latter) */
- if ((symbols[j]->flags & BSF_GLOBAL)
- || (symbols[j]->flags == BSF_NO_FLAGS))
+ anything at all. (.bss data is the latter)
+ We should not export undefined symbols. */
+ if (symbols[j]->section != &bfd_und_section
+ && ((symbols[j]->flags & BSF_GLOBAL)
+ || (symbols[j]->flags == BFD_FORT_COMM_DEFAULT_VALUE)))
{
const char *sn = symbols[j]->name;
+
+ /* We should not re-export imported stuff. */
+ {
+ char *name = (char *) xmalloc (strlen (sn) + 2 + 6);
+ sprintf (name, "%s%s", U("_imp_"), sn);
+
+ blhe = bfd_link_hash_lookup (info->hash, name,
+ false, false, false);
+ free (name);
+
+ if (blhe && blhe->type == bfd_link_hash_defined)
+ continue;
+ }
+
if (*sn == '_')
sn++;
- if (auto_export (pe_def_file, sn))
- {
- def_file_export *p;
- p=def_file_add_export (pe_def_file, sn, 0, -1);
- /* Fill data flag properly, from dlltool.c */
- p->flag_data = !(symbols[j]->flags & BSF_FUNCTION);
- }
+
+ if (auto_export (b, pe_def_file, sn))
+ {
+ def_file_export *p;
+ p=def_file_add_export (pe_def_file, sn, 0, -1);
+ /* Fill data flag properly, from dlltool.c. */
+ p->flag_data = !(symbols[j]->flags & BSF_FUNCTION);
+ }
}
}
}
@@ -325,7 +586,6 @@ process_def_file (abfd, info)
#define NE pe_def_file->num_exports
/* Canonicalize the export list. */
-
if (pe_dll_kill_ats)
{
for (i = 0; i < NE; i++)
@@ -336,6 +596,7 @@ process_def_file (abfd, info)
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;
}
@@ -349,10 +610,12 @@ process_def_file (abfd, info)
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))
+ if (auto_export (NULL, pe_def_file, tmp))
def_file_add_export (pe_def_file, tmp,
- pe_def_file->exports[i].internal_name, -1);
+ pe_def_file->exports[i].internal_name,
+ -1);
else
free (tmp);
}
@@ -394,6 +657,7 @@ process_def_file (abfd, info)
einfo (_("Warning, duplicate EXPORT: %s\n"),
e[j - 1].name);
}
+
if (e[i].ordinal != -1)
e[j - 1].ordinal = e[i].ordinal;
e[j - 1].flag_private |= e[i].flag_private;
@@ -413,6 +677,7 @@ process_def_file (abfd, info)
for (i = 0; i < NE; i++)
{
char *name = (char *) xmalloc (strlen (pe_def_file->exports[i].internal_name) + 2);
+
if (pe_details->underscored)
{
*name = '_';
@@ -473,11 +738,7 @@ process_def_file (abfd, info)
}
}
-/************************************************************************
-
- Build the bfd that will contain .edata and .reloc sections
-
- ************************************************************************/
+/* Build the bfd that will contain .edata and .reloc sections. */
static void
build_filler_bfd (include_edata)
@@ -526,16 +787,13 @@ build_filler_bfd (include_edata)
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
-
- ************************************************************************/
+/* Gather all the exported symbols and build the .edata section. */
static void
generate_edata (abfd, info)
@@ -548,19 +806,15 @@ generate_edata (abfd, info)
/* 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;
- }
+ 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 (*dlnp == '\\' || *dlnp == '/' || *dlnp == ':')
+ dll_name = dlnp + 1;
}
if (count_with_ordinals && max_ordinal > count_exported)
@@ -573,8 +827,8 @@ generate_edata (abfd, info)
min_ordinal = 1;
max_ordinal = count_exported;
}
- export_table_size = max_ordinal - min_ordinal + 1;
+ 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;
@@ -588,6 +842,7 @@ generate_edata (abfd, info)
{
int ei = pe_def_file->exports[i].ordinal - min_ordinal;
int pi = exported_symbols[ei];
+
if (pi != -1)
{
/* xgettext:c-format */
@@ -608,15 +863,15 @@ generate_edata (abfd, info)
if (pe_def_file->exports[i].ordinal == -1)
{
while (exported_symbols[next_ordinal - min_ordinal] != -1)
- next_ordinal++;
+ 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 */
+ 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);
@@ -636,6 +891,7 @@ fill_exported_offsets (abfd, info)
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 = '_';
@@ -649,9 +905,8 @@ fill_exported_offsets (abfd, info)
false, false, true);
if (blhe && (blhe->type == bfd_link_hash_defined))
- {
- exported_symbol_offsets[i] = blhe->u.def.value;
- }
+ exported_symbol_offsets[i] = blhe->u.def.value;
+
free (name);
}
}
@@ -689,6 +944,7 @@ fill_edata (abfd, info)
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;
@@ -706,6 +962,7 @@ fill_edata (abfd, info)
for (i = 0; i < export_table_size; i++)
{
int s = exported_symbols[i];
+
if (s != -1)
{
struct sec *ssec = exported_symbol_sections[s];
@@ -716,6 +973,7 @@ fill_edata (abfd, info)
bfd_put_32 (abfd, srva - image_base,
(void *) (eaddresses + ord - min_ordinal));
+
if (!pe_def_file->exports[s].flag_noname)
{
char *ename = pe_def_file->exports[s].name;
@@ -731,11 +989,62 @@ fill_edata (abfd, info)
}
}
-/************************************************************************
- Gather all the relocations and build the .reloc section
+static struct sec *current_sec;
+
+void
+pe_walk_relocs_of_symbol (info, name, cb)
+ struct bfd_link_info *info;
+ const char *name;
+ int (*cb) (arelent *, asection *);
+{
+ bfd *b;
+ asection *s;
+
+ 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 (s = b->sections; s; s = s->next)
+ {
+ arelent **relocs;
+ int relsize, nrelocs, i;
+ int flags = bfd_get_section_flags (b, s);
+
+ /* Skip discarded linkonce sections. */
+ if (flags & SEC_LINK_ONCE
+ && s->output_section == bfd_abs_section_ptr)
+ continue;
+
+ current_sec = s;
+
+ 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++)
+ {
+ struct symbol_cache_entry *sym = *relocs[i]->sym_ptr_ptr;
+
+ if (!strcmp (name, sym->name))
+ cb (relocs[i], s);
+ }
+
+ free (relocs);
+
+ /* Warning: the allocated symbols are remembered in BFD and reused
+ later, so don't free them! */
+ /* free (symbols); */
+ }
+ }
+}
- ************************************************************************/
+/* Gather all the relocations and build the .reloc section. */
static void
generate_reloc (abfd, info)
@@ -758,7 +1067,8 @@ generate_reloc (abfd, info)
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));
+ reloc_data =
+ (reloc_data_type *) xmalloc (total_relocs * sizeof (reloc_data_type));
total_relocs = 0;
bi = 0;
@@ -801,11 +1111,17 @@ generate_reloc (abfd, info)
for (i = 0; i < nrelocs; i++)
{
+ if (pe_dll_extra_pe_debug)
+ {
+ struct symbol_cache_entry *sym = *relocs[i]->sym_ptr_ptr;
+ printf("rel: %s\n",sym->name);
+ }
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
@@ -859,7 +1175,6 @@ generate_reloc (abfd, info)
/* 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++)
@@ -868,7 +1183,7 @@ generate_reloc (abfd, info)
if (this_page != sec_page)
{
- reloc_sz = (reloc_sz + 3) & ~3; /* 4-byte align */
+ reloc_sz = (reloc_sz + 3) & ~3; /* 4-byte align. */
reloc_sz += 8;
sec_page = this_page;
}
@@ -878,54 +1193,59 @@ generate_reloc (abfd, info)
if (reloc_data[i].type == 4)
reloc_sz += 2;
}
- reloc_sz = (reloc_sz + 3) & ~3; /* 4-byte align */
-
+
+ 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.
-
- ************************************************************************/
+/* Given the exiting def_file structure, print out a .DEF file that
+ corresponds to it. */
static void
quoteput (s, f, needs_quotes)
@@ -934,24 +1254,29 @@ quoteput (s, f, needs_quotes)
int needs_quotes;
{
char *cp;
+
for (cp = s; *cp; cp++)
if (*cp == '\''
|| *cp == '"'
|| *cp == '\\'
- || isspace ((unsigned char) *cp)
+ || ISSPACE (*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
@@ -964,12 +1289,11 @@ pe_dll_generate_def_file (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);
- }
+ /* xgettext:c-format */
+ einfo (_("%s: Can't open output def file %s\n"),
+ program_name, pe_out_def_filename);
if (pe_def_file)
{
@@ -979,7 +1303,9 @@ pe_dll_generate_def_file (pe_out_def_filename)
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);
@@ -1007,6 +1333,7 @@ pe_dll_generate_def_file (pe_out_def_filename)
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);
@@ -1016,48 +1343,62 @@ pe_dll_generate_def_file (pe_out_def_filename)
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");
+ fprintf (out, "EXPORTS\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");
@@ -1068,22 +1409,27 @@ pe_dll_generate_def_file (pe_out_def_filename)
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");
}
}
@@ -1092,17 +1438,11 @@ pe_dll_generate_def_file (pe_out_def_filename)
fprintf (out, _("; no contents available\n"));
if (fclose (out) == EOF)
- {
- /* xgettext:c-format */
- einfo (_("%P: Error closing file `%s'\n"), pe_out_def_filename);
- }
+ /* xgettext:c-format */
+ einfo (_("%P: Error closing file `%s'\n"), pe_out_def_filename);
}
-/************************************************************************
-
- Generate the import library
-
- ************************************************************************/
+/* Generate the import library. */
static asymbol **symtab;
static int symptr;
@@ -1141,15 +1481,16 @@ quick_section (abfd, name, flags, align)
static void
quick_symbol (abfd, n1, n2, n3, sec, flags, addr)
bfd *abfd;
- char *n1;
- char *n2;
- char *n3;
+ const char *n1;
+ const char *n2;
+ const 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);
@@ -1190,6 +1531,7 @@ static void
save_relocs (asection *sec)
{
int i;
+
sec->relocation = reltab;
sec->reloc_count = relcount;
sec->orelocation = (arelent **) xmalloc ((relcount + 1) * sizeof (arelent *));
@@ -1201,24 +1543,22 @@ save_relocs (asection *sec)
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:
- */
+/* .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)
@@ -1258,7 +1598,7 @@ make_head (parent)
d2 = (unsigned char *) xmalloc (20);
id2->contents = d2;
memset (d2, 0, 20);
- d2[0] = d2[16] = 4; /* reloc addend */
+ 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);
@@ -1284,16 +1624,14 @@ make_head (parent)
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"
- */
+/* .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)
@@ -1351,55 +1689,52 @@ make_tail (parent)
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[] = {
+/* .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
- */
+/* _function:
+ mov.l ip+8,r0
+ mov.l @r0,r0
+ jmp @r0
+ nop
+ .dw __imp_function */
-static unsigned char jmp_sh_bytes[] = {
+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
- */
+/* _function:
+ lui $t0,<high:__imp_function>
+ lw $t0,<low:__imp_function>
+ jr $t0
+ nop */
-static unsigned char jmp_mips_bytes[] = {
+static unsigned char jmp_mips_bytes[] =
+{
0x00, 0x00, 0x08, 0x3c, 0x00, 0x00, 0x08, 0x8d,
0x08, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00
};
@@ -1431,6 +1766,8 @@ make_one (exp, parent)
jmp_bytes = jmp_mips_bytes;
jmp_byte_count = sizeof (jmp_mips_bytes);
break;
+ default:
+ abort ();
}
oname = (char *) xmalloc (20);
@@ -1445,7 +1782,7 @@ make_one (exp, parent)
bfd_set_arch_mach (abfd, pe_details->bfd_arch, 0);
symptr = 0;
- symtab = (asymbol **) xmalloc (10 * sizeof (asymbol *));
+ symtab = (asymbol **) xmalloc (11 * 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);
@@ -1455,32 +1792,38 @@ make_one (exp, parent)
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);
+ /* Symbol to reference ord/name of imported
+ symbol, used to implement auto-import. */
+ quick_symbol (abfd, U("_nm__"), exp->internal_name, "", id6, BSF_GLOBAL, 0);
if (pe_dll_compat_implib)
quick_symbol (abfd, U ("__imp_"), exp->internal_name, "",
id5, BSF_GLOBAL, 0);
if (! exp->flag_data)
- {
- 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, 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;
+ default:
+ abort ();
+ }
+ save_relocs (tx);
+ }
bfd_set_section_size (abfd, id7, 4);
d7 = (unsigned char *) xmalloc (4);
@@ -1493,6 +1836,7 @@ make_one (exp, parent)
d5 = (unsigned char *) xmalloc (4);
id5->contents = d5;
memset (d5, 0, 4);
+
if (exp->flag_noname)
{
d5[0] = exp->ordinal;
@@ -1509,6 +1853,7 @@ make_one (exp, parent)
d4 = (unsigned char *) xmalloc (4);
id4->contents = d4;
memset (d4, 0, 4);
+
if (exp->flag_noname)
{
d4[0] = exp->ordinal;
@@ -1553,6 +1898,188 @@ make_one (exp, parent)
return abfd;
}
+static bfd *
+make_singleton_name_thunk (import, parent)
+ const char *import;
+ bfd *parent;
+{
+ /* Name thunks go to idata$4. */
+ asection *id4;
+ unsigned char *d4;
+ char *oname;
+ bfd *abfd;
+
+ oname = (char *) xmalloc (20);
+ sprintf (oname, "nmth%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 (3 * sizeof (asymbol *));
+ id4 = quick_section (abfd, ".idata$4", SEC_HAS_CONTENTS, 2);
+ quick_symbol (abfd, U ("_nm_thnk_"), import, "", id4, BSF_GLOBAL, 0);
+ quick_symbol (abfd, U ("_nm_"), import, "", UNDSEC, BSF_GLOBAL, 0);
+
+ bfd_set_section_size (abfd, id4, 8);
+ d4 = (unsigned char *) xmalloc (4);
+ id4->contents = d4;
+ memset (d4, 0, 8);
+ quick_reloc (abfd, 0, BFD_RELOC_RVA, 2);
+ save_relocs (id4);
+
+ bfd_set_symtab (abfd, symtab, symptr);
+
+ bfd_set_section_contents (abfd, id4, d4, 0, 8);
+
+ bfd_make_readable (abfd);
+ return abfd;
+}
+
+static char *
+make_import_fixup_mark (rel)
+ arelent *rel;
+{
+ /* We convert reloc to symbol, for later reference. */
+ static int counter;
+ static char *fixup_name = NULL;
+ static size_t buffer_len = 0;
+
+ struct symbol_cache_entry *sym = *rel->sym_ptr_ptr;
+
+ bfd *abfd = bfd_asymbol_bfd (sym);
+ struct coff_link_hash_entry *myh = NULL;
+
+ if (!fixup_name)
+ {
+ fixup_name = (char *) xmalloc (384);
+ buffer_len = 384;
+ }
+
+ if (strlen (sym->name) + 25 > buffer_len)
+ /* Assume 25 chars for "__fu" + counter + "_". If counter is
+ bigger than 20 digits long, we've got worse problems than
+ overflowing this buffer... */
+ {
+ free (fixup_name);
+ /* New buffer size is length of symbol, plus 25, but then
+ rounded up to the nearest multiple of 128. */
+ buffer_len = ((strlen (sym->name) + 25) + 127) & ~127;
+ fixup_name = (char *) xmalloc (buffer_len);
+ }
+
+ sprintf (fixup_name, "__fu%d_%s", counter++, sym->name);
+
+ bfd_coff_link_add_one_symbol (&link_info, abfd, fixup_name, BSF_GLOBAL,
+ current_sec, /* sym->section, */
+ rel->address, NULL, true, false,
+ (struct bfd_link_hash_entry **) &myh);
+
+#if 0
+ printf ("type:%d\n", myh->type);
+ printf ("%s\n", myh->root.u.def.section->name);
+#endif
+ return fixup_name;
+}
+
+/* .section .idata$3
+ .rva __nm_thnk_SYM (singleton thunk with name of func)
+ .long 0
+ .long 0
+ .rva __my_dll_iname (name of dll)
+ .rva __fuNN_SYM (pointer to reference (address) in text) */
+
+static bfd *
+make_import_fixup_entry (name, fixup_name, dll_symname,parent)
+ const char *name;
+ const char *fixup_name;
+ const char *dll_symname;
+ bfd *parent;
+{
+ asection *id3;
+ unsigned char *d3;
+ char *oname;
+ bfd *abfd;
+
+ oname = (char *) xmalloc (20);
+ sprintf (oname, "fu%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 *));
+ id3 = quick_section (abfd, ".idata$3", SEC_HAS_CONTENTS, 2);
+
+#if 0
+ quick_symbol (abfd, U ("_head_"), dll_symname, "", id2, BSF_GLOBAL, 0);
+#endif
+ quick_symbol (abfd, U ("_nm_thnk_"), name, "", UNDSEC, BSF_GLOBAL, 0);
+ quick_symbol (abfd, U (""), dll_symname, "_iname", UNDSEC, BSF_GLOBAL, 0);
+ quick_symbol (abfd, "", fixup_name, "", UNDSEC, BSF_GLOBAL, 0);
+
+ bfd_set_section_size (abfd, id3, 20);
+ d3 = (unsigned char *) xmalloc (20);
+ id3->contents = d3;
+ memset (d3, 0, 20);
+
+ quick_reloc (abfd, 0, BFD_RELOC_RVA, 1);
+ quick_reloc (abfd, 12, BFD_RELOC_RVA, 2);
+ quick_reloc (abfd, 16, BFD_RELOC_RVA, 3);
+ save_relocs (id3);
+
+ bfd_set_symtab (abfd, symtab, symptr);
+
+ bfd_set_section_contents (abfd, id3, d3, 0, 20);
+
+ bfd_make_readable (abfd);
+ return abfd;
+}
+
+void
+pe_create_import_fixup (rel)
+ arelent *rel;
+{
+ char buf[300];
+ struct symbol_cache_entry *sym = *rel->sym_ptr_ptr;
+ struct bfd_link_hash_entry *name_thunk_sym;
+ const char *name = sym->name;
+ char *fixup_name = make_import_fixup_mark (rel);
+
+ sprintf (buf, U ("_nm_thnk_%s"), name);
+
+ name_thunk_sym = bfd_link_hash_lookup (link_info.hash, buf, 0, 0, 1);
+
+ if (!name_thunk_sym || name_thunk_sym->type != bfd_link_hash_defined)
+ {
+ bfd *b = make_singleton_name_thunk (name, output_bfd);
+ add_bfd_to_link (b, b->filename, &link_info);
+
+ /* If we ever use autoimport, we have to cast text section writable. */
+ config.text_read_only = false;
+ }
+
+ {
+ extern char * pe_data_import_dll;
+ char * dll_symname = pe_data_import_dll ? pe_data_import_dll : "unknown";
+
+ bfd *b = make_import_fixup_entry (name, fixup_name, dll_symname,
+ output_bfd);
+ add_bfd_to_link (b, b->filename, &link_info);
+ }
+}
+
+
void
pe_dll_generate_implib (def, impfilename)
def_file *def;
@@ -1567,7 +2094,7 @@ pe_dll_generate_implib (def, impfilename)
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]))
+ if (!ISALNUM (dll_symname[i]))
dll_symname[i] = '_';
unlink (impfilename);
@@ -1588,7 +2115,6 @@ pe_dll_generate_implib (def, impfilename)
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++)
@@ -1596,6 +2122,7 @@ pe_dll_generate_implib (def, impfilename)
/* 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;
@@ -1609,7 +2136,6 @@ pe_dll_generate_implib (def, impfilename)
return;
/* Now stick them all into the archive. */
-
ar_head->next = head;
ar_tail->next = ar_head;
head = ar_tail;
@@ -1631,15 +2157,17 @@ pe_dll_generate_implib (def, impfilename)
static void
add_bfd_to_link (abfd, name, link_info)
bfd *abfd;
- char *name;
+ const 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 ()));
}
@@ -1650,6 +2178,7 @@ pe_process_import_defs (output_bfd, link_info)
struct bfd_link_info *link_info;
{
def_file_module *module;
+
pe_dll_id_target (bfd_get_target (output_bfd));
if (!pe_def_file)
@@ -1662,7 +2191,7 @@ pe_process_import_defs (output_bfd, link_info)
dll_filename = module->name;
dll_symname = xstrdup (module->name);
for (i = 0; dll_symname[i]; i++)
- if (!isalnum (dll_symname[i]))
+ if (!ISALNUM (dll_symname[i]))
dll_symname[i] = '_';
do_this_dll = 0;
@@ -1718,13 +2247,9 @@ pe_process_import_defs (output_bfd, link_info)
}
}
-/************************************************************************
-
- 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.
-
- ************************************************************************/
+/* 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)
@@ -1732,8 +2257,9 @@ pe_get16 (abfd, where)
int where;
{
unsigned char b[2];
- bfd_seek (abfd, where, SEEK_SET);
- bfd_read (b, 1, 2, abfd);
+
+ bfd_seek (abfd, (file_ptr) where, SEEK_SET);
+ bfd_bread (b, (bfd_size_type) 2, abfd);
return b[0] + (b[1] << 8);
}
@@ -1743,8 +2269,9 @@ pe_get32 (abfd, where)
int where;
{
unsigned char b[4];
- bfd_seek (abfd, where, SEEK_SET);
- bfd_read (b, 1, 4, abfd);
+
+ bfd_seek (abfd, (file_ptr) where, SEEK_SET);
+ bfd_bread (b, (bfd_size_type) 4, abfd);
return b[0] + (b[1] << 8) + (b[2] << 16) + (b[3] << 24);
}
@@ -1755,6 +2282,7 @@ pe_as16 (ptr)
void *ptr;
{
unsigned char *b = ptr;
+
return b[0] + (b[1] << 8);
}
@@ -1765,6 +2293,7 @@ pe_as32 (ptr)
void *ptr;
{
unsigned char *b = ptr;
+
return b[0] + (b[1] << 8) + (b[2] << 16) + (b[3] << 24);
}
@@ -1781,13 +2310,13 @@ pe_implied_import_dll (filename)
/* 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))
{
@@ -1803,14 +2332,17 @@ pe_implied_import_dll (filename)
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 */
+
+ 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];
@@ -1818,8 +2350,10 @@ pe_implied_import_dll (filename)
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);
+
+ bfd_seek (dll, (file_ptr) secptr1, SEEK_SET);
+ bfd_bread (sname, (bfd_size_type) 8, dll);
+
if (vaddr <= export_rva && vaddr + vsize > export_rva)
{
expptr = fptr + (export_rva - vaddr);
@@ -1830,8 +2364,8 @@ pe_implied_import_dll (filename)
}
expdata = (unsigned char *) xmalloc (export_size);
- bfd_seek (dll, expptr, SEEK_SET);
- bfd_read (expdata, 1, export_size, dll);
+ bfd_seek (dll, (file_ptr) expptr, SEEK_SET);
+ bfd_bread (expdata, (bfd_size_type) export_size, dll);
erva = expdata - export_rva;
if (pe_def_file == 0)
@@ -1841,10 +2375,12 @@ pe_implied_import_dll (filename)
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);
}
@@ -1852,14 +2388,10 @@ pe_implied_import_dll (filename)
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.
-
- ************************************************************************/
+/* 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)
@@ -1897,7 +2429,7 @@ pe_dll_fill_sections (abfd, info)
/* Resize the sections. */
lang_size_sections (stat_ptr->head, abs_output_section,
- &stat_ptr->head, 0, (bfd_vma) 0, false);
+ &stat_ptr->head, 0, (bfd_vma) 0, NULL);
/* Redo special stuff. */
ldemul_after_allocation ();
@@ -1931,7 +2463,7 @@ pe_exe_fill_sections (abfd, info)
/* Resize the sections. */
lang_size_sections (stat_ptr->head, abs_output_section,
- &stat_ptr->head, 0, (bfd_vma) 0, false);
+ &stat_ptr->head, 0, (bfd_vma) 0, NULL);
/* Redo special stuff. */
ldemul_after_allocation ();
diff --git a/contrib/binutils/ld/pe-dll.h b/contrib/binutils/ld/pe-dll.h
index b1b5602..f5e9324 100644
--- a/contrib/binutils/ld/pe-dll.h
+++ b/contrib/binutils/ld/pe-dll.h
@@ -33,6 +33,7 @@ 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 int pe_dll_extra_pe_debug;
extern void pe_dll_id_target PARAMS ((const char *));
extern void pe_dll_add_excludes PARAMS ((const char *));
@@ -45,4 +46,9 @@ 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 *));
+extern void pe_walk_relocs_of_symbol PARAMS ((struct bfd_link_info * info,
+ CONST char *name,
+ int (*cb) (arelent *, asection *)));
+
+extern void pe_create_import_fixup PARAMS ((arelent * rel));
#endif /* PE_DLL_H */
diff --git a/contrib/binutils/ld/po/ld.pot b/contrib/binutils/ld/po/ld.pot
index 584dca5..bff203ff 100644
--- a/contrib/binutils/ld/po/ld.pot
+++ b/contrib/binutils/ld/po/ld.pot
@@ -6,252 +6,273 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2000-12-26 12:54-0800\n"
+"POT-Creation-Date: 2002-01-17 13:58+0000\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"
+"Content-Transfer-Encoding: 8bit\n"
-#: emultempl/armcoff.em:70
+#: emultempl/armcoff.em:71
msgid " --support-old-code Support interworking with old code\n"
msgstr ""
-#: emultempl/armcoff.em:71
+#: emultempl/armcoff.em:72
msgid " --thumb-entry=<sym> Set the entry point to be Thumb symbol <sym>\n"
msgstr ""
-#: emultempl/armcoff.em:140
+#: emultempl/armcoff.em:141
#, c-format
msgid "Errors encountered processing file %s"
msgstr ""
-#: emultempl/armcoff.em:206 emultempl/pe.em:1211
+#: emultempl/armcoff.em:207 emultempl/pe.em:1414
msgid "%P: warning: '--thumb-entry %s' is overriding '-e %s'\n"
msgstr ""
-#: emultempl/armcoff.em:211 emultempl/pe.em:1216
+#: emultempl/armcoff.em:212 emultempl/pe.em:1419
msgid "%P: warning: connot find thumb start symbol %s\n"
msgstr ""
-#: emultempl/pe.em:266
+#: emultempl/pe.em:315
msgid ""
" --base_file <basefile> Generate a base file for relocatable "
"DLLs\n"
msgstr ""
-#: emultempl/pe.em:267
+#: emultempl/pe.em:316
msgid ""
" --dll Set image base to the default for DLLs\n"
msgstr ""
-#: emultempl/pe.em:268
+#: emultempl/pe.em:317
msgid " --file-alignment <size> Set file alignment\n"
msgstr ""
-#: emultempl/pe.em:269
+#: emultempl/pe.em:318
msgid " --heap <size> Set initial size of the heap\n"
msgstr ""
-#: emultempl/pe.em:270
+#: emultempl/pe.em:319
msgid ""
" --image-base <address> Set start address of the executable\n"
msgstr ""
-#: emultempl/pe.em:271
+#: emultempl/pe.em:320
msgid ""
" --major-image-version <number> Set version number of the executable\n"
msgstr ""
-#: emultempl/pe.em:272
+#: emultempl/pe.em:321
msgid " --major-os-version <number> Set minimum required OS version\n"
msgstr ""
-#: emultempl/pe.em:273
+#: emultempl/pe.em:322
msgid ""
" --major-subsystem-version <number> Set minimum required OS subsystem "
"version\n"
msgstr ""
-#: emultempl/pe.em:274
+#: emultempl/pe.em:323
msgid ""
" --minor-image-version <number> Set revision number of the executable\n"
msgstr ""
-#: emultempl/pe.em:275
+#: emultempl/pe.em:324
msgid " --minor-os-version <number> Set minimum required OS revision\n"
msgstr ""
-#: emultempl/pe.em:276
+#: emultempl/pe.em:325
msgid ""
" --minor-subsystem-version <number> Set minimum required OS subsystem "
"revision\n"
msgstr ""
-#: emultempl/pe.em:277
+#: emultempl/pe.em:326
msgid " --section-alignment <size> Set section alignment\n"
msgstr ""
-#: emultempl/pe.em:278
+#: emultempl/pe.em:327
msgid " --stack <size> Set size of the initial stack\n"
msgstr ""
-#: emultempl/pe.em:279
+#: emultempl/pe.em:328
msgid ""
" --subsystem <name>[:<version>] Set required OS subsystem [& version]\n"
msgstr ""
-#: emultempl/pe.em:280
+#: emultempl/pe.em:329
msgid ""
" --support-old-code Support interworking with old code\n"
msgstr ""
-#: emultempl/pe.em:281
+#: emultempl/pe.em:330
msgid ""
" --thumb-entry=<symbol> Set the entry point to be Thumb "
"<symbol>\n"
msgstr ""
-#: emultempl/pe.em:283
+#: emultempl/pe.em:332
msgid ""
" --add-stdcall-alias Export symbols with and without @nn\n"
msgstr ""
-#: emultempl/pe.em:284
+#: emultempl/pe.em:333
msgid " --disable-stdcall-fixup Don't link _sym to _sym@nn\n"
msgstr ""
-#: emultempl/pe.em:285
+#: emultempl/pe.em:334
msgid ""
" --enable-stdcall-fixup Link _sym to _sym@nn without warnings\n"
msgstr ""
-#: emultempl/pe.em:286
+#: emultempl/pe.em:335
msgid ""
" --exclude-symbols sym,sym,... Exclude symbols from automatic export\n"
msgstr ""
-#: emultempl/pe.em:287
+#: emultempl/pe.em:336
msgid ""
" --export-all-symbols Automatically export all globals to "
"DLL\n"
msgstr ""
-#: emultempl/pe.em:288
+#: emultempl/pe.em:337
msgid " --kill-at Remove @nn from exported symbols\n"
msgstr ""
-#: emultempl/pe.em:289
+#: emultempl/pe.em:338
msgid " --out-implib <file> Generate import library\n"
msgstr ""
-#: emultempl/pe.em:290
+#: emultempl/pe.em:339
msgid ""
" --output-def <file> Generate a .DEF file for the built DLL\n"
msgstr ""
-#: emultempl/pe.em:291
+#: emultempl/pe.em:340
msgid " --warn-duplicate-exports Warn about duplicate exports.\n"
msgstr ""
-#: emultempl/pe.em:292
+#: emultempl/pe.em:341
msgid ""
" --compat-implib Create backward compatible import "
"libs;\n"
+" create __imp_<SYMBOL> as well.\n"
msgstr ""
-#: emultempl/pe.em:293
-msgid " create __imp_<SYMBOL> as well.\n"
-msgstr ""
-
-#: emultempl/pe.em:294
+#: emultempl/pe.em:343
msgid ""
" --enable-auto-image-base Automatically choose image base for "
"DLLs\n"
+" unless user specifies one\n"
msgstr ""
-#: emultempl/pe.em:295
-msgid " unless user specifies one\n"
-msgstr ""
-
-#: emultempl/pe.em:296
+#: emultempl/pe.em:345
msgid ""
" --disable-auto-image-base Do not auto-choose image base. "
"(default)\n"
msgstr ""
-#: emultempl/pe.em:297
+#: emultempl/pe.em:346
msgid ""
" --dll-search-prefix=<string> When linking dynamically to a dll "
-"witout an\n"
+"without an\n"
+" importlib, use <string><basename>."
+"dll \n"
+" in preference to lib<basename>.dll \n"
msgstr ""
-#: emultempl/pe.em:298
+#: emultempl/pe.em:349
msgid ""
-" importlib, use <string><basename>.dll "
-"\n"
+" --enable-auto-import Do sophistcated linking of _sym to \n"
+" __imp_sym for DATA references\n"
msgstr ""
-#: emultempl/pe.em:299
+#: emultempl/pe.em:351
msgid ""
-" in preference to lib<basename>.dll \n"
+" --disable-auto-import Do not auto-import DATA items from "
+"DLLs\n"
msgstr ""
-#: emultempl/pe.em:367
+#: emultempl/pe.em:352
+msgid ""
+" --enable-extra-pe-debug Enable verbose debug output when "
+"building\n"
+" or linking to DLLs (esp. auto-"
+"import)\n"
+msgstr ""
+
+#: emultempl/pe.em:421
msgid "%P: warning: bad version number in -subsystem option\n"
msgstr ""
-#: emultempl/pe.em:403
+#: emultempl/pe.em:457
msgid "%P%F: invalid subsystem type %s\n"
msgstr ""
-#: emultempl/pe.em:418
+#: emultempl/pe.em:472
msgid "%P%F: invalid hex number for PE parameter '%s'\n"
msgstr ""
-#: emultempl/pe.em:436
+#: emultempl/pe.em:490
msgid "%P%F: strange hex info for PE parameter '%s'\n"
msgstr ""
-#: emultempl/pe.em:475
+#: emultempl/pe.em:529
#, c-format
msgid "%s: Can't open base file %s\n"
msgstr ""
-#: emultempl/pe.em:668
+#: emultempl/pe.em:731
msgid "%P: warning, file alignment > section alignment.\n"
msgstr ""
-#: emultempl/pe.em:739 emultempl/pe.em:765
+#: emultempl/pe.em:815 emultempl/pe.em:841
#, c-format
msgid "Warning: resolving %s by linking to %s\n"
msgstr ""
-#: emultempl/pe.em:744 emultempl/pe.em:770
+#: emultempl/pe.em:820 emultempl/pe.em:846
msgid "Use --enable-stdcall-fixup to disable these warnings\n"
msgstr ""
-#: emultempl/pe.em:745 emultempl/pe.em:771
+#: emultempl/pe.em:821 emultempl/pe.em:847
msgid "Use --disable-stdcall-fixup to disable these fixups\n"
msgstr ""
-#: emultempl/pe.em:788
+#: emultempl/pe.em:872
+msgid "%C: Cannot get section contents - auto-import exception\n"
+msgstr ""
+
+#: emultempl/pe.em:880
+msgid ""
+"%C: variable '%T' can't be auto-imported. Please read the documentation for "
+"ld's --enable-auto-import for details.\n"
+msgstr ""
+
+#: emultempl/pe.em:908
+#, c-format
+msgid "Warning: resolving %s by linking to %s (auto-import)\n"
+msgstr ""
+
+#: emultempl/pe.em:989
msgid "%F%P: PE operations on non PE file.\n"
msgstr ""
-#: emultempl/pe.em:1015
+#: emultempl/pe.em:1218
#, c-format
msgid "Errors encountered processing file %s\n"
msgstr ""
-#: emultempl/pe.em:1038
+#: emultempl/pe.em:1241
#, c-format
msgid "Errors encountered processing file %s for interworking"
msgstr ""
-#: emultempl/pe.em:1094 ldlang.c:1981 ldlang.c:4347 ldlang.c:4380
-#: ldmain.c:1016
+#: emultempl/pe.em:1297 ldlang.c:2050 ldlang.c:4441 ldlang.c:4474
+#: ldmain.c:1067
msgid "%P%F: bfd_link_hash_lookup failed: %E\n"
msgstr ""
@@ -282,19 +303,19 @@ msgstr ""
msgid "No symbols\n"
msgstr ""
-#: ldcref.c:364
+#: ldcref.c:400
msgid "%P: symbol `%T' missing from main hash table\n"
msgstr ""
-#: ldcref.c:435
+#: ldcref.c:465
msgid "%B%F: could not read symbols; %E\n"
msgstr ""
-#: ldcref.c:439 ldmain.c:1082 ldmain.c:1086
+#: ldcref.c:469 ldmain.c:1133 ldmain.c:1137
msgid "%B%F: could not read symbols: %E\n"
msgstr ""
-#: ldcref.c:511 ldcref.c:518 ldmain.c:1132 ldmain.c:1139
+#: ldcref.c:537 ldcref.c:544 ldmain.c:1183 ldmain.c:1190
msgid "%B%F: could not read relocs: %E\n"
msgstr ""
@@ -302,355 +323,361 @@ msgstr ""
#. 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:536
+#: ldcref.c:563
msgid "%X%C: prohibited cross reference from %s to `%T' in %s\n"
msgstr ""
-#: ldctor.c:89
+#: ldctor.c:88
msgid "%P%X: Different relocs used in set %s\n"
msgstr ""
-#: ldctor.c:107
+#: ldctor.c:106
msgid "%P%X: Different object file formats composing set %s\n"
msgstr ""
-#: ldctor.c:289 ldctor.c:303
+#: ldctor.c:288 ldctor.c:302
msgid "%P%X: %s does not support reloc %s for set %s\n"
msgstr ""
-#: ldctor.c:324
+#: ldctor.c:323
msgid "%P%X: Unsupported size %d for set %s\n"
msgstr ""
-#: ldctor.c:345
+#: ldctor.c:344
msgid ""
"\n"
"Set Symbol\n"
"\n"
msgstr ""
-#: ldemul.c:220
+#: ldemul.c:225
msgid "%S SYSLIB ignored\n"
msgstr ""
-#: ldemul.c:227
+#: ldemul.c:232
msgid "%S HLL ignored\n"
msgstr ""
-#: ldemul.c:248
+#: ldemul.c:253
msgid "%P: unrecognised emulation mode: %s\n"
msgstr ""
-#: ldemul.c:249
+#: ldemul.c:254
msgid "Supported emulations: "
msgstr ""
-#: ldemul.c:293
+#: ldemul.c:298
msgid " no emulation specific options.\n"
msgstr ""
-#: ldexp.c:154
+#: ldexp.c:163
msgid "%F%P: %s uses undefined section %s\n"
msgstr ""
-#: ldexp.c:156
+#: ldexp.c:165
msgid "%F%P: %s forward reference of section %s\n"
msgstr ""
-#: ldexp.c:268
+#: ldexp.c:277
msgid "%F%S %% by zero\n"
msgstr ""
-#: ldexp.c:275
+#: ldexp.c:284
msgid "%F%S / by zero\n"
msgstr ""
-#: ldexp.c:398
+#: ldexp.c:408
msgid "%X%S: unresolvable symbol `%s' referenced in expression\n"
msgstr ""
-#: ldexp.c:417
+#: ldexp.c:427
msgid "%F%S: undefined symbol `%s' referenced in expression\n"
msgstr ""
-#: ldexp.c:600
+#: ldexp.c:611
msgid "%F%S can not PROVIDE assignment to location counter\n"
msgstr ""
-#: ldexp.c:610
+#: ldexp.c:621
msgid "%F%S invalid assignment to location counter\n"
msgstr ""
-#: ldexp.c:614
+#: ldexp.c:625
msgid "%F%S assignment to location counter invalid outside of SECTION\n"
msgstr ""
-#: ldexp.c:624
+#: ldexp.c:634
msgid "%F%S cannot move location counter backwards (from %V to %V)\n"
msgstr ""
-#: ldexp.c:652
+#: ldexp.c:661
msgid "%P%F:%s: hash creation failed\n"
msgstr ""
-#: ldexp.c:951
+#: ldexp.c:963
msgid "%F%S nonconstant expression for %s\n"
msgstr ""
-#: ldexp.c:984
+#: ldexp.c:993
msgid "%F%S non constant expression for %s\n"
msgstr ""
-#: ldfile.c:102
+#: ldfile.c:105
#, c-format
msgid "attempt to open %s failed\n"
msgstr ""
-#: ldfile.c:104
+#: ldfile.c:107
#, c-format
msgid "attempt to open %s succeeded\n"
msgstr ""
-#: ldfile.c:110
+#: ldfile.c:113
msgid "%F%P: invalid BFD target `%s'\n"
msgstr ""
-#: ldfile.c:134
+#: ldfile.c:137
msgid "%P: skipping incompatible %s when searching for %s\n"
msgstr ""
-#: ldfile.c:226
+#: ldfile.c:229
msgid "%F%P: cannot open %s for %s: %E\n"
msgstr ""
-#: ldfile.c:229
+#: ldfile.c:232
msgid "%F%P: cannot open %s: %E\n"
msgstr ""
-#: ldfile.c:250
+#: ldfile.c:262
msgid "%F%P: cannot find %s\n"
msgstr ""
-#: ldfile.c:269 ldfile.c:285
+#: ldfile.c:281 ldfile.c:297
#, c-format
msgid "cannot find script file %s\n"
msgstr ""
-#: ldfile.c:271 ldfile.c:287
+#: ldfile.c:283 ldfile.c:299
#, c-format
msgid "opened script file %s\n"
msgstr ""
-#: ldfile.c:336
+#: ldfile.c:348
msgid "%P%F: cannot open linker script file %s: %E\n"
msgstr ""
-#: ldfile.c:373
+#: ldfile.c:386
msgid "%P%F: unknown architecture: %s\n"
msgstr ""
-#: ldfile.c:389
+#: ldfile.c:402
msgid "%P%F: target architecture respecified\n"
msgstr ""
-#: ldfile.c:444
+#: ldfile.c:456
msgid "%P%F: cannot represent machine `%s'\n"
msgstr ""
-#: ldlang.c:736
+#: ldlang.c:771
msgid ""
"\n"
"Memory Configuration\n"
"\n"
msgstr ""
-#: ldlang.c:738
+#: ldlang.c:773
msgid "Name"
msgstr ""
-#: ldlang.c:738
+#: ldlang.c:773
msgid "Origin"
msgstr ""
-#: ldlang.c:738
+#: ldlang.c:773
msgid "Length"
msgstr ""
-#: ldlang.c:738
+#: ldlang.c:773
msgid "Attributes"
msgstr ""
-#: ldlang.c:780
+#: ldlang.c:815
msgid ""
"\n"
"Linker script and memory map\n"
"\n"
msgstr ""
-#: ldlang.c:797
-msgid "%P%F: Illegal use of `%s' section"
+#: ldlang.c:832
+msgid "%P%F: Illegal use of `%s' section\n"
msgstr ""
-#: ldlang.c:807
+#: ldlang.c:842
msgid "%P%F: output format %s cannot represent section called %s\n"
msgstr ""
-#: ldlang.c:969
+#: ldlang.c:1004
msgid "%P: %B: warning: ignoring duplicate section `%s'\n"
msgstr ""
-#: ldlang.c:972
+#: ldlang.c:1007
msgid "%P: %B: warning: ignoring duplicate `%s' section symbol `%s'\n"
msgstr ""
-#: ldlang.c:986
+#: ldlang.c:1021
msgid "%P: %B: warning: duplicate section `%s' has different size\n"
msgstr ""
-#: ldlang.c:1037
+#: ldlang.c:1069
msgid "%P%F: Failed to create hash table\n"
msgstr ""
-#: ldlang.c:1427
+#: ldlang.c:1484
msgid "%B: file not recognized: %E\n"
msgstr ""
-#: ldlang.c:1428
+#: ldlang.c:1485
msgid "%B: matching formats:"
msgstr ""
-#: ldlang.c:1435
+#: ldlang.c:1492
msgid "%F%B: file not recognized: %E\n"
msgstr ""
-#: ldlang.c:1488
-msgid "%F%B: object %B in archive is not object\n"
+#: ldlang.c:1548
+msgid "%F%B: member %B in archive is not an object\n"
msgstr ""
-#: ldlang.c:1494 ldlang.c:1506
+#: ldlang.c:1559 ldlang.c:1573
msgid "%F%B: could not read symbols: %E\n"
msgstr ""
-#: ldlang.c:1766
+#: ldlang.c:1834
msgid ""
"%P: warning: could not find any targets that match endianness requirement\n"
msgstr ""
-#: ldlang.c:1779
+#: ldlang.c:1847
msgid "%P%F: target %s not found\n"
msgstr ""
-#: ldlang.c:1781
+#: ldlang.c:1849
msgid "%P%F: cannot open output file %s: %E\n"
msgstr ""
-#: ldlang.c:1791
+#: ldlang.c:1859
msgid "%P%F:%s: can not make object file: %E\n"
msgstr ""
-#: ldlang.c:1795
+#: ldlang.c:1863
msgid "%P%F:%s: can not set architecture: %E\n"
msgstr ""
-#: ldlang.c:1799
+#: ldlang.c:1867
msgid "%P%F: can not create link hash table: %E\n"
msgstr ""
-#: ldlang.c:2104
+#: ldlang.c:2169
msgid " load address 0x%V"
msgstr ""
-#: ldlang.c:2234
+#: ldlang.c:2299
msgid "%W (size before relaxing)\n"
msgstr ""
-#: ldlang.c:2316
+#: ldlang.c:2381
#, c-format
msgid "Address of section %s set to "
msgstr ""
-#: ldlang.c:2465
+#: ldlang.c:2535
#, c-format
msgid "Fail with %d\n"
msgstr ""
-#: ldlang.c:2703
+#: ldlang.c:2777
msgid "%X%P: section %s [%V -> %V] overlaps section %s [%V -> %V]\n"
msgstr ""
-#: ldlang.c:2737
+#: ldlang.c:2806
msgid "%X%P: address 0x%v of %B section %s is not within region %s\n"
msgstr ""
-#: ldlang.c:2745
+#: ldlang.c:2814
msgid "%X%P: region %s is full (%B section %s)\n"
msgstr ""
-#: ldlang.c:2794
+#: ldlang.c:2864
msgid "%P%X: Internal error on COFF shared library section %s\n"
msgstr ""
-#: ldlang.c:2835
+#: ldlang.c:2906
msgid "%P: warning: no memory region specified for section `%s'\n"
msgstr ""
-#: ldlang.c:2848
+#: ldlang.c:2921
msgid "%P: warning: changing start of section %s by %u bytes\n"
msgstr ""
-#: ldlang.c:2862
+#: ldlang.c:2935
msgid "%F%S: non constant address expression for section %s\n"
msgstr ""
-#: ldlang.c:2927
+#: ldlang.c:2999
msgid "%X%P: use an absolute load address or a load memory region, not both\n"
msgstr ""
-#: ldlang.c:3043
+#: ldlang.c:3114
msgid "%P%F: can't relax section: %E\n"
msgstr ""
-#: ldlang.c:3210
+#: ldlang.c:3273
msgid "%F%P: invalid data statement\n"
msgstr ""
-#: ldlang.c:3247
+#: ldlang.c:3310
msgid "%F%P: invalid reloc statement\n"
msgstr ""
-#: ldlang.c:3383
+#: ldlang.c:3448
msgid "%P%F:%s: can't set start address\n"
msgstr ""
-#: ldlang.c:3396 ldlang.c:3413
+#: ldlang.c:3461 ldlang.c:3478
msgid "%P%F: can't set start address\n"
msgstr ""
-#: ldlang.c:3408
+#: ldlang.c:3473
msgid "%P: warning: cannot find entry symbol %s; defaulting to %V\n"
msgstr ""
-#: ldlang.c:3418
+#: ldlang.c:3483
msgid "%P: warning: cannot find entry symbol %s; not setting start address\n"
msgstr ""
-#: ldlang.c:3460
+#: ldlang.c:3525
msgid ""
"%P: warning: %s architecture of input file `%B' is incompatible with %s "
"output\n"
msgstr ""
-#: ldlang.c:3478
+#: ldlang.c:3538
+msgid ""
+"%P%F: Relocatable linking with relocations from format %s (%B) to format %s "
+"(%B) is not supported\n"
+msgstr ""
+
+#: ldlang.c:3558
msgid "%E%X: failed to merge target specific data of file %B\n"
msgstr ""
-#: ldlang.c:3565
+#: ldlang.c:3647
msgid ""
"\n"
"Allocating common symbols\n"
msgstr ""
-#: ldlang.c:3566
+#: ldlang.c:3648
msgid ""
"Common symbol size file\n"
"\n"
@@ -659,288 +686,311 @@ msgstr ""
#. This message happens when using the
#. svr3.ifile linker script, so I have
#. disabled it.
-#: ldlang.c:3648
+#: ldlang.c:3730
msgid "%P: no [COMMON] command, defaulting to .bss\n"
msgstr ""
-#: ldlang.c:3707
+#: ldlang.c:3789
msgid "%P%F: invalid syntax in flags\n"
msgstr ""
-#: ldlang.c:4296
+#: ldlang.c:4390
msgid "%P%Fmultiple STARTUP files\n"
msgstr ""
-#: ldlang.c:4566
+#: ldlang.c:4658
msgid "%F%P: bfd_record_phdr failed: %E\n"
msgstr ""
-#: ldlang.c:4585
+#: ldlang.c:4677
msgid "%X%P: section `%s' assigned to non-existent phdr `%s'\n"
msgstr ""
-#: ldlang.c:4893
+#: ldlang.c:5003
msgid "%X%P: unknown language `%s' in version information\n"
msgstr ""
-#: ldlang.c:4942
+#: ldlang.c:5055
+msgid ""
+"%X%P: anonymous version tag cannot be combined with other version tags\n"
+msgstr ""
+
+#: ldlang.c:5062
msgid "%X%P: duplicate version tag `%s'\n"
msgstr ""
-#: ldlang.c:4955 ldlang.c:4968
+#: ldlang.c:5075 ldlang.c:5088
msgid "%X%P: duplicate expression `%s' in version information\n"
msgstr ""
-#: ldlang.c:5005
+#: ldlang.c:5130
msgid "%X%P: unable to find version dependency `%s'\n"
msgstr ""
-#: ldlang.c:5027
-msgid "%X%P: unable to read .exports section contents"
+#: ldlang.c:5152
+msgid "%X%P: unable to read .exports section contents\n"
msgstr ""
-#: ldmain.c:192
+#: ldmain.c:195
msgid "%X%P: can't set BFD default target to `%s': %E\n"
msgstr ""
-#: ldmain.c:268
+#: ldmain.c:284
msgid "%P%F: -r and --mpc860c0 may not be used together\n"
msgstr ""
-#: ldmain.c:270
+#: ldmain.c:286
msgid "%P%F: --relax and -r may not be used together\n"
msgstr ""
-#: ldmain.c:272
+#: ldmain.c:288
msgid "%P%F: -r and -shared may not be used together\n"
msgstr ""
-#: ldmain.c:301
-msgid "using internal linker script:\n"
+#: ldmain.c:294
+msgid "%P%F: -F may not be used without -shared\n"
+msgstr ""
+
+#: ldmain.c:296
+msgid "%P%F: -f may not be used without -shared\n"
msgstr ""
-#: ldmain.c:320
+#: ldmain.c:334
+#, c-format
+msgid "using %s linker script:\n"
+msgstr ""
+
+#: ldmain.c:369
msgid "%P%F: no input files\n"
msgstr ""
-#: ldmain.c:325
+#: ldmain.c:374
msgid "%P: mode %s\n"
msgstr ""
-#: ldmain.c:342
+#: ldmain.c:391
msgid "%P%F: cannot open map file %s: %E\n"
msgstr ""
-#: ldmain.c:389
+#: ldmain.c:438
msgid "%P: link errors found, deleting executable `%s'\n"
msgstr ""
-#: ldmain.c:400
+#: ldmain.c:449
msgid "%F%B: final close failed: %E\n"
msgstr ""
-#: ldmain.c:424
+#: ldmain.c:473
msgid "%X%P: unable to open for source of copy `%s'\n"
msgstr ""
-#: ldmain.c:426
+#: ldmain.c:475
msgid "%X%P: unable to open for destination of copy `%s'\n"
msgstr ""
-#: ldmain.c:432
+#: ldmain.c:481
msgid "%P: Error writing file `%s'\n"
msgstr ""
-#: ldmain.c:438 pe-dll.c:1097
+#: ldmain.c:487 pe-dll.c:1442
#, c-format
msgid "%P: Error closing file `%s'\n"
msgstr ""
-#: ldmain.c:455
+#: ldmain.c:504
#, c-format
msgid "%s: total time in link: %ld.%06ld\n"
msgstr ""
-#: ldmain.c:458
+#: ldmain.c:507
#, c-format
msgid "%s: data size %ld\n"
msgstr ""
-#: ldmain.c:499
+#: ldmain.c:548
msgid "%P%F: missing argument to -m\n"
msgstr ""
-#: ldmain.c:624 ldmain.c:645 ldmain.c:676
+#: ldmain.c:676 ldmain.c:697 ldmain.c:728
msgid "%P%F: bfd_hash_table_init failed: %E\n"
msgstr ""
-#: ldmain.c:629 ldmain.c:648
+#: ldmain.c:681 ldmain.c:700
msgid "%P%F: bfd_hash_lookup failed: %E\n"
msgstr ""
-#: ldmain.c:663
+#: ldmain.c:715
msgid "%X%P: error: duplicate retain-symbols-file\n"
msgstr ""
-#: ldmain.c:707
+#: ldmain.c:759
msgid "%P%F: bfd_hash_lookup for insertion failed: %E\n"
msgstr ""
-#: ldmain.c:712
+#: ldmain.c:764
msgid "%P: `-retain-symbols-file' overrides `-s' and `-S'\n"
msgstr ""
-#: ldmain.c:788
-msgid "Archive member included"
-msgstr ""
-
-#: ldmain.c:789
-msgid "because of file (symbol)"
+#: ldmain.c:840
+msgid ""
+"Archive member included because of file (symbol)\n"
+"\n"
msgstr ""
-#: ldmain.c:860
+#: ldmain.c:911
msgid "%X%C: multiple definition of `%T'\n"
msgstr ""
-#: ldmain.c:863
+#: ldmain.c:914
msgid "%D: first defined here\n"
msgstr ""
-#: ldmain.c:867
+#: ldmain.c:918
msgid "%P: Disabling relaxation: it will not work with multiple definitions\n"
msgstr ""
-#: ldmain.c:898
+#: ldmain.c:949
msgid "%B: warning: definition of `%T' overriding common\n"
msgstr ""
-#: ldmain.c:901
+#: ldmain.c:952
msgid "%B: warning: common is here\n"
msgstr ""
-#: ldmain.c:908
+#: ldmain.c:959
msgid "%B: warning: common of `%T' overridden by definition\n"
msgstr ""
-#: ldmain.c:911
+#: ldmain.c:962
msgid "%B: warning: defined here\n"
msgstr ""
-#: ldmain.c:918
+#: ldmain.c:969
msgid "%B: warning: common of `%T' overridden by larger common\n"
msgstr ""
-#: ldmain.c:921
+#: ldmain.c:972
msgid "%B: warning: larger common is here\n"
msgstr ""
-#: ldmain.c:925
+#: ldmain.c:976
msgid "%B: warning: common of `%T' overriding smaller common\n"
msgstr ""
-#: ldmain.c:928
+#: ldmain.c:979
msgid "%B: warning: smaller common is here\n"
msgstr ""
-#: ldmain.c:932
+#: ldmain.c:983
msgid "%B: warning: multiple common of `%T'\n"
msgstr ""
-#: ldmain.c:934
+#: ldmain.c:985
msgid "%B: warning: previous common is here\n"
msgstr ""
-#: ldmain.c:955 ldmain.c:994
+#: ldmain.c:1006 ldmain.c:1045
msgid "%P: warning: global constructor %s used\n"
msgstr ""
-#: ldmain.c:1004
+#: ldmain.c:1055
msgid "%P%F: BFD backend error: BFD_RELOC_CTOR unsupported\n"
msgstr ""
-#: ldmain.c:1188
+#: ldmain.c:1239
msgid "%F%P: bfd_hash_table_init failed: %E\n"
msgstr ""
-#: ldmain.c:1195
+#: ldmain.c:1246
msgid "%F%P: bfd_hash_lookup failed: %E\n"
msgstr ""
-#: ldmain.c:1215
+#: ldmain.c:1266
msgid "%C: undefined reference to `%T'\n"
msgstr ""
-#: ldmain.c:1221
+#: ldmain.c:1272
msgid "%D: more undefined references to `%T' follow\n"
msgstr ""
-#: ldmain.c:1228
+#: ldmain.c:1279
msgid "%B: undefined reference to `%T'\n"
msgstr ""
-#: ldmain.c:1234
+#: ldmain.c:1285
msgid "%B: more undefined references to `%T' follow\n"
msgstr ""
-#: ldmain.c:1254 ldmain.c:1275 ldmain.c:1294
+#: ldmain.c:1305 ldmain.c:1326 ldmain.c:1345
msgid "%P%X: generated"
msgstr ""
-#: ldmain.c:1257
+#: ldmain.c:1308
msgid " relocation truncated to fit: %s %T"
msgstr ""
-#: ldmain.c:1278
+#: ldmain.c:1329
#, c-format
msgid "dangerous relocation: %s\n"
msgstr ""
-#: ldmain.c:1297
+#: ldmain.c:1348
msgid " reloc refers to symbol `%T' which is not being output\n"
msgstr ""
-#: ldmisc.c:178
+#: ldmisc.c:176
msgid "no symbol"
msgstr ""
-#: ldmisc.c:242
+#: ldmisc.c:240
#, c-format
msgid "built in linker script:%u"
msgstr ""
-#: ldmisc.c:292 ldmisc.c:296
+#: ldmisc.c:290 ldmisc.c:294
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
+#: ldmisc.c:330
msgid "%B: In function `%T':\n"
msgstr ""
-#: ldmisc.c:464
+#: ldmisc.c:439
msgid "%F%P: internal error %s %d\n"
msgstr ""
-#: ldmisc.c:550
+#: ldmisc.c:489
msgid "%P: internal error: aborting at %s line %d in %s\n"
msgstr ""
-#: ldmisc.c:553
+#: ldmisc.c:492
msgid "%P: internal error: aborting at %s line %d\n"
msgstr ""
-#: ldmisc.c:555
+#: ldmisc.c:494
msgid "%P%F: please report this bug\n"
msgstr ""
-#: ldver.c:39
+#. Output for noisy == 2 is intended to follow the GNU standards.
+#: ldver.c:38
#, c-format
-msgid "GNU ld version %s (with BFD %s)\n"
+msgid "GNU ld version %s\n"
+msgstr ""
+
+#: ldver.c:42
+msgid "Copyright 2001 Free Software Foundation, Inc.\n"
msgstr ""
-#: ldver.c:46 lexsup.c:961
+#: ldver.c:43
+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 ""
+
+#: ldver.c:52
msgid " Supported emulations:\n"
msgstr ""
@@ -961,622 +1011,652 @@ msgstr ""
msgid "%F%P: final link failed: %E\n"
msgstr ""
-#: lexsup.c:159 lexsup.c:250
+#: lexsup.c:175 lexsup.c:270
msgid "KEYWORD"
msgstr ""
-#: lexsup.c:159
+#: lexsup.c:175
msgid "Shared library control for HP/UX compatibility"
msgstr ""
-#: lexsup.c:162
+#: lexsup.c:178
msgid "ARCH"
msgstr ""
-#: lexsup.c:162
+#: lexsup.c:178
msgid "Set architecture"
msgstr ""
-#: lexsup.c:164 lexsup.c:315
+#: lexsup.c:180 lexsup.c:337
msgid "TARGET"
msgstr ""
-#: lexsup.c:164
+#: lexsup.c:180
msgid "Specify target for following input files"
msgstr ""
-#: lexsup.c:166 lexsup.c:205 lexsup.c:217 lexsup.c:226 lexsup.c:297
-#: lexsup.c:322 lexsup.c:360
+#: lexsup.c:182 lexsup.c:223 lexsup.c:235 lexsup.c:244 lexsup.c:315
+#: lexsup.c:344 lexsup.c:384
msgid "FILE"
msgstr ""
-#: lexsup.c:166
+#: lexsup.c:182
msgid "Read MRI format linker script"
msgstr ""
-#: lexsup.c:168
+#: lexsup.c:184
msgid "Force common symbols to be defined"
msgstr ""
-#: lexsup.c:172 lexsup.c:350 lexsup.c:352 lexsup.c:354
+#: lexsup.c:188 lexsup.c:374 lexsup.c:376 lexsup.c:378
msgid "ADDRESS"
msgstr ""
-#: lexsup.c:172
+#: lexsup.c:188
msgid "Set start address"
msgstr ""
-#: lexsup.c:174
+#: lexsup.c:190
msgid "Export all dynamic symbols"
msgstr ""
-#: lexsup.c:176
+#: lexsup.c:192
msgid "Link big-endian objects"
msgstr ""
-#: lexsup.c:178
+#: lexsup.c:194
msgid "Link little-endian objects"
msgstr ""
-#: lexsup.c:180 lexsup.c:183
+#: lexsup.c:196 lexsup.c:199
msgid "SHLIB"
msgstr ""
-#: lexsup.c:180
+#: lexsup.c:196
msgid "Auxiliary filter for shared object symbol table"
msgstr ""
-#: lexsup.c:183
+#: lexsup.c:199
msgid "Filter for shared object symbol table"
msgstr ""
-#: lexsup.c:185
+#: lexsup.c:201
msgid "Ignored"
msgstr ""
-#: lexsup.c:187
+#: lexsup.c:203
msgid "SIZE"
msgstr ""
-#: lexsup.c:187
+#: lexsup.c:203
msgid "Small data size (if no size, same as --shared)"
msgstr ""
-#: lexsup.c:190
+#: lexsup.c:206
msgid "FILENAME"
msgstr ""
-#: lexsup.c:190
+#: lexsup.c:206
msgid "Set internal name of shared library"
msgstr ""
-#: lexsup.c:192
+#: lexsup.c:208
+msgid "PROGRAM"
+msgstr ""
+
+#: lexsup.c:208
+msgid "Set PROGRAM as the dynamic linker to use"
+msgstr ""
+
+#: lexsup.c:210
msgid "LIBNAME"
msgstr ""
-#: lexsup.c:192
+#: lexsup.c:210
msgid "Search for library LIBNAME"
msgstr ""
-#: lexsup.c:194
+#: lexsup.c:212
msgid "DIRECTORY"
msgstr ""
-#: lexsup.c:194
+#: lexsup.c:212
msgid "Add DIRECTORY to library search path"
msgstr ""
-#: lexsup.c:196
+#: lexsup.c:214
msgid "EMULATION"
msgstr ""
-#: lexsup.c:196
+#: lexsup.c:214
msgid "Set emulation"
msgstr ""
-#: lexsup.c:198
+#: lexsup.c:216
msgid "Print map file on standard output"
msgstr ""
-#: lexsup.c:200
+#: lexsup.c:218
msgid "Do not page align data"
msgstr ""
-#: lexsup.c:202
+#: lexsup.c:220
msgid "Do not page align data, do not make text readonly"
msgstr ""
-#: lexsup.c:205
+#: lexsup.c:223
msgid "Set output file name"
msgstr ""
-#: lexsup.c:207
+#: lexsup.c:225
msgid "Optimize output file"
msgstr ""
-#: lexsup.c:209
+#: lexsup.c:227
msgid "Ignored for SVR4 compatibility"
msgstr ""
-#: lexsup.c:213
+#: lexsup.c:231
msgid "Generate relocateable output"
msgstr ""
-#: lexsup.c:217
+#: lexsup.c:235
msgid "Just link symbols (if directory, same as --rpath)"
msgstr ""
-#: lexsup.c:220
+#: lexsup.c:238
msgid "Strip all symbols"
msgstr ""
-#: lexsup.c:222
+#: lexsup.c:240
msgid "Strip debugging symbols"
msgstr ""
-#: lexsup.c:224
+#: lexsup.c:242
msgid "Trace file opens"
msgstr ""
-#: lexsup.c:226
+#: lexsup.c:244
msgid "Read linker script"
msgstr ""
-#: lexsup.c:228 lexsup.c:242 lexsup.c:283 lexsup.c:295 lexsup.c:344
-#: lexsup.c:363 lexsup.c:380
+#: lexsup.c:246 lexsup.c:262 lexsup.c:301 lexsup.c:313 lexsup.c:368
+#: lexsup.c:387 lexsup.c:407
msgid "SYMBOL"
msgstr ""
-#: lexsup.c:228
+#: lexsup.c:246
msgid "Start with undefined reference to SYMBOL"
msgstr ""
-#: lexsup.c:230
-msgid "Don't merge orphan sections with the same name"
+#: lexsup.c:248
+msgid "[=SECTION]"
msgstr ""
-#: lexsup.c:232
+#: lexsup.c:248
+msgid "Don't merge input [SECTION | orphan] sections"
+msgstr ""
+
+#: lexsup.c:250
msgid "Build global constructor/destructor tables"
msgstr ""
-#: lexsup.c:234
+#: lexsup.c:252
msgid "Print version information"
msgstr ""
-#: lexsup.c:236
+#: lexsup.c:254
msgid "Print version and emulation information"
msgstr ""
-#: lexsup.c:238
+#: lexsup.c:256
msgid "Discard all local symbols"
msgstr ""
-#: lexsup.c:240
-msgid "Discard temporary local symbols"
+#: lexsup.c:258
+msgid "Discard temporary local symbols (default)"
msgstr ""
-#: lexsup.c:242
+#: lexsup.c:260
+msgid "Don't discard any local symbols"
+msgstr ""
+
+#: lexsup.c:262
msgid "Trace mentions of SYMBOL"
msgstr ""
-#: lexsup.c:244 lexsup.c:324 lexsup.c:326
+#: lexsup.c:264 lexsup.c:346 lexsup.c:348
msgid "PATH"
msgstr ""
-#: lexsup.c:244
+#: lexsup.c:264
msgid "Default search path for Solaris compatibility"
msgstr ""
-#: lexsup.c:246
+#: lexsup.c:266
msgid "Start a group"
msgstr ""
-#: lexsup.c:248
+#: lexsup.c:268
msgid "End a group"
msgstr ""
-#: lexsup.c:250
+#: lexsup.c:270
msgid "Ignored for SunOS compatibility"
msgstr ""
-#: lexsup.c:252
+#: lexsup.c:272
msgid "Link against shared libraries"
msgstr ""
-#: lexsup.c:258
+#: lexsup.c:278
msgid "Do not link against shared libraries"
msgstr ""
-#: lexsup.c:266
+#: lexsup.c:286
msgid "Bind global references locally"
msgstr ""
-#: lexsup.c:268
+#: lexsup.c:288
msgid "Check section addresses for overlaps (default)"
msgstr ""
-#: lexsup.c:270
+#: lexsup.c:290
msgid "Do not check section addresses for overlaps"
msgstr ""
-#: lexsup.c:273
+#: lexsup.c:293
msgid "Output cross reference table"
msgstr ""
-#: lexsup.c:275
+#: lexsup.c:295
msgid "SYMBOL=EXPRESSION"
msgstr ""
-#: lexsup.c:275
+#: lexsup.c:295
msgid "Define a symbol"
msgstr ""
-#: lexsup.c:277
+#: lexsup.c:297
msgid "[=STYLE]"
msgstr ""
-#: lexsup.c:277
+#: lexsup.c:297
msgid "Demangle symbol names [using STYLE]"
msgstr ""
-#: lexsup.c:279
-msgid "PROGRAM"
-msgstr ""
-
-#: lexsup.c:279
-msgid "Set the dynamic linker to use"
-msgstr ""
-
-#: lexsup.c:281
+#: lexsup.c:299
msgid "Generate embedded relocs"
msgstr ""
-#: lexsup.c:283
+#: lexsup.c:301
msgid "Call SYMBOL at unload-time"
msgstr ""
-#: lexsup.c:285
+#: lexsup.c:303
msgid "Force generation of file with .exe suffix"
msgstr ""
-#: lexsup.c:287
+#: lexsup.c:305
msgid "Remove unused sections (on some targets)"
msgstr ""
-#: lexsup.c:290
+#: lexsup.c:308
msgid "Don't remove unused sections (default)"
msgstr ""
-#: lexsup.c:293
+#: lexsup.c:311
msgid "Print option help"
msgstr ""
-#: lexsup.c:295
+#: lexsup.c:313
msgid "Call SYMBOL at load-time"
msgstr ""
-#: lexsup.c:297
+#: lexsup.c:315
msgid "Write a map file"
msgstr ""
-#: lexsup.c:299
+#: lexsup.c:317
+msgid "Do not define Common storage"
+msgstr ""
+
+#: lexsup.c:319
msgid "Do not demangle symbol names"
msgstr ""
-#: lexsup.c:301
+#: lexsup.c:321
msgid "Use less memory and more disk I/O"
msgstr ""
-#: lexsup.c:303
+#: lexsup.c:323
msgid "Allow no undefined symbols"
msgstr ""
-#: lexsup.c:305
+#: lexsup.c:325
msgid "Allow undefined symbols in shared objects"
msgstr ""
-#: lexsup.c:307
+#: lexsup.c:327
msgid "Don't warn about mismatched input files"
msgstr ""
-#: lexsup.c:309
+#: lexsup.c:329
msgid "Turn off --whole-archive"
msgstr ""
-#: lexsup.c:311
+#: lexsup.c:331
msgid "Create an output file even if errors occur"
msgstr ""
-#: lexsup.c:315
+#: lexsup.c:335
+msgid ""
+"Only use library directories specified on\n"
+"\t\t\t\tthe command line"
+msgstr ""
+
+#: lexsup.c:337
msgid "Specify target of output file"
msgstr ""
-#: lexsup.c:317
+#: lexsup.c:339
msgid "Ignored for Linux compatibility"
msgstr ""
-#: lexsup.c:319
+#: lexsup.c:341
msgid "Relax branches on certain targets"
msgstr ""
-#: lexsup.c:322
+#: lexsup.c:344
msgid "Keep only symbols listed in FILE"
msgstr ""
-#: lexsup.c:324
+#: lexsup.c:346
msgid "Set runtime shared library search path"
msgstr ""
-#: lexsup.c:326
+#: lexsup.c:348
msgid "Set link time shared library search path"
msgstr ""
-#: lexsup.c:328
+#: lexsup.c:350
msgid "Create a shared library"
msgstr ""
-#: lexsup.c:332
+#: lexsup.c:354
msgid "Sort common symbols by size"
msgstr ""
-#: lexsup.c:336
+#: lexsup.c:358
+msgid "COUNT"
+msgstr ""
+
+#: lexsup.c:358
+msgid "How many tags to reserve in .dynamic section"
+msgstr ""
+
+#: lexsup.c:360
msgid "[=SIZE]"
msgstr ""
-#: lexsup.c:336
+#: lexsup.c:360
msgid "Split output sections every SIZE octets"
msgstr ""
-#: lexsup.c:338
+#: lexsup.c:362
msgid "[=COUNT]"
msgstr ""
-#: lexsup.c:338
+#: lexsup.c:362
msgid "Split output sections every COUNT relocs"
msgstr ""
-#: lexsup.c:340
+#: lexsup.c:364
msgid "Print memory usage statistics"
msgstr ""
-#: lexsup.c:342
+#: lexsup.c:366
msgid "Display target specific options"
msgstr ""
-#: lexsup.c:344
+#: lexsup.c:368
msgid "Do task level linking"
msgstr ""
-#: lexsup.c:346
+#: lexsup.c:370
msgid "Use same format as native linker"
msgstr ""
-#: lexsup.c:348
+#: lexsup.c:372
msgid "SECTION=ADDRESS"
msgstr ""
-#: lexsup.c:348
+#: lexsup.c:372
msgid "Set address of named section"
msgstr ""
-#: lexsup.c:350
+#: lexsup.c:374
msgid "Set address of .bss section"
msgstr ""
-#: lexsup.c:352
+#: lexsup.c:376
msgid "Set address of .data section"
msgstr ""
-#: lexsup.c:354
+#: lexsup.c:378
msgid "Set address of .text section"
msgstr ""
-#: lexsup.c:356
+#: lexsup.c:380
msgid "Output lots of information during link"
msgstr ""
-#: lexsup.c:360
+#: lexsup.c:384
msgid "Read version information script"
msgstr ""
-#: lexsup.c:363
+#: lexsup.c:387
msgid ""
"Take export symbols list from .exports, using\n"
"\t\t\t\tSYMBOL as the version."
msgstr ""
-#: lexsup.c:366
+#: lexsup.c:390
msgid "Warn about duplicate common symbols"
msgstr ""
-#: lexsup.c:368
+#: lexsup.c:392
msgid "Warn if global constructors/destructors are seen"
msgstr ""
-#: lexsup.c:371
+#: lexsup.c:395
msgid "Warn if the multiple GP values are used"
msgstr ""
-#: lexsup.c:373
+#: lexsup.c:397
msgid "Warn only once per undefined symbol"
msgstr ""
-#: lexsup.c:375
+#: lexsup.c:399
msgid "Warn if start of section changes due to alignment"
msgstr ""
-#: lexsup.c:378
+#: lexsup.c:402
+msgid "Treat warnings as errors"
+msgstr ""
+
+#: lexsup.c:405
msgid "Include all objects from following archives"
msgstr ""
-#: lexsup.c:380
+#: lexsup.c:407
msgid "Use wrapper functions for SYMBOL"
msgstr ""
-#: lexsup.c:382
+#: lexsup.c:409
msgid "[=WORDS]"
msgstr ""
-#: lexsup.c:382
+#: lexsup.c:409
msgid ""
"Modify problematic branches in last WORDS (1-10,\n"
"\t\t\t\tdefault 5) words of a page"
msgstr ""
-#: lexsup.c:532
-#, c-format
-msgid "%s: use the --help option for usage information\n"
+#: lexsup.c:575
+msgid "%P: unrecognized option '%s'\n"
msgstr ""
-#: lexsup.c:552
+#: lexsup.c:577
+msgid "%P%F: use the --help option for usage information\n"
+msgstr ""
+
+#: lexsup.c:596
msgid "%P%F: unrecognized -a option `%s'\n"
msgstr ""
-#: lexsup.c:565
+#: lexsup.c:609
msgid "%P%F: unrecognized -assert option `%s'\n"
msgstr ""
-#: lexsup.c:608
+#: lexsup.c:652
msgid "%F%P: unknown demangling style `%s'"
msgstr ""
-#: lexsup.c:667
+#: lexsup.c:712
msgid "%P%F: invalid number `%s'\n"
msgstr ""
-#: lexsup.c:845
-msgid "%P%F: -shared not supported\n"
-msgstr ""
-
-#: lexsup.c:879
-#, c-format
-msgid "%s: Invalid argument to option \"--section-start\"\n"
+#. This can happen if the user put "-rpath,a" on the command
+#. line. (Or something similar. The comma is important).
+#. Getopt becomes confused and thinks that this is a -r option
+#. but it cannot parse the text after the -r so it refuses to
+#. increment the optind counter. Detect this case and issue
+#. an error message here. We cannot just make this a warning,
+#. increment optind, and continue because getopt is too confused
+#. and will seg-fault the next time around.
+#: lexsup.c:810
+msgid "%P%F: bad -rpath option\n"
msgstr ""
-#: lexsup.c:890
-#, c-format
-msgid "%s: Missing argument(s) to option \"--section-start\"\n"
+#: lexsup.c:908
+msgid "%P%F: -shared not supported\n"
msgstr ""
-#: lexsup.c:954
-msgid "Copyright 2000 Free Software Foundation, Inc.\n"
+#: lexsup.c:940
+msgid "%P%F: invalid argument to option \"--section-start\"\n"
msgstr ""
-#: lexsup.c:955
-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"
+#: lexsup.c:946
+msgid "%P%F: missing argument(s) to option \"--section-start\"\n"
msgstr ""
-#: lexsup.c:1047
-#, c-format
-msgid "%s: may not nest groups (--help for usage)\n"
+#: lexsup.c:1095
+msgid "%P%F: may not nest groups (--help for usage)\n"
msgstr ""
-#: lexsup.c:1058
-#, c-format
-msgid "%s: group ended before it began (--help for usage)\n"
+#: lexsup.c:1102
+msgid "%P%F: group ended before it began (--help for usage)\n"
msgstr ""
-#: lexsup.c:1075
-#, c-format
-msgid "%s: Invalid argument to option \"mpc860c0\"\n"
+#: lexsup.c:1116
+msgid "%P%F: invalid argument to option \"mpc860c0\"\n"
msgstr ""
-#: lexsup.c:1131
+#: lexsup.c:1171
msgid "%P%F: invalid hex number `%s'\n"
msgstr ""
-#: lexsup.c:1143
+#: lexsup.c:1183
#, c-format
msgid "Usage: %s [options] file...\n"
msgstr ""
-#: lexsup.c:1145
+#: lexsup.c:1185
msgid "Options:\n"
msgstr ""
#. Note: Various tools (such as libtool) depend upon the
#. format of the listings below - do not change them.
-#: lexsup.c:1224
+#: lexsup.c:1268
#, c-format
msgid "%s: supported targets:"
msgstr ""
-#: lexsup.c:1232
+#: lexsup.c:1276
#, c-format
msgid "%s: supported emulations: "
msgstr ""
-#: lexsup.c:1237
+#: lexsup.c:1281
#, c-format
msgid "%s: emulation specific options:\n"
msgstr ""
-#: lexsup.c:1241
+#: lexsup.c:1285
#, c-format
msgid "Report bugs to %s\n"
msgstr ""
-#: mri.c:321
+#: mri.c:334
msgid "%P%F: unknown format type %s\n"
msgstr ""
-#: pe-dll.c:146
+#: pe-dll.c:316
#, c-format
msgid "%XUnsupported PEI architecture: %s\n"
msgstr ""
-#: pe-dll.c:387
+#: pe-dll.c:650
#, c-format
msgid "%XError, duplicate EXPORT with ordinals: %s (%d vs %d)\n"
msgstr ""
-#: pe-dll.c:394
+#: pe-dll.c:657
#, c-format
msgid "Warning, duplicate EXPORT: %s\n"
msgstr ""
-#: pe-dll.c:456
+#: pe-dll.c:721
#, c-format
msgid "%XCannot export %s: symbol not defined\n"
msgstr ""
-#: pe-dll.c:462
+#: pe-dll.c:727
#, c-format
msgid "%XCannot export %s: symbol wrong type (%d vs %d)\n"
msgstr ""
-#: pe-dll.c:469
+#: pe-dll.c:734
#, c-format
msgid "%XCannot export %s: symbol not found\n"
msgstr ""
-#: pe-dll.c:594
+#: pe-dll.c:849
#, c-format
msgid "%XError, ordinal used twice: %d (%s vs %s)\n"
msgstr ""
-#: pe-dll.c:844
+#: pe-dll.c:1160
#, c-format
msgid "%XError: %d-bit reloc in dll\n"
msgstr ""
-#: pe-dll.c:970
+#: pe-dll.c:1295
#, c-format
msgid "%s: Can't open output def file %s\n"
msgstr ""
-#: pe-dll.c:1092
+#: pe-dll.c:1438
msgid "; no contents available\n"
msgstr ""
-#: pe-dll.c:1580
+#: pe-dll.c:2107
#, c-format
msgid "%XCan't open .lib file: %s\n"
msgstr ""
-#: pe-dll.c:1585
+#: pe-dll.c:2112
#, c-format
msgid "Creating library file: %s\n"
msgstr ""
diff --git a/contrib/binutils/ld/scripttempl/armaout.sc b/contrib/binutils/ld/scripttempl/armaout.sc
index e9276a8..9bae887 100644
--- a/contrib/binutils/ld/scripttempl/armaout.sc
+++ b/contrib/binutils/ld/scripttempl/armaout.sc
@@ -20,10 +20,10 @@ SECTIONS
${RELOCATING+__sdata_ = .;}
*(.data)
${CONSTRUCTING+CONSTRUCTORS}
- ${RELOCATING+_edata = .;}
- ${RELOCATING+__edata = .;}
+ ${RELOCATING+_edata = ${DATA_ALIGNMENT};}
+ ${RELOCATING+__edata = ${DATA_ALIGNMENT};}
}
- .bss ${RELOCATING+ SIZEOF(.data) + ADDR (.data)} :
+ .bss ${RELOCATING+${DATA_ALIGNMENT}} :
{
${RELOCATING+ __bss_start = .};
*(.bss)
diff --git a/contrib/binutils/ld/scripttempl/armcoff.sc b/contrib/binutils/ld/scripttempl/armcoff.sc
index 9f9cd7c..c61f734 100644
--- a/contrib/binutils/ld/scripttempl/armcoff.sc
+++ b/contrib/binutils/ld/scripttempl/armcoff.sc
@@ -6,6 +6,18 @@ if test -z "${DATA_ADDR}"; then
DATA_ADDR=.
fi
fi
+
+# These are substituted in as variables in order to get '}' in a shell
+# conditional expansion.
+CTOR='.ctor : {
+ *(SORT(.ctors.*))
+ *(.ctor)
+ }'
+DTOR='.dtor : {
+ *(SORT(.dtors.*))
+ *(.dtor)
+ }'
+
cat <<EOF
OUTPUT_FORMAT("${OUTPUT_FORMAT}", "${BIG_OUTPUT_FORMAT}", "${LITTLE_OUTPUT_FORMAT}")
${LIB_SEARCH_DIRS}
@@ -20,7 +32,7 @@ SECTIONS
present): */
.text ${RELOCATING+ 0x8000} : {
*(.init)
- *(.text)
+ *(.text*)
*(.glue_7t)
*(.glue_7)
*(.rdata)
@@ -30,14 +42,24 @@ SECTIONS
LONG (-1); *(.dtors); *(.dtor); LONG (0); }
*(.fini)
${RELOCATING+ etext = .;}
+ ${RELOCATING+ _etext = .;}
}
.data ${RELOCATING+${DATA_ADDR-0x40000 + (. & 0xfffc0fff)}} : {
${RELOCATING+ __data_start__ = . ;}
- *(.data)
+ *(.data*)
+
+ ${RELOCATING+*(.gcc_exc*)}
+ ${RELOCATING+___EH_FRAME_BEGIN__ = . ;}
+ ${RELOCATING+*(.eh_fram*)}
+ ${RELOCATING+___EH_FRAME_END__ = . ;}
+ ${RELOCATING+LONG(0);}
+
${RELOCATING+ __data_end__ = . ;}
${RELOCATING+ edata = .;}
${RELOCATING+ _edata = .;}
}
+ ${CONSTRUCTING+${RELOCATING-$CTOR}}
+ ${CONSTRUCTING+${RELOCATING-$DTOR}}
.bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
{
${RELOCATING+ __bss_start__ = . ;}
diff --git a/contrib/binutils/ld/scripttempl/elf.sc b/contrib/binutils/ld/scripttempl/elf.sc
index 3c1bfb4..fe8e242 100644
--- a/contrib/binutils/ld/scripttempl/elf.sc
+++ b/contrib/binutils/ld/scripttempl/elf.sc
@@ -1,6 +1,8 @@
#
# Unusual variables checked by this code:
-# NOP - two byte opcode for no-op (defaults to 0)
+# NOP - four byte opcode for no-op (defaults to 0)
+# NO_SMALL_DATA - no .sbss/.sbss2/.sdata/.sdata2 sections if not
+# empty.
# DATA_ADDR - if end-of-text-plus-one-page isn't right for data start
# INITIAL_READONLY_SECTIONS - at start of text segment
# OTHER_READONLY_SECTIONS - other than .text .init .rodata ...
@@ -17,7 +19,8 @@
# DATA_START_SYMBOLS - symbols that appear at the start of the
# .data section.
# OTHER_GOT_SYMBOLS - symbols defined just before .got.
-# OTHER_GOT_SECTIONS - sections just after .got and .sdata.
+# OTHER_GOT_SECTIONS - sections just after .got.
+# OTHER_SDATA_SECTIONS - sections just after .sdata.
# OTHER_BSS_SYMBOLS - symbols that appear at the start of the
# .bss section besides __bss_start.
# DATA_PLT - .plt should be in data segment, not text segment.
@@ -32,6 +35,8 @@
# combination of .init sections.
# FINI_START, FINI_END - statements just before and just after
# combination of .fini sections.
+# STACK_ADDR - start of a .stack section.
+# OTHER_END_SYMBOLS - symbols to place right at the end of the script.
#
# When adding sections, do note that the names of some sections are used
# when specifying the start address of the next.
@@ -54,6 +59,7 @@
# .sbss .gnu.linkonce.sb.foo
# .sdata2 .gnu.linkonce.s2.foo
# .sbss2 .gnu.linkonce.sb2.foo
+# .debug_info .gnu.linkonce.wi.foo
#
# Each of these can also have corresponding .rel.* and .rela.* sections.
@@ -64,13 +70,41 @@ if [ -z "$MACHINE" ]; then OUTPUT_ARCH=${ARCH}; else OUTPUT_ARCH=${ARCH}:${MACHI
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.*)} }"
-SBSS2=".sbss2 ${RELOCATING-0} : { *(.sbss2) ${RELOCATING+*(.sbss2.*)} ${RELOCATING+*(.gnu.linkonce.sb2.*)} }"
-SDATA2=".sdata2 ${RELOCATING-0} : { *(.sdata2) ${RELOCATING+*(.sdata2.*)} ${RELOCATING+*(.gnu.linkonce.s2.*)} }"
-CTOR=".ctors ${CONSTRUCTING-0} :
+INTERP=".interp ${RELOCATING-0} : { *(.interp) }"
+PLT=".plt ${RELOCATING-0} : { *(.plt) }"
+DYNAMIC=".dynamic ${RELOCATING-0} : { *(.dynamic) }"
+RODATA=".rodata ${RELOCATING-0} : { *(.rodata${RELOCATING+ .rodata.* .gnu.linkonce.r.*}) }"
+if test -z "${NO_SMALL_DATA}"; then
+ SBSS=".sbss ${RELOCATING-0} :
+ {
+ ${RELOCATING+PROVIDE (__sbss_start = .);}
+ ${RELOCATING+PROVIDE (___sbss_start = .);}
+ *(.dynsbss)
+ *(.sbss${RELOCATING+ .sbss.* .gnu.linkonce.sb.*})
+ *(.scommon)
+ ${RELOCATING+PROVIDE (__sbss_end = .);}
+ ${RELOCATING+PROVIDE (___sbss_end = .);}
+ }"
+ SBSS2=".sbss2 ${RELOCATING-0} : { *(.sbss2${RELOCATING+ .sbss2.* .gnu.linkonce.sb2.*}) }"
+ SDATA="/* 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} :
+ {
+ ${RELOCATING+${SDATA_START_SYMBOLS}}
+ *(.sdata${RELOCATING+ .sdata.* .gnu.linkonce.s.*})
+ }"
+ SDATA2=".sdata2 ${RELOCATING-0} : { *(.sdata2${RELOCATING+ .sdata2.* .gnu.linkonce.s2.*}) }"
+ REL_SDATA=".rel.sdata ${RELOCATING-0} : { *(.rel.sdata${RELOCATING+ .rel.sdata.* .rel.gnu.linkonce.s.*}) }
+ .rela.sdata ${RELOCATING-0} : { *(.rela.sdata${RELOCATING+ .rela.sdata.* .rela.gnu.linkonce.s.*}) }"
+ REL_SBSS=".rel.sbss ${RELOCATING-0} : { *(.rel.sbss${RELOCATING+ .rel.sbss.* .rel.gnu.linkonce.sb.*}) }
+ .rela.sbss ${RELOCATING-0} : { *(.rela.sbss${RELOCATING+ .rela.sbss.* .rela.gnu.linkonce.sb.*}) }"
+ REL_SDATA2=".rel.sdata2 ${RELOCATING-0} : { *(.rel.sdata2${RELOCATING+ .rel.sdata2.* .rel.gnu.linkonce.s2.*}) }
+ .rela.sdata2 ${RELOCATING-0} : { *(.rela.sdata2${RELOCATING+ .rela.sdata2.* .rela.gnu.linkonce.s2.*}) }"
+ REL_SBSS2=".rel.sbss2 ${RELOCATING-0} : { *(.rel.sbss2${RELOCATING+ .rel.sbss2.* .rel.gnu.linkonce.sb2.*}) }
+ .rela.sbss2 ${RELOCATING-0} : { *(.rela.sbss2${RELOCATING+ .rela.sbss2.* .rela.gnu.linkonce.sb2.*}) }"
+fi
+CTOR=".ctors ${CONSTRUCTING-0} :
{
${CONSTRUCTING+${CTOR_START}}
/* gcc uses crtbegin.o to find the start of
@@ -95,8 +129,7 @@ CTOR=".ctors ${CONSTRUCTING-0} :
KEEP (*(.ctors))
${CONSTRUCTING+${CTOR_END}}
}"
-
-DTOR=" .dtors ${CONSTRUCTING-0} :
+DTOR=".dtors ${CONSTRUCTING-0} :
{
${CONSTRUCTING+${DTOR_START}}
KEEP (*crtbegin.o(.dtors))
@@ -105,6 +138,11 @@ DTOR=" .dtors ${CONSTRUCTING-0} :
KEEP (*(.dtors))
${CONSTRUCTING+${DTOR_END}}
}"
+STACK=" .stack ${RELOCATING-0}${RELOCATING+${STACK_ADDR}} :
+ {
+ ${RELOCATING+_stack = .;}
+ *(.stack)
+ }"
# if this is for an embedded system, don't add SIZEOF_HEADERS.
if [ -z "$EMBEDDED" ]; then
@@ -137,126 +175,67 @@ SECTIONS
${CREATE_SHLIB-${INTERP}}
${INITIAL_READONLY_SECTIONS}
${TEXT_DYNAMIC+${DYNAMIC}}
- .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) }
+ .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) }
- .rel.init ${RELOCATING-0} : { *(.rel.init) }
- .rela.init ${RELOCATING-0} : { *(.rela.init) }
- .rel.text ${RELOCATING-0} :
- {
- *(.rel.text)
- ${RELOCATING+*(.rel.text.*)}
- ${RELOCATING+*(.rel.gnu.linkonce.t.*)}
- }
- .rela.text ${RELOCATING-0} :
- {
- *(.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.rodata.*)}
- ${RELOCATING+*(.rel.gnu.linkonce.r.*)}
- }
- .rela.rodata ${RELOCATING-0} :
- {
- *(.rela.rodata)
- ${RELOCATING+*(.rela.rodata.*)}
- ${RELOCATING+*(.rela.gnu.linkonce.r.*)}
- }
+EOF
+if [ "x$COMBRELOC" = x ]; then
+ COMBRELOCCAT=cat
+else
+ COMBRELOCCAT="cat > $COMBRELOC"
+fi
+eval $COMBRELOCCAT <<EOF
+ .rel.init ${RELOCATING-0} : { *(.rel.init) }
+ .rela.init ${RELOCATING-0} : { *(.rela.init) }
+ .rel.text ${RELOCATING-0} : { *(.rel.text${RELOCATING+ .rel.text.* .rel.gnu.linkonce.t.*}) }
+ .rela.text ${RELOCATING-0} : { *(.rela.text${RELOCATING+ .rela.text.* .rela.gnu.linkonce.t.*}) }
+ .rel.fini ${RELOCATING-0} : { *(.rel.fini) }
+ .rela.fini ${RELOCATING-0} : { *(.rela.fini) }
+ .rel.rodata ${RELOCATING-0} : { *(.rel.rodata${RELOCATING+ .rel.rodata.* .rel.gnu.linkonce.r.*}) }
+ .rela.rodata ${RELOCATING-0} : { *(.rela.rodata${RELOCATING+ .rela.rodata.* .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.got ${RELOCATING-0} : { *(.rel.got) }
- .rela.got ${RELOCATING-0} : { *(.rela.got) }
+ .rel.data ${RELOCATING-0} : { *(.rel.data${RELOCATING+ .rel.data.* .rel.gnu.linkonce.d.*}) }
+ .rela.data ${RELOCATING-0} : { *(.rela.data${RELOCATING+ .rela.data.* .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.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)
- ${RELOCATING+*(.rel.sbss.*)}
- ${RELOCATING+*(.rel.gnu.linkonce.sb.*)}
- }
- .rela.sbss ${RELOCATING-0} :
+ ${REL_SDATA}
+ ${REL_SBSS}
+ ${REL_SDATA2}
+ ${REL_SBSS2}
+ .rel.bss ${RELOCATING-0} : { *(.rel.bss${RELOCATING+ .rel.bss.* .rel.gnu.linkonce.b.*}) }
+ .rela.bss ${RELOCATING-0} : { *(.rela.bss${RELOCATING+ .rela.bss.* .rela.gnu.linkonce.b.*}) }
+EOF
+if [ -n "$COMBRELOC" ]; then
+cat <<EOF
+ .rel.dyn ${RELOCATING-0} :
{
- *(.rela.sbss)
- ${RELOCATING+*(.rela.sbss.*)}
- ${RELOCATING+*(.rel.gnu.linkonce.sb.*)}
- }
- .rel.sdata2 ${RELOCATING-0} :
- {
- *(.rel.sdata2)
- ${RELOCATING+*(.rel.sdata2.*)}
- ${RELOCATING+*(.rel.gnu.linkonce.s2.*)}
+EOF
+sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rela\./d;s/^.*: { *\(.*\)}$/ \1/' $COMBRELOC
+cat <<EOF
}
- .rela.sdata2 ${RELOCATING-0} :
+ .rela.dyn ${RELOCATING-0} :
{
- *(.rela.sdata2)
- ${RELOCATING+*(.rela.sdata2.*)}
- ${RELOCATING+*(.rela.gnu.linkonce.s2.*)}
- }
- .rel.sbss2 ${RELOCATING-0} :
- {
- *(.rel.sbss2)
- ${RELOCATING+*(.rel.sbss2.*)}
- ${RELOCATING+*(.rel.gnu.linkonce.sb2.*)}
- }
- .rela.sbss2 ${RELOCATING-0} :
- {
- *(.rela.sbss2)
- ${RELOCATING+*(.rela.sbss2.*)}
- ${RELOCATING+*(.rela.gnu.linkonce.sb2.*)}
- }
- .rel.bss ${RELOCATING-0} :
- {
- *(.rel.bss)
- ${RELOCATING+*(.rel.bss.*)}
- ${RELOCATING+*(.rel.gnu.linkonce.b.*)}
- }
- .rela.bss ${RELOCATING-0} :
- {
- *(.rela.bss)
- ${RELOCATING+*(.rela.bss.*)}
- ${RELOCATING+*(.rela.gnu.linkonce.b.*)}
+EOF
+sed -e '/^[ ]*[{}][ ]*$/d;/:[ ]*$/d;/\.rel\./d;s/^.*: { *\(.*\)}/ \1/' $COMBRELOC
+cat <<EOF
}
- .rel.plt ${RELOCATING-0} : { *(.rel.plt) }
- .rela.plt ${RELOCATING-0} : { *(.rela.plt) }
+EOF
+fi
+cat <<EOF
+ .rel.plt ${RELOCATING-0} : { *(.rel.plt) }
+ .rela.plt ${RELOCATING-0} : { *(.rela.plt) }
${OTHER_PLT_RELOC_SECTIONS}
- .init ${RELOCATING-0} :
+ .init ${RELOCATING-0} :
{
${RELOCATING+${INIT_START}}
KEEP (*(.init))
@@ -264,18 +243,15 @@ SECTIONS
} =${NOP-0}
${DATA_PLT-${BSS_PLT-${PLT}}}
- .text ${RELOCATING-0} :
+ .text ${RELOCATING-0} :
{
${RELOCATING+${TEXT_START_SYMBOLS}}
- *(.text)
- ${RELOCATING+*(.text.*)}
- *(.stub)
+ *(.text .stub${RELOCATING+ .text.* .gnu.linkonce.t.*})
/* .gnu.warning sections are handled specially by elf32.em. */
*(.gnu.warning)
- ${RELOCATING+*(.gnu.linkonce.t.*)}
${RELOCATING+${OTHER_TEXT_SECTIONS}}
} =${NOP-0}
- .fini ${RELOCATING-0} :
+ .fini ${RELOCATING-0} :
{
${RELOCATING+${FINI_START}}
KEEP (*(.fini))
@@ -285,92 +261,71 @@ SECTIONS
${RELOCATING+PROVIDE (_etext = .);}
${RELOCATING+PROVIDE (etext = .);}
${WRITABLE_RODATA-${RODATA}}
- .rodata1 ${RELOCATING-0} : { *(.rodata1) }
+ .rodata1 ${RELOCATING-0} : { *(.rodata1) }
${CREATE_SHLIB-${SDATA2}}
${CREATE_SHLIB-${SBSS2}}
- ${RELOCATING+${OTHER_READONLY_SECTIONS}}
+ ${OTHER_READONLY_SECTIONS}
+ .eh_frame_hdr : { *(.eh_frame_hdr) }
/* Adjust the address for the data segment. We want to adjust up to
the same address within the page on the next page up. */
${CREATE_SHLIB-${RELOCATING+. = ${DATA_ADDR-ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))};}}
${CREATE_SHLIB+${RELOCATING+. = ${SHLIB_DATA_ADDR-ALIGN(${MAXPAGESIZE}) + (. & (${MAXPAGESIZE} - 1))};}}
- .data ${RELOCATING-0} :
+ .data ${RELOCATING-0} :
{
${RELOCATING+${DATA_START_SYMBOLS}}
- *(.data)
- ${RELOCATING+*(.data.*)}
- ${RELOCATING+*(.gnu.linkonce.d.*)}
+ *(.data${RELOCATING+ .data.* .gnu.linkonce.d.*})
${CONSTRUCTING+SORT(CONSTRUCTORS)}
}
- .data1 ${RELOCATING-0} : { *(.data1) }
- .eh_frame : { KEEP (*(.eh_frame)) }
- .gcc_except_table : { *(.gcc_except_table) }
+ .data1 ${RELOCATING-0} : { *(.data1) }
+ .eh_frame ${RELOCATING-0} : { KEEP (*(.eh_frame)) }
+ .gcc_except_table ${RELOCATING-0} : { *(.gcc_except_table) }
${WRITABLE_RODATA+${RODATA}}
- ${RELOCATING+${OTHER_READWRITE_SECTIONS}}
+ ${OTHER_READWRITE_SECTIONS}
+ ${TEXT_DYNAMIC-${DYNAMIC}}
${RELOCATING+${CTOR}}
${RELOCATING+${DTOR}}
+ .jcr ${RELOCATING-0} : { KEEP (*(.jcr)) }
${DATA_PLT+${PLT}}
${RELOCATING+${OTHER_GOT_SYMBOLS}}
- .got ${RELOCATING-0} : { *(.got.plt) *(.got) }
+ .got ${RELOCATING-0} : { *(.got.plt) *(.got) }
+ ${OTHER_GOT_SECTIONS}
${CREATE_SHLIB+${SDATA2}}
${CREATE_SHLIB+${SBSS2}}
- ${TEXT_DYNAMIC-${DYNAMIC}}
- /* 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} :
- {
- ${RELOCATING+${SDATA_START_SYMBOLS}}
- *(.sdata)
- ${RELOCATING+*(.sdata.*)}
- ${RELOCATING+*(.gnu.linkonce.s.*)}
- }
- ${RELOCATING+${OTHER_GOT_SECTIONS}}
+ ${SDATA}
+ ${OTHER_SDATA_SECTIONS}
${RELOCATING+_edata = .;}
${RELOCATING+PROVIDE (edata = .);}
${RELOCATING+__bss_start = .;}
${RELOCATING+${OTHER_BSS_SYMBOLS}}
- .sbss ${RELOCATING-0} :
- {
- ${RELOCATING+PROVIDE (__sbss_start = .);}
- ${RELOCATING+PROVIDE (___sbss_start = .);}
- *(.dynsbss)
- *(.sbss)
- ${RELOCATING+*(.sbss.*)}
- ${RELOCATING+*(.gnu.linkonce.sb.*)}
- *(.scommon)
- ${RELOCATING+PROVIDE (__sbss_end = .);}
- ${RELOCATING+PROVIDE (___sbss_end = .);}
- }
+ ${SBSS}
${BSS_PLT+${PLT}}
- .bss ${RELOCATING-0} :
+ .bss ${RELOCATING-0} :
{
*(.dynbss)
- *(.bss)
- ${RELOCATING+*(.bss.*)}
- ${RELOCATING+*(.gnu.linkonce.b.*)}
+ *(.bss${RELOCATING+ .bss.* .gnu.linkonce.b.*})
*(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+${OTHER_BSS_SECTIONS}}
+ ${OTHER_BSS_SECTIONS}
${RELOCATING+. = ALIGN(${ALIGNMENT});}
${RELOCATING+_end = .;}
${RELOCATING+${OTHER_BSS_END_SYMBOLS}}
${RELOCATING+PROVIDE (end = .);}
/* Stabs debugging sections. */
- .stab 0 : { *(.stab) }
- .stabstr 0 : { *(.stabstr) }
- .stab.excl 0 : { *(.stab.excl) }
- .stab.exclstr 0 : { *(.stab.exclstr) }
- .stab.index 0 : { *(.stab.index) }
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
.stab.indexstr 0 : { *(.stab.indexstr) }
- .comment 0 : { *(.comment) }
+ .comment 0 : { *(.comment) }
/* DWARF debug sections.
Symbols in the DWARF debugging sections are relative to the beginning
@@ -389,7 +344,7 @@ SECTIONS
.debug_pubnames 0 : { *(.debug_pubnames) }
/* DWARF 2 */
- .debug_info 0 : { *(.debug_info) *(.gnu.linkonce.wi.*) }
+ .debug_info 0 : { *(.debug_info .gnu.linkonce.wi.*) }
.debug_abbrev 0 : { *(.debug_abbrev) }
.debug_line 0 : { *(.debug_line) }
.debug_frame 0 : { *(.debug_frame) }
@@ -403,9 +358,8 @@ SECTIONS
.debug_typenames 0 : { *(.debug_typenames) }
.debug_varnames 0 : { *(.debug_varnames) }
- ${RELOCATING+${OTHER_RELOCATING_SECTIONS}}
-
- /* These must appear regardless of ${RELOCATING}. */
+ ${STACK_ADDR+${STACK}}
${OTHER_SECTIONS}
+ ${RELOCATING+${OTHER_END_SYMBOLS}}
}
EOF
diff --git a/contrib/binutils/ld/scripttempl/nw.sc b/contrib/binutils/ld/scripttempl/nw.sc
index 725522c..3fb9bce 100644
--- a/contrib/binutils/ld/scripttempl/nw.sc
+++ b/contrib/binutils/ld/scripttempl/nw.sc
@@ -1,6 +1,6 @@
#
# Unusual variables checked by this code:
-# NOP - two byte opcode for no-op (defaults to 0)
+# NOP - four 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 .ctors .rodata ...
# (e.g., .PARISC.milli)
@@ -87,7 +87,7 @@ SECTIONS
.dtors ${RELOCATING-0} : { *(.dtors) }
.rodata ${RELOCATING-0} : { *(.rodata) }
.rodata1 ${RELOCATING-0} : { *(.rodata1) }
- ${RELOCATING+${OTHER_READONLY_SECTIONS}}
+ ${OTHER_READONLY_SECTIONS}
/* Read-write section, merged into data segment: */
${RELOCATING+. = ${DATA_ADDR- ALIGN(8) + ${MAXPAGESIZE}};}
@@ -98,7 +98,7 @@ SECTIONS
${CONSTRUCTING+CONSTRUCTORS}
}
.data1 ${RELOCATING-0} : { *(.data1) }
- ${RELOCATING+${OTHER_READWRITE_SECTIONS}}
+ ${OTHER_READWRITE_SECTIONS}
.got ${RELOCATING-0} : { *(.got.plt) *(.got) }
.dynamic ${RELOCATING-0} : { *(.dynamic) }
${DATA_PLT+${PLT}}
@@ -125,7 +125,6 @@ SECTIONS
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
- /* 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 ce1a502..2f24757 100644
--- a/contrib/binutils/ld/scripttempl/pe.sc
+++ b/contrib/binutils/ld/scripttempl/pe.sc
@@ -54,9 +54,9 @@ SECTIONS
*(.glue_7t)
*(.glue_7)
${CONSTRUCTING+ ___CTOR_LIST__ = .; __CTOR_LIST__ = . ;
- LONG (-1); *(.ctors); *(.ctor); LONG (0); }
+ LONG (-1); *(SORT(.ctors.*)); *(.ctors); *(.ctor); LONG (0); }
${CONSTRUCTING+ ___DTOR_LIST__ = .; __DTOR_LIST__ = . ;
- LONG (-1); *(.dtors); *(.dtor); LONG (0); }
+ LONG (-1); *(SORT(.dtors.*)); *(.dtors); *(.dtor); LONG (0); }
${RELOCATING+ *(.fini)}
/* ??? Why is .gcc_exc here? */
${RELOCATING+ *(.gcc_exc)}
diff --git a/contrib/binutils/libiberty/ChangeLog b/contrib/binutils/libiberty/ChangeLog
index 4b59976..59f48d45 100644
--- a/contrib/binutils/libiberty/ChangeLog
+++ b/contrib/binutils/libiberty/ChangeLog
@@ -1,6 +1,556 @@
-2001-07-19 David O'Brien <obrien@FreeBSD.org>
+2002-01-22 Momchil Velikov <velco@fadata.bg>
+
+ * configure.in (variable detection): Use arrays of unspecified
+ size instead of plain integers.
+
+2002-01-18 DJ Delorie <dj@redhat.com>
+
+ * Makefile.in (TESTLIB): New. This library is for future
+ testsuites.
+ (CFILES, REQUIRED_OFILES, CONFIGURED_OFILES): Re-alphabetize,
+ break down by letter.
+ (REQUIRED_OFILES): List long-to-compile files first.
+ (maint-deps): New, target for updating dependencies.
+ (dependencies): Update.
+ * maint-tool: Add dependency-generating option.
+ * configure.in: Check for _doprnt even if we're not providing it.
+ * configure: Regenerate.
+
+ * _doprnt.c: Modifications to allow compiling on any platform.
+ * copysign.c: Likewise.
+ * putenv.c: Likewise.
+ * setenv.c: Likewise.
+ * vsprintf.c: Likewise.
+
+2002-01-15 Douglas B Rupp <rupp@gnat.com>
+
+ * mkstemps.c (mkstemps): On VMS, open temp file with option
+ that causes it to be deleted when closed.
+
+2002-01-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * cp-demangle.c (long_options): Const-ify.
+ * cplus-dem.c (long_options): Likewise.
+
+ * cplus-dem.c (mystrstr): Delete. All callers changed to use
+ strstr instead.
+
+2001-12-31 Ira Ruben <ira@apple.com>
+
+ * aclocal.m4 (libiberty_AC_FUNC_STRNCMP): Use anon mmap as 2nd try.
+ * configure: Regenerated.
+
+2001-12-24 Douglas B. Rupp <rupp@gnat.com>
+
+ * configure.in (uintptr_t): Use AC_CHECK_TYPE.
+ * configure: Regenerated.
+
+2001-12-12 Craig Rodrigues <rodrigc@gcc.gnu.org>
+
+ PR other/2719
+ * cplus-dem.c (consume_count): Treat negative count as an error.
+ * testsuite/demangle-expected: Added testcase.
+
+Tue Dec 11 07:08:57 2001 Douglas B. Rupp <rupp@gnat.com>
+
+ * configure.in: Hardcode that vfork works on VMS host.
+ * configure: Regenerated.
+
+2001-12-06 Richard Henderson <rth@redhat.com>
+
+ * cplus-dem.c (libiberty_demanglers): Add no_demangling case.
+ (cplus_demangle): Support no_demangling.
+
+2001-11-27 Zack Weinberg <zack@codesourcery.com>
+
+ * _doprnt.c: Moved here from gcc/doprint.c. Adjust to build
+ in libiberty context. Fix typo in leading comment.
+ * configure.in: Fix various AC_DEFINEs so autoheader works.
+ If any of vprintf, vsprintf, vfprintf is missing from libc,
+ then AC_REPLACE_FUNCS(_doprnt).
+
+2001-11-26 DJ Delorie <dj@redhat.com>
+ Daniel Jacobowitz <drow@mvista.com>
+
+ * Makefile.in (stamp-h): Depend on Makefile for proper
+ serialization.
+ (*-subdir): Depend on config.h for proper serialization.
+
+2001-11-26 DJ Delorie <dj@redhat.com>
+
+ * configure.in: Check for alloca.h (for regex.c and putenv.c).
+ * configure: Regenerate.
+ * config.h: Add HAVE_ALLOCA_H.
+
+2001-11-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * regex.c: Check defined(__STDC__) || defined(ALMOST_STDC) ||
+ defined(HAVE_STRINGIZE) to determine whether ISO CPP token pasting
+ is available.
+
+Thu Nov 15 11:06:25 2001 Jeffrey A Law (law@cygnus.com)
+
+ * config.in (HAVE_UINTPTR_T): Provide autoconf stub.
+ * configure.in (HAVE_UINTPTR_T): Test for system defining
+ uintptr_t and define HAVE_UINTPTR_T appropriately.
+ * regex.c (uintptr_t): Do not provide a definition if the
+ system provided one.
+
+ * regex.c (PREFIX): Provide an alternate definition for
+ non-ANSI/ISO compilers.
+ (ARG_PREFIX): Likewise.
+
+2001-11-12 Jim Meyering <meyering@lucent.com>
+
+ * obstack.c (_): Honor the setting of ENABLE_NLS. Otherwise,
+ this code would end up calling gettext even in packages built
+ with --disable-nls.
+ * getopt.c (_): Likewise.
+ * regex.c (_): Likewise.
+
+2001-11-03 Alan Modra <amodra@bigpond.net.au>
+
+ * configure.in: Cope with missing makeinfo.
+ * configure: Regenerate.
+
+2001-10-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * hex.c (hex_init): Provide empty stub.
+
+ * hex.c (hex_init): Delete.
+ (_hex_value): Const-ify and initialize at compile-time.
+
+2001-10-19 H.J. Lu <hjl@gnu.org>
+
+ * Makefile.in ($(TARGETLIB)): Also generate pic/$(TARGETLIB) if
+ necessary.
+
+2001-10-17 DJ Delorie <dj@redhat.com>
+
+ * argv.c, asprintf.c, choose-temp.c, concat.c, cplus-dem.c,
+ ffs.c, fnmatch.txh, getruntime.c, make-temp-file.c,
+ mkstemps.c, pexecute.c, random.c, strsignal.c, vasprintf.c:
+ Improve manual formatting.
+ * functions.texi: Regenerate.
+
+2001-10-15 DJ Delorie <dj@redhat.com>
+
+ * Makefile.in (TEXIFILES): Add fnmatch.txh.
+ (maint-undoc): New.
+ maint-tool: Add "undoc" tool.
+ * alloca.c, argv.c, asprintf.c, choose-temp.c, concat.c,
+ fdmatch.c, ffs.c, getruntime.c, insque.c, lbasename.c,
+ make-temp-file.c, mkstemps.c, pexecute.c, random.c, spaces.c,
+ strerror.s, strsignal.c, strtol.c, vasprintf.c: Add or update
+ documentation.
+ * fnmatch.txh: New.
+ * functions.texi: Regenerate.
+
+2001-10-10 Joseph S. Myers <jsm28@cam.ac.uk>
+
+ * bcmp.c, setenv.c: Use "nonzero" instead of "non-zero".
+ * strtod.c: Use "ISO C" instead of "ANSI C".
+ * functions.texi: Regenerate.
+
+2001-10-07 Joseph S. Myers <jsm28@cam.ac.uk>
+
+ * alloca.c, clock.c, getcwd.c, getpagesize.c, getpwd.c, index.c,
+ libiberty.texi, memchr.c, putenv.c, rindex.c, strchr.c, strdup.c,
+ strerror.c, strrchr.c, strstr.c, strtod.c, tmpnam.c, vfork.c,
+ xatexit.c, xmalloc.c, xstrerror.c: Improve manual formatting. Fix
+ spelling. Give names to function arguments in documentation. Use
+ (void) prototypes in documentation.
+ * functions.texi: Regenerate.
+
+2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * argv.c (buildargv, tests, main): Const-ify.
+ * cp-demangle.c (operator_code): Likewise.
+ * cplus-dem.c (optable, libiberty_demanglers,
+ cplus_demangle_set_style, cplus_demangle_name_to_style,
+ print_demangler_list): Likewise.
+ * hashtab.c (higher_prime_number): Likewise.
+ * strcasecmp.c (charmap): Likewise.
+ * strerror.c (error_info, strerror, main): Likewise.
+ * strncasecmp.c (charmap): Likewise.
+ * strsignal.c (signal_info): Likewise.
+
+2001-09-29 DJ Delorie <dj@redhat.com>
+
+ * configure: Regenerate.
+
+2001-09-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * concat.c: Include stdlib.h.
+
+2001-09-27 Eli Zaretskii <eliz@is.elta.co.il>
+
+ * libiberty.texi: (Top level): Add syncodeindex pg. Add
+ @dircategory and @direntry directives. Add @finalout.
+ (many nodes): Lose the next,prev,up pointers on the @nide line.
+ (Using, Supplemental Functions, Replacement Functions): Fix
+ markup.
+ (Functions): Move around, to allow makeinfo to build the manual
+ without next,prev,up pointers in thye node lines.
+ (Licenses): Fix typos.
+
+ * index.c, rindex.c, strchr.c, strerror.c, strrchr.c, strstr.c,
+ strtol.c, xatexit.c, xexit.c, xmalloc.c: Fix spelling and markup.
+ * functions.texi: Regenerate.
+
+ * copying-lib.texi: Lose the next,prev,up pointers on the @node
+ line.
+
+2001-09-27 DJ Delorie <dj@redhat.com>
+
+ * configure.in: Don't use in-tree texinfo, because libiberty must
+ be built before it. Check for makeinfo version 4 or higher.
+ * functions.texi: Regenerate.
+
+2001-09-20 DJ Delorie <dj@redhat.com>
+ Phil Edwards <pedwards@disaster.jaj.com>
+
+ * configure.in (MAKEINFO, PERL): Detect these.
+ (--enable-maintainer-mode): Add.
+ * configure: Regenerate.
+ * Makefile.in (MAKEINFO, PERL): Define.
+ (libiberty.info, libiberty.dvi, libiberty.html): New.
+ (CFILES): Add bsearch.c.
+ (CONFIGURED_OFILES): New, list of objects configure might add.
+ (maint-missing, maint-buildall): New, for maintainers only.
+ (clean, mostlyclean): Add info/dvi/html files.
+ * libiberty.texi, copying-lib.texi, obstacks.texi, functions.texi: New.
+ * gather-docs: New, for maintainers.
+ * maint-tool: New, for maintainers.
+ * alloca.c, atexit.c, basename.c, bcmp.c, bcopy.c, bsearch.c,
+ bzero.c, calloc.c, clock.c, configure.in, configure, getcwd.c,
+ getpagesize.c, getpwd.c, index.c, memchr.c, memcmp.c, memcpy.c,
+ memmove.c, memset.c, putenv.c, rename.c, rindex.c, setenv.c,
+ sigsetmask.c, strcasecmp.c, strchr.c, strdup.c, strerror.c,
+ strncasecmp.c, strncmp.c, strrchr.c, strstr.c, strtod.c, strtol.c,
+ tmpnam.c, vfork.c, vprintf.c, waitpid.c, xatexit.c, xexit.c,
+ xmalloc.c, xmemdup.c, xstrdup.c, xstrerror.c: Add or update
+ documentation.
+
+2001-09-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * concat.c (reconcat): Fix for traditional C.
+
+2001-09-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * concat.c (reconcat): New function.
+
+2001-09-17 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * concat.c (vconcat_length, vconcat_copy, concat_length,
+ concat_copy, concat_copy2): New functions.
+ (concat): Use vconcat_length/vconcat_copy.
+
+ * alloca.c (libiberty_optr, libiberty_nptr, libiberty_len):
+ Define.
+
+2001-09-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * asprintf.c: Don't define USE_STDARG. Use VPARAMS, VA_OPEN,
+ VA_FIXEDARG & VA_CLOSE.
+
+ * vasprintf.c: Check HAVE_STRING_H when including string.h.
+ (checkit): Delete redundant prototype. Add ATTRIBUTE_PRINTF_1.
+ Use VA_OPEN, VA_FIXEDARG & VA_CLOSE. Free allocated string.
+
+2001-08-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * concat.c (concat): Use VPARAMS, VA_OPEN, VA_FIXEDARG & VA_CLOSE.
+
+2001-08-23 Ulrich Drepper <drepper@redhat.com>
+
+ * regex.c (truncate_wchar): Use wcrtomb not wctomb.
+
+2001-08-23 Ulrich Drepper <drepper@redhat.com>
+
+ * posix/regex.c [_LIBC] (convert_mbs_to_wcs): Use __mbrtowc
+ instead of mbrtowc.
+ [_LIBC]: Use __iswctype instead of iswctype, __wcslen instead of
+ wcslen, and __wcscoll instead of wcscoll.
+
+2001-08-22 Matt Kraai <kraai@alumni.carnegiemellon.edu>
+
+ * fibheap.c (fibheap_init, fibnode_init): Remove.
+ (fibheap_new, fibnode_new): Use xcalloc to allocate and
+ initialize memory.
+ (fibheap_insert): Remove check for node allocation failure.
+
+2001-08-21 Richard Henderson <rth@redhat.com>
+
+ * Makefile.in (fibheap.o): Depend on config.h.
+ * fibheap.c: Tidy formatting. Use config.h.` Rearrange some
+ functions for inlining.
+
+Tue Aug 21 12:35:04 2001 Christopher Faylor <cgf@cygnus.com>
+
+ * configure.in: Need to set HAVE_SYS_ERRLIST and HAVE_SYS_NERR whenever
+ hosting on cygwin.
+ * configure: Regenerate.
+
+2001-08-20 Andrew Cagney <ac131313@redhat.com>
+
+ * floatformat.c (floatformat_m88110_ext): Remove #ifdef
+ HARRIS_FLOAT_FORMAT.
+ (floatformat_ia64_spill_little, floatformat_ia64_quad_little)
+ (floatformat_ia64_spill_big, floatformat_ia64_quad_big)
+ (floatformat_arm_ext_big, floatformat_arm_ext_littlebyte_bigword)
+ (floatformat_m88110_harris_ext): New float formats.
+
+2001-08-20 Daniel Berlin <dan@cgsoftware.com>
+
+ * fibheap.c: New file. Fibonacci heap.
+
+ * Makefile.in (CFILES): Add fibheap.c.
+ (REQUIRED_OFILES): Add fibheap.o.
+ (fibheap.o): Add dependencies for fibheap.o.
+
+2001-08-17 Christopher Faylor <cgf@cygnus.com>
+
+ * configure.in: Always set HAVE_SYS_ERRLIST when targetting cygwin.
+ * configure: Regenerate.
+
+2001-08-16 Richard Henderson <rth@redhat.com>
+
+ * hashtab.c (htab_hash_string): New.
+
+2001-08-13 Andrew Cagney <ac131313@redhat.com>
+
+ * floatformat.c (floatformat_ieee_double_littlebyte_bigword): Fix
+ name.
+
+2001-08-12 Isamu Hasegawa <isamu@yamato.ibm.com>
+
+ * regex.c (wcs_regex_compile): Use appropriate string
+ to compare with collating element.
+ Fix the padding for the alignment.
+
+2001-08-10 Andrew Cagney <ac131313@redhat.com>
+
+ * lbasename.c (lbasename): Change function definition to return a
+ const char pointer.
+
+2001-08-07 Jason Merrill <jason_merrill@redhat.com>
+
+ * cp-demangle.c (demangle_special_name): "GR" -> "reference temporary
+ for".
+
+2001-08-03 Richard Henderson <rth@redhat.com>
+
+ * Makefile.in (concat.o): Depend on config.h.
+
+2001-07-30 Andreas Jaeger <aj@suse.de>
+
+ * concat.c: Include "config.h".
+
+2001-07-30 Andreas Jaeger <aj@suse.de>
+
+ * regex.c: Declare wcs functions only if compiling with
+ MBS_SUPPORT.
+ Don't use #elif for traditional C.
+
+2001-07-23 Ulrich Drepper <drepper@redhat.com>
+
+ * regex.c: Revamp memory allocation for WCHAR functions to
+ not use too much stack.
+
+2001-07-30 Andreas Jaeger <aj@suse.de>
+
+ * regex.c: Declare wcs functions only if compiling with
+ MBS_SUPPORT.
+ Don't use #elif for traditional C.
+
+2001-07-25 Daniel Jacobowitz <drow@mvista.com>
+
+ * Makefile.in (regex.o): Add dependency on config.h.
+
+2001-07-18 Andreas Schwab <schwab@suse.de>
+
+ * regex.c (WORDCHAR_P) [WCHAR]: Also return true for the
+ underscore character.
+
+2001-07-18 Ulrich Drepper <drepper@redhat.com>
+
+ * regex.c: Limit string length printed in debug messages to 100
+ chars.
+
+2001-07-18 Andreas Jaeger <aj@suse.de>
+
+ * regex.c: Place under LGPL version 2.1.
+
+2001-07-10 Jeff Johnston <jjohnstn@redhat.com>
+
+ * Makefile.in: Add support for regex code.
+ * regex.c: New file.
+
+2001-07-05 Mark Klein <mklein@dis.com>
+
+ * Makefile.in: Add ffs.c dependency.
+ * configure.in: Add ffs.c.
+ * ffs.c: New file.
+
+2001-06-18 Richard Henderson <rth@redhat.com>
+
+ * concat.c: Include <sys/types.h>.
- * lbasename.c: New file.
+2001-06-11 Loren J. Rittle <ljrittle@acm.org>
+
+ bootstrap/3106
+ * strerror.c (sys_nerr): Hide the OS header version.
+ * strsignal.c (sys_nsig): Likewise.
+
+2001-06-10 Richard Henderson <rth@redhat.com>
+
+ * concat.c: Include string.h. Fix int vs size_t usage.
+ Simplify the iteration loops. Use memcpy.
+
+2001-05-16 Matt Kraai <kraai@alumni.carnegiemellon.edu>
+
+ * partition.c: Fix misspelling of `implementation'.
+
+2001-05-09 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * md5.c (md5_init_ctx): Declare constants as unsigned.
+ (md5_process_block): Likewise.
+
+2001-05-07 Zack Weinberg <zackw@stanford.edu>
+
+ * cp-demangle.c (demangle_v3_with_details,
+ is_gnu_v3_mangled_ctor, is_gnu_v3_mangled_dtor): Use K+R style
+ function definition.
+ * ternary.c: Use K+R style function definitions. Use PTR, not
+ void *. Make arguments constant where possible.
+
+2001-05-07 Mark Mitchell <mark@codesourcery.com>
+
+ * splay-tree.h (splay_tree_max): New function.
+ (splay_tree_min): Likewise.
+
+2001-04-15 Daniel Berlin <dan@cgsoftware.com>
+
+ * ternary.c: New file - Ternary search tree implementation.
+
+ * Makefile.in: Add ternary.o, and ternary.c dependencies.
+
+2001-04-03 Zack Weinberg <zackw@stanford.edu>
+
+ * make-temp-file.c (try): Inline.
+
+2001-02-28 Richard Henderson <rth@redhat.com>
+
+ * Makefile.in (make-temp-file.o): Depend on config.h.
+
+2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
+
+ * memchr.c (memchr): Adjust condition to avoid infinite loop.
+
+2001-03-23 Jakub Jelinek <jakub@redhat.com>
+
+ * cp-demangle.c (demangle_discriminator): `_0' is discriminator #1,
+ `_' not followed by a digit is invalid.
+
+2001-03-22 Jim Blandy <jimb@redhat.com>
+
+ * cp-demangle.c (string_list_delete): Use dyn_string_delete
+ instead of free, to free the contents as well as the string
+ structure.
+
+2001-03-21 Zack Weinberg <zackw@stanford.edu>
+
+ * make-temp-file.c: Always default DIR_SEPARATOR to '/'.
+ Don't default P_tmpdir to anything. Try /var/tmp before
+ /usr/tmp.
+
+2001-03-20 Zack Weinberg <zackw@stanford.edu>
+
+ * choose-temp.c: Split off make_temp_file, and the code
+ duplicated between it and choose_temp_base, into...
+ * make-temp-file.c: ... here; new file.
+
+ * Makefile.in (CFILES): Add make-temp-file.c.
+ (REQUIRED_OFILES): Add make-temp-file.o.
+
+2001-03-20 Jim Blandy <jimb@redhat.com>
+
+ * cp-demangle.c (struct demangling_def): New fields:
+ is_constructor and is_destructor.
+ (demangling_new): Initialize them.
+ (demangle_ctor_dtor_name): Set them, if we detect a constructor
+ or destructor.
+ (demangle_v3_with_details, is_gnu_v3_mangled_ctor,
+ is_gnu_v3_mangled_dtor): New functions.
+
+2001-03-20 Jason Merrill <jason@redhat.com>
+
+ * cplus-dem.c (main): Skip initial $.
+
+2001-03-15 Michael Meissner <meissner@redhat.com>
+
+ * hashtab.c (higher_prime_number): Silence warning that 4294967291
+ might be a signed integer under pre-ISO C systems.
+
+2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
+ John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * libiberty/lbasename.c: New file.
+ * libiberty/Makefile.in: Update for lbasename.
+
+2001-03-06 Zack Weinberg <zackw@stanford.edu>
+
+ * aclocal.m4 (libiberty_AC_FUNC_C_ALLOCA): New.
+ * configure.in: Replace all alloca logic with a simple use of
+ the above new macro.
+ * config.table: Kill *-*-beos* entry.
+ * config/mh-beos: Delete.
+ * configure, config.in: Regenerate.
+
+ * Makefile.in (ALLOCA, HFILES): Kill.
+ (REQUIRED_OFILES): Add alloca.o.
+ (alloca.o): Depend on libiberty.h.
+ (argv.o): Don't depend on alloca-conf.h.
+ * alloca-conf.h: Delete.
+ * alloca.c: Include libiberty.h. Kill all #ifdef emacs
+ blocks. Provide the C alloca unconditionally. Use PTR where
+ appropriate. Make i00afunc static.
+ * argv.c: Don't include alloca-conf.h.
+
+2001-03-04 John David Anglin <dave@hiauly1.hia.nrc.ca>
+
+ * cplus-dem.c (main): Cast enum style to int.
+
+2001-02-16 Loren J. Rittle <ljrittle@acm.org>
+
+ * cplus-dem.c (main): Initialize style.
+
+2001-02-02 Phil Edwards <pme@sources.redhat.com>
+
+ * COPYING.LIB: Update to LGPL 2.1 from the FSF.
+
+2001-01-31 Bryce McKinlay <bryce@albatross.co.nz>
+
+ Add support for Java demangling under the v3 ABI:
+ * cp-demangle.c (NAMESPACE_SEPARATOR): New define.
+ (struct demangling_def): Add `style' field.
+ (demangling_new): New parameter `style'. Set it in demangling_t.
+ (demangle_prefix): Use NAMESPACE_SEPARATOR.
+ (demangle_type_ptr): Don't emit pointer symbol if doing Java output.
+ (cp_demangle): New parameter `style'. Pass it to demangling_new().
+ (main): Call cp_demangle with extra parameter.
+ (java_demangle_v3): New function.
+ (java_builtin_type_names): New. Table of primitive type names used
+ for Java demangling.
+ (demangle_builtin_type): Look up in java_builtin_type_names if doing
+ Java output.
+ * cplus-dem.c (cplus_demangle): Use java_demangle_v3 to do Java
+ demangling.
+ (long_options): Remove obsolete `java' option.
+ (main): Remove explicit handling of `java' option. Instead, pass style
+ parameter in cplus_demangle flags as gdb does.
+ * testsuite/demangle.expected: Add some Java test cases.
2000-12-29 DJ Delorie <dj@redhat.com>
@@ -10,7 +560,7 @@
* getopt1.c: Ditto.
* md5.c: Ditto.
* obstack.c: Ditto.
-
+
2000-12-26 Michael Sokolov <msokolov@ivan.Harhan.ORG>
* bsearch.c: New file.
@@ -115,12 +665,12 @@
2000-11-04 Hans-Peter Nilsson <hp@bitrange.com>
* hashtab.c (htab_expand): Change to return int. Use calloc or
- xcalloc depending on htab->return_allocation_failure. Return zero
- if calloc fails.
+ xcalloc depending on htab->return_allocation_failure. Return zero
+ if calloc fails.
(htab_create): Update comment to cover memory allocation.
(htab_try_create): New.
(htab_find_slot_with_hash): Return NULL if htab_expand fails.
- Update comment to cover this.
+ Update comment to cover this.
2000-11-03 Hans-Peter Nilsson <hp@bitrange.com>
@@ -623,7 +1173,7 @@ Tue May 30 15:07:52 2000 Jeffrey A Law (law@cygnus.com)
2000-05-23 Mike Stump <mrs@wrs.com>
* Makefile.in (xmalloc.o): Add dependency for config.h, fixes make
- -j3.
+ -j3.
2000-05-18 J. David Anglin <dave@hiauly1.hia.nrc.ca>
@@ -1256,9 +1806,9 @@ Tue Dec 22 09:43:35 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* 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.
+ (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.
@@ -1271,11 +1821,11 @@ Tue Dec 22 09:43:35 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
Cast the argument of a ctype function to unsigned char.
* floatformat.c (floatformat_to_double): Add explicit braces to
- avoid ambiguous `else'.
+ 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.
+ `cstart' and `cend' to unsigned char. Cast the argument of macro
+ `FOLD', which uses ctype functions, to unsigned char.
* objalloc.c (free): Add prototype.
@@ -1286,7 +1836,7 @@ Sun Dec 20 16:03:46 1998 Hans-Peter Nilsson <hp@axis.se>
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.
+ doesn't exist.
(do_hpacc_template_literal): remove unused variable `i'.
Fri Dec 18 16:11:43 EST 1998 Andrew MacLeod <amacleod@cygnus.com>
@@ -1330,48 +1880,48 @@ Fri Dec 4 13:51:04 1998 David Taylor <taylor@texas.cygnus.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.
+ 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.
+ function.
(arm_pt): handle ARM_DEMANGLING and EDG_DEMANGLING styles; HP
- style for this case is the same as ARM.
+ 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_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.
+ 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.
+ 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.
+ 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.
+ 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.
+ value param for HP/aCC.
(do_hpacc_template_literal): new function. Handle a template's
- literal parameter for HP aCC.
+ 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.
+ to message.
Sat Nov 28 17:25:22 1998 Christopher Faylor <cgf@cygnus.com>
@@ -1453,13 +2003,13 @@ Mon Nov 2 15:05:33 1998 Geoffrey Noer <noer@cygnus.com>
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.
+ 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>
@@ -1565,8 +2115,8 @@ Thu Oct 8 23:42:08 1998 Jeffrey A Law (law@cygnus.com)
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.
+ inclusions inside HAVE_*_H macros. Include ansidecl.h when not
+ IN_GCC.
* vasprintf.c: Include stdarg.h/varargs.h first.
@@ -1880,7 +2430,7 @@ Mon May 4 13:00:28 1998 Ian Lance Taylor <ian@cygnus.com>
* 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.
+ (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@.
@@ -2097,7 +2647,7 @@ Wed Sep 24 00:31:59 1997 Felix Lee <flee@yin.cygnus.com>
* asprintf.c: stdarg.h when ALMOST_STDC
* config/mh-windows (EXTRA_OFILES): add asprintf.o and
- strncasecmp.o.
+ strncasecmp.o.
Thu Aug 28 14:27:15 1997 Andrew Cagney <cagney@b1.cygnus.com>
@@ -4139,7 +4689,7 @@ Thu Jan 30 22:48:41 1992 Stu Grossman (grossman at cygnus.com)
Mon Jan 20 18:53:23 1992 Stu Grossman (grossman at cygnus.com)
- * getopt.c, getopt1.c, ../include/getopt.h: Get latest versions.
+ * getopt.c, getopt1.c, ../include/getopt.h: Get latest versions.
Sat Jan 18 16:53:01 1992 Fred Fish (fnf at cygnus.com)
diff --git a/contrib/binutils/libiberty/Makefile.in b/contrib/binutils/libiberty/Makefile.in
index 16a040c..5fa9630 100644
--- a/contrib/binutils/libiberty/Makefile.in
+++ b/contrib/binutils/libiberty/Makefile.in
@@ -1,6 +1,6 @@
#
# Makefile
-# Copyright (C) 1990, 91-99, 2000
+# Copyright (C) 1990, 91-99, 2000, 2001
# Free Software Foundation
#
# This file is part of the libiberty library.
@@ -56,15 +56,17 @@ CC = @CC@
CFLAGS = @CFLAGS@
LIBCFLAGS = $(CFLAGS)
RANLIB = @RANLIB@
+MAKEINFO = @MAKEINFO@
+PERL = @PERL@
PICFLAG =
MAKEOVERRIDES =
TARGETLIB = libiberty.a
+TESTLIB = testlib.a
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.)
@@ -95,6 +97,7 @@ FLAGS_TO_PASS = \
# Subdirectories to recurse into. We need to override this during cleaning
SUBDIRS = testsuite
+# FIXME: add @BUILD_INFO@ once we're sure it works for everyone.
all: stamp-picdir $(TARGETLIB) needed-list required-list all-subdir
@$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=all
@@ -113,45 +116,122 @@ COMPILE.c = $(CC) -c @DEFS@ $(LIBCFLAGS) -I. -I$(INCDIR) $(HDEFINES) @ac_libiber
else true; fi
$(COMPILE.c) $<
-info: info-subdir
+# NOTE: If you add new files to the library, add them to this list
+# (alphabetical), and add them to REQUIRED_OFILES, or
+# CONFIGURED_OFILES and funcs in configure.in.
+CFILES = alloca.c argv.c asprintf.c atexit.c \
+ basename.c bcmp.c bcopy.c bsearch.c bzero.c \
+ calloc.c choose-temp.c clock.c concat.c cp-demangle.c \
+ cplus-dem.c \
+ dyn-string.c \
+ fdmatch.c ffs.c fibheap.c floatformat.c fnmatch.c \
+ getcwd.c getopt.c getopt1.c getpagesize.c getpwd.c getruntime.c \
+ hashtab.c hex.c \
+ index.c insque.c \
+ lbasename.c \
+ make-temp-file.c md5.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 regex.c rename.c rindex.c \
+ safe-ctype.c setenv.c sigsetmask.c sort.c spaces.c \
+ splay-tree.c strcasecmp.c strchr.c strdup.c strerror.c \
+ strncasecmp.c strncmp.c strrchr.c strsignal.c strstr.c \
+ strtod.c strtol.c strtoul.c \
+ ternary.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
+
+# These are always included in the library. The first four are listed
+# first and by compile time to optimize parallel builds.
+REQUIRED_OFILES = regex.o cplus-dem.o cp-demangle.o md5.o \
+ alloca.o argv.o \
+ choose-temp.o concat.o \
+ dyn-string.o \
+ fdmatch.o fibheap.o floatformat.o fnmatch.o \
+ getopt.o getopt1.o getpwd.o getruntime.o \
+ hashtab.o hex.o \
+ lbasename.o \
+ make-temp-file.o \
+ objalloc.o obstack.o \
+ partition.o pexecute.o \
+ safe-ctype.o sort.o spaces.o splay-tree.o strerror.o \
+ strsignal.o \
+ ternary.o \
+ xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o
+
+# These are all the objects that configure may add to the library via
+# $funcs or EXTRA_OFILES. This list exists here only for "make
+# maint-missing" and "make check".
+CONFIGURED_OFILES = asprintf.o atexit.o \
+ basename.o bcmp.o bcopy.o bsearch.o bzero.o \
+ calloc.o clock.o copysign.o \
+ _doprnt.o \
+ ffs.o \
+ getcwd.o getpagesize.o \
+ index.o insque.o \
+ memchr.o memcmp.o memcpy.o memmove.o memset.o mkstemps.o \
+ putenv.o \
+ random.o rename.o rindex.o \
+ setenv.o sigsetmask.o strcasecmp.o strchr.o strdup.o \
+ strncasecmp.o strncmp.o strrchr.o strstr.o strtod.o strtol.o \
+ strtoul.o \
+ tmpnam.o \
+ vasprintf.o vfork.o vfprintf.o vprintf.o vsprintf.o \
+ waitpid.o
+
+$(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS)
+ -rm -f $(TARGETLIB) pic/$(TARGETLIB)
+ $(AR) $(AR_FLAGS) $(TARGETLIB) \
+ $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS)
+ $(RANLIB) $(TARGETLIB)
+ if [ x"$(PICFLAG)" != x ]; then \
+ cd pic; \
+ $(AR) $(AR_FLAGS) $(TARGETLIB) \
+ $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS); \
+ $(RANLIB) $(TARGETLIB); \
+ cd ..; \
+ else true; fi
+
+$(TESTLIB): $(REQUIRED_OFILES) $(CONFIGURED_OFILES)
+ -rm -f $(TESTLIB)
+ $(AR) $(AR_FLAGS) $(TESTLIB) \
+ $(REQUIRED_OFILES) $(CONFIGURED_OFILES)
+ $(RANLIB) $(TESTLIB)
+
+info: libiberty.info info-subdir
install-info: install-info-subdir
clean-info: clean-info-subdir
-dvi: dvi-subdir
+dvi: libiberty.dvi dvi-subdir
+html: libiberty.html
-# Include files that are in this directory.
-HFILES = alloca-conf.h
+TEXISRC = \
+ $(srcdir)/libiberty.texi \
+ $(srcdir)/copying-lib.texi \
+ $(srcdir)/obstacks.texi \
+ $(srcdir)/functions.texi
-# NOTE: If you add new files to the library, add them to this list
-# (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 \
- cp-demangle.c dyn-string.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 lbasename.c \
- md5.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 safe-ctype.c sort.c spaces.c splay-tree.c strcasecmp.c \
- strncasecmp.c strchr.c strdup.c strerror.c strncmp.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
-
-# These are always included in the library.
-REQUIRED_OFILES = argv.o choose-temp.o concat.o cplus-dem.o cp-demangle.o \
- dyn-string.o fdmatch.o fnmatch.o getopt.o getopt1.o getpwd.o \
- getruntime.o hashtab.o hex.o floatformat.o lbasename.o md5.o \
- objalloc.o obstack.o \
- partition.o pexecute.o safe-ctype.o sort.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)
+# Additional files that have texi snippets that need to be collected
+# and sorted. Some are here because the sources are imported from
+# elsewhere. Others represent headers in ../include.
+TEXIFILES = fnmatch.txh
+
+libiberty.info : $(srcdir)/libiberty.texi $(TEXISRC)
+ $(MAKEINFO) -I$(srcdir) $(srcdir)/libiberty.texi
+
+libiberty.dvi : $(srcdir)/libiberty.texi $(TEXISRC)
+ texi2dvi $(srcdir)/libiberty.texi
+
+libiberty.html : $(srcdir)/libiberty.texi $(TEXISRC)
+ $(MAKEINFO) --html -I$(srcdir) $(srcdir)/libiberty.texi
+
+@MAINT@$(srcdir)/functions.texi : stamp-functions
+@MAINT@ @true
+
+@MAINT@stamp-functions : $(CFILES) $(TEXIFILES) $(srcdir)/gather-docs Makefile
+@MAINT@@HAVE_PERL@ $(PERL) $(srcdir)/gather-docs $(srcdir) $(srcdir)/functions.texi $(CFILES) $(TEXIFILES)
+@MAINT@ echo stamp > stamp-functions
INSTALL_DEST = @INSTALL_DEST@
install: install_to_$(INSTALL_DEST) install-subdir
@@ -199,8 +279,8 @@ stamp-picdir:
etags tags: TAGS etags-subdir
-TAGS: $(CFILES) $(HFILES)
- etags `for i in $(HFILES) $(CFILES); do echo $(srcdir)/$$i ; done`
+TAGS: $(CFILES)
+ etags `for i in $(CFILES); do echo $(srcdir)/$$i ; done`
# The standalone demangler (c++filt) has been moved to binutils.
demangle:
@@ -209,7 +289,21 @@ demangle:
@false
ls:
- @echo Makefile $(HFILES) $(CFILES)
+ @echo Makefile $(CFILES)
+
+# Various targets for maintainers.
+
+maint-missing :
+ @$(PERL) $(srcdir)/maint-tool -s $(srcdir) missing $(CFILES) $(REQUIRED_OFILES) $(CONFIGURED_OFILES)
+
+maint-buildall : $(REQUIRED_OFILES) $(CONFIGURED_OFILES)
+ @true
+
+maint-undoc : $(srcdir)/functions.texi
+ @$(PERL) $(srcdir)/maint-tool -s $(srcdir) undoc
+
+maint-deps :
+ @$(PERL) $(srcdir)/maint-tool -s $(srcdir) deps $(INCDIR)
# Need to deal with profiled libraries, too.
@@ -219,10 +313,15 @@ 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
+ -rm -f libiberty.aux libiberty.cp libiberty.cps libiberty.fn libiberty.ky
+ -rm -f libiberty.log libiberty.tmp libiberty.tps libiberty.pg
+ -rm -f libiberty.pgs libiberty.toc libiberty.tp libiberty.tpl libiberty.vr
+ -rm -f libtexi.stamp
@$(MULTICLEAN) multi-clean DO=mostlyclean
clean: clean-subdir
$(MAKE) SUBDIRS="" mostlyclean
-rm -f *.a required-list tmpmulti.out
+ -rm -f libiberty.dvi libiberty.info* libiberty.html
@$(MULTICLEAN) multi-clean DO=clean
distclean: distclean-subdir
$(MAKE) SUBDIRS="" clean
@@ -238,68 +337,115 @@ force:
Makefile: $(srcdir)/Makefile.in config.status
CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
+# Depending on Makefile makes sure that config.status has been re-run
+# if needed. This prevents problems with parallel builds.
config.h: stamp-h ; @true
-stamp-h: config.in config.status
+stamp-h: config.in config.status Makefile
CONFIG_FILES= CONFIG_HEADERS=config.h:config.in $(SHELL) ./config.status
config.status: $(srcdir)/configure $(srcdir)/config.table
$(SHELL) ./config.status --recheck
-
+# Depending on config.h makes sure that config.status has been re-run
+# if needed. This prevents problems with parallel builds, in case
+# subdirectories need to run config.status also.
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:
+maintainer-clean-subdir: config.h
@subdirs='$(SUBDIRS)'; \
target=`echo $@ | sed -e 's/-subdir//'`; \
for dir in $$subdirs ; do \
cd $$dir && $(MAKE) $$target; \
done
-$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) $(ALLOCA): stamp-picdir
+$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS): stamp-picdir
+$(CONFIGURED_OFILES): stamp-picdir
+
+# The dependencies in the remainder of this file are automatically
+# generated by "make maint-deps". Manual edits will be lost.
-alloca.o: config.h
+_doprnt.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
+alloca.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+argv.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+asprintf.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.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
+basename.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/safe-ctype.h
+bsearch.o: config.h $(INCDIR)/ansidecl.h
+calloc.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+choose-temp.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
clock.o: config.h
-concat.o: $(INCDIR)/libiberty.h
-cplus-dem.o: config.h $(INCDIR)/demangle.h
-cp-demangle.o: config.h $(INCDIR)/dyn-string.h $(INCDIR)/demangle.h
-dyn-string.o: config.h $(INCDIR)/dyn-string.h
-fdmatch.o: $(INCDIR)/libiberty.h
-fnmatch.o: config.h $(INCDIR)/fnmatch.h
+concat.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+copysign.o: $(INCDIR)/ansidecl.h
+cp-demangle.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/demangle.h \
+ $(INCDIR)/dyn-string.h $(INCDIR)/getopt.h $(INCDIR)/libiberty.h
+cplus-dem.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/demangle.h \
+ $(INCDIR)/getopt.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+dyn-string.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/dyn-string.h \
+ $(INCDIR)/libiberty.h
+fdmatch.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+fibheap.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/fibheap.h \
+ $(INCDIR)/libiberty.h
+floatformat.o: $(INCDIR)/ansidecl.h $(INCDIR)/floatformat.h
+fnmatch.o: config.h $(INCDIR)/fnmatch.h $(INCDIR)/safe-ctype.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
-lbasename.o: $(INCDIR)/libiberty.h
-mkstemps.o: config.h
-md5.o: config.h
-objalloc.o: config.h $(INCDIR)/objalloc.h
+getpwd.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+getruntime.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+hashtab.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/hashtab.h \
+ $(INCDIR)/libiberty.h
+hex.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+lbasename.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/safe-ctype.h
+make-temp-file.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+md5.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/md5.h
+memchr.o: $(INCDIR)/ansidecl.h
+memcmp.o: $(INCDIR)/ansidecl.h
+memcpy.o: $(INCDIR)/ansidecl.h
+memmove.o: $(INCDIR)/ansidecl.h
+memset.o: $(INCDIR)/ansidecl.h
+mkstemps.o: config.h $(INCDIR)/ansidecl.h
+objalloc.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/objalloc.h
obstack.o: config.h $(INCDIR)/obstack.h
-partition.o: config.h $(INCDIR)/partition.h
-pexecute.o: config.h $(INCDIR)/libiberty.h
+partition.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/partition.h
+pexecute.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/safe-ctype.h
+putenv.o: config.h $(INCDIR)/ansidecl.h
+random.o: $(INCDIR)/ansidecl.h
+regex.o: config.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h
rename.o: config.h
-setenv.o: config.h
-sort.o: config.h $(INCDIR)/sort.h $(INCDIR)/ansidecl.h
-spaces.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
-strtol.o: config.h
-strtoul.o: config.h
-vasprintf.o: config.h
-xatexit.o: $(INCDIR)/libiberty.h
-xexit.o: config.h $(INCDIR)/libiberty.h
-xmalloc.o: config.h $(INCDIR)/libiberty.h
-xmemdup.o: config.h $(INCDIR)/libiberty.h
-xstrdup.o: config.h $(INCDIR)/libiberty.h
-xstrerror.o: config.h $(INCDIR)/libiberty.h
+safe-ctype.o: $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
+setenv.o: config.h $(INCDIR)/ansidecl.h
+sigsetmask.o: $(INCDIR)/ansidecl.h
+sort.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/sort.h
+spaces.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+splay-tree.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/splay-tree.h
+strcasecmp.o: $(INCDIR)/ansidecl.h
+strchr.o: $(INCDIR)/ansidecl.h
+strerror.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+strncasecmp.o: $(INCDIR)/ansidecl.h
+strncmp.o: $(INCDIR)/ansidecl.h
+strrchr.o: $(INCDIR)/ansidecl.h
+strsignal.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+strtod.o: $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
+strtol.o: config.h $(INCDIR)/safe-ctype.h
+strtoul.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/safe-ctype.h
+ternary.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
+ $(INCDIR)/ternary.h
+vasprintf.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+vfork.o: $(INCDIR)/ansidecl.h
+vprintf.o: $(INCDIR)/ansidecl.h
+vsprintf.o: $(INCDIR)/ansidecl.h
waitpid.o: config.h
-hashtab.o: config.h $(INCDIR)/libiberty.h $(INCDIR)/hashtab.h $(INCDIR)/ansidecl.h
+xatexit.o: $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+xexit.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+xmalloc.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+xmemdup.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+xstrdup.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
+xstrerror.o: config.h $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h
diff --git a/contrib/binutils/libiberty/_doprnt.c b/contrib/binutils/libiberty/_doprnt.c
new file mode 100644
index 0000000..8ce1415
--- /dev/null
+++ b/contrib/binutils/libiberty/_doprnt.c
@@ -0,0 +1,303 @@
+/* Provide a version of _doprnt in terms of fprintf.
+ Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Contributed by Kaveh Ghazi (ghazi@caip.rutgers.edu) 3/29/98
+
+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, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+#include "config.h"
+#include "ansidecl.h"
+#include "safe-ctype.h"
+
+#include <stdio.h>
+#ifdef ANSI_PROTOTYPES
+#include <stdarg.h>
+#else
+#include <varargs.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+#undef _doprnt
+
+#ifdef HAVE__DOPRNT
+#define TEST
+#endif
+
+#ifdef TEST /* Make sure to use the internal one. */
+#define _doprnt my_doprnt
+#endif
+
+#define COPY_VA_INT \
+ do { \
+ const int value = abs (va_arg (ap, int)); \
+ char buf[32]; \
+ ptr++; /* Go past the asterisk. */ \
+ *sptr = '\0'; /* NULL terminate sptr. */ \
+ sprintf(buf, "%d", value); \
+ strcat(sptr, buf); \
+ while (*sptr) sptr++; \
+ } while (0)
+
+#define PRINT_CHAR(CHAR) \
+ do { \
+ putc(CHAR, stream); \
+ ptr++; \
+ total_printed++; \
+ continue; \
+ } while (0)
+
+#define PRINT_TYPE(TYPE) \
+ do { \
+ int result; \
+ TYPE value = va_arg (ap, TYPE); \
+ *sptr++ = *ptr++; /* Copy the type specifier. */ \
+ *sptr = '\0'; /* NULL terminate sptr. */ \
+ result = fprintf(stream, specifier, value); \
+ if (result == -1) \
+ return -1; \
+ else \
+ { \
+ total_printed += result; \
+ continue; \
+ } \
+ } while (0)
+
+int
+_doprnt (format, ap, stream)
+ const char * format;
+ va_list ap;
+ FILE * stream;
+{
+ const char * ptr = format;
+ char specifier[128];
+ int total_printed = 0;
+
+ while (*ptr != '\0')
+ {
+ if (*ptr != '%') /* While we have regular characters, print them. */
+ PRINT_CHAR(*ptr);
+ else /* We got a format specifier! */
+ {
+ char * sptr = specifier;
+ int wide_width = 0, short_width = 0;
+
+ *sptr++ = *ptr++; /* Copy the % and move forward. */
+
+ while (strchr ("-+ #0", *ptr)) /* Move past flags. */
+ *sptr++ = *ptr++;
+
+ if (*ptr == '*')
+ COPY_VA_INT;
+ else
+ while (ISDIGIT(*ptr)) /* Handle explicit numeric value. */
+ *sptr++ = *ptr++;
+
+ if (*ptr == '.')
+ {
+ *sptr++ = *ptr++; /* Copy and go past the period. */
+ if (*ptr == '*')
+ COPY_VA_INT;
+ else
+ while (ISDIGIT(*ptr)) /* Handle explicit numeric value. */
+ *sptr++ = *ptr++;
+ }
+ while (strchr ("hlL", *ptr))
+ {
+ switch (*ptr)
+ {
+ case 'h':
+ short_width = 1;
+ break;
+ case 'l':
+ wide_width++;
+ break;
+ case 'L':
+ wide_width = 2;
+ break;
+ default:
+ abort();
+ }
+ *sptr++ = *ptr++;
+ }
+
+ switch (*ptr)
+ {
+ case 'd':
+ case 'i':
+ case 'o':
+ case 'u':
+ case 'x':
+ case 'X':
+ case 'c':
+ {
+ /* Short values are promoted to int, so just copy it
+ as an int and trust the C library printf to cast it
+ to the right width. */
+ if (short_width)
+ PRINT_TYPE(int);
+ else
+ {
+ switch (wide_width)
+ {
+ case 0:
+ PRINT_TYPE(int);
+ break;
+ case 1:
+ PRINT_TYPE(long);
+ break;
+ case 2:
+ default:
+#if defined(__GNUC__) || defined(HAVE_LONG_LONG)
+ PRINT_TYPE(long long);
+#else
+ PRINT_TYPE(long); /* Fake it and hope for the best. */
+#endif
+ break;
+ } /* End of switch (wide_width) */
+ } /* End of else statement */
+ } /* End of integer case */
+ break;
+ case 'f':
+ case 'e':
+ case 'E':
+ case 'g':
+ case 'G':
+ {
+ if (wide_width == 0)
+ PRINT_TYPE(double);
+ else
+ {
+#if defined(__GNUC__) || defined(HAVE_LONG_DOUBLE)
+ PRINT_TYPE(long double);
+#else
+ PRINT_TYPE(double); /* Fake it and hope for the best. */
+#endif
+ }
+ }
+ break;
+ case 's':
+ PRINT_TYPE(char *);
+ break;
+ case 'p':
+ PRINT_TYPE(void *);
+ break;
+ case '%':
+ PRINT_CHAR('%');
+ break;
+ default:
+ abort();
+ } /* End of switch (*ptr) */
+ } /* End of else statement */
+ }
+
+ return total_printed;
+}
+
+#ifdef TEST
+
+#include <math.h>
+#ifndef M_PI
+#define M_PI (3.1415926535897932385)
+#endif
+
+#define RESULT(x) do \
+{ \
+ int i = (x); \
+ printf ("printed %d characters\n", i); \
+ fflush(stdin); \
+} while (0)
+
+static int checkit PARAMS ((const char * format, ...)) ATTRIBUTE_PRINTF_1;
+
+static int
+checkit VPARAMS ((const char* format, ...))
+{
+ int result;
+ VA_OPEN (args, format);
+ VA_FIXEDARG (args, char *, format);
+
+ result = _doprnt (format, args, stdout);
+ VA_CLOSE (args);
+
+ return result;
+}
+
+int
+main ()
+{
+ RESULT(checkit ("<%d>\n", 0x12345678));
+ RESULT(printf ("<%d>\n", 0x12345678));
+
+ RESULT(checkit ("<%200d>\n", 5));
+ RESULT(printf ("<%200d>\n", 5));
+
+ RESULT(checkit ("<%.300d>\n", 6));
+ RESULT(printf ("<%.300d>\n", 6));
+
+ RESULT(checkit ("<%100.150d>\n", 7));
+ RESULT(printf ("<%100.150d>\n", 7));
+
+ RESULT(checkit ("<%s>\n",
+ "jjjjjjjjjiiiiiiiiiiiiiiioooooooooooooooooppppppppppppaa\n\
+777777777777777777333333333333366666666666622222222222777777777777733333"));
+ RESULT(printf ("<%s>\n",
+ "jjjjjjjjjiiiiiiiiiiiiiiioooooooooooooooooppppppppppppaa\n\
+777777777777777777333333333333366666666666622222222222777777777777733333"));
+
+ RESULT(checkit ("<%f><%0+#f>%s%d%s>\n",
+ 1.0, 1.0, "foo", 77, "asdjffffffffffffffiiiiiiiiiiixxxxx"));
+ RESULT(printf ("<%f><%0+#f>%s%d%s>\n",
+ 1.0, 1.0, "foo", 77, "asdjffffffffffffffiiiiiiiiiiixxxxx"));
+
+ RESULT(checkit ("<%4f><%.4f><%%><%4.4f>\n", M_PI, M_PI, M_PI));
+ RESULT(printf ("<%4f><%.4f><%%><%4.4f>\n", M_PI, M_PI, M_PI));
+
+ RESULT(checkit ("<%*f><%.*f><%%><%*.*f>\n", 3, M_PI, 3, M_PI, 3, 3, M_PI));
+ RESULT(printf ("<%*f><%.*f><%%><%*.*f>\n", 3, M_PI, 3, M_PI, 3, 3, M_PI));
+
+ RESULT(checkit ("<%d><%i><%o><%u><%x><%X><%c>\n",
+ 75, 75, 75, 75, 75, 75, 75));
+ RESULT(printf ("<%d><%i><%o><%u><%x><%X><%c>\n",
+ 75, 75, 75, 75, 75, 75, 75));
+
+ RESULT(checkit ("<%d><%i><%o><%u><%x><%X><%c>\n",
+ 75, 75, 75, 75, 75, 75, 75));
+ RESULT(printf ("<%d><%i><%o><%u><%x><%X><%c>\n",
+ 75, 75, 75, 75, 75, 75, 75));
+
+ RESULT(checkit ("Testing (hd) short: <%d><%ld><%hd><%hd><%d>\n", 123, (long)234, 345, 123456789, 456));
+ RESULT(printf ("Testing (hd) short: <%d><%ld><%hd><%hd><%d>\n", 123, (long)234, 345, 123456789, 456));
+
+#if defined(__GNUC__) || defined (HAVE_LONG_LONG)
+ RESULT(checkit ("Testing (lld) long long: <%d><%lld><%d>\n", 123, 234234234234234234LL, 345));
+ RESULT(printf ("Testing (lld) long long: <%d><%lld><%d>\n", 123, 234234234234234234LL, 345));
+ RESULT(checkit ("Testing (Ld) long long: <%d><%Ld><%d>\n", 123, 234234234234234234LL, 345));
+ RESULT(printf ("Testing (Ld) long long: <%d><%Ld><%d>\n", 123, 234234234234234234LL, 345));
+#endif
+
+#if defined(__GNUC__) || defined (HAVE_LONG_DOUBLE)
+ RESULT(checkit ("Testing (Lf) long double: <%.20f><%.20Lf><%0+#.20f>\n",
+ 1.23456, 1.234567890123456789L, 1.23456));
+ RESULT(printf ("Testing (Lf) long double: <%.20f><%.20Lf><%0+#.20f>\n",
+ 1.23456, 1.234567890123456789L, 1.23456));
+#endif
+
+ return 0;
+}
+#endif /* TEST */
diff --git a/contrib/binutils/libiberty/aclocal.m4 b/contrib/binutils/libiberty/aclocal.m4
index c562835..103e246 100644
--- a/contrib/binutils/libiberty/aclocal.m4
+++ b/contrib/binutils/libiberty/aclocal.m4
@@ -48,6 +48,9 @@ main ()
p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE,
MAP_ANON|MAP_PRIVATE, dev_zero, 0);
if (p == (char *)-1)
+ p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE,
+ MAP_ANON|MAP_PRIVATE, -1, 0);
+ if (p == (char *)-1)
exit (2);
else
{
@@ -134,3 +137,55 @@ define(AC_DEFINE_NOAUTOHEADER,
[#define] $1 ifelse($#, 2, [$2], $#, 3, [$2], 1)
EOF
])
+
+# We always want a C version of alloca() compiled into libiberty,
+# because native-compiler support for the real alloca is so !@#$%
+# unreliable that GCC has decided to use it only when being compiled
+# by GCC. This is the part of AC_FUNC_ALLOCA that calculates the
+# information alloca.c needs.
+AC_DEFUN(libiberty_AC_FUNC_C_ALLOCA,
+[AC_CACHE_CHECK(whether alloca needs Cray hooks, ac_cv_os_cray,
+[AC_EGREP_CPP(webecray,
+[#if defined(CRAY) && ! defined(CRAY2)
+webecray
+#else
+wenotbecray
+#endif
+], ac_cv_os_cray=yes, ac_cv_os_cray=no)])
+if test $ac_cv_os_cray = yes; then
+ for ac_func in _getb67 GETB67 getb67; do
+ AC_CHECK_FUNC($ac_func,
+ [AC_DEFINE_UNQUOTED(CRAY_STACKSEG_END, $ac_func,
+ [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.]) break])
+ done
+fi
+
+AC_CACHE_CHECK(stack direction for C alloca, ac_cv_c_stack_direction,
+[AC_TRY_RUN([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);
+}],
+ ac_cv_c_stack_direction=1,
+ ac_cv_c_stack_direction=-1,
+ ac_cv_c_stack_direction=0)])
+AC_DEFINE_UNQUOTED(STACK_DIRECTION, $ac_cv_c_stack_direction,
+ [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])
+])
diff --git a/contrib/binutils/libiberty/alloca.c b/contrib/binutils/libiberty/alloca.c
index 0f8a215..918235d 100644
--- a/contrib/binutils/libiberty/alloca.c
+++ b/contrib/binutils/libiberty/alloca.c
@@ -21,10 +21,33 @@
allocating any. It is a good idea to use alloca(0) in
your main control loop, etc. to force garbage collection. */
+/*
+
+@deftypefn Replacement void* alloca (size_t @var{size})
+
+This function allocates memory which will be automatically reclaimed
+after the procedure exits. The @libib{} implementation does not free
+the memory immediately but will do so eventually during subsequent
+calls to this function. Memory is allocated using @code{xmalloc} under
+normal circumstances.
+
+The header file @file{alloca-conf.h} can be used in conjunction with the
+GNU Autoconf test @code{AC_FUNC_ALLOCA} to test for and properly make
+available this function. The @code{AC_FUNC_ALLOCA} test requires that
+client code use a block of preprocessor code to be safe (see the Autoconf
+manual for more); this header incorporates that logic and more, including
+the possibility of a GCC built-in function.
+
+@end deftypefn
+
+*/
+
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
+#include <libiberty.h>
+
#ifdef HAVE_STRING_H
#include <string.h>
#endif
@@ -32,67 +55,26 @@
#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
-#ifdef static
-/* actually, only want this if static is defined as ""
- -- this is for usg, in which emacs must undefine static
- in order to make unexec workable
- */
-#ifndef STACK_DIRECTION
-you
-lose
--- must know STACK_DIRECTION at compile-time
-#endif /* STACK_DIRECTION undefined */
-#endif /* static */
-#endif /* emacs */
+/* These variables are used by the ASTRDUP implementation that relies
+ on C_alloca. */
+const char *libiberty_optr;
+char *libiberty_nptr;
+unsigned long libiberty_len;
/* If your stack is a linked list of frames, you have to
provide an "address metric" ADDRESS_FUNCTION macro. */
#if defined (CRAY) && defined (CRAY_STACKSEG_END)
-long i00afunc ();
+static long i00afunc ();
#define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg))
#else
#define ADDRESS_FUNCTION(arg) &(arg)
#endif
-#if __STDC__
-typedef void *pointer;
-#else
-typedef char *pointer;
-#endif
-
#ifndef NULL
#define NULL 0
#endif
-/* Different portions of Emacs need to call different versions of
- malloc. The Emacs executable needs alloca to call xmalloc, because
- ordinary malloc isn't protected from input signals. On the other
- hand, the utilities in lib-src need alloca to call malloc; some of
- them are very simple, and don't have an xmalloc routine.
-
- Non-Emacs programs expect this to call use xmalloc.
-
- Callers below should use malloc. */
-
-#ifndef emacs
-#define malloc xmalloc
-#endif
-extern pointer malloc ();
-
/* Define STACK_DIRECTION if you know the direction of stack
growth for your system; otherwise it will be automatically
deduced at run-time.
@@ -168,9 +150,11 @@ static header *last_alloca_header = NULL; /* -> last alloca header. */
caller, but that method cannot be made to work for some
implementations of C, for example under Gould's UTX/32. */
-pointer
-alloca (size)
- unsigned size;
+/* @undocumented C_alloca */
+
+PTR
+C_alloca (size)
+ size_t size;
{
auto char probe; /* Probes stack depth: */
register char *depth = ADDRESS_FUNCTION (probe);
@@ -186,17 +170,13 @@ alloca (size)
{
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))
{
register header *np = hp->h.next;
- free ((pointer) hp); /* Collect garbage. */
+ free ((PTR) hp); /* Collect garbage. */
hp = np; /* -> next header. */
}
@@ -204,10 +184,6 @@ alloca (size)
break; /* Rest are not deeper. */
last_alloca_header = hp; /* -> last valid storage. */
-
-#ifdef emacs
- UNBLOCK_INPUT;
-#endif
}
if (size == 0)
@@ -216,7 +192,7 @@ alloca (size)
/* Allocate combined header + user data storage. */
{
- register pointer new = malloc (sizeof (header) + size);
+ register PTR new = xmalloc (sizeof (header) + size);
/* Address of header. */
if (new == 0)
@@ -229,7 +205,7 @@ alloca (size)
/* User storage begins just after header. */
- return (pointer) ((char *) new + sizeof (header));
+ return (PTR) ((char *) new + sizeof (header));
}
}
@@ -500,6 +476,3 @@ i00afunc (long address)
#endif /* not CRAY2 */
#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 7aec9c0..4205579 100644
--- a/contrib/binutils/libiberty/argv.c
+++ b/contrib/binutils/libiberty/argv.c
@@ -1,5 +1,5 @@
/* Create and destroy argument vectors (argv's)
- Copyright (C) 1992 Free Software Foundation, Inc.
+ Copyright (C) 1992, 2001 Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support
This file is part of the libiberty library.
@@ -48,7 +48,6 @@ extern char *strdup (); /* Duplicate a string */
#endif /* __STDC__ */
-#include "alloca-conf.h"
#ifndef NULL
#define NULL 0
@@ -63,26 +62,15 @@ extern char *strdup (); /* Duplicate a string */
/*
-NAME
+@deftypefn Extension char** dupargv (char **@var{vector})
- dupargv -- duplicate an argument vector
+Duplicate an argument vector. Simply scans through @var{vector},
+duplicating each argument until the terminating @code{NULL} is found.
+Returns a pointer to the argument vector if successful. Returns
+@code{NULL} if there is insufficient memory to complete building the
+argument vector.
-SYNOPSIS
-
- char **dupargv (vector)
- char **vector;
-
-DESCRIPTION
-
- Duplicate an argument vector. Simply scans through the
- vector, duplicating each argument until the
- terminating NULL is found.
-
-RETURNS
-
- Returns a pointer to the argument vector if
- successful. Returns NULL if there is insufficient memory to
- complete building the argument vector.
+@end deftypefn
*/
@@ -120,24 +108,14 @@ dupargv (argv)
/*
-NAME
-
- freeargv -- free an argument vector
-
-SYNOPSIS
+@deftypefn Extension void freeargv (char **@var{vector})
- void freeargv (vector)
- char **vector;
+Free an argument vector that was built using @code{buildargv}. Simply
+scans through @var{vector}, freeing the memory for each argument until
+the terminating @code{NULL} is found, and then frees @var{vector}
+itself.
-DESCRIPTION
-
- Free an argument vector that was built using buildargv. Simply scans
- through the vector, freeing the memory for each argument until the
- terminating NULL is found, and then frees the vector itself.
-
-RETURNS
-
- No value.
+@end deftypefn
*/
@@ -158,53 +136,46 @@ char **vector;
/*
-NAME
-
- buildargv -- build an argument vector from a string
-
-SYNOPSIS
-
- char **buildargv (sp)
- char *sp;
-
-DESCRIPTION
+@deftypefn Extension char** buildargv (char *@var{sp})
- Given a pointer to a string, parse the string extracting fields
- separated by whitespace and optionally enclosed within either single
- or double quotes (which are stripped off), and build a vector of
- pointers to copies of the string for each field. The input string
- remains unchanged.
+Given a pointer to a string, parse the string extracting fields
+separated by whitespace and optionally enclosed within either single
+or double quotes (which are stripped off), and build a vector of
+pointers to copies of the string for each field. The input string
+remains unchanged. The last element of the vector is followed by a
+@code{NULL} element.
- All of the memory for the pointer array and copies of the string
- is obtained from malloc. All of the memory can be returned to the
- system with the single function call freeargv, which takes the
- returned result of buildargv, as it's argument.
+All of the memory for the pointer array and copies of the string
+is obtained from @code{malloc}. All of the memory can be returned to the
+system with the single function call @code{freeargv}, which takes the
+returned result of @code{buildargv}, as it's argument.
- The memory for the argv array is dynamically expanded as necessary.
+Returns a pointer to the argument vector if successful. Returns
+@code{NULL} if @var{sp} is @code{NULL} or if there is insufficient
+memory to complete building the argument vector.
-RETURNS
+If the input is a null string (as opposed to a @code{NULL} pointer),
+then buildarg returns an argument vector that has one arg, a null
+string.
- Returns a pointer to the argument vector if successful. Returns NULL
- if the input string pointer is NULL or if there is insufficient
- memory to complete building the argument vector.
+@end deftypefn
-NOTES
+The memory for the argv array is dynamically expanded as necessary.
- In order to provide a working buffer for extracting arguments into,
- with appropriate stripping of quotes and translation of backslash
- sequences, we allocate a working buffer at least as long as the input
- string. This ensures that we always have enough space in which to
- work, since the extracted arg is never larger than the input string.
+In order to provide a working buffer for extracting arguments into,
+with appropriate stripping of quotes and translation of backslash
+sequences, we allocate a working buffer at least as long as the input
+string. This ensures that we always have enough space in which to
+work, since the extracted arg is never larger than the input string.
- If the input is a null string (as opposed to a NULL pointer), then
- buildarg returns an argv that has one arg, a null string.
+The argument vector is always kept terminated with a @code{NULL} arg
+pointer, so it can be passed to @code{freeargv} at any time, or
+returned, as appropriate.
- Argv is always kept terminated with a NULL arg pointer, so it can
- be passed to freeargv at any time, or returned, as appropriate.
*/
char **buildargv (input)
-char *input;
+ const char *input;
{
char *arg;
char *copybuf;
@@ -337,7 +308,7 @@ char *input;
/* Simple little test driver. */
-static char *tests[] =
+static const char *const tests[] =
{
"a simple command line",
"arg 'foo' is single quoted",
@@ -354,10 +325,10 @@ static char *tests[] =
NULL
};
-main ()
+int main ()
{
char **argv;
- char **test;
+ const char *const *test;
char **targs;
for (test = tests; *test != NULL; test++)
@@ -378,6 +349,7 @@ main ()
freeargv (argv);
}
+ return 0;
}
#endif /* MAIN */
diff --git a/contrib/binutils/libiberty/asprintf.c b/contrib/binutils/libiberty/asprintf.c
index 5aaf320..5de7756 100644
--- a/contrib/binutils/libiberty/asprintf.c
+++ b/contrib/binutils/libiberty/asprintf.c
@@ -22,36 +22,36 @@ Boston, MA 02111-1307, USA. */
#include "ansidecl.h"
#include "libiberty.h"
-#if defined (ANSI_PROTOTYPES) || defined (ALMOST_STDC)
-#define USE_STDARG
-#endif
-
-#ifdef USE_STDARG
+#ifdef ANSI_PROTOTYPES
#include <stdarg.h>
#else
#include <varargs.h>
#endif
-/* VARARGS */
-#ifdef USE_STDARG
-int
-asprintf (char **buf, const char *fmt, ...)
-#else
+/*
+
+@deftypefn Extension int asprintf (char **@var{resptr}, const char *@var{format}, ...)
+
+Like @code{sprintf}, but instead of passing a pointer to a buffer, you
+pass a pointer to a pointer. This function will compute the size of
+the buffer needed, allocate memory with @code{malloc}, and store a
+pointer to the allocated memory in @code{*@var{resptr}}. The value
+returned is the same as @code{sprintf} would return. If memory could
+not be allocated, zero is returned and @code{NULL} is stored in
+@code{*@var{resptr}}.
+
+@end deftypefn
+
+*/
+
int
-asprintf (buf, fmt, va_alist)
- char **buf;
- const char *fmt;
- va_dcl
-#endif
+asprintf VPARAMS ((char **buf, const char *fmt, ...))
{
int status;
- va_list ap;
-#ifdef USE_STDARG
- va_start (ap, fmt);
-#else
- va_start (ap);
-#endif
+ VA_OPEN (ap, fmt);
+ VA_FIXEDARG (ap, char **, buf);
+ VA_FIXEDARG (ap, const char *, fmt);
status = vasprintf (buf, fmt, ap);
- va_end (ap);
+ VA_CLOSE (ap);
return status;
}
diff --git a/contrib/binutils/libiberty/atexit.c b/contrib/binutils/libiberty/atexit.c
index 137d985..e14de29 100644
--- a/contrib/binutils/libiberty/atexit.c
+++ b/contrib/binutils/libiberty/atexit.c
@@ -1,6 +1,16 @@
/* Wrapper to implement ANSI C's atexit using SunOS's on_exit. */
/* This function is in the public domain. --Mike Stump. */
+/*
+
+@deftypefn Supplemental int atexit (void (*@var{f})())
+
+Causes function @var{f} to be called at exit. Returns 0.
+
+@end deftypefn
+
+*/
+
#include "config.h"
#ifdef HAVE_ON_EXIT
diff --git a/contrib/binutils/libiberty/basename.c b/contrib/binutils/libiberty/basename.c
index ca089eb..69a982d 100644
--- a/contrib/binutils/libiberty/basename.c
+++ b/contrib/binutils/libiberty/basename.c
@@ -2,20 +2,14 @@
This file is in the public domain. */
/*
-NAME
- basename -- return pointer to last component of a pathname
-SYNOPSIS
- char *basename (const char *name)
+@deftypefn Supplemental char* basename (const char *@var{name})
-DESCRIPTION
- Given a pointer to a string containing a typical pathname
- (/usr/src/cmd/ls/ls.c for example), returns a pointer to the
- last component of the pathname ("ls.c" in this case).
+Returns a pointer to the last component of pathname @var{name}.
+Behavior is undefined if the pathname ends in a directory separator.
+
+@end deftypefn
-BUGS
- Presumes a UNIX or DOS/Windows style path with UNIX or DOS/Windows
- style separators.
*/
#include "ansidecl.h"
diff --git a/contrib/binutils/libiberty/bcmp.c b/contrib/binutils/libiberty/bcmp.c
index 11e4417..1895773 100644
--- a/contrib/binutils/libiberty/bcmp.c
+++ b/contrib/binutils/libiberty/bcmp.c
@@ -3,28 +3,15 @@
/*
-NAME
+@deftypefn Supplemental int bcmp (char *@var{x}, char *@var{y}, int @var{count})
- bcmp -- compare two memory regions
+Compares the first @var{count} bytes of two areas of memory. Returns
+zero if they are the same, nonzero otherwise. Returns zero if
+@var{count} is zero. A nonzero result only indicates a difference,
+it does not indicate any sorting order (say, by having a positive
+result mean @var{x} sorts before @var{y}).
-SYNOPSIS
-
- int bcmp (char *from, char *to, int count)
-
-DESCRIPTION
-
- Compare two memory regions and return zero if they are identical,
- non-zero otherwise. If count is zero, return zero.
-
-NOTES
-
- No guarantee is made about the non-zero returned value. In
- particular, the results may be signficantly different than
- strcmp(), where the return value is guaranteed to be less than,
- equal to, or greater than zero, according to lexicographical
- sorting of the compared regions.
-
-BUGS
+@end deftypefn
*/
diff --git a/contrib/binutils/libiberty/bcopy.c b/contrib/binutils/libiberty/bcopy.c
index b655363..70fa7e3 100644
--- a/contrib/binutils/libiberty/bcopy.c
+++ b/contrib/binutils/libiberty/bcopy.c
@@ -1,19 +1,11 @@
/* bcopy -- copy memory regions of arbitary length
-NAME
- bcopy -- copy memory regions of arbitrary length
+@deftypefn Supplemental void bcopy (char *@var{in}, char *@var{out}, int @var{length})
-SYNOPSIS
- void bcopy (char *in, char *out, int length)
+Copies @var{length} bytes from memory region @var{in} to region
+@var{out}. The use of @code{bcopy} is deprecated in new programs.
-DESCRIPTION
- Copy LENGTH bytes from memory region pointed to by IN to memory
- region pointed to by OUT.
-
-BUGS
- Significant speed improvements can be made in some cases by
- implementing copies of multiple bytes simultaneously, or unrolling
- the copy loop.
+@end deftypefn
*/
diff --git a/contrib/binutils/libiberty/bsearch.c b/contrib/binutils/libiberty/bsearch.c
index 6a8ee33..b3283f9 100644
--- a/contrib/binutils/libiberty/bsearch.c
+++ b/contrib/binutils/libiberty/bsearch.c
@@ -28,6 +28,23 @@
* SUCH DAMAGE.
*/
+/*
+
+@deftypefn Supplemental void* bsearch (const void *@var{key}, const void *@var{base}, size_t @var{nmemb}, size_t @var{size}, int (*@var{compar})(const void *, const void *))
+
+Performs a search over an array of @var{nmemb} elements pointed to by
+@var{base} for a member that matches the object pointed to by @var{key}.
+The size of each member is specified by @var{size}. The array contents
+should be sorted in ascending order according to the @var{compar}
+comparison function. This routine should take two arguments pointing to
+the @var{key} and to an array member, in that order, and should return an
+integer less than, equal to, or greater than zero if the @var{key} object
+is respectively less than, matching, or greater than the array member.
+
+@end deftypefn
+
+*/
+
#include "config.h"
#include "ansidecl.h"
#include <sys/types.h> /* size_t */
diff --git a/contrib/binutils/libiberty/bzero.c b/contrib/binutils/libiberty/bzero.c
index d01644b7..8874118 100644
--- a/contrib/binutils/libiberty/bzero.c
+++ b/contrib/binutils/libiberty/bzero.c
@@ -2,19 +2,13 @@
This function is in the public domain. */
/*
-NAME
- bzero -- zero the contents of a specified memory region
-SYNOPSIS
- void bzero (char *to, int count)
+@deftypefn Supplemental void bzero (char *@var{mem}, int @var{count})
-DESCRIPTION
- Zero COUNT bytes of memory pointed to by TO.
+Zeros @var{count} bytes starting at @var{mem}. Use of this function
+is deprecated in favor of @code{memset}.
-BUGS
- Significant speed enhancements may be made in some environments
- by zeroing more than a single byte at a time, or by unrolling the
- loop.
+@end deftypefn
*/
diff --git a/contrib/binutils/libiberty/calloc.c b/contrib/binutils/libiberty/calloc.c
index 334b18d..b342f6c 100644
--- a/contrib/binutils/libiberty/calloc.c
+++ b/contrib/binutils/libiberty/calloc.c
@@ -1,5 +1,16 @@
/* calloc -- allocate memory which has been initialized to zero.
This function is in the public domain. */
+
+/*
+
+@deftypefn Supplemental void* calloc (size_t @var{nelem}, size_t @var{elsize})
+
+Uses @code{malloc} to allocate storage for @var{nelem} objects of
+@var{elsize} bytes each, then zeros the memory.
+
+@end deftypefn
+
+*/
#include "ansidecl.h"
#include "libiberty.h"
diff --git a/contrib/binutils/libiberty/choose-temp.c b/contrib/binutils/libiberty/choose-temp.c
index 1a475dd..5c2c614 100644
--- a/contrib/binutils/libiberty/choose-temp.c
+++ b/contrib/binutils/libiberty/choose-temp.c
@@ -17,124 +17,52 @@ 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 two functions: choose_temp_base and make_temp_file. */
-
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#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
-
-#ifndef R_OK
-#define R_OK 4
-#define W_OK 2
-#define X_OK 1
-#endif
#include "libiberty.h"
-extern int mkstemps ();
-
-#ifndef IN_GCC
-#if defined (__MSDOS__) || (defined (_WIN32) && ! defined (__CYGWIN__) && ! defined (_UWIN))
-#define DIR_SEPARATOR '\\'
-#endif
-#endif
-
-#ifndef DIR_SEPARATOR
-#define DIR_SEPARATOR '/'
-#endif
-
-/* On MSDOS, write temp files in current dir
- because there's no place else we can expect to use. */
-/* ??? Although the current directory is tried as a last resort,
- this is left in so that on MSDOS it is preferred to /tmp on the
- off chance that someone requires this, since that was the previous
- behaviour. */
-#ifdef __MSDOS__
-#ifndef P_tmpdir
-#define P_tmpdir "."
-#endif
-#endif
+extern char *choose_tmpdir PARAMS ((void));
/* Name of temporary file.
mktemp requires 6 trailing X's. */
#define TEMP_FILE "ccXXXXXX"
+#define TEMP_FILE_LEN (sizeof(TEMP_FILE) - 1)
-/* Subroutine of choose_temp_base.
- If BASE is non-NULL, return it.
- Otherwise it checks if DIR is a usable directory.
- If success, DIR is returned.
- Otherwise NULL is returned. */
+/*
-static const char *try PARAMS ((const char *, const char *));
+@deftypefn Extension char* choose_temp_base (void)
-static const char *
-try (dir, base)
- const char *dir, *base;
-{
- if (base != 0)
- return base;
- if (dir != 0
- && access (dir, R_OK | W_OK | X_OK) == 0)
- return dir;
- return 0;
-}
+Return a prefix for temporary file names or @code{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 (@code{mktemp}
+fails). The buffer for the result is obtained with @code{xmalloc}.
-/* 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.
+This function is provided for backwards compatability only. Its use is
+not recommended.
- This function is provided for backwards compatability only. It use
- is not recommended. */
+@end deftypefn
+
+*/
char *
choose_temp_base ()
{
- const char *base = 0;
+ const char *base = choose_tmpdir ();
char *temp_filename;
int len;
- 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 = ".";
len = strlen (base);
- temp_filename = xmalloc (len + 1 /*DIR_SEPARATOR*/
- + strlen (TEMP_FILE) + 1);
+ temp_filename = xmalloc (len + TEMP_FILE_LEN + 1);
strcpy (temp_filename, base);
-
- if (len != 0
- && temp_filename[len-1] != '/'
- && temp_filename[len-1] != DIR_SEPARATOR)
- temp_filename[len++] = DIR_SEPARATOR;
strcpy (temp_filename + len, TEMP_FILE);
mktemp (temp_filename);
@@ -142,64 +70,3 @@ 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;
-{
- const 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 db2509c..3ea70c3 100644
--- a/contrib/binutils/libiberty/clock.c
+++ b/contrib/binutils/libiberty/clock.c
@@ -22,6 +22,18 @@ 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. */
+/*
+
+@deftypefn Supplemental long clock (void)
+
+Returns an approximation of the CPU time used by the process as a
+@code{clock_t}; divide this number by @samp{CLOCKS_PER_SEC} to get the
+number of seconds used.
+
+@end deftypefn
+
+*/
+
#include "config.h"
#ifdef HAVE_GETRUSAGE
diff --git a/contrib/binutils/libiberty/concat.c b/contrib/binutils/libiberty/concat.c
index 5b132c8..98b20e1 100644
--- a/contrib/binutils/libiberty/concat.c
+++ b/contrib/binutils/libiberty/concat.c
@@ -1,5 +1,5 @@
/* Concatenate variable number of strings.
- Copyright (C) 1991, 1994 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1994, 2001 Free Software Foundation, Inc.
Written by Fred Fish @ Cygnus Support
This file is part of the libiberty library.
@@ -21,24 +21,14 @@ Boston, MA 02111-1307, USA. */
/*
-NAME
+@deftypefn Extension char* concat (const char *@var{s1}, const char *@var{s2}, @dots{}, @code{NULL})
- concat -- concatenate a variable number of strings
+Concatenate zero or more of strings and return the result in freshly
+@code{xmalloc}ed memory. Returns @code{NULL} if insufficient memory is
+available. The argument list is terminated by the first @code{NULL}
+pointer encountered. Pointers to empty strings are ignored.
-SYNOPSIS
-
- #include <varargs.h>
-
- char *concat (s1, s2, s3, ..., NULL)
-
-DESCRIPTION
-
- Concatenate a variable number of strings and return the result
- in freshly malloc'd memory.
-
- Returns NULL if insufficient memory is available. The argument
- list is terminated by the first NULL pointer encountered. Pointers
- to empty strings are ignored.
+@end deftypefn
NOTES
@@ -50,11 +40,16 @@ NOTES
deal with low memory situations itself, it should supply an xmalloc
that just directly invokes malloc and blindly returns whatever
malloc returns.
+
*/
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
#include "ansidecl.h"
#include "libiberty.h"
+#include <sys/types.h> /* size_t */
#ifdef ANSI_PROTOTYPES
#include <stdarg.h>
@@ -62,90 +57,164 @@ NOTES
#include <varargs.h>
#endif
-#ifdef __STDC__
-#include <stddef.h>
-extern size_t strlen (const char *s);
-#else
-extern int strlen ();
+# if HAVE_STRING_H
+# include <string.h>
+# else
+# if HAVE_STRINGS_H
+# include <strings.h>
+# endif
+# endif
+
+#if HAVE_STDLIB_H
+#include <stdlib.h>
#endif
-#define NULLP (char *)0
+static inline unsigned long vconcat_length PARAMS ((const char *, va_list));
+static inline unsigned long
+vconcat_length (first, args)
+ const char *first;
+ va_list args;
+{
+ unsigned long length = 0;
+ const char *arg;
+
+ for (arg = first; arg ; arg = va_arg (args, const char *))
+ length += strlen (arg);
+
+ return length;
+}
+
+static inline char *vconcat_copy PARAMS ((char *, const char *, va_list));
+static inline char *
+vconcat_copy (dst, first, args)
+ char *dst;
+ const char *first;
+ va_list args;
+{
+ char *end = dst;
+ const char *arg;
+
+ for (arg = first; arg ; arg = va_arg (args, const char *))
+ {
+ unsigned long length = strlen (arg);
+ memcpy (end, arg, length);
+ end += length;
+ }
+ *end = '\000';
+
+ return dst;
+}
+
+/* @undocumented concat_length */
+
+unsigned long
+concat_length VPARAMS ((const char *first, ...))
+{
+ unsigned long length;
+
+ VA_OPEN (args, first);
+ VA_FIXEDARG (args, const char *, first);
+ length = vconcat_length (first, args);
+ VA_CLOSE (args);
+
+ return length;
+}
+
+/* @undocumented concat_copy */
-/* VARARGS */
-#ifdef ANSI_PROTOTYPES
char *
-concat (const char *first, ...)
-#else
+concat_copy VPARAMS ((char *dst, const char *first, ...))
+{
+ char *save_dst;
+
+ VA_OPEN (args, first);
+ VA_FIXEDARG (args, char *, dst);
+ VA_FIXEDARG (args, const char *, first);
+ vconcat_copy (dst, first, args);
+ save_dst = dst; /* With K&R C, dst goes out of scope here. */
+ VA_CLOSE (args);
+
+ return save_dst;
+}
+
+char *libiberty_concat_ptr;
+
+/* @undocumented concat_copy2 */
+
char *
-concat (va_alist)
- va_dcl
-#endif
+concat_copy2 VPARAMS ((const char *first, ...))
{
- register int length;
- register char *newstr;
- register char *end;
- register const char *arg;
- va_list args;
-#ifndef ANSI_PROTOTYPES
- const char *first;
-#endif
+ VA_OPEN (args, first);
+ VA_FIXEDARG (args, const char *, first);
+ vconcat_copy (libiberty_concat_ptr, first, args);
+ VA_CLOSE (args);
- /* First compute the size of the result and get sufficient memory. */
+ return libiberty_concat_ptr;
+}
-#ifdef ANSI_PROTOTYPES
- va_start (args, first);
-#else
- va_start (args);
- first = va_arg (args, const char *);
-#endif
+char *
+concat VPARAMS ((const char *first, ...))
+{
+ char *newstr;
- if (first == NULLP)
- length = 0;
- else
- {
- length = strlen (first);
- while ((arg = va_arg (args, const char *)) != NULLP)
- {
- length += strlen (arg);
- }
- }
- newstr = (char *) xmalloc (length + 1);
- va_end (args);
+ /* First compute the size of the result and get sufficient memory. */
+ VA_OPEN (args, first);
+ VA_FIXEDARG (args, const char *, first);
+ newstr = (char *) xmalloc (vconcat_length (first, args) + 1);
+ VA_CLOSE (args);
/* Now copy the individual pieces to the result string. */
+ VA_OPEN (args, first);
+ VA_FIXEDARG (args, const char *, first);
+ vconcat_copy (newstr, first, args);
+ VA_CLOSE (args);
- if (newstr != NULLP)
- {
-#ifdef ANSI_PROTOTYPES
- va_start (args, first);
-#else
- va_start (args);
- first = va_arg (args, const char *);
-#endif
- end = newstr;
- if (first != NULLP)
- {
- arg = first;
- while (*arg)
- {
- *end++ = *arg++;
- }
- while ((arg = va_arg (args, const char *)) != NULLP)
- {
- while (*arg)
- {
- *end++ = *arg++;
- }
- }
- }
- *end = '\000';
- va_end (args);
- }
+ return newstr;
+}
+
+/*
+
+@deftypefn Extension char* reconcat (char *@var{optr}, const char *@var{s1}, @dots{}, @code{NULL})
+
+Same as @code{concat}, except that if @var{optr} is not @code{NULL} it
+is freed after the string is created. This is intended to be useful
+when you're extending an existing string or building up a string in a
+loop:
+
+@example
+ str = reconcat (str, "pre-", str, NULL);
+@end example
+
+@end deftypefn
- return (newstr);
+*/
+
+char *
+reconcat VPARAMS ((char *optr, const char *first, ...))
+{
+ char *newstr;
+
+ /* First compute the size of the result and get sufficient memory. */
+ VA_OPEN (args, first);
+ VA_FIXEDARG (args, char *, optr);
+ VA_FIXEDARG (args, const char *, first);
+ newstr = (char *) xmalloc (vconcat_length (first, args) + 1);
+ VA_CLOSE (args);
+
+ /* Now copy the individual pieces to the result string. */
+ VA_OPEN (args, first);
+ VA_FIXEDARG (args, char *, optr);
+ VA_FIXEDARG (args, const char *, first);
+ vconcat_copy (newstr, first, args);
+ if (optr) /* Done before VA_CLOSE so optr stays in scope for K&R C. */
+ free (optr);
+ VA_CLOSE (args);
+
+ return newstr;
}
#ifdef MAIN
+#define NULLP (char *)0
/* Simple little test driver. */
diff --git a/contrib/binutils/libiberty/config.in b/contrib/binutils/libiberty/config.in
index 1fb946a..e06bbce 100644
--- a/contrib/binutils/libiberty/config.in
+++ b/contrib/binutils/libiberty/config.in
@@ -1,21 +1,8 @@
-/* config.in. Generated automatically from configure.in by autoheader. */
-
-/* Define if using alloca.c. */
-#undef C_ALLOCA
+/* config.in. Generated automatically from configure.in by autoheader 2.13. */
/* 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
@@ -34,15 +21,6 @@
/* 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
@@ -52,6 +30,9 @@
/* Define vfork as fork if vfork does not work. */
#undef vfork
+/* Define if you have the _doprnt function. */
+#undef HAVE__DOPRNT
+
/* Define if you have the asprintf function. */
#undef HAVE_ASPRINTF
@@ -79,6 +60,9 @@
/* Define if you have the clock function. */
#undef HAVE_CLOCK
+/* Define if you have the ffs function. */
+#undef HAVE_FFS
+
/* Define if you have the getcwd function. */
#undef HAVE_GETCWD
@@ -199,6 +183,9 @@
/* Define if you have the waitpid function. */
#undef HAVE_WAITPID
+/* Define if you have the <alloca.h> header file. */
+#undef HAVE_ALLOCA_H
+
/* Define if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
@@ -241,6 +228,9 @@
/* Define if errno must be declared even when <errno.h> is included. */
#undef NEED_DECLARATION_ERRNO
+/* Define if you have the `uintptr_t' type. */
+#undef HAVE_UINTPTR_T
+
/* Define if you have the sys_errlist variable. */
#undef HAVE_SYS_ERRLIST
@@ -250,3 +240,15 @@
/* Define if you have the sys_siglist variable. */
#undef HAVE_SYS_SIGLIST
+/* 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 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
+
diff --git a/contrib/binutils/libiberty/config.table b/contrib/binutils/libiberty/config.table
index ea3312b..fa892c0 100644
--- a/contrib/binutils/libiberty/config.table
+++ b/contrib/binutils/libiberty/config.table
@@ -6,7 +6,6 @@ case "${host}" in
*-*-freebsd2.2.[012]) frag=mh-fbsd21 ;;
i370-*-opened*) frag=mh-openedition ;;
i[345]86-*-windows*) frag=mh-windows ;;
- *-*-beos*) frag=mh-beos ;;
esac
frags=$frag
diff --git a/contrib/binutils/libiberty/configure b/contrib/binutils/libiberty/configure
index ca24ef9..a406d28 100755
--- a/contrib/binutils/libiberty/configure
+++ b/contrib/binutils/libiberty/configure
@@ -17,6 +17,10 @@ ac_help="$ac_help
--with-cross-host=HOST Configuring with a cross compiler"
ac_help="$ac_help
--with-newlib Configuring with newlib"
+ac_help="$ac_help
+ --enable-maintainer-mode
+ enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer"
# Initialize some variables set by options.
# The variables have the same names as the options, with
@@ -581,13 +585,119 @@ ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
+echo "configure:590: 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"
+ maintainer_mode=$enableval
+else
+ maintainer_mode=no
+fi
+
+
+echo "$ac_t""$maintainer_mode" 1>&6
+
+if test "$maintainer_mode" = "yes"; then
+ MAINT=''
+ NOTMAINT='#'
+else
+ MAINT='#'
+ NOTMAINT=''
+fi
+
+# Do we have a single-tree copy of texinfo? Even if we do, we can't
+# rely on it - libiberty is built before texinfo.
+# Extract the first word of "makeinfo", so it can be a program name with args.
+set dummy makeinfo; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:615: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$MAKEINFO"; then
+ ac_cv_prog_MAKEINFO="$MAKEINFO" # 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_MAKEINFO="makeinfo"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+MAKEINFO="$ac_cv_prog_MAKEINFO"
+if test -n "$MAKEINFO"; then
+ echo "$ac_t""$MAKEINFO" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+if test "x$MAKEINFO" = "x"; then
+ MAKEINFO="@echo makeinfo missing; true"
+ BUILD_INFO=
+else
+ BUILD_INFO=info
+ case x"`$MAKEINFO --version | grep 'GNU texinfo'`" in
+ x*\ [1-3].* )
+ MAKEINFO="@echo $MAKEINFO is too old, 4.0 or newer required; true"
+ BUILD_INFO=
+ echo "configure: warning:
+*** Makeinfo is too old. Info documentation will not be built." 1>&2
+ ;;
+ esac
+fi
+
+
+
+# Extract the first word of "perl", so it can be a program name with args.
+set dummy perl; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:661: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_PERL'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ if test -n "$PERL"; then
+ ac_cv_prog_PERL="$PERL" # 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_PERL="perl"
+ break
+ fi
+ done
+ IFS="$ac_save_ifs"
+fi
+fi
+PERL="$ac_cv_prog_PERL"
+if test -n "$PERL"; then
+ echo "$ac_t""$PERL" 1>&6
+else
+ echo "$ac_t""no" 1>&6
+fi
+
+if test x"$PERL" = x""; then
+ HAVE_PERL='#'
+else
+ HAVE_PERL=''
+fi
+
+
+
# 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
+echo "configure:701: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -610,7 +720,7 @@ 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
+echo "configure:724: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -636,7 +746,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:640: checking for $ac_word" >&5
+echo "configure:750: 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
@@ -668,7 +778,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:672: checking for $ac_word" >&5
+echo "configure:782: 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
@@ -700,7 +810,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:704: checking for $ac_word" >&5
+echo "configure:814: 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
@@ -737,7 +847,7 @@ fi
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:741: checking for $ac_word" >&5
+echo "configure:851: 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
@@ -767,7 +877,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:771: checking for $ac_word" >&5
+echo "configure:881: 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
@@ -816,7 +926,7 @@ fi
fi
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:820: checking whether we are using GNU C" >&5
+echo "configure:930: 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
@@ -825,7 +935,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:829: \"$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:939: \"$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
@@ -841,7 +951,7 @@ if test $ac_cv_prog_gcc = yes; then
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:845: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:955: 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
@@ -872,7 +982,7 @@ fi
echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
-echo "configure:876: checking for POSIXized ISC" >&5
+echo "configure:986: 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
@@ -893,12 +1003,12 @@ else
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:897: checking for working const" >&5
+echo "configure:1007: 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 902 "configure"
+#line 1012 "configure"
#include "confdefs.h"
int main() {
@@ -947,7 +1057,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:951: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -968,21 +1078,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:972: checking for inline" >&5
+echo "configure:1082: 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 979 "configure"
+#line 1089 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:986: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -1025,7 +1135,7 @@ esac
# 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:1029: checking for a BSD compatible install" >&5
+echo "configure:1139: 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
@@ -1086,7 +1196,7 @@ host_makefile_frag=${frag}
# 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:1090: checking how to run the C preprocessor" >&5
+echo "configure:1200: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -1101,13 +1211,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 1105 "configure"
+#line 1215 "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:1111: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1221: \"$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
:
@@ -1118,13 +1228,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1122 "configure"
+#line 1232 "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:1128: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1238: \"$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
:
@@ -1135,13 +1245,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 1139 "configure"
+#line 1249 "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:1145: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1255: \"$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
:
@@ -1165,21 +1275,21 @@ else
fi
echo "$ac_t""$CPP" 1>&6
-for ac_hdr in sys/file.h sys/param.h limits.h stdlib.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h
+for ac_hdr in sys/file.h sys/param.h limits.h stdlib.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1173: checking for $ac_hdr" >&5
+echo "configure:1283: 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 1178 "configure"
+#line 1288 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1293: \"$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*
@@ -1206,12 +1316,12 @@ fi
done
echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
-echo "configure:1210: checking for sys/wait.h that is POSIX.1 compatible" >&5
+echo "configure:1320: 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 1215 "configure"
+#line 1325 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/wait.h>
@@ -1227,7 +1337,7 @@ wait (&s);
s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
; return 0; }
EOF
-if { (eval echo configure:1231: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_sys_wait_h=yes
else
@@ -1248,12 +1358,12 @@ EOF
fi
echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
-echo "configure:1252: checking whether time.h and sys/time.h may both be included" >&5
+echo "configure:1362: 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 1257 "configure"
+#line 1367 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/time.h>
@@ -1262,7 +1372,7 @@ int main() {
struct tm *tp;
; return 0; }
EOF
-if { (eval echo configure:1266: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1376: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_header_time=yes
else
@@ -1284,19 +1394,19 @@ fi
echo $ac_n "checking whether errno must be declared""... $ac_c" 1>&6
-echo "configure:1288: checking whether errno must be declared" >&5
+echo "configure:1398: checking whether errno must be declared" >&5
if eval "test \"`echo '$''{'libiberty_cv_declare_errno'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1293 "configure"
+#line 1403 "configure"
#include "confdefs.h"
#include <errno.h>
int main() {
int x = errno;
; return 0; }
EOF
-if { (eval echo configure:1300: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
libiberty_cv_declare_errno=no
else
@@ -1317,6 +1427,152 @@ EOF
fi
+echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+echo "configure:1432: 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 1437 "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:1445: \"$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 1462 "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 1480 "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 1501 "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:1512: \"$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 uintptr_t""... $ac_c" 1>&6
+echo "configure:1536: checking for uintptr_t" >&5
+if eval "test \"`echo '$''{'ac_cv_type_uintptr_t'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ cat > conftest.$ac_ext <<EOF
+#line 1541 "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])uintptr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+ rm -rf conftest*
+ ac_cv_type_uintptr_t=yes
+else
+ rm -rf conftest*
+ ac_cv_type_uintptr_t=no
+fi
+rm -f conftest*
+
+fi
+echo "$ac_t""$ac_cv_type_uintptr_t" 1>&6
+if test $ac_cv_type_uintptr_t = no; then
+ cat >> confdefs.h <<\EOF
+#define uintptr_t unsigned long
+EOF
+
+fi
+
+
+if test $ac_cv_type_uintptr_t = yes
+then
+ cat >> confdefs.h <<\EOF
+#define HAVE_UINTPTR_T 1
+EOF
+
+fi
+
# This is the list of functions which libiberty will provide if they
# are not available on the host.
@@ -1329,6 +1585,7 @@ funcs="$funcs bsearch"
funcs="$funcs bzero"
funcs="$funcs calloc"
funcs="$funcs clock"
+funcs="$funcs ffs"
funcs="$funcs getcwd"
funcs="$funcs getpagesize"
funcs="$funcs index"
@@ -1373,12 +1630,12 @@ if test "x" = "y"; then
for ac_func in asprintf atexit basename bcmp bcopy bsearch bzero calloc clock
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1377: checking for $ac_func" >&5
+echo "configure:1634: 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 1382 "configure"
+#line 1639 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1401,7 +1658,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1662: \"$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
@@ -1428,12 +1685,12 @@ done
for ac_func in getcwd getpagesize index insque mkstemps memchr memcmp memcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1432: checking for $ac_func" >&5
+echo "configure:1689: 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 1437 "configure"
+#line 1694 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1456,7 +1713,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1717: \"$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
@@ -1483,12 +1740,12 @@ done
for ac_func in memmove memset putenv random rename rindex sigsetmask
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1487: checking for $ac_func" >&5
+echo "configure:1744: 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"
+#line 1749 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1511,7 +1768,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1772: \"$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
@@ -1538,12 +1795,12 @@ done
for ac_func in strcasecmp setenv strchr strdup strncasecmp strrchr strstr
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1542: checking for $ac_func" >&5
+echo "configure:1799: 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"
+#line 1804 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1566,7 +1823,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1827: \"$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
@@ -1593,12 +1850,12 @@ done
for ac_func in strtod strtol strtoul tmpnam vasprintf vfprintf vprintf
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1597: checking for $ac_func" >&5
+echo "configure:1854: 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 1602 "configure"
+#line 1859 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1621,7 +1878,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1882: \"$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
@@ -1648,12 +1905,12 @@ done
for ac_func in vsprintf waitpid getrusage on_exit psignal strerror strsignal
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1652: checking for $ac_func" >&5
+echo "configure:1909: 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 1657 "configure"
+#line 1914 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1676,7 +1933,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1937: \"$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
@@ -1700,15 +1957,15 @@ else
fi
done
- for ac_func in sysconf times sbrk gettimeofday
+ for ac_func in sysconf times sbrk gettimeofday ffs
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1707: checking for $ac_func" >&5
+echo "configure:1964: 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 1712 "configure"
+#line 1969 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1731,7 +1988,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1992: \"$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
@@ -1771,8 +2028,7 @@ 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
+# provide the function, we want to define HAVE_FN in config.h.
setobjs=
CHECK=
@@ -1787,7 +2043,6 @@ if test -n "${with_target_subdir}"; then
# 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
@@ -1826,6 +2081,19 @@ fi
+case "${host}" in
+ *-*-cygwin*)
+ cat >> confdefs.h <<\EOF
+#define HAVE_SYS_ERRLIST 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define HAVE_SYS_NERR 1
+EOF
+
+ ;;
+esac
+
if test -z "${setobjs}"; then
case "${host}" in
@@ -1912,12 +2180,19 @@ if test -z "${setobjs}"; then
libiberty_cv_var_sys_errlist=yes
;;
+ *-*-*vms*)
+ # Under VMS, vfork works very different than on Unix. The standard test
+ # won't work, and it isn't easily adaptable. It makes more sense to
+ # just force it.
+ ac_cv_func_vfork_works=yes
+ ;;
+
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:1921: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2196: 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.
@@ -1928,12 +2203,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 1932 "configure"
+#line 2207 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2212: \"$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
@@ -1959,19 +2234,19 @@ 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:1963: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2238: 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:1970: checking for $ac_func" >&5
+echo "configure:2245: 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 1975 "configure"
+#line 2250 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1994,7 +2269,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2273: \"$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
@@ -2020,131 +2295,13 @@ 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:2045: 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 2050 "configure"
-#include "confdefs.h"
-#include <alloca.h>
-int main() {
-char *p = alloca(2 * sizeof(int));
-; 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_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:2078: 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 2083 "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:2111: \"$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:2143: checking whether alloca needs Cray hooks" >&5
+ echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
+echo "configure:2300: 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 2148 "configure"
+#line 2305 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -2167,14 +2324,14 @@ 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:2173: checking for $ac_func" >&5
+ for ac_func in _getb67 GETB67 getb67; do
+ echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2330: 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 2178 "configure"
+#line 2335 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2197,7 +2354,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2358: \"$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
@@ -2214,17 +2371,16 @@ if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
cat >> confdefs.h <<EOF
#define CRAY_STACKSEG_END $ac_func
EOF
-
break
else
echo "$ac_t""no" 1>&6
fi
-done
+ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:2228: checking stack direction for C alloca" >&5
+echo "configure:2384: 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
@@ -2232,7 +2388,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 2236 "configure"
+#line 2392 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -2251,7 +2407,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:2255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2411: \"$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
@@ -2270,122 +2426,14 @@ 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:2280: 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 2285 "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:2293: \"$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 2310 "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 2328 "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 2349 "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:2360: \"$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:2384: checking for pid_t" >&5
+ echo $ac_n "checking for pid_t""... $ac_c" 1>&6
+echo "configure:2432: 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 2389 "configure"
+#line 2437 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -2414,17 +2462,17 @@ fi
ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
-echo "configure:2418: checking for vfork.h" >&5
+echo "configure:2466: 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 2423 "configure"
+#line 2471 "configure"
#include "confdefs.h"
#include <vfork.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2428: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2476: \"$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*
@@ -2449,18 +2497,18 @@ else
fi
echo $ac_n "checking for working vfork""... $ac_c" 1>&6
-echo "configure:2453: checking for working vfork" >&5
+echo "configure:2501: 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:2459: checking for vfork" >&5
+echo "configure:2507: 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 2464 "configure"
+#line 2512 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vfork(); below. */
@@ -2483,7 +2531,7 @@ vfork();
; return 0; }
EOF
-if { (eval echo configure:2487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2535: \"$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
@@ -2505,7 +2553,7 @@ fi
ac_cv_func_vfork_works=$ac_cv_func_vfork
else
cat > conftest.$ac_ext <<EOF
-#line 2509 "configure"
+#line 2557 "configure"
#include "confdefs.h"
/* Thanks to Paul Eggert for this test. */
#include <stdio.h>
@@ -2600,7 +2648,7 @@ main() {
}
}
EOF
-if { (eval echo configure:2604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2652: \"$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
@@ -2625,21 +2673,140 @@ fi
if test $ac_cv_func_vfork_works = no; then
LIBOBJS="$LIBOBJS vfork.o"
fi
+ # We only need _doprnt if we might use it to implement v*printf.
+ if test $ac_cv_func_vprintf != yes \
+ || test $ac_cv_func_vfprintf != yes \
+ || test $ac_cv_func_vsprintf != yes; then
+ for ac_func in _doprnt
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2684: 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 2689 "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:2712: \"$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
+
+
+ else
+ for ac_func in _doprnt
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:2742: 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 2747 "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:2770: \"$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 v in $vars; do
echo $ac_n "checking for $v""... $ac_c" 1>&6
-echo "configure:2631: checking for $v" >&5
+echo "configure:2798: 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 2636 "configure"
+#line 2803 "configure"
#include "confdefs.h"
int *p;
int main() {
-extern int $v; p = &$v;
+extern int $v []; p = &$v;
; return 0; }
EOF
-if { (eval echo configure:2643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2810: \"$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
@@ -2665,12 +2832,12 @@ EOF
for ac_func in $checkfuncs
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2669: checking for $ac_func" >&5
+echo "configure:2836: 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 2674 "configure"
+#line 2841 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2693,7 +2860,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2864: \"$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
@@ -2719,21 +2886,21 @@ done
fi
-for ac_hdr in unistd.h
+for ac_hdr in stdlib.h unistd.h sys/stat.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:2727: checking for $ac_hdr" >&5
+echo "configure:2894: 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 2732 "configure"
+#line 2899 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2737: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2904: \"$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*
@@ -2762,12 +2929,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2766: checking for $ac_func" >&5
+echo "configure:2933: 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 2771 "configure"
+#line 2938 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -2790,7 +2957,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:2794: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2961: \"$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
@@ -2815,7 +2982,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:2819: checking for working mmap" >&5
+echo "configure:2986: 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
@@ -2823,7 +2990,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 2827 "configure"
+#line 2994 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -2851,11 +3018,24 @@ else
#include <fcntl.h>
#include <sys/mman.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
/* 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
@@ -2963,7 +3143,7 @@ main()
}
EOF
-if { (eval echo configure:2967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3147: \"$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
@@ -2987,7 +3167,7 @@ fi
echo $ac_n "checking for working strncmp""... $ac_c" 1>&6
-echo "configure:2991: checking for working strncmp" >&5
+echo "configure:3171: checking for working strncmp" >&5
if eval "test \"`echo '$''{'ac_cv_func_strncmp_works'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2995,7 +3175,7 @@ else
ac_cv_func_strncmp_works=no
else
cat > conftest.$ac_ext <<EOF
-#line 2999 "configure"
+#line 3179 "configure"
#include "confdefs.h"
/* Test by Jim Wilson and Kaveh Ghazi.
@@ -3040,6 +3220,9 @@ main ()
p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE,
MAP_ANON|MAP_PRIVATE, dev_zero, 0);
if (p == (char *)-1)
+ p = (char *) mmap (0, MAP_LEN, PROT_READ|PROT_WRITE,
+ MAP_ANON|MAP_PRIVATE, -1, 0);
+ if (p == (char *)-1)
exit (2);
else
{
@@ -3056,7 +3239,7 @@ main ()
}
EOF
-if { (eval echo configure:3060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
ac_cv_func_strncmp_works=yes
else
@@ -3220,6 +3403,12 @@ s%@includedir@%$includedir%g
s%@oldincludedir@%$oldincludedir%g
s%@infodir@%$infodir%g
s%@mandir@%$mandir%g
+s%@MAINT@%$MAINT%g
+s%@NOTMAINT@%$NOTMAINT%g
+s%@MAKEINFO@%$MAKEINFO%g
+s%@BUILD_INFO@%$BUILD_INFO%g
+s%@PERL@%$PERL%g
+s%@HAVE_PERL@%$HAVE_PERL%g
s%@host@%$host%g
s%@host_alias@%$host_alias%g
s%@host_cpu@%$host_cpu%g
@@ -3242,7 +3431,6 @@ 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
diff --git a/contrib/binutils/libiberty/configure.in b/contrib/binutils/libiberty/configure.in
index af80e0d..eed222d 100644
--- a/contrib/binutils/libiberty/configure.in
+++ b/contrib/binutils/libiberty/configure.in
@@ -26,6 +26,57 @@ else
fi
AC_CONFIG_AUX_DIR($libiberty_topdir)
+dnl Very limited version of automake's enable-maintainer-mode
+
+AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+ dnl maintainer-mode is disabled by default
+ AC_ARG_ENABLE(maintainer-mode,
+[ --enable-maintainer-mode
+ enable make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer],
+ maintainer_mode=$enableval,
+ maintainer_mode=no)
+
+AC_MSG_RESULT($maintainer_mode)
+
+if test "$maintainer_mode" = "yes"; then
+ MAINT=''
+ NOTMAINT='#'
+else
+ MAINT='#'
+ NOTMAINT=''
+fi
+AC_SUBST(MAINT)dnl
+AC_SUBST(NOTMAINT)dnl
+
+# Do we have a single-tree copy of texinfo? Even if we do, we can't
+# rely on it - libiberty is built before texinfo.
+AC_CHECK_PROG(MAKEINFO, makeinfo, makeinfo, )
+if test "x$MAKEINFO" = "x"; then
+ MAKEINFO="@echo makeinfo missing; true"
+ BUILD_INFO=
+else
+ BUILD_INFO=info
+ case x"`$MAKEINFO --version | grep 'GNU texinfo'`" in
+ x*\ [[1-3]].* )
+ MAKEINFO="@echo $MAKEINFO is too old, 4.0 or newer required; true"
+ BUILD_INFO=
+ AC_MSG_WARN([
+*** Makeinfo is too old. Info documentation will not be built.])
+ ;;
+ esac
+fi
+AC_SUBST(MAKEINFO)
+AC_SUBST(BUILD_INFO)
+
+AC_CHECK_PROG(PERL, perl, perl, )
+if test x"$PERL" = x""; then
+ HAVE_PERL='#'
+else
+ HAVE_PERL=''
+fi
+AC_SUBST(HAVE_PERL)
+
AC_CANONICAL_HOST
dnl When we start using automake:
@@ -69,12 +120,19 @@ 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 limits.h stdlib.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h)
+AC_CHECK_HEADERS(sys/file.h sys/param.h limits.h stdlib.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h alloca.h)
AC_HEADER_SYS_WAIT
AC_HEADER_TIME
libiberty_AC_DECLARE_ERRNO
+AC_CHECK_TYPE(uintptr_t, unsigned long)
+
+if test $ac_cv_type_uintptr_t = yes
+then
+ AC_DEFINE(HAVE_UINTPTR_T, 1, [Define if you have the \`uintptr_t' type.])
+fi
+
# This is the list of functions which libiberty will provide if they
# are not available on the host.
@@ -87,6 +145,7 @@ funcs="$funcs bsearch"
funcs="$funcs bzero"
funcs="$funcs calloc"
funcs="$funcs clock"
+funcs="$funcs ffs"
funcs="$funcs getcwd"
funcs="$funcs getpagesize"
funcs="$funcs index"
@@ -134,7 +193,7 @@ if test "x" = "y"; then
AC_CHECK_FUNCS(strcasecmp setenv strchr strdup strncasecmp strrchr strstr)
AC_CHECK_FUNCS(strtod strtol strtoul tmpnam vasprintf vfprintf vprintf)
AC_CHECK_FUNCS(vsprintf waitpid getrusage on_exit psignal strerror strsignal)
- AC_CHECK_FUNCS(sysconf times sbrk gettimeofday)
+ AC_CHECK_FUNCS(sysconf times sbrk gettimeofday ffs)
AC_DEFINE(HAVE_SYS_ERRLIST, 1, [Define if you have the sys_errlist variable.])
AC_DEFINE(HAVE_SYS_NERR, 1, [Define if you have the sys_nerr variable.])
AC_DEFINE(HAVE_SYS_SIGLIST, 1, [Define if you have the sys_siglist variable.])
@@ -142,8 +201,7 @@ 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
+# provide the function, we want to define HAVE_FN in config.h.
setobjs=
CHECK=
@@ -158,7 +216,6 @@ if test -n "${with_target_subdir}"; then
# 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
@@ -191,6 +248,13 @@ fi
AC_SUBST(CHECK)
+case "${host}" in
+ *-*-cygwin*)
+ AC_DEFINE_NOAUTOHEADER(HAVE_SYS_ERRLIST)
+ AC_DEFINE_NOAUTOHEADER(HAVE_SYS_NERR)
+ ;;
+esac
+
if test -z "${setobjs}"; then
case "${host}" in
@@ -271,42 +335,37 @@ if test -z "${setobjs}"; then
libiberty_cv_var_sys_errlist=yes
;;
+ *-*-*vms*)
+ # Under VMS, vfork works very different than on Unix. The standard test
+ # won't work, and it isn't easily adaptable. It makes more sense to
+ # just force it.
+ ac_cv_func_vfork_works=yes
+ ;;
+
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
-
+ libiberty_AC_FUNC_C_ALLOCA
AC_FUNC_VFORK
if test $ac_cv_func_vfork_works = no; then
LIBOBJS="$LIBOBJS vfork.o"
fi
+ # We only need _doprnt if we might use it to implement v*printf.
+ if test $ac_cv_func_vprintf != yes \
+ || test $ac_cv_func_vfprintf != yes \
+ || test $ac_cv_func_vsprintf != yes; then
+ AC_REPLACE_FUNCS(_doprnt)
+ else
+ AC_CHECK_FUNCS(_doprnt)
+ 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;],
+ [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
diff --git a/contrib/binutils/libiberty/copying-lib.texi b/contrib/binutils/libiberty/copying-lib.texi
new file mode 100644
index 0000000..940f70e
--- /dev/null
+++ b/contrib/binutils/libiberty/copying-lib.texi
@@ -0,0 +1,565 @@
+@node Library Copying
+@appendixsec GNU LESSER GENERAL PUBLIC LICENSE
+
+@cindex LGPL, Lesser General Public License
+@center Version 2.1, February 1999
+
+@display
+Copyright @copyright{} 1991, 1999 Free Software Foundation, Inc.
+59 Temple Place -- Suite 330, Boston, MA 02111-1307, USA
+
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+as the successor of the GNU Library Public License, version 2, hence the
+version number 2.1.]
+@end display
+
+@appendixsubsec Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software---to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software---typically libraries---of the Free
+Software Foundation and other authors who decide to use it. You can use
+it too, but we suggest you first think carefully about whether this
+license or the ordinary General Public License is the better strategy to
+use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of it
+in new free programs; and that you are informed that you can do these
+things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the @dfn{Lesser} General Public License because it
+does @emph{Less} to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+``work based on the library'' and a ``work that uses the library''. The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+@iftex
+@appendixsubsec TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+@end iftex
+@ifinfo
+@center GNU LESSER GENERAL PUBLIC LICENSE
+@center TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+@end ifinfo
+
+@enumerate 0
+@item
+This License Agreement applies to any software library or other program
+which contains a notice placed by the copyright holder or other
+authorized party saying it may be distributed under the terms of this
+Lesser General Public License (also called ``this License''). Each
+licensee is addressed as ``you''.
+
+ A ``library'' means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The ``Library'', below, refers to any such software library or work
+which has been distributed under these terms. A ``work based on the
+Library'' means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term ``modification''.)
+
+ ``Source code'' for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+@item
+You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+@item
+You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+@enumerate a
+@item
+The modified work must itself be a software library.
+
+@item
+You must cause the files modified to carry prominent notices
+stating that you changed the files and the date of any change.
+
+@item
+You must cause the whole of the work to be licensed at no
+charge to all third parties under the terms of this License.
+
+@item
+If a facility in the modified Library refers to a function or a
+table of data to be supplied by an application program that uses
+the facility, other than as an argument passed when the facility
+is invoked, then you must make a good faith effort to ensure that,
+in the event an application does not supply such function or
+table, the facility still operates, and performs whatever part of
+its purpose remains meaningful.
+
+(For example, a function in a library to compute square roots has
+a purpose that is entirely well-defined independent of the
+application. Therefore, Subsection 2d requires that any
+application-supplied function or table used by this function must
+be optional: if the application does not supply it, the square
+root function must still compute square roots.)
+@end enumerate
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+@item
+You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+@item
+You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+@item
+A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a ``work that uses the Library''. Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a ``work that uses the Library'' with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a ``work that uses the
+library''. The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a ``work that uses the Library'' uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+@item
+As an exception to the Sections above, you may also combine or
+link a ``work that uses the Library'' with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+@enumerate a
+@item
+Accompany the work with the complete corresponding
+machine-readable source code for the Library including whatever
+changes were used in the work (which must be distributed under
+Sections 1 and 2 above); and, if the work is an executable linked
+with the Library, with the complete machine-readable ``work that
+uses the Library'', as object code and/or source code, so that the
+user can modify the Library and then relink to produce a modified
+executable containing the modified Library. (It is understood
+that the user who changes the contents of definitions files in the
+Library will not necessarily be able to recompile the application
+to use the modified definitions.)
+
+@item
+Use a suitable shared library mechanism for linking with the Library. A
+suitable mechanism is one that (1) uses at run time a copy of the
+library already present on the user's computer system, rather than
+copying library functions into the executable, and (2) will operate
+properly with a modified version of the library, if the user installs
+one, as long as the modified version is interface-compatible with the
+version that the work was made with.
+
+@item
+Accompany the work with a written offer, valid for at
+least three years, to give the same user the materials
+specified in Subsection 6a, above, for a charge no more
+than the cost of performing this distribution.
+
+@item
+If distribution of the work is made by offering access to copy
+from a designated place, offer equivalent access to copy the above
+specified materials from the same place.
+
+@item
+Verify that the user has already received a copy of these
+materials or that you have already sent this user a copy.
+@end enumerate
+
+ For an executable, the required form of the ``work that uses the
+Library'' must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies the
+executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+@item
+You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+@enumerate a
+@item
+Accompany the combined library with a copy of the same work
+based on the Library, uncombined with any other library
+facilities. This must be distributed under the terms of the
+Sections above.
+
+@item
+Give prominent notice with the combined library of the fact
+that part of it is a work based on the Library, and explaining
+where to find the accompanying uncombined form of the same work.
+@end enumerate
+
+@item
+You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+@item
+You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+@item
+Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+@item
+If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+@item
+If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+@item
+The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+``any later version'', you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+@item
+If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+@iftex
+@heading NO WARRANTY
+@end iftex
+@ifinfo
+@center NO WARRANTY
+@end ifinfo
+
+@item
+BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY ``AS IS'' WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+@item
+IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+@end enumerate
+
+@iftex
+@heading END OF TERMS AND CONDITIONS
+@end iftex
+@ifinfo
+@center END OF TERMS AND CONDITIONS
+@end ifinfo
+
+@page
+@appendixsubsec How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+``copyright'' line and a pointer to where the full notice is found.
+
+@smallexample
+@var{one line to give the library's name and an idea of what it does.}
+Copyright (C) @var{year} @var{name of author}
+
+This library is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation; either version 2.1 of the License, or (at
+your option) any later version.
+
+This 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
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
+USA.
+@end smallexample
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a ``copyright disclaimer'' for the library, if
+necessary. Here is a sample; alter the names:
+
+@smallexample
+Yoyodyne, Inc., hereby disclaims all copyright interest in the library
+`Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+@var{signature of Ty Coon}, 1 April 1990
+Ty Coon, President of Vice
+@end smallexample
+
+That's all there is to it!
diff --git a/contrib/binutils/libiberty/copysign.c b/contrib/binutils/libiberty/copysign.c
index 0b5f8c3..5c48a54 100644
--- a/contrib/binutils/libiberty/copysign.c
+++ b/contrib/binutils/libiberty/copysign.c
@@ -129,6 +129,7 @@ typedef union
} __ieee_float_shape_type;
#endif
+#if defined(__IEEE_BIG_ENDIAN) || defined(__IEEE_LITTLE_ENDIAN)
double DEFUN(copysign, (x, y), double x AND double y)
{
@@ -138,3 +139,14 @@ double DEFUN(copysign, (x, y), double x AND double y)
a.number.sign =b.number.sign;
return a.value;
}
+
+#else
+
+double DEFUN(copysign, (x, y), double x AND double y)
+{
+ if ((x < 0 && y > 0) || (x > 0 && y < 0))
+ return -x;
+ return x;
+}
+
+#endif
diff --git a/contrib/binutils/libiberty/cp-demangle.c b/contrib/binutils/libiberty/cp-demangle.c
index 1cc4847..457a09f 100644
--- a/contrib/binutils/libiberty/cp-demangle.c
+++ b/contrib/binutils/libiberty/cp-demangle.c
@@ -1,5 +1,5 @@
/* Demangler for IA64 / g++ V3 ABI.
- Copyright (C) 2000 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2001 Free Software Foundation, Inc.
Written by Alex Samuel <samuel@codesourcery.com>.
This file is part of GNU CC.
@@ -68,6 +68,9 @@
anonymous namespace. */
#define ANONYMOUS_NAMESPACE_PREFIX "_GLOBAL_"
+/* Character(s) to use for namespace separation in demangled output */
+#define NAMESPACE_SEPARATOR (dm->style == DMGL_JAVA ? "." : "::")
+
/* If flag_verbose is zero, some simplifications will be made to the
output to make it easier to read and supress details that are
generally not of interest to the average C++ programmer.
@@ -166,6 +169,18 @@ struct demangling_def
/* The most recently demangled source-name. */
dyn_string_t last_source_name;
+
+ /* Language style to use for demangled output. */
+ int style;
+
+ /* Set to non-zero iff this name is a constructor. The actual value
+ indicates what sort of constructor this is; see demangle.h. */
+ enum gnu_v3_ctor_kinds is_constructor;
+
+ /* Set to non-zero iff this name is a destructor. The actual value
+ indicates what sort of destructor this is; see demangle.h. */
+ enum gnu_v3_dtor_kinds is_destructor;
+
};
typedef struct demangling_def *demangling_t;
@@ -240,7 +255,7 @@ static void template_arg_list_print
static template_arg_list_t current_template_arg_list
PARAMS ((demangling_t));
static demangling_t demangling_new
- PARAMS ((const char *));
+ PARAMS ((const char *, int));
static void demangling_delete
PARAMS ((demangling_t));
@@ -409,7 +424,7 @@ string_list_delete (node)
while (node != NULL)
{
string_list_t next = node->next;
- free (node);
+ dyn_string_delete ((dyn_string_t) node);
node = next;
}
}
@@ -783,8 +798,9 @@ current_template_arg_list (dm)
Returns NULL if allocation fails. */
static demangling_t
-demangling_new (name)
+demangling_new (name, style)
const char *name;
+ int style;
{
demangling_t dm;
dm = (demangling_t) malloc (sizeof (struct demangling_def));
@@ -807,6 +823,9 @@ demangling_new (name)
dyn_string_delete (dm->last_source_name);
return NULL;
}
+ dm->style = style;
+ dm->is_constructor = 0;
+ dm->is_destructor = 0;
return dm;
}
@@ -918,7 +937,7 @@ static status_t demangle_local_name
static status_t demangle_discriminator
PARAMS ((demangling_t, int));
static status_t cp_demangle
- PARAMS ((const char *, dyn_string_t));
+ PARAMS ((const char *, dyn_string_t, int));
#ifdef IN_LIBGCC2
static status_t cp_demangle_type
PARAMS ((const char*, dyn_string_t));
@@ -1222,7 +1241,7 @@ demangle_prefix (dm, encode_return_type)
{
/* We have another level of scope qualification. */
if (nested)
- RETURN_IF_ERROR (result_add (dm, "::"));
+ RETURN_IF_ERROR (result_add (dm, NAMESPACE_SEPARATOR));
else
nested = 1;
@@ -1538,11 +1557,11 @@ demangle_operator_name (dm, short_name, num_args)
struct operator_code
{
/* The mangled code for this operator. */
- const char *code;
+ const char *const code;
/* The source name of this operator. */
- const char *name;
+ const char *const name;
/* The number of arguments this operator takes. */
- int num_args;
+ const int num_args;
};
static const struct operator_code operators[] =
@@ -1823,11 +1842,27 @@ demangle_special_name (dm)
if (peek == 'G')
{
- /* A guard variable name. Consume the G. */
+ /* Consume the G. */
advance_char (dm);
- RETURN_IF_ERROR (demangle_char (dm, 'V'));
- RETURN_IF_ERROR (result_add (dm, "guard variable for "));
- RETURN_IF_ERROR (demangle_name (dm, &unused));
+ switch (peek_char (dm))
+ {
+ case 'V':
+ /* A guard variable name. */
+ advance_char (dm);
+ RETURN_IF_ERROR (result_add (dm, "guard variable for "));
+ RETURN_IF_ERROR (demangle_name (dm, &unused));
+ break;
+
+ case 'R':
+ /* A reference temporary. */
+ advance_char (dm);
+ RETURN_IF_ERROR (result_add (dm, "reference temporary for "));
+ RETURN_IF_ERROR (demangle_name (dm, &unused));
+ break;
+
+ default:
+ return "Unrecognized <special-name>.";
+ }
}
else if (peek == 'T')
{
@@ -2010,15 +2045,24 @@ demangle_ctor_dtor_name (dm)
{
/* A constructor name. Consume the C. */
advance_char (dm);
- if (peek_char (dm) < '1' || peek_char (dm) > '3')
+ flavor = next_char (dm);
+ if (flavor < '1' || flavor > '3')
return "Unrecognized constructor.";
RETURN_IF_ERROR (result_add_string (dm, dm->last_source_name));
+ switch (flavor)
+ {
+ case '1': dm->is_constructor = gnu_v3_complete_object_ctor;
+ break;
+ case '2': dm->is_constructor = gnu_v3_base_object_ctor;
+ break;
+ case '3': dm->is_constructor = gnu_v3_complete_object_allocating_ctor;
+ break;
+ }
/* Print the flavor of the constructor if in verbose mode. */
- flavor = next_char (dm) - '1';
if (flag_verbose)
{
RETURN_IF_ERROR (result_add (dm, "["));
- RETURN_IF_ERROR (result_add (dm, ctor_flavors[flavor]));
+ RETURN_IF_ERROR (result_add (dm, ctor_flavors[flavor - '1']));
RETURN_IF_ERROR (result_add_char (dm, ']'));
}
}
@@ -2026,16 +2070,25 @@ demangle_ctor_dtor_name (dm)
{
/* A destructor name. Consume the D. */
advance_char (dm);
- if (peek_char (dm) < '0' || peek_char (dm) > '2')
+ flavor = next_char (dm);
+ if (flavor < '0' || flavor > '2')
return "Unrecognized destructor.";
RETURN_IF_ERROR (result_add_char (dm, '~'));
RETURN_IF_ERROR (result_add_string (dm, dm->last_source_name));
+ switch (flavor)
+ {
+ case '0': dm->is_destructor = gnu_v3_deleting_dtor;
+ break;
+ case '1': dm->is_destructor = gnu_v3_complete_object_dtor;
+ break;
+ case '2': dm->is_destructor = gnu_v3_base_object_dtor;
+ break;
+ }
/* Print the flavor of the destructor if in verbose mode. */
- flavor = next_char (dm) - '0';
if (flag_verbose)
{
RETURN_IF_ERROR (result_add (dm, " ["));
- RETURN_IF_ERROR (result_add (dm, dtor_flavors[flavor]));
+ RETURN_IF_ERROR (result_add (dm, dtor_flavors[flavor - '0']));
RETURN_IF_ERROR (result_add_char (dm, ']'));
}
}
@@ -2093,8 +2146,10 @@ demangle_type_ptr (dm, insert_pos, substitution_start)
RETURN_IF_ERROR (demangle_type_ptr (dm, insert_pos,
substitution_start));
/* Insert an asterisk where we're told to; it doesn't
- necessarily go at the end. */
- RETURN_IF_ERROR (result_insert_char (dm, *insert_pos, '*'));
+ necessarily go at the end. If we're doing Java style output,
+ there is no pointer symbol. */
+ if (dm->style != DMGL_JAVA)
+ RETURN_IF_ERROR (result_insert_char (dm, *insert_pos, '*'));
/* The next (outermost) pointer or reference character should go
after this one. */
++(*insert_pos);
@@ -2469,6 +2524,39 @@ static const char *const builtin_type_names[26] =
"..." /* z */
};
+/* Java source names of builtin types. Types that arn't valid in Java
+ are also included here - we don't fail if someone attempts to demangle a
+ C++ symbol in Java style. */
+static const char *const java_builtin_type_names[26] =
+{
+ "signed char", /* a */
+ "boolean", /* C++ "bool" */ /* b */
+ "byte", /* C++ "char" */ /* c */
+ "double", /* d */
+ "long double", /* e */
+ "float", /* f */
+ "__float128", /* g */
+ "unsigned char", /* h */
+ "int", /* i */
+ "unsigned", /* j */
+ NULL, /* k */
+ "long", /* l */
+ "unsigned long", /* m */
+ "__int128", /* n */
+ "unsigned __int128", /* o */
+ NULL, /* p */
+ NULL, /* q */
+ NULL, /* r */
+ "short", /* s */
+ "unsigned short", /* t */
+ NULL, /* u */
+ "void", /* v */
+ "char", /* C++ "wchar_t" */ /* w */
+ "long", /* C++ "long long" */ /* x */
+ "unsigned long long", /* y */
+ "..." /* z */
+};
+
/* Demangles and emits a <builtin-type>.
<builtin-type> ::= v # void
@@ -2511,7 +2599,12 @@ demangle_builtin_type (dm)
}
else if (code >= 'a' && code <= 'z')
{
- const char *type_name = builtin_type_names[code - 'a'];
+ const char *type_name;
+ /* Java uses different names for some built-in types. */
+ if (dm->style == DMGL_JAVA)
+ type_name = java_builtin_type_names[code - 'a'];
+ else
+ type_name = builtin_type_names[code - 'a'];
if (type_name == NULL)
return "Unrecognized <builtin-type> code.";
@@ -3369,15 +3462,11 @@ demangle_discriminator (dm, suppress_first)
/* Write the discriminator. The mangled number is two
less than the discriminator ordinal, counting from
zero. */
- RETURN_IF_ERROR (int_to_dyn_string (discriminator + 2,
+ RETURN_IF_ERROR (int_to_dyn_string (discriminator + 1,
(dyn_string_t) dm->result));
}
else
- {
- if (flag_verbose)
- /* A missing digit correspond to one. */
- RETURN_IF_ERROR (result_add_char (dm, '1'));
- }
+ return STATUS_ERROR;
if (flag_verbose)
RETURN_IF_ERROR (result_add_char (dm, ']'));
}
@@ -3395,16 +3484,17 @@ demangle_discriminator (dm, suppress_first)
an error message, and the contents of RESULT are unchanged. */
static status_t
-cp_demangle (name, result)
+cp_demangle (name, result, style)
const char *name;
dyn_string_t result;
+ int style;
{
status_t status;
int length = strlen (name);
if (length > 2 && name[0] == '_' && name[1] == 'Z')
{
- demangling_t dm = demangling_new (name);
+ demangling_t dm = demangling_new (name, style);
if (dm == NULL)
return STATUS_ALLOCATION_FAILED;
@@ -3551,7 +3641,7 @@ __cxa_demangle (mangled_name, output_buffer, length, status)
if (mangled_name[0] == '_' && mangled_name[1] == 'Z')
/* MANGLED_NAME apprears to be a function or variable name.
Demangle it accordingly. */
- result = cp_demangle (mangled_name, &demangled_name);
+ result = cp_demangle (mangled_name, &demangled_name, 0);
else
/* Try to demangled MANGLED_NAME as the name of a type. */
result = cp_demangle_type (mangled_name, &demangled_name);
@@ -3610,7 +3700,7 @@ cplus_demangle_v3 (mangled)
/* Create a dyn_string to hold the demangled name. */
demangled = dyn_string_new (0);
/* Attempt the demangling. */
- status = cp_demangle ((char *) mangled, demangled);
+ status = cp_demangle ((char *) mangled, demangled, 0);
if (STATUS_NO_ERROR (status))
/* Demangling succeeded. */
@@ -3634,8 +3724,194 @@ cplus_demangle_v3 (mangled)
}
}
+/* Demangle a Java symbol. Java uses a subset of the V3 ABI C++ mangling
+ conventions, but the output formatting is a little different.
+ This instructs the C++ demangler not to emit pointer characters ("*"), and
+ to use Java's namespace separator symbol ("." instead of "::"). It then
+ does an additional pass over the demangled output to replace instances
+ of JArray<TYPE> with TYPE[]. */
+
+char *
+java_demangle_v3 (mangled)
+ const char* mangled;
+{
+ dyn_string_t demangled;
+ char *next;
+ char *end;
+ int len;
+ status_t status;
+ int nesting = 0;
+ char *cplus_demangled;
+ char *return_value;
+
+ /* Create a dyn_string to hold the demangled name. */
+ demangled = dyn_string_new (0);
+
+ /* Attempt the demangling. */
+ status = cp_demangle ((char *) mangled, demangled, DMGL_JAVA);
+
+ if (STATUS_NO_ERROR (status))
+ /* Demangling succeeded. */
+ {
+ /* Grab the demangled result from the dyn_string. */
+ cplus_demangled = dyn_string_release (demangled);
+ }
+ else if (status == STATUS_ALLOCATION_FAILED)
+ {
+ fprintf (stderr, "Memory allocation failed.\n");
+ abort ();
+ }
+ else
+ /* Demangling failed. */
+ {
+ dyn_string_delete (demangled);
+ return NULL;
+ }
+
+ len = strlen (cplus_demangled);
+ next = cplus_demangled;
+ end = next + len;
+ demangled = NULL;
+
+ /* Replace occurances of JArray<TYPE> with TYPE[]. */
+ while (next < end)
+ {
+ char *open_str = strstr (next, "JArray<");
+ char *close_str = NULL;
+ if (nesting > 0)
+ close_str = strchr (next, '>');
+
+ if (open_str != NULL && (close_str == NULL || close_str > open_str))
+ {
+ ++nesting;
+
+ if (!demangled)
+ demangled = dyn_string_new(len);
+
+ /* Copy prepending symbols, if any. */
+ if (open_str > next)
+ {
+ open_str[0] = 0;
+ dyn_string_append_cstr (demangled, next);
+ }
+ next = open_str + 7;
+ }
+ else if (close_str != NULL)
+ {
+ --nesting;
+
+ /* Copy prepending type symbol, if any. Squash any spurious
+ whitespace. */
+ if (close_str > next && next[0] != ' ')
+ {
+ close_str[0] = 0;
+ dyn_string_append_cstr (demangled, next);
+ }
+ dyn_string_append_cstr (demangled, "[]");
+ next = close_str + 1;
+ }
+ else
+ {
+ /* There are no more arrays. Copy the rest of the symbol, or
+ simply return the original symbol if no changes were made. */
+ if (next == cplus_demangled)
+ return cplus_demangled;
+
+ dyn_string_append_cstr (demangled, next);
+ next = end;
+ }
+ }
+
+ free (cplus_demangled);
+
+ return_value = dyn_string_release (demangled);
+ return return_value;
+}
+
#endif /* IN_LIBGCC2 */
+
+/* Demangle NAME in the G++ V3 ABI demangling style, and return either
+ zero, indicating that some error occurred, or a demangling_t
+ holding the results. */
+static demangling_t
+demangle_v3_with_details (name)
+ const char *name;
+{
+ demangling_t dm;
+ status_t status;
+
+ if (strncmp (name, "_Z", 2))
+ return 0;
+
+ dm = demangling_new (name, DMGL_GNU_V3);
+ if (dm == NULL)
+ {
+ fprintf (stderr, "Memory allocation failed.\n");
+ abort ();
+ }
+
+ status = result_push (dm);
+ if (! STATUS_NO_ERROR (status))
+ {
+ demangling_delete (dm);
+ fprintf (stderr, "%s\n", status);
+ abort ();
+ }
+
+ status = demangle_mangled_name (dm);
+ if (STATUS_NO_ERROR (status))
+ return dm;
+
+ demangling_delete (dm);
+ return 0;
+}
+
+
+/* Return non-zero iff NAME is the mangled form of a constructor name
+ in the G++ V3 ABI demangling style. Specifically, return:
+ - '1' if NAME is a complete object constructor,
+ - '2' if NAME is a base object constructor, or
+ - '3' if NAME is a complete object allocating constructor. */
+enum gnu_v3_ctor_kinds
+is_gnu_v3_mangled_ctor (name)
+ const char *name;
+{
+ demangling_t dm = demangle_v3_with_details (name);
+
+ if (dm)
+ {
+ enum gnu_v3_ctor_kinds result = dm->is_constructor;
+ demangling_delete (dm);
+ return result;
+ }
+ else
+ return 0;
+}
+
+
+/* Return non-zero iff NAME is the mangled form of a destructor name
+ in the G++ V3 ABI demangling style. Specifically, return:
+ - '0' if NAME is a deleting destructor,
+ - '1' if NAME is a complete object destructor, or
+ - '2' if NAME is a base object destructor. */
+enum gnu_v3_dtor_kinds
+is_gnu_v3_mangled_dtor (name)
+ const char *name;
+{
+ demangling_t dm = demangle_v3_with_details (name);
+
+ if (dm)
+ {
+ enum gnu_v3_dtor_kinds result = dm->is_destructor;
+ demangling_delete (dm);
+ return result;
+ }
+ else
+ return 0;
+}
+
+
#ifdef STANDALONE_DEMANGLER
#include "getopt.h"
@@ -3669,7 +3945,7 @@ print_usage (fp, exit_value)
}
/* Option specification for getopt_long. */
-static struct option long_options[] =
+static const struct option long_options[] =
{
{ "help", no_argument, NULL, 'h' },
{ "strict", no_argument, NULL, 's' },
@@ -3771,7 +4047,7 @@ main (argc, argv)
}
/* Attempt to demangle the name. */
- status = cp_demangle (dyn_string_buf (mangled), demangled);
+ status = cp_demangle (dyn_string_buf (mangled), demangled, 0);
/* If the demangling succeeded, great! Print out the
demangled version. */
@@ -3810,7 +4086,7 @@ main (argc, argv)
for (i = optind; i < argc; ++i)
{
/* Attempt to demangle. */
- status = cp_demangle (argv[i], result);
+ status = cp_demangle (argv[i], result, 0);
/* If it worked, print the demangled name. */
if (STATUS_NO_ERROR (status))
@@ -3818,7 +4094,7 @@ main (argc, argv)
/* Abort on allocaiton failures. */
else if (status == STATUS_ALLOCATION_FAILED)
{
- fprintf (stderr, "Memory allocaiton failed.\n");
+ fprintf (stderr, "Memory allocation failed.\n");
abort ();
}
/* If not, print the error message to stderr instead. */
diff --git a/contrib/binutils/libiberty/cplus-dem.c b/contrib/binutils/libiberty/cplus-dem.c
index a42f45e..5af8826 100644
--- a/contrib/binutils/libiberty/cplus-dem.c
+++ b/contrib/binutils/libiberty/cplus-dem.c
@@ -1,6 +1,6 @@
/* Demangler for GNU C++
Copyright 1989, 1991, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000 Free Software Foundation, Inc.
+ 2000, 2001 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
@@ -63,25 +63,6 @@ static char *ada_demangle PARAMS ((const char *, int));
extern void fancy_abort PARAMS ((void)) ATTRIBUTE_NORETURN;
-static const char *mystrstr PARAMS ((const char *, const char *));
-
-static const char *
-mystrstr (s1, s2)
- const char *s1, *s2;
-{
- register const char *p = s1;
- register int len = strlen (s2);
-
- for (; (p = strchr (p, *s2)) != 0; p++)
- {
- if (strncmp (p, s2, len) == 0)
- {
- return (p);
- }
- }
- return (0);
-}
-
/* In order to allow a single demangler executable to demangle strings
using various common values of CPLUS_MARKER, as well as any specific
one set at compile time, we maintain a string containing all the
@@ -157,9 +138,9 @@ struct work_stuff
static const struct optable
{
- const char *in;
- const char *out;
- int flags;
+ const char *const in;
+ const char *const out;
+ const int flags;
} optable[] = {
{"nw", " new", DMGL_ANSI}, /* new (1.92, ansi) */
{"dl", " delete", DMGL_ANSI}, /* new (1.92, ansi) */
@@ -256,9 +237,15 @@ typedef enum type_kind_t
tk_real
} type_kind_t;
-struct demangler_engine libiberty_demanglers[] =
+const struct demangler_engine libiberty_demanglers[] =
{
{
+ NO_DEMANGLING_STYLE_STRING,
+ no_demangling,
+ "Demangling disabled"
+ }
+ ,
+ {
AUTO_DEMANGLING_STYLE_STRING,
auto_demangling,
"Automatic selection based on executable"
@@ -568,6 +555,9 @@ consume_count (type)
(*type)++;
}
+ if (count < 0)
+ count = -1;
+
return (count);
}
@@ -847,7 +837,7 @@ enum demangling_styles
cplus_demangle_set_style (style)
enum demangling_styles style;
{
- struct demangler_engine *demangler = libiberty_demanglers;
+ const struct demangler_engine *demangler = libiberty_demanglers;
for (; demangler->demangling_style != unknown_demangling; ++demangler)
if (style == demangler->demangling_style)
@@ -865,7 +855,7 @@ enum demangling_styles
cplus_demangle_name_to_style (name)
const char *name;
{
- struct demangler_engine *demangler = libiberty_demanglers;
+ const struct demangler_engine *demangler = libiberty_demanglers;
for (; demangler->demangling_style != unknown_demangling; ++demangler)
if (strcmp (name, demangler->demangling_style_name) == 0)
@@ -877,7 +867,7 @@ cplus_demangle_name_to_style (name)
/* char *cplus_demangle (const char *mangled, int options)
If MANGLED is a mangled function name produced by GNU C++, then
- a pointer to a malloced string giving a C++ representation
+ a pointer to a @code{malloc}ed string giving a C++ representation
of the name will be returned; otherwise NULL will be returned.
It is the caller's responsibility to free the string which
is returned.
@@ -909,6 +899,10 @@ cplus_demangle (mangled, options)
{
char *ret;
struct work_stuff work[1];
+
+ if (current_demangling_style == no_demangling)
+ return xstrdup (mangled);
+
memset ((char *) work, 0, sizeof (work));
work->options = options;
if ((work->options & DMGL_STYLE_MASK) == 0)
@@ -922,6 +916,13 @@ cplus_demangle (mangled, options)
return ret;
}
+ if (JAVA_DEMANGLING)
+ {
+ ret = java_demangle_v3 (mangled);
+ if (ret)
+ return ret;
+ }
+
if (GNAT_DEMANGLING)
return ada_demangle(mangled,options);
@@ -2233,7 +2234,7 @@ arm_pt (work, mangled, n, anchor, args)
{
/* 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__")))
+ if ((ARM_DEMANGLING || HP_DEMANGLING) && (*anchor = strstr (mangled, "__pt__")))
{
int len;
*args = *anchor + 6;
@@ -2248,9 +2249,9 @@ arm_pt (work, mangled, n, anchor, args)
}
if (AUTO_DEMANGLING || EDG_DEMANGLING)
{
- if ((*anchor = mystrstr (mangled, "__tm__"))
- || (*anchor = mystrstr (mangled, "__ps__"))
- || (*anchor = mystrstr (mangled, "__pt__")))
+ if ((*anchor = strstr (mangled, "__tm__"))
+ || (*anchor = strstr (mangled, "__ps__"))
+ || (*anchor = strstr (mangled, "__pt__")))
{
int len;
*args = *anchor + 6;
@@ -2263,7 +2264,7 @@ arm_pt (work, mangled, n, anchor, args)
return 1;
}
}
- else if ((*anchor = mystrstr (mangled, "__S")))
+ else if ((*anchor = strstr (mangled, "__S")))
{
int len;
*args = *anchor + 3;
@@ -2564,7 +2565,7 @@ iterate_demangle_function (work, mangled, declp, scan)
/* Do not iterate for some demangling modes, or if there's only one
"__"-sequence. This is the normal case. */
if (ARM_DEMANGLING || LUCID_DEMANGLING || HP_DEMANGLING || EDG_DEMANGLING
- || mystrstr (scan + 2, "__") == NULL)
+ || strstr (scan + 2, "__") == NULL)
{
demangle_function_name (work, mangled, declp, scan);
return 1;
@@ -2707,7 +2708,7 @@ demangle_prefix (work, mangled, declp)
/* This block of code is a reduction in strength time optimization
of:
- scan = mystrstr (*mangled, "__"); */
+ scan = strstr (*mangled, "__"); */
{
scan = *mangled;
@@ -2799,7 +2800,7 @@ demangle_prefix (work, mangled, declp)
{
scan++;
}
- if ((scan = mystrstr (scan, "__")) == NULL || (*(scan + 2) == '\0'))
+ if ((scan = strstr (scan, "__")) == NULL || (*(scan + 2) == '\0'))
{
/* No separator (I.E. "__not_mangled"), or empty signature
(I.E. "__not_mangled_either__") */
@@ -4902,7 +4903,7 @@ static void
print_demangler_list (stream)
FILE *stream;
{
- struct demangler_engine *demangler;
+ const struct demangler_engine *demangler;
fprintf (stream, "{%s", libiberty_demanglers->demangling_style_name);
@@ -4946,11 +4947,10 @@ extern int prepends_underscore;
int strip_underscore = 0;
-static struct option long_options[] = {
+static const struct option long_options[] = {
{"strip-underscores", no_argument, 0, '_'},
{"format", required_argument, 0, 's'},
{"help", no_argument, 0, 'h'},
- {"java", no_argument, 0, 'j'},
{"no-strip-underscores", no_argument, 0, 'n'},
{"version", no_argument, 0, 'v'},
{0, no_argument, 0, 0}
@@ -5044,12 +5044,13 @@ main (argc, argv)
char *result;
int c;
const char *valid_symbols;
+ enum demangling_styles style = auto_demangling;
program_name = argv[0];
strip_underscore = prepends_underscore;
- while ((c = getopt_long (argc, argv, "_ns:j", long_options, (int *) 0)) != EOF)
+ while ((c = getopt_long (argc, argv, "_ns:", long_options, (int *) 0)) != EOF)
{
switch (c)
{
@@ -5067,13 +5068,8 @@ main (argc, argv)
case '_':
strip_underscore = 1;
break;
- case 'j':
- flags |= DMGL_JAVA;
- break;
case 's':
{
- enum demangling_styles style;
-
style = cplus_demangle_name_to_style (optarg);
if (style == unknown_demangling)
{
@@ -5137,7 +5133,7 @@ main (argc, argv)
{
int skip_first = 0;
- if (mbuffer[0] == '.')
+ if (mbuffer[0] == '.' || mbuffer[0] == '$')
++skip_first;
if (strip_underscore && mbuffer[skip_first] == '_')
++skip_first;
@@ -5146,7 +5142,7 @@ main (argc, argv)
skip_first = i;
mbuffer[i] = 0;
-
+ flags |= (int) style;
result = cplus_demangle (mbuffer + skip_first, flags);
if (result)
{
diff --git a/contrib/binutils/libiberty/fdmatch.c b/contrib/binutils/libiberty/fdmatch.c
index 7af039f..979c214 100644
--- a/contrib/binutils/libiberty/fdmatch.c
+++ b/contrib/binutils/libiberty/fdmatch.c
@@ -20,25 +20,19 @@ Boston, MA 02111-1307, USA. */
/*
-NAME
-
- fdmatch -- see if two file descriptors refer to same file
-
-SYNOPSIS
-
- int fdmatch (int fd1, int fd2)
-
-DESCRIPTION
-
- Check to see if two open file descriptors refer to the same file.
- This is useful, for example, when we have an open file descriptor
- for an unnamed file, and the name of a file that we believe to
- correspond to that fd. This can happen when we are exec'd with
- an already open file (stdout for example) or from the SVR4 /proc
- calls that return open file descriptors for mapped address spaces.
- All we have to do is open the file by name and check the two file
- descriptors for a match, which is done by comparing major&minor
- device numbers and inode numbers.
+@deftypefn Extension int fdmatch (int @var{fd1}, int @var{fd2})
+
+Check to see if two open file descriptors refer to the same file.
+This is useful, for example, when we have an open file descriptor for
+an unnamed file, and the name of a file that we believe to correspond
+to that fd. This can happen when we are exec'd with an already open
+file (@code{stdout} for example) or from the SVR4 @file{/proc} calls
+that return open file descriptors for mapped address spaces. All we
+have to do is open the file by name and check the two file descriptors
+for a match, which is done by comparing major and minor device numbers
+and inode numbers.
+
+@end deftypefn
BUGS
diff --git a/contrib/binutils/libiberty/ffs.c b/contrib/binutils/libiberty/ffs.c
new file mode 100644
index 0000000..de047e2
--- /dev/null
+++ b/contrib/binutils/libiberty/ffs.c
@@ -0,0 +1,27 @@
+/* ffs -- Find the first bit set in the parameter
+
+@deftypefn Supplemental int ffs (int @var{valu})
+
+Find the first (least significant) bit set in @var{valu}. Bits are
+numbered from right to left, starting with bit 1 (corresponding to the
+value 1). If @var{valu} is zero, zero is returned.
+
+@end deftypefn
+
+*/
+
+int
+ffs (valu)
+ register int valu;
+{
+ register int bit;
+
+ if (valu == 0)
+ return 0;
+
+ for (bit = 1; !(valu & 1); bit++)
+ valu >>= 1;
+
+ return bit;
+}
+
diff --git a/contrib/binutils/libiberty/fibheap.c b/contrib/binutils/libiberty/fibheap.c
new file mode 100644
index 0000000..0ba9b8d
--- /dev/null
+++ b/contrib/binutils/libiberty/fibheap.c
@@ -0,0 +1,523 @@
+/* A Fibonacci heap datatype.
+ Copyright 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+ Contributed by Daniel Berlin (dan@cgsoftware.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. */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif
+#include "libiberty.h"
+#include "fibheap.h"
+
+
+#define FIBHEAPKEY_MIN LONG_MIN
+
+static void fibheap_ins_root PARAMS ((fibheap_t, fibnode_t));
+static void fibheap_rem_root PARAMS ((fibheap_t, fibnode_t));
+static void fibheap_consolidate PARAMS ((fibheap_t));
+static void fibheap_link PARAMS ((fibheap_t, fibnode_t, fibnode_t));
+static void fibheap_cut PARAMS ((fibheap_t, fibnode_t, fibnode_t));
+static void fibheap_cascading_cut PARAMS ((fibheap_t, fibnode_t));
+static fibnode_t fibheap_extr_min_node PARAMS ((fibheap_t));
+static int fibheap_compare PARAMS ((fibheap_t, fibnode_t, fibnode_t));
+static int fibheap_comp_data PARAMS ((fibheap_t, fibheapkey_t, void *,
+ fibnode_t));
+static fibnode_t fibnode_new PARAMS ((void));
+static void fibnode_insert_after PARAMS ((fibnode_t, fibnode_t));
+#define fibnode_insert_before(a, b) fibnode_insert_after (a->left, b)
+static fibnode_t fibnode_remove PARAMS ((fibnode_t));
+
+
+/* Create a new fibonacci heap. */
+fibheap_t
+fibheap_new ()
+{
+ return (fibheap_t) xcalloc (1, sizeof (struct fibheap));
+}
+
+/* Create a new fibonacci heap node. */
+static fibnode_t
+fibnode_new ()
+{
+ fibnode_t node;
+
+ node = xcalloc (1, sizeof *node);
+ node->left = node;
+ node->right = node;
+
+ return node;
+}
+
+static inline int
+fibheap_compare (heap, a, b)
+ fibheap_t heap ATTRIBUTE_UNUSED;
+ fibnode_t a;
+ fibnode_t b;
+{
+ if (a->key < b->key)
+ return -1;
+ if (a->key > b->key)
+ return 1;
+ return 0;
+}
+
+static inline int
+fibheap_comp_data (heap, key, data, b)
+ fibheap_t heap;
+ fibheapkey_t key;
+ void *data;
+ fibnode_t b;
+{
+ struct fibnode a;
+
+ a.key = key;
+ a.data = data;
+
+ return fibheap_compare (heap, &a, b);
+}
+
+/* Insert DATA, with priority KEY, into HEAP. */
+fibnode_t
+fibheap_insert (heap, key, data)
+ fibheap_t heap;
+ fibheapkey_t key;
+ void *data;
+{
+ fibnode_t node;
+
+ /* Create the new node. */
+ node = fibnode_new ();
+
+ /* Set the node's data. */
+ node->data = data;
+ node->key = key;
+
+ /* Insert it into the root list. */
+ fibheap_ins_root (heap, node);
+
+ /* If their was no minimum, or this key is less than the min,
+ it's the new min. */
+ if (heap->min == NULL || node->key < heap->min->key)
+ heap->min = node;
+
+ heap->nodes++;
+
+ return node;
+}
+
+/* Return the data of the minimum node (if we know it). */
+void *
+fibheap_min (heap)
+ fibheap_t heap;
+{
+ /* If there is no min, we can't easily return it. */
+ if (heap->min == NULL)
+ return NULL;
+ return heap->min->data;
+}
+
+/* Return the key of the minimum node (if we know it). */
+fibheapkey_t
+fibheap_min_key (heap)
+ fibheap_t heap;
+{
+ /* If there is no min, we can't easily return it. */
+ if (heap->min == NULL)
+ return 0;
+ return heap->min->key;
+}
+
+/* Union HEAPA and HEAPB into a new heap. */
+fibheap_t
+fibheap_union (heapa, heapb)
+ fibheap_t heapa;
+ fibheap_t heapb;
+{
+ fibnode_t a_root, b_root, temp;
+
+ /* If one of the heaps is empty, the union is just the other heap. */
+ if ((a_root = heapa->root) == NULL)
+ {
+ free (heapa);
+ return heapb;
+ }
+ if ((b_root = heapb->root) == NULL)
+ {
+ free (heapb);
+ return heapa;
+ }
+
+ /* Merge them to the next nodes on the opposite chain. */
+ a_root->left->right = b_root;
+ b_root->left->right = a_root;
+ temp = a_root->left;
+ a_root->left = b_root->left;
+ b_root->left = temp;
+ heapa->nodes += heapb->nodes;
+
+ /* And set the new minimum, if it's changed. */
+ if (fibheap_compare (heapa, heapb->min, heapa->min) < 0)
+ heapa->min = heapb->min;
+
+ free (heapb);
+ return heapa;
+}
+
+/* Extract the data of the minimum node from HEAP. */
+void *
+fibheap_extract_min (heap)
+ fibheap_t heap;
+{
+ fibnode_t z;
+ void *ret = NULL;
+
+ /* If we don't have a min set, it means we have no nodes. */
+ if (heap->min != NULL)
+ {
+ /* Otherwise, extract the min node, free the node, and return the
+ node's data. */
+ z = fibheap_extr_min_node (heap);
+ ret = z->data;
+ free (z);
+ }
+
+ return ret;
+}
+
+/* Replace both the KEY and the DATA associated with NODE. */
+void *
+fibheap_replace_key_data (heap, node, key, data)
+ fibheap_t heap;
+ fibnode_t node;
+ fibheapkey_t key;
+ void *data;
+{
+ void *odata;
+ int okey;
+ fibnode_t y;
+
+ /* If we wanted to, we could actually do a real increase by redeleting and
+ inserting. However, this would require O (log n) time. So just bail out
+ for now. */
+ if (fibheap_comp_data (heap, key, data, node) > 0)
+ return NULL;
+
+ odata = node->data;
+ okey = node->key;
+ node->data = data;
+ node->key = key;
+ y = node->parent;
+
+ if (okey == key)
+ return odata;
+
+ /* These two compares are specifically <= 0 to make sure that in the case
+ of equality, a node we replaced the data on, becomes the new min. This
+ is needed so that delete's call to extractmin gets the right node. */
+ if (y != NULL && fibheap_compare (heap, node, y) <= 0)
+ {
+ fibheap_cut (heap, node, y);
+ fibheap_cascading_cut (heap, y);
+ }
+
+ if (fibheap_compare (heap, node, heap->min) <= 0)
+ heap->min = node;
+
+ return odata;
+}
+
+/* Replace the DATA associated with NODE. */
+void *
+fibheap_replace_data (heap, node, data)
+ fibheap_t heap;
+ fibnode_t node;
+ void *data;
+{
+ return fibheap_replace_key_data (heap, node, node->key, data);
+}
+
+/* Replace the KEY associated with NODE. */
+fibheapkey_t
+fibheap_replace_key (heap, node, key)
+ fibheap_t heap;
+ fibnode_t node;
+ fibheapkey_t key;
+{
+ int okey = node->key;
+ fibheap_replace_key_data (heap, node, key, node->data);
+ return okey;
+}
+
+/* Delete NODE from HEAP. */
+void *
+fibheap_delete_node (heap, node)
+ fibheap_t heap;
+ fibnode_t node;
+{
+ void *ret = node->data;
+
+ /* To perform delete, we just make it the min key, and extract. */
+ fibheap_replace_key (heap, node, FIBHEAPKEY_MIN);
+ fibheap_extract_min (heap);
+
+ return ret;
+}
+
+/* Delete HEAP. */
+void
+fibheap_delete (heap)
+ fibheap_t heap;
+{
+ while (heap->min != NULL)
+ free (fibheap_extr_min_node (heap));
+
+ free (heap);
+}
+
+/* Determine if HEAP is empty. */
+int
+fibheap_empty (heap)
+ fibheap_t heap;
+{
+ return heap->nodes == 0;
+}
+
+/* Extract the minimum node of the heap. */
+static fibnode_t
+fibheap_extr_min_node (heap)
+ fibheap_t heap;
+{
+ fibnode_t ret = heap->min;
+ fibnode_t x, y, orig;
+
+ /* Attach the child list of the minimum node to the root list of the heap.
+ If there is no child list, we don't do squat. */
+ for (x = ret->child, orig = NULL; x != orig && x != NULL; x = y)
+ {
+ if (orig == NULL)
+ orig = x;
+ y = x->right;
+ x->parent = NULL;
+ fibheap_ins_root (heap, x);
+ }
+
+ /* Remove the old root. */
+ fibheap_rem_root (heap, ret);
+ heap->nodes--;
+
+ /* If we are left with no nodes, then the min is NULL. */
+ if (heap->nodes == 0)
+ heap->min = NULL;
+ else
+ {
+ /* Otherwise, consolidate to find new minimum, as well as do the reorg
+ work that needs to be done. */
+ heap->min = ret->right;
+ fibheap_consolidate (heap);
+ }
+
+ return ret;
+}
+
+/* Insert NODE into the root list of HEAP. */
+static void
+fibheap_ins_root (heap, node)
+ fibheap_t heap;
+ fibnode_t node;
+{
+ /* If the heap is currently empty, the new node becomes the singleton
+ circular root list. */
+ if (heap->root == NULL)
+ {
+ heap->root = node;
+ node->left = node;
+ node->right = node;
+ return;
+ }
+
+ /* Otherwise, insert it in the circular root list between the root
+ and it's right node. */
+ fibnode_insert_after (heap->root, node);
+}
+
+/* Remove NODE from the rootlist of HEAP. */
+static void
+fibheap_rem_root (heap, node)
+ fibheap_t heap;
+ fibnode_t node;
+{
+ if (node->left == node)
+ heap->root = NULL;
+ else
+ heap->root = fibnode_remove (node);
+}
+
+/* Consolidate the heap. */
+static void
+fibheap_consolidate (heap)
+ fibheap_t heap;
+{
+ fibnode_t a[1 + 8 * sizeof (long)];
+ fibnode_t w;
+ fibnode_t y;
+ fibnode_t x;
+ int i;
+ int d;
+ int D;
+
+ D = 1 + 8 * sizeof (long);
+
+ memset (a, 0, sizeof (fibnode_t) * D);
+
+ while ((w = heap->root) != NULL)
+ {
+ x = w;
+ fibheap_rem_root (heap, w);
+ d = x->degree;
+ while (a[d] != NULL)
+ {
+ y = a[d];
+ if (fibheap_compare (heap, x, y) > 0)
+ {
+ fibnode_t temp;
+ temp = x;
+ x = y;
+ y = temp;
+ }
+ fibheap_link (heap, y, x);
+ a[d] = NULL;
+ d++;
+ }
+ a[d] = x;
+ }
+ heap->min = NULL;
+ for (i = 0; i < D; i++)
+ if (a[i] != NULL)
+ {
+ fibheap_ins_root (heap, a[i]);
+ if (heap->min == NULL || fibheap_compare (heap, a[i], heap->min) < 0)
+ heap->min = a[i];
+ }
+}
+
+/* Make NODE a child of PARENT. */
+static void
+fibheap_link (heap, node, parent)
+ fibheap_t heap ATTRIBUTE_UNUSED;
+ fibnode_t node;
+ fibnode_t parent;
+{
+ if (parent->child == NULL)
+ parent->child = node;
+ else
+ fibnode_insert_before (parent->child, node);
+ node->parent = parent;
+ parent->degree++;
+ node->mark = 0;
+}
+
+/* Remove NODE from PARENT's child list. */
+static void
+fibheap_cut (heap, node, parent)
+ fibheap_t heap;
+ fibnode_t node;
+ fibnode_t parent;
+{
+ fibnode_remove (node);
+ parent->degree--;
+ fibheap_ins_root (heap, node);
+ node->parent = NULL;
+ node->mark = 0;
+}
+
+static void
+fibheap_cascading_cut (heap, y)
+ fibheap_t heap;
+ fibnode_t y;
+{
+ fibnode_t z;
+
+ while ((z = y->parent) != NULL)
+ {
+ if (y->mark == 0)
+ {
+ y->mark = 1;
+ return;
+ }
+ else
+ {
+ fibheap_cut (heap, y, z);
+ y = z;
+ }
+ }
+}
+
+static void
+fibnode_insert_after (a, b)
+ fibnode_t a;
+ fibnode_t b;
+{
+ if (a == a->right)
+ {
+ a->right = b;
+ a->left = b;
+ b->right = a;
+ b->left = a;
+ }
+ else
+ {
+ b->right = a->right;
+ a->right->left = b;
+ a->right = b;
+ b->left = a;
+ }
+}
+
+static fibnode_t
+fibnode_remove (node)
+ fibnode_t node;
+{
+ fibnode_t ret;
+
+ if (node == node->left)
+ ret = NULL;
+ else
+ ret = node->left;
+
+ if (node->parent != NULL && node->parent->child == node)
+ node->parent->child = ret;
+
+ node->right->left = node->left;
+ node->left->right = node->right;
+
+ node->parent = NULL;
+ node->left = node;
+ node->right = node;
+
+ return ret;
+}
diff --git a/contrib/binutils/libiberty/floatformat.c b/contrib/binutils/libiberty/floatformat.c
index 3cb78f5..b5d0121 100644
--- a/contrib/binutils/libiberty/floatformat.c
+++ b/contrib/binutils/libiberty/floatformat.c
@@ -66,7 +66,7 @@ const struct floatformat floatformat_ieee_double_littlebyte_bigword =
{
floatformat_littlebyte_bigword, 64, 0, 1, 11, 1023, 2047, 12, 52,
floatformat_intbit_no,
- "floatformat_ieee_double_little"
+ "floatformat_ieee_double_littlebyte_bigword"
};
const struct floatformat floatformat_i387_ext =
@@ -91,17 +91,17 @@ const struct floatformat floatformat_i960_ext =
};
const struct floatformat floatformat_m88110_ext =
{
-#ifdef HARRIS_FLOAT_FORMAT
+ floatformat_big, 80, 0, 1, 15, 0x3fff, 0x7fff, 16, 64,
+ floatformat_intbit_yes,
+ "floatformat_m88110_ext"
+};
+const struct floatformat floatformat_m88110_harris_ext =
+{
/* Harris uses raw format 128 bytes long, but the number is just an ieee
double, and the last 64 bits are wasted. */
floatformat_big,128, 0, 1, 11, 0x3ff, 0x7ff, 12, 52,
floatformat_intbit_no,
- "floatformat_m88110_ext(harris)"
-#else
- floatformat_big, 80, 0, 1, 15, 0x3fff, 0x7fff, 16, 64,
- floatformat_intbit_yes,
- "floatformat_m88110_ext"
-#endif /* HARRIS_FLOAT_FORMAT */
+ "floatformat_m88110_ext_harris"
};
const struct floatformat floatformat_arm_ext =
{
@@ -110,6 +110,44 @@ const struct floatformat floatformat_arm_ext =
floatformat_intbit_yes,
"floatformat_arm_ext"
};
+const struct floatformat floatformat_arm_ext_big =
+{
+ /* Bits 1 to 16 are unused. */
+ floatformat_big, 96, 0, 17, 15, 0x3fff, 0x7fff, 32, 64,
+ floatformat_intbit_yes,
+ "floatformat_arm_ext_big"
+};
+const struct floatformat floatformat_arm_ext_littlebyte_bigword =
+{
+ /* Bits 1 to 16 are unused. */
+ floatformat_littlebyte_bigword, 96, 0, 17, 15, 0x3fff, 0x7fff, 32, 64,
+ floatformat_intbit_yes,
+ "floatformat_arm_ext_littlebyte_bigword"
+};
+const struct floatformat floatformat_ia64_spill_big =
+{
+ floatformat_big, 128, 0, 1, 17, 65535, 0x1ffff, 18, 64,
+ floatformat_intbit_yes,
+ "floatformat_ia64_spill_big"
+};
+const struct floatformat floatformat_ia64_spill_little =
+{
+ floatformat_little, 128, 0, 1, 17, 65535, 0x1ffff, 18, 64,
+ floatformat_intbit_yes,
+ "floatformat_ia64_spill_little"
+};
+const struct floatformat floatformat_ia64_quad_big =
+{
+ floatformat_big, 128, 0, 1, 15, 16383, 0x7fff, 16, 112,
+ floatformat_intbit_no,
+ "floatformat_ia64_quad_big"
+};
+const struct floatformat floatformat_ia64_quad_little =
+{
+ floatformat_little, 128, 0, 1, 15, 16383, 0x7fff, 16, 112,
+ floatformat_intbit_no,
+ "floatformat_ia64_quad_little"
+};
static unsigned long get_field PARAMS ((unsigned char *,
enum floatformat_byteorders,
diff --git a/contrib/binutils/libiberty/fnmatch.txh b/contrib/binutils/libiberty/fnmatch.txh
new file mode 100644
index 0000000..92e11bc
--- /dev/null
+++ b/contrib/binutils/libiberty/fnmatch.txh
@@ -0,0 +1,48 @@
+@deftypefn Replacement int fnmatch (const char *@var{pattern}, const char *@var{string}, int @var{flags})
+
+Matches @var{string} against @var{pattern}, returning zero if it
+matches, @code{FNM_NOMATCH} if not. @var{pattern} may contain the
+wildcards @code{?} to match any one character, @code{*} to match any
+zero or more characters, or a set of alternate characters in square
+brackets, like @samp{[a-gt8]}, which match one character (@code{a}
+through @code{g}, or @code{t}, or @code{8}, in this example) if that one
+character is in the set. A set may be inverted (i.e., match anything
+except what's in the set) by giving @code{^} or @code{!} as the first
+character in the set. To include those characters in the set, list them
+as anything other than the first character of the set. To include a
+dash in the set, list it last in the set. A backslash character makes
+the following character not special, so for example you could match
+against a literal asterisk with @samp{\*}. To match a literal
+backslash, use @samp{\\}.
+
+@code{flags} controls various aspects of the matching process, and is a
+boolean OR of zero or more of the following values (defined in
+@code{<fnmatch.h>}):
+
+@table @code
+
+@item FNM_PATHNAME
+@itemx FNM_FILE_NAME
+@var{string} is assumed to be a path name. No wildcard will ever match
+@code{/}.
+
+@item FNM_NOESCAPE
+Do not interpret backslashes as quoting the following special character.
+
+@item FNM_PERIOD
+A leading period (at the beginning of @var{string}, or if
+@code{FNM_PATHNAME} after a slash) is not matched by @code{*} or
+@code{?} but must be matched explicitly.
+
+@item FNM_LEADING_DIR
+Means that @var{string} also matches @var{pattern} if some initial part
+of @var{string} matches, and is followed by @code{/} and zero or more
+characters. For example, @samp{foo*} would match either @samp{foobar}
+or @samp{foobar/grill}.
+
+@item FNM_CASEFOLD
+Ignores case when performing the comparison.
+
+@end table
+
+@end deftypefn
diff --git a/contrib/binutils/libiberty/functions.texi b/contrib/binutils/libiberty/functions.texi
new file mode 100644
index 0000000..af7760d
--- /dev/null
+++ b/contrib/binutils/libiberty/functions.texi
@@ -0,0 +1,937 @@
+@c Automatically generated from *.c and others (the comments before
+@c each entry tell you which file and where in that file). DO NOT EDIT!
+@c Edit the *.c files, configure with --enable-maintainer-mode,
+@c and let gather-docs build you a new copy.
+
+@c alloca.c:26
+@deftypefn Replacement void* alloca (size_t @var{size})
+
+This function allocates memory which will be automatically reclaimed
+after the procedure exits. The @libib{} implementation does not free
+the memory immediately but will do so eventually during subsequent
+calls to this function. Memory is allocated using @code{xmalloc} under
+normal circumstances.
+
+The header file @file{alloca-conf.h} can be used in conjunction with the
+GNU Autoconf test @code{AC_FUNC_ALLOCA} to test for and properly make
+available this function. The @code{AC_FUNC_ALLOCA} test requires that
+client code use a block of preprocessor code to be safe (see the Autoconf
+manual for more); this header incorporates that logic and more, including
+the possibility of a GCC built-in function.
+
+@end deftypefn
+
+@c asprintf.c:33
+@deftypefn Extension int asprintf (char **@var{resptr}, const char *@var{format}, ...)
+
+Like @code{sprintf}, but instead of passing a pointer to a buffer, you
+pass a pointer to a pointer. This function will compute the size of
+the buffer needed, allocate memory with @code{malloc}, and store a
+pointer to the allocated memory in @code{*@var{resptr}}. The value
+returned is the same as @code{sprintf} would return. If memory could
+not be allocated, zero is returned and @code{NULL} is stored in
+@code{*@var{resptr}}.
+
+@end deftypefn
+
+@c atexit.c:6
+@deftypefn Supplemental int atexit (void (*@var{f})())
+
+Causes function @var{f} to be called at exit. Returns 0.
+
+@end deftypefn
+
+@c basename.c:6
+@deftypefn Supplemental char* basename (const char *@var{name})
+
+Returns a pointer to the last component of pathname @var{name}.
+Behavior is undefined if the pathname ends in a directory separator.
+
+@end deftypefn
+
+@c bcmp.c:6
+@deftypefn Supplemental int bcmp (char *@var{x}, char *@var{y}, int @var{count})
+
+Compares the first @var{count} bytes of two areas of memory. Returns
+zero if they are the same, nonzero otherwise. Returns zero if
+@var{count} is zero. A nonzero result only indicates a difference,
+it does not indicate any sorting order (say, by having a positive
+result mean @var{x} sorts before @var{y}).
+
+@end deftypefn
+
+@c bcopy.c:3
+@deftypefn Supplemental void bcopy (char *@var{in}, char *@var{out}, int @var{length})
+
+Copies @var{length} bytes from memory region @var{in} to region
+@var{out}. The use of @code{bcopy} is deprecated in new programs.
+
+@end deftypefn
+
+@c bsearch.c:33
+@deftypefn Supplemental void* bsearch (const void *@var{key}, const void *@var{base}, size_t @var{nmemb}, size_t @var{size}, int (*@var{compar})(const void *, const void *))
+
+Performs a search over an array of @var{nmemb} elements pointed to by
+@var{base} for a member that matches the object pointed to by @var{key}.
+The size of each member is specified by @var{size}. The array contents
+should be sorted in ascending order according to the @var{compar}
+comparison function. This routine should take two arguments pointing to
+the @var{key} and to an array member, in that order, and should return an
+integer less than, equal to, or greater than zero if the @var{key} object
+is respectively less than, matching, or greater than the array member.
+
+@end deftypefn
+
+@c argv.c:139
+@deftypefn Extension char** buildargv (char *@var{sp})
+
+Given a pointer to a string, parse the string extracting fields
+separated by whitespace and optionally enclosed within either single
+or double quotes (which are stripped off), and build a vector of
+pointers to copies of the string for each field. The input string
+remains unchanged. The last element of the vector is followed by a
+@code{NULL} element.
+
+All of the memory for the pointer array and copies of the string
+is obtained from @code{malloc}. All of the memory can be returned to the
+system with the single function call @code{freeargv}, which takes the
+returned result of @code{buildargv}, as it's argument.
+
+Returns a pointer to the argument vector if successful. Returns
+@code{NULL} if @var{sp} is @code{NULL} or if there is insufficient
+memory to complete building the argument vector.
+
+If the input is a null string (as opposed to a @code{NULL} pointer),
+then buildarg returns an argument vector that has one arg, a null
+string.
+
+@end deftypefn
+
+@c bzero.c:6
+@deftypefn Supplemental void bzero (char *@var{mem}, int @var{count})
+
+Zeros @var{count} bytes starting at @var{mem}. Use of this function
+is deprecated in favor of @code{memset}.
+
+@end deftypefn
+
+@c calloc.c:6
+@deftypefn Supplemental void* calloc (size_t @var{nelem}, size_t @var{elsize})
+
+Uses @code{malloc} to allocate storage for @var{nelem} objects of
+@var{elsize} bytes each, then zeros the memory.
+
+@end deftypefn
+
+@c choose-temp.c:42
+@deftypefn Extension char* choose_temp_base (void)
+
+Return a prefix for temporary file names or @code{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 (@code{mktemp}
+fails). The buffer for the result is obtained with @code{xmalloc}.
+
+This function is provided for backwards compatability only. Its use is
+not recommended.
+
+@end deftypefn
+
+@c make-temp-file.c:88
+@deftypefn Replacement char* choose_tmpdir ()
+
+Returns a pointer to a directory path suitable for creating temporary
+files in.
+
+@end deftypefn
+
+@c clock.c:27
+@deftypefn Supplemental long clock (void)
+
+Returns an approximation of the CPU time used by the process as a
+@code{clock_t}; divide this number by @samp{CLOCKS_PER_SEC} to get the
+number of seconds used.
+
+@end deftypefn
+
+@c concat.c:24
+@deftypefn Extension char* concat (const char *@var{s1}, const char *@var{s2}, @dots{}, @code{NULL})
+
+Concatenate zero or more of strings and return the result in freshly
+@code{xmalloc}ed memory. Returns @code{NULL} if insufficient memory is
+available. The argument list is terminated by the first @code{NULL}
+pointer encountered. Pointers to empty strings are ignored.
+
+@end deftypefn
+
+@c argv.c:65
+@deftypefn Extension char** dupargv (char **@var{vector})
+
+Duplicate an argument vector. Simply scans through @var{vector},
+duplicating each argument until the terminating @code{NULL} is found.
+Returns a pointer to the argument vector if successful. Returns
+@code{NULL} if there is insufficient memory to complete building the
+argument vector.
+
+@end deftypefn
+
+@c strerror.c:566
+@deftypefn Extension int errno_max (void)
+
+Returns the maximum @code{errno} value for which a corresponding
+symbolic name or message is available. Note that in the case where we
+use the @code{sys_errlist} supplied by the system, it is possible for
+there to be more symbolic names than messages, or vice versa. In
+fact, the manual page for @code{perror(3C)} explicitly warns that one
+should check the size of the table (@code{sys_nerr}) before indexing
+it, since new error codes may be added to the system before they are
+added to the table. Thus @code{sys_nerr} might be smaller than value
+implied by the largest @code{errno} value defined in @code{<errno.h>}.
+
+We return the maximum value that can be used to obtain a meaningful
+symbolic name or message.
+
+@end deftypefn
+
+@c fdmatch.c:23
+@deftypefn Extension int fdmatch (int @var{fd1}, int @var{fd2})
+
+Check to see if two open file descriptors refer to the same file.
+This is useful, for example, when we have an open file descriptor for
+an unnamed file, and the name of a file that we believe to correspond
+to that fd. This can happen when we are exec'd with an already open
+file (@code{stdout} for example) or from the SVR4 @file{/proc} calls
+that return open file descriptors for mapped address spaces. All we
+have to do is open the file by name and check the two file descriptors
+for a match, which is done by comparing major and minor device numbers
+and inode numbers.
+
+@end deftypefn
+
+@c ffs.c:3
+@deftypefn Supplemental int ffs (int @var{valu})
+
+Find the first (least significant) bit set in @var{valu}. Bits are
+numbered from right to left, starting with bit 1 (corresponding to the
+value 1). If @var{valu} is zero, zero is returned.
+
+@end deftypefn
+
+@c fnmatch.txh:1
+@deftypefn Replacement int fnmatch (const char *@var{pattern}, const char *@var{string}, int @var{flags})
+
+Matches @var{string} against @var{pattern}, returning zero if it
+matches, @code{FNM_NOMATCH} if not. @var{pattern} may contain the
+wildcards @code{?} to match any one character, @code{*} to match any
+zero or more characters, or a set of alternate characters in square
+brackets, like @samp{[a-gt8]}, which match one character (@code{a}
+through @code{g}, or @code{t}, or @code{8}, in this example) if that one
+character is in the set. A set may be inverted (i.e., match anything
+except what's in the set) by giving @code{^} or @code{!} as the first
+character in the set. To include those characters in the set, list them
+as anything other than the first character of the set. To include a
+dash in the set, list it last in the set. A backslash character makes
+the following character not special, so for example you could match
+against a literal asterisk with @samp{\*}. To match a literal
+backslash, use @samp{\\}.
+
+@code{flags} controls various aspects of the matching process, and is a
+boolean OR of zero or more of the following values (defined in
+@code{<fnmatch.h>}):
+
+@table @code
+
+@item FNM_PATHNAME
+@itemx FNM_FILE_NAME
+@var{string} is assumed to be a path name. No wildcard will ever match
+@code{/}.
+
+@item FNM_NOESCAPE
+Do not interpret backslashes as quoting the following special character.
+
+@item FNM_PERIOD
+A leading period (at the beginning of @var{string}, or if
+@code{FNM_PATHNAME} after a slash) is not matched by @code{*} or
+@code{?} but must be matched explicitly.
+
+@item FNM_LEADING_DIR
+Means that @var{string} also matches @var{pattern} if some initial part
+of @var{string} matches, and is followed by @code{/} and zero or more
+characters. For example, @samp{foo*} would match either @samp{foobar}
+or @samp{foobar/grill}.
+
+@item FNM_CASEFOLD
+Ignores case when performing the comparison.
+
+@end table
+
+@end deftypefn
+
+@c argv.c:111
+@deftypefn Extension void freeargv (char **@var{vector})
+
+Free an argument vector that was built using @code{buildargv}. Simply
+scans through @var{vector}, freeing the memory for each argument until
+the terminating @code{NULL} is found, and then frees @var{vector}
+itself.
+
+@end deftypefn
+
+@c getruntime.c:78
+@deftypefn Replacement long get_run_time (void)
+
+Returns the time used so far, in microseconds. If possible, this is
+the time used by this process, else it is the elapsed time since the
+process started.
+
+@end deftypefn
+
+@c getcwd.c:6
+@deftypefn Supplemental char* getcwd (char *@var{pathname}, int @var{len})
+
+Copy the absolute pathname for the current working directory into
+@var{pathname}, which is assumed to point to a buffer of at least
+@var{len} bytes, and return a pointer to the buffer. If the current
+directory's path doesn't fit in @var{len} characters, the result is
+@code{NULL} and @code{errno} is set. If @var{pathname} is a null pointer,
+@code{getcwd} will obtain @var{len} bytes of space using
+@code{malloc}.
+
+@end deftypefn
+
+@c getpagesize.c:5
+@deftypefn Supplemental int getpagesize (void)
+
+Returns the number of bytes in a page of memory. This is the
+granularity of many of the system memory management routines. No
+guarantee is made as to whether or not it is the same as the basic
+memory management hardware page size.
+
+@end deftypefn
+
+@c getpwd.c:5
+@deftypefn Supplemental char* getpwd (void)
+
+Returns the current working directory. This implementation caches the
+result on the assumption that the process will not call @code{chdir}
+between calls to @code{getpwd}.
+
+@end deftypefn
+
+@c index.c:5
+@deftypefn Supplemental char* index (char *@var{s}, int @var{c})
+
+Returns a pointer to the first occurrence of the character @var{c} in
+the string @var{s}, or @code{NULL} if not found. The use of @code{index} is
+deprecated in new programs in favor of @code{strchr}.
+
+@end deftypefn
+
+@c insque.c:6
+@deftypefn Supplemental void insque (struct qelem *@var{elem}, struct qelem *@var{pred})
+@deftypefnx Supplemental void remque (struct qelem *@var{elem})
+
+Routines to manipulate queues built from doubly linked lists. The
+@code{insque} routine inserts @var{elem} in the queue immediately
+after @var{pred}. The @code{remque} routine removes @var{elem} from
+its containing queue. These routines expect to be passed pointers to
+structures which have as their first members a forward pointer and a
+back pointer, like this prototype (although no prototype is provided):
+
+@example
+struct qelem @{
+ struct qelem *q_forw;
+ struct qelem *q_back;
+ char q_data[];
+@};
+@end example
+
+@end deftypefn
+
+@c lbasename.c:23
+@deftypefn Replacement {const char*} lbasename (const char *@var{name})
+
+Given a pointer to a string containing a typical pathname
+(@samp{/usr/src/cmd/ls/ls.c} for example), returns a pointer to the
+last component of the pathname (@samp{ls.c} in this case). The
+returned pointer is guaranteed to lie within the original
+string. This latter fact is not true of many vendor C
+libraries, which return special strings or modify the passed
+strings for particular input.
+
+In particular, the empty string returns the same empty string,
+and a path ending in @code{/} returns the empty string after it.
+
+@end deftypefn
+
+@c make-temp-file.c:138
+@deftypefn Replacement char* make_temp_file (const char *@var{suffix})
+
+Return a temporary file name (as a string) or @code{NULL} if unable to
+create one. @var{suffix} is a suffix to append to the file name. The
+string is @code{malloc}ed, and the temporary file has been created.
+
+@end deftypefn
+
+@c memchr.c:3
+@deftypefn Supplemental void* memchr (const void *@var{s}, int @var{c}, size_t @var{n})
+
+This function searches memory starting at @code{*@var{s}} for the
+character @var{c}. The search only ends with the first occurrence of
+@var{c}, or after @var{length} characters; in particular, a null
+character does not terminate the search. If the character @var{c} is
+found within @var{length} characters of @code{*@var{s}}, a pointer
+to the character is returned. If @var{c} is not found, then @code{NULL} is
+returned.
+
+@end deftypefn
+
+@c memcmp.c:6
+@deftypefn Supplemental int memcmp (const void *@var{x}, const void *@var{y}, size_t @var{count})
+
+Compares the first @var{count} bytes of two areas of memory. Returns
+zero if they are the same, a value less than zero if @var{x} is
+lexically less than @var{y}, or a value greater than zero if @var{x}
+is lexically greater than @var{y}. Note that lexical order is determined
+as if comparing unsigned char arrays.
+
+@end deftypefn
+
+@c memcpy.c:6
+@deftypefn Supplemental void* memcpy (void *@var{out}, const void *@var{in}, size_t @var{length})
+
+Copies @var{length} bytes from memory region @var{in} to region
+@var{out}. Returns a pointer to @var{out}.
+
+@end deftypefn
+
+@c memmove.c:6
+@deftypefn Supplemental void* memmove (void *@var{from}, const void *@var{to}, size_t @var{count})
+
+Copies @var{count} bytes from memory area @var{from} to memory area
+@var{to}, returning a pointer to @var{to}.
+
+@end deftypefn
+
+@c memset.c:6
+@deftypefn Supplemental void* memset (void *@var{s}, int @var{c}, size_t @var{count})
+
+Sets the first @var{count} bytes of @var{s} to the constant byte
+@var{c}, returning a pointer to @var{s}.
+
+@end deftypefn
+
+@c mkstemps.c:54
+@deftypefn Replacement int mkstemps (char *@var{template}, int @var{suffix_len})
+
+Generate a unique temporary file name from @var{template}.
+@var{template} has the form:
+
+@example
+ @var{path}/ccXXXXXX@var{suffix}
+@end example
+
+@var{suffix_len} tells us how long @var{suffix} is (it can be zero
+length). The last six characters of @var{template} before @var{suffix}
+must be @samp{XXXXXX}; they are replaced with a string that makes the
+filename unique. Returns a file descriptor open on the file for
+reading and writing.
+
+@end deftypefn
+
+@c pexecute.c:67
+@deftypefn Extension int pexecute (const char *@var{program}, char * const *@var{argv}, const char *@var{this_pname}, const char *@var{temp_base}, char **@var{errmsg_fmt}, char **@var{errmsg_arg}, int flags)
+
+Executes a program.
+
+@var{program} and @var{argv} are the arguments to
+@code{execv}/@code{execvp}.
+
+@var{this_pname} is name of the calling program (i.e., @code{argv[0]}).
+
+@var{temp_base} is the path name, sans suffix, of a temporary file to
+use if needed. This is currently only needed for MS-DOS ports that
+don't use @code{go32} (do any still exist?). Ports that don't need it
+can pass @code{NULL}.
+
+(@code{@var{flags} & PEXECUTE_SEARCH}) is non-zero if @env{PATH} should be searched
+(??? It's not clear that GCC passes this flag correctly). (@code{@var{flags} &
+PEXECUTE_FIRST}) is nonzero for the first process in chain.
+(@code{@var{flags} & PEXECUTE_FIRST}) is nonzero for the last process
+in chain. The first/last flags could be simplified to only mark the
+last of a chain of processes but that requires the caller to always
+mark the last one (and not give up early if some error occurs).
+It's more robust to require the caller to mark both ends of the chain.
+
+The result is the pid on systems like Unix where we
+@code{fork}/@code{exec} and on systems like WIN32 and OS/2 where we
+use @code{spawn}. It is up to the caller to wait for the child.
+
+The result is the @code{WEXITSTATUS} on systems like MS-DOS where we
+@code{spawn} and wait for the child here.
+
+Upon failure, @var{errmsg_fmt} and @var{errmsg_arg} are set to the
+text of the error message with an optional argument (if not needed,
+@var{errmsg_arg} is set to @code{NULL}), and @minus{}1 is returned.
+@code{errno} is available to the caller to use.
+
+@end deftypefn
+
+@c strsignal.c:547
+@deftypefn Supplemental void psignal (unsigned @var{signo}, char *@var{message})
+
+Print @var{message} to the standard error, followed by a colon,
+followed by the description of the signal specified by @var{signo},
+followed by a newline.
+
+@end deftypefn
+
+@c putenv.c:21
+@deftypefn Supplemental int putenv (const char *@var{string})
+
+Uses @code{setenv} or @code{unsetenv} to put @var{string} into
+the environment or remove it. If @var{string} is of the form
+@samp{name=value} the string is added; if no @samp{=} is present the
+name is unset/removed.
+
+@end deftypefn
+
+@c pexecute.c:104
+@deftypefn Extension int pwait (int @var{pid}, int *@var{status}, int @var{flags})
+
+Waits for a program started by @code{pexecute} to finish.
+
+@var{pid} is the process id of the task to wait for. @var{status} is
+the `status' argument to wait. @var{flags} is currently unused (allows
+future enhancement without breaking upward compatibility). Pass 0 for now.
+
+The result is the pid of the child reaped, or -1 for failure
+(@code{errno} says why).
+
+On systems that don't support waiting for a particular child, @var{pid} is
+ignored. On systems like MS-DOS that don't really multitask @code{pwait}
+is just a mechanism to provide a consistent interface for the caller.
+
+@end deftypefn
+
+@c random.c:39
+@deftypefn Supplement {long int} random (void)
+@deftypefnx Supplement void srandom (unsigned int @var{seed})
+@deftypefnx Supplement void* initstate (unsigned int @var{seed}, void *@var{arg_state}, unsigned long @var{n})
+@deftypefnx Supplement void* setstate (void *@var{arg_state})
+
+Random number functions. @code{random} returns a random number in the
+range 0 to @code{LONG_MAX}. @code{srandom} initializes the random
+number generator to some starting point determined by @var{seed}
+(else, the values returned by @code{random} are always the same for each
+run of the program). @code{initstate} and @code{setstate} allow fine-grained
+control over the state of the random number generator.
+
+@end deftypefn
+
+@c concat.c:177
+@deftypefn Extension char* reconcat (char *@var{optr}, const char *@var{s1}, @dots{}, @code{NULL})
+
+Same as @code{concat}, except that if @var{optr} is not @code{NULL} it
+is freed after the string is created. This is intended to be useful
+when you're extending an existing string or building up a string in a
+loop:
+
+@example
+ str = reconcat (str, "pre-", str, NULL);
+@end example
+
+@end deftypefn
+
+@c rename.c:6
+@deftypefn Supplemental int rename (const char *@var{old}, const char *@var{new})
+
+Renames a file from @var{old} to @var{new}. If @var{new} already
+exists, it is removed.
+
+@end deftypefn
+
+@c rindex.c:5
+@deftypefn Supplemental char* rindex (const char *@var{s}, int @var{c})
+
+Returns a pointer to the last occurrence of the character @var{c} in
+the string @var{s}, or @code{NULL} if not found. The use of @code{rindex} is
+deprecated in new programs in favor of @code{strrchr}.
+
+@end deftypefn
+
+@c setenv.c:22
+@deftypefn Supplemental int setenv (const char *@var{name}, const char *@var{value}, int @var{overwrite})
+@deftypefnx Supplemental void unsetenv (const char *@var{name})
+
+@code{setenv} adds @var{name} to the environment with value
+@var{value}. If the name was already present in the environment,
+the new value will be stored only if @var{overwrite} is nonzero.
+The companion @code{unsetenv} function removes @var{name} from the
+environment. This implementation is not safe for multithreaded code.
+
+@end deftypefn
+
+@c strsignal.c:353
+@deftypefn Extension int signo_max (void)
+
+Returns the maximum signal value for which a corresponding symbolic
+name or message is available. Note that in the case where we use the
+@code{sys_siglist} supplied by the system, it is possible for there to
+be more symbolic names than messages, or vice versa. In fact, the
+manual page for @code{psignal(3b)} explicitly warns that one should
+check the size of the table (@code{NSIG}) before indexing it, since
+new signal codes may be added to the system before they are added to
+the table. Thus @code{NSIG} might be smaller than value implied by
+the largest signo value defined in @code{<signal.h>}.
+
+We return the maximum value that can be used to obtain a meaningful
+symbolic name or message.
+
+@end deftypefn
+
+@c sigsetmask.c:8
+@deftypefn Supplemental int sigsetmask (int @var{set})
+
+Sets the signal mask to the one provided in @var{set} and returns
+the old mask (which, for libiberty's implementation, will always
+be the value @code{1}).
+
+@end deftypefn
+
+@c spaces.c:22
+@deftypefn Extension char* spaces (int @var{count})
+
+Returns a pointer to a memory region filled with the specified
+number of spaces and null terminated. The returned pointer is
+valid until at least the next call.
+
+@end deftypefn
+
+@c strcasecmp.c:15
+@deftypefn Supplemental int strcasecmp (const char *@var{s1}, const char *@var{s2})
+
+A case-insensitive @code{strcmp}.
+
+@end deftypefn
+
+@c strchr.c:6
+@deftypefn Supplemental char* strchr (const char *@var{s}, int @var{c})
+
+Returns a pointer to the first occurrence of the character @var{c} in
+the string @var{s}, or @code{NULL} if not found. If @var{c} is itself the
+null character, the results are undefined.
+
+@end deftypefn
+
+@c strdup.c:3
+@deftypefn Supplemental char* strdup (const char *@var{s})
+
+Returns a pointer to a copy of @var{s} in memory obtained from
+@code{malloc}, or @code{NULL} if insufficient memory was available.
+
+@end deftypefn
+
+@c strerror.c:670
+@deftypefn Replacement {const char*} strerrno (int @var{errnum})
+
+Given an error number returned from a system call (typically returned
+in @code{errno}), returns a pointer to a string containing the
+symbolic name of that error number, as found in @code{<errno.h>}.
+
+If the supplied error number is within the valid range of indices for
+symbolic names, but no name is available for the particular error
+number, then returns the string @samp{Error @var{num}}, where @var{num}
+is the error number.
+
+If the supplied error number is not within the range of valid
+indices, then returns @code{NULL}.
+
+The contents of the location pointed to are only guaranteed to be
+valid until the next call to @code{strerrno}.
+
+@end deftypefn
+
+@c strerror.c:602
+@deftypefn Supplemental char* strerror (int @var{errnoval})
+
+Maps an @code{errno} number to an error message string, the contents
+of which are implementation defined. On systems which have the
+external variables @code{sys_nerr} and @code{sys_errlist}, these
+strings will be the same as the ones used by @code{perror}.
+
+If the supplied error number is within the valid range of indices for
+the @code{sys_errlist}, but no message is available for the particular
+error number, then returns the string @samp{Error @var{num}}, where
+@var{num} is the error number.
+
+If the supplied error number is not a valid index into
+@code{sys_errlist}, returns @code{NULL}.
+
+The returned string is only guaranteed to be valid only until the
+next call to @code{strerror}.
+
+@end deftypefn
+
+@c strncasecmp.c:15
+@deftypefn Supplemental int strncasecmp (const char *@var{s1}, const char *@var{s2})
+
+A case-insensitive @code{strncmp}.
+
+@end deftypefn
+
+@c strncmp.c:6
+@deftypefn Supplemental int strncmp (const char *@var{s1}, const char *@var{s2}, size_t @var{n})
+
+Compares the first @var{n} bytes of two strings, returning a value as
+@code{strcmp}.
+
+@end deftypefn
+
+@c strrchr.c:6
+@deftypefn Supplemental char* strrchr (const char *@var{s}, int @var{c})
+
+Returns a pointer to the last occurrence of the character @var{c} in
+the string @var{s}, or @code{NULL} if not found. If @var{c} is itself the
+null character, the results are undefined.
+
+@end deftypefn
+
+@c strsignal.c:388
+@deftypefn Supplemental {const char *} strsignal (int @var{signo})
+
+Maps an signal number to an signal message string, the contents of
+which are implementation defined. On systems which have the external
+variable @code{sys_siglist}, these strings will be the same as the
+ones used by @code{psignal()}.
+
+If the supplied signal number is within the valid range of indices for
+the @code{sys_siglist}, but no message is available for the particular
+signal number, then returns the string @samp{Signal @var{num}}, where
+@var{num} is the signal number.
+
+If the supplied signal number is not a valid index into
+@code{sys_siglist}, returns @code{NULL}.
+
+The returned string is only guaranteed to be valid only until the next
+call to @code{strsignal}.
+
+@end deftypefn
+
+@c strsignal.c:452
+@deftypefn Extension {const char*} strsigno (int @var{signo})
+
+Given an signal number, returns a pointer to a string containing the
+symbolic name of that signal number, as found in @code{<signal.h>}.
+
+If the supplied signal number is within the valid range of indices for
+symbolic names, but no name is available for the particular signal
+number, then returns the string @samp{Signal @var{num}}, where
+@var{num} is the signal number.
+
+If the supplied signal number is not within the range of valid
+indices, then returns @code{NULL}.
+
+The contents of the location pointed to are only guaranteed to be
+valid until the next call to @code{strsigno}.
+
+@end deftypefn
+
+@c strstr.c:6
+@deftypefn Supplemental char* strstr (const char *@var{string}, const char *@var{sub})
+
+This function searches for the substring @var{sub} in the string
+@var{string}, not including the terminating null characters. A pointer
+to the first occurrence of @var{sub} is returned, or @code{NULL} if the
+substring is absent. If @var{sub} points to a string with zero
+length, the function returns @var{string}.
+
+@end deftypefn
+
+@c strtod.c:27
+@deftypefn Supplemental double strtod (const char *@var{string}, char **@var{endptr})
+
+This ISO C function converts the initial portion of @var{string} to a
+@code{double}. If @var{endptr} is not @code{NULL}, a pointer to the
+character after the last character used in the conversion is stored in
+the location referenced by @var{endptr}. If no conversion is
+performed, zero is returned and the value of @var{string} is stored in
+the location referenced by @var{endptr}.
+
+@end deftypefn
+
+@c strerror.c:730
+@deftypefn Extension int strtoerrno (const char *@var{name})
+
+Given the symbolic name of a error number (e.g., @code{EACCES}), map it
+to an errno value. If no translation is found, returns 0.
+
+@end deftypefn
+
+@c strtol.c:33
+@deftypefn Supplemental {long int} strtol (const char *@var{string}, char **@var{endptr}, int @var{base})
+@deftypefnx Supplemental {unsigned long int} strtoul (const char *@var{string}, char **@var{endptr}, int @var{base})
+
+The @code{strtol} function converts the string in @var{string} to a
+long integer value according to the given @var{base}, which must be
+between 2 and 36 inclusive, or be the special value 0. If @var{base}
+is 0, @code{strtol} will look for the prefixes @code{0} and @code{0x}
+to indicate bases 8 and 16, respectively, else default to base 10.
+When the base is 16 (either explicitly or implicitly), a prefix of
+@code{0x} is allowed. The handling of @var{endptr} is as that of
+@code{strtod} above. The @code{strtoul} function is the same, except
+that the converted value is unsigned.
+
+@end deftypefn
+
+@c strsignal.c:507
+@deftypefn Extension int strtosigno (const char *@var{name})
+
+Given the symbolic name of a signal, map it to a signal number. If no
+translation is found, returns 0.
+
+@end deftypefn
+
+@c tmpnam.c:3
+@deftypefn Supplemental char* tmpnam (char *@var{s})
+
+This function attempts to create a name for a temporary file, which
+will be a valid file name yet not exist when @code{tmpnam} checks for
+it. @var{s} must point to a buffer of at least @code{L_tmpnam} bytes,
+or be @code{NULL}. Use of this function creates a security risk, and it must
+not be used in new projects. Use @code{mkstemp} instead.
+
+@end deftypefn
+
+@c vasprintf.c:48
+@deftypefn Extension int vasprintf (char **@var{resptr}, const char *@var{format}, va_list @var{args})
+
+Like @code{vsprintf}, but instead of passing a pointer to a buffer,
+you pass a pointer to a pointer. This function will compute the size
+of the buffer needed, allocate memory with @code{malloc}, and store a
+pointer to the allocated memory in @code{*@var{resptr}}. The value
+returned is the same as @code{vsprintf} would return. If memory could
+not be allocated, zero is returned and @code{NULL} is stored in
+@code{*@var{resptr}}.
+
+@end deftypefn
+
+@c vfork.c:6
+@deftypefn Supplemental int vfork (void)
+
+Emulates @code{vfork} by calling @code{fork} and returning its value.
+
+@end deftypefn
+
+@c vprintf.c:3
+@deftypefn Supplemental int vprintf (const char *@var{format}, va_list @var{ap})
+@deftypefnx Supplemental int vfprintf (FILE *@var{stream}, const char *@var{format}, va_list @var{ap})
+@deftypefnx Supplemental int vsprintf (char *@var{str}, const char *@var{format}, va_list @var{ap})
+
+These functions are the same as @code{printf}, @code{fprintf}, and
+@code{sprintf}, respectively, except that they are called with a
+@code{va_list} instead of a variable number of arguments. Note that
+they do not call @code{va_end}; this is the application's
+responsibility. In @libib{} they are implemented in terms of the
+nonstandard but common function @code{_doprnt}.
+
+@end deftypefn
+
+@c waitpid.c:3
+@deftypefn Supplemental int waitpid (int @var{pid}, int *@var{status}, int)
+
+This is a wrapper around the @code{wait} function. Any ``special''
+values of @var{pid} depend on your implementation of @code{wait}, as
+does the return value. The third argument is unused in @libib{}.
+
+@end deftypefn
+
+@c xatexit.c:11
+@deftypefun int xatexit (void (*@var{fn}) (void))
+
+Behaves as the standard @code{atexit} function, but with no limit on
+the number of registered functions. Returns 0 on success, or @minus{}1 on
+failure. If you use @code{xatexit} to register functions, you must use
+@code{xexit} to terminate your program.
+
+@end deftypefun
+
+@c xmalloc.c:38
+@deftypefn Replacement void* xcalloc (size_t @var{nelem}, size_t @var{elsize})
+
+Allocate memory without fail, and set it to zero. This routine functions
+like @code{calloc}, but will behave the same as @code{xmalloc} if memory
+cannot be found.
+
+@end deftypefn
+
+@c xexit.c:22
+@deftypefn Replacement void xexit (int @var{code})
+
+Terminates the program. If any functions have been registered with
+the @code{xatexit} replacement function, they will be called first.
+Termination is handled via the system's normal @code{exit} call.
+
+@end deftypefn
+
+@c xmalloc.c:22
+@deftypefn Replacement void* xmalloc (size_t)
+
+Allocate memory without fail. If @code{malloc} fails, this will print
+a message to @code{stderr} (using the name set by
+@code{xmalloc_set_program_name},
+if any) and then call @code{xexit}. Note that it is therefore safe for
+a program to contain @code{#define malloc xmalloc} in its source.
+
+@end deftypefn
+
+@c xmalloc.c:53
+@deftypefn Replacement void xmalloc_failed (size_t)
+
+This function is not meant to be called by client code, and is listed
+here for completeness only. If any of the allocation routines fail, this
+function will be called to print an error message and terminate execution.
+
+@end deftypefn
+
+@c xmalloc.c:46
+@deftypefn Replacement void xmalloc_set_program_name (const char *@var{name})
+
+You can use this to set the name of the program used by
+@code{xmalloc_failed} when printing a failure message.
+
+@end deftypefn
+
+@c xmemdup.c:7
+@deftypefn Replacement void* xmemdup (void *@var{input}, size_t @var{copy_size}, size_t @var{alloc_size})
+
+Duplicates a region of memory without fail. First, @var{alloc_size} bytes
+are allocated, then @var{copy_size} bytes from @var{input} are copied into
+it, and the new memory is returned. If fewer bytes are copied than were
+allocated, the remaining memory is zeroed.
+
+@end deftypefn
+
+@c xmalloc.c:32
+@deftypefn Replacement void* xrealloc (void *@var{ptr}, size_t @var{size})
+Reallocate memory without fail. This routine functions like @code{realloc},
+but will behave the same as @code{xmalloc} if memory cannot be found.
+
+@end deftypefn
+
+@c xstrdup.c:7
+@deftypefn Replacement char* xstrdup (const char *@var{s})
+
+Duplicates a character string without fail, using @code{xmalloc} to
+obtain memory.
+
+@end deftypefn
+
+@c xstrerror.c:7
+@deftypefn Replacement char* xstrerror (int @var{errnum})
+
+Behaves exactly like the standard @code{strerror} function, but
+will never return a @code{NULL} pointer.
+
+@end deftypefn
+
+
diff --git a/contrib/binutils/libiberty/gather-docs b/contrib/binutils/libiberty/gather-docs
new file mode 100644
index 0000000..b272c02
--- /dev/null
+++ b/contrib/binutils/libiberty/gather-docs
@@ -0,0 +1,128 @@
+#!/usr/bin/perl
+# -*- perl -*-
+
+# Copyright (C) 2001
+# Free Software Foundation
+#
+# 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.
+#
+# Originally written by DJ Delorie <dj@redhat.com>
+
+
+
+# This program looks for texinfo snippets in source files and other
+# files, and builds per-category files with entries sorted in
+# alphabetical order.
+
+# The syntax it looks for is lines starting with '@def' in *.c and
+# other files (see TEXIFILES in Makefile.in). Entries are terminated
+# at the next @def* (which begins a new entry) or, for C files, a line
+# that begins with '*/' without leading spaces (this assumes that the
+# texinfo snippet is within a C-style /* */ comment).
+
+#
+
+
+
+if ($ARGV[0] eq "-v") {
+ $verbose = 1;
+ shift;
+}
+
+$srcdir = shift;
+$outfile = shift;
+
+if ($outfile !~ /\S/ || ! -f "$srcdir/Makefile.in" ) {
+ print STDERR "Usage: gather-docs [-v] srcdir outfile.txi [files with snippets in them ...]\n";
+ exit 1;
+}
+
+$errors = 0;
+
+for $in (@ARGV) {
+
+ if (!open(IN, "$srcdir/$in")) {
+ print STDERR "Cannot open $srcdir/$in for reading: $!\n";
+ $errors ++;
+
+ } else {
+ $first = 1;
+ $pertinent = 0;
+ $man_mode = 0;
+ $line = 0;
+
+ while (<IN>) {
+ $line ++;
+ $pertinent = 1 if /^\@def[a-z]*[a-wyz] /;
+ $pertinent = 0 if /^\*\//;
+ next unless $pertinent;
+
+ if (/^\@def[a-z]*[a-wyz] /) {
+
+ ($name) = m/[^\(]* ([^\( \t\r\n]+) *\(/;
+ $name =~ s/[ ]*$//;
+ $key = $name;
+ $key =~ tr/A-Z/a-z/;
+ $key =~ s/[^a-z0-9]+/ /g;
+ $name{$key} = $node;
+ $lines{$key} = '';
+ $src_file{$key} = $in;
+ $src_line{$key} = $line;
+ print "\nReading $in :" if $verbose && $first;
+ $first = 0;
+ print " $name" if $verbose;
+ $node_lines{$key} .= $_;
+
+ } else {
+ $node_lines{$key} .= $_;
+ }
+
+ $pertinent = 0 if /^\@end def/;
+ }
+ close (IN);
+ }
+}
+
+print "\n" if $verbose;
+exit $errors if $errors;
+
+if (!open (OUT, "> $outfile")) {
+ print STDERR "Cannot open $outfile for writing: $!\n";
+ $errors ++;
+ next;
+}
+print "Writing $outfile\n" if $verbose;
+
+print OUT "\@c Automatically generated from *.c and others (the comments before\n";
+print OUT "\@c each entry tell you which file and where in that file). DO NOT EDIT!\n";
+print OUT "\@c Edit the *.c files, configure with --enable-maintainer-mode,\n";
+print OUT "\@c and let gather-docs build you a new copy.\n\n";
+
+for $key (sort keys %name) {
+ print OUT "\@c $src_file{$key}:$src_line{$key}\n";
+ print OUT $node_lines{$key};
+ print OUT "\n";
+}
+
+if (! print OUT "\n") {
+ print STDERR "Disk full writing $srcdir/$cat.texi\n";
+ $errors ++;
+}
+
+close (OUT);
+
+exit $errors;
diff --git a/contrib/binutils/libiberty/getcwd.c b/contrib/binutils/libiberty/getcwd.c
index 3445563..465b4e0 100644
--- a/contrib/binutils/libiberty/getcwd.c
+++ b/contrib/binutils/libiberty/getcwd.c
@@ -2,24 +2,18 @@
This function is in the public domain. */
/*
-NAME
- getcwd -- get absolute pathname for current working directory
-SYNOPSIS
- char *getcwd (char pathname[len], len)
+@deftypefn Supplemental char* getcwd (char *@var{pathname}, int @var{len})
-DESCRIPTION
- Copy the absolute pathname for the current working directory into
- the supplied buffer and return a pointer to the buffer. If the
- current directory's path doesn't fit in LEN characters, the result
- is NULL and errno is set.
+Copy the absolute pathname for the current working directory into
+@var{pathname}, which is assumed to point to a buffer of at least
+@var{len} bytes, and return a pointer to the buffer. If the current
+directory's path doesn't fit in @var{len} characters, the result is
+@code{NULL} and @code{errno} is set. If @var{pathname} is a null pointer,
+@code{getcwd} will obtain @var{len} bytes of space using
+@code{malloc}.
- 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().
+@end deftypefn
*/
diff --git a/contrib/binutils/libiberty/getopt.c b/contrib/binutils/libiberty/getopt.c
index fd302b6..2402a39 100644
--- a/contrib/binutils/libiberty/getopt.c
+++ b/contrib/binutils/libiberty/getopt.c
@@ -82,7 +82,7 @@
#ifndef _
/* This is for other GNU distributions with internationalized messages.
When compiling libc, the _ macro is predefined. */
-# ifdef HAVE_LIBINTL_H
+# if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC
# include <libintl.h>
# define _(msgid) gettext (msgid)
# else
diff --git a/contrib/binutils/libiberty/getpagesize.c b/contrib/binutils/libiberty/getpagesize.c
index 564d6c0..eed9680 100644
--- a/contrib/binutils/libiberty/getpagesize.c
+++ b/contrib/binutils/libiberty/getpagesize.c
@@ -2,20 +2,14 @@
/*
-NAME
+@deftypefn Supplemental int getpagesize (void)
- getpagesize -- return the number of bytes in page of memory
+Returns the number of bytes in a page of memory. This is the
+granularity of many of the system memory management routines. No
+guarantee is made as to whether or not it is the same as the basic
+memory management hardware page size.
-SYNOPSIS
-
- int getpagesize (void)
-
-DESCRIPTION
-
- Returns the number of bytes in a page of memory. This is the
- granularity of many of the system memory management routines.
- No guarantee is made as to whether or not it is the same as the
- basic memory management hardware page size.
+@end deftypefn
BUGS
diff --git a/contrib/binutils/libiberty/getpwd.c b/contrib/binutils/libiberty/getpwd.c
index de6e039..f508b1e 100644
--- a/contrib/binutils/libiberty/getpwd.c
+++ b/contrib/binutils/libiberty/getpwd.c
@@ -1,5 +1,17 @@
/* getpwd.c - get the working directory */
+/*
+
+@deftypefn Supplemental char* getpwd (void)
+
+Returns the current working directory. This implementation caches the
+result on the assumption that the process will not call @code{chdir}
+between calls to @code{getpwd}.
+
+@end deftypefn
+
+*/
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/contrib/binutils/libiberty/getruntime.c b/contrib/binutils/libiberty/getruntime.c
index 4abfa83..9301deb 100644
--- a/contrib/binutils/libiberty/getruntime.c
+++ b/contrib/binutils/libiberty/getruntime.c
@@ -73,6 +73,18 @@ Boston, MA 02111-1307, USA. */
#endif
#endif
+/*
+
+@deftypefn Replacement long get_run_time (void)
+
+Returns the time used so far, in microseconds. If possible, this is
+the time used by this process, else it is the elapsed time since the
+process started.
+
+@end deftypefn
+
+*/
+
long
get_run_time ()
{
diff --git a/contrib/binutils/libiberty/hashtab.c b/contrib/binutils/libiberty/hashtab.c
index 122ed43..36ad6e4 100644
--- a/contrib/binutils/libiberty/hashtab.c
+++ b/contrib/binutils/libiberty/hashtab.c
@@ -1,5 +1,5 @@
/* An expandable hash tables datatype.
- Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
Contributed by Vladimir Makarov (vmakarov@cygnus.com).
This file is part of the libiberty library.
@@ -80,46 +80,47 @@ higher_prime_number (n)
{
/* These are primes that are near, but slightly smaller than, a
power of two. */
- static unsigned long primes[] = {
- 2,
- 7,
- 13,
- 31,
- 61,
- 127,
- 251,
- 509,
- 1021,
- 2039,
- 4093,
- 8191,
- 16381,
- 32749,
- 65521,
- 131071,
- 262139,
- 524287,
- 1048573,
- 2097143,
- 4194301,
- 8388593,
- 16777213,
- 33554393,
- 67108859,
- 134217689,
- 268435399,
- 536870909,
- 1073741789,
- 2147483647,
- 4294967291
+ static const unsigned long primes[] = {
+ (unsigned long) 2,
+ (unsigned long) 7,
+ (unsigned long) 13,
+ (unsigned long) 31,
+ (unsigned long) 61,
+ (unsigned long) 127,
+ (unsigned long) 251,
+ (unsigned long) 509,
+ (unsigned long) 1021,
+ (unsigned long) 2039,
+ (unsigned long) 4093,
+ (unsigned long) 8191,
+ (unsigned long) 16381,
+ (unsigned long) 32749,
+ (unsigned long) 65521,
+ (unsigned long) 131071,
+ (unsigned long) 262139,
+ (unsigned long) 524287,
+ (unsigned long) 1048573,
+ (unsigned long) 2097143,
+ (unsigned long) 4194301,
+ (unsigned long) 8388593,
+ (unsigned long) 16777213,
+ (unsigned long) 33554393,
+ (unsigned long) 67108859,
+ (unsigned long) 134217689,
+ (unsigned long) 268435399,
+ (unsigned long) 536870909,
+ (unsigned long) 1073741789,
+ (unsigned long) 2147483647,
+ /* 4294967291L */
+ ((unsigned long) 2147483647) + ((unsigned long) 2147483644),
};
- unsigned long* low = &primes[0];
- unsigned long* high = &primes[sizeof(primes) / sizeof(primes[0])];
+ const unsigned long *low = &primes[0];
+ const unsigned long *high = &primes[sizeof(primes) / sizeof(primes[0])];
while (low != high)
{
- unsigned long* mid = low + (high - low) / 2;
+ const unsigned long *mid = low + (high - low) / 2;
if (n > *mid)
low = mid + 1;
else
@@ -560,3 +561,42 @@ htab_collisions (htab)
return (double) htab->collisions / (double) htab->searches;
}
+
+/* Hash P as a null-terminated string.
+
+ Copied from gcc/hashtable.c. Zack had the following to say with respect
+ to applicability, though note that unlike hashtable.c, this hash table
+ implementation re-hashes rather than chain buckets.
+
+ http://gcc.gnu.org/ml/gcc-patches/2001-08/msg01021.html
+ From: Zack Weinberg <zackw@panix.com>
+ Date: Fri, 17 Aug 2001 02:15:56 -0400
+
+ I got it by extracting all the identifiers from all the source code
+ I had lying around in mid-1999, and testing many recurrences of
+ the form "H_n = H_{n-1} * K + c_n * L + M" where K, L, M were either
+ prime numbers or the appropriate identity. This was the best one.
+ I don't remember exactly what constituted "best", except I was
+ looking at bucket-length distributions mostly.
+
+ So it should be very good at hashing identifiers, but might not be
+ as good at arbitrary strings.
+
+ I'll add that it thoroughly trounces the hash functions recommended
+ for this use at http://burtleburtle.net/bob/hash/index.html, both
+ on speed and bucket distribution. I haven't tried it against the
+ function they just started using for Perl's hashes. */
+
+hashval_t
+htab_hash_string (p)
+ const PTR p;
+{
+ const unsigned char *str = (const unsigned char *) p;
+ hashval_t r = 0;
+ unsigned char c;
+
+ while ((c = *str++) != 0)
+ r = r * 67 + c - 113;
+
+ return r;
+}
diff --git a/contrib/binutils/libiberty/hex.c b/contrib/binutils/libiberty/hex.c
index 3a2eef0..3ba04ba 100644
--- a/contrib/binutils/libiberty/hex.c
+++ b/contrib/binutils/libiberty/hex.c
@@ -1,5 +1,5 @@
/* Hex character manipulation support.
- Copyright (C) 1995 Free Software Foundation, Inc.
+ Copyright (C) 1995, 2001 Free Software Foundation, Inc.
This file is part of the libiberty library.
Libiberty is free software; you can redistribute it and/or
@@ -17,17 +17,95 @@ 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> /* for EOF */
#include "libiberty.h"
-char _hex_value[_hex_array_size];
-
-void hex_init ()
+/* Provided for ABI compatibility. */
+void
+hex_init ()
{
- int i;
- for (i = 0; i < _hex_array_size; i++)
- _hex_value[i] = _hex_bad;
- for (i = 0; i < 10; i++)
- _hex_value['0' + i] = i;
- for (i = 0; i < 6; i++)
- _hex_value['a' + i] = _hex_value['A' + i] = 10 + i;
}
+
+/* Are we ASCII? */
+#if '\n' == 0x0A && ' ' == 0x20 && '0' == 0x30 \
+ && 'A' == 0x41 && 'a' == 0x61 && '!' == 0x21 \
+ && EOF == -1
+
+const char _hex_value[_hex_array_size] =
+{
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad, /* NUL SOH STX ETX */
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad, /* EOT ENQ ACK BEL */
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad, /* BS HT LF VT */
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad, /* FF CR SO SI */
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad, /* DLE DC1 DC2 DC3 */
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad, /* DC4 NAK SYN ETB */
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad, /* CAN EM SUB ESC */
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad, /* FS GS RS US */
+
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad, /* SP ! " # */
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad, /* $ % & ' */
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad, /* ( ) * + */
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad, /* , - . / */
+ 0, 1, 2, 3, /* 0 1 2 3 */
+ 4, 5, 6, 7, /* 4 5 6 7 */
+ 8, 9, _hex_bad, _hex_bad, /* 8 9 : ; */
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad, /* < = > ? */
+
+ _hex_bad, 10, 11, 12, /* @ A B C */
+ 13, 14, 15, _hex_bad, /* D E F G */
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad, /* H I J K */
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad, /* L M N O */
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad, /* P Q R S */
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad, /* T U V W */
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad, /* X Y Z [ */
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad, /* \ ] ^ _ */
+
+ _hex_bad, 10, 11, 12, /* ` a b c */
+ 13, 14, 15, _hex_bad, /* d e f g */
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad, /* h i j k */
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad, /* l m n o */
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad, /* p q r s */
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad, /* t u v w */
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad, /* x y z { */
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad, /* | } ~ DEL */
+
+ /* The high half of unsigned char, all values are _hex_bad. */
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad,
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad,
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad,
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad,
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad,
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad,
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad,
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad,
+
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad,
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad,
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad,
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad,
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad,
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad,
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad,
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad,
+
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad,
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad,
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad,
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad,
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad,
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad,
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad,
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad,
+
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad,
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad,
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad,
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad,
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad,
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad,
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad,
+ _hex_bad, _hex_bad, _hex_bad, _hex_bad,
+};
+#else
+ #error "Unsupported host character set"
+#endif /* not ASCII */
diff --git a/contrib/binutils/libiberty/index.c b/contrib/binutils/libiberty/index.c
index e5a00f5..a2e2727 100644
--- a/contrib/binutils/libiberty/index.c
+++ b/contrib/binutils/libiberty/index.c
@@ -1,5 +1,17 @@
/* Stub implementation of (obsolete) index(). */
+/*
+
+@deftypefn Supplemental char* index (char *@var{s}, int @var{c})
+
+Returns a pointer to the first occurrence of the character @var{c} in
+the string @var{s}, or @code{NULL} if not found. The use of @code{index} is
+deprecated in new programs in favor of @code{strchr}.
+
+@end deftypefn
+
+*/
+
extern char * strchr();
char *
diff --git a/contrib/binutils/libiberty/insque.c b/contrib/binutils/libiberty/insque.c
index 775019f..c0c1180 100644
--- a/contrib/binutils/libiberty/insque.c
+++ b/contrib/binutils/libiberty/insque.c
@@ -2,24 +2,27 @@
This file is in the public domain. */
/*
-NAME
- insque, remque -- insert, remove an element from a queue
-SYNOPSIS
- struct qelem {
- struct qelem *q_forw;
- struct qelem *q_back;
- char q_data[];
- };
+@deftypefn Supplemental void insque (struct qelem *@var{elem}, struct qelem *@var{pred})
+@deftypefnx Supplemental void remque (struct qelem *@var{elem})
- void insque (struct qelem *elem, struct qelem *pred)
+Routines to manipulate queues built from doubly linked lists. The
+@code{insque} routine inserts @var{elem} in the queue immediately
+after @var{pred}. The @code{remque} routine removes @var{elem} from
+its containing queue. These routines expect to be passed pointers to
+structures which have as their first members a forward pointer and a
+back pointer, like this prototype (although no prototype is provided):
- void remque (struct qelem *elem)
+@example
+struct qelem @{
+ struct qelem *q_forw;
+ struct qelem *q_back;
+ char q_data[];
+@};
+@end example
+
+@end deftypefn
-DESCRIPTION
- Routines to manipulate queues built from doubly linked lists.
- The insque routine inserts ELEM in the queue immediately after
- PRED. The remque routine removes ELEM from its containing queue.
*/
diff --git a/contrib/binutils/libiberty/lbasename.c b/contrib/binutils/libiberty/lbasename.c
index 7f87049..cea0253 100644
--- a/contrib/binutils/libiberty/lbasename.c
+++ b/contrib/binutils/libiberty/lbasename.c
@@ -19,23 +19,22 @@ not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
/*
-NAME
- lbasename -- return pointer to last component of a pathname
-
-SYNOPSIS
- char *lbasename (const char *name)
-
-DESCRIPTION
- Given a pointer to a string containing a typical pathname
- (/usr/src/cmd/ls/ls.c for example), returns a pointer to the
- last component of the pathname ("ls.c" in this case). The
- returned pointer is guaranteed to lie within the original
- string. This latter fact is not true of many vendor C
- libraries, which return special strings or modify the passed
- strings for particular input.
-
- In particular, the empty string returns the same empty string,
- and a path ending in '/' returns the empty string after it.
+
+@deftypefn Replacement {const char*} lbasename (const char *@var{name})
+
+Given a pointer to a string containing a typical pathname
+(@samp{/usr/src/cmd/ls/ls.c} for example), returns a pointer to the
+last component of the pathname (@samp{ls.c} in this case). The
+returned pointer is guaranteed to lie within the original
+string. This latter fact is not true of many vendor C
+libraries, which return special strings or modify the passed
+strings for particular input.
+
+In particular, the empty string returns the same empty string,
+and a path ending in @code{/} returns the empty string after it.
+
+@end deftypefn
+
*/
#include "ansidecl.h"
@@ -69,7 +68,7 @@ DESCRIPTION
# endif
#endif
-char *
+const char *
lbasename (name)
const char *name;
{
@@ -85,5 +84,5 @@ lbasename (name)
if (IS_DIR_SEPARATOR (*name))
base = name + 1;
- return (char *) base;
+ return base;
}
diff --git a/contrib/binutils/libiberty/libiberty.texi b/contrib/binutils/libiberty/libiberty.texi
new file mode 100644
index 0000000..4b60d6a
--- /dev/null
+++ b/contrib/binutils/libiberty/libiberty.texi
@@ -0,0 +1,324 @@
+\input texinfo @c -*-texinfo-*-
+@c %**start of header
+@setfilename libiberty.info
+@settitle @sc{gnu} libiberty
+@c %**end of header
+
+@syncodeindex fn cp
+@syncodeindex vr cp
+@syncodeindex pg cp
+
+@finalout
+@c %**end of header
+
+@dircategory GNU libraries
+@direntry
+* Libiberty: (libiberty). Library of utility functions which
+ are missing or broken on some systems.
+@end direntry
+
+@macro libib
+@code{libiberty}
+@end macro
+
+@c The edition date is written in three locations. Search for 'thedate'.
+@ifinfo
+This manual describes the GNU @libib library of utility subroutines.
+This edition accompanies GCC 3, September 2001.
+
+Copyright @copyright{} 2001 Free Software Foundation, Inc.
+
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1
+ or any later version published by the Free Software Foundation;
+ with no Invariant Sections, with no Front-Cover Texts, and with no
+ Back-Cover Texts. A copy of the license is included in the
+ section entitled ``GNU Free Documentation License''.
+
+@ignore
+Permission is granted to process this file through TeX and print the
+results, provided the printed document carries a 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 ifinfo
+
+
+@c The edition date is written in three locations. Search for 'thedate'.
+@titlepage
+@title @sc{gnu} libiberty
+@subtitle September 2001
+@subtitle for GCC 3
+@author Phil Edwards et al.
+@page
+
+
+@vskip 0pt plus 1filll
+Copyright @copyright{} 2001 Free Software Foundation, Inc.
+
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1
+ or any later version published by the Free Software Foundation;
+ with no Invariant Sections, with no Front-Cover Texts, and with no
+ Back-Cover Texts. A copy of the license is included in the
+ section entitled ``GNU Free Documentation License''.
+
+@end titlepage
+@contents
+@page
+
+@ifnottex
+@node Top,Using,,
+@top Introduction
+
+The @libib{} library is a collection of subroutines used by various
+GNU programs. It is available under the Library General Public
+License; for more information, see @ref{Library Copying}.
+
+@c The edition date is written in three locations. Search for 'thedate'.
+This edition accompanies GCC 3, September 2001.
+
+@end ifnottex
+
+@menu
+* Using:: How to use libiberty in your code.
+
+* Overview:: Overview of available function groups.
+
+* Functions:: Available functions, macros, and global variables.
+
+* Obstacks:: Object Stacks.
+
+* Licenses:: The various licenses under which libiberty sources are
+ distributed.
+
+* Index:: Index of functions and categories.
+@end menu
+
+@node Using
+@chapter Using
+@cindex using libiberty
+@cindex libiberty usage
+@cindex how to use
+
+@c THIS SECTION IS CRAP AND NEEDS REWRITING BADLY.
+
+To date, @libib{} is generally not installed on its own. It has evolved
+over years but does not have its own version number nor release schedule.
+
+Possibly the easiest way to use @libib{} in your projects is to drop the
+@libib{} code into your project's sources, and to build the library along
+with your own sources; the library would then be linked in at the end. This
+prevents any possible version mismatches with other copies of libiberty
+elsewhere on the system.
+
+Passing @option{--enable-install-libiberty} to the @command{configure}
+script when building @libib{} causes the header files and archive library
+to be installed when @kbd{make install} is run. This option also takes
+an (optional) argument to specify the installation location, in the same
+manner as @option{--prefix}.
+
+For your own projects, an approach which offers stability and flexibility
+is to include @libib{} with your code, but allow the end user to optionally
+choose to use a previously-installed version instead. In this way the
+user may choose (for example) to install @libib{} as part of GCC, and use
+that version for all software built with that compiler. (This approach
+has proven useful with software using the GNU @code{readline} library.)
+
+Making use of @libib{} code usually requires that you include one or more
+header files from the @libib{} distribution. (They will be named as
+necessary in the function descriptions.) At link time, you will need to
+add @option{-liberty} to your link command invocation.
+
+
+@node Overview
+@chapter Overview
+
+Functions contained in @libib{} can be divided into three general categories.
+
+
+@menu
+* Supplemental Functions:: Providing functions which don't exist
+ on older operating systems.
+
+* Replacement Functions:: These functions are sometimes buggy or
+ unpredictable on some operating systems.
+
+* Extensions:: Functions which provide useful extensions
+ or safety wrappers around existing code.
+@end menu
+
+@node Supplemental Functions
+@section Supplemental Functions
+@cindex supplemental functions
+@cindex functions, supplemental
+@cindex functions, missing
+
+Certain operating systems do not provide functions which have since
+become standardized, or at least common. For example, the Single
+Unix Specification Version 2 requires that the @code{basename}
+function be provided, but an OS which predates that specification
+might not have this function. This should not prevent well-written
+code from running on such a system.
+
+Similarly, some functions exist only among a particular ``flavor''
+or ``family'' of operating systems. As an example, the @code{bzero}
+function is often not present on systems outside the BSD-derived
+family of systems.
+
+Many such functions are provided in @libib{}. They are quickly
+listed here with little description, as systems which lack them
+become less and less common. Each function @var{foo} is implemented
+in @file{@var{foo}.c} but not declared in any @libib{} header file; more
+comments and caveats for each function's implementation are often
+available in the source file. Generally, the function can simply
+be declared as @code{extern}.
+
+
+
+@node Replacement Functions
+@section Replacement Functions
+@cindex replacement functions
+@cindex functions, replacement
+
+Some functions have extremely limited implementations on different
+platforms. Other functions are tedious to use correctly; for example,
+proper use of @code{malloc} calls for the return value to be checked and
+appropriate action taken if memory has been exhausted. A group of
+``replacement functions'' is available in @libib{} to address these issues
+for some of the most commonly used subroutines.
+
+All of these functions are declared in the @file{libiberty.h} header
+file. Many of the implementations will use preprocessor macros set by
+GNU Autoconf, if you decide to make use of that program. Some of these
+functions may call one another.
+
+
+@menu
+* Memory Allocation:: Testing and handling failed memory
+ requests automatically.
+* Exit Handlers:: Calling routines on program exit.
+* Error Reporting:: Mapping errno and signal numbers to
+ more useful string formats.
+@end menu
+
+@node Memory Allocation
+@subsection Memory Allocation
+@cindex memory allocation
+
+The functions beginning with the letter @samp{x} are wrappers around
+standard functions; the functions provided by the system environment
+are called and their results checked before the results are passed back
+to client code. If the standard functions fail, these wrappers will
+terminate the program. Thus, these versions can be used with impunity.
+
+
+@node Exit Handlers
+@subsection Exit Handlers
+@cindex exit handlers
+
+The existence and implementation of the @code{atexit} routine varies
+amongst the flavors of Unix. @libib{} provides an unvarying dependable
+implementation via @code{xatexit} and @code{xexit}.
+
+
+@node Error Reporting
+@subsection Error Reporting
+@cindex error reporting
+
+These are a set of routines to facilitate programming with the system
+@code{errno} interface. The @libib{} source file @file{strerror.c}
+contains a good deal of documentation for these functions.
+
+@c signal stuff
+
+
+@node Extensions
+@section Extensions
+@cindex extensions
+@cindex functions, extension
+
+@libib{} includes additional functionality above and beyond standard
+functions, which has proven generically useful in GNU programs, such as
+obstacks and regex. These functions are often copied from other
+projects as they gain popularity, and are included here to provide a
+central location from which to use, maintain, and distribute them.
+
+@menu
+* Obstacks:: Stacks of arbitrary objects.
+@end menu
+
+@c This is generated from the glibc manual using a make-obstacks-texi.sh
+@c script of Phil's. Hope it's accurate.
+@include obstacks.texi
+
+@node Functions
+@chapter Function, Variable, and Macro Listing.
+@include functions.texi
+
+@node Licenses
+@appendix Licenses
+
+@menu
+
+* Library Copying:: The GNU Library General Public License
+* BSD:: Regents of the University of California
+
+@end menu
+
+@c This takes care of Library Copying. It is the copying-lib.texi from the
+@c GNU web site, with its @node line altered to make makeinfo shut up.
+@include copying-lib.texi
+
+@page
+@node BSD
+@appendixsec BSD
+
+Copyright @copyright{} 1990 Regents of the University of California.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+@enumerate
+
+@item
+Redistributions of source code must retain the above copyright
+notice, this list of conditions and the following disclaimer.
+
+@item
+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.
+
+@item
+[rescinded 22 July 1999]
+
+@item
+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.
+
+@end enumerate
+
+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.
+
+@node Index
+@unnumbered Index
+
+@printindex cp
+
+@bye
+
diff --git a/contrib/binutils/libiberty/maint-tool b/contrib/binutils/libiberty/maint-tool
new file mode 100644
index 0000000..ceeb48d
--- /dev/null
+++ b/contrib/binutils/libiberty/maint-tool
@@ -0,0 +1,278 @@
+#!/usr/bin/perl
+# -*- perl -*-
+
+# Copyright (C) 2001
+# Free Software Foundation
+#
+# 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.
+#
+# Originally written by DJ Delorie <dj@redhat.com>
+
+
+# This is a trivial script which checks the lists of C and O files in
+# the Makefile for consistency.
+
+$mode = shift;
+$srcdir = ".";
+
+if ($mode eq "-s") {
+ $srcdir = shift;
+ $mode = shift;
+}
+
+&missing() if $mode eq "missing";
+&undoc() if $mode eq "undoc";
+&deps() if $mode eq "deps";
+
+exit 0;
+
+format STDOUT =
+^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<~
+$out
+ ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<~~
+$out
+.
+
+######################################################################
+
+sub missing {
+
+ opendir(S, $srcdir);
+ while ($f = readdir S) {
+ $have{$f} = 1;
+ }
+ closedir(S);
+ opendir(S, ".");
+ while ($f = readdir S) {
+ $have{$f} = 1;
+ }
+ closedir(S);
+
+ for $a (@ARGV) {
+ $listed{$a} = 1;
+ $have{$a} = 0;
+ }
+
+ for $f (sort keys %have) {
+ next unless $have{$f};
+ if ($f =~ /\.c$/) {
+ print "S $f\n";
+ }
+ }
+ for $f (sort keys %listed) {
+ if ($f =~ /(.*)\.c$/) {
+ $base = $1;
+ if (! $listed{"$base.o"}) {
+ print "O $f\n";
+ }
+ }
+ }
+}
+
+######################################################################
+
+sub undoc {
+
+ opendir(S, $srcdir);
+ while ($file = readdir S) {
+ if ($file =~ /\.texi$/) {
+ open(T, "$srcdir/$file");
+ while (<T>) {
+ if (/^\@deftype[^\(]* ([^\s\(]+) *\(/) {
+ $documented{$1} = 1;
+ }
+ }
+ close(T);
+ }
+ if ($file =~ /\.c$/) {
+ open(C, "$srcdir/$file");
+ while (<C>) {
+ if (/\@undocumented (\S+)/) {
+ $documented{$1} = 1;
+ }
+ if (/^static /) {
+ if (! /[\(;]/) {
+ s/[\r\n]+$/ /;
+ $_ .= <C>;
+ }
+ while ($_ =~ /\([^\)]*$/) {
+ s/[\r\n]+$/ /;
+ $_ .= <C>;
+ }
+ }
+ s/ VPARAMS([ \(])/$1/;
+ s/PREFIX\(([^\)]*)\)/byte_$1/;
+ if (/^static [^\(]* ([^\s\(]+) *\(.*\)$/) {
+ $documented{$1} = 1;
+ }
+ }
+ }
+ }
+ closedir(D);
+
+ # $out = join(' ', sort keys %documented);
+ # write;
+ # print "\n";
+
+ system "etags $srcdir/*.c $srcdir/../include/*.h";
+ open(TAGS, "TAGS");
+ while (<TAGS>) {
+ s/[\r\n]+$//;
+ if (/^\014$/) {
+ $filename = <TAGS>;
+ $filename =~ s/[\r\n]+$//;
+ $filename =~ s/,\d+$//;
+ $filename =~ s@.*[/\\]@@;
+ next;
+ }
+ if ($filename =~ /\.c$/ ) {
+ next unless /^[_a-zA-Z]/;
+ } else {
+ next unless /^\# *define/;
+ s/\# *define *//;
+ }
+ next if $filename =~ /mpw\.c/;
+
+ s/ VPARAMS//;
+ s/ *\177.*//;
+ s/,$//;
+ s/DEFUN\(//;
+ s/\(//;
+
+ next if /^static /;
+ next if /\s/;
+ next if /^_/;
+ next if $documented{$_};
+ next if /_H_?$/;
+
+ if ($seen_in{$_} ne $filename) {
+ $saw{$_} ++;
+ }
+ $seen_in{$_} = $filename;
+ }
+
+ for $k (keys %saw) {
+ delete $saw{$k} if $saw{$k} > 1;
+ }
+
+ for $k (sort keys %saw) {
+ $fromfile{$seen_in{$k}} .= " " if $fromfile{$seen_in{$k}};
+ $fromfile{$seen_in{$k}} .= $k;
+ }
+
+ for $f (sort keys %fromfile) {
+ $out = "$f: $fromfile{$f}";
+ write;
+ }
+}
+
+######################################################################
+
+sub deps_for {
+ my($f) = @_;
+ my(%d);
+ open(F, $f);
+ %d = ();
+ while (<F>) {
+ if (/^#\s*include\s+["<](.*)[">]/) {
+ $d{$1} = 1;
+ }
+ }
+ close(F);
+ return keys %d;
+}
+
+sub canonicalize {
+ my ($p) = @_;
+ 0 while $p =~ s@/\./@/@g;
+ 0 while $p =~ s@^\./@@g;
+ 0 while $p =~ s@/[^/]+/\.\./@/@g;
+ return $p;
+}
+
+sub locals_first {
+ my ($a,$b) = @_;
+ return -1 if $a eq "config.h";
+ return 1 if $b eq "config.h";
+ return $a cmp $b;
+}
+
+sub deps {
+
+ $incdir = shift @ARGV;
+
+ opendir(INC, $incdir);
+ while ($f = readdir INC) {
+ next unless $f =~ /\.h$/;
+ $mine{$f} = "\$(INCDIR)/$f";
+ $deps{$f} = join(' ', &deps_for("$incdir/$f"));
+ }
+ $mine{'config.h'} = "config.h";
+
+ open(IN, "$srcdir/Makefile.in");
+ open(OUT, ">$srcdir/Makefile.tmp");
+ while (<IN>) {
+ last if /remainder of this file/;
+ print OUT;
+ }
+ print OUT "# The dependencies in the remainder of this file are automatically\n";
+ print OUT "# generated by \"make maint-deps\". Manual edits will be lost.\n\n";
+
+ opendir(S, $srcdir);
+ for $f (sort readdir S) {
+ if ($f =~ /\.c$/) {
+
+ %scanned = ();
+ @pending = &deps_for("$srcdir/$f");
+ while (@pending) {
+ @tmp = @pending;
+ @pending = ();
+ for $p (@tmp) {
+ next unless $mine{$p};
+ if (!$scanned{$p}) {
+ push(@pending, split(' ', $deps{$p}));
+ $scanned{$p} = 1;
+ }
+ }
+ }
+ @deps = sort { &locals_first($a,$b) } keys %scanned;
+ $obj = $f;
+ $obj =~ s/\.c$/.o/;
+ $obj = "$obj:";
+ if ($#deps >= 0) {
+ print OUT $obj;
+ $len = length($obj);
+ for $dt (@deps) {
+ $d = $mine{$dt};
+ if ($len + length($d) > 70) {
+ printf OUT " \\\n\t$d";
+ $len = 8 + length($d);
+ } else {
+ print OUT " $d";
+ $len += length($d) + 1;
+ }
+ }
+ print OUT "\n";
+ }
+ }
+ }
+ closedir(S);
+ close(IN);
+ close(OUT);
+
+ rename("$srcdir/Makefile.tmp", "$srcdir/Makefile.in");
+}
diff --git a/contrib/binutils/libiberty/make-temp-file.c b/contrib/binutils/libiberty/make-temp-file.c
new file mode 100644
index 0000000..8833504
--- /dev/null
+++ b/contrib/binutils/libiberty/make-temp-file.c
@@ -0,0 +1,179 @@
+/* Utility to pick a temporary filename prefix.
+ Copyright (C) 1996, 1997, 1998, 2001 Free Software Foundation, Inc.
+
+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. */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#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
+
+#ifndef R_OK
+#define R_OK 4
+#define W_OK 2
+#define X_OK 1
+#endif
+
+#include "libiberty.h"
+extern int mkstemps PARAMS ((char *, int));
+
+/* '/' works just fine on MS-DOS based systems. */
+#ifndef DIR_SEPARATOR
+#define DIR_SEPARATOR '/'
+#endif
+
+/* Name of temporary file.
+ mktemp requires 6 trailing X's. */
+#define TEMP_FILE "ccXXXXXX"
+#define TEMP_FILE_LEN (sizeof(TEMP_FILE) - 1)
+
+/* Subroutine of choose_tmpdir.
+ If BASE is non-NULL, return it.
+ Otherwise it checks if DIR is a usable directory.
+ If success, DIR is returned.
+ Otherwise NULL is returned. */
+
+static inline const char *try PARAMS ((const char *, const char *));
+
+static inline const char *
+try (dir, base)
+ const char *dir, *base;
+{
+ if (base != 0)
+ return base;
+ if (dir != 0
+ && access (dir, R_OK | W_OK | X_OK) == 0)
+ return dir;
+ return 0;
+}
+
+static const char tmp[] = { DIR_SEPARATOR, 't', 'm', 'p', 0 };
+static const char usrtmp[] =
+{ DIR_SEPARATOR, 'u', 's', 'r', DIR_SEPARATOR, 't', 'm', 'p', 0 };
+static const char vartmp[] =
+{ DIR_SEPARATOR, 'v', 'a', 'r', DIR_SEPARATOR, 't', 'm', 'p', 0 };
+
+static char *memoized_tmpdir;
+
+/*
+
+@deftypefn Replacement char* choose_tmpdir ()
+
+Returns a pointer to a directory path suitable for creating temporary
+files in.
+
+@end deftypefn
+
+*/
+
+char *
+choose_tmpdir ()
+{
+ const char *base = 0;
+ char *tmpdir;
+ unsigned int len;
+
+ if (memoized_tmpdir)
+ return memoized_tmpdir;
+
+ 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 /var/tmp, /usr/tmp, then /tmp. */
+ base = try (vartmp, base);
+ base = try (usrtmp, base);
+ base = try (tmp, base);
+
+ /* If all else fails, use the current directory! */
+ if (base == 0)
+ base = ".";
+
+ /* Append DIR_SEPARATOR to the directory we've chosen
+ and return it. */
+ len = strlen (base);
+ tmpdir = xmalloc (len + 2);
+ strcpy (tmpdir, base);
+ tmpdir[len] = DIR_SEPARATOR;
+ tmpdir[len+1] = '\0';
+
+ memoized_tmpdir = tmpdir;
+ return tmpdir;
+}
+
+/*
+
+@deftypefn Replacement char* make_temp_file (const char *@var{suffix})
+
+Return a temporary file name (as a string) or @code{NULL} if unable to
+create one. @var{suffix} is a suffix to append to the file name. The
+string is @code{malloc}ed, and the temporary file has been created.
+
+@end deftypefn
+
+*/
+
+char *
+make_temp_file (suffix)
+ const char *suffix;
+{
+ const char *base = choose_tmpdir ();
+ char *temp_filename;
+ int base_len, suffix_len;
+ int fd;
+
+ if (suffix == 0)
+ suffix = "";
+
+ base_len = strlen (base);
+ suffix_len = strlen (suffix);
+
+ temp_filename = xmalloc (base_len
+ + TEMP_FILE_LEN
+ + suffix_len + 1);
+ strcpy (temp_filename, base);
+ strcpy (temp_filename + base_len, TEMP_FILE);
+ strcpy (temp_filename + base_len + TEMP_FILE_LEN, 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/md5.c b/contrib/binutils/libiberty/md5.c
index 20c3cd1..9450586 100644
--- a/contrib/binutils/libiberty/md5.c
+++ b/contrib/binutils/libiberty/md5.c
@@ -65,10 +65,10 @@ void
md5_init_ctx (ctx)
struct md5_ctx *ctx;
{
- ctx->A = 0x67452301;
- ctx->B = 0xefcdab89;
- ctx->C = 0x98badcfe;
- ctx->D = 0x10325476;
+ ctx->A = (md5_uint32) 0x67452301;
+ ctx->B = (md5_uint32) 0xefcdab89;
+ ctx->C = (md5_uint32) 0x98badcfe;
+ ctx->D = (md5_uint32) 0x10325476;
ctx->total[0] = ctx->total[1] = 0;
ctx->buflen = 0;
@@ -322,22 +322,22 @@ md5_process_block (buffer, len, ctx)
*/
/* Round 1. */
- OP (A, B, C, D, 7, 0xd76aa478);
- OP (D, A, B, C, 12, 0xe8c7b756);
- OP (C, D, A, B, 17, 0x242070db);
- OP (B, C, D, A, 22, 0xc1bdceee);
- OP (A, B, C, D, 7, 0xf57c0faf);
- OP (D, A, B, C, 12, 0x4787c62a);
- OP (C, D, A, B, 17, 0xa8304613);
- OP (B, C, D, A, 22, 0xfd469501);
- OP (A, B, C, D, 7, 0x698098d8);
- OP (D, A, B, C, 12, 0x8b44f7af);
- OP (C, D, A, B, 17, 0xffff5bb1);
- OP (B, C, D, A, 22, 0x895cd7be);
- OP (A, B, C, D, 7, 0x6b901122);
- OP (D, A, B, C, 12, 0xfd987193);
- OP (C, D, A, B, 17, 0xa679438e);
- OP (B, C, D, A, 22, 0x49b40821);
+ OP (A, B, C, D, 7, (md5_uint32) 0xd76aa478);
+ OP (D, A, B, C, 12, (md5_uint32) 0xe8c7b756);
+ OP (C, D, A, B, 17, (md5_uint32) 0x242070db);
+ OP (B, C, D, A, 22, (md5_uint32) 0xc1bdceee);
+ OP (A, B, C, D, 7, (md5_uint32) 0xf57c0faf);
+ OP (D, A, B, C, 12, (md5_uint32) 0x4787c62a);
+ OP (C, D, A, B, 17, (md5_uint32) 0xa8304613);
+ OP (B, C, D, A, 22, (md5_uint32) 0xfd469501);
+ OP (A, B, C, D, 7, (md5_uint32) 0x698098d8);
+ OP (D, A, B, C, 12, (md5_uint32) 0x8b44f7af);
+ OP (C, D, A, B, 17, (md5_uint32) 0xffff5bb1);
+ OP (B, C, D, A, 22, (md5_uint32) 0x895cd7be);
+ OP (A, B, C, D, 7, (md5_uint32) 0x6b901122);
+ OP (D, A, B, C, 12, (md5_uint32) 0xfd987193);
+ OP (C, D, A, B, 17, (md5_uint32) 0xa679438e);
+ OP (B, C, D, A, 22, (md5_uint32) 0x49b40821);
/* For the second to fourth round we have the possibly swapped words
in CORRECT_WORDS. Redefine the macro to take an additional first
@@ -353,58 +353,58 @@ md5_process_block (buffer, len, ctx)
while (0)
/* Round 2. */
- OP (FG, A, B, C, D, 1, 5, 0xf61e2562);
- OP (FG, D, A, B, C, 6, 9, 0xc040b340);
- OP (FG, C, D, A, B, 11, 14, 0x265e5a51);
- OP (FG, B, C, D, A, 0, 20, 0xe9b6c7aa);
- OP (FG, A, B, C, D, 5, 5, 0xd62f105d);
- OP (FG, D, A, B, C, 10, 9, 0x02441453);
- OP (FG, C, D, A, B, 15, 14, 0xd8a1e681);
- OP (FG, B, C, D, A, 4, 20, 0xe7d3fbc8);
- OP (FG, A, B, C, D, 9, 5, 0x21e1cde6);
- OP (FG, D, A, B, C, 14, 9, 0xc33707d6);
- OP (FG, C, D, A, B, 3, 14, 0xf4d50d87);
- OP (FG, B, C, D, A, 8, 20, 0x455a14ed);
- OP (FG, A, B, C, D, 13, 5, 0xa9e3e905);
- OP (FG, D, A, B, C, 2, 9, 0xfcefa3f8);
- OP (FG, C, D, A, B, 7, 14, 0x676f02d9);
- OP (FG, B, C, D, A, 12, 20, 0x8d2a4c8a);
+ OP (FG, A, B, C, D, 1, 5, (md5_uint32) 0xf61e2562);
+ OP (FG, D, A, B, C, 6, 9, (md5_uint32) 0xc040b340);
+ OP (FG, C, D, A, B, 11, 14, (md5_uint32) 0x265e5a51);
+ OP (FG, B, C, D, A, 0, 20, (md5_uint32) 0xe9b6c7aa);
+ OP (FG, A, B, C, D, 5, 5, (md5_uint32) 0xd62f105d);
+ OP (FG, D, A, B, C, 10, 9, (md5_uint32) 0x02441453);
+ OP (FG, C, D, A, B, 15, 14, (md5_uint32) 0xd8a1e681);
+ OP (FG, B, C, D, A, 4, 20, (md5_uint32) 0xe7d3fbc8);
+ OP (FG, A, B, C, D, 9, 5, (md5_uint32) 0x21e1cde6);
+ OP (FG, D, A, B, C, 14, 9, (md5_uint32) 0xc33707d6);
+ OP (FG, C, D, A, B, 3, 14, (md5_uint32) 0xf4d50d87);
+ OP (FG, B, C, D, A, 8, 20, (md5_uint32) 0x455a14ed);
+ OP (FG, A, B, C, D, 13, 5, (md5_uint32) 0xa9e3e905);
+ OP (FG, D, A, B, C, 2, 9, (md5_uint32) 0xfcefa3f8);
+ OP (FG, C, D, A, B, 7, 14, (md5_uint32) 0x676f02d9);
+ OP (FG, B, C, D, A, 12, 20, (md5_uint32) 0x8d2a4c8a);
/* Round 3. */
- OP (FH, A, B, C, D, 5, 4, 0xfffa3942);
- OP (FH, D, A, B, C, 8, 11, 0x8771f681);
- OP (FH, C, D, A, B, 11, 16, 0x6d9d6122);
- OP (FH, B, C, D, A, 14, 23, 0xfde5380c);
- OP (FH, A, B, C, D, 1, 4, 0xa4beea44);
- OP (FH, D, A, B, C, 4, 11, 0x4bdecfa9);
- OP (FH, C, D, A, B, 7, 16, 0xf6bb4b60);
- OP (FH, B, C, D, A, 10, 23, 0xbebfbc70);
- OP (FH, A, B, C, D, 13, 4, 0x289b7ec6);
- OP (FH, D, A, B, C, 0, 11, 0xeaa127fa);
- OP (FH, C, D, A, B, 3, 16, 0xd4ef3085);
- OP (FH, B, C, D, A, 6, 23, 0x04881d05);
- OP (FH, A, B, C, D, 9, 4, 0xd9d4d039);
- OP (FH, D, A, B, C, 12, 11, 0xe6db99e5);
- OP (FH, C, D, A, B, 15, 16, 0x1fa27cf8);
- OP (FH, B, C, D, A, 2, 23, 0xc4ac5665);
+ OP (FH, A, B, C, D, 5, 4, (md5_uint32) 0xfffa3942);
+ OP (FH, D, A, B, C, 8, 11, (md5_uint32) 0x8771f681);
+ OP (FH, C, D, A, B, 11, 16, (md5_uint32) 0x6d9d6122);
+ OP (FH, B, C, D, A, 14, 23, (md5_uint32) 0xfde5380c);
+ OP (FH, A, B, C, D, 1, 4, (md5_uint32) 0xa4beea44);
+ OP (FH, D, A, B, C, 4, 11, (md5_uint32) 0x4bdecfa9);
+ OP (FH, C, D, A, B, 7, 16, (md5_uint32) 0xf6bb4b60);
+ OP (FH, B, C, D, A, 10, 23, (md5_uint32) 0xbebfbc70);
+ OP (FH, A, B, C, D, 13, 4, (md5_uint32) 0x289b7ec6);
+ OP (FH, D, A, B, C, 0, 11, (md5_uint32) 0xeaa127fa);
+ OP (FH, C, D, A, B, 3, 16, (md5_uint32) 0xd4ef3085);
+ OP (FH, B, C, D, A, 6, 23, (md5_uint32) 0x04881d05);
+ OP (FH, A, B, C, D, 9, 4, (md5_uint32) 0xd9d4d039);
+ OP (FH, D, A, B, C, 12, 11, (md5_uint32) 0xe6db99e5);
+ OP (FH, C, D, A, B, 15, 16, (md5_uint32) 0x1fa27cf8);
+ OP (FH, B, C, D, A, 2, 23, (md5_uint32) 0xc4ac5665);
/* Round 4. */
- OP (FI, A, B, C, D, 0, 6, 0xf4292244);
- OP (FI, D, A, B, C, 7, 10, 0x432aff97);
- OP (FI, C, D, A, B, 14, 15, 0xab9423a7);
- OP (FI, B, C, D, A, 5, 21, 0xfc93a039);
- OP (FI, A, B, C, D, 12, 6, 0x655b59c3);
- OP (FI, D, A, B, C, 3, 10, 0x8f0ccc92);
- OP (FI, C, D, A, B, 10, 15, 0xffeff47d);
- OP (FI, B, C, D, A, 1, 21, 0x85845dd1);
- OP (FI, A, B, C, D, 8, 6, 0x6fa87e4f);
- OP (FI, D, A, B, C, 15, 10, 0xfe2ce6e0);
- OP (FI, C, D, A, B, 6, 15, 0xa3014314);
- OP (FI, B, C, D, A, 13, 21, 0x4e0811a1);
- OP (FI, A, B, C, D, 4, 6, 0xf7537e82);
- OP (FI, D, A, B, C, 11, 10, 0xbd3af235);
- OP (FI, C, D, A, B, 2, 15, 0x2ad7d2bb);
- OP (FI, B, C, D, A, 9, 21, 0xeb86d391);
+ OP (FI, A, B, C, D, 0, 6, (md5_uint32) 0xf4292244);
+ OP (FI, D, A, B, C, 7, 10, (md5_uint32) 0x432aff97);
+ OP (FI, C, D, A, B, 14, 15, (md5_uint32) 0xab9423a7);
+ OP (FI, B, C, D, A, 5, 21, (md5_uint32) 0xfc93a039);
+ OP (FI, A, B, C, D, 12, 6, (md5_uint32) 0x655b59c3);
+ OP (FI, D, A, B, C, 3, 10, (md5_uint32) 0x8f0ccc92);
+ OP (FI, C, D, A, B, 10, 15, (md5_uint32) 0xffeff47d);
+ OP (FI, B, C, D, A, 1, 21, (md5_uint32) 0x85845dd1);
+ OP (FI, A, B, C, D, 8, 6, (md5_uint32) 0x6fa87e4f);
+ OP (FI, D, A, B, C, 15, 10, (md5_uint32) 0xfe2ce6e0);
+ OP (FI, C, D, A, B, 6, 15, (md5_uint32) 0xa3014314);
+ OP (FI, B, C, D, A, 13, 21, (md5_uint32) 0x4e0811a1);
+ OP (FI, A, B, C, D, 4, 6, (md5_uint32) 0xf7537e82);
+ OP (FI, D, A, B, C, 11, 10, (md5_uint32) 0xbd3af235);
+ OP (FI, C, D, A, B, 2, 15, (md5_uint32) 0x2ad7d2bb);
+ OP (FI, B, C, D, A, 9, 21, (md5_uint32) 0xeb86d391);
/* Add the starting values of the context. */
A += A_save;
diff --git a/contrib/binutils/libiberty/memchr.c b/contrib/binutils/libiberty/memchr.c
index cce3003..f94bea0 100644
--- a/contrib/binutils/libiberty/memchr.c
+++ b/contrib/binutils/libiberty/memchr.c
@@ -1,37 +1,16 @@
/*
-FUNCTION
- <<memchr>>---find character in memory
-INDEX
- memchr
+@deftypefn Supplemental void* memchr (const void *@var{s}, int @var{c}, size_t @var{n})
-ANSI_SYNOPSIS
- #include <string.h>
- void *memchr(const void *<[src]>, int <[c]>, size_t <[length]>);
+This function searches memory starting at @code{*@var{s}} for the
+character @var{c}. The search only ends with the first occurrence of
+@var{c}, or after @var{length} characters; in particular, a null
+character does not terminate the search. If the character @var{c} is
+found within @var{length} characters of @code{*@var{s}}, a pointer
+to the character is returned. If @var{c} is not found, then @code{NULL} is
+returned.
-TRAD_SYNOPSIS
- #include <string.h>
- void *memchr(<[src]>, <[c]>, <[length]>)
- void *<[src]>;
- void *<[c]>;
- size_t <[length]>;
-
-DESCRIPTION
- This function searches memory starting at <<*<[src]>>> for the
- character <[c]>. The search only ends with the first
- occurrence of <[c]>, or after <[length]> characters; in
- particular, <<NULL>> does not terminate the search.
-
-RETURNS
- If the character <[c]> is found within <[length]> characters
- of <<*<[src]>>>, a pointer to the character is returned. If
- <[c]> is not found, then <<NULL>> is returned.
-
-PORTABILITY
-<<memchr>> requires no supporting OS subroutines.
-
-QUICKREF
- memchr ansi pure
+@end deftypefn
*/
@@ -50,7 +29,7 @@ memchr (src_void, c, length)
{
const unsigned char *src = (const unsigned char *)src_void;
- while (--length >= 0)
+ while (length-- > 0)
{
if (*src == c)
return (PTR)src;
diff --git a/contrib/binutils/libiberty/memcmp.c b/contrib/binutils/libiberty/memcmp.c
index 0fd21ca..d8d3997 100644
--- a/contrib/binutils/libiberty/memcmp.c
+++ b/contrib/binutils/libiberty/memcmp.c
@@ -2,16 +2,17 @@
This function is in the public domain. */
/*
-NAME
- memcmp -- compare two memory regions
-SYNOPSIS
- int memcmp (const void *from, const void *to, size_t count)
+@deftypefn Supplemental int memcmp (const void *@var{x}, const void *@var{y}, size_t @var{count})
+
+Compares the first @var{count} bytes of two areas of memory. Returns
+zero if they are the same, a value less than zero if @var{x} is
+lexically less than @var{y}, or a value greater than zero if @var{x}
+is lexically greater than @var{y}. Note that lexical order is determined
+as if comparing unsigned char arrays.
+
+@end deftypefn
-DESCRIPTION
- Compare two memory regions and return less than,
- equal to, or greater than zero, according to lexicographical
- ordering of the compared regions.
*/
#include <ansidecl.h>
diff --git a/contrib/binutils/libiberty/memcpy.c b/contrib/binutils/libiberty/memcpy.c
index 707a9f5..0f2bac7 100644
--- a/contrib/binutils/libiberty/memcpy.c
+++ b/contrib/binutils/libiberty/memcpy.c
@@ -2,15 +2,14 @@
This function is in the public domain. */
/*
-NAME
- memcpy -- copy memory regions of arbitary length
-SYNOPSIS
- void* memcpy (void *out, const void *in, size_t n);
+@deftypefn Supplemental void* memcpy (void *@var{out}, const void *@var{in}, size_t @var{length})
+
+Copies @var{length} bytes from memory region @var{in} to region
+@var{out}. Returns a pointer to @var{out}.
+
+@end deftypefn
-DESCRIPTION
- Copy LENGTH bytes from memory region pointed to by IN to memory
- region pointed to by OUT.
*/
#include <ansidecl.h>
diff --git a/contrib/binutils/libiberty/memmove.c b/contrib/binutils/libiberty/memmove.c
index 176c326..3ec7320 100644
--- a/contrib/binutils/libiberty/memmove.c
+++ b/contrib/binutils/libiberty/memmove.c
@@ -1,5 +1,17 @@
/* Wrapper to implement ANSI C's memmove using BSD's bcopy. */
/* This function is in the public domain. --Per Bothner. */
+
+/*
+
+@deftypefn Supplemental void* memmove (void *@var{from}, const void *@var{to}, size_t @var{count})
+
+Copies @var{count} bytes from memory area @var{from} to memory area
+@var{to}, returning a pointer to @var{to}.
+
+@end deftypefn
+
+*/
+
#include <ansidecl.h>
#ifdef __STDC__
#include <stddef.h>
diff --git a/contrib/binutils/libiberty/memset.c b/contrib/binutils/libiberty/memset.c
index 5f54831..489ca17 100644
--- a/contrib/binutils/libiberty/memset.c
+++ b/contrib/binutils/libiberty/memset.c
@@ -1,6 +1,17 @@
/* memset
This implementation is in the public domain. */
+/*
+
+@deftypefn Supplemental void* memset (void *@var{s}, int @var{c}, size_t @var{count})
+
+Sets the first @var{count} bytes of @var{s} to the constant byte
+@var{c}, returning a pointer to @var{s}.
+
+@end deftypefn
+
+*/
+
#include <ansidecl.h>
#ifdef __STDC__
#include <stddef.h>
diff --git a/contrib/binutils/libiberty/mkstemps.c b/contrib/binutils/libiberty/mkstemps.c
index 4b89162..1f6600a 100644
--- a/contrib/binutils/libiberty/mkstemps.c
+++ b/contrib/binutils/libiberty/mkstemps.c
@@ -49,18 +49,27 @@ typedef unsigned long gcc_uint64_t;
#define TMP_MAX 16384
#endif
-/* Generate a unique temporary file name from TEMPLATE.
+/*
- TEMPLATE has the form:
+@deftypefn Replacement int mkstemps (char *@var{template}, int @var{suffix_len})
- <path>/ccXXXXXX<suffix>
+Generate a unique temporary file name from @var{template}.
+@var{template} has the form:
- SUFFIX_LEN tells us how long <suffix> is (it can be zero length).
+@example
+ @var{path}/ccXXXXXX@var{suffix}
+@end example
- The last six characters of TEMPLATE before <suffix> must be "XXXXXX";
- they are replaced with a string that makes the filename unique.
+@var{suffix_len} tells us how long @var{suffix} is (it can be zero
+length). The last six characters of @var{template} before @var{suffix}
+must be @samp{XXXXXX}; they are replaced with a string that makes the
+filename unique. Returns a file descriptor open on the file for
+reading and writing.
+
+@end deftypefn
+
+*/
- Returns a file descriptor open on the file for reading and writing. */
int
mkstemps (template, suffix_len)
char *template;
@@ -112,7 +121,11 @@ mkstemps (template, suffix_len)
v /= 62;
XXXXXX[5] = letters[v % 62];
+#ifdef VMS
+ fd = open (template, O_RDWR|O_CREAT|O_EXCL, 0600, "fop=tmd");
+#else
fd = open (template, O_RDWR|O_CREAT|O_EXCL, 0600);
+#endif
if (fd >= 0)
/* The file does not exist. */
return fd;
diff --git a/contrib/binutils/libiberty/obstack.c b/contrib/binutils/libiberty/obstack.c
index 0d4a4c8..02560c9 100644
--- a/contrib/binutils/libiberty/obstack.c
+++ b/contrib/binutils/libiberty/obstack.c
@@ -451,7 +451,7 @@ _obstack_memory_used (h)
/* Define the error handler. */
#ifndef _
-# ifdef HAVE_LIBINTL_H
+# if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC
# include <libintl.h>
# ifndef _
# define _(Str) gettext (Str)
diff --git a/contrib/binutils/libiberty/obstacks.texi b/contrib/binutils/libiberty/obstacks.texi
new file mode 100644
index 0000000..9bddf7c
--- /dev/null
+++ b/contrib/binutils/libiberty/obstacks.texi
@@ -0,0 +1,758 @@
+@node Obstacks,Licenses,Functions,Top
+@chapter Obstacks
+@cindex obstacks
+
+An @dfn{obstack} is a pool of memory containing a stack of objects. You
+can create any number of separate obstacks, and then allocate objects in
+specified obstacks. Within each obstack, the last object allocated must
+always be the first one freed, but distinct obstacks are independent of
+each other.
+
+Aside from this one constraint of order of freeing, obstacks are totally
+general: an obstack can contain any number of objects of any size. They
+are implemented with macros, so allocation is usually very fast as long as
+the objects are usually small. And the only space overhead per object is
+the padding needed to start each object on a suitable boundary.
+
+@menu
+* Creating Obstacks:: How to declare an obstack in your program.
+* Preparing for Obstacks:: Preparations needed before you can
+ use obstacks.
+* Allocation in an Obstack:: Allocating objects in an obstack.
+* Freeing Obstack Objects:: Freeing objects in an obstack.
+* Obstack Functions:: The obstack functions are both
+ functions and macros.
+* Growing Objects:: Making an object bigger by stages.
+* Extra Fast Growing:: Extra-high-efficiency (though more
+ complicated) growing objects.
+* Status of an Obstack:: Inquiries about the status of an obstack.
+* Obstacks Data Alignment:: Controlling alignment of objects in obstacks.
+* Obstack Chunks:: How obstacks obtain and release chunks;
+ efficiency considerations.
+* Summary of Obstacks::
+@end menu
+
+@node Creating Obstacks
+@section Creating Obstacks
+
+The utilities for manipulating obstacks are declared in the header
+file @file{obstack.h}.
+@pindex obstack.h
+
+@comment obstack.h
+@comment GNU
+@deftp {Data Type} {struct obstack}
+An obstack is represented by a data structure of type @code{struct
+obstack}. This structure has a small fixed size; it records the status
+of the obstack and how to find the space in which objects are allocated.
+It does not contain any of the objects themselves. You should not try
+to access the contents of the structure directly; use only the functions
+described in this chapter.
+@end deftp
+
+You can declare variables of type @code{struct obstack} and use them as
+obstacks, or you can allocate obstacks dynamically like any other kind
+of object. Dynamic allocation of obstacks allows your program to have a
+variable number of different stacks. (You can even allocate an
+obstack structure in another obstack, but this is rarely useful.)
+
+All the functions that work with obstacks require you to specify which
+obstack to use. You do this with a pointer of type @code{struct obstack
+*}. In the following, we often say ``an obstack'' when strictly
+speaking the object at hand is such a pointer.
+
+The objects in the obstack are packed into large blocks called
+@dfn{chunks}. The @code{struct obstack} structure points to a chain of
+the chunks currently in use.
+
+The obstack library obtains a new chunk whenever you allocate an object
+that won't fit in the previous chunk. Since the obstack library manages
+chunks automatically, you don't need to pay much attention to them, but
+you do need to supply a function which the obstack library should use to
+get a chunk. Usually you supply a function which uses @code{malloc}
+directly or indirectly. You must also supply a function to free a chunk.
+These matters are described in the following section.
+
+@node Preparing for Obstacks
+@section Preparing for Using Obstacks
+
+Each source file in which you plan to use the obstack functions
+must include the header file @file{obstack.h}, like this:
+
+@smallexample
+#include <obstack.h>
+@end smallexample
+
+@findex obstack_chunk_alloc
+@findex obstack_chunk_free
+Also, if the source file uses the macro @code{obstack_init}, it must
+declare or define two functions or macros that will be called by the
+obstack library. One, @code{obstack_chunk_alloc}, is used to allocate
+the chunks of memory into which objects are packed. The other,
+@code{obstack_chunk_free}, is used to return chunks when the objects in
+them are freed. These macros should appear before any use of obstacks
+in the source file.
+
+Usually these are defined to use @code{malloc} via the intermediary
+@code{xmalloc} (@pxref{Unconstrained Allocation, , , libc, The GNU C Library Reference Manual}). This is done with
+the following pair of macro definitions:
+
+@smallexample
+#define obstack_chunk_alloc xmalloc
+#define obstack_chunk_free free
+@end smallexample
+
+@noindent
+Though the memory you get using obstacks really comes from @code{malloc},
+using obstacks is faster because @code{malloc} is called less often, for
+larger blocks of memory. @xref{Obstack Chunks}, for full details.
+
+At run time, before the program can use a @code{struct obstack} object
+as an obstack, it must initialize the obstack by calling
+@code{obstack_init}.
+
+@comment obstack.h
+@comment GNU
+@deftypefun int obstack_init (struct obstack *@var{obstack-ptr})
+Initialize obstack @var{obstack-ptr} for allocation of objects. This
+function calls the obstack's @code{obstack_chunk_alloc} function. If
+allocation of memory fails, the function pointed to by
+@code{obstack_alloc_failed_handler} is called. The @code{obstack_init}
+function always returns 1 (Compatibility notice: Former versions of
+obstack returned 0 if allocation failed).
+@end deftypefun
+
+Here are two examples of how to allocate the space for an obstack and
+initialize it. First, an obstack that is a static variable:
+
+@smallexample
+static struct obstack myobstack;
+@dots{}
+obstack_init (&myobstack);
+@end smallexample
+
+@noindent
+Second, an obstack that is itself dynamically allocated:
+
+@smallexample
+struct obstack *myobstack_ptr
+ = (struct obstack *) xmalloc (sizeof (struct obstack));
+
+obstack_init (myobstack_ptr);
+@end smallexample
+
+@comment obstack.h
+@comment GNU
+@defvar obstack_alloc_failed_handler
+The value of this variable is a pointer to a function that
+@code{obstack} uses when @code{obstack_chunk_alloc} fails to allocate
+memory. The default action is to print a message and abort.
+You should supply a function that either calls @code{exit}
+(@pxref{Program Termination, , , libc, The GNU C Library Reference Manual}) or @code{longjmp} (@pxref{Non-Local
+Exits, , , libc, The GNU C Library Reference Manual}) and doesn't return.
+
+@smallexample
+void my_obstack_alloc_failed (void)
+@dots{}
+obstack_alloc_failed_handler = &my_obstack_alloc_failed;
+@end smallexample
+
+@end defvar
+
+@node Allocation in an Obstack
+@section Allocation in an Obstack
+@cindex allocation (obstacks)
+
+The most direct way to allocate an object in an obstack is with
+@code{obstack_alloc}, which is invoked almost like @code{malloc}.
+
+@comment obstack.h
+@comment GNU
+@deftypefun {void *} obstack_alloc (struct obstack *@var{obstack-ptr}, int @var{size})
+This allocates an uninitialized block of @var{size} bytes in an obstack
+and returns its address. Here @var{obstack-ptr} specifies which obstack
+to allocate the block in; it is the address of the @code{struct obstack}
+object which represents the obstack. Each obstack function or macro
+requires you to specify an @var{obstack-ptr} as the first argument.
+
+This function calls the obstack's @code{obstack_chunk_alloc} function if
+it needs to allocate a new chunk of memory; it calls
+@code{obstack_alloc_failed_handler} if allocation of memory by
+@code{obstack_chunk_alloc} failed.
+@end deftypefun
+
+For example, here is a function that allocates a copy of a string @var{str}
+in a specific obstack, which is in the variable @code{string_obstack}:
+
+@smallexample
+struct obstack string_obstack;
+
+char *
+copystring (char *string)
+@{
+ size_t len = strlen (string) + 1;
+ char *s = (char *) obstack_alloc (&string_obstack, len);
+ memcpy (s, string, len);
+ return s;
+@}
+@end smallexample
+
+To allocate a block with specified contents, use the function
+@code{obstack_copy}, declared like this:
+
+@comment obstack.h
+@comment GNU
+@deftypefun {void *} obstack_copy (struct obstack *@var{obstack-ptr}, void *@var{address}, int @var{size})
+This allocates a block and initializes it by copying @var{size}
+bytes of data starting at @var{address}. It calls
+@code{obstack_alloc_failed_handler} if allocation of memory by
+@code{obstack_chunk_alloc} failed.
+@end deftypefun
+
+@comment obstack.h
+@comment GNU
+@deftypefun {void *} obstack_copy0 (struct obstack *@var{obstack-ptr}, void *@var{address}, int @var{size})
+Like @code{obstack_copy}, but appends an extra byte containing a null
+character. This extra byte is not counted in the argument @var{size}.
+@end deftypefun
+
+The @code{obstack_copy0} function is convenient for copying a sequence
+of characters into an obstack as a null-terminated string. Here is an
+example of its use:
+
+@smallexample
+char *
+obstack_savestring (char *addr, int size)
+@{
+ return obstack_copy0 (&myobstack, addr, size);
+@}
+@end smallexample
+
+@noindent
+Contrast this with the previous example of @code{savestring} using
+@code{malloc} (@pxref{Basic Allocation, , , libc, The GNU C Library Reference Manual}).
+
+@node Freeing Obstack Objects
+@section Freeing Objects in an Obstack
+@cindex freeing (obstacks)
+
+To free an object allocated in an obstack, use the function
+@code{obstack_free}. Since the obstack is a stack of objects, freeing
+one object automatically frees all other objects allocated more recently
+in the same obstack.
+
+@comment obstack.h
+@comment GNU
+@deftypefun void obstack_free (struct obstack *@var{obstack-ptr}, void *@var{object})
+If @var{object} is a null pointer, everything allocated in the obstack
+is freed. Otherwise, @var{object} must be the address of an object
+allocated in the obstack. Then @var{object} is freed, along with
+everything allocated in @var{obstack} since @var{object}.
+@end deftypefun
+
+Note that if @var{object} is a null pointer, the result is an
+uninitialized obstack. To free all memory in an obstack but leave it
+valid for further allocation, call @code{obstack_free} with the address
+of the first object allocated on the obstack:
+
+@smallexample
+obstack_free (obstack_ptr, first_object_allocated_ptr);
+@end smallexample
+
+Recall that the objects in an obstack are grouped into chunks. When all
+the objects in a chunk become free, the obstack library automatically
+frees the chunk (@pxref{Preparing for Obstacks}). Then other
+obstacks, or non-obstack allocation, can reuse the space of the chunk.
+
+@node Obstack Functions
+@section Obstack Functions and Macros
+@cindex macros
+
+The interfaces for using obstacks may be defined either as functions or
+as macros, depending on the compiler. The obstack facility works with
+all C compilers, including both @w{ISO C} and traditional C, but there are
+precautions you must take if you plan to use compilers other than GNU C.
+
+If you are using an old-fashioned @w{non-ISO C} compiler, all the obstack
+``functions'' are actually defined only as macros. You can call these
+macros like functions, but you cannot use them in any other way (for
+example, you cannot take their address).
+
+Calling the macros requires a special precaution: namely, the first
+operand (the obstack pointer) may not contain any side effects, because
+it may be computed more than once. For example, if you write this:
+
+@smallexample
+obstack_alloc (get_obstack (), 4);
+@end smallexample
+
+@noindent
+you will find that @code{get_obstack} may be called several times.
+If you use @code{*obstack_list_ptr++} as the obstack pointer argument,
+you will get very strange results since the incrementation may occur
+several times.
+
+In @w{ISO C}, each function has both a macro definition and a function
+definition. The function definition is used if you take the address of the
+function without calling it. An ordinary call uses the macro definition by
+default, but you can request the function definition instead by writing the
+function name in parentheses, as shown here:
+
+@smallexample
+char *x;
+void *(*funcp) ();
+/* @r{Use the macro}. */
+x = (char *) obstack_alloc (obptr, size);
+/* @r{Call the function}. */
+x = (char *) (obstack_alloc) (obptr, size);
+/* @r{Take the address of the function}. */
+funcp = obstack_alloc;
+@end smallexample
+
+@noindent
+This is the same situation that exists in @w{ISO C} for the standard library
+functions. @xref{Macro Definitions, , , libc, The GNU C Library Reference Manual}.
+
+@strong{Warning:} When you do use the macros, you must observe the
+precaution of avoiding side effects in the first operand, even in @w{ISO C}.
+
+If you use the GNU C compiler, this precaution is not necessary, because
+various language extensions in GNU C permit defining the macros so as to
+compute each argument only once.
+
+@node Growing Objects
+@section Growing Objects
+@cindex growing objects (in obstacks)
+@cindex changing the size of a block (obstacks)
+
+Because memory in obstack chunks is used sequentially, it is possible to
+build up an object step by step, adding one or more bytes at a time to the
+end of the object. With this technique, you do not need to know how much
+data you will put in the object until you come to the end of it. We call
+this the technique of @dfn{growing objects}. The special functions
+for adding data to the growing object are described in this section.
+
+You don't need to do anything special when you start to grow an object.
+Using one of the functions to add data to the object automatically
+starts it. However, it is necessary to say explicitly when the object is
+finished. This is done with the function @code{obstack_finish}.
+
+The actual address of the object thus built up is not known until the
+object is finished. Until then, it always remains possible that you will
+add so much data that the object must be copied into a new chunk.
+
+While the obstack is in use for a growing object, you cannot use it for
+ordinary allocation of another object. If you try to do so, the space
+already added to the growing object will become part of the other object.
+
+@comment obstack.h
+@comment GNU
+@deftypefun void obstack_blank (struct obstack *@var{obstack-ptr}, int @var{size})
+The most basic function for adding to a growing object is
+@code{obstack_blank}, which adds space without initializing it.
+@end deftypefun
+
+@comment obstack.h
+@comment GNU
+@deftypefun void obstack_grow (struct obstack *@var{obstack-ptr}, void *@var{data}, int @var{size})
+To add a block of initialized space, use @code{obstack_grow}, which is
+the growing-object analogue of @code{obstack_copy}. It adds @var{size}
+bytes of data to the growing object, copying the contents from
+@var{data}.
+@end deftypefun
+
+@comment obstack.h
+@comment GNU
+@deftypefun void obstack_grow0 (struct obstack *@var{obstack-ptr}, void *@var{data}, int @var{size})
+This is the growing-object analogue of @code{obstack_copy0}. It adds
+@var{size} bytes copied from @var{data}, followed by an additional null
+character.
+@end deftypefun
+
+@comment obstack.h
+@comment GNU
+@deftypefun void obstack_1grow (struct obstack *@var{obstack-ptr}, char @var{c})
+To add one character at a time, use the function @code{obstack_1grow}.
+It adds a single byte containing @var{c} to the growing object.
+@end deftypefun
+
+@comment obstack.h
+@comment GNU
+@deftypefun void obstack_ptr_grow (struct obstack *@var{obstack-ptr}, void *@var{data})
+Adding the value of a pointer one can use the function
+@code{obstack_ptr_grow}. It adds @code{sizeof (void *)} bytes
+containing the value of @var{data}.
+@end deftypefun
+
+@comment obstack.h
+@comment GNU
+@deftypefun void obstack_int_grow (struct obstack *@var{obstack-ptr}, int @var{data})
+A single value of type @code{int} can be added by using the
+@code{obstack_int_grow} function. It adds @code{sizeof (int)} bytes to
+the growing object and initializes them with the value of @var{data}.
+@end deftypefun
+
+@comment obstack.h
+@comment GNU
+@deftypefun {void *} obstack_finish (struct obstack *@var{obstack-ptr})
+When you are finished growing the object, use the function
+@code{obstack_finish} to close it off and return its final address.
+
+Once you have finished the object, the obstack is available for ordinary
+allocation or for growing another object.
+
+This function can return a null pointer under the same conditions as
+@code{obstack_alloc} (@pxref{Allocation in an Obstack}).
+@end deftypefun
+
+When you build an object by growing it, you will probably need to know
+afterward how long it became. You need not keep track of this as you grow
+the object, because you can find out the length from the obstack just
+before finishing the object with the function @code{obstack_object_size},
+declared as follows:
+
+@comment obstack.h
+@comment GNU
+@deftypefun int obstack_object_size (struct obstack *@var{obstack-ptr})
+This function returns the current size of the growing object, in bytes.
+Remember to call this function @emph{before} finishing the object.
+After it is finished, @code{obstack_object_size} will return zero.
+@end deftypefun
+
+If you have started growing an object and wish to cancel it, you should
+finish it and then free it, like this:
+
+@smallexample
+obstack_free (obstack_ptr, obstack_finish (obstack_ptr));
+@end smallexample
+
+@noindent
+This has no effect if no object was growing.
+
+@cindex shrinking objects
+You can use @code{obstack_blank} with a negative size argument to make
+the current object smaller. Just don't try to shrink it beyond zero
+length---there's no telling what will happen if you do that.
+
+@node Extra Fast Growing
+@section Extra Fast Growing Objects
+@cindex efficiency and obstacks
+
+The usual functions for growing objects incur overhead for checking
+whether there is room for the new growth in the current chunk. If you
+are frequently constructing objects in small steps of growth, this
+overhead can be significant.
+
+You can reduce the overhead by using special ``fast growth''
+functions that grow the object without checking. In order to have a
+robust program, you must do the checking yourself. If you do this checking
+in the simplest way each time you are about to add data to the object, you
+have not saved anything, because that is what the ordinary growth
+functions do. But if you can arrange to check less often, or check
+more efficiently, then you make the program faster.
+
+The function @code{obstack_room} returns the amount of room available
+in the current chunk. It is declared as follows:
+
+@comment obstack.h
+@comment GNU
+@deftypefun int obstack_room (struct obstack *@var{obstack-ptr})
+This returns the number of bytes that can be added safely to the current
+growing object (or to an object about to be started) in obstack
+@var{obstack} using the fast growth functions.
+@end deftypefun
+
+While you know there is room, you can use these fast growth functions
+for adding data to a growing object:
+
+@comment obstack.h
+@comment GNU
+@deftypefun void obstack_1grow_fast (struct obstack *@var{obstack-ptr}, char @var{c})
+The function @code{obstack_1grow_fast} adds one byte containing the
+character @var{c} to the growing object in obstack @var{obstack-ptr}.
+@end deftypefun
+
+@comment obstack.h
+@comment GNU
+@deftypefun void obstack_ptr_grow_fast (struct obstack *@var{obstack-ptr}, void *@var{data})
+The function @code{obstack_ptr_grow_fast} adds @code{sizeof (void *)}
+bytes containing the value of @var{data} to the growing object in
+obstack @var{obstack-ptr}.
+@end deftypefun
+
+@comment obstack.h
+@comment GNU
+@deftypefun void obstack_int_grow_fast (struct obstack *@var{obstack-ptr}, int @var{data})
+The function @code{obstack_int_grow_fast} adds @code{sizeof (int)} bytes
+containing the value of @var{data} to the growing object in obstack
+@var{obstack-ptr}.
+@end deftypefun
+
+@comment obstack.h
+@comment GNU
+@deftypefun void obstack_blank_fast (struct obstack *@var{obstack-ptr}, int @var{size})
+The function @code{obstack_blank_fast} adds @var{size} bytes to the
+growing object in obstack @var{obstack-ptr} without initializing them.
+@end deftypefun
+
+When you check for space using @code{obstack_room} and there is not
+enough room for what you want to add, the fast growth functions
+are not safe. In this case, simply use the corresponding ordinary
+growth function instead. Very soon this will copy the object to a
+new chunk; then there will be lots of room available again.
+
+So, each time you use an ordinary growth function, check afterward for
+sufficient space using @code{obstack_room}. Once the object is copied
+to a new chunk, there will be plenty of space again, so the program will
+start using the fast growth functions again.
+
+Here is an example:
+
+@smallexample
+@group
+void
+add_string (struct obstack *obstack, const char *ptr, int len)
+@{
+ while (len > 0)
+ @{
+ int room = obstack_room (obstack);
+ if (room == 0)
+ @{
+ /* @r{Not enough room. Add one character slowly,}
+ @r{which may copy to a new chunk and make room.} */
+ obstack_1grow (obstack, *ptr++);
+ len--;
+ @}
+ else
+ @{
+ if (room > len)
+ room = len;
+ /* @r{Add fast as much as we have room for.} */
+ len -= room;
+ while (room-- > 0)
+ obstack_1grow_fast (obstack, *ptr++);
+ @}
+ @}
+@}
+@end group
+@end smallexample
+
+@node Status of an Obstack
+@section Status of an Obstack
+@cindex obstack status
+@cindex status of obstack
+
+Here are functions that provide information on the current status of
+allocation in an obstack. You can use them to learn about an object while
+still growing it.
+
+@comment obstack.h
+@comment GNU
+@deftypefun {void *} obstack_base (struct obstack *@var{obstack-ptr})
+This function returns the tentative address of the beginning of the
+currently growing object in @var{obstack-ptr}. If you finish the object
+immediately, it will have that address. If you make it larger first, it
+may outgrow the current chunk---then its address will change!
+
+If no object is growing, this value says where the next object you
+allocate will start (once again assuming it fits in the current
+chunk).
+@end deftypefun
+
+@comment obstack.h
+@comment GNU
+@deftypefun {void *} obstack_next_free (struct obstack *@var{obstack-ptr})
+This function returns the address of the first free byte in the current
+chunk of obstack @var{obstack-ptr}. This is the end of the currently
+growing object. If no object is growing, @code{obstack_next_free}
+returns the same value as @code{obstack_base}.
+@end deftypefun
+
+@comment obstack.h
+@comment GNU
+@deftypefun int obstack_object_size (struct obstack *@var{obstack-ptr})
+This function returns the size in bytes of the currently growing object.
+This is equivalent to
+
+@smallexample
+obstack_next_free (@var{obstack-ptr}) - obstack_base (@var{obstack-ptr})
+@end smallexample
+@end deftypefun
+
+@node Obstacks Data Alignment
+@section Alignment of Data in Obstacks
+@cindex alignment (in obstacks)
+
+Each obstack has an @dfn{alignment boundary}; each object allocated in
+the obstack automatically starts on an address that is a multiple of the
+specified boundary. By default, this boundary is 4 bytes.
+
+To access an obstack's alignment boundary, use the macro
+@code{obstack_alignment_mask}, whose function prototype looks like
+this:
+
+@comment obstack.h
+@comment GNU
+@deftypefn Macro int obstack_alignment_mask (struct obstack *@var{obstack-ptr})
+The value is a bit mask; a bit that is 1 indicates that the corresponding
+bit in the address of an object should be 0. The mask value should be one
+less than a power of 2; the effect is that all object addresses are
+multiples of that power of 2. The default value of the mask is 3, so that
+addresses are multiples of 4. A mask value of 0 means an object can start
+on any multiple of 1 (that is, no alignment is required).
+
+The expansion of the macro @code{obstack_alignment_mask} is an lvalue,
+so you can alter the mask by assignment. For example, this statement:
+
+@smallexample
+obstack_alignment_mask (obstack_ptr) = 0;
+@end smallexample
+
+@noindent
+has the effect of turning off alignment processing in the specified obstack.
+@end deftypefn
+
+Note that a change in alignment mask does not take effect until
+@emph{after} the next time an object is allocated or finished in the
+obstack. If you are not growing an object, you can make the new
+alignment mask take effect immediately by calling @code{obstack_finish}.
+This will finish a zero-length object and then do proper alignment for
+the next object.
+
+@node Obstack Chunks
+@section Obstack Chunks
+@cindex efficiency of chunks
+@cindex chunks
+
+Obstacks work by allocating space for themselves in large chunks, and
+then parceling out space in the chunks to satisfy your requests. Chunks
+are normally 4096 bytes long unless you specify a different chunk size.
+The chunk size includes 8 bytes of overhead that are not actually used
+for storing objects. Regardless of the specified size, longer chunks
+will be allocated when necessary for long objects.
+
+The obstack library allocates chunks by calling the function
+@code{obstack_chunk_alloc}, which you must define. When a chunk is no
+longer needed because you have freed all the objects in it, the obstack
+library frees the chunk by calling @code{obstack_chunk_free}, which you
+must also define.
+
+These two must be defined (as macros) or declared (as functions) in each
+source file that uses @code{obstack_init} (@pxref{Creating Obstacks}).
+Most often they are defined as macros like this:
+
+@smallexample
+#define obstack_chunk_alloc malloc
+#define obstack_chunk_free free
+@end smallexample
+
+Note that these are simple macros (no arguments). Macro definitions with
+arguments will not work! It is necessary that @code{obstack_chunk_alloc}
+or @code{obstack_chunk_free}, alone, expand into a function name if it is
+not itself a function name.
+
+If you allocate chunks with @code{malloc}, the chunk size should be a
+power of 2. The default chunk size, 4096, was chosen because it is long
+enough to satisfy many typical requests on the obstack yet short enough
+not to waste too much memory in the portion of the last chunk not yet used.
+
+@comment obstack.h
+@comment GNU
+@deftypefn Macro int obstack_chunk_size (struct obstack *@var{obstack-ptr})
+This returns the chunk size of the given obstack.
+@end deftypefn
+
+Since this macro expands to an lvalue, you can specify a new chunk size by
+assigning it a new value. Doing so does not affect the chunks already
+allocated, but will change the size of chunks allocated for that particular
+obstack in the future. It is unlikely to be useful to make the chunk size
+smaller, but making it larger might improve efficiency if you are
+allocating many objects whose size is comparable to the chunk size. Here
+is how to do so cleanly:
+
+@smallexample
+if (obstack_chunk_size (obstack_ptr) < @var{new-chunk-size})
+ obstack_chunk_size (obstack_ptr) = @var{new-chunk-size};
+@end smallexample
+
+@node Summary of Obstacks
+@section Summary of Obstack Functions
+
+Here is a summary of all the functions associated with obstacks. Each
+takes the address of an obstack (@code{struct obstack *}) as its first
+argument.
+
+@table @code
+@item void obstack_init (struct obstack *@var{obstack-ptr})
+Initialize use of an obstack. @xref{Creating Obstacks}.
+
+@item void *obstack_alloc (struct obstack *@var{obstack-ptr}, int @var{size})
+Allocate an object of @var{size} uninitialized bytes.
+@xref{Allocation in an Obstack}.
+
+@item void *obstack_copy (struct obstack *@var{obstack-ptr}, void *@var{address}, int @var{size})
+Allocate an object of @var{size} bytes, with contents copied from
+@var{address}. @xref{Allocation in an Obstack}.
+
+@item void *obstack_copy0 (struct obstack *@var{obstack-ptr}, void *@var{address}, int @var{size})
+Allocate an object of @var{size}+1 bytes, with @var{size} of them copied
+from @var{address}, followed by a null character at the end.
+@xref{Allocation in an Obstack}.
+
+@item void obstack_free (struct obstack *@var{obstack-ptr}, void *@var{object})
+Free @var{object} (and everything allocated in the specified obstack
+more recently than @var{object}). @xref{Freeing Obstack Objects}.
+
+@item void obstack_blank (struct obstack *@var{obstack-ptr}, int @var{size})
+Add @var{size} uninitialized bytes to a growing object.
+@xref{Growing Objects}.
+
+@item void obstack_grow (struct obstack *@var{obstack-ptr}, void *@var{address}, int @var{size})
+Add @var{size} bytes, copied from @var{address}, to a growing object.
+@xref{Growing Objects}.
+
+@item void obstack_grow0 (struct obstack *@var{obstack-ptr}, void *@var{address}, int @var{size})
+Add @var{size} bytes, copied from @var{address}, to a growing object,
+and then add another byte containing a null character. @xref{Growing
+Objects}.
+
+@item void obstack_1grow (struct obstack *@var{obstack-ptr}, char @var{data-char})
+Add one byte containing @var{data-char} to a growing object.
+@xref{Growing Objects}.
+
+@item void *obstack_finish (struct obstack *@var{obstack-ptr})
+Finalize the object that is growing and return its permanent address.
+@xref{Growing Objects}.
+
+@item int obstack_object_size (struct obstack *@var{obstack-ptr})
+Get the current size of the currently growing object. @xref{Growing
+Objects}.
+
+@item void obstack_blank_fast (struct obstack *@var{obstack-ptr}, int @var{size})
+Add @var{size} uninitialized bytes to a growing object without checking
+that there is enough room. @xref{Extra Fast Growing}.
+
+@item void obstack_1grow_fast (struct obstack *@var{obstack-ptr}, char @var{data-char})
+Add one byte containing @var{data-char} to a growing object without
+checking that there is enough room. @xref{Extra Fast Growing}.
+
+@item int obstack_room (struct obstack *@var{obstack-ptr})
+Get the amount of room now available for growing the current object.
+@xref{Extra Fast Growing}.
+
+@item int obstack_alignment_mask (struct obstack *@var{obstack-ptr})
+The mask used for aligning the beginning of an object. This is an
+lvalue. @xref{Obstacks Data Alignment}.
+
+@item int obstack_chunk_size (struct obstack *@var{obstack-ptr})
+The size for allocating chunks. This is an lvalue. @xref{Obstack Chunks}.
+
+@item void *obstack_base (struct obstack *@var{obstack-ptr})
+Tentative starting address of the currently growing object.
+@xref{Status of an Obstack}.
+
+@item void *obstack_next_free (struct obstack *@var{obstack-ptr})
+Address just after the end of the currently growing object.
+@xref{Status of an Obstack}.
+@end table
+
diff --git a/contrib/binutils/libiberty/partition.c b/contrib/binutils/libiberty/partition.c
index a5a7349..0715472 100644
--- a/contrib/binutils/libiberty/partition.c
+++ b/contrib/binutils/libiberty/partition.c
@@ -1,5 +1,5 @@
-/* List implentation of a partition of consecutive integers.
- Copyright (C) 2000 Free Software Foundation, Inc.
+/* List implementation of a partition of consecutive integers.
+ Copyright (C) 2000, 2001 Free Software Foundation, Inc.
Contributed by CodeSourcery, LLC.
This file is part of GNU CC.
diff --git a/contrib/binutils/libiberty/pexecute.c b/contrib/binutils/libiberty/pexecute.c
index 32943af..347c4db 100644
--- a/contrib/binutils/libiberty/pexecute.c
+++ b/contrib/binutils/libiberty/pexecute.c
@@ -64,53 +64,66 @@ static char *install_error_msg = "installation problem, cannot exec `%s'";
/* pexecute: execute a program.
- PROGRAM and ARGV are the arguments to execv/execvp.
+@deftypefn Extension int pexecute (const char *@var{program}, char * const *@var{argv}, const char *@var{this_pname}, const char *@var{temp_base}, char **@var{errmsg_fmt}, char **@var{errmsg_arg}, int flags)
- THIS_PNAME is name of the calling program (i.e. argv[0]).
+Executes a program.
- TEMP_BASE is the path name, sans suffix, of a temporary file to use
- if needed. This is currently only needed for MSDOS ports that don't use
- GO32 (do any still exist?). Ports that don't need it can pass NULL.
+@var{program} and @var{argv} are the arguments to
+@code{execv}/@code{execvp}.
- (FLAGS & PEXECUTE_SEARCH) is non-zero if $PATH should be searched
- (??? It's not clear that GCC passes this flag correctly).
- (FLAGS & PEXECUTE_FIRST) is nonzero for the first process in chain.
- (FLAGS & PEXECUTE_FIRST) is nonzero for the last process in chain.
- FIRST_LAST could be simplified to only mark the last of a chain of processes
- but that requires the caller to always mark the last one (and not give up
- early if some error occurs). It's more robust to require the caller to
- mark both ends of the chain.
+@var{this_pname} is name of the calling program (i.e., @code{argv[0]}).
- The result is the pid on systems like Unix where we fork/exec and on systems
- like WIN32 and OS2 where we use spawn. It is up to the caller to wait for
- the child.
+@var{temp_base} is the path name, sans suffix, of a temporary file to
+use if needed. This is currently only needed for MS-DOS ports that
+don't use @code{go32} (do any still exist?). Ports that don't need it
+can pass @code{NULL}.
- The result is the WEXITSTATUS on systems like MSDOS where we spawn and wait
- for the child here.
+(@code{@var{flags} & PEXECUTE_SEARCH}) is non-zero if @env{PATH} should be searched
+(??? It's not clear that GCC passes this flag correctly). (@code{@var{flags} &
+PEXECUTE_FIRST}) is nonzero for the first process in chain.
+(@code{@var{flags} & PEXECUTE_FIRST}) is nonzero for the last process
+in chain. The first/last flags could be simplified to only mark the
+last of a chain of processes but that requires the caller to always
+mark the last one (and not give up early if some error occurs).
+It's more robust to require the caller to mark both ends of the chain.
- Upon failure, ERRMSG_FMT and ERRMSG_ARG are set to the text of the error
- message with an optional argument (if not needed, ERRMSG_ARG is set to
- NULL), and -1 is returned. `errno' is available to the caller to use.
+The result is the pid on systems like Unix where we
+@code{fork}/@code{exec} and on systems like WIN32 and OS/2 where we
+use @code{spawn}. It is up to the caller to wait for the child.
- pwait: cover function for wait.
+The result is the @code{WEXITSTATUS} on systems like MS-DOS where we
+@code{spawn} and wait for the child here.
- PID is the process id of the task to wait for.
- STATUS is the `status' argument to wait.
- FLAGS is currently unused (allows future enhancement without breaking
- upward compatibility). Pass 0 for now.
+Upon failure, @var{errmsg_fmt} and @var{errmsg_arg} are set to the
+text of the error message with an optional argument (if not needed,
+@var{errmsg_arg} is set to @code{NULL}), and @minus{}1 is returned.
+@code{errno} is available to the caller to use.
- The result is the pid of the child reaped,
- or -1 for failure (errno says why).
+@end deftypefn
- On systems that don't support waiting for a particular child, PID is
- ignored. On systems like MSDOS that don't really multitask pwait
- is just a mechanism to provide a consistent interface for the caller.
+@deftypefn Extension int pwait (int @var{pid}, int *@var{status}, int @var{flags})
+
+Waits for a program started by @code{pexecute} to finish.
+
+@var{pid} is the process id of the task to wait for. @var{status} is
+the `status' argument to wait. @var{flags} is currently unused (allows
+future enhancement without breaking upward compatibility). Pass 0 for now.
+
+The result is the pid of the child reaped, or -1 for failure
+(@code{errno} says why).
+
+On systems that don't support waiting for a particular child, @var{pid} is
+ignored. On systems like MS-DOS that don't really multitask @code{pwait}
+is just a mechanism to provide a consistent interface for the caller.
+
+@end deftypefn
+
+@undocumented pfinish
pfinish: finish generation of script
pfinish is necessary for systems like MPW where a script is generated that
- runs the requested programs.
-*/
+ runs the requested programs. */
#ifdef __MSDOS__
@@ -254,7 +267,7 @@ extern int _spawnvp ();
/* This is a kludge to get around the Microsoft C spawn functions' propensity
to remove the outermost set of double quotes from all arguments. */
-const char * const *
+static const char * const *
fix_argv (argvec)
char **argvec;
{
diff --git a/contrib/binutils/libiberty/putenv.c b/contrib/binutils/libiberty/putenv.c
index 9d56922..6d027dc 100644
--- a/contrib/binutils/libiberty/putenv.c
+++ b/contrib/binutils/libiberty/putenv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1994, 1995, 1996 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1994, 1995, 1996, 2002 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
@@ -16,6 +16,19 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+/*
+
+@deftypefn Supplemental int putenv (const char *@var{string})
+
+Uses @code{setenv} or @code{unsetenv} to put @var{string} into
+the environment or remove it. If @var{string} is of the form
+@samp{name=value} the string is added; if no @samp{=} is present the
+name is unset/removed.
+
+@end deftypefn
+
+*/
+
#if defined (_AIX) && !defined (__GNUC__)
#pragma alloca
#endif
@@ -26,6 +39,8 @@
#include "ansidecl.h"
+#define putenv libiberty_putenv
+
#if HAVE_STDLIB_H
# include <stdlib.h>
#endif
@@ -45,6 +60,8 @@ extern char *alloca ();
# endif /* alloca */
#endif /* HAVE_ALLOCA_H */
+#undef putenv
+
/* Below this point, it's verbatim code from the glibc-2.0 implementation */
diff --git a/contrib/binutils/libiberty/random.c b/contrib/binutils/libiberty/random.c
index ef00da0..48035f0 100644
--- a/contrib/binutils/libiberty/random.c
+++ b/contrib/binutils/libiberty/random.c
@@ -34,6 +34,24 @@
* It was reworked for the GNU C Library by Roland McGrath.
*/
+/*
+
+@deftypefn Supplement {long int} random (void)
+@deftypefnx Supplement void srandom (unsigned int @var{seed})
+@deftypefnx Supplement void* initstate (unsigned int @var{seed}, void *@var{arg_state}, unsigned long @var{n})
+@deftypefnx Supplement void* setstate (void *@var{arg_state})
+
+Random number functions. @code{random} returns a random number in the
+range 0 to @code{LONG_MAX}. @code{srandom} initializes the random
+number generator to some starting point determined by @var{seed}
+(else, the values returned by @code{random} are always the same for each
+run of the program). @code{initstate} and @code{setstate} allow fine-grained
+control over the state of the random number generator.
+
+@end deftypefn
+
+*/
+
#include <errno.h>
#if 0
diff --git a/contrib/binutils/libiberty/regex.c b/contrib/binutils/libiberty/regex.c
new file mode 100644
index 0000000..a64cd562
--- /dev/null
+++ b/contrib/binutils/libiberty/regex.c
@@ -0,0 +1,8373 @@
+/* Extended regular expression matching and search library,
+ version 0.12.
+ (Implements POSIX draft P1003.2/D11.2, except for some of the
+ internationalization features.)
+ Copyright (C) 1993-1999, 2000, 2001 Free Software Foundation, Inc.
+ This file is part of 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 Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+/* This file has been modified for usage in libiberty. It includes "xregex.h"
+ instead of <regex.h>. The "xregex.h" header file renames all external
+ routines with an "x" prefix so they do not collide with the native regex
+ routines or with other components regex routines. */
+/* AIX requires this to be the first thing in the file. */
+#if defined _AIX && !defined REGEX_MALLOC
+ #pragma alloca
+#endif
+
+#undef _GNU_SOURCE
+#define _GNU_SOURCE
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifndef PARAMS
+# if defined __GNUC__ || (defined __STDC__ && __STDC__)
+# define PARAMS(args) args
+# else
+# define PARAMS(args) ()
+# endif /* GCC. */
+#endif /* Not PARAMS. */
+
+#ifndef INSIDE_RECURSION
+
+# if defined STDC_HEADERS && !defined emacs
+# include <stddef.h>
+# else
+/* We need this for `regex.h', and perhaps for the Emacs include files. */
+# include <sys/types.h>
+# endif
+
+# define WIDE_CHAR_SUPPORT (HAVE_WCTYPE_H && HAVE_WCHAR_H && HAVE_BTOWC)
+
+/* For platform which support the ISO C amendement 1 functionality we
+ support user defined character classes. */
+# if defined _LIBC || WIDE_CHAR_SUPPORT
+/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */
+# include <wchar.h>
+# include <wctype.h>
+# endif
+
+# ifdef _LIBC
+/* We have to keep the namespace clean. */
+# define regfree(preg) __regfree (preg)
+# define regexec(pr, st, nm, pm, ef) __regexec (pr, st, nm, pm, ef)
+# define regcomp(preg, pattern, cflags) __regcomp (preg, pattern, cflags)
+# define regerror(errcode, preg, errbuf, errbuf_size) \
+ __regerror(errcode, preg, errbuf, errbuf_size)
+# define re_set_registers(bu, re, nu, st, en) \
+ __re_set_registers (bu, re, nu, st, en)
+# define re_match_2(bufp, string1, size1, string2, size2, pos, regs, stop) \
+ __re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop)
+# define re_match(bufp, string, size, pos, regs) \
+ __re_match (bufp, string, size, pos, regs)
+# define re_search(bufp, string, size, startpos, range, regs) \
+ __re_search (bufp, string, size, startpos, range, regs)
+# define re_compile_pattern(pattern, length, bufp) \
+ __re_compile_pattern (pattern, length, bufp)
+# define re_set_syntax(syntax) __re_set_syntax (syntax)
+# define re_search_2(bufp, st1, s1, st2, s2, startpos, range, regs, stop) \
+ __re_search_2 (bufp, st1, s1, st2, s2, startpos, range, regs, stop)
+# define re_compile_fastmap(bufp) __re_compile_fastmap (bufp)
+
+# define btowc __btowc
+
+/* We are also using some library internals. */
+# include <locale/localeinfo.h>
+# include <locale/elem-hash.h>
+# include <langinfo.h>
+# include <locale/coll-lookup.h>
+# endif
+
+/* This is for other GNU distributions with internationalized messages. */
+# if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC
+# include <libintl.h>
+# ifdef _LIBC
+# undef gettext
+# define gettext(msgid) __dcgettext ("libc", msgid, LC_MESSAGES)
+# endif
+# else
+# define gettext(msgid) (msgid)
+# endif
+
+# ifndef gettext_noop
+/* This define is so xgettext can find the internationalizable
+ strings. */
+# define gettext_noop(String) String
+# endif
+
+/* The `emacs' switch turns on certain matching commands
+ that make sense only in Emacs. */
+# ifdef emacs
+
+# include "lisp.h"
+# include "buffer.h"
+# include "syntax.h"
+
+# else /* not emacs */
+
+/* If we are not linking with Emacs proper,
+ we can't use the relocating allocator
+ even if config.h says that we can. */
+# undef REL_ALLOC
+
+# if defined STDC_HEADERS || defined _LIBC
+# include <stdlib.h>
+# else
+char *malloc ();
+char *realloc ();
+# endif
+
+/* When used in Emacs's lib-src, we need to get bzero and bcopy somehow.
+ If nothing else has been done, use the method below. */
+# ifdef INHIBIT_STRING_HEADER
+# if !(defined HAVE_BZERO && defined HAVE_BCOPY)
+# if !defined bzero && !defined bcopy
+# undef INHIBIT_STRING_HEADER
+# endif
+# endif
+# endif
+
+/* This is the normal way of making sure we have a bcopy and a bzero.
+ This is used in most programs--a few other programs avoid this
+ by defining INHIBIT_STRING_HEADER. */
+# ifndef INHIBIT_STRING_HEADER
+# if defined HAVE_STRING_H || defined STDC_HEADERS || defined _LIBC
+# include <string.h>
+# ifndef bzero
+# ifndef _LIBC
+# define bzero(s, n) (memset (s, '\0', n), (s))
+# else
+# define bzero(s, n) __bzero (s, n)
+# endif
+# endif
+# else
+# include <strings.h>
+# ifndef memcmp
+# define memcmp(s1, s2, n) bcmp (s1, s2, n)
+# endif
+# ifndef memcpy
+# define memcpy(d, s, n) (bcopy (s, d, n), (d))
+# endif
+# endif
+# endif
+
+/* Define the syntax stuff for \<, \>, etc. */
+
+/* This must be nonzero for the wordchar and notwordchar pattern
+ commands in re_match_2. */
+# ifndef Sword
+# define Sword 1
+# endif
+
+# ifdef SWITCH_ENUM_BUG
+# define SWITCH_ENUM_CAST(x) ((int)(x))
+# else
+# define SWITCH_ENUM_CAST(x) (x)
+# endif
+
+# endif /* not emacs */
+
+# if defined _LIBC || HAVE_LIMITS_H
+# include <limits.h>
+# endif
+
+# ifndef MB_LEN_MAX
+# define MB_LEN_MAX 1
+# endif
+
+/* Get the interface, including the syntax bits. */
+# include "xregex.h" /* change for libiberty */
+
+/* isalpha etc. are used for the character classes. */
+# include <ctype.h>
+
+/* Jim Meyering writes:
+
+ "... Some ctype macros are valid only for character codes that
+ isascii says are ASCII (SGI's IRIX-4.0.5 is one such system --when
+ using /bin/cc or gcc but without giving an ansi option). So, all
+ ctype uses should be through macros like ISPRINT... If
+ STDC_HEADERS is defined, then autoconf has verified that the ctype
+ macros don't need to be guarded with references to isascii. ...
+ Defining isascii to 1 should let any compiler worth its salt
+ eliminate the && through constant folding."
+ Solaris defines some of these symbols so we must undefine them first. */
+
+# undef ISASCII
+# if defined STDC_HEADERS || (!defined isascii && !defined HAVE_ISASCII)
+# define ISASCII(c) 1
+# else
+# define ISASCII(c) isascii(c)
+# endif
+
+# ifdef isblank
+# define ISBLANK(c) (ISASCII (c) && isblank (c))
+# else
+# define ISBLANK(c) ((c) == ' ' || (c) == '\t')
+# endif
+# ifdef isgraph
+# define ISGRAPH(c) (ISASCII (c) && isgraph (c))
+# else
+# define ISGRAPH(c) (ISASCII (c) && isprint (c) && !isspace (c))
+# endif
+
+# undef ISPRINT
+# define ISPRINT(c) (ISASCII (c) && isprint (c))
+# define ISDIGIT(c) (ISASCII (c) && isdigit (c))
+# define ISALNUM(c) (ISASCII (c) && isalnum (c))
+# define ISALPHA(c) (ISASCII (c) && isalpha (c))
+# define ISCNTRL(c) (ISASCII (c) && iscntrl (c))
+# define ISLOWER(c) (ISASCII (c) && islower (c))
+# define ISPUNCT(c) (ISASCII (c) && ispunct (c))
+# define ISSPACE(c) (ISASCII (c) && isspace (c))
+# define ISUPPER(c) (ISASCII (c) && isupper (c))
+# define ISXDIGIT(c) (ISASCII (c) && isxdigit (c))
+
+# ifdef _tolower
+# define TOLOWER(c) _tolower(c)
+# else
+# define TOLOWER(c) tolower(c)
+# endif
+
+# ifndef NULL
+# define NULL (void *)0
+# endif
+
+/* We remove any previous definition of `SIGN_EXTEND_CHAR',
+ since ours (we hope) works properly with all combinations of
+ machines, compilers, `char' and `unsigned char' argument types.
+ (Per Bothner suggested the basic approach.) */
+# undef SIGN_EXTEND_CHAR
+# if __STDC__
+# define SIGN_EXTEND_CHAR(c) ((signed char) (c))
+# else /* not __STDC__ */
+/* As in Harbison and Steele. */
+# define SIGN_EXTEND_CHAR(c) ((((unsigned char) (c)) ^ 128) - 128)
+# endif
+
+# ifndef emacs
+/* How many characters in the character set. */
+# define CHAR_SET_SIZE 256
+
+# ifdef SYNTAX_TABLE
+
+extern char *re_syntax_table;
+
+# else /* not SYNTAX_TABLE */
+
+static char re_syntax_table[CHAR_SET_SIZE];
+
+static void init_syntax_once PARAMS ((void));
+
+static void
+init_syntax_once ()
+{
+ register int c;
+ static int done = 0;
+
+ if (done)
+ return;
+ bzero (re_syntax_table, sizeof re_syntax_table);
+
+ for (c = 0; c < CHAR_SET_SIZE; ++c)
+ if (ISALNUM (c))
+ re_syntax_table[c] = Sword;
+
+ re_syntax_table['_'] = Sword;
+
+ done = 1;
+}
+
+# endif /* not SYNTAX_TABLE */
+
+# define SYNTAX(c) re_syntax_table[(unsigned char) (c)]
+
+# endif /* emacs */
+
+/* Integer type for pointers. */
+# if !defined _LIBC && !defined HAVE_UINTPTR_T
+typedef unsigned long int uintptr_t;
+# endif
+
+/* Should we use malloc or alloca? If REGEX_MALLOC is not defined, we
+ use `alloca' instead of `malloc'. This is because using malloc in
+ re_search* or re_match* could cause memory leaks when C-g is used in
+ Emacs; also, malloc is slower and causes storage fragmentation. On
+ the other hand, malloc is more portable, and easier to debug.
+
+ Because we sometimes use alloca, some routines have to be macros,
+ not functions -- `alloca'-allocated space disappears at the end of the
+ function it is called in. */
+
+# ifdef REGEX_MALLOC
+
+# define REGEX_ALLOCATE malloc
+# define REGEX_REALLOCATE(source, osize, nsize) realloc (source, nsize)
+# define REGEX_FREE free
+
+# else /* not REGEX_MALLOC */
+
+/* Emacs already defines alloca, sometimes. */
+# ifndef alloca
+
+/* Make alloca work the best possible way. */
+# ifdef __GNUC__
+# define alloca __builtin_alloca
+# else /* not __GNUC__ */
+# if HAVE_ALLOCA_H
+# include <alloca.h>
+# endif /* HAVE_ALLOCA_H */
+# endif /* not __GNUC__ */
+
+# endif /* not alloca */
+
+# define REGEX_ALLOCATE alloca
+
+/* Assumes a `char *destination' variable. */
+# define REGEX_REALLOCATE(source, osize, nsize) \
+ (destination = (char *) alloca (nsize), \
+ memcpy (destination, source, osize))
+
+/* No need to do anything to free, after alloca. */
+# define REGEX_FREE(arg) ((void)0) /* Do nothing! But inhibit gcc warning. */
+
+# endif /* not REGEX_MALLOC */
+
+/* Define how to allocate the failure stack. */
+
+# if defined REL_ALLOC && defined REGEX_MALLOC
+
+# define REGEX_ALLOCATE_STACK(size) \
+ r_alloc (&failure_stack_ptr, (size))
+# define REGEX_REALLOCATE_STACK(source, osize, nsize) \
+ r_re_alloc (&failure_stack_ptr, (nsize))
+# define REGEX_FREE_STACK(ptr) \
+ r_alloc_free (&failure_stack_ptr)
+
+# else /* not using relocating allocator */
+
+# ifdef REGEX_MALLOC
+
+# define REGEX_ALLOCATE_STACK malloc
+# define REGEX_REALLOCATE_STACK(source, osize, nsize) realloc (source, nsize)
+# define REGEX_FREE_STACK free
+
+# else /* not REGEX_MALLOC */
+
+# define REGEX_ALLOCATE_STACK alloca
+
+# define REGEX_REALLOCATE_STACK(source, osize, nsize) \
+ REGEX_REALLOCATE (source, osize, nsize)
+/* No need to explicitly free anything. */
+# define REGEX_FREE_STACK(arg)
+
+# endif /* not REGEX_MALLOC */
+# endif /* not using relocating allocator */
+
+
+/* True if `size1' is non-NULL and PTR is pointing anywhere inside
+ `string1' or just past its end. This works if PTR is NULL, which is
+ a good thing. */
+# define FIRST_STRING_P(ptr) \
+ (size1 && string1 <= (ptr) && (ptr) <= string1 + size1)
+
+/* (Re)Allocate N items of type T using malloc, or fail. */
+# define TALLOC(n, t) ((t *) malloc ((n) * sizeof (t)))
+# define RETALLOC(addr, n, t) ((addr) = (t *) realloc (addr, (n) * sizeof (t)))
+# define RETALLOC_IF(addr, n, t) \
+ if (addr) RETALLOC((addr), (n), t); else (addr) = TALLOC ((n), t)
+# define REGEX_TALLOC(n, t) ((t *) REGEX_ALLOCATE ((n) * sizeof (t)))
+
+# define BYTEWIDTH 8 /* In bits. */
+
+# define STREQ(s1, s2) ((strcmp (s1, s2) == 0))
+
+# undef MAX
+# undef MIN
+# define MAX(a, b) ((a) > (b) ? (a) : (b))
+# define MIN(a, b) ((a) < (b) ? (a) : (b))
+
+typedef char boolean;
+# define false 0
+# define true 1
+
+static reg_errcode_t byte_regex_compile _RE_ARGS ((const char *pattern, size_t size,
+ reg_syntax_t syntax,
+ struct re_pattern_buffer *bufp));
+
+static int byte_re_match_2_internal PARAMS ((struct re_pattern_buffer *bufp,
+ const char *string1, int size1,
+ const char *string2, int size2,
+ int pos,
+ struct re_registers *regs,
+ int stop));
+static int byte_re_search_2 PARAMS ((struct re_pattern_buffer *bufp,
+ const char *string1, int size1,
+ const char *string2, int size2,
+ int startpos, int range,
+ struct re_registers *regs, int stop));
+static int byte_re_compile_fastmap PARAMS ((struct re_pattern_buffer *bufp));
+
+#ifdef MBS_SUPPORT
+static reg_errcode_t wcs_regex_compile _RE_ARGS ((const char *pattern, size_t size,
+ reg_syntax_t syntax,
+ struct re_pattern_buffer *bufp));
+
+
+static int wcs_re_match_2_internal PARAMS ((struct re_pattern_buffer *bufp,
+ const char *cstring1, int csize1,
+ const char *cstring2, int csize2,
+ int pos,
+ struct re_registers *regs,
+ int stop,
+ wchar_t *string1, int size1,
+ wchar_t *string2, int size2,
+ int *mbs_offset1, int *mbs_offset2));
+static int wcs_re_search_2 PARAMS ((struct re_pattern_buffer *bufp,
+ const char *string1, int size1,
+ const char *string2, int size2,
+ int startpos, int range,
+ struct re_registers *regs, int stop));
+static int wcs_re_compile_fastmap PARAMS ((struct re_pattern_buffer *bufp));
+#endif
+
+/* These are the command codes that appear in compiled regular
+ expressions. Some opcodes are followed by argument bytes. A
+ command code can specify any interpretation whatsoever for its
+ arguments. Zero bytes may appear in the compiled regular expression. */
+
+typedef enum
+{
+ no_op = 0,
+
+ /* Succeed right away--no more backtracking. */
+ succeed,
+
+ /* Followed by one byte giving n, then by n literal bytes. */
+ exactn,
+
+# ifdef MBS_SUPPORT
+ /* Same as exactn, but contains binary data. */
+ exactn_bin,
+# endif
+
+ /* Matches any (more or less) character. */
+ anychar,
+
+ /* Matches any one char belonging to specified set. First
+ following byte is number of bitmap bytes. Then come bytes
+ for a bitmap saying which chars are in. Bits in each byte
+ are ordered low-bit-first. A character is in the set if its
+ bit is 1. A character too large to have a bit in the map is
+ automatically not in the set. */
+ /* ifdef MBS_SUPPORT, following element is length of character
+ classes, length of collating symbols, length of equivalence
+ classes, length of character ranges, and length of characters.
+ Next, character class element, collating symbols elements,
+ equivalence class elements, range elements, and character
+ elements follow.
+ See regex_compile function. */
+ charset,
+
+ /* Same parameters as charset, but match any character that is
+ not one of those specified. */
+ charset_not,
+
+ /* Start remembering the text that is matched, for storing in a
+ register. Followed by one byte with the register number, in
+ the range 0 to one less than the pattern buffer's re_nsub
+ field. Then followed by one byte with the number of groups
+ inner to this one. (This last has to be part of the
+ start_memory only because we need it in the on_failure_jump
+ of re_match_2.) */
+ start_memory,
+
+ /* Stop remembering the text that is matched and store it in a
+ memory register. Followed by one byte with the register
+ number, in the range 0 to one less than `re_nsub' in the
+ pattern buffer, and one byte with the number of inner groups,
+ just like `start_memory'. (We need the number of inner
+ groups here because we don't have any easy way of finding the
+ corresponding start_memory when we're at a stop_memory.) */
+ stop_memory,
+
+ /* Match a duplicate of something remembered. Followed by one
+ byte containing the register number. */
+ duplicate,
+
+ /* Fail unless at beginning of line. */
+ begline,
+
+ /* Fail unless at end of line. */
+ endline,
+
+ /* Succeeds if at beginning of buffer (if emacs) or at beginning
+ of string to be matched (if not). */
+ begbuf,
+
+ /* Analogously, for end of buffer/string. */
+ endbuf,
+
+ /* Followed by two byte relative address to which to jump. */
+ jump,
+
+ /* Same as jump, but marks the end of an alternative. */
+ jump_past_alt,
+
+ /* Followed by two-byte relative address of place to resume at
+ in case of failure. */
+ /* ifdef MBS_SUPPORT, the size of address is 1. */
+ on_failure_jump,
+
+ /* Like on_failure_jump, but pushes a placeholder instead of the
+ current string position when executed. */
+ on_failure_keep_string_jump,
+
+ /* Throw away latest failure point and then jump to following
+ two-byte relative address. */
+ /* ifdef MBS_SUPPORT, the size of address is 1. */
+ pop_failure_jump,
+
+ /* Change to pop_failure_jump if know won't have to backtrack to
+ match; otherwise change to jump. This is used to jump
+ back to the beginning of a repeat. If what follows this jump
+ clearly won't match what the repeat does, such that we can be
+ sure that there is no use backtracking out of repetitions
+ already matched, then we change it to a pop_failure_jump.
+ Followed by two-byte address. */
+ /* ifdef MBS_SUPPORT, the size of address is 1. */
+ maybe_pop_jump,
+
+ /* Jump to following two-byte address, and push a dummy failure
+ point. This failure point will be thrown away if an attempt
+ is made to use it for a failure. A `+' construct makes this
+ before the first repeat. Also used as an intermediary kind
+ of jump when compiling an alternative. */
+ /* ifdef MBS_SUPPORT, the size of address is 1. */
+ dummy_failure_jump,
+
+ /* Push a dummy failure point and continue. Used at the end of
+ alternatives. */
+ push_dummy_failure,
+
+ /* Followed by two-byte relative address and two-byte number n.
+ After matching N times, jump to the address upon failure. */
+ /* ifdef MBS_SUPPORT, the size of address is 1. */
+ succeed_n,
+
+ /* Followed by two-byte relative address, and two-byte number n.
+ Jump to the address N times, then fail. */
+ /* ifdef MBS_SUPPORT, the size of address is 1. */
+ jump_n,
+
+ /* Set the following two-byte relative address to the
+ subsequent two-byte number. The address *includes* the two
+ bytes of number. */
+ /* ifdef MBS_SUPPORT, the size of address is 1. */
+ set_number_at,
+
+ wordchar, /* Matches any word-constituent character. */
+ notwordchar, /* Matches any char that is not a word-constituent. */
+
+ wordbeg, /* Succeeds if at word beginning. */
+ wordend, /* Succeeds if at word end. */
+
+ wordbound, /* Succeeds if at a word boundary. */
+ notwordbound /* Succeeds if not at a word boundary. */
+
+# ifdef emacs
+ ,before_dot, /* Succeeds if before point. */
+ at_dot, /* Succeeds if at point. */
+ after_dot, /* Succeeds if after point. */
+
+ /* Matches any character whose syntax is specified. Followed by
+ a byte which contains a syntax code, e.g., Sword. */
+ syntaxspec,
+
+ /* Matches any character whose syntax is not that specified. */
+ notsyntaxspec
+# endif /* emacs */
+} re_opcode_t;
+#endif /* not INSIDE_RECURSION */
+
+
+#ifdef BYTE
+# define CHAR_T char
+# define UCHAR_T unsigned char
+# define COMPILED_BUFFER_VAR bufp->buffer
+# define OFFSET_ADDRESS_SIZE 2
+# if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
+# define PREFIX(name) byte_##name
+# else
+# define PREFIX(name) byte_/**/name
+# endif
+# define ARG_PREFIX(name) name
+# define PUT_CHAR(c) putchar (c)
+#else
+# ifdef WCHAR
+# define CHAR_T wchar_t
+# define UCHAR_T wchar_t
+# define COMPILED_BUFFER_VAR wc_buffer
+# define OFFSET_ADDRESS_SIZE 1 /* the size which STORE_NUMBER macro use */
+# define CHAR_CLASS_SIZE ((__alignof__(wctype_t)+sizeof(wctype_t))/sizeof(CHAR_T)+1)
+# if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
+# define PREFIX(name) wcs_##name
+# define ARG_PREFIX(name) c##name
+# else
+# define PREFIX(name) wcs_/**/name
+# define ARG_PREFIX(name) c/**/name
+# endif
+/* Should we use wide stream?? */
+# define PUT_CHAR(c) printf ("%C", c);
+# define TRUE 1
+# define FALSE 0
+# else
+# ifdef MBS_SUPPORT
+# define WCHAR
+# define INSIDE_RECURSION
+# include "regex.c"
+# undef INSIDE_RECURSION
+# endif
+# define BYTE
+# define INSIDE_RECURSION
+# include "regex.c"
+# undef INSIDE_RECURSION
+# endif
+#endif
+
+#ifdef INSIDE_RECURSION
+/* Common operations on the compiled pattern. */
+
+/* Store NUMBER in two contiguous bytes starting at DESTINATION. */
+/* ifdef MBS_SUPPORT, we store NUMBER in 1 element. */
+
+# ifdef WCHAR
+# define STORE_NUMBER(destination, number) \
+ do { \
+ *(destination) = (UCHAR_T)(number); \
+ } while (0)
+# else /* BYTE */
+# define STORE_NUMBER(destination, number) \
+ do { \
+ (destination)[0] = (number) & 0377; \
+ (destination)[1] = (number) >> 8; \
+ } while (0)
+# endif /* WCHAR */
+
+/* Same as STORE_NUMBER, except increment DESTINATION to
+ the byte after where the number is stored. Therefore, DESTINATION
+ must be an lvalue. */
+/* ifdef MBS_SUPPORT, we store NUMBER in 1 element. */
+
+# define STORE_NUMBER_AND_INCR(destination, number) \
+ do { \
+ STORE_NUMBER (destination, number); \
+ (destination) += OFFSET_ADDRESS_SIZE; \
+ } while (0)
+
+/* Put into DESTINATION a number stored in two contiguous bytes starting
+ at SOURCE. */
+/* ifdef MBS_SUPPORT, we store NUMBER in 1 element. */
+
+# ifdef WCHAR
+# define EXTRACT_NUMBER(destination, source) \
+ do { \
+ (destination) = *(source); \
+ } while (0)
+# else /* BYTE */
+# define EXTRACT_NUMBER(destination, source) \
+ do { \
+ (destination) = *(source) & 0377; \
+ (destination) += SIGN_EXTEND_CHAR (*((source) + 1)) << 8; \
+ } while (0)
+# endif
+
+# ifdef DEBUG
+static void PREFIX(extract_number) _RE_ARGS ((int *dest, UCHAR_T *source));
+static void
+PREFIX(extract_number) (dest, source)
+ int *dest;
+ UCHAR_T *source;
+{
+# ifdef WCHAR
+ *dest = *source;
+# else /* BYTE */
+ int temp = SIGN_EXTEND_CHAR (*(source + 1));
+ *dest = *source & 0377;
+ *dest += temp << 8;
+# endif
+}
+
+# ifndef EXTRACT_MACROS /* To debug the macros. */
+# undef EXTRACT_NUMBER
+# define EXTRACT_NUMBER(dest, src) PREFIX(extract_number) (&dest, src)
+# endif /* not EXTRACT_MACROS */
+
+# endif /* DEBUG */
+
+/* Same as EXTRACT_NUMBER, except increment SOURCE to after the number.
+ SOURCE must be an lvalue. */
+
+# define EXTRACT_NUMBER_AND_INCR(destination, source) \
+ do { \
+ EXTRACT_NUMBER (destination, source); \
+ (source) += OFFSET_ADDRESS_SIZE; \
+ } while (0)
+
+# ifdef DEBUG
+static void PREFIX(extract_number_and_incr) _RE_ARGS ((int *destination,
+ UCHAR_T **source));
+static void
+PREFIX(extract_number_and_incr) (destination, source)
+ int *destination;
+ UCHAR_T **source;
+{
+ PREFIX(extract_number) (destination, *source);
+ *source += OFFSET_ADDRESS_SIZE;
+}
+
+# ifndef EXTRACT_MACROS
+# undef EXTRACT_NUMBER_AND_INCR
+# define EXTRACT_NUMBER_AND_INCR(dest, src) \
+ PREFIX(extract_number_and_incr) (&dest, &src)
+# endif /* not EXTRACT_MACROS */
+
+# endif /* DEBUG */
+
+
+
+/* If DEBUG is defined, Regex prints many voluminous messages about what
+ it is doing (if the variable `debug' is nonzero). If linked with the
+ main program in `iregex.c', you can enter patterns and strings
+ interactively. And if linked with the main program in `main.c' and
+ the other test files, you can run the already-written tests. */
+
+# ifdef DEBUG
+
+# ifndef DEFINED_ONCE
+
+/* We use standard I/O for debugging. */
+# include <stdio.h>
+
+/* It is useful to test things that ``must'' be true when debugging. */
+# include <assert.h>
+
+static int debug;
+
+# define DEBUG_STATEMENT(e) e
+# define DEBUG_PRINT1(x) if (debug) printf (x)
+# define DEBUG_PRINT2(x1, x2) if (debug) printf (x1, x2)
+# define DEBUG_PRINT3(x1, x2, x3) if (debug) printf (x1, x2, x3)
+# define DEBUG_PRINT4(x1, x2, x3, x4) if (debug) printf (x1, x2, x3, x4)
+# endif /* not DEFINED_ONCE */
+
+# define DEBUG_PRINT_COMPILED_PATTERN(p, s, e) \
+ if (debug) PREFIX(print_partial_compiled_pattern) (s, e)
+# define DEBUG_PRINT_DOUBLE_STRING(w, s1, sz1, s2, sz2) \
+ if (debug) PREFIX(print_double_string) (w, s1, sz1, s2, sz2)
+
+
+/* Print the fastmap in human-readable form. */
+
+# ifndef DEFINED_ONCE
+void
+print_fastmap (fastmap)
+ char *fastmap;
+{
+ unsigned was_a_range = 0;
+ unsigned i = 0;
+
+ while (i < (1 << BYTEWIDTH))
+ {
+ if (fastmap[i++])
+ {
+ was_a_range = 0;
+ putchar (i - 1);
+ while (i < (1 << BYTEWIDTH) && fastmap[i])
+ {
+ was_a_range = 1;
+ i++;
+ }
+ if (was_a_range)
+ {
+ printf ("-");
+ putchar (i - 1);
+ }
+ }
+ }
+ putchar ('\n');
+}
+# endif /* not DEFINED_ONCE */
+
+
+/* Print a compiled pattern string in human-readable form, starting at
+ the START pointer into it and ending just before the pointer END. */
+
+void
+PREFIX(print_partial_compiled_pattern) (start, end)
+ UCHAR_T *start;
+ UCHAR_T *end;
+{
+ int mcnt, mcnt2;
+ UCHAR_T *p1;
+ UCHAR_T *p = start;
+ UCHAR_T *pend = end;
+
+ if (start == NULL)
+ {
+ printf ("(null)\n");
+ return;
+ }
+
+ /* Loop over pattern commands. */
+ while (p < pend)
+ {
+# ifdef _LIBC
+ printf ("%td:\t", p - start);
+# else
+ printf ("%ld:\t", (long int) (p - start));
+# endif
+
+ switch ((re_opcode_t) *p++)
+ {
+ case no_op:
+ printf ("/no_op");
+ break;
+
+ case exactn:
+ mcnt = *p++;
+ printf ("/exactn/%d", mcnt);
+ do
+ {
+ putchar ('/');
+ PUT_CHAR (*p++);
+ }
+ while (--mcnt);
+ break;
+
+# ifdef MBS_SUPPORT
+ case exactn_bin:
+ mcnt = *p++;
+ printf ("/exactn_bin/%d", mcnt);
+ do
+ {
+ printf("/%lx", (long int) *p++);
+ }
+ while (--mcnt);
+ break;
+# endif /* MBS_SUPPORT */
+
+ case start_memory:
+ mcnt = *p++;
+ printf ("/start_memory/%d/%ld", mcnt, (long int) *p++);
+ break;
+
+ case stop_memory:
+ mcnt = *p++;
+ printf ("/stop_memory/%d/%ld", mcnt, (long int) *p++);
+ break;
+
+ case duplicate:
+ printf ("/duplicate/%ld", (long int) *p++);
+ break;
+
+ case anychar:
+ printf ("/anychar");
+ break;
+
+ case charset:
+ case charset_not:
+ {
+# ifdef WCHAR
+ int i, length;
+ wchar_t *workp = p;
+ printf ("/charset [%s",
+ (re_opcode_t) *(workp - 1) == charset_not ? "^" : "");
+ p += 5;
+ length = *workp++; /* the length of char_classes */
+ for (i=0 ; i<length ; i++)
+ printf("[:%lx:]", (long int) *p++);
+ length = *workp++; /* the length of collating_symbol */
+ for (i=0 ; i<length ;)
+ {
+ printf("[.");
+ while(*p != 0)
+ PUT_CHAR((i++,*p++));
+ i++,p++;
+ printf(".]");
+ }
+ length = *workp++; /* the length of equivalence_class */
+ for (i=0 ; i<length ;)
+ {
+ printf("[=");
+ while(*p != 0)
+ PUT_CHAR((i++,*p++));
+ i++,p++;
+ printf("=]");
+ }
+ length = *workp++; /* the length of char_range */
+ for (i=0 ; i<length ; i++)
+ {
+ wchar_t range_start = *p++;
+ wchar_t range_end = *p++;
+ printf("%C-%C", range_start, range_end);
+ }
+ length = *workp++; /* the length of char */
+ for (i=0 ; i<length ; i++)
+ printf("%C", *p++);
+ putchar (']');
+# else
+ register int c, last = -100;
+ register int in_range = 0;
+
+ printf ("/charset [%s",
+ (re_opcode_t) *(p - 1) == charset_not ? "^" : "");
+
+ assert (p + *p < pend);
+
+ for (c = 0; c < 256; c++)
+ if (c / 8 < *p
+ && (p[1 + (c/8)] & (1 << (c % 8))))
+ {
+ /* Are we starting a range? */
+ if (last + 1 == c && ! in_range)
+ {
+ putchar ('-');
+ in_range = 1;
+ }
+ /* Have we broken a range? */
+ else if (last + 1 != c && in_range)
+ {
+ putchar (last);
+ in_range = 0;
+ }
+
+ if (! in_range)
+ putchar (c);
+
+ last = c;
+ }
+
+ if (in_range)
+ putchar (last);
+
+ putchar (']');
+
+ p += 1 + *p;
+# endif /* WCHAR */
+ }
+ break;
+
+ case begline:
+ printf ("/begline");
+ break;
+
+ case endline:
+ printf ("/endline");
+ break;
+
+ case on_failure_jump:
+ PREFIX(extract_number_and_incr) (&mcnt, &p);
+# ifdef _LIBC
+ printf ("/on_failure_jump to %td", p + mcnt - start);
+# else
+ printf ("/on_failure_jump to %ld", (long int) (p + mcnt - start));
+# endif
+ break;
+
+ case on_failure_keep_string_jump:
+ PREFIX(extract_number_and_incr) (&mcnt, &p);
+# ifdef _LIBC
+ printf ("/on_failure_keep_string_jump to %td", p + mcnt - start);
+# else
+ printf ("/on_failure_keep_string_jump to %ld",
+ (long int) (p + mcnt - start));
+# endif
+ break;
+
+ case dummy_failure_jump:
+ PREFIX(extract_number_and_incr) (&mcnt, &p);
+# ifdef _LIBC
+ printf ("/dummy_failure_jump to %td", p + mcnt - start);
+# else
+ printf ("/dummy_failure_jump to %ld", (long int) (p + mcnt - start));
+# endif
+ break;
+
+ case push_dummy_failure:
+ printf ("/push_dummy_failure");
+ break;
+
+ case maybe_pop_jump:
+ PREFIX(extract_number_and_incr) (&mcnt, &p);
+# ifdef _LIBC
+ printf ("/maybe_pop_jump to %td", p + mcnt - start);
+# else
+ printf ("/maybe_pop_jump to %ld", (long int) (p + mcnt - start));
+# endif
+ break;
+
+ case pop_failure_jump:
+ PREFIX(extract_number_and_incr) (&mcnt, &p);
+# ifdef _LIBC
+ printf ("/pop_failure_jump to %td", p + mcnt - start);
+# else
+ printf ("/pop_failure_jump to %ld", (long int) (p + mcnt - start));
+# endif
+ break;
+
+ case jump_past_alt:
+ PREFIX(extract_number_and_incr) (&mcnt, &p);
+# ifdef _LIBC
+ printf ("/jump_past_alt to %td", p + mcnt - start);
+# else
+ printf ("/jump_past_alt to %ld", (long int) (p + mcnt - start));
+# endif
+ break;
+
+ case jump:
+ PREFIX(extract_number_and_incr) (&mcnt, &p);
+# ifdef _LIBC
+ printf ("/jump to %td", p + mcnt - start);
+# else
+ printf ("/jump to %ld", (long int) (p + mcnt - start));
+# endif
+ break;
+
+ case succeed_n:
+ PREFIX(extract_number_and_incr) (&mcnt, &p);
+ p1 = p + mcnt;
+ PREFIX(extract_number_and_incr) (&mcnt2, &p);
+# ifdef _LIBC
+ printf ("/succeed_n to %td, %d times", p1 - start, mcnt2);
+# else
+ printf ("/succeed_n to %ld, %d times",
+ (long int) (p1 - start), mcnt2);
+# endif
+ break;
+
+ case jump_n:
+ PREFIX(extract_number_and_incr) (&mcnt, &p);
+ p1 = p + mcnt;
+ PREFIX(extract_number_and_incr) (&mcnt2, &p);
+ printf ("/jump_n to %d, %d times", p1 - start, mcnt2);
+ break;
+
+ case set_number_at:
+ PREFIX(extract_number_and_incr) (&mcnt, &p);
+ p1 = p + mcnt;
+ PREFIX(extract_number_and_incr) (&mcnt2, &p);
+# ifdef _LIBC
+ printf ("/set_number_at location %td to %d", p1 - start, mcnt2);
+# else
+ printf ("/set_number_at location %ld to %d",
+ (long int) (p1 - start), mcnt2);
+# endif
+ break;
+
+ case wordbound:
+ printf ("/wordbound");
+ break;
+
+ case notwordbound:
+ printf ("/notwordbound");
+ break;
+
+ case wordbeg:
+ printf ("/wordbeg");
+ break;
+
+ case wordend:
+ printf ("/wordend");
+ break;
+
+# ifdef emacs
+ case before_dot:
+ printf ("/before_dot");
+ break;
+
+ case at_dot:
+ printf ("/at_dot");
+ break;
+
+ case after_dot:
+ printf ("/after_dot");
+ break;
+
+ case syntaxspec:
+ printf ("/syntaxspec");
+ mcnt = *p++;
+ printf ("/%d", mcnt);
+ break;
+
+ case notsyntaxspec:
+ printf ("/notsyntaxspec");
+ mcnt = *p++;
+ printf ("/%d", mcnt);
+ break;
+# endif /* emacs */
+
+ case wordchar:
+ printf ("/wordchar");
+ break;
+
+ case notwordchar:
+ printf ("/notwordchar");
+ break;
+
+ case begbuf:
+ printf ("/begbuf");
+ break;
+
+ case endbuf:
+ printf ("/endbuf");
+ break;
+
+ default:
+ printf ("?%ld", (long int) *(p-1));
+ }
+
+ putchar ('\n');
+ }
+
+# ifdef _LIBC
+ printf ("%td:\tend of pattern.\n", p - start);
+# else
+ printf ("%ld:\tend of pattern.\n", (long int) (p - start));
+# endif
+}
+
+
+void
+PREFIX(print_compiled_pattern) (bufp)
+ struct re_pattern_buffer *bufp;
+{
+ UCHAR_T *buffer = (UCHAR_T*) bufp->buffer;
+
+ PREFIX(print_partial_compiled_pattern) (buffer, buffer
+ + bufp->used / sizeof(UCHAR_T));
+ printf ("%ld bytes used/%ld bytes allocated.\n",
+ bufp->used, bufp->allocated);
+
+ if (bufp->fastmap_accurate && bufp->fastmap)
+ {
+ printf ("fastmap: ");
+ print_fastmap (bufp->fastmap);
+ }
+
+# ifdef _LIBC
+ printf ("re_nsub: %Zd\t", bufp->re_nsub);
+# else
+ printf ("re_nsub: %ld\t", (long int) bufp->re_nsub);
+# endif
+ printf ("regs_alloc: %d\t", bufp->regs_allocated);
+ printf ("can_be_null: %d\t", bufp->can_be_null);
+ printf ("newline_anchor: %d\n", bufp->newline_anchor);
+ printf ("no_sub: %d\t", bufp->no_sub);
+ printf ("not_bol: %d\t", bufp->not_bol);
+ printf ("not_eol: %d\t", bufp->not_eol);
+ printf ("syntax: %lx\n", bufp->syntax);
+ /* Perhaps we should print the translate table? */
+}
+
+
+void
+PREFIX(print_double_string) (where, string1, size1, string2, size2)
+ const CHAR_T *where;
+ const CHAR_T *string1;
+ const CHAR_T *string2;
+ int size1;
+ int size2;
+{
+ int this_char;
+
+ if (where == NULL)
+ printf ("(null)");
+ else
+ {
+ int cnt;
+
+ if (FIRST_STRING_P (where))
+ {
+ for (this_char = where - string1; this_char < size1; this_char++)
+ PUT_CHAR (string1[this_char]);
+
+ where = string2;
+ }
+
+ cnt = 0;
+ for (this_char = where - string2; this_char < size2; this_char++)
+ {
+ PUT_CHAR (string2[this_char]);
+ if (++cnt > 100)
+ {
+ fputs ("...", stdout);
+ break;
+ }
+ }
+ }
+}
+
+# ifndef DEFINED_ONCE
+void
+printchar (c)
+ int c;
+{
+ putc (c, stderr);
+}
+# endif
+
+# else /* not DEBUG */
+
+# ifndef DEFINED_ONCE
+# undef assert
+# define assert(e)
+
+# define DEBUG_STATEMENT(e)
+# define DEBUG_PRINT1(x)
+# define DEBUG_PRINT2(x1, x2)
+# define DEBUG_PRINT3(x1, x2, x3)
+# define DEBUG_PRINT4(x1, x2, x3, x4)
+# endif /* not DEFINED_ONCE */
+# define DEBUG_PRINT_COMPILED_PATTERN(p, s, e)
+# define DEBUG_PRINT_DOUBLE_STRING(w, s1, sz1, s2, sz2)
+
+# endif /* not DEBUG */
+
+
+
+# ifdef WCHAR
+/* This convert a multibyte string to a wide character string.
+ And write their correspondances to offset_buffer(see below)
+ and write whether each wchar_t is binary data to is_binary.
+ This assume invalid multibyte sequences as binary data.
+ We assume offset_buffer and is_binary is already allocated
+ enough space. */
+
+static size_t convert_mbs_to_wcs (CHAR_T *dest, const unsigned char* src,
+ size_t len, int *offset_buffer,
+ char *is_binary);
+static size_t
+convert_mbs_to_wcs (dest, src, len, offset_buffer, is_binary)
+ CHAR_T *dest;
+ const unsigned char* src;
+ size_t len; /* the length of multibyte string. */
+
+ /* It hold correspondances between src(char string) and
+ dest(wchar_t string) for optimization.
+ e.g. src = "xxxyzz"
+ dest = {'X', 'Y', 'Z'}
+ (each "xxx", "y" and "zz" represent one multibyte character
+ corresponding to 'X', 'Y' and 'Z'.)
+ offset_buffer = {0, 0+3("xxx"), 0+3+1("y"), 0+3+1+2("zz")}
+ = {0, 3, 4, 6}
+ */
+ int *offset_buffer;
+ char *is_binary;
+{
+ wchar_t *pdest = dest;
+ const unsigned char *psrc = src;
+ size_t wc_count = 0;
+
+ mbstate_t mbs;
+ int i, consumed;
+ size_t mb_remain = len;
+ size_t mb_count = 0;
+
+ /* Initialize the conversion state. */
+ memset (&mbs, 0, sizeof (mbstate_t));
+
+ offset_buffer[0] = 0;
+ for( ; mb_remain > 0 ; ++wc_count, ++pdest, mb_remain -= consumed,
+ psrc += consumed)
+ {
+#ifdef _LIBC
+ consumed = __mbrtowc (pdest, psrc, mb_remain, &mbs);
+#else
+ consumed = mbrtowc (pdest, psrc, mb_remain, &mbs);
+#endif
+
+ if (consumed <= 0)
+ /* failed to convert. maybe src contains binary data.
+ So we consume 1 byte manualy. */
+ {
+ *pdest = *psrc;
+ consumed = 1;
+ is_binary[wc_count] = TRUE;
+ }
+ else
+ is_binary[wc_count] = FALSE;
+ /* In sjis encoding, we use yen sign as escape character in
+ place of reverse solidus. So we convert 0x5c(yen sign in
+ sjis) to not 0xa5(yen sign in UCS2) but 0x5c(reverse
+ solidus in UCS2). */
+ if (consumed == 1 && (int) *psrc == 0x5c && (int) *pdest == 0xa5)
+ *pdest = (wchar_t) *psrc;
+
+ offset_buffer[wc_count + 1] = mb_count += consumed;
+ }
+
+ /* Fill remain of the buffer with sentinel. */
+ for (i = wc_count + 1 ; i <= len ; i++)
+ offset_buffer[i] = mb_count + 1;
+
+ return wc_count;
+}
+
+# endif /* WCHAR */
+
+#else /* not INSIDE_RECURSION */
+
+/* Set by `re_set_syntax' to the current regexp syntax to recognize. Can
+ also be assigned to arbitrarily: each pattern buffer stores its own
+ syntax, so it can be changed between regex compilations. */
+/* This has no initializer because initialized variables in Emacs
+ become read-only after dumping. */
+reg_syntax_t re_syntax_options;
+
+
+/* Specify the precise syntax of regexps for compilation. This provides
+ for compatibility for various utilities which historically have
+ different, incompatible syntaxes.
+
+ The argument SYNTAX is a bit mask comprised of the various bits
+ defined in regex.h. We return the old syntax. */
+
+reg_syntax_t
+re_set_syntax (syntax)
+ reg_syntax_t syntax;
+{
+ reg_syntax_t ret = re_syntax_options;
+
+ re_syntax_options = syntax;
+# ifdef DEBUG
+ if (syntax & RE_DEBUG)
+ debug = 1;
+ else if (debug) /* was on but now is not */
+ debug = 0;
+# endif /* DEBUG */
+ return ret;
+}
+# ifdef _LIBC
+weak_alias (__re_set_syntax, re_set_syntax)
+# endif
+
+/* This table gives an error message for each of the error codes listed
+ in regex.h. Obviously the order here has to be same as there.
+ POSIX doesn't require that we do anything for REG_NOERROR,
+ but why not be nice? */
+
+static const char re_error_msgid[] =
+ {
+# define REG_NOERROR_IDX 0
+ gettext_noop ("Success") /* REG_NOERROR */
+ "\0"
+# define REG_NOMATCH_IDX (REG_NOERROR_IDX + sizeof "Success")
+ gettext_noop ("No match") /* REG_NOMATCH */
+ "\0"
+# define REG_BADPAT_IDX (REG_NOMATCH_IDX + sizeof "No match")
+ gettext_noop ("Invalid regular expression") /* REG_BADPAT */
+ "\0"
+# define REG_ECOLLATE_IDX (REG_BADPAT_IDX + sizeof "Invalid regular expression")
+ gettext_noop ("Invalid collation character") /* REG_ECOLLATE */
+ "\0"
+# define REG_ECTYPE_IDX (REG_ECOLLATE_IDX + sizeof "Invalid collation character")
+ gettext_noop ("Invalid character class name") /* REG_ECTYPE */
+ "\0"
+# define REG_EESCAPE_IDX (REG_ECTYPE_IDX + sizeof "Invalid character class name")
+ gettext_noop ("Trailing backslash") /* REG_EESCAPE */
+ "\0"
+# define REG_ESUBREG_IDX (REG_EESCAPE_IDX + sizeof "Trailing backslash")
+ gettext_noop ("Invalid back reference") /* REG_ESUBREG */
+ "\0"
+# define REG_EBRACK_IDX (REG_ESUBREG_IDX + sizeof "Invalid back reference")
+ gettext_noop ("Unmatched [ or [^") /* REG_EBRACK */
+ "\0"
+# define REG_EPAREN_IDX (REG_EBRACK_IDX + sizeof "Unmatched [ or [^")
+ gettext_noop ("Unmatched ( or \\(") /* REG_EPAREN */
+ "\0"
+# define REG_EBRACE_IDX (REG_EPAREN_IDX + sizeof "Unmatched ( or \\(")
+ gettext_noop ("Unmatched \\{") /* REG_EBRACE */
+ "\0"
+# define REG_BADBR_IDX (REG_EBRACE_IDX + sizeof "Unmatched \\{")
+ gettext_noop ("Invalid content of \\{\\}") /* REG_BADBR */
+ "\0"
+# define REG_ERANGE_IDX (REG_BADBR_IDX + sizeof "Invalid content of \\{\\}")
+ gettext_noop ("Invalid range end") /* REG_ERANGE */
+ "\0"
+# define REG_ESPACE_IDX (REG_ERANGE_IDX + sizeof "Invalid range end")
+ gettext_noop ("Memory exhausted") /* REG_ESPACE */
+ "\0"
+# define REG_BADRPT_IDX (REG_ESPACE_IDX + sizeof "Memory exhausted")
+ gettext_noop ("Invalid preceding regular expression") /* REG_BADRPT */
+ "\0"
+# define REG_EEND_IDX (REG_BADRPT_IDX + sizeof "Invalid preceding regular expression")
+ gettext_noop ("Premature end of regular expression") /* REG_EEND */
+ "\0"
+# define REG_ESIZE_IDX (REG_EEND_IDX + sizeof "Premature end of regular expression")
+ gettext_noop ("Regular expression too big") /* REG_ESIZE */
+ "\0"
+# define REG_ERPAREN_IDX (REG_ESIZE_IDX + sizeof "Regular expression too big")
+ gettext_noop ("Unmatched ) or \\)") /* REG_ERPAREN */
+ };
+
+static const size_t re_error_msgid_idx[] =
+ {
+ REG_NOERROR_IDX,
+ REG_NOMATCH_IDX,
+ REG_BADPAT_IDX,
+ REG_ECOLLATE_IDX,
+ REG_ECTYPE_IDX,
+ REG_EESCAPE_IDX,
+ REG_ESUBREG_IDX,
+ REG_EBRACK_IDX,
+ REG_EPAREN_IDX,
+ REG_EBRACE_IDX,
+ REG_BADBR_IDX,
+ REG_ERANGE_IDX,
+ REG_ESPACE_IDX,
+ REG_BADRPT_IDX,
+ REG_EEND_IDX,
+ REG_ESIZE_IDX,
+ REG_ERPAREN_IDX
+ };
+
+#endif /* INSIDE_RECURSION */
+
+#ifndef DEFINED_ONCE
+/* Avoiding alloca during matching, to placate r_alloc. */
+
+/* Define MATCH_MAY_ALLOCATE unless we need to make sure that the
+ searching and matching functions should not call alloca. On some
+ systems, alloca is implemented in terms of malloc, and if we're
+ using the relocating allocator routines, then malloc could cause a
+ relocation, which might (if the strings being searched are in the
+ ralloc heap) shift the data out from underneath the regexp
+ routines.
+
+ Here's another reason to avoid allocation: Emacs
+ processes input from X in a signal handler; processing X input may
+ call malloc; if input arrives while a matching routine is calling
+ malloc, then we're scrod. But Emacs can't just block input while
+ calling matching routines; then we don't notice interrupts when
+ they come in. So, Emacs blocks input around all regexp calls
+ except the matching calls, which it leaves unprotected, in the
+ faith that they will not malloc. */
+
+/* Normally, this is fine. */
+# define MATCH_MAY_ALLOCATE
+
+/* When using GNU C, we are not REALLY using the C alloca, no matter
+ what config.h may say. So don't take precautions for it. */
+# ifdef __GNUC__
+# undef C_ALLOCA
+# endif
+
+/* The match routines may not allocate if (1) they would do it with malloc
+ and (2) it's not safe for them to use malloc.
+ Note that if REL_ALLOC is defined, matching would not use malloc for the
+ failure stack, but we would still use it for the register vectors;
+ so REL_ALLOC should not affect this. */
+# if (defined C_ALLOCA || defined REGEX_MALLOC) && defined emacs
+# undef MATCH_MAY_ALLOCATE
+# endif
+#endif /* not DEFINED_ONCE */
+
+#ifdef INSIDE_RECURSION
+/* Failure stack declarations and macros; both re_compile_fastmap and
+ re_match_2 use a failure stack. These have to be macros because of
+ REGEX_ALLOCATE_STACK. */
+
+
+/* Number of failure points for which to initially allocate space
+ when matching. If this number is exceeded, we allocate more
+ space, so it is not a hard limit. */
+# ifndef INIT_FAILURE_ALLOC
+# define INIT_FAILURE_ALLOC 5
+# endif
+
+/* Roughly the maximum number of failure points on the stack. Would be
+ exactly that if always used MAX_FAILURE_ITEMS items each time we failed.
+ This is a variable only so users of regex can assign to it; we never
+ change it ourselves. */
+
+# ifdef INT_IS_16BIT
+
+# ifndef DEFINED_ONCE
+# if defined MATCH_MAY_ALLOCATE
+/* 4400 was enough to cause a crash on Alpha OSF/1,
+ whose default stack limit is 2mb. */
+long int re_max_failures = 4000;
+# else
+long int re_max_failures = 2000;
+# endif
+# endif
+
+union PREFIX(fail_stack_elt)
+{
+ UCHAR_T *pointer;
+ long int integer;
+};
+
+typedef union PREFIX(fail_stack_elt) PREFIX(fail_stack_elt_t);
+
+typedef struct
+{
+ PREFIX(fail_stack_elt_t) *stack;
+ unsigned long int size;
+ unsigned long int avail; /* Offset of next open position. */
+} PREFIX(fail_stack_type);
+
+# else /* not INT_IS_16BIT */
+
+# ifndef DEFINED_ONCE
+# if defined MATCH_MAY_ALLOCATE
+/* 4400 was enough to cause a crash on Alpha OSF/1,
+ whose default stack limit is 2mb. */
+int re_max_failures = 4000;
+# else
+int re_max_failures = 2000;
+# endif
+# endif
+
+union PREFIX(fail_stack_elt)
+{
+ UCHAR_T *pointer;
+ int integer;
+};
+
+typedef union PREFIX(fail_stack_elt) PREFIX(fail_stack_elt_t);
+
+typedef struct
+{
+ PREFIX(fail_stack_elt_t) *stack;
+ unsigned size;
+ unsigned avail; /* Offset of next open position. */
+} PREFIX(fail_stack_type);
+
+# endif /* INT_IS_16BIT */
+
+# ifndef DEFINED_ONCE
+# define FAIL_STACK_EMPTY() (fail_stack.avail == 0)
+# define FAIL_STACK_PTR_EMPTY() (fail_stack_ptr->avail == 0)
+# define FAIL_STACK_FULL() (fail_stack.avail == fail_stack.size)
+# endif
+
+
+/* Define macros to initialize and free the failure stack.
+ Do `return -2' if the alloc fails. */
+
+# ifdef MATCH_MAY_ALLOCATE
+# define INIT_FAIL_STACK() \
+ do { \
+ fail_stack.stack = (PREFIX(fail_stack_elt_t) *) \
+ REGEX_ALLOCATE_STACK (INIT_FAILURE_ALLOC * sizeof (PREFIX(fail_stack_elt_t))); \
+ \
+ if (fail_stack.stack == NULL) \
+ return -2; \
+ \
+ fail_stack.size = INIT_FAILURE_ALLOC; \
+ fail_stack.avail = 0; \
+ } while (0)
+
+# define RESET_FAIL_STACK() REGEX_FREE_STACK (fail_stack.stack)
+# else
+# define INIT_FAIL_STACK() \
+ do { \
+ fail_stack.avail = 0; \
+ } while (0)
+
+# define RESET_FAIL_STACK()
+# endif
+
+
+/* Double the size of FAIL_STACK, up to approximately `re_max_failures' items.
+
+ Return 1 if succeeds, and 0 if either ran out of memory
+ allocating space for it or it was already too large.
+
+ REGEX_REALLOCATE_STACK requires `destination' be declared. */
+
+# define DOUBLE_FAIL_STACK(fail_stack) \
+ ((fail_stack).size > (unsigned) (re_max_failures * MAX_FAILURE_ITEMS) \
+ ? 0 \
+ : ((fail_stack).stack = (PREFIX(fail_stack_elt_t) *) \
+ REGEX_REALLOCATE_STACK ((fail_stack).stack, \
+ (fail_stack).size * sizeof (PREFIX(fail_stack_elt_t)), \
+ ((fail_stack).size << 1) * sizeof (PREFIX(fail_stack_elt_t))),\
+ \
+ (fail_stack).stack == NULL \
+ ? 0 \
+ : ((fail_stack).size <<= 1, \
+ 1)))
+
+
+/* Push pointer POINTER on FAIL_STACK.
+ Return 1 if was able to do so and 0 if ran out of memory allocating
+ space to do so. */
+# define PUSH_PATTERN_OP(POINTER, FAIL_STACK) \
+ ((FAIL_STACK_FULL () \
+ && !DOUBLE_FAIL_STACK (FAIL_STACK)) \
+ ? 0 \
+ : ((FAIL_STACK).stack[(FAIL_STACK).avail++].pointer = POINTER, \
+ 1))
+
+/* Push a pointer value onto the failure stack.
+ Assumes the variable `fail_stack'. Probably should only
+ be called from within `PUSH_FAILURE_POINT'. */
+# define PUSH_FAILURE_POINTER(item) \
+ fail_stack.stack[fail_stack.avail++].pointer = (UCHAR_T *) (item)
+
+/* This pushes an integer-valued item onto the failure stack.
+ Assumes the variable `fail_stack'. Probably should only
+ be called from within `PUSH_FAILURE_POINT'. */
+# define PUSH_FAILURE_INT(item) \
+ fail_stack.stack[fail_stack.avail++].integer = (item)
+
+/* Push a fail_stack_elt_t value onto the failure stack.
+ Assumes the variable `fail_stack'. Probably should only
+ be called from within `PUSH_FAILURE_POINT'. */
+# define PUSH_FAILURE_ELT(item) \
+ fail_stack.stack[fail_stack.avail++] = (item)
+
+/* These three POP... operations complement the three PUSH... operations.
+ All assume that `fail_stack' is nonempty. */
+# define POP_FAILURE_POINTER() fail_stack.stack[--fail_stack.avail].pointer
+# define POP_FAILURE_INT() fail_stack.stack[--fail_stack.avail].integer
+# define POP_FAILURE_ELT() fail_stack.stack[--fail_stack.avail]
+
+/* Used to omit pushing failure point id's when we're not debugging. */
+# ifdef DEBUG
+# define DEBUG_PUSH PUSH_FAILURE_INT
+# define DEBUG_POP(item_addr) *(item_addr) = POP_FAILURE_INT ()
+# else
+# define DEBUG_PUSH(item)
+# define DEBUG_POP(item_addr)
+# endif
+
+
+/* Push the information about the state we will need
+ if we ever fail back to it.
+
+ Requires variables fail_stack, regstart, regend, reg_info, and
+ num_regs_pushed be declared. DOUBLE_FAIL_STACK requires `destination'
+ be declared.
+
+ Does `return FAILURE_CODE' if runs out of memory. */
+
+# define PUSH_FAILURE_POINT(pattern_place, string_place, failure_code) \
+ do { \
+ char *destination; \
+ /* Must be int, so when we don't save any registers, the arithmetic \
+ of 0 + -1 isn't done as unsigned. */ \
+ /* Can't be int, since there is not a shred of a guarantee that int \
+ is wide enough to hold a value of something to which pointer can \
+ be assigned */ \
+ active_reg_t this_reg; \
+ \
+ DEBUG_STATEMENT (failure_id++); \
+ DEBUG_STATEMENT (nfailure_points_pushed++); \
+ DEBUG_PRINT2 ("\nPUSH_FAILURE_POINT #%u:\n", failure_id); \
+ DEBUG_PRINT2 (" Before push, next avail: %d\n", (fail_stack).avail);\
+ DEBUG_PRINT2 (" size: %d\n", (fail_stack).size);\
+ \
+ DEBUG_PRINT2 (" slots needed: %ld\n", NUM_FAILURE_ITEMS); \
+ DEBUG_PRINT2 (" available: %d\n", REMAINING_AVAIL_SLOTS); \
+ \
+ /* Ensure we have enough space allocated for what we will push. */ \
+ while (REMAINING_AVAIL_SLOTS < NUM_FAILURE_ITEMS) \
+ { \
+ if (!DOUBLE_FAIL_STACK (fail_stack)) \
+ return failure_code; \
+ \
+ DEBUG_PRINT2 ("\n Doubled stack; size now: %d\n", \
+ (fail_stack).size); \
+ DEBUG_PRINT2 (" slots available: %d\n", REMAINING_AVAIL_SLOTS);\
+ } \
+ \
+ /* Push the info, starting with the registers. */ \
+ DEBUG_PRINT1 ("\n"); \
+ \
+ if (1) \
+ for (this_reg = lowest_active_reg; this_reg <= highest_active_reg; \
+ this_reg++) \
+ { \
+ DEBUG_PRINT2 (" Pushing reg: %lu\n", this_reg); \
+ DEBUG_STATEMENT (num_regs_pushed++); \
+ \
+ DEBUG_PRINT2 (" start: %p\n", regstart[this_reg]); \
+ PUSH_FAILURE_POINTER (regstart[this_reg]); \
+ \
+ DEBUG_PRINT2 (" end: %p\n", regend[this_reg]); \
+ PUSH_FAILURE_POINTER (regend[this_reg]); \
+ \
+ DEBUG_PRINT2 (" info: %p\n ", \
+ reg_info[this_reg].word.pointer); \
+ DEBUG_PRINT2 (" match_null=%d", \
+ REG_MATCH_NULL_STRING_P (reg_info[this_reg])); \
+ DEBUG_PRINT2 (" active=%d", IS_ACTIVE (reg_info[this_reg])); \
+ DEBUG_PRINT2 (" matched_something=%d", \
+ MATCHED_SOMETHING (reg_info[this_reg])); \
+ DEBUG_PRINT2 (" ever_matched=%d", \
+ EVER_MATCHED_SOMETHING (reg_info[this_reg])); \
+ DEBUG_PRINT1 ("\n"); \
+ PUSH_FAILURE_ELT (reg_info[this_reg].word); \
+ } \
+ \
+ DEBUG_PRINT2 (" Pushing low active reg: %ld\n", lowest_active_reg);\
+ PUSH_FAILURE_INT (lowest_active_reg); \
+ \
+ DEBUG_PRINT2 (" Pushing high active reg: %ld\n", highest_active_reg);\
+ PUSH_FAILURE_INT (highest_active_reg); \
+ \
+ DEBUG_PRINT2 (" Pushing pattern %p:\n", pattern_place); \
+ DEBUG_PRINT_COMPILED_PATTERN (bufp, pattern_place, pend); \
+ PUSH_FAILURE_POINTER (pattern_place); \
+ \
+ DEBUG_PRINT2 (" Pushing string %p: `", string_place); \
+ DEBUG_PRINT_DOUBLE_STRING (string_place, string1, size1, string2, \
+ size2); \
+ DEBUG_PRINT1 ("'\n"); \
+ PUSH_FAILURE_POINTER (string_place); \
+ \
+ DEBUG_PRINT2 (" Pushing failure id: %u\n", failure_id); \
+ DEBUG_PUSH (failure_id); \
+ } while (0)
+
+# ifndef DEFINED_ONCE
+/* This is the number of items that are pushed and popped on the stack
+ for each register. */
+# define NUM_REG_ITEMS 3
+
+/* Individual items aside from the registers. */
+# ifdef DEBUG
+# define NUM_NONREG_ITEMS 5 /* Includes failure point id. */
+# else
+# define NUM_NONREG_ITEMS 4
+# endif
+
+/* We push at most this many items on the stack. */
+/* We used to use (num_regs - 1), which is the number of registers
+ this regexp will save; but that was changed to 5
+ to avoid stack overflow for a regexp with lots of parens. */
+# define MAX_FAILURE_ITEMS (5 * NUM_REG_ITEMS + NUM_NONREG_ITEMS)
+
+/* We actually push this many items. */
+# define NUM_FAILURE_ITEMS \
+ (((0 \
+ ? 0 : highest_active_reg - lowest_active_reg + 1) \
+ * NUM_REG_ITEMS) \
+ + NUM_NONREG_ITEMS)
+
+/* How many items can still be added to the stack without overflowing it. */
+# define REMAINING_AVAIL_SLOTS ((fail_stack).size - (fail_stack).avail)
+# endif /* not DEFINED_ONCE */
+
+
+/* Pops what PUSH_FAIL_STACK pushes.
+
+ We restore into the parameters, all of which should be lvalues:
+ STR -- the saved data position.
+ PAT -- the saved pattern position.
+ LOW_REG, HIGH_REG -- the highest and lowest active registers.
+ REGSTART, REGEND -- arrays of string positions.
+ REG_INFO -- array of information about each subexpression.
+
+ Also assumes the variables `fail_stack' and (if debugging), `bufp',
+ `pend', `string1', `size1', `string2', and `size2'. */
+# define POP_FAILURE_POINT(str, pat, low_reg, high_reg, regstart, regend, reg_info)\
+{ \
+ DEBUG_STATEMENT (unsigned failure_id;) \
+ active_reg_t this_reg; \
+ const UCHAR_T *string_temp; \
+ \
+ assert (!FAIL_STACK_EMPTY ()); \
+ \
+ /* Remove failure points and point to how many regs pushed. */ \
+ DEBUG_PRINT1 ("POP_FAILURE_POINT:\n"); \
+ DEBUG_PRINT2 (" Before pop, next avail: %d\n", fail_stack.avail); \
+ DEBUG_PRINT2 (" size: %d\n", fail_stack.size); \
+ \
+ assert (fail_stack.avail >= NUM_NONREG_ITEMS); \
+ \
+ DEBUG_POP (&failure_id); \
+ DEBUG_PRINT2 (" Popping failure id: %u\n", failure_id); \
+ \
+ /* If the saved string location is NULL, it came from an \
+ on_failure_keep_string_jump opcode, and we want to throw away the \
+ saved NULL, thus retaining our current position in the string. */ \
+ string_temp = POP_FAILURE_POINTER (); \
+ if (string_temp != NULL) \
+ str = (const CHAR_T *) string_temp; \
+ \
+ DEBUG_PRINT2 (" Popping string %p: `", str); \
+ DEBUG_PRINT_DOUBLE_STRING (str, string1, size1, string2, size2); \
+ DEBUG_PRINT1 ("'\n"); \
+ \
+ pat = (UCHAR_T *) POP_FAILURE_POINTER (); \
+ DEBUG_PRINT2 (" Popping pattern %p:\n", pat); \
+ DEBUG_PRINT_COMPILED_PATTERN (bufp, pat, pend); \
+ \
+ /* Restore register info. */ \
+ high_reg = (active_reg_t) POP_FAILURE_INT (); \
+ DEBUG_PRINT2 (" Popping high active reg: %ld\n", high_reg); \
+ \
+ low_reg = (active_reg_t) POP_FAILURE_INT (); \
+ DEBUG_PRINT2 (" Popping low active reg: %ld\n", low_reg); \
+ \
+ if (1) \
+ for (this_reg = high_reg; this_reg >= low_reg; this_reg--) \
+ { \
+ DEBUG_PRINT2 (" Popping reg: %ld\n", this_reg); \
+ \
+ reg_info[this_reg].word = POP_FAILURE_ELT (); \
+ DEBUG_PRINT2 (" info: %p\n", \
+ reg_info[this_reg].word.pointer); \
+ \
+ regend[this_reg] = (const CHAR_T *) POP_FAILURE_POINTER (); \
+ DEBUG_PRINT2 (" end: %p\n", regend[this_reg]); \
+ \
+ regstart[this_reg] = (const CHAR_T *) POP_FAILURE_POINTER (); \
+ DEBUG_PRINT2 (" start: %p\n", regstart[this_reg]); \
+ } \
+ else \
+ { \
+ for (this_reg = highest_active_reg; this_reg > high_reg; this_reg--) \
+ { \
+ reg_info[this_reg].word.integer = 0; \
+ regend[this_reg] = 0; \
+ regstart[this_reg] = 0; \
+ } \
+ highest_active_reg = high_reg; \
+ } \
+ \
+ set_regs_matched_done = 0; \
+ DEBUG_STATEMENT (nfailure_points_popped++); \
+} /* POP_FAILURE_POINT */
+
+/* Structure for per-register (a.k.a. per-group) information.
+ Other register information, such as the
+ starting and ending positions (which are addresses), and the list of
+ inner groups (which is a bits list) are maintained in separate
+ variables.
+
+ We are making a (strictly speaking) nonportable assumption here: that
+ the compiler will pack our bit fields into something that fits into
+ the type of `word', i.e., is something that fits into one item on the
+ failure stack. */
+
+
+/* Declarations and macros for re_match_2. */
+
+typedef union
+{
+ PREFIX(fail_stack_elt_t) word;
+ struct
+ {
+ /* This field is one if this group can match the empty string,
+ zero if not. If not yet determined, `MATCH_NULL_UNSET_VALUE'. */
+# define MATCH_NULL_UNSET_VALUE 3
+ unsigned match_null_string_p : 2;
+ unsigned is_active : 1;
+ unsigned matched_something : 1;
+ unsigned ever_matched_something : 1;
+ } bits;
+} PREFIX(register_info_type);
+
+# ifndef DEFINED_ONCE
+# define REG_MATCH_NULL_STRING_P(R) ((R).bits.match_null_string_p)
+# define IS_ACTIVE(R) ((R).bits.is_active)
+# define MATCHED_SOMETHING(R) ((R).bits.matched_something)
+# define EVER_MATCHED_SOMETHING(R) ((R).bits.ever_matched_something)
+
+
+/* Call this when have matched a real character; it sets `matched' flags
+ for the subexpressions which we are currently inside. Also records
+ that those subexprs have matched. */
+# define SET_REGS_MATCHED() \
+ do \
+ { \
+ if (!set_regs_matched_done) \
+ { \
+ active_reg_t r; \
+ set_regs_matched_done = 1; \
+ for (r = lowest_active_reg; r <= highest_active_reg; r++) \
+ { \
+ MATCHED_SOMETHING (reg_info[r]) \
+ = EVER_MATCHED_SOMETHING (reg_info[r]) \
+ = 1; \
+ } \
+ } \
+ } \
+ while (0)
+# endif /* not DEFINED_ONCE */
+
+/* Registers are set to a sentinel when they haven't yet matched. */
+static CHAR_T PREFIX(reg_unset_dummy);
+# define REG_UNSET_VALUE (&PREFIX(reg_unset_dummy))
+# define REG_UNSET(e) ((e) == REG_UNSET_VALUE)
+
+/* Subroutine declarations and macros for regex_compile. */
+static void PREFIX(store_op1) _RE_ARGS ((re_opcode_t op, UCHAR_T *loc, int arg));
+static void PREFIX(store_op2) _RE_ARGS ((re_opcode_t op, UCHAR_T *loc,
+ int arg1, int arg2));
+static void PREFIX(insert_op1) _RE_ARGS ((re_opcode_t op, UCHAR_T *loc,
+ int arg, UCHAR_T *end));
+static void PREFIX(insert_op2) _RE_ARGS ((re_opcode_t op, UCHAR_T *loc,
+ int arg1, int arg2, UCHAR_T *end));
+static boolean PREFIX(at_begline_loc_p) _RE_ARGS ((const CHAR_T *pattern,
+ const CHAR_T *p,
+ reg_syntax_t syntax));
+static boolean PREFIX(at_endline_loc_p) _RE_ARGS ((const CHAR_T *p,
+ const CHAR_T *pend,
+ reg_syntax_t syntax));
+# ifdef WCHAR
+static reg_errcode_t wcs_compile_range _RE_ARGS ((CHAR_T range_start,
+ const CHAR_T **p_ptr,
+ const CHAR_T *pend,
+ char *translate,
+ reg_syntax_t syntax,
+ UCHAR_T *b,
+ CHAR_T *char_set));
+static void insert_space _RE_ARGS ((int num, CHAR_T *loc, CHAR_T *end));
+# else /* BYTE */
+static reg_errcode_t byte_compile_range _RE_ARGS ((unsigned int range_start,
+ const char **p_ptr,
+ const char *pend,
+ char *translate,
+ reg_syntax_t syntax,
+ unsigned char *b));
+# endif /* WCHAR */
+
+/* Fetch the next character in the uncompiled pattern---translating it
+ if necessary. Also cast from a signed character in the constant
+ string passed to us by the user to an unsigned char that we can use
+ as an array index (in, e.g., `translate'). */
+/* ifdef MBS_SUPPORT, we translate only if character <= 0xff,
+ because it is impossible to allocate 4GB array for some encodings
+ which have 4 byte character_set like UCS4. */
+# ifndef PATFETCH
+# ifdef WCHAR
+# define PATFETCH(c) \
+ do {if (p == pend) return REG_EEND; \
+ c = (UCHAR_T) *p++; \
+ if (translate && (c <= 0xff)) c = (UCHAR_T) translate[c]; \
+ } while (0)
+# else /* BYTE */
+# define PATFETCH(c) \
+ do {if (p == pend) return REG_EEND; \
+ c = (unsigned char) *p++; \
+ if (translate) c = (unsigned char) translate[c]; \
+ } while (0)
+# endif /* WCHAR */
+# endif
+
+/* Fetch the next character in the uncompiled pattern, with no
+ translation. */
+# define PATFETCH_RAW(c) \
+ do {if (p == pend) return REG_EEND; \
+ c = (UCHAR_T) *p++; \
+ } while (0)
+
+/* Go backwards one character in the pattern. */
+# define PATUNFETCH p--
+
+
+/* If `translate' is non-null, return translate[D], else just D. We
+ cast the subscript to translate because some data is declared as
+ `char *', to avoid warnings when a string constant is passed. But
+ when we use a character as a subscript we must make it unsigned. */
+/* ifdef MBS_SUPPORT, we translate only if character <= 0xff,
+ because it is impossible to allocate 4GB array for some encodings
+ which have 4 byte character_set like UCS4. */
+
+# ifndef TRANSLATE
+# ifdef WCHAR
+# define TRANSLATE(d) \
+ ((translate && ((UCHAR_T) (d)) <= 0xff) \
+ ? (char) translate[(unsigned char) (d)] : (d))
+# else /* BYTE */
+# define TRANSLATE(d) \
+ (translate ? (char) translate[(unsigned char) (d)] : (d))
+# endif /* WCHAR */
+# endif
+
+
+/* Macros for outputting the compiled pattern into `buffer'. */
+
+/* If the buffer isn't allocated when it comes in, use this. */
+# define INIT_BUF_SIZE (32 * sizeof(UCHAR_T))
+
+/* Make sure we have at least N more bytes of space in buffer. */
+# ifdef WCHAR
+# define GET_BUFFER_SPACE(n) \
+ while (((unsigned long)b - (unsigned long)COMPILED_BUFFER_VAR \
+ + (n)*sizeof(CHAR_T)) > bufp->allocated) \
+ EXTEND_BUFFER ()
+# else /* BYTE */
+# define GET_BUFFER_SPACE(n) \
+ while ((unsigned long) (b - bufp->buffer + (n)) > bufp->allocated) \
+ EXTEND_BUFFER ()
+# endif /* WCHAR */
+
+/* Make sure we have one more byte of buffer space and then add C to it. */
+# define BUF_PUSH(c) \
+ do { \
+ GET_BUFFER_SPACE (1); \
+ *b++ = (UCHAR_T) (c); \
+ } while (0)
+
+
+/* Ensure we have two more bytes of buffer space and then append C1 and C2. */
+# define BUF_PUSH_2(c1, c2) \
+ do { \
+ GET_BUFFER_SPACE (2); \
+ *b++ = (UCHAR_T) (c1); \
+ *b++ = (UCHAR_T) (c2); \
+ } while (0)
+
+
+/* As with BUF_PUSH_2, except for three bytes. */
+# define BUF_PUSH_3(c1, c2, c3) \
+ do { \
+ GET_BUFFER_SPACE (3); \
+ *b++ = (UCHAR_T) (c1); \
+ *b++ = (UCHAR_T) (c2); \
+ *b++ = (UCHAR_T) (c3); \
+ } while (0)
+
+/* Store a jump with opcode OP at LOC to location TO. We store a
+ relative address offset by the three bytes the jump itself occupies. */
+# define STORE_JUMP(op, loc, to) \
+ PREFIX(store_op1) (op, loc, (int) ((to) - (loc) - (1 + OFFSET_ADDRESS_SIZE)))
+
+/* Likewise, for a two-argument jump. */
+# define STORE_JUMP2(op, loc, to, arg) \
+ PREFIX(store_op2) (op, loc, (int) ((to) - (loc) - (1 + OFFSET_ADDRESS_SIZE)), arg)
+
+/* Like `STORE_JUMP', but for inserting. Assume `b' is the buffer end. */
+# define INSERT_JUMP(op, loc, to) \
+ PREFIX(insert_op1) (op, loc, (int) ((to) - (loc) - (1 + OFFSET_ADDRESS_SIZE)), b)
+
+/* Like `STORE_JUMP2', but for inserting. Assume `b' is the buffer end. */
+# define INSERT_JUMP2(op, loc, to, arg) \
+ PREFIX(insert_op2) (op, loc, (int) ((to) - (loc) - (1 + OFFSET_ADDRESS_SIZE)),\
+ arg, b)
+
+/* This is not an arbitrary limit: the arguments which represent offsets
+ into the pattern are two bytes long. So if 2^16 bytes turns out to
+ be too small, many things would have to change. */
+/* Any other compiler which, like MSC, has allocation limit below 2^16
+ bytes will have to use approach similar to what was done below for
+ MSC and drop MAX_BUF_SIZE a bit. Otherwise you may end up
+ reallocating to 0 bytes. Such thing is not going to work too well.
+ You have been warned!! */
+# ifndef DEFINED_ONCE
+# if defined _MSC_VER && !defined WIN32
+/* Microsoft C 16-bit versions limit malloc to approx 65512 bytes.
+ The REALLOC define eliminates a flurry of conversion warnings,
+ but is not required. */
+# define MAX_BUF_SIZE 65500L
+# define REALLOC(p,s) realloc ((p), (size_t) (s))
+# else
+# define MAX_BUF_SIZE (1L << 16)
+# define REALLOC(p,s) realloc ((p), (s))
+# endif
+
+/* Extend the buffer by twice its current size via realloc and
+ reset the pointers that pointed into the old block to point to the
+ correct places in the new one. If extending the buffer results in it
+ being larger than MAX_BUF_SIZE, then flag memory exhausted. */
+# if __BOUNDED_POINTERS__
+# define SET_HIGH_BOUND(P) (__ptrhigh (P) = __ptrlow (P) + bufp->allocated)
+# define MOVE_BUFFER_POINTER(P) \
+ (__ptrlow (P) += incr, SET_HIGH_BOUND (P), __ptrvalue (P) += incr)
+# define ELSE_EXTEND_BUFFER_HIGH_BOUND \
+ else \
+ { \
+ SET_HIGH_BOUND (b); \
+ SET_HIGH_BOUND (begalt); \
+ if (fixup_alt_jump) \
+ SET_HIGH_BOUND (fixup_alt_jump); \
+ if (laststart) \
+ SET_HIGH_BOUND (laststart); \
+ if (pending_exact) \
+ SET_HIGH_BOUND (pending_exact); \
+ }
+# else
+# define MOVE_BUFFER_POINTER(P) (P) += incr
+# define ELSE_EXTEND_BUFFER_HIGH_BOUND
+# endif
+# endif /* not DEFINED_ONCE */
+
+# ifdef WCHAR
+# define EXTEND_BUFFER() \
+ do { \
+ UCHAR_T *old_buffer = COMPILED_BUFFER_VAR; \
+ int wchar_count; \
+ if (bufp->allocated + sizeof(UCHAR_T) > MAX_BUF_SIZE) \
+ return REG_ESIZE; \
+ bufp->allocated <<= 1; \
+ if (bufp->allocated > MAX_BUF_SIZE) \
+ bufp->allocated = MAX_BUF_SIZE; \
+ /* How many characters the new buffer can have? */ \
+ wchar_count = bufp->allocated / sizeof(UCHAR_T); \
+ if (wchar_count == 0) wchar_count = 1; \
+ /* Truncate the buffer to CHAR_T align. */ \
+ bufp->allocated = wchar_count * sizeof(UCHAR_T); \
+ RETALLOC (COMPILED_BUFFER_VAR, wchar_count, UCHAR_T); \
+ bufp->buffer = (char*)COMPILED_BUFFER_VAR; \
+ if (COMPILED_BUFFER_VAR == NULL) \
+ return REG_ESPACE; \
+ /* If the buffer moved, move all the pointers into it. */ \
+ if (old_buffer != COMPILED_BUFFER_VAR) \
+ { \
+ int incr = COMPILED_BUFFER_VAR - old_buffer; \
+ MOVE_BUFFER_POINTER (b); \
+ MOVE_BUFFER_POINTER (begalt); \
+ if (fixup_alt_jump) \
+ MOVE_BUFFER_POINTER (fixup_alt_jump); \
+ if (laststart) \
+ MOVE_BUFFER_POINTER (laststart); \
+ if (pending_exact) \
+ MOVE_BUFFER_POINTER (pending_exact); \
+ } \
+ ELSE_EXTEND_BUFFER_HIGH_BOUND \
+ } while (0)
+# else /* BYTE */
+# define EXTEND_BUFFER() \
+ do { \
+ UCHAR_T *old_buffer = COMPILED_BUFFER_VAR; \
+ if (bufp->allocated == MAX_BUF_SIZE) \
+ return REG_ESIZE; \
+ bufp->allocated <<= 1; \
+ if (bufp->allocated > MAX_BUF_SIZE) \
+ bufp->allocated = MAX_BUF_SIZE; \
+ bufp->buffer = (UCHAR_T *) REALLOC (COMPILED_BUFFER_VAR, \
+ bufp->allocated); \
+ if (COMPILED_BUFFER_VAR == NULL) \
+ return REG_ESPACE; \
+ /* If the buffer moved, move all the pointers into it. */ \
+ if (old_buffer != COMPILED_BUFFER_VAR) \
+ { \
+ int incr = COMPILED_BUFFER_VAR - old_buffer; \
+ MOVE_BUFFER_POINTER (b); \
+ MOVE_BUFFER_POINTER (begalt); \
+ if (fixup_alt_jump) \
+ MOVE_BUFFER_POINTER (fixup_alt_jump); \
+ if (laststart) \
+ MOVE_BUFFER_POINTER (laststart); \
+ if (pending_exact) \
+ MOVE_BUFFER_POINTER (pending_exact); \
+ } \
+ ELSE_EXTEND_BUFFER_HIGH_BOUND \
+ } while (0)
+# endif /* WCHAR */
+
+# ifndef DEFINED_ONCE
+/* Since we have one byte reserved for the register number argument to
+ {start,stop}_memory, the maximum number of groups we can report
+ things about is what fits in that byte. */
+# define MAX_REGNUM 255
+
+/* But patterns can have more than `MAX_REGNUM' registers. We just
+ ignore the excess. */
+typedef unsigned regnum_t;
+
+
+/* Macros for the compile stack. */
+
+/* Since offsets can go either forwards or backwards, this type needs to
+ be able to hold values from -(MAX_BUF_SIZE - 1) to MAX_BUF_SIZE - 1. */
+/* int may be not enough when sizeof(int) == 2. */
+typedef long pattern_offset_t;
+
+typedef struct
+{
+ pattern_offset_t begalt_offset;
+ pattern_offset_t fixup_alt_jump;
+ pattern_offset_t inner_group_offset;
+ pattern_offset_t laststart_offset;
+ regnum_t regnum;
+} compile_stack_elt_t;
+
+
+typedef struct
+{
+ compile_stack_elt_t *stack;
+ unsigned size;
+ unsigned avail; /* Offset of next open position. */
+} compile_stack_type;
+
+
+# define INIT_COMPILE_STACK_SIZE 32
+
+# define COMPILE_STACK_EMPTY (compile_stack.avail == 0)
+# define COMPILE_STACK_FULL (compile_stack.avail == compile_stack.size)
+
+/* The next available element. */
+# define COMPILE_STACK_TOP (compile_stack.stack[compile_stack.avail])
+
+# endif /* not DEFINED_ONCE */
+
+/* Set the bit for character C in a list. */
+# ifndef DEFINED_ONCE
+# define SET_LIST_BIT(c) \
+ (b[((unsigned char) (c)) / BYTEWIDTH] \
+ |= 1 << (((unsigned char) c) % BYTEWIDTH))
+# endif /* DEFINED_ONCE */
+
+/* Get the next unsigned number in the uncompiled pattern. */
+# define GET_UNSIGNED_NUMBER(num) \
+ { \
+ while (p != pend) \
+ { \
+ PATFETCH (c); \
+ if (c < '0' || c > '9') \
+ break; \
+ if (num <= RE_DUP_MAX) \
+ { \
+ if (num < 0) \
+ num = 0; \
+ num = num * 10 + c - '0'; \
+ } \
+ } \
+ }
+
+# ifndef DEFINED_ONCE
+# if defined _LIBC || WIDE_CHAR_SUPPORT
+/* The GNU C library provides support for user-defined character classes
+ and the functions from ISO C amendement 1. */
+# ifdef CHARCLASS_NAME_MAX
+# define CHAR_CLASS_MAX_LENGTH CHARCLASS_NAME_MAX
+# else
+/* This shouldn't happen but some implementation might still have this
+ problem. Use a reasonable default value. */
+# define CHAR_CLASS_MAX_LENGTH 256
+# endif
+
+# ifdef _LIBC
+# define IS_CHAR_CLASS(string) __wctype (string)
+# else
+# define IS_CHAR_CLASS(string) wctype (string)
+# endif
+# else
+# define CHAR_CLASS_MAX_LENGTH 6 /* Namely, `xdigit'. */
+
+# define IS_CHAR_CLASS(string) \
+ (STREQ (string, "alpha") || STREQ (string, "upper") \
+ || STREQ (string, "lower") || STREQ (string, "digit") \
+ || STREQ (string, "alnum") || STREQ (string, "xdigit") \
+ || STREQ (string, "space") || STREQ (string, "print") \
+ || STREQ (string, "punct") || STREQ (string, "graph") \
+ || STREQ (string, "cntrl") || STREQ (string, "blank"))
+# endif
+# endif /* DEFINED_ONCE */
+
+# ifndef MATCH_MAY_ALLOCATE
+
+/* If we cannot allocate large objects within re_match_2_internal,
+ we make the fail stack and register vectors global.
+ The fail stack, we grow to the maximum size when a regexp
+ is compiled.
+ The register vectors, we adjust in size each time we
+ compile a regexp, according to the number of registers it needs. */
+
+static PREFIX(fail_stack_type) fail_stack;
+
+/* Size with which the following vectors are currently allocated.
+ That is so we can make them bigger as needed,
+ but never make them smaller. */
+# ifdef DEFINED_ONCE
+static int regs_allocated_size;
+
+static const char ** regstart, ** regend;
+static const char ** old_regstart, ** old_regend;
+static const char **best_regstart, **best_regend;
+static const char **reg_dummy;
+# endif /* DEFINED_ONCE */
+
+static PREFIX(register_info_type) *PREFIX(reg_info);
+static PREFIX(register_info_type) *PREFIX(reg_info_dummy);
+
+/* Make the register vectors big enough for NUM_REGS registers,
+ but don't make them smaller. */
+
+static void
+PREFIX(regex_grow_registers) (num_regs)
+ int num_regs;
+{
+ if (num_regs > regs_allocated_size)
+ {
+ RETALLOC_IF (regstart, num_regs, const char *);
+ RETALLOC_IF (regend, num_regs, const char *);
+ RETALLOC_IF (old_regstart, num_regs, const char *);
+ RETALLOC_IF (old_regend, num_regs, const char *);
+ RETALLOC_IF (best_regstart, num_regs, const char *);
+ RETALLOC_IF (best_regend, num_regs, const char *);
+ RETALLOC_IF (PREFIX(reg_info), num_regs, PREFIX(register_info_type));
+ RETALLOC_IF (reg_dummy, num_regs, const char *);
+ RETALLOC_IF (PREFIX(reg_info_dummy), num_regs, PREFIX(register_info_type));
+
+ regs_allocated_size = num_regs;
+ }
+}
+
+# endif /* not MATCH_MAY_ALLOCATE */
+
+# ifndef DEFINED_ONCE
+static boolean group_in_compile_stack _RE_ARGS ((compile_stack_type
+ compile_stack,
+ regnum_t regnum));
+# endif /* not DEFINED_ONCE */
+
+/* `regex_compile' compiles PATTERN (of length SIZE) according to SYNTAX.
+ Returns one of error codes defined in `regex.h', or zero for success.
+
+ Assumes the `allocated' (and perhaps `buffer') and `translate'
+ fields are set in BUFP on entry.
+
+ If it succeeds, results are put in BUFP (if it returns an error, the
+ contents of BUFP are undefined):
+ `buffer' is the compiled pattern;
+ `syntax' is set to SYNTAX;
+ `used' is set to the length of the compiled pattern;
+ `fastmap_accurate' is zero;
+ `re_nsub' is the number of subexpressions in PATTERN;
+ `not_bol' and `not_eol' are zero;
+
+ The `fastmap' and `newline_anchor' fields are neither
+ examined nor set. */
+
+/* Return, freeing storage we allocated. */
+# ifdef WCHAR
+# define FREE_STACK_RETURN(value) \
+ return (free(pattern), free(mbs_offset), free(is_binary), free (compile_stack.stack), value)
+# else
+# define FREE_STACK_RETURN(value) \
+ return (free (compile_stack.stack), value)
+# endif /* WCHAR */
+
+static reg_errcode_t
+PREFIX(regex_compile) (ARG_PREFIX(pattern), ARG_PREFIX(size), syntax, bufp)
+ const char *ARG_PREFIX(pattern);
+ size_t ARG_PREFIX(size);
+ reg_syntax_t syntax;
+ struct re_pattern_buffer *bufp;
+{
+ /* We fetch characters from PATTERN here. Even though PATTERN is
+ `char *' (i.e., signed), we declare these variables as unsigned, so
+ they can be reliably used as array indices. */
+ register UCHAR_T c, c1;
+
+#ifdef WCHAR
+ /* A temporary space to keep wchar_t pattern and compiled pattern. */
+ CHAR_T *pattern, *COMPILED_BUFFER_VAR;
+ size_t size;
+ /* offset buffer for optimization. See convert_mbs_to_wc. */
+ int *mbs_offset = NULL;
+ /* It hold whether each wchar_t is binary data or not. */
+ char *is_binary = NULL;
+ /* A flag whether exactn is handling binary data or not. */
+ char is_exactn_bin = FALSE;
+#endif /* WCHAR */
+
+ /* A random temporary spot in PATTERN. */
+ const CHAR_T *p1;
+
+ /* Points to the end of the buffer, where we should append. */
+ register UCHAR_T *b;
+
+ /* Keeps track of unclosed groups. */
+ compile_stack_type compile_stack;
+
+ /* Points to the current (ending) position in the pattern. */
+#ifdef WCHAR
+ const CHAR_T *p;
+ const CHAR_T *pend;
+#else /* BYTE */
+ const CHAR_T *p = pattern;
+ const CHAR_T *pend = pattern + size;
+#endif /* WCHAR */
+
+ /* How to translate the characters in the pattern. */
+ RE_TRANSLATE_TYPE translate = bufp->translate;
+
+ /* Address of the count-byte of the most recently inserted `exactn'
+ command. This makes it possible to tell if a new exact-match
+ character can be added to that command or if the character requires
+ a new `exactn' command. */
+ UCHAR_T *pending_exact = 0;
+
+ /* Address of start of the most recently finished expression.
+ This tells, e.g., postfix * where to find the start of its
+ operand. Reset at the beginning of groups and alternatives. */
+ UCHAR_T *laststart = 0;
+
+ /* Address of beginning of regexp, or inside of last group. */
+ UCHAR_T *begalt;
+
+ /* Address of the place where a forward jump should go to the end of
+ the containing expression. Each alternative of an `or' -- except the
+ last -- ends with a forward jump of this sort. */
+ UCHAR_T *fixup_alt_jump = 0;
+
+ /* Counts open-groups as they are encountered. Remembered for the
+ matching close-group on the compile stack, so the same register
+ number is put in the stop_memory as the start_memory. */
+ regnum_t regnum = 0;
+
+#ifdef WCHAR
+ /* Initialize the wchar_t PATTERN and offset_buffer. */
+ p = pend = pattern = TALLOC(csize + 1, CHAR_T);
+ mbs_offset = TALLOC(csize + 1, int);
+ is_binary = TALLOC(csize + 1, char);
+ if (pattern == NULL || mbs_offset == NULL || is_binary == NULL)
+ {
+ free(pattern);
+ free(mbs_offset);
+ free(is_binary);
+ return REG_ESPACE;
+ }
+ pattern[csize] = L'\0'; /* sentinel */
+ size = convert_mbs_to_wcs(pattern, cpattern, csize, mbs_offset, is_binary);
+ pend = p + size;
+ if (size < 0)
+ {
+ free(pattern);
+ free(mbs_offset);
+ free(is_binary);
+ return REG_BADPAT;
+ }
+#endif
+
+#ifdef DEBUG
+ DEBUG_PRINT1 ("\nCompiling pattern: ");
+ if (debug)
+ {
+ unsigned debug_count;
+
+ for (debug_count = 0; debug_count < size; debug_count++)
+ PUT_CHAR (pattern[debug_count]);
+ putchar ('\n');
+ }
+#endif /* DEBUG */
+
+ /* Initialize the compile stack. */
+ compile_stack.stack = TALLOC (INIT_COMPILE_STACK_SIZE, compile_stack_elt_t);
+ if (compile_stack.stack == NULL)
+ {
+#ifdef WCHAR
+ free(pattern);
+ free(mbs_offset);
+ free(is_binary);
+#endif
+ return REG_ESPACE;
+ }
+
+ compile_stack.size = INIT_COMPILE_STACK_SIZE;
+ compile_stack.avail = 0;
+
+ /* Initialize the pattern buffer. */
+ bufp->syntax = syntax;
+ bufp->fastmap_accurate = 0;
+ bufp->not_bol = bufp->not_eol = 0;
+
+ /* Set `used' to zero, so that if we return an error, the pattern
+ printer (for debugging) will think there's no pattern. We reset it
+ at the end. */
+ bufp->used = 0;
+
+ /* Always count groups, whether or not bufp->no_sub is set. */
+ bufp->re_nsub = 0;
+
+#if !defined emacs && !defined SYNTAX_TABLE
+ /* Initialize the syntax table. */
+ init_syntax_once ();
+#endif
+
+ if (bufp->allocated == 0)
+ {
+ if (bufp->buffer)
+ { /* If zero allocated, but buffer is non-null, try to realloc
+ enough space. This loses if buffer's address is bogus, but
+ that is the user's responsibility. */
+#ifdef WCHAR
+ /* Free bufp->buffer and allocate an array for wchar_t pattern
+ buffer. */
+ free(bufp->buffer);
+ COMPILED_BUFFER_VAR = TALLOC (INIT_BUF_SIZE/sizeof(UCHAR_T),
+ UCHAR_T);
+#else
+ RETALLOC (COMPILED_BUFFER_VAR, INIT_BUF_SIZE, UCHAR_T);
+#endif /* WCHAR */
+ }
+ else
+ { /* Caller did not allocate a buffer. Do it for them. */
+ COMPILED_BUFFER_VAR = TALLOC (INIT_BUF_SIZE / sizeof(UCHAR_T),
+ UCHAR_T);
+ }
+
+ if (!COMPILED_BUFFER_VAR) FREE_STACK_RETURN (REG_ESPACE);
+#ifdef WCHAR
+ bufp->buffer = (char*)COMPILED_BUFFER_VAR;
+#endif /* WCHAR */
+ bufp->allocated = INIT_BUF_SIZE;
+ }
+#ifdef WCHAR
+ else
+ COMPILED_BUFFER_VAR = (UCHAR_T*) bufp->buffer;
+#endif
+
+ begalt = b = COMPILED_BUFFER_VAR;
+
+ /* Loop through the uncompiled pattern until we're at the end. */
+ while (p != pend)
+ {
+ PATFETCH (c);
+
+ switch (c)
+ {
+ case '^':
+ {
+ if ( /* If at start of pattern, it's an operator. */
+ p == pattern + 1
+ /* If context independent, it's an operator. */
+ || syntax & RE_CONTEXT_INDEP_ANCHORS
+ /* Otherwise, depends on what's come before. */
+ || PREFIX(at_begline_loc_p) (pattern, p, syntax))
+ BUF_PUSH (begline);
+ else
+ goto normal_char;
+ }
+ break;
+
+
+ case '$':
+ {
+ if ( /* If at end of pattern, it's an operator. */
+ p == pend
+ /* If context independent, it's an operator. */
+ || syntax & RE_CONTEXT_INDEP_ANCHORS
+ /* Otherwise, depends on what's next. */
+ || PREFIX(at_endline_loc_p) (p, pend, syntax))
+ BUF_PUSH (endline);
+ else
+ goto normal_char;
+ }
+ break;
+
+
+ case '+':
+ case '?':
+ if ((syntax & RE_BK_PLUS_QM)
+ || (syntax & RE_LIMITED_OPS))
+ goto normal_char;
+ handle_plus:
+ case '*':
+ /* If there is no previous pattern... */
+ if (!laststart)
+ {
+ if (syntax & RE_CONTEXT_INVALID_OPS)
+ FREE_STACK_RETURN (REG_BADRPT);
+ else if (!(syntax & RE_CONTEXT_INDEP_OPS))
+ goto normal_char;
+ }
+
+ {
+ /* Are we optimizing this jump? */
+ boolean keep_string_p = false;
+
+ /* 1 means zero (many) matches is allowed. */
+ char zero_times_ok = 0, many_times_ok = 0;
+
+ /* If there is a sequence of repetition chars, collapse it
+ down to just one (the right one). We can't combine
+ interval operators with these because of, e.g., `a{2}*',
+ which should only match an even number of `a's. */
+
+ for (;;)
+ {
+ zero_times_ok |= c != '+';
+ many_times_ok |= c != '?';
+
+ if (p == pend)
+ break;
+
+ PATFETCH (c);
+
+ if (c == '*'
+ || (!(syntax & RE_BK_PLUS_QM) && (c == '+' || c == '?')))
+ ;
+
+ else if (syntax & RE_BK_PLUS_QM && c == '\\')
+ {
+ if (p == pend) FREE_STACK_RETURN (REG_EESCAPE);
+
+ PATFETCH (c1);
+ if (!(c1 == '+' || c1 == '?'))
+ {
+ PATUNFETCH;
+ PATUNFETCH;
+ break;
+ }
+
+ c = c1;
+ }
+ else
+ {
+ PATUNFETCH;
+ break;
+ }
+
+ /* If we get here, we found another repeat character. */
+ }
+
+ /* Star, etc. applied to an empty pattern is equivalent
+ to an empty pattern. */
+ if (!laststart)
+ break;
+
+ /* Now we know whether or not zero matches is allowed
+ and also whether or not two or more matches is allowed. */
+ if (many_times_ok)
+ { /* More than one repetition is allowed, so put in at the
+ end a backward relative jump from `b' to before the next
+ jump we're going to put in below (which jumps from
+ laststart to after this jump).
+
+ But if we are at the `*' in the exact sequence `.*\n',
+ insert an unconditional jump backwards to the .,
+ instead of the beginning of the loop. This way we only
+ push a failure point once, instead of every time
+ through the loop. */
+ assert (p - 1 > pattern);
+
+ /* Allocate the space for the jump. */
+ GET_BUFFER_SPACE (1 + OFFSET_ADDRESS_SIZE);
+
+ /* We know we are not at the first character of the pattern,
+ because laststart was nonzero. And we've already
+ incremented `p', by the way, to be the character after
+ the `*'. Do we have to do something analogous here
+ for null bytes, because of RE_DOT_NOT_NULL? */
+ if (TRANSLATE (*(p - 2)) == TRANSLATE ('.')
+ && zero_times_ok
+ && p < pend && TRANSLATE (*p) == TRANSLATE ('\n')
+ && !(syntax & RE_DOT_NEWLINE))
+ { /* We have .*\n. */
+ STORE_JUMP (jump, b, laststart);
+ keep_string_p = true;
+ }
+ else
+ /* Anything else. */
+ STORE_JUMP (maybe_pop_jump, b, laststart -
+ (1 + OFFSET_ADDRESS_SIZE));
+
+ /* We've added more stuff to the buffer. */
+ b += 1 + OFFSET_ADDRESS_SIZE;
+ }
+
+ /* On failure, jump from laststart to b + 3, which will be the
+ end of the buffer after this jump is inserted. */
+ /* ifdef WCHAR, 'b + 1 + OFFSET_ADDRESS_SIZE' instead of
+ 'b + 3'. */
+ GET_BUFFER_SPACE (1 + OFFSET_ADDRESS_SIZE);
+ INSERT_JUMP (keep_string_p ? on_failure_keep_string_jump
+ : on_failure_jump,
+ laststart, b + 1 + OFFSET_ADDRESS_SIZE);
+ pending_exact = 0;
+ b += 1 + OFFSET_ADDRESS_SIZE;
+
+ if (!zero_times_ok)
+ {
+ /* At least one repetition is required, so insert a
+ `dummy_failure_jump' before the initial
+ `on_failure_jump' instruction of the loop. This
+ effects a skip over that instruction the first time
+ we hit that loop. */
+ GET_BUFFER_SPACE (1 + OFFSET_ADDRESS_SIZE);
+ INSERT_JUMP (dummy_failure_jump, laststart, laststart +
+ 2 + 2 * OFFSET_ADDRESS_SIZE);
+ b += 1 + OFFSET_ADDRESS_SIZE;
+ }
+ }
+ break;
+
+
+ case '.':
+ laststart = b;
+ BUF_PUSH (anychar);
+ break;
+
+
+ case '[':
+ {
+ boolean had_char_class = false;
+#ifdef WCHAR
+ CHAR_T range_start = 0xffffffff;
+#else
+ unsigned int range_start = 0xffffffff;
+#endif
+ if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
+
+#ifdef WCHAR
+ /* We assume a charset(_not) structure as a wchar_t array.
+ charset[0] = (re_opcode_t) charset(_not)
+ charset[1] = l (= length of char_classes)
+ charset[2] = m (= length of collating_symbols)
+ charset[3] = n (= length of equivalence_classes)
+ charset[4] = o (= length of char_ranges)
+ charset[5] = p (= length of chars)
+
+ charset[6] = char_class (wctype_t)
+ charset[6+CHAR_CLASS_SIZE] = char_class (wctype_t)
+ ...
+ charset[l+5] = char_class (wctype_t)
+
+ charset[l+6] = collating_symbol (wchar_t)
+ ...
+ charset[l+m+5] = collating_symbol (wchar_t)
+ ifdef _LIBC we use the index if
+ _NL_COLLATE_SYMB_EXTRAMB instead of
+ wchar_t string.
+
+ charset[l+m+6] = equivalence_classes (wchar_t)
+ ...
+ charset[l+m+n+5] = equivalence_classes (wchar_t)
+ ifdef _LIBC we use the index in
+ _NL_COLLATE_WEIGHT instead of
+ wchar_t string.
+
+ charset[l+m+n+6] = range_start
+ charset[l+m+n+7] = range_end
+ ...
+ charset[l+m+n+2o+4] = range_start
+ charset[l+m+n+2o+5] = range_end
+ ifdef _LIBC we use the value looked up
+ in _NL_COLLATE_COLLSEQ instead of
+ wchar_t character.
+
+ charset[l+m+n+2o+6] = char
+ ...
+ charset[l+m+n+2o+p+5] = char
+
+ */
+
+ /* We need at least 6 spaces: the opcode, the length of
+ char_classes, the length of collating_symbols, the length of
+ equivalence_classes, the length of char_ranges, the length of
+ chars. */
+ GET_BUFFER_SPACE (6);
+
+ /* Save b as laststart. And We use laststart as the pointer
+ to the first element of the charset here.
+ In other words, laststart[i] indicates charset[i]. */
+ laststart = b;
+
+ /* We test `*p == '^' twice, instead of using an if
+ statement, so we only need one BUF_PUSH. */
+ BUF_PUSH (*p == '^' ? charset_not : charset);
+ if (*p == '^')
+ p++;
+
+ /* Push the length of char_classes, the length of
+ collating_symbols, the length of equivalence_classes, the
+ length of char_ranges and the length of chars. */
+ BUF_PUSH_3 (0, 0, 0);
+ BUF_PUSH_2 (0, 0);
+
+ /* Remember the first position in the bracket expression. */
+ p1 = p;
+
+ /* charset_not matches newline according to a syntax bit. */
+ if ((re_opcode_t) b[-6] == charset_not
+ && (syntax & RE_HAT_LISTS_NOT_NEWLINE))
+ {
+ BUF_PUSH('\n');
+ laststart[5]++; /* Update the length of characters */
+ }
+
+ /* Read in characters and ranges, setting map bits. */
+ for (;;)
+ {
+ if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
+
+ PATFETCH (c);
+
+ /* \ might escape characters inside [...] and [^...]. */
+ if ((syntax & RE_BACKSLASH_ESCAPE_IN_LISTS) && c == '\\')
+ {
+ if (p == pend) FREE_STACK_RETURN (REG_EESCAPE);
+
+ PATFETCH (c1);
+ BUF_PUSH(c1);
+ laststart[5]++; /* Update the length of chars */
+ range_start = c1;
+ continue;
+ }
+
+ /* Could be the end of the bracket expression. If it's
+ not (i.e., when the bracket expression is `[]' so
+ far), the ']' character bit gets set way below. */
+ if (c == ']' && p != p1 + 1)
+ break;
+
+ /* Look ahead to see if it's a range when the last thing
+ was a character class. */
+ if (had_char_class && c == '-' && *p != ']')
+ FREE_STACK_RETURN (REG_ERANGE);
+
+ /* Look ahead to see if it's a range when the last thing
+ was a character: if this is a hyphen not at the
+ beginning or the end of a list, then it's the range
+ operator. */
+ if (c == '-'
+ && !(p - 2 >= pattern && p[-2] == '[')
+ && !(p - 3 >= pattern && p[-3] == '[' && p[-2] == '^')
+ && *p != ']')
+ {
+ reg_errcode_t ret;
+ /* Allocate the space for range_start and range_end. */
+ GET_BUFFER_SPACE (2);
+ /* Update the pointer to indicate end of buffer. */
+ b += 2;
+ ret = wcs_compile_range (range_start, &p, pend, translate,
+ syntax, b, laststart);
+ if (ret != REG_NOERROR) FREE_STACK_RETURN (ret);
+ range_start = 0xffffffff;
+ }
+ else if (p[0] == '-' && p[1] != ']')
+ { /* This handles ranges made up of characters only. */
+ reg_errcode_t ret;
+
+ /* Move past the `-'. */
+ PATFETCH (c1);
+ /* Allocate the space for range_start and range_end. */
+ GET_BUFFER_SPACE (2);
+ /* Update the pointer to indicate end of buffer. */
+ b += 2;
+ ret = wcs_compile_range (c, &p, pend, translate, syntax, b,
+ laststart);
+ if (ret != REG_NOERROR) FREE_STACK_RETURN (ret);
+ range_start = 0xffffffff;
+ }
+
+ /* See if we're at the beginning of a possible character
+ class. */
+ else if (syntax & RE_CHAR_CLASSES && c == '[' && *p == ':')
+ { /* Leave room for the null. */
+ char str[CHAR_CLASS_MAX_LENGTH + 1];
+
+ PATFETCH (c);
+ c1 = 0;
+
+ /* If pattern is `[[:'. */
+ if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
+
+ for (;;)
+ {
+ PATFETCH (c);
+ if ((c == ':' && *p == ']') || p == pend)
+ break;
+ if (c1 < CHAR_CLASS_MAX_LENGTH)
+ str[c1++] = c;
+ else
+ /* This is in any case an invalid class name. */
+ str[0] = '\0';
+ }
+ str[c1] = '\0';
+
+ /* If isn't a word bracketed by `[:' and `:]':
+ undo the ending character, the letters, and leave
+ the leading `:' and `[' (but store them as character). */
+ if (c == ':' && *p == ']')
+ {
+ wctype_t wt;
+ uintptr_t alignedp;
+
+ /* Query the character class as wctype_t. */
+ wt = IS_CHAR_CLASS (str);
+ if (wt == 0)
+ FREE_STACK_RETURN (REG_ECTYPE);
+
+ /* Throw away the ] at the end of the character
+ class. */
+ PATFETCH (c);
+
+ if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
+
+ /* Allocate the space for character class. */
+ GET_BUFFER_SPACE(CHAR_CLASS_SIZE);
+ /* Update the pointer to indicate end of buffer. */
+ b += CHAR_CLASS_SIZE;
+ /* Move data which follow character classes
+ not to violate the data. */
+ insert_space(CHAR_CLASS_SIZE,
+ laststart + 6 + laststart[1],
+ b - 1);
+ alignedp = ((uintptr_t)(laststart + 6 + laststart[1])
+ + __alignof__(wctype_t) - 1)
+ & ~(uintptr_t)(__alignof__(wctype_t) - 1);
+ /* Store the character class. */
+ *((wctype_t*)alignedp) = wt;
+ /* Update length of char_classes */
+ laststart[1] += CHAR_CLASS_SIZE;
+
+ had_char_class = true;
+ }
+ else
+ {
+ c1++;
+ while (c1--)
+ PATUNFETCH;
+ BUF_PUSH ('[');
+ BUF_PUSH (':');
+ laststart[5] += 2; /* Update the length of characters */
+ range_start = ':';
+ had_char_class = false;
+ }
+ }
+ else if (syntax & RE_CHAR_CLASSES && c == '[' && (*p == '='
+ || *p == '.'))
+ {
+ CHAR_T str[128]; /* Should be large enough. */
+ CHAR_T delim = *p; /* '=' or '.' */
+# ifdef _LIBC
+ uint32_t nrules =
+ _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
+# endif
+ PATFETCH (c);
+ c1 = 0;
+
+ /* If pattern is `[[=' or '[[.'. */
+ if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
+
+ for (;;)
+ {
+ PATFETCH (c);
+ if ((c == delim && *p == ']') || p == pend)
+ break;
+ if (c1 < sizeof (str) - 1)
+ str[c1++] = c;
+ else
+ /* This is in any case an invalid class name. */
+ str[0] = '\0';
+ }
+ str[c1] = '\0';
+
+ if (c == delim && *p == ']' && str[0] != '\0')
+ {
+ unsigned int i, offset;
+ /* If we have no collation data we use the default
+ collation in which each character is in a class
+ by itself. It also means that ASCII is the
+ character set and therefore we cannot have character
+ with more than one byte in the multibyte
+ representation. */
+
+ /* If not defined _LIBC, we push the name and
+ `\0' for the sake of matching performance. */
+ int datasize = c1 + 1;
+
+# ifdef _LIBC
+ int32_t idx = 0;
+ if (nrules == 0)
+# endif
+ {
+ if (c1 != 1)
+ FREE_STACK_RETURN (REG_ECOLLATE);
+ }
+# ifdef _LIBC
+ else
+ {
+ const int32_t *table;
+ const int32_t *weights;
+ const int32_t *extra;
+ const int32_t *indirect;
+ wint_t *cp;
+
+ /* This #include defines a local function! */
+# include <locale/weightwc.h>
+
+ if(delim == '=')
+ {
+ /* We push the index for equivalence class. */
+ cp = (wint_t*)str;
+
+ table = (const int32_t *)
+ _NL_CURRENT (LC_COLLATE,
+ _NL_COLLATE_TABLEWC);
+ weights = (const int32_t *)
+ _NL_CURRENT (LC_COLLATE,
+ _NL_COLLATE_WEIGHTWC);
+ extra = (const int32_t *)
+ _NL_CURRENT (LC_COLLATE,
+ _NL_COLLATE_EXTRAWC);
+ indirect = (const int32_t *)
+ _NL_CURRENT (LC_COLLATE,
+ _NL_COLLATE_INDIRECTWC);
+
+ idx = findidx ((const wint_t**)&cp);
+ if (idx == 0 || cp < (wint_t*) str + c1)
+ /* This is no valid character. */
+ FREE_STACK_RETURN (REG_ECOLLATE);
+
+ str[0] = (wchar_t)idx;
+ }
+ else /* delim == '.' */
+ {
+ /* We push collation sequence value
+ for collating symbol. */
+ int32_t table_size;
+ const int32_t *symb_table;
+ const unsigned char *extra;
+ int32_t idx;
+ int32_t elem;
+ int32_t second;
+ int32_t hash;
+ char char_str[c1];
+
+ /* We have to convert the name to a single-byte
+ string. This is possible since the names
+ consist of ASCII characters and the internal
+ representation is UCS4. */
+ for (i = 0; i < c1; ++i)
+ char_str[i] = str[i];
+
+ table_size =
+ _NL_CURRENT_WORD (LC_COLLATE,
+ _NL_COLLATE_SYMB_HASH_SIZEMB);
+ symb_table = (const int32_t *)
+ _NL_CURRENT (LC_COLLATE,
+ _NL_COLLATE_SYMB_TABLEMB);
+ extra = (const unsigned char *)
+ _NL_CURRENT (LC_COLLATE,
+ _NL_COLLATE_SYMB_EXTRAMB);
+
+ /* Locate the character in the hashing table. */
+ hash = elem_hash (char_str, c1);
+
+ idx = 0;
+ elem = hash % table_size;
+ second = hash % (table_size - 2);
+ while (symb_table[2 * elem] != 0)
+ {
+ /* First compare the hashing value. */
+ if (symb_table[2 * elem] == hash
+ && c1 == extra[symb_table[2 * elem + 1]]
+ && memcmp (char_str,
+ &extra[symb_table[2 * elem + 1]
+ + 1], c1) == 0)
+ {
+ /* Yep, this is the entry. */
+ idx = symb_table[2 * elem + 1];
+ idx += 1 + extra[idx];
+ break;
+ }
+
+ /* Next entry. */
+ elem += second;
+ }
+
+ if (symb_table[2 * elem] != 0)
+ {
+ /* Compute the index of the byte sequence
+ in the table. */
+ idx += 1 + extra[idx];
+ /* Adjust for the alignment. */
+ idx = (idx + 3) & ~3;
+
+ str[0] = (wchar_t) idx + 4;
+ }
+ else if (symb_table[2 * elem] == 0 && c1 == 1)
+ {
+ /* No valid character. Match it as a
+ single byte character. */
+ had_char_class = false;
+ BUF_PUSH(str[0]);
+ /* Update the length of characters */
+ laststart[5]++;
+ range_start = str[0];
+
+ /* Throw away the ] at the end of the
+ collating symbol. */
+ PATFETCH (c);
+ /* exit from the switch block. */
+ continue;
+ }
+ else
+ FREE_STACK_RETURN (REG_ECOLLATE);
+ }
+ datasize = 1;
+ }
+# endif
+ /* Throw away the ] at the end of the equivalence
+ class (or collating symbol). */
+ PATFETCH (c);
+
+ /* Allocate the space for the equivalence class
+ (or collating symbol) (and '\0' if needed). */
+ GET_BUFFER_SPACE(datasize);
+ /* Update the pointer to indicate end of buffer. */
+ b += datasize;
+
+ if (delim == '=')
+ { /* equivalence class */
+ /* Calculate the offset of char_ranges,
+ which is next to equivalence_classes. */
+ offset = laststart[1] + laststart[2]
+ + laststart[3] +6;
+ /* Insert space. */
+ insert_space(datasize, laststart + offset, b - 1);
+
+ /* Write the equivalence_class and \0. */
+ for (i = 0 ; i < datasize ; i++)
+ laststart[offset + i] = str[i];
+
+ /* Update the length of equivalence_classes. */
+ laststart[3] += datasize;
+ had_char_class = true;
+ }
+ else /* delim == '.' */
+ { /* collating symbol */
+ /* Calculate the offset of the equivalence_classes,
+ which is next to collating_symbols. */
+ offset = laststart[1] + laststart[2] + 6;
+ /* Insert space and write the collationg_symbol
+ and \0. */
+ insert_space(datasize, laststart + offset, b-1);
+ for (i = 0 ; i < datasize ; i++)
+ laststart[offset + i] = str[i];
+
+ /* In re_match_2_internal if range_start < -1, we
+ assume -range_start is the offset of the
+ collating symbol which is specified as
+ the character of the range start. So we assign
+ -(laststart[1] + laststart[2] + 6) to
+ range_start. */
+ range_start = -(laststart[1] + laststart[2] + 6);
+ /* Update the length of collating_symbol. */
+ laststart[2] += datasize;
+ had_char_class = false;
+ }
+ }
+ else
+ {
+ c1++;
+ while (c1--)
+ PATUNFETCH;
+ BUF_PUSH ('[');
+ BUF_PUSH (delim);
+ laststart[5] += 2; /* Update the length of characters */
+ range_start = delim;
+ had_char_class = false;
+ }
+ }
+ else
+ {
+ had_char_class = false;
+ BUF_PUSH(c);
+ laststart[5]++; /* Update the length of characters */
+ range_start = c;
+ }
+ }
+
+#else /* BYTE */
+ /* Ensure that we have enough space to push a charset: the
+ opcode, the length count, and the bitset; 34 bytes in all. */
+ GET_BUFFER_SPACE (34);
+
+ laststart = b;
+
+ /* We test `*p == '^' twice, instead of using an if
+ statement, so we only need one BUF_PUSH. */
+ BUF_PUSH (*p == '^' ? charset_not : charset);
+ if (*p == '^')
+ p++;
+
+ /* Remember the first position in the bracket expression. */
+ p1 = p;
+
+ /* Push the number of bytes in the bitmap. */
+ BUF_PUSH ((1 << BYTEWIDTH) / BYTEWIDTH);
+
+ /* Clear the whole map. */
+ bzero (b, (1 << BYTEWIDTH) / BYTEWIDTH);
+
+ /* charset_not matches newline according to a syntax bit. */
+ if ((re_opcode_t) b[-2] == charset_not
+ && (syntax & RE_HAT_LISTS_NOT_NEWLINE))
+ SET_LIST_BIT ('\n');
+
+ /* Read in characters and ranges, setting map bits. */
+ for (;;)
+ {
+ if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
+
+ PATFETCH (c);
+
+ /* \ might escape characters inside [...] and [^...]. */
+ if ((syntax & RE_BACKSLASH_ESCAPE_IN_LISTS) && c == '\\')
+ {
+ if (p == pend) FREE_STACK_RETURN (REG_EESCAPE);
+
+ PATFETCH (c1);
+ SET_LIST_BIT (c1);
+ range_start = c1;
+ continue;
+ }
+
+ /* Could be the end of the bracket expression. If it's
+ not (i.e., when the bracket expression is `[]' so
+ far), the ']' character bit gets set way below. */
+ if (c == ']' && p != p1 + 1)
+ break;
+
+ /* Look ahead to see if it's a range when the last thing
+ was a character class. */
+ if (had_char_class && c == '-' && *p != ']')
+ FREE_STACK_RETURN (REG_ERANGE);
+
+ /* Look ahead to see if it's a range when the last thing
+ was a character: if this is a hyphen not at the
+ beginning or the end of a list, then it's the range
+ operator. */
+ if (c == '-'
+ && !(p - 2 >= pattern && p[-2] == '[')
+ && !(p - 3 >= pattern && p[-3] == '[' && p[-2] == '^')
+ && *p != ']')
+ {
+ reg_errcode_t ret
+ = byte_compile_range (range_start, &p, pend, translate,
+ syntax, b);
+ if (ret != REG_NOERROR) FREE_STACK_RETURN (ret);
+ range_start = 0xffffffff;
+ }
+
+ else if (p[0] == '-' && p[1] != ']')
+ { /* This handles ranges made up of characters only. */
+ reg_errcode_t ret;
+
+ /* Move past the `-'. */
+ PATFETCH (c1);
+
+ ret = byte_compile_range (c, &p, pend, translate, syntax, b);
+ if (ret != REG_NOERROR) FREE_STACK_RETURN (ret);
+ range_start = 0xffffffff;
+ }
+
+ /* See if we're at the beginning of a possible character
+ class. */
+
+ else if (syntax & RE_CHAR_CLASSES && c == '[' && *p == ':')
+ { /* Leave room for the null. */
+ char str[CHAR_CLASS_MAX_LENGTH + 1];
+
+ PATFETCH (c);
+ c1 = 0;
+
+ /* If pattern is `[[:'. */
+ if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
+
+ for (;;)
+ {
+ PATFETCH (c);
+ if ((c == ':' && *p == ']') || p == pend)
+ break;
+ if (c1 < CHAR_CLASS_MAX_LENGTH)
+ str[c1++] = c;
+ else
+ /* This is in any case an invalid class name. */
+ str[0] = '\0';
+ }
+ str[c1] = '\0';
+
+ /* If isn't a word bracketed by `[:' and `:]':
+ undo the ending character, the letters, and leave
+ the leading `:' and `[' (but set bits for them). */
+ if (c == ':' && *p == ']')
+ {
+# if defined _LIBC || WIDE_CHAR_SUPPORT
+ boolean is_lower = STREQ (str, "lower");
+ boolean is_upper = STREQ (str, "upper");
+ wctype_t wt;
+ int ch;
+
+ wt = IS_CHAR_CLASS (str);
+ if (wt == 0)
+ FREE_STACK_RETURN (REG_ECTYPE);
+
+ /* Throw away the ] at the end of the character
+ class. */
+ PATFETCH (c);
+
+ if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
+
+ for (ch = 0; ch < 1 << BYTEWIDTH; ++ch)
+ {
+# ifdef _LIBC
+ if (__iswctype (__btowc (ch), wt))
+ SET_LIST_BIT (ch);
+# else
+ if (iswctype (btowc (ch), wt))
+ SET_LIST_BIT (ch);
+# endif
+
+ if (translate && (is_upper || is_lower)
+ && (ISUPPER (ch) || ISLOWER (ch)))
+ SET_LIST_BIT (ch);
+ }
+
+ had_char_class = true;
+# else
+ int ch;
+ boolean is_alnum = STREQ (str, "alnum");
+ boolean is_alpha = STREQ (str, "alpha");
+ boolean is_blank = STREQ (str, "blank");
+ boolean is_cntrl = STREQ (str, "cntrl");
+ boolean is_digit = STREQ (str, "digit");
+ boolean is_graph = STREQ (str, "graph");
+ boolean is_lower = STREQ (str, "lower");
+ boolean is_print = STREQ (str, "print");
+ boolean is_punct = STREQ (str, "punct");
+ boolean is_space = STREQ (str, "space");
+ boolean is_upper = STREQ (str, "upper");
+ boolean is_xdigit = STREQ (str, "xdigit");
+
+ if (!IS_CHAR_CLASS (str))
+ FREE_STACK_RETURN (REG_ECTYPE);
+
+ /* Throw away the ] at the end of the character
+ class. */
+ PATFETCH (c);
+
+ if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
+
+ for (ch = 0; ch < 1 << BYTEWIDTH; ch++)
+ {
+ /* This was split into 3 if's to
+ avoid an arbitrary limit in some compiler. */
+ if ( (is_alnum && ISALNUM (ch))
+ || (is_alpha && ISALPHA (ch))
+ || (is_blank && ISBLANK (ch))
+ || (is_cntrl && ISCNTRL (ch)))
+ SET_LIST_BIT (ch);
+ if ( (is_digit && ISDIGIT (ch))
+ || (is_graph && ISGRAPH (ch))
+ || (is_lower && ISLOWER (ch))
+ || (is_print && ISPRINT (ch)))
+ SET_LIST_BIT (ch);
+ if ( (is_punct && ISPUNCT (ch))
+ || (is_space && ISSPACE (ch))
+ || (is_upper && ISUPPER (ch))
+ || (is_xdigit && ISXDIGIT (ch)))
+ SET_LIST_BIT (ch);
+ if ( translate && (is_upper || is_lower)
+ && (ISUPPER (ch) || ISLOWER (ch)))
+ SET_LIST_BIT (ch);
+ }
+ had_char_class = true;
+# endif /* libc || wctype.h */
+ }
+ else
+ {
+ c1++;
+ while (c1--)
+ PATUNFETCH;
+ SET_LIST_BIT ('[');
+ SET_LIST_BIT (':');
+ range_start = ':';
+ had_char_class = false;
+ }
+ }
+ else if (syntax & RE_CHAR_CLASSES && c == '[' && *p == '=')
+ {
+ unsigned char str[MB_LEN_MAX + 1];
+# ifdef _LIBC
+ uint32_t nrules =
+ _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
+# endif
+
+ PATFETCH (c);
+ c1 = 0;
+
+ /* If pattern is `[[='. */
+ if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
+
+ for (;;)
+ {
+ PATFETCH (c);
+ if ((c == '=' && *p == ']') || p == pend)
+ break;
+ if (c1 < MB_LEN_MAX)
+ str[c1++] = c;
+ else
+ /* This is in any case an invalid class name. */
+ str[0] = '\0';
+ }
+ str[c1] = '\0';
+
+ if (c == '=' && *p == ']' && str[0] != '\0')
+ {
+ /* If we have no collation data we use the default
+ collation in which each character is in a class
+ by itself. It also means that ASCII is the
+ character set and therefore we cannot have character
+ with more than one byte in the multibyte
+ representation. */
+# ifdef _LIBC
+ if (nrules == 0)
+# endif
+ {
+ if (c1 != 1)
+ FREE_STACK_RETURN (REG_ECOLLATE);
+
+ /* Throw away the ] at the end of the equivalence
+ class. */
+ PATFETCH (c);
+
+ /* Set the bit for the character. */
+ SET_LIST_BIT (str[0]);
+ }
+# ifdef _LIBC
+ else
+ {
+ /* Try to match the byte sequence in `str' against
+ those known to the collate implementation.
+ First find out whether the bytes in `str' are
+ actually from exactly one character. */
+ const int32_t *table;
+ const unsigned char *weights;
+ const unsigned char *extra;
+ const int32_t *indirect;
+ int32_t idx;
+ const unsigned char *cp = str;
+ int ch;
+
+ /* This #include defines a local function! */
+# include <locale/weight.h>
+
+ table = (const int32_t *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB);
+ weights = (const unsigned char *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTMB);
+ extra = (const unsigned char *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB);
+ indirect = (const int32_t *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB);
+
+ idx = findidx (&cp);
+ if (idx == 0 || cp < str + c1)
+ /* This is no valid character. */
+ FREE_STACK_RETURN (REG_ECOLLATE);
+
+ /* Throw away the ] at the end of the equivalence
+ class. */
+ PATFETCH (c);
+
+ /* Now we have to go throught the whole table
+ and find all characters which have the same
+ first level weight.
+
+ XXX Note that this is not entirely correct.
+ we would have to match multibyte sequences
+ but this is not possible with the current
+ implementation. */
+ for (ch = 1; ch < 256; ++ch)
+ /* XXX This test would have to be changed if we
+ would allow matching multibyte sequences. */
+ if (table[ch] > 0)
+ {
+ int32_t idx2 = table[ch];
+ size_t len = weights[idx2];
+
+ /* Test whether the lenghts match. */
+ if (weights[idx] == len)
+ {
+ /* They do. New compare the bytes of
+ the weight. */
+ size_t cnt = 0;
+
+ while (cnt < len
+ && (weights[idx + 1 + cnt]
+ == weights[idx2 + 1 + cnt]))
+ ++cnt;
+
+ if (cnt == len)
+ /* They match. Mark the character as
+ acceptable. */
+ SET_LIST_BIT (ch);
+ }
+ }
+ }
+# endif
+ had_char_class = true;
+ }
+ else
+ {
+ c1++;
+ while (c1--)
+ PATUNFETCH;
+ SET_LIST_BIT ('[');
+ SET_LIST_BIT ('=');
+ range_start = '=';
+ had_char_class = false;
+ }
+ }
+ else if (syntax & RE_CHAR_CLASSES && c == '[' && *p == '.')
+ {
+ unsigned char str[128]; /* Should be large enough. */
+# ifdef _LIBC
+ uint32_t nrules =
+ _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
+# endif
+
+ PATFETCH (c);
+ c1 = 0;
+
+ /* If pattern is `[[.'. */
+ if (p == pend) FREE_STACK_RETURN (REG_EBRACK);
+
+ for (;;)
+ {
+ PATFETCH (c);
+ if ((c == '.' && *p == ']') || p == pend)
+ break;
+ if (c1 < sizeof (str))
+ str[c1++] = c;
+ else
+ /* This is in any case an invalid class name. */
+ str[0] = '\0';
+ }
+ str[c1] = '\0';
+
+ if (c == '.' && *p == ']' && str[0] != '\0')
+ {
+ /* If we have no collation data we use the default
+ collation in which each character is the name
+ for its own class which contains only the one
+ character. It also means that ASCII is the
+ character set and therefore we cannot have character
+ with more than one byte in the multibyte
+ representation. */
+# ifdef _LIBC
+ if (nrules == 0)
+# endif
+ {
+ if (c1 != 1)
+ FREE_STACK_RETURN (REG_ECOLLATE);
+
+ /* Throw away the ] at the end of the equivalence
+ class. */
+ PATFETCH (c);
+
+ /* Set the bit for the character. */
+ SET_LIST_BIT (str[0]);
+ range_start = ((const unsigned char *) str)[0];
+ }
+# ifdef _LIBC
+ else
+ {
+ /* Try to match the byte sequence in `str' against
+ those known to the collate implementation.
+ First find out whether the bytes in `str' are
+ actually from exactly one character. */
+ int32_t table_size;
+ const int32_t *symb_table;
+ const unsigned char *extra;
+ int32_t idx;
+ int32_t elem;
+ int32_t second;
+ int32_t hash;
+
+ table_size =
+ _NL_CURRENT_WORD (LC_COLLATE,
+ _NL_COLLATE_SYMB_HASH_SIZEMB);
+ symb_table = (const int32_t *)
+ _NL_CURRENT (LC_COLLATE,
+ _NL_COLLATE_SYMB_TABLEMB);
+ extra = (const unsigned char *)
+ _NL_CURRENT (LC_COLLATE,
+ _NL_COLLATE_SYMB_EXTRAMB);
+
+ /* Locate the character in the hashing table. */
+ hash = elem_hash (str, c1);
+
+ idx = 0;
+ elem = hash % table_size;
+ second = hash % (table_size - 2);
+ while (symb_table[2 * elem] != 0)
+ {
+ /* First compare the hashing value. */
+ if (symb_table[2 * elem] == hash
+ && c1 == extra[symb_table[2 * elem + 1]]
+ && memcmp (str,
+ &extra[symb_table[2 * elem + 1]
+ + 1],
+ c1) == 0)
+ {
+ /* Yep, this is the entry. */
+ idx = symb_table[2 * elem + 1];
+ idx += 1 + extra[idx];
+ break;
+ }
+
+ /* Next entry. */
+ elem += second;
+ }
+
+ if (symb_table[2 * elem] == 0)
+ /* This is no valid character. */
+ FREE_STACK_RETURN (REG_ECOLLATE);
+
+ /* Throw away the ] at the end of the equivalence
+ class. */
+ PATFETCH (c);
+
+ /* Now add the multibyte character(s) we found
+ to the accept list.
+
+ XXX Note that this is not entirely correct.
+ we would have to match multibyte sequences
+ but this is not possible with the current
+ implementation. Also, we have to match
+ collating symbols, which expand to more than
+ one file, as a whole and not allow the
+ individual bytes. */
+ c1 = extra[idx++];
+ if (c1 == 1)
+ range_start = extra[idx];
+ while (c1-- > 0)
+ {
+ SET_LIST_BIT (extra[idx]);
+ ++idx;
+ }
+ }
+# endif
+ had_char_class = false;
+ }
+ else
+ {
+ c1++;
+ while (c1--)
+ PATUNFETCH;
+ SET_LIST_BIT ('[');
+ SET_LIST_BIT ('.');
+ range_start = '.';
+ had_char_class = false;
+ }
+ }
+ else
+ {
+ had_char_class = false;
+ SET_LIST_BIT (c);
+ range_start = c;
+ }
+ }
+
+ /* Discard any (non)matching list bytes that are all 0 at the
+ end of the map. Decrease the map-length byte too. */
+ while ((int) b[-1] > 0 && b[b[-1] - 1] == 0)
+ b[-1]--;
+ b += b[-1];
+#endif /* WCHAR */
+ }
+ break;
+
+
+ case '(':
+ if (syntax & RE_NO_BK_PARENS)
+ goto handle_open;
+ else
+ goto normal_char;
+
+
+ case ')':
+ if (syntax & RE_NO_BK_PARENS)
+ goto handle_close;
+ else
+ goto normal_char;
+
+
+ case '\n':
+ if (syntax & RE_NEWLINE_ALT)
+ goto handle_alt;
+ else
+ goto normal_char;
+
+
+ case '|':
+ if (syntax & RE_NO_BK_VBAR)
+ goto handle_alt;
+ else
+ goto normal_char;
+
+
+ case '{':
+ if (syntax & RE_INTERVALS && syntax & RE_NO_BK_BRACES)
+ goto handle_interval;
+ else
+ goto normal_char;
+
+
+ case '\\':
+ if (p == pend) FREE_STACK_RETURN (REG_EESCAPE);
+
+ /* Do not translate the character after the \, so that we can
+ distinguish, e.g., \B from \b, even if we normally would
+ translate, e.g., B to b. */
+ PATFETCH_RAW (c);
+
+ switch (c)
+ {
+ case '(':
+ if (syntax & RE_NO_BK_PARENS)
+ goto normal_backslash;
+
+ handle_open:
+ bufp->re_nsub++;
+ regnum++;
+
+ if (COMPILE_STACK_FULL)
+ {
+ RETALLOC (compile_stack.stack, compile_stack.size << 1,
+ compile_stack_elt_t);
+ if (compile_stack.stack == NULL) return REG_ESPACE;
+
+ compile_stack.size <<= 1;
+ }
+
+ /* These are the values to restore when we hit end of this
+ group. They are all relative offsets, so that if the
+ whole pattern moves because of realloc, they will still
+ be valid. */
+ COMPILE_STACK_TOP.begalt_offset = begalt - COMPILED_BUFFER_VAR;
+ COMPILE_STACK_TOP.fixup_alt_jump
+ = fixup_alt_jump ? fixup_alt_jump - COMPILED_BUFFER_VAR + 1 : 0;
+ COMPILE_STACK_TOP.laststart_offset = b - COMPILED_BUFFER_VAR;
+ COMPILE_STACK_TOP.regnum = regnum;
+
+ /* We will eventually replace the 0 with the number of
+ groups inner to this one. But do not push a
+ start_memory for groups beyond the last one we can
+ represent in the compiled pattern. */
+ if (regnum <= MAX_REGNUM)
+ {
+ COMPILE_STACK_TOP.inner_group_offset = b
+ - COMPILED_BUFFER_VAR + 2;
+ BUF_PUSH_3 (start_memory, regnum, 0);
+ }
+
+ compile_stack.avail++;
+
+ fixup_alt_jump = 0;
+ laststart = 0;
+ begalt = b;
+ /* If we've reached MAX_REGNUM groups, then this open
+ won't actually generate any code, so we'll have to
+ clear pending_exact explicitly. */
+ pending_exact = 0;
+ break;
+
+
+ case ')':
+ if (syntax & RE_NO_BK_PARENS) goto normal_backslash;
+
+ if (COMPILE_STACK_EMPTY)
+ {
+ if (syntax & RE_UNMATCHED_RIGHT_PAREN_ORD)
+ goto normal_backslash;
+ else
+ FREE_STACK_RETURN (REG_ERPAREN);
+ }
+
+ handle_close:
+ if (fixup_alt_jump)
+ { /* Push a dummy failure point at the end of the
+ alternative for a possible future
+ `pop_failure_jump' to pop. See comments at
+ `push_dummy_failure' in `re_match_2'. */
+ BUF_PUSH (push_dummy_failure);
+
+ /* We allocated space for this jump when we assigned
+ to `fixup_alt_jump', in the `handle_alt' case below. */
+ STORE_JUMP (jump_past_alt, fixup_alt_jump, b - 1);
+ }
+
+ /* See similar code for backslashed left paren above. */
+ if (COMPILE_STACK_EMPTY)
+ {
+ if (syntax & RE_UNMATCHED_RIGHT_PAREN_ORD)
+ goto normal_char;
+ else
+ FREE_STACK_RETURN (REG_ERPAREN);
+ }
+
+ /* Since we just checked for an empty stack above, this
+ ``can't happen''. */
+ assert (compile_stack.avail != 0);
+ {
+ /* We don't just want to restore into `regnum', because
+ later groups should continue to be numbered higher,
+ as in `(ab)c(de)' -- the second group is #2. */
+ regnum_t this_group_regnum;
+
+ compile_stack.avail--;
+ begalt = COMPILED_BUFFER_VAR + COMPILE_STACK_TOP.begalt_offset;
+ fixup_alt_jump
+ = COMPILE_STACK_TOP.fixup_alt_jump
+ ? COMPILED_BUFFER_VAR + COMPILE_STACK_TOP.fixup_alt_jump - 1
+ : 0;
+ laststart = COMPILED_BUFFER_VAR + COMPILE_STACK_TOP.laststart_offset;
+ this_group_regnum = COMPILE_STACK_TOP.regnum;
+ /* If we've reached MAX_REGNUM groups, then this open
+ won't actually generate any code, so we'll have to
+ clear pending_exact explicitly. */
+ pending_exact = 0;
+
+ /* We're at the end of the group, so now we know how many
+ groups were inside this one. */
+ if (this_group_regnum <= MAX_REGNUM)
+ {
+ UCHAR_T *inner_group_loc
+ = COMPILED_BUFFER_VAR + COMPILE_STACK_TOP.inner_group_offset;
+
+ *inner_group_loc = regnum - this_group_regnum;
+ BUF_PUSH_3 (stop_memory, this_group_regnum,
+ regnum - this_group_regnum);
+ }
+ }
+ break;
+
+
+ case '|': /* `\|'. */
+ if (syntax & RE_LIMITED_OPS || syntax & RE_NO_BK_VBAR)
+ goto normal_backslash;
+ handle_alt:
+ if (syntax & RE_LIMITED_OPS)
+ goto normal_char;
+
+ /* Insert before the previous alternative a jump which
+ jumps to this alternative if the former fails. */
+ GET_BUFFER_SPACE (1 + OFFSET_ADDRESS_SIZE);
+ INSERT_JUMP (on_failure_jump, begalt,
+ b + 2 + 2 * OFFSET_ADDRESS_SIZE);
+ pending_exact = 0;
+ b += 1 + OFFSET_ADDRESS_SIZE;
+
+ /* The alternative before this one has a jump after it
+ which gets executed if it gets matched. Adjust that
+ jump so it will jump to this alternative's analogous
+ jump (put in below, which in turn will jump to the next
+ (if any) alternative's such jump, etc.). The last such
+ jump jumps to the correct final destination. A picture:
+ _____ _____
+ | | | |
+ | v | v
+ a | b | c
+
+ If we are at `b', then fixup_alt_jump right now points to a
+ three-byte space after `a'. We'll put in the jump, set
+ fixup_alt_jump to right after `b', and leave behind three
+ bytes which we'll fill in when we get to after `c'. */
+
+ if (fixup_alt_jump)
+ STORE_JUMP (jump_past_alt, fixup_alt_jump, b);
+
+ /* Mark and leave space for a jump after this alternative,
+ to be filled in later either by next alternative or
+ when know we're at the end of a series of alternatives. */
+ fixup_alt_jump = b;
+ GET_BUFFER_SPACE (1 + OFFSET_ADDRESS_SIZE);
+ b += 1 + OFFSET_ADDRESS_SIZE;
+
+ laststart = 0;
+ begalt = b;
+ break;
+
+
+ case '{':
+ /* If \{ is a literal. */
+ if (!(syntax & RE_INTERVALS)
+ /* If we're at `\{' and it's not the open-interval
+ operator. */
+ || (syntax & RE_NO_BK_BRACES))
+ goto normal_backslash;
+
+ handle_interval:
+ {
+ /* If got here, then the syntax allows intervals. */
+
+ /* At least (most) this many matches must be made. */
+ int lower_bound = -1, upper_bound = -1;
+
+ /* Place in the uncompiled pattern (i.e., just after
+ the '{') to go back to if the interval is invalid. */
+ const CHAR_T *beg_interval = p;
+
+ if (p == pend)
+ goto invalid_interval;
+
+ GET_UNSIGNED_NUMBER (lower_bound);
+
+ if (c == ',')
+ {
+ GET_UNSIGNED_NUMBER (upper_bound);
+ if (upper_bound < 0)
+ upper_bound = RE_DUP_MAX;
+ }
+ else
+ /* Interval such as `{1}' => match exactly once. */
+ upper_bound = lower_bound;
+
+ if (! (0 <= lower_bound && lower_bound <= upper_bound))
+ goto invalid_interval;
+
+ if (!(syntax & RE_NO_BK_BRACES))
+ {
+ if (c != '\\' || p == pend)
+ goto invalid_interval;
+ PATFETCH (c);
+ }
+
+ if (c != '}')
+ goto invalid_interval;
+
+ /* If it's invalid to have no preceding re. */
+ if (!laststart)
+ {
+ if (syntax & RE_CONTEXT_INVALID_OPS
+ && !(syntax & RE_INVALID_INTERVAL_ORD))
+ FREE_STACK_RETURN (REG_BADRPT);
+ else if (syntax & RE_CONTEXT_INDEP_OPS)
+ laststart = b;
+ else
+ goto unfetch_interval;
+ }
+
+ /* We just parsed a valid interval. */
+
+ if (RE_DUP_MAX < upper_bound)
+ FREE_STACK_RETURN (REG_BADBR);
+
+ /* If the upper bound is zero, don't want to succeed at
+ all; jump from `laststart' to `b + 3', which will be
+ the end of the buffer after we insert the jump. */
+ /* ifdef WCHAR, 'b + 1 + OFFSET_ADDRESS_SIZE'
+ instead of 'b + 3'. */
+ if (upper_bound == 0)
+ {
+ GET_BUFFER_SPACE (1 + OFFSET_ADDRESS_SIZE);
+ INSERT_JUMP (jump, laststart, b + 1
+ + OFFSET_ADDRESS_SIZE);
+ b += 1 + OFFSET_ADDRESS_SIZE;
+ }
+
+ /* Otherwise, we have a nontrivial interval. When
+ we're all done, the pattern will look like:
+ set_number_at <jump count> <upper bound>
+ set_number_at <succeed_n count> <lower bound>
+ succeed_n <after jump addr> <succeed_n count>
+ <body of loop>
+ jump_n <succeed_n addr> <jump count>
+ (The upper bound and `jump_n' are omitted if
+ `upper_bound' is 1, though.) */
+ else
+ { /* If the upper bound is > 1, we need to insert
+ more at the end of the loop. */
+ unsigned nbytes = 2 + 4 * OFFSET_ADDRESS_SIZE +
+ (upper_bound > 1) * (2 + 4 * OFFSET_ADDRESS_SIZE);
+
+ GET_BUFFER_SPACE (nbytes);
+
+ /* Initialize lower bound of the `succeed_n', even
+ though it will be set during matching by its
+ attendant `set_number_at' (inserted next),
+ because `re_compile_fastmap' needs to know.
+ Jump to the `jump_n' we might insert below. */
+ INSERT_JUMP2 (succeed_n, laststart,
+ b + 1 + 2 * OFFSET_ADDRESS_SIZE
+ + (upper_bound > 1) * (1 + 2 * OFFSET_ADDRESS_SIZE)
+ , lower_bound);
+ b += 1 + 2 * OFFSET_ADDRESS_SIZE;
+
+ /* Code to initialize the lower bound. Insert
+ before the `succeed_n'. The `5' is the last two
+ bytes of this `set_number_at', plus 3 bytes of
+ the following `succeed_n'. */
+ /* ifdef WCHAR, The '1+2*OFFSET_ADDRESS_SIZE'
+ is the 'set_number_at', plus '1+OFFSET_ADDRESS_SIZE'
+ of the following `succeed_n'. */
+ PREFIX(insert_op2) (set_number_at, laststart, 1
+ + 2 * OFFSET_ADDRESS_SIZE, lower_bound, b);
+ b += 1 + 2 * OFFSET_ADDRESS_SIZE;
+
+ if (upper_bound > 1)
+ { /* More than one repetition is allowed, so
+ append a backward jump to the `succeed_n'
+ that starts this interval.
+
+ When we've reached this during matching,
+ we'll have matched the interval once, so
+ jump back only `upper_bound - 1' times. */
+ STORE_JUMP2 (jump_n, b, laststart
+ + 2 * OFFSET_ADDRESS_SIZE + 1,
+ upper_bound - 1);
+ b += 1 + 2 * OFFSET_ADDRESS_SIZE;
+
+ /* The location we want to set is the second
+ parameter of the `jump_n'; that is `b-2' as
+ an absolute address. `laststart' will be
+ the `set_number_at' we're about to insert;
+ `laststart+3' the number to set, the source
+ for the relative address. But we are
+ inserting into the middle of the pattern --
+ so everything is getting moved up by 5.
+ Conclusion: (b - 2) - (laststart + 3) + 5,
+ i.e., b - laststart.
+
+ We insert this at the beginning of the loop
+ so that if we fail during matching, we'll
+ reinitialize the bounds. */
+ PREFIX(insert_op2) (set_number_at, laststart,
+ b - laststart,
+ upper_bound - 1, b);
+ b += 1 + 2 * OFFSET_ADDRESS_SIZE;
+ }
+ }
+ pending_exact = 0;
+ break;
+
+ invalid_interval:
+ if (!(syntax & RE_INVALID_INTERVAL_ORD))
+ FREE_STACK_RETURN (p == pend ? REG_EBRACE : REG_BADBR);
+ unfetch_interval:
+ /* Match the characters as literals. */
+ p = beg_interval;
+ c = '{';
+ if (syntax & RE_NO_BK_BRACES)
+ goto normal_char;
+ else
+ goto normal_backslash;
+ }
+
+#ifdef emacs
+ /* There is no way to specify the before_dot and after_dot
+ operators. rms says this is ok. --karl */
+ case '=':
+ BUF_PUSH (at_dot);
+ break;
+
+ case 's':
+ laststart = b;
+ PATFETCH (c);
+ BUF_PUSH_2 (syntaxspec, syntax_spec_code[c]);
+ break;
+
+ case 'S':
+ laststart = b;
+ PATFETCH (c);
+ BUF_PUSH_2 (notsyntaxspec, syntax_spec_code[c]);
+ break;
+#endif /* emacs */
+
+
+ case 'w':
+ if (syntax & RE_NO_GNU_OPS)
+ goto normal_char;
+ laststart = b;
+ BUF_PUSH (wordchar);
+ break;
+
+
+ case 'W':
+ if (syntax & RE_NO_GNU_OPS)
+ goto normal_char;
+ laststart = b;
+ BUF_PUSH (notwordchar);
+ break;
+
+
+ case '<':
+ if (syntax & RE_NO_GNU_OPS)
+ goto normal_char;
+ BUF_PUSH (wordbeg);
+ break;
+
+ case '>':
+ if (syntax & RE_NO_GNU_OPS)
+ goto normal_char;
+ BUF_PUSH (wordend);
+ break;
+
+ case 'b':
+ if (syntax & RE_NO_GNU_OPS)
+ goto normal_char;
+ BUF_PUSH (wordbound);
+ break;
+
+ case 'B':
+ if (syntax & RE_NO_GNU_OPS)
+ goto normal_char;
+ BUF_PUSH (notwordbound);
+ break;
+
+ case '`':
+ if (syntax & RE_NO_GNU_OPS)
+ goto normal_char;
+ BUF_PUSH (begbuf);
+ break;
+
+ case '\'':
+ if (syntax & RE_NO_GNU_OPS)
+ goto normal_char;
+ BUF_PUSH (endbuf);
+ break;
+
+ case '1': case '2': case '3': case '4': case '5':
+ case '6': case '7': case '8': case '9':
+ if (syntax & RE_NO_BK_REFS)
+ goto normal_char;
+
+ c1 = c - '0';
+
+ if (c1 > regnum)
+ FREE_STACK_RETURN (REG_ESUBREG);
+
+ /* Can't back reference to a subexpression if inside of it. */
+ if (group_in_compile_stack (compile_stack, (regnum_t) c1))
+ goto normal_char;
+
+ laststart = b;
+ BUF_PUSH_2 (duplicate, c1);
+ break;
+
+
+ case '+':
+ case '?':
+ if (syntax & RE_BK_PLUS_QM)
+ goto handle_plus;
+ else
+ goto normal_backslash;
+
+ default:
+ normal_backslash:
+ /* You might think it would be useful for \ to mean
+ not to translate; but if we don't translate it
+ it will never match anything. */
+ c = TRANSLATE (c);
+ goto normal_char;
+ }
+ break;
+
+
+ default:
+ /* Expects the character in `c'. */
+ normal_char:
+ /* If no exactn currently being built. */
+ if (!pending_exact
+#ifdef WCHAR
+ /* If last exactn handle binary(or character) and
+ new exactn handle character(or binary). */
+ || is_exactn_bin != is_binary[p - 1 - pattern]
+#endif /* WCHAR */
+
+ /* If last exactn not at current position. */
+ || pending_exact + *pending_exact + 1 != b
+
+ /* We have only one byte following the exactn for the count. */
+ || *pending_exact == (1 << BYTEWIDTH) - 1
+
+ /* If followed by a repetition operator. */
+ || *p == '*' || *p == '^'
+ || ((syntax & RE_BK_PLUS_QM)
+ ? *p == '\\' && (p[1] == '+' || p[1] == '?')
+ : (*p == '+' || *p == '?'))
+ || ((syntax & RE_INTERVALS)
+ && ((syntax & RE_NO_BK_BRACES)
+ ? *p == '{'
+ : (p[0] == '\\' && p[1] == '{'))))
+ {
+ /* Start building a new exactn. */
+
+ laststart = b;
+
+#ifdef WCHAR
+ /* Is this exactn binary data or character? */
+ is_exactn_bin = is_binary[p - 1 - pattern];
+ if (is_exactn_bin)
+ BUF_PUSH_2 (exactn_bin, 0);
+ else
+ BUF_PUSH_2 (exactn, 0);
+#else
+ BUF_PUSH_2 (exactn, 0);
+#endif /* WCHAR */
+ pending_exact = b - 1;
+ }
+
+ BUF_PUSH (c);
+ (*pending_exact)++;
+ break;
+ } /* switch (c) */
+ } /* while p != pend */
+
+
+ /* Through the pattern now. */
+
+ if (fixup_alt_jump)
+ STORE_JUMP (jump_past_alt, fixup_alt_jump, b);
+
+ if (!COMPILE_STACK_EMPTY)
+ FREE_STACK_RETURN (REG_EPAREN);
+
+ /* If we don't want backtracking, force success
+ the first time we reach the end of the compiled pattern. */
+ if (syntax & RE_NO_POSIX_BACKTRACKING)
+ BUF_PUSH (succeed);
+
+#ifdef WCHAR
+ free (pattern);
+ free (mbs_offset);
+ free (is_binary);
+#endif
+ free (compile_stack.stack);
+
+ /* We have succeeded; set the length of the buffer. */
+#ifdef WCHAR
+ bufp->used = (uintptr_t) b - (uintptr_t) COMPILED_BUFFER_VAR;
+#else
+ bufp->used = b - bufp->buffer;
+#endif
+
+#ifdef DEBUG
+ if (debug)
+ {
+ DEBUG_PRINT1 ("\nCompiled pattern: \n");
+ PREFIX(print_compiled_pattern) (bufp);
+ }
+#endif /* DEBUG */
+
+#ifndef MATCH_MAY_ALLOCATE
+ /* Initialize the failure stack to the largest possible stack. This
+ isn't necessary unless we're trying to avoid calling alloca in
+ the search and match routines. */
+ {
+ int num_regs = bufp->re_nsub + 1;
+
+ /* Since DOUBLE_FAIL_STACK refuses to double only if the current size
+ is strictly greater than re_max_failures, the largest possible stack
+ is 2 * re_max_failures failure points. */
+ if (fail_stack.size < (2 * re_max_failures * MAX_FAILURE_ITEMS))
+ {
+ fail_stack.size = (2 * re_max_failures * MAX_FAILURE_ITEMS);
+
+# ifdef emacs
+ if (! fail_stack.stack)
+ fail_stack.stack
+ = (PREFIX(fail_stack_elt_t) *) xmalloc (fail_stack.size
+ * sizeof (PREFIX(fail_stack_elt_t)));
+ else
+ fail_stack.stack
+ = (PREFIX(fail_stack_elt_t) *) xrealloc (fail_stack.stack,
+ (fail_stack.size
+ * sizeof (PREFIX(fail_stack_elt_t))));
+# else /* not emacs */
+ if (! fail_stack.stack)
+ fail_stack.stack
+ = (PREFIX(fail_stack_elt_t) *) malloc (fail_stack.size
+ * sizeof (PREFIX(fail_stack_elt_t)));
+ else
+ fail_stack.stack
+ = (PREFIX(fail_stack_elt_t) *) realloc (fail_stack.stack,
+ (fail_stack.size
+ * sizeof (PREFIX(fail_stack_elt_t))));
+# endif /* not emacs */
+ }
+
+ PREFIX(regex_grow_registers) (num_regs);
+ }
+#endif /* not MATCH_MAY_ALLOCATE */
+
+ return REG_NOERROR;
+} /* regex_compile */
+
+/* Subroutines for `regex_compile'. */
+
+/* Store OP at LOC followed by two-byte integer parameter ARG. */
+/* ifdef WCHAR, integer parameter is 1 wchar_t. */
+
+static void
+PREFIX(store_op1) (op, loc, arg)
+ re_opcode_t op;
+ UCHAR_T *loc;
+ int arg;
+{
+ *loc = (UCHAR_T) op;
+ STORE_NUMBER (loc + 1, arg);
+}
+
+
+/* Like `store_op1', but for two two-byte parameters ARG1 and ARG2. */
+/* ifdef WCHAR, integer parameter is 1 wchar_t. */
+
+static void
+PREFIX(store_op2) (op, loc, arg1, arg2)
+ re_opcode_t op;
+ UCHAR_T *loc;
+ int arg1, arg2;
+{
+ *loc = (UCHAR_T) op;
+ STORE_NUMBER (loc + 1, arg1);
+ STORE_NUMBER (loc + 1 + OFFSET_ADDRESS_SIZE, arg2);
+}
+
+
+/* Copy the bytes from LOC to END to open up three bytes of space at LOC
+ for OP followed by two-byte integer parameter ARG. */
+/* ifdef WCHAR, integer parameter is 1 wchar_t. */
+
+static void
+PREFIX(insert_op1) (op, loc, arg, end)
+ re_opcode_t op;
+ UCHAR_T *loc;
+ int arg;
+ UCHAR_T *end;
+{
+ register UCHAR_T *pfrom = end;
+ register UCHAR_T *pto = end + 1 + OFFSET_ADDRESS_SIZE;
+
+ while (pfrom != loc)
+ *--pto = *--pfrom;
+
+ PREFIX(store_op1) (op, loc, arg);
+}
+
+
+/* Like `insert_op1', but for two two-byte parameters ARG1 and ARG2. */
+/* ifdef WCHAR, integer parameter is 1 wchar_t. */
+
+static void
+PREFIX(insert_op2) (op, loc, arg1, arg2, end)
+ re_opcode_t op;
+ UCHAR_T *loc;
+ int arg1, arg2;
+ UCHAR_T *end;
+{
+ register UCHAR_T *pfrom = end;
+ register UCHAR_T *pto = end + 1 + 2 * OFFSET_ADDRESS_SIZE;
+
+ while (pfrom != loc)
+ *--pto = *--pfrom;
+
+ PREFIX(store_op2) (op, loc, arg1, arg2);
+}
+
+
+/* P points to just after a ^ in PATTERN. Return true if that ^ comes
+ after an alternative or a begin-subexpression. We assume there is at
+ least one character before the ^. */
+
+static boolean
+PREFIX(at_begline_loc_p) (pattern, p, syntax)
+ const CHAR_T *pattern, *p;
+ reg_syntax_t syntax;
+{
+ const CHAR_T *prev = p - 2;
+ boolean prev_prev_backslash = prev > pattern && prev[-1] == '\\';
+
+ return
+ /* After a subexpression? */
+ (*prev == '(' && (syntax & RE_NO_BK_PARENS || prev_prev_backslash))
+ /* After an alternative? */
+ || (*prev == '|' && (syntax & RE_NO_BK_VBAR || prev_prev_backslash));
+}
+
+
+/* The dual of at_begline_loc_p. This one is for $. We assume there is
+ at least one character after the $, i.e., `P < PEND'. */
+
+static boolean
+PREFIX(at_endline_loc_p) (p, pend, syntax)
+ const CHAR_T *p, *pend;
+ reg_syntax_t syntax;
+{
+ const CHAR_T *next = p;
+ boolean next_backslash = *next == '\\';
+ const CHAR_T *next_next = p + 1 < pend ? p + 1 : 0;
+
+ return
+ /* Before a subexpression? */
+ (syntax & RE_NO_BK_PARENS ? *next == ')'
+ : next_backslash && next_next && *next_next == ')')
+ /* Before an alternative? */
+ || (syntax & RE_NO_BK_VBAR ? *next == '|'
+ : next_backslash && next_next && *next_next == '|');
+}
+
+#else /* not INSIDE_RECURSION */
+
+/* Returns true if REGNUM is in one of COMPILE_STACK's elements and
+ false if it's not. */
+
+static boolean
+group_in_compile_stack (compile_stack, regnum)
+ compile_stack_type compile_stack;
+ regnum_t regnum;
+{
+ int this_element;
+
+ for (this_element = compile_stack.avail - 1;
+ this_element >= 0;
+ this_element--)
+ if (compile_stack.stack[this_element].regnum == regnum)
+ return true;
+
+ return false;
+}
+#endif /* not INSIDE_RECURSION */
+
+#ifdef INSIDE_RECURSION
+
+#ifdef WCHAR
+/* This insert space, which size is "num", into the pattern at "loc".
+ "end" must point the end of the allocated buffer. */
+static void
+insert_space (num, loc, end)
+ int num;
+ CHAR_T *loc;
+ CHAR_T *end;
+{
+ register CHAR_T *pto = end;
+ register CHAR_T *pfrom = end - num;
+
+ while (pfrom >= loc)
+ *pto-- = *pfrom--;
+}
+#endif /* WCHAR */
+
+#ifdef WCHAR
+static reg_errcode_t
+wcs_compile_range (range_start_char, p_ptr, pend, translate, syntax, b,
+ char_set)
+ CHAR_T range_start_char;
+ const CHAR_T **p_ptr, *pend;
+ CHAR_T *char_set, *b;
+ RE_TRANSLATE_TYPE translate;
+ reg_syntax_t syntax;
+{
+ const CHAR_T *p = *p_ptr;
+ CHAR_T range_start, range_end;
+ reg_errcode_t ret;
+# ifdef _LIBC
+ uint32_t nrules;
+ uint32_t start_val, end_val;
+# endif
+ if (p == pend)
+ return REG_ERANGE;
+
+# ifdef _LIBC
+ nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
+ if (nrules != 0)
+ {
+ const char *collseq = (const char *) _NL_CURRENT(LC_COLLATE,
+ _NL_COLLATE_COLLSEQWC);
+ const unsigned char *extra = (const unsigned char *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB);
+
+ if (range_start_char < -1)
+ {
+ /* range_start is a collating symbol. */
+ int32_t *wextra;
+ /* Retreive the index and get collation sequence value. */
+ wextra = (int32_t*)(extra + char_set[-range_start_char]);
+ start_val = wextra[1 + *wextra];
+ }
+ else
+ start_val = collseq_table_lookup(collseq, TRANSLATE(range_start_char));
+
+ end_val = collseq_table_lookup (collseq, TRANSLATE (p[0]));
+
+ /* Report an error if the range is empty and the syntax prohibits
+ this. */
+ ret = ((syntax & RE_NO_EMPTY_RANGES)
+ && (start_val > end_val))? REG_ERANGE : REG_NOERROR;
+
+ /* Insert space to the end of the char_ranges. */
+ insert_space(2, b - char_set[5] - 2, b - 1);
+ *(b - char_set[5] - 2) = (wchar_t)start_val;
+ *(b - char_set[5] - 1) = (wchar_t)end_val;
+ char_set[4]++; /* ranges_index */
+ }
+ else
+# endif
+ {
+ range_start = (range_start_char >= 0)? TRANSLATE (range_start_char):
+ range_start_char;
+ range_end = TRANSLATE (p[0]);
+ /* Report an error if the range is empty and the syntax prohibits
+ this. */
+ ret = ((syntax & RE_NO_EMPTY_RANGES)
+ && (range_start > range_end))? REG_ERANGE : REG_NOERROR;
+
+ /* Insert space to the end of the char_ranges. */
+ insert_space(2, b - char_set[5] - 2, b - 1);
+ *(b - char_set[5] - 2) = range_start;
+ *(b - char_set[5] - 1) = range_end;
+ char_set[4]++; /* ranges_index */
+ }
+ /* Have to increment the pointer into the pattern string, so the
+ caller isn't still at the ending character. */
+ (*p_ptr)++;
+
+ return ret;
+}
+#else /* BYTE */
+/* Read the ending character of a range (in a bracket expression) from the
+ uncompiled pattern *P_PTR (which ends at PEND). We assume the
+ starting character is in `P[-2]'. (`P[-1]' is the character `-'.)
+ Then we set the translation of all bits between the starting and
+ ending characters (inclusive) in the compiled pattern B.
+
+ Return an error code.
+
+ We use these short variable names so we can use the same macros as
+ `regex_compile' itself. */
+
+static reg_errcode_t
+byte_compile_range (range_start_char, p_ptr, pend, translate, syntax, b)
+ unsigned int range_start_char;
+ const char **p_ptr, *pend;
+ RE_TRANSLATE_TYPE translate;
+ reg_syntax_t syntax;
+ unsigned char *b;
+{
+ unsigned this_char;
+ const char *p = *p_ptr;
+ reg_errcode_t ret;
+# if _LIBC
+ const unsigned char *collseq;
+ unsigned int start_colseq;
+ unsigned int end_colseq;
+# else
+ unsigned end_char;
+# endif
+
+ if (p == pend)
+ return REG_ERANGE;
+
+ /* Have to increment the pointer into the pattern string, so the
+ caller isn't still at the ending character. */
+ (*p_ptr)++;
+
+ /* Report an error if the range is empty and the syntax prohibits this. */
+ ret = syntax & RE_NO_EMPTY_RANGES ? REG_ERANGE : REG_NOERROR;
+
+# if _LIBC
+ collseq = (const unsigned char *) _NL_CURRENT (LC_COLLATE,
+ _NL_COLLATE_COLLSEQMB);
+
+ start_colseq = collseq[(unsigned char) TRANSLATE (range_start_char)];
+ end_colseq = collseq[(unsigned char) TRANSLATE (p[0])];
+ for (this_char = 0; this_char <= (unsigned char) -1; ++this_char)
+ {
+ unsigned int this_colseq = collseq[(unsigned char) TRANSLATE (this_char)];
+
+ if (start_colseq <= this_colseq && this_colseq <= end_colseq)
+ {
+ SET_LIST_BIT (TRANSLATE (this_char));
+ ret = REG_NOERROR;
+ }
+ }
+# else
+ /* Here we see why `this_char' has to be larger than an `unsigned
+ char' -- we would otherwise go into an infinite loop, since all
+ characters <= 0xff. */
+ range_start_char = TRANSLATE (range_start_char);
+ /* TRANSLATE(p[0]) is casted to char (not unsigned char) in TRANSLATE,
+ and some compilers cast it to int implicitly, so following for_loop
+ may fall to (almost) infinite loop.
+ e.g. If translate[p[0]] = 0xff, end_char may equals to 0xffffffff.
+ To avoid this, we cast p[0] to unsigned int and truncate it. */
+ end_char = ((unsigned)TRANSLATE(p[0]) & ((1 << BYTEWIDTH) - 1));
+
+ for (this_char = range_start_char; this_char <= end_char; ++this_char)
+ {
+ SET_LIST_BIT (TRANSLATE (this_char));
+ ret = REG_NOERROR;
+ }
+# endif
+
+ return ret;
+}
+#endif /* WCHAR */
+
+/* re_compile_fastmap computes a ``fastmap'' for the compiled pattern in
+ BUFP. A fastmap records which of the (1 << BYTEWIDTH) possible
+ characters can start a string that matches the pattern. This fastmap
+ is used by re_search to skip quickly over impossible starting points.
+
+ The caller must supply the address of a (1 << BYTEWIDTH)-byte data
+ area as BUFP->fastmap.
+
+ We set the `fastmap', `fastmap_accurate', and `can_be_null' fields in
+ the pattern buffer.
+
+ Returns 0 if we succeed, -2 if an internal error. */
+
+#ifdef WCHAR
+/* local function for re_compile_fastmap.
+ truncate wchar_t character to char. */
+static unsigned char truncate_wchar (CHAR_T c);
+
+static unsigned char
+truncate_wchar (c)
+ CHAR_T c;
+{
+ unsigned char buf[MB_CUR_MAX];
+ mbstate_t state;
+ int retval;
+ memset (&state, '\0', sizeof (state));
+# ifdef _LIBC
+ retval = __wcrtomb (buf, c, &state);
+# else
+ retval = wcrtomb (buf, c, &state);
+# endif
+ return retval > 0 ? buf[0] : (unsigned char) c;
+}
+#endif /* WCHAR */
+
+static int
+PREFIX(re_compile_fastmap) (bufp)
+ struct re_pattern_buffer *bufp;
+{
+ int j, k;
+#ifdef MATCH_MAY_ALLOCATE
+ PREFIX(fail_stack_type) fail_stack;
+#endif
+#ifndef REGEX_MALLOC
+ char *destination;
+#endif
+
+ register char *fastmap = bufp->fastmap;
+
+#ifdef WCHAR
+ /* We need to cast pattern to (wchar_t*), because we casted this compiled
+ pattern to (char*) in regex_compile. */
+ UCHAR_T *pattern = (UCHAR_T*)bufp->buffer;
+ register UCHAR_T *pend = (UCHAR_T*) (bufp->buffer + bufp->used);
+#else /* BYTE */
+ UCHAR_T *pattern = bufp->buffer;
+ register UCHAR_T *pend = pattern + bufp->used;
+#endif /* WCHAR */
+ UCHAR_T *p = pattern;
+
+#ifdef REL_ALLOC
+ /* This holds the pointer to the failure stack, when
+ it is allocated relocatably. */
+ fail_stack_elt_t *failure_stack_ptr;
+#endif
+
+ /* Assume that each path through the pattern can be null until
+ proven otherwise. We set this false at the bottom of switch
+ statement, to which we get only if a particular path doesn't
+ match the empty string. */
+ boolean path_can_be_null = true;
+
+ /* We aren't doing a `succeed_n' to begin with. */
+ boolean succeed_n_p = false;
+
+ assert (fastmap != NULL && p != NULL);
+
+ INIT_FAIL_STACK ();
+ bzero (fastmap, 1 << BYTEWIDTH); /* Assume nothing's valid. */
+ bufp->fastmap_accurate = 1; /* It will be when we're done. */
+ bufp->can_be_null = 0;
+
+ while (1)
+ {
+ if (p == pend || *p == succeed)
+ {
+ /* We have reached the (effective) end of pattern. */
+ if (!FAIL_STACK_EMPTY ())
+ {
+ bufp->can_be_null |= path_can_be_null;
+
+ /* Reset for next path. */
+ path_can_be_null = true;
+
+ p = fail_stack.stack[--fail_stack.avail].pointer;
+
+ continue;
+ }
+ else
+ break;
+ }
+
+ /* We should never be about to go beyond the end of the pattern. */
+ assert (p < pend);
+
+ switch (SWITCH_ENUM_CAST ((re_opcode_t) *p++))
+ {
+
+ /* I guess the idea here is to simply not bother with a fastmap
+ if a backreference is used, since it's too hard to figure out
+ the fastmap for the corresponding group. Setting
+ `can_be_null' stops `re_search_2' from using the fastmap, so
+ that is all we do. */
+ case duplicate:
+ bufp->can_be_null = 1;
+ goto done;
+
+
+ /* Following are the cases which match a character. These end
+ with `break'. */
+
+#ifdef WCHAR
+ case exactn:
+ fastmap[truncate_wchar(p[1])] = 1;
+ break;
+#else /* BYTE */
+ case exactn:
+ fastmap[p[1]] = 1;
+ break;
+#endif /* WCHAR */
+#ifdef MBS_SUPPORT
+ case exactn_bin:
+ fastmap[p[1]] = 1;
+ break;
+#endif
+
+#ifdef WCHAR
+ /* It is hard to distinguish fastmap from (multi byte) characters
+ which depends on current locale. */
+ case charset:
+ case charset_not:
+ case wordchar:
+ case notwordchar:
+ bufp->can_be_null = 1;
+ goto done;
+#else /* BYTE */
+ case charset:
+ for (j = *p++ * BYTEWIDTH - 1; j >= 0; j--)
+ if (p[j / BYTEWIDTH] & (1 << (j % BYTEWIDTH)))
+ fastmap[j] = 1;
+ break;
+
+
+ case charset_not:
+ /* Chars beyond end of map must be allowed. */
+ for (j = *p * BYTEWIDTH; j < (1 << BYTEWIDTH); j++)
+ fastmap[j] = 1;
+
+ for (j = *p++ * BYTEWIDTH - 1; j >= 0; j--)
+ if (!(p[j / BYTEWIDTH] & (1 << (j % BYTEWIDTH))))
+ fastmap[j] = 1;
+ break;
+
+
+ case wordchar:
+ for (j = 0; j < (1 << BYTEWIDTH); j++)
+ if (SYNTAX (j) == Sword)
+ fastmap[j] = 1;
+ break;
+
+
+ case notwordchar:
+ for (j = 0; j < (1 << BYTEWIDTH); j++)
+ if (SYNTAX (j) != Sword)
+ fastmap[j] = 1;
+ break;
+#endif /* WCHAR */
+
+ case anychar:
+ {
+ int fastmap_newline = fastmap['\n'];
+
+ /* `.' matches anything ... */
+ for (j = 0; j < (1 << BYTEWIDTH); j++)
+ fastmap[j] = 1;
+
+ /* ... except perhaps newline. */
+ if (!(bufp->syntax & RE_DOT_NEWLINE))
+ fastmap['\n'] = fastmap_newline;
+
+ /* Return if we have already set `can_be_null'; if we have,
+ then the fastmap is irrelevant. Something's wrong here. */
+ else if (bufp->can_be_null)
+ goto done;
+
+ /* Otherwise, have to check alternative paths. */
+ break;
+ }
+
+#ifdef emacs
+ case syntaxspec:
+ k = *p++;
+ for (j = 0; j < (1 << BYTEWIDTH); j++)
+ if (SYNTAX (j) == (enum syntaxcode) k)
+ fastmap[j] = 1;
+ break;
+
+
+ case notsyntaxspec:
+ k = *p++;
+ for (j = 0; j < (1 << BYTEWIDTH); j++)
+ if (SYNTAX (j) != (enum syntaxcode) k)
+ fastmap[j] = 1;
+ break;
+
+
+ /* All cases after this match the empty string. These end with
+ `continue'. */
+
+
+ case before_dot:
+ case at_dot:
+ case after_dot:
+ continue;
+#endif /* emacs */
+
+
+ case no_op:
+ case begline:
+ case endline:
+ case begbuf:
+ case endbuf:
+ case wordbound:
+ case notwordbound:
+ case wordbeg:
+ case wordend:
+ case push_dummy_failure:
+ continue;
+
+
+ case jump_n:
+ case pop_failure_jump:
+ case maybe_pop_jump:
+ case jump:
+ case jump_past_alt:
+ case dummy_failure_jump:
+ EXTRACT_NUMBER_AND_INCR (j, p);
+ p += j;
+ if (j > 0)
+ continue;
+
+ /* Jump backward implies we just went through the body of a
+ loop and matched nothing. Opcode jumped to should be
+ `on_failure_jump' or `succeed_n'. Just treat it like an
+ ordinary jump. For a * loop, it has pushed its failure
+ point already; if so, discard that as redundant. */
+ if ((re_opcode_t) *p != on_failure_jump
+ && (re_opcode_t) *p != succeed_n)
+ continue;
+
+ p++;
+ EXTRACT_NUMBER_AND_INCR (j, p);
+ p += j;
+
+ /* If what's on the stack is where we are now, pop it. */
+ if (!FAIL_STACK_EMPTY ()
+ && fail_stack.stack[fail_stack.avail - 1].pointer == p)
+ fail_stack.avail--;
+
+ continue;
+
+
+ case on_failure_jump:
+ case on_failure_keep_string_jump:
+ handle_on_failure_jump:
+ EXTRACT_NUMBER_AND_INCR (j, p);
+
+ /* For some patterns, e.g., `(a?)?', `p+j' here points to the
+ end of the pattern. We don't want to push such a point,
+ since when we restore it above, entering the switch will
+ increment `p' past the end of the pattern. We don't need
+ to push such a point since we obviously won't find any more
+ fastmap entries beyond `pend'. Such a pattern can match
+ the null string, though. */
+ if (p + j < pend)
+ {
+ if (!PUSH_PATTERN_OP (p + j, fail_stack))
+ {
+ RESET_FAIL_STACK ();
+ return -2;
+ }
+ }
+ else
+ bufp->can_be_null = 1;
+
+ if (succeed_n_p)
+ {
+ EXTRACT_NUMBER_AND_INCR (k, p); /* Skip the n. */
+ succeed_n_p = false;
+ }
+
+ continue;
+
+
+ case succeed_n:
+ /* Get to the number of times to succeed. */
+ p += OFFSET_ADDRESS_SIZE;
+
+ /* Increment p past the n for when k != 0. */
+ EXTRACT_NUMBER_AND_INCR (k, p);
+ if (k == 0)
+ {
+ p -= 2 * OFFSET_ADDRESS_SIZE;
+ succeed_n_p = true; /* Spaghetti code alert. */
+ goto handle_on_failure_jump;
+ }
+ continue;
+
+
+ case set_number_at:
+ p += 2 * OFFSET_ADDRESS_SIZE;
+ continue;
+
+
+ case start_memory:
+ case stop_memory:
+ p += 2;
+ continue;
+
+
+ default:
+ abort (); /* We have listed all the cases. */
+ } /* switch *p++ */
+
+ /* Getting here means we have found the possible starting
+ characters for one path of the pattern -- and that the empty
+ string does not match. We need not follow this path further.
+ Instead, look at the next alternative (remembered on the
+ stack), or quit if no more. The test at the top of the loop
+ does these things. */
+ path_can_be_null = false;
+ p = pend;
+ } /* while p */
+
+ /* Set `can_be_null' for the last path (also the first path, if the
+ pattern is empty). */
+ bufp->can_be_null |= path_can_be_null;
+
+ done:
+ RESET_FAIL_STACK ();
+ return 0;
+}
+
+#else /* not INSIDE_RECURSION */
+
+int
+re_compile_fastmap (bufp)
+ struct re_pattern_buffer *bufp;
+{
+# ifdef MBS_SUPPORT
+ if (MB_CUR_MAX != 1)
+ return wcs_re_compile_fastmap(bufp);
+ else
+# endif
+ return byte_re_compile_fastmap(bufp);
+} /* re_compile_fastmap */
+#ifdef _LIBC
+weak_alias (__re_compile_fastmap, re_compile_fastmap)
+#endif
+
+
+/* Set REGS to hold NUM_REGS registers, storing them in STARTS and
+ ENDS. Subsequent matches using PATTERN_BUFFER and REGS will use
+ this memory for recording register information. STARTS and ENDS
+ must be allocated using the malloc library routine, and must each
+ be at least NUM_REGS * sizeof (regoff_t) bytes long.
+
+ If NUM_REGS == 0, then subsequent matches should allocate their own
+ register data.
+
+ Unless this function is called, the first search or match using
+ PATTERN_BUFFER will allocate its own register data, without
+ freeing the old data. */
+
+void
+re_set_registers (bufp, regs, num_regs, starts, ends)
+ struct re_pattern_buffer *bufp;
+ struct re_registers *regs;
+ unsigned num_regs;
+ regoff_t *starts, *ends;
+{
+ if (num_regs)
+ {
+ bufp->regs_allocated = REGS_REALLOCATE;
+ regs->num_regs = num_regs;
+ regs->start = starts;
+ regs->end = ends;
+ }
+ else
+ {
+ bufp->regs_allocated = REGS_UNALLOCATED;
+ regs->num_regs = 0;
+ regs->start = regs->end = (regoff_t *) 0;
+ }
+}
+#ifdef _LIBC
+weak_alias (__re_set_registers, re_set_registers)
+#endif
+
+/* Searching routines. */
+
+/* Like re_search_2, below, but only one string is specified, and
+ doesn't let you say where to stop matching. */
+
+int
+re_search (bufp, string, size, startpos, range, regs)
+ struct re_pattern_buffer *bufp;
+ const char *string;
+ int size, startpos, range;
+ struct re_registers *regs;
+{
+ return re_search_2 (bufp, NULL, 0, string, size, startpos, range,
+ regs, size);
+}
+#ifdef _LIBC
+weak_alias (__re_search, re_search)
+#endif
+
+
+/* Using the compiled pattern in BUFP->buffer, first tries to match the
+ virtual concatenation of STRING1 and STRING2, starting first at index
+ STARTPOS, then at STARTPOS + 1, and so on.
+
+ STRING1 and STRING2 have length SIZE1 and SIZE2, respectively.
+
+ RANGE is how far to scan while trying to match. RANGE = 0 means try
+ only at STARTPOS; in general, the last start tried is STARTPOS +
+ RANGE.
+
+ In REGS, return the indices of the virtual concatenation of STRING1
+ and STRING2 that matched the entire BUFP->buffer and its contained
+ subexpressions.
+
+ Do not consider matching one past the index STOP in the virtual
+ concatenation of STRING1 and STRING2.
+
+ We return either the position in the strings at which the match was
+ found, -1 if no match, or -2 if error (such as failure
+ stack overflow). */
+
+int
+re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop)
+ struct re_pattern_buffer *bufp;
+ const char *string1, *string2;
+ int size1, size2;
+ int startpos;
+ int range;
+ struct re_registers *regs;
+ int stop;
+{
+# ifdef MBS_SUPPORT
+ if (MB_CUR_MAX != 1)
+ return wcs_re_search_2 (bufp, string1, size1, string2, size2, startpos,
+ range, regs, stop);
+ else
+# endif
+ return byte_re_search_2 (bufp, string1, size1, string2, size2, startpos,
+ range, regs, stop);
+} /* re_search_2 */
+#ifdef _LIBC
+weak_alias (__re_search_2, re_search_2)
+#endif
+
+#endif /* not INSIDE_RECURSION */
+
+#ifdef INSIDE_RECURSION
+
+#ifdef MATCH_MAY_ALLOCATE
+# define FREE_VAR(var) if (var) REGEX_FREE (var); var = NULL
+#else
+# define FREE_VAR(var) if (var) free (var); var = NULL
+#endif
+
+#ifdef WCHAR
+# define MAX_ALLOCA_SIZE 2000
+
+# define FREE_WCS_BUFFERS() \
+ do { \
+ if (size1 > MAX_ALLOCA_SIZE) \
+ { \
+ free (wcs_string1); \
+ free (mbs_offset1); \
+ } \
+ else \
+ { \
+ FREE_VAR (wcs_string1); \
+ FREE_VAR (mbs_offset1); \
+ } \
+ if (size2 > MAX_ALLOCA_SIZE) \
+ { \
+ free (wcs_string2); \
+ free (mbs_offset2); \
+ } \
+ else \
+ { \
+ FREE_VAR (wcs_string2); \
+ FREE_VAR (mbs_offset2); \
+ } \
+ } while (0)
+
+#endif
+
+
+static int
+PREFIX(re_search_2) (bufp, string1, size1, string2, size2, startpos, range,
+ regs, stop)
+ struct re_pattern_buffer *bufp;
+ const char *string1, *string2;
+ int size1, size2;
+ int startpos;
+ int range;
+ struct re_registers *regs;
+ int stop;
+{
+ int val;
+ register char *fastmap = bufp->fastmap;
+ register RE_TRANSLATE_TYPE translate = bufp->translate;
+ int total_size = size1 + size2;
+ int endpos = startpos + range;
+#ifdef WCHAR
+ /* We need wchar_t* buffers correspond to cstring1, cstring2. */
+ wchar_t *wcs_string1 = NULL, *wcs_string2 = NULL;
+ /* We need the size of wchar_t buffers correspond to csize1, csize2. */
+ int wcs_size1 = 0, wcs_size2 = 0;
+ /* offset buffer for optimizatoin. See convert_mbs_to_wc. */
+ int *mbs_offset1 = NULL, *mbs_offset2 = NULL;
+ /* They hold whether each wchar_t is binary data or not. */
+ char *is_binary = NULL;
+#endif /* WCHAR */
+
+ /* Check for out-of-range STARTPOS. */
+ if (startpos < 0 || startpos > total_size)
+ return -1;
+
+ /* Fix up RANGE if it might eventually take us outside
+ the virtual concatenation of STRING1 and STRING2.
+ Make sure we won't move STARTPOS below 0 or above TOTAL_SIZE. */
+ if (endpos < 0)
+ range = 0 - startpos;
+ else if (endpos > total_size)
+ range = total_size - startpos;
+
+ /* If the search isn't to be a backwards one, don't waste time in a
+ search for a pattern that must be anchored. */
+ if (bufp->used > 0 && range > 0
+ && ((re_opcode_t) bufp->buffer[0] == begbuf
+ /* `begline' is like `begbuf' if it cannot match at newlines. */
+ || ((re_opcode_t) bufp->buffer[0] == begline
+ && !bufp->newline_anchor)))
+ {
+ if (startpos > 0)
+ return -1;
+ else
+ range = 1;
+ }
+
+#ifdef emacs
+ /* In a forward search for something that starts with \=.
+ don't keep searching past point. */
+ if (bufp->used > 0 && (re_opcode_t) bufp->buffer[0] == at_dot && range > 0)
+ {
+ range = PT - startpos;
+ if (range <= 0)
+ return -1;
+ }
+#endif /* emacs */
+
+ /* Update the fastmap now if not correct already. */
+ if (fastmap && !bufp->fastmap_accurate)
+ if (re_compile_fastmap (bufp) == -2)
+ return -2;
+
+#ifdef WCHAR
+ /* Allocate wchar_t array for wcs_string1 and wcs_string2 and
+ fill them with converted string. */
+ if (size1 != 0)
+ {
+ if (size1 > MAX_ALLOCA_SIZE)
+ {
+ wcs_string1 = TALLOC (size1 + 1, CHAR_T);
+ mbs_offset1 = TALLOC (size1 + 1, int);
+ is_binary = TALLOC (size1 + 1, char);
+ }
+ else
+ {
+ wcs_string1 = REGEX_TALLOC (size1 + 1, CHAR_T);
+ mbs_offset1 = REGEX_TALLOC (size1 + 1, int);
+ is_binary = REGEX_TALLOC (size1 + 1, char);
+ }
+ if (!wcs_string1 || !mbs_offset1 || !is_binary)
+ {
+ if (size1 > MAX_ALLOCA_SIZE)
+ {
+ free (wcs_string1);
+ free (mbs_offset1);
+ free (is_binary);
+ }
+ else
+ {
+ FREE_VAR (wcs_string1);
+ FREE_VAR (mbs_offset1);
+ FREE_VAR (is_binary);
+ }
+ return -2;
+ }
+ wcs_size1 = convert_mbs_to_wcs(wcs_string1, string1, size1,
+ mbs_offset1, is_binary);
+ wcs_string1[wcs_size1] = L'\0'; /* for a sentinel */
+ if (size1 > MAX_ALLOCA_SIZE)
+ free (is_binary);
+ else
+ FREE_VAR (is_binary);
+ }
+ if (size2 != 0)
+ {
+ if (size2 > MAX_ALLOCA_SIZE)
+ {
+ wcs_string2 = TALLOC (size2 + 1, CHAR_T);
+ mbs_offset2 = TALLOC (size2 + 1, int);
+ is_binary = TALLOC (size2 + 1, char);
+ }
+ else
+ {
+ wcs_string2 = REGEX_TALLOC (size2 + 1, CHAR_T);
+ mbs_offset2 = REGEX_TALLOC (size2 + 1, int);
+ is_binary = REGEX_TALLOC (size2 + 1, char);
+ }
+ if (!wcs_string2 || !mbs_offset2 || !is_binary)
+ {
+ FREE_WCS_BUFFERS ();
+ if (size2 > MAX_ALLOCA_SIZE)
+ free (is_binary);
+ else
+ FREE_VAR (is_binary);
+ return -2;
+ }
+ wcs_size2 = convert_mbs_to_wcs(wcs_string2, string2, size2,
+ mbs_offset2, is_binary);
+ wcs_string2[wcs_size2] = L'\0'; /* for a sentinel */
+ if (size2 > MAX_ALLOCA_SIZE)
+ free (is_binary);
+ else
+ FREE_VAR (is_binary);
+ }
+#endif /* WCHAR */
+
+
+ /* Loop through the string, looking for a place to start matching. */
+ for (;;)
+ {
+ /* If a fastmap is supplied, skip quickly over characters that
+ cannot be the start of a match. If the pattern can match the
+ null string, however, we don't need to skip characters; we want
+ the first null string. */
+ if (fastmap && startpos < total_size && !bufp->can_be_null)
+ {
+ if (range > 0) /* Searching forwards. */
+ {
+ register const char *d;
+ register int lim = 0;
+ int irange = range;
+
+ if (startpos < size1 && startpos + range >= size1)
+ lim = range - (size1 - startpos);
+
+ d = (startpos >= size1 ? string2 - size1 : string1) + startpos;
+
+ /* Written out as an if-else to avoid testing `translate'
+ inside the loop. */
+ if (translate)
+ while (range > lim
+ && !fastmap[(unsigned char)
+ translate[(unsigned char) *d++]])
+ range--;
+ else
+ while (range > lim && !fastmap[(unsigned char) *d++])
+ range--;
+
+ startpos += irange - range;
+ }
+ else /* Searching backwards. */
+ {
+ register CHAR_T c = (size1 == 0 || startpos >= size1
+ ? string2[startpos - size1]
+ : string1[startpos]);
+
+ if (!fastmap[(unsigned char) TRANSLATE (c)])
+ goto advance;
+ }
+ }
+
+ /* If can't match the null string, and that's all we have left, fail. */
+ if (range >= 0 && startpos == total_size && fastmap
+ && !bufp->can_be_null)
+ {
+#ifdef WCHAR
+ FREE_WCS_BUFFERS ();
+#endif
+ return -1;
+ }
+
+#ifdef WCHAR
+ val = wcs_re_match_2_internal (bufp, string1, size1, string2,
+ size2, startpos, regs, stop,
+ wcs_string1, wcs_size1,
+ wcs_string2, wcs_size2,
+ mbs_offset1, mbs_offset2);
+#else /* BYTE */
+ val = byte_re_match_2_internal (bufp, string1, size1, string2,
+ size2, startpos, regs, stop);
+#endif /* BYTE */
+
+#ifndef REGEX_MALLOC
+# ifdef C_ALLOCA
+ alloca (0);
+# endif
+#endif
+
+ if (val >= 0)
+ {
+#ifdef WCHAR
+ FREE_WCS_BUFFERS ();
+#endif
+ return startpos;
+ }
+
+ if (val == -2)
+ {
+#ifdef WCHAR
+ FREE_WCS_BUFFERS ();
+#endif
+ return -2;
+ }
+
+ advance:
+ if (!range)
+ break;
+ else if (range > 0)
+ {
+ range--;
+ startpos++;
+ }
+ else
+ {
+ range++;
+ startpos--;
+ }
+ }
+#ifdef WCHAR
+ FREE_WCS_BUFFERS ();
+#endif
+ return -1;
+}
+
+#ifdef WCHAR
+/* This converts PTR, a pointer into one of the search wchar_t strings
+ `string1' and `string2' into an multibyte string offset from the
+ beginning of that string. We use mbs_offset to optimize.
+ See convert_mbs_to_wcs. */
+# define POINTER_TO_OFFSET(ptr) \
+ (FIRST_STRING_P (ptr) \
+ ? ((regoff_t)(mbs_offset1 != NULL? mbs_offset1[(ptr)-string1] : 0)) \
+ : ((regoff_t)((mbs_offset2 != NULL? mbs_offset2[(ptr)-string2] : 0) \
+ + csize1)))
+#else /* BYTE */
+/* This converts PTR, a pointer into one of the search strings `string1'
+ and `string2' into an offset from the beginning of that string. */
+# define POINTER_TO_OFFSET(ptr) \
+ (FIRST_STRING_P (ptr) \
+ ? ((regoff_t) ((ptr) - string1)) \
+ : ((regoff_t) ((ptr) - string2 + size1)))
+#endif /* WCHAR */
+
+/* Macros for dealing with the split strings in re_match_2. */
+
+#define MATCHING_IN_FIRST_STRING (dend == end_match_1)
+
+/* Call before fetching a character with *d. This switches over to
+ string2 if necessary. */
+#define PREFETCH() \
+ while (d == dend) \
+ { \
+ /* End of string2 => fail. */ \
+ if (dend == end_match_2) \
+ goto fail; \
+ /* End of string1 => advance to string2. */ \
+ d = string2; \
+ dend = end_match_2; \
+ }
+
+/* Test if at very beginning or at very end of the virtual concatenation
+ of `string1' and `string2'. If only one string, it's `string2'. */
+#define AT_STRINGS_BEG(d) ((d) == (size1 ? string1 : string2) || !size2)
+#define AT_STRINGS_END(d) ((d) == end2)
+
+
+/* Test if D points to a character which is word-constituent. We have
+ two special cases to check for: if past the end of string1, look at
+ the first character in string2; and if before the beginning of
+ string2, look at the last character in string1. */
+#ifdef WCHAR
+/* Use internationalized API instead of SYNTAX. */
+# define WORDCHAR_P(d) \
+ (iswalnum ((wint_t)((d) == end1 ? *string2 \
+ : (d) == string2 - 1 ? *(end1 - 1) : *(d))) != 0 \
+ || ((d) == end1 ? *string2 \
+ : (d) == string2 - 1 ? *(end1 - 1) : *(d)) == L'_')
+#else /* BYTE */
+# define WORDCHAR_P(d) \
+ (SYNTAX ((d) == end1 ? *string2 \
+ : (d) == string2 - 1 ? *(end1 - 1) : *(d)) \
+ == Sword)
+#endif /* WCHAR */
+
+/* Disabled due to a compiler bug -- see comment at case wordbound */
+#if 0
+/* Test if the character before D and the one at D differ with respect
+ to being word-constituent. */
+#define AT_WORD_BOUNDARY(d) \
+ (AT_STRINGS_BEG (d) || AT_STRINGS_END (d) \
+ || WORDCHAR_P (d - 1) != WORDCHAR_P (d))
+#endif
+
+/* Free everything we malloc. */
+#ifdef MATCH_MAY_ALLOCATE
+# ifdef WCHAR
+# define FREE_VARIABLES() \
+ do { \
+ REGEX_FREE_STACK (fail_stack.stack); \
+ FREE_VAR (regstart); \
+ FREE_VAR (regend); \
+ FREE_VAR (old_regstart); \
+ FREE_VAR (old_regend); \
+ FREE_VAR (best_regstart); \
+ FREE_VAR (best_regend); \
+ FREE_VAR (reg_info); \
+ FREE_VAR (reg_dummy); \
+ FREE_VAR (reg_info_dummy); \
+ if (!cant_free_wcs_buf) \
+ { \
+ FREE_VAR (string1); \
+ FREE_VAR (string2); \
+ FREE_VAR (mbs_offset1); \
+ FREE_VAR (mbs_offset2); \
+ } \
+ } while (0)
+# else /* BYTE */
+# define FREE_VARIABLES() \
+ do { \
+ REGEX_FREE_STACK (fail_stack.stack); \
+ FREE_VAR (regstart); \
+ FREE_VAR (regend); \
+ FREE_VAR (old_regstart); \
+ FREE_VAR (old_regend); \
+ FREE_VAR (best_regstart); \
+ FREE_VAR (best_regend); \
+ FREE_VAR (reg_info); \
+ FREE_VAR (reg_dummy); \
+ FREE_VAR (reg_info_dummy); \
+ } while (0)
+# endif /* WCHAR */
+#else
+# ifdef WCHAR
+# define FREE_VARIABLES() \
+ do { \
+ if (!cant_free_wcs_buf) \
+ { \
+ FREE_VAR (string1); \
+ FREE_VAR (string2); \
+ FREE_VAR (mbs_offset1); \
+ FREE_VAR (mbs_offset2); \
+ } \
+ } while (0)
+# else /* BYTE */
+# define FREE_VARIABLES() ((void)0) /* Do nothing! But inhibit gcc warning. */
+# endif /* WCHAR */
+#endif /* not MATCH_MAY_ALLOCATE */
+
+/* These values must meet several constraints. They must not be valid
+ register values; since we have a limit of 255 registers (because
+ we use only one byte in the pattern for the register number), we can
+ use numbers larger than 255. They must differ by 1, because of
+ NUM_FAILURE_ITEMS above. And the value for the lowest register must
+ be larger than the value for the highest register, so we do not try
+ to actually save any registers when none are active. */
+#define NO_HIGHEST_ACTIVE_REG (1 << BYTEWIDTH)
+#define NO_LOWEST_ACTIVE_REG (NO_HIGHEST_ACTIVE_REG + 1)
+
+#else /* not INSIDE_RECURSION */
+/* Matching routines. */
+
+#ifndef emacs /* Emacs never uses this. */
+/* re_match is like re_match_2 except it takes only a single string. */
+
+int
+re_match (bufp, string, size, pos, regs)
+ struct re_pattern_buffer *bufp;
+ const char *string;
+ int size, pos;
+ struct re_registers *regs;
+{
+ int result;
+# ifdef MBS_SUPPORT
+ if (MB_CUR_MAX != 1)
+ result = wcs_re_match_2_internal (bufp, NULL, 0, string, size,
+ pos, regs, size,
+ NULL, 0, NULL, 0, NULL, NULL);
+ else
+# endif
+ result = byte_re_match_2_internal (bufp, NULL, 0, string, size,
+ pos, regs, size);
+# ifndef REGEX_MALLOC
+# ifdef C_ALLOCA
+ alloca (0);
+# endif
+# endif
+ return result;
+}
+# ifdef _LIBC
+weak_alias (__re_match, re_match)
+# endif
+#endif /* not emacs */
+
+#endif /* not INSIDE_RECURSION */
+
+#ifdef INSIDE_RECURSION
+static boolean PREFIX(group_match_null_string_p) _RE_ARGS ((UCHAR_T **p,
+ UCHAR_T *end,
+ PREFIX(register_info_type) *reg_info));
+static boolean PREFIX(alt_match_null_string_p) _RE_ARGS ((UCHAR_T *p,
+ UCHAR_T *end,
+ PREFIX(register_info_type) *reg_info));
+static boolean PREFIX(common_op_match_null_string_p) _RE_ARGS ((UCHAR_T **p,
+ UCHAR_T *end,
+ PREFIX(register_info_type) *reg_info));
+static int PREFIX(bcmp_translate) _RE_ARGS ((const CHAR_T *s1, const CHAR_T *s2,
+ int len, char *translate));
+#else /* not INSIDE_RECURSION */
+
+/* re_match_2 matches the compiled pattern in BUFP against the
+ the (virtual) concatenation of STRING1 and STRING2 (of length SIZE1
+ and SIZE2, respectively). We start matching at POS, and stop
+ matching at STOP.
+
+ If REGS is non-null and the `no_sub' field of BUFP is nonzero, we
+ store offsets for the substring each group matched in REGS. See the
+ documentation for exactly how many groups we fill.
+
+ We return -1 if no match, -2 if an internal error (such as the
+ failure stack overflowing). Otherwise, we return the length of the
+ matched substring. */
+
+int
+re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop)
+ struct re_pattern_buffer *bufp;
+ const char *string1, *string2;
+ int size1, size2;
+ int pos;
+ struct re_registers *regs;
+ int stop;
+{
+ int result;
+# ifdef MBS_SUPPORT
+ if (MB_CUR_MAX != 1)
+ result = wcs_re_match_2_internal (bufp, string1, size1, string2, size2,
+ pos, regs, stop,
+ NULL, 0, NULL, 0, NULL, NULL);
+ else
+# endif
+ result = byte_re_match_2_internal (bufp, string1, size1, string2, size2,
+ pos, regs, stop);
+
+#ifndef REGEX_MALLOC
+# ifdef C_ALLOCA
+ alloca (0);
+# endif
+#endif
+ return result;
+}
+#ifdef _LIBC
+weak_alias (__re_match_2, re_match_2)
+#endif
+
+#endif /* not INSIDE_RECURSION */
+
+#ifdef INSIDE_RECURSION
+
+#ifdef WCHAR
+static int count_mbs_length PARAMS ((int *, int));
+
+/* This check the substring (from 0, to length) of the multibyte string,
+ to which offset_buffer correspond. And count how many wchar_t_characters
+ the substring occupy. We use offset_buffer to optimization.
+ See convert_mbs_to_wcs. */
+
+static int
+count_mbs_length(offset_buffer, length)
+ int *offset_buffer;
+ int length;
+{
+ int upper, lower;
+
+ /* Check whether the size is valid. */
+ if (length < 0)
+ return -1;
+
+ if (offset_buffer == NULL)
+ return 0;
+
+ /* If there are no multibyte character, offset_buffer[i] == i.
+ Optmize for this case. */
+ if (offset_buffer[length] == length)
+ return length;
+
+ /* Set up upper with length. (because for all i, offset_buffer[i] >= i) */
+ upper = length;
+ lower = 0;
+
+ while (true)
+ {
+ int middle = (lower + upper) / 2;
+ if (middle == lower || middle == upper)
+ break;
+ if (offset_buffer[middle] > length)
+ upper = middle;
+ else if (offset_buffer[middle] < length)
+ lower = middle;
+ else
+ return middle;
+ }
+
+ return -1;
+}
+#endif /* WCHAR */
+
+/* This is a separate function so that we can force an alloca cleanup
+ afterwards. */
+#ifdef WCHAR
+static int
+wcs_re_match_2_internal (bufp, cstring1, csize1, cstring2, csize2, pos,
+ regs, stop, string1, size1, string2, size2,
+ mbs_offset1, mbs_offset2)
+ struct re_pattern_buffer *bufp;
+ const char *cstring1, *cstring2;
+ int csize1, csize2;
+ int pos;
+ struct re_registers *regs;
+ int stop;
+ /* string1 == string2 == NULL means string1/2, size1/2 and
+ mbs_offset1/2 need seting up in this function. */
+ /* We need wchar_t* buffers correspond to cstring1, cstring2. */
+ wchar_t *string1, *string2;
+ /* We need the size of wchar_t buffers correspond to csize1, csize2. */
+ int size1, size2;
+ /* offset buffer for optimizatoin. See convert_mbs_to_wc. */
+ int *mbs_offset1, *mbs_offset2;
+#else /* BYTE */
+static int
+byte_re_match_2_internal (bufp, string1, size1,string2, size2, pos,
+ regs, stop)
+ struct re_pattern_buffer *bufp;
+ const char *string1, *string2;
+ int size1, size2;
+ int pos;
+ struct re_registers *regs;
+ int stop;
+#endif /* BYTE */
+{
+ /* General temporaries. */
+ int mcnt;
+ UCHAR_T *p1;
+#ifdef WCHAR
+ /* They hold whether each wchar_t is binary data or not. */
+ char *is_binary = NULL;
+ /* If true, we can't free string1/2, mbs_offset1/2. */
+ int cant_free_wcs_buf = 1;
+#endif /* WCHAR */
+
+ /* Just past the end of the corresponding string. */
+ const CHAR_T *end1, *end2;
+
+ /* Pointers into string1 and string2, just past the last characters in
+ each to consider matching. */
+ const CHAR_T *end_match_1, *end_match_2;
+
+ /* Where we are in the data, and the end of the current string. */
+ const CHAR_T *d, *dend;
+
+ /* Where we are in the pattern, and the end of the pattern. */
+#ifdef WCHAR
+ UCHAR_T *pattern, *p;
+ register UCHAR_T *pend;
+#else /* BYTE */
+ UCHAR_T *p = bufp->buffer;
+ register UCHAR_T *pend = p + bufp->used;
+#endif /* WCHAR */
+
+ /* Mark the opcode just after a start_memory, so we can test for an
+ empty subpattern when we get to the stop_memory. */
+ UCHAR_T *just_past_start_mem = 0;
+
+ /* We use this to map every character in the string. */
+ RE_TRANSLATE_TYPE translate = bufp->translate;
+
+ /* Failure point stack. Each place that can handle a failure further
+ down the line pushes a failure point on this stack. It consists of
+ restart, regend, and reg_info for all registers corresponding to
+ the subexpressions we're currently inside, plus the number of such
+ registers, and, finally, two char *'s. The first char * is where
+ to resume scanning the pattern; the second one is where to resume
+ scanning the strings. If the latter is zero, the failure point is
+ a ``dummy''; if a failure happens and the failure point is a dummy,
+ it gets discarded and the next next one is tried. */
+#ifdef MATCH_MAY_ALLOCATE /* otherwise, this is global. */
+ PREFIX(fail_stack_type) fail_stack;
+#endif
+#ifdef DEBUG
+ static unsigned failure_id;
+ unsigned nfailure_points_pushed = 0, nfailure_points_popped = 0;
+#endif
+
+#ifdef REL_ALLOC
+ /* This holds the pointer to the failure stack, when
+ it is allocated relocatably. */
+ fail_stack_elt_t *failure_stack_ptr;
+#endif
+
+ /* We fill all the registers internally, independent of what we
+ return, for use in backreferences. The number here includes
+ an element for register zero. */
+ size_t num_regs = bufp->re_nsub + 1;
+
+ /* The currently active registers. */
+ active_reg_t lowest_active_reg = NO_LOWEST_ACTIVE_REG;
+ active_reg_t highest_active_reg = NO_HIGHEST_ACTIVE_REG;
+
+ /* Information on the contents of registers. These are pointers into
+ the input strings; they record just what was matched (on this
+ attempt) by a subexpression part of the pattern, that is, the
+ regnum-th regstart pointer points to where in the pattern we began
+ matching and the regnum-th regend points to right after where we
+ stopped matching the regnum-th subexpression. (The zeroth register
+ keeps track of what the whole pattern matches.) */
+#ifdef MATCH_MAY_ALLOCATE /* otherwise, these are global. */
+ const CHAR_T **regstart, **regend;
+#endif
+
+ /* If a group that's operated upon by a repetition operator fails to
+ match anything, then the register for its start will need to be
+ restored because it will have been set to wherever in the string we
+ are when we last see its open-group operator. Similarly for a
+ register's end. */
+#ifdef MATCH_MAY_ALLOCATE /* otherwise, these are global. */
+ const CHAR_T **old_regstart, **old_regend;
+#endif
+
+ /* The is_active field of reg_info helps us keep track of which (possibly
+ nested) subexpressions we are currently in. The matched_something
+ field of reg_info[reg_num] helps us tell whether or not we have
+ matched any of the pattern so far this time through the reg_num-th
+ subexpression. These two fields get reset each time through any
+ loop their register is in. */
+#ifdef MATCH_MAY_ALLOCATE /* otherwise, this is global. */
+ PREFIX(register_info_type) *reg_info;
+#endif
+
+ /* The following record the register info as found in the above
+ variables when we find a match better than any we've seen before.
+ This happens as we backtrack through the failure points, which in
+ turn happens only if we have not yet matched the entire string. */
+ unsigned best_regs_set = false;
+#ifdef MATCH_MAY_ALLOCATE /* otherwise, these are global. */
+ const CHAR_T **best_regstart, **best_regend;
+#endif
+
+ /* Logically, this is `best_regend[0]'. But we don't want to have to
+ allocate space for that if we're not allocating space for anything
+ else (see below). Also, we never need info about register 0 for
+ any of the other register vectors, and it seems rather a kludge to
+ treat `best_regend' differently than the rest. So we keep track of
+ the end of the best match so far in a separate variable. We
+ initialize this to NULL so that when we backtrack the first time
+ and need to test it, it's not garbage. */
+ const CHAR_T *match_end = NULL;
+
+ /* This helps SET_REGS_MATCHED avoid doing redundant work. */
+ int set_regs_matched_done = 0;
+
+ /* Used when we pop values we don't care about. */
+#ifdef MATCH_MAY_ALLOCATE /* otherwise, these are global. */
+ const CHAR_T **reg_dummy;
+ PREFIX(register_info_type) *reg_info_dummy;
+#endif
+
+#ifdef DEBUG
+ /* Counts the total number of registers pushed. */
+ unsigned num_regs_pushed = 0;
+#endif
+
+ DEBUG_PRINT1 ("\n\nEntering re_match_2.\n");
+
+ INIT_FAIL_STACK ();
+
+#ifdef MATCH_MAY_ALLOCATE
+ /* Do not bother to initialize all the register variables if there are
+ no groups in the pattern, as it takes a fair amount of time. If
+ there are groups, we include space for register 0 (the whole
+ pattern), even though we never use it, since it simplifies the
+ array indexing. We should fix this. */
+ if (bufp->re_nsub)
+ {
+ regstart = REGEX_TALLOC (num_regs, const CHAR_T *);
+ regend = REGEX_TALLOC (num_regs, const CHAR_T *);
+ old_regstart = REGEX_TALLOC (num_regs, const CHAR_T *);
+ old_regend = REGEX_TALLOC (num_regs, const CHAR_T *);
+ best_regstart = REGEX_TALLOC (num_regs, const CHAR_T *);
+ best_regend = REGEX_TALLOC (num_regs, const CHAR_T *);
+ reg_info = REGEX_TALLOC (num_regs, PREFIX(register_info_type));
+ reg_dummy = REGEX_TALLOC (num_regs, const CHAR_T *);
+ reg_info_dummy = REGEX_TALLOC (num_regs, PREFIX(register_info_type));
+
+ if (!(regstart && regend && old_regstart && old_regend && reg_info
+ && best_regstart && best_regend && reg_dummy && reg_info_dummy))
+ {
+ FREE_VARIABLES ();
+ return -2;
+ }
+ }
+ else
+ {
+ /* We must initialize all our variables to NULL, so that
+ `FREE_VARIABLES' doesn't try to free them. */
+ regstart = regend = old_regstart = old_regend = best_regstart
+ = best_regend = reg_dummy = NULL;
+ reg_info = reg_info_dummy = (PREFIX(register_info_type) *) NULL;
+ }
+#endif /* MATCH_MAY_ALLOCATE */
+
+ /* The starting position is bogus. */
+#ifdef WCHAR
+ if (pos < 0 || pos > csize1 + csize2)
+#else /* BYTE */
+ if (pos < 0 || pos > size1 + size2)
+#endif
+ {
+ FREE_VARIABLES ();
+ return -1;
+ }
+
+#ifdef WCHAR
+ /* Allocate wchar_t array for string1 and string2 and
+ fill them with converted string. */
+ if (string1 == NULL && string2 == NULL)
+ {
+ /* We need seting up buffers here. */
+
+ /* We must free wcs buffers in this function. */
+ cant_free_wcs_buf = 0;
+
+ if (csize1 != 0)
+ {
+ string1 = REGEX_TALLOC (csize1 + 1, CHAR_T);
+ mbs_offset1 = REGEX_TALLOC (csize1 + 1, int);
+ is_binary = REGEX_TALLOC (csize1 + 1, char);
+ if (!string1 || !mbs_offset1 || !is_binary)
+ {
+ FREE_VAR (string1);
+ FREE_VAR (mbs_offset1);
+ FREE_VAR (is_binary);
+ return -2;
+ }
+ }
+ if (csize2 != 0)
+ {
+ string2 = REGEX_TALLOC (csize2 + 1, CHAR_T);
+ mbs_offset2 = REGEX_TALLOC (csize2 + 1, int);
+ is_binary = REGEX_TALLOC (csize2 + 1, char);
+ if (!string2 || !mbs_offset2 || !is_binary)
+ {
+ FREE_VAR (string1);
+ FREE_VAR (mbs_offset1);
+ FREE_VAR (string2);
+ FREE_VAR (mbs_offset2);
+ FREE_VAR (is_binary);
+ return -2;
+ }
+ size2 = convert_mbs_to_wcs(string2, cstring2, csize2,
+ mbs_offset2, is_binary);
+ string2[size2] = L'\0'; /* for a sentinel */
+ FREE_VAR (is_binary);
+ }
+ }
+
+ /* We need to cast pattern to (wchar_t*), because we casted this compiled
+ pattern to (char*) in regex_compile. */
+ p = pattern = (CHAR_T*)bufp->buffer;
+ pend = (CHAR_T*)(bufp->buffer + bufp->used);
+
+#endif /* WCHAR */
+
+ /* Initialize subexpression text positions to -1 to mark ones that no
+ start_memory/stop_memory has been seen for. Also initialize the
+ register information struct. */
+ for (mcnt = 1; (unsigned) mcnt < num_regs; mcnt++)
+ {
+ regstart[mcnt] = regend[mcnt]
+ = old_regstart[mcnt] = old_regend[mcnt] = REG_UNSET_VALUE;
+
+ REG_MATCH_NULL_STRING_P (reg_info[mcnt]) = MATCH_NULL_UNSET_VALUE;
+ IS_ACTIVE (reg_info[mcnt]) = 0;
+ MATCHED_SOMETHING (reg_info[mcnt]) = 0;
+ EVER_MATCHED_SOMETHING (reg_info[mcnt]) = 0;
+ }
+
+ /* We move `string1' into `string2' if the latter's empty -- but not if
+ `string1' is null. */
+ if (size2 == 0 && string1 != NULL)
+ {
+ string2 = string1;
+ size2 = size1;
+ string1 = 0;
+ size1 = 0;
+#ifdef WCHAR
+ mbs_offset2 = mbs_offset1;
+ csize2 = csize1;
+ mbs_offset1 = NULL;
+ csize1 = 0;
+#endif
+ }
+ end1 = string1 + size1;
+ end2 = string2 + size2;
+
+ /* Compute where to stop matching, within the two strings. */
+#ifdef WCHAR
+ if (stop <= csize1)
+ {
+ mcnt = count_mbs_length(mbs_offset1, stop);
+ end_match_1 = string1 + mcnt;
+ end_match_2 = string2;
+ }
+ else
+ {
+ if (stop > csize1 + csize2)
+ stop = csize1 + csize2;
+ end_match_1 = end1;
+ mcnt = count_mbs_length(mbs_offset2, stop-csize1);
+ end_match_2 = string2 + mcnt;
+ }
+ if (mcnt < 0)
+ { /* count_mbs_length return error. */
+ FREE_VARIABLES ();
+ return -1;
+ }
+#else
+ if (stop <= size1)
+ {
+ end_match_1 = string1 + stop;
+ end_match_2 = string2;
+ }
+ else
+ {
+ end_match_1 = end1;
+ end_match_2 = string2 + stop - size1;
+ }
+#endif /* WCHAR */
+
+ /* `p' scans through the pattern as `d' scans through the data.
+ `dend' is the end of the input string that `d' points within. `d'
+ is advanced into the following input string whenever necessary, but
+ this happens before fetching; therefore, at the beginning of the
+ loop, `d' can be pointing at the end of a string, but it cannot
+ equal `string2'. */
+#ifdef WCHAR
+ if (size1 > 0 && pos <= csize1)
+ {
+ mcnt = count_mbs_length(mbs_offset1, pos);
+ d = string1 + mcnt;
+ dend = end_match_1;
+ }
+ else
+ {
+ mcnt = count_mbs_length(mbs_offset2, pos-csize1);
+ d = string2 + mcnt;
+ dend = end_match_2;
+ }
+
+ if (mcnt < 0)
+ { /* count_mbs_length return error. */
+ FREE_VARIABLES ();
+ return -1;
+ }
+#else
+ if (size1 > 0 && pos <= size1)
+ {
+ d = string1 + pos;
+ dend = end_match_1;
+ }
+ else
+ {
+ d = string2 + pos - size1;
+ dend = end_match_2;
+ }
+#endif /* WCHAR */
+
+ DEBUG_PRINT1 ("The compiled pattern is:\n");
+ DEBUG_PRINT_COMPILED_PATTERN (bufp, p, pend);
+ DEBUG_PRINT1 ("The string to match is: `");
+ DEBUG_PRINT_DOUBLE_STRING (d, string1, size1, string2, size2);
+ DEBUG_PRINT1 ("'\n");
+
+ /* This loops over pattern commands. It exits by returning from the
+ function if the match is complete, or it drops through if the match
+ fails at this starting point in the input data. */
+ for (;;)
+ {
+#ifdef _LIBC
+ DEBUG_PRINT2 ("\n%p: ", p);
+#else
+ DEBUG_PRINT2 ("\n0x%x: ", p);
+#endif
+
+ if (p == pend)
+ { /* End of pattern means we might have succeeded. */
+ DEBUG_PRINT1 ("end of pattern ... ");
+
+ /* If we haven't matched the entire string, and we want the
+ longest match, try backtracking. */
+ if (d != end_match_2)
+ {
+ /* 1 if this match ends in the same string (string1 or string2)
+ as the best previous match. */
+ boolean same_str_p = (FIRST_STRING_P (match_end)
+ == MATCHING_IN_FIRST_STRING);
+ /* 1 if this match is the best seen so far. */
+ boolean best_match_p;
+
+ /* AIX compiler got confused when this was combined
+ with the previous declaration. */
+ if (same_str_p)
+ best_match_p = d > match_end;
+ else
+ best_match_p = !MATCHING_IN_FIRST_STRING;
+
+ DEBUG_PRINT1 ("backtracking.\n");
+
+ if (!FAIL_STACK_EMPTY ())
+ { /* More failure points to try. */
+
+ /* If exceeds best match so far, save it. */
+ if (!best_regs_set || best_match_p)
+ {
+ best_regs_set = true;
+ match_end = d;
+
+ DEBUG_PRINT1 ("\nSAVING match as best so far.\n");
+
+ for (mcnt = 1; (unsigned) mcnt < num_regs; mcnt++)
+ {
+ best_regstart[mcnt] = regstart[mcnt];
+ best_regend[mcnt] = regend[mcnt];
+ }
+ }
+ goto fail;
+ }
+
+ /* If no failure points, don't restore garbage. And if
+ last match is real best match, don't restore second
+ best one. */
+ else if (best_regs_set && !best_match_p)
+ {
+ restore_best_regs:
+ /* Restore best match. It may happen that `dend ==
+ end_match_1' while the restored d is in string2.
+ For example, the pattern `x.*y.*z' against the
+ strings `x-' and `y-z-', if the two strings are
+ not consecutive in memory. */
+ DEBUG_PRINT1 ("Restoring best registers.\n");
+
+ d = match_end;
+ dend = ((d >= string1 && d <= end1)
+ ? end_match_1 : end_match_2);
+
+ for (mcnt = 1; (unsigned) mcnt < num_regs; mcnt++)
+ {
+ regstart[mcnt] = best_regstart[mcnt];
+ regend[mcnt] = best_regend[mcnt];
+ }
+ }
+ } /* d != end_match_2 */
+
+ succeed_label:
+ DEBUG_PRINT1 ("Accepting match.\n");
+ /* If caller wants register contents data back, do it. */
+ if (regs && !bufp->no_sub)
+ {
+ /* Have the register data arrays been allocated? */
+ if (bufp->regs_allocated == REGS_UNALLOCATED)
+ { /* No. So allocate them with malloc. We need one
+ extra element beyond `num_regs' for the `-1' marker
+ GNU code uses. */
+ regs->num_regs = MAX (RE_NREGS, num_regs + 1);
+ regs->start = TALLOC (regs->num_regs, regoff_t);
+ regs->end = TALLOC (regs->num_regs, regoff_t);
+ if (regs->start == NULL || regs->end == NULL)
+ {
+ FREE_VARIABLES ();
+ return -2;
+ }
+ bufp->regs_allocated = REGS_REALLOCATE;
+ }
+ else if (bufp->regs_allocated == REGS_REALLOCATE)
+ { /* Yes. If we need more elements than were already
+ allocated, reallocate them. If we need fewer, just
+ leave it alone. */
+ if (regs->num_regs < num_regs + 1)
+ {
+ regs->num_regs = num_regs + 1;
+ RETALLOC (regs->start, regs->num_regs, regoff_t);
+ RETALLOC (regs->end, regs->num_regs, regoff_t);
+ if (regs->start == NULL || regs->end == NULL)
+ {
+ FREE_VARIABLES ();
+ return -2;
+ }
+ }
+ }
+ else
+ {
+ /* These braces fend off a "empty body in an else-statement"
+ warning under GCC when assert expands to nothing. */
+ assert (bufp->regs_allocated == REGS_FIXED);
+ }
+
+ /* Convert the pointer data in `regstart' and `regend' to
+ indices. Register zero has to be set differently,
+ since we haven't kept track of any info for it. */
+ if (regs->num_regs > 0)
+ {
+ regs->start[0] = pos;
+#ifdef WCHAR
+ if (MATCHING_IN_FIRST_STRING)
+ regs->end[0] = mbs_offset1 != NULL ?
+ mbs_offset1[d-string1] : 0;
+ else
+ regs->end[0] = csize1 + (mbs_offset2 != NULL ?
+ mbs_offset2[d-string2] : 0);
+#else
+ regs->end[0] = (MATCHING_IN_FIRST_STRING
+ ? ((regoff_t) (d - string1))
+ : ((regoff_t) (d - string2 + size1)));
+#endif /* WCHAR */
+ }
+
+ /* Go through the first `min (num_regs, regs->num_regs)'
+ registers, since that is all we initialized. */
+ for (mcnt = 1; (unsigned) mcnt < MIN (num_regs, regs->num_regs);
+ mcnt++)
+ {
+ if (REG_UNSET (regstart[mcnt]) || REG_UNSET (regend[mcnt]))
+ regs->start[mcnt] = regs->end[mcnt] = -1;
+ else
+ {
+ regs->start[mcnt]
+ = (regoff_t) POINTER_TO_OFFSET (regstart[mcnt]);
+ regs->end[mcnt]
+ = (regoff_t) POINTER_TO_OFFSET (regend[mcnt]);
+ }
+ }
+
+ /* If the regs structure we return has more elements than
+ were in the pattern, set the extra elements to -1. If
+ we (re)allocated the registers, this is the case,
+ because we always allocate enough to have at least one
+ -1 at the end. */
+ for (mcnt = num_regs; (unsigned) mcnt < regs->num_regs; mcnt++)
+ regs->start[mcnt] = regs->end[mcnt] = -1;
+ } /* regs && !bufp->no_sub */
+
+ DEBUG_PRINT4 ("%u failure points pushed, %u popped (%u remain).\n",
+ nfailure_points_pushed, nfailure_points_popped,
+ nfailure_points_pushed - nfailure_points_popped);
+ DEBUG_PRINT2 ("%u registers pushed.\n", num_regs_pushed);
+
+#ifdef WCHAR
+ if (MATCHING_IN_FIRST_STRING)
+ mcnt = mbs_offset1 != NULL ? mbs_offset1[d-string1] : 0;
+ else
+ mcnt = (mbs_offset2 != NULL ? mbs_offset2[d-string2] : 0) +
+ csize1;
+ mcnt -= pos;
+#else
+ mcnt = d - pos - (MATCHING_IN_FIRST_STRING
+ ? string1
+ : string2 - size1);
+#endif /* WCHAR */
+
+ DEBUG_PRINT2 ("Returning %d from re_match_2.\n", mcnt);
+
+ FREE_VARIABLES ();
+ return mcnt;
+ }
+
+ /* Otherwise match next pattern command. */
+ switch (SWITCH_ENUM_CAST ((re_opcode_t) *p++))
+ {
+ /* Ignore these. Used to ignore the n of succeed_n's which
+ currently have n == 0. */
+ case no_op:
+ DEBUG_PRINT1 ("EXECUTING no_op.\n");
+ break;
+
+ case succeed:
+ DEBUG_PRINT1 ("EXECUTING succeed.\n");
+ goto succeed_label;
+
+ /* Match the next n pattern characters exactly. The following
+ byte in the pattern defines n, and the n bytes after that
+ are the characters to match. */
+ case exactn:
+#ifdef MBS_SUPPORT
+ case exactn_bin:
+#endif
+ mcnt = *p++;
+ DEBUG_PRINT2 ("EXECUTING exactn %d.\n", mcnt);
+
+ /* This is written out as an if-else so we don't waste time
+ testing `translate' inside the loop. */
+ if (translate)
+ {
+ do
+ {
+ PREFETCH ();
+#ifdef WCHAR
+ if (*d <= 0xff)
+ {
+ if ((UCHAR_T) translate[(unsigned char) *d++]
+ != (UCHAR_T) *p++)
+ goto fail;
+ }
+ else
+ {
+ if (*d++ != (CHAR_T) *p++)
+ goto fail;
+ }
+#else
+ if ((UCHAR_T) translate[(unsigned char) *d++]
+ != (UCHAR_T) *p++)
+ goto fail;
+#endif /* WCHAR */
+ }
+ while (--mcnt);
+ }
+ else
+ {
+ do
+ {
+ PREFETCH ();
+ if (*d++ != (CHAR_T) *p++) goto fail;
+ }
+ while (--mcnt);
+ }
+ SET_REGS_MATCHED ();
+ break;
+
+
+ /* Match any character except possibly a newline or a null. */
+ case anychar:
+ DEBUG_PRINT1 ("EXECUTING anychar.\n");
+
+ PREFETCH ();
+
+ if ((!(bufp->syntax & RE_DOT_NEWLINE) && TRANSLATE (*d) == '\n')
+ || (bufp->syntax & RE_DOT_NOT_NULL && TRANSLATE (*d) == '\000'))
+ goto fail;
+
+ SET_REGS_MATCHED ();
+ DEBUG_PRINT2 (" Matched `%ld'.\n", (long int) *d);
+ d++;
+ break;
+
+
+ case charset:
+ case charset_not:
+ {
+ register UCHAR_T c;
+#ifdef WCHAR
+ unsigned int i, char_class_length, coll_symbol_length,
+ equiv_class_length, ranges_length, chars_length, length;
+ CHAR_T *workp, *workp2, *charset_top;
+#define WORK_BUFFER_SIZE 128
+ CHAR_T str_buf[WORK_BUFFER_SIZE];
+# ifdef _LIBC
+ uint32_t nrules;
+# endif /* _LIBC */
+#endif /* WCHAR */
+ boolean not = (re_opcode_t) *(p - 1) == charset_not;
+
+ DEBUG_PRINT2 ("EXECUTING charset%s.\n", not ? "_not" : "");
+ PREFETCH ();
+ c = TRANSLATE (*d); /* The character to match. */
+#ifdef WCHAR
+# ifdef _LIBC
+ nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
+# endif /* _LIBC */
+ charset_top = p - 1;
+ char_class_length = *p++;
+ coll_symbol_length = *p++;
+ equiv_class_length = *p++;
+ ranges_length = *p++;
+ chars_length = *p++;
+ /* p points charset[6], so the address of the next instruction
+ (charset[l+m+n+2o+k+p']) equals p[l+m+n+2*o+p'],
+ where l=length of char_classes, m=length of collating_symbol,
+ n=equivalence_class, o=length of char_range,
+ p'=length of character. */
+ workp = p;
+ /* Update p to indicate the next instruction. */
+ p += char_class_length + coll_symbol_length+ equiv_class_length +
+ 2*ranges_length + chars_length;
+
+ /* match with char_class? */
+ for (i = 0; i < char_class_length ; i += CHAR_CLASS_SIZE)
+ {
+ wctype_t wctype;
+ uintptr_t alignedp = ((uintptr_t)workp
+ + __alignof__(wctype_t) - 1)
+ & ~(uintptr_t)(__alignof__(wctype_t) - 1);
+ wctype = *((wctype_t*)alignedp);
+ workp += CHAR_CLASS_SIZE;
+# ifdef _LIBC
+ if (__iswctype((wint_t)c, wctype))
+ goto char_set_matched;
+# else
+ if (iswctype((wint_t)c, wctype))
+ goto char_set_matched;
+# endif
+ }
+
+ /* match with collating_symbol? */
+# ifdef _LIBC
+ if (nrules != 0)
+ {
+ const unsigned char *extra = (const unsigned char *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB);
+
+ for (workp2 = workp + coll_symbol_length ; workp < workp2 ;
+ workp++)
+ {
+ int32_t *wextra;
+ wextra = (int32_t*)(extra + *workp++);
+ for (i = 0; i < *wextra; ++i)
+ if (TRANSLATE(d[i]) != wextra[1 + i])
+ break;
+
+ if (i == *wextra)
+ {
+ /* Update d, however d will be incremented at
+ char_set_matched:, we decrement d here. */
+ d += i - 1;
+ goto char_set_matched;
+ }
+ }
+ }
+ else /* (nrules == 0) */
+# endif
+ /* If we can't look up collation data, we use wcscoll
+ instead. */
+ {
+ for (workp2 = workp + coll_symbol_length ; workp < workp2 ;)
+ {
+ const CHAR_T *backup_d = d, *backup_dend = dend;
+# ifdef _LIBC
+ length = __wcslen (workp);
+# else
+ length = wcslen (workp);
+# endif
+
+ /* If wcscoll(the collating symbol, whole string) > 0,
+ any substring of the string never match with the
+ collating symbol. */
+# ifdef _LIBC
+ if (__wcscoll (workp, d) > 0)
+# else
+ if (wcscoll (workp, d) > 0)
+# endif
+ {
+ workp += length + 1;
+ continue;
+ }
+
+ /* First, we compare the collating symbol with
+ the first character of the string.
+ If it don't match, we add the next character to
+ the compare buffer in turn. */
+ for (i = 0 ; i < WORK_BUFFER_SIZE-1 ; i++, d++)
+ {
+ int match;
+ if (d == dend)
+ {
+ if (dend == end_match_2)
+ break;
+ d = string2;
+ dend = end_match_2;
+ }
+
+ /* add next character to the compare buffer. */
+ str_buf[i] = TRANSLATE(*d);
+ str_buf[i+1] = '\0';
+
+# ifdef _LIBC
+ match = __wcscoll (workp, str_buf);
+# else
+ match = wcscoll (workp, str_buf);
+# endif
+ if (match == 0)
+ goto char_set_matched;
+
+ if (match < 0)
+ /* (str_buf > workp) indicate (str_buf + X > workp),
+ because for all X (str_buf + X > str_buf).
+ So we don't need continue this loop. */
+ break;
+
+ /* Otherwise(str_buf < workp),
+ (str_buf+next_character) may equals (workp).
+ So we continue this loop. */
+ }
+ /* not matched */
+ d = backup_d;
+ dend = backup_dend;
+ workp += length + 1;
+ }
+ }
+ /* match with equivalence_class? */
+# ifdef _LIBC
+ if (nrules != 0)
+ {
+ const CHAR_T *backup_d = d, *backup_dend = dend;
+ /* Try to match the equivalence class against
+ those known to the collate implementation. */
+ const int32_t *table;
+ const int32_t *weights;
+ const int32_t *extra;
+ const int32_t *indirect;
+ int32_t idx, idx2;
+ wint_t *cp;
+ size_t len;
+
+ /* This #include defines a local function! */
+# include <locale/weightwc.h>
+
+ table = (const int32_t *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEWC);
+ weights = (const wint_t *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTWC);
+ extra = (const wint_t *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAWC);
+ indirect = (const int32_t *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTWC);
+
+ /* Write 1 collating element to str_buf, and
+ get its index. */
+ idx2 = 0;
+
+ for (i = 0 ; idx2 == 0 && i < WORK_BUFFER_SIZE - 1; i++)
+ {
+ cp = (wint_t*)str_buf;
+ if (d == dend)
+ {
+ if (dend == end_match_2)
+ break;
+ d = string2;
+ dend = end_match_2;
+ }
+ str_buf[i] = TRANSLATE(*(d+i));
+ str_buf[i+1] = '\0'; /* sentinel */
+ idx2 = findidx ((const wint_t**)&cp);
+ }
+
+ /* Update d, however d will be incremented at
+ char_set_matched:, we decrement d here. */
+ d = backup_d + ((wchar_t*)cp - (wchar_t*)str_buf - 1);
+ if (d >= dend)
+ {
+ if (dend == end_match_2)
+ d = dend;
+ else
+ {
+ d = string2;
+ dend = end_match_2;
+ }
+ }
+
+ len = weights[idx2];
+
+ for (workp2 = workp + equiv_class_length ; workp < workp2 ;
+ workp++)
+ {
+ idx = (int32_t)*workp;
+ /* We already checked idx != 0 in regex_compile. */
+
+ if (idx2 != 0 && len == weights[idx])
+ {
+ int cnt = 0;
+ while (cnt < len && (weights[idx + 1 + cnt]
+ == weights[idx2 + 1 + cnt]))
+ ++cnt;
+
+ if (cnt == len)
+ goto char_set_matched;
+ }
+ }
+ /* not matched */
+ d = backup_d;
+ dend = backup_dend;
+ }
+ else /* (nrules == 0) */
+# endif
+ /* If we can't look up collation data, we use wcscoll
+ instead. */
+ {
+ for (workp2 = workp + equiv_class_length ; workp < workp2 ;)
+ {
+ const CHAR_T *backup_d = d, *backup_dend = dend;
+# ifdef _LIBC
+ length = __wcslen (workp);
+# else
+ length = wcslen (workp);
+# endif
+
+ /* If wcscoll(the collating symbol, whole string) > 0,
+ any substring of the string never match with the
+ collating symbol. */
+# ifdef _LIBC
+ if (__wcscoll (workp, d) > 0)
+# else
+ if (wcscoll (workp, d) > 0)
+# endif
+ {
+ workp += length + 1;
+ break;
+ }
+
+ /* First, we compare the equivalence class with
+ the first character of the string.
+ If it don't match, we add the next character to
+ the compare buffer in turn. */
+ for (i = 0 ; i < WORK_BUFFER_SIZE - 1 ; i++, d++)
+ {
+ int match;
+ if (d == dend)
+ {
+ if (dend == end_match_2)
+ break;
+ d = string2;
+ dend = end_match_2;
+ }
+
+ /* add next character to the compare buffer. */
+ str_buf[i] = TRANSLATE(*d);
+ str_buf[i+1] = '\0';
+
+# ifdef _LIBC
+ match = __wcscoll (workp, str_buf);
+# else
+ match = wcscoll (workp, str_buf);
+# endif
+
+ if (match == 0)
+ goto char_set_matched;
+
+ if (match < 0)
+ /* (str_buf > workp) indicate (str_buf + X > workp),
+ because for all X (str_buf + X > str_buf).
+ So we don't need continue this loop. */
+ break;
+
+ /* Otherwise(str_buf < workp),
+ (str_buf+next_character) may equals (workp).
+ So we continue this loop. */
+ }
+ /* not matched */
+ d = backup_d;
+ dend = backup_dend;
+ workp += length + 1;
+ }
+ }
+
+ /* match with char_range? */
+# ifdef _LIBC
+ if (nrules != 0)
+ {
+ uint32_t collseqval;
+ const char *collseq = (const char *)
+ _NL_CURRENT(LC_COLLATE, _NL_COLLATE_COLLSEQWC);
+
+ collseqval = collseq_table_lookup (collseq, c);
+
+ for (; workp < p - chars_length ;)
+ {
+ uint32_t start_val, end_val;
+
+ /* We already compute the collation sequence value
+ of the characters (or collating symbols). */
+ start_val = (uint32_t) *workp++; /* range_start */
+ end_val = (uint32_t) *workp++; /* range_end */
+
+ if (start_val <= collseqval && collseqval <= end_val)
+ goto char_set_matched;
+ }
+ }
+ else
+# endif
+ {
+ /* We set range_start_char at str_buf[0], range_end_char
+ at str_buf[4], and compared char at str_buf[2]. */
+ str_buf[1] = 0;
+ str_buf[2] = c;
+ str_buf[3] = 0;
+ str_buf[5] = 0;
+ for (; workp < p - chars_length ;)
+ {
+ wchar_t *range_start_char, *range_end_char;
+
+ /* match if (range_start_char <= c <= range_end_char). */
+
+ /* If range_start(or end) < 0, we assume -range_start(end)
+ is the offset of the collating symbol which is specified
+ as the character of the range start(end). */
+
+ /* range_start */
+ if (*workp < 0)
+ range_start_char = charset_top - (*workp++);
+ else
+ {
+ str_buf[0] = *workp++;
+ range_start_char = str_buf;
+ }
+
+ /* range_end */
+ if (*workp < 0)
+ range_end_char = charset_top - (*workp++);
+ else
+ {
+ str_buf[4] = *workp++;
+ range_end_char = str_buf + 4;
+ }
+
+# ifdef _LIBC
+ if (__wcscoll (range_start_char, str_buf+2) <= 0
+ && __wcscoll (str_buf+2, range_end_char) <= 0)
+# else
+ if (wcscoll (range_start_char, str_buf+2) <= 0
+ && wcscoll (str_buf+2, range_end_char) <= 0)
+# endif
+ goto char_set_matched;
+ }
+ }
+
+ /* match with char? */
+ for (; workp < p ; workp++)
+ if (c == *workp)
+ goto char_set_matched;
+
+ not = !not;
+
+ char_set_matched:
+ if (not) goto fail;
+#else
+ /* Cast to `unsigned' instead of `unsigned char' in case the
+ bit list is a full 32 bytes long. */
+ if (c < (unsigned) (*p * BYTEWIDTH)
+ && p[1 + c / BYTEWIDTH] & (1 << (c % BYTEWIDTH)))
+ not = !not;
+
+ p += 1 + *p;
+
+ if (!not) goto fail;
+#undef WORK_BUFFER_SIZE
+#endif /* WCHAR */
+ SET_REGS_MATCHED ();
+ d++;
+ break;
+ }
+
+
+ /* The beginning of a group is represented by start_memory.
+ The arguments are the register number in the next byte, and the
+ number of groups inner to this one in the next. The text
+ matched within the group is recorded (in the internal
+ registers data structure) under the register number. */
+ case start_memory:
+ DEBUG_PRINT3 ("EXECUTING start_memory %ld (%ld):\n",
+ (long int) *p, (long int) p[1]);
+
+ /* Find out if this group can match the empty string. */
+ p1 = p; /* To send to group_match_null_string_p. */
+
+ if (REG_MATCH_NULL_STRING_P (reg_info[*p]) == MATCH_NULL_UNSET_VALUE)
+ REG_MATCH_NULL_STRING_P (reg_info[*p])
+ = PREFIX(group_match_null_string_p) (&p1, pend, reg_info);
+
+ /* Save the position in the string where we were the last time
+ we were at this open-group operator in case the group is
+ operated upon by a repetition operator, e.g., with `(a*)*b'
+ against `ab'; then we want to ignore where we are now in
+ the string in case this attempt to match fails. */
+ old_regstart[*p] = REG_MATCH_NULL_STRING_P (reg_info[*p])
+ ? REG_UNSET (regstart[*p]) ? d : regstart[*p]
+ : regstart[*p];
+ DEBUG_PRINT2 (" old_regstart: %d\n",
+ POINTER_TO_OFFSET (old_regstart[*p]));
+
+ regstart[*p] = d;
+ DEBUG_PRINT2 (" regstart: %d\n", POINTER_TO_OFFSET (regstart[*p]));
+
+ IS_ACTIVE (reg_info[*p]) = 1;
+ MATCHED_SOMETHING (reg_info[*p]) = 0;
+
+ /* Clear this whenever we change the register activity status. */
+ set_regs_matched_done = 0;
+
+ /* This is the new highest active register. */
+ highest_active_reg = *p;
+
+ /* If nothing was active before, this is the new lowest active
+ register. */
+ if (lowest_active_reg == NO_LOWEST_ACTIVE_REG)
+ lowest_active_reg = *p;
+
+ /* Move past the register number and inner group count. */
+ p += 2;
+ just_past_start_mem = p;
+
+ break;
+
+
+ /* The stop_memory opcode represents the end of a group. Its
+ arguments are the same as start_memory's: the register
+ number, and the number of inner groups. */
+ case stop_memory:
+ DEBUG_PRINT3 ("EXECUTING stop_memory %ld (%ld):\n",
+ (long int) *p, (long int) p[1]);
+
+ /* We need to save the string position the last time we were at
+ this close-group operator in case the group is operated
+ upon by a repetition operator, e.g., with `((a*)*(b*)*)*'
+ against `aba'; then we want to ignore where we are now in
+ the string in case this attempt to match fails. */
+ old_regend[*p] = REG_MATCH_NULL_STRING_P (reg_info[*p])
+ ? REG_UNSET (regend[*p]) ? d : regend[*p]
+ : regend[*p];
+ DEBUG_PRINT2 (" old_regend: %d\n",
+ POINTER_TO_OFFSET (old_regend[*p]));
+
+ regend[*p] = d;
+ DEBUG_PRINT2 (" regend: %d\n", POINTER_TO_OFFSET (regend[*p]));
+
+ /* This register isn't active anymore. */
+ IS_ACTIVE (reg_info[*p]) = 0;
+
+ /* Clear this whenever we change the register activity status. */
+ set_regs_matched_done = 0;
+
+ /* If this was the only register active, nothing is active
+ anymore. */
+ if (lowest_active_reg == highest_active_reg)
+ {
+ lowest_active_reg = NO_LOWEST_ACTIVE_REG;
+ highest_active_reg = NO_HIGHEST_ACTIVE_REG;
+ }
+ else
+ { /* We must scan for the new highest active register, since
+ it isn't necessarily one less than now: consider
+ (a(b)c(d(e)f)g). When group 3 ends, after the f), the
+ new highest active register is 1. */
+ UCHAR_T r = *p - 1;
+ while (r > 0 && !IS_ACTIVE (reg_info[r]))
+ r--;
+
+ /* If we end up at register zero, that means that we saved
+ the registers as the result of an `on_failure_jump', not
+ a `start_memory', and we jumped to past the innermost
+ `stop_memory'. For example, in ((.)*) we save
+ registers 1 and 2 as a result of the *, but when we pop
+ back to the second ), we are at the stop_memory 1.
+ Thus, nothing is active. */
+ if (r == 0)
+ {
+ lowest_active_reg = NO_LOWEST_ACTIVE_REG;
+ highest_active_reg = NO_HIGHEST_ACTIVE_REG;
+ }
+ else
+ highest_active_reg = r;
+ }
+
+ /* If just failed to match something this time around with a
+ group that's operated on by a repetition operator, try to
+ force exit from the ``loop'', and restore the register
+ information for this group that we had before trying this
+ last match. */
+ if ((!MATCHED_SOMETHING (reg_info[*p])
+ || just_past_start_mem == p - 1)
+ && (p + 2) < pend)
+ {
+ boolean is_a_jump_n = false;
+
+ p1 = p + 2;
+ mcnt = 0;
+ switch ((re_opcode_t) *p1++)
+ {
+ case jump_n:
+ is_a_jump_n = true;
+ case pop_failure_jump:
+ case maybe_pop_jump:
+ case jump:
+ case dummy_failure_jump:
+ EXTRACT_NUMBER_AND_INCR (mcnt, p1);
+ if (is_a_jump_n)
+ p1 += OFFSET_ADDRESS_SIZE;
+ break;
+
+ default:
+ /* do nothing */ ;
+ }
+ p1 += mcnt;
+
+ /* If the next operation is a jump backwards in the pattern
+ to an on_failure_jump right before the start_memory
+ corresponding to this stop_memory, exit from the loop
+ by forcing a failure after pushing on the stack the
+ on_failure_jump's jump in the pattern, and d. */
+ if (mcnt < 0 && (re_opcode_t) *p1 == on_failure_jump
+ && (re_opcode_t) p1[1+OFFSET_ADDRESS_SIZE] == start_memory
+ && p1[2+OFFSET_ADDRESS_SIZE] == *p)
+ {
+ /* If this group ever matched anything, then restore
+ what its registers were before trying this last
+ failed match, e.g., with `(a*)*b' against `ab' for
+ regstart[1], and, e.g., with `((a*)*(b*)*)*'
+ against `aba' for regend[3].
+
+ Also restore the registers for inner groups for,
+ e.g., `((a*)(b*))*' against `aba' (register 3 would
+ otherwise get trashed). */
+
+ if (EVER_MATCHED_SOMETHING (reg_info[*p]))
+ {
+ unsigned r;
+
+ EVER_MATCHED_SOMETHING (reg_info[*p]) = 0;
+
+ /* Restore this and inner groups' (if any) registers. */
+ for (r = *p; r < (unsigned) *p + (unsigned) *(p + 1);
+ r++)
+ {
+ regstart[r] = old_regstart[r];
+
+ /* xx why this test? */
+ if (old_regend[r] >= regstart[r])
+ regend[r] = old_regend[r];
+ }
+ }
+ p1++;
+ EXTRACT_NUMBER_AND_INCR (mcnt, p1);
+ PUSH_FAILURE_POINT (p1 + mcnt, d, -2);
+
+ goto fail;
+ }
+ }
+
+ /* Move past the register number and the inner group count. */
+ p += 2;
+ break;
+
+
+ /* \<digit> has been turned into a `duplicate' command which is
+ followed by the numeric value of <digit> as the register number. */
+ case duplicate:
+ {
+ register const CHAR_T *d2, *dend2;
+ int regno = *p++; /* Get which register to match against. */
+ DEBUG_PRINT2 ("EXECUTING duplicate %d.\n", regno);
+
+ /* Can't back reference a group which we've never matched. */
+ if (REG_UNSET (regstart[regno]) || REG_UNSET (regend[regno]))
+ goto fail;
+
+ /* Where in input to try to start matching. */
+ d2 = regstart[regno];
+
+ /* Where to stop matching; if both the place to start and
+ the place to stop matching are in the same string, then
+ set to the place to stop, otherwise, for now have to use
+ the end of the first string. */
+
+ dend2 = ((FIRST_STRING_P (regstart[regno])
+ == FIRST_STRING_P (regend[regno]))
+ ? regend[regno] : end_match_1);
+ for (;;)
+ {
+ /* If necessary, advance to next segment in register
+ contents. */
+ while (d2 == dend2)
+ {
+ if (dend2 == end_match_2) break;
+ if (dend2 == regend[regno]) break;
+
+ /* End of string1 => advance to string2. */
+ d2 = string2;
+ dend2 = regend[regno];
+ }
+ /* At end of register contents => success */
+ if (d2 == dend2) break;
+
+ /* If necessary, advance to next segment in data. */
+ PREFETCH ();
+
+ /* How many characters left in this segment to match. */
+ mcnt = dend - d;
+
+ /* Want how many consecutive characters we can match in
+ one shot, so, if necessary, adjust the count. */
+ if (mcnt > dend2 - d2)
+ mcnt = dend2 - d2;
+
+ /* Compare that many; failure if mismatch, else move
+ past them. */
+ if (translate
+ ? PREFIX(bcmp_translate) (d, d2, mcnt, translate)
+ : memcmp (d, d2, mcnt*sizeof(UCHAR_T)))
+ goto fail;
+ d += mcnt, d2 += mcnt;
+
+ /* Do this because we've match some characters. */
+ SET_REGS_MATCHED ();
+ }
+ }
+ break;
+
+
+ /* begline matches the empty string at the beginning of the string
+ (unless `not_bol' is set in `bufp'), and, if
+ `newline_anchor' is set, after newlines. */
+ case begline:
+ DEBUG_PRINT1 ("EXECUTING begline.\n");
+
+ if (AT_STRINGS_BEG (d))
+ {
+ if (!bufp->not_bol) break;
+ }
+ else if (d[-1] == '\n' && bufp->newline_anchor)
+ {
+ break;
+ }
+ /* In all other cases, we fail. */
+ goto fail;
+
+
+ /* endline is the dual of begline. */
+ case endline:
+ DEBUG_PRINT1 ("EXECUTING endline.\n");
+
+ if (AT_STRINGS_END (d))
+ {
+ if (!bufp->not_eol) break;
+ }
+
+ /* We have to ``prefetch'' the next character. */
+ else if ((d == end1 ? *string2 : *d) == '\n'
+ && bufp->newline_anchor)
+ {
+ break;
+ }
+ goto fail;
+
+
+ /* Match at the very beginning of the data. */
+ case begbuf:
+ DEBUG_PRINT1 ("EXECUTING begbuf.\n");
+ if (AT_STRINGS_BEG (d))
+ break;
+ goto fail;
+
+
+ /* Match at the very end of the data. */
+ case endbuf:
+ DEBUG_PRINT1 ("EXECUTING endbuf.\n");
+ if (AT_STRINGS_END (d))
+ break;
+ goto fail;
+
+
+ /* on_failure_keep_string_jump is used to optimize `.*\n'. It
+ pushes NULL as the value for the string on the stack. Then
+ `pop_failure_point' will keep the current value for the
+ string, instead of restoring it. To see why, consider
+ matching `foo\nbar' against `.*\n'. The .* matches the foo;
+ then the . fails against the \n. But the next thing we want
+ to do is match the \n against the \n; if we restored the
+ string value, we would be back at the foo.
+
+ Because this is used only in specific cases, we don't need to
+ check all the things that `on_failure_jump' does, to make
+ sure the right things get saved on the stack. Hence we don't
+ share its code. The only reason to push anything on the
+ stack at all is that otherwise we would have to change
+ `anychar's code to do something besides goto fail in this
+ case; that seems worse than this. */
+ case on_failure_keep_string_jump:
+ DEBUG_PRINT1 ("EXECUTING on_failure_keep_string_jump");
+
+ EXTRACT_NUMBER_AND_INCR (mcnt, p);
+#ifdef _LIBC
+ DEBUG_PRINT3 (" %d (to %p):\n", mcnt, p + mcnt);
+#else
+ DEBUG_PRINT3 (" %d (to 0x%x):\n", mcnt, p + mcnt);
+#endif
+
+ PUSH_FAILURE_POINT (p + mcnt, NULL, -2);
+ break;
+
+
+ /* Uses of on_failure_jump:
+
+ Each alternative starts with an on_failure_jump that points
+ to the beginning of the next alternative. Each alternative
+ except the last ends with a jump that in effect jumps past
+ the rest of the alternatives. (They really jump to the
+ ending jump of the following alternative, because tensioning
+ these jumps is a hassle.)
+
+ Repeats start with an on_failure_jump that points past both
+ the repetition text and either the following jump or
+ pop_failure_jump back to this on_failure_jump. */
+ case on_failure_jump:
+ on_failure:
+ DEBUG_PRINT1 ("EXECUTING on_failure_jump");
+
+ EXTRACT_NUMBER_AND_INCR (mcnt, p);
+#ifdef _LIBC
+ DEBUG_PRINT3 (" %d (to %p)", mcnt, p + mcnt);
+#else
+ DEBUG_PRINT3 (" %d (to 0x%x)", mcnt, p + mcnt);
+#endif
+
+ /* If this on_failure_jump comes right before a group (i.e.,
+ the original * applied to a group), save the information
+ for that group and all inner ones, so that if we fail back
+ to this point, the group's information will be correct.
+ For example, in \(a*\)*\1, we need the preceding group,
+ and in \(zz\(a*\)b*\)\2, we need the inner group. */
+
+ /* We can't use `p' to check ahead because we push
+ a failure point to `p + mcnt' after we do this. */
+ p1 = p;
+
+ /* We need to skip no_op's before we look for the
+ start_memory in case this on_failure_jump is happening as
+ the result of a completed succeed_n, as in \(a\)\{1,3\}b\1
+ against aba. */
+ while (p1 < pend && (re_opcode_t) *p1 == no_op)
+ p1++;
+
+ if (p1 < pend && (re_opcode_t) *p1 == start_memory)
+ {
+ /* We have a new highest active register now. This will
+ get reset at the start_memory we are about to get to,
+ but we will have saved all the registers relevant to
+ this repetition op, as described above. */
+ highest_active_reg = *(p1 + 1) + *(p1 + 2);
+ if (lowest_active_reg == NO_LOWEST_ACTIVE_REG)
+ lowest_active_reg = *(p1 + 1);
+ }
+
+ DEBUG_PRINT1 (":\n");
+ PUSH_FAILURE_POINT (p + mcnt, d, -2);
+ break;
+
+
+ /* A smart repeat ends with `maybe_pop_jump'.
+ We change it to either `pop_failure_jump' or `jump'. */
+ case maybe_pop_jump:
+ EXTRACT_NUMBER_AND_INCR (mcnt, p);
+ DEBUG_PRINT2 ("EXECUTING maybe_pop_jump %d.\n", mcnt);
+ {
+ register UCHAR_T *p2 = p;
+
+ /* Compare the beginning of the repeat with what in the
+ pattern follows its end. If we can establish that there
+ is nothing that they would both match, i.e., that we
+ would have to backtrack because of (as in, e.g., `a*a')
+ then we can change to pop_failure_jump, because we'll
+ never have to backtrack.
+
+ This is not true in the case of alternatives: in
+ `(a|ab)*' we do need to backtrack to the `ab' alternative
+ (e.g., if the string was `ab'). But instead of trying to
+ detect that here, the alternative has put on a dummy
+ failure point which is what we will end up popping. */
+
+ /* Skip over open/close-group commands.
+ If what follows this loop is a ...+ construct,
+ look at what begins its body, since we will have to
+ match at least one of that. */
+ while (1)
+ {
+ if (p2 + 2 < pend
+ && ((re_opcode_t) *p2 == stop_memory
+ || (re_opcode_t) *p2 == start_memory))
+ p2 += 3;
+ else if (p2 + 2 + 2 * OFFSET_ADDRESS_SIZE < pend
+ && (re_opcode_t) *p2 == dummy_failure_jump)
+ p2 += 2 + 2 * OFFSET_ADDRESS_SIZE;
+ else
+ break;
+ }
+
+ p1 = p + mcnt;
+ /* p1[0] ... p1[2] are the `on_failure_jump' corresponding
+ to the `maybe_finalize_jump' of this case. Examine what
+ follows. */
+
+ /* If we're at the end of the pattern, we can change. */
+ if (p2 == pend)
+ {
+ /* Consider what happens when matching ":\(.*\)"
+ against ":/". I don't really understand this code
+ yet. */
+ p[-(1+OFFSET_ADDRESS_SIZE)] = (UCHAR_T)
+ pop_failure_jump;
+ DEBUG_PRINT1
+ (" End of pattern: change to `pop_failure_jump'.\n");
+ }
+
+ else if ((re_opcode_t) *p2 == exactn
+#ifdef MBS_SUPPORT
+ || (re_opcode_t) *p2 == exactn_bin
+#endif
+ || (bufp->newline_anchor && (re_opcode_t) *p2 == endline))
+ {
+ register UCHAR_T c
+ = *p2 == (UCHAR_T) endline ? '\n' : p2[2];
+
+ if (((re_opcode_t) p1[1+OFFSET_ADDRESS_SIZE] == exactn
+#ifdef MBS_SUPPORT
+ || (re_opcode_t) p1[1+OFFSET_ADDRESS_SIZE] == exactn_bin
+#endif
+ ) && p1[3+OFFSET_ADDRESS_SIZE] != c)
+ {
+ p[-(1+OFFSET_ADDRESS_SIZE)] = (UCHAR_T)
+ pop_failure_jump;
+#ifdef WCHAR
+ DEBUG_PRINT3 (" %C != %C => pop_failure_jump.\n",
+ (wint_t) c,
+ (wint_t) p1[3+OFFSET_ADDRESS_SIZE]);
+#else
+ DEBUG_PRINT3 (" %c != %c => pop_failure_jump.\n",
+ (char) c,
+ (char) p1[3+OFFSET_ADDRESS_SIZE]);
+#endif
+ }
+
+#ifndef WCHAR
+ else if ((re_opcode_t) p1[3] == charset
+ || (re_opcode_t) p1[3] == charset_not)
+ {
+ int not = (re_opcode_t) p1[3] == charset_not;
+
+ if (c < (unsigned) (p1[4] * BYTEWIDTH)
+ && p1[5 + c / BYTEWIDTH] & (1 << (c % BYTEWIDTH)))
+ not = !not;
+
+ /* `not' is equal to 1 if c would match, which means
+ that we can't change to pop_failure_jump. */
+ if (!not)
+ {
+ p[-3] = (unsigned char) pop_failure_jump;
+ DEBUG_PRINT1 (" No match => pop_failure_jump.\n");
+ }
+ }
+#endif /* not WCHAR */
+ }
+#ifndef WCHAR
+ else if ((re_opcode_t) *p2 == charset)
+ {
+ /* We win if the first character of the loop is not part
+ of the charset. */
+ if ((re_opcode_t) p1[3] == exactn
+ && ! ((int) p2[1] * BYTEWIDTH > (int) p1[5]
+ && (p2[2 + p1[5] / BYTEWIDTH]
+ & (1 << (p1[5] % BYTEWIDTH)))))
+ {
+ p[-3] = (unsigned char) pop_failure_jump;
+ DEBUG_PRINT1 (" No match => pop_failure_jump.\n");
+ }
+
+ else if ((re_opcode_t) p1[3] == charset_not)
+ {
+ int idx;
+ /* We win if the charset_not inside the loop
+ lists every character listed in the charset after. */
+ for (idx = 0; idx < (int) p2[1]; idx++)
+ if (! (p2[2 + idx] == 0
+ || (idx < (int) p1[4]
+ && ((p2[2 + idx] & ~ p1[5 + idx]) == 0))))
+ break;
+
+ if (idx == p2[1])
+ {
+ p[-3] = (unsigned char) pop_failure_jump;
+ DEBUG_PRINT1 (" No match => pop_failure_jump.\n");
+ }
+ }
+ else if ((re_opcode_t) p1[3] == charset)
+ {
+ int idx;
+ /* We win if the charset inside the loop
+ has no overlap with the one after the loop. */
+ for (idx = 0;
+ idx < (int) p2[1] && idx < (int) p1[4];
+ idx++)
+ if ((p2[2 + idx] & p1[5 + idx]) != 0)
+ break;
+
+ if (idx == p2[1] || idx == p1[4])
+ {
+ p[-3] = (unsigned char) pop_failure_jump;
+ DEBUG_PRINT1 (" No match => pop_failure_jump.\n");
+ }
+ }
+ }
+#endif /* not WCHAR */
+ }
+ p -= OFFSET_ADDRESS_SIZE; /* Point at relative address again. */
+ if ((re_opcode_t) p[-1] != pop_failure_jump)
+ {
+ p[-1] = (UCHAR_T) jump;
+ DEBUG_PRINT1 (" Match => jump.\n");
+ goto unconditional_jump;
+ }
+ /* Note fall through. */
+
+
+ /* The end of a simple repeat has a pop_failure_jump back to
+ its matching on_failure_jump, where the latter will push a
+ failure point. The pop_failure_jump takes off failure
+ points put on by this pop_failure_jump's matching
+ on_failure_jump; we got through the pattern to here from the
+ matching on_failure_jump, so didn't fail. */
+ case pop_failure_jump:
+ {
+ /* We need to pass separate storage for the lowest and
+ highest registers, even though we don't care about the
+ actual values. Otherwise, we will restore only one
+ register from the stack, since lowest will == highest in
+ `pop_failure_point'. */
+ active_reg_t dummy_low_reg, dummy_high_reg;
+ UCHAR_T *pdummy = NULL;
+ const CHAR_T *sdummy = NULL;
+
+ DEBUG_PRINT1 ("EXECUTING pop_failure_jump.\n");
+ POP_FAILURE_POINT (sdummy, pdummy,
+ dummy_low_reg, dummy_high_reg,
+ reg_dummy, reg_dummy, reg_info_dummy);
+ }
+ /* Note fall through. */
+
+ unconditional_jump:
+#ifdef _LIBC
+ DEBUG_PRINT2 ("\n%p: ", p);
+#else
+ DEBUG_PRINT2 ("\n0x%x: ", p);
+#endif
+ /* Note fall through. */
+
+ /* Unconditionally jump (without popping any failure points). */
+ case jump:
+ EXTRACT_NUMBER_AND_INCR (mcnt, p); /* Get the amount to jump. */
+ DEBUG_PRINT2 ("EXECUTING jump %d ", mcnt);
+ p += mcnt; /* Do the jump. */
+#ifdef _LIBC
+ DEBUG_PRINT2 ("(to %p).\n", p);
+#else
+ DEBUG_PRINT2 ("(to 0x%x).\n", p);
+#endif
+ break;
+
+
+ /* We need this opcode so we can detect where alternatives end
+ in `group_match_null_string_p' et al. */
+ case jump_past_alt:
+ DEBUG_PRINT1 ("EXECUTING jump_past_alt.\n");
+ goto unconditional_jump;
+
+
+ /* Normally, the on_failure_jump pushes a failure point, which
+ then gets popped at pop_failure_jump. We will end up at
+ pop_failure_jump, also, and with a pattern of, say, `a+', we
+ are skipping over the on_failure_jump, so we have to push
+ something meaningless for pop_failure_jump to pop. */
+ case dummy_failure_jump:
+ DEBUG_PRINT1 ("EXECUTING dummy_failure_jump.\n");
+ /* It doesn't matter what we push for the string here. What
+ the code at `fail' tests is the value for the pattern. */
+ PUSH_FAILURE_POINT (NULL, NULL, -2);
+ goto unconditional_jump;
+
+
+ /* At the end of an alternative, we need to push a dummy failure
+ point in case we are followed by a `pop_failure_jump', because
+ we don't want the failure point for the alternative to be
+ popped. For example, matching `(a|ab)*' against `aab'
+ requires that we match the `ab' alternative. */
+ case push_dummy_failure:
+ DEBUG_PRINT1 ("EXECUTING push_dummy_failure.\n");
+ /* See comments just above at `dummy_failure_jump' about the
+ two zeroes. */
+ PUSH_FAILURE_POINT (NULL, NULL, -2);
+ break;
+
+ /* Have to succeed matching what follows at least n times.
+ After that, handle like `on_failure_jump'. */
+ case succeed_n:
+ EXTRACT_NUMBER (mcnt, p + OFFSET_ADDRESS_SIZE);
+ DEBUG_PRINT2 ("EXECUTING succeed_n %d.\n", mcnt);
+
+ assert (mcnt >= 0);
+ /* Originally, this is how many times we HAVE to succeed. */
+ if (mcnt > 0)
+ {
+ mcnt--;
+ p += OFFSET_ADDRESS_SIZE;
+ STORE_NUMBER_AND_INCR (p, mcnt);
+#ifdef _LIBC
+ DEBUG_PRINT3 (" Setting %p to %d.\n", p - OFFSET_ADDRESS_SIZE
+ , mcnt);
+#else
+ DEBUG_PRINT3 (" Setting 0x%x to %d.\n", p - OFFSET_ADDRESS_SIZE
+ , mcnt);
+#endif
+ }
+ else if (mcnt == 0)
+ {
+#ifdef _LIBC
+ DEBUG_PRINT2 (" Setting two bytes from %p to no_op.\n",
+ p + OFFSET_ADDRESS_SIZE);
+#else
+ DEBUG_PRINT2 (" Setting two bytes from 0x%x to no_op.\n",
+ p + OFFSET_ADDRESS_SIZE);
+#endif /* _LIBC */
+
+#ifdef WCHAR
+ p[1] = (UCHAR_T) no_op;
+#else
+ p[2] = (UCHAR_T) no_op;
+ p[3] = (UCHAR_T) no_op;
+#endif /* WCHAR */
+ goto on_failure;
+ }
+ break;
+
+ case jump_n:
+ EXTRACT_NUMBER (mcnt, p + OFFSET_ADDRESS_SIZE);
+ DEBUG_PRINT2 ("EXECUTING jump_n %d.\n", mcnt);
+
+ /* Originally, this is how many times we CAN jump. */
+ if (mcnt)
+ {
+ mcnt--;
+ STORE_NUMBER (p + OFFSET_ADDRESS_SIZE, mcnt);
+
+#ifdef _LIBC
+ DEBUG_PRINT3 (" Setting %p to %d.\n", p + OFFSET_ADDRESS_SIZE,
+ mcnt);
+#else
+ DEBUG_PRINT3 (" Setting 0x%x to %d.\n", p + OFFSET_ADDRESS_SIZE,
+ mcnt);
+#endif /* _LIBC */
+ goto unconditional_jump;
+ }
+ /* If don't have to jump any more, skip over the rest of command. */
+ else
+ p += 2 * OFFSET_ADDRESS_SIZE;
+ break;
+
+ case set_number_at:
+ {
+ DEBUG_PRINT1 ("EXECUTING set_number_at.\n");
+
+ EXTRACT_NUMBER_AND_INCR (mcnt, p);
+ p1 = p + mcnt;
+ EXTRACT_NUMBER_AND_INCR (mcnt, p);
+#ifdef _LIBC
+ DEBUG_PRINT3 (" Setting %p to %d.\n", p1, mcnt);
+#else
+ DEBUG_PRINT3 (" Setting 0x%x to %d.\n", p1, mcnt);
+#endif
+ STORE_NUMBER (p1, mcnt);
+ break;
+ }
+
+#if 0
+ /* The DEC Alpha C compiler 3.x generates incorrect code for the
+ test WORDCHAR_P (d - 1) != WORDCHAR_P (d) in the expansion of
+ AT_WORD_BOUNDARY, so this code is disabled. Expanding the
+ macro and introducing temporary variables works around the bug. */
+
+ case wordbound:
+ DEBUG_PRINT1 ("EXECUTING wordbound.\n");
+ if (AT_WORD_BOUNDARY (d))
+ break;
+ goto fail;
+
+ case notwordbound:
+ DEBUG_PRINT1 ("EXECUTING notwordbound.\n");
+ if (AT_WORD_BOUNDARY (d))
+ goto fail;
+ break;
+#else
+ case wordbound:
+ {
+ boolean prevchar, thischar;
+
+ DEBUG_PRINT1 ("EXECUTING wordbound.\n");
+ if (AT_STRINGS_BEG (d) || AT_STRINGS_END (d))
+ break;
+
+ prevchar = WORDCHAR_P (d - 1);
+ thischar = WORDCHAR_P (d);
+ if (prevchar != thischar)
+ break;
+ goto fail;
+ }
+
+ case notwordbound:
+ {
+ boolean prevchar, thischar;
+
+ DEBUG_PRINT1 ("EXECUTING notwordbound.\n");
+ if (AT_STRINGS_BEG (d) || AT_STRINGS_END (d))
+ goto fail;
+
+ prevchar = WORDCHAR_P (d - 1);
+ thischar = WORDCHAR_P (d);
+ if (prevchar != thischar)
+ goto fail;
+ break;
+ }
+#endif
+
+ case wordbeg:
+ DEBUG_PRINT1 ("EXECUTING wordbeg.\n");
+ if (!AT_STRINGS_END (d) && WORDCHAR_P (d)
+ && (AT_STRINGS_BEG (d) || !WORDCHAR_P (d - 1)))
+ break;
+ goto fail;
+
+ case wordend:
+ DEBUG_PRINT1 ("EXECUTING wordend.\n");
+ if (!AT_STRINGS_BEG (d) && WORDCHAR_P (d - 1)
+ && (AT_STRINGS_END (d) || !WORDCHAR_P (d)))
+ break;
+ goto fail;
+
+#ifdef emacs
+ case before_dot:
+ DEBUG_PRINT1 ("EXECUTING before_dot.\n");
+ if (PTR_CHAR_POS ((unsigned char *) d) >= point)
+ goto fail;
+ break;
+
+ case at_dot:
+ DEBUG_PRINT1 ("EXECUTING at_dot.\n");
+ if (PTR_CHAR_POS ((unsigned char *) d) != point)
+ goto fail;
+ break;
+
+ case after_dot:
+ DEBUG_PRINT1 ("EXECUTING after_dot.\n");
+ if (PTR_CHAR_POS ((unsigned char *) d) <= point)
+ goto fail;
+ break;
+
+ case syntaxspec:
+ DEBUG_PRINT2 ("EXECUTING syntaxspec %d.\n", mcnt);
+ mcnt = *p++;
+ goto matchsyntax;
+
+ case wordchar:
+ DEBUG_PRINT1 ("EXECUTING Emacs wordchar.\n");
+ mcnt = (int) Sword;
+ matchsyntax:
+ PREFETCH ();
+ /* Can't use *d++ here; SYNTAX may be an unsafe macro. */
+ d++;
+ if (SYNTAX (d[-1]) != (enum syntaxcode) mcnt)
+ goto fail;
+ SET_REGS_MATCHED ();
+ break;
+
+ case notsyntaxspec:
+ DEBUG_PRINT2 ("EXECUTING notsyntaxspec %d.\n", mcnt);
+ mcnt = *p++;
+ goto matchnotsyntax;
+
+ case notwordchar:
+ DEBUG_PRINT1 ("EXECUTING Emacs notwordchar.\n");
+ mcnt = (int) Sword;
+ matchnotsyntax:
+ PREFETCH ();
+ /* Can't use *d++ here; SYNTAX may be an unsafe macro. */
+ d++;
+ if (SYNTAX (d[-1]) == (enum syntaxcode) mcnt)
+ goto fail;
+ SET_REGS_MATCHED ();
+ break;
+
+#else /* not emacs */
+ case wordchar:
+ DEBUG_PRINT1 ("EXECUTING non-Emacs wordchar.\n");
+ PREFETCH ();
+ if (!WORDCHAR_P (d))
+ goto fail;
+ SET_REGS_MATCHED ();
+ d++;
+ break;
+
+ case notwordchar:
+ DEBUG_PRINT1 ("EXECUTING non-Emacs notwordchar.\n");
+ PREFETCH ();
+ if (WORDCHAR_P (d))
+ goto fail;
+ SET_REGS_MATCHED ();
+ d++;
+ break;
+#endif /* not emacs */
+
+ default:
+ abort ();
+ }
+ continue; /* Successfully executed one pattern command; keep going. */
+
+
+ /* We goto here if a matching operation fails. */
+ fail:
+ if (!FAIL_STACK_EMPTY ())
+ { /* A restart point is known. Restore to that state. */
+ DEBUG_PRINT1 ("\nFAIL:\n");
+ POP_FAILURE_POINT (d, p,
+ lowest_active_reg, highest_active_reg,
+ regstart, regend, reg_info);
+
+ /* If this failure point is a dummy, try the next one. */
+ if (!p)
+ goto fail;
+
+ /* If we failed to the end of the pattern, don't examine *p. */
+ assert (p <= pend);
+ if (p < pend)
+ {
+ boolean is_a_jump_n = false;
+
+ /* If failed to a backwards jump that's part of a repetition
+ loop, need to pop this failure point and use the next one. */
+ switch ((re_opcode_t) *p)
+ {
+ case jump_n:
+ is_a_jump_n = true;
+ case maybe_pop_jump:
+ case pop_failure_jump:
+ case jump:
+ p1 = p + 1;
+ EXTRACT_NUMBER_AND_INCR (mcnt, p1);
+ p1 += mcnt;
+
+ if ((is_a_jump_n && (re_opcode_t) *p1 == succeed_n)
+ || (!is_a_jump_n
+ && (re_opcode_t) *p1 == on_failure_jump))
+ goto fail;
+ break;
+ default:
+ /* do nothing */ ;
+ }
+ }
+
+ if (d >= string1 && d <= end1)
+ dend = end_match_1;
+ }
+ else
+ break; /* Matching at this starting point really fails. */
+ } /* for (;;) */
+
+ if (best_regs_set)
+ goto restore_best_regs;
+
+ FREE_VARIABLES ();
+
+ return -1; /* Failure to match. */
+} /* re_match_2 */
+
+/* Subroutine definitions for re_match_2. */
+
+
+/* We are passed P pointing to a register number after a start_memory.
+
+ Return true if the pattern up to the corresponding stop_memory can
+ match the empty string, and false otherwise.
+
+ If we find the matching stop_memory, sets P to point to one past its number.
+ Otherwise, sets P to an undefined byte less than or equal to END.
+
+ We don't handle duplicates properly (yet). */
+
+static boolean
+PREFIX(group_match_null_string_p) (p, end, reg_info)
+ UCHAR_T **p, *end;
+ PREFIX(register_info_type) *reg_info;
+{
+ int mcnt;
+ /* Point to after the args to the start_memory. */
+ UCHAR_T *p1 = *p + 2;
+
+ while (p1 < end)
+ {
+ /* Skip over opcodes that can match nothing, and return true or
+ false, as appropriate, when we get to one that can't, or to the
+ matching stop_memory. */
+
+ switch ((re_opcode_t) *p1)
+ {
+ /* Could be either a loop or a series of alternatives. */
+ case on_failure_jump:
+ p1++;
+ EXTRACT_NUMBER_AND_INCR (mcnt, p1);
+
+ /* If the next operation is not a jump backwards in the
+ pattern. */
+
+ if (mcnt >= 0)
+ {
+ /* Go through the on_failure_jumps of the alternatives,
+ seeing if any of the alternatives cannot match nothing.
+ The last alternative starts with only a jump,
+ whereas the rest start with on_failure_jump and end
+ with a jump, e.g., here is the pattern for `a|b|c':
+
+ /on_failure_jump/0/6/exactn/1/a/jump_past_alt/0/6
+ /on_failure_jump/0/6/exactn/1/b/jump_past_alt/0/3
+ /exactn/1/c
+
+ So, we have to first go through the first (n-1)
+ alternatives and then deal with the last one separately. */
+
+
+ /* Deal with the first (n-1) alternatives, which start
+ with an on_failure_jump (see above) that jumps to right
+ past a jump_past_alt. */
+
+ while ((re_opcode_t) p1[mcnt-(1+OFFSET_ADDRESS_SIZE)] ==
+ jump_past_alt)
+ {
+ /* `mcnt' holds how many bytes long the alternative
+ is, including the ending `jump_past_alt' and
+ its number. */
+
+ if (!PREFIX(alt_match_null_string_p) (p1, p1 + mcnt -
+ (1 + OFFSET_ADDRESS_SIZE),
+ reg_info))
+ return false;
+
+ /* Move to right after this alternative, including the
+ jump_past_alt. */
+ p1 += mcnt;
+
+ /* Break if it's the beginning of an n-th alternative
+ that doesn't begin with an on_failure_jump. */
+ if ((re_opcode_t) *p1 != on_failure_jump)
+ break;
+
+ /* Still have to check that it's not an n-th
+ alternative that starts with an on_failure_jump. */
+ p1++;
+ EXTRACT_NUMBER_AND_INCR (mcnt, p1);
+ if ((re_opcode_t) p1[mcnt-(1+OFFSET_ADDRESS_SIZE)] !=
+ jump_past_alt)
+ {
+ /* Get to the beginning of the n-th alternative. */
+ p1 -= 1 + OFFSET_ADDRESS_SIZE;
+ break;
+ }
+ }
+
+ /* Deal with the last alternative: go back and get number
+ of the `jump_past_alt' just before it. `mcnt' contains
+ the length of the alternative. */
+ EXTRACT_NUMBER (mcnt, p1 - OFFSET_ADDRESS_SIZE);
+
+ if (!PREFIX(alt_match_null_string_p) (p1, p1 + mcnt, reg_info))
+ return false;
+
+ p1 += mcnt; /* Get past the n-th alternative. */
+ } /* if mcnt > 0 */
+ break;
+
+
+ case stop_memory:
+ assert (p1[1] == **p);
+ *p = p1 + 2;
+ return true;
+
+
+ default:
+ if (!PREFIX(common_op_match_null_string_p) (&p1, end, reg_info))
+ return false;
+ }
+ } /* while p1 < end */
+
+ return false;
+} /* group_match_null_string_p */
+
+
+/* Similar to group_match_null_string_p, but doesn't deal with alternatives:
+ It expects P to be the first byte of a single alternative and END one
+ byte past the last. The alternative can contain groups. */
+
+static boolean
+PREFIX(alt_match_null_string_p) (p, end, reg_info)
+ UCHAR_T *p, *end;
+ PREFIX(register_info_type) *reg_info;
+{
+ int mcnt;
+ UCHAR_T *p1 = p;
+
+ while (p1 < end)
+ {
+ /* Skip over opcodes that can match nothing, and break when we get
+ to one that can't. */
+
+ switch ((re_opcode_t) *p1)
+ {
+ /* It's a loop. */
+ case on_failure_jump:
+ p1++;
+ EXTRACT_NUMBER_AND_INCR (mcnt, p1);
+ p1 += mcnt;
+ break;
+
+ default:
+ if (!PREFIX(common_op_match_null_string_p) (&p1, end, reg_info))
+ return false;
+ }
+ } /* while p1 < end */
+
+ return true;
+} /* alt_match_null_string_p */
+
+
+/* Deals with the ops common to group_match_null_string_p and
+ alt_match_null_string_p.
+
+ Sets P to one after the op and its arguments, if any. */
+
+static boolean
+PREFIX(common_op_match_null_string_p) (p, end, reg_info)
+ UCHAR_T **p, *end;
+ PREFIX(register_info_type) *reg_info;
+{
+ int mcnt;
+ boolean ret;
+ int reg_no;
+ UCHAR_T *p1 = *p;
+
+ switch ((re_opcode_t) *p1++)
+ {
+ case no_op:
+ case begline:
+ case endline:
+ case begbuf:
+ case endbuf:
+ case wordbeg:
+ case wordend:
+ case wordbound:
+ case notwordbound:
+#ifdef emacs
+ case before_dot:
+ case at_dot:
+ case after_dot:
+#endif
+ break;
+
+ case start_memory:
+ reg_no = *p1;
+ assert (reg_no > 0 && reg_no <= MAX_REGNUM);
+ ret = PREFIX(group_match_null_string_p) (&p1, end, reg_info);
+
+ /* Have to set this here in case we're checking a group which
+ contains a group and a back reference to it. */
+
+ if (REG_MATCH_NULL_STRING_P (reg_info[reg_no]) == MATCH_NULL_UNSET_VALUE)
+ REG_MATCH_NULL_STRING_P (reg_info[reg_no]) = ret;
+
+ if (!ret)
+ return false;
+ break;
+
+ /* If this is an optimized succeed_n for zero times, make the jump. */
+ case jump:
+ EXTRACT_NUMBER_AND_INCR (mcnt, p1);
+ if (mcnt >= 0)
+ p1 += mcnt;
+ else
+ return false;
+ break;
+
+ case succeed_n:
+ /* Get to the number of times to succeed. */
+ p1 += OFFSET_ADDRESS_SIZE;
+ EXTRACT_NUMBER_AND_INCR (mcnt, p1);
+
+ if (mcnt == 0)
+ {
+ p1 -= 2 * OFFSET_ADDRESS_SIZE;
+ EXTRACT_NUMBER_AND_INCR (mcnt, p1);
+ p1 += mcnt;
+ }
+ else
+ return false;
+ break;
+
+ case duplicate:
+ if (!REG_MATCH_NULL_STRING_P (reg_info[*p1]))
+ return false;
+ break;
+
+ case set_number_at:
+ p1 += 2 * OFFSET_ADDRESS_SIZE;
+
+ default:
+ /* All other opcodes mean we cannot match the empty string. */
+ return false;
+ }
+
+ *p = p1;
+ return true;
+} /* common_op_match_null_string_p */
+
+
+/* Return zero if TRANSLATE[S1] and TRANSLATE[S2] are identical for LEN
+ bytes; nonzero otherwise. */
+
+static int
+PREFIX(bcmp_translate) (s1, s2, len, translate)
+ const CHAR_T *s1, *s2;
+ register int len;
+ RE_TRANSLATE_TYPE translate;
+{
+ register const UCHAR_T *p1 = (const UCHAR_T *) s1;
+ register const UCHAR_T *p2 = (const UCHAR_T *) s2;
+ while (len)
+ {
+#ifdef WCHAR
+ if (((*p1<=0xff)?translate[*p1++]:*p1++)
+ != ((*p2<=0xff)?translate[*p2++]:*p2++))
+ return 1;
+#else /* BYTE */
+ if (translate[*p1++] != translate[*p2++]) return 1;
+#endif /* WCHAR */
+ len--;
+ }
+ return 0;
+}
+
+
+#else /* not INSIDE_RECURSION */
+
+/* Entry points for GNU code. */
+
+/* re_compile_pattern is the GNU regular expression compiler: it
+ compiles PATTERN (of length SIZE) and puts the result in BUFP.
+ Returns 0 if the pattern was valid, otherwise an error string.
+
+ Assumes the `allocated' (and perhaps `buffer') and `translate' fields
+ are set in BUFP on entry.
+
+ We call regex_compile to do the actual compilation. */
+
+const char *
+re_compile_pattern (pattern, length, bufp)
+ const char *pattern;
+ size_t length;
+ struct re_pattern_buffer *bufp;
+{
+ reg_errcode_t ret;
+
+ /* GNU code is written to assume at least RE_NREGS registers will be set
+ (and at least one extra will be -1). */
+ bufp->regs_allocated = REGS_UNALLOCATED;
+
+ /* And GNU code determines whether or not to get register information
+ by passing null for the REGS argument to re_match, etc., not by
+ setting no_sub. */
+ bufp->no_sub = 0;
+
+ /* Match anchors at newline. */
+ bufp->newline_anchor = 1;
+
+# ifdef MBS_SUPPORT
+ if (MB_CUR_MAX != 1)
+ ret = wcs_regex_compile (pattern, length, re_syntax_options, bufp);
+ else
+# endif
+ ret = byte_regex_compile (pattern, length, re_syntax_options, bufp);
+
+ if (!ret)
+ return NULL;
+ return gettext (re_error_msgid + re_error_msgid_idx[(int) ret]);
+}
+#ifdef _LIBC
+weak_alias (__re_compile_pattern, re_compile_pattern)
+#endif
+
+/* Entry points compatible with 4.2 BSD regex library. We don't define
+ them unless specifically requested. */
+
+#if defined _REGEX_RE_COMP || defined _LIBC
+
+/* BSD has one and only one pattern buffer. */
+static struct re_pattern_buffer re_comp_buf;
+
+char *
+#ifdef _LIBC
+/* Make these definitions weak in libc, so POSIX programs can redefine
+ these names if they don't use our functions, and still use
+ regcomp/regexec below without link errors. */
+weak_function
+#endif
+re_comp (s)
+ const char *s;
+{
+ reg_errcode_t ret;
+
+ if (!s)
+ {
+ if (!re_comp_buf.buffer)
+ return gettext ("No previous regular expression");
+ return 0;
+ }
+
+ if (!re_comp_buf.buffer)
+ {
+ re_comp_buf.buffer = (unsigned char *) malloc (200);
+ if (re_comp_buf.buffer == NULL)
+ return (char *) gettext (re_error_msgid
+ + re_error_msgid_idx[(int) REG_ESPACE]);
+ re_comp_buf.allocated = 200;
+
+ re_comp_buf.fastmap = (char *) malloc (1 << BYTEWIDTH);
+ if (re_comp_buf.fastmap == NULL)
+ return (char *) gettext (re_error_msgid
+ + re_error_msgid_idx[(int) REG_ESPACE]);
+ }
+
+ /* Since `re_exec' always passes NULL for the `regs' argument, we
+ don't need to initialize the pattern buffer fields which affect it. */
+
+ /* Match anchors at newlines. */
+ re_comp_buf.newline_anchor = 1;
+
+# ifdef MBS_SUPPORT
+ if (MB_CUR_MAX != 1)
+ ret = wcs_regex_compile (s, strlen (s), re_syntax_options, &re_comp_buf);
+ else
+# endif
+ ret = byte_regex_compile (s, strlen (s), re_syntax_options, &re_comp_buf);
+
+ if (!ret)
+ return NULL;
+
+ /* Yes, we're discarding `const' here if !HAVE_LIBINTL. */
+ return (char *) gettext (re_error_msgid + re_error_msgid_idx[(int) ret]);
+}
+
+
+int
+#ifdef _LIBC
+weak_function
+#endif
+re_exec (s)
+ const char *s;
+{
+ const int len = strlen (s);
+ return
+ 0 <= re_search (&re_comp_buf, s, len, 0, len, (struct re_registers *) 0);
+}
+
+#endif /* _REGEX_RE_COMP */
+
+/* POSIX.2 functions. Don't define these for Emacs. */
+
+#ifndef emacs
+
+/* regcomp takes a regular expression as a string and compiles it.
+
+ PREG is a regex_t *. We do not expect any fields to be initialized,
+ since POSIX says we shouldn't. Thus, we set
+
+ `buffer' to the compiled pattern;
+ `used' to the length of the compiled pattern;
+ `syntax' to RE_SYNTAX_POSIX_EXTENDED if the
+ REG_EXTENDED bit in CFLAGS is set; otherwise, to
+ RE_SYNTAX_POSIX_BASIC;
+ `newline_anchor' to REG_NEWLINE being set in CFLAGS;
+ `fastmap' to an allocated space for the fastmap;
+ `fastmap_accurate' to zero;
+ `re_nsub' to the number of subexpressions in PATTERN.
+
+ PATTERN is the address of the pattern string.
+
+ CFLAGS is a series of bits which affect compilation.
+
+ If REG_EXTENDED is set, we use POSIX extended syntax; otherwise, we
+ use POSIX basic syntax.
+
+ If REG_NEWLINE is set, then . and [^...] don't match newline.
+ Also, regexec will try a match beginning after every newline.
+
+ If REG_ICASE is set, then we considers upper- and lowercase
+ versions of letters to be equivalent when matching.
+
+ If REG_NOSUB is set, then when PREG is passed to regexec, that
+ routine will report only success or failure, and nothing about the
+ registers.
+
+ It returns 0 if it succeeds, nonzero if it doesn't. (See regex.h for
+ the return codes and their meanings.) */
+
+int
+regcomp (preg, pattern, cflags)
+ regex_t *preg;
+ const char *pattern;
+ int cflags;
+{
+ reg_errcode_t ret;
+ reg_syntax_t syntax
+ = (cflags & REG_EXTENDED) ?
+ RE_SYNTAX_POSIX_EXTENDED : RE_SYNTAX_POSIX_BASIC;
+
+ /* regex_compile will allocate the space for the compiled pattern. */
+ preg->buffer = 0;
+ preg->allocated = 0;
+ preg->used = 0;
+
+ /* Try to allocate space for the fastmap. */
+ preg->fastmap = (char *) malloc (1 << BYTEWIDTH);
+
+ if (cflags & REG_ICASE)
+ {
+ unsigned i;
+
+ preg->translate
+ = (RE_TRANSLATE_TYPE) malloc (CHAR_SET_SIZE
+ * sizeof (*(RE_TRANSLATE_TYPE)0));
+ if (preg->translate == NULL)
+ return (int) REG_ESPACE;
+
+ /* Map uppercase characters to corresponding lowercase ones. */
+ for (i = 0; i < CHAR_SET_SIZE; i++)
+ preg->translate[i] = ISUPPER (i) ? TOLOWER (i) : i;
+ }
+ else
+ preg->translate = NULL;
+
+ /* If REG_NEWLINE is set, newlines are treated differently. */
+ if (cflags & REG_NEWLINE)
+ { /* REG_NEWLINE implies neither . nor [^...] match newline. */
+ syntax &= ~RE_DOT_NEWLINE;
+ syntax |= RE_HAT_LISTS_NOT_NEWLINE;
+ /* It also changes the matching behavior. */
+ preg->newline_anchor = 1;
+ }
+ else
+ preg->newline_anchor = 0;
+
+ preg->no_sub = !!(cflags & REG_NOSUB);
+
+ /* POSIX says a null character in the pattern terminates it, so we
+ can use strlen here in compiling the pattern. */
+# ifdef MBS_SUPPORT
+ if (MB_CUR_MAX != 1)
+ ret = wcs_regex_compile (pattern, strlen (pattern), syntax, preg);
+ else
+# endif
+ ret = byte_regex_compile (pattern, strlen (pattern), syntax, preg);
+
+ /* POSIX doesn't distinguish between an unmatched open-group and an
+ unmatched close-group: both are REG_EPAREN. */
+ if (ret == REG_ERPAREN) ret = REG_EPAREN;
+
+ if (ret == REG_NOERROR && preg->fastmap)
+ {
+ /* Compute the fastmap now, since regexec cannot modify the pattern
+ buffer. */
+ if (re_compile_fastmap (preg) == -2)
+ {
+ /* Some error occurred while computing the fastmap, just forget
+ about it. */
+ free (preg->fastmap);
+ preg->fastmap = NULL;
+ }
+ }
+
+ return (int) ret;
+}
+#ifdef _LIBC
+weak_alias (__regcomp, regcomp)
+#endif
+
+
+/* regexec searches for a given pattern, specified by PREG, in the
+ string STRING.
+
+ If NMATCH is zero or REG_NOSUB was set in the cflags argument to
+ `regcomp', we ignore PMATCH. Otherwise, we assume PMATCH has at
+ least NMATCH elements, and we set them to the offsets of the
+ corresponding matched substrings.
+
+ EFLAGS specifies `execution flags' which affect matching: if
+ REG_NOTBOL is set, then ^ does not match at the beginning of the
+ string; if REG_NOTEOL is set, then $ does not match at the end.
+
+ We return 0 if we find a match and REG_NOMATCH if not. */
+
+int
+regexec (preg, string, nmatch, pmatch, eflags)
+ const regex_t *preg;
+ const char *string;
+ size_t nmatch;
+ regmatch_t pmatch[];
+ int eflags;
+{
+ int ret;
+ struct re_registers regs;
+ regex_t private_preg;
+ int len = strlen (string);
+ boolean want_reg_info = !preg->no_sub && nmatch > 0;
+
+ private_preg = *preg;
+
+ private_preg.not_bol = !!(eflags & REG_NOTBOL);
+ private_preg.not_eol = !!(eflags & REG_NOTEOL);
+
+ /* The user has told us exactly how many registers to return
+ information about, via `nmatch'. We have to pass that on to the
+ matching routines. */
+ private_preg.regs_allocated = REGS_FIXED;
+
+ if (want_reg_info)
+ {
+ regs.num_regs = nmatch;
+ regs.start = TALLOC (nmatch * 2, regoff_t);
+ if (regs.start == NULL)
+ return (int) REG_NOMATCH;
+ regs.end = regs.start + nmatch;
+ }
+
+ /* Perform the searching operation. */
+ ret = re_search (&private_preg, string, len,
+ /* start: */ 0, /* range: */ len,
+ want_reg_info ? &regs : (struct re_registers *) 0);
+
+ /* Copy the register information to the POSIX structure. */
+ if (want_reg_info)
+ {
+ if (ret >= 0)
+ {
+ unsigned r;
+
+ for (r = 0; r < nmatch; r++)
+ {
+ pmatch[r].rm_so = regs.start[r];
+ pmatch[r].rm_eo = regs.end[r];
+ }
+ }
+
+ /* If we needed the temporary register info, free the space now. */
+ free (regs.start);
+ }
+
+ /* We want zero return to mean success, unlike `re_search'. */
+ return ret >= 0 ? (int) REG_NOERROR : (int) REG_NOMATCH;
+}
+#ifdef _LIBC
+weak_alias (__regexec, regexec)
+#endif
+
+
+/* Returns a message corresponding to an error code, ERRCODE, returned
+ from either regcomp or regexec. We don't use PREG here. */
+
+size_t
+regerror (errcode, preg, errbuf, errbuf_size)
+ int errcode;
+ const regex_t *preg;
+ char *errbuf;
+ size_t errbuf_size;
+{
+ const char *msg;
+ size_t msg_size;
+
+ if (errcode < 0
+ || errcode >= (int) (sizeof (re_error_msgid_idx)
+ / sizeof (re_error_msgid_idx[0])))
+ /* Only error codes returned by the rest of the code should be passed
+ to this routine. If we are given anything else, or if other regex
+ code generates an invalid error code, then the program has a bug.
+ Dump core so we can fix it. */
+ abort ();
+
+ msg = gettext (re_error_msgid + re_error_msgid_idx[errcode]);
+
+ msg_size = strlen (msg) + 1; /* Includes the null. */
+
+ if (errbuf_size != 0)
+ {
+ if (msg_size > errbuf_size)
+ {
+#if defined HAVE_MEMPCPY || defined _LIBC
+ *((char *) __mempcpy (errbuf, msg, errbuf_size - 1)) = '\0';
+#else
+ memcpy (errbuf, msg, errbuf_size - 1);
+ errbuf[errbuf_size - 1] = 0;
+#endif
+ }
+ else
+ memcpy (errbuf, msg, msg_size);
+ }
+
+ return msg_size;
+}
+#ifdef _LIBC
+weak_alias (__regerror, regerror)
+#endif
+
+
+/* Free dynamically allocated space used by PREG. */
+
+void
+regfree (preg)
+ regex_t *preg;
+{
+ if (preg->buffer != NULL)
+ free (preg->buffer);
+ preg->buffer = NULL;
+
+ preg->allocated = 0;
+ preg->used = 0;
+
+ if (preg->fastmap != NULL)
+ free (preg->fastmap);
+ preg->fastmap = NULL;
+ preg->fastmap_accurate = 0;
+
+ if (preg->translate != NULL)
+ free (preg->translate);
+ preg->translate = NULL;
+}
+#ifdef _LIBC
+weak_alias (__regfree, regfree)
+#endif
+
+#endif /* not emacs */
+
+#endif /* not INSIDE_RECURSION */
+
+
+#undef STORE_NUMBER
+#undef STORE_NUMBER_AND_INCR
+#undef EXTRACT_NUMBER
+#undef EXTRACT_NUMBER_AND_INCR
+
+#undef DEBUG_PRINT_COMPILED_PATTERN
+#undef DEBUG_PRINT_DOUBLE_STRING
+
+#undef INIT_FAIL_STACK
+#undef RESET_FAIL_STACK
+#undef DOUBLE_FAIL_STACK
+#undef PUSH_PATTERN_OP
+#undef PUSH_FAILURE_POINTER
+#undef PUSH_FAILURE_INT
+#undef PUSH_FAILURE_ELT
+#undef POP_FAILURE_POINTER
+#undef POP_FAILURE_INT
+#undef POP_FAILURE_ELT
+#undef DEBUG_PUSH
+#undef DEBUG_POP
+#undef PUSH_FAILURE_POINT
+#undef POP_FAILURE_POINT
+
+#undef REG_UNSET_VALUE
+#undef REG_UNSET
+
+#undef PATFETCH
+#undef PATFETCH_RAW
+#undef PATUNFETCH
+#undef TRANSLATE
+
+#undef INIT_BUF_SIZE
+#undef GET_BUFFER_SPACE
+#undef BUF_PUSH
+#undef BUF_PUSH_2
+#undef BUF_PUSH_3
+#undef STORE_JUMP
+#undef STORE_JUMP2
+#undef INSERT_JUMP
+#undef INSERT_JUMP2
+#undef EXTEND_BUFFER
+#undef GET_UNSIGNED_NUMBER
+#undef FREE_STACK_RETURN
+
+# undef POINTER_TO_OFFSET
+# undef MATCHING_IN_FRST_STRING
+# undef PREFETCH
+# undef AT_STRINGS_BEG
+# undef AT_STRINGS_END
+# undef WORDCHAR_P
+# undef FREE_VAR
+# undef FREE_VARIABLES
+# undef NO_HIGHEST_ACTIVE_REG
+# undef NO_LOWEST_ACTIVE_REG
+
+# undef CHAR_T
+# undef UCHAR_T
+# undef COMPILED_BUFFER_VAR
+# undef OFFSET_ADDRESS_SIZE
+# undef CHAR_CLASS_SIZE
+# undef PREFIX
+# undef ARG_PREFIX
+# undef PUT_CHAR
+# undef BYTE
+# undef WCHAR
+
+# define DEFINED_ONCE
diff --git a/contrib/binutils/libiberty/rename.c b/contrib/binutils/libiberty/rename.c
index 2e9dec1..0563062 100644
--- a/contrib/binutils/libiberty/rename.c
+++ b/contrib/binutils/libiberty/rename.c
@@ -1,7 +1,16 @@
/* rename -- rename a file
This function is in the public domain. */
-/* Rename a file. */
+/*
+
+@deftypefn Supplemental int rename (const char *@var{old}, const char *@var{new})
+
+Renames a file from @var{old} to @var{new}. If @var{new} already
+exists, it is removed.
+
+@end deftypefn
+
+*/
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/contrib/binutils/libiberty/rindex.c b/contrib/binutils/libiberty/rindex.c
index 061d126..ef9cdc5 100644
--- a/contrib/binutils/libiberty/rindex.c
+++ b/contrib/binutils/libiberty/rindex.c
@@ -1,5 +1,17 @@
/* Stub implementation of (obsolete) rindex(). */
+/*
+
+@deftypefn Supplemental char* rindex (const char *@var{s}, int @var{c})
+
+Returns a pointer to the last occurrence of the character @var{c} in
+the string @var{s}, or @code{NULL} if not found. The use of @code{rindex} is
+deprecated in new programs in favor of @code{strrchr}.
+
+@end deftypefn
+
+*/
+
extern char *strrchr ();
char *
diff --git a/contrib/binutils/libiberty/setenv.c b/contrib/binutils/libiberty/setenv.c
index f025716..8394faf 100644
--- a/contrib/binutils/libiberty/setenv.c
+++ b/contrib/binutils/libiberty/setenv.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1995, 1996, 1997, 2002 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
@@ -16,10 +16,29 @@
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
+
+/*
+
+@deftypefn Supplemental int setenv (const char *@var{name}, const char *@var{value}, int @var{overwrite})
+@deftypefnx Supplemental void unsetenv (const char *@var{name})
+
+@code{setenv} adds @var{name} to the environment with value
+@var{value}. If the name was already present in the environment,
+the new value will be stored only if @var{overwrite} is nonzero.
+The companion @code{unsetenv} function removes @var{name} from the
+environment. This implementation is not safe for multithreaded code.
+
+@end deftypefn
+
+*/
+
#if HAVE_CONFIG_H
# include <config.h>
#endif
+#define setenv libiberty_setenv
+#define unsetenv libiberty_unsetenv
+
#include "ansidecl.h"
#include <sys/types.h> /* For `size_t' */
#include <stdio.h> /* For `NULL' */
@@ -45,6 +64,9 @@ extern int errno;
extern char **environ;
#endif
+#undef setenv
+#undef unsetenv
+
/* LOCK and UNLOCK are defined as no-ops. This makes the libiberty
* implementation MT-Unsafe. */
#define LOCK
diff --git a/contrib/binutils/libiberty/sigsetmask.c b/contrib/binutils/libiberty/sigsetmask.c
index db6408d..f705fbb 100644
--- a/contrib/binutils/libiberty/sigsetmask.c
+++ b/contrib/binutils/libiberty/sigsetmask.c
@@ -3,8 +3,17 @@
Contributed by Cygnus Support.
This file is in the public doamin. */
-/* Set the current signal mask to the set provided, and return the
- previous value */
+/*
+
+@deftypefn Supplemental int sigsetmask (int @var{set})
+
+Sets the signal mask to the one provided in @var{set} and returns
+the old mask (which, for libiberty's implementation, will always
+be the value @code{1}).
+
+@end deftypefn
+
+*/
#define _POSIX_SOURCE
#include <ansidecl.h>
diff --git a/contrib/binutils/libiberty/spaces.c b/contrib/binutils/libiberty/spaces.c
index ea92571..bfead7e 100644
--- a/contrib/binutils/libiberty/spaces.c
+++ b/contrib/binutils/libiberty/spaces.c
@@ -19,21 +19,13 @@ Boston, MA 02111-1307, USA. */
/*
-NAME
+@deftypefn Extension char* spaces (int @var{count})
- spaces -- return a pointer to a buffer full of spaces
+Returns a pointer to a memory region filled with the specified
+number of spaces and null terminated. The returned pointer is
+valid until at least the next call.
-SYNOPSIS
-
- char *spaces (int count)
-
-DESCRIPTION
-
- Returns a pointer to a memory region filled with the specified
- number of spaces and null terminated. The returned pointer is
- valid until at least the next call.
-
-BUGS
+@end deftypefn
*/
diff --git a/contrib/binutils/libiberty/splay-tree.c b/contrib/binutils/libiberty/splay-tree.c
index 52b57c0..a712395 100644
--- a/contrib/binutils/libiberty/splay-tree.c
+++ b/contrib/binutils/libiberty/splay-tree.c
@@ -1,5 +1,5 @@
/* A splay-tree datatype.
- Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
Contributed by Mark Mitchell (mark@markmitchell.com).
This file is part of GNU CC.
@@ -368,6 +368,40 @@ splay_tree_lookup (sp, key)
return 0;
}
+/* Return the node in SP with the greatest key. */
+
+splay_tree_node
+splay_tree_max (sp)
+ splay_tree sp;
+{
+ splay_tree_node n = sp->root;
+
+ if (!n)
+ return NULL;
+
+ while (n->right)
+ n = n->right;
+
+ return n;
+}
+
+/* Return the node in SP with the smallest key. */
+
+splay_tree_node
+splay_tree_min (sp)
+ splay_tree sp;
+{
+ splay_tree_node n = sp->root;
+
+ if (!n)
+ return NULL;
+
+ while (n->left)
+ n = n->left;
+
+ return n;
+}
+
/* Return the immediate predecessor KEY, or NULL if there is no
predecessor. KEY need not be present in the tree. */
diff --git a/contrib/binutils/libiberty/strcasecmp.c b/contrib/binutils/libiberty/strcasecmp.c
index 3aa930b..4bfe650 100644
--- a/contrib/binutils/libiberty/strcasecmp.c
+++ b/contrib/binutils/libiberty/strcasecmp.c
@@ -10,6 +10,16 @@
* is provided ``as is'' without express or implied warranty.
*/
+/*
+
+@deftypefn Supplemental int strcasecmp (const char *@var{s1}, const char *@var{s2})
+
+A case-insensitive @code{strcmp}.
+
+@end deftypefn
+
+*/
+
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)strcasecmp.c 5.5 (Berkeley) 11/24/87";
#endif /* LIBC_SCCS and not lint */
@@ -27,7 +37,7 @@ static char sccsid[] = "@(#)strcasecmp.c 5.5 (Berkeley) 11/24/87";
* based upon ascii character sequences.
*/
typedef unsigned char uc;
-static unsigned char charmap[] = {
+static const unsigned char charmap[] = {
(uc)'\000',(uc)'\001',(uc)'\002',(uc)'\003',(uc)'\004',(uc)'\005',(uc)'\006',(uc)'\007',
(uc)'\010',(uc)'\011',(uc)'\012',(uc)'\013',(uc)'\014',(uc)'\015',(uc)'\016',(uc)'\017',
(uc)'\020',(uc)'\021',(uc)'\022',(uc)'\023',(uc)'\024',(uc)'\025',(uc)'\026',(uc)'\027',
diff --git a/contrib/binutils/libiberty/strchr.c b/contrib/binutils/libiberty/strchr.c
index 550480f..1f71c51 100644
--- a/contrib/binutils/libiberty/strchr.c
+++ b/contrib/binutils/libiberty/strchr.c
@@ -2,19 +2,15 @@
This function is in the public domain. */
/*
-NAME
- strchr -- return pointer to first occurance of a character
-SYNOPSIS
- char *strchr (const char *s, int c)
+@deftypefn Supplemental char* strchr (const char *@var{s}, int @var{c})
+
+Returns a pointer to the first occurrence of the character @var{c} in
+the string @var{s}, or @code{NULL} if not found. If @var{c} is itself the
+null character, the results are undefined.
+
+@end deftypefn
-DESCRIPTION
- Returns a pointer to the first occurance of character C in
- string S, or a NULL pointer if no occurance is found.
-
-BUGS
- Behavior when character is the null character is implementation
- dependent.
*/
#include <ansidecl.h>
diff --git a/contrib/binutils/libiberty/strdup.c b/contrib/binutils/libiberty/strdup.c
index 1785b34..49233ba 100644
--- a/contrib/binutils/libiberty/strdup.c
+++ b/contrib/binutils/libiberty/strdup.c
@@ -1,3 +1,14 @@
+/*
+
+@deftypefn Supplemental char* strdup (const char *@var{s})
+
+Returns a pointer to a copy of @var{s} in memory obtained from
+@code{malloc}, or @code{NULL} if insufficient memory was available.
+
+@end deftypefn
+
+*/
+
char *
strdup(s)
char *s;
diff --git a/contrib/binutils/libiberty/strerror.c b/contrib/binutils/libiberty/strerror.c
index 0dd2220..18050c2 100644
--- a/contrib/binutils/libiberty/strerror.c
+++ b/contrib/binutils/libiberty/strerror.c
@@ -13,6 +13,7 @@
incompatible with our later declaration, perhaps by using const
attributes. So we hide the declaration in errno.h (if any) using a
macro. */
+#define sys_nerr sys_nerr__
#define sys_errlist sys_errlist__
#endif
@@ -20,6 +21,7 @@
#include <errno.h>
#ifdef HAVE_SYS_ERRLIST
+#undef sys_nerr
#undef sys_errlist
#endif
@@ -56,10 +58,10 @@ static void init_error_tables PARAMS ((void));
struct error_info
{
- int value; /* The numeric value from <errno.h> */
- const char *name; /* The equivalent symbolic value */
+ const int value; /* The numeric value from <errno.h> */
+ const char *const name; /* The equivalent symbolic value */
#ifndef HAVE_SYS_ERRLIST
- const char *msg; /* Short message about this value */
+ const char *const msg; /* Short message about this value */
#endif
};
@@ -560,28 +562,23 @@ init_error_tables ()
/*
-NAME
-
- errno_max -- return the max errno value
-SYNOPSIS
+@deftypefn Extension int errno_max (void)
- int errno_max ();
+Returns the maximum @code{errno} value for which a corresponding
+symbolic name or message is available. Note that in the case where we
+use the @code{sys_errlist} supplied by the system, it is possible for
+there to be more symbolic names than messages, or vice versa. In
+fact, the manual page for @code{perror(3C)} explicitly warns that one
+should check the size of the table (@code{sys_nerr}) before indexing
+it, since new error codes may be added to the system before they are
+added to the table. Thus @code{sys_nerr} might be smaller than value
+implied by the largest @code{errno} value defined in @code{<errno.h>}.
-DESCRIPTION
+We return the maximum value that can be used to obtain a meaningful
+symbolic name or message.
- Returns the maximum errno value for which a corresponding symbolic
- name or message is available. Note that in the case where
- we use the sys_errlist supplied by the system, it is possible for
- there to be more symbolic names than messages, or vice versa.
- In fact, the manual page for perror(3C) explicitly warns that one
- should check the size of the table (sys_nerr) before indexing it,
- since new error codes may be added to the system before they are
- added to the table. Thus sys_nerr might be smaller than value
- implied by the largest errno value defined in <errno.h>.
-
- We return the maximum value that can be used to obtain a meaningful
- symbolic name or message.
+@end deftypefn
*/
@@ -602,31 +599,25 @@ errno_max ()
/*
-NAME
+@deftypefn Supplemental char* strerror (int @var{errnoval})
- strerror -- map an error number to an error message string
+Maps an @code{errno} number to an error message string, the contents
+of which are implementation defined. On systems which have the
+external variables @code{sys_nerr} and @code{sys_errlist}, these
+strings will be the same as the ones used by @code{perror}.
-SYNOPSIS
+If the supplied error number is within the valid range of indices for
+the @code{sys_errlist}, but no message is available for the particular
+error number, then returns the string @samp{Error @var{num}}, where
+@var{num} is the error number.
- char *strerror (int errnoval)
+If the supplied error number is not a valid index into
+@code{sys_errlist}, returns @code{NULL}.
-DESCRIPTION
-
- Maps an errno number to an error message string, the contents of
- which are implementation defined. On systems which have the external
- variables sys_nerr and sys_errlist, these strings will be the same
- as the ones used by perror().
-
- If the supplied error number is within the valid range of indices
- for the sys_errlist, but no message is available for the particular
- error number, then returns the string "Error NUM", where NUM is the
- error number.
+The returned string is only guaranteed to be valid only until the
+next call to @code{strerror}.
- If the supplied error number is not a valid index into sys_errlist,
- returns NULL.
-
- The returned string is only guaranteed to be valid only until the
- next call to strerror.
+@end deftypefn
*/
@@ -634,7 +625,7 @@ char *
strerror (errnoval)
int errnoval;
{
- char *msg;
+ const char *msg;
static char buf[32];
#ifndef HAVE_SYS_ERRLIST
@@ -676,32 +667,24 @@ strerror (errnoval)
/*
-NAME
+@deftypefn Replacement {const char*} strerrno (int @var{errnum})
- strerrno -- map an error number to a symbolic name string
+Given an error number returned from a system call (typically returned
+in @code{errno}), returns a pointer to a string containing the
+symbolic name of that error number, as found in @code{<errno.h>}.
-SYNOPSIS
+If the supplied error number is within the valid range of indices for
+symbolic names, but no name is available for the particular error
+number, then returns the string @samp{Error @var{num}}, where @var{num}
+is the error number.
- const char *strerrno (int errnoval)
+If the supplied error number is not within the range of valid
+indices, then returns @code{NULL}.
-DESCRIPTION
-
- Given an error number returned from a system call (typically
- returned in errno), returns a pointer to a string containing the
- symbolic name of that error number, as found in <errno.h>.
-
- If the supplied error number is within the valid range of indices
- for symbolic names, but no name is available for the particular
- error number, then returns the string "Error NUM", where NUM is
- the error number.
-
- If the supplied error number is not within the range of valid
- indices, then returns NULL.
-
-BUGS
+The contents of the location pointed to are only guaranteed to be
+valid until the next call to @code{strerrno}.
- The contents of the location pointed to are only guaranteed to be
- valid until the next call to strerrno.
+@end deftypefn
*/
@@ -744,18 +727,12 @@ strerrno (errnoval)
/*
-NAME
-
- strtoerrno -- map a symbolic errno name to a numeric value
-
-SYNOPSIS
-
- int strtoerrno (char *name)
+@deftypefn Extension int strtoerrno (const char *@var{name})
-DESCRIPTION
+Given the symbolic name of a error number (e.g., @code{EACCES}), map it
+to an errno value. If no translation is found, returns 0.
- Given the symbolic name of a error number, map it to an errno value.
- If no translation is found, returns 0.
+@end deftypefn
*/
@@ -806,7 +783,7 @@ main ()
int errn;
int errnmax;
const char *name;
- char *msg;
+ const char *msg;
char *strerror ();
errnmax = errno_max ();
diff --git a/contrib/binutils/libiberty/strncasecmp.c b/contrib/binutils/libiberty/strncasecmp.c
index 4485cac..77cb421 100644
--- a/contrib/binutils/libiberty/strncasecmp.c
+++ b/contrib/binutils/libiberty/strncasecmp.c
@@ -10,6 +10,16 @@
* is provided ``as is'' without express or implied warranty.
*/
+/*
+
+@deftypefn Supplemental int strncasecmp (const char *@var{s1}, const char *@var{s2})
+
+A case-insensitive @code{strncmp}.
+
+@end deftypefn
+
+*/
+
#if defined(LIBC_SCCS) && !defined(lint)
static char sccsid[] = "@(#)strcasecmp.c 5.5 (Berkeley) 11/24/87";
#endif /* LIBC_SCCS and not lint */
@@ -26,7 +36,7 @@ static char sccsid[] = "@(#)strcasecmp.c 5.5 (Berkeley) 11/24/87";
* together for a case independent comparison. The mappings are
* based upon ascii character sequences.
*/
-static unsigned char charmap[] = {
+static const unsigned char charmap[] = {
'\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
'\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
'\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
diff --git a/contrib/binutils/libiberty/strncmp.c b/contrib/binutils/libiberty/strncmp.c
index b3b9de1..819cea6 100644
--- a/contrib/binutils/libiberty/strncmp.c
+++ b/contrib/binutils/libiberty/strncmp.c
@@ -1,6 +1,17 @@
/* strncmp -- compare two strings, stop after n bytes.
This function is in the public domain. */
+/*
+
+@deftypefn Supplemental int strncmp (const char *@var{s1}, const char *@var{s2}, size_t @var{n})
+
+Compares the first @var{n} bytes of two strings, returning a value as
+@code{strcmp}.
+
+@end deftypefn
+
+*/
+
#include <ansidecl.h>
#ifdef __STDC__
#include <stddef.h>
diff --git a/contrib/binutils/libiberty/strrchr.c b/contrib/binutils/libiberty/strrchr.c
index 8c05bcb..bc380c4 100644
--- a/contrib/binutils/libiberty/strrchr.c
+++ b/contrib/binutils/libiberty/strrchr.c
@@ -2,19 +2,15 @@
This function is in the public domain. */
/*
-NAME
- strrchr -- return pointer to last occurance of a character
-
-SYNOPSIS
- char *strrchr (const char *s, int c)
-
-DESCRIPTION
- Returns a pointer to the last occurance of character C in
- string S, or a NULL pointer if no occurance is found.
-
-BUGS
- Behavior when character is the null character is implementation
- dependent.
+
+@deftypefn Supplemental char* strrchr (const char *@var{s}, int @var{c})
+
+Returns a pointer to the last occurrence of the character @var{c} in
+the string @var{s}, or @code{NULL} if not found. If @var{c} is itself the
+null character, the results are undefined.
+
+@end deftypefn
+
*/
#include <ansidecl.h>
diff --git a/contrib/binutils/libiberty/strsignal.c b/contrib/binutils/libiberty/strsignal.c
index 5625323..86c8aca 100644
--- a/contrib/binutils/libiberty/strsignal.c
+++ b/contrib/binutils/libiberty/strsignal.c
@@ -17,6 +17,7 @@
ignore any declaration in the system header files, and always
declare it ourselves. With luck, this will always work. */
#define sys_siglist no_such_symbol
+#define sys_nsig sys_nsig__no_such_symbol
#include <stdio.h>
#include <signal.h>
@@ -38,6 +39,7 @@ extern PTR memset ();
/* Undefine the macro we used to hide the definition of sys_siglist
found in the system header files. */
#undef sys_siglist
+#undef sys_nsig
#ifndef NULL
# ifdef __STDC__
@@ -65,10 +67,10 @@ static void init_signal_tables PARAMS ((void));
struct signal_info
{
- int value; /* The numeric value from <signal.h> */
- const char *name; /* The equivalent symbolic value */
+ const int value; /* The numeric value from <signal.h> */
+ const char *const name; /* The equivalent symbolic value */
#ifndef HAVE_SYS_SIGLIST
- const char *msg; /* Short message about this value */
+ const char *const msg; /* Short message about this value */
#endif
};
@@ -348,28 +350,22 @@ init_signal_tables ()
/*
-NAME
-
- signo_max -- return the max signo value
-
-SYNOPSIS
+@deftypefn Extension int signo_max (void)
- int signo_max ();
+Returns the maximum signal value for which a corresponding symbolic
+name or message is available. Note that in the case where we use the
+@code{sys_siglist} supplied by the system, it is possible for there to
+be more symbolic names than messages, or vice versa. In fact, the
+manual page for @code{psignal(3b)} explicitly warns that one should
+check the size of the table (@code{NSIG}) before indexing it, since
+new signal codes may be added to the system before they are added to
+the table. Thus @code{NSIG} might be smaller than value implied by
+the largest signo value defined in @code{<signal.h>}.
-DESCRIPTION
-
- Returns the maximum signo value for which a corresponding symbolic
- name or message is available. Note that in the case where
- we use the sys_siglist supplied by the system, it is possible for
- there to be more symbolic names than messages, or vice versa.
- In fact, the manual page for psignal(3b) explicitly warns that one
- should check the size of the table (NSIG) before indexing it,
- since new signal codes may be added to the system before they are
- added to the table. Thus NSIG might be smaller than value
- implied by the largest signo value defined in <signal.h>.
+We return the maximum value that can be used to obtain a meaningful
+symbolic name or message.
- We return the maximum value that can be used to obtain a meaningful
- symbolic name or message.
+@end deftypefn
*/
@@ -389,31 +385,25 @@ signo_max ()
/*
-NAME
-
- strsignal -- map a signal number to a signal message string
+@deftypefn Supplemental {const char *} strsignal (int @var{signo})
-SYNOPSIS
-
- const char *strsignal (int signo)
-
-DESCRIPTION
+Maps an signal number to an signal message string, the contents of
+which are implementation defined. On systems which have the external
+variable @code{sys_siglist}, these strings will be the same as the
+ones used by @code{psignal()}.
- Maps an signal number to an signal message string, the contents of
- which are implementation defined. On systems which have the external
- variable sys_siglist, these strings will be the same as the ones used
- by psignal().
+If the supplied signal number is within the valid range of indices for
+the @code{sys_siglist}, but no message is available for the particular
+signal number, then returns the string @samp{Signal @var{num}}, where
+@var{num} is the signal number.
- If the supplied signal number is within the valid range of indices
- for the sys_siglist, but no message is available for the particular
- signal number, then returns the string "Signal NUM", where NUM is the
- signal number.
+If the supplied signal number is not a valid index into
+@code{sys_siglist}, returns @code{NULL}.
- If the supplied signal number is not a valid index into sys_siglist,
- returns NULL.
+The returned string is only guaranteed to be valid only until the next
+call to @code{strsignal}.
- The returned string is only guaranteed to be valid only until the
- next call to strsignal.
+@end deftypefn
*/
@@ -459,31 +449,23 @@ strsignal (signo)
/*
-NAME
-
- strsigno -- map an signal number to a symbolic name string
+@deftypefn Extension {const char*} strsigno (int @var{signo})
-SYNOPSIS
+Given an signal number, returns a pointer to a string containing the
+symbolic name of that signal number, as found in @code{<signal.h>}.
- const char *strsigno (int signo)
+If the supplied signal number is within the valid range of indices for
+symbolic names, but no name is available for the particular signal
+number, then returns the string @samp{Signal @var{num}}, where
+@var{num} is the signal number.
-DESCRIPTION
+If the supplied signal number is not within the range of valid
+indices, then returns @code{NULL}.
- Given an signal number, returns a pointer to a string containing
- the symbolic name of that signal number, as found in <signal.h>.
+The contents of the location pointed to are only guaranteed to be
+valid until the next call to @code{strsigno}.
- If the supplied signal number is within the valid range of indices
- for symbolic names, but no name is available for the particular
- signal number, then returns the string "Signal NUM", where NUM is
- the signal number.
-
- If the supplied signal number is not within the range of valid
- indices, then returns NULL.
-
-BUGS
-
- The contents of the location pointed to are only guaranteed to be
- valid until the next call to strsigno.
+@end deftypefn
*/
@@ -522,18 +504,12 @@ strsigno (signo)
/*
-NAME
-
- strtosigno -- map a symbolic signal name to a numeric value
+@deftypefn Extension int strtosigno (const char *@var{name})
-SYNOPSIS
+Given the symbolic name of a signal, map it to a signal number. If no
+translation is found, returns 0.
- int strtosigno (char *name)
-
-DESCRIPTION
-
- Given the symbolic name of a signal, map it to a signal number.
- If no translation is found, returns 0.
+@end deftypefn
*/
@@ -568,19 +544,14 @@ strtosigno (name)
/*
-NAME
+@deftypefn Supplemental void psignal (unsigned @var{signo}, char *@var{message})
- psignal -- print message about signal to stderr
+Print @var{message} to the standard error, followed by a colon,
+followed by the description of the signal specified by @var{signo},
+followed by a newline.
-SYNOPSIS
-
- void psignal (unsigned signo, char *message);
-
-DESCRIPTION
+@end deftypefn
- Print to the standard error the message, followed by a colon,
- followed by the description of the signal specified by signo,
- followed by a newline.
*/
#ifndef HAVE_PSIGNAL
diff --git a/contrib/binutils/libiberty/strstr.c b/contrib/binutils/libiberty/strstr.c
index fab36e3..470e04b 100644
--- a/contrib/binutils/libiberty/strstr.c
+++ b/contrib/binutils/libiberty/strstr.c
@@ -3,24 +3,16 @@
/*
-NAME
+@deftypefn Supplemental char* strstr (const char *@var{string}, const char *@var{sub})
- strstr -- locate first occurance of a substring
+This function searches for the substring @var{sub} in the string
+@var{string}, not including the terminating null characters. A pointer
+to the first occurrence of @var{sub} is returned, or @code{NULL} if the
+substring is absent. If @var{sub} points to a string with zero
+length, the function returns @var{string}.
-SYNOPSIS
+@end deftypefn
- #include <string.h>
-
- char *strstr (char *s1, char *s2)
-
-DESCRIPTION
-
- Locates the first occurance in the string pointed to by S1 of
- the string pointed to by S2. Returns a pointer to the substring
- found, or a NULL pointer if not found. If S2 points to a string
- with zero length, the function returns S1.
-
-BUGS
*/
diff --git a/contrib/binutils/libiberty/strtod.c b/contrib/binutils/libiberty/strtod.c
index 90292c2..6b69ccf 100644
--- a/contrib/binutils/libiberty/strtod.c
+++ b/contrib/binutils/libiberty/strtod.c
@@ -22,6 +22,21 @@ 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. */
+/*
+
+@deftypefn Supplemental double strtod (const char *@var{string}, char **@var{endptr})
+
+This ISO C function converts the initial portion of @var{string} to a
+@code{double}. If @var{endptr} is not @code{NULL}, a pointer to the
+character after the last character used in the conversion is stored in
+the location referenced by @var{endptr}. If no conversion is
+performed, zero is returned and the value of @var{string} is stored in
+the location referenced by @var{endptr}.
+
+@end deftypefn
+
+*/
+
#include "ansidecl.h"
#include "safe-ctype.h"
diff --git a/contrib/binutils/libiberty/strtol.c b/contrib/binutils/libiberty/strtol.c
index 7095c72..d9f54cc 100644
--- a/contrib/binutils/libiberty/strtol.c
+++ b/contrib/binutils/libiberty/strtol.c
@@ -28,6 +28,25 @@
* SUCH DAMAGE.
*/
+/*
+
+@deftypefn Supplemental {long int} strtol (const char *@var{string}, char **@var{endptr}, int @var{base})
+@deftypefnx Supplemental {unsigned long int} strtoul (const char *@var{string}, char **@var{endptr}, int @var{base})
+
+The @code{strtol} function converts the string in @var{string} to a
+long integer value according to the given @var{base}, which must be
+between 2 and 36 inclusive, or be the special value 0. If @var{base}
+is 0, @code{strtol} will look for the prefixes @code{0} and @code{0x}
+to indicate bases 8 and 16, respectively, else default to base 10.
+When the base is 16 (either explicitly or implicitly), a prefix of
+@code{0x} is allowed. The handling of @var{endptr} is as that of
+@code{strtod} above. The @code{strtoul} function is the same, except
+that the converted value is unsigned.
+
+@end deftypefn
+
+*/
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/contrib/binutils/libiberty/ternary.c b/contrib/binutils/libiberty/ternary.c
new file mode 100644
index 0000000..056d2ce
--- /dev/null
+++ b/contrib/binutils/libiberty/ternary.c
@@ -0,0 +1,166 @@
+/* ternary.c - Ternary Search Trees
+ Copyright (C) 2001 Free Software Foundation, Inc.
+
+ Contributed by Daniel Berlin (dan@cgsoftware.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, 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
+
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
+
+#include <stdio.h>
+
+#include "libiberty.h"
+#include "ternary.h"
+
+/* Non-recursive so we don't waste stack space/time on large
+ insertions. */
+
+PTR
+ternary_insert (root, s, data, replace)
+ ternary_tree *root;
+ const char *s;
+ PTR data;
+ int replace;
+{
+ int diff;
+ ternary_tree curr, *pcurr;
+
+ /* Start at the root. */
+ pcurr = root;
+ /* Loop until we find the right position */
+ while ((curr = *pcurr))
+ {
+ /* Calculate the difference */
+ diff = *s - curr->splitchar;
+ /* Handle current char equal to node splitchar */
+ if (diff == 0)
+ {
+ /* Handle the case of a string we already have */
+ if (*s++ == 0)
+ {
+ if (replace)
+ curr->eqkid = (ternary_tree) data;
+ return (PTR) curr->eqkid;
+ }
+ pcurr = &(curr->eqkid);
+ }
+ /* Handle current char less than node splitchar */
+ else if (diff < 0)
+ {
+ pcurr = &(curr->lokid);
+ }
+ /* Handle current char greater than node splitchar */
+ else
+ {
+ pcurr = &(curr->hikid);
+ }
+ }
+ /* It's not a duplicate string, and we should insert what's left of
+ the string, into the tree rooted at curr */
+ for (;;)
+ {
+ /* Allocate the memory for the node, and fill it in */
+ *pcurr = (ternary_tree) xmalloc (sizeof (ternary_node));
+ curr = *pcurr;
+ curr->splitchar = *s;
+ curr->lokid = curr->hikid = curr->eqkid = 0;
+
+ /* Place nodes until we hit the end of the string.
+ When we hit it, place the data in the right place, and
+ return.
+ */
+ if (*s++ == 0)
+ {
+ curr->eqkid = (ternary_tree) data;
+ return data;
+ }
+ pcurr = &(curr->eqkid);
+ }
+}
+
+/* Free the ternary search tree rooted at p. */
+void
+ternary_cleanup (p)
+ ternary_tree p;
+{
+ if (p)
+ {
+ ternary_cleanup (p->lokid);
+ if (p->splitchar)
+ ternary_cleanup (p->eqkid);
+ ternary_cleanup (p->hikid);
+ free (p);
+ }
+}
+
+/* Non-recursive find of a string in the ternary tree */
+PTR
+ternary_search (p, s)
+ const ternary_node *p;
+ const char *s;
+{
+ const ternary_node *curr;
+ int diff, spchar;
+ spchar = *s;
+ curr = p;
+ /* Loop while we haven't hit a NULL node or returned */
+ while (curr)
+ {
+ /* Calculate the difference */
+ diff = spchar - curr->splitchar;
+ /* Handle the equal case */
+ if (diff == 0)
+ {
+ if (spchar == 0)
+ return (PTR) curr->eqkid;
+ spchar = *++s;
+ curr = curr->eqkid;
+ }
+ /* Handle the less than case */
+ else if (diff < 0)
+ curr = curr->lokid;
+ /* All that's left is greater than */
+ else
+ curr = curr->hikid;
+ }
+ return NULL;
+}
+
+/* For those who care, the recursive version of the search. Useful if
+ you want a starting point for pmsearch or nearsearch. */
+static PTR
+ternary_recursivesearch (p, s)
+ const ternary_node *p;
+ const char *s;
+{
+ if (!p)
+ return 0;
+ if (*s < p->splitchar)
+ return ternary_recursivesearch (p->lokid, s);
+ else if (*s > p->splitchar)
+ return ternary_recursivesearch (p->hikid, s);
+ else
+ {
+ if (*s == 0)
+ return (PTR) p->eqkid;
+ return ternary_recursivesearch (p->eqkid, ++s);
+ }
+}
diff --git a/contrib/binutils/libiberty/tmpnam.c b/contrib/binutils/libiberty/tmpnam.c
index 8eb77e2..406878c 100644
--- a/contrib/binutils/libiberty/tmpnam.c
+++ b/contrib/binutils/libiberty/tmpnam.c
@@ -1,3 +1,17 @@
+/*
+
+@deftypefn Supplemental char* tmpnam (char *@var{s})
+
+This function attempts to create a name for a temporary file, which
+will be a valid file name yet not exist when @code{tmpnam} checks for
+it. @var{s} must point to a buffer of at least @code{L_tmpnam} bytes,
+or be @code{NULL}. Use of this function creates a security risk, and it must
+not be used in new projects. Use @code{mkstemp} instead.
+
+@end deftypefn
+
+*/
+
#include <stdio.h>
#ifndef L_tmpnam
diff --git a/contrib/binutils/libiberty/vasprintf.c b/contrib/binutils/libiberty/vasprintf.c
index c34585d..d438225 100644
--- a/contrib/binutils/libiberty/vasprintf.c
+++ b/contrib/binutils/libiberty/vasprintf.c
@@ -28,7 +28,9 @@ Boston, MA 02111-1307, USA. */
#include <varargs.h>
#endif
#include <stdio.h>
+#ifdef HAVE_STRING_H
#include <string.h>
+#endif
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#else
@@ -41,6 +43,21 @@ extern PTR malloc ();
int global_total_width;
#endif
+/*
+
+@deftypefn Extension int vasprintf (char **@var{resptr}, const char *@var{format}, va_list @var{args})
+
+Like @code{vsprintf}, but instead of passing a pointer to a buffer,
+you pass a pointer to a pointer. This function will compute the size
+of the buffer needed, allocate memory with @code{malloc}, and store a
+pointer to the allocated memory in @code{*@var{resptr}}. The value
+returned is the same as @code{vsprintf} would return. If memory could
+not be allocated, zero is returned and @code{NULL} is stored in
+@code{*@var{resptr}}.
+
+@end deftypefn
+
+*/
static int int_vasprintf PARAMS ((char **, const char *, va_list *));
@@ -142,29 +159,22 @@ vasprintf (result, format, args)
}
#ifdef TEST
-static void checkit PARAMS ((const char *, ...));
-
-static void
-checkit VPARAMS ((const char* format, ...))
+static void ATTRIBUTE_PRINTF_1
+checkit VPARAMS ((const char *format, ...))
{
- va_list args;
char *result;
-#ifndef ANSI_PROTOTYPES
- const char *format;
-#endif
-
- VA_START (args, format);
-
-#ifndef ANSI_PROTOTYPES
- format = va_arg (args, const char *);
-#endif
-
+ VA_OPEN (args, format);
+ VA_FIXEDARG (args, const char *, format);
vasprintf (&result, format, args);
+ VA_CLOSE (args);
+
if (strlen (result) < (size_t) global_total_width)
printf ("PASS: ");
else
printf ("FAIL: ");
printf ("%d %s\n", global_total_width, result);
+
+ free (result);
}
extern int main PARAMS ((void));
diff --git a/contrib/binutils/libiberty/vfork.c b/contrib/binutils/libiberty/vfork.c
index 5e877210..4aa5c21 100644
--- a/contrib/binutils/libiberty/vfork.c
+++ b/contrib/binutils/libiberty/vfork.c
@@ -1,6 +1,16 @@
/* Emulate vfork using just plain fork, for systems without a real vfork.
This function is in the public domain. */
+/*
+
+@deftypefn Supplemental int vfork (void)
+
+Emulates @code{vfork} by calling @code{fork} and returning its value.
+
+@end deftypefn
+
+*/
+
#include "ansidecl.h"
extern int fork PARAMS ((void));
diff --git a/contrib/binutils/libiberty/vprintf.c b/contrib/binutils/libiberty/vprintf.c
index 65b425a..c57c3e4 100644
--- a/contrib/binutils/libiberty/vprintf.c
+++ b/contrib/binutils/libiberty/vprintf.c
@@ -1,3 +1,20 @@
+/*
+
+@deftypefn Supplemental int vprintf (const char *@var{format}, va_list @var{ap})
+@deftypefnx Supplemental int vfprintf (FILE *@var{stream}, const char *@var{format}, va_list @var{ap})
+@deftypefnx Supplemental int vsprintf (char *@var{str}, const char *@var{format}, va_list @var{ap})
+
+These functions are the same as @code{printf}, @code{fprintf}, and
+@code{sprintf}, respectively, except that they are called with a
+@code{va_list} instead of a variable number of arguments. Note that
+they do not call @code{va_end}; this is the application's
+responsibility. In @libib{} they are implemented in terms of the
+nonstandard but common function @code{_doprnt}.
+
+@end deftypefn
+
+*/
+
#ifdef __STDC__
#include <stdarg.h>
#else
diff --git a/contrib/binutils/libiberty/vsprintf.c b/contrib/binutils/libiberty/vsprintf.c
index bf0760c..b69e9bc 100644
--- a/contrib/binutils/libiberty/vsprintf.c
+++ b/contrib/binutils/libiberty/vsprintf.c
@@ -3,7 +3,7 @@
implementations of stdio; newer ones should already have vsprintf.
Written by Per Bothner of Cygnus Support.
Based on libg++'s "form" (written by Doug Lea; dl@rocky.oswego.edu).
- Copyright (C) 1991, 1995 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1995, 2002 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
@@ -31,6 +31,8 @@ the executable file might be covered by the GNU General Public License. */
#include <ansidecl.h>
#undef vsprintf
+#if defined _IOSTRG && defined _IOWRT
+
int
vsprintf (buf, format, ap)
char *buf;
@@ -53,3 +55,5 @@ vsprintf (buf, format, ap)
return ret;
}
+
+#endif
diff --git a/contrib/binutils/libiberty/waitpid.c b/contrib/binutils/libiberty/waitpid.c
index 2848309..703b8a6 100644
--- a/contrib/binutils/libiberty/waitpid.c
+++ b/contrib/binutils/libiberty/waitpid.c
@@ -1,3 +1,15 @@
+/*
+
+@deftypefn Supplemental int waitpid (int @var{pid}, int *@var{status}, int)
+
+This is a wrapper around the @code{wait} function. Any ``special''
+values of @var{pid} depend on your implementation of @code{wait}, as
+does the return value. The third argument is unused in @libib{}.
+
+@end deftypefn
+
+*/
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/contrib/binutils/libiberty/xatexit.c b/contrib/binutils/libiberty/xatexit.c
index 31476c2..728254b 100644
--- a/contrib/binutils/libiberty/xatexit.c
+++ b/contrib/binutils/libiberty/xatexit.c
@@ -5,6 +5,20 @@
* %sccs.include.redist.c%
*/
+
+/*
+
+@deftypefun int xatexit (void (*@var{fn}) (void))
+
+Behaves as the standard @code{atexit} function, but with no limit on
+the number of registered functions. Returns 0 on success, or @minus{}1 on
+failure. If you use @code{xatexit} to register functions, you must use
+@code{xexit} to terminate your program.
+
+@end deftypefun
+
+*/
+
/* Adapted from newlib/libc/stdlib/{,at}exit.[ch].
If you use xatexit, you must call xexit instead of exit. */
diff --git a/contrib/binutils/libiberty/xexit.c b/contrib/binutils/libiberty/xexit.c
index e8b1ed1..a65690f 100644
--- a/contrib/binutils/libiberty/xexit.c
+++ b/contrib/binutils/libiberty/xexit.c
@@ -17,6 +17,18 @@ 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. */
+/*
+
+@deftypefn Replacement void xexit (int @var{code})
+
+Terminates the program. If any functions have been registered with
+the @code{xatexit} replacement function, they will be called first.
+Termination is handled via the system's normal @code{exit} call.
+
+@end deftypefn
+
+*/
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/contrib/binutils/libiberty/xmalloc.c b/contrib/binutils/libiberty/xmalloc.c
index 3ea2d4a..bf0cf2d 100644
--- a/contrib/binutils/libiberty/xmalloc.c
+++ b/contrib/binutils/libiberty/xmalloc.c
@@ -17,6 +17,49 @@ 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. */
+/*
+
+@deftypefn Replacement void* xmalloc (size_t)
+
+Allocate memory without fail. If @code{malloc} fails, this will print
+a message to @code{stderr} (using the name set by
+@code{xmalloc_set_program_name},
+if any) and then call @code{xexit}. Note that it is therefore safe for
+a program to contain @code{#define malloc xmalloc} in its source.
+
+@end deftypefn
+
+@deftypefn Replacement void* xrealloc (void *@var{ptr}, size_t @var{size})
+Reallocate memory without fail. This routine functions like @code{realloc},
+but will behave the same as @code{xmalloc} if memory cannot be found.
+
+@end deftypefn
+
+@deftypefn Replacement void* xcalloc (size_t @var{nelem}, size_t @var{elsize})
+
+Allocate memory without fail, and set it to zero. This routine functions
+like @code{calloc}, but will behave the same as @code{xmalloc} if memory
+cannot be found.
+
+@end deftypefn
+
+@deftypefn Replacement void xmalloc_set_program_name (const char *@var{name})
+
+You can use this to set the name of the program used by
+@code{xmalloc_failed} when printing a failure message.
+
+@end deftypefn
+
+@deftypefn Replacement void xmalloc_failed (size_t)
+
+This function is not meant to be called by client code, and is listed
+here for completeness only. If any of the allocation routines fail, this
+function will be called to print an error message and terminate execution.
+
+@end deftypefn
+
+*/
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/contrib/binutils/libiberty/xmemdup.c b/contrib/binutils/libiberty/xmemdup.c
index fdb17a5..9e9d66b 100644
--- a/contrib/binutils/libiberty/xmemdup.c
+++ b/contrib/binutils/libiberty/xmemdup.c
@@ -2,6 +2,19 @@
This trivial function is in the public domain.
Jeff Garzik, September 1999. */
+/*
+
+@deftypefn Replacement void* xmemdup (void *@var{input}, size_t @var{copy_size}, size_t @var{alloc_size})
+
+Duplicates a region of memory without fail. First, @var{alloc_size} bytes
+are allocated, then @var{copy_size} bytes from @var{input} are copied into
+it, and the new memory is returned. If fewer bytes are copied than were
+allocated, the remaining memory is zeroed.
+
+@end deftypefn
+
+*/
+
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
diff --git a/contrib/binutils/libiberty/xstrdup.c b/contrib/binutils/libiberty/xstrdup.c
index 6f846cf..5aa084a 100644
--- a/contrib/binutils/libiberty/xstrdup.c
+++ b/contrib/binutils/libiberty/xstrdup.c
@@ -2,6 +2,17 @@
This trivial function is in the public domain.
Ian Lance Taylor, Cygnus Support, December 1995. */
+/*
+
+@deftypefn Replacement char* xstrdup (const char *@var{s})
+
+Duplicates a character string without fail, using @code{xmalloc} to
+obtain memory.
+
+@end deftypefn
+
+*/
+
#include <sys/types.h>
#ifdef HAVE_CONFIG_H
#include "config.h"
diff --git a/contrib/binutils/libiberty/xstrerror.c b/contrib/binutils/libiberty/xstrerror.c
index 770b653..9000d17 100644
--- a/contrib/binutils/libiberty/xstrerror.c
+++ b/contrib/binutils/libiberty/xstrerror.c
@@ -2,6 +2,17 @@
Fri Jun 16 18:30:00 1995 Pat Rankin <rankin@eql.caltech.edu>
This code is in the public domain. */
+/*
+
+@deftypefn Replacement char* xstrerror (int @var{errnum})
+
+Behaves exactly like the standard @code{strerror} function, but
+will never return a @code{NULL} pointer.
+
+@end deftypefn
+
+*/
+
#include <stdio.h>
#include "libiberty.h"
diff --git a/contrib/binutils/libtool.m4 b/contrib/binutils/libtool.m4
index cb004e2..aa7e62a 100644
--- a/contrib/binutils/libtool.m4
+++ b/contrib/binutils/libtool.m4
@@ -22,8 +22,9 @@
## configuration script generated by Autoconf, you may include it under
## the same distribution terms that you use for the rest of that program.
-# serial 45 AC_PROG_LIBTOOL
-AC_DEFUN(AC_PROG_LIBTOOL,[AC_REQUIRE([_AC_PROG_LIBTOOL])
+# serial 46 AC_PROG_LIBTOOL
+AC_DEFUN([AC_PROG_LIBTOOL],
+[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
AC_PROVIDE_IFELSE([AC_PROG_CXX],
@@ -50,7 +51,7 @@ dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
[define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ
])])])])])])
-AC_DEFUN(_AC_PROG_LIBTOOL,
+AC_DEFUN([_AC_PROG_LIBTOOL],
[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
@@ -84,7 +85,7 @@ AC_SUBST(LIBTOOL)dnl
exec 5>>./config.log
])
-AC_DEFUN(AC_LIBTOOL_SETUP,
+AC_DEFUN([AC_LIBTOOL_SETUP],
[AC_PREREQ(2.13)dnl
AC_REQUIRE([AC_ENABLE_SHARED])dnl
AC_REQUIRE([AC_ENABLE_STATIC])dnl
@@ -103,7 +104,7 @@ AC_REQUIRE([AC_EXEEXT])dnl
dnl
# Only perform the check for file, if the check method requires it
-case "$deplibs_check_method" in
+case $deplibs_check_method in
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
AC_PATH_MAGIC
@@ -119,8 +120,8 @@ libtool_flags="--cache-file=$cache_file"
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
-test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
-test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
+test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
+test "$lt_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],
@@ -138,12 +139,12 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
# Some flags need to be propagated to the compiler or linker for good
# libtool support.
-case "$host" in
+case $host in
*-*-irix6*)
# Find out which ABI we are using.
echo '[#]line __oline__ "configure"' > conftest.$ac_ext
if AC_TRY_EVAL(ac_compile); then
- case "`/usr/bin/file conftest.o`" in
+ case `/usr/bin/file conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -32"
;;
@@ -187,7 +188,7 @@ ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
DllMain (0, 0, 0);],
[lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
- case "$host/$CC" in
+ case $host/$CC in
*-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
# old mingw systems require "-dll" to link a DLL, while more recent ones
# require "-mdll"
@@ -207,23 +208,23 @@ esac
])
# AC_LIBTOOL_DLOPEN - enable checks for dlopen support
-AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
+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_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
# AC_ENABLE_SHARED - implement the --enable-shared flag
# Usage: AC_ENABLE_SHARED[(DEFAULT)]
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
# `yes'.
-AC_DEFUN(AC_ENABLE_SHARED, [dnl
-define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_DEFUN([AC_ENABLE_SHARED],
+[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
AC_ARG_ENABLE(shared,
changequote(<<, >>)dnl
<< --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
changequote([, ])dnl
[p=${PACKAGE-default}
-case "$enableval" in
+case $enableval in
yes) enable_shared=yes ;;
no) enable_shared=no ;;
*)
@@ -242,21 +243,21 @@ enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
])
# AC_DISABLE_SHARED - set the default shared flag to --disable-shared
-AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
AC_ENABLE_SHARED(no)])
# AC_ENABLE_STATIC - implement the --enable-static flag
# Usage: AC_ENABLE_STATIC[(DEFAULT)]
# Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
# `yes'.
-AC_DEFUN(AC_ENABLE_STATIC, [dnl
-define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
+AC_DEFUN([AC_ENABLE_STATIC],
+[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
AC_ARG_ENABLE(static,
changequote(<<, >>)dnl
<< --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
changequote([, ])dnl
[p=${PACKAGE-default}
-case "$enableval" in
+case $enableval in
yes) enable_static=yes ;;
no) enable_static=no ;;
*)
@@ -275,7 +276,8 @@ 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_DEFUN([AC_DISABLE_STATIC],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
AC_ENABLE_STATIC(no)])
@@ -283,14 +285,14 @@ AC_ENABLE_STATIC(no)])
# 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_DEFUN([AC_ENABLE_FAST_INSTALL],
+[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
+case $enableval in
yes) enable_fast_install=yes ;;
no) enable_fast_install=no ;;
*)
@@ -309,22 +311,24 @@ enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
])
# AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
-AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_DEFUN([AC_DISABLE_FAST_INSTALL],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
AC_ENABLE_FAST_INSTALL(no)])
# AC_LIBTOOL_PICMODE - implement the --with-pic flag
# Usage: AC_LIBTOOL_PICMODE[(MODE)]
# Where MODE is either `yes' or `no'. If omitted, it defaults to
# `both'.
-AC_DEFUN(AC_LIBTOOL_PICMODE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
+AC_DEFUN([AC_LIBTOOL_PICMODE],
+[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
pic_mode=ifelse($#,1,$1,default)])
# AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
-AC_DEFUN(AC_PATH_TOOL_PREFIX,
+AC_DEFUN([AC_PATH_TOOL_PREFIX],
[AC_MSG_CHECKING([for $1])
AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
-[case "$MAGIC_CMD" in
+[case $MAGIC_CMD in
/*)
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
;;
@@ -343,7 +347,7 @@ dnl not every word. This closes a longstanding sh security hole.
if test -f $ac_dir/$1; then
lt_cv_path_MAGIC_CMD="$ac_dir/$1"
if test -n "$file_magic_test_file"; then
- case "$deplibs_check_method" in
+ case $deplibs_check_method in
"file_magic "*)
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
@@ -383,7 +387,7 @@ fi
# AC_PATH_MAGIC - find a file program which can recognise a shared library
-AC_DEFUN(AC_PATH_MAGIC,
+AC_DEFUN([AC_PATH_MAGIC],
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
if test -z "$lt_cv_path_MAGIC_CMD"; then
@@ -397,7 +401,7 @@ fi
# AC_PROG_LD - find the path to the GNU or non-GNU linker
-AC_DEFUN(AC_PROG_LD,
+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)
@@ -405,7 +409,7 @@ 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
+if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
AC_MSG_CHECKING([for ld used by GCC])
case $host in
@@ -415,12 +419,10 @@ if test "$ac_cv_prog_gcc" = yes; then
*)
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
esac
- case "$ac_prog" in
+ case $ac_prog in
# Accept absolute paths.
-changequote(,)dnl
- [\\/]* | [A-Za-z]:[\\/]*)
- re_direlt='/[^/][^/]*/\.\./'
-changequote([,])dnl
+ [[\\/]* | [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
@@ -442,17 +444,17 @@ elif test "$with_gnu_ld" = yes; then
else
AC_MSG_CHECKING([for non-GNU ld])
fi
-AC_CACHE_VAL(ac_cv_path_LD,
+AC_CACHE_VAL(lt_cv_path_LD,
[if test -z "$LD"; then
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- ac_cv_path_LD="$ac_dir/$ac_prog"
+ lt_cv_path_LD="$ac_dir/$ac_prog"
# Check to see if the program is GNU ld. I'd rather use --version,
# but apparently some GNU ld's only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
- if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+ if "$lt_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
@@ -461,9 +463,9 @@ AC_CACHE_VAL(ac_cv_path_LD,
done
IFS="$ac_save_ifs"
else
- ac_cv_path_LD="$LD" # Let the user override the test with a path.
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
fi])
-LD="$ac_cv_path_LD"
+LD="$lt_cv_path_LD"
if test -n "$LD"; then
AC_MSG_RESULT($LD)
else
@@ -473,20 +475,20 @@ test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
AC_PROG_LD_GNU
])
-AC_DEFUN(AC_PROG_LD_GNU,
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld,
+AC_DEFUN([AC_PROG_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_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
- ac_cv_prog_gnu_ld=yes
+ lt_cv_prog_gnu_ld=yes
else
- ac_cv_prog_gnu_ld=no
+ lt_cv_prog_gnu_ld=no
fi])
-with_gnu_ld=$ac_cv_prog_gnu_ld
+with_gnu_ld=$lt_cv_prog_gnu_ld
])
# AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
# -- PORTME Some linkers may need a different reload flag.
-AC_DEFUN(AC_PROG_LD_RELOAD_FLAG,
+AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
[AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
[lt_cv_ld_reload_flag='-r'])
reload_flag=$lt_cv_ld_reload_flag
@@ -495,7 +497,7 @@ test -n "$reload_flag" && reload_flag=" $reload_flag"
# AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
# -- PORTME fill in with the dynamic library characteristics
-AC_DEFUN(AC_DEPLIBS_CHECK_METHOD,
+AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
[AC_CACHE_CHECK([how to recognise dependant libraries],
lt_cv_deplibs_check_method,
[lt_cv_file_magic_cmd='$MAGIC_CMD'
@@ -512,8 +514,8 @@ lt_cv_deplibs_check_method='unknown'
# If you have `file' or equivalent on your system and you're not sure
# whether `pass_all' will *always* work, you probably want this one.
-case "$host_os" in
-aix4*)
+case $host_os in
+aix*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -522,9 +524,7 @@ beos*)
;;
bsdi4*)
- changequote(,)dnl
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
- changequote([, ])dnl
+ lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)']
lt_cv_file_magic_cmd='/usr/bin/file -L'
lt_cv_file_magic_test_file=/shlib/libc.so
;;
@@ -534,15 +534,26 @@ cygwin* | mingw* |pw32*)
lt_cv_file_magic_cmd='$OBJDUMP -f'
;;
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ case "$host_os" in
+ rhapsody* | darwin1.[012])
+ lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
+ ;;
+ *) # Darwin 1.3 on
+ lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
+ ;;
+ esac
+ ;;
+
freebsd* )
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- case "$host_cpu" in
+ case $host_cpu in
i*86 )
# Not sure whether the presence of OpenBSD here was a mistake.
# Let's accept both of them until this is cleared up.
- changequote(,)dnl
- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
- changequote([, ])dnl
+ lt_cv_deplibs_check_method=['file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library']
lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
;;
@@ -556,30 +567,27 @@ gnu*)
lt_cv_deplibs_check_method=pass_all
;;
-hpux10.20*)
- # TODO: Does this work for hpux-11 too?
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
+hpux10.20*|hpux11*)
+ lt_cv_deplibs_check_method=['file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library']
lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=/usr/lib/libc.sl
;;
irix5* | irix6*)
- case "$host_os" in
+ case $host_os in
irix5*)
# this will be overridden with pass_all, but let us keep it just in case
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
;;
*)
- case "$LD" in
+ case $LD in
*-32|*"-32 ") libmagic=32-bit;;
*-n32|*"-n32 ") libmagic=N32;;
*-64|*"-64 ") libmagic=64-bit;;
*) libmagic=never-match;;
esac
# this will be overridden with pass_all, but let us keep it just in case
- changequote(,)dnl
- lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
- changequote([, ])dnl
+ lt_cv_deplibs_check_method=["file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"]
;;
esac
lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
@@ -588,29 +596,30 @@ irix5* | irix6*)
# This must be Linux ELF.
linux-gnu*)
- case "$host_cpu" in
- alpha* | i*86 | powerpc* | sparc* | ia64* )
+ case $host_cpu in
+ alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
lt_cv_deplibs_check_method=pass_all ;;
*)
# glibc up to 2.1.1 does not perform some relocations on ARM
- changequote(,)dnl
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
- changequote([, ])dnl
+ lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'] ;;
esac
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
;;
netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then :
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+ [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$']
else
- changequote(,)dnl
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
- changequote([, ])dnl
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ [lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$']
fi
;;
+newsos6)
+ [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
+ ;;
+
osf3* | osf4* | osf5*)
# this will be overridden with pass_all, but let us keep it just in case
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
@@ -627,15 +636,17 @@ solaris*)
lt_cv_file_magic_test_file=/lib/libc.so
;;
+[sysv5uw[78]* | sysv4*uw2*)]
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- case "$host_vendor" in
+ case $host_vendor in
ncr)
lt_cv_deplibs_check_method=pass_all
;;
motorola)
- changequote(,)dnl
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
- changequote([, ])dnl
+ lt_cv_deplibs_check_method=['file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]']
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
;;
esac
@@ -648,12 +659,12 @@ deplibs_check_method=$lt_cv_deplibs_check_method
# AC_PROG_NM - find the path to a BSD-compatible name lister
-AC_DEFUN(AC_PROG_NM,
+AC_DEFUN([AC_PROG_NM],
[AC_MSG_CHECKING([for BSD-compatible nm])
-AC_CACHE_VAL(ac_cv_path_NM,
+AC_CACHE_VAL(lt_cv_path_NM,
[if test -n "$NM"; then
# Let the user override the test.
- ac_cv_path_NM="$NM"
+ lt_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
@@ -665,29 +676,29 @@ else
# nm: unknown option "B" ignored
# Tru64's nm complains that /dev/null is an invalid object file
if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
- ac_cv_path_NM="$tmp_nm -B"
+ lt_cv_path_NM="$tmp_nm -B"
break
elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$tmp_nm -p"
+ lt_cv_path_NM="$tmp_nm -p"
break
else
- ac_cv_path_NM=${ac_cv_path_NM="$tmp_nm"} # keep the first match, but
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
continue # so that we can try to find one that supports BSD flags
fi
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
+ test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
fi])
-NM="$ac_cv_path_NM"
+NM="$lt_cv_path_NM"
AC_MSG_RESULT([$NM])
])
# AC_CHECK_LIBM - check for math library
-AC_DEFUN(AC_CHECK_LIBM,
+AC_DEFUN([AC_CHECK_LIBM],
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
LIBM=
-case "$host" in
+case $host in
*-*-beos* | *-*-cygwin* | *-*-pw32*)
# These system don't have libm
;;
@@ -711,8 +722,9 @@ esac
# '${top_srcdir}/' (note the single quotes!). If your package is not
# flat and you're not using automake, define top_builddir and
# top_srcdir appropriately in the Makefiles.
-AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
- case "$enable_ltdl_convenience" in
+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" ;;
@@ -732,7 +744,8 @@ AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
# not flat and you're not using automake, define top_builddir and
# top_srcdir appropriately 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_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
@@ -760,10 +773,10 @@ ifdef([AC_PROVIDE_IFELSE],
[$2], [$3])])])
# AC_LIBTOOL_CXX - enable support for C++ libraries
-AC_DEFUN(AC_LIBTOOL_CXX,[AC_REQUIRE([_AC_LIBTOOL_CXX])])
-AC_DEFUN(_AC_LIBTOOL_CXX,
-[AC_REQUIRE([AC_PROG_LIBTOOL])
-AC_REQUIRE([AC_PROG_CXX])
+AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_AC_LIBTOOL_CXX])])
+
+AC_DEFUN([_AC_LIBTOOL_CXX],
+[AC_REQUIRE([AC_PROG_CXX])
AC_REQUIRE([AC_PROG_CXXCPP])
LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
lt_save_CC="$CC"
@@ -771,7 +784,7 @@ lt_save_CFLAGS="$CFLAGS"
dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
dnl is set to the C++ compiler.
AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
-MAGIC_CMD="$MAGIC_CMD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
+MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
@@ -789,8 +802,9 @@ exec 5>>./config.log
])
# AC_LIBTOOL_GCJ - enable support for GCJ libraries
-AC_DEFUN(AC_LIBTOOL_GCJ,[AC_REQUIRE([_AC_LIBTOOL_GCJ])])
-AC_DEFUN(_AC_LIBTOOL_GCJ,
+AC_DEFUN([AC_LIBTOOL_GCJ],[AC_REQUIRE([_AC_LIBTOOL_GCJ])])
+
+AC_DEFUN([_AC_LIBTOOL_GCJ],
[AC_REQUIRE([AC_PROG_LIBTOOL])
AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
[AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
@@ -804,7 +818,7 @@ lt_save_CFLAGS="$CFLAGS"
dnl Make sure LTCC is set to the C compiler, i.e. set LTCC before CC
dnl is set to the C++ compiler.
AR="$AR" LTCC="$CC" CC="$GCJ" CFLAGS="$GCJFLAGS" CPPFLAGS="$CPPFLAGS" \
-MAGIC_CMD="$MAGIC_CMD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
+MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
@@ -822,19 +836,19 @@ exec 5>>./config.log
])
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
+AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
+AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
+AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
+AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
+AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
dnl This is just to silence aclocal about the macro not being used
ifelse([AC_DISABLE_FAST_INSTALL])dnl
-AC_DEFUN([LT_AC_PROG_GCJ],[
- AC_CHECK_TOOL(GCJ, gcj, no)
+AC_DEFUN([LT_AC_PROG_GCJ],
+[AC_CHECK_TOOL(GCJ, gcj, no)
test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
AC_SUBST(GCJFLAGS)
])
diff --git a/contrib/binutils/ltcf-c.sh b/contrib/binutils/ltcf-c.sh
index e57abb1..f11a0cf 100644
--- a/contrib/binutils/ltcf-c.sh
+++ b/contrib/binutils/ltcf-c.sh
@@ -2,7 +2,7 @@
# ltcf-c.sh - Create a C compiler specific configuration
#
-# Copyright (C) 1996-2000 Free Software Foundation, Inc.
+# Copyright (C) 1996-2000, 2001 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
@@ -38,7 +38,7 @@ lt_simple_compile_test_code="int some_variable = 0;"
lt_simple_link_test_code='main(){return(0);}'
## Linker Characteristics
-case "$host_os" in
+case $host_os in
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
@@ -56,11 +56,12 @@ if test "$with_gnu_ld" = yes; then
wlarc='${wl}'
# See if GNU ld supports shared libraries.
- case "$host_os" in
- aix3* | aix4*)
- # On AIX, the GNU linker is very broken
- ld_shlibs=no
- cat <<EOF 1>&2
+ case $host_os in
+ aix3* | aix4* | aix5*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ ld_shlibs=no
+ 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.
@@ -69,6 +70,7 @@ if test "$with_gnu_ld" = yes; then
*** so that a non-GNU linker is found, and then restart.
EOF
+ fi
;;
amigaos*)
@@ -108,7 +110,7 @@ EOF
test -f $output_objdir/impgen.exe || (cd $output_objdir && \
if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
else $CC -o impgen impgen.c ; fi)~
- $output_objdir/impgen $dir/$soname > $output_objdir/$soname-def'
+ $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
@@ -117,7 +119,7 @@ EOF
# FIXME: what about values for MSVC?
dll_entry=__cygwin_dll_entry@12
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
- case "$host_os" in
+ case $host_os in
mingw*)
# mingw values
dll_entry=_DllMainCRTStartup@12
@@ -148,23 +150,39 @@ EOF
$DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is.
# If DATA tags from a recent dlltool are present, honour them!
- archive_expsym_cmds='echo EXPORTS > $output_objdir/$soname-def~
- _lt_hint=1;
- cat $export_symbols | while read symbol; do
- set dummy \$symbol;
- case \$# in
- 2) echo " \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
- *) echo " \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
- esac;
- _lt_hint=`expr 1 + \$_lt_hint`;
- done~
+ archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname-def;
+ else
+ echo EXPORTS > $output_objdir/$soname-def;
+ _lt_hint=1;
+ cat $export_symbols | while read symbol; do
+ set dummy \$symbol;
+ case \[$]# in
+ 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
+ *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
+ esac;
+ _lt_hint=`expr 1 + \$_lt_hint`;
+ done;
+ fi~
'"$ltdll_cmds"'
- $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags~
- $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
- $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags~
+ $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
$DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
- $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags'
+ $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
+ $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
+ ;;
+
+ darwin* | rhapsody*)
+ allow_undefined_flag='-undefined suppress'
+ archive_cmds='$CC `test .$module = .yes && echo -bundle || echo -dynamiclib` $allow_undefined_flag -o $lib $libobjs $deplibs $linkopts -install_name $rpath/$soname `test -n "$verstring" -a x$verstring != x0.0 && echo $verstring`'
+ # We need to add '_' to the symbols in $export_symbols first
+ #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ whole_archive_flag_spec='-all_load $convenience'
;;
netbsd*)
@@ -172,8 +190,8 @@ EOF
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
else
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
fi
;;
@@ -236,7 +254,7 @@ EOF
fi
else
# PORTME fill in a description of your system's linker (not GNU ld)
- case "$host_os" in
+ case $host_os in
aix3*)
allow_undefined_flag=unsupported
always_export_symbols=yes
@@ -251,39 +269,95 @@ else
fi
;;
- aix4*)
- hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib'
+ aix4* | aix5*)
+ hardcode_direct=yes
hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
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
+ case $host_os in aix4.[012]|aix4.[012].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ 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
+ esac
+ shared_flag='-shared'
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ shared_flag='${wl}-G'
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=
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ if test $with_gnu_ld = no; then
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
fi
- shared_flag='-shared'
else
- shared_flag='${wl}-bM:SRE'
- hardcode_direct=yes
+ # Test if we are trying to use run time linking, or normal AIX style linking.
+ # If -brtl is somewhere in LDFLAGS, we need to do run time linking.
+ aix_use_runtimelinking=no
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
fi
- allow_undefined_flag=' ${wl}-berok'
- archive_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}'
- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${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
- ;;
+ # -bexpall does not export symbols beginning with underscore (_)
+ always_export_symbols=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other run time loading flags (-brtl), -berok will
+ # link without error, but may produce a broken library.
+ allow_undefined_flag=' ${wl}-berok'
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+ else
+ if test "$host_cpu" = ia64; then
+ if test $with_gnu_ld = no; then
+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+ allow_undefined_flag="-z nodefs"
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+ fi
+ else
+ allow_undefined_flag=' ${wl}-berok'
+ # -bexpall does not export symbols beginning with underscore (_)
+ always_export_symbols=yes
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec=' '
+ build_libtool_need_lc=yes
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
+ # This is similar to how AIX traditionally builds it's shared libraries.
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
amigaos*)
archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
@@ -308,7 +382,7 @@ else
old_archive_from_new_cmds='true'
# FIXME: Should let the user specify the lib program.
old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
- fix_srcfile_path='`cygpath -w $srcfile`'
+ fix_srcfile_path='`cygpath -w "$srcfile"`'
;;
freebsd1*)
@@ -343,10 +417,17 @@ else
;;
hpux9* | hpux10* | hpux11*)
- case "$host_os" in
- hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
- *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
- esac
+ if test $with_gcc = yes; then
+ case "$host_os" in
+ hpux9*) archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
+ *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;;
+ esac
+ else
+ case $host_os in
+ hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
+ *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
+ esac
+ fi
hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
hardcode_libdir_separator=:
hardcode_direct=yes
@@ -372,8 +453,16 @@ else
else
archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
fi
- hardcode_libdir_flag_spec='${wl}-R$libdir'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ newsos6)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
hardcode_direct=yes
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
hardcode_shlibpath_var=no
;;
@@ -408,11 +497,16 @@ else
if test "$with_gcc" = yes; then
allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
else
allow_undefined_flag=' -expect_unresolved \*'
archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+ archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
+
+ # cc supports -rpath directly
+ hardcode_libdir_flag_spec='-rpath $libdir'
fi
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
@@ -424,15 +518,19 @@ else
;;
solaris*)
- 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 $linker_flags'
- 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 $linker_flags~$rm $lib.exp'
+ no_undefined_flag=' -z defs'
+ if test "$with_gcc" = yes; then
+ archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+ else
+ archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ 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 $linker_flags~$rm $lib.exp'
+ fi
hardcode_libdir_flag_spec='-R$libdir'
hardcode_shlibpath_var=no
- case "$host_os" in
+ case $host_os in
solaris2.[0-5] | solaris2.[0-5].*) ;;
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
@@ -504,8 +602,13 @@ else
runpath_var=LD_RUN_PATH
;;
- unixware7*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ sysv5uw7* | unixware7*)
+ no_undefined_flag='${wl}-z ${wl}text'
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
runpath_var='LD_RUN_PATH'
hardcode_shlibpath_var=no
;;
@@ -531,29 +634,38 @@ else
ac_cv_prog_cc_wl='-Wl,'
ac_cv_prog_cc_static='-static'
- case "$host_os" in
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_cv_prog_cc_static='-Bstatic'
+ else
+ lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+ amigaos*)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
+ ;;
beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
- 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.
- ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC"
- ;;
cygwin* | mingw* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
ac_cv_prog_cc_pic='-DDLL_EXPORT'
;;
- amigaos*)
- # FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
- ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_cv_prog_cc_pic='-fno-common'
+ ;;
+ *djgpp*)
+ # DJGPP does not support shared libraries at all
+ ac_cv_prog_cc_pic=
;;
sysv4*MP*)
if test -d /usr/nec; then
@@ -566,10 +678,10 @@ else
esac
else
# PORTME Check for PIC flags for the system compiler.
- case "$host_os" in
- aix3* | aix4*)
+ case $host_os in
+ aix*)
# All AIX code is PIC.
- ac_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
+ ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC"
;;
hpux9* | hpux10* | hpux11*)
@@ -591,6 +703,11 @@ else
ac_cv_prog_cc_pic='-DDLL_EXPORT'
;;
+ newsos6)
+ ac_cv_prog_cc_pic='-KPIC'
+ ac_cv_prog_cc_static='-Bstatic'
+ ;;
+
osf3* | osf4* | osf5*)
# All OSF/1 code is PIC.
ac_cv_prog_cc_wl='-Wl,'
@@ -638,12 +755,21 @@ else
;;
esac
fi
- ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic -DPIC"
+ case "$host_os" in
+ # Platforms which do not suport PIC and -DPIC is meaningless
+ # on them:
+ *djgpp*)
+ ac_cv_prog_cc_pic=
+ ;;
+ *)
+ ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic -DPIC"
+ ;;
+ esac
fi
need_lc=yes
if test "$enable_shared" = yes && test "$with_gcc" = yes; then
- case "$archive_cmds" in
+ case $archive_cmds in
*'~'*)
# FIXME: we may have to deal with multi-command sequences.
;;
@@ -663,7 +789,7 @@ if test "$enable_shared" = yes && test "$with_gcc" = yes; then
cat conftest.err 1>&5
soname=conftest
lib=conftest
- libobjs=conftest.o
+ libobjs=conftest.$objext
deplibs=
wl=$ac_cv_prog_cc_wl
compiler_flags=-v
diff --git a/contrib/binutils/ltcf-cxx.sh b/contrib/binutils/ltcf-cxx.sh
index cefa008..22875d0 100644
--- a/contrib/binutils/ltcf-cxx.sh
+++ b/contrib/binutils/ltcf-cxx.sh
@@ -2,7 +2,7 @@
# ltcf-cxx.sh - Create a C++ compiler specific configuration
#
-# Copyright (C) 1996-1999,2000 Free Software Foundation, Inc.
+# Copyright (C) 1996-1999, 2000, 2001 Free Software Foundation, Inc.
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
# Original C++ support by:Gary V. Vaughan <gvv@techie.com>
@@ -106,7 +106,7 @@ if { ac_try='${CC-c++} -E conftest.$ac_ext'; { (eval echo \"$ac_try\") 1>&5; (ev
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmds='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
else
with_gcc=no
@@ -114,44 +114,114 @@ else
wlarc=
fi
-# In general, the C++ compiler should always link C++ objects.
-case $target in
-*aix3* | *aix4*)
- # AIX just has to be different, doesn't it? :-\
- LD=makeC++SharedLib_r
- LDFLAGS="$LDFLAGS -p 0"
- ;;
-*)
- LD="$CC"
- LDFLAGS="$LDFLAGS"
- ;;
-esac
-
-
# PORTME: fill in a description of your system's C++ link characteristics
-case "$host_os" in
+case $host_os in
aix3*)
# FIXME: insert proper C++ library support
ld_shlibs=no
;;
- aix4*)
- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
- # -bexpall does not export symbols beginning with underscore (_)
+ aix4* | aix5*)
+ archive_cmds=''
+ hardcode_direct=yes
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+ if test "$with_gcc" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ 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
+ esac
+ shared_flag='-shared'
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ if test $with_gnu_ld = no; then
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ fi
+ else
+ # Test if we are trying to use run time linking, or normal AIX style linking.
+ # If -brtl is somewhere in LDFLAGS, we need to do run time linking.
+ aix_use_runtimelinking=no
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to export.
always_export_symbols=yes
- # Exported symbols can be pulled into shared objects from archives
- whole_archive_flag_spec=' '
- build_libtool_need_lc=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
+ allow_undefined_flag=' -Wl,-G'
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}-brtl \${wl}$exp_sym_flag:\$export_symbols"
+ else
+ if test "$host_cpu" = ia64; then
+ if test $with_gnu_ld = no; then
+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+ allow_undefined_flag="-z nodefs"
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+ fi
+ else
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
+ # Warning - without using the other run time loading flags, -berok will
+ # link without error, but may produce a broken library.
+ no_undefined_flag=' ${wl}-bnoerok'
+ allow_undefined_flag=' ${wl}-berok'
+ # -bexpall does not export symbols beginning with underscore (_)
+ always_export_symbols=yes
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec=' '
+ build_libtool_need_lc=yes
+ # This is similar to how AIX traditionally builds it's shared libraries.
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
;;
chorus*)
- case "$cc_basename" in
+ case $cc_basename in
*)
# FIXME: insert proper C++ library support
ld_shlibs=no
;;
- esac
+ esac
;;
dgux*)
- case "$cc_basename" in
+ case $cc_basename in
ec++)
# FIXME: insert proper C++ library support
ld_shlibs=no
@@ -167,29 +237,37 @@ case "$host_os" in
;;
esac
;;
- freebsd*)
- # FreeBSD uses GNU C++ and GNU ld
- # FIXME: insert proper C++ library support
+ freebsd[12]*)
+ # C++ shared libraries reported to be fairly broken before switch to ELF
ld_shlibs=no
;;
+ freebsd*)
+ # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+ # conventions
+ ld_shlibs=yes
+ ;;
+ gnu*)
+ ;;
hpux*)
- case "$cc_basename" in
+ if test $with_gnu_ld = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ export_dynamic_flag_spec='${wl}-E'
+ fi
+ hardcode_direct=yes
+ hardcode_minus_L=yes # Not in the search PATH, but as the default
+ # location of the library.
+
+ case $cc_basename in
CC)
# FIXME: insert proper C++ library support
ld_shlibs=no
;;
aCC)
- case "$host_os" in
+ case $host_os in
hpux9*) archive_cmds='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;;
esac
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator=:
- hardcode_direct=yes
- hardcode_minus_L=yes # Not in the search PATH, but as the default
- # location of the library.
- export_dynamic_flag_spec='${wl}-E'
-
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
@@ -198,16 +276,25 @@ case "$host_os" in
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmds='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
;;
*)
- # FIXME: insert proper C++ library support
- ld_shlibs=no
+ if test $with_gcc = yes; then
+ if test $with_gnu_ld = no; then
+ case "$host_os" in
+ hpux9*) archive_cmds='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
+ *) archive_cmds='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;;
+ esac
+ fi
+ else
+ # FIXME: insert proper C++ library support
+ ld_shlibs=no
+ fi
;;
esac
;;
irix5* | irix6*)
- case "$cc_basename" in
+ case $cc_basename in
CC)
# SGI C++
archive_cmds='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
@@ -221,9 +308,9 @@ case "$host_os" in
*)
if test "$with_gcc" = yes; then
if test "$with_gnu_ld" = no; then
- archive_cmds='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+ archive_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${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 $predep_objects $libobjs $deplibs $postdep_objects $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
+ archive_cmds='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -o $lib'
fi
fi
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
@@ -233,7 +320,7 @@ case "$host_os" in
esac
;;
linux*)
- case "$cc_basename" in
+ case $cc_basename in
KCC)
# Kuck and Associates, Inc. (KAI) C++ Compiler
@@ -251,7 +338,7 @@ case "$host_os" in
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmds='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | egrep "ld"`; rm -f libconftest.so; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest.so 2>&1 | egrep "ld"`; rm -f libconftest.so; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
hardcode_libdir_flag_spec='${wl}--rpath,$libdir'
export_dynamic_flag_spec='${wl}--export-dynamic'
@@ -277,7 +364,7 @@ case "$host_os" in
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmds='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
;;
esac
;;
@@ -290,7 +377,7 @@ case "$host_os" in
ld_shlibs=no
;;
mvs*)
- case "$cc_basename" in
+ case $cc_basename in
cxx)
# FIXME: insert proper C++ library support
ld_shlibs=no
@@ -299,26 +386,13 @@ case "$host_os" in
# FIXME: insert proper C++ library support
ld_shlibs=no
;;
- esac
+ esac
;;
netbsd*)
# NetBSD uses g++ - do we need to do anything?
;;
osf3*)
- if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then
- allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
-
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmds='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
- fi
-
- case "$cc_basename" in
+ case $cc_basename in
KCC)
# Kuck and Associates, Inc. (KAI) C++ Compiler
@@ -355,29 +429,29 @@ case "$host_os" in
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmds='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
;;
*)
- # FIXME: insert proper C++ library support
- ld_shlibs=no
+ if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
+ else
+ # FIXME: insert proper C++ library support
+ ld_shlibs=no
+ fi
;;
esac
;;
osf4* | osf5*)
- if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then
- allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
-
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmds='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
- fi
-
- case "$cc_basename" in
+ case $cc_basename in
KCC)
# Kuck and Associates, Inc. (KAI) C++ Compiler
@@ -399,10 +473,14 @@ case "$host_os" in
ld_shlibs=no
;;
cxx)
- allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
-
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+ archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done~
+ echo "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
+ $rm $lib.exp'
+
+ hardcode_libdir_flag_spec='-rpath $libdir'
hardcode_libdir_separator=:
# Commands to make compiler produce verbose output that lists
@@ -413,11 +491,24 @@ case "$host_os" in
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmds='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | sed "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
;;
*)
- # FIXME: insert proper C++ library support
- ld_shlibs=no
+ if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep "\-L"'
+ else
+ # FIXME: insert proper C++ library support
+ ld_shlibs=no
+ fi
;;
esac
;;
@@ -426,7 +517,7 @@ case "$host_os" in
ld_shlibs=no
;;
sco*)
- case "$cc_basename" in
+ case $cc_basename in
CC)
# FIXME: insert proper C++ library support
ld_shlibs=no
@@ -438,7 +529,7 @@ case "$host_os" in
esac
;;
sunos4*)
- case "$cc_basename" in
+ case $cc_basename in
CC)
# Sun C++ 4.x
# FIXME: insert proper C++ library support
@@ -456,17 +547,17 @@ case "$host_os" in
esac
;;
solaris*)
- case "$cc_basename" in
+ case $cc_basename in
CC)
# Sun C++ 4.2, 5.x and Centerline C++
- no_undefined_flag=' -ztext'
+ no_undefined_flag=' -zdefs'
archive_cmds='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
$CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
hardcode_libdir_flag_spec='-R$libdir'
hardcode_shlibpath_var=no
- case "$host_os" in
+ case $host_os in
solaris2.[0-5] | solaris2.[0-5].*) ;;
*)
# The C++ compiler is used as linker so we must use $wl
@@ -486,7 +577,7 @@ case "$host_os" in
# explicitly linking system object files so we need to strip them
# from the output so that they don't get included in the library
# dependencies.
- output_verbose_link_cmds='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep "\-R|\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep "\-R|\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
# Archives containing C++ object files must be created using
# "CC -xar", where "CC" is the Sun C++ compiler. This is
@@ -504,35 +595,36 @@ case "$host_os" in
*)
# GNU C++ compiler with Solaris linker
if test "$with_gcc" = yes && test "$with_gnu_ld" = no; then
+ no_undefined_flag=' ${wl}-z ${wl}defs'
if $CC --version | egrep -v '^2\.7' > /dev/null; then
- archive_cmds='$LD -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
+ archive_cmds='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
- $LD -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
+ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmds="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
+ output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
else
# g++ 2.7 appears to require `-G' NOT `-shared' on this
# platform.
- archive_cmds='$LD -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
+ archive_cmds='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
- $LD -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
+ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
# Commands to make compiler produce verbose output that lists
# what "hidden" libraries, object files and flags are used when
# linking a shared library.
- output_verbose_link_cmds="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
+ output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
fi
hardcode_libdir_flag_spec='${wl}-R $wl$libdir'
fi
;;
- esac
+ esac
;;
tandem*)
- case "$cc_basename" in
+ case $cc_basename in
NCC)
# NonStop-UX NCC 3.20
# FIXME: insert proper C++ library support
@@ -542,7 +634,7 @@ case "$host_os" in
# FIXME: insert proper C++ library support
ld_shlibs=no
;;
- esac
+ esac
;;
unixware*)
# FIXME: insert proper C++ library support
@@ -570,37 +662,45 @@ ac_cv_prog_cc_static=
ac_cv_prog_cc_no_builtin=
ac_cv_prog_cc_can_build_shared=$can_build_shared
-# It is not enough to reset these cached values, they must be unset.
-unset ac_cv_prog_cc_pic_works
-unset ac_cv_prog_cc_static_works
+ac_cv_prog_cc_pic_works=
+ac_cv_prog_cc_static_works=
if test "$with_gcc" = yes; then
ac_cv_prog_cc_wl='-Wl,'
ac_cv_prog_cc_static='-static'
- case "$host_os" in
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_cv_prog_cc_static='-Bstatic'
+ else
+ lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+ amigaos*)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
+ ;;
beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
- 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.
- ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC"
- ;;
cygwin* | mingw* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
ac_cv_prog_cc_pic='-DDLL_EXPORT'
;;
- amigaos*)
- # FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
- ac_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_cv_prog_cc_pic='-fno-common'
+ ;;
+ *djgpp*)
+ # DJGPP does not support shared libraries at all
+ ac_cv_prog_cc_pic=
;;
sysv4*MP*)
if test -d /usr/nec; then
@@ -612,20 +712,26 @@ if test "$with_gcc" = yes; then
;;
esac
else
- case "$host_os" in
- aix4*)
+ case $host_os in
+ aix4* | aix5*)
# All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_cv_prog_cc_static='-Bstatic'
+ else
+ lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
+ fi
;;
chorus*)
- case "$cc_basename" in
+ case $cc_basename in
cxch68)
# Green Hills C++ Compiler
# ac_cv_prog_cc_static="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
;;
- esac
+ esac
;;
dgux*)
- case "$cc_basename" in
+ case $cc_basename in
ec++)
ac_cv_prog_cc_pic='-KPIC'
;;
@@ -640,8 +746,10 @@ else
freebsd*)
# FreeBSD uses GNU C++
;;
+ gnu*)
+ ;;
hpux9* | hpux10* | hpux11*)
- case "$cc_basename" in
+ case $cc_basename in
CC)
ac_cv_prog_cc_wl='-Wl,'
ac_cv_prog_cc_static="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
@@ -657,7 +765,7 @@ else
esac
;;
irix5* | irix6*)
- case "$cc_basename" in
+ case $cc_basename in
CC)
ac_cv_prog_cc_wl='-Wl,'
ac_cv_prog_cc_static='-non_shared'
@@ -668,7 +776,7 @@ else
esac
;;
linux*)
- case "$cc_basename" in
+ case $cc_basename in
KCC)
# KAI C++ Compiler
ac_cv_prog_cc_wl='--backend -Wl,'
@@ -690,18 +798,18 @@ else
m88k*)
;;
mvs*)
- case "$cc_basename" in
+ case $cc_basename in
cxx)
ac_cv_prog_cc_pic='-W c,exportall'
;;
*)
;;
- esac
+ esac
;;
netbsd*)
;;
osf3* | osf4* | osf5*)
- case "$cc_basename" in
+ case $cc_basename in
KCC)
ac_cv_prog_cc_wl='--backend -Wl,'
;;
@@ -724,7 +832,7 @@ else
psos*)
;;
sco*)
- case "$cc_basename" in
+ case $cc_basename in
CC)
ac_cv_prog_cc_pic='-fPIC'
;;
@@ -733,7 +841,7 @@ else
esac
;;
solaris*)
- case "$cc_basename" in
+ case $cc_basename in
CC)
# Sun C++ 4.2, 5.x and Centerline C++
ac_cv_prog_cc_pic='-KPIC'
@@ -746,10 +854,10 @@ else
;;
*)
;;
- esac
+ esac
;;
sunos4*)
- case "$cc_basename" in
+ case $cc_basename in
CC)
# Sun C++ 4.x
ac_cv_prog_cc_pic='-pic'
@@ -764,14 +872,14 @@ else
esac
;;
tandem*)
- case "$cc_basename" in
+ case $cc_basename in
NCC)
# NonStop-UX NCC 3.20
ac_cv_prog_cc_pic='-KPIC'
;;
*)
;;
- esac
+ esac
;;
unixware*)
;;
@@ -782,7 +890,17 @@ else
;;
esac
fi
-ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic -DPIC"
+
+case "$host_os" in
+ # Platforms which do not suport PIC and -DPIC is meaningless
+ # on them:
+ *djgpp*)
+ ac_cv_prog_cc_pic=
+ ;;
+ *)
+ ac_cv_prog_cc_pic="$ac_cv_prog_cc_pic -DPIC"
+ ;;
+esac
# Figure out "hidden" C++ library dependencies from verbose
@@ -798,7 +916,7 @@ private:
EOF
-if eval $ac_compile 2>&5; then
+if (eval $ac_compile) 2>&5; then
# Parse the compiler output and extract the necessary
# objects, libraries and library flags.
@@ -806,7 +924,7 @@ if eval $ac_compile 2>&5; then
# the conftest object file.
pre_test_object_deps_done=no
- for p in `eval $output_verbose_link_cmds`; do
+ for p in `eval $output_verbose_link_cmd`; do
case $p in
diff --git a/contrib/binutils/ltcf-gcj.sh b/contrib/binutils/ltcf-gcj.sh
index f82163d..7be8712 100644
--- a/contrib/binutils/ltcf-gcj.sh
+++ b/contrib/binutils/ltcf-gcj.sh
@@ -41,7 +41,7 @@ lt_simple_compile_test_code="class foo {}"
lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }'
## Linker Characteristics
-case "$host_os" in
+case $host_os in
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
@@ -59,11 +59,12 @@ if test "$with_gnu_ld" = yes; then
wlarc='${wl}'
# See if GNU ld supports shared libraries.
- case "$host_os" in
- aix3* | aix4*)
- # On AIX, the GNU linker is very broken
- ld_shlibs=no
- cat <<EOF 1>&2
+ case $host_os in
+ aix3* | aix4* | aix5*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ ld_shlibs=no
+ 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.
@@ -72,6 +73,7 @@ if test "$with_gnu_ld" = yes; then
*** so that a non-GNU linker is found, and then restart.
EOF
+ fi
;;
amigaos*)
@@ -111,7 +113,7 @@ EOF
test -f $output_objdir/impgen.exe || (cd $output_objdir && \
if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
else $CC -o impgen impgen.c ; fi)~
- $output_objdir/impgen $dir/$soname > $output_objdir/$soname-def'
+ $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
@@ -120,7 +122,7 @@ EOF
# FIXME: what about values for MSVC?
dll_entry=__cygwin_dll_entry@12
dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
- case "$host_os" in
+ case $host_os in
mingw*)
# mingw values
dll_entry=_DllMainCRTStartup@12
@@ -151,23 +153,29 @@ EOF
$DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is.
# If DATA tags from a recent dlltool are present, honour them!
- archive_expsym_cmds='echo EXPORTS > $output_objdir/$soname-def~
- _lt_hint=1;
- cat $export_symbols | while read symbol; do
- set dummy \$symbol;
- case \$# in
- 2) echo " \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
- *) echo " \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
- esac;
- _lt_hint=`expr 1 + \$_lt_hint`;
- done~
+ archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname-def;
+ else
+ echo EXPORTS > $output_objdir/$soname-def;
+ _lt_hint=1;
+ cat $export_symbols | while read symbol; do
+ set dummy \$symbol;
+ case \[$]# in
+ 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
+ *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
+ esac;
+ _lt_hint=`expr 1 + \$_lt_hint`;
+ done;
+ fi~
'"$ltdll_cmds"'
- $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_gcj_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags~
- $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
- $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_gcj_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags~
+ $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
$DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
- $CC $output_objdir/$soname-exp '$lt_cv_gcj_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags'
+ $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
+ $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
+ $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
;;
netbsd*)
@@ -175,8 +183,8 @@ EOF
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
else
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
fi
;;
@@ -239,7 +247,7 @@ EOF
fi
else
# PORTME fill in a description of your system's linker (not GNU ld)
- case "$host_os" in
+ case $host_os in
aix3*)
allow_undefined_flag=unsupported
always_export_symbols=yes
@@ -254,39 +262,95 @@ else
fi
;;
- aix4*)
- hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib'
+ aix4* | aix5*)
+ hardcode_direct=yes
hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
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
+ case $host_os in aix4.[012]|aix4.[012].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ 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
+ esac
+ shared_flag='-shared'
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ shared_flag='${wl}-G'
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=
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ if test $with_gnu_ld = no; then
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
fi
- shared_flag='-shared'
else
- shared_flag='${wl}-bM:SRE'
- hardcode_direct=yes
+ # Test if we are trying to use run time linking, or normal AIX style linking.
+ # If -brtl is somewhere in LDFLAGS, we need to do run time linking.
+ aix_use_runtimelinking=no
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl" ); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
fi
- allow_undefined_flag=' ${wl}-berok'
- archive_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}'
- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${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
- ;;
+ # -bexpall does not export symbols beginning with underscore (_)
+ always_export_symbols=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other run time loading flags (-brtl), -berok will
+ # link without error, but may produce a broken library.
+ allow_undefined_flag=' ${wl}-berok'
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+ else
+ if test "$host_cpu" = ia64; then
+ if test $with_gnu_ld = no; then
+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+ allow_undefined_flag="-z nodefs"
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+ fi
+ else
+ allow_undefined_flag=' ${wl}-berok'
+ # -bexpall does not export symbols beginning with underscore (_)
+ always_export_symbols=yes
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec=' '
+ build_libtool_need_lc=yes
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
+ # This is similar to how AIX traditionally builds it's shared libraries.
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
amigaos*)
archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
@@ -311,7 +375,7 @@ else
old_archive_from_new_cmds='true'
# FIXME: Should let the user specify the lib program.
old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
- fix_srcfile_path='`cygpath -w $srcfile`'
+ fix_srcfile_path='`cygpath -w "$srcfile"`'
;;
freebsd1*)
@@ -346,7 +410,7 @@ else
;;
hpux9* | hpux10* | hpux11*)
- case "$host_os" in
+ case $host_os in
hpux9*) archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' ;;
*) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
esac
@@ -373,7 +437,7 @@ else
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
else
- archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ archive_cmds='$LD -shared -nodefaultlibs -o $lib $libobjs $deplibs $linker_flags' # ELF
fi
hardcode_libdir_flag_spec='${wl}-R$libdir'
hardcode_direct=yes
@@ -427,18 +491,22 @@ else
;;
solaris*)
- 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 $linker_flags'
+ no_undefined_flag=' ${wl}-z ${wl}defs'
+ archive_cmds='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $linker_flags ${wl}-h $wl$soname -o $lib'
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 $linker_flags~$rm $lib.exp'
- hardcode_libdir_flag_spec='-R$libdir'
+ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags~$rm $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmds="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | egrep \"\-L\""
+
+ hardcode_libdir_flag_spec='${wl}-R $wl$libdir'
hardcode_shlibpath_var=no
- case "$host_os" in
+ case $host_os in
solaris2.[0-5] | solaris2.[0-5].*) ;;
*) # Supported since Solaris 2.6 (maybe 2.5.1?)
- whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
+ whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;;
esac
link_all_deplibs=yes
;;
@@ -507,8 +575,13 @@ else
runpath_var=LD_RUN_PATH
;;
- unixware7*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ sysv5uw7* | unixware7*)
+ no_undefined_flag='${wl}-z ${wl}text'
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
runpath_var='LD_RUN_PATH'
hardcode_shlibpath_var=no
;;
@@ -533,7 +606,7 @@ fi
ac_cv_prog_cc_wl='-Wl,'
ac_cv_prog_cc_static='-static'
- case "$host_os" in
+ case $host_os in
beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
@@ -546,6 +619,10 @@ fi
# we not sure about C++ programs.
ac_cv_prog_cc_static="$ac_cv_prog_cc_static ${ac_cv_prog_cc_wl}-lC"
;;
+ *djgpp*)
+ # DJGPP does not suppot shared libraries at all
+ ac_cv_prog_cc_pic=
+ ;;
cygwin* | mingw* | os2*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
@@ -569,3 +646,6 @@ fi
# GCJ did not exist at the time GCC didn't implicitly link libc in.
need_lc=no
+
+# All existing releases of GCJ support `-c -o'.
+lt_cv_compiler_c_o=yes
diff --git a/contrib/binutils/ltconfig b/contrib/binutils/ltconfig
index fb0bf8b..746e15b 100755
--- a/contrib/binutils/ltconfig
+++ b/contrib/binutils/ltconfig
@@ -1,7 +1,8 @@
#! /bin/sh
# ltconfig - Create a system-specific libtool.
-# Copyright (C) 1996-2000 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+# 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
@@ -180,8 +181,8 @@ progname=`$echo "X$0" | $Xsed -e 's%^.*/%%'`
# Constants:
PROGRAM=ltconfig
PACKAGE=libtool
-VERSION=1.4a
-TIMESTAMP=" (1.641.2.122 2000/09/30 05:27:52)"
+VERSION=1.4a-GCC3.0
+TIMESTAMP=" (1.641.2.256 2001/05/28 20:09:07 with GCC-local changes)"
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"
@@ -216,6 +217,7 @@ need_locks=yes
ac_ext=c
libext=a
cache_file=
+max_cmd_len=
## Dependencies to place before and after the object being linked:
predep_objects=
@@ -294,7 +296,7 @@ args=
prev=
for option
do
- case "$option" in
+ case $option in
-*=*) optarg=`echo "$option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
@@ -306,7 +308,7 @@ do
continue
fi
- case "$option" in
+ case $option in
--help) cat <<EOM
Usage: $progname [OPTION]... LTMAIN [HOST]
@@ -422,8 +424,9 @@ fi
if test -n "$tagname"; then
# Check whether tagname contains only valid characters
- case "$tagname" in
- *[!-_A-Za-z0-9,/]*)
+ case `$echo "X$tagname" | $Xsed -e 's/[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]//g'` in
+ "") ;;
+ *)
echo "$progname: invalid tag name: $tagname" 1>&2
exit 1
;;
@@ -452,7 +455,7 @@ fi
ltconfig_args=
for arg
do
- case "$arg" in
+ case $arg in
*" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
ltconfig_args="$ltconfig_args '$arg'" ;;
*) ltconfig_args="$ltconfig_args $arg" ;;
@@ -535,7 +538,7 @@ if test "$verify_host" = yes; then
echo $ac_n "checking host system type""... $ac_c" 1>&6
host_alias=$host
- case "$host_alias" in
+ case $host_alias in
"")
# Force config.guess to use the C compiler.
# CC_FOR_BUILD overrides the CC variable in config.guess but I had
@@ -563,7 +566,7 @@ if test "$verify_host" = yes; then
echo $ac_n "checking build system type... $ac_c" 1>&6
build_alias=$build
- case "$build_alias" in
+ case $build_alias in
NONE)
case $nonopt in
NONE) build_alias=$host_alias ;;
@@ -598,12 +601,12 @@ host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
# Transform linux* to *-*-linux-gnu*, to support old configure scripts.
-case "$host_os" in
+case $host_os in
linux-gnu*) ;;
linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
esac
-case "$host_os" in
+case $host_os in
aix3*)
# AIX sometimes has problems with the GCC collect2 program. For some
# reason, if we set the COLLECT_NAMES environment variable, the problems
@@ -672,7 +675,7 @@ compiler="$2"
# in isolation, and that seeing it set (from the cache) indicates that
# the associated values are set (in the cache) correctly too.
echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
-echo "$progname:675:checking for $compiler option to produce PIC" 1>&5
+echo "$progname:678:checking for $compiler option to produce PIC" 1>&5
if test -z "$ac_cv_prog_cc_pic"; then
echo "$ac_t"none 1>&6
@@ -681,7 +684,7 @@ else
# Check to make sure the pic_flag actually works.
echo $ac_n "checking if $compiler PIC flag $ac_cv_prog_cc_pic works... $ac_c" 1>&6
- echo "$progname:684:checking that $compiler PIC flag $ac_cv_prog_cc_pic works." 1>&5
+ echo "$progname:687:checking that $compiler PIC flag $ac_cv_prog_cc_pic works." 1>&5
if test "X${ac_cv_prog_cc_pic_works+set}" = Xset && \
test "X${ac_cv_prog_cc_pic_works}" != X; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -691,11 +694,11 @@ else
echo $lt_simple_compile_test_code > conftest.$ac_ext
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $ac_cv_prog_cc_pic -DPIC"
- if { (eval echo $progname:694: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
+ if { (eval echo $progname:697: \"$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
- case "$host_os" in
+ 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
@@ -743,7 +746,7 @@ if test -n "$ac_cv_prog_cc_shlib"; then
fi
echo $ac_n "checking if $compiler static flag $ac_cv_prog_cc_static works... $ac_c" 1>&6
-echo "$progname:746: checking if $compiler static flag $ac_cv_prog_cc_static works" >&5
+echo "$progname:749: checking if $compiler static flag $ac_cv_prog_cc_static works" >&5
if test "X${ac_cv_prog_cc_static_works+set}" = Xset && \
test "X${ac_cv_prog_cc_static_works}" != X; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -752,7 +755,7 @@ else
echo $lt_simple_link_test_code > conftest.$ac_ext
save_LDFLAGS="$LDFLAGS"
LDFLAGS="$LDFLAGS $ac_cv_prog_cc_static"
- if { (eval echo $progname:755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ if { (eval echo $progname:758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac_cv_prog_cc_static_works=yes
else
ac_cv_prog_cc_static_works=no
@@ -773,47 +776,85 @@ link_static_flag="$ac_cv_prog_cc_static"
no_builtin_flag="$ac_cv_prog_cc_no_builtin"
can_build_shared="$ac_cv_prog_cc_can_build_shared"
+# find the maximum length of command line arguments
+echo "$progname:780: finding the maximum length of command line arguments" 1>&5
+echo $ac_n "finding the maximum length of command line arguments... $ac_c" 1>&6
+if test "${lt_cv_sys_max_cmd_len+set}" = set; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ i=0
+ testring="ABCD"
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while test "X"`$CONFIG_SHELL $0 --fallback-echo "X$testring" 2>/dev/null` \
+ = "XX$testring" &&
+ new_result=`expr "X$testring" : ".*" 2>&1` &&
+ lt_cv_sys_max_cmd_len=$new_result &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ testring=$testring$testring
+ done
+ testring=
+ # add a significant safety factor because C++ compilers can tack on massive amounts
+ # of additional arguments before passing them to the linker. 1/4 should be good.
+ len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len - $len`
+fi
+echo "$progname:@lineno@: result: $lt_cv_sys_max_cmd_len" 1>&5
+echo "${ac_t}$lt_cv_sys_max_cmd_len" 1>&6
+
+if test -n $lt_cv_sys_max_cmd_len ; then
+ max_cmd_len=$lt_cv_sys_max_cmd_len
+else
+ max_cmd_len=none
+fi
+
# Check to see if options -o and -c are simultaneously supported by compiler
echo $ac_n "checking if $compiler supports -c -o file.$objext... $ac_c" 1>&6
-$rm -r conftest 2>/dev/null
-mkdir conftest
-cd conftest
-$rm conftest*
-echo $lt_simple_compile_test_code > conftest.$ac_ext
-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.$objext"
-echo "$progname:792: checking if $compiler supports -c -o file.$objext" >&5
-if { (eval echo $progname:793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$objext; 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
+if test "${lt_cv_compiler_c_o+set}" = set; then
+ echo $ac_n "(cached) $ac_c" 1>&6
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
+ $rm -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ $rm conftest*
+ echo $lt_simple_compile_test_code > conftest.$ac_ext
+ 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.$objext"
+ echo "$progname:833: checking if $compiler supports -c -o file.$objext" >&5
+ if { (eval echo $progname:834: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$objext; 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
+ lt_cv_compiler_c_o=no
+ else
+ lt_cv_compiler_c_o=yes
+ fi
+ else
+ # Append any errors to the config.log.
+ cat out/conftest.err 1>&5
+ lt_cv_compiler_c_o=no
+ fi
+ CFLAGS="$save_CFLAGS"
+ chmod u+w .
+ $rm conftest* out/*
+ rmdir out
+ cd ..
+ rmdir conftest
+ $rm -r conftest 2>/dev/null
+fi
+compiler_c_o=$lt_cv_compiler_c_o
+echo "${ac_t}$compiler_c_o" 1>&6
# Check to see if we can do hard links to lock some files if needed
hard_links="nottested"
@@ -843,8 +884,8 @@ if test "$with_gcc" = yes; then
echo $lt_simple_compile_test_code > conftest.$ac_ext
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
- echo "$progname:846: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
- if { (eval echo $progname:847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
+ echo "$progname:887: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+ if { (eval echo $progname:888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>conftest.err; } && test -s conftest.$objext; then
# The compiler can only warn and ignore the option if not recognized
# So say no if there are warnings
@@ -913,6 +954,10 @@ else
echo "${ac_t}no" 1>&6
fi
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
reload_cmds='$LD$reload_flag -o $output$reload_objs'
test -z "$deplibs_check_method" && deplibs_check_method=unknown
@@ -932,25 +977,64 @@ sys_lib_dlsearch_path_spec="/lib /usr/lib"
sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
echo $ac_n "checking dynamic linker characteristics... $ac_c" 1>&6
-case "$host_os" in
+case $host_os in
aix3*)
version_type=linux
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.
+ # AIX 3 has no versioning support, so we append a major version to the name.
soname_spec='${libname}${release}.so$major'
;;
-aix4*)
+aix4* | aix5*)
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
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # AIX (on Power*) 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
+ if test "$aix_use_runtimelinking" = yes; then
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so instead of
+ # lib<name>.a to let people know that these are not typical AIX shared libraries.
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ else
+ # We preserve .a as extension for shared libraries though AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}.so$major'
+ fi
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ if $NM -V 2>&1 | egrep '(GNU)' > /dev/null; then
+ export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+ else
+ export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols'
+ fi
+ shlibpath_var=LIBPATH
+ deplibs_check_method=pass_all
+ case $host_os in
+ aix4 | aix4.[01] | aix4.[01].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
+ :
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line `#! .'. This would cause the generated library to
+ # depend on `.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ fi
;;
amigaos*)
@@ -987,11 +1071,28 @@ cygwin* | mingw* | pw32*)
version_type=windows
need_version=no
need_lib_prefix=no
- if test "$with_gcc" = yes; then
+ case $with_gcc,$host_os in
+ yes,cygwin*)
+ library_names_spec='$libname.dll.a'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll'
+ postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog .libs/$dlname \$dldir/$dlname'
+ postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll; $rm \$dlpath'
+ ;;
+ yes,mingw*)
library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
- else
+ sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
+ ;;
+ yes,pw32*)
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
+;;
+ *)
library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
- fi
+ ;;
+ esac
dynamic_linker='Win32 ld.exe'
# FIXME: first we should search . and the directory the executable is in
shlibpath_var=PATH
@@ -999,6 +1100,17 @@ cygwin* | mingw* | pw32*)
lt_cv_dlopen_libs=
;;
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${versuffix}.`test .$module = .yes && echo so || echo dylib` ${libname}${release}${major}.$`test .$module = .yes && echo so || echo dylib` ${libname}.`test .$module = .yes && echo so || echo dylib`'
+ soname_spec='${libname}${release}${major}.`test .$module = .yes && echo so || echo dylib`'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ ;;
+
freebsd1*)
dynamic_linker=no
;;
@@ -1006,10 +1118,11 @@ freebsd1*)
freebsd*)
objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
version_type=freebsd-$objformat
- case "$version_type" in
+ case $version_type in
freebsd-elf*)
library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
need_version=no
+ need_lc=no
need_lib_prefix=no
;;
freebsd-*)
@@ -1018,7 +1131,7 @@ freebsd*)
;;
esac
shlibpath_var=LD_LIBRARY_PATH
- case "$host_os" in
+ case $host_os in
freebsd2*)
shlibpath_overrides_runpath=yes
;;
@@ -1060,12 +1173,12 @@ irix5* | irix6*)
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
+ case $host_os in
irix5*)
libsuff= shlibsuff=
;;
*)
- case "$LD" in # libtool.m4 will add one of these switches to LD
+ 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;;
@@ -1109,6 +1222,8 @@ linux-gnu*)
;;
netbsd*)
+ need_lib_prefix=no
+ need_version=no
version_type=sunos
if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
@@ -1124,6 +1239,13 @@ netbsd*)
hardcode_into_libs=yes
;;
+newsos6)
+ version_type=linux
+ library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
openbsd*)
version_type=sunos
if test "$with_gnu_ld" = yes; then
@@ -1190,7 +1312,7 @@ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
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
+ case $host_vendor in
motorola)
need_lib_prefix=no
need_version=no
@@ -1251,7 +1373,7 @@ symxfrm='\1 \2\3 \3'
global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
# Define system-specific variables.
-case "$host_os" in
+case $host_os in
aix*)
symcode='[BCDT]'
;;
@@ -1259,7 +1381,7 @@ cygwin* | mingw* | pw32*)
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'"
+ global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
;;
irix*)
symcode='[BCDEGRST]'
@@ -1272,9 +1394,9 @@ sysv4)
;;
esac
-# Handle CRLF in mingw too chain
+# Handle CRLF in mingw tool chain
opt_cr=
-case "$host_os" in
+case $host_os in
mingw*)
opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
;;
@@ -1289,7 +1411,7 @@ fi
for ac_symprfx in "" "_"; do
# Write the raw and C identifiers.
-global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
+ global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
# Check to see that the pipe works correctly.
pipe_works=no
@@ -1303,14 +1425,14 @@ void nm_test_func(){}
#ifdef __cplusplus
}
#endif
-main(){nm_test_var='a';nm_test_func();return(0);}
+int main(){nm_test_var='a';nm_test_func();return(0);}
EOF
- echo "$progname:1309: checking if global_symbol_pipe works" >&5
- if { (eval echo $progname:1310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.$objext; then
+ echo "$progname:1431: checking if global_symbol_pipe works" >&5
+ if { (eval echo $progname:1432: \"$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:1313: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
+ if { echo "$progname:1435: eval \"$NM conftest.$objext | $global_symbol_pipe > $nlist\"" >&5; eval "$NM conftest.$objext | $global_symbol_pipe > $nlist 2>&5"; } && test -s "$nlist"; then
# Try sorting and uniquifying the output.
if sort "$nlist" | uniq > "$nlist"T; then
@@ -1347,7 +1469,7 @@ const struct {
lt_preloaded_symbols[] =
{
EOF
- sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.$ac_ext
+ sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" >> conftest.$ac_ext
cat <<\EOF >> conftest.$ac_ext
{0, (lt_ptr_t) 0}
};
@@ -1362,7 +1484,7 @@ EOF
save_CFLAGS="$CFLAGS"
LIBS="conftstm.$objext"
CFLAGS="$CFLAGS$no_builtin_flag"
- if { (eval echo $progname:1365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ if { (eval echo $progname:1487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
pipe_works=yes
else
echo "$progname: failed program was:" >&5
@@ -1406,7 +1528,7 @@ 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
+case $host_os in
cygwin* | mingw* | pw32* | os2*)
if test x$can_build_shared = xyes; then
test x$enable_win32_dll = xno && can_build_shared=no
@@ -1420,7 +1542,7 @@ 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
+case $host_os in
aix3*)
test "$enable_shared" = yes && enable_static=no
if test -n "$RANLIB"; then
@@ -1466,14 +1588,14 @@ else
if test "X${lt_cv_dlopen+set}" != Xset; then
lt_cv_dlopen=no lt_cv_dlopen_libs=
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "$progname:1469: checking for dlopen in -ldl" >&5
+echo "$progname:1591: checking for dlopen in -ldl" >&5
if test "X${ac_cv_lib_dl_dlopen+set}" = Xset; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1476 "ltconfig"
+#line 1598 "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. */
@@ -1486,7 +1608,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo $progname:1489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo $progname:1611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_lib_dl_dlopen=yes
else
@@ -1505,12 +1627,12 @@ if test "X$ac_cv_lib_dl_dlopen" = Xyes; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dlopen""... $ac_c" 1>&6
-echo "$progname:1508: checking for dlopen" >&5
+echo "$progname:1630: checking for dlopen" >&5
if test "X${ac_cv_func_dlopen+set}" = Xset; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1513 "ltconfig"
+#line 1635 "ltconfig"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char dlopen(); below. */
#include <assert.h>
@@ -1535,7 +1657,7 @@ dlopen();
; return 0; }
EOF
-if { (eval echo $progname:1538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo $progname:1660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_dlopen=yes
else
@@ -1552,14 +1674,14 @@ if test "X$ac_cv_func_dlopen" = Xyes; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
-echo "$progname:1555: checking for dlopen in -lsvld" >&5
+echo "$progname:1677: checking for dlopen in -lsvld" >&5
if test "X${ac_cv_lib_svld_dlopen+set}" = Xset; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-lsvld $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1562 "ltconfig"
+#line 1684 "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. */
@@ -1572,7 +1694,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo $progname:1575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo $progname:1697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_lib_svld_dlopen=yes
else
@@ -1591,14 +1713,14 @@ if test "X$ac_cv_lib_svld_dlopen" = Xyes; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
-echo "$progname:1594: checking for dld_link in -ldld" >&5
+echo "$progname:1716: checking for dld_link in -ldld" >&5
if test "X${ac_cv_lib_dld_dld_link+set}" = Xset; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-ldld $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1601 "ltconfig"
+#line 1723 "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. */
@@ -1611,7 +1733,7 @@ int main() {
dld_link()
; return 0; }
EOF
-if { (eval echo $progname:1614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo $progname:1736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_lib_dld_dld_link=yes
else
@@ -1630,12 +1752,12 @@ if test "X$ac_cv_lib_dld_dld_link" = Xyes; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for shl_load""... $ac_c" 1>&6
-echo "$progname:1633: checking for shl_load" >&5
+echo "$progname:1755: checking for shl_load" >&5
if test "X${ac_cv_func_shl_load+set}" = Xset; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1638 "ltconfig"
+#line 1760 "ltconfig"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char shl_load(); below. */
#include <assert.h>
@@ -1660,7 +1782,7 @@ shl_load();
; return 0; }
EOF
-if { (eval echo $progname:1663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo $progname:1785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_func_shl_load=yes
else
@@ -1678,14 +1800,14 @@ if test "X$ac_cv_func_shl_load" = Xyes; then
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
-echo "$progname:1681: checking for shl_load in -ldld" >&5
+echo "$progname:1803: checking for shl_load in -ldld" >&5
if test "X${ac_cv_lib_dld_shl_load+set}" = Xset; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_save_LIBS="$LIBS"
LIBS="-ldld $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1688 "ltconfig"
+#line 1810 "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
@@ -1699,7 +1821,7 @@ int main() {
shl_load()
; return 0; }
EOF
-if { (eval echo $progname:1702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo $progname:1824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
ac_cv_lib_dld_shl_load=yes
else
@@ -1741,23 +1863,23 @@ fi
enable_dlopen=no
fi
- case "$lt_cv_dlopen" in
+ 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:1749: checking for $ac_hdr" >&5
+echo "$progname:1871: checking for $ac_hdr" >&5
if eval "test \"`echo 'X$''{'ac_cv_header_$ac_safe'+set}'`\" = Xset"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1754 "ltconfig"
+#line 1876 "ltconfig"
#include <$ac_hdr>
int fnord = 0;
int main () { return(0); }
EOF
ac_try="$ac_compile >/dev/null 2>conftest.out"
-{ (eval echo $progname:1760: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo $progname:1882: \"$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*
@@ -1785,7 +1907,7 @@ done
LIBS="$lt_cv_dlopen_libs $LIBS"
echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
-echo "$progname:1788: checking whether a program can dlopen itself" >&5
+echo "$progname:1910: checking whether a program can dlopen itself" >&5
if test "X${lt_cv_dlopen_self+set}" = Xset; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1793,7 +1915,7 @@ else
lt_cv_dlopen_self=cross
else
cat > conftest.$ac_ext <<EOF
-#line 1796 "ltconfig"
+#line 1918 "ltconfig"
#if HAVE_DLFCN_H
#include <dlfcn.h>
@@ -1833,13 +1955,14 @@ else
# endif
#endif
-fnord() { int i=42;}
-main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
+void fnord() { int i=42; }
+int 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:1842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo $progname:1965: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
lt_cv_dlopen_self=yes
else
@@ -1858,7 +1981,7 @@ 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:1861: checking whether a statically linked program can dlopen itself" >&5
+echo "$progname:1984: checking whether a statically linked program can dlopen itself" >&5
if test "X${lt_cv_dlopen_self_static+set}" = Xset; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1866,7 +1989,7 @@ else
lt_cv_dlopen_self_static=cross
else
cat > conftest.$ac_ext <<EOF
-#line 1869 "ltconfig"
+#line 1992 "ltconfig"
#if HAVE_DLFCN_H
#include <dlfcn.h>
@@ -1906,13 +2029,14 @@ else
# endif
#endif
-fnord() { int i=42;}
-main() { void *self, *ptr1, *ptr2; self=dlopen(0,LTDL_GLOBAL|LTDL_LAZY_OR_NOW);
+void fnord() { int i=42; }
+int 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:1915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo $progname:2039: \"$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
@@ -1931,12 +2055,12 @@ fi
;;
esac
- case "$lt_cv_dlopen_self" in
+ 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
+ case $lt_cv_dlopen_self_static in
yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
*) enable_dlopen_self_static=unknown ;;
esac
@@ -1953,7 +2077,7 @@ LTSHELL="$SHELL"
LTCONFIG_VERSION="$VERSION"
# Only quote variables if we're using ltmain.sh.
-case "$ltmain" in
+case $ltmain in
*.sh)
# Now quote all the things that may contain metacharacters.
for var in ltecho old_AR old_AR_FLAGS old_CC old_LTCC old_CFLAGS old_CPPFLAGS \
@@ -1978,7 +2102,7 @@ case "$ltmain" in
sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
compiler_c_o need_locks exclude_expsyms include_expsyms; do
- case "$var" in
+ 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 | \
@@ -1994,7 +2118,7 @@ case "$ltmain" in
esac
done
- case "$ltecho" in
+ case $ltecho in
*'\$0 --fallback-echo"')
ltecho=`$echo "X$ltecho" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'`
;;
@@ -2183,6 +2307,9 @@ exeext="$exeext"
pic_flag=$pic_flag
pic_mode=$pic_mode
+# What is the maximum length of a command?
+max_cmd_len=$max_cmd_len
+
# Does compiler simultaneously support -c and -o options?
compiler_c_o=$compiler_c_o
@@ -2371,11 +2498,11 @@ else
echo "### END LIBTOOL TAG CONFIG: $tagname" >> "$ofile"
fi
-case "$ltmain" in
+case $ltmain in
*.sh)
echo >> "$ofile"
if test -z "$tagname"; then
- case "$host_os" in
+ case $host_os in
aix3*)
cat <<\EOF >> "$ofile"
@@ -2389,7 +2516,7 @@ fi
EOF
;;
esac
- case "$host" in
+ case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
cat <<'EOF' >> "$ofile"
# This is a source program that is used to create dlls on Windows
@@ -2505,7 +2632,7 @@ EOF
# filename = argv[1];
#
# dll = open(filename, O_RDONLY|O_BINARY);
-# if (!dll)
+# if (dll < 1)
# return 1;
#
# dll_name = filename;
diff --git a/contrib/binutils/ltmain.sh b/contrib/binutils/ltmain.sh
index 2bccd11..bd76cfb 100644
--- a/contrib/binutils/ltmain.sh
+++ b/contrib/binutils/ltmain.sh
@@ -1,7 +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-2000, 2001 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+# 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
@@ -54,8 +55,8 @@ modename="$progname"
# Constants.
PROGRAM=ltmain.sh
PACKAGE=libtool
-VERSION=1.4a
-TIMESTAMP=" (1.641.2.122 2000/09/30 05:27:52)"
+VERSION=1.4a-GCC3.0
+TIMESTAMP=" (1.641.2.256 2001/05/28 20:09:07 with GCC-local changes)"
default_mode=
help="Try \`$progname --help' for more information."
@@ -113,35 +114,43 @@ do
arg="$1"
shift
- case "$arg" in
+ case $arg in
-*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
*) optarg= ;;
esac
# If the previous option needs an argument, assign it.
if test -n "$prev"; then
- case "$prev" in
+ case $prev in
execute_dlfiles)
- eval "$prev=\"\$$prev \$arg\""
+ execute_dlfiles="$execute_dlfiles $arg"
;;
tag)
tagname="$arg"
# Check whether tagname contains only valid characters
- case "$tagname" in
+ case $tagname in
*[!-_A-Za-z0-9,/]*)
echo "$progname: invalid tag name: $tagname" 1>&2
exit 1
;;
esac
- if grep "^### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then
- taglist="$taglist $tagname"
- # Evaluate the configuration.
- eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`"
- else
- echo "$progname: ignoring unknown tag $tagname" 1>&2
- fi
+ case $tagname in
+ CC)
+ # Don't test for the "default" C tag, as we know, it's there, but
+ # not specially marked.
+ ;;
+ *)
+ if grep "^### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$0" > /dev/null; then
+ taglist="$taglist $tagname"
+ # Evaluate the configuration.
+ eval "`sed -n -e '/^### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $0`"
+ else
+ echo "$progname: ignoring unknown tag $tagname" 1>&2
+ fi
+ ;;
+ esac
;;
*)
eval "$prev=\$arg"
@@ -154,7 +163,7 @@ do
fi
# Have we seen a non-optional argument yet?
- case "$arg" in
+ case $arg in
--help)
show_help=yes
;;
@@ -237,16 +246,21 @@ if test -n "$prevopt"; then
exit 1
fi
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end. This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
if test -z "$show_help"; then
# Infer the operation mode.
if test -z "$mode"; then
- case "$nonopt" in
+ case $nonopt in
*cc | *++ | gcc* | *-gcc*)
mode=link
for arg
do
- case "$arg" in
+ case $arg in
-c)
mode=compile
break
@@ -291,7 +305,7 @@ if test -z "$show_help"; then
help="Try \`$modename --help --mode=$mode' for more information."
# These modes are in order of execution frequency so that they run quickly.
- case "$mode" in
+ case $mode in
# libtool compile mode
compile)
modename="$modename: compile"
@@ -305,14 +319,14 @@ if test -z "$show_help"; then
user_target=no
for arg
do
- case "$prev" in
+ case $prev in
"") ;;
xcompiler)
# Aesthetically quote the previous argument.
prev=
lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
- case "$arg" in
+ case $arg in
# Double-quote args containing other shell metacharacters.
# Many Bourne shells cannot handle close brackets correctly
# in scan sets, so we specify it separately.
@@ -332,7 +346,7 @@ if test -z "$show_help"; then
esac
# Accept any command-line options.
- case "$arg" in
+ case $arg in
-o)
if test "$user_target" != "no"; then
$echo "$modename: you cannot specify \`-o' more than once" 1>&2
@@ -371,7 +385,7 @@ if test -z "$show_help"; then
# Double-quote args containing other shell metacharacters.
# Many Bourne shells cannot handle close brackets correctly
# in scan sets, so we specify it separately.
- case "$arg" in
+ case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
@@ -391,7 +405,7 @@ if test -z "$show_help"; then
;;
esac
- case "$user_target" in
+ case $user_target in
next)
# The next one is the -o target name
user_target=yes
@@ -419,7 +433,7 @@ if test -z "$show_help"; then
# Double-quote args containing other shell metacharacters.
# Many Bourne shells cannot handle close brackets correctly
# in scan sets, so we specify it separately.
- case "$lastarg" in
+ case $lastarg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
lastarg="\"$lastarg\""
;;
@@ -433,7 +447,7 @@ if test -z "$show_help"; then
fi
done
- case "$user_target" in
+ case $user_target in
set)
;;
no)
@@ -449,7 +463,7 @@ if test -z "$show_help"; then
# Recognize several different file suffixes.
# If the user specifies -o file.o, it is replaced with file.lo
xform='[cCFSfmso]'
- case "$libobj" in
+ case $libobj in
*.ada) xform=ada ;;
*.adb) xform=adb ;;
*.ads) xform=ads ;;
@@ -466,7 +480,7 @@ if test -z "$show_help"; then
libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
- case "$libobj" in
+ case $libobj in
*.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
*)
$echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
@@ -544,7 +558,7 @@ if test -z "$show_help"; then
trap "$run $rm $removelist; exit 1" 1 2 15
# On Cygwin there's no "real" PIC flag so we must build both object types
- case "$host_os" in
+ case $host_os in
cygwin* | mingw* | pw32* | os2*)
pic_mode=default
;;
@@ -777,7 +791,7 @@ EOF
# libtool link mode
link | relink)
modename="$modename: link"
- case "$host" in
+ case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
# It is impossible to link a dll without this setting, and
# we shouldn't force the makefile maintainer to figure out
@@ -843,7 +857,7 @@ EOF
# We need to know -static, to get the right output filenames.
for arg
do
- case "$arg" in
+ case $arg in
-all-static | -static)
if test "X$arg" = "X-all-static"; then
if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
@@ -873,7 +887,7 @@ EOF
arg="$1"
base_compile="$base_compile $arg"
shift
- case "$arg" in
+ case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
;;
@@ -883,14 +897,14 @@ EOF
# If the previous option needs an argument, assign it.
if test -n "$prev"; then
- case "$prev" in
+ case $prev in
output)
compile_command="$compile_command @OUTPUT@"
finalize_command="$finalize_command @OUTPUT@"
;;
esac
- case "$prev" in
+ case $prev in
dlfiles|dlprefiles)
if test "$preload" = no; then
# Add the symbol object into the linking commands.
@@ -898,7 +912,7 @@ EOF
finalize_command="$finalize_command @SYMFILE@"
preload=yes
fi
- case "$arg" in
+ case $arg in
*.la | *.lo) ;; # We handle these cases below.
force)
if test "$dlself" = no; then
@@ -950,9 +964,116 @@ EOF
prev=
continue
;;
+ objectlist)
+ if test -f "$arg"; then
+ save_arg=$arg
+ moreargs=
+ for fil in `cat $save_arg`
+ do
+# moreargs="$moreargs $fil"
+ arg=$fil
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ # If there is no directory component, then add one.
+ case $arg in
+ */* | *\\*) . $arg ;;
+ *) . ./$arg ;;
+ esac
+
+ if test -z "$pic_object" || \
+ test -z "$non_pic_object" ||
+ test "$pic_object" = none && \
+ test "$non_pic_object" = none; then
+ $echo "$modename: cannot find name of object for \`$arg'" 1>&2
+ exit 1
+ fi
+
+ # Extract subdirectory from the argument.
+ xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$xdir" = "X$arg"; then
+ xdir=
+ else
+ xdir="$xdir/"
+ fi
+
+ if test "$pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ pic_object="$xdir$pic_object"
+
+ if test "$prev" = dlfiles; then
+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+ dlfiles="$dlfiles $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test "$prev" = dlprefiles; then
+ # Preload the old-style object.
+ dlprefiles="$dlprefiles $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ libobjs="$libobjs $pic_object"
+ arg="$pic_object"
+ fi
+
+ # Non-PIC object.
+ if test "$non_pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object="$xdir$non_pic_object"
+
+ # A standard non-PIC object
+ non_pic_objects="$non_pic_objects $non_pic_object"
+ if test -z "$pic_object" || test "$pic_object" = none ; then
+ arg="$non_pic_object"
+ fi
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if test -z "$run"; then
+ $echo "$modename: \`$arg' is not a valid libtool object" 1>&2
+ exit 1
+ else
+ # Dry-run case.
+
+ # Extract subdirectory from the argument.
+ xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$xdir" = "X$arg"; then
+ xdir=
+ else
+ xdir="$xdir/"
+ fi
+
+ pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"`
+ non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"`
+ libobjs="$libobjs $pic_object"
+ non_pic_objects="$non_pic_objects $non_pic_object"
+ fi
+ fi
+ done
+ else
+ $echo "$modename: link input file \`$save_arg' does not exist"
+ exit 1
+ fi
+ arg=$save_arg
+ prev=
+ continue
+ ;;
rpath | xrpath)
# We need an absolute path.
- case "$arg" in
+ case $arg in
[\\/]* | [A-Za-z]:[\\/]*) ;;
*)
$echo "$modename: only absolute run-paths are allowed" 1>&2
@@ -994,11 +1115,11 @@ EOF
continue
;;
esac
- fi
+ fi # test -n $prev
prevarg="$arg"
- case "$arg" in
+ case $arg in
-all-static)
if test -n "$link_static_flag"; then
compile_command="$compile_command $link_static_flag"
@@ -1035,7 +1156,7 @@ EOF
-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"
+ $echo "$modename: more than one -exported-symbols argument is not allowed"
exit 1
fi
if test "X$arg" = "X-export-symbols"; then
@@ -1057,11 +1178,11 @@ EOF
esac
continue
;;
-
+
-L*)
dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
# We need an absolute path.
- case "$dir" in
+ case $dir in
[\\/]* | [A-Za-z]:[\\/]*) ;;
*)
absdir=`cd "$dir" && pwd`
@@ -1079,9 +1200,9 @@ EOF
lib_search_path="$lib_search_path $dir"
;;
esac
- case "$host" in
+ case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
- case ":$dllsearchpath:" in
+ case :$dllsearchpath: in
*":$dir:"*) ;;
*) dllsearchpath="$dllsearchpath:$dir";;
esac
@@ -1091,19 +1212,16 @@ EOF
;;
-l*)
- if test "$arg" = "-lc"; then
- case "$host" in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
- # These systems don't actually have c library (as such)
- continue
- ;;
- esac
- elif test "$arg" = "-lm"; then
- case "$host" in
+ if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+ case $host in
*-*-cygwin* | *-*-pw32* | *-*-beos*)
- # These systems don't actually have math library (as such)
+ # These systems don't actually have a C or math library (as such)
continue
;;
+ *-*-mingw* | *-*-os2*)
+ # These systems don't actually have a C library (as such)
+ test "X$arg" = "X-lc" && continue
+ ;;
esac
fi
deplibs="$deplibs $arg"
@@ -1121,7 +1239,7 @@ EOF
;;
-no-install)
- case "$host" in
+ case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
# The PATH hackery in wrapper scripts is required on Windows
# in order for the loader to find any dlls it needs.
@@ -1129,13 +1247,7 @@ EOF
$echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
fast_install=no
;;
- *-*-rhapsody*)
- # rhapsody is a little odd...
- deplibs="$deplibs -framework System"
- ;;
- *)
- no_install=yes
- ;;
+ *) no_install=yes ;;
esac
continue
;;
@@ -1145,6 +1257,11 @@ EOF
continue
;;
+ -objectlist)
+ prev=objectlist
+ continue
+ ;;
+
-o) prev=output ;;
-release)
@@ -1165,7 +1282,7 @@ EOF
-R*)
dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
# We need an absolute path.
- case "$dir" in
+ case $dir in
[\\/]* | [A-Za-z]:[\\/]*) ;;
*)
$echo "$modename: only absolute run-paths are allowed" 1>&2
@@ -1180,7 +1297,7 @@ EOF
;;
-static)
- # The effects of -static are defined in a previous loop.
+ # The effects of -static are defined in a previous loop.
# We used to do the same as -all-static on platforms that
# didn't have a PIC flag, but the assumption that the effects
# would be equivalent was wrong. It would break on at least
@@ -1204,7 +1321,7 @@ EOF
IFS="${IFS= }"; save_ifs="$IFS"; IFS=','
for flag in $args; do
IFS="$save_ifs"
- case "$flag" in
+ case $flag in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
flag="\"$flag\""
;;
@@ -1222,7 +1339,7 @@ EOF
IFS="${IFS= }"; save_ifs="$IFS"; IFS=','
for flag in $args; do
IFS="$save_ifs"
- case "$flag" in
+ case $flag in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
flag="\"$flag\""
;;
@@ -1250,7 +1367,7 @@ EOF
# Unknown arguments in both finalize_command and compile_command need
# to be aesthetically quoted because they are evaled later.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
- case "$arg" in
+ case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
@@ -1272,7 +1389,7 @@ EOF
# Read the .lo file
# If there is no directory component, then add one.
- case "$arg" in
+ case $arg in
*/* | *\\*) . $arg ;;
*) . ./$arg ;;
esac
@@ -1384,20 +1501,20 @@ EOF
# Unknown arguments in both finalize_command and compile_command need
# to be aesthetically quoted because they are evaled later.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
- case "$arg" in
+ case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
arg="\"$arg\""
;;
esac
;;
- esac
+ esac # arg
# Now actually substitute the argument into the commands.
if test -n "$arg"; then
compile_command="$compile_command $arg"
finalize_command="$finalize_command $arg"
fi
- done
+ done # argument parsing loop
if test -n "$prev"; then
$echo "$modename: the \`$prevarg' option requires an argument" 1>&2
@@ -1455,7 +1572,6 @@ EOF
finalize_command="$finalize_command $arg"
fi
- oldlibs=
# calculate the name of the file, without its directory
outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
libobjs_save="$libobjs"
@@ -1486,7 +1602,7 @@ EOF
fi
# Determine the type of output
- case "$output" in
+ case $output in
"")
$echo "$modename: you must specify an output file" 1>&2
$echo "$help" 1>&2
@@ -1511,19 +1627,31 @@ EOF
if test $linkmode = lib; then
libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+ # Compute libraries that are listed more than once in $predeps
+ # $postdeps and mark them as special (i.e., whose duplicates are
+ # not to be eliminated).
+ pre_post_deps=
+ for pre_post_dep in $predeps $postdeps; do
+ case "$pre_post_deps " in
+ *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
+ esac
+ pre_post_deps="$pre_post_deps $pre_post_dep"
+ done
+ pre_post_deps=
fi
deplibs=
newdependency_libs=
newlib_search_path=
need_relink=no # whether we're linking any uninstalled libtool libraries
- uninst_deplibs= # uninstalled libtool libraries
- uninst_path= # paths that contain uninstalled libtool libraries
+ notinst_deplibs= # not-installed libtool libraries
+ notinst_path= # paths that contain not-installed libtool libraries
case $linkmode in
lib)
passes="conv link"
for file in $dlfiles $dlprefiles; do
- case "$file" in
+ case $file in
*.la) ;;
*)
$echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
@@ -1540,34 +1668,29 @@ EOF
newdlprefiles=
passes="conv scan dlopen dlpreopen link"
;;
- *) passes="conv"
+ *) passes="conv"
;;
esac
for pass in $passes; do
- if test "$linkmode,$pass" = "lib,link" ||
- test "$linkmode,$pass" = "prog,scan"; then
- libs="$deplibs"
- deplibs=
- fi
if test $linkmode = prog; then
+ # Determine which files to process
case $pass in
- dlopen) libs="$dlfiles" ;;
+ dlopen)
+ libs="$dlfiles"
+ save_deplibs="$deplibs" # Collect dlpreopened libraries
+ deplibs=
+ ;;
dlpreopen) libs="$dlprefiles" ;;
link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
esac
fi
- if test $pass = dlopen; then
- # Collect dlpreopened libraries
- save_deplibs="$deplibs"
- deplibs=
- fi
for deplib in $libs; do
lib=
found=no
- case "$deplib" in
+ case $deplib in
-l*)
- if test $linkmode != lib && test $linkmode != prog; then
- $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2
+ if test $linkmode = oldlib && test $linkmode = obj; then
+ $echo "$modename: warning: \`-l' is ignored for archives/objects: $deplib" 1>&2
continue
fi
if test $pass = conv; then
@@ -1584,6 +1707,7 @@ EOF
fi
done
if test "$found" != yes; then
+ # deplib doesn't seem to be a libtool library
if test "$linkmode,$pass" = "prog,link"; then
compile_deplibs="$deplib $compile_deplibs"
finalize_deplibs="$deplib $finalize_deplibs"
@@ -1593,7 +1717,7 @@ EOF
fi
continue
fi
- ;;
+ ;; # -l
-L*)
case $linkmode in
lib)
@@ -1616,11 +1740,11 @@ EOF
fi
;;
*)
- $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2
+ $echo "$modename: warning: \`-L' is ignored for archives/objects: $deplib" 1>&2
;;
- esac
+ esac # linkmode
continue
- ;;
+ ;; # -L
-R*)
if test $pass = link; then
dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
@@ -1664,21 +1788,17 @@ EOF
fi
continue
;;
- esac
- ;;
+ esac # linkmode
+ ;; # *.$libext
*.lo | *.$objext)
- if test $pass = conv; then
- deplibs="$deplib $deplibs"
- elif test $linkmode = prog; then
- if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
- # If there is no dlopen support or we're linking statically,
- # we need to preload.
- newdlprefiles="$newdlprefiles $deplib"
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- else
- newdlfiles="$newdlfiles $deplib"
- fi
+ if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+ # If there is no dlopen support or we're linking statically,
+ # we need to preload.
+ newdlprefiles="$newdlprefiles $deplib"
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ newdlfiles="$newdlfiles $deplib"
fi
continue
;;
@@ -1686,7 +1806,7 @@ EOF
alldeplibs=yes
continue
;;
- esac
+ esac # case $deplib
if test $found = yes || test -f "$lib"; then :
else
$echo "$modename: cannot find the library \`$lib'" 1>&2
@@ -1714,20 +1834,21 @@ EOF
installed=yes
# Read the .la file
- case "$lib" in
+ case $lib in
*/* | *\\*) . $lib ;;
*) . ./$lib ;;
esac
if test "$linkmode,$pass" = "lib,link" ||
test "$linkmode,$pass" = "prog,scan" ||
- { test $linkmode != prog && test $linkmode != lib; }; then
+ { test $linkmode = oldlib && test $linkmode = obj; }; then
+ # Add dl[pre]opened files of deplib
test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
fi
if test $pass = conv; then
- # only check for convenience libraries
+ # Only check for convenience libraries
deplibs="$lib $deplibs"
if test -z "$libdir"; then
if test -z "$old_library"; then
@@ -1750,7 +1871,7 @@ EOF
exit 1
fi
continue
- fi
+ fi # $pass = conv
# Get the name of the library we link against.
linklib=
@@ -1769,17 +1890,17 @@ EOF
exit 1
fi
if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
- # If there is no dlname, no dlopen support or we're linking statically,
- # we need to preload.
+ # If there is no dlname, no dlopen support or we're linking
+ # statically, we need to preload.
dlprefiles="$dlprefiles $lib"
else
newdlfiles="$newdlfiles $lib"
fi
continue
- fi
+ fi # $pass = dlopen
# We need an absolute path.
- case "$ladir" in
+ case $ladir in
[\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
*)
abs_ladir=`cd "$ladir" && pwd`
@@ -1807,8 +1928,8 @@ EOF
dir="$ladir/$objdir"
absdir="$abs_ladir/$objdir"
# Remove this search path later
- uninst_path="$uninst_path $abs_ladir"
- fi
+ notinst_path="$notinst_path $abs_ladir"
+ fi # $installed = yes
name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
# This library was specified with -dlpreopen.
@@ -1827,17 +1948,17 @@ EOF
else
newdlprefiles="$newdlprefiles $dir/$linklib"
fi
- fi
+ fi # $pass = dlpreopen
if test -z "$libdir"; then
- # link the convenience library
+ # Link the convenience library
if test $linkmode = lib; then
deplibs="$dir/$old_library $deplibs"
elif test "$linkmode,$pass" = "prog,link"; then
compile_deplibs="$dir/$old_library $compile_deplibs"
finalize_deplibs="$dir/$old_library $finalize_deplibs"
else
- deplibs="$lib $deplibs" # used for prog,scan pass
+ deplibs="$lib $deplibs"
fi
continue
fi
@@ -1854,7 +1975,7 @@ EOF
tmp_libs=
for deplib in $dependency_libs; do
- case "$deplib" in
+ case $deplib in
-L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
esac
# Need to link against all dependency_libs?
@@ -1869,23 +1990,17 @@ EOF
*" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
esac
tmp_libs="$tmp_libs $deplib"
- done
+ done # for deplib
continue
- fi
+ fi # $linkmode = prog...
- if test "$linkmode,$pass" = "prog,link"; then
- if test -n "$library_names" &&
- { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
- # We need to hardcode the library path
- if test -n "$shlibpath_var"; then
- # Make sure the rpath contains only unique directories.
- case "$temp_rpath " in
- *" $dir "*) ;;
- *" $absdir "*) ;;
- *) temp_rpath="$temp_rpath $dir" ;;
- esac
- fi
+ link_static=no # Whether the deplib will be linked statically
+ if test -n "$library_names" &&
+ { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
+ # Link against this shared library
+ if test "$linkmode,$pass" = "prog,link" ||
+ { test $linkmode = lib && test $hardcode_into_libs = yes; }; then
# Hardcode the library path.
# Skip directories that are in the system default run-time
# search path.
@@ -1898,7 +2013,6 @@ EOF
esac
;;
esac
-
case " $sys_lib_dlsearch_path " in
*" $libdir "*) ;;
*)
@@ -1908,7 +2022,18 @@ EOF
esac
;;
esac
- fi
+ if test $linkmode = prog; then
+ # We need to hardcode the library path
+ if test -n "$shlibpath_var"; then
+ # Make sure the rpath contains only unique directories.
+ case "$temp_rpath " in
+ *" $dir "*) ;;
+ *" $absdir "*) ;;
+ *) temp_rpath="$temp_rpath $dir" ;;
+ esac
+ fi
+ fi
+ fi # $linkmode,$pass = prog,link...
if test "$alldeplibs" = yes &&
{ test "$deplibs_check_method" = pass_all ||
@@ -1917,40 +2042,11 @@ EOF
# We only need to search for static libraries
continue
fi
- fi
- link_static=no # Whether the deplib will be linked statically
- if test -n "$library_names" &&
- { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
if test "$installed" = no; then
- uninst_deplibs="$uninst_deplibs $lib"
+ notinst_deplibs="$notinst_deplibs $lib"
need_relink=yes
fi
- # This is a shared library
- if test $linkmode = lib &&
- test $hardcode_into_libs = yes; then
- # Hardcode the library path.
- # Skip directories that are in the system default run-time
- # search path.
- 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
- fi
if test -n "$old_archive_from_expsyms_cmds"; then
# figure out the soname
@@ -1958,13 +2054,25 @@ EOF
realname="$2"
shift; shift
libname=`eval \\$echo \"$libname_spec\"`
- if test -n "$soname_spec"; then
+ # use dlname if we got it. it's perfectly good, no?
+ if test -n "$dlname"; then
+ soname="$dlname"
+ elif test -n "$soname_spec"; then
+ # bleh windows
+ case $host in
+ *cygwin*)
+ major=`expr $current - $age`
+ versuffix="-$major"
+ ;;
+ esac
eval soname=\"$soname_spec\"
else
soname="$realname"
fi
# Make a new name for the extract_expsyms_cmds to use
+ soroot="$soname"
+ soname=`echo $soroot | sed -e 's/^.*\///'`
newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a"
# If the library has no export list, then create one now
@@ -1996,19 +2104,19 @@ EOF
# make sure the library variables are pointing to the new library
dir=$output_objdir
linklib=$newlib
- fi
+ fi # test -n $old_archive_from_expsyms_cmds
if test $linkmode = prog || test "$mode" != relink; then
add_shlibpath=
add_dir=
add=
lib_linked=yes
- case "$hardcode_action" in
+ case $hardcode_action in
immediate | unsupported)
if test "$hardcode_direct" = no; then
add="$dir/$linklib"
elif test "$hardcode_minus_L" = no; then
- case "$host" in
+ case $host in
*-*-sunos*) add_shlibpath="$dir" ;;
esac
add_dir="-L$dir"
@@ -2042,7 +2150,7 @@ EOF
fi
if test -n "$add_shlibpath"; then
- case ":$compile_shlibpath:" in
+ case :$compile_shlibpath: in
*":$add_shlibpath:"*) ;;
*) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
esac
@@ -2056,7 +2164,7 @@ EOF
if test "$hardcode_direct" != yes && \
test "$hardcode_minus_L" != yes && \
test "$hardcode_shlibpath_var" = yes; then
- case ":$finalize_shlibpath:" in
+ case :$finalize_shlibpath: in
*":$libdir:"*) ;;
*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
esac
@@ -2075,7 +2183,7 @@ EOF
add_dir="-L$libdir"
add="-l$name"
elif test "$hardcode_shlibpath_var" = yes; then
- case ":$finalize_shlibpath:" in
+ case :$finalize_shlibpath: in
*":$libdir:"*) ;;
*) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
esac
@@ -2095,6 +2203,15 @@ EOF
fi
fi
elif test $linkmode = prog; then
+ if test "$alldeplibs" = yes &&
+ { test "$deplibs_check_method" = pass_all ||
+ { test "$build_libtool_libs" = yes &&
+ test -n "$library_names"; }; }; then
+ # We only need to search for static libraries
+ continue
+ fi
+
+ # Try to link the static library
# Here we assume that one of hardcode_direct or hardcode_minus_L
# is not unsupported. This is valid on all known static and
# shared platforms.
@@ -2111,6 +2228,7 @@ EOF
if test "$deplibs_check_method" != pass_all; then
# We're trying link a shared library against a static one
# but the system doesn't support it.
+
# Just print a warning and add the library to dependency_libs so
# that the program can be linked against the static library.
echo
@@ -2118,13 +2236,30 @@ EOF
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."
+ if test "$module" = yes; then
+ echo "*** Therefore, libtool will create a static module, that should work "
+ echo "*** as long as the dlopening 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
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
else
convenience="$convenience $dir/$old_library"
old_convenience="$old_convenience $dir/$old_library"
deplibs="$dir/$old_library $deplibs"
link_static=yes
fi
- fi
+ fi # link shared/static library?
if test $linkmode = lib; then
if test -n "$dependency_libs" &&
@@ -2133,7 +2268,7 @@ EOF
# Extract -R from dependency_libs
temp_deplibs=
for libdir in $dependency_libs; do
- case "$libdir" in
+ case $libdir in
-R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
case " $xrpath " in
*" $temp_xrpath "*) ;;
@@ -2161,13 +2296,13 @@ EOF
if test $link_all_deplibs != no; then
# Add the search paths of all dependency libraries
for deplib in $dependency_libs; do
- case "$deplib" in
+ case $deplib in
-L*) path="$deplib" ;;
*.la)
dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
test "X$dir" = "X$deplib" && dir="."
# We need an absolute path.
- case "$dir" in
+ case $dir in
[\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
*)
absdir=`cd "$dir" && pwd`
@@ -2198,10 +2333,9 @@ EOF
*) deplibs="$path $deplibs" ;;
esac
done
- fi
- fi
- done
- dependency_libs="$newdependency_libs"
+ fi # link_all_deplibs != no
+ fi # linkmode = lib
+ done # for deplib in $libs
if test $pass = dlpreopen; then
# Link the dlpreopened libraries before other libraries
for deplib in $save_deplibs; do
@@ -2209,6 +2343,7 @@ EOF
done
fi
if test $pass != dlopen; then
+ test $pass != scan && dependency_libs="$newdependency_libs"
if test $pass != conv; then
# Make sure lib_search_path contains only unique directories.
lib_search_path=
@@ -2227,12 +2362,11 @@ EOF
vars="compile_deplibs finalize_deplibs"
fi
for var in $vars dependency_libs; do
- # Make sure that $var contains only unique libraries
- # and add them in reverse order
+ # Add libraries to $var in reverse order
eval tmp_libs=\"\$$var\"
new_libs=
for deplib in $tmp_libs; do
- case "$deplib" in
+ case $deplib in
-L*) new_libs="$deplib $new_libs" ;;
*)
case " $specialdeplibs " in
@@ -2249,7 +2383,7 @@ EOF
done
tmp_libs=
for deplib in $new_libs; do
- case "$deplib" in
+ case $deplib in
-L*)
case " $tmp_libs " in
*" $deplib "*) ;;
@@ -2260,9 +2394,14 @@ EOF
esac
done
eval $var=\"$tmp_libs\"
- done
+ done # for var
fi
- done
+ if test "$pass" = "conv" &&
+ { test "$linkmode" = "lib" || test "$linkmode" = "prog"; }; then
+ libs="$deplibs" # reset libs
+ deplibs=
+ fi
+ done # for pass
if test $linkmode = prog; then
dlfiles="$newdlfiles"
dlprefiles="$newdlprefiles"
@@ -2270,10 +2409,6 @@ EOF
case $linkmode in
oldlib)
- 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
@@ -2306,7 +2441,7 @@ EOF
lib)
# Make sure we only generate libraries of the form `libNAME.la'.
- case "$outputname" in
+ case $outputname in
lib*)
name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
eval libname=\"$libname_spec\"
@@ -2386,8 +2521,8 @@ EOF
age="$4"
# Check that each of the things are valid numbers.
- case "$current" in
- 0 | [1-9] | [1-9][0-9]*) ;;
+ case $current in
+ 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
*)
$echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
@@ -2395,8 +2530,8 @@ EOF
;;
esac
- case "$revision" in
- 0 | [1-9] | [1-9][0-9]*) ;;
+ case $revision in
+ 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
*)
$echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
@@ -2404,8 +2539,8 @@ EOF
;;
esac
- case "$age" in
- 0 | [1-9] | [1-9][0-9]*) ;;
+ case $age in
+ 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
*)
$echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
$echo "$modename: \`$vinfo' is not valid version information" 1>&2
@@ -2423,9 +2558,29 @@ EOF
major=
versuffix=
verstring=
- case "$version_type" in
+ case $version_type in
none) ;;
+ darwin)
+ # Like Linux, but with the current version available in
+ # verstring for coding it into the library header
+ major=.`expr $current - $age`
+ versuffix="$major.$age.$revision"
+ # Darwin ld doesn't like 0 for these options...
+ minor_current=`expr $current + 1`
+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+ ;;
+
+ freebsd-aout)
+ major=".$current"
+ versuffix=".$current.$revision";
+ ;;
+
+ freebsd-elf)
+ major=".$current"
+ versuffix=".$current";
+ ;;
+
irix)
major=`expr $current - $age + 1`
verstring="sgi$major.$revision"
@@ -2470,16 +2625,6 @@ EOF
versuffix=".$current.$revision"
;;
- freebsd-aout)
- major=".$current"
- versuffix=".$current.$revision";
- ;;
-
- freebsd-elf)
- major=".$current"
- versuffix=".$current";
- ;;
-
windows)
# Use '-' rather than '.', since we only want one
# extension on DOS 8.3 filesystems.
@@ -2531,7 +2676,7 @@ EOF
removelist=
tempremovelist=`echo "$output_objdir/*"`
for p in $tempremovelist; do
- case "$p" in
+ case $p in
*.$objext)
;;
$output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
@@ -2555,7 +2700,7 @@ EOF
fi
# Eliminate all temporary directories.
- for path in $uninst_path; do
+ for path in $notinst_path; do
lib_search_path=`echo "$lib_search_path " | sed -e 's% $path % %g'`
deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'`
dependency_libs=`echo "$dependency_libs " | sed -e 's% -L$path % %g'`
@@ -2598,15 +2743,22 @@ EOF
if test "$build_libtool_libs" = yes; then
if test -n "$rpath"; then
- case "$host" in
+ case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
# these systems don't actually have a c library (as such)!
;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C library is in the System framework
+ deplibs="$deplibs -framework System"
+ ;;
+ *-*-netbsd*)
+ # Don't link with libc until the a.out ld.so is fixed.
+ ;;
*)
- # Add libc to deplibs on all other systems if necessary.
- if test $build_libtool_need_lc = "yes"; then
- deplibs="$deplibs -lc"
- fi
+ # Add libc to deplibs on all other systems if necessary.
+ if test $build_libtool_need_lc = "yes"; then
+ deplibs="$deplibs -lc"
+ fi
;;
esac
fi
@@ -2625,7 +2777,7 @@ EOF
major=""
newdeplibs=
droppeddeps=no
- case "$deplibs_check_method" in
+ 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
@@ -2650,7 +2802,7 @@ EOF
for i in $deplibs; do
name="`expr $i : '-l\(.*\)'`"
# If $name is empty we are operating on a -L argument.
- if test "$name" != "" ; then
+ if test -n "$name" && test "$name" != "0"; then
libname=`eval \\$echo \"$libname_spec\"`
deplib_matches=`eval \\$echo \"$library_names_spec\"`
set dummy $deplib_matches
@@ -2675,7 +2827,7 @@ EOF
for i in $deplibs; do
name="`expr $i : '-l\(.*\)'`"
# If $name is empty we are operating on a -L argument.
- if test "$name" != "" ; then
+ if test -n "$name" && test "$name" != "0"; then
$rm conftest
$LTCC -o conftest conftest.c $i
# Did it work?
@@ -2715,7 +2867,7 @@ EOF
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
+ if test -n "$name" && test "$name" != "0"; then
libname=`eval \\$echo \"$libname_spec\"`
for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
@@ -2733,7 +2885,7 @@ EOF
potlib="$potent_lib"
while test -h "$potlib" 2>/dev/null; do
potliblink=`ls -ld $potlib | sed 's/.* -> //'`
- case "$potliblink" in
+ case $potliblink in
[\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
*) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
esac
@@ -2761,6 +2913,40 @@ EOF
fi
done # Gone through all deplibs.
;;
+ match_pattern*)
+ set dummy $deplibs_check_method
+ match_pattern_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 -n "$name" && test "$name" != "0"; then
+ libname=`eval \\$echo \"$libname_spec\"`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ if eval echo \"$potent_lib\" 2>/dev/null \
+ | sed 10q \
+ | egrep "$match_pattern_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$//' \
@@ -2783,6 +2969,13 @@ EOF
libname=$libname_save
name=$name_save
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library is the System framework
+ newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
+ ;;
+ esac
+
if test "$droppeddeps" = yes; then
if test "$module" = yes; then
echo
@@ -2808,6 +3001,21 @@ EOF
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."
+
+ if test $allow_undefined = no; then
+ echo
+ echo "*** Since this library must not contain undefined symbols,"
+ echo "*** because either the platform does not support them or"
+ echo "*** it was explicitly requested with -no-undefined,"
+ echo "*** libtool will only create a static version of it."
+ 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
+ fi
fi
fi
# Done checking deplibs!
@@ -2834,7 +3042,7 @@ EOF
hardcode_libdirs="$libdir"
else
# Just accumulate the unique libdirs.
- case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
*"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
;;
*)
@@ -2887,6 +3095,7 @@ EOF
else
soname="$realname"
fi
+ test -z "$dlname" && dlname=$soname
lib="$output_objdir/$realname"
for link
@@ -2943,6 +3152,7 @@ EOF
if test -n "$convenience"; then
if test -n "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
else
gentop="$output_objdir/${outputname}x"
@@ -2958,7 +3168,7 @@ EOF
for xlib in $convenience; do
# Extract the objects.
- case "$xlib" in
+ case $xlib in
[\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
*) xabs=`pwd`"/$xlib" ;;
esac
@@ -2997,13 +3207,115 @@ EOF
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"
+ if len=`expr "X$cmds" : ".*"` &&
+ test $len -le $max_cmd_len; then
+ :
+ else
+ # The command line is too long to link in one step, link piecewise.
+ $echo "creating reloadable object files..."
+
+ # Save the value of $output and $libobjs because we want to
+ # use them later. If we have whole_archive_flag_spec, we
+ # want to use save_libobjs as it was before
+ # whole_archive_flag_spec was expanded, because we can't
+ # assume the linker understands whole_archive_flag_spec.
+ # This may have to be revisited, in case too many
+ # convenience libraries get linked in and end up exceeding
+ # the spec.
+ if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ fi
+ save_output=$output
+
+ # Clear the reloadable object creation command queue and
+ # initialize k to one.
+ test_cmds=
+ concat_cmds=
+ objlist=
+ delfiles=
+ last_robj=
+ k=1
+ output=$output_objdir/$save_output-${k}.$objext
+ # Loop over the list of objects to be linked.
+ for obj in $save_libobjs
+ do
+ eval test_cmds=\"$reload_cmds $objlist $last_robj\"
+ if test "X$objlist" = X ||
+ { len=`expr "X$test_cmds" : ".*"` &&
+ test $len -le $max_cmd_len; }; then
+ objlist="$objlist $obj"
+ else
+ # The command $test_cmds is almost too long, add a
+ # command to the queue.
+ if test $k -eq 1 ; then
+ # The first file doesn't have a previous command to add.
+ eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
+ else
+ # All subsequent reloadable object files will link in
+ # the last one created.
+ eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"
+ fi
+ last_robj=$output_objdir/$save_output-${k}.$objext
+ k=`expr $k + 1`
+ output=$output_objdir/$save_output-${k}.$objext
+ objlist=$obj
+ len=1
+ fi
+ done
+ # Handle the remaining objects by creating one last
+ # reloadable object file. All subsequent reloadable object
+ # files will link in the last one created.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
+
+ # Set up a command to remove the reloadale object files
+ # after they are used.
+ i=0
+ while test $i -lt $k
+ do
+ i=`expr $i + 1`
+ delfiles="$delfiles $output_objdir/$save_output-${i}.$objext"
+ done
+
+ $echo "creating a temporary reloadable object file: $output"
+
+ # Loop through the commands generated above and execute them.
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $concat_cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+
+ libobjs=$output
+ # Restore the value of output.
+ output=$save_output
+
+ if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ fi
+ # Expand the library linking commands again to reset the
+ # value of $libobjs for piecewise linking.
+
+ # 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
+
+ # Append the command to remove the reloadable object files
+ # to the just-reset $cmds.
+ eval cmds=\"\$cmds~$rm $delfiles\"
+ 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"
# Restore the uninstalled library and exit
if test "$mode" = relink; then
@@ -3052,7 +3364,7 @@ EOF
$echo "$modename: warning: \`-release' is ignored for objects" 1>&2
fi
- case "$output" in
+ case $output in
*.lo)
if test -n "$objs$old_deplibs"; then
$echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
@@ -3097,7 +3409,7 @@ EOF
for xlib in $convenience; do
# Extract the objects.
- case "$xlib" in
+ case $xlib in
[\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
*) xabs=`pwd`"/$xlib" ;;
esac
@@ -3193,6 +3505,9 @@ EOF
;;
prog)
+ case $host in
+ *cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;;
+ esac
if test -n "$vinfo"; then
$echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
fi
@@ -3208,6 +3523,14 @@ EOF
fi
fi
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library is the System framework
+ compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
+ finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
+ ;;
+ esac
+
compile_command="$compile_command $compile_deplibs"
finalize_command="$finalize_command $finalize_deplibs"
@@ -3232,7 +3555,7 @@ EOF
hardcode_libdirs="$libdir"
else
# Just accumulate the unique libdirs.
- case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
*"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
;;
*)
@@ -3250,9 +3573,9 @@ EOF
*) perm_rpath="$perm_rpath $libdir" ;;
esac
fi
- case "$host" in
+ case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
- case ":$dllsearchpath:" in
+ case :$dllsearchpath: in
*":$libdir:"*) ;;
*) dllsearchpath="$dllsearchpath:$libdir";;
esac
@@ -3276,7 +3599,7 @@ EOF
hardcode_libdirs="$libdir"
else
# Just accumulate the unique libdirs.
- case "$hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator" in
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
*"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
;;
*)
@@ -3313,7 +3636,7 @@ EOF
fi
if test -n "$dlsyms"; then
- case "$dlsyms" in
+ case $dlsyms in
"") ;;
*.c)
# Discover the nlist of each of the dlfiles.
@@ -3444,7 +3767,7 @@ static const void *lt_preloaded_setup() {
fi
pic_flag_for_symtable=
- case "$host" in
+ 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
@@ -3512,7 +3835,7 @@ static const void *lt_preloaded_setup() {
# We should set the shlibpath_var
rpath=
for dir in $temp_rpath; do
- case "$dir" in
+ case $dir in
[\\/]* | [A-Za-z]:[\\/]*)
# Absolute path.
rpath="$rpath$dir:"
@@ -3620,7 +3943,7 @@ static const void *lt_preloaded_setup() {
# Quote $echo for shipping.
if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
- case "$0" in
+ case $0 in
[\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
*) qecho="$SHELL `pwd`/$0 --fallback-echo";;
esac
@@ -3636,6 +3959,11 @@ static const void *lt_preloaded_setup() {
case $output in
*.exe) output=`echo $output|sed 's,.exe$,,'` ;;
esac
+ # test for cygwin because mv fails w/o .exe extensions
+ case $host in
+ *cygwin*) exeext=.exe ;;
+ *) exeext= ;;
+ esac
$rm $output
trap "$rm $output; exit 1" 1 2 15
@@ -3665,7 +3993,7 @@ relink_command=\"$relink_command\"
# This environment variable determines our operation mode.
if test \"\$libtool_install_magic\" = \"$magic\"; then
# install mode needs the following variable:
- uninst_deplibs='$uninst_deplibs'
+ notinst_deplibs='$notinst_deplibs'
else
# When we are sourced in execute mode, \$file and \$echo are already set.
if test \"\$libtool_execute_magic\" != \"$magic\"; then
@@ -3714,7 +4042,7 @@ else
if test "$fast_install" = yes; then
echo >> $output "\
- program=lt-'$outputname'
+ program=lt-'$outputname'$exeext
progdir=\"\$thisdir/$objdir\"
if test ! -f \"\$progdir/\$program\" || \\
@@ -3733,8 +4061,9 @@ else
# relink executable if necessary
if test -n \"\$relink_command\"; then
- if (eval \$relink_command); then :
+ if relink_command_output=\`eval \$relink_command 2>&1\`; then :
else
+ $echo \"\$relink_command_output\" >&2
$rm \"\$progdir/\$file\"
exit 1
fi
@@ -3859,7 +4188,7 @@ fi\
# Add in members from convenience archives.
for xlib in $addlibs; do
# Extract the objects.
- case "$xlib" in
+ case $xlib in
[\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
*) xabs=`pwd`"/$xlib" ;;
esac
@@ -3903,7 +4232,39 @@ fi\
# fi
# done
- eval cmds=\"$old_archive_cmds\"
+ eval cmds=\"$old_archive_cmds\"
+
+ if len=`expr "X$cmds" : ".*"` &&
+ test $len -le $max_cmd_len; then
+ :
+ else
+ # the command line is too long to link in one step, link in parts
+ $echo "using piecewise archive linking..."
+ save_RANLIB=$RANLIB
+ RANLIB=:
+ objlist=
+ concat_cmds=
+ save_oldobjs=$oldobjs
+ for obj in $save_oldobjs
+ do
+ oldobjs="$objlist $obj"
+ objlist="$objlist $obj"
+ eval test_cmds=\"$old_archive_cmds\"
+ if len=`expr "X$test_cmds" : ".*"` &&
+ test $len -le $max_cmd_len; then
+ :
+ else
+ # the above command should be used before it gets too long
+ oldobjs=$objlist
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+ objlist=
+ fi
+ done
+ RANLIB=$save_RANLIB
+ oldobjs=$objlist
+ eval cmds=\"\$concat_cmds~$old_archive_cmds\"
+ fi
fi
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
@@ -3920,7 +4281,7 @@ fi\
fi
# Now create the libtool archive.
- case "$output" in
+ case $output in
*.la)
old_library=
test "$build_old_libs" = yes && old_library="$libname.$libext"
@@ -3952,7 +4313,7 @@ fi\
# Replace all uninstalled libtool libraries with the installed ones
newdependency_libs=
for deplib in $dependency_libs; do
- case "$deplib" in
+ case $deplib in
*.la)
name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
@@ -3990,6 +4351,11 @@ fi\
dlprefiles="$newdlprefiles"
fi
$rm $output
+ # place dlname in correct position for cygwin
+ tdlname=$dlname
+ case $host,$output,$installed,$module,$dlname in
+ *cygwin*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+ esac
$echo > $output "\
# $outputname - a libtool library file
# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
@@ -3998,7 +4364,7 @@ fi\
# It is necessary for linking the library.
# The name that we can dlopen(3).
-dlname='$dlname'
+dlname='$tdlname'
# Names of this library.
library_names='$library_names'
@@ -4050,7 +4416,7 @@ relink_command=\"$relink_command\""
$echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
# Aesthetically quote it.
arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
- case "$arg" in
+ case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
arg="\"$arg\""
;;
@@ -4066,7 +4432,7 @@ relink_command=\"$relink_command\""
# The real first argument should be the name of the installation program.
# Aesthetically quote it.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
- case "$arg" in
+ case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
arg="\"$arg\""
;;
@@ -4089,7 +4455,7 @@ relink_command=\"$relink_command\""
continue
fi
- case "$arg" in
+ case $arg in
-d) isdir=yes ;;
-f) prev="-f" ;;
-g) prev="-g" ;;
@@ -4114,7 +4480,7 @@ relink_command=\"$relink_command\""
# Aesthetically quote the argument.
arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
- case "$arg" in
+ case $arg in
*[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
arg="\"$arg\""
;;
@@ -4165,11 +4531,11 @@ relink_command=\"$relink_command\""
exit 1
fi
fi
- case "$destdir" in
+ case $destdir in
[\\/]* | [A-Za-z]:[\\/]*) ;;
*)
for file in $files; do
- case "$file" in
+ case $file in
*.lo) ;;
*)
$echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
@@ -4191,7 +4557,7 @@ relink_command=\"$relink_command\""
for file in $files; do
# Do each installation.
- case "$file" in
+ case $file in
*.$libext)
# Do the static libraries later.
staticlibs="$staticlibs $file"
@@ -4210,7 +4576,7 @@ relink_command=\"$relink_command\""
old_library=
relink_command=
# If there is no directory component, then add one.
- case "$file" in
+ case $file in
*/* | *\\*) . $file ;;
*) . ./$file ;;
esac
@@ -4306,7 +4672,7 @@ relink_command=\"$relink_command\""
fi
# Deduce the name of the destination old-style object file.
- case "$destfile" in
+ case $destfile in
*.lo)
staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
;;
@@ -4349,28 +4715,28 @@ relink_command=\"$relink_command\""
# 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
- uninst_deplibs=
+ notinst_deplibs=
relink_command=
# If there is no directory component, then add one.
- case "$file" in
+ case $file in
*/* | *\\*) . $file ;;
*) . ./$file ;;
esac
# Check the variables that should have been set.
- if test -z "$uninst_deplibs"; then
+ if test -z "$notinst_deplibs"; then
$echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
exit 1
fi
finalize=yes
- for lib in $uninst_deplibs; do
+ for lib in $notinst_deplibs; 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
+ case $lib in
*/* | *\\*) . $lib ;;
*) . ./$lib ;;
esac
@@ -4384,7 +4750,7 @@ relink_command=\"$relink_command\""
relink_command=
# If there is no directory component, then add one.
- case "$file" in
+ case $file in
*/* | *\\*) . $file ;;
*) . ./$file ;;
esac
@@ -4422,6 +4788,25 @@ relink_command=\"$relink_command\""
fi
fi
+
+ # remove .exe since cygwin /usr/bin/install will append another
+ # one anyways
+ case $install_prog,$host in
+ */usr/bin/install*,*cygwin*)
+ case $file:$destfile in
+ *.exe:*.exe)
+ # this is ok
+ ;;
+ *.exe:*)
+ destfile=$destfile.exe
+ ;;
+ *:*.exe)
+ destfile=`echo $destfile | sed -e 's,.exe$,,'`
+ ;;
+ esac
+ ;;
+ esac
+
$show "$install_prog$stripme $file $destfile"
$run eval "$install_prog\$stripme \$file \$destfile" || exit $?
test -n "$outputname" && ${rm}r "$tmpdir"
@@ -4461,11 +4846,10 @@ relink_command=\"$relink_command\""
if test -n "$current_libdirs"; then
# Maybe just do a dry run.
test -n "$run" && current_libdirs=" -n$current_libdirs"
- exec $SHELL $0 --finish$current_libdirs
- exit 1
+ exec_cmd='$SHELL $0 --finish$current_libdirs'
+ else
+ exit 0
fi
-
- exit 0
;;
# libtool finish mode
@@ -4503,7 +4887,7 @@ relink_command=\"$relink_command\""
fi
# Exit here if they wanted silent mode.
- test "$show" = : && exit 0
+ test "$show" = ":" && exit 0
echo "----------------------------------------------------------------------"
echo "Libraries have been installed in:"
@@ -4513,7 +4897,7 @@ relink_command=\"$relink_command\""
echo
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 "specify the full pathname of the library, or use the \`-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"
@@ -4563,7 +4947,7 @@ relink_command=\"$relink_command\""
fi
dir=
- case "$file" in
+ case $file in
*.la)
# Check to see that this really is a libtool archive.
if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
@@ -4578,7 +4962,7 @@ relink_command=\"$relink_command\""
library_names=
# If there is no directory component, then add one.
- case "$file" in
+ case $file in
*/* | *\\*) . $file ;;
*) . ./$file ;;
esac
@@ -4633,13 +5017,13 @@ relink_command=\"$relink_command\""
args=
for file
do
- case "$file" in
+ case $file in
-*) ;;
*)
# 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
+ case $file in
*/* | *\\*) . $file ;;
*) . ./$file ;;
esac
@@ -4668,11 +5052,8 @@ relink_command=\"$relink_command\""
LANG="$save_LANG"; export LANG
fi
- # Now actually exec the command.
- eval "exec \$cmd$args"
-
- $echo "$modename: cannot exec \$cmd$args"
- exit 1
+ # Now prepare to actually exec the command.
+ exec_cmd='"$cmd"$args'
else
# Display what would be done.
if test -n "$shlibpath_var"; then
@@ -4689,6 +5070,8 @@ relink_command=\"$relink_command\""
modename="$modename: $mode"
rm="$nonopt"
files=
+ rmforce=
+ exit_status=0
# This variable tells wrapper scripts just to set variables rather
# than running their programs.
@@ -4696,7 +5079,8 @@ relink_command=\"$relink_command\""
for arg
do
- case "$arg" in
+ case $arg in
+ -f) rm="$rm $arg"; rmforce=yes ;;
-*) rm="$rm $arg" ;;
*) files="$files $arg" ;;
esac
@@ -4708,6 +5092,8 @@ relink_command=\"$relink_command\""
exit 1
fi
+ rmdirs=
+
for file in $files; do
dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
if test "X$dir" = "X$file"; then
@@ -4719,9 +5105,29 @@ relink_command=\"$relink_command\""
name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
test $mode = uninstall && objdir="$dir"
+ # Remember objdir for removal later, being careful to avoid duplicates
+ if test $mode = clean; then
+ case " $rmdirs " in
+ *" $objdir "*) ;;
+ *) rmdirs="$rmdirs $objdir" ;;
+ esac
+ fi
+
+ # Don't error if the file doesn't exist and rm -f was used.
+ if (test -L "$file") >/dev/null 2>&1 \
+ || (test -h "$file") >/dev/null 2>&1 \
+ || test -f "$file"; then
+ :
+ elif test -d "$file"; then
+ exit_status=1
+ continue
+ elif test "$rmforce" = yes; then
+ continue
+ fi
+
rmfiles="$file"
- case "$name" in
+ case $name in
*.la)
# Possibly a libtool archive, so verify it.
if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
@@ -4743,6 +5149,9 @@ relink_command=\"$relink_command\""
IFS="$save_ifs"
$show "$cmd"
$run eval "$cmd"
+ if test $? != 0 && test "$rmforce" != yes; then
+ exit_status=1
+ fi
done
IFS="$save_ifs"
fi
@@ -4755,6 +5164,9 @@ relink_command=\"$relink_command\""
IFS="$save_ifs"
$show "$cmd"
$run eval "$cmd"
+ if test $? != 0 && test "$rmforce" != yes; then
+ exit_status=1
+ fi
done
IFS="$save_ifs"
fi
@@ -4765,10 +5177,10 @@ relink_command=\"$relink_command\""
*.lo)
# Possibly a libtool object, so verify it.
- if (sed -e '2q' $arg | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
# Read the .lo file
- . ./$file
+ . $dir/$name
# Add PIC object to the list of files to remove.
if test -n "$pic_object" \
@@ -4799,9 +5211,18 @@ relink_command=\"$relink_command\""
;;
esac
$show "$rm $rmfiles"
- $run $rm $rmfiles
+ $run $rm $rmfiles || exit_status=1
done
- exit 0
+
+ # Try to remove the ${objdir}s in the directories where we deleted files
+ for dir in $rmdirs; do
+ if test -d "$dir"; then
+ $show "rmdir $dir"
+ $run rmdir $dir >/dev/null 2>&1
+ fi
+ done
+
+ exit $exit_status
;;
"")
@@ -4811,13 +5232,20 @@ relink_command=\"$relink_command\""
;;
esac
- $echo "$modename: invalid operation mode \`$mode'" 1>&2
- $echo "$generic_help" 1>&2
- exit 1
+ if test -z "$exec_cmd"; then
+ $echo "$modename: invalid operation mode \`$mode'" 1>&2
+ $echo "$generic_help" 1>&2
+ exit 1
+ fi
fi # test -z "$show_help"
+if test -n "$exec_cmd"; then
+ eval exec $exec_cmd
+ exit 1
+fi
+
# We need to display help for each of the modes.
-case "$mode" in
+case $mode in
"") $echo \
"Usage: $modename [OPTION]... [MODE-ARG]...
@@ -4873,6 +5301,8 @@ 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
+ -prefer-pic try to building PIC objects only
+ -prefer-non-pic try to building non-PIC objects only
-static always build a \`.o' file suitable for static linking
COMPILE-COMMAND is a command to be used in creating a \`standard' object file
@@ -4956,6 +5386,7 @@ The following components of LINK-COMMAND are treated specially:
-no-install link a not-installable executable
-no-undefined declare that a library does not refer to external symbols
-o OUTPUT-FILE create OUTPUT-FILE from the specified objects
+ -objectlist FILE Use a list of object files found in FILE to specify 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
diff --git a/contrib/binutils/opcodes/ChangeLog b/contrib/binutils/opcodes/ChangeLog
index ad0dc07..f4489d4 100644
--- a/contrib/binutils/opcodes/ChangeLog
+++ b/contrib/binutils/opcodes/ChangeLog
@@ -1,6 +1,395 @@
-2001-10-24 Richard Henderson <rth@redhat.com>
+2002-01-26 Nick Clifton <nickc@cambridge.redhat.com>
- * ia64-asmtab.c: Regenerate.
+ * po/fr.po: Updated version.
+
+2002-01-25 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * po/es.po: Updated version.
+
+2002-01-24 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * po/da.po: New version.
+
+2002-01-23 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * po/da.po: New file: Spanish translation.
+ * configure.in (ALL_LINGUAS): Add da.
+ * configure: Regenerate.
+
+2002-01-22 Graydon Hoare <graydon@redhat.com>
+
+ * fr30-asm.c: Regenerate.
+ * fr30-desc.c: Likewise.
+ * fr30-desc.h: Likewise.
+ * fr30-dis.c: Likewise.
+ * fr30-ibld.c: Likewise.
+ * fr30-opc.c: Likewise.
+ * fr30-opc.h: Likewise.
+ * m32r-asm.c: Likewise.
+ * m32r-desc.c: Likewise.
+ * m32r-desc.h: Likewise.
+ * m32r-dis.c: Likewise.
+ * m32r-ibld.c: Likewise.
+ * m32r-opc.c: Likewise.
+ * m32r-opc.h: Likewise.
+ * m32r-opinst.c: Likewise.
+ * openrisc-asm.c: Likewise.
+ * openrisc-desc.c: Likewise.
+ * openrisc-desc.h: Likewise.
+ * openrisc-dis.c: Likewise.
+ * openrisc-ibld.c: Likewise.
+ * openrisc-opc.c: Likewise.
+ * openrisc-opc.h: Likewise.
+ * xstormy16-desc.c: Likewise.
+
+2002-01-22 Richard Henderson <rth@redhat.com>
+
+ * alpha-dis.c (print_insn_alpha): Also mask the base opcode for
+ comparison.
+
+2002-01-22 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
+ * opcodes/po/POTFILES.in: Regenerate.
+
+2002-01-19 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm-opc.h (arm_opcodes): Use generic rule %5?hb instead of %h.
+ * arm-dis.c (print_insn_arm): Don't handle 'h' case.
+
+2002-01-18 Keith Walker <keith.walker@arm.com>
+
+ * arm-opc.h (arm_opcodes): Add bxj instruction.
+
+2002-01-17 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * po/opcodes.pot: Regenerate.
+ * po/fr.po: Regenerate.
+ * po/sv.po: Regenerate.
+ * po/tr.po: Regenerate.
+
+2002-01-16 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * po/tr.po: Import new version.
+
+2002-01-15 Richard Earnshaw <rearnsha@arm.com>
+
+ * arm-opc.h (arm_opcodes): Add patterns for VFP instructions.
+ * arm-dis.c (print_insn_arm): Support new disassembly qualifiers for
+ VFP bitfields.
+
+2002-01-10 matthew green <mrg@redhat.com>
+
+ * xstormy16-asm.c: Regenerate.
+ * xstormy16-desc.c: Likewise.
+ * xstormy16-desc.h: Likewise.
+ * xstormy16-dis.c: Likewise.
+ * xstormy16-opc.c: Likewise.
+ * xstormy16-opc.h: Likewise.
+
+2002-01-07 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * po/es.po: New file: Spanish translation.
+ * configure.in (ALL_LINGUAS): Add es.
+ * configure: Regenerate.
+
+2001-12-31 Jeffrey A Law (law@redhat.com)
+
+ * hppa-dis.c (print_insn_hppa): Handle new 'c' mode completers,
+ 'X', 'M', and 'A'. No longer emit a space after 'x' or 's'.
+ Always emit a space after 'H'.
+
+2001-12-18 matthew green <mrg@redhat.com>
+
+ * ppc-opc.c (PPCVEC): Include PPC_OPCODE_ANY.
+
+2001-12-17 Richard Henderson <rth@redhat.com>
+
+ * alpha-opc.c (unop): Encode with RB as $sp.
+
+2001-12-07 Geoffrey Keating <geoffk@redhat.com>
+
+ * Makefile.am: Add support for xstormy16.
+ * Makefile.in: Regenerate.
+ * configure.in: Add support for xstormy16.
+ * configure: Regenerate.
+ * disassemble.c: Add support for xstormy16.
+ * xstormy16-asm.c: New generated file.
+ * xstormy16-desc.c: New generated file.
+ * xstormy16-desc.h: New generated file.
+ * xstormy16-dis.c: New generated file.
+ * xstormy16-ibld.c: New generated file.
+ * xstormy16-opc.c: New generated file.
+ * xstormy16-opc.h: New generated file.
+
+2001-12-06 Richard Henderson <rth@redhat.com>
+
+ * alpha-opc.c (alpha_opcodes): Add wh64en.
+
+2001-12-04 Alexandre Oliva <aoliva@redhat.com>
+
+ * d10v-opc.c (d10v_predefined_registers): Remove warnings
+ introduced in Nov 29's patch.
+
+ * d10v-dis.c (print_operand): Apply REGISTER_MASK to `num' of
+ unmatched register.
+
+ * d10v-dis.c (print_operand): Disregard OPERAND_SP in register
+ predefined value.
+
+ * d10v-opc.c (RSRC_NOSP): New macro.
+ (d10v_operands): Add it.
+ (d10v_opcodes): Use RSRC_NOSP in post-decrement "st" and "st2w".
+
+2001-11-29 Alexandre Oliva <aoliva@redhat.com>
+
+ * d10v-opc.c (d10v_predefined_registers): Mark `sp' as OPERAND_SP.
+ (RSRC_SP): New macro.
+ (d10v_operands): Add it.
+ (d10v_opcodes): Adjust "st" and "st2w" to use RSRC_SP.
+
+2001-11-23 Lars Brinkhoff <lars@nocrew.org>
+
+ * pdp11-dis.c (print_insn_pdp11): Handle illegal instructions.
+ Also, break out of the loop as soon as an instruction has been
+ printed.
+
+2001-11-17 matthew green <mrg@redhat.com>
+
+ * ppc-opc.c (mfvrsave, mtvrsave): New instructions.
+
+2001-11-15 Alan Modra <amodra@bigpond.net.au>
+
+ * po/POTFILES.in: Regenerate.
+
+ * ppc-opc.c (PPC64): Revert 2001-10-12. Do include PPC_OPCODE_PPC.
+ (insert_bat, extract_bat, insert_bba, extract_bba,
+ insert_bd, extract_bd, insert_bdm, extract_bdm,
+ insert_bdp, extract_bdp, valid_bo,
+ insert_bo, extract_bo, insert_boe, extract_boe,
+ insert_ds, extract_ds, insert_de, extract_de,
+ insert_des, extract_des, insert_li, extract_li,
+ insert_mbe, extract_mbe, insert_mb6, extract_mb6,
+ insert_nb, extract_nb, insert_nsi, extract_nsi,
+ insert_ral, insert_ram, insert_ras,
+ insert_rbs, extract_rbs, insert_sh6, extract_sh6,
+ insert_spr, extract_spr, insert_tbr, extract_tbr): Add dialect param.
+ (extract_bd, extract_bdm, extract_bdp,
+ extract_ds, extract_des,
+ extract_li, extract_nsi): Implement sign extension without conditional.
+ (insert_bdm, extract_bdm,
+ insert_bdp, extract_bdp, valid_bo): Handle 64 bit branch hints.
+ (extract_bdm, extract_bdp): Correct 32 bit validation.
+ (AT1_MASK, AT2_MASK): Define.
+ (BBOAT_MASK): Define.
+ (BBOATCB_MASK, BBOAT2CB_MASK, BBOATBI_MASK): Define.
+ (BOFM64, BOFP64, BOTM64, BOTP64): Define.
+ (BODNZM64, BODNZP64, BODZM64, BODZP64): Define.
+ (PPCCOM32, PPCCOM64): Define.
+ (powerpc_opcodes): Modify existing 32 bit insns with branch hints
+ and add new patterns to implement 64 bit branches with hints. Move
+ booke instructions so they match before ppc64.
+
+ * ppc-dis.c (powerpc_dialect): Set PPC_OPCODE_64 in dialect for
+ 64 bit default targets, and parse "32" and "64" in options.
+ Formatting fixes.
+ (print_insn_powerpc): Pass dialect to operand->extract.
+
+2001-11-14 Dave Brolley <brolley@redhat.com>
+
+ * cgen-dis.c (count_decodable_bits): New function.
+ (add_insn_to_hash_chain): New function.
+ (hash_insn_array): Call add_insn_to_hash_chain.
+ (hash_insn_list): Call add_insn_to_hash_chain.
+ * m32r-dis.c: Regenerated.
+ * fr30-dis.c: Regenerated.
+
+2001-11-14 Andreas Jaeger <aj@suse.de>
+
+ * i386-dis.c (print_insn): Use x86-64 as option.
+
+2001-11-14 Alan Modra <amodra@bigpond.net.au>
+
+ * disassemble.c (disassembler): Call print_insn_i386.
+ * i386-dis.c (SUFFIX_ALWAYS): Define.
+ (struct dis_private): Add orig_sizeflag.
+ (print_insn_i386): Make it a wrapper, calling..
+ (print_insn): ..The old body of print_insn_i386. Avoid longjmp
+ warning without using volatile by moving orig_sizeflag to priv,
+ and removing inbuf. Parse disassembler_options.
+ (print_insn_i386_att, print_insn_i386_intel): Move initialisation
+ code to print_insn.
+ (putop): Remove #ifdef SUFFIX_ALWAYS.
+
+2001-11-11 Timothy Wall <twall@alum.mit.edu>
+
+ * tic54x-dis.c: Use revised opcode structure. Export opcode
+ template lookup.
+ (has_lkaddr): Don't forget about Lmem insns.
+ * tic54x-opc.c: Add emulation trap. Parallel table now uses
+ standard opcode templates.
+
+2001-11-13 Zack Weinberg <zack@codesourcery.com>
+
+ * i386-dis.c (grps): Change "sldt", "str", and "smsw" entries
+ to "sldtQ", "strQ", "smswQ" respectively; all with Ev operand
+ category instead of Ew.
+
+2001-11-12 Niraj Gupta <ngupta@zumanetworks.com>
+
+ * m68k-opc.c: Fix definitions of wddata[bwl].
+
+2001-11-09 Richard Sandiford <rsandifo@redhat.com>
+
+ * cgen-asm.c (cgen_parse_keyword): If the keyword is too big to
+ fit in the buffer, try to match the empty keyword.
+
+2001-11-09 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * cgen-ibld.in (extract_1): Fix badly placed #if 0.
+ * fr30-ibld.c: Regenerate.
+ * m32r-ibld.c: Regenerate.
+ * openrisc-ibld.c: Regenerate.
+
+2001-11-04 Chris Demetriou <cgd@broadcom.com>
+
+ * mips-dis.c (print_insn_mips): Remove spaces at end of line.
+
+2001-11-02 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * configure.in (ALL_LINGUAS): Add "fr", "sv" and "tr".
+ * configure: Regernate.
+ * po/fr.po: New file.
+ * po/sv.po: New file.
+ * po/tr.po: New file.
+
+2001-11-01 Stephane Carrez <Stephane.Carrez@worldnet.fr>
+
+ * m68hc11-dis.c (print_insn): Fix disassembly of movb with a
+ constant as source.
+
+2001-10-30 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * Makefile.am (CFILES): Add mmix-dis.c and mmix-opc.c. Regenerate
+ dependencies.
+ * Makefile.in: Regenerate.
+ * mmix-dis.c, mmix-opc.c: New files.
+
+2001-10-29 Kazu Hirata <kazu@hxi.com>
+
+ * d30v-dis.c: Fix a comment typo.
+
+2001-10-23 Chris Demetriou <cgd@broadcom.com>
+
+ * mips-opc.c (mips_builtin_opcodes): Mark "bgezall" and
+ "bltzall" as writing GPR 31 (since they do).
+
+ * mips-dis.c (print_insn_arg): Calculate info->target
+ where appropriate.
+ (print_insn_mips): Fill in instruction info.
+ (print_mips16_insn_arg): Remove unneded variable 'val'.
+ Removed duplicated instruction target calculations,
+ calculate once and print that result. Use same idiom for
+ masking the jump segment bits as is used in print_insn_arg.
+
+2001-10-20 Alan Modra <amodra@bigpond.net.au>
+
+ * ppc-opc.c (CT): Make it an optional operand.
+
+2001-10-17 Chris Demetriou <cgd@broadcom.com>
+
+ * mips-dis.c (mips_isa_type): Make the ISA used to disassemble
+ SB-1 binaries include instructions specific to the SB-1.
+ * mips-opc.c (SB1): New definition.
+ (mips_builtin_opcodes): Add SB-1 extension opcodes "div.ps",
+ "recip.ps", "rsqrt.ps", and "sqrt.ps".
+
+2001-10-17 matthew green <mrg@redhat.com>
+
+ * ppc-opc.c (STRM): New AltiVec operand.
+ (XDSS): New AltiVec instruction form.
+ (mtvscr): Correct operand list.
+ (dst, dstt, dstst, dststt, dss, dssall): AltiVec instructions.
+
+2001-10-17 Alan Modra <amodra@bigpond.net.au>
+
+ * po/POTFILES.in: Regenerate.
+
+2001-10-13 matthew green <mrg@redhat.com>
+
+ * ppc-opc.c (MO): New macro for MO field of mbar instruction.
+ (powerpc_opcodes): Add rfci, wrtee, wrteei, mfdcrx, mfdcr,
+ mtdcrx, mtdcr, msync, dcba and mbar as BookE instructions.
+
+2001-10-13 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * cgen-ibld.in: Include safe-ctype.h in preference to
+ ctype.h.
+ * cgen-asm.in: Include safe-ctype.h in preference to
+ ctype.h. Fix formatting. Use ISSPACE instead of isspace and
+ TOLOWER instead of tolower.
+ (@arch@_cgen_build_insn_regex): Remove duplication of syntax
+ string elements in constructed regular expression.
+ * fr30-asm.c: Regenerate.
+ * fr30-desc.c: Regenerate.
+ * fr30-ibld.c: Regenerate.
+ * m32r-asm.c: Regenerate.
+ * m32r-desc.c: Regenerate.
+ * m32r-ibld.c: Regenerate.
+ * openrisc-asm.c: Regenerate.
+ * openrisc-desc.c: Regenerate.
+ * openrisc-ibld.c: Regenerate.
+ * po/opcodes.pot: Regenerate.
+
+2001-10-12 matthew green <mrg@redhat.com>
+
+ * ppc-opc.c (insert_de, extract_de, insert_des, extract_des): New
+ instruction field instruction/extraction functions for new BookE
+ DE form instructions.
+ (CT): New macro for CT field in an X form instruction.
+ (DE, DES, DEO, DE_MASK): New macros for DE/DES fields in DE form
+ instructions.
+ (PPC64): Don't include PPC_OPCODE_PPC.
+ (403): New opcode macro for PPC403 processors.
+ (BOOKE): New opcode macro for BookE processors.
+ (bce, bcel, bcea, bcela, bclre, bclrel: New BookE instructions.
+ (bcctre, bcctrel, be, bel, bea, bela, icbt, icbte, lwzxe): Likewise.
+ (dcbste, lwzuxe, luxe, dcbfe, lbzxe, lwarxe, lbzuxe): Likewise.
+ (stwcxe, stwxe, stxe, stwuxe, stuxe, stbxe, dcbtste, stbuxe): Likewise.
+ (mfapidi, dcbte, lhzxe, lhzuxe, lhaxe, lhauxe, subfe64): Likewise.
+ (subfeo64, adde64, addeo64, sthxe, sthuxe, subfze64): Likewise.
+ (subfzeo64, addze64, addzeo64, dcbie, subfme64, subfmeo64): Likewise.
+ (addme64, addmeo64, stdcxe., mcrxr64, lwbrxe, lfsxe, lfsuxe): Likewise.
+ (lfdxe, lfduxe, stwbrxe, stfsxe, stfsuxe, stfdxe, dcbae): Likewise.
+ (stfduxe, tlbivax, tlbivaxe, lhbrxe, ldxe, lduxe, tlbsx): Likewise.
+ (tlbsxe, sthbrxe, stdxe, stduxe, icbie, stfiwxe, dcbze, lbze): Likewise.
+ (lbzue, ldue, lhze, lhzue, lhae, lhaue, lwze, lwzue): Likewise.
+ (stbe, stbue, sthe, sthue, stwe, stwue, lfse, lfsue, lfde): Likewise.
+ (lfdue, stde, stdue, stfse, stfsue, stfde, stfdue): Likewise.
+
+ * ppc-dis.c (print_insn_big_powerpc, print_insn_little_powerpc): Look
+ for a disassembler option of `booke', `booke32' or `booke64' to enable
+ BookE support in the disassembler.
+
+2001-10-12 John Healy <jhealy@redhat.com>
+
+ * cgen-dis.in (print_insn): Use min (cd->base_insn_bitsize, buflen*8)
+ for the length when extracting the base part of the insn.
+
+2001-10-09 Bruno Haible <haible@clisp.cons.org>
+
+ * cgen-asm.in (*_cgen_build_insn_regex): Generate a case sensitive
+ regular expression. Fix some formatting problems.
+ * fr30-asm.c: Regenerate.
+ * openrisc-asm.c: Regenerate.
+ * m32r-asm.c: Regenerate.
+
+2001-10-09 Christian Groessler <cpg@aladdin.de>
+
+ * z8k-dis.c (unparse_instr): Fixed formatting. Change disassembly
+ of indirect register memory accesses to be same format the
+ assembler accepts.
2001-10-09 Nick Clifton <nickc@cambridge.redhat.com>
@@ -8,32 +397,443 @@
DSP single data transfer instructions.
* sh-dis.c (print_insn_shx): Fix decoding of As opcode in DSP
- instructions.
+ instructions.
+
+2001-10-08 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * cgen-asm.in: Fix compile time warning messages in generated
+ C files.
+ * cgen-dis.in: The same.
+ * cgen-ibld.in: The same.
+ * fr30-asm.c: Regenerate.
+ * fr30-desc.c: Regenerate.
+ * fr30-dis.c: Regenerate.
+ * fr30-ibld.c: Regenerate.
+ * fr30-opc.c: Regenerate.
+ * m32r-asm.c: Regenerate.
+ * m32r-desc.c: Regenerate.
+ * m32r-dis.c: Regenerate.
+ * m32r-ibld.c: Regenerate.
+ * m32r-opc.c: Regenerate.
+ * m32r-opinst.c Regenerate.
+ * openrisc-asm.c: Regenerate.
+ * openrisc-desc.c: Regenerate.
+ * openrisc-dis.c: Regenerate.
+ * openrisc-ibld.c: Regenerate.
+ * openrisc-opc.c: Regenerate.
+ * openrisc-opc.h: Regenerate.
+ * Makefile.in: Regenerate.
+ * po/POTFILES.in: Regenerate.
+ * po/opcodes.pot: Regenerate.
+
+2001-10-08 Aldy Hernandez <aldyh@redhat.com>
+
+ * arm-opc.h (arm_opcodes): Add cirrus insns.
+
+ * arm-dis.c (print_insn_arm): Add 'I' case.
+
+2001-10-03 Alan Modra <amodra@bigpond.net.au>
+
+ * po/POTFILES.in: Regenerate.
+ * configure: Regenerate.
+
+2001-10-02 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am (Makefile): Depend on bfd/configure.in.
+ Run "make dep-am".
+ * Makefile.in: Regenerate.
+
+2001-09-30 John Healy <jhealy@redhat.com>
+
+ * cgen-ibld.in (insert_1): Switched bfd_get_bits and bfd_set_bits
+ calls to cgen_get_insn_value and cgen_put_insn_value calls.
+ (extract_1): Switched bfd_get_bits call to cgen_get_insn_value call.
+
+2001-09-30 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * Makefile.am: Update dependencies with "make dep-am".
+ * Makefile.in: Regenerate.
+
+2001-09-26 Alan Modra <amodra@bigpond.net.au>
+
+ * arc-dis.c: Formatting fixes.
+ (my_sprintf): Define using VPARAMS, VA_OPEN, VA_FIXEDARG, VA_CLOSE.
+
+2001-09-21 Bruno Haible <haible@clisp.cons.org>
+
+ * arc-dis.c: Don't include <ctype.h>.
+ * openrisc-desc.c: Likewise.
+ * openrisc-ibld.c: Likewise.
+
+2001-09-20 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * fr30-opc.c: Fix compile time warning messages.
+ * i370-opc.c: Fix compile time warning messages.
+ * i960-dis.c: Fix compile time warning messages.
+ * m32r-asm.c: Fix compile time warning messages.
+ * m32r-desc.c: Fix compile time warning messages.
+ * m32r-dis.c: Fix compile time warning messages.
+ * m32r-ibld.c: Fix compile time warning messages.
+ * m32r-opc.c: Fix compile time warning messages.
+ * m32r-opinst.c: Fix compile time warning messages.
+ * ns32k-dis.c: Fix compile time warning messages.
+ * openrisc-asm.c: Fix compile time warning messages.
+ * openrisc-desc.c: Fix compile time warning messages.
+ * openrisc-dis.c: Fix compile time warning messages.
+ * openrisc-ibld.c: Fix compile time warning messages.
+ * openrisc-opc.c: Fix compile time warning messages.
+ * pdp11-dis.c: Fix compile time warning messages.
+ * tic54x-dis.c: Fix compile time warning messages.
+ * v850-opc.c: Fix compile time warning messages.
+ * vax-dis.c: Fix compile time warning messages.
+ * w65-opc.h: Fix compile time warning messages.
+ * z8k-opc.h: Fix compile time warning messages.
+ * z8kgen.c: Fix compile time warning messages.
+
+2001-09-19 Nick Clifton <nickc@cambridge.redhat.com>
+
+ * arm-dis.c: Fix compile time warning messages.
+ * cgen-asm.c: Fix compile time warning messages.
+ * cgen-dis.c: Fix compile time warning messages.
+ * cris-dis.c: Fix compile time warning messages.
+ * d10v-dis.c: Fix compile time warning messages.
+ * fr30-asm.c: Fix compile time warning messages.
+ * fr30-desc.c: Fix compile time warning messages.
+ * fr30-dis.c: Fix compile time warning messages.
+ * fr30-ibld.c: Fix compile time warning messages.
+
+2001-09-18 Bruno Haible <haible@clisp.cons.org>
+
+ * cgen-asm.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (cgen_parse_keyword): Use ISALNUM instead of isalnum.
+ * cgen-opc.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (cgen_keyword_lookup_name): Use ISALPHA/TOLOWER instead of
+ isalpha/tolower.
+ (cgen_keyword_add): Use ISALNUM instead of isalnum.
+ (hash_keyword_name): Use TOLOWER instead of tolower.
+ * fr30-asm.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (parse_insn_normal): Use TOLOWER/ISSPACE instead of
+ tolower/isspace.
+ (fr30_cgen_assemble_insn): Use ISSPACE instead of isspace.
+ * fr30-desc.c: Don't include <ctype.h>.
+ * fr30-ibld.c: Likewise.
+ * ia64-gen.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (load_insn_classes, parse_resource_users, load_depfile): Use
+ ISSPACE instead of isspace.
+ * m32r-asm.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (parse_insn_normal): Use TOLOWER/ISSPACE instead of
+ tolower/isspace.
+ (m32r_cgen_assemble_insn): Use ISSPACE instead of isspace.
+ * m32r-desc.c: Don't include <ctype.h>.
+ * m32r-ibld.c: Likewise.
+ * openrisc-asm.c: Include "safe-ctype.h" instead of <ctype.h>.
+ (parse_insn_normal): Use TOLOWER/ISSPACE instead of
+ tolower/isspace.
+ (openrisc_cgen_assemble_insn): Use ISSPACE instead of isspace.
+
+2001-09-18 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * Makefile.am: Add rules and dependencies to create the s/390 opcode
+ table out of s390-opc.txt automatically.
+ * configure.in: Add BFD_CC_FOR_BUILD to allow CC_FOR_BUILD to be used.
+ * s390-mkopc.c (dumpTable): Change output to create a complete file.
+ * s390-opc.c: New improved opcode format macros and remove the
+ pregenerated opcode table.
+ * s390-opc.txt: Adapt to new improved opcode format macros.
+
+2001-09-14 David Schleef <ds@schleef.org>
+
+ * ppc-opc.c (VXA, VXA_MASK): Fix mask bits.
2001-09-04 Alan Modra <amodra@bigpond.net.au>
* i386-dis.c (grps): Don't print the implicit al/ax/eax register
for opcode 0xf6 or 0xf7 forms of mul, imul, div, idiv insns.
- Merge from mainline.
- 2001-07-28 Kazu Hirata <kazu@hxi.com>
+2001-08-31 Eric Christopher <echristo@redhat.com>
+ Jason Eckhardt <jle@redhat.com>
+
+ * mips-dis.c: Add support for bfd_mach_mipsisa32 and
+ bfd_mach_mipsisa64. Remove bfd_mach_mips32, bfd_mach_mips32_4k,
+ bfd_mach_mips64.
+
+2001-08-31 Andreas Jaeger <aj@suse.de>
+
+ * tic54x-opc.c: Add default initializers to avoid warnings.
+
+ * arc-opc.c: Include "sysdep.h" to get stdio.h as include file.
+ * arc-ext.c: Likewise.
+
+2001-08-28 matthew gren <mrg@redhat.com>
+
+ * ppc-opc.c (icbt): Order correctly.
+
+2001-08-27 David Edelsohn <dje@watson.ibm.com>
+ Torbjorn Granlund <tege@swox.com>
+
+ * ppc-opc.c (DS): Add PPC_OPERAND_DS flag.
+ (LS): Define.
+ (insert_ds): Complain if not a multiple of 4.
+ (XSYNC): Define.
+ (XSYNC_MASK): Define.
+ (powerpc_opcodes): Add "slbmte", "lwsync", "ptesync", "slbmfev",
+ "slbmfee". Modify "sync" to use XSYNC_MASK and LS.
+
+2001-08-26 Andreas Jaeger <aj@suse.de>
+
+ * h8500-opc.h: Add default initializers to h8500_table to shut up
+ GCC warnings.
+
+2001-08-25 Andreas Jaeger <aj@suse.de>
+
+ * tic54x-dis.c: Add unused attributes where needed.
+
+ * z8k-dis.c (output_instr): Add unused attribute.
+
+ * h8300-dis.c: Add missing prototypes.
+ (bfd_h8_disassemble): Make static.
+
+ * cris-dis.c: Add missing prototype.
+ * h8500-dis.c: Likewise.
+ * m68hc11-dis.c: Likewise.
+ * pj-dis.c: Likewise.
+ * tic54x-dis.c: Likewise.
+ * v850-dis.c: Likewise.
+ * vax-dis.c: Likewise.
+ * w65-dis.c: Likewise.
+ * z8k-dis.c: Likewise.
+
+ * d10v-dis.c: Add missing prototype.
+ (dis_long): Remove unused variable.
+ (dis_2_short): Likewise.
+
+ * sh-dis.c: Add missing prototypes.
+ * v850-opc.c: Likewise.
+ Add unused attributes where needed.
+
+ * ns32k-dis.c: Add missing prototypes.
+ (bit_extract_simple): Remove unused variable.
+
+2001-08-23 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * opcodes/s390-opc.c: Add "low or high" and "not low or high"
+ branch instructions for gcc 3.0.
+ * opcodes/s390-opc.txt: Likewise.
+
+2001-08-21 Andreas Jaeger <aj@suse.de>
+
+ * i960-dis.c: Add parameters for prototypes
+ (ctrl): Add unused attributes.
+ (cobr): Likewise.
+ (put_abs): Likewise.
+
+ * mips-dis.c: Add missing prototypes.
+ * a29k-dis.c: Likewise.
+ * arc-dis.c: Likewise.
+ * ia64-opc.c: Likewise.
+
+ * s390-dis.c: Add missing prototypes.
+ (init_disasm): Remove unused attribute since the parameter is
+ used.
+
+2001-08-16 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * mips-opc.c (M1): Define. Reformatted Code.
+ (mips_builtin_opcodes): Added performance counter opcodes mfpc, mfps,
+ mtps, mtps. Typo.
+
+2001-08-16 Jonathan Larmour <jlarmour@redhat.com>
+
+ * mips-opc.c: R3900s can support all branch likely INSN_MACROs where
+ the corresponding non-likely insn is in MIPS I.
+
+2001-08-13 Kazu Hirata <kazu@hxi.com>
+
+ * mcore-dis.c: Fix formatting.
+ * mips-dis.c: Likewise.
+ * pj-dis.c: Likewise.
+ * z8k-dis.c: Likewise.
+
+2001-08-12 Richard Henderson <rth@redhat.com>
+
+ * cgen-ibld.in (extract_normal): Match type of VALUE and MASK
+ to *VALUEP. Regenerate all cgen files.
+
+2001-08-10 Richard Sandiford <rsandifo@redhat.com>
+
+ * mips-dis.c (print_insn_mips): Remove OPCODE_IS_MEMBER's gp32
+ argument.
+ * mips-opc.c (G6): Undefine.
+ (mips_builtin_opcodes): Remove gp32 entry for "move". Add macro
+ as the first "move" alternative.
+
+2001-08-10 Andreas Jaeger <aj@suse.de>
+
+ * configure.in: Add -Wstrict-prototypes and -Wmissing-prototypes
+ to build warnings.
+ * configure: Regenerate.
+
+2001-08-10 Alan Modra <amodra@bigpond.net.au>
+
+ * ppc-opc.c: Revert 2001-08-08.
+
+2001-08-09 Alan Modra <amodra@bigpond.net.au>
+
+ * dis-buf.c (generic_strcat_address): Add missing prototype.
+ #if 0 the functions as it is unused.
+
+2001-08-08 Alan Modra <amodra@bigpond.net.au>
+
+ 1999-10-25 Torbjorn Granlund <tege@swox.com>
+ * ppc-opc.c: Include "bfd.h".
+ (powerpc_operands): Add new field for reloc type.
+
+2001-07-21 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * mips-dis.c (print_insn_arg): Don't use software integer registers
+ for coprocessor registers.
+ (get_mips_isa): Removed.
+ (is_newabi): New function, checks if NewABI is used.
+ (_print_insn_mips): Get distinction between old ABI and new ABI right.
+
+2001-08-01 Christian Groessler <cpg@aladdin.de>
+
+ * z8kgen.c: Fixed indentation of opt[] array. Include stdio.h to
+ get stderr definition.
+ (internal, gas): Removed warnings.
+ (gas): Create a correct final entry for created array.
+ * z8k-opc.h: Recreated with new z8kgen.
+
+2001-07-28 Kazu Hirata <kazu@hxi.com>
+
* i386-dis.c: Fix formatting.
- 2001-07-28 Matthias Kramm <kramm@quiss.org>
+2001-07-28 Matthias Kramm <kramm@quiss.org>
+
* i386-dis.c: Change formatting conventions for architecture
i386:intel to better match the format of various intel i386
assemblers, like nasm, tasm or masm.
- 2001-07-18 Alan Modra <amodra@bigpond.net.au>
+2001-07-24 Alan Modra <amodra@bigpond.net.au>
+
+ * Makefile.am: Update dependencies with "make dep-am".
+ * Makefile.in: Regenerate
+
+2001-07-24 Kazu Hirata <kazu@hxi.com>
+
+ * alpha-dis.c: Fix formatting.
+ * cris-dis.c: Likewise.
+ * d10v-dis.c: Likewise.
+ * d30v-dis.c: Likewise.
+ * m10300-dis.c: Likewise.
+ * tic54x-dis.c: Likewise.
+
+2001-07-23 Kazu Hirata <kazu@hxi.com>
+
+ * m68k-dis.c: Fix formatting.
+ * pj-dis.c: Likewise.
+ * s390-dis.c: Likewise.
+ * z8k-dis.c: Likewise.
+
+2001-07-21 Chris Demetriou <cgd@broadcom.com>
+
+ * mips-opc.c (mips_builtin_opcodes): Sort c.le.s and c.lt.s
+ into the rest of the surrounding definitions.
+
+2001-07-18 Alan Modra <amodra@bigpond.net.au>
+
* i386-dis.c (grps): Print l or w suffix, and require mem modrm
for lgdt, lidt, sgdt, sidt.
- 2001-07-09 Andreas Jaeger <aj@suse.de>, Karsten Keil <kkeil@suse.de>
+2001-07-13 Philip Blundell <philb@gnu.org>
+
+ * arm-dis.c (print_insn_arm): Use decimal for offsets in LDR/STR.
+
+2001-07-12 Jeff Johnston <jjohnstn@redhat.com>
+
+ * cgen-asm.in: Include "xregex.h" always to enable the libiberty
+ regex support.
+ (@arch@_cgen_build_insn_regex): New routine from Graydon.
+ (@arch@_cgen_assemble_insn): Add Graydon's code to use regex
+ to verify if it is worth parsing the insn as insn "x". Also update
+ error message when insn is not a recognized format of the insn vs
+ when the insn is completely unrecognized.
+
+2001-07-11 Frank Ch. Eigler <fche@redhat.com>
+
+ * cgen-dis.in (print_insn): Use cgen_get_insn_value instead of
+ bfd_get_bits.
+ * cgen-opc.c (cgen_get_insn_value, cgen_put_insn_value): Respect
+ non-zero CGEN_CPU_DESC->insn_chunk_bitsize.
+
+2001-07-09 Andreas Jaeger <aj@suse.de>, Karsten Keil <kkeil@suse.de>
+
* i386-dis.c (set_op): Handle 64 bit and 32 bit mode.
(OP_J): Use bfd_vma for mask to work properly with 64 bits.
(op_address,op_riprel): Use bfd_vma to handle 64 bits.
- 2001-06-11 Alan Modra <amodra@bigpond.net.au>
+2001-07-05 Ben Elliston <bje@redhat.com>
+
+ * Makefile.am (CPUDIR): Define.
+ (stamp-m32r): Update dependencies.
+ (stamp-fr30): Ditto.
+ (stamp-openrisc): Ditto.
+ * Makefile.in: Regenerate.
+
+2001-07-03 Zoltan Hidvegi <hzoli@hzoli.2y.net>
+
+ * ppc-opc.c: Fix encoding of 'clf' instruction.
+
+2001-06-30 Geoffrey Keating <geoffk@redhat.com>
+
+ * cgen-ibld.in (insert_normal): Support CGEN_IFLD_SIGN_OPT.
+
+2001-06-28 Geoffrey Keating <geoffk@redhat.com>
+
+ * cgen-asm.c (cgen_parse_keyword): Allow any first character.
+ * cgen-opc.c (cgen_keyword_add): Ignore special first
+ character when building nonalpha_chars field.
+
+2001-06-24 Ben Elliston <bje@redhat.com>
+
+ * m88k-dis.c: Format to conform to GNU coding standards.
+
+2001-06-23 Andreas Jaeger <aj@suse.de>
+
+ * disassemble.c (disassembler_usage): Add unused attribute.
+
+2001-06-22 Eric Christopher <echristo@redhat.com>
+
+ * mips-opc.c: Move prefx to start of the table.
+
+2001-06-22 Stacey Sheldon <ssheldon@Catena.com>
+
+ * arc-opc.c (insert_st_syntax): Fix over-optimisation of ST
+ instruction.
+
+2001-06-22 Pauli <pauli@moreton.com.au>
+
+ * m68k-opc.c: Add wdebug instruction.
+
+2001-06-15 Aldy Hernandez <aldyh@redhat.com>
+
+ * m10300-opc.c (mn10300_opcodes): Change opcode for AM33 subc.
+
+2001-06-14 Geoffrey Keating <geoffk@redhat.com>
+
+ * cgen-asm.c (cgen_parse_keyword): When looking for the
+ boundaries of a keyword, allow any special characters
+ that are actually in one of the allowed keyword.
+ * cgen-opc.c (cgen_keyword_add): Add any special characters
+ to the nonalpha_chars field.
+
+2001-06-12 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * s390-opc.c: Add lgh instruction.
+ * s390-opc.txt: Likewise.
+
+2001-06-11 Alan Modra <amodra@bigpond.net.au>
+
* i386-dis.c: Group function prototypes in one place.
(FLOATCODE): Redefine as 1.
(USE_GROUPS): Redefine as 2.
@@ -64,7 +864,11 @@
(OP_ST, OP_STi, OP_SEG, OP_DIR, OP_OFF, OP_OFF64, OP_MMX): Rename
'ignore'/'ignored' to 'bytemode'.
- 2001-06-10 Alan Modra <amodra@bigpond.net.au>
+2001-06-10 Alan Modra <amodra@bigpond.net.au>
+
+ * configure.in: Sort 'ta' case statement.
+ * configure: Regenerate.
+
* i386-dis.c (dis386_att): Add 'H' to conditional branch and
loop,jcxz insns.
(disx86_64_att): Likewise.
@@ -73,23 +877,25 @@
(putop): 'H' macro prints branch hints.
(get64): Kill compile warnings.
-2001-07-16 Philip Blundell <philb@gnu.org>
+2001-06-09 Alexandre Oliva <aoliva@redhat.com>
- * arm-dis.c (print_insn_arm): Use decimal for offsets in LDR/STR.
+ * sh-opc.h (sh_table): Don't use empty initializers.
-2001-07-03 Zoltan Hidvegi <hzoli@hzoli.2y.net>
+2001-06-06 Christian Groessler <cpg@aladdin.de>
- * ppc-opc.c: Fix encoding of 'clf' instruction.
+ * z8k-dis.c: Fix formatting.
+ (unpack_instr): Remove unused cases in switch statement. Add
+ safety abort() in default case.
+ (unparse_instr): Add safety abort() in default case.
-2001-06-11 Alan Modra <amodra@bigpond.net.au>
+2001-06-06 Peter Jakubek <pjak@snafu.de>
- Merge from mainline.
- 2001-06-06 Peter Jakubek <pjak@snafu.de>
* m68k-dis.c (print_insn_m68k): Fix typo.
* m68k-opc.c (m68k_opcodes): Correct allowed operands for
mcf (ColdFire) div, rem and moveb instructions.
- 2001-06-06 Alan Modra <amodra@bigpond.net.au>
+2001-06-06 Alan Modra <amodra@bigpond.net.au>
+
* i386-dis.c (cond_jump_flag, loop_jcxz_flag): Define.
(cond_jump_mode, loop_jcxz_mode): Define.
(dis386_att): Add cond_jump_flag and loop_jcxz_flag as
@@ -102,10 +908,30 @@
(putop): Handle 'F', and mark PREFIX_ADDR used for case 'E'.
(OP_J): Don't make PREFIX_DATA used.
- 2001-05-16 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+2001-06-04 Alexandre Oliva <aoliva@redhat.com>
+
+ * sh-opc.h (sh_table): Complete last element entry to avoid
+ compiler warning.
+
+2001-05-16 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
* mips-dis.c (mips_isa_type): Add MIPS r12k support.
- 2001-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+2001-05-23 Alan Modra <amodra@one.net.au>
+
+ * arc-opc.c: Whitespace changes.
+
+2001-05-18 Hans-Peter Nilsson <hp@axis.com>
+
+ * cris-opc.c (cris_spec_regs): Add missing initializer field for
+ last element.
+
+2001-05-15 Frank Ch. Eigler <fche@redhat.com>
+
+ * cgen-dis.in (extract_normal): Complete support for min<base case.
+
+2001-05-15 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
* mips-dis.c (INSNLEN): Rename MAXLEN.
(std_reg_names): Replace by mips32_reg_names and mips64_reg_names.
(print_insn_arg): Remove $ prefix of register names.
@@ -120,58 +946,19 @@
(print_mips16_insn_arg): Remove $ prefix of register names.
Print error message before abort.
- 2001-05-14 J.T. Conklin <jtc@redback.com>
+2001-05-14 J.T. Conklin <jtc@redback.com>
+
* ppc-opc.c (powerpc_opcodes): Fixed extended opcode field of
- simplified mnemonics used for setting PPC750-specific special
+ simplified mnemonics used for setting PPC750-specific special
purpose registers.
- 2001-03-23 Nick Clifton <nickc@redhat.com>
- * mips-opc.c: Remove extraneous whitespace.
- * mips-dis.c: Remove extraneous whitespace.
-
- 2001-03-06 Igor Shevlyakov <igor@windriver.com>
- * m68k-dis.c (print_insn_m68k): Recognize Coldfire CPUs
- so command line switches will work.
-
- 2001-02-28 Igor Shevlyakov <igor@windriver.com>
- * m68k-opc.c: fix cpushl according to Motorola. Enable
- bunch of instructions for Coldfire 5407 and add all new.
-
- 2001-02-27 Alan Modra <alan@linuxcare.com.au>
- * configure.in (BFD_VERSION): Do without grep.
- * configure: Regenerate.
- * Makefile.am: Run "make dep-am".
- * Makefile.in: Regenerate.
-
- 2001-02-20 H.J. Lu <hjl@gnu.org>
- * Makefile.am (ia64-ic.tbl): Remove the target.
- (ia64-raw.tbl): Likewise.
- (ia64-waw.tbl): Likewise.
- (ia64-war.tbl): Likewise.
- (ia64-asmtab.c): Generate it in the source directory.
- * Makefile.in: Regenerated.
-
- 2001-02-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
- * mips-dis.c (print_insn_arg): Use top four bits of the address of
- the following instruction not of the jump itself for the jump
- target.
- (print_mips16_insn_arg): Likewise.
-
- 2001-02-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
- * Makefile.am (stamp-lib): ranlib the libopcodes.a in the build
- directory.
- * Makefile.in: Regenerate.
-
-2001-06-07 Alan Modra <amodra@bigpond.net.au>
-
- * Many files: Update copyright notices.
+2001-05-12 H.J. Lu <hjl@gnu.org>
-2001-05-23 Alan Modra <amodra@one.net.au>
+ * i386-dis.c (print_insn_i386): Always set `mod', `reg' and
+ `rm'.
- * arc-opc.c: Whitespace changes.
+2001-05-12 Peter Targett <peter.targett@arccores.com>
- Merge from mainline
- 2001-05-12 Peter Targett <peter.targett@arccores.com>
* arc-opc.c (arc_reg_names): Correct attribute for lp_count
register to r/w. Formatting fixes throughout file.
@@ -187,6 +974,27 @@
(OP_EM): Likewise.
(OP_EX): Likewise.
+2001-05-07 Frank Ch. Eigler <fche@redhat.com>
+
+ * cgen-dis.in (default_print_insn): Tolerate min<base instructions
+ even at end of a section.
+ * cgen-ibld.in (extract_normal): Tolerate min!=base!=max instructions
+ by ignoring precariously-unpacked insn_value in favor of raw buffer.
+
+2001-05-03 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+
+ * disassemble.c (disassembler_usage): Remove unused attribute.
+
+2001-05-04 Frank Ch. Eigler <fche@redhat.com>
+
+ * m32r-dis.c, -asm.c, -ibld.c: Regenerated with disassembler fixes.
+
+2001-05-04 Frank Ch. Eigler <fche@redhat.com>
+
+ * cgen-dis.in (print_insn): Remove call to read_insn. Instead,
+ assume incoming buffer already has the base insn loaded. Handle
+ smaller-than-base instructions for variable-length case.
+
2001-05-04 Alan Modra <amodra@one.net.au>
* i386-dis.c (Ev, Ed): Remove duplicate define.
@@ -198,7 +1006,37 @@
(dis386_twobyte_intel): Likewise.
(prefix_user_table): Use MS for maskmovq operand.
- Merge mainline: 2001-04-06 Andreas Jaeger <aj@suse.de>
+2001-04-27 Johan Rydberg <jrydberg@opencores.org>
+
+ * Makefile.am: Add OpenRISC target.
+ * Makefile.in: Regenerated.
+
+ * disassemble.c (disassembler): Recognize the OpenRISC disassembly.
+
+ * configure.in (bfd_openrisc_arch): Add target.
+ * configure: Regenerated.
+
+ * openrisc-asm.c: New file.
+ * openrisc-desc.c: Likewise.
+ * openrisc-desc.h: Likewise.
+ * openrisc-dis.c: Likewise.
+ * openrisc-ibld.c: Likewise.
+ * openrisc-opc.c: Likewise.
+ * openrisc-opc.h: Likewise.
+
+2001-04-24 Christian Groessler <cpg@aladdin.de>
+
+ * z8k-dis.c: add names of control registers (ctrl_names);
+ (seg_length): provides instruction length fixup for segmented
+ mode; (unpack_instr): correctly handle ARG_DISP16, ARG_DISP12,
+ CLASS_0DISP7, CLASS_1DISP7, CLASS_DISP8 and CLASS_PR cases;
+ (unparse_intr): handle CLASS_PR, print addresses without '#'
+ * z8k-opc.h: re-created with new z8kgen
+ * z8kgen.c: merged in fixes which were in existing z8k-opc.h; new
+ entries for ldctl/ldctlb instruction
+
+2001-04-06 Andreas Jaeger <aj@suse.de>
+
* i386-dis.c: Add ffreep instruction.
2001-03-30 Alexandre Oliva <aoliva@redhat.com>
@@ -218,12 +1056,41 @@
(prefix_user_table <maskmovdqu>): XM operand, not MX.
(prefix_user_table): Cosmetic changes to "bad" entries.
+2001-03-23 Nick Clifton <nickc@redhat.com>
+
+ * mips-opc.c: Remove extraneous whitespace.
+ * mips-dis.c: Remove extraneous whitespace.
+
+2001-03-22 Ben Elliston <bje@redhat.com>
+
+ * cgen-asm.in (@arch@_cgen_assemble_insn): Move tmp_errmsg
+ declaration inside CGEN_VERBOSE_ASSEMBLER_ERRORS conditional.
+ * cgen-ibld.in (put_insn_int_value): Mark cd parameter as unused
+ to allay a compiler warning.
+
2001-03-22 Alan Modra <alan@linuxcare.com.au>
* i386-dis.c (dis386_twobyte_att): Add entries for paddq, psubq.
(dis386_twobyte_intel): Likewise.
(twobyte_has_modrm): Set entry for paddq, psubq.
+2001-03-20 Patrick Macdonald <patrickm@redhat.com>
+
+ * cgen-dis.in (print_insn_@arch@): Add support for target machine
+ determination via CGEN_COMPUTE_MACH.
+ * fr30-desc.c: Regenerate.
+ * fr30-dis.c: Regenerate.
+ * fr30-opc.h: Regenerate.
+ * m32r-desc.c: Regenerate.
+ * m32r-dis.c: Regenerate.
+ * m32r-opc.h: Regenerate.
+ * m32r-opinst.c: Regenerate.
+
+2001-03-20 H.J. Lu <hjl@gnu.org>
+
+ * configure.in: Remove the redundent AC_ARG_PROGRAM.
+ * configure: Rebuild.
+
2001-03-19 Jim Wilson <wilson@redhat.com>
* ia64-gen.c (fetch_insn_class): If xsect, then ignore comment and
@@ -236,6 +1103,52 @@
* vax-dis.c (print_insn_vax): Only fetch two bytes if the info buffer
has more than one byte left to read.
+2001-03-16 Martin Schwidefsky <schwidefsky@de.ibm.com>
+
+ * s390-opc.c: Add new opcodes. Smooth out formatting.
+ * s390-opc.txt: Add new opcodes.
+
+2001-03-06 Nick Clifton <nickc@redhat.com>
+
+ * arm-dis.c (print_insn_thumb): Compute destination address
+ of BLX(1) instruction by taking bit 1 from PC and not from bit
+ 0 of the offset.
+
+2001-03-06 Igor Shevlyakov <igor@windriver.com>
+
+ * m68k-dis.c (print_insn_m68k): Recognize Coldfire CPUs
+ so command line switches will work.
+
+2001-03-05 Dave Brolley <brolley@redhat.com>
+
+ * fr30-asm.c: Regenerate.
+ * fr30-desc.c: Regenerate.
+ * fr30-desc.h: Regenerate.
+ * fr30-dis.c: Regenerate.
+ * fr30-ibld.c: Regenerate.
+ * fr30-opc.c: Regenerate.
+ * fr30-opc.h: Regenerate.
+ * m32r-asm.c: Regenerate.
+ * m32r-desc.c: Regenerate.
+ * m32r-desc.h: Regenerate.
+ * m32r-dis.c: Regenerate.
+ * m32r-ibld.c: Regenerate.
+ * m32r-opc.c: Regenerate.
+ * m32r-opc.h: Regenerate.
+ * m32r-opinst.c: Regenerate.
+
+2001-02-28 Igor Shevlyakov <igor@windriver.com>
+
+ * m68k-opc.c: fix cpushl according to Motorola. Enable
+ bunch of instructions for Coldfire 5407 and add all new.
+
+2001-02-27 Alan Modra <alan@linuxcare.com.au>
+
+ * configure.in (BFD_VERSION): Do without grep.
+ * configure: Regenerate.
+ * Makefile.am: Run "make dep-am".
+ * Makefile.in: Regenerate.
+
2001-02-23 David Mosberger <davidm@hpl.hp.com>
* ia64-opc-a.c: Add missing pseudo-ops for "cmp" and "cmp4".
@@ -246,25 +1159,75 @@
* ia64-opc-d.c (ia64_opcodes_d): Break the "add" pattern into two
separate variants: one for IMM22 and the other for IMM14.
* ia64-asmtab.c: Regenerate.
-
+
+2001-02-21 Greg McGary <greg@mcgary.org>
+
+ * cgen-opc.c (cgen_get_insn_value): Add missing `return'.
+
+2001-02-20 H.J. Lu <hjl@gnu.org>
+
+ * Makefile.am (ia64-ic.tbl): Remove the target.
+ (ia64-raw.tbl): Likewise.
+ (ia64-waw.tbl): Likewise.
+ (ia64-war.tbl): Likewise.
+ (ia64-asmtab.c): Generate it in the source directory.
+ * Makefile.in: Regenerated.
+
+2001-02-18 lars brinkhoff <lars@nocrew.org>
+
+ * Makefile.am: Add PDP-11 target.
+ * configure.in: Likewise.
+ * disassemble.c: Likewise.
+ * pdp11-dis.c: New file.
+ * pdp11-opc.c: New file.
+
2001-02-14 Jim Wilson <wilson@redhat.com>
* ia64-ic.tbl: Update from Intel. Add setf to fr-writers.
* ia64-asmtab.c: Regenerate.
-Mon Feb 12 17:38:59 CET 2001 Jan Hubicka <jh@suse.cz>
+Mon Feb 12 17:41:26 CET 2001 Jan Hubicka <jh@suse.cz>
* i386-dis.c (prefix_user_t): Add 'Y' to SSE ineger converison
instructions.
(putop): Handle 'Y'
+2001-02-11 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
+
+ * mips-dis.c (print_insn_arg): Use top four bits of the address of
+ the following instruction not of the jump itself for the jump
+ target.
+ (print_mips16_insn_arg): Likewise.
+
+2001-02-11 Michael Sokolov <msokolov@ivan.Harhan.ORG>
+
+ * Makefile.am (stamp-lib): ranlib the libopcodes.a in the build
+ directory.
+ * Makefile.in: Regenerate.
+
+2001-02-09 Schwidefsky <schwidefsky@de.ibm.com>
+
+ * Makefile.am: Add linux target for S/390.
+ * Makefile.in: Likewise.
+ * configure.in: Likewise.
+ * disassemble.c: Likewise.
+ * s390-dis.c: New file.
+ * s390-mkopc.c: New file.
+ * s390-opc.c: New file.
+ * s390-opc.txt: New file.
+
2001-02-05 Jim Wilson <wilson@redhat.com>
* ia64-asmtab.c: Revert 2000-12-16 change.
-Thu Feb 1 16:41:58 MET 2001 Jan Hubicka <jh@suse.cz>
+2001-02-02 Patrick Macdonald <patrickm@redhat.com>
+
+ * fr30-desc.h: Regenerate with CGEN_MAX_SYNTAX_ELEMENTS.
+ * m32r-desc.h: Regenerate.
+
+Thu Feb 1 16:29:06 MET 2001 Jan Hubicka <jh@suse.cz>
- * i387-dis.c (dis386_att, grps): Use 'T' for push/pop
+ * i386-dis.c (dis386_att, grps): Use 'T' for push/pop
(putop): Handle 'T', alphabetize order, fix 'I' handling in Intel syntax
2001-01-14 Alan Modra <alan@linuxcare.com.au>
diff --git a/contrib/binutils/opcodes/ChangeLog-9297 b/contrib/binutils/opcodes/ChangeLog-9297
index 5fa3fa0..799457e 100644
--- a/contrib/binutils/opcodes/ChangeLog-9297
+++ b/contrib/binutils/opcodes/ChangeLog-9297
@@ -1480,7 +1480,7 @@ Wed Oct 2 23:28:42 1996 Jeffrey A Law (law@cygnus.com)
* mn10x00-opc.c, mn10x00-dis.c: New files for Matsushita
MN10x00 processors.
- * disassemble (ARCH_mn10x00): Define.
+ * disassemble.c (ARCH_mn10x00): Define.
(disassembler): Handle bfd_arch_mn10x00.
* configure.in: Recognize bfd_mn10x00_arch.
* configure: Rebuilt.
@@ -2982,7 +2982,7 @@ Wed Jul 13 18:01:58 1994 Ken Raeburn (raeburn@cujo.cygnus.com)
Sun Jul 10 00:27:47 1994 Ian Dall (dall@hfrd.dsto.gov.au)
- * opcodes/ns32k-dis.c: Semi-new file. Had apparently been dropped
+ * ns32k-dis.c: Semi-new file. Had apparently been dropped
from distribution. A ns32k-dis.c from a previous distribution has
been brought up to date and supports the new interface.
@@ -3217,7 +3217,7 @@ Wed Jan 5 11:56:21 1994 David J. Mackenzie (djm@thepub.cygnus.com)
Wed Nov 17 17:20:12 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
- * mips-opc.h: Use macro for j instruction, to support SVR4 PIC.
+ * mips-opc.c: Use macro for j instruction, to support SVR4 PIC.
Removed t,A case for la; always use t,A(b) case.
Mon Nov 8 12:37:36 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
@@ -3618,7 +3618,7 @@ Wed Mar 31 10:07:04 1993 Jim Kingdon (kingdon@lioth.cygnus.com)
for a preceding `sethi' in order to print an absolute address.
* (print_insn): Disassembly prefers real instructions.
(is_delayed_branch): Speed up.
- * sparc-opcode.h: Add ALIAS bit to aliases. Fix up opcode tables.
+ * sparc-opc.c: Add ALIAS bit to aliases. Fix up opcode tables.
Still missing some float ops, and needs testing.
* sparc-pinsn.c (print_insn): Eliminate 'set' test, subsumed by
F_ALIAS. Use printf, not fprintf, when not passing a file
@@ -3735,7 +3735,7 @@ Wed Sep 30 07:42:17 1992 Steve Chamberlain (sac@thepub.cygnus.com)
Tue Sep 29 12:20:21 1992 Steve Chamberlain (sac@thepub.cygnus.com)
* z8k-dis.c (unparse_instr): prettier tabs
- * z8kgen.c -> z8k-opc.h: bug fixes in tables
+ * z8kgen.c z8k-opc.h: bug fixes in tables
Fri Sep 25 12:50:32 1992 Stu Grossman (grossman at cygnus.com)
@@ -3785,6 +3785,12 @@ Mon Aug 31 13:47:35 1992 Steve Chamberlain (sac@thepub.cygnus.com)
* z8k-dis.c: knows how to disassemble z8k stuff
* z8k-opc.h: new file full of z8000 opcodes
+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.
+
Local Variables:
version-control: never
diff --git a/contrib/binutils/opcodes/ChangeLog-9899 b/contrib/binutils/opcodes/ChangeLog-9899
index 8588f0a..3f8bf77 100644
--- a/contrib/binutils/opcodes/ChangeLog-9899
+++ b/contrib/binutils/opcodes/ChangeLog-9899
@@ -86,9 +86,9 @@ Thu Oct 7 00:12:43 MDT 1999 Diego Novillo <dnovillo@cygnus.com>
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.
+ * 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>
@@ -178,8 +178,8 @@ Mon Aug 30 18:56:14 1999 Richard Henderson <rth@cygnus.com>
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.
+ * 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>
@@ -446,8 +446,8 @@ Mon Jun 7 12:04:52 1999 Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
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.
+ * 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)
@@ -456,8 +456,8 @@ Mon Apr 12 23:46:17 1999 Jeffrey A Law (law@cygnus.com)
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.
+ * 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>
@@ -484,10 +484,10 @@ Mon Apr 12 23:46:17 1999 Jeffrey A Law (law@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.
+ * 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>
@@ -499,16 +499,16 @@ Mon Apr 12 23:46:17 1999 Jeffrey A Law (law@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.
+ * 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.
+ * 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>
@@ -523,11 +523,11 @@ Sat Feb 13 14:06:19 1999 Richard Henderson <rth@cygnus.com>
1999-02-09 Doug Evans <devans@casey.cygnus.com>
- * i960c-asm.c,i960c-dis.c,i960c-opc.c,i960c-opc.h: Delete.
+ * 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,
+ (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.
@@ -540,8 +540,8 @@ Sat Feb 13 14:06:19 1999 Richard Henderson <rth@cygnus.com>
* 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.
+ * 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.
@@ -592,8 +592,8 @@ Mon Feb 1 20:54:36 1999 Catherine Moore <clm@cygnus.com>
1999-01-27 Doug Evans <devans@casey.cygnus.com>
- * fr30-opc.h,fr30-opc.c: Rebuild.
- * i960c-opc.h,i960c-opc.c: Rebuild.
+ * 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>
@@ -612,7 +612,7 @@ Tue Jan 19 10:51:01 1999 David Taylor <taylor@texas.cygnus.com>
1999-01-12 Doug Evans <devans@casey.cygnus.com>
- * fr30-opc.c,i960c-opc.c: Regenerate.
+ * fr30-opc.c, i960c-opc.c: Regenerate.
1999-01-11 Doug Evans <devans@casey.cygnus.com>
@@ -624,9 +624,9 @@ Tue Jan 19 10:51:01 1999 David Taylor <taylor@texas.cygnus.com>
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.
+ * 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)
@@ -646,15 +646,15 @@ Wed Dec 16 16:17:49 1998 Dave Brolley <brolley@cygnus.com>
1998-12-15 Dave Brolley <brolley@cygnus.com>
- * fr30-opc.c,fr30-opc.h: Regenerated.
+ * fr30-opc.c, fr30-opc.h: Regenerated.
1998-12-14 Dave Brolley <brolley@cygnus.com>
- * fr30-opc.c,fr30-opc.h: Regenerated.
+ * 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.
+ * fr30-opc.c, fr30-opc.h: Regenerated.
Thu Dec 10 12:49:24 1998 Doug Evans <devans@canuck.cygnus.com>
@@ -667,7 +667,7 @@ Tue Dec 8 13:56:18 1998 David Taylor <taylor@texas.cygnus.com>
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.
+ * 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>
@@ -715,7 +715,7 @@ Tue Dec 8 10:50:46 1998 David Taylor <taylor@texas.cygnus.com>
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.
+ * 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>
@@ -730,34 +730,34 @@ Fri Dec 4 17:45:51 1998 Doug Evans <devans@canuck.cygnus.com>
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.
+ * 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.
+ * 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.
+ * 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.
+ * 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.
+ * 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.
+ * 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.
+ * fr30-asm.c, fr30-dis.c, fr30-opc.c, fr30-opc.h: Regenerated.
1998-11-20 Doug Evans <devans@tobor.to.cygnus.com>
@@ -785,8 +785,8 @@ Wed Nov 18 21:36:37 1998 Dave Brolley <brolley@cygnus.com>
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.
+ * 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>
@@ -813,8 +813,8 @@ Tue Nov 10 15:26:27 1998 Nick Clifton <nickc@cygnus.com>
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.
+ * 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>
@@ -852,11 +852,11 @@ Tue Oct 27 08:58:37 1998 Gavin Romig-Koch <gavin@cygnus.com>
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.
+ * 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.
+ * m32r-opc.h, m32r-opc.c: Regenerate.
Sun Oct 4 21:01:44 1998 Alan Modra <alan@spri.levels.unisa.edu.au>
@@ -894,7 +894,7 @@ Tue Sep 22 17:55:14 1998 Nick Clifton <nickc@cygnus.com>
Tue Sep 15 15:14:45 1998 Doug Evans <devans@canuck.cygnus.com>
- * m32r-opc.h,m32r-opc.c: Add bbpc,bbpsw support.
+ * m32r-opc.h, m32r-opc.c: Add bbpc,bbpsw support.
1998-09-09 Michael Meissner <meissner@cygnus.com>
@@ -969,7 +969,7 @@ Mon Aug 3 12:43:16 1998 Doug Evans <devans@seba.cygnus.com>
(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.
+ * 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>
@@ -983,11 +983,11 @@ Tue Jul 28 11:00:09 1998 Jeffrey A Law (law@cygnus.com)
Fri Jul 24 11:41:37 1998 Doug Evans <devans@canuck.cygnus.com>
- * m32r-asm.c,m32r-opc.c: Regenerate (-Wall cleanups).
+ * 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.
+ * 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>
@@ -1004,7 +1004,7 @@ Thu Jul 2 17:11:27 1998 Doug Evans <devans@seba.cygnus.com>
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.
+ * 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)
@@ -1197,7 +1197,7 @@ Tue May 26 16:14:39 1998 Nick Clifton <nickc@cygnus.com>
Fri May 22 16:00:00 1998 Doug Evans <devans@canuck.cygnus.com>
- * m32r-asm.c,m32r-dis.c: Regenerate.
+ * m32r-asm.c, m32r-dis.c: Regenerate.
Tue May 19 17:36:08 1998 Ian Lance Taylor <ian@cygnus.com>
@@ -1329,7 +1329,7 @@ Mon Apr 27 10:33:56 1998 Doug Evans <devans@seba.cygnus.com>
(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.
+ * 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.
@@ -1338,7 +1338,7 @@ Mon Apr 27 10:33:56 1998 Doug Evans <devans@seba.cygnus.com>
* 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.
+ * 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>
@@ -1497,7 +1497,7 @@ Sat Mar 14 23:47:14 1998 Doug Evans <devans@seba.cygnus.com>
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.
+ * m32r-opc.h, m32r-opc.c, m32r-asm.c, m32r-dis.c: Regenerate.
Sat Feb 28 16:02:34 1998 Nick Clifton <nickc@cygnus.com>
@@ -1529,8 +1529,8 @@ 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: Ditto.
- * m32r-asm.c,m32r-dis.c,m32r-opc.h,m32r-opc.c: Regenerate.
+ * 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)
@@ -1544,7 +1544,7 @@ Tue Feb 17 17:14:50 1998 Doug Evans <devans@seba.cygnus.com>
* 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.
+ * m32r-asm.c, m32r-dis.c, m32r-opc.c: Regenerate.
Fri Feb 13 14:26:06 1998 Doug Evans <devans@canuck.cygnus.com>
diff --git a/contrib/binutils/opcodes/Makefile.am b/contrib/binutils/opcodes/Makefile.am
index ad2330b..7c9da2e 100644
--- a/contrib/binutils/opcodes/Makefile.am
+++ b/contrib/binutils/opcodes/Makefile.am
@@ -26,11 +26,13 @@ HFILES = \
h8500-opc.h \
m32r-desc.h m32r-opc.h \
mcore-opc.h \
+ openrisc-desc.h openrisc-opc.h \
sh-opc.h \
sysdep.h \
ia64-asmtab.h \
ia64-opc.h \
w65-opc.h \
+ xstormy16-desc.h xstormy16-opc.h \
z8k-opc.h
# C source files that correspond to .o's.
@@ -96,11 +98,23 @@ CFILES = \
m10200-opc.c \
m10300-dis.c \
m10300-opc.c \
+ mmix-dis.c \
+ mmix-opc.c \
ns32k-dis.c \
+ openrisc-asm.c \
+ openrisc-desc.c \
+ openrisc-dis.c \
+ openrisc-ibld.c \
+ openrisc-opc.c \
+ pdp11-dis.c \
+ pdp11-opc.c \
pj-dis.c \
pj-opc.c \
ppc-dis.c \
ppc-opc.c \
+ s390-mkopc.c \
+ s390-opc.c \
+ s390-dis.c \
sh-dis.c \
sparc-dis.c \
sparc-opc.c \
@@ -113,6 +127,11 @@ CFILES = \
v850-opc.c \
vax-dis.c \
w65-dis.c \
+ xstormy16-asm.c \
+ xstormy16-desc.c \
+ xstormy16-dis.c \
+ xstormy16-ibld.c \
+ xstormy16-opc.c \
z8k-dis.c \
z8kgen.c
@@ -168,11 +187,22 @@ ALL_MACHINES = \
mips-dis.lo \
mips-opc.lo \
mips16-opc.lo \
+ mmix-dis.lo \
+ mmix-opc.lo \
ns32k-dis.lo \
+ openrisc-asm.lo \
+ openrisc-desc.lo \
+ openrisc-dis.lo \
+ openrisc-ibld.lo \
+ openrisc-opc.lo \
+ pdp11-dis.lo \
+ pdp11-opc.lo \
pj-dis.lo \
pj-opc.lo \
ppc-dis.lo \
ppc-opc.lo \
+ s390-dis.lo \
+ s390-opc.lo \
sh-dis.lo \
sparc-dis.lo \
sparc-opc.lo \
@@ -185,6 +215,11 @@ ALL_MACHINES = \
v850-opc.lo \
vax-dis.lo \
w65-dis.lo \
+ xstormy16-asm.lo \
+ xstormy16-desc.lo \
+ xstormy16-dis.lo \
+ xstormy16-ibld.lo \
+ xstormy16-opc.lo \
z8k-dis.lo
OFILES = @BFD_MACHINES@
@@ -228,11 +263,13 @@ config.status: $(srcdir)/configure $(srcdir)/../bfd/configure.in
$(SHELL) ./config.status --recheck
CLEANFILES = \
- stamp-m32r stamp-fr30 \
+ stamp-m32r stamp-fr30 stamp-openrisc \
+ stamp-xstormy16 \
libopcodes.a stamp-lib dep.sed DEP DEPA DEP1 DEP2
CGENDIR = @cgendir@
+CPUDIR = $(CGENDIR)/cpu
CGEN = `if test -f ../guile/libguile/guile ; then echo ../guile/libguile/guile; else echo guile ; fi`
CGENFLAGS = -v
@@ -246,9 +283,13 @@ CGENDEPS = ../cgen/stamp-cgen \
if CGEN_MAINT
M32R_DEPS = stamp-m32r
FR30_DEPS = stamp-fr30
+OPENRISC_DEPS = stamp-openrisc
+XSTORMY16_DEPS = stamp-xstormy16
else
M32R_DEPS =
FR30_DEPS =
+OPENRISC_DEPS =
+XSTORMY16_DEPS =
endif
run-cgen:
@@ -261,14 +302,24 @@ run-cgen:
# For now, require developers to configure with --enable-cgen-maint.
$(srcdir)/m32r-desc.h $(srcdir)/m32r-desc.c $(srcdir)/m32r-opc.h $(srcdir)/m32r-opc.c $(srcdir)/m32r-ibld.c $(srcdir)/m32r-opinst.c $(srcdir)/m32r-asm.c $(srcdir)/m32r-dis.c: $(M32R_DEPS)
@true
-stamp-m32r: $(CGENDEPS) $(CGENDIR)/m32r.cpu $(CGENDIR)/m32r.opc
+stamp-m32r: $(CGENDEPS) $(CPUDIR)/m32r.cpu $(CPUDIR)/m32r.opc
$(MAKE) run-cgen arch=m32r prefix=m32r options=opinst extrafiles=opinst
$(srcdir)/fr30-desc.h $(srcdir)/fr30-desc.c $(srcdir)/fr30-opc.h $(srcdir)/fr30-opc.c $(srcdir)/fr30-ibld.c $(srcdir)/fr30-asm.c $(srcdir)/fr30-dis.c: $(FR30_DEPS)
@true
-stamp-fr30: $(CGENDEPS) $(CGENDIR)/fr30.cpu $(CGENDIR)/fr30.opc
+stamp-fr30: $(CGENDEPS) $(CPUDIR)/fr30.cpu $(CPUDIR)/fr30.opc
$(MAKE) run-cgen arch=fr30 prefix=fr30 options= extrafiles=
+$(srcdir)/openrisc-desc.h $(srcdir)/openrisc-desc.c $(srcdir)/openrisc-opc.h $(srcdir)/openrisc-opc.c $(srcdir)/openrisc-ibld.c $(srcdir)/openrisc-asm.c $(srcdir)/openrisc-dis.c: $(OPENRISC_DEPS)
+ @true
+stamp-openrisc: $(CGENDEPS) $(CPUDIR)/openrisc.cpu $(CPUDIR)/openrisc.opc
+ $(MAKE) run-cgen arch=openrisc prefix=openrisc options= extrafiles=
+
+$(srcdir)/xstormy16-desc.h $(srcdir)/xstormy16-desc.c $(srcdir)/xstormy16-opc.h $(srcdir)/xstormy16-opc.c $(srcdir)/xstormy16-ibld.c $(srcdir)/xstormy16-asm.c $(srcdir)/xstormy16-dis.c: $(XSTORMY16_DEPS)
+ @true
+stamp-xstormy16: $(CGENDEPS) $(CPUDIR)/xstormy16.cpu $(CPUDIR)/xstormy16.opc
+ $(MAKE) run-cgen arch=xstormy16 prefix=xstormy16 options= extrafiles=
+
ia64-gen: ia64-gen.o
$(LINK) ia64-gen.o $(LIBIBERTY)
@@ -278,6 +329,14 @@ ia64-gen.o: ia64-gen.c ia64-opc.c ia64-opc-a.c ia64-opc-b.c ia64-opc-f.c \
ia64-asmtab.c: @MAINT@ ia64-gen ia64-ic.tbl ia64-raw.tbl ia64-waw.tbl ia64-war.tbl
here=`pwd`; cd $(srcdir); $$here/ia64-gen > ia64-asmtab.c
+s390-mkopc: s390-mkopc.c
+ $(CC_FOR_BUILD) -o s390-mkopc $(srcdir)/s390-mkopc.c
+
+s390-opc.tab: s390-mkopc s390-opc.txt
+ ./s390-mkopc < $(srcdir)/s390-opc.txt > s390-opc.tab
+
+Makefile: $(BFDDIR)/configure.in
+
# This dependency stuff is copied from BFD.
DEP: dep.sed $(CFILES) $(HFILES) config.h
@@ -326,53 +385,60 @@ dep-am: DEP
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
a29k-dis.lo: a29k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/a29k.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/a29k.h
alpha-dis.lo: alpha-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/alpha.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/alpha.h
alpha-opc.lo: alpha-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/opcode/alpha.h $(BFD_H) opintl.h
+ $(INCDIR)/opcode/alpha.h $(BFD_H) $(INCDIR)/symcat.h \
+ opintl.h
arc-dis.lo: arc-dis.c $(INCDIR)/dis-asm.h $(BFD_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-dis.h arc-ext.h
-arc-opc.lo: arc-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/arc.h
-arc-ext.lo: arc-ext.c $(BFD_H) $(INCDIR)/ansidecl.h \
- arc-ext.h $(INCDIR)/libiberty.h
-arm-dis.lo: arm-dis.c sysdep.h config.h $(INCDIR)/ansidecl.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)/symcat.h $(INCDIR)/opcode/arc.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
+ $(INCDIR)/bfdlink.h $(INCDIR)/elf/arc.h $(INCDIR)/elf/reloc-macros.h \
+ opintl.h arc-dis.h arc-ext.h
+arc-opc.lo: arc-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/opcode/arc.h
+arc-ext.lo: arc-ext.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h arc-ext.h $(INCDIR)/libiberty.h
+arm-dis.lo: arm-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.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 sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) opintl.h $(INCDIR)/opcode/avr.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h opintl.h \
+ $(INCDIR)/opcode/avr.h
cgen-asm.lo: cgen-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/libiberty.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen.h \
- opintl.h
+ $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h $(BFD_H) \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen.h opintl.h
cgen-dis.lo: cgen-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/libiberty.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen.h
cgen-opc.lo: cgen-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/libiberty.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen.h
+ $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h $(BFD_H) \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen.h
cris-dis.lo: cris-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h sysdep.h config.h $(INCDIR)/opcode/cris.h \
- $(INCDIR)/libiberty.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h sysdep.h config.h \
+ $(INCDIR)/opcode/cris.h $(INCDIR)/libiberty.h
cris-opc.lo: cris-opc.c $(INCDIR)/opcode/cris.h
d10v-dis.lo: d10v-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/opcode/d10v.h $(INCDIR)/dis-asm.h $(BFD_H)
+ $(INCDIR)/opcode/d10v.h $(INCDIR)/dis-asm.h $(BFD_H) \
+ $(INCDIR)/symcat.h
d10v-opc.lo: d10v-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/d10v.h
d30v-dis.lo: d30v-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/d30v.h $(INCDIR)/dis-asm.h $(BFD_H) \
- opintl.h
+ $(INCDIR)/symcat.h opintl.h
d30v-opc.lo: d30v-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/d30v.h
dis-buf.lo: dis-buf.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) opintl.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h opintl.h
disassemble.lo: disassemble.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H)
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
fr30-asm.lo: fr30-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen.h \
- fr30-opc.h opintl.h
+ fr30-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
fr30-desc.lo: fr30-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen.h \
fr30-opc.h opintl.h $(INCDIR)/libiberty.h
@@ -381,29 +447,32 @@ fr30-dis.lo: fr30-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/cgen.h fr30-opc.h opintl.h
fr30-ibld.lo: fr30-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h fr30-desc.h \
- $(INCDIR)/opcode/cgen.h fr30-opc.h opintl.h
+ $(INCDIR)/opcode/cgen.h fr30-opc.h opintl.h $(INCDIR)/safe-ctype.h
fr30-opc.lo: fr30-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen.h \
fr30-opc.h $(INCDIR)/libiberty.h
h8300-dis.lo: h8300-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/h8300.h $(INCDIR)/dis-asm.h $(BFD_H) \
- opintl.h
+ $(INCDIR)/symcat.h opintl.h
h8500-dis.lo: h8500-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- h8500-opc.h $(INCDIR)/dis-asm.h $(BFD_H) opintl.h
+ h8500-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h \
+ opintl.h
hppa-dis.lo: hppa-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(BFDDIR)/libhppa.h $(INCDIR)/opcode/hppa.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(BFDDIR)/libhppa.h \
+ $(INCDIR)/opcode/hppa.h
i370-dis.lo: i370-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/i370.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/i370.h
i370-opc.lo: i370-opc.c sysdep.h config.h $(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 opintl.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h sysdep.h config.h \
+ opintl.h
i860-dis.lo: i860-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/opcode/i860.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/opcode/i860.h
i960-dis.lo: i960-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H)
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
ia64-dis.lo: ia64-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/opcode/ia64.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/opcode/ia64.h
ia64-opc-a.lo: ia64-opc-a.c ia64-opc.h $(INCDIR)/opcode/ia64.h
ia64-opc-b.lo: ia64-opc-b.c ia64-opc.h $(INCDIR)/opcode/ia64.h
ia64-opc-f.lo: ia64-opc-f.c ia64-opc.h $(INCDIR)/opcode/ia64.h
@@ -414,13 +483,14 @@ ia64-opc.lo: ia64-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
sysdep.h config.h ia64-asmtab.h $(INCDIR)/opcode/ia64.h \
ia64-asmtab.c
ia64-gen.lo: ia64-gen.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
- sysdep.h config.h ia64-opc.h $(INCDIR)/opcode/ia64.h \
- ia64-opc-a.c ia64-opc-i.c ia64-opc-m.c ia64-opc-b.c \
- ia64-opc-f.c ia64-opc-x.c ia64-opc-d.c
+ $(INCDIR)/safe-ctype.h sysdep.h config.h ia64-opc.h \
+ $(INCDIR)/opcode/ia64.h ia64-opc-a.c ia64-opc-i.c ia64-opc-m.c \
+ ia64-opc-b.c ia64-opc-f.c ia64-opc-x.c ia64-opc-d.c
ia64-asmtab.lo: ia64-asmtab.c
m32r-asm.lo: m32r-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
- m32r-opc.h opintl.h
+ m32r-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
m32r-desc.lo: m32r-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
m32r-opc.h opintl.h $(INCDIR)/libiberty.h
@@ -429,7 +499,7 @@ m32r-dis.lo: m32r-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/cgen.h m32r-opc.h opintl.h
m32r-ibld.lo: m32r-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h \
- $(INCDIR)/opcode/cgen.h m32r-opc.h opintl.h
+ $(INCDIR)/opcode/cgen.h m32r-opc.h opintl.h $(INCDIR)/safe-ctype.h
m32r-opc.lo: m32r-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
m32r-opc.h $(INCDIR)/libiberty.h
@@ -437,21 +507,22 @@ m32r-opinst.lo: m32r-opinst.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
m32r-opc.h
m68hc11-dis.lo: m68hc11-dis.c $(INCDIR)/ansidecl.h \
- $(INCDIR)/opcode/m68hc11.h $(INCDIR)/dis-asm.h $(BFD_H)
+ $(INCDIR)/opcode/m68hc11.h $(INCDIR)/dis-asm.h $(BFD_H) \
+ $(INCDIR)/symcat.h
m68hc11-opc.lo: m68hc11-opc.c $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/m68hc11.h
m68k-dis.lo: m68k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/floatformat.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/floatformat.h \
opintl.h $(INCDIR)/opcode/m68k.h
m68k-opc.lo: m68k-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/m68k.h
m88k-dis.lo: m88k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/m88k.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/m88k.h \
opintl.h
mcore-dis.lo: mcore-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- mcore-opc.h $(INCDIR)/dis-asm.h $(BFD_H)
+ mcore-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
mips-dis.lo: mips-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/mips.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.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)/elf/reloc-macros.h
@@ -461,53 +532,104 @@ mips16-opc.lo: mips16-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/mips.h
m10200-dis.lo: m10200-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/mn10200.h $(INCDIR)/dis-asm.h $(BFD_H) \
- opintl.h
+ $(INCDIR)/symcat.h opintl.h
m10200-opc.lo: m10200-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/mn10200.h
m10300-dis.lo: m10300-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/mn10300.h $(INCDIR)/dis-asm.h $(BFD_H) \
- opintl.h
+ $(INCDIR)/symcat.h opintl.h
m10300-opc.lo: m10300-opc.c sysdep.h config.h $(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 \
+mmix-dis.lo: mmix-dis.c $(INCDIR)/opcode/mmix.h $(INCDIR)/dis-asm.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
opintl.h
+mmix-opc.lo: mmix-opc.c $(INCDIR)/opcode/mmix.h $(INCDIR)/symcat.h
+ns32k-dis.lo: ns32k-dis.c $(BFD_H) $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/dis-asm.h \
+ $(INCDIR)/opcode/ns32k.h opintl.h
+openrisc-asm.lo: openrisc-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h openrisc-desc.h $(INCDIR)/opcode/cgen.h \
+ openrisc-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+openrisc-desc.lo: openrisc-desc.c sysdep.h config.h \
+ $(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/symcat.h openrisc-desc.h \
+ $(INCDIR)/opcode/cgen.h openrisc-opc.h opintl.h $(INCDIR)/libiberty.h
+openrisc-dis.lo: openrisc-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h openrisc-desc.h \
+ $(INCDIR)/opcode/cgen.h openrisc-opc.h opintl.h
+openrisc-ibld.lo: openrisc-ibld.c sysdep.h config.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h \
+ openrisc-desc.h $(INCDIR)/opcode/cgen.h openrisc-opc.h \
+ opintl.h $(INCDIR)/safe-ctype.h
+openrisc-opc.lo: openrisc-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h openrisc-desc.h $(INCDIR)/opcode/cgen.h \
+ openrisc-opc.h $(INCDIR)/libiberty.h
+pdp11-dis.lo: pdp11-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/pdp11.h
+pdp11-opc.lo: pdp11-opc.c $(INCDIR)/opcode/pdp11.h
pj-dis.lo: pj-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/opcode/pj.h $(INCDIR)/dis-asm.h $(BFD_H)
+ $(INCDIR)/opcode/pj.h $(INCDIR)/dis-asm.h $(BFD_H) \
+ $(INCDIR)/symcat.h
pj-opc.lo: pj-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/pj.h
ppc-dis.lo: ppc-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/ppc.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/ppc.h
ppc-opc.lo: ppc-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/ppc.h opintl.h
+s390-mkopc.lo: s390-mkopc.c
+s390-opc.lo: s390-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/s390.h \
+ s390-opc.tab
+s390-dis.lo: s390-dis.c $(INCDIR)/ansidecl.h sysdep.h \
+ config.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h \
+ $(INCDIR)/opcode/s390.h
sh-dis.lo: sh-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- sh-opc.h $(INCDIR)/dis-asm.h $(BFD_H)
+ sh-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
sparc-dis.lo: sparc-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/sparc.h $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/libiberty.h opintl.h
+ $(INCDIR)/symcat.h $(INCDIR)/libiberty.h opintl.h
sparc-opc.lo: sparc-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/sparc.h
tic30-dis.lo: tic30-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/tic30.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/tic30.h
tic54x-dis.lo: tic54x-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/tic54x.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/tic54x.h \
$(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h
tic54x-opc.lo: tic54x-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/opcode/tic54x.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/tic54x.h
tic80-dis.lo: tic80-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/opcode/tic80.h $(INCDIR)/dis-asm.h $(BFD_H)
+ $(INCDIR)/opcode/tic80.h $(INCDIR)/dis-asm.h $(BFD_H) \
+ $(INCDIR)/symcat.h
tic80-opc.lo: tic80-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/tic80.h
v850-dis.lo: v850-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/v850.h $(INCDIR)/dis-asm.h $(BFD_H) \
- opintl.h
+ $(INCDIR)/symcat.h opintl.h
v850-opc.lo: v850-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/v850.h opintl.h
vax-dis.lo: vax-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/opcode/vax.h $(INCDIR)/dis-asm.h $(BFD_H)
+ $(INCDIR)/opcode/vax.h $(INCDIR)/dis-asm.h $(BFD_H) \
+ $(INCDIR)/symcat.h
w65-dis.lo: w65-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- w65-opc.h $(INCDIR)/dis-asm.h $(BFD_H)
+ w65-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
+xstormy16-asm.lo: xstormy16-asm.c sysdep.h config.h \
+ $(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/symcat.h xstormy16-desc.h \
+ $(INCDIR)/opcode/cgen.h xstormy16-opc.h opintl.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+xstormy16-desc.lo: xstormy16-desc.c sysdep.h config.h \
+ $(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/symcat.h xstormy16-desc.h \
+ $(INCDIR)/opcode/cgen.h xstormy16-opc.h opintl.h $(INCDIR)/libiberty.h
+xstormy16-dis.lo: xstormy16-dis.c sysdep.h config.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h \
+ xstormy16-desc.h $(INCDIR)/opcode/cgen.h xstormy16-opc.h \
+ opintl.h
+xstormy16-ibld.lo: xstormy16-ibld.c sysdep.h config.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h \
+ xstormy16-desc.h $(INCDIR)/opcode/cgen.h xstormy16-opc.h \
+ opintl.h $(INCDIR)/safe-ctype.h
+xstormy16-opc.lo: xstormy16-opc.c sysdep.h config.h \
+ $(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/symcat.h xstormy16-desc.h \
+ $(INCDIR)/opcode/cgen.h xstormy16-opc.h $(INCDIR)/libiberty.h
z8k-dis.lo: z8k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) z8k-opc.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h z8k-opc.h
z8kgen.lo: z8kgen.c sysdep.h config.h $(INCDIR)/ansidecl.h
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/contrib/binutils/opcodes/Makefile.in b/contrib/binutils/opcodes/Makefile.in
index 07be307..8cc2744 100644
--- a/contrib/binutils/opcodes/Makefile.in
+++ b/contrib/binutils/opcodes/Makefile.in
@@ -136,11 +136,13 @@ HFILES = \
h8500-opc.h \
m32r-desc.h m32r-opc.h \
mcore-opc.h \
+ openrisc-desc.h openrisc-opc.h \
sh-opc.h \
sysdep.h \
ia64-asmtab.h \
ia64-opc.h \
w65-opc.h \
+ xstormy16-desc.h xstormy16-opc.h \
z8k-opc.h
@@ -207,11 +209,23 @@ CFILES = \
m10200-opc.c \
m10300-dis.c \
m10300-opc.c \
+ mmix-dis.c \
+ mmix-opc.c \
ns32k-dis.c \
+ openrisc-asm.c \
+ openrisc-desc.c \
+ openrisc-dis.c \
+ openrisc-ibld.c \
+ openrisc-opc.c \
+ pdp11-dis.c \
+ pdp11-opc.c \
pj-dis.c \
pj-opc.c \
ppc-dis.c \
ppc-opc.c \
+ s390-mkopc.c \
+ s390-opc.c \
+ s390-dis.c \
sh-dis.c \
sparc-dis.c \
sparc-opc.c \
@@ -224,6 +238,11 @@ CFILES = \
v850-opc.c \
vax-dis.c \
w65-dis.c \
+ xstormy16-asm.c \
+ xstormy16-desc.c \
+ xstormy16-dis.c \
+ xstormy16-ibld.c \
+ xstormy16-opc.c \
z8k-dis.c \
z8kgen.c
@@ -280,11 +299,22 @@ ALL_MACHINES = \
mips-dis.lo \
mips-opc.lo \
mips16-opc.lo \
+ mmix-dis.lo \
+ mmix-opc.lo \
ns32k-dis.lo \
+ openrisc-asm.lo \
+ openrisc-desc.lo \
+ openrisc-dis.lo \
+ openrisc-ibld.lo \
+ openrisc-opc.lo \
+ pdp11-dis.lo \
+ pdp11-opc.lo \
pj-dis.lo \
pj-opc.lo \
ppc-dis.lo \
ppc-opc.lo \
+ s390-dis.lo \
+ s390-opc.lo \
sh-dis.lo \
sparc-dis.lo \
sparc-opc.lo \
@@ -297,6 +327,11 @@ ALL_MACHINES = \
v850-opc.lo \
vax-dis.lo \
w65-dis.lo \
+ xstormy16-asm.lo \
+ xstormy16-desc.lo \
+ xstormy16-dis.lo \
+ xstormy16-ibld.lo \
+ xstormy16-opc.lo \
z8k-dis.lo
@@ -319,11 +354,13 @@ noinst_LIBRARIES = libopcodes.a
POTFILES = $(HFILES) $(CFILES)
CLEANFILES = \
- stamp-m32r stamp-fr30 \
+ stamp-m32r stamp-fr30 stamp-openrisc \
+ stamp-xstormy16 \
libopcodes.a stamp-lib dep.sed DEP DEPA DEP1 DEP2
CGENDIR = @cgendir@
+CPUDIR = $(CGENDIR)/cpu
CGEN = `if test -f ../guile/libguile/guile ; then echo ../guile/libguile/guile; else echo guile ; fi`
CGENFLAGS = -v
@@ -338,6 +375,10 @@ CGENDEPS = ../cgen/stamp-cgen \
@CGEN_MAINT_FALSE@M32R_DEPS =
@CGEN_MAINT_TRUE@FR30_DEPS = @CGEN_MAINT_TRUE@stamp-fr30
@CGEN_MAINT_FALSE@FR30_DEPS =
+@CGEN_MAINT_TRUE@OPENRISC_DEPS = @CGEN_MAINT_TRUE@stamp-openrisc
+@CGEN_MAINT_FALSE@OPENRISC_DEPS =
+@CGEN_MAINT_TRUE@XSTORMY16_DEPS = @CGEN_MAINT_TRUE@stamp-xstormy16
+@CGEN_MAINT_FALSE@XSTORMY16_DEPS =
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
CONFIG_HEADER = config.h
@@ -772,14 +813,24 @@ run-cgen:
# For now, require developers to configure with --enable-cgen-maint.
$(srcdir)/m32r-desc.h $(srcdir)/m32r-desc.c $(srcdir)/m32r-opc.h $(srcdir)/m32r-opc.c $(srcdir)/m32r-ibld.c $(srcdir)/m32r-opinst.c $(srcdir)/m32r-asm.c $(srcdir)/m32r-dis.c: $(M32R_DEPS)
@true
-stamp-m32r: $(CGENDEPS) $(CGENDIR)/m32r.cpu $(CGENDIR)/m32r.opc
+stamp-m32r: $(CGENDEPS) $(CPUDIR)/m32r.cpu $(CPUDIR)/m32r.opc
$(MAKE) run-cgen arch=m32r prefix=m32r options=opinst extrafiles=opinst
$(srcdir)/fr30-desc.h $(srcdir)/fr30-desc.c $(srcdir)/fr30-opc.h $(srcdir)/fr30-opc.c $(srcdir)/fr30-ibld.c $(srcdir)/fr30-asm.c $(srcdir)/fr30-dis.c: $(FR30_DEPS)
@true
-stamp-fr30: $(CGENDEPS) $(CGENDIR)/fr30.cpu $(CGENDIR)/fr30.opc
+stamp-fr30: $(CGENDEPS) $(CPUDIR)/fr30.cpu $(CPUDIR)/fr30.opc
$(MAKE) run-cgen arch=fr30 prefix=fr30 options= extrafiles=
+$(srcdir)/openrisc-desc.h $(srcdir)/openrisc-desc.c $(srcdir)/openrisc-opc.h $(srcdir)/openrisc-opc.c $(srcdir)/openrisc-ibld.c $(srcdir)/openrisc-asm.c $(srcdir)/openrisc-dis.c: $(OPENRISC_DEPS)
+ @true
+stamp-openrisc: $(CGENDEPS) $(CPUDIR)/openrisc.cpu $(CPUDIR)/openrisc.opc
+ $(MAKE) run-cgen arch=openrisc prefix=openrisc options= extrafiles=
+
+$(srcdir)/xstormy16-desc.h $(srcdir)/xstormy16-desc.c $(srcdir)/xstormy16-opc.h $(srcdir)/xstormy16-opc.c $(srcdir)/xstormy16-ibld.c $(srcdir)/xstormy16-asm.c $(srcdir)/xstormy16-dis.c: $(XSTORMY16_DEPS)
+ @true
+stamp-xstormy16: $(CGENDEPS) $(CPUDIR)/xstormy16.cpu $(CPUDIR)/xstormy16.opc
+ $(MAKE) run-cgen arch=xstormy16 prefix=xstormy16 options= extrafiles=
+
ia64-gen: ia64-gen.o
$(LINK) ia64-gen.o $(LIBIBERTY)
@@ -789,6 +840,14 @@ ia64-gen.o: ia64-gen.c ia64-opc.c ia64-opc-a.c ia64-opc-b.c ia64-opc-f.c \
ia64-asmtab.c: @MAINT@ ia64-gen ia64-ic.tbl ia64-raw.tbl ia64-waw.tbl ia64-war.tbl
here=`pwd`; cd $(srcdir); $$here/ia64-gen > ia64-asmtab.c
+s390-mkopc: s390-mkopc.c
+ $(CC_FOR_BUILD) -o s390-mkopc $(srcdir)/s390-mkopc.c
+
+s390-opc.tab: s390-mkopc s390-opc.txt
+ ./s390-mkopc < $(srcdir)/s390-opc.txt > s390-opc.tab
+
+Makefile: $(BFDDIR)/configure.in
+
# This dependency stuff is copied from BFD.
DEP: dep.sed $(CFILES) $(HFILES) config.h
@@ -837,53 +896,60 @@ dep-am: DEP
# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
a29k-dis.lo: a29k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/a29k.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/a29k.h
alpha-dis.lo: alpha-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/alpha.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/alpha.h
alpha-opc.lo: alpha-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/opcode/alpha.h $(BFD_H) opintl.h
+ $(INCDIR)/opcode/alpha.h $(BFD_H) $(INCDIR)/symcat.h \
+ opintl.h
arc-dis.lo: arc-dis.c $(INCDIR)/dis-asm.h $(BFD_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-dis.h arc-ext.h
-arc-opc.lo: arc-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/arc.h
-arc-ext.lo: arc-ext.c $(BFD_H) $(INCDIR)/ansidecl.h \
- arc-ext.h $(INCDIR)/libiberty.h
-arm-dis.lo: arm-dis.c sysdep.h config.h $(INCDIR)/ansidecl.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)/symcat.h $(INCDIR)/opcode/arc.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
+ $(INCDIR)/bfdlink.h $(INCDIR)/elf/arc.h $(INCDIR)/elf/reloc-macros.h \
+ opintl.h arc-dis.h arc-ext.h
+arc-opc.lo: arc-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/opcode/arc.h
+arc-ext.lo: arc-ext.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h arc-ext.h $(INCDIR)/libiberty.h
+arm-dis.lo: arm-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.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 sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) opintl.h $(INCDIR)/opcode/avr.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h opintl.h \
+ $(INCDIR)/opcode/avr.h
cgen-asm.lo: cgen-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/libiberty.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen.h \
- opintl.h
+ $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h $(BFD_H) \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen.h opintl.h
cgen-dis.lo: cgen-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/libiberty.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen.h
cgen-opc.lo: cgen-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/libiberty.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen.h
+ $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h $(BFD_H) \
+ $(INCDIR)/symcat.h $(INCDIR)/opcode/cgen.h
cris-dis.lo: cris-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h sysdep.h config.h $(INCDIR)/opcode/cris.h \
- $(INCDIR)/libiberty.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h sysdep.h config.h \
+ $(INCDIR)/opcode/cris.h $(INCDIR)/libiberty.h
cris-opc.lo: cris-opc.c $(INCDIR)/opcode/cris.h
d10v-dis.lo: d10v-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/opcode/d10v.h $(INCDIR)/dis-asm.h $(BFD_H)
+ $(INCDIR)/opcode/d10v.h $(INCDIR)/dis-asm.h $(BFD_H) \
+ $(INCDIR)/symcat.h
d10v-opc.lo: d10v-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/d10v.h
d30v-dis.lo: d30v-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/d30v.h $(INCDIR)/dis-asm.h $(BFD_H) \
- opintl.h
+ $(INCDIR)/symcat.h opintl.h
d30v-opc.lo: d30v-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/d30v.h
dis-buf.lo: dis-buf.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) opintl.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h opintl.h
disassemble.lo: disassemble.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H)
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
fr30-asm.lo: fr30-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen.h \
- fr30-opc.h opintl.h
+ fr30-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
fr30-desc.lo: fr30-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen.h \
fr30-opc.h opintl.h $(INCDIR)/libiberty.h
@@ -892,29 +958,32 @@ fr30-dis.lo: fr30-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/cgen.h fr30-opc.h opintl.h
fr30-ibld.lo: fr30-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h fr30-desc.h \
- $(INCDIR)/opcode/cgen.h fr30-opc.h opintl.h
+ $(INCDIR)/opcode/cgen.h fr30-opc.h opintl.h $(INCDIR)/safe-ctype.h
fr30-opc.lo: fr30-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h fr30-desc.h $(INCDIR)/opcode/cgen.h \
fr30-opc.h $(INCDIR)/libiberty.h
h8300-dis.lo: h8300-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/h8300.h $(INCDIR)/dis-asm.h $(BFD_H) \
- opintl.h
+ $(INCDIR)/symcat.h opintl.h
h8500-dis.lo: h8500-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- h8500-opc.h $(INCDIR)/dis-asm.h $(BFD_H) opintl.h
+ h8500-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h \
+ opintl.h
hppa-dis.lo: hppa-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(BFDDIR)/libhppa.h $(INCDIR)/opcode/hppa.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(BFDDIR)/libhppa.h \
+ $(INCDIR)/opcode/hppa.h
i370-dis.lo: i370-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/i370.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/i370.h
i370-opc.lo: i370-opc.c sysdep.h config.h $(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 opintl.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h sysdep.h config.h \
+ opintl.h
i860-dis.lo: i860-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/opcode/i860.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/opcode/i860.h
i960-dis.lo: i960-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H)
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
ia64-dis.lo: ia64-dis.c $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/ansidecl.h $(INCDIR)/opcode/ia64.h
+ $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/opcode/ia64.h
ia64-opc-a.lo: ia64-opc-a.c ia64-opc.h $(INCDIR)/opcode/ia64.h
ia64-opc-b.lo: ia64-opc-b.c ia64-opc.h $(INCDIR)/opcode/ia64.h
ia64-opc-f.lo: ia64-opc-f.c ia64-opc.h $(INCDIR)/opcode/ia64.h
@@ -925,13 +994,14 @@ ia64-opc.lo: ia64-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
sysdep.h config.h ia64-asmtab.h $(INCDIR)/opcode/ia64.h \
ia64-asmtab.c
ia64-gen.lo: ia64-gen.c $(INCDIR)/ansidecl.h $(INCDIR)/libiberty.h \
- sysdep.h config.h ia64-opc.h $(INCDIR)/opcode/ia64.h \
- ia64-opc-a.c ia64-opc-i.c ia64-opc-m.c ia64-opc-b.c \
- ia64-opc-f.c ia64-opc-x.c ia64-opc-d.c
+ $(INCDIR)/safe-ctype.h sysdep.h config.h ia64-opc.h \
+ $(INCDIR)/opcode/ia64.h ia64-opc-a.c ia64-opc-i.c ia64-opc-m.c \
+ ia64-opc-b.c ia64-opc-f.c ia64-opc-x.c ia64-opc-d.c
ia64-asmtab.lo: ia64-asmtab.c
m32r-asm.lo: m32r-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
- m32r-opc.h opintl.h
+ m32r-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
m32r-desc.lo: m32r-desc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
m32r-opc.h opintl.h $(INCDIR)/libiberty.h
@@ -940,7 +1010,7 @@ m32r-dis.lo: m32r-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/cgen.h m32r-opc.h opintl.h
m32r-ibld.lo: m32r-ibld.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h m32r-desc.h \
- $(INCDIR)/opcode/cgen.h m32r-opc.h opintl.h
+ $(INCDIR)/opcode/cgen.h m32r-opc.h opintl.h $(INCDIR)/safe-ctype.h
m32r-opc.lo: m32r-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
m32r-opc.h $(INCDIR)/libiberty.h
@@ -948,21 +1018,22 @@ m32r-opinst.lo: m32r-opinst.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(BFD_H) $(INCDIR)/symcat.h m32r-desc.h $(INCDIR)/opcode/cgen.h \
m32r-opc.h
m68hc11-dis.lo: m68hc11-dis.c $(INCDIR)/ansidecl.h \
- $(INCDIR)/opcode/m68hc11.h $(INCDIR)/dis-asm.h $(BFD_H)
+ $(INCDIR)/opcode/m68hc11.h $(INCDIR)/dis-asm.h $(BFD_H) \
+ $(INCDIR)/symcat.h
m68hc11-opc.lo: m68hc11-opc.c $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/m68hc11.h
m68k-dis.lo: m68k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/floatformat.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/floatformat.h \
opintl.h $(INCDIR)/opcode/m68k.h
m68k-opc.lo: m68k-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/m68k.h
m88k-dis.lo: m88k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/m88k.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/m88k.h \
opintl.h
mcore-dis.lo: mcore-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- mcore-opc.h $(INCDIR)/dis-asm.h $(BFD_H)
+ mcore-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
mips-dis.lo: mips-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/mips.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.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)/elf/reloc-macros.h
@@ -972,54 +1043,105 @@ mips16-opc.lo: mips16-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/mips.h
m10200-dis.lo: m10200-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/mn10200.h $(INCDIR)/dis-asm.h $(BFD_H) \
- opintl.h
+ $(INCDIR)/symcat.h opintl.h
m10200-opc.lo: m10200-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/mn10200.h
m10300-dis.lo: m10300-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/mn10300.h $(INCDIR)/dis-asm.h $(BFD_H) \
- opintl.h
+ $(INCDIR)/symcat.h opintl.h
m10300-opc.lo: m10300-opc.c sysdep.h config.h $(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 \
+mmix-dis.lo: mmix-dis.c $(INCDIR)/opcode/mmix.h $(INCDIR)/dis-asm.h \
+ $(BFD_H) $(INCDIR)/ansidecl.h $(INCDIR)/symcat.h $(INCDIR)/libiberty.h \
opintl.h
+mmix-opc.lo: mmix-opc.c $(INCDIR)/opcode/mmix.h $(INCDIR)/symcat.h
+ns32k-dis.lo: ns32k-dis.c $(BFD_H) $(INCDIR)/ansidecl.h \
+ $(INCDIR)/symcat.h sysdep.h config.h $(INCDIR)/dis-asm.h \
+ $(INCDIR)/opcode/ns32k.h opintl.h
+openrisc-asm.lo: openrisc-asm.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h openrisc-desc.h $(INCDIR)/opcode/cgen.h \
+ openrisc-opc.h opintl.h $(INCDIR)/xregex.h $(INCDIR)/xregex2.h \
+ $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+openrisc-desc.lo: openrisc-desc.c sysdep.h config.h \
+ $(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/symcat.h openrisc-desc.h \
+ $(INCDIR)/opcode/cgen.h openrisc-opc.h opintl.h $(INCDIR)/libiberty.h
+openrisc-dis.lo: openrisc-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h openrisc-desc.h \
+ $(INCDIR)/opcode/cgen.h openrisc-opc.h opintl.h
+openrisc-ibld.lo: openrisc-ibld.c sysdep.h config.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h \
+ openrisc-desc.h $(INCDIR)/opcode/cgen.h openrisc-opc.h \
+ opintl.h $(INCDIR)/safe-ctype.h
+openrisc-opc.lo: openrisc-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(BFD_H) $(INCDIR)/symcat.h openrisc-desc.h $(INCDIR)/opcode/cgen.h \
+ openrisc-opc.h $(INCDIR)/libiberty.h
+pdp11-dis.lo: pdp11-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/pdp11.h
+pdp11-opc.lo: pdp11-opc.c $(INCDIR)/opcode/pdp11.h
pj-dis.lo: pj-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/opcode/pj.h $(INCDIR)/dis-asm.h $(BFD_H)
+ $(INCDIR)/opcode/pj.h $(INCDIR)/dis-asm.h $(BFD_H) \
+ $(INCDIR)/symcat.h
pj-opc.lo: pj-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/pj.h
ppc-dis.lo: ppc-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/ppc.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/ppc.h
ppc-opc.lo: ppc-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/ppc.h opintl.h
+s390-mkopc.lo: s390-mkopc.c
+s390-opc.lo: s390-opc.c $(INCDIR)/ansidecl.h $(INCDIR)/opcode/s390.h \
+ s390-opc.tab
+s390-dis.lo: s390-dis.c $(INCDIR)/ansidecl.h sysdep.h \
+ config.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h \
+ $(INCDIR)/opcode/s390.h
sh-dis.lo: sh-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- sh-opc.h $(INCDIR)/dis-asm.h $(BFD_H)
+ sh-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
sparc-dis.lo: sparc-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/sparc.h $(INCDIR)/dis-asm.h $(BFD_H) \
- $(INCDIR)/libiberty.h opintl.h
+ $(INCDIR)/symcat.h $(INCDIR)/libiberty.h opintl.h
sparc-opc.lo: sparc-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/sparc.h
tic30-dis.lo: tic30-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/tic30.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/tic30.h
tic54x-dis.lo: tic54x-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/opcode/tic54x.h \
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/tic54x.h \
$(INCDIR)/coff/tic54x.h $(INCDIR)/coff/ti.h
tic54x-opc.lo: tic54x-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/opcode/tic54x.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h $(INCDIR)/opcode/tic54x.h
tic80-dis.lo: tic80-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/opcode/tic80.h $(INCDIR)/dis-asm.h $(BFD_H)
+ $(INCDIR)/opcode/tic80.h $(INCDIR)/dis-asm.h $(BFD_H) \
+ $(INCDIR)/symcat.h
tic80-opc.lo: tic80-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/tic80.h
v850-dis.lo: v850-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/v850.h $(INCDIR)/dis-asm.h $(BFD_H) \
- opintl.h
+ $(INCDIR)/symcat.h opintl.h
v850-opc.lo: v850-opc.c sysdep.h config.h $(INCDIR)/ansidecl.h \
$(INCDIR)/opcode/v850.h opintl.h
vax-dis.lo: vax-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/opcode/vax.h $(INCDIR)/dis-asm.h $(BFD_H)
+ $(INCDIR)/opcode/vax.h $(INCDIR)/dis-asm.h $(BFD_H) \
+ $(INCDIR)/symcat.h
w65-dis.lo: w65-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- w65-opc.h $(INCDIR)/dis-asm.h $(BFD_H)
+ w65-opc.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h
+xstormy16-asm.lo: xstormy16-asm.c sysdep.h config.h \
+ $(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/symcat.h xstormy16-desc.h \
+ $(INCDIR)/opcode/cgen.h xstormy16-opc.h opintl.h $(INCDIR)/xregex.h \
+ $(INCDIR)/xregex2.h $(INCDIR)/libiberty.h $(INCDIR)/safe-ctype.h
+xstormy16-desc.lo: xstormy16-desc.c sysdep.h config.h \
+ $(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/symcat.h xstormy16-desc.h \
+ $(INCDIR)/opcode/cgen.h xstormy16-opc.h opintl.h $(INCDIR)/libiberty.h
+xstormy16-dis.lo: xstormy16-dis.c sysdep.h config.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h \
+ xstormy16-desc.h $(INCDIR)/opcode/cgen.h xstormy16-opc.h \
+ opintl.h
+xstormy16-ibld.lo: xstormy16-ibld.c sysdep.h config.h \
+ $(INCDIR)/ansidecl.h $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h \
+ xstormy16-desc.h $(INCDIR)/opcode/cgen.h xstormy16-opc.h \
+ opintl.h $(INCDIR)/safe-ctype.h
+xstormy16-opc.lo: xstormy16-opc.c sysdep.h config.h \
+ $(INCDIR)/ansidecl.h $(BFD_H) $(INCDIR)/symcat.h xstormy16-desc.h \
+ $(INCDIR)/opcode/cgen.h xstormy16-opc.h $(INCDIR)/libiberty.h
z8k-dis.lo: z8k-dis.c sysdep.h config.h $(INCDIR)/ansidecl.h \
- $(INCDIR)/dis-asm.h $(BFD_H) z8k-opc.h
+ $(INCDIR)/dis-asm.h $(BFD_H) $(INCDIR)/symcat.h z8k-opc.h
z8kgen.lo: z8kgen.c sysdep.h config.h $(INCDIR)/ansidecl.h
# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
diff --git a/contrib/binutils/opcodes/aclocal.m4 b/contrib/binutils/opcodes/aclocal.m4
index a3aa924..2a4c03d 100644
--- a/contrib/binutils/opcodes/aclocal.m4
+++ b/contrib/binutils/opcodes/aclocal.m4
@@ -28,6 +28,24 @@ AC_DEFUN([CY_WITH_NLS],)
AC_SUBST(INTLLIBS)
])
+#serial 1
+# This test replaces the one in autoconf.
+# Currently this macro should have the same name as the autoconf macro
+# because gettext's gettext.m4 (distributed in the automake package)
+# still uses it. Otherwise, the use in gettext.m4 makes autoheader
+# give these diagnostics:
+# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
+# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
+
+undefine([AC_ISC_POSIX])
+
+AC_DEFUN(AC_ISC_POSIX,
+ [
+ dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
+ AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
+ ]
+)
+
# Do all the work for Automake. This macro actually does too much --
# some checks are only needed if your package does certain things.
# But this isn't really a big deal.
diff --git a/contrib/binutils/opcodes/alpha-dis.c b/contrib/binutils/opcodes/alpha-dis.c
index 8633d7b..49b5f20 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, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
Contributed by Richard Henderson <rth@tamu.edu>,
patterned after the PPC opcode handling written by Ian Lance Taylor.
@@ -27,8 +27,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
/* OSF register names. */
-static const char * const osf_regnames[64] =
-{
+static const char * const osf_regnames[64] = {
"v0", "t0", "t1", "t2", "t3", "t4", "t5", "t6",
"t7", "s0", "s1", "s2", "s3", "s4", "s5", "fp",
"a0", "a1", "a2", "a3", "a4", "a5", "t8", "t9",
@@ -41,8 +40,7 @@ static const char * const osf_regnames[64] =
/* VMS register names. */
-static const char * const vms_regnames[64] =
-{
+static const char * const vms_regnames[64] = {
"R0", "R1", "R2", "R3", "R4", "R5", "R6", "R7",
"R8", "R9", "R10", "R11", "R12", "R13", "R14", "R15",
"R16", "R17", "R18", "R19", "R20", "R21", "R22", "R23",
@@ -74,11 +72,11 @@ print_insn_alpha (memaddr, info)
opcode_end = opcode + alpha_num_opcodes;
for (op = 0; op < AXP_NOPS; ++op)
- {
- opcode_index[op] = opcode;
- while (opcode < opcode_end && op == AXP_OP (opcode->opcode))
+ {
+ opcode_index[op] = opcode;
+ while (opcode < opcode_end && op == AXP_OP (opcode->opcode))
++opcode;
- }
+ }
opcode_index[op] = opcode;
}
@@ -107,8 +105,8 @@ print_insn_alpha (memaddr, info)
int status = (*info->read_memory_func) (memaddr, buffer, 4, info);
if (status != 0)
{
- (*info->memory_error_func) (status, memaddr, info);
- return -1;
+ (*info->memory_error_func) (status, memaddr, info);
+ return -1;
}
insn = bfd_getl32 (buffer);
}
@@ -117,10 +115,10 @@ print_insn_alpha (memaddr, info)
op = AXP_OP (insn);
/* Find the first match in the opcode table. */
- opcode_end = opcode_index[op+1];
+ opcode_end = opcode_index[op + 1];
for (opcode = opcode_index[op]; opcode < opcode_end; ++opcode)
{
- if ((insn & opcode->mask) != opcode->opcode)
+ if ((insn ^ opcode->opcode) & opcode->mask)
continue;
if (!(opcode->flags & isa_mask))
@@ -130,14 +128,14 @@ print_insn_alpha (memaddr, info)
have extraction functions, and, if they do, make sure the
instruction is valid. */
{
- int invalid = 0;
- for (opindex = opcode->operands; *opindex != 0; opindex++)
+ int invalid = 0;
+ for (opindex = opcode->operands; *opindex != 0; opindex++)
{
- const struct alpha_operand *operand = alpha_operands + *opindex;
+ const struct alpha_operand *operand = alpha_operands + *opindex;
if (operand->extract)
(*operand->extract) (insn, &invalid);
}
- if (invalid)
+ if (invalid)
continue;
}
@@ -147,7 +145,7 @@ print_insn_alpha (memaddr, info)
/* No instruction found */
(*info->fprintf_func) (info->stream, ".long %#08x", insn);
-
+
return 4;
found:
@@ -182,7 +180,7 @@ found:
}
if (need_comma &&
- ((operand->flags & (AXP_OPERAND_PARENS|AXP_OPERAND_COMMA))
+ ((operand->flags & (AXP_OPERAND_PARENS | AXP_OPERAND_COMMA))
!= AXP_OPERAND_PARENS))
{
(*info->fprintf_func) (info->stream, ",");
@@ -194,7 +192,7 @@ found:
if (operand->flags & AXP_OPERAND_IR)
(*info->fprintf_func) (info->stream, "%s", regnames[value]);
else if (operand->flags & AXP_OPERAND_FPR)
- (*info->fprintf_func) (info->stream, "%s", regnames[value+32]);
+ (*info->fprintf_func) (info->stream, "%s", regnames[value + 32]);
else if (operand->flags & AXP_OPERAND_RELATIVE)
(*info->print_address_func) (memaddr + 4 + value, info);
else if (operand->flags & AXP_OPERAND_SIGNED)
diff --git a/contrib/binutils/opcodes/alpha-opc.c b/contrib/binutils/opcodes/alpha-opc.c
index 7680f47..7a20a55 100644
--- a/contrib/binutils/opcodes/alpha-opc.c
+++ b/contrib/binutils/opcodes/alpha-opc.c
@@ -30,10 +30,10 @@
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.
+ data, so the compiler should be able to put it in the text segment.
This file also holds the operand table. All knowledge about inserting
- operands into instructions and vice-versa is kept in this file.
+ and extracting operands from instructions is kept in this file.
The information for the base instruction set was compiled from the
_Alpha Architecture Handbook_, Digital Order Number EC-QD2KB-TE,
@@ -542,7 +542,8 @@ const struct alpha_opcode alpha_opcodes[] = {
{ "lda", MEM(0x08), BASE, ARG_MEM },
{ "ldah", MEM(0x09), BASE, ARG_MEM },
{ "ldbu", MEM(0x0A), BWX, ARG_MEM },
- { "unop", MEM(0x0B), BASE, { ZA } }, /* pseudo */
+ { "unop", MEM_(0x0B) | (30 << 16),
+ MEM_MASK, BASE, { ZA } }, /* pseudo */
{ "ldq_u", MEM(0x0B), BASE, ARG_MEM },
{ "ldwu", MEM(0x0C), BWX, ARG_MEM },
{ "stw", MEM(0x0D), BWX, ARG_MEM },
@@ -1103,6 +1104,7 @@ const struct alpha_opcode alpha_opcodes[] = {
{ "ecb", MFC(0x18,0xE800), BASE, { ZA, PRB } }, /* ev56 una */
{ "rs", MFC(0x18,0xF000), BASE, { RA } },
{ "wh64", MFC(0x18,0xF800), BASE, { ZA, PRB } }, /* ev56 una */
+ { "wh64en", MFC(0x18,0xFC00), BASE, { ZA, PRB } }, /* ev7 una */
{ "hw_mfpr", OPR(0x19,0x00), EV4, { RA, RBA, EV4EXTHWINDEX } },
{ "hw_mfpr", OP(0x19), OP_MASK, EV5, { RA, RBA, EV5HWINDEX } },
diff --git a/contrib/binutils/opcodes/arc-dis.c b/contrib/binutils/opcodes/arc-dis.c
index 18325a9..d38e2fa 100644
--- a/contrib/binutils/opcodes/arc-dis.c
+++ b/contrib/binutils/opcodes/arc-dis.c
@@ -26,7 +26,6 @@
#include <string.h>
#include "opintl.h"
-#include <ctype.h>
#include <stdarg.h>
#include "arc-dis.h"
#include "arc-ext.h"
@@ -35,24 +34,24 @@
#define dbg (0)
#endif
-#define BIT(word,n) ((word) & (1 << n))
-#define BITS(word,s,e) (((word) << (31 - e)) >> (s + (31 - e)))
-#define OPCODE(word) (BITS ((word), 27, 31))
-#define FIELDA(word) (BITS ((word), 21, 26))
-#define FIELDB(word) (BITS ((word), 15, 20))
-#define FIELDC(word) (BITS ((word), 9, 14))
+#define BIT(word,n) ((word) & (1 << n))
+#define BITS(word,s,e) (((word) << (31 - e)) >> (s + (31 - e)))
+#define OPCODE(word) (BITS ((word), 27, 31))
+#define FIELDA(word) (BITS ((word), 21, 26))
+#define FIELDB(word) (BITS ((word), 15, 20))
+#define FIELDC(word) (BITS ((word), 9, 14))
/* FIELD D is signed in all of its uses, so we make sure argument is
treated as signed for bit shifting purposes: */
-#define FIELDD(word) (BITS (((signed int)word), 0, 8))
-
-#define PUT_NEXT_WORD_IN(a) \
- do \
- { \
- if (is_limm == 1 && !NEXT_WORD (1)) \
- mwerror (state, _("Illegal limm reference in last instruction!\n")); \
- a = state->words[1]; \
- } \
+#define FIELDD(word) (BITS (((signed int)word), 0, 8))
+
+#define PUT_NEXT_WORD_IN(a) \
+ do \
+ { \
+ if (is_limm == 1 && !NEXT_WORD (1)) \
+ mwerror (state, _("Illegal limm reference in last instruction!\n")); \
+ a = state->words[1]; \
+ } \
while (0)
#define CHECK_FLAG_COND_NULLIFY() \
@@ -98,7 +97,7 @@
#define CHECK_FIELD_A() \
do \
{ \
- fieldA = FIELDA(state->words[0]); \
+ fieldA = FIELDA (state->words[0]); \
if (fieldA > 60) \
{ \
fieldAisReg = 0; \
@@ -136,20 +135,35 @@
(IS_REG (x) ? cb1"%r"ca1 : \
usesAuxReg ? cb"%a"ca : \
IS_SMALL (x) ? cb"%d"ca : cb"%h"ca))
-#define WRITE_FORMAT_RB() strcat (formatString, "]")
+#define WRITE_FORMAT_RB() strcat (formatString, "]")
#define WRITE_COMMENT(str) (state->comm[state->commNum++] = (str))
-#define WRITE_NOP_COMMENT() if (!fieldAisReg && !flag) WRITE_COMMENT ("nop");
+#define WRITE_NOP_COMMENT() if (!fieldAisReg && !flag) WRITE_COMMENT ("nop");
-#define NEXT_WORD(x) (offset += 4, state->words[x])
+#define NEXT_WORD(x) (offset += 4, state->words[x])
-#define add_target(x) (state->targets[state->tcnt++] = (x))
+#define add_target(x) (state->targets[state->tcnt++] = (x))
static char comment_prefix[] = "\t; ";
+static const char *core_reg_name PARAMS ((struct arcDisState *, int));
+static const char *aux_reg_name PARAMS ((struct arcDisState *, int));
+static const char *cond_code_name PARAMS ((struct arcDisState *, int));
+static const char *instruction_name
+ PARAMS ((struct arcDisState *, int, int, int *));
+static void mwerror PARAMS ((struct arcDisState *, const char *));
+static const char *post_address PARAMS ((struct arcDisState *, int));
+static void write_comments_
+ PARAMS ((struct arcDisState *, int, int, long int));
+static void write_instr_name_
+ PARAMS ((struct arcDisState *, const char *, int, int, int, int, int, int));
+static int dsmOneArcInst PARAMS ((bfd_vma, struct arcDisState *));
+static const char *_coreRegName PARAMS ((void *, int));
+static int decodeInstr PARAMS ((bfd_vma, disassemble_info *));
+
static const char *
core_reg_name (state, val)
struct arcDisState * state;
- int val;
+ int val;
{
if (state->coreRegName)
return (*state->coreRegName)(state->_this, val);
@@ -159,7 +173,7 @@ core_reg_name (state, val)
static const char *
aux_reg_name (state, val)
struct arcDisState * state;
- int val;
+ int val;
{
if (state->auxRegName)
return (*state->auxRegName)(state->_this, val);
@@ -169,7 +183,7 @@ aux_reg_name (state, val)
static const char *
cond_code_name (state, val)
struct arcDisState * state;
- int val;
+ int val;
{
if (state->condCodeName)
return (*state->condCodeName)(state->_this, val);
@@ -181,7 +195,7 @@ instruction_name (state, op1, op2, flags)
struct arcDisState * state;
int op1;
int op2;
- int * flags;
+ int * flags;
{
if (state->instName)
return (*state->instName)(state->_this, op1, op2, flags);
@@ -191,7 +205,7 @@ instruction_name (state, op1, op2, flags)
static void
mwerror (state, msg)
struct arcDisState * state;
- const char * msg;
+ const char * msg;
{
if (state->err != 0)
(*state->err)(state->_this, (msg));
@@ -200,7 +214,7 @@ mwerror (state, msg)
static const char *
post_address (state, addr)
struct arcDisState * state;
- int addr;
+ int addr;
{
static char id[3 * ARRAY_SIZE (state->addresses)];
int j, i = state->acnt;
@@ -213,47 +227,49 @@ post_address (state, addr)
id[j+0] = '@';
id[j+1] = '0'+i;
id[j+2] = 0;
-
+
return id + j;
}
return "";
}
-static void
-my_sprintf (
- struct arcDisState * state,
- char * buf,
- const char * format,
- ...)
+static void my_sprintf PARAMS ((struct arcDisState *, char *, const char *,
+ ...));
+
+static void
+my_sprintf VPARAMS ((struct arcDisState *state, char *buf, const char *format,
+ ...))
{
- char *bp;
+ char *bp;
const char *p;
int size, leading_zero, regMap[2];
long auxNum;
- va_list ap;
-
- va_start (ap, format);
-
- bp = buf;
+
+ VA_OPEN (ap, format);
+ VA_FIXEDARG (ap, struct arcDisState *, state);
+ VA_FIXEDARG (ap, char *, buf);
+ VA_FIXEDARG (ap, const char *, format);
+
+ bp = buf;
*bp = 0;
p = format;
auxNum = -1;
regMap[0] = 0;
regMap[1] = 0;
-
- while (1)
+
+ while (1)
switch (*p++)
{
- case 0:
- goto DOCOMM; /* (return) */
- default:
- *bp++ = p[-1];
+ case 0:
+ goto DOCOMM; /* (return) */
+ default:
+ *bp++ = p[-1];
break;
case '%':
size = 0;
leading_zero = 0;
RETRY: ;
- switch (*p++)
+ switch (*p++)
{
case '0':
case '1':
@@ -279,25 +295,25 @@ my_sprintf (
}
#define inc_bp() bp = bp + strlen (bp)
- case 'h':
+ case 'h':
{
unsigned u = va_arg (ap, int);
/* Hex. We can change the format to 0x%08x in
one place, here, if we wish.
We add underscores for easy reading. */
- if (u > 65536)
+ if (u > 65536)
sprintf (bp, "0x%x_%04x", u >> 16, u & 0xffff);
- else
+ else
sprintf (bp, "0x%x", u);
inc_bp ();
- }
+ }
break;
- case 'X': case 'x':
+ case 'X': case 'x':
{
int val = va_arg (ap, int);
- if (size != 0)
+ if (size != 0)
if (leading_zero)
sprintf (bp, "%0*x", size, val);
else
@@ -307,10 +323,10 @@ my_sprintf (
inc_bp ();
}
break;
- case 'd':
+ case 'd':
{
int val = va_arg (ap, int);
-
+
if (size != 0)
sprintf (bp, "%*d", size, val);
else
@@ -318,15 +334,15 @@ my_sprintf (
inc_bp ();
}
break;
- case 'r':
+ case 'r':
{
/* Register. */
int val = va_arg (ap, int);
-
+
#define REG2NAME(num, name) case num: sprintf (bp, ""name); \
regMap[(num < 32) ? 0 : 1] |= 1 << (num - ((num < 32) ? 0 : 32)); break;
-
- switch (val)
+
+ switch (val)
{
REG2NAME (26, "gp");
REG2NAME (27, "fp");
@@ -349,15 +365,15 @@ my_sprintf (
}
inc_bp ();
} break;
-
- case 'a':
+
+ case 'a':
{
/* Aux Register. */
int val = va_arg (ap, int);
#define AUXREG2NAME(num, name) case num: sprintf (bp,name); break;
- switch (val)
+ switch (val)
{
AUXREG2NAME (0x0, "status");
AUXREG2NAME (0x1, "semaphore");
@@ -380,14 +396,14 @@ my_sprintf (
inc_bp ();
}
break;
-
- case 's':
+
+ case 's':
{
sprintf (bp, "%s", va_arg (ap, char *));
inc_bp ();
}
break;
-
+
default:
fprintf (stderr, "?? format %c\n", p[-1]);
break;
@@ -395,33 +411,35 @@ my_sprintf (
}
DOCOMM: *bp = 0;
+ VA_CLOSE (ap);
}
-static void
+static void
write_comments_(state, shimm, is_limm, limm_value)
struct arcDisState * state;
int shimm;
int is_limm;
long limm_value;
{
- if (state->commentBuffer != 0)
+ if (state->commentBuffer != 0)
{
int i;
- if (is_limm)
+ if (is_limm)
{
const char *name = post_address (state, limm_value + shimm);
if (*name != 0)
WRITE_COMMENT (name);
}
- for (i = 0; i < state->commNum; i++)
+ for (i = 0; i < state->commNum; i++)
{
if (i == 0)
strcpy (state->commentBuffer, comment_prefix);
else
- strcat (state->commentBuffer, ", ");
- strncat (state->commentBuffer, state->comm[i], sizeof (state->commentBuffer));
+ strcat (state->commentBuffer, ", ");
+ strncat (state->commentBuffer, state->comm[i],
+ sizeof (state->commentBuffer));
}
}
}
@@ -431,11 +449,11 @@ write_comments_(state, shimm, is_limm, limm_value)
static const char *condName[] = {
/* 0..15. */
- "" , "z" , "nz" , "p" , "n" , "c" , "nc" , "v" ,
+ "" , "z" , "nz" , "p" , "n" , "c" , "nc" , "v" ,
"nv" , "gt" , "ge" , "lt" , "le" , "hi" , "ls" , "pnz"
};
-static void
+static void
write_instr_name_(state, instrName, cond, condCodeIsPartOfName, flag, signExtend, addrWriteBack, directMem)
struct arcDisState * state;
const char * instrName;
@@ -448,7 +466,7 @@ write_instr_name_(state, instrName, cond, condCodeIsPartOfName, flag, signExtend
{
strcpy (state->instrBuffer, instrName);
- if (cond > 0)
+ if (cond > 0)
{
const char *cc = 0;
@@ -469,7 +487,7 @@ write_instr_name_(state, instrName, cond, condCodeIsPartOfName, flag, signExtend
if (flag)
strcat (state->instrBuffer, ".f");
- switch (state->nullifyMode)
+ switch (state->nullifyMode)
{
case BR_exec_always:
strcat (state->instrBuffer, ".d");
@@ -498,16 +516,16 @@ write_instr_name_(state, instrName, cond, condCodeIsPartOfName, flag, signExtend
} \
while (0)
-enum {
- op_LD0 = 0, op_LD1 = 1, op_ST = 2, op_3 = 3,
+enum {
+ op_LD0 = 0, op_LD1 = 1, op_ST = 2, op_3 = 3,
op_BC = 4, op_BLC = 5, op_LPC = 6, op_JC = 7,
- op_ADD = 8, op_ADC = 9, op_SUB = 10, op_SBC = 11,
+ op_ADD = 8, op_ADC = 9, op_SUB = 10, op_SBC = 11,
op_AND = 12, op_OR = 13, op_BIC = 14, op_XOR = 15
};
extern disassemble_info tm_print_insn_info;
-static int
+static int
dsmOneArcInst (addr, state)
bfd_vma addr;
struct arcDisState * state;
@@ -536,22 +554,22 @@ dsmOneArcInst (addr, state)
int flags;
int ignoreFirstOpd;
char formatString[60];
-
+
state->instructionLen = 4;
state->nullifyMode = BR_exec_when_no_jump;
state->opWidth = 12;
state->isBranch = 0;
-
+
state->_mem_load = 0;
state->_ea_present = 0;
state->_load_len = 0;
state->ea_reg1 = no_reg;
state->ea_reg2 = no_reg;
state->_offset = 0;
-
+
if (! NEXT_WORD (0))
return 0;
-
+
state->_opcode = OPCODE (state->words[0]);
instrName = 0;
decodingClass = 0; /* default! */
@@ -566,10 +584,10 @@ dsmOneArcInst (addr, state)
if (state->commentBuffer)
state->commentBuffer[0] = '\0';
- switch (state->_opcode)
+ switch (state->_opcode)
{
- case op_LD0:
- switch (BITS (state->words[0],1,2))
+ case op_LD0:
+ switch (BITS (state->words[0],1,2))
{
case 0:
instrName = "ld";
@@ -584,22 +602,22 @@ dsmOneArcInst (addr, state)
state->_load_len = 2;
break;
default:
- instrName = "??? (0[3])";
+ instrName = "??? (0[3])";
state->flow = invalid_instr;
break;
}
- decodingClass = 5;
+ decodingClass = 5;
break;
-
- case op_LD1:
- if (BIT (state->words[0],13))
+
+ case op_LD1:
+ if (BIT (state->words[0],13))
{
- instrName = "lr";
+ instrName = "lr";
decodingClass = 10;
}
- else
+ else
{
- switch (BITS (state->words[0],10,11))
+ switch (BITS (state->words[0],10,11))
{
case 0:
instrName = "ld";
@@ -614,23 +632,23 @@ dsmOneArcInst (addr, state)
state->_load_len = 2;
break;
default:
- instrName = "??? (1[3])";
+ instrName = "??? (1[3])";
state->flow = invalid_instr;
break;
}
decodingClass = 6;
}
break;
-
+
case op_ST:
- if (BIT (state->words[0],25))
+ if (BIT (state->words[0],25))
{
instrName = "sr";
decodingClass = 8;
}
- else
+ else
{
- switch (BITS (state->words[0],22,23))
+ switch (BITS (state->words[0],22,23))
{
case 0:
instrName = "st";
@@ -642,20 +660,20 @@ dsmOneArcInst (addr, state)
instrName = "stw";
break;
default:
- instrName = "??? (2[3])";
+ instrName = "??? (2[3])";
state->flow = invalid_instr;
break;
}
decodingClass = 7;
}
break;
-
+
case op_3:
decodingClass = 1; /* default for opcode 3... */
- switch (FIELDC (state->words[0]))
+ switch (FIELDC (state->words[0]))
{
case 0:
- instrName = "flag";
+ instrName = "flag";
decodingClass = 2;
break;
case 1:
@@ -682,10 +700,10 @@ dsmOneArcInst (addr, state)
case 8:
instrName = "extw";
break;
- case 0x3f:
+ case 0x3f:
{
decodingClass = 9;
- switch( FIELDD (state->words[0]) )
+ switch( FIELDD (state->words[0]) )
{
case 0:
instrName = "brk";
@@ -703,14 +721,14 @@ dsmOneArcInst (addr, state)
}
}
break;
-
+
/* ARC Extension Library Instructions
NOTE: We assume that extension codes are these instrs. */
default:
instrName = instruction_name (state,
state->_opcode,
FIELDC (state->words[0]),
- & flags);
+ &flags);
if (!instrName)
{
instrName = "???";
@@ -723,24 +741,24 @@ dsmOneArcInst (addr, state)
break;
case op_BC:
- instrName = "b";
+ instrName = "b";
case op_BLC:
if (!instrName)
- instrName = "bl";
+ instrName = "bl";
case op_LPC:
if (!instrName)
- instrName = "lp";
+ instrName = "lp";
case op_JC:
if (!instrName)
{
- if (BITS (state->words[0],9,9))
+ if (BITS (state->words[0],9,9))
{
- instrName = "jl";
+ instrName = "jl";
is_linked = 1;
}
- else
+ else
{
- instrName = "j";
+ instrName = "j";
is_linked = 0;
}
}
@@ -748,14 +766,14 @@ dsmOneArcInst (addr, state)
decodingClass = ((state->_opcode == op_JC) ? 4 : 3);
state->isBranch = 1;
break;
-
+
case op_ADD:
case op_ADC:
case op_AND:
repeatsOp = (FIELDC (state->words[0]) == FIELDB (state->words[0]));
decodingClass = 0;
- switch (state->_opcode)
+ switch (state->_opcode)
{
case op_ADD:
instrName = (repeatsOp ? "asl" : "add");
@@ -768,7 +786,7 @@ dsmOneArcInst (addr, state)
break;
}
break;
-
+
case op_SUB: instrName = "sub";
break;
case op_SBC: instrName = "sbc";
@@ -785,10 +803,10 @@ dsmOneArcInst (addr, state)
instrName = "nop";
decodingClass = 9;
}
- else
+ else
instrName = "xor";
break;
-
+
default:
instrName = instruction_name (state,state->_opcode,0,&flags);
/* if (instrName) printf("FLAGS=0x%x\n", flags); */
@@ -801,14 +819,14 @@ dsmOneArcInst (addr, state)
ignoreFirstOpd = 1;
break;
}
-
+
fieldAisReg = fieldBisReg = fieldCisReg = 1; /* Assume regs for now. */
flag = cond = is_shimm = is_limm = 0;
state->nullifyMode = BR_exec_when_no_jump; /* 0 */
signExtend = addrWriteBack = directMem = 0;
usesAuxReg = 0;
-
- switch (decodingClass)
+
+ switch (decodingClass)
{
case 0:
CHECK_FIELD_A ();
@@ -816,83 +834,87 @@ dsmOneArcInst (addr, state)
if (!repeatsOp)
CHECK_FIELD_C ();
CHECK_FLAG_COND_NULLIFY ();
-
+
write_instr_name ();
- if (!ignoreFirstOpd)
+ if (!ignoreFirstOpd)
{
WRITE_FORMAT_x (A);
WRITE_FORMAT_COMMA_x (B);
if (!repeatsOp)
WRITE_FORMAT_COMMA_x (C);
WRITE_NOP_COMMENT ();
- my_sprintf (state, state->operandBuffer, formatString, fieldA, fieldB, fieldC);
+ my_sprintf (state, state->operandBuffer, formatString,
+ fieldA, fieldB, fieldC);
}
- else
+ else
{
WRITE_FORMAT_x (B);
if (!repeatsOp)
WRITE_FORMAT_COMMA_x (C);
- my_sprintf (state, state->operandBuffer, formatString, fieldB, fieldC);
+ my_sprintf (state, state->operandBuffer, formatString,
+ fieldB, fieldC);
}
write_comments ();
break;
-
+
case 1:
CHECK_FIELD_A ();
CHECK_FIELD_B ();
CHECK_FLAG_COND_NULLIFY ();
-
+
write_instr_name ();
- if (!ignoreFirstOpd)
+ if (!ignoreFirstOpd)
{
WRITE_FORMAT_x (A);
WRITE_FORMAT_COMMA_x (B);
WRITE_NOP_COMMENT ();
- my_sprintf (state, state->operandBuffer, formatString, fieldA, fieldB);
+ my_sprintf (state, state->operandBuffer, formatString,
+ fieldA, fieldB);
}
- else
+ else
{
WRITE_FORMAT_x (B);
- my_sprintf (state, state->operandBuffer, formatString, fieldB);
+ my_sprintf (state, state->operandBuffer, formatString, fieldB);
}
write_comments ();
break;
-
+
case 2:
CHECK_FIELD_B ();
CHECK_FLAG_COND_NULLIFY ();
flag = 0; /* this is the FLAG instruction -- it's redundant */
-
+
write_instr_name ();
WRITE_FORMAT_x (B);
my_sprintf (state, state->operandBuffer, formatString, fieldB);
write_comments ();
break;
-
+
case 3:
fieldA = BITS (state->words[0],7,26) << 2;
fieldA = (fieldA << 10) >> 10; /* make it signed */
fieldA += addr + 4;
CHECK_FLAG_COND_NULLIFY ();
flag = 0;
-
+
write_instr_name ();
/* This address could be a label we know. Convert it. */
- if (state->_opcode != op_LPC /* LP */)
+ if (state->_opcode != op_LPC /* LP */)
{
- add_target (fieldA); /* For debugger. */
- state->flow = state->_opcode == op_BLC /* BL */
- ? direct_call
- : direct_jump;
- /* indirect calls are achieved by "lr blink,[status];
- lr dest<- func addr; j [dest]" */
- }
-
+ add_target (fieldA); /* For debugger. */
+ state->flow = state->_opcode == op_BLC /* BL */
+ ? direct_call
+ : direct_jump;
+ /* indirect calls are achieved by "lr blink,[status];
+ lr dest<- func addr; j [dest]" */
+ }
+
strcat (formatString, "%s"); /* address/label name */
- my_sprintf (state, state->operandBuffer, formatString, post_address (state, fieldA));
+ my_sprintf (state, state->operandBuffer, formatString,
+ post_address (state, fieldA));
write_comments ();
break;
-
+
case 4:
/* For op_JC -- jump to address specified.
Also covers jump and link--bit 9 of the instr. word
@@ -900,8 +922,8 @@ dsmOneArcInst (addr, state)
fieldA = 0;
CHECK_FIELD_B ();
CHECK_FLAG_COND_NULLIFY ();
-
- if (!fieldBisReg)
+
+ if (!fieldBisReg)
{
fieldAisReg = 0;
fieldA = (fieldB >> 25) & 0x7F; /* flags */
@@ -913,7 +935,7 @@ dsmOneArcInst (addr, state)
if (is_linked && state->nullifyMode == BR_exec_when_jump)
state->nullifyMode = BR_exec_when_no_jump;
}
- else
+ else
{
state->flow = is_linked ? indirect_call : indirect_jump;
/* We should also treat this as indirect call if NOT linked
@@ -922,11 +944,11 @@ dsmOneArcInst (addr, state)
* For now we can't detect such. */
state->register_for_indirect_jump = fieldB;
}
-
+
write_instr_name ();
- strcat (formatString,
+ strcat (formatString,
IS_REG (B) ? "[%r]" : "%s"); /* address/label name */
- if (fieldA != 0)
+ if (fieldA != 0)
{
fieldAisReg = 0;
WRITE_FORMAT_COMMA_x (A);
@@ -934,11 +956,11 @@ dsmOneArcInst (addr, state)
if (IS_REG (B))
my_sprintf (state, state->operandBuffer, formatString, fieldB, fieldA);
else
- my_sprintf (state, state->operandBuffer, formatString,
+ my_sprintf (state, state->operandBuffer, formatString,
post_address (state, fieldB), fieldA);
write_comments ();
break;
-
+
case 5:
/* LD instruction.
B and C can be regs, or one (both?) can be limm. */
@@ -959,29 +981,30 @@ dsmOneArcInst (addr, state)
else
state->_offset += fieldC;
state->_mem_load = 1;
-
+
directMem = BIT (state->words[0],5);
addrWriteBack = BIT (state->words[0],3);
signExtend = BIT (state->words[0],0);
-
+
write_instr_name ();
WRITE_FORMAT_x_COMMA_LB(A);
if (fieldBisReg || fieldB != 0)
WRITE_FORMAT_x_COMMA (B);
else
fieldB = fieldC;
-
+
WRITE_FORMAT_x_RB (C);
- my_sprintf (state, state->operandBuffer, formatString, fieldA, fieldB, fieldC);
+ my_sprintf (state, state->operandBuffer, formatString,
+ fieldA, fieldB, fieldC);
write_comments ();
break;
-
+
case 6:
/* LD instruction. */
CHECK_FIELD_B ();
CHECK_FIELD_A ();
fieldC = FIELDD (state->words[0]);
-
+
if (dbg)
printf ("6:b reg %d %d c 0x%x \n",
fieldBisReg, fieldB, fieldC);
@@ -994,22 +1017,22 @@ dsmOneArcInst (addr, state)
Say ea is not present, so only one of us will do the name lookup. */
else
state->_offset += fieldB, state->_ea_present = 0;
-
+
directMem = BIT (state->words[0],14);
addrWriteBack = BIT (state->words[0],12);
signExtend = BIT (state->words[0],9);
-
+
write_instr_name ();
WRITE_FORMAT_x_COMMA_LB (A);
- if (!fieldBisReg)
+ if (!fieldBisReg)
{
fieldB = state->_offset;
WRITE_FORMAT_x_RB (B);
}
- else
+ else
{
WRITE_FORMAT_x (B);
- if (fieldC != 0 && !BIT (state->words[0],13))
+ if (fieldC != 0 && !BIT (state->words[0],13))
{
fieldCisReg = 0;
WRITE_FORMAT_COMMA_x_RB (C);
@@ -1017,44 +1040,45 @@ dsmOneArcInst (addr, state)
else
WRITE_FORMAT_RB ();
}
- my_sprintf (state, state->operandBuffer, formatString, fieldA, fieldB, fieldC);
+ my_sprintf (state, state->operandBuffer, formatString,
+ fieldA, fieldB, fieldC);
write_comments ();
break;
-
+
case 7:
/* ST instruction. */
CHECK_FIELD_B();
CHECK_FIELD_C();
fieldA = FIELDD(state->words[0]); /* shimm */
-
+
/* [B,A offset] */
if (dbg) printf("7:b reg %d %x off %x\n",
- fieldBisReg,fieldB,fieldA);
+ fieldBisReg,fieldB,fieldA);
state->_ea_present = 1;
state->_offset = fieldA;
if (fieldBisReg)
state->ea_reg1 = fieldB;
- /* field B is either a shimm (same as fieldA) or limm (different!)
+ /* field B is either a shimm (same as fieldA) or limm (different!)
Say ea is not present, so only one of us will do the name lookup.
(for is_limm we do the name translation here). */
- else
+ else
state->_offset += fieldB, state->_ea_present = 0;
-
+
directMem = BIT(state->words[0],26);
addrWriteBack = BIT(state->words[0],24);
-
+
write_instr_name();
WRITE_FORMAT_x_COMMA_LB(C);
-
- if (!fieldBisReg)
+
+ if (!fieldBisReg)
{
fieldB = state->_offset;
WRITE_FORMAT_x_RB(B);
}
- else
+ else
{
WRITE_FORMAT_x(B);
- if (fieldBisReg && fieldA != 0)
+ if (fieldBisReg && fieldA != 0)
{
fieldAisReg = 0;
WRITE_FORMAT_COMMA_x_RB(A);
@@ -1062,14 +1086,15 @@ dsmOneArcInst (addr, state)
else
WRITE_FORMAT_RB();
}
- my_sprintf (state, state->operandBuffer, formatString, fieldC, fieldB, fieldA);
+ my_sprintf (state, state->operandBuffer, formatString,
+ fieldC, fieldB, fieldA);
write_comments2(fieldA);
break;
case 8:
/* SR instruction */
CHECK_FIELD_B();
CHECK_FIELD_C();
-
+
write_instr_name();
WRITE_FORMAT_x_COMMA_LB(C);
/* Try to print B as an aux reg if it is not a core reg. */
@@ -1079,17 +1104,17 @@ dsmOneArcInst (addr, state)
my_sprintf (state, state->operandBuffer, formatString, fieldC, fieldB);
write_comments();
break;
-
+
case 9:
write_instr_name();
state->operandBuffer[0] = '\0';
break;
-
+
case 10:
/* LR instruction */
CHECK_FIELD_A();
CHECK_FIELD_B();
-
+
write_instr_name();
WRITE_FORMAT_x_COMMA_LB(A);
/* Try to print B as an aux reg if it is not a core reg. */
@@ -1099,18 +1124,18 @@ dsmOneArcInst (addr, state)
my_sprintf (state, state->operandBuffer, formatString, fieldA, fieldB);
write_comments();
break;
-
+
case 11:
CHECK_COND();
write_instr_name();
state->operandBuffer[0] = '\0';
break;
-
+
default:
mwerror (state, "Bad decoding class in ARC disassembler");
break;
}
-
+
state->_cond = cond;
return state->instructionLen = offset;
}
@@ -1129,7 +1154,7 @@ _coreRegName(arg, regval)
static const char *
_auxRegName(void *_this ATTRIBUTE_UNUSED, int regval)
{
- return arcExtMap_auxRegName(regval);
+ return arcExtMap_auxRegName(regval);
}
@@ -1137,14 +1162,14 @@ _auxRegName(void *_this ATTRIBUTE_UNUSED, int regval)
static const char *
_condCodeName(void *_this ATTRIBUTE_UNUSED, int regval)
{
- return arcExtMap_condCodeName(regval);
+ return arcExtMap_condCodeName(regval);
}
/* Returns the name the user specified extension instruction. */
static const char *
_instName (void *_this ATTRIBUTE_UNUSED, int majop, int minop, int *flags)
{
- return arcExtMap_instName(majop, minop, flags);
+ return arcExtMap_instName(majop, minop, flags);
}
/* Decode an instruction returning the size of the instruction
@@ -1158,11 +1183,11 @@ decodeInstr (address, info)
bfd_byte buffer[4];
struct arcDisState s; /* ARC Disassembler state */
void *stream = info->stream; /* output stream */
- fprintf_ftype func = info->fprintf_func;
+ fprintf_ftype func = info->fprintf_func;
int bytes;
-
+
memset (&s, 0, sizeof(struct arcDisState));
-
+
/* read first instruction */
status = (*info->read_memory_func) (address, buffer, 4, info);
if (status != 0)
@@ -1195,9 +1220,9 @@ decodeInstr (address, info)
/* display the disassembly instruction */
(*func) (stream, "%08x ", s.words[0]);
(*func) (stream, " ");
-
+
(*func) (stream, "%-10s ", s.instrBuffer);
-
+
if (__TRANSLATION_REQUIRED(s))
{
bfd_vma addr = s.addresses[s.operandBuffer[1] - '0'];
diff --git a/contrib/binutils/opcodes/arc-ext.c b/contrib/binutils/opcodes/arc-ext.c
index 1a53da9..fd43d29 100644
--- a/contrib/binutils/opcodes/arc-ext.c
+++ b/contrib/binutils/opcodes/arc-ext.c
@@ -1,4 +1,4 @@
-/* ARC target-dependent stuff. Extension structure access functions
+/* ARC target-dependent stuff. Extension structure access functions
Copyright 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
This file is part of GDB.
@@ -17,6 +17,7 @@
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 <stdlib.h>
#include <stdio.h>
#include "bfd.h"
@@ -29,9 +30,9 @@ static struct arcExtMap arc_extension_map;
/* Get the name of an extension instruction. */
const char *
-arcExtMap_instName(int opcode, int minor, int *flags)
+arcExtMap_instName(int opcode, int minor, int *flags)
{
- if (opcode == 3)
+ if (opcode == 3)
{
/* FIXME: ??? need to also check 0/1/2 in bit0 for (3f) brk/sleep/swi */
if (minor < 0x09 || minor == 0x3f)
@@ -53,7 +54,7 @@ arcExtMap_instName(int opcode, int minor, int *flags)
/* Get the name of an extension core register. */
const char *
-arcExtMap_coreRegName(int value)
+arcExtMap_coreRegName(int value)
{
if (value < 32)
return 0;
@@ -63,7 +64,7 @@ arcExtMap_coreRegName(int value)
/* Get the name of an extension condition code. */
const char *
-arcExtMap_condCodeName(int value)
+arcExtMap_condCodeName(int value)
{
if (value < 16)
return 0;
@@ -88,7 +89,7 @@ arcExtMap_auxRegName(long address)
/* Recursively free auxilliary register strcture pointers until
the list is empty. */
-static void
+static void
clean_aux_registers(struct ExtAuxRegister *r)
{
if (r -> next)
@@ -98,14 +99,14 @@ clean_aux_registers(struct ExtAuxRegister *r)
free(r -> next);
r ->next = NULL;
}
- else
+ else
free(r -> name);
}
-
+
/* Free memory that has been allocated for the extensions. */
-static void
-cleanup_ext_map(void)
+static void
+cleanup_ext_map(void)
{
struct ExtAuxRegister *r;
struct ExtInstruction *insn;
@@ -113,45 +114,45 @@ cleanup_ext_map(void)
/* clean aux reg structure */
r = arc_extension_map.auxRegisters;
- if (r)
+ if (r)
{
(clean_aux_registers(r));
free(r);
}
-
+
/* clean instructions */
- for (i = 0; i < NUM_EXT_INST; i++)
+ for (i = 0; i < NUM_EXT_INST; i++)
{
insn = arc_extension_map.instructions[i];
if (insn)
free(insn->name);
}
-
+
/* clean core reg struct */
- for (i = 0; i < NUM_EXT_CORE; i++)
+ for (i = 0; i < NUM_EXT_CORE; i++)
{
if (arc_extension_map.coreRegisters[i])
free(arc_extension_map.coreRegisters[i]);
}
-
+
for (i = 0; i < NUM_EXT_COND; i++) {
if (arc_extension_map.condCodes[i])
free(arc_extension_map.condCodes[i]);
}
-
- memset(&arc_extension_map, 0, sizeof(struct arcExtMap));
+
+ memset(&arc_extension_map, 0, sizeof(struct arcExtMap));
}
-int
-arcExtMap_add(void *base, unsigned long length)
+int
+arcExtMap_add(void *base, unsigned long length)
{
unsigned char *block = base;
unsigned char *p = block;
-
+
/* Clean up and reset everything if needed. */
cleanup_ext_map();
- while (p && p < (block + length))
+ while (p && p < (block + length))
{
/* p[0] == length of record
p[1] == type of record
@@ -170,7 +171,7 @@ arcExtMap_add(void *base, unsigned long length)
if (p[0] == 0)
return -1;
-
+
switch (p[1])
{
case EXT_INSTRUCTION:
@@ -178,9 +179,9 @@ arcExtMap_add(void *base, unsigned long length)
char opcode = p[2];
char minor = p[3];
char * insn_name = (char *) xmalloc(( (int)*p-5) * sizeof(char));
- struct ExtInstruction * insn =
+ struct ExtInstruction * insn =
(struct ExtInstruction *) xmalloc(sizeof(struct ExtInstruction));
-
+
if (opcode==3)
opcode = 0x1f - 0x10 + minor - 0x09 + 1;
else
@@ -191,8 +192,8 @@ arcExtMap_add(void *base, unsigned long length)
arc_extension_map.instructions[(int) opcode] = insn;
}
break;
-
- case EXT_CORE_REGISTER:
+
+ case EXT_CORE_REGISTER:
{
char * core_name = (char *) xmalloc(((int)*p-3) * sizeof(char));
@@ -200,19 +201,19 @@ arcExtMap_add(void *base, unsigned long length)
arc_extension_map.coreRegisters[p[2]-32] = core_name;
}
break;
-
- case EXT_COND_CODE:
+
+ case EXT_COND_CODE:
{
char * cc_name = (char *) xmalloc( ((int)*p-3) * sizeof(char));
strcpy(cc_name, (p+3));
arc_extension_map.condCodes[p[2]-16] = cc_name;
- }
+ }
break;
-
- case EXT_AUX_REGISTER:
+
+ case EXT_AUX_REGISTER:
{
/* trickier -- need to store linked list to these */
- struct ExtAuxRegister *newAuxRegister =
+ struct ExtAuxRegister *newAuxRegister =
(struct ExtAuxRegister *)malloc(sizeof(struct ExtAuxRegister));
char * aux_name = (char *) xmalloc ( ((int)*p-6) * sizeof(char));
@@ -223,14 +224,14 @@ arcExtMap_add(void *base, unsigned long length)
arc_extension_map.auxRegisters = newAuxRegister;
}
break;
-
+
default:
return -1;
-
+
}
p += p[0]; /* move to next record */
}
-
+
return 0;
}
diff --git a/contrib/binutils/opcodes/arc-opc.c b/contrib/binutils/opcodes/arc-opc.c
index c67cd88..b7afb86 100644
--- a/contrib/binutils/opcodes/arc-opc.c
+++ b/contrib/binutils/opcodes/arc-opc.c
@@ -17,6 +17,7 @@
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>
#include "ansidecl.h"
#include "opcode/arc.h"
@@ -1149,14 +1150,6 @@ insert_st_syntax (insn, operand, mods, reg, value, errmsg)
{
limm += arc_limm_fixup_adjust(insn);
}
- if (ST_SYNTAX(OP_LIMM,OP_SHIMM,OP_SHIMM) && (shimm * 2 == limm))
- {
- insn &= ~C(-1);
- limm_p = 0;
- limm = 0;
- insn |= C(ARC_REG_SHIMM);
- ls_operand[LS_VALUE] = OP_SHIMM;
- }
if (!(ST_SYNTAX(OP_REG,OP_REG,OP_NONE)
|| ST_SYNTAX(OP_REG,OP_LIMM,OP_NONE)
|| ST_SYNTAX(OP_REG,OP_REG,OP_SHIMM)
diff --git a/contrib/binutils/opcodes/arm-dis.c b/contrib/binutils/opcodes/arm-dis.c
index eaebe34..7e9b330 100644
--- a/contrib/binutils/opcodes/arm-dis.c
+++ b/contrib/binutils/opcodes/arm-dis.c
@@ -390,13 +390,6 @@ print_insn_arm (pc, info, given)
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)
@@ -445,6 +438,25 @@ print_insn_arm (pc, info, given)
}
break;
+ case 'I':
+ /* Print a Cirrus/DSP shift immediate. */
+ /* Immediates are 7bit signed ints with bits 0..3 in
+ bits 0..3 of opcode and bits 4..6 in bits 5..7
+ of opcode. */
+ {
+ int imm;
+
+ imm = (given & 0xf) | ((given & 0xe0) >> 1);
+
+ /* Is ``imm'' a negative number? */
+ if (imm & 0x40)
+ imm |= (-1 << 7);
+
+ func (stream, "%d", imm);
+ }
+
+ break;
+
case 'C':
func (stream, "_");
if (given & 0x80000)
@@ -611,7 +623,85 @@ print_insn_arm (pc, info, given)
abort ();
}
break;
-
+
+ case 'y':
+ case 'z':
+ {
+ int single = *c == 'y';
+ int regno;
+
+ switch (bitstart)
+ {
+ case 4: /* Sm pair */
+ func (stream, "{");
+ /* Fall through. */
+ case 0: /* Sm, Dm */
+ regno = given & 0x0000000f;
+ if (single)
+ {
+ regno <<= 1;
+ regno += (given >> 5) & 1;
+ }
+ break;
+
+ case 1: /* Sd, Dd */
+ regno = (given >> 12) & 0x0000000f;
+ if (single)
+ {
+ regno <<= 1;
+ regno += (given >> 22) & 1;
+ }
+ break;
+
+ case 2: /* Sn, Dn */
+ regno = (given >> 16) & 0x0000000f;
+ if (single)
+ {
+ regno <<= 1;
+ regno += (given >> 7) & 1;
+ }
+ break;
+
+ case 3: /* List */
+ func (stream, "{");
+ regno = (given >> 12) & 0x0000000f;
+ if (single)
+ {
+ regno <<= 1;
+ regno += (given >> 22) & 1;
+ }
+ break;
+
+
+ default:
+ abort ();
+ }
+
+ func (stream, "%c%d", single ? 's' : 'd', regno);
+
+ if (bitstart == 3)
+ {
+ int count = given & 0xff;
+
+ if (single == 0)
+ count >>= 1;
+
+ if (--count)
+ {
+ func (stream, "-%c%d",
+ single ? 's' : 'd',
+ regno + count);
+ }
+
+ func (stream, "}");
+ }
+ else if (bitstart == 4)
+ func (stream, ", %c%d}", single ? 's' : 'd',
+ regno + 1);
+
+ break;
+ }
+
case '`':
c++;
if ((given & (1 << bitstart)) == 0)
@@ -669,15 +759,32 @@ print_insn_thumb (pc, info, given)
/* Special processing for Thumb 2 instruction BL sequence: */
if (!*c) /* Check for empty (not NULL) assembler string. */
{
+ long offset;
+
info->bytes_per_chunk = 4;
info->bytes_per_line = 4;
+
+ offset = BDISP23 (given);
if ((given & 0x10000000) == 0)
- func (stream, "blx\t");
+ {
+ func (stream, "blx\t");
+
+ /* The spec says that bit 1 of the branch's destination
+ address comes from bit 1 of the instruction's
+ address and not from the offset in the instruction. */
+ if (offset & 0x1)
+ {
+ /* func (stream, "*malformed!* "); */
+ offset &= ~ 0x1;
+ }
+
+ offset |= ((pc & 0x2) >> 1);
+ }
else
- func (stream, "bl\t");
-
- info->print_address_func (BDISP23 (given) * 2 + pc + 4, info);
+ func (stream, "bl\t");
+
+ info->print_address_func (offset * 2 + pc + 4, info);
return 4;
}
else
@@ -1088,7 +1195,7 @@ 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), ' ',
+ (int)(14 - strlen (regnames[i].name)), ' ',
regnames[i].description);
fprintf (stream, " force-thumb Assume all insns are Thumb insns\n");
diff --git a/contrib/binutils/opcodes/arm-opc.h b/contrib/binutils/opcodes/arm-opc.h
index 36b1809..85f611d 100644
--- a/contrib/binutils/opcodes/arm-opc.h
+++ b/contrib/binutils/opcodes/arm-opc.h
@@ -38,6 +38,10 @@ struct thumb_opcode
%<bitfield>r print as an ARM register
%<bitfield>f print a floating point constant if >7 else a
floating point register
+ %<code>y print a single precision VFP reg.
+ Codes: 0=>Sm, 1=>Sd, 2=>Sn, 3=>multi-list, 4=>Sm pair
+ %<code>z print a double precision VFP reg
+ Codes: 0=>Dm, 1=>Dd, 2=>Dn, 3=>multi-list
%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
@@ -47,7 +51,6 @@ struct thumb_opcode
%<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
@@ -66,6 +69,7 @@ Thumb specific format options:
%N print Thumb register mask (with LR)
%O print Thumb register mask (with PC)
%T print Thumb condition code (always bits 8-11)
+ %I print cirrus signed shift immediate: bits 0..3|4..6
%<bitfield>B print Thumb branch destination (signed displacement)
%<bitfield>W print (bitfield * 4) as a decimal
%<bitfield>H print (bitfield * 2) as a decimal
@@ -86,6 +90,9 @@ static struct arm_opcode arm_opcodes[] =
{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"},
+ /* V5J instruction. */
+ {0x012fff20, 0x0ffffff0, "bxj%c\t%0-3r"},
+
/* XScale instructions. */
{0x0e200010, 0x0fff0ff0, "mia%c\tacc0, %0-3r, %12-15r"},
{0x0e280010, 0x0fff0ff0, "miaph%c\tacc0, %0-3r, %12-15r"},
@@ -138,8 +145,8 @@ static struct arm_opcode arm_opcodes[] =
{0x0c500000, 0x0ff00000, "mrrc%c\t%8-11d, %4-7d, %12-15r, %16-19r, cr%0-3d"},
/* ARM Instructions. */
- {0x00000090, 0x0e100090, "str%c%6's%h\t%12-15r, %s"},
- {0x00100090, 0x0e100090, "ldr%c%6's%h\t%12-15r, %s"},
+ {0x00000090, 0x0e100090, "str%c%6's%5?hb\t%12-15r, %s"},
+ {0x00100090, 0x0e100090, "ldr%c%6's%5?hb\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"},
@@ -168,7 +175,7 @@ static struct arm_opcode arm_opcodes[] =
{0x0a000000, 0x0e000000, "b%24'l%c\t%b"},
{0x0f000000, 0x0f000000, "swi%c\t%0-23x"},
- /* Floating point coprocessor instructions */
+ /* Floating point coprocessor (FPA) 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"},
@@ -213,6 +220,167 @@ static struct arm_opcode arm_opcodes[] =
{0x0c000200, 0x0e100f00, "sfm%c\t%12-14f, %F, %A"},
{0x0c100200, 0x0e100f00, "lfm%c\t%12-14f, %F, %A"},
+ /* Floating point coprocessor (VFP) instructions */
+ {0x0eb00bc0, 0x0fff0ff0, "fabsd%c\t%1z, %0z"},
+ {0x0eb00ac0, 0x0fbf0fd0, "fabss%c\t%1y, %0y"},
+ {0x0e300b00, 0x0ff00ff0, "faddd%c\t%1z, %2z, %0z"},
+ {0x0e300a00, 0x0fb00f50, "fadds%c\t%1y, %2y, %1y"},
+ {0x0eb40b40, 0x0fff0f70, "fcmp%7'ed%c\t%1z, %0z"},
+ {0x0eb40a40, 0x0fbf0f50, "fcmp%7'es%c\t%1y, %0y"},
+ {0x0eb50b40, 0x0fff0f70, "fcmp%7'ezd%c\t%1z"},
+ {0x0eb50a40, 0x0fbf0f70, "fcmp%7'ezs%c\t%1y"},
+ {0x0eb00b40, 0x0fff0ff0, "fcpyd%c\t%1z, %0z"},
+ {0x0eb00a40, 0x0fbf0fd0, "fcpys%c\t%1y, %0y"},
+ {0x0eb70ac0, 0x0fff0fd0, "fcvtds%c\t%1z, %0y"},
+ {0x0eb70bc0, 0x0fbf0ff0, "fcvtsd%c\t%1y, %0z"},
+ {0x0e800b00, 0x0ff00ff0, "fdivd%c\t%1z, %2z, %0z"},
+ {0x0e800a00, 0x0fb00f50, "fdivs%c\t%1y, %2y, %0y"},
+ {0x0d100b00, 0x0f700f00, "fldd%c\t%1z, %A"},
+ {0x0c900b00, 0x0fd00f00, "fldmia%0?xd%c\t%16-19r%21'!, %3z"},
+ {0x0d300b00, 0x0ff00f00, "fldmdb%0?xd%c\t%16-19r!, %3z"},
+ {0x0d100a00, 0x0f300f00, "flds%c\t%1y, %A"},
+ {0x0c900a00, 0x0f900f00, "fldmias%c\t%16-19r%21'!, %3y"},
+ {0x0d300a00, 0x0fb00f00, "fldmdbs%c\t%16-19r!, %3y"},
+ {0x0e000b00, 0x0ff00ff0, "fmacd%c\t%1z, %2z, %0z"},
+ {0x0e000a00, 0x0fb00f50, "fmacs%c\t%1y, %2y, %0y"},
+ {0x0e200b10, 0x0ff00fff, "fmdhr%c\t%2z, %12-15r"},
+ {0x0e000b10, 0x0ff00fff, "fmdlr%c\t%2z, %12-15r"},
+ {0x0c400b10, 0x0ff00ff0, "fmdrr%c\t%0z, %12-15r, %16-19r"},
+ {0x0e300b10, 0x0ff00fff, "fmrdh%c\t%12-15r, %2z"},
+ {0x0e100b10, 0x0ff00fff, "fmrdl%c\t%12-15r, %2z"},
+ {0x0c500b10, 0x0ff00ff0, "fmrrd%c\t%12-15r, %16-19r, %0z"},
+ {0x0c500a10, 0x0ff00fd0, "fmrrs%c\t%12-15r, %16-19r, %4y"},
+ {0x0e100a10, 0x0ff00f7f, "fmrs%c\t%12-15r, %2y"},
+ {0x0ef1fa10, 0x0fffffff, "fmstat%c"},
+ {0x0ef00a10, 0x0fff0fff, "fmrx%c\t%12-15r, fpsid"},
+ {0x0ef10a10, 0x0fff0fff, "fmrx%c\t%12-15r, fpscr"},
+ {0x0ef80a10, 0x0fff0fff, "fmrx%c\t%12-15r, fpexc"},
+ {0x0ef90a10, 0x0fff0fff, "fmrx%c\t%12-15r, fpinst\t@ Impl def"},
+ {0x0efa0a10, 0x0fff0fff, "fmrx%c\t%12-15r, fpinst2\t@ Impl def"},
+ {0x0ef00a10, 0x0ff00fff, "fmrx%c\t%12-15r, <impl def 0x%16-19x>"},
+ {0x0e100b00, 0x0ff00ff0, "fmscd%c\t%1z, %2z, %0z"},
+ {0x0e100a00, 0x0fb00f50, "fmscs%c\t%1y, %2y, %0y"},
+ {0x0e000a10, 0x0ff00f7f, "fmsr%c\t%2y, %12-15r"},
+ {0x0c400a10, 0x0ff00fd0, "fmsrr%c\t%12-15r, %16-19r, %4y"},
+ {0x0e200b00, 0x0ff00ff0, "fmuld%c\t%1z, %2z, %0z"},
+ {0x0e200a00, 0x0fb00f50, "fmuls%c\t%1y, %2y, %0y"},
+ {0x0ee00a10, 0x0fff0fff, "fmxr%c\tfpsid, %12-15r"},
+ {0x0ee10a10, 0x0fff0fff, "fmxr%c\tfpscr, %12-15r"},
+ {0x0ee80a10, 0x0fff0fff, "fmxr%c\tfpexc, %12-15r"},
+ {0x0ee90a10, 0x0fff0fff, "fmxr%c\tfpinst, %12-15r\t@ Impl def"},
+ {0x0eea0a10, 0x0fff0fff, "fmxr%c\tfpinst2, %12-15r\t@ Impl def"},
+ {0x0ee00a10, 0x0ff00fff, "fmxr%c\t<impl def 0x%16-19x>, %12-15r"},
+ {0x0eb10b40, 0x0fff0ff0, "fnegd%c\t%1z, %0z"},
+ {0x0eb10a40, 0x0fbf0fd0, "fnegs%c\t%1y, %0y"},
+ {0x0e000b40, 0x0ff00ff0, "fnmacd%c\t%1z, %2z, %0z"},
+ {0x0e000a40, 0x0fb00f50, "fnmacs%c\t%1y, %2y, %0y"},
+ {0x0e100b40, 0x0ff00ff0, "fnmscd%c\t%1z, %2z, %0z"},
+ {0x0e100a40, 0x0fb00f50, "fnmscs%c\t%1y, %2y, %0y"},
+ {0x0e200b40, 0x0ff00ff0, "fnmuld%c\t%1z, %2z, %0z"},
+ {0x0e200a40, 0x0fb00f50, "fnmuls%c\t%1y, %2y, %0y"},
+ {0x0eb80bc0, 0x0fff0fd0, "fsitod%c\t%1z, %0y"},
+ {0x0eb80ac0, 0x0fbf0fd0, "fsitos%c\t%1y, %0y"},
+ {0x0eb10bc0, 0x0fff0ff0, "fsqrtd%c\t%1z, %0z"},
+ {0x0eb10ac0, 0x0fbf0fd0, "fsqrts%c\t%1y, %0y"},
+ {0x0d000b00, 0x0f700f00, "fstd%c\t%1z, %A"},
+ {0x0c800b00, 0x0fd00f00, "fstmia%0?xd%c\t%16-19r%21'!, %3z"},
+ {0x0d200b00, 0x0ff00f00, "fstmdb%0?xd%c\t%16-19r!, %3z"},
+ {0x0d000a00, 0x0f300f00, "fsts%c\t%1y, %A"},
+ {0x0c800a00, 0x0f900f00, "fstmias%c\t%16-19r%21'!, %3y"},
+ {0x0d200a00, 0x0fb00f00, "fstmdbs%c\t%16-19r!, %3y"},
+ {0x0e300b40, 0x0ff00ff0, "fsubd%c\t%1z, %2z, %0z"},
+ {0x0e300a40, 0x0fb00f50, "fsubs%c\t%1y, %2y, %0y"},
+ {0x0ebc0b40, 0x0fbe0f70, "fto%16?sui%7'zd%c\t%1y, %0z"},
+ {0x0ebc0a40, 0x0fbe0f50, "fto%16?sui%7'zs%c\t%1y, %0y"},
+ {0x0eb80b40, 0x0fff0fd0, "fuitod%c\t%1z, %0y"},
+ {0x0eb80a40, 0x0fbf0fd0, "fuitos%c\t%1y, %0y"},
+
+ /* Cirrus coprocessor instructions. */
+ {0x0d100400, 0x0f500f00, "cfldrs%c\tmvf%12-15d, %A"},
+ {0x0c100400, 0x0f500f00, "cfldrs%c\tmvf%12-15d, %A"},
+ {0x0d500400, 0x0f500f00, "cfldrd%c\tmvd%12-15d, %A"},
+ {0x0c500400, 0x0f500f00, "cfldrd%c\tmvd%12-15d, %A"},
+ {0x0d100500, 0x0f500f00, "cfldr32%c\tmvfx%12-15d, %A"},
+ {0x0c100500, 0x0f500f00, "cfldr32%c\tmvfx%12-15d, %A"},
+ {0x0d500500, 0x0f500f00, "cfldr64%c\tmvdx%12-15d, %A"},
+ {0x0c500500, 0x0f500f00, "cfldr64%c\tmvdx%12-15d, %A"},
+ {0x0d000400, 0x0f500f00, "cfstrs%c\tmvf%12-15d, %A"},
+ {0x0c000400, 0x0f500f00, "cfstrs%c\tmvf%12-15d, %A"},
+ {0x0d400400, 0x0f500f00, "cfstrd%c\tmvd%12-15d, %A"},
+ {0x0c400400, 0x0f500f00, "cfstrd%c\tmvd%12-15d, %A"},
+ {0x0d000500, 0x0f500f00, "cfstr32%c\tmvfx%12-15d, %A"},
+ {0x0c000500, 0x0f500f00, "cfstr32%c\tmvfx%12-15d, %A"},
+ {0x0d400500, 0x0f500f00, "cfstr64%c\tmvdx%12-15d, %A"},
+ {0x0c400500, 0x0f500f00, "cfstr64%c\tmvdx%12-15d, %A"},
+ {0x0e000450, 0x0ff00ff0, "cfmvsr%c\tmvf%16-19d, %12-15r"},
+ {0x0e100450, 0x0ff00ff0, "cfmvrs%c\t%12-15r, mvf%16-19d"},
+ {0x0e000410, 0x0ff00ff0, "cfmvdlr%c\tmvd%16-19d, %12-15r"},
+ {0x0e100410, 0x0ff00ff0, "cfmvrdl%c\t%12-15r, mvd%16-19d"},
+ {0x0e000430, 0x0ff00ff0, "cfmvdhr%c\tmvd%16-19d, %12-15r"},
+ {0x0e100430, 0x0ff00fff, "cfmvrdh%c\t%12-15r, mvd%16-19d"},
+ {0x0e000510, 0x0ff00fff, "cfmv64lr%c\tmvdx%16-19d, %12-15r"},
+ {0x0e100510, 0x0ff00fff, "cfmvr64l%c\t%12-15r, mvdx%16-19d"},
+ {0x0e000530, 0x0ff00fff, "cfmv64hr%c\tmvdx%16-19d, %12-15r"},
+ {0x0e100530, 0x0ff00fff, "cfmvr64h%c\t%12-15r, mvdx%16-19d"},
+ {0x0e100610, 0x0ff0fff0, "cfmval32%c\tmvax%0-3d, mvfx%16-19d"},
+ {0x0e000610, 0x0ff0fff0, "cfmv32al%c\tmvfx%0-3d, mvax%16-19d"},
+ {0x0e100630, 0x0ff0fff0, "cfmvam32%c\tmvax%0-3d, mvfx%16-19d"},
+ {0x0e000630, 0x0ff0fff0, "cfmv32am%c\tmvfx%0-3d, mvax%16-19d"},
+ {0x0e100650, 0x0ff0fff0, "cfmvah32%c\tmvax%0-3d, mvfx%16-19d"},
+ {0x0e000650, 0x0ff0fff0, "cfmv32ah%c\tmvfx%0-3d, mvax%16-19d"},
+ {0x0e000670, 0x0ff0fff0, "cfmv32a%c\tmvfx%0-3d, mvax%16-19d"},
+ {0x0e100670, 0x0ff0fff0, "cfmva32%c\tmvax%0-3d, mvfx%16-19d"},
+ {0x0e000690, 0x0ff0fff0, "cfmv64a%c\tmvdx%0-3d, mvax%16-19d"},
+ {0x0e100690, 0x0ff0fff0, "cfmva64%c\tmvax%0-3d, mvdx%16-19d"},
+ {0x0e1006b0, 0x0ff0fff0, "cfmvsc32%c\tdspsc, mvfx%16-19d"},
+ {0x0e0006b0, 0x0ff0fff0, "cfmv32sc%c\tmvfx%0-3d, dspsc"},
+ {0x0e000400, 0x0ff00fff, "cfcpys%c\tmvf%12-15d, mvf%16-19d"},
+ {0x0e000420, 0x0ff00fff, "cfcpyd%c\tmvd%12-15d, mvd%16-19d"},
+ {0x0e000460, 0x0ff00fff, "cfcvtsd%c\tmvd%12-15d, mvf%16-19d"},
+ {0x0e000440, 0x0ff00fff, "cfcvtds%c\tmvf%12-15d, mvd%16-19d"},
+ {0x0e000480, 0x0ff00fff, "cfcvt32s%c\tmvf%12-15d, mvfx%16-19d"},
+ {0x0e0004a0, 0x0ff00fff, "cfcvt32d%c\tmvd%12-15d, mvfx%16-19d"},
+ {0x0e0004c0, 0x0ff00fff, "cfcvt64s%c\tmvf%12-15d, mvdx%16-19d"},
+ {0x0e0004e0, 0x0ff00fff, "cfcvt64d%c\tmvd%12-15d, mvdx%16-19d"},
+ {0x0e100580, 0x0ff00fff, "cfcvts32%c\tmvfx%12-15d, mvf%16-19d"},
+ {0x0e1005a0, 0x0ff00fff, "cfcvtd32%c\tmvfx%12-15d, mvd%16-19d"},
+ {0x0e1005c0, 0x0ff00fff, "cftruncs32%c\tmvfx%12-15d, mvf%16-19d"},
+ {0x0e1005e0, 0x0ff00fff, "cftruncd32%c\tmvfx%12-15d, mvd%16-19d"},
+ {0x0e000550, 0x0ff00ff0, "cfrshl32%c\tmvfx%16-19d, mvfx%0-3d, %12-15r"},
+ {0x0e000570, 0x0ff00ff0, "cfrshl64%c\tmvdx%16-19d, mvdx%0-3d, %12-15r"},
+ {0x0e000500, 0x0ff00f00, "cfsh32%c\tmvfx%12-15d, mvfx%16-19d, #%I"},
+ {0x0e200500, 0x0ff00f00, "cfsh64%c\tmvdx%12-15d, mvdx%16-19d, #%I"},
+ {0x0e100490, 0x0ff00ff0, "cfcmps%c\t%12-15r, mvf%16-19d, mvf%0-3d"},
+ {0x0e1004b0, 0x0ff00ff0, "cfcmpd%c\t%12-15r, mvd%16-19d, mvd%0-3d"},
+ {0x0e100590, 0x0ff00ff0, "cfcmp32%c\t%12-15r, mvfx%16-19d, mvfx%0-3d"},
+ {0x0e1005b0, 0x0ff00ff0, "cfcmp64%c\t%12-15r, mvdx%16-19d, mvdx%0-3d"},
+ {0x0e300400, 0x0ff00fff, "cfabss%c\tmvf%12-15d, mvf%16-19d"},
+ {0x0e300420, 0x0ff00fff, "cfabsd%c\tmvd%12-15d, mvd%16-19d"},
+ {0x0e300440, 0x0ff00fff, "cfnegs%c\tmvf%12-15d, mvf%16-19d"},
+ {0x0e300460, 0x0ff00fff, "cfnegd%c\tmvd%12-15d, mvd%16-19d"},
+ {0x0e300480, 0x0ff00ff0, "cfadds%c\tmvf%12-15d, mvf%16-19d, mvf%0-3d"},
+ {0x0e3004a0, 0x0ff00ff0, "cfaddd%c\tmvd%12-15d, mvd%16-19d, mvd%0-3d"},
+ {0x0e3004c0, 0x0ff00ff0, "cfsubs%c\tmvf%12-15d, mvf%16-19d, mvf%0-3d"},
+ {0x0e3004e0, 0x0ff00ff0, "cfsubd%c\tmvd%12-15d, mvd%16-19d, mvd%0-3d"},
+ {0x0e100400, 0x0ff00ff0, "cfmuls%c\tmvf%12-15d, mvf%16-19d, mvf%0-3d"},
+ {0x0e100420, 0x0ff00ff0, "cfmuld%c\tmvd%12-15d, mvd%16-19d, mvd%0-3d"},
+ {0x0e300500, 0x0ff00fff, "cfabs32%c\tmvfx%12-15d, mvfx%16-19d"},
+ {0x0e300520, 0x0ff00fff, "cfabs64%c\tmvdx%12-15d, mvdx%16-19d"},
+ {0x0e300540, 0x0ff00fff, "cfneg32%c\tmvfx%12-15d, mvfx%16-19d"},
+ {0x0e300560, 0x0ff00fff, "cfneg64%c\tmvdx%12-15d, mvdx%16-19d"},
+ {0x0e300580, 0x0ff00ff0, "cfadd32%c\tmvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
+ {0x0e3005a0, 0x0ff00ff0, "cfadd64%c\tmvdx%12-15d, mvdx%16-19d, mvdx%0-3d"},
+ {0x0e3005c0, 0x0ff00ff0, "cfsub32%c\tmvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
+ {0x0e3005e0, 0x0ff00ff0, "cfsub64%c\tmvdx%12-15d, mvdx%16-19d, mvdx%0-3d"},
+ {0x0e100500, 0x0ff00ff0, "cfmul32%c\tmvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
+ {0x0e100520, 0x0ff00ff0, "cfmul64%c\tmvdx%12-15d, mvdx%16-19d, mvdx%0-3d"},
+ {0x0e100540, 0x0ff00ff0, "cfmac32%c\tmvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
+ {0x0e100560, 0x0ff00ff0, "cfmsc32%c\tmvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
+ {0x0e000600, 0x0ff00f00, "cfmadd32%c\tmvax%5-7d, mvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
+ {0x0e100600, 0x0ff00f00, "cfmsub32%c\tmvax%5-7d, mvfx%12-15d, mvfx%16-19d, mvfx%0-3d"},
+ {0x0e200600, 0x0ff00f00, "cfmadda32%c\tmvax%5-7d, mvax%12-15d, mvfx%16-19d, mvfx%0-3d"},
+ {0x0e300600, 0x0ff00f00, "cfmsuba32%c\tmvax%5-7d, mvax%12-15d, mvfx%16-19d, mvfx%0-3d"},
+
/* 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}"},
diff --git a/contrib/binutils/opcodes/cgen-asm.c b/contrib/binutils/opcodes/cgen-asm.c
index a8d6ff8..05b62bf 100644
--- a/contrib/binutils/opcodes/cgen-asm.c
+++ b/contrib/binutils/opcodes/cgen-asm.c
@@ -1,6 +1,6 @@
/* CGEN generic assembler support code.
- Copyright 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU Binutils and GDB, the GNU debugger.
@@ -20,14 +20,18 @@
#include "sysdep.h"
#include <stdio.h>
-#include <ctype.h>
#include "ansidecl.h"
#include "libiberty.h"
+#include "safe-ctype.h"
#include "bfd.h"
#include "symcat.h"
#include "opcode/cgen.h"
#include "opintl.h"
+static CGEN_INSN_LIST * hash_insn_array PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, int, int, CGEN_INSN_LIST **, CGEN_INSN_LIST *));
+static CGEN_INSN_LIST * hash_insn_list PARAMS ((CGEN_CPU_DESC, const CGEN_INSN_LIST *, CGEN_INSN_LIST **, CGEN_INSN_LIST *));
+static void build_asm_hash_table PARAMS ((CGEN_CPU_DESC));
+
/* Set the cgen_parse_operand_fn callback. */
void
@@ -207,24 +211,34 @@ cgen_parse_keyword (cd, strp, keyword_table, valuep)
char buf[256];
const char *p,*start;
+ if (keyword_table->name_hash_table == NULL)
+ (void) cgen_keyword_search_init (keyword_table, NULL);
+
p = start = *strp;
- /* Allow any first character.
- Note that this allows recognizing ",a" for the annul flag in sparc
- even though "," is subsequently not a valid keyword char. */
+ /* Allow any first character. This is to make life easier for
+ the fairly common case of suffixes, eg. 'ld.b.w', where the first
+ character of the suffix ('.') is special. */
if (*p)
++p;
-
- /* Now allow letters, digits, and _. */
+
+ /* Allow letters, digits, and any special characters. */
while (((p - start) < (int) sizeof (buf))
- && (isalnum ((unsigned char) *p) || *p == '_'))
+ && *p
+ && (ISALNUM (*p) || strchr (keyword_table->nonalpha_chars, *p)))
++p;
if (p - start >= (int) sizeof (buf))
- return _("unrecognized keyword/register name");
-
- memcpy (buf, start, p - start);
- buf[p - start] = 0;
+ {
+ /* All non-empty CGEN keywords can fit into BUF. The only thing
+ we can match here is the empty keyword. */
+ buf[0] = 0;
+ }
+ else
+ {
+ memcpy (buf, start, p - start);
+ buf[p - start] = 0;
+ }
ke = cgen_keyword_lookup_name (keyword_table, buf);
diff --git a/contrib/binutils/opcodes/cgen-asm.in b/contrib/binutils/opcodes/cgen-asm.in
index 7249708..475a4f1 100644
--- a/contrib/binutils/opcodes/cgen-asm.in
+++ b/contrib/binutils/opcodes/cgen-asm.in
@@ -26,7 +26,6 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
Keep that in mind. */
#include "sysdep.h"
-#include <ctype.h>
#include <stdio.h>
#include "ansidecl.h"
#include "bfd.h"
@@ -34,16 +33,142 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#include "@prefix@-desc.h"
#include "@prefix@-opc.h"
#include "opintl.h"
+#include "xregex.h"
+#include "libiberty.h"
+#include "safe-ctype.h"
-#undef min
+#undef min
#define min(a,b) ((a) < (b) ? (a) : (b))
-#undef max
+#undef max
#define max(a,b) ((a) > (b) ? (a) : (b))
static const char * parse_insn_normal
PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, const char **, CGEN_FIELDS *));
-/* -- assembler routines inserted here */
+/* -- assembler routines inserted here. */
+
+
+/* Regex construction routine.
+
+ This translates an opcode syntax string into a regex string,
+ by replacing any non-character syntax element (such as an
+ opcode) with the pattern '.*'
+
+ It then compiles the regex and stores it in the opcode, for
+ later use by @arch@_cgen_assemble_insn
+
+ Returns NULL for success, an error message for failure. */
+
+char *
+@arch@_cgen_build_insn_regex (insn)
+ CGEN_INSN *insn;
+{
+ CGEN_OPCODE *opc = (CGEN_OPCODE *) CGEN_INSN_OPCODE (insn);
+ const char *mnem = CGEN_INSN_MNEMONIC (insn);
+ char rxbuf[CGEN_MAX_RX_ELEMENTS];
+ char *rx = rxbuf;
+ const CGEN_SYNTAX_CHAR_TYPE *syn;
+ int reg_err;
+
+ syn = CGEN_SYNTAX_STRING (CGEN_OPCODE_SYNTAX (opc));
+
+ /* Mnemonics come first in the syntax string. */
+ if (! CGEN_SYNTAX_MNEMONIC_P (* syn))
+ return _("missing mnemonic in syntax string");
+ ++syn;
+
+ /* Generate a case sensitive regular expression that emulates case
+ insensitive matching in the "C" locale. We cannot generate a case
+ insensitive regular expression because in Turkish locales, 'i' and 'I'
+ are not equal modulo case conversion. */
+
+ /* Copy the literal mnemonic out of the insn. */
+ for (; *mnem; mnem++)
+ {
+ char c = *mnem;
+
+ if (ISALPHA (c))
+ {
+ *rx++ = '[';
+ *rx++ = TOLOWER (c);
+ *rx++ = TOUPPER (c);
+ *rx++ = ']';
+ }
+ else
+ *rx++ = c;
+ }
+
+ /* Copy any remaining literals from the syntax string into the rx. */
+ for(; * syn != 0 && rx <= rxbuf + (CGEN_MAX_RX_ELEMENTS - 7 - 4); ++syn)
+ {
+ if (CGEN_SYNTAX_CHAR_P (* syn))
+ {
+ char c = CGEN_SYNTAX_CHAR (* syn);
+
+ switch (c)
+ {
+ /* Escape any regex metacharacters in the syntax. */
+ case '.': case '[': case '\\':
+ case '*': case '^': case '$':
+
+#ifdef CGEN_ESCAPE_EXTENDED_REGEX
+ case '?': case '{': case '}':
+ case '(': case ')': case '*':
+ case '|': case '+': case ']':
+#endif
+ *rx++ = '\\';
+ *rx++ = c;
+ break;
+
+ default:
+ if (ISALPHA (c))
+ {
+ *rx++ = '[';
+ *rx++ = TOLOWER (c);
+ *rx++ = TOUPPER (c);
+ *rx++ = ']';
+ }
+ else
+ *rx++ = c;
+ break;
+ }
+ }
+ else
+ {
+ /* Replace non-syntax fields with globs. */
+ *rx++ = '.';
+ *rx++ = '*';
+ }
+ }
+
+ /* Trailing whitespace ok. */
+ * rx++ = '[';
+ * rx++ = ' ';
+ * rx++ = '\t';
+ * rx++ = ']';
+ * rx++ = '*';
+
+ /* But anchor it after that. */
+ * rx++ = '$';
+ * rx = '\0';
+
+ CGEN_INSN_RX (insn) = xmalloc (sizeof (regex_t));
+ reg_err = regcomp ((regex_t *) CGEN_INSN_RX (insn), rxbuf, REG_NOSUB);
+
+ if (reg_err == 0)
+ return NULL;
+ else
+ {
+ static char msg[80];
+
+ regerror (reg_err, (regex_t *) CGEN_INSN_RX (insn), msg, 80);
+ regfree ((regex_t *) CGEN_INSN_RX (insn));
+ free (CGEN_INSN_RX (insn));
+ (CGEN_INSN_RX (insn)) = NULL;
+ return msg;
+ }
+}
+
/* Default insn parser.
@@ -56,8 +181,7 @@ static const char * parse_insn_normal
but that can be handled there. Not handling backtracking here may get
expensive in the case of the m68k. Deal with later.
- Returns NULL for success, an error message for failure.
-*/
+ Returns NULL for success, an error message for failure. */
static const char *
parse_insn_normal (cd, insn, strp, fields)
@@ -82,14 +206,14 @@ parse_insn_normal (cd, insn, strp, fields)
GAS's input scrubber will ensure mnemonics are lowercase, but we may
not be called from GAS. */
p = CGEN_INSN_MNEMONIC (insn);
- while (*p && tolower (*p) == tolower (*str))
+ while (*p && TOLOWER (*p) == TOLOWER (*str))
++p, ++str;
if (* p)
return _("unrecognized instruction");
#ifndef CGEN_MNEMONIC_OPERANDS
- if (* str && !isspace (* str))
+ if (* str && ! ISSPACE (* str))
return _("unrecognized instruction");
#endif
@@ -118,7 +242,7 @@ parse_insn_normal (cd, insn, strp, fields)
first char after the mnemonic part is a space. */
/* FIXME: We also take inappropriate advantage of the fact that
GAS's input scrubber will remove extraneous blanks. */
- if (tolower (*str) == tolower (CGEN_SYNTAX_CHAR (* syn)))
+ if (TOLOWER (*str) == TOLOWER (CGEN_SYNTAX_CHAR (* syn)))
{
#ifdef CGEN_MNEMONIC_OPERANDS
if (CGEN_SYNTAX_CHAR(* syn) == ' ')
@@ -131,6 +255,7 @@ parse_insn_normal (cd, insn, strp, fields)
{
/* Syntax char didn't match. Can't be this insn. */
static char msg [80];
+
/* xgettext:c-format */
sprintf (msg, _("syntax error (expected char `%c', found `%c')"),
CGEN_SYNTAX_CHAR(*syn), *str);
@@ -140,6 +265,7 @@ parse_insn_normal (cd, insn, strp, fields)
{
/* Ran out of input. */
static char msg [80];
+
/* xgettext:c-format */
sprintf (msg, _("syntax error (expected char `%c', found end of instruction)"),
CGEN_SYNTAX_CHAR(*syn));
@@ -165,7 +291,7 @@ parse_insn_normal (cd, insn, strp, fields)
blanks now. IE: We needn't try again with a longer version of
the insn and it is assumed that longer versions of insns appear
before shorter ones (eg: lsr r2,r3,1 vs lsr r2,r3). */
- while (isspace (* str))
+ while (ISSPACE (* str))
++ str;
if (* str != '\0')
@@ -211,9 +337,10 @@ const CGEN_INSN *
CGEN_INSN_LIST *ilist;
const char *parse_errmsg = NULL;
const char *insert_errmsg = NULL;
+ int recognized_mnemonic = 0;
/* Skip leading white space. */
- while (isspace (* str))
+ while (ISSPACE (* str))
++ str;
/* The instructions are stored in hashed lists.
@@ -221,19 +348,19 @@ const CGEN_INSN *
ilist = CGEN_ASM_LOOKUP_INSN (cd, str);
/* Keep looking until we find a match. */
-
start = str;
for ( ; ilist != NULL ; ilist = CGEN_ASM_NEXT_INSN (ilist))
{
const CGEN_INSN *insn = ilist->insn;
+ recognized_mnemonic = 1;
#ifdef CGEN_VALIDATE_INSN_SUPPORTED
- /* not usually needed as unsupported opcodes shouldn't be in the hash lists */
+ /* Not usually needed as unsupported opcodes
+ shouldn't be in the hash lists. */
/* Is this insn supported by the selected cpu? */
if (! @arch@_cgen_insn_supported (cd, insn))
continue;
#endif
-
/* If the RELAX attribute is set, this is an insn that shouldn't be
chosen immediately. Instead, it is used during assembler/linker
relaxation if possible. */
@@ -242,6 +369,11 @@ const CGEN_INSN *
str = start;
+ /* Skip this insn if str doesn't look right lexically. */
+ if (CGEN_INSN_RX (insn) != NULL &&
+ regexec ((regex_t *) CGEN_INSN_RX (insn), str, 0, NULL, 0) == REG_NOMATCH)
+ continue;
+
/* Allow parse/insert handlers to obtain length of insn. */
CGEN_FIELDS_BITSIZE (fields) = CGEN_INSN_BITSIZE (insn);
@@ -249,7 +381,7 @@ const CGEN_INSN *
if (parse_errmsg != NULL)
continue;
- /* ??? 0 is passed for `pc' */
+ /* ??? 0 is passed for `pc'. */
insert_errmsg = CGEN_INSERT_FN (cd, insn) (cd, insn, fields, buf,
(bfd_vma) 0);
if (insert_errmsg != NULL)
@@ -262,13 +394,15 @@ const CGEN_INSN *
{
static char errbuf[150];
+#ifdef CGEN_VERBOSE_ASSEMBLER_ERRORS
const char *tmp_errmsg;
-#ifdef CGEN_VERBOSE_ASSEMBLER_ERRORS
/* If requesting verbose error messages, use insert_errmsg.
- Failing that, use parse_errmsg */
+ Failing that, use parse_errmsg. */
tmp_errmsg = (insert_errmsg ? insert_errmsg :
parse_errmsg ? parse_errmsg :
+ recognized_mnemonic ?
+ _("unrecognized form of instruction") :
_("unrecognized instruction"));
if (strlen (start) > 50)
diff --git a/contrib/binutils/opcodes/cgen-dis.c b/contrib/binutils/opcodes/cgen-dis.c
index b4297bb..4622c8c 100644
--- a/contrib/binutils/opcodes/cgen-dis.c
+++ b/contrib/binutils/opcodes/cgen-dis.c
@@ -27,6 +27,61 @@
#include "symcat.h"
#include "opcode/cgen.h"
+static CGEN_INSN_LIST * hash_insn_array PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, int, int, CGEN_INSN_LIST **, CGEN_INSN_LIST *));
+static CGEN_INSN_LIST * hash_insn_list PARAMS ((CGEN_CPU_DESC, const CGEN_INSN_LIST *, CGEN_INSN_LIST **, CGEN_INSN_LIST *));
+static void build_dis_hash_table PARAMS ((CGEN_CPU_DESC));
+
+/* Return the number of decodable bits in this insn. */
+static int
+count_decodable_bits (insn)
+ const CGEN_INSN *insn;
+{
+ unsigned mask = CGEN_INSN_BASE_MASK (insn);
+ int bits = 0;
+ int m;
+ for (m = 1; m != 0; m <<= 1)
+ {
+ if (mask & m)
+ ++bits;
+ }
+ return bits;
+}
+
+/* Add an instruction to the hash chain. */
+static void
+add_insn_to_hash_chain (hentbuf, insn, htable, hash)
+ CGEN_INSN_LIST *hentbuf;
+ const CGEN_INSN *insn;
+ CGEN_INSN_LIST **htable;
+ unsigned int hash;
+{
+ CGEN_INSN_LIST *current_buf;
+ CGEN_INSN_LIST *previous_buf;
+ int insn_decodable_bits;
+
+ /* Add insns sorted by the number of decodable bits, in decreasing order.
+ This ensures that any insn which is a special case of another will be
+ checked first. */
+ insn_decodable_bits = count_decodable_bits (insn);
+ previous_buf = NULL;
+ for (current_buf = htable[hash]; current_buf != NULL;
+ current_buf = current_buf->next)
+ {
+ int current_decodable_bits = count_decodable_bits (current_buf->insn);
+ if (insn_decodable_bits >= current_decodable_bits)
+ break;
+ previous_buf = current_buf;
+ }
+
+ /* Now insert the new insn. */
+ hentbuf->insn = insn;
+ hentbuf->next = current_buf;
+ if (previous_buf == NULL)
+ htable[hash] = hentbuf;
+ else
+ previous_buf->next = hentbuf;
+}
+
/* Subroutine of build_dis_hash_table to add INSNS to the hash table.
COUNT is the number of elements in INSNS.
@@ -70,9 +125,7 @@ hash_insn_array (cd, insns, count, entsize, htable, hentbuf)
CGEN_INSN_MASK_BITSIZE (insn),
big_p);
hash = (* cd->dis_hash) (buf, value);
- hentbuf->next = htable[hash];
- hentbuf->insn = insn;
- htable[hash] = hentbuf;
+ add_insn_to_hash_chain (hentbuf, insn, htable, hash);
}
return hentbuf;
@@ -110,9 +163,7 @@ hash_insn_list (cd, insns, htable, hentbuf)
CGEN_INSN_MASK_BITSIZE (ilist->insn),
big_p);
hash = (* cd->dis_hash) (buf, value);
- hentbuf->next = htable [hash];
- hentbuf->insn = ilist->insn;
- htable [hash] = hentbuf;
+ add_insn_to_hash_chain (hentbuf, ilist->insn, htable, hash);
}
return hentbuf;
diff --git a/contrib/binutils/opcodes/cgen-dis.in b/contrib/binutils/opcodes/cgen-dis.in
index 0e7c35a..f2c9dd5 100644
--- a/contrib/binutils/opcodes/cgen-dis.in
+++ b/contrib/binutils/opcodes/cgen-dis.in
@@ -47,10 +47,13 @@ static void print_keyword
static void print_insn_normal
PARAMS ((CGEN_CPU_DESC, PTR, const CGEN_INSN *, CGEN_FIELDS *,
bfd_vma, int));
-static int print_insn PARAMS ((CGEN_CPU_DESC, bfd_vma,
- disassemble_info *, char *, int));
+static int print_insn
+ PARAMS ((CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, unsigned));
static int default_print_insn
PARAMS ((CGEN_CPU_DESC, bfd_vma, disassemble_info *));
+static int read_insn
+ PARAMS ((CGEN_CPU_DESC, bfd_vma, disassemble_info *, char *, int,
+ CGEN_EXTRACT_INFO *, unsigned long *));
/* -- disassembler routines inserted here */
@@ -58,21 +61,12 @@ static int default_print_insn
static void
print_normal (cd, dis_info, value, attrs, pc, length)
-#ifdef CGEN_PRINT_NORMAL
- CGEN_CPU_DESC cd;
-#else
CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
-#endif
PTR dis_info;
long value;
unsigned int attrs;
-#ifdef CGEN_PRINT_NORMAL
- bfd_vma pc;
- int length;
-#else
bfd_vma pc ATTRIBUTE_UNUSED;
int length ATTRIBUTE_UNUSED;
-#endif
{
disassemble_info *info = (disassemble_info *) dis_info;
@@ -93,21 +87,12 @@ print_normal (cd, dis_info, value, attrs, pc, length)
static void
print_address (cd, dis_info, value, attrs, pc, length)
-#ifdef CGEN_PRINT_NORMAL
- CGEN_CPU_DESC cd;
-#else
CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
-#endif
PTR dis_info;
bfd_vma value;
unsigned int attrs;
-#ifdef CGEN_PRINT_NORMAL
- bfd_vma pc;
- int length;
-#else
bfd_vma pc ATTRIBUTE_UNUSED;
int length ATTRIBUTE_UNUSED;
-#endif
{
disassemble_info *info = (disassemble_info *) dis_info;
@@ -190,9 +175,10 @@ print_insn_normal (cd, dis_info, insn, fields, pc, length)
/* Subroutine of print_insn. Reads an insn into the given buffers and updates
the extract info.
Returns 0 if all is well, non-zero otherwise. */
+
static int
read_insn (cd, pc, info, buf, buflen, ex_info, insn_value)
- CGEN_CPU_DESC cd;
+ CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
bfd_vma pc;
disassemble_info *info;
char *buf;
@@ -227,15 +213,25 @@ print_insn (cd, pc, info, buf, buflen)
bfd_vma pc;
disassemble_info *info;
char *buf;
- int buflen;
+ unsigned int buflen;
{
- unsigned long insn_value;
+ CGEN_INSN_INT insn_value;
const CGEN_INSN_LIST *insn_list;
CGEN_EXTRACT_INFO ex_info;
+ int basesize;
+
+ /* Extract base part of instruction, just in case CGEN_DIS_* uses it. */
+ basesize = cd->base_insn_bitsize < buflen * 8 ?
+ cd->base_insn_bitsize : buflen * 8;
+ insn_value = cgen_get_insn_value (cd, buf, basesize);
- int rc = read_insn (cd, pc, info, buf, buflen, & ex_info, & insn_value);
- if (rc != 0)
- return rc;
+
+ /* Fill in ex_info fields like read_insn would. Don't actually call
+ read_insn, since the incoming buffer is already read (and possibly
+ modified a la m32r). */
+ ex_info.valid = (1 << buflen) - 1;
+ ex_info.dis_info = info;
+ ex_info.insn_bytes = buf;
/* The instructions are stored in hash lists.
Pick the first one and keep trying until we find the right one. */
@@ -246,9 +242,10 @@ print_insn (cd, pc, info, buf, buflen)
const CGEN_INSN *insn = insn_list->insn;
CGEN_FIELDS fields;
int length;
+ unsigned long insn_value_cropped;
#ifdef CGEN_VALIDATE_INSN_SUPPORTED
- /* not needed as insn shouldn't be in hash lists if not supported */
+ /* Not needed as insn shouldn't be in hash lists if not supported. */
/* Supported by this cpu? */
if (! @arch@_cgen_insn_supported (cd, insn))
{
@@ -260,7 +257,17 @@ print_insn (cd, pc, info, buf, buflen)
/* Basic bit mask must be correct. */
/* ??? May wish to allow target to defer this check until the extract
handler. */
- if ((insn_value & CGEN_INSN_BASE_MASK (insn))
+
+ /* Base size may exceed this instruction's size. Extract the
+ relevant part from the buffer. */
+ if ((unsigned) (CGEN_INSN_BITSIZE (insn) / 8) < buflen &&
+ (unsigned) (CGEN_INSN_BITSIZE (insn) / 8) <= sizeof (unsigned long))
+ insn_value_cropped = bfd_get_bits (buf, CGEN_INSN_BITSIZE (insn),
+ info->endian == BFD_ENDIAN_BIG);
+ else
+ insn_value_cropped = insn_value;
+
+ if ((insn_value_cropped & CGEN_INSN_BASE_MASK (insn))
== CGEN_INSN_BASE_VALUE (insn))
{
/* Printing is handled in two passes. The first pass parses the
@@ -269,8 +276,8 @@ print_insn (cd, pc, info, buf, buflen)
/* Make sure the entire insn is loaded into insn_value, if it
can fit. */
- if (CGEN_INSN_BITSIZE (insn) > cd->base_insn_bitsize &&
- (CGEN_INSN_BITSIZE (insn) / 8) <= sizeof (unsigned long))
+ if (((unsigned) CGEN_INSN_BITSIZE (insn) > cd->base_insn_bitsize) &&
+ (unsigned) (CGEN_INSN_BITSIZE (insn) / 8) <= sizeof (unsigned long))
{
unsigned long full_insn_value;
int rc = read_insn (cd, pc, info, buf,
@@ -283,7 +290,7 @@ print_insn (cd, pc, info, buf, buflen)
}
else
length = CGEN_EXTRACT_FN (cd, insn)
- (cd, insn, &ex_info, insn_value, &fields, pc);
+ (cd, insn, &ex_info, insn_value_cropped, &fields, pc);
/* length < 0 -> error */
if (length < 0)
@@ -317,18 +324,27 @@ default_print_insn (cd, pc, info)
disassemble_info *info;
{
char buf[CGEN_MAX_INSN_SIZE];
+ int buflen;
int status;
- /* Read the base part of the insn. */
+ /* Attempt to read the base part of the insn. */
+ buflen = cd->base_insn_bitsize / 8;
+ status = (*info->read_memory_func) (pc, buf, buflen, info);
+
+ /* Try again with the minimum part, if min < base. */
+ if (status != 0 && (cd->min_insn_bitsize < cd->base_insn_bitsize))
+ {
+ buflen = cd->min_insn_bitsize / 8;
+ status = (*info->read_memory_func) (pc, buf, buflen, info);
+ }
- status = (*info->read_memory_func) (pc, buf, cd->base_insn_bitsize / 8, info);
if (status != 0)
{
(*info->memory_error_func) (status, pc, info);
return -1;
}
- return print_insn (cd, pc, info, buf, cd->base_insn_bitsize / 8);
+ return print_insn (cd, pc, info, buf, buflen);
}
/* Main entry point.
@@ -358,17 +374,21 @@ print_insn_@arch@ (pc, info)
arch = info->arch;
if (arch == bfd_arch_unknown)
arch = CGEN_BFD_ARCH;
-
- /* There's no standard way to compute the isa number (e.g. for arm thumb)
+
+ /* There's no standard way to compute the machine or isa number
so we leave it to the target. */
+#ifdef CGEN_COMPUTE_MACH
+ mach = CGEN_COMPUTE_MACH (info);
+#else
+ mach = info->mach;
+#endif
+
#ifdef CGEN_COMPUTE_ISA
isa = CGEN_COMPUTE_ISA (info);
#else
isa = 0;
#endif
- mach = info->mach;
-
/* If we've switched cpu's, close the current table and open a new one. */
if (cd
&& (isa != prev_isa
diff --git a/contrib/binutils/opcodes/cgen-ibld.in b/contrib/binutils/opcodes/cgen-ibld.in
index 6921a53..d2bfd02 100644
--- a/contrib/binutils/opcodes/cgen-ibld.in
+++ b/contrib/binutils/opcodes/cgen-ibld.in
@@ -25,7 +25,6 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
Keep that in mind. */
#include "sysdep.h"
-#include <ctype.h>
#include <stdio.h>
#include "ansidecl.h"
#include "dis-asm.h"
@@ -34,6 +33,7 @@ along with this program; if not, write to the Free Software Foundation, Inc.,
#include "@prefix@-desc.h"
#include "@prefix@-opc.h"
#include "opintl.h"
+#include "safe-ctype.h"
#undef min
#define min(a,b) ((a) < (b) ? (a) : (b))
@@ -49,7 +49,6 @@ static const char * insert_normal
static const char * insert_insn_normal
PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *,
CGEN_FIELDS *, CGEN_INSN_BYTES_PTR, bfd_vma));
-
static int extract_normal
PARAMS ((CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, CGEN_INSN_INT,
unsigned int, unsigned int, unsigned int, unsigned int,
@@ -57,9 +56,19 @@ static int extract_normal
static int extract_insn_normal
PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, CGEN_EXTRACT_INFO *,
CGEN_INSN_INT, CGEN_FIELDS *, bfd_vma));
+#if CGEN_INT_INSN_P
static void put_insn_int_value
PARAMS ((CGEN_CPU_DESC, CGEN_INSN_BYTES_PTR, int, int, CGEN_INSN_INT));
-
+#endif
+#if ! CGEN_INT_INSN_P
+static CGEN_INLINE void insert_1
+ PARAMS ((CGEN_CPU_DESC, unsigned long, int, int, int, unsigned char *));
+static CGEN_INLINE int fill_cache
+ PARAMS ((CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, bfd_vma));
+static CGEN_INLINE long extract_1
+ PARAMS ((CGEN_CPU_DESC, CGEN_EXTRACT_INFO *, int, int, int,
+ unsigned char *, bfd_vma));
+#endif
/* Operand insertion. */
@@ -76,9 +85,8 @@ insert_1 (cd, value, start, length, word_length, bufp)
{
unsigned long x,mask;
int shift;
- int big_p = CGEN_CPU_INSN_ENDIAN (cd) == CGEN_ENDIAN_BIG;
- x = bfd_get_bits (bufp, word_length, big_p);
+ x = cgen_get_insn_value (cd, bufp, word_length);
/* Written this way to avoid undefined behaviour. */
mask = (((1L << (length - 1)) - 1) << 1) | 1;
@@ -88,7 +96,7 @@ insert_1 (cd, value, start, length, word_length, bufp)
shift = (word_length - (start + length));
x = (x & ~(mask << shift)) | ((value & mask) << shift);
- bfd_put_bits ((bfd_vma) x, bufp, word_length, big_p);
+ cgen_put_insn_value (cd, bufp, word_length, (bfd_vma) x);
}
#endif /* ! CGEN_INT_INSN_P */
@@ -145,7 +153,22 @@ insert_normal (cd, value, attrs, word_offset, start, length, word_length,
}
/* Ensure VALUE will fit. */
- if (! CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED))
+ if (CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGN_OPT))
+ {
+ long minval = - (1L << (length - 1));
+ unsigned long maxval = mask;
+
+ if ((value > 0 && (unsigned long) value > maxval)
+ || value < minval)
+ {
+ /* xgettext:c-format */
+ sprintf (errbuf,
+ _("operand out of range (%ld not between %ld and %lu)"),
+ value, minval, maxval);
+ return errbuf;
+ }
+ }
+ else if (! CGEN_BOOL_ATTR (attrs, CGEN_IFLD_SIGNED))
{
unsigned long maxval = mask;
@@ -202,10 +225,10 @@ insert_normal (cd, value, attrs, word_offset, start, length, word_length,
}
/* Default insn builder (insert handler).
- The instruction is recorded in CGEN_INT_INSN_P byte order
- (meaning that if CGEN_INT_INSN_P BUFFER is an int * and thus the value is
- recorded in host byte order, otherwise BUFFER is an array of bytes and the
- value is recorded in target byte order).
+ The instruction is recorded in CGEN_INT_INSN_P byte order (meaning
+ that if CGEN_INSN_BYTES_PTR is an int * and thus, the value is
+ recorded in host byte order, otherwise BUFFER is an array of bytes
+ and the value is recorded in target byte order).
The result is an error message or NULL if success. */
static const char *
@@ -233,8 +256,8 @@ insert_insn_normal (cd, insn, fields, buffer, pc)
#else
- cgen_put_insn_value (cd, buffer, min (cd->base_insn_bitsize,
- CGEN_FIELDS_BITSIZE (fields)),
+ cgen_put_insn_value (cd, buffer, min ((unsigned) cd->base_insn_bitsize,
+ (unsigned) CGEN_FIELDS_BITSIZE (fields)),
value);
#endif /* ! CGEN_INT_INSN_P */
@@ -260,12 +283,13 @@ insert_insn_normal (cd, insn, fields, buffer, pc)
return NULL;
}
+#if CGEN_INT_INSN_P
/* Cover function to store an insn value into an integral insn. Must go here
because it needs <prefix>-desc.h for CGEN_INT_INSN_P. */
static void
put_insn_int_value (cd, buf, length, insn_length, value)
- CGEN_CPU_DESC cd;
+ CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
CGEN_INSN_BYTES_PTR buf;
int length;
int insn_length;
@@ -283,6 +307,7 @@ put_insn_int_value (cd, buf, length, insn_length, value)
*buf = (*buf & ~(mask << shift)) | ((value & mask) << shift);
}
}
+#endif
/* Operand extraction. */
@@ -296,14 +321,14 @@ put_insn_int_value (cd, buf, length, insn_length, value)
static CGEN_INLINE int
fill_cache (cd, ex_info, offset, bytes, pc)
- CGEN_CPU_DESC cd;
+ CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
CGEN_EXTRACT_INFO *ex_info;
int offset, bytes;
bfd_vma pc;
{
/* It's doubtful that the middle part has already been fetched so
we don't optimize that case. kiss. */
- int mask;
+ unsigned int mask;
disassemble_info *info = (disassemble_info *) ex_info->dis_info;
/* First do a quick check. */
@@ -341,16 +366,17 @@ fill_cache (cd, ex_info, offset, bytes, pc)
static CGEN_INLINE long
extract_1 (cd, ex_info, start, length, word_length, bufp, pc)
CGEN_CPU_DESC cd;
- CGEN_EXTRACT_INFO *ex_info;
+ CGEN_EXTRACT_INFO *ex_info ATTRIBUTE_UNUSED;
int start,length,word_length;
unsigned char *bufp;
- bfd_vma pc;
+ bfd_vma pc ATTRIBUTE_UNUSED;
{
unsigned long x;
int shift;
+#if 0
int big_p = CGEN_CPU_INSN_ENDIAN (cd) == CGEN_ENDIAN_BIG;
-
- x = bfd_get_bits (bufp, word_length, big_p);
+#endif
+ x = cgen_get_insn_value (cd, bufp, word_length);
if (CGEN_INSN_LSB0_P)
shift = (start + 1) - length;
@@ -400,7 +426,7 @@ extract_normal (cd, ex_info, insn_value, attrs, word_offset, start, length,
#endif
long *valuep;
{
- CGEN_INSN_INT value, mask;
+ long value, mask;
/* If LENGTH is zero, this operand doesn't contribute to the value
so give it a standard value of zero. */
@@ -428,9 +454,9 @@ extract_normal (cd, ex_info, insn_value, attrs, word_offset, start, length,
word_length = total_length;
}
- /* Does the value reside in INSN_VALUE? */
+ /* Does the value reside in INSN_VALUE, and at the right alignment? */
- if (CGEN_INT_INSN_P || word_offset == 0)
+ if (CGEN_INT_INSN_P || (word_offset == 0 && word_length == total_length))
{
if (CGEN_INSN_LSB0_P)
value = insn_value >> ((word_offset + start + 1) - length);
diff --git a/contrib/binutils/opcodes/cgen-opc.c b/contrib/binutils/opcodes/cgen-opc.c
index e55482c..06544ca 100644
--- a/contrib/binutils/opcodes/cgen-opc.c
+++ b/contrib/binutils/opcodes/cgen-opc.c
@@ -20,10 +20,10 @@
59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "sysdep.h"
-#include <ctype.h>
#include <stdio.h>
#include "ansidecl.h"
#include "libiberty.h"
+#include "safe-ctype.h"
#include "bfd.h"
#include "symcat.h"
#include "opcode/cgen.h"
@@ -69,9 +69,7 @@ cgen_keyword_lookup_name (kt, name)
while (*p
&& (*p == *n
- || (isalpha ((unsigned char) *p)
- && (tolower ((unsigned char) *p)
- == tolower ((unsigned char) *n)))))
+ || (ISALPHA (*p) && (TOLOWER (*p) == TOLOWER (*n)))))
++n, ++p;
if (!*p && !*n)
@@ -118,6 +116,7 @@ cgen_keyword_add (kt, ke)
CGEN_KEYWORD_ENTRY *ke;
{
unsigned int hash;
+ size_t i;
if (kt->name_hash_table == NULL)
build_keyword_hash_tables (kt);
@@ -132,6 +131,21 @@ cgen_keyword_add (kt, ke)
if (ke->name[0] == 0)
kt->null_entry = ke;
+
+ for (i = 1; i < strlen (ke->name); i++)
+ if (! ISALNUM (ke->name[i])
+ && ! strchr (kt->nonalpha_chars, ke->name[i]))
+ {
+ size_t idx = strlen (kt->nonalpha_chars);
+
+ /* If you hit this limit, please don't just
+ increase the size of the field, instead
+ look for a better algorithm. */
+ if (idx >= sizeof (kt->nonalpha_chars) - 1)
+ abort ();
+ kt->nonalpha_chars[idx] = ke->name[i];
+ kt->nonalpha_chars[idx+1] = 0;
+ }
}
/* FIXME: Need function to return count of keywords. */
@@ -216,7 +230,7 @@ hash_keyword_name (kt, name, case_sensitive_p)
hash = (hash * 97) + (unsigned char) *name;
else
for (hash = 0; *name; ++name)
- hash = (hash * 97) + (unsigned char) tolower (*name);
+ hash = (hash * 97) + (unsigned char) TOLOWER (*name);
return hash % kt->hash_table_size;
}
@@ -375,7 +389,35 @@ cgen_get_insn_value (cd, buf, length)
unsigned char *buf;
int length;
{
- bfd_get_bits (buf, length, cd->insn_endian == CGEN_ENDIAN_BIG);
+ int big_p = (cd->insn_endian == CGEN_ENDIAN_BIG);
+ int insn_chunk_bitsize = cd->insn_chunk_bitsize;
+ CGEN_INSN_INT value = 0;
+
+ if (insn_chunk_bitsize != 0 && insn_chunk_bitsize < length)
+ {
+ /* We need to divide up the incoming value into insn_chunk_bitsize-length
+ segments, and endian-convert them, one at a time. */
+ int i;
+
+ /* Enforce divisibility. */
+ if ((length % insn_chunk_bitsize) != 0)
+ abort ();
+
+ for (i = 0; i < length; i += insn_chunk_bitsize) /* NB: i == bits */
+ {
+ int index;
+ bfd_vma this_value;
+ index = i; /* NB: not dependent on endianness; opposite of cgen_put_insn_value! */
+ this_value = bfd_get_bits (& buf[index / 8], insn_chunk_bitsize, big_p);
+ value = (value << insn_chunk_bitsize) | this_value;
+ }
+ }
+ else
+ {
+ value = bfd_get_bits (buf, length, cd->insn_endian == CGEN_ENDIAN_BIG);
+ }
+
+ return value;
}
/* Cover function to store an insn value properly byteswapped. */
@@ -387,8 +429,31 @@ cgen_put_insn_value (cd, buf, length, value)
int length;
CGEN_INSN_INT value;
{
- bfd_put_bits ((bfd_vma) value, buf, length,
- cd->insn_endian == CGEN_ENDIAN_BIG);
+ int big_p = (cd->insn_endian == CGEN_ENDIAN_BIG);
+ int insn_chunk_bitsize = cd->insn_chunk_bitsize;
+
+ if (insn_chunk_bitsize != 0 && insn_chunk_bitsize < length)
+ {
+ /* We need to divide up the incoming value into insn_chunk_bitsize-length
+ segments, and endian-convert them, one at a time. */
+ int i;
+
+ /* Enforce divisibility. */
+ if ((length % insn_chunk_bitsize) != 0)
+ abort ();
+
+ for (i = 0; i < length; i += insn_chunk_bitsize) /* NB: i == bits */
+ {
+ int index;
+ index = (length - insn_chunk_bitsize - i); /* NB: not dependent on endianness! */
+ bfd_put_bits ((bfd_vma) value, & buf[index / 8], insn_chunk_bitsize, big_p);
+ value >>= insn_chunk_bitsize;
+ }
+ }
+ else
+ {
+ bfd_put_bits ((bfd_vma) value, buf, length, big_p);
+ }
}
/* Look up instruction INSN_*_VALUE and extract its fields.
diff --git a/contrib/binutils/opcodes/config.in b/contrib/binutils/opcodes/config.in
index c60a321..5caef55 100644
--- a/contrib/binutils/opcodes/config.in
+++ b/contrib/binutils/opcodes/config.in
@@ -25,9 +25,6 @@
/* 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
diff --git a/contrib/binutils/opcodes/configure b/contrib/binutils/opcodes/configure
index 946e38a..baa5fbd 100755
--- a/contrib/binutils/opcodes/configure
+++ b/contrib/binutils/opcodes/configure
@@ -55,7 +55,6 @@ program_suffix=NONE
program_transform_name=s,x,x,
silent=
site=
-sitefile=
srcdir=
target=NONE
verbose=
@@ -170,7 +169,6 @@ 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
@@ -341,11 +339,6 @@ 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=*)
@@ -511,16 +504,12 @@ fi
srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
# Prefer explicitly selected file to automatically selected ones.
-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
+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
-else
- CONFIG_SITE="$sitefile"
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
@@ -559,12 +548,12 @@ else
fi
echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
-echo "configure:563: checking for Cygwin environment" >&5
+echo "configure:552: 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 568 "configure"
+#line 557 "configure"
#include "confdefs.h"
int main() {
@@ -575,7 +564,7 @@ int main() {
return __CYGWIN__;
; return 0; }
EOF
-if { (eval echo configure:579: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cygwin=yes
else
@@ -592,19 +581,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6
CYGWIN=
test "$ac_cv_cygwin" = yes && CYGWIN=yes
echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
-echo "configure:596: checking for mingw32 environment" >&5
+echo "configure:585: 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 601 "configure"
+#line 590 "configure"
#include "confdefs.h"
int main() {
return __MINGW32__;
; return 0; }
EOF
-if { (eval echo configure:608: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:597: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_mingw32=yes
else
@@ -669,7 +658,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:673: checking host system type" >&5
+echo "configure:662: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -690,7 +679,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:694: checking target system type" >&5
+echo "configure:683: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -708,7 +697,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:712: checking build system type" >&5
+echo "configure:701: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -730,249 +719,49 @@ test "$host_alias" != "$target_alias" &&
NONENONEs,x,x, &&
program_prefix=${target_alias}-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:737: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
-if test -z "$CC"; then
- # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:767: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- 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:818: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+ echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
+echo "configure:725: checking for strerror in -lcposix" >&5
+ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- if test -n "$CC"; then
- ac_cv_prog_CC="$CC" # Let the user override the test.
-else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="cl"
- break
- fi
- done
- IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
-else
- echo "$ac_t""no" 1>&6
-fi
- ;;
- esac
- fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:850: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext << EOF
-
-#line 861 "configure"
+ ac_save_LIBS="$LIBS"
+LIBS="-lcposix $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 733 "configure"
#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char strerror();
-main(){return(0);}
+int main() {
+strerror()
+; return 0; }
EOF
-if { (eval echo configure:866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- ac_cv_prog_cc_works=yes
- # If we can't run a trivial program, we are probably using a cross compiler.
- if (./conftest; exit) 2>/dev/null; then
- ac_cv_prog_cc_cross=no
- else
- ac_cv_prog_cc_cross=yes
- fi
+if { (eval echo configure:744: \"$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
- ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:892: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:897: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:906: \"$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:925: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
- ac_cv_prog_cc_g=yes
-else
- ac_cv_prog_cc_g=no
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
fi
rm -f conftest*
+LIBS="$ac_save_LIBS"
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:957: checking for POSIXized ISC" >&5
-if test -d /etc/conf/kconfig.d &&
- grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
-then
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; 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
+ LIBS="$LIBS -lcposix"
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
@@ -991,7 +780,7 @@ BFD_VERSION=`sed -n -e 's/^.._INIT_AUTOMAKE.*,[ ]*\([^ ]*\)[ ]*).*/\1/p' < ${
# 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:995: checking for a BSD compatible install" >&5
+echo "configure:784: 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
@@ -1044,7 +833,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:1048: checking whether build environment is sane" >&5
+echo "configure:837: checking whether build environment is sane" >&5
# Just in case
sleep 1
echo timestamp > conftestfile
@@ -1101,7 +890,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:1105: checking whether ${MAKE-make} sets \${MAKE}" >&5
+echo "configure:894: 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
@@ -1147,7 +936,7 @@ EOF
missing_dir=`cd $ac_aux_dir && pwd`
echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:1151: checking for working aclocal" >&5
+echo "configure:940: 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.
@@ -1160,7 +949,7 @@ else
fi
echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:1164: checking for working autoconf" >&5
+echo "configure:953: 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.
@@ -1173,7 +962,7 @@ else
fi
echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:1177: checking for working automake" >&5
+echo "configure:966: 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.
@@ -1186,7 +975,7 @@ else
fi
echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:1190: checking for working autoheader" >&5
+echo "configure:979: 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.
@@ -1199,7 +988,7 @@ else
fi
echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:1203: checking for working makeinfo" >&5
+echo "configure:992: 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.
@@ -1222,7 +1011,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
set dummy ${ac_tool_prefix}ar; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1226: checking for $ac_word" >&5
+echo "configure:1015: 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
@@ -1254,7 +1043,7 @@ fi
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1258: checking for $ac_word" >&5
+echo "configure:1047: 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
@@ -1286,7 +1075,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1290: checking for $ac_word" >&5
+echo "configure:1079: 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
@@ -1323,7 +1112,7 @@ fi
if test "${enable_shared+set}" = set; then
enableval="$enable_shared"
p=${PACKAGE-default}
-case "$enableval" in
+case $enableval in
yes) enable_shared=yes ;;
no) enable_shared=no ;;
*)
@@ -1347,7 +1136,7 @@ fi
if test "${enable_static+set}" = set; then
enableval="$enable_static"
p=${PACKAGE-default}
-case "$enableval" in
+case $enableval in
yes) enable_static=yes ;;
no) enable_static=no ;;
*)
@@ -1370,7 +1159,7 @@ fi
if test "${enable_fast_install+set}" = set; then
enableval="$enable_fast_install"
p=${PACKAGE-default}
-case "$enableval" in
+case $enableval in
yes) enable_fast_install=yes ;;
no) enable_fast_install=no ;;
*)
@@ -1389,6 +1178,228 @@ else
enable_fast_install=yes
fi
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1185: 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:1215: 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:1266: 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:1298: 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 1309 "configure"
+#include "confdefs.h"
+
+main(){return(0);}
+EOF
+if { (eval echo configure:1314: \"$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:1340: 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:1345: 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:1354: \"$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:1373: checking whether ${CC-cc} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+ ac_cv_prog_cc_g=yes
+else
+ ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+
# Check whether --with-gnu-ld or --without-gnu-ld was given.
if test "${with_gnu_ld+set}" = set; then
withval="$with_gnu_ld"
@@ -1398,10 +1409,10 @@ else
fi
ac_prog=ld
-if test "$ac_cv_prog_gcc" = yes; then
+if test "$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:1405: checking for ld used by GCC" >&5
+echo "configure:1416: checking for ld used by GCC" >&5
case $host in
*-*-mingw*)
# gcc leaves a trailing carriage return which upsets mingw
@@ -1409,7 +1420,7 @@ echo "configure:1405: checking for ld used by GCC" >&5
*)
ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
esac
- case "$ac_prog" in
+ case $ac_prog in
# Accept absolute paths.
[\\/]* | [A-Za-z]:[\\/]*)
re_direlt='/[^/][^/]*/\.\./'
@@ -1431,12 +1442,12 @@ echo "configure:1405: 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:1435: checking for GNU ld" >&5
+echo "configure:1446: checking for GNU ld" >&5
else
echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
-echo "configure:1438: checking for non-GNU ld" >&5
+echo "configure:1449: checking for non-GNU ld" >&5
fi
-if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
+if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -z "$LD"; then
@@ -1444,11 +1455,11 @@ else
for ac_dir in $PATH; do
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- ac_cv_path_LD="$ac_dir/$ac_prog"
+ lt_cv_path_LD="$ac_dir/$ac_prog"
# Check to see if the program is GNU ld. I'd rather use --version,
# but apparently some GNU ld's only accept -v.
# Break only if it was the GNU/non-GNU ld that we prefer.
- if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+ if "$lt_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
@@ -1457,11 +1468,11 @@ else
done
IFS="$ac_save_ifs"
else
- ac_cv_path_LD="$LD" # Let the user override the test with a path.
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
fi
fi
-LD="$ac_cv_path_LD"
+LD="$lt_cv_path_LD"
if test -n "$LD"; then
echo "$ac_t""$LD" 1>&6
else
@@ -1469,24 +1480,24 @@ else
fi
test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
-echo "configure:1473: checking if the linker ($LD) is GNU ld" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gnu_ld'+set}'`\" = set"; then
+echo "configure:1484: checking if the linker ($LD) is GNU ld" >&5
+if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# I'd rather use --version here, but apparently some GNU ld's only accept -v.
if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
- ac_cv_prog_gnu_ld=yes
+ lt_cv_prog_gnu_ld=yes
else
- ac_cv_prog_gnu_ld=no
+ lt_cv_prog_gnu_ld=no
fi
fi
-echo "$ac_t""$ac_cv_prog_gnu_ld" 1>&6
-with_gnu_ld=$ac_cv_prog_gnu_ld
+echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
+with_gnu_ld=$lt_cv_prog_gnu_ld
echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
-echo "configure:1490: checking for $LD option to reload object files" >&5
+echo "configure:1501: checking for $LD option to reload object files" >&5
if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1498,13 +1509,13 @@ reload_flag=$lt_cv_ld_reload_flag
test -n "$reload_flag" && reload_flag=" $reload_flag"
echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
-echo "configure:1502: checking for BSD-compatible nm" >&5
-if eval "test \"`echo '$''{'ac_cv_path_NM'+set}'`\" = set"; then
+echo "configure:1513: checking for BSD-compatible nm" >&5
+if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$NM"; then
# Let the user override the test.
- ac_cv_path_NM="$NM"
+ lt_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
@@ -1516,27 +1527,27 @@ else
# nm: unknown option "B" ignored
# Tru64's nm complains that /dev/null is an invalid object file
if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
- ac_cv_path_NM="$tmp_nm -B"
+ lt_cv_path_NM="$tmp_nm -B"
break
elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
- ac_cv_path_NM="$tmp_nm -p"
+ lt_cv_path_NM="$tmp_nm -p"
break
else
- ac_cv_path_NM=${ac_cv_path_NM="$tmp_nm"} # keep the first match, but
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
continue # so that we can try to find one that supports BSD flags
fi
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm
+ test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
fi
fi
-NM="$ac_cv_path_NM"
+NM="$lt_cv_path_NM"
echo "$ac_t""$NM" 1>&6
echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1540: checking whether ln -s works" >&5
+echo "configure:1551: 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
@@ -1557,7 +1568,7 @@ else
fi
echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
-echo "configure:1561: checking how to recognise dependant libraries" >&5
+echo "configure:1572: checking how to recognise dependant libraries" >&5
if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1575,8 +1586,8 @@ lt_cv_deplibs_check_method='unknown'
# If you have `file' or equivalent on your system and you're not sure
# whether `pass_all' will *always* work, you probably want this one.
-case "$host_os" in
-aix4*)
+case $host_os in
+aix*)
lt_cv_deplibs_check_method=pass_all
;;
@@ -1585,8 +1596,8 @@ beos*)
;;
bsdi4*)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
lt_cv_file_magic_test_file=/shlib/libc.so
;;
@@ -1595,14 +1606,27 @@ cygwin* | mingw* |pw32*)
lt_cv_file_magic_cmd='$OBJDUMP -f'
;;
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ case "$host_os" in
+ rhapsody* | darwin1.012)
+ lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
+ ;;
+ *) # Darwin 1.3 on
+ lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
+ ;;
+ esac
+ ;;
+
freebsd* )
if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
- case "$host_cpu" in
+ case $host_cpu in
i*86 )
# Not sure whether the presence of OpenBSD here was a mistake.
# Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
;;
esac
@@ -1615,29 +1639,28 @@ gnu*)
lt_cv_deplibs_check_method=pass_all
;;
-hpux10.20*)
- # TODO: Does this work for hpux-11 too?
- lt_cv_deplibs_check_method='file_magic (s0-90-90-9|PA-RISC0-9.0-9) shared library'
+hpux10.20*|hpux11*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
lt_cv_file_magic_cmd=/usr/bin/file
lt_cv_file_magic_test_file=/usr/lib/libc.sl
;;
irix5* | irix6*)
- case "$host_os" in
+ case $host_os in
irix5*)
# this will be overridden with pass_all, but let us keep it just in case
lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
;;
*)
- case "$LD" in
+ case $LD in
*-32|*"-32 ") libmagic=32-bit;;
*-n32|*"-n32 ") libmagic=N32;;
*-64|*"-64 ") libmagic=64-bit;;
*) libmagic=never-match;;
esac
# this will be overridden with pass_all, but let us keep it just in case
- lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
- ;;
+ lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
+ ;;
esac
lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
lt_cv_deplibs_check_method=pass_all
@@ -1645,25 +1668,30 @@ irix5* | irix6*)
# This must be Linux ELF.
linux-gnu*)
- case "$host_cpu" in
- alpha* | i*86 | powerpc* | sparc* | ia64* )
+ case $host_cpu in
+ alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
lt_cv_deplibs_check_method=pass_all ;;
*)
# glibc up to 2.1.1 does not perform some relocations on ARM
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
- esac
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
+ esac
lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
;;
netbsd*)
- if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then :
+ if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
else
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
fi
;;
+newsos6)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
+ ;;
+
osf3* | osf4* | osf5*)
# this will be overridden with pass_all, but let us keep it just in case
lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
@@ -1680,14 +1708,18 @@ solaris*)
lt_cv_file_magic_test_file=/lib/libc.so
;;
+sysv5uw[78]* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- case "$host_vendor" in
+ case $host_vendor in
ncr)
lt_cv_deplibs_check_method=pass_all
;;
motorola)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
;;
esac
;;
@@ -1700,13 +1732,13 @@ file_magic_cmd=$lt_cv_file_magic_cmd
deplibs_check_method=$lt_cv_deplibs_check_method
echo $ac_n "checking for object suffix""... $ac_c" 1>&6
-echo "configure:1704: checking for object suffix" >&5
+echo "configure:1736: checking for object suffix" >&5
if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
rm -f conftest*
echo 'int i = 1;' > conftest.$ac_ext
-if { (eval echo configure:1710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1742: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
for ac_file in conftest.*; do
case $ac_file in
*.c) ;;
@@ -1726,7 +1758,7 @@ ac_objext=$ac_cv_objext
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:1730: checking for executable suffix" >&5
+echo "configure:1762: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1736,10 +1768,10 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:1740: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:1772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
- *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+ *.c | *.o | *.obj) ;;
*) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
esac
done
@@ -1759,15 +1791,15 @@ ac_exeext=$EXEEXT
# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
# Only perform the check for file, if the check method requires it
-case "$deplibs_check_method" in
+case $deplibs_check_method in
file_magic*)
if test "$file_magic_cmd" = '$MAGIC_CMD'; then
echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
-echo "configure:1767: checking for ${ac_tool_prefix}file" >&5
+echo "configure:1799: checking for ${ac_tool_prefix}file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- case "$MAGIC_CMD" in
+ case $MAGIC_CMD in
/*)
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
;;
@@ -1783,7 +1815,7 @@ else
if test -f $ac_dir/${ac_tool_prefix}file; then
lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
if test -n "$file_magic_test_file"; then
- case "$deplibs_check_method" in
+ case $deplibs_check_method in
"file_magic "*)
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
@@ -1825,11 +1857,11 @@ fi
if test -z "$lt_cv_path_MAGIC_CMD"; then
if test -n "$ac_tool_prefix"; then
echo $ac_n "checking for file""... $ac_c" 1>&6
-echo "configure:1829: checking for file" >&5
+echo "configure:1861: checking for file" >&5
if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- case "$MAGIC_CMD" in
+ case $MAGIC_CMD in
/*)
lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
;;
@@ -1845,7 +1877,7 @@ else
if test -f $ac_dir/file; then
lt_cv_path_MAGIC_CMD="$ac_dir/file"
if test -n "$file_magic_test_file"; then
- case "$deplibs_check_method" in
+ case $deplibs_check_method in
"file_magic "*)
file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
@@ -1896,7 +1928,7 @@ esac
# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1900: checking for $ac_word" >&5
+echo "configure:1932: 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
@@ -1928,7 +1960,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1932: checking for $ac_word" >&5
+echo "configure:1964: 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
@@ -1963,7 +1995,7 @@ fi
# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
set dummy ${ac_tool_prefix}strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1967: checking for $ac_word" >&5
+echo "configure:1999: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1995,7 +2027,7 @@ if test -n "$ac_tool_prefix"; then
# Extract the first word of "strip", so it can be a program name with args.
set dummy strip; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1999: checking for $ac_word" >&5
+echo "configure:2031: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2033,8 +2065,8 @@ libtool_flags="--cache-file=$cache_file"
test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
-test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
-test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
+test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
+test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
@@ -2059,12 +2091,12 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
# Some flags need to be propagated to the compiler or linker for good
# libtool support.
-case "$host" in
+case $host in
*-*-irix6*)
# Find out which ABI we are using.
- echo '#line 2066 "configure"' > conftest.$ac_ext
- if { (eval echo configure:2067: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- case "`/usr/bin/file conftest.o`" in
+ echo '#line 2098 "configure"' > conftest.$ac_ext
+ if { (eval echo configure:2099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+ case `/usr/bin/file conftest.$ac_objext` in
*32-bit*)
LD="${LD-ld} -32"
;;
@@ -2084,7 +2116,7 @@ case "$host" in
SAVE_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -belf"
echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
-echo "configure:2088: checking whether the C compiler needs -belf" >&5
+echo "configure:2120: 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
@@ -2097,14 +2129,14 @@ ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$a
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 2101 "configure"
+#line 2133 "configure"
#include "confdefs.h"
int main() {
; return 0; }
EOF
-if { (eval echo configure:2108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2140: \"$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
@@ -2214,7 +2246,6 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool'
# clobbered by the next message.
exec 5>>./config.log
-
@@ -2241,7 +2272,7 @@ if test "${enable_commonbfdlib+set}" = set; then
esac
fi
-build_warnings="-W -Wall"
+build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
# Check whether --enable-build-warnings or --disable-build-warnings was given.
if test "${enable_build_warnings+set}" = set; then
enableval="$enable_build_warnings"
@@ -2271,28 +2302,9 @@ fi
if test -z "$target" ; then
{ echo "configure: error: Unrecognized target system type; please check config.sub." 1>&2; exit 1; }
fi
-if test "$program_transform_name" = s,x,x,; then
- program_transform_name=
-else
- # Double any \ or $. echo might interpret backslashes.
- cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
- program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
- rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
- 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"
-
-# sed with no file args requires a program.
-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:2296: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo "configure:2308: 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"
@@ -2317,7 +2329,7 @@ fi
echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
-echo "configure:2321: checking for executable suffix" >&5
+echo "configure:2333: checking for executable suffix" >&5
if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2327,10 +2339,10 @@ else
rm -f conftest*
echo 'int main () { return 0; }' > conftest.$ac_ext
ac_cv_exeext=
- if { (eval echo configure:2331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+ if { (eval echo configure:2343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
for file in conftest.*; do
case $file in
- *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+ *.c | *.o | *.obj) ;;
*) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
esac
done
@@ -2353,7 +2365,7 @@ ac_exeext=$EXEEXT
# 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:2357: checking for $ac_word" >&5
+echo "configure:2369: 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
@@ -2383,7 +2395,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2387: checking for $ac_word" >&5
+echo "configure:2399: 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
@@ -2434,7 +2446,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2438: checking for $ac_word" >&5
+echo "configure:2450: 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
@@ -2466,7 +2478,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2470: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2482: 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.
@@ -2477,12 +2489,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 2481 "configure"
+#line 2493 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:2486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2498: \"$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
@@ -2508,12 +2520,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2512: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2524: 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:2517: checking whether we are using GNU C" >&5
+echo "configure:2529: 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
@@ -2522,7 +2534,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2526: \"$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:2538: \"$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
@@ -2541,7 +2553,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2545: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2557: 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
@@ -2573,9 +2585,9 @@ else
fi
-ALL_LINGUAS=
+ALL_LINGUAS="fr sv tr es da"
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2579: checking how to run the C preprocessor" >&5
+echo "configure:2591: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -2590,13 +2602,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 2594 "configure"
+#line 2606 "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:2600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2612: \"$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
:
@@ -2607,13 +2619,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 2611 "configure"
+#line 2623 "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:2617: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2629: \"$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
:
@@ -2624,13 +2636,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 2628 "configure"
+#line 2640 "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:2634: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2646: \"$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
:
@@ -2657,7 +2669,7 @@ echo "$ac_t""$CPP" 1>&6
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2661: checking for $ac_word" >&5
+echo "configure:2673: 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
@@ -2685,12 +2697,12 @@ else
fi
echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2689: checking for ANSI C header files" >&5
+echo "configure:2701: 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 2694 "configure"
+#line 2706 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
@@ -2698,7 +2710,7 @@ else
#include <float.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2702: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2714: \"$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*
@@ -2715,7 +2727,7 @@ rm -f conftest*
if test $ac_cv_header_stdc = yes; then
# SunOS 4.x string.h does not declare mem*, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2719 "configure"
+#line 2731 "configure"
#include "confdefs.h"
#include <string.h>
EOF
@@ -2733,7 +2745,7 @@ fi
if test $ac_cv_header_stdc = yes; then
# ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
cat > conftest.$ac_ext <<EOF
-#line 2737 "configure"
+#line 2749 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
@@ -2754,7 +2766,7 @@ if test "$cross_compiling" = yes; then
:
else
cat > conftest.$ac_ext <<EOF
-#line 2758 "configure"
+#line 2770 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
@@ -2765,7 +2777,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
exit (0); }
EOF
-if { (eval echo configure:2769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+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
:
else
@@ -2789,12 +2801,12 @@ EOF
fi
echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2793: checking for working const" >&5
+echo "configure:2805: 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 2798 "configure"
+#line 2810 "configure"
#include "confdefs.h"
int main() {
@@ -2843,7 +2855,7 @@ ccp = (char const *const *) p;
; return 0; }
EOF
-if { (eval echo configure:2847: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2859: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
@@ -2864,21 +2876,21 @@ EOF
fi
echo $ac_n "checking for inline""... $ac_c" 1>&6
-echo "configure:2868: checking for inline" >&5
+echo "configure:2880: 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 2875 "configure"
+#line 2887 "configure"
#include "confdefs.h"
int main() {
} $ac_kw foo() {
; return 0; }
EOF
-if { (eval echo configure:2882: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2894: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_inline=$ac_kw; break
else
@@ -2904,12 +2916,12 @@ EOF
esac
echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:2908: checking for off_t" >&5
+echo "configure:2920: 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 2913 "configure"
+#line 2925 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -2937,12 +2949,12 @@ EOF
fi
echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:2941: checking for size_t" >&5
+echo "configure:2953: 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 2946 "configure"
+#line 2958 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
@@ -2972,19 +2984,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:2976: checking for working alloca.h" >&5
+echo "configure:2988: 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 2981 "configure"
+#line 2993 "configure"
#include "confdefs.h"
#include <alloca.h>
int main() {
char *p = alloca(2 * sizeof(int));
; return 0; }
EOF
-if { (eval echo configure:2988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3000: \"$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
@@ -3005,12 +3017,12 @@ EOF
fi
echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:3009: checking for alloca" >&5
+echo "configure:3021: 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 3014 "configure"
+#line 3026 "configure"
#include "confdefs.h"
#ifdef __GNUC__
@@ -3038,7 +3050,7 @@ int main() {
char *p = (char *) alloca(1);
; return 0; }
EOF
-if { (eval echo configure:3042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3054: \"$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
@@ -3070,12 +3082,12 @@ EOF
echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:3074: checking whether alloca needs Cray hooks" >&5
+echo "configure:3086: 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 3079 "configure"
+#line 3091 "configure"
#include "confdefs.h"
#if defined(CRAY) && ! defined(CRAY2)
webecray
@@ -3100,12 +3112,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:3104: checking for $ac_func" >&5
+echo "configure:3116: 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 3109 "configure"
+#line 3121 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3128,7 +3140,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3144: \"$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
@@ -3155,7 +3167,7 @@ done
fi
echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:3159: checking stack direction for C alloca" >&5
+echo "configure:3171: 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
@@ -3163,7 +3175,7 @@ else
ac_cv_c_stack_direction=0
else
cat > conftest.$ac_ext <<EOF
-#line 3167 "configure"
+#line 3179 "configure"
#include "confdefs.h"
find_stack_direction ()
{
@@ -3182,7 +3194,7 @@ main ()
exit (find_stack_direction() < 0);
}
EOF
-if { (eval echo configure:3186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3198: \"$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
@@ -3203,21 +3215,21 @@ EOF
fi
-for ac_hdr in unistd.h
+for ac_hdr in stdlib.h unistd.h sys/stat.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:3211: checking for $ac_hdr" >&5
+echo "configure:3223: 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 3216 "configure"
+#line 3228 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3233: \"$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*
@@ -3246,12 +3258,12 @@ done
for ac_func in getpagesize
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3250: checking for $ac_func" >&5
+echo "configure:3262: 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 3255 "configure"
+#line 3267 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3274,7 +3286,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3290: \"$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
@@ -3299,7 +3311,7 @@ fi
done
echo $ac_n "checking for working mmap""... $ac_c" 1>&6
-echo "configure:3303: checking for working mmap" >&5
+echo "configure:3315: 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
@@ -3307,7 +3319,7 @@ else
ac_cv_func_mmap_fixed_mapped=no
else
cat > conftest.$ac_ext <<EOF
-#line 3311 "configure"
+#line 3323 "configure"
#include "confdefs.h"
/* Thanks to Mike Haertel and Jim Avera for this test.
@@ -3335,11 +3347,24 @@ else
#include <fcntl.h>
#include <sys/mman.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+
+#if HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
/* 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
@@ -3447,7 +3472,7 @@ main()
}
EOF
-if { (eval echo configure:3451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:3476: \"$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
@@ -3475,17 +3500,17 @@ unistd.h values.h sys/param.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:3479: checking for $ac_hdr" >&5
+echo "configure:3504: 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 3484 "configure"
+#line 3509 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3489: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3514: \"$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*
@@ -3515,12 +3540,12 @@ done
__argz_count __argz_stringify __argz_next
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3519: checking for $ac_func" >&5
+echo "configure:3544: 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 3524 "configure"
+#line 3549 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3543,7 +3568,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3572: \"$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
@@ -3572,12 +3597,12 @@ done
for ac_func in stpcpy
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3576: checking for $ac_func" >&5
+echo "configure:3601: 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 3581 "configure"
+#line 3606 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3600,7 +3625,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3629: \"$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
@@ -3634,19 +3659,19 @@ EOF
if test $ac_cv_header_locale_h = yes; then
echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
-echo "configure:3638: checking for LC_MESSAGES" >&5
+echo "configure:3663: 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 3643 "configure"
+#line 3668 "configure"
#include "confdefs.h"
#include <locale.h>
int main() {
return LC_MESSAGES
; return 0; }
EOF
-if { (eval echo configure:3650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3675: \"$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
@@ -3667,7 +3692,7 @@ EOF
fi
fi
echo $ac_n "checking whether NLS is requested""... $ac_c" 1>&6
-echo "configure:3671: checking whether NLS is requested" >&5
+echo "configure:3696: 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"
@@ -3687,7 +3712,7 @@ fi
EOF
echo $ac_n "checking whether included gettext is requested""... $ac_c" 1>&6
-echo "configure:3691: checking whether included gettext is requested" >&5
+echo "configure:3716: 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"
@@ -3706,17 +3731,17 @@ fi
ac_safe=`echo "libintl.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for libintl.h""... $ac_c" 1>&6
-echo "configure:3710: checking for libintl.h" >&5
+echo "configure:3735: 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 3715 "configure"
+#line 3740 "configure"
#include "confdefs.h"
#include <libintl.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:3720: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:3745: \"$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*
@@ -3733,19 +3758,19 @@ fi
if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libc""... $ac_c" 1>&6
-echo "configure:3737: checking for gettext in libc" >&5
+echo "configure:3762: 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 3742 "configure"
+#line 3767 "configure"
#include "confdefs.h"
#include <libintl.h>
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:3749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3774: \"$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
@@ -3761,7 +3786,7 @@ echo "$ac_t""$gt_cv_func_gettext_libc" 1>&6
if test "$gt_cv_func_gettext_libc" != "yes"; then
echo $ac_n "checking for bindtextdomain in -lintl""... $ac_c" 1>&6
-echo "configure:3765: checking for bindtextdomain in -lintl" >&5
+echo "configure:3790: 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
@@ -3769,7 +3794,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3773 "configure"
+#line 3798 "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
@@ -3780,7 +3805,7 @@ int main() {
bindtextdomain()
; return 0; }
EOF
-if { (eval echo configure:3784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3809: \"$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
@@ -3796,19 +3821,19 @@ fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
echo $ac_n "checking for gettext in libintl""... $ac_c" 1>&6
-echo "configure:3800: checking for gettext in libintl" >&5
+echo "configure:3825: 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 3805 "configure"
+#line 3830 "configure"
#include "confdefs.h"
int main() {
return (int) gettext ("")
; return 0; }
EOF
-if { (eval echo configure:3812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3837: \"$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
@@ -3836,7 +3861,7 @@ EOF
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3840: checking for $ac_word" >&5
+echo "configure:3865: 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
@@ -3870,12 +3895,12 @@ fi
for ac_func in dcgettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3874: checking for $ac_func" >&5
+echo "configure:3899: 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 3879 "configure"
+#line 3904 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -3898,7 +3923,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:3902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3927: \"$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
@@ -3925,7 +3950,7 @@ done
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3929: checking for $ac_word" >&5
+echo "configure:3954: 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
@@ -3961,7 +3986,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:3965: checking for $ac_word" >&5
+echo "configure:3990: 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
@@ -3993,7 +4018,7 @@ else
fi
cat > conftest.$ac_ext <<EOF
-#line 3997 "configure"
+#line 4022 "configure"
#include "confdefs.h"
int main() {
@@ -4001,7 +4026,7 @@ extern int _nl_msg_cat_cntr;
return _nl_msg_cat_cntr
; return 0; }
EOF
-if { (eval echo configure:4005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
CATOBJEXT=.gmo
DATADIRNAME=share
@@ -4033,7 +4058,7 @@ fi
# Extract the first word of "msgfmt", so it can be a program name with args.
set dummy msgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4037: checking for $ac_word" >&5
+echo "configure:4062: 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
@@ -4067,7 +4092,7 @@ fi
# Extract the first word of "gmsgfmt", so it can be a program name with args.
set dummy gmsgfmt; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4071: checking for $ac_word" >&5
+echo "configure:4096: 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
@@ -4103,7 +4128,7 @@ fi
# Extract the first word of "xgettext", so it can be a program name with args.
set dummy xgettext; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:4107: checking for $ac_word" >&5
+echo "configure:4132: 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
@@ -4193,7 +4218,7 @@ fi
LINGUAS=
else
echo $ac_n "checking for catalogs to be installed""... $ac_c" 1>&6
-echo "configure:4197: checking for catalogs to be installed" >&5
+echo "configure:4222: checking for catalogs to be installed" >&5
NEW_LINGUAS=
for lang in ${LINGUAS=$ALL_LINGUAS}; do
case "$ALL_LINGUAS" in
@@ -4221,17 +4246,17 @@ echo "configure:4197: checking for catalogs to be installed" >&5
if test "$CATOBJEXT" = ".cat"; then
ac_safe=`echo "linux/version.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for linux/version.h""... $ac_c" 1>&6
-echo "configure:4225: checking for linux/version.h" >&5
+echo "configure:4250: 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 4230 "configure"
+#line 4255 "configure"
#include "confdefs.h"
#include <linux/version.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4260: \"$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*
@@ -4276,7 +4301,7 @@ fi
l=
- if test -d $srcdir/po; then
+ if test -f $srcdir/po/POTFILES.in; then
test -d po || mkdir po
if test "x$srcdir" != "x."; then
if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
@@ -4295,6 +4320,44 @@ fi
. ${srcdir}/../bfd/configure.host
+# 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:4338: 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
+
+
# Find a good install program. We prefer a C program (faster),
# so one script is as good as another. But avoid the broken or
@@ -4308,7 +4371,7 @@ fi
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:4312: checking for a BSD compatible install" >&5
+echo "configure:4375: 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
@@ -4365,17 +4428,17 @@ 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:4369: checking for $ac_hdr" >&5
+echo "configure:4432: 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 4374 "configure"
+#line 4437 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4379: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4442: \"$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*
@@ -4517,15 +4580,19 @@ if test x${all_targets} = xfalse ; then
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_mmix_arch) ta="$ta mmix-dis.lo mmix-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_openrisc_arch) ta="$ta openrisc-asm.lo openrisc-desc.lo openrisc-dis.lo openrisc-ibld.lo openrisc-opc.lo" using_cgen=yes ;;
+ bfd_pdp11_arch) ta="$ta pdp11-dis.lo pdp11-opc.lo" ;;
bfd_pj_arch) ta="$ta pj-dis.lo pj-opc.lo" ;;
bfd_powerpc_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;;
bfd_powerpc_64_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;;
bfd_pyramid_arch) ;;
bfd_romp_arch) ;;
bfd_rs6000_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;;
+ bfd_s390_arch) ta="$ta s390-dis.lo s390-opc.lo" ;;
bfd_sh_arch)
ta="$ta sh-dis.lo" ;;
bfd_sparc_arch) ta="$ta sparc-dis.lo sparc-opc.lo" ;;
@@ -4539,6 +4606,7 @@ if test x${all_targets} = xfalse ; then
bfd_vax_arch) ta="$ta vax-dis.lo" ;;
bfd_w65_arch) ta="$ta w65-dis.lo" ;;
bfd_we32k_arch) ;;
+ bfd_xstormy16_arch) ta="$ta xstormy16-asm.lo xstormy16-desc.lo xstormy16-dis.lo xstormy16-ibld.lo xstormy16-opc.lo" using_cgen=yes ;;
bfd_z8k_arch) ta="$ta z8k-dis.lo" ;;
"") ;;
@@ -4728,7 +4796,6 @@ s%@build_alias@%$build_alias%g
s%@build_cpu@%$build_cpu%g
s%@build_vendor@%$build_vendor%g
s%@build_os@%$build_os%g
-s%@CC@%$CC%g
s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
s%@INSTALL_DATA@%$INSTALL_DATA%g
@@ -4742,6 +4809,7 @@ s%@MAKEINFO@%$MAKEINFO%g
s%@SET_MAKE@%$SET_MAKE%g
s%@AR@%$AR%g
s%@RANLIB@%$RANLIB%g
+s%@CC@%$CC%g
s%@LN_S@%$LN_S%g
s%@OBJEXT@%$OBJEXT%g
s%@EXEEXT@%$EXEEXT%g
@@ -4773,6 +4841,8 @@ s%@GT_NO@%$GT_NO%g
s%@GT_YES@%$GT_YES%g
s%@MKINSTALLDIRS@%$MKINSTALLDIRS%g
s%@l@%$l%g
+s%@CC_FOR_BUILD@%$CC_FOR_BUILD%g
+s%@EXEEXT_FOR_BUILD@%$EXEEXT_FOR_BUILD%g
s%@HDEFINES@%$HDEFINES%g
s%@CGEN_MAINT_TRUE@%$CGEN_MAINT_TRUE%g
s%@CGEN_MAINT_FALSE@%$CGEN_MAINT_FALSE%g
diff --git a/contrib/binutils/opcodes/configure.in b/contrib/binutils/opcodes/configure.in
index 28f12ed..302cd53 100644
--- a/contrib/binutils/opcodes/configure.in
+++ b/contrib/binutils/opcodes/configure.in
@@ -43,7 +43,7 @@ AC_ARG_ENABLE(commonbfdlib,
*) AC_MSG_ERROR([bad value ${enableval} for opcodes commonbfdlib option]) ;;
esac])dnl
-build_warnings="-W -Wall"
+build_warnings="-W -Wall -Wstrict-prototypes -Wmissing-prototypes"
AC_ARG_ENABLE(build-warnings,
[ --enable-build-warnings Enable build-time compiler warnings if gcc is used],
[case "${enableval}" in
@@ -69,7 +69,6 @@ AM_CONFIG_HEADER(config.h:config.in)
if test -z "$target" ; then
AC_MSG_ERROR(Unrecognized target system type; please check config.sub.)
fi
-AC_ARG_PROGRAM
AM_MAINTAINER_MODE
AC_EXEEXT
@@ -78,11 +77,13 @@ AC_EXEEXT
AC_PROG_CC
-ALL_LINGUAS=
+ALL_LINGUAS="fr sv tr es da"
CY_GNU_GETTEXT
. ${srcdir}/../bfd/configure.host
+BFD_CC_FOR_BUILD
+
AC_SUBST(HDEFINES)
AC_PROG_INSTALL
@@ -193,15 +194,19 @@ if test x${all_targets} = xfalse ; then
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_mmix_arch) ta="$ta mmix-dis.lo mmix-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_openrisc_arch) ta="$ta openrisc-asm.lo openrisc-desc.lo openrisc-dis.lo openrisc-ibld.lo openrisc-opc.lo" using_cgen=yes ;;
+ bfd_pdp11_arch) ta="$ta pdp11-dis.lo pdp11-opc.lo" ;;
bfd_pj_arch) ta="$ta pj-dis.lo pj-opc.lo" ;;
bfd_powerpc_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;;
bfd_powerpc_64_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;;
bfd_pyramid_arch) ;;
bfd_romp_arch) ;;
bfd_rs6000_arch) ta="$ta ppc-dis.lo ppc-opc.lo" ;;
+ bfd_s390_arch) ta="$ta s390-dis.lo s390-opc.lo" ;;
bfd_sh_arch)
ta="$ta sh-dis.lo" ;;
bfd_sparc_arch) ta="$ta sparc-dis.lo sparc-opc.lo" ;;
@@ -215,6 +220,7 @@ if test x${all_targets} = xfalse ; then
bfd_vax_arch) ta="$ta vax-dis.lo" ;;
bfd_w65_arch) ta="$ta w65-dis.lo" ;;
bfd_we32k_arch) ;;
+ bfd_xstormy16_arch) ta="$ta xstormy16-asm.lo xstormy16-desc.lo xstormy16-dis.lo xstormy16-ibld.lo xstormy16-opc.lo" using_cgen=yes ;;
bfd_z8k_arch) ta="$ta z8k-dis.lo" ;;
"") ;;
diff --git a/contrib/binutils/opcodes/dis-buf.c b/contrib/binutils/opcodes/dis-buf.c
index 46ac2f7..8f846a9 100644
--- a/contrib/binutils/opcodes/dis-buf.c
+++ b/contrib/binutils/opcodes/dis-buf.c
@@ -80,10 +80,13 @@ generic_print_address (addr, info)
(*info->fprintf_func) (info->stream, "0x%s", buf);
}
+#if 0
/* 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 PARAMS ((bfd_vma, char *, int));
+
void
generic_strcat_address (addr, buf, len)
bfd_vma addr;
@@ -102,6 +105,7 @@ generic_strcat_address (addr, buf, len)
}
return;
}
+#endif
/* Just return the given address. */
diff --git a/contrib/binutils/opcodes/disassemble.c b/contrib/binutils/opcodes/disassemble.c
index 3a76d55..ab23635 100644
--- a/contrib/binutils/opcodes/disassemble.c
+++ b/contrib/binutils/opcodes/disassemble.c
@@ -44,12 +44,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define ARCH_m88k
#define ARCH_mcore
#define ARCH_mips
+#define ARCH_mmix
#define ARCH_mn10200
#define ARCH_mn10300
#define ARCH_ns32k
+#define ARCH_openrisc
+#define ARCH_pdp11
#define ARCH_pj
#define ARCH_powerpc
#define ARCH_rs6000
+#define ARCH_s390
#define ARCH_sh
#define ARCH_sparc
#define ARCH_tic30
@@ -58,6 +62,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define ARCH_v850
#define ARCH_vax
#define ARCH_w65
+#define ARCH_xstormy16
#define ARCH_z8k
#endif
@@ -146,11 +151,7 @@ disassembler (abfd)
#endif
#ifdef ARCH_i386
case bfd_arch_i386:
- if (bfd_get_mach (abfd) == bfd_mach_i386_i386_intel_syntax
- || bfd_get_mach (abfd) == bfd_mach_x86_64_intel_syntax)
- disassemble = print_insn_i386_intel;
- else
- disassemble = print_insn_i386_att;
+ disassemble = print_insn_i386;
break;
#endif
#ifdef ARCH_i860
@@ -214,6 +215,11 @@ disassembler (abfd)
disassemble = print_insn_little_mips;
break;
#endif
+#ifdef ARCH_mmix
+ case bfd_arch_mmix:
+ disassemble = print_insn_mmix;
+ break;
+#endif
#ifdef ARCH_mn10200
case bfd_arch_mn10200:
disassemble = print_insn_mn10200;
@@ -224,6 +230,16 @@ disassembler (abfd)
disassemble = print_insn_mn10300;
break;
#endif
+#ifdef ARCH_openrisc
+ case bfd_arch_openrisc:
+ disassemble = print_insn_openrisc;
+ break;
+#endif
+#ifdef ARCH_pdp11
+ case bfd_arch_pdp11:
+ disassemble = print_insn_pdp11;
+ break;
+#endif
#ifdef ARCH_pj
case bfd_arch_pj:
disassemble = print_insn_pj;
@@ -245,6 +261,11 @@ disassembler (abfd)
disassemble = print_insn_rs6000;
break;
#endif
+#ifdef ARCH_s390
+ case bfd_arch_s390:
+ disassemble = print_insn_s390;
+ break;
+#endif
#ifdef ARCH_sh
case bfd_arch_sh:
if (bfd_big_endian (abfd))
@@ -283,6 +304,11 @@ disassembler (abfd)
disassemble = print_insn_w65;
break;
#endif
+#ifdef ARCH_xstormy16
+ case bfd_arch_xstormy16:
+ disassemble = print_insn_xstormy16;
+ break;
+#endif
#ifdef ARCH_z8k
case bfd_arch_z8k:
if (bfd_get_mach(abfd) == bfd_mach_z8001)
diff --git a/contrib/binutils/opcodes/i386-dis.c b/contrib/binutils/opcodes/i386-dis.c
index 3eb40c6..7b4b858 100644
--- a/contrib/binutils/opcodes/i386-dis.c
+++ b/contrib/binutils/opcodes/i386-dis.c
@@ -52,7 +52,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
static int fetch_data PARAMS ((struct disassemble_info *, bfd_byte *));
static void ckprefix PARAMS ((void));
static const char *prefix_name PARAMS ((int, int));
-static int print_insn_i386 PARAMS ((bfd_vma, disassemble_info *));
+static int print_insn PARAMS ((bfd_vma, disassemble_info *));
static void dofloat PARAMS ((int));
static void OP_ST PARAMS ((int, int));
static void OP_STi PARAMS ((int, int));
@@ -101,6 +101,7 @@ struct dis_private {
bfd_byte *max_fetched;
bfd_byte the_buffer[MAXLEN];
bfd_vma insn_start;
+ int orig_sizeflag;
jmp_buf bailout;
};
@@ -298,9 +299,7 @@ fetch_data (info, addr)
#define loop_jcxz_flag NULL, loop_jcxz_mode
/* bits in sizeflag */
-#if 0 /* Leave undefined until someone adds the extra flag to objdump. */
#define SUFFIX_ALWAYS 4
-#endif
#define AFLAG 2
#define DFLAG 1
@@ -442,9 +441,9 @@ struct dis386 {
'N' => print 'n' if instruction has no wait "prefix"
'O' => print 'd', or 'o'
'P' => print 'w', 'l' or 'q' if instruction has an operand size prefix,
- or suffix_always is true
- print 'q' if rex prefix is present.
- 'Q' => print 'w', 'l' or 'q' if no register operands or suffix_always is true
+ . or suffix_always is true. print 'q' if rex prefix is present.
+ 'Q' => print 'w', 'l' or 'q' if no register operands or suffix_always
+ . is true
'R' => print 'w', 'l' or 'q' ("wd" or "dq" in intel mode)
'S' => print 'w', 'l' or 'q' if suffix_always is true
'T' => print 'q' in 64bit mode and behave as 'P' otherwise
@@ -1337,8 +1336,8 @@ static const struct dis386 grps[][8] = {
},
/* GRP6 */
{
- { "sldt", Ew, XX, XX },
- { "str", Ew, XX, XX },
+ { "sldtQ", Ev, XX, XX },
+ { "strQ", Ev, XX, XX },
{ "lldt", Ew, XX, XX },
{ "ltr", Ew, XX, XX },
{ "verr", Ew, XX, XX },
@@ -1352,7 +1351,7 @@ static const struct dis386 grps[][8] = {
{ "sidtQ", M, XX, XX },
{ "lgdtQ", M, XX, XX },
{ "lidtQ", M, XX, XX },
- { "smsw", Ew, XX, XX },
+ { "smswQ", Ev, XX, XX },
{ "(bad)", XX, XX, XX },
{ "lmsw", Ew, XX, XX },
{ "invlpg", Ew, XX, XX },
@@ -1837,25 +1836,17 @@ static char close_char;
static char separator_char;
static char scale_char;
+/* Here for backwards compatibility. When gdb stops using
+ print_insn_i386_att and print_insn_i386_intel these functions can
+ disappear, and print_insn_i386 be merged into print_insn. */
int
print_insn_i386_att (pc, info)
bfd_vma pc;
disassemble_info *info;
{
intel_syntax = 0;
- names64 = att_names64;
- names32 = att_names32;
- names16 = att_names16;
- names8 = att_names8;
- names8rex = att_names8rex;
- names_seg = att_names_seg;
- index16 = att_index16;
- open_char = '(';
- close_char = ')';
- separator_char = ',';
- scale_char = ',';
-
- return print_insn_i386 (pc, info);
+
+ return print_insn (pc, info);
}
int
@@ -1864,51 +1855,127 @@ print_insn_i386_intel (pc, info)
disassemble_info *info;
{
intel_syntax = 1;
- names64 = intel_names64;
- names32 = intel_names32;
- names16 = intel_names16;
- names8 = intel_names8;
- names8rex = intel_names8rex;
- names_seg = intel_names_seg;
- index16 = intel_index16;
- open_char = '[';
- close_char = ']';
- separator_char = '+';
- scale_char = '*';
-
- return print_insn_i386 (pc, info);
+
+ return print_insn (pc, info);
}
-static int
+int
print_insn_i386 (pc, info)
bfd_vma pc;
disassemble_info *info;
{
+ intel_syntax = -1;
+
+ return print_insn (pc, info);
+}
+
+static int
+print_insn (pc, info)
+ bfd_vma pc;
+ disassemble_info *info;
+{
const struct dis386 *dp;
int i;
int two_source_ops;
char *first, *second, *third;
int needcomma;
unsigned char uses_SSE_prefix;
- VOLATILE int sizeflag;
- VOLATILE int orig_sizeflag;
-
+ int sizeflag;
+ const char *p;
struct dis_private priv;
- bfd_byte *inbuf = priv.the_buffer;
mode_64bit = (info->mach == bfd_mach_x86_64_intel_syntax
|| info->mach == bfd_mach_x86_64);
+ if (intel_syntax == -1)
+ intel_syntax = (info->mach == bfd_mach_i386_i386_intel_syntax
+ || info->mach == bfd_mach_x86_64_intel_syntax);
+
if (info->mach == bfd_mach_i386_i386
|| info->mach == bfd_mach_x86_64
|| info->mach == bfd_mach_i386_i386_intel_syntax
|| info->mach == bfd_mach_x86_64_intel_syntax)
- sizeflag = AFLAG | DFLAG;
+ priv.orig_sizeflag = AFLAG | DFLAG;
else if (info->mach == bfd_mach_i386_i8086)
- sizeflag = 0;
+ priv.orig_sizeflag = 0;
else
abort ();
- orig_sizeflag = sizeflag;
+
+ for (p = info->disassembler_options; p != NULL; )
+ {
+ if (strncmp (p, "x86-64", 6) == 0)
+ {
+ mode_64bit = 1;
+ priv.orig_sizeflag = AFLAG | DFLAG;
+ }
+ else if (strncmp (p, "i386", 4) == 0)
+ {
+ mode_64bit = 0;
+ priv.orig_sizeflag = AFLAG | DFLAG;
+ }
+ else if (strncmp (p, "i8086", 5) == 0)
+ {
+ mode_64bit = 0;
+ priv.orig_sizeflag = 0;
+ }
+ else if (strncmp (p, "intel", 5) == 0)
+ {
+ intel_syntax = 1;
+ }
+ else if (strncmp (p, "att", 3) == 0)
+ {
+ intel_syntax = 0;
+ }
+ else if (strncmp (p, "addr", 4) == 0)
+ {
+ if (p[4] == '1' && p[5] == '6')
+ priv.orig_sizeflag &= ~AFLAG;
+ else if (p[4] == '3' && p[5] == '2')
+ priv.orig_sizeflag |= AFLAG;
+ }
+ else if (strncmp (p, "data", 4) == 0)
+ {
+ if (p[4] == '1' && p[5] == '6')
+ priv.orig_sizeflag &= ~DFLAG;
+ else if (p[4] == '3' && p[5] == '2')
+ priv.orig_sizeflag |= DFLAG;
+ }
+ else if (strncmp (p, "suffix", 6) == 0)
+ priv.orig_sizeflag |= SUFFIX_ALWAYS;
+
+ p = strchr (p, ',');
+ if (p != NULL)
+ p++;
+ }
+
+ if (intel_syntax)
+ {
+ names64 = intel_names64;
+ names32 = intel_names32;
+ names16 = intel_names16;
+ names8 = intel_names8;
+ names8rex = intel_names8rex;
+ names_seg = intel_names_seg;
+ index16 = intel_index16;
+ open_char = '[';
+ close_char = ']';
+ separator_char = '+';
+ scale_char = '*';
+ }
+ else
+ {
+ names64 = att_names64;
+ names32 = att_names32;
+ names16 = att_names16;
+ names8 = att_names8;
+ names8rex = att_names8rex;
+ names_seg = att_names_seg;
+ index16 = att_index16;
+ open_char = '(';
+ close_char = ')';
+ separator_char = ',';
+ scale_char = ',';
+ }
/* The output looks better if we put 7 bytes on a line, since that
puts most long word instructions on a single line. */
@@ -1927,26 +1994,26 @@ print_insn_i386 (pc, info)
the_info = info;
start_pc = pc;
- start_codep = inbuf;
- codep = inbuf;
+ start_codep = priv.the_buffer;
+ codep = priv.the_buffer;
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)
+ means we have an incomplete instruction of some sort. Just
+ print the first byte as a prefix or a .byte pseudo-op. */
+ if (codep > priv.the_buffer)
{
- name = prefix_name (inbuf[0], orig_sizeflag);
+ name = prefix_name (priv.the_buffer[0], priv.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]);
+ (unsigned int) priv.the_buffer[0]);
}
return 1;
@@ -1959,6 +2026,7 @@ print_insn_i386 (pc, info)
ckprefix ();
insn_codep = codep;
+ sizeflag = priv.orig_sizeflag;
FETCH_DATA (info, codep + 1);
two_source_ops = (*codep == 0x62) || (*codep == 0xc8);
@@ -1970,7 +2038,7 @@ print_insn_i386 (pc, info)
/* fwait not followed by floating point instruction. Print the
first prefix, which is probably fwait itself. */
- name = prefix_name (inbuf[0], orig_sizeflag);
+ name = prefix_name (priv.the_buffer[0], priv.orig_sizeflag);
if (name == NULL)
name = INTERNAL_DISASSEMBLER_ERROR;
(*info->fprintf_func) (info->stream, "%s", name);
@@ -2116,7 +2184,7 @@ print_insn_i386 (pc, info)
{
const char *name;
- name = prefix_name (inbuf[0], orig_sizeflag);
+ name = prefix_name (priv.the_buffer[0], priv.orig_sizeflag);
if (name == NULL)
name = INTERNAL_DISASSEMBLER_ERROR;
(*info->fprintf_func) (info->stream, "%s", name);
@@ -2125,7 +2193,7 @@ print_insn_i386 (pc, info)
if (rex & ~rex_used)
{
const char *name;
- name = prefix_name (rex | 0x40, orig_sizeflag);
+ name = prefix_name (rex | 0x40, priv.orig_sizeflag);
if (name == NULL)
name = INTERNAL_DISASSEMBLER_ERROR;
(*info->fprintf_func) (info->stream, "%s ", name);
@@ -2189,7 +2257,7 @@ print_insn_i386 (pc, info)
(*info->print_address_func) ((bfd_vma) (start_pc + codep - start_codep
+ op_address[op_index[i]]), info);
}
- return codep - inbuf;
+ return codep - priv.the_buffer;
}
static const char *float_mem[] = {
@@ -2548,20 +2616,14 @@ putop (template, sizeflag)
case 'A':
if (intel_syntax)
break;
- if (mod != 3
-#ifdef SUFFIX_ALWAYS
- || (sizeflag & SUFFIX_ALWAYS)
-#endif
- )
+ if (mod != 3 || (sizeflag & SUFFIX_ALWAYS))
*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)
@@ -2571,11 +2633,7 @@ putop (template, sizeflag)
case 'F':
if (intel_syntax)
break;
- if ((prefixes & PREFIX_ADDR)
-#ifdef SUFFIX_ALWAYS
- || (sizeflag & SUFFIX_ALWAYS)
-#endif
- )
+ if ((prefixes & PREFIX_ADDR) || (sizeflag & SUFFIX_ALWAYS))
{
if (sizeflag & AFLAG)
*obufp++ = 'l';
@@ -2602,10 +2660,8 @@ putop (template, sizeflag)
case 'L':
if (intel_syntax)
break;
-#ifdef SUFFIX_ALWAYS
if (sizeflag & SUFFIX_ALWAYS)
*obufp++ = 'l';
-#endif
break;
case 'N':
if ((prefixes & PREFIX_FWAIT) == 0)
@@ -2634,10 +2690,7 @@ putop (template, sizeflag)
break;
if ((prefixes & PREFIX_DATA)
|| (rex & REX_MODE64)
-#ifdef SUFFIX_ALWAYS
- || (sizeflag & SUFFIX_ALWAYS)
-#endif
- )
+ || (sizeflag & SUFFIX_ALWAYS))
{
USED_REX (REX_MODE64);
if (rex & REX_MODE64)
@@ -2665,11 +2718,7 @@ putop (template, sizeflag)
if (intel_syntax)
break;
USED_REX (REX_MODE64);
- if (mod != 3
-#ifdef SUFFIX_ALWAYS
- || (sizeflag & SUFFIX_ALWAYS)
-#endif
- )
+ if (mod != 3 || (sizeflag & SUFFIX_ALWAYS))
{
if (rex & REX_MODE64)
*obufp++ = 'q';
@@ -2718,7 +2767,6 @@ putop (template, sizeflag)
case 'S':
if (intel_syntax)
break;
-#ifdef SUFFIX_ALWAYS
if (sizeflag & SUFFIX_ALWAYS)
{
if (rex & REX_MODE64)
@@ -2732,7 +2780,6 @@ putop (template, sizeflag)
used_prefixes |= (prefixes & PREFIX_DATA);
}
}
-#endif
break;
case 'X':
if (prefixes & PREFIX_DATA)
diff --git a/contrib/binutils/opcodes/ia64-gen.c b/contrib/binutils/opcodes/ia64-gen.c
index 4b4b197..6443c7c 100644
--- a/contrib/binutils/opcodes/ia64-gen.c
+++ b/contrib/binutils/opcodes/ia64-gen.c
@@ -1,5 +1,5 @@
/* ia64-gen.c -- Generate a shrunk set of opcode tables
- Copyright 1999, 2000 Free Software Foundation, Inc.
+ Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
Written by Bob Manson, Cygnus Solutions, <manson@cygnus.com>
This file is part of GDB, GAS, and the GNU binutils.
@@ -35,10 +35,10 @@
*/
#include <stdio.h>
-#include <ctype.h>
#include "ansidecl.h"
#include "libiberty.h"
+#include "safe-ctype.h"
#include "sysdep.h"
#include "ia64-opc.h"
#include "ia64-opc-a.c"
@@ -543,7 +543,7 @@ load_insn_classes()
if (fgets (buf, sizeof(buf), fp) == NULL)
break;
- while (isspace(buf[strlen(buf)-1]))
+ while (ISSPACE (buf[strlen(buf)-1]))
buf[strlen(buf)-1] = '\0';
name = tmp = buf;
@@ -571,7 +571,7 @@ load_insn_classes()
char *subname;
int sub;
- while (*tmp && isspace(*tmp))
+ while (*tmp && ISSPACE (*tmp))
{
++tmp;
if (tmp == buf + sizeof(buf))
@@ -633,7 +633,7 @@ parse_resource_users(ref, usersp, nusersp, notesp)
int create = 0;
char *name;
- while (isspace(*tmp))
+ while (ISSPACE (*tmp))
++tmp;
name = tmp;
while (*tmp && *tmp != ',')
@@ -754,7 +754,7 @@ load_depfile (const char *filename, enum ia64_dependency_mode mode)
if (fgets (buf, sizeof(buf), fp) == NULL)
break;
- while (isspace(buf[strlen(buf)-1]))
+ while (ISSPACE (buf[strlen(buf)-1]))
buf[strlen(buf)-1] = '\0';
name = tmp = buf;
@@ -762,21 +762,21 @@ load_depfile (const char *filename, enum ia64_dependency_mode mode)
++tmp;
*tmp++ = '\0';
- while (isspace (*tmp))
+ while (ISSPACE (*tmp))
++tmp;
regp = tmp;
tmp = strchr (tmp, ';');
if (!tmp)
abort ();
*tmp++ = 0;
- while (isspace (*tmp))
+ while (ISSPACE (*tmp))
++tmp;
chkp = tmp;
tmp = strchr (tmp, ';');
if (!tmp)
abort ();
*tmp++ = 0;
- while (isspace (*tmp))
+ while (ISSPACE (*tmp))
++tmp;
semantics = parse_semantics (tmp);
extra = semantics == IA64_DVS_OTHER ? xstrdup (tmp) : NULL;
diff --git a/contrib/binutils/opcodes/ia64-opc.c b/contrib/binutils/opcodes/ia64-opc.c
index 84e3837..9726381 100644
--- a/contrib/binutils/opcodes/ia64-opc.c
+++ b/contrib/binutils/opcodes/ia64-opc.c
@@ -25,6 +25,20 @@
#include "ia64-asmtab.h"
#include "ia64-asmtab.c"
+static void get_opc_prefix PARAMS ((const char **, char *));
+static short int find_string_ent PARAMS ((const char *));
+static short int find_main_ent PARAMS ((short int));
+static short int find_completer PARAMS ((short int, short int, const char *));
+static ia64_insn apply_completer PARAMS ((ia64_insn, int));
+static int extract_op_bits PARAMS ((int, int, int));
+static int extract_op PARAMS ((int, int *, unsigned int *));
+static int opcode_verify PARAMS ((ia64_insn, int, enum ia64_insn_type));
+static int locate_opcode_ent PARAMS ((ia64_insn, enum ia64_insn_type));
+static struct ia64_opcode *make_ia64_opcode
+ PARAMS ((ia64_insn, const char *, int, int));
+static struct ia64_opcode *ia64_find_matching_opcode
+ PARAMS ((const char *, short int));
+
const struct ia64_templ_desc ia64_templ_desc[16] =
{
{ 0, { IA64_UNIT_M, IA64_UNIT_I, IA64_UNIT_I }, "MII" }, /* 0 */
@@ -149,7 +163,7 @@ find_main_ent (nameindex)
MAIN_ENT (starting from PREV_COMPLETER) that matches NAME, or
return -1 if one does not exist. */
-static short
+static short
find_completer (main_ent, prev_completer, name)
short main_ent;
short prev_completer;
@@ -312,7 +326,7 @@ opcode_verify (opcode, place, type)
{
return 0;
}
- if (main_table[place].flags
+ if (main_table[place].flags
& (IA64_OPCODE_F2_EQ_F3 | IA64_OPCODE_LEN_EQ_64MCNT))
{
const struct ia64_operand *o1, *o2;
@@ -481,7 +495,7 @@ locate_opcode_ent (opcode, type)
priority = ia64_dis_names[disent].priority;
- if (opcode_verify (opcode, place, type)
+ if (opcode_verify (opcode, place, type)
&& priority > found_priority)
{
break;
@@ -610,7 +624,7 @@ ia64_dis_opcode (insn, type)
{
abort ();
}
- return make_ia64_opcode (insn, name, place,
+ return make_ia64_opcode (insn, name, place,
completer_table[ci].dependencies);
}
}
@@ -646,7 +660,7 @@ ia64_find_matching_opcode (name, place)
short completer = -1;
do {
- if (suffix[0] == '\0')
+ if (suffix[0] == '\0')
{
completer = find_completer (place, completer, suffix);
}
diff --git a/contrib/binutils/opcodes/po/POTFILES.in b/contrib/binutils/opcodes/po/POTFILES.in
index f27d27a..e8d2ba8 100644
--- a/contrib/binutils/opcodes/po/POTFILES.in
+++ b/contrib/binutils/opcodes/po/POTFILES.in
@@ -68,11 +68,25 @@ mcore-opc.h
mips-dis.c
mips-opc.c
mips16-opc.c
+mmix-dis.c
+mmix-opc.c
ns32k-dis.c
+openrisc-asm.c
+openrisc-desc.c
+openrisc-desc.h
+openrisc-dis.c
+openrisc-ibld.c
+openrisc-opc.c
+openrisc-opc.h
+pdp11-dis.c
+pdp11-opc.c
pj-dis.c
pj-opc.c
ppc-dis.c
ppc-opc.c
+s390-dis.c
+s390-mkopc.c
+s390-opc.c
sh-dis.c
sh-opc.h
sparc-dis.c
@@ -88,6 +102,13 @@ v850-opc.c
vax-dis.c
w65-dis.c
w65-opc.h
+xstormy16-asm.c
+xstormy16-desc.c
+xstormy16-desc.h
+xstormy16-dis.c
+xstormy16-ibld.c
+xstormy16-opc.c
+xstormy16-opc.h
z8k-dis.c
z8k-opc.h
z8kgen.c
diff --git a/contrib/binutils/opcodes/po/opcodes.pot b/contrib/binutils/opcodes/po/opcodes.pot
index 3336bbd..4e079cd 100644
--- a/contrib/binutils/opcodes/po/opcodes.pot
+++ b/contrib/binutils/opcodes/po/opcodes.pot
@@ -6,13 +6,13 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2001-01-11 12:44-0800\n"
+"POT-Creation-Date: 2002-01-17 13:58+0000\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"
+"Content-Transfer-Encoding: 8bit\n"
#: alpha-opc.c:335
msgid "branch operand unaligned"
@@ -26,21 +26,21 @@ msgstr ""
msgid "Illegal limm reference in last instruction!\n"
msgstr ""
-#: arm-dis.c:489
+#: arm-dis.c:509
msgid "<illegal precision>"
msgstr ""
-#: arm-dis.c:904
+#: arm-dis.c:1019
#, c-format
msgid "Unrecognised register name set: %s\n"
msgstr ""
-#: arm-dis.c:911
+#: arm-dis.c:1026
#, c-format
msgid "Unrecognised disassembler option: %s\n"
msgstr ""
-#: arm-dis.c:1083
+#: arm-dis.c:1198
msgid ""
"\n"
"The following ARM specific disassembler options are supported for use with\n"
@@ -60,133 +60,148 @@ msgstr ""
msgid "unknown constraint `%c'"
msgstr ""
-#: cgen-asm.c:224
-msgid "unrecognized keyword/register name"
-msgstr ""
-
-#: cgen-asm.c:332 fr30-ibld.c:232 m32r-ibld.c:232
+#: cgen-asm.c:346 fr30-ibld.c:195 m32r-ibld.c:195 openrisc-ibld.c:195
#, c-format
msgid "operand out of range (%ld not between %ld and %ld)"
msgstr ""
-#: cgen-asm.c:353
+#: cgen-asm.c:367
#, c-format
msgid "operand out of range (%lu not between %lu and %lu)"
msgstr ""
-#: d30v-dis.c:306
+#: d30v-dis.c:312
#, c-format
msgid "<unknown register %d>"
msgstr ""
#. Can't happen.
-#: dis-buf.c:56
+#: dis-buf.c:57
#, c-format
msgid "Unknown error %d\n"
msgstr ""
-#: dis-buf.c:61
+#: dis-buf.c:62
#, c-format
msgid "Address 0x%x is out of bounds.\n"
msgstr ""
-#: fr30-asm.c:305 m32r-asm.c:313
+#: fr30-asm.c:324 m32r-asm.c:326 openrisc-asm.c:245
#, c-format
msgid "Unrecognized field %d while parsing.\n"
msgstr ""
+#: fr30-asm.c:374 m32r-asm.c:376 openrisc-asm.c:295
+msgid "missing mnemonic in syntax string"
+msgstr ""
+
#. We couldn't parse it.
-#: fr30-asm.c:369 fr30-asm.c:373 fr30-asm.c:449 m32r-asm.c:377 m32r-asm.c:381
-#: m32r-asm.c:457
+#: fr30-asm.c:510 fr30-asm.c:514 fr30-asm.c:601 fr30-asm.c:703 m32r-asm.c:512
+#: m32r-asm.c:516 m32r-asm.c:603 m32r-asm.c:705 openrisc-asm.c:431
+#: openrisc-asm.c:435 openrisc-asm.c:522 openrisc-asm.c:624
msgid "unrecognized instruction"
msgstr ""
-#: fr30-asm.c:415 m32r-asm.c:423
+#: fr30-asm.c:557 m32r-asm.c:559 openrisc-asm.c:478
#, c-format
msgid "syntax error (expected char `%c', found `%c')"
msgstr ""
-#: fr30-asm.c:443 m32r-asm.c:451
+#: fr30-asm.c:567 m32r-asm.c:569 openrisc-asm.c:488
+#, c-format
+msgid "syntax error (expected char `%c', found end of instruction)"
+msgstr ""
+
+#: fr30-asm.c:595 m32r-asm.c:597 openrisc-asm.c:516
msgid "junk at end of line"
msgstr ""
-#: fr30-asm.c:551 m32r-asm.c:559
+#: fr30-asm.c:702 m32r-asm.c:704 openrisc-asm.c:623
+msgid "unrecognized form of instruction"
+msgstr ""
+
+#: fr30-asm.c:714 m32r-asm.c:716 openrisc-asm.c:635
#, c-format
msgid "bad instruction `%.50s...'"
msgstr ""
-#: fr30-asm.c:554 m32r-asm.c:562
+#: fr30-asm.c:717 m32r-asm.c:719 openrisc-asm.c:638
#, c-format
msgid "bad instruction `%.50s'"
msgstr ""
#. Default text to print if an instruction isn't recognized.
-#: fr30-dis.c:39 m32r-dis.c:39
+#: fr30-dis.c:39 m32r-dis.c:39 mmix-dis.c:282 openrisc-dis.c:39
msgid "*unknown*"
msgstr ""
-#: fr30-dis.c:300 m32r-dis.c:239
+#: fr30-dis.c:319 m32r-dis.c:250 openrisc-dis.c:137
#, c-format
msgid "Unrecognized field %d while printing insn.\n"
msgstr ""
-#: fr30-ibld.c:216 m32r-ibld.c:216
+#: fr30-ibld.c:166 m32r-ibld.c:166 openrisc-ibld.c:166
+#, c-format
+msgid "operand out of range (%ld not between %ld and %lu)"
+msgstr ""
+
+#: fr30-ibld.c:179 m32r-ibld.c:179 openrisc-ibld.c:179
#, c-format
msgid "operand out of range (%lu not between 0 and %lu)"
msgstr ""
-#: fr30-ibld.c:790 m32r-ibld.c:719
+#: fr30-ibld.c:731 m32r-ibld.c:660 openrisc-ibld.c:634
#, c-format
msgid "Unrecognized field %d while building insn.\n"
msgstr ""
-#: fr30-ibld.c:994 m32r-ibld.c:849
+#: fr30-ibld.c:939 m32r-ibld.c:794 openrisc-ibld.c:737
#, c-format
msgid "Unrecognized field %d while decoding insn.\n"
msgstr ""
-#: fr30-ibld.c:1138 m32r-ibld.c:954
+#: fr30-ibld.c:1088 m32r-ibld.c:904 openrisc-ibld.c:817
#, c-format
msgid "Unrecognized field %d while getting int operand.\n"
msgstr ""
-#: fr30-ibld.c:1267 m32r-ibld.c:1044
+#: fr30-ibld.c:1217 m32r-ibld.c:994 openrisc-ibld.c:877
#, c-format
msgid "Unrecognized field %d while getting vma operand.\n"
msgstr ""
-#: fr30-ibld.c:1396 m32r-ibld.c:1137
+#: fr30-ibld.c:1351 m32r-ibld.c:1092 openrisc-ibld.c:946
#, c-format
msgid "Unrecognized field %d while setting int operand.\n"
msgstr ""
-#: fr30-ibld.c:1518 m32r-ibld.c:1223
+#: fr30-ibld.c:1473 m32r-ibld.c:1178 openrisc-ibld.c:1003
#, c-format
msgid "Unrecognized field %d while setting vma operand.\n"
msgstr ""
-#: h8300-dis.c:380
+#: h8300-dis.c:384
#, c-format
msgid "Hmmmm %x"
msgstr ""
-#: h8300-dis.c:391
+#: h8300-dis.c:395
#, c-format
msgid "Don't understand %x \n"
msgstr ""
-#: h8500-dis.c:141
+#: h8500-dis.c:143
#, c-format
msgid "can't cope with insert %d\n"
msgstr ""
#. Couldn't understand anything.
-#: h8500-dis.c:348
+#: h8500-dis.c:350
#, c-format
msgid "%02x\t\t*unknown*"
msgstr ""
-#: i386-dis.c:2740
+#: i386-dis.c:1649
msgid "<internal disassembler error>"
msgstr ""
@@ -205,90 +220,126 @@ msgstr ""
msgid "unknown\t0x%04x"
msgstr ""
-#: m68k-dis.c:412
+#: m68k-dis.c:429
#, c-format
msgid "<internal error in opcode table: %s %s>\n"
msgstr ""
-#: m68k-dis.c:990
+#: m68k-dis.c:1007
#, c-format
msgid "<function code %d>"
msgstr ""
-#: m88k-dis.c:274
+#: m88k-dis.c:255
#, c-format
msgid "# <dis error: %08x>"
msgstr ""
-#: mips-dis.c:273
+#: mips-dis.c:290
#, c-format
msgid "# internal error, undefined modifier(%c)"
msgstr ""
+#: mips-dis.c:1154
+#, c-format
+msgid "# internal disassembler error, unrecognised modifier (%c)"
+msgstr ""
+
+#: mmix-dis.c:34
+#, c-format
+msgid "Bad case %d (%s) in %s:%d\n"
+msgstr ""
+
+#: mmix-dis.c:44
+#, c-format
+msgid "Internal: Non-debugged code (test-case missing): %s:%d"
+msgstr ""
+
+#: mmix-dis.c:53
+msgid "(unknown)"
+msgstr ""
+
+#: mmix-dis.c:517
+#, c-format
+msgid "*unknown operands type: %d*"
+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
+#: ns32k-dis.c:628
msgid "$<undefined>"
msgstr ""
-#: ppc-opc.c:619 ppc-opc.c:650
+#: ppc-opc.c:765 ppc-opc.c:798
msgid "invalid conditional option"
msgstr ""
-#: ppc-opc.c:652
+#: ppc-opc.c:800
msgid "attempt to set y bit when using + or - modifier"
msgstr ""
-#: ppc-opc.c:707
+#: ppc-opc.c:832 ppc-opc.c:884
+msgid "offset not a multiple of 4"
+msgstr ""
+
+#: ppc-opc.c:857
+msgid "offset not between -2048 and 2047"
+msgstr ""
+
+#: ppc-opc.c:882
+msgid "offset not between -8192 and 8191"
+msgstr ""
+
+#: ppc-opc.c:910
msgid "ignoring least significant bits in branch offset"
msgstr ""
-#: ppc-opc.c:742 ppc-opc.c:779
+#: ppc-opc.c:944 ppc-opc.c:981
msgid "illegal bitmask"
msgstr ""
-#: ppc-opc.c:848
+#: ppc-opc.c:1054
msgid "value out of range"
msgstr ""
-#: ppc-opc.c:922
+#: ppc-opc.c:1130
msgid "index register in load range"
msgstr ""
-#: ppc-opc.c:937
+#: ppc-opc.c:1146
msgid "invalid register operand when updating"
msgstr ""
#. Mark as non-valid instruction
-#: sparc-dis.c:748
+#: sparc-dis.c:749
msgid "unknown"
msgstr ""
-#: sparc-dis.c:823
+#: sparc-dis.c:824
#, c-format
msgid "Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
msgstr ""
-#: sparc-dis.c:834
+#: sparc-dis.c:835
#, c-format
msgid "Internal error: bad sparc-opcode.h: \"%s\", %#.8lx, %#.8lx\n"
msgstr ""
-#: sparc-dis.c:883
+#: sparc-dis.c:884
#, c-format
msgid "Internal error: bad sparc-opcode.h: \"%s\" == \"%s\"\n"
msgstr ""
-#: v850-dis.c:221
+#: v850-dis.c:224
#, c-format
msgid "unknown operand shift: %x\n"
msgstr ""
-#: v850-dis.c:233
+#: v850-dis.c:236
#, c-format
msgid "unknown pop reg: %d\n"
msgstr ""
@@ -298,46 +349,46 @@ msgstr ""
#. 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
+#: v850-opc.c:68
msgid "displacement value is not in range and is not aligned"
msgstr ""
-#: v850-opc.c:47
+#: v850-opc.c:69
msgid "displacement value is out of range"
msgstr ""
-#: v850-opc.c:48
+#: v850-opc.c:70
msgid "displacement value is not aligned"
msgstr ""
-#: v850-opc.c:50
+#: v850-opc.c:72
msgid "immediate value is out of range"
msgstr ""
-#: v850-opc.c:61
+#: v850-opc.c:83
msgid "branch value not in range and to odd offset"
msgstr ""
-#: v850-opc.c:63 v850-opc.c:95
+#: v850-opc.c:85 v850-opc.c:117
msgid "branch value out of range"
msgstr ""
-#: v850-opc.c:66 v850-opc.c:98
+#: v850-opc.c:88 v850-opc.c:120
msgid "branch to odd offset"
msgstr ""
-#: v850-opc.c:93
+#: v850-opc.c:115
msgid "branch value not in range and to an odd offset"
msgstr ""
-#: v850-opc.c:321
+#: v850-opc.c:346
msgid "invalid register for stack adjustment"
msgstr ""
-#: v850-opc.c:343
+#: v850-opc.c:370
msgid "immediate value not in range and not even"
msgstr ""
-#: v850-opc.c:348
+#: v850-opc.c:375
msgid "immediate value must be even"
msgstr ""
diff --git a/contrib/binutils/opcodes/ppc-dis.c b/contrib/binutils/opcodes/ppc-dis.c
index c59a920..5d654c0 100644
--- a/contrib/binutils/opcodes/ppc-dis.c
+++ b/contrib/binutils/opcodes/ppc-dis.c
@@ -32,32 +32,58 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
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
- and the Altivec vector unit. */
+static int powerpc_dialect PARAMS ((struct disassemble_info *));
+
+/* Determine which set of machines to disassemble for. PPC403/601 or
+ Motorola BookE. For convenience, also disassemble instructions
+ supported by the AltiVec vector unit. */
+
+int
+powerpc_dialect(info)
+ struct disassemble_info *info;
+{
+ int dialect = PPC_OPCODE_PPC | PPC_OPCODE_ALTIVEC;
+
+ if (BFD_DEFAULT_TARGET_SIZE == 64)
+ dialect |= PPC_OPCODE_64;
+
+ if (info->disassembler_options
+ && (strcmp (info->disassembler_options, "booke") == 0
+ || strcmp (info->disassembler_options, "booke32") == 0
+ || strcmp (info->disassembler_options, "booke64") == 0))
+ dialect |= PPC_OPCODE_BOOKE | PPC_OPCODE_BOOKE64;
+ else
+ dialect |= PPC_OPCODE_403 | PPC_OPCODE_601;
+
+ if (info->disassembler_options)
+ {
+ if (strstr (info->disassembler_options, "32") != NULL)
+ dialect &= ~PPC_OPCODE_64;
+ else if (strstr (info->disassembler_options, "64") != NULL)
+ dialect |= PPC_OPCODE_64;
+ }
+
+ return dialect;
+}
+
+/* Print a big endian PowerPC instruction. */
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 |
- PPC_OPCODE_ALTIVEC);
+ return print_insn_powerpc (memaddr, info, 1, powerpc_dialect(info));
}
-/* Print a little endian PowerPC instruction. For convenience, also
- disassemble instructions supported by the Motorola PowerPC 601
- and the Altivec vector unit. */
+/* Print a little endian PowerPC instruction. */
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 |
- PPC_OPCODE_ALTIVEC);
+ return print_insn_powerpc (memaddr, info, 0, powerpc_dialect(info));
}
/* Print a POWER (RS/6000) instruction. */
@@ -131,7 +157,7 @@ print_insn_powerpc (memaddr, info, bigendian, dialect)
{
operand = powerpc_operands + *opindex;
if (operand->extract)
- (*operand->extract) (insn, &invalid);
+ (*operand->extract) (insn, dialect, &invalid);
}
if (invalid)
continue;
@@ -158,7 +184,7 @@ print_insn_powerpc (memaddr, info, bigendian, dialect)
/* Extract the value from the instruction. */
if (operand->extract)
- value = (*operand->extract) (insn, (int *) NULL);
+ value = (*operand->extract) (insn, dialect, (int *) NULL);
else
{
value = (insn >> operand->shift) & ((1 << operand->bits) - 1);
diff --git a/contrib/binutils/opcodes/ppc-opc.c b/contrib/binutils/opcodes/ppc-opc.c
index 311a5ba..0d96e03 100644
--- a/contrib/binutils/opcodes/ppc-opc.c
+++ b/contrib/binutils/opcodes/ppc-opc.c
@@ -1,5 +1,5 @@
/* ppc-opc.c -- PowerPC opcode list
- Copyright 1994, 1995, 1996, 1997, 1998, 2000
+ Copyright 1994, 1995, 1996, 1997, 1998, 2000, 2001
Free Software Foundation, Inc.
Written by Ian Lance Taylor, Cygnus Support
@@ -38,44 +38,90 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
/* 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 *));
+static unsigned long insert_bat
+ PARAMS ((unsigned long, long, int, const char **));
+static long extract_bat
+ PARAMS ((unsigned long, int, int *));
+static unsigned long insert_bba
+ PARAMS ((unsigned long, long, int, const char **));
+static long extract_bba
+ PARAMS ((unsigned long, int, int *));
+static unsigned long insert_bd
+ PARAMS ((unsigned long, long, int, const char **));
+static long extract_bd
+ PARAMS ((unsigned long, int, int *));
+static unsigned long insert_bdm
+ PARAMS ((unsigned long, long, int, const char **));
+static long extract_bdm
+ PARAMS ((unsigned long, int, int *));
+static unsigned long insert_bdp
+ PARAMS ((unsigned long, long, int, const char **));
+static long extract_bdp
+ PARAMS ((unsigned long, int, int *));
+static int valid_bo
+ PARAMS ((long, int));
+static unsigned long insert_bo
+ PARAMS ((unsigned long, long, int, const char **));
+static long extract_bo
+ PARAMS ((unsigned long, int, int *));
+static unsigned long insert_boe
+ PARAMS ((unsigned long, long, int, const char **));
+static long extract_boe
+ PARAMS ((unsigned long, int, int *));
+static unsigned long insert_ds
+ PARAMS ((unsigned long, long, int, const char **));
+static long extract_ds
+ PARAMS ((unsigned long, int, int *));
+static unsigned long insert_de
+ PARAMS ((unsigned long, long, int, const char **));
+static long extract_de
+ PARAMS ((unsigned long, int, int *));
+static unsigned long insert_des
+ PARAMS ((unsigned long, long, int, const char **));
+static long extract_des
+ PARAMS ((unsigned long, int, int *));
+static unsigned long insert_li
+ PARAMS ((unsigned long, long, int, const char **));
+static long extract_li
+ PARAMS ((unsigned long, int, int *));
+static unsigned long insert_mbe
+ PARAMS ((unsigned long, long, int, const char **));
+static long extract_mbe
+ PARAMS ((unsigned long, int, int *));
+static unsigned long insert_mb6
+ PARAMS ((unsigned long, long, int, const char **));
+static long extract_mb6
+ PARAMS ((unsigned long, int, int *));
+static unsigned long insert_nb
+ PARAMS ((unsigned long, long, int, const char **));
+static long extract_nb
+ PARAMS ((unsigned long, int, int *));
+static unsigned long insert_nsi
+ PARAMS ((unsigned long, long, int, const char **));
+static long extract_nsi
+ PARAMS ((unsigned long, int, int *));
+static unsigned long insert_ral
+ PARAMS ((unsigned long, long, int, const char **));
+static unsigned long insert_ram
+ PARAMS ((unsigned long, long, int, const char **));
+static unsigned long insert_ras
+ PARAMS ((unsigned long, long, int, const char **));
+static unsigned long insert_rbs
+ PARAMS ((unsigned long, long, int, const char **));
+static long extract_rbs
+ PARAMS ((unsigned long, int, int *));
+static unsigned long insert_sh6
+ PARAMS ((unsigned long, long, int, const char **));
+static long extract_sh6
+ PARAMS ((unsigned long, int, int *));
+static unsigned long insert_spr
+ PARAMS ((unsigned long, long, int, const char **));
+static long extract_spr
+ PARAMS ((unsigned long, int, int *));
+static unsigned long insert_tbr
+ PARAMS ((unsigned long, long, int, const char **));
+static long extract_tbr
+ PARAMS ((unsigned long, int, int *));
/* The operands table.
@@ -189,16 +235,31 @@ const struct powerpc_operand powerpc_operands[] =
#define CR BT + 1
{ 3, 18, 0, 0, PPC_OPERAND_CR | PPC_OPERAND_OPTIONAL },
+ /* The CT field in an X form instruction. */
+#define CT CR + 1
+ { 5, 21, 0, 0, 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
+#define D CT + 1
{ 16, 0, 0, 0, PPC_OPERAND_PARENS | PPC_OPERAND_SIGNED },
+ /* The DE field in a DE form instruction. This is like D, but is 12
+ bits only. */
+#define DE D + 1
+ { 14, 0, insert_de, extract_de, PPC_OPERAND_PARENS },
+
+ /* The DES field in a DES form instruction. This is like DS, but is 14
+ bits only (12 stored.) */
+#define DES DE + 1
+ { 14, 0, insert_des, extract_des, 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 },
+#define DS DES + 1
+ { 16, 0, insert_ds, extract_ds,
+ PPC_OPERAND_PARENS | PPC_OPERAND_SIGNED | PPC_OPERAND_DS },
/* The E field in a wrteei instruction. */
#define E DS + 1
@@ -260,8 +321,12 @@ const struct powerpc_operand powerpc_operands[] =
#define LIA LI + 1
{ 26, 0, insert_li, extract_li, PPC_OPERAND_ABSOLUTE | PPC_OPERAND_SIGNED },
+ /* The LS field in an X (sync) form instruction. */
+#define LS LIA + 1
+ { 2, 21, 0, 0, PPC_OPERAND_OPTIONAL },
+
/* The MB field in an M form instruction. */
-#define MB LIA + 1
+#define MB LS + 1
#define MB_MASK (0x1f << 6)
{ 5, 6, 0, 0, 0 },
@@ -285,9 +350,13 @@ const struct powerpc_operand powerpc_operands[] =
#define MB6_MASK (0x3f << 5)
{ 6, 5, insert_mb6, extract_mb6, 0 },
+ /* The MO field in an mbar instruction. */
+#define MO MB6 + 1
+ { 5, 21, 0, 0, 0 },
+
/* The NB field in an X form instruction. The value 32 is stored as
0. */
-#define NB MB6 + 1
+#define NB MO + 1
{ 6, 11, insert_nb, extract_nb, 0 },
/* The NSI field in a D form instruction. This is the same as the
@@ -376,8 +445,13 @@ const struct powerpc_operand powerpc_operands[] =
#define SR SPRG + 1
{ 4, 16, 0, 0, 0 },
+ /* The STRM field in an X AltiVec form instruction. */
+#define STRM SR + 1
+#define STRM_MASK (0x3 << 21)
+ { 2, 21, 0, 0, 0 },
+
/* The SV field in a POWER SC form instruction. */
-#define SV SR + 1
+#define SV STRM + 1
{ 14, 2, 0, 0, 0 },
/* The TBR field in an XFX form instruction. This is like the SPR
@@ -401,23 +475,23 @@ const struct powerpc_operand powerpc_operands[] =
/* The VA field in a VA, VX or VXR form instruction. */
#define VA UI + 1
#define VA_MASK (0x1f << 16)
- {5, 16, 0, 0, PPC_OPERAND_VR},
+ { 5, 16, 0, 0, PPC_OPERAND_VR },
/* The VB field in a VA, VX or VXR form instruction. */
#define VB VA + 1
#define VB_MASK (0x1f << 11)
- {5, 11, 0, 0, PPC_OPERAND_VR},
+ { 5, 11, 0, 0, PPC_OPERAND_VR },
/* The VC field in a VA form instruction. */
#define VC VB + 1
#define VC_MASK (0x1f << 6)
- {5, 6, 0, 0, PPC_OPERAND_VR},
+ { 5, 6, 0, 0, PPC_OPERAND_VR },
/* The VD or VS field in a VA, VX, VXR or X form instruction. */
#define VD VC + 1
#define VS VD
#define VD_MASK (0x1f << 21)
- {5, 21, 0, 0, PPC_OPERAND_VR},
+ { 5, 21, 0, 0, PPC_OPERAND_VR },
/* The SIMM field in a VX form instruction. */
#define SIMM VD + 1
@@ -442,17 +516,19 @@ const struct powerpc_operand powerpc_operands[] =
/*ARGSUSED*/
static unsigned long
-insert_bat (insn, value, errmsg)
+insert_bat (insn, value, dialect, errmsg)
unsigned long insn;
long value ATTRIBUTE_UNUSED;
+ int dialect ATTRIBUTE_UNUSED;
const char **errmsg ATTRIBUTE_UNUSED;
{
return insn | (((insn >> 21) & 0x1f) << 16);
}
static long
-extract_bat (insn, invalid)
+extract_bat (insn, dialect, invalid)
unsigned long insn;
+ int dialect ATTRIBUTE_UNUSED;
int *invalid;
{
if (invalid != (int *) NULL
@@ -469,17 +545,19 @@ extract_bat (insn, invalid)
/*ARGSUSED*/
static unsigned long
-insert_bba (insn, value, errmsg)
+insert_bba (insn, value, dialect, errmsg)
unsigned long insn;
long value ATTRIBUTE_UNUSED;
+ int dialect ATTRIBUTE_UNUSED;
const char **errmsg ATTRIBUTE_UNUSED;
{
return insn | (((insn >> 16) & 0x1f) << 11);
}
static long
-extract_bba (insn, invalid)
+extract_bba (insn, dialect, invalid)
unsigned long insn;
+ int dialect ATTRIBUTE_UNUSED;
int *invalid;
{
if (invalid != (int *) NULL
@@ -493,9 +571,10 @@ extract_bba (insn, invalid)
/*ARGSUSED*/
static unsigned long
-insert_bd (insn, value, errmsg)
+insert_bd (insn, value, dialect, errmsg)
unsigned long insn;
long value;
+ int dialect ATTRIBUTE_UNUSED;
const char **errmsg ATTRIBUTE_UNUSED;
{
return insn | (value & 0xfffc);
@@ -503,48 +582,69 @@ insert_bd (insn, value, errmsg)
/*ARGSUSED*/
static long
-extract_bd (insn, invalid)
+extract_bd (insn, dialect, invalid)
unsigned long insn;
+ int dialect ATTRIBUTE_UNUSED;
int *invalid ATTRIBUTE_UNUSED;
{
- if ((insn & 0x8000) != 0)
- return (insn & 0xfffc) - 0x10000;
- else
- return insn & 0xfffc;
+ return ((insn & 0xfffc) ^ 0x8000) - 0x8000;
}
/* 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. */
+ For 32 bit targets we 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.
+ 64 bit targets use two bits, "a", and "t", instead of the "y" bit.
+ at == 10 => not taken, at == 11 => taken. The t bit is 00001 in
+ BO field, the a bit is 00010 for branch on CR(BI) and 01000 for
+ branch on CTR. */
/*ARGSUSED*/
static unsigned long
-insert_bdm (insn, value, errmsg)
+insert_bdm (insn, value, dialect, errmsg)
unsigned long insn;
long value;
+ int dialect;
const char **errmsg ATTRIBUTE_UNUSED;
{
- if ((value & 0x8000) != 0)
- insn |= 1 << 21;
+ if ((dialect & (PPC_OPCODE_BOOKE | PPC_OPCODE_64)) != PPC_OPCODE_64)
+ {
+ if ((value & 0x8000) != 0)
+ insn |= 1 << 21;
+ }
+ else
+ {
+ if ((insn & (0x14 << 21)) == (0x04 << 21))
+ insn |= 0x02 << 21;
+ else if ((insn & (0x14 << 21)) == (0x10 << 21))
+ insn |= 0x08 << 21;
+ }
return insn | (value & 0xfffc);
}
static long
-extract_bdm (insn, invalid)
+extract_bdm (insn, dialect, invalid)
unsigned long insn;
+ int dialect;
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;
+ if (invalid != (int *) NULL)
+ {
+ if ((dialect & (PPC_OPCODE_BOOKE | PPC_OPCODE_64)) != PPC_OPCODE_64)
+ {
+ if (((insn & (1 << 21)) == 0) != ((insn & (1 << 15)) == 0))
+ *invalid = 1;
+ }
+ else
+ {
+ if ((insn & (0x17 << 21)) != (0x06 << 21)
+ && (insn & (0x1d << 21)) != (0x18 << 21))
+ *invalid = 1;
+ }
+ }
+ return ((insn & 0xfffc) ^ 0x8000) - 0x8000;
}
/* The BD field in a B form instruction when the + modifier is used.
@@ -553,56 +653,100 @@ extract_bdm (insn, invalid)
/*ARGSUSED*/
static unsigned long
-insert_bdp (insn, value, errmsg)
+insert_bdp (insn, value, dialect, errmsg)
unsigned long insn;
long value;
+ int dialect;
const char **errmsg ATTRIBUTE_UNUSED;
{
- if ((value & 0x8000) == 0)
- insn |= 1 << 21;
+ if ((dialect & (PPC_OPCODE_BOOKE | PPC_OPCODE_64)) != PPC_OPCODE_64)
+ {
+ if ((value & 0x8000) == 0)
+ insn |= 1 << 21;
+ }
+ else
+ {
+ if ((insn & (0x14 << 21)) == (0x04 << 21))
+ insn |= 0x03 << 21;
+ else if ((insn & (0x14 << 21)) == (0x10 << 21))
+ insn |= 0x09 << 21;
+ }
return insn | (value & 0xfffc);
}
static long
-extract_bdp (insn, invalid)
+extract_bdp (insn, dialect, invalid)
unsigned long insn;
+ int dialect;
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;
+ if (invalid != (int *) NULL)
+ {
+ if ((dialect & (PPC_OPCODE_BOOKE | PPC_OPCODE_64)) != PPC_OPCODE_64)
+ {
+ if (((insn & (1 << 21)) == 0) == ((insn & (1 << 15)) == 0))
+ *invalid = 1;
+ }
+ else
+ {
+ if ((insn & (0x17 << 21)) != (0x07 << 21)
+ && (insn & (0x1d << 21)) != (0x19 << 21))
+ *invalid = 1;
+ }
+ }
+ return ((insn & 0xfffc) ^ 0x8000) - 0x8000;
}
/* Check for legal values of a BO field. */
static int
-valid_bo (value)
+valid_bo (value, dialect)
long value;
+ int dialect;
{
- /* 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)
+ if ((dialect & (PPC_OPCODE_BOOKE | PPC_OPCODE_64)) != PPC_OPCODE_64)
+ {
+ /* 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;
+ }
+ }
+ else
{
- default:
- case 0:
- return 1;
- case 0x4:
- return (value & 0x2) == 0;
- case 0x10:
- return (value & 0x8) == 0;
- case 0x14:
- return value == 0x14;
+ /* Certain encodings have bits that are required to be zero.
+ These are (z must be zero, a & t may be anything):
+ 0000z
+ 0001z
+ 0100z
+ 0101z
+ 001at
+ 011at
+ 1a00t
+ 1a01t
+ 1z1zz
+ */
+ if ((value & 0x14) == 0)
+ return (value & 0x1) == 0;
+ else if ((value & 0x14) == 0x14)
+ return value == 0x14;
+ else
+ return 1;
}
}
@@ -610,27 +754,29 @@ valid_bo (value)
the field to an illegal value. */
static unsigned long
-insert_bo (insn, value, errmsg)
+insert_bo (insn, value, dialect, errmsg)
unsigned long insn;
long value;
+ int dialect;
const char **errmsg;
{
if (errmsg != (const char **) NULL
- && ! valid_bo (value))
+ && ! valid_bo (value, dialect))
*errmsg = _("invalid conditional option");
return insn | ((value & 0x1f) << 21);
}
static long
-extract_bo (insn, invalid)
+extract_bo (insn, dialect, invalid)
unsigned long insn;
+ int dialect;
int *invalid;
{
long value;
value = (insn >> 21) & 0x1f;
if (invalid != (int *) NULL
- && ! valid_bo (value))
+ && ! valid_bo (value, dialect))
*invalid = 1;
return value;
}
@@ -640,14 +786,15 @@ extract_bo (insn, invalid)
extracting it, we force it to be even. */
static unsigned long
-insert_boe (insn, value, errmsg)
+insert_boe (insn, value, dialect, errmsg)
unsigned long insn;
long value;
+ int dialect;
const char **errmsg;
{
if (errmsg != (const char **) NULL)
{
- if (! valid_bo (value))
+ if (! valid_bo (value, dialect))
*errmsg = _("invalid conditional option");
else if ((value & 1) != 0)
*errmsg = _("attempt to set y bit when using + or - modifier");
@@ -656,15 +803,16 @@ insert_boe (insn, value, errmsg)
}
static long
-extract_boe (insn, invalid)
+extract_boe (insn, dialect, invalid)
unsigned long insn;
+ int dialect;
int *invalid;
{
long value;
value = (insn >> 21) & 0x1f;
if (invalid != (int *) NULL
- && ! valid_bo (value))
+ && ! valid_bo (value, dialect))
*invalid = 1;
return value & 0x1e;
}
@@ -674,24 +822,77 @@ extract_boe (insn, invalid)
/*ARGSUSED*/
static unsigned long
-insert_ds (insn, value, errmsg)
+insert_ds (insn, value, dialect, errmsg)
unsigned long insn;
long value;
- const char **errmsg ATTRIBUTE_UNUSED;
+ int dialect ATTRIBUTE_UNUSED;
+ const char **errmsg;
{
+ if ((value & 3) != 0 && errmsg != NULL)
+ *errmsg = _("offset not a multiple of 4");
return insn | (value & 0xfffc);
}
/*ARGSUSED*/
static long
-extract_ds (insn, invalid)
+extract_ds (insn, dialect, invalid)
unsigned long insn;
+ int dialect ATTRIBUTE_UNUSED;
int *invalid ATTRIBUTE_UNUSED;
{
- if ((insn & 0x8000) != 0)
- return (insn & 0xfffc) - 0x10000;
- else
- return insn & 0xfffc;
+ return ((insn & 0xfffc) ^ 0x8000) - 0x8000;
+}
+
+/* The DE field in a DE form instruction. */
+
+/*ARGSUSED*/
+static unsigned long
+insert_de (insn, value, dialect, errmsg)
+ unsigned long insn;
+ long value;
+ int dialect ATTRIBUTE_UNUSED;
+ const char **errmsg;
+{
+ if ((value > 2047 || value < -2048) && errmsg != NULL)
+ *errmsg = _("offset not between -2048 and 2047");
+ return insn | ((value << 4) & 0xfff0);
+}
+
+/*ARGSUSED*/
+static long
+extract_de (insn, dialect, invalid)
+ unsigned long insn;
+ int dialect ATTRIBUTE_UNUSED;
+ int *invalid ATTRIBUTE_UNUSED;
+{
+ return (insn & 0xfff0) >> 4;
+}
+
+/* The DES field in a DES form instruction. */
+
+/*ARGSUSED*/
+static unsigned long
+insert_des (insn, value, dialect, errmsg)
+ unsigned long insn;
+ long value;
+ int dialect ATTRIBUTE_UNUSED;
+ const char **errmsg;
+{
+ if ((value > 8191 || value < -8192) && errmsg != NULL)
+ *errmsg = _("offset not between -8192 and 8191");
+ else if ((value & 3) != 0 && errmsg != NULL)
+ *errmsg = _("offset not a multiple of 4");
+ return insn | ((value << 2) & 0xfff0);
+}
+
+/*ARGSUSED*/
+static long
+extract_des (insn, dialect, invalid)
+ unsigned long insn;
+ int dialect ATTRIBUTE_UNUSED;
+ int *invalid ATTRIBUTE_UNUSED;
+{
+ return (((insn >> 2) & 0x3ffc) ^ 0x2000) - 0x2000;
}
/* The LI field in an I form instruction. The lower two bits are
@@ -699,9 +900,10 @@ extract_ds (insn, invalid)
/*ARGSUSED*/
static unsigned long
-insert_li (insn, value, errmsg)
+insert_li (insn, value, dialect, errmsg)
unsigned long insn;
long value;
+ int dialect ATTRIBUTE_UNUSED;
const char **errmsg;
{
if ((value & 3) != 0 && errmsg != (const char **) NULL)
@@ -711,14 +913,12 @@ insert_li (insn, value, errmsg)
/*ARGSUSED*/
static long
-extract_li (insn, invalid)
+extract_li (insn, dialect, invalid)
unsigned long insn;
+ int dialect ATTRIBUTE_UNUSED;
int *invalid ATTRIBUTE_UNUSED;
{
- if ((insn & 0x2000000) != 0)
- return (insn & 0x3fffffc) - 0x4000000;
- else
- return insn & 0x3fffffc;
+ return ((insn & 0x3fffffc) ^ 0x2000000) - 0x2000000;
}
/* The MB and ME fields in an M form instruction expressed as a single
@@ -727,9 +927,10 @@ extract_li (insn, invalid)
instruction which uses a field of this type. */
static unsigned long
-insert_mbe (insn, value, errmsg)
+insert_mbe (insn, value, dialect, errmsg)
unsigned long insn;
long value;
+ int dialect ATTRIBUTE_UNUSED;
const char **errmsg;
{
unsigned long uval, mask;
@@ -784,8 +985,9 @@ insert_mbe (insn, value, errmsg)
}
static long
-extract_mbe (insn, invalid)
+extract_mbe (insn, dialect, invalid)
unsigned long insn;
+ int dialect ATTRIBUTE_UNUSED;
int *invalid;
{
long ret;
@@ -819,9 +1021,10 @@ extract_mbe (insn, invalid)
/*ARGSUSED*/
static unsigned long
-insert_mb6 (insn, value, errmsg)
+insert_mb6 (insn, value, dialect, errmsg)
unsigned long insn;
long value;
+ int dialect ATTRIBUTE_UNUSED;
const char **errmsg ATTRIBUTE_UNUSED;
{
return insn | ((value & 0x1f) << 6) | (value & 0x20);
@@ -829,8 +1032,9 @@ insert_mb6 (insn, value, errmsg)
/*ARGSUSED*/
static long
-extract_mb6 (insn, invalid)
+extract_mb6 (insn, dialect, invalid)
unsigned long insn;
+ int dialect ATTRIBUTE_UNUSED;
int *invalid ATTRIBUTE_UNUSED;
{
return ((insn >> 6) & 0x1f) | (insn & 0x20);
@@ -840,9 +1044,10 @@ extract_mb6 (insn, invalid)
0. */
static unsigned long
-insert_nb (insn, value, errmsg)
+insert_nb (insn, value, dialect, errmsg)
unsigned long insn;
long value;
+ int dialect ATTRIBUTE_UNUSED;
const char **errmsg;
{
if (value < 0 || value > 32)
@@ -854,8 +1059,9 @@ insert_nb (insn, value, errmsg)
/*ARGSUSED*/
static long
-extract_nb (insn, invalid)
+extract_nb (insn, dialect, invalid)
unsigned long insn;
+ int dialect ATTRIBUTE_UNUSED;
int *invalid ATTRIBUTE_UNUSED;
{
long ret;
@@ -873,25 +1079,24 @@ extract_nb (insn, invalid)
/*ARGSUSED*/
static unsigned long
-insert_nsi (insn, value, errmsg)
+insert_nsi (insn, value, dialect, errmsg)
unsigned long insn;
long value;
+ int dialect ATTRIBUTE_UNUSED;
const char **errmsg ATTRIBUTE_UNUSED;
{
return insn | ((- value) & 0xffff);
}
static long
-extract_nsi (insn, invalid)
+extract_nsi (insn, dialect, invalid)
unsigned long insn;
+ int dialect ATTRIBUTE_UNUSED;
int *invalid;
{
if (invalid != (int *) NULL)
*invalid = 1;
- if ((insn & 0x8000) != 0)
- return - ((long)(insn & 0xffff) - 0x10000);
- else
- return - (long)(insn & 0xffff);
+ return - (((insn & 0xffff) ^ 0x8000) - 0x8000);
}
/* The RA field in a D or X form instruction which is an updating
@@ -899,9 +1104,10 @@ extract_nsi (insn, invalid)
equal the RT field. */
static unsigned long
-insert_ral (insn, value, errmsg)
+insert_ral (insn, value, dialect, errmsg)
unsigned long insn;
long value;
+ int dialect ATTRIBUTE_UNUSED;
const char **errmsg;
{
if (value == 0
@@ -914,9 +1120,10 @@ insert_ral (insn, value, errmsg)
restrictions. */
static unsigned long
-insert_ram (insn, value, errmsg)
+insert_ram (insn, value, dialect, errmsg)
unsigned long insn;
long value;
+ int dialect ATTRIBUTE_UNUSED;
const char **errmsg;
{
if ((unsigned long) value >= ((insn >> 21) & 0x1f))
@@ -929,9 +1136,10 @@ insert_ram (insn, value, errmsg)
field may not be zero. */
static unsigned long
-insert_ras (insn, value, errmsg)
+insert_ras (insn, value, dialect, errmsg)
unsigned long insn;
long value;
+ int dialect ATTRIBUTE_UNUSED;
const char **errmsg;
{
if (value == 0)
@@ -947,17 +1155,19 @@ insert_ras (insn, value, errmsg)
/*ARGSUSED*/
static unsigned long
-insert_rbs (insn, value, errmsg)
+insert_rbs (insn, value, dialect, errmsg)
unsigned long insn;
long value ATTRIBUTE_UNUSED;
+ int dialect ATTRIBUTE_UNUSED;
const char **errmsg ATTRIBUTE_UNUSED;
{
return insn | (((insn >> 21) & 0x1f) << 11);
}
static long
-extract_rbs (insn, invalid)
+extract_rbs (insn, dialect, invalid)
unsigned long insn;
+ int dialect ATTRIBUTE_UNUSED;
int *invalid;
{
if (invalid != (int *) NULL
@@ -970,9 +1180,10 @@ extract_rbs (insn, invalid)
/*ARGSUSED*/
static unsigned long
-insert_sh6 (insn, value, errmsg)
+insert_sh6 (insn, value, dialect, errmsg)
unsigned long insn;
long value;
+ int dialect ATTRIBUTE_UNUSED;
const char **errmsg ATTRIBUTE_UNUSED;
{
return insn | ((value & 0x1f) << 11) | ((value & 0x20) >> 4);
@@ -980,8 +1191,9 @@ insert_sh6 (insn, value, errmsg)
/*ARGSUSED*/
static long
-extract_sh6 (insn, invalid)
+extract_sh6 (insn, dialect, invalid)
unsigned long insn;
+ int dialect ATTRIBUTE_UNUSED;
int *invalid ATTRIBUTE_UNUSED;
{
return ((insn >> 11) & 0x1f) | ((insn << 4) & 0x20);
@@ -991,17 +1203,19 @@ extract_sh6 (insn, invalid)
lower 5 bits are stored in the upper 5 and vice- versa. */
static unsigned long
-insert_spr (insn, value, errmsg)
+insert_spr (insn, value, dialect, errmsg)
unsigned long insn;
long value;
+ int dialect ATTRIBUTE_UNUSED;
const char **errmsg ATTRIBUTE_UNUSED;
{
return insn | ((value & 0x1f) << 16) | ((value & 0x3e0) << 6);
}
static long
-extract_spr (insn, invalid)
+extract_spr (insn, dialect, invalid)
unsigned long insn;
+ int dialect ATTRIBUTE_UNUSED;
int *invalid ATTRIBUTE_UNUSED;
{
return ((insn >> 16) & 0x1f) | ((insn >> 6) & 0x3e0);
@@ -1018,9 +1232,10 @@ extract_spr (insn, invalid)
#define TB (268)
static unsigned long
-insert_tbr (insn, value, errmsg)
+insert_tbr (insn, value, dialect, errmsg)
unsigned long insn;
long value;
+ int dialect ATTRIBUTE_UNUSED;
const char **errmsg ATTRIBUTE_UNUSED;
{
if (value == 0)
@@ -1029,8 +1244,9 @@ insert_tbr (insn, value, errmsg)
}
static long
-extract_tbr (insn, invalid)
+extract_tbr (insn, dialect, invalid)
unsigned long insn;
+ int dialect ATTRIBUTE_UNUSED;
int *invalid ATTRIBUTE_UNUSED;
{
long ret;
@@ -1082,9 +1298,12 @@ extract_tbr (insn, invalid)
/* 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)
+ bit. Similarly for the 'at' bits used for 64 bit branch hints. */
+#define Y_MASK (((unsigned long) 1) << 21)
+#define AT1_MASK (((unsigned long) 3) << 21)
+#define AT2_MASK (((unsigned long) 9) << 21)
+#define BBOY_MASK (BBO_MASK &~ Y_MASK)
+#define BBOAT_MASK (BBO_MASK &~ AT1_MASK)
/* A B form instruction setting the BO field and the condition bits of
the BI field. */
@@ -1094,9 +1313,12 @@ extract_tbr (insn, invalid)
/* A BBOCB_MASK with the y bit of the BO field removed. */
#define BBOYCB_MASK (BBOCB_MASK &~ Y_MASK)
+#define BBOATCB_MASK (BBOCB_MASK &~ AT1_MASK)
+#define BBOAT2CB_MASK (BBOCB_MASK &~ AT2_MASK)
/* A BBOYCB_MASK in which the BI field is fixed. */
#define BBOYBI_MASK (BBOYCB_MASK | BI_MASK)
+#define BBOATBI_MASK (BBOAT2CB_MASK | BI_MASK)
/* The main opcode mask with the RA field clear. */
#define DRA_MASK (OP_MASK | RA_MASK)
@@ -1105,6 +1327,10 @@ extract_tbr (insn, invalid)
#define DSO(op, xop) (OP (op) | ((xop) & 0x3))
#define DS_MASK DSO (0x3f, 3)
+/* A DE form instruction. */
+#define DEO(op, xop) (OP (op) | ((xop) & 0xf))
+#define DE_MASK DEO (0x3e, 0xf)
+
/* An M form instruction. */
#define M(op, rc) (OP (op) | ((rc) & 1))
#define M_MASK M (0x3f, 1)
@@ -1146,10 +1372,10 @@ extract_tbr (insn, invalid)
#define VX_MASK VX(0x3f, 0x7ff)
/* An VA form instruction. */
-#define VXA(op, xop) (OP (op) | (((unsigned long)(xop)) & 0x07f))
+#define VXA(op, xop) (OP (op) | (((unsigned long)(xop)) & 0x03f))
/* The mask for an VA form instruction. */
-#define VXA_MASK VXA(0x3f, 0x7f)
+#define VXA_MASK VXA(0x3f, 0x3f)
/* An VXR form instruction. */
#define VXR(op, xop, rc) (OP (op) | (((rc) & 1) << 10) | (((unsigned long)(xop)) & 0x3ff))
@@ -1199,6 +1425,16 @@ extract_tbr (insn, invalid)
#define XTLB(op, xop, sh) (X ((op), (xop)) | ((((unsigned long)(sh)) & 0x1f) << 11))
#define XTLB_MASK (X_MASK | SH_MASK)
+/* An X form sync instruction. */
+#define XSYNC(op, xop, l) (X ((op), (xop)) | ((((unsigned long)(l)) & 3) << 21))
+
+/* An X form sync instruction with everything filled in except the LS field. */
+#define XSYNC_MASK (0xff9fffff)
+
+/* An X form AltiVec dss instruction. */
+#define XDSS(op, xop, a) (X ((op), (xop)) | ((((unsigned long)(a)) & 1) << 25))
+#define XDSS_MASK XDSS(0x3f, 0x3ff, 1)
+
/* 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))
@@ -1279,18 +1515,29 @@ extract_tbr (insn, invalid)
#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 BOF (0x4)
+#define BOFP (0x5)
+#define BOFM64 (0x6)
+#define BOFP64 (0x7)
#define BOT (0xc)
#define BOTP (0xd)
+#define BOTM64 (0xe)
+#define BOTP64 (0xf)
+
#define BODNZ (0x10)
#define BODNZP (0x11)
#define BODZ (0x12)
#define BODZP (0x13)
+#define BODNZM64 (0x18)
+#define BODNZP64 (0x19)
+#define BODZM64 (0x1a)
+#define BODZP64 (0x1b)
+
#define BOU (0x14)
/* The BI condition bit encodings used in extended conditional branch
@@ -1322,14 +1569,16 @@ extract_tbr (insn, invalid)
#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 PPCCOM32 PPC_OPCODE_32 | PPCCOM
+#define PPCCOM64 PPC_OPCODE_64 | PPCCOM
+#define PPC32 PPC_OPCODE_32 | PPC_OPCODE_PPC | PPC_OPCODE_ANY
+#define PPC64 PPC_OPCODE_64 | PPC_OPCODE_PPC | PPC_OPCODE_ANY
#define PPCONLY PPC_OPCODE_PPC
-#define PPC403 PPC
+#define PPC403 PPC_OPCODE_403
#define PPC405 PPC403
#define PPC750 PPC
#define PPC860 PPC
-#define PPCVEC PPC_OPCODE_ALTIVEC | PPC_OPCODE_ANY
+#define PPCVEC PPC_OPCODE_ALTIVEC | PPC_OPCODE_ANY | PPC_OPCODE_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
@@ -1340,6 +1589,8 @@ extract_tbr (insn, invalid)
#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
+#define BOOKE PPC_OPCODE_BOOKE
+#define BOOKE64 PPC_OPCODE_BOOKE64
/* The opcode table.
@@ -1492,7 +1743,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "nmaclhwso", XO(4,494,1,0), XO_MASK, PPC405, { RT, RA, RB } },
{ "nmaclhwso.", XO(4,494,1,1), XO_MASK, PPC405, { RT, RA, RB } },
{ "mfvscr", VX(4, 1540), VX_MASK, PPCVEC, { VD } },
-{ "mtvscr", VX(4, 1604), VX_MASK, PPCVEC, { VD } },
+{ "mtvscr", VX(4, 1604), VX_MASK, PPCVEC, { VB } },
{ "vaddcuw", VX(4, 384), VX_MASK, PPCVEC, { VD, VA, VB } },
{ "vaddfp", VX(4, 10), VX_MASK, PPCVEC, { VD, VA, VB } },
{ "vaddsbs", VX(4, 768), VX_MASK, PPCVEC, { VD, VA, VB } },
@@ -1657,6 +1908,11 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "dozi", OP(9), OP_MASK, M601, { RT, RA, SI } },
+{ "bce", B(9,0,0), B_MASK, BOOKE64, { BO, BI, BD } },
+{ "bcel", B(9,0,1), B_MASK, BOOKE64, { BO, BI, BD } },
+{ "bcea", B(9,1,0), B_MASK, BOOKE64, { BO, BI, BDA } },
+{ "bcela", B(9,1,1), B_MASK, BOOKE64, { BO, BI, BDA } },
+
{ "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 } },
@@ -1688,257 +1944,257 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "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, PPCCOM, { BDM } },
-{ "bdnz+", BBO(16,BODNZ,0,0), BBOYBI_MASK, PPCCOM, { 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, PPCCOM, { BDM } },
-{ "bdnzl+", BBO(16,BODNZ,0,1), BBOYBI_MASK, PPCCOM, { 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, PPCCOM, { BDMA } },
-{ "bdnza+", BBO(16,BODNZ,1,0), BBOYBI_MASK, PPCCOM, { 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, PPCCOM, { BDMA } },
-{ "bdnzla+", BBO(16,BODNZ,1,1), BBOYBI_MASK, PPCCOM, { 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, PPCCOM, { BDM } },
-{ "bdz+", BBO(16,BODZ,0,0), BBOYBI_MASK, PPCCOM, { BDP } },
-{ "bdz", BBO(16,BODZ,0,0), BBOYBI_MASK, COM, { BD } },
-{ "bdzl-", BBO(16,BODZ,0,1), BBOYBI_MASK, PPCCOM, { BDM } },
-{ "bdzl+", BBO(16,BODZ,0,1), BBOYBI_MASK, PPCCOM, { BDP } },
-{ "bdzl", BBO(16,BODZ,0,1), BBOYBI_MASK, COM, { BD } },
-{ "bdza-", BBO(16,BODZ,1,0), BBOYBI_MASK, PPCCOM, { BDMA } },
-{ "bdza+", BBO(16,BODZ,1,0), BBOYBI_MASK, PPCCOM, { BDPA } },
-{ "bdza", BBO(16,BODZ,1,0), BBOYBI_MASK, COM, { BDA } },
-{ "bdzla-", BBO(16,BODZ,1,1), BBOYBI_MASK, PPCCOM, { BDMA } },
-{ "bdzla+", BBO(16,BODZ,1,1), BBOYBI_MASK, PPCCOM, { BDPA } },
-{ "bdzla", BBO(16,BODZ,1,1), BBOYBI_MASK, COM, { BDA } },
-{ "blt-", BBOCB(16,BOT,CBLT,0,0), BBOYCB_MASK, PPCCOM, { CR, BDM } },
-{ "blt+", BBOCB(16,BOT,CBLT,0,0), BBOYCB_MASK, PPCCOM, { CR, BDP } },
-{ "blt", BBOCB(16,BOT,CBLT,0,0), BBOYCB_MASK, COM, { CR, BD } },
-{ "bltl-", BBOCB(16,BOT,CBLT,0,1), BBOYCB_MASK, PPCCOM, { CR, BDM } },
-{ "bltl+", BBOCB(16,BOT,CBLT,0,1), BBOYCB_MASK, PPCCOM, { CR, BDP } },
-{ "bltl", BBOCB(16,BOT,CBLT,0,1), BBOYCB_MASK, COM, { CR, BD } },
-{ "blta-", BBOCB(16,BOT,CBLT,1,0), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
-{ "blta+", BBOCB(16,BOT,CBLT,1,0), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
-{ "blta", BBOCB(16,BOT,CBLT,1,0), BBOYCB_MASK, COM, { CR, BDA } },
-{ "bltla-", BBOCB(16,BOT,CBLT,1,1), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
-{ "bltla+", BBOCB(16,BOT,CBLT,1,1), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
-{ "bltla", BBOCB(16,BOT,CBLT,1,1), BBOYCB_MASK, COM, { CR, BDA } },
-{ "bgt-", BBOCB(16,BOT,CBGT,0,0), BBOYCB_MASK, PPCCOM, { CR, BDM } },
-{ "bgt+", BBOCB(16,BOT,CBGT,0,0), BBOYCB_MASK, PPCCOM, { CR, BDP } },
-{ "bgt", BBOCB(16,BOT,CBGT,0,0), BBOYCB_MASK, COM, { CR, BD } },
-{ "bgtl-", BBOCB(16,BOT,CBGT,0,1), BBOYCB_MASK, PPCCOM, { CR, BDM } },
-{ "bgtl+", BBOCB(16,BOT,CBGT,0,1), BBOYCB_MASK, PPCCOM, { CR, BDP } },
-{ "bgtl", BBOCB(16,BOT,CBGT,0,1), BBOYCB_MASK, COM, { CR, BD } },
-{ "bgta-", BBOCB(16,BOT,CBGT,1,0), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
-{ "bgta+", BBOCB(16,BOT,CBGT,1,0), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
-{ "bgta", BBOCB(16,BOT,CBGT,1,0), BBOYCB_MASK, COM, { CR, BDA } },
-{ "bgtla-", BBOCB(16,BOT,CBGT,1,1), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
-{ "bgtla+", BBOCB(16,BOT,CBGT,1,1), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
-{ "bgtla", BBOCB(16,BOT,CBGT,1,1), BBOYCB_MASK, COM, { CR, BDA } },
-{ "beq-", BBOCB(16,BOT,CBEQ,0,0), BBOYCB_MASK, PPCCOM, { CR, BDM } },
-{ "beq+", BBOCB(16,BOT,CBEQ,0,0), BBOYCB_MASK, PPCCOM, { CR, BDP } },
-{ "beq", BBOCB(16,BOT,CBEQ,0,0), BBOYCB_MASK, COM, { CR, BD } },
-{ "beql-", BBOCB(16,BOT,CBEQ,0,1), BBOYCB_MASK, PPCCOM, { CR, BDM } },
-{ "beql+", BBOCB(16,BOT,CBEQ,0,1), BBOYCB_MASK, PPCCOM, { CR, BDP } },
-{ "beql", BBOCB(16,BOT,CBEQ,0,1), BBOYCB_MASK, COM, { CR, BD } },
-{ "beqa-", BBOCB(16,BOT,CBEQ,1,0), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
-{ "beqa+", BBOCB(16,BOT,CBEQ,1,0), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
-{ "beqa", BBOCB(16,BOT,CBEQ,1,0), BBOYCB_MASK, COM, { CR, BDA } },
-{ "beqla-", BBOCB(16,BOT,CBEQ,1,1), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
-{ "beqla+", BBOCB(16,BOT,CBEQ,1,1), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
-{ "beqla", BBOCB(16,BOT,CBEQ,1,1), BBOYCB_MASK, COM, { CR, BDA } },
-{ "bso-", BBOCB(16,BOT,CBSO,0,0), BBOYCB_MASK, PPCCOM, { CR, BDM } },
-{ "bso+", BBOCB(16,BOT,CBSO,0,0), BBOYCB_MASK, PPCCOM, { CR, BDP } },
-{ "bso", BBOCB(16,BOT,CBSO,0,0), BBOYCB_MASK, COM, { CR, BD } },
-{ "bsol-", BBOCB(16,BOT,CBSO,0,1), BBOYCB_MASK, PPCCOM, { CR, BDM } },
-{ "bsol+", BBOCB(16,BOT,CBSO,0,1), BBOYCB_MASK, PPCCOM, { CR, BDP } },
-{ "bsol", BBOCB(16,BOT,CBSO,0,1), BBOYCB_MASK, COM, { CR, BD } },
-{ "bsoa-", BBOCB(16,BOT,CBSO,1,0), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
-{ "bsoa+", BBOCB(16,BOT,CBSO,1,0), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
-{ "bsoa", BBOCB(16,BOT,CBSO,1,0), BBOYCB_MASK, COM, { CR, BDA } },
-{ "bsola-", BBOCB(16,BOT,CBSO,1,1), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
-{ "bsola+", BBOCB(16,BOT,CBSO,1,1), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
-{ "bsola", BBOCB(16,BOT,CBSO,1,1), BBOYCB_MASK, COM, { CR, BDA } },
-{ "bun-", BBOCB(16,BOT,CBSO,0,0), BBOYCB_MASK, PPCCOM, { CR, BDM } },
-{ "bun+", BBOCB(16,BOT,CBSO,0,0), BBOYCB_MASK, PPCCOM, { CR, BDP } },
-{ "bun", BBOCB(16,BOT,CBSO,0,0), BBOYCB_MASK, PPCCOM, { CR, BD } },
-{ "bunl-", BBOCB(16,BOT,CBSO,0,1), BBOYCB_MASK, PPCCOM, { CR, BDM } },
-{ "bunl+", BBOCB(16,BOT,CBSO,0,1), BBOYCB_MASK, PPCCOM, { CR, BDP } },
-{ "bunl", BBOCB(16,BOT,CBSO,0,1), BBOYCB_MASK, PPCCOM, { CR, BD } },
-{ "buna-", BBOCB(16,BOT,CBSO,1,0), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
-{ "buna+", BBOCB(16,BOT,CBSO,1,0), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
-{ "buna", BBOCB(16,BOT,CBSO,1,0), BBOYCB_MASK, PPCCOM, { CR, BDA } },
-{ "bunla-", BBOCB(16,BOT,CBSO,1,1), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
-{ "bunla+", BBOCB(16,BOT,CBSO,1,1), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
-{ "bunla", BBOCB(16,BOT,CBSO,1,1), BBOYCB_MASK, PPCCOM, { CR, BDA } },
-{ "bge-", BBOCB(16,BOF,CBLT,0,0), BBOYCB_MASK, PPCCOM, { CR, BDM } },
-{ "bge+", BBOCB(16,BOF,CBLT,0,0), BBOYCB_MASK, PPCCOM, { CR, BDP } },
-{ "bge", BBOCB(16,BOF,CBLT,0,0), BBOYCB_MASK, COM, { CR, BD } },
-{ "bgel-", BBOCB(16,BOF,CBLT,0,1), BBOYCB_MASK, PPCCOM, { CR, BDM } },
-{ "bgel+", BBOCB(16,BOF,CBLT,0,1), BBOYCB_MASK, PPCCOM, { CR, BDP } },
-{ "bgel", BBOCB(16,BOF,CBLT,0,1), BBOYCB_MASK, COM, { CR, BD } },
-{ "bgea-", BBOCB(16,BOF,CBLT,1,0), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
-{ "bgea+", BBOCB(16,BOF,CBLT,1,0), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
-{ "bgea", BBOCB(16,BOF,CBLT,1,0), BBOYCB_MASK, COM, { CR, BDA } },
-{ "bgela-", BBOCB(16,BOF,CBLT,1,1), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
-{ "bgela+", BBOCB(16,BOF,CBLT,1,1), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
-{ "bgela", BBOCB(16,BOF,CBLT,1,1), BBOYCB_MASK, COM, { CR, BDA } },
-{ "bnl-", BBOCB(16,BOF,CBLT,0,0), BBOYCB_MASK, PPCCOM, { CR, BDM } },
-{ "bnl+", BBOCB(16,BOF,CBLT,0,0), BBOYCB_MASK, PPCCOM, { CR, BDP } },
-{ "bnl", BBOCB(16,BOF,CBLT,0,0), BBOYCB_MASK, COM, { CR, BD } },
-{ "bnll-", BBOCB(16,BOF,CBLT,0,1), BBOYCB_MASK, PPCCOM, { CR, BDM } },
-{ "bnll+", BBOCB(16,BOF,CBLT,0,1), BBOYCB_MASK, PPCCOM, { CR, BDP } },
-{ "bnll", BBOCB(16,BOF,CBLT,0,1), BBOYCB_MASK, COM, { CR, BD } },
-{ "bnla-", BBOCB(16,BOF,CBLT,1,0), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
-{ "bnla+", BBOCB(16,BOF,CBLT,1,0), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
-{ "bnla", BBOCB(16,BOF,CBLT,1,0), BBOYCB_MASK, COM, { CR, BDA } },
-{ "bnlla-", BBOCB(16,BOF,CBLT,1,1), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
-{ "bnlla+", BBOCB(16,BOF,CBLT,1,1), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
-{ "bnlla", BBOCB(16,BOF,CBLT,1,1), BBOYCB_MASK, COM, { CR, BDA } },
-{ "ble-", BBOCB(16,BOF,CBGT,0,0), BBOYCB_MASK, PPCCOM, { CR, BDM } },
-{ "ble+", BBOCB(16,BOF,CBGT,0,0), BBOYCB_MASK, PPCCOM, { CR, BDP } },
-{ "ble", BBOCB(16,BOF,CBGT,0,0), BBOYCB_MASK, COM, { CR, BD } },
-{ "blel-", BBOCB(16,BOF,CBGT,0,1), BBOYCB_MASK, PPCCOM, { CR, BDM } },
-{ "blel+", BBOCB(16,BOF,CBGT,0,1), BBOYCB_MASK, PPCCOM, { CR, BDP } },
-{ "blel", BBOCB(16,BOF,CBGT,0,1), BBOYCB_MASK, COM, { CR, BD } },
-{ "blea-", BBOCB(16,BOF,CBGT,1,0), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
-{ "blea+", BBOCB(16,BOF,CBGT,1,0), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
-{ "blea", BBOCB(16,BOF,CBGT,1,0), BBOYCB_MASK, COM, { CR, BDA } },
-{ "blela-", BBOCB(16,BOF,CBGT,1,1), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
-{ "blela+", BBOCB(16,BOF,CBGT,1,1), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
-{ "blela", BBOCB(16,BOF,CBGT,1,1), BBOYCB_MASK, COM, { CR, BDA } },
-{ "bng-", BBOCB(16,BOF,CBGT,0,0), BBOYCB_MASK, PPCCOM, { CR, BDM } },
-{ "bng+", BBOCB(16,BOF,CBGT,0,0), BBOYCB_MASK, PPCCOM, { CR, BDP } },
-{ "bng", BBOCB(16,BOF,CBGT,0,0), BBOYCB_MASK, COM, { CR, BD } },
-{ "bngl-", BBOCB(16,BOF,CBGT,0,1), BBOYCB_MASK, PPCCOM, { CR, BDM } },
-{ "bngl+", BBOCB(16,BOF,CBGT,0,1), BBOYCB_MASK, PPCCOM, { CR, BDP } },
-{ "bngl", BBOCB(16,BOF,CBGT,0,1), BBOYCB_MASK, COM, { CR, BD } },
-{ "bnga-", BBOCB(16,BOF,CBGT,1,0), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
-{ "bnga+", BBOCB(16,BOF,CBGT,1,0), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
-{ "bnga", BBOCB(16,BOF,CBGT,1,0), BBOYCB_MASK, COM, { CR, BDA } },
-{ "bngla-", BBOCB(16,BOF,CBGT,1,1), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
-{ "bngla+", BBOCB(16,BOF,CBGT,1,1), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
-{ "bngla", BBOCB(16,BOF,CBGT,1,1), BBOYCB_MASK, COM, { CR, BDA } },
-{ "bne-", BBOCB(16,BOF,CBEQ,0,0), BBOYCB_MASK, PPCCOM, { CR, BDM } },
-{ "bne+", BBOCB(16,BOF,CBEQ,0,0), BBOYCB_MASK, PPCCOM, { CR, BDP } },
-{ "bne", BBOCB(16,BOF,CBEQ,0,0), BBOYCB_MASK, COM, { CR, BD } },
-{ "bnel-", BBOCB(16,BOF,CBEQ,0,1), BBOYCB_MASK, PPCCOM, { CR, BDM } },
-{ "bnel+", BBOCB(16,BOF,CBEQ,0,1), BBOYCB_MASK, PPCCOM, { CR, BDP } },
-{ "bnel", BBOCB(16,BOF,CBEQ,0,1), BBOYCB_MASK, COM, { CR, BD } },
-{ "bnea-", BBOCB(16,BOF,CBEQ,1,0), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
-{ "bnea+", BBOCB(16,BOF,CBEQ,1,0), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
-{ "bnea", BBOCB(16,BOF,CBEQ,1,0), BBOYCB_MASK, COM, { CR, BDA } },
-{ "bnela-", BBOCB(16,BOF,CBEQ,1,1), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
-{ "bnela+", BBOCB(16,BOF,CBEQ,1,1), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
-{ "bnela", BBOCB(16,BOF,CBEQ,1,1), BBOYCB_MASK, COM, { CR, BDA } },
-{ "bns-", BBOCB(16,BOF,CBSO,0,0), BBOYCB_MASK, PPCCOM, { CR, BDM } },
-{ "bns+", BBOCB(16,BOF,CBSO,0,0), BBOYCB_MASK, PPCCOM, { CR, BDP } },
-{ "bns", BBOCB(16,BOF,CBSO,0,0), BBOYCB_MASK, COM, { CR, BD } },
-{ "bnsl-", BBOCB(16,BOF,CBSO,0,1), BBOYCB_MASK, PPCCOM, { CR, BDM } },
-{ "bnsl+", BBOCB(16,BOF,CBSO,0,1), BBOYCB_MASK, PPCCOM, { CR, BDP } },
-{ "bnsl", BBOCB(16,BOF,CBSO,0,1), BBOYCB_MASK, COM, { CR, BD } },
-{ "bnsa-", BBOCB(16,BOF,CBSO,1,0), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
-{ "bnsa+", BBOCB(16,BOF,CBSO,1,0), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
-{ "bnsa", BBOCB(16,BOF,CBSO,1,0), BBOYCB_MASK, COM, { CR, BDA } },
-{ "bnsla-", BBOCB(16,BOF,CBSO,1,1), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
-{ "bnsla+", BBOCB(16,BOF,CBSO,1,1), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
-{ "bnsla", BBOCB(16,BOF,CBSO,1,1), BBOYCB_MASK, COM, { CR, BDA } },
-{ "bnu-", BBOCB(16,BOF,CBSO,0,0), BBOYCB_MASK, PPCCOM, { CR, BDM } },
-{ "bnu+", BBOCB(16,BOF,CBSO,0,0), BBOYCB_MASK, PPCCOM, { CR, BDP } },
-{ "bnu", BBOCB(16,BOF,CBSO,0,0), BBOYCB_MASK, PPCCOM, { CR, BD } },
-{ "bnul-", BBOCB(16,BOF,CBSO,0,1), BBOYCB_MASK, PPCCOM, { CR, BDM } },
-{ "bnul+", BBOCB(16,BOF,CBSO,0,1), BBOYCB_MASK, PPCCOM, { CR, BDP } },
-{ "bnul", BBOCB(16,BOF,CBSO,0,1), BBOYCB_MASK, PPCCOM, { CR, BD } },
-{ "bnua-", BBOCB(16,BOF,CBSO,1,0), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
-{ "bnua+", BBOCB(16,BOF,CBSO,1,0), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
-{ "bnua", BBOCB(16,BOF,CBSO,1,0), BBOYCB_MASK, PPCCOM, { CR, BDA } },
-{ "bnula-", BBOCB(16,BOF,CBSO,1,1), BBOYCB_MASK, PPCCOM, { CR, BDMA } },
-{ "bnula+", BBOCB(16,BOF,CBSO,1,1), BBOYCB_MASK, PPCCOM, { CR, BDPA } },
-{ "bnula", BBOCB(16,BOF,CBSO,1,1), BBOYCB_MASK, PPCCOM, { CR, BDA } },
-{ "bdnzt-", BBO(16,BODNZT,0,0), BBOY_MASK, PPCCOM, { BI, BDM } },
-{ "bdnzt+", BBO(16,BODNZT,0,0), BBOY_MASK, PPCCOM, { BI, BDP } },
+{ "bdnz-", BBO(16,BODNZ,0,0), BBOATBI_MASK, PPCCOM, { BDM } },
+{ "bdnz+", BBO(16,BODNZ,0,0), BBOATBI_MASK, PPCCOM, { BDP } },
+{ "bdnz", BBO(16,BODNZ,0,0), BBOATBI_MASK, PPCCOM, { BD } },
+{ "bdn", BBO(16,BODNZ,0,0), BBOATBI_MASK, PWRCOM, { BD } },
+{ "bdnzl-", BBO(16,BODNZ,0,1), BBOATBI_MASK, PPCCOM, { BDM } },
+{ "bdnzl+", BBO(16,BODNZ,0,1), BBOATBI_MASK, PPCCOM, { BDP } },
+{ "bdnzl", BBO(16,BODNZ,0,1), BBOATBI_MASK, PPCCOM, { BD } },
+{ "bdnl", BBO(16,BODNZ,0,1), BBOATBI_MASK, PWRCOM, { BD } },
+{ "bdnza-", BBO(16,BODNZ,1,0), BBOATBI_MASK, PPCCOM, { BDMA } },
+{ "bdnza+", BBO(16,BODNZ,1,0), BBOATBI_MASK, PPCCOM, { BDPA } },
+{ "bdnza", BBO(16,BODNZ,1,0), BBOATBI_MASK, PPCCOM, { BDA } },
+{ "bdna", BBO(16,BODNZ,1,0), BBOATBI_MASK, PWRCOM, { BDA } },
+{ "bdnzla-", BBO(16,BODNZ,1,1), BBOATBI_MASK, PPCCOM, { BDMA } },
+{ "bdnzla+", BBO(16,BODNZ,1,1), BBOATBI_MASK, PPCCOM, { BDPA } },
+{ "bdnzla", BBO(16,BODNZ,1,1), BBOATBI_MASK, PPCCOM, { BDA } },
+{ "bdnla", BBO(16,BODNZ,1,1), BBOATBI_MASK, PWRCOM, { BDA } },
+{ "bdz-", BBO(16,BODZ,0,0), BBOATBI_MASK, PPCCOM, { BDM } },
+{ "bdz+", BBO(16,BODZ,0,0), BBOATBI_MASK, PPCCOM, { BDP } },
+{ "bdz", BBO(16,BODZ,0,0), BBOATBI_MASK, COM, { BD } },
+{ "bdzl-", BBO(16,BODZ,0,1), BBOATBI_MASK, PPCCOM, { BDM } },
+{ "bdzl+", BBO(16,BODZ,0,1), BBOATBI_MASK, PPCCOM, { BDP } },
+{ "bdzl", BBO(16,BODZ,0,1), BBOATBI_MASK, COM, { BD } },
+{ "bdza-", BBO(16,BODZ,1,0), BBOATBI_MASK, PPCCOM, { BDMA } },
+{ "bdza+", BBO(16,BODZ,1,0), BBOATBI_MASK, PPCCOM, { BDPA } },
+{ "bdza", BBO(16,BODZ,1,0), BBOATBI_MASK, COM, { BDA } },
+{ "bdzla-", BBO(16,BODZ,1,1), BBOATBI_MASK, PPCCOM, { BDMA } },
+{ "bdzla+", BBO(16,BODZ,1,1), BBOATBI_MASK, PPCCOM, { BDPA } },
+{ "bdzla", BBO(16,BODZ,1,1), BBOATBI_MASK, COM, { BDA } },
+{ "blt-", BBOCB(16,BOT,CBLT,0,0), BBOATCB_MASK, PPCCOM, { CR, BDM } },
+{ "blt+", BBOCB(16,BOT,CBLT,0,0), BBOATCB_MASK, PPCCOM, { CR, BDP } },
+{ "blt", BBOCB(16,BOT,CBLT,0,0), BBOATCB_MASK, COM, { CR, BD } },
+{ "bltl-", BBOCB(16,BOT,CBLT,0,1), BBOATCB_MASK, PPCCOM, { CR, BDM } },
+{ "bltl+", BBOCB(16,BOT,CBLT,0,1), BBOATCB_MASK, PPCCOM, { CR, BDP } },
+{ "bltl", BBOCB(16,BOT,CBLT,0,1), BBOATCB_MASK, COM, { CR, BD } },
+{ "blta-", BBOCB(16,BOT,CBLT,1,0), BBOATCB_MASK, PPCCOM, { CR, BDMA } },
+{ "blta+", BBOCB(16,BOT,CBLT,1,0), BBOATCB_MASK, PPCCOM, { CR, BDPA } },
+{ "blta", BBOCB(16,BOT,CBLT,1,0), BBOATCB_MASK, COM, { CR, BDA } },
+{ "bltla-", BBOCB(16,BOT,CBLT,1,1), BBOATCB_MASK, PPCCOM, { CR, BDMA } },
+{ "bltla+", BBOCB(16,BOT,CBLT,1,1), BBOATCB_MASK, PPCCOM, { CR, BDPA } },
+{ "bltla", BBOCB(16,BOT,CBLT,1,1), BBOATCB_MASK, COM, { CR, BDA } },
+{ "bgt-", BBOCB(16,BOT,CBGT,0,0), BBOATCB_MASK, PPCCOM, { CR, BDM } },
+{ "bgt+", BBOCB(16,BOT,CBGT,0,0), BBOATCB_MASK, PPCCOM, { CR, BDP } },
+{ "bgt", BBOCB(16,BOT,CBGT,0,0), BBOATCB_MASK, COM, { CR, BD } },
+{ "bgtl-", BBOCB(16,BOT,CBGT,0,1), BBOATCB_MASK, PPCCOM, { CR, BDM } },
+{ "bgtl+", BBOCB(16,BOT,CBGT,0,1), BBOATCB_MASK, PPCCOM, { CR, BDP } },
+{ "bgtl", BBOCB(16,BOT,CBGT,0,1), BBOATCB_MASK, COM, { CR, BD } },
+{ "bgta-", BBOCB(16,BOT,CBGT,1,0), BBOATCB_MASK, PPCCOM, { CR, BDMA } },
+{ "bgta+", BBOCB(16,BOT,CBGT,1,0), BBOATCB_MASK, PPCCOM, { CR, BDPA } },
+{ "bgta", BBOCB(16,BOT,CBGT,1,0), BBOATCB_MASK, COM, { CR, BDA } },
+{ "bgtla-", BBOCB(16,BOT,CBGT,1,1), BBOATCB_MASK, PPCCOM, { CR, BDMA } },
+{ "bgtla+", BBOCB(16,BOT,CBGT,1,1), BBOATCB_MASK, PPCCOM, { CR, BDPA } },
+{ "bgtla", BBOCB(16,BOT,CBGT,1,1), BBOATCB_MASK, COM, { CR, BDA } },
+{ "beq-", BBOCB(16,BOT,CBEQ,0,0), BBOATCB_MASK, PPCCOM, { CR, BDM } },
+{ "beq+", BBOCB(16,BOT,CBEQ,0,0), BBOATCB_MASK, PPCCOM, { CR, BDP } },
+{ "beq", BBOCB(16,BOT,CBEQ,0,0), BBOATCB_MASK, COM, { CR, BD } },
+{ "beql-", BBOCB(16,BOT,CBEQ,0,1), BBOATCB_MASK, PPCCOM, { CR, BDM } },
+{ "beql+", BBOCB(16,BOT,CBEQ,0,1), BBOATCB_MASK, PPCCOM, { CR, BDP } },
+{ "beql", BBOCB(16,BOT,CBEQ,0,1), BBOATCB_MASK, COM, { CR, BD } },
+{ "beqa-", BBOCB(16,BOT,CBEQ,1,0), BBOATCB_MASK, PPCCOM, { CR, BDMA } },
+{ "beqa+", BBOCB(16,BOT,CBEQ,1,0), BBOATCB_MASK, PPCCOM, { CR, BDPA } },
+{ "beqa", BBOCB(16,BOT,CBEQ,1,0), BBOATCB_MASK, COM, { CR, BDA } },
+{ "beqla-", BBOCB(16,BOT,CBEQ,1,1), BBOATCB_MASK, PPCCOM, { CR, BDMA } },
+{ "beqla+", BBOCB(16,BOT,CBEQ,1,1), BBOATCB_MASK, PPCCOM, { CR, BDPA } },
+{ "beqla", BBOCB(16,BOT,CBEQ,1,1), BBOATCB_MASK, COM, { CR, BDA } },
+{ "bso-", BBOCB(16,BOT,CBSO,0,0), BBOATCB_MASK, PPCCOM, { CR, BDM } },
+{ "bso+", BBOCB(16,BOT,CBSO,0,0), BBOATCB_MASK, PPCCOM, { CR, BDP } },
+{ "bso", BBOCB(16,BOT,CBSO,0,0), BBOATCB_MASK, COM, { CR, BD } },
+{ "bsol-", BBOCB(16,BOT,CBSO,0,1), BBOATCB_MASK, PPCCOM, { CR, BDM } },
+{ "bsol+", BBOCB(16,BOT,CBSO,0,1), BBOATCB_MASK, PPCCOM, { CR, BDP } },
+{ "bsol", BBOCB(16,BOT,CBSO,0,1), BBOATCB_MASK, COM, { CR, BD } },
+{ "bsoa-", BBOCB(16,BOT,CBSO,1,0), BBOATCB_MASK, PPCCOM, { CR, BDMA } },
+{ "bsoa+", BBOCB(16,BOT,CBSO,1,0), BBOATCB_MASK, PPCCOM, { CR, BDPA } },
+{ "bsoa", BBOCB(16,BOT,CBSO,1,0), BBOATCB_MASK, COM, { CR, BDA } },
+{ "bsola-", BBOCB(16,BOT,CBSO,1,1), BBOATCB_MASK, PPCCOM, { CR, BDMA } },
+{ "bsola+", BBOCB(16,BOT,CBSO,1,1), BBOATCB_MASK, PPCCOM, { CR, BDPA } },
+{ "bsola", BBOCB(16,BOT,CBSO,1,1), BBOATCB_MASK, COM, { CR, BDA } },
+{ "bun-", BBOCB(16,BOT,CBSO,0,0), BBOATCB_MASK, PPCCOM, { CR, BDM } },
+{ "bun+", BBOCB(16,BOT,CBSO,0,0), BBOATCB_MASK, PPCCOM, { CR, BDP } },
+{ "bun", BBOCB(16,BOT,CBSO,0,0), BBOATCB_MASK, PPCCOM, { CR, BD } },
+{ "bunl-", BBOCB(16,BOT,CBSO,0,1), BBOATCB_MASK, PPCCOM, { CR, BDM } },
+{ "bunl+", BBOCB(16,BOT,CBSO,0,1), BBOATCB_MASK, PPCCOM, { CR, BDP } },
+{ "bunl", BBOCB(16,BOT,CBSO,0,1), BBOATCB_MASK, PPCCOM, { CR, BD } },
+{ "buna-", BBOCB(16,BOT,CBSO,1,0), BBOATCB_MASK, PPCCOM, { CR, BDMA } },
+{ "buna+", BBOCB(16,BOT,CBSO,1,0), BBOATCB_MASK, PPCCOM, { CR, BDPA } },
+{ "buna", BBOCB(16,BOT,CBSO,1,0), BBOATCB_MASK, PPCCOM, { CR, BDA } },
+{ "bunla-", BBOCB(16,BOT,CBSO,1,1), BBOATCB_MASK, PPCCOM, { CR, BDMA } },
+{ "bunla+", BBOCB(16,BOT,CBSO,1,1), BBOATCB_MASK, PPCCOM, { CR, BDPA } },
+{ "bunla", BBOCB(16,BOT,CBSO,1,1), BBOATCB_MASK, PPCCOM, { CR, BDA } },
+{ "bge-", BBOCB(16,BOF,CBLT,0,0), BBOATCB_MASK, PPCCOM, { CR, BDM } },
+{ "bge+", BBOCB(16,BOF,CBLT,0,0), BBOATCB_MASK, PPCCOM, { CR, BDP } },
+{ "bge", BBOCB(16,BOF,CBLT,0,0), BBOATCB_MASK, COM, { CR, BD } },
+{ "bgel-", BBOCB(16,BOF,CBLT,0,1), BBOATCB_MASK, PPCCOM, { CR, BDM } },
+{ "bgel+", BBOCB(16,BOF,CBLT,0,1), BBOATCB_MASK, PPCCOM, { CR, BDP } },
+{ "bgel", BBOCB(16,BOF,CBLT,0,1), BBOATCB_MASK, COM, { CR, BD } },
+{ "bgea-", BBOCB(16,BOF,CBLT,1,0), BBOATCB_MASK, PPCCOM, { CR, BDMA } },
+{ "bgea+", BBOCB(16,BOF,CBLT,1,0), BBOATCB_MASK, PPCCOM, { CR, BDPA } },
+{ "bgea", BBOCB(16,BOF,CBLT,1,0), BBOATCB_MASK, COM, { CR, BDA } },
+{ "bgela-", BBOCB(16,BOF,CBLT,1,1), BBOATCB_MASK, PPCCOM, { CR, BDMA } },
+{ "bgela+", BBOCB(16,BOF,CBLT,1,1), BBOATCB_MASK, PPCCOM, { CR, BDPA } },
+{ "bgela", BBOCB(16,BOF,CBLT,1,1), BBOATCB_MASK, COM, { CR, BDA } },
+{ "bnl-", BBOCB(16,BOF,CBLT,0,0), BBOATCB_MASK, PPCCOM, { CR, BDM } },
+{ "bnl+", BBOCB(16,BOF,CBLT,0,0), BBOATCB_MASK, PPCCOM, { CR, BDP } },
+{ "bnl", BBOCB(16,BOF,CBLT,0,0), BBOATCB_MASK, COM, { CR, BD } },
+{ "bnll-", BBOCB(16,BOF,CBLT,0,1), BBOATCB_MASK, PPCCOM, { CR, BDM } },
+{ "bnll+", BBOCB(16,BOF,CBLT,0,1), BBOATCB_MASK, PPCCOM, { CR, BDP } },
+{ "bnll", BBOCB(16,BOF,CBLT,0,1), BBOATCB_MASK, COM, { CR, BD } },
+{ "bnla-", BBOCB(16,BOF,CBLT,1,0), BBOATCB_MASK, PPCCOM, { CR, BDMA } },
+{ "bnla+", BBOCB(16,BOF,CBLT,1,0), BBOATCB_MASK, PPCCOM, { CR, BDPA } },
+{ "bnla", BBOCB(16,BOF,CBLT,1,0), BBOATCB_MASK, COM, { CR, BDA } },
+{ "bnlla-", BBOCB(16,BOF,CBLT,1,1), BBOATCB_MASK, PPCCOM, { CR, BDMA } },
+{ "bnlla+", BBOCB(16,BOF,CBLT,1,1), BBOATCB_MASK, PPCCOM, { CR, BDPA } },
+{ "bnlla", BBOCB(16,BOF,CBLT,1,1), BBOATCB_MASK, COM, { CR, BDA } },
+{ "ble-", BBOCB(16,BOF,CBGT,0,0), BBOATCB_MASK, PPCCOM, { CR, BDM } },
+{ "ble+", BBOCB(16,BOF,CBGT,0,0), BBOATCB_MASK, PPCCOM, { CR, BDP } },
+{ "ble", BBOCB(16,BOF,CBGT,0,0), BBOATCB_MASK, COM, { CR, BD } },
+{ "blel-", BBOCB(16,BOF,CBGT,0,1), BBOATCB_MASK, PPCCOM, { CR, BDM } },
+{ "blel+", BBOCB(16,BOF,CBGT,0,1), BBOATCB_MASK, PPCCOM, { CR, BDP } },
+{ "blel", BBOCB(16,BOF,CBGT,0,1), BBOATCB_MASK, COM, { CR, BD } },
+{ "blea-", BBOCB(16,BOF,CBGT,1,0), BBOATCB_MASK, PPCCOM, { CR, BDMA } },
+{ "blea+", BBOCB(16,BOF,CBGT,1,0), BBOATCB_MASK, PPCCOM, { CR, BDPA } },
+{ "blea", BBOCB(16,BOF,CBGT,1,0), BBOATCB_MASK, COM, { CR, BDA } },
+{ "blela-", BBOCB(16,BOF,CBGT,1,1), BBOATCB_MASK, PPCCOM, { CR, BDMA } },
+{ "blela+", BBOCB(16,BOF,CBGT,1,1), BBOATCB_MASK, PPCCOM, { CR, BDPA } },
+{ "blela", BBOCB(16,BOF,CBGT,1,1), BBOATCB_MASK, COM, { CR, BDA } },
+{ "bng-", BBOCB(16,BOF,CBGT,0,0), BBOATCB_MASK, PPCCOM, { CR, BDM } },
+{ "bng+", BBOCB(16,BOF,CBGT,0,0), BBOATCB_MASK, PPCCOM, { CR, BDP } },
+{ "bng", BBOCB(16,BOF,CBGT,0,0), BBOATCB_MASK, COM, { CR, BD } },
+{ "bngl-", BBOCB(16,BOF,CBGT,0,1), BBOATCB_MASK, PPCCOM, { CR, BDM } },
+{ "bngl+", BBOCB(16,BOF,CBGT,0,1), BBOATCB_MASK, PPCCOM, { CR, BDP } },
+{ "bngl", BBOCB(16,BOF,CBGT,0,1), BBOATCB_MASK, COM, { CR, BD } },
+{ "bnga-", BBOCB(16,BOF,CBGT,1,0), BBOATCB_MASK, PPCCOM, { CR, BDMA } },
+{ "bnga+", BBOCB(16,BOF,CBGT,1,0), BBOATCB_MASK, PPCCOM, { CR, BDPA } },
+{ "bnga", BBOCB(16,BOF,CBGT,1,0), BBOATCB_MASK, COM, { CR, BDA } },
+{ "bngla-", BBOCB(16,BOF,CBGT,1,1), BBOATCB_MASK, PPCCOM, { CR, BDMA } },
+{ "bngla+", BBOCB(16,BOF,CBGT,1,1), BBOATCB_MASK, PPCCOM, { CR, BDPA } },
+{ "bngla", BBOCB(16,BOF,CBGT,1,1), BBOATCB_MASK, COM, { CR, BDA } },
+{ "bne-", BBOCB(16,BOF,CBEQ,0,0), BBOATCB_MASK, PPCCOM, { CR, BDM } },
+{ "bne+", BBOCB(16,BOF,CBEQ,0,0), BBOATCB_MASK, PPCCOM, { CR, BDP } },
+{ "bne", BBOCB(16,BOF,CBEQ,0,0), BBOATCB_MASK, COM, { CR, BD } },
+{ "bnel-", BBOCB(16,BOF,CBEQ,0,1), BBOATCB_MASK, PPCCOM, { CR, BDM } },
+{ "bnel+", BBOCB(16,BOF,CBEQ,0,1), BBOATCB_MASK, PPCCOM, { CR, BDP } },
+{ "bnel", BBOCB(16,BOF,CBEQ,0,1), BBOATCB_MASK, COM, { CR, BD } },
+{ "bnea-", BBOCB(16,BOF,CBEQ,1,0), BBOATCB_MASK, PPCCOM, { CR, BDMA } },
+{ "bnea+", BBOCB(16,BOF,CBEQ,1,0), BBOATCB_MASK, PPCCOM, { CR, BDPA } },
+{ "bnea", BBOCB(16,BOF,CBEQ,1,0), BBOATCB_MASK, COM, { CR, BDA } },
+{ "bnela-", BBOCB(16,BOF,CBEQ,1,1), BBOATCB_MASK, PPCCOM, { CR, BDMA } },
+{ "bnela+", BBOCB(16,BOF,CBEQ,1,1), BBOATCB_MASK, PPCCOM, { CR, BDPA } },
+{ "bnela", BBOCB(16,BOF,CBEQ,1,1), BBOATCB_MASK, COM, { CR, BDA } },
+{ "bns-", BBOCB(16,BOF,CBSO,0,0), BBOATCB_MASK, PPCCOM, { CR, BDM } },
+{ "bns+", BBOCB(16,BOF,CBSO,0,0), BBOATCB_MASK, PPCCOM, { CR, BDP } },
+{ "bns", BBOCB(16,BOF,CBSO,0,0), BBOATCB_MASK, COM, { CR, BD } },
+{ "bnsl-", BBOCB(16,BOF,CBSO,0,1), BBOATCB_MASK, PPCCOM, { CR, BDM } },
+{ "bnsl+", BBOCB(16,BOF,CBSO,0,1), BBOATCB_MASK, PPCCOM, { CR, BDP } },
+{ "bnsl", BBOCB(16,BOF,CBSO,0,1), BBOATCB_MASK, COM, { CR, BD } },
+{ "bnsa-", BBOCB(16,BOF,CBSO,1,0), BBOATCB_MASK, PPCCOM, { CR, BDMA } },
+{ "bnsa+", BBOCB(16,BOF,CBSO,1,0), BBOATCB_MASK, PPCCOM, { CR, BDPA } },
+{ "bnsa", BBOCB(16,BOF,CBSO,1,0), BBOATCB_MASK, COM, { CR, BDA } },
+{ "bnsla-", BBOCB(16,BOF,CBSO,1,1), BBOATCB_MASK, PPCCOM, { CR, BDMA } },
+{ "bnsla+", BBOCB(16,BOF,CBSO,1,1), BBOATCB_MASK, PPCCOM, { CR, BDPA } },
+{ "bnsla", BBOCB(16,BOF,CBSO,1,1), BBOATCB_MASK, COM, { CR, BDA } },
+{ "bnu-", BBOCB(16,BOF,CBSO,0,0), BBOATCB_MASK, PPCCOM, { CR, BDM } },
+{ "bnu+", BBOCB(16,BOF,CBSO,0,0), BBOATCB_MASK, PPCCOM, { CR, BDP } },
+{ "bnu", BBOCB(16,BOF,CBSO,0,0), BBOATCB_MASK, PPCCOM, { CR, BD } },
+{ "bnul-", BBOCB(16,BOF,CBSO,0,1), BBOATCB_MASK, PPCCOM, { CR, BDM } },
+{ "bnul+", BBOCB(16,BOF,CBSO,0,1), BBOATCB_MASK, PPCCOM, { CR, BDP } },
+{ "bnul", BBOCB(16,BOF,CBSO,0,1), BBOATCB_MASK, PPCCOM, { CR, BD } },
+{ "bnua-", BBOCB(16,BOF,CBSO,1,0), BBOATCB_MASK, PPCCOM, { CR, BDMA } },
+{ "bnua+", BBOCB(16,BOF,CBSO,1,0), BBOATCB_MASK, PPCCOM, { CR, BDPA } },
+{ "bnua", BBOCB(16,BOF,CBSO,1,0), BBOATCB_MASK, PPCCOM, { CR, BDA } },
+{ "bnula-", BBOCB(16,BOF,CBSO,1,1), BBOATCB_MASK, PPCCOM, { CR, BDMA } },
+{ "bnula+", BBOCB(16,BOF,CBSO,1,1), BBOATCB_MASK, PPCCOM, { CR, BDPA } },
+{ "bnula", BBOCB(16,BOF,CBSO,1,1), BBOATCB_MASK, PPCCOM, { CR, BDA } },
+{ "bdnzt-", BBO(16,BODNZT,0,0), BBOY_MASK, PPCCOM32, { BI, BDM } },
+{ "bdnzt+", BBO(16,BODNZT,0,0), BBOY_MASK, PPCCOM32, { BI, BDP } },
{ "bdnzt", BBO(16,BODNZT,0,0), BBOY_MASK, PPCCOM, { BI, BD } },
-{ "bdnztl-", BBO(16,BODNZT,0,1), BBOY_MASK, PPCCOM, { BI, BDM } },
-{ "bdnztl+", BBO(16,BODNZT,0,1), BBOY_MASK, PPCCOM, { BI, BDP } },
+{ "bdnztl-", BBO(16,BODNZT,0,1), BBOY_MASK, PPCCOM32, { BI, BDM } },
+{ "bdnztl+", BBO(16,BODNZT,0,1), BBOY_MASK, PPCCOM32, { BI, BDP } },
{ "bdnztl", BBO(16,BODNZT,0,1), BBOY_MASK, PPCCOM, { BI, BD } },
-{ "bdnzta-", BBO(16,BODNZT,1,0), BBOY_MASK, PPCCOM, { BI, BDMA } },
-{ "bdnzta+", BBO(16,BODNZT,1,0), BBOY_MASK, PPCCOM, { BI, BDPA } },
+{ "bdnzta-", BBO(16,BODNZT,1,0), BBOY_MASK, PPCCOM32, { BI, BDMA } },
+{ "bdnzta+", BBO(16,BODNZT,1,0), BBOY_MASK, PPCCOM32, { BI, BDPA } },
{ "bdnzta", BBO(16,BODNZT,1,0), BBOY_MASK, PPCCOM, { BI, BDA } },
-{ "bdnztla-",BBO(16,BODNZT,1,1), BBOY_MASK, PPCCOM, { BI, BDMA } },
-{ "bdnztla+",BBO(16,BODNZT,1,1), BBOY_MASK, PPCCOM, { BI, BDPA } },
+{ "bdnztla-",BBO(16,BODNZT,1,1), BBOY_MASK, PPCCOM32, { BI, BDMA } },
+{ "bdnztla+",BBO(16,BODNZT,1,1), BBOY_MASK, PPCCOM32, { BI, BDPA } },
{ "bdnztla", BBO(16,BODNZT,1,1), BBOY_MASK, PPCCOM, { BI, BDA } },
-{ "bdnzf-", BBO(16,BODNZF,0,0), BBOY_MASK, PPCCOM, { BI, BDM } },
-{ "bdnzf+", BBO(16,BODNZF,0,0), BBOY_MASK, PPCCOM, { BI, BDP } },
+{ "bdnzf-", BBO(16,BODNZF,0,0), BBOY_MASK, PPCCOM32, { BI, BDM } },
+{ "bdnzf+", BBO(16,BODNZF,0,0), BBOY_MASK, PPCCOM32, { BI, BDP } },
{ "bdnzf", BBO(16,BODNZF,0,0), BBOY_MASK, PPCCOM, { BI, BD } },
-{ "bdnzfl-", BBO(16,BODNZF,0,1), BBOY_MASK, PPCCOM, { BI, BDM } },
-{ "bdnzfl+", BBO(16,BODNZF,0,1), BBOY_MASK, PPCCOM, { BI, BDP } },
+{ "bdnzfl-", BBO(16,BODNZF,0,1), BBOY_MASK, PPCCOM32, { BI, BDM } },
+{ "bdnzfl+", BBO(16,BODNZF,0,1), BBOY_MASK, PPCCOM32, { BI, BDP } },
{ "bdnzfl", BBO(16,BODNZF,0,1), BBOY_MASK, PPCCOM, { BI, BD } },
-{ "bdnzfa-", BBO(16,BODNZF,1,0), BBOY_MASK, PPCCOM, { BI, BDMA } },
-{ "bdnzfa+", BBO(16,BODNZF,1,0), BBOY_MASK, PPCCOM, { BI, BDPA } },
+{ "bdnzfa-", BBO(16,BODNZF,1,0), BBOY_MASK, PPCCOM32, { BI, BDMA } },
+{ "bdnzfa+", BBO(16,BODNZF,1,0), BBOY_MASK, PPCCOM32, { BI, BDPA } },
{ "bdnzfa", BBO(16,BODNZF,1,0), BBOY_MASK, PPCCOM, { BI, BDA } },
-{ "bdnzfla-",BBO(16,BODNZF,1,1), BBOY_MASK, PPCCOM, { BI, BDMA } },
-{ "bdnzfla+",BBO(16,BODNZF,1,1), BBOY_MASK, PPCCOM, { BI, BDPA } },
+{ "bdnzfla-",BBO(16,BODNZF,1,1), BBOY_MASK, PPCCOM32, { BI, BDMA } },
+{ "bdnzfla+",BBO(16,BODNZF,1,1), BBOY_MASK, PPCCOM32, { BI, BDPA } },
{ "bdnzfla", BBO(16,BODNZF,1,1), BBOY_MASK, PPCCOM, { BI, BDA } },
-{ "bt-", BBO(16,BOT,0,0), BBOY_MASK, PPCCOM, { BI, BDM } },
-{ "bt+", BBO(16,BOT,0,0), BBOY_MASK, PPCCOM, { 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, PPCCOM, { BI, BDM } },
-{ "btl+", BBO(16,BOT,0,1), BBOY_MASK, PPCCOM, { 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, PPCCOM, { BI, BDMA } },
-{ "bta+", BBO(16,BOT,1,0), BBOY_MASK, PPCCOM, { 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, PPCCOM, { BI, BDMA } },
-{ "btla+", BBO(16,BOT,1,1), BBOY_MASK, PPCCOM, { 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, PPCCOM, { BI, BDM } },
-{ "bf+", BBO(16,BOF,0,0), BBOY_MASK, PPCCOM, { 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, PPCCOM, { BI, BDM } },
-{ "bfl+", BBO(16,BOF,0,1), BBOY_MASK, PPCCOM, { 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, PPCCOM, { BI, BDMA } },
-{ "bfa+", BBO(16,BOF,1,0), BBOY_MASK, PPCCOM, { 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, PPCCOM, { BI, BDMA } },
-{ "bfla+", BBO(16,BOF,1,1), BBOY_MASK, PPCCOM, { 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, PPCCOM, { BI, BDM } },
-{ "bdzt+", BBO(16,BODZT,0,0), BBOY_MASK, PPCCOM, { BI, BDP } },
+{ "bt-", BBO(16,BOT,0,0), BBOAT_MASK, PPCCOM, { BI, BDM } },
+{ "bt+", BBO(16,BOT,0,0), BBOAT_MASK, PPCCOM, { BI, BDP } },
+{ "bt", BBO(16,BOT,0,0), BBOAT_MASK, PPCCOM, { BI, BD } },
+{ "bbt", BBO(16,BOT,0,0), BBOAT_MASK, PWRCOM, { BI, BD } },
+{ "btl-", BBO(16,BOT,0,1), BBOAT_MASK, PPCCOM, { BI, BDM } },
+{ "btl+", BBO(16,BOT,0,1), BBOAT_MASK, PPCCOM, { BI, BDP } },
+{ "btl", BBO(16,BOT,0,1), BBOAT_MASK, PPCCOM, { BI, BD } },
+{ "bbtl", BBO(16,BOT,0,1), BBOAT_MASK, PWRCOM, { BI, BD } },
+{ "bta-", BBO(16,BOT,1,0), BBOAT_MASK, PPCCOM, { BI, BDMA } },
+{ "bta+", BBO(16,BOT,1,0), BBOAT_MASK, PPCCOM, { BI, BDPA } },
+{ "bta", BBO(16,BOT,1,0), BBOAT_MASK, PPCCOM, { BI, BDA } },
+{ "bbta", BBO(16,BOT,1,0), BBOAT_MASK, PWRCOM, { BI, BDA } },
+{ "btla-", BBO(16,BOT,1,1), BBOAT_MASK, PPCCOM, { BI, BDMA } },
+{ "btla+", BBO(16,BOT,1,1), BBOAT_MASK, PPCCOM, { BI, BDPA } },
+{ "btla", BBO(16,BOT,1,1), BBOAT_MASK, PPCCOM, { BI, BDA } },
+{ "bbtla", BBO(16,BOT,1,1), BBOAT_MASK, PWRCOM, { BI, BDA } },
+{ "bf-", BBO(16,BOF,0,0), BBOAT_MASK, PPCCOM, { BI, BDM } },
+{ "bf+", BBO(16,BOF,0,0), BBOAT_MASK, PPCCOM, { BI, BDP } },
+{ "bf", BBO(16,BOF,0,0), BBOAT_MASK, PPCCOM, { BI, BD } },
+{ "bbf", BBO(16,BOF,0,0), BBOAT_MASK, PWRCOM, { BI, BD } },
+{ "bfl-", BBO(16,BOF,0,1), BBOAT_MASK, PPCCOM, { BI, BDM } },
+{ "bfl+", BBO(16,BOF,0,1), BBOAT_MASK, PPCCOM, { BI, BDP } },
+{ "bfl", BBO(16,BOF,0,1), BBOAT_MASK, PPCCOM, { BI, BD } },
+{ "bbfl", BBO(16,BOF,0,1), BBOAT_MASK, PWRCOM, { BI, BD } },
+{ "bfa-", BBO(16,BOF,1,0), BBOAT_MASK, PPCCOM, { BI, BDMA } },
+{ "bfa+", BBO(16,BOF,1,0), BBOAT_MASK, PPCCOM, { BI, BDPA } },
+{ "bfa", BBO(16,BOF,1,0), BBOAT_MASK, PPCCOM, { BI, BDA } },
+{ "bbfa", BBO(16,BOF,1,0), BBOAT_MASK, PWRCOM, { BI, BDA } },
+{ "bfla-", BBO(16,BOF,1,1), BBOAT_MASK, PPCCOM, { BI, BDMA } },
+{ "bfla+", BBO(16,BOF,1,1), BBOAT_MASK, PPCCOM, { BI, BDPA } },
+{ "bfla", BBO(16,BOF,1,1), BBOAT_MASK, PPCCOM, { BI, BDA } },
+{ "bbfla", BBO(16,BOF,1,1), BBOAT_MASK, PWRCOM, { BI, BDA } },
+{ "bdzt-", BBO(16,BODZT,0,0), BBOY_MASK, PPCCOM32, { BI, BDM } },
+{ "bdzt+", BBO(16,BODZT,0,0), BBOY_MASK, PPCCOM32, { BI, BDP } },
{ "bdzt", BBO(16,BODZT,0,0), BBOY_MASK, PPCCOM, { BI, BD } },
-{ "bdztl-", BBO(16,BODZT,0,1), BBOY_MASK, PPCCOM, { BI, BDM } },
-{ "bdztl+", BBO(16,BODZT,0,1), BBOY_MASK, PPCCOM, { BI, BDP } },
+{ "bdztl-", BBO(16,BODZT,0,1), BBOY_MASK, PPCCOM32, { BI, BDM } },
+{ "bdztl+", BBO(16,BODZT,0,1), BBOY_MASK, PPCCOM32, { BI, BDP } },
{ "bdztl", BBO(16,BODZT,0,1), BBOY_MASK, PPCCOM, { BI, BD } },
-{ "bdzta-", BBO(16,BODZT,1,0), BBOY_MASK, PPCCOM, { BI, BDMA } },
-{ "bdzta+", BBO(16,BODZT,1,0), BBOY_MASK, PPCCOM, { BI, BDPA } },
+{ "bdzta-", BBO(16,BODZT,1,0), BBOY_MASK, PPCCOM32, { BI, BDMA } },
+{ "bdzta+", BBO(16,BODZT,1,0), BBOY_MASK, PPCCOM32, { BI, BDPA } },
{ "bdzta", BBO(16,BODZT,1,0), BBOY_MASK, PPCCOM, { BI, BDA } },
-{ "bdztla-", BBO(16,BODZT,1,1), BBOY_MASK, PPCCOM, { BI, BDMA } },
-{ "bdztla+", BBO(16,BODZT,1,1), BBOY_MASK, PPCCOM, { BI, BDPA } },
+{ "bdztla-", BBO(16,BODZT,1,1), BBOY_MASK, PPCCOM32, { BI, BDMA } },
+{ "bdztla+", BBO(16,BODZT,1,1), BBOY_MASK, PPCCOM32, { BI, BDPA } },
{ "bdztla", BBO(16,BODZT,1,1), BBOY_MASK, PPCCOM, { BI, BDA } },
-{ "bdzf-", BBO(16,BODZF,0,0), BBOY_MASK, PPCCOM, { BI, BDM } },
-{ "bdzf+", BBO(16,BODZF,0,0), BBOY_MASK, PPCCOM, { BI, BDP } },
+{ "bdzf-", BBO(16,BODZF,0,0), BBOY_MASK, PPCCOM32, { BI, BDM } },
+{ "bdzf+", BBO(16,BODZF,0,0), BBOY_MASK, PPCCOM32, { BI, BDP } },
{ "bdzf", BBO(16,BODZF,0,0), BBOY_MASK, PPCCOM, { BI, BD } },
-{ "bdzfl-", BBO(16,BODZF,0,1), BBOY_MASK, PPCCOM, { BI, BDM } },
-{ "bdzfl+", BBO(16,BODZF,0,1), BBOY_MASK, PPCCOM, { BI, BDP } },
+{ "bdzfl-", BBO(16,BODZF,0,1), BBOY_MASK, PPCCOM32, { BI, BDM } },
+{ "bdzfl+", BBO(16,BODZF,0,1), BBOY_MASK, PPCCOM32, { BI, BDP } },
{ "bdzfl", BBO(16,BODZF,0,1), BBOY_MASK, PPCCOM, { BI, BD } },
-{ "bdzfa-", BBO(16,BODZF,1,0), BBOY_MASK, PPCCOM, { BI, BDMA } },
-{ "bdzfa+", BBO(16,BODZF,1,0), BBOY_MASK, PPCCOM, { BI, BDPA } },
+{ "bdzfa-", BBO(16,BODZF,1,0), BBOY_MASK, PPCCOM32, { BI, BDMA } },
+{ "bdzfa+", BBO(16,BODZF,1,0), BBOY_MASK, PPCCOM32, { BI, BDPA } },
{ "bdzfa", BBO(16,BODZF,1,0), BBOY_MASK, PPCCOM, { BI, BDA } },
-{ "bdzfla-", BBO(16,BODZF,1,1), BBOY_MASK, PPCCOM, { BI, BDMA } },
-{ "bdzfla+", BBO(16,BODZF,1,1), BBOY_MASK, PPCCOM, { BI, BDPA } },
+{ "bdzfla-", BBO(16,BODZF,1,1), BBOY_MASK, PPCCOM32, { BI, BDMA } },
+{ "bdzfla+", BBO(16,BODZF,1,1), BBOY_MASK, PPCCOM32, { BI, BDPA } },
{ "bdzfla", BBO(16,BODZF,1,1), BBOY_MASK, PPCCOM, { BI, BDA } },
{ "bc-", B(16,0,0), B_MASK, PPCCOM, { BOE, BI, BDM } },
{ "bc+", B(16,0,0), B_MASK, PPCCOM, { BOE, BI, BDP } },
@@ -1959,10 +2215,10 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "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 } },
+{ "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 } },
@@ -1971,149 +2227,213 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "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, PPCCOM, { 0 } },
-{ "bdnzlr+", XLO(19,BODNZP,16,0), XLBOBIBB_MASK, PPCCOM, { 0 } },
+{ "bdnzlr-", XLO(19,BODNZ,16,0), XLBOBIBB_MASK, PPCCOM32, { 0 } },
+{ "bdnzlr+", XLO(19,BODNZP,16,0), XLBOBIBB_MASK, PPCCOM32, { 0 } },
+{ "bdnzlr-", XLO(19,BODNZM64,16,0), XLBOBIBB_MASK, PPCCOM64, { 0 } },
+{ "bdnzlr+", XLO(19,BODNZP64,16,0), XLBOBIBB_MASK, PPCCOM64, { 0 } },
{ "bdnzlrl", XLO(19,BODNZ,16,1), XLBOBIBB_MASK, PPCCOM, { 0 } },
-{ "bdnzlrl-",XLO(19,BODNZ,16,1), XLBOBIBB_MASK, PPCCOM, { 0 } },
-{ "bdnzlrl+",XLO(19,BODNZP,16,1), XLBOBIBB_MASK, PPCCOM, { 0 } },
+{ "bdnzlrl-",XLO(19,BODNZ,16,1), XLBOBIBB_MASK, PPCCOM32, { 0 } },
+{ "bdnzlrl+",XLO(19,BODNZP,16,1), XLBOBIBB_MASK, PPCCOM32, { 0 } },
+{ "bdnzlrl-",XLO(19,BODNZM64,16,1), XLBOBIBB_MASK, PPCCOM64, { 0 } },
+{ "bdnzlrl+",XLO(19,BODNZP64,16,1), XLBOBIBB_MASK, PPCCOM64, { 0 } },
{ "bdzlr", XLO(19,BODZ,16,0), XLBOBIBB_MASK, PPCCOM, { 0 } },
-{ "bdzlr-", XLO(19,BODZ,16,0), XLBOBIBB_MASK, PPCCOM, { 0 } },
-{ "bdzlr+", XLO(19,BODZP,16,0), XLBOBIBB_MASK, PPCCOM, { 0 } },
+{ "bdzlr-", XLO(19,BODZ,16,0), XLBOBIBB_MASK, PPCCOM32, { 0 } },
+{ "bdzlr+", XLO(19,BODZP,16,0), XLBOBIBB_MASK, PPCCOM32, { 0 } },
+{ "bdzlr-", XLO(19,BODZM64,16,0), XLBOBIBB_MASK, PPCCOM64, { 0 } },
+{ "bdzlr+", XLO(19,BODZP64,16,0), XLBOBIBB_MASK, PPCCOM64, { 0 } },
{ "bdzlrl", XLO(19,BODZ,16,1), XLBOBIBB_MASK, PPCCOM, { 0 } },
-{ "bdzlrl-", XLO(19,BODZ,16,1), XLBOBIBB_MASK, PPCCOM, { 0 } },
-{ "bdzlrl+", XLO(19,BODZP,16,1), XLBOBIBB_MASK, PPCCOM, { 0 } },
+{ "bdzlrl-", XLO(19,BODZ,16,1), XLBOBIBB_MASK, PPCCOM32, { 0 } },
+{ "bdzlrl+", XLO(19,BODZP,16,1), XLBOBIBB_MASK, PPCCOM32, { 0 } },
+{ "bdzlrl-", XLO(19,BODZM64,16,1), XLBOBIBB_MASK, PPCCOM64, { 0 } },
+{ "bdzlrl+", XLO(19,BODZP64,16,1), XLBOBIBB_MASK, PPCCOM64, { 0 } },
{ "bltlr", XLOCB(19,BOT,CBLT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bltlr-", XLOCB(19,BOT,CBLT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bltlr+", XLOCB(19,BOTP,CBLT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bltlr-", XLOCB(19,BOT,CBLT,16,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bltlr+", XLOCB(19,BOTP,CBLT,16,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bltlr-", XLOCB(19,BOTM64,CBLT,16,0), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bltlr+", XLOCB(19,BOTP64,CBLT,16,0), XLBOCBBB_MASK, PPCCOM64, { 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, PPCCOM, { CR } },
-{ "bltlrl+", XLOCB(19,BOTP,CBLT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bltlrl-", XLOCB(19,BOT,CBLT,16,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bltlrl+", XLOCB(19,BOTP,CBLT,16,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bltlrl-", XLOCB(19,BOTM64,CBLT,16,1), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bltlrl+", XLOCB(19,BOTP64,CBLT,16,1), XLBOCBBB_MASK, PPCCOM64, { 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, PPCCOM, { CR } },
-{ "bgtlr+", XLOCB(19,BOTP,CBGT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bgtlr-", XLOCB(19,BOT,CBGT,16,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bgtlr+", XLOCB(19,BOTP,CBGT,16,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bgtlr-", XLOCB(19,BOTM64,CBGT,16,0), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bgtlr+", XLOCB(19,BOTP64,CBGT,16,0), XLBOCBBB_MASK, PPCCOM64, { 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, PPCCOM, { CR } },
-{ "bgtlrl+", XLOCB(19,BOTP,CBGT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bgtlrl-", XLOCB(19,BOT,CBGT,16,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bgtlrl+", XLOCB(19,BOTP,CBGT,16,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bgtlrl-", XLOCB(19,BOTM64,CBGT,16,1), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bgtlrl+", XLOCB(19,BOTP64,CBGT,16,1), XLBOCBBB_MASK, PPCCOM64, { 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, PPCCOM, { CR } },
-{ "beqlr+", XLOCB(19,BOTP,CBEQ,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "beqlr-", XLOCB(19,BOT,CBEQ,16,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "beqlr+", XLOCB(19,BOTP,CBEQ,16,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "beqlr-", XLOCB(19,BOTM64,CBEQ,16,0), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "beqlr+", XLOCB(19,BOTP64,CBEQ,16,0), XLBOCBBB_MASK, PPCCOM64, { 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, PPCCOM, { CR } },
-{ "beqlrl+", XLOCB(19,BOTP,CBEQ,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "beqlrl-", XLOCB(19,BOT,CBEQ,16,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "beqlrl+", XLOCB(19,BOTP,CBEQ,16,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "beqlrl-", XLOCB(19,BOTM64,CBEQ,16,1), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "beqlrl+", XLOCB(19,BOTP64,CBEQ,16,1), XLBOCBBB_MASK, PPCCOM64, { 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, PPCCOM, { CR } },
-{ "bsolr+", XLOCB(19,BOTP,CBSO,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bsolr-", XLOCB(19,BOT,CBSO,16,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bsolr+", XLOCB(19,BOTP,CBSO,16,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bsolr-", XLOCB(19,BOTM64,CBSO,16,0), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bsolr+", XLOCB(19,BOTP64,CBSO,16,0), XLBOCBBB_MASK, PPCCOM64, { 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, PPCCOM, { CR } },
-{ "bsolrl+", XLOCB(19,BOTP,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bsolrl-", XLOCB(19,BOT,CBSO,16,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bsolrl+", XLOCB(19,BOTP,CBSO,16,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bsolrl-", XLOCB(19,BOTM64,CBSO,16,1), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bsolrl+", XLOCB(19,BOTP64,CBSO,16,1), XLBOCBBB_MASK, PPCCOM64, { 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, PPCCOM, { CR } },
-{ "bunlr+", XLOCB(19,BOTP,CBSO,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bunlr-", XLOCB(19,BOT,CBSO,16,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bunlr+", XLOCB(19,BOTP,CBSO,16,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bunlr-", XLOCB(19,BOTM64,CBSO,16,0), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bunlr+", XLOCB(19,BOTP64,CBSO,16,0), XLBOCBBB_MASK, PPCCOM64, { CR } },
{ "bunlrl", XLOCB(19,BOT,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bunlrl-", XLOCB(19,BOT,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bunlrl+", XLOCB(19,BOTP,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bunlrl-", XLOCB(19,BOT,CBSO,16,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bunlrl+", XLOCB(19,BOTP,CBSO,16,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bunlrl-", XLOCB(19,BOTM64,CBSO,16,1), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bunlrl+", XLOCB(19,BOTP64,CBSO,16,1), XLBOCBBB_MASK, PPCCOM64, { CR } },
{ "bgelr", XLOCB(19,BOF,CBLT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgelr-", XLOCB(19,BOF,CBLT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgelr+", XLOCB(19,BOFP,CBLT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bgelr-", XLOCB(19,BOF,CBLT,16,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bgelr+", XLOCB(19,BOFP,CBLT,16,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bgelr-", XLOCB(19,BOFM64,CBLT,16,0), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bgelr+", XLOCB(19,BOFP64,CBLT,16,0), XLBOCBBB_MASK, PPCCOM64, { 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, PPCCOM, { CR } },
-{ "bgelrl+", XLOCB(19,BOFP,CBLT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bgelrl-", XLOCB(19,BOF,CBLT,16,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bgelrl+", XLOCB(19,BOFP,CBLT,16,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bgelrl-", XLOCB(19,BOFM64,CBLT,16,1), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bgelrl+", XLOCB(19,BOFP64,CBLT,16,1), XLBOCBBB_MASK, PPCCOM64, { 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, PPCCOM, { CR } },
-{ "bnllr+", XLOCB(19,BOFP,CBLT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnllr-", XLOCB(19,BOF,CBLT,16,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bnllr+", XLOCB(19,BOFP,CBLT,16,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bnllr-", XLOCB(19,BOFM64,CBLT,16,0), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bnllr+", XLOCB(19,BOFP64,CBLT,16,0), XLBOCBBB_MASK, PPCCOM64, { 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, PPCCOM, { CR } },
-{ "bnllrl+", XLOCB(19,BOFP,CBLT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnllrl-", XLOCB(19,BOF,CBLT,16,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bnllrl+", XLOCB(19,BOFP,CBLT,16,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bnllrl-", XLOCB(19,BOFM64,CBLT,16,1), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bnllrl+", XLOCB(19,BOFP64,CBLT,16,1), XLBOCBBB_MASK, PPCCOM64, { 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, PPCCOM, { CR } },
-{ "blelr+", XLOCB(19,BOFP,CBGT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "blelr-", XLOCB(19,BOF,CBGT,16,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "blelr+", XLOCB(19,BOFP,CBGT,16,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "blelr-", XLOCB(19,BOFM64,CBGT,16,0), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "blelr+", XLOCB(19,BOFP64,CBGT,16,0), XLBOCBBB_MASK, PPCCOM64, { 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, PPCCOM, { CR } },
-{ "blelrl+", XLOCB(19,BOFP,CBGT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "blelrl-", XLOCB(19,BOF,CBGT,16,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "blelrl+", XLOCB(19,BOFP,CBGT,16,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "blelrl-", XLOCB(19,BOFM64,CBGT,16,1), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "blelrl+", XLOCB(19,BOFP64,CBGT,16,1), XLBOCBBB_MASK, PPCCOM64, { 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, PPCCOM, { CR } },
-{ "bnglr+", XLOCB(19,BOFP,CBGT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnglr-", XLOCB(19,BOF,CBGT,16,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bnglr+", XLOCB(19,BOFP,CBGT,16,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bnglr-", XLOCB(19,BOFM64,CBGT,16,0), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bnglr+", XLOCB(19,BOFP64,CBGT,16,0), XLBOCBBB_MASK, PPCCOM64, { 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, PPCCOM, { CR } },
-{ "bnglrl+", XLOCB(19,BOFP,CBGT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnglrl-", XLOCB(19,BOF,CBGT,16,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bnglrl+", XLOCB(19,BOFP,CBGT,16,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bnglrl-", XLOCB(19,BOFM64,CBGT,16,1), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bnglrl+", XLOCB(19,BOFP64,CBGT,16,1), XLBOCBBB_MASK, PPCCOM64, { 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, PPCCOM, { CR } },
-{ "bnelr+", XLOCB(19,BOFP,CBEQ,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnelr-", XLOCB(19,BOF,CBEQ,16,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bnelr+", XLOCB(19,BOFP,CBEQ,16,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bnelr-", XLOCB(19,BOFM64,CBEQ,16,0), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bnelr+", XLOCB(19,BOFP64,CBEQ,16,0), XLBOCBBB_MASK, PPCCOM64, { 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, PPCCOM, { CR } },
-{ "bnelrl+", XLOCB(19,BOFP,CBEQ,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnelrl-", XLOCB(19,BOF,CBEQ,16,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bnelrl+", XLOCB(19,BOFP,CBEQ,16,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bnelrl-", XLOCB(19,BOFM64,CBEQ,16,1), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bnelrl+", XLOCB(19,BOFP64,CBEQ,16,1), XLBOCBBB_MASK, PPCCOM64, { 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, PPCCOM, { CR } },
-{ "bnslr+", XLOCB(19,BOFP,CBSO,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnslr-", XLOCB(19,BOF,CBSO,16,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bnslr+", XLOCB(19,BOFP,CBSO,16,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bnslr-", XLOCB(19,BOFM64,CBSO,16,0), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bnslr+", XLOCB(19,BOFP64,CBSO,16,0), XLBOCBBB_MASK, PPCCOM64, { 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, PPCCOM, { CR } },
-{ "bnslrl+", XLOCB(19,BOFP,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnslrl-", XLOCB(19,BOF,CBSO,16,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bnslrl+", XLOCB(19,BOFP,CBSO,16,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bnslrl-", XLOCB(19,BOFM64,CBSO,16,1), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bnslrl+", XLOCB(19,BOFP64,CBSO,16,1), XLBOCBBB_MASK, PPCCOM64, { 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, PPCCOM, { CR } },
-{ "bnulr+", XLOCB(19,BOFP,CBSO,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnulr-", XLOCB(19,BOF,CBSO,16,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bnulr+", XLOCB(19,BOFP,CBSO,16,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bnulr-", XLOCB(19,BOFM64,CBSO,16,0), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bnulr+", XLOCB(19,BOFP64,CBSO,16,0), XLBOCBBB_MASK, PPCCOM64, { CR } },
{ "bnulrl", XLOCB(19,BOF,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnulrl-", XLOCB(19,BOF,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnulrl+", XLOCB(19,BOFP,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnulrl-", XLOCB(19,BOF,CBSO,16,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bnulrl+", XLOCB(19,BOFP,CBSO,16,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bnulrl-", XLOCB(19,BOFM64,CBSO,16,1), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bnulrl+", XLOCB(19,BOFP64,CBSO,16,1), XLBOCBBB_MASK, PPCCOM64, { CR } },
{ "btlr", XLO(19,BOT,16,0), XLBOBB_MASK, PPCCOM, { BI } },
-{ "btlr-", XLO(19,BOT,16,0), XLBOBB_MASK, PPCCOM, { BI } },
-{ "btlr+", XLO(19,BOTP,16,0), XLBOBB_MASK, PPCCOM, { BI } },
+{ "btlr-", XLO(19,BOT,16,0), XLBOBB_MASK, PPCCOM32, { BI } },
+{ "btlr+", XLO(19,BOTP,16,0), XLBOBB_MASK, PPCCOM32, { BI } },
+{ "btlr-", XLO(19,BOTM64,16,0), XLBOBB_MASK, PPCCOM64, { BI } },
+{ "btlr+", XLO(19,BOTP64,16,0), XLBOBB_MASK, PPCCOM64, { 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, PPCCOM, { BI } },
-{ "btlrl+", XLO(19,BOTP,16,1), XLBOBB_MASK, PPCCOM, { BI } },
+{ "btlrl-", XLO(19,BOT,16,1), XLBOBB_MASK, PPCCOM32, { BI } },
+{ "btlrl+", XLO(19,BOTP,16,1), XLBOBB_MASK, PPCCOM32, { BI } },
+{ "btlrl-", XLO(19,BOTM64,16,1), XLBOBB_MASK, PPCCOM64, { BI } },
+{ "btlrl+", XLO(19,BOTP64,16,1), XLBOBB_MASK, PPCCOM64, { 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, PPCCOM, { BI } },
-{ "bflr+", XLO(19,BOFP,16,0), XLBOBB_MASK, PPCCOM, { BI } },
+{ "bflr-", XLO(19,BOF,16,0), XLBOBB_MASK, PPCCOM32, { BI } },
+{ "bflr+", XLO(19,BOFP,16,0), XLBOBB_MASK, PPCCOM32, { BI } },
+{ "bflr-", XLO(19,BOFM64,16,0), XLBOBB_MASK, PPCCOM64, { BI } },
+{ "bflr+", XLO(19,BOFP64,16,0), XLBOBB_MASK, PPCCOM64, { 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, PPCCOM, { BI } },
-{ "bflrl+", XLO(19,BOFP,16,1), XLBOBB_MASK, PPCCOM, { BI } },
+{ "bflrl-", XLO(19,BOF,16,1), XLBOBB_MASK, PPCCOM32, { BI } },
+{ "bflrl+", XLO(19,BOFP,16,1), XLBOBB_MASK, PPCCOM32, { BI } },
+{ "bflrl-", XLO(19,BOFM64,16,1), XLBOBB_MASK, PPCCOM64, { BI } },
+{ "bflrl+", XLO(19,BOFP64,16,1), XLBOBB_MASK, PPCCOM64, { 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, PPCCOM, { BI } },
-{ "bdnztlr+",XLO(19,BODNZTP,16,0), XLBOBB_MASK, PPCCOM, { BI } },
+{ "bdnztlr-",XLO(19,BODNZT,16,0), XLBOBB_MASK, PPCCOM32, { BI } },
+{ "bdnztlr+",XLO(19,BODNZTP,16,0), XLBOBB_MASK, PPCCOM32, { BI } },
{ "bdnztlrl",XLO(19,BODNZT,16,1), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bdnztlrl-",XLO(19,BODNZT,16,1), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bdnztlrl+",XLO(19,BODNZTP,16,1), XLBOBB_MASK, PPCCOM,{ BI } },
+{ "bdnztlrl-",XLO(19,BODNZT,16,1), XLBOBB_MASK, PPCCOM32, { BI } },
+{ "bdnztlrl+",XLO(19,BODNZTP,16,1), XLBOBB_MASK, PPCCOM32, { BI } },
{ "bdnzflr", XLO(19,BODNZF,16,0), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bdnzflr-",XLO(19,BODNZF,16,0), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bdnzflr+",XLO(19,BODNZFP,16,0), XLBOBB_MASK, PPCCOM, { BI } },
+{ "bdnzflr-",XLO(19,BODNZF,16,0), XLBOBB_MASK, PPCCOM32, { BI } },
+{ "bdnzflr+",XLO(19,BODNZFP,16,0), XLBOBB_MASK, PPCCOM32, { BI } },
{ "bdnzflrl",XLO(19,BODNZF,16,1), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bdnzflrl-",XLO(19,BODNZF,16,1), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bdnzflrl+",XLO(19,BODNZFP,16,1), XLBOBB_MASK, PPCCOM,{ BI } },
+{ "bdnzflrl-",XLO(19,BODNZF,16,1), XLBOBB_MASK, PPCCOM32, { BI } },
+{ "bdnzflrl+",XLO(19,BODNZFP,16,1), XLBOBB_MASK, PPCCOM32, { BI } },
{ "bdztlr", XLO(19,BODZT,16,0), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bdztlr-", XLO(19,BODZT,16,0), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bdztlr+", XLO(19,BODZTP,16,0), XLBOBB_MASK, PPCCOM, { BI } },
+{ "bdztlr-", XLO(19,BODZT,16,0), XLBOBB_MASK, PPCCOM32, { BI } },
+{ "bdztlr+", XLO(19,BODZTP,16,0), XLBOBB_MASK, PPCCOM32, { BI } },
{ "bdztlrl", XLO(19,BODZT,16,1), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bdztlrl-",XLO(19,BODZT,16,1), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bdztlrl+",XLO(19,BODZTP,16,1), XLBOBB_MASK, PPCCOM, { BI } },
+{ "bdztlrl-",XLO(19,BODZT,16,1), XLBOBB_MASK, PPCCOM32, { BI } },
+{ "bdztlrl+",XLO(19,BODZTP,16,1), XLBOBB_MASK, PPCCOM32, { BI } },
{ "bdzflr", XLO(19,BODZF,16,0), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bdzflr-", XLO(19,BODZF,16,0), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bdzflr+", XLO(19,BODZFP,16,0), XLBOBB_MASK, PPCCOM, { BI } },
+{ "bdzflr-", XLO(19,BODZF,16,0), XLBOBB_MASK, PPCCOM32, { BI } },
+{ "bdzflr+", XLO(19,BODZFP,16,0), XLBOBB_MASK, PPCCOM32, { BI } },
{ "bdzflrl", XLO(19,BODZF,16,1), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bdzflrl-",XLO(19,BODZF,16,1), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bdzflrl+",XLO(19,BODZFP,16,1), XLBOBB_MASK, PPCCOM, { BI } },
+{ "bdzflrl-",XLO(19,BODZF,16,1), XLBOBB_MASK, PPCCOM32, { BI } },
+{ "bdzflrl+",XLO(19,BODZFP,16,1), XLBOBB_MASK, PPCCOM32, { 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, PPCCOM, { BOE, BI } },
@@ -2122,6 +2442,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "bclrl-", XLYLK(19,16,0,1), XLYBB_MASK, PPCCOM, { BOE, BI } },
{ "bcr", XLLK(19,16,0), XLBB_MASK, PWRCOM, { BO, BI } },
{ "bcrl", XLLK(19,16,1), XLBB_MASK, PWRCOM, { BO, BI } },
+{ "bclre", XLLK(19,17,0), XLBB_MASK, BOOKE64, { BO, BI } },
+{ "bclrel", XLLK(19,17,1), XLBB_MASK, BOOKE64, { BO, BI } },
{ "rfid", XL(19,18), 0xffffffff, PPC64, { 0 } },
@@ -2130,6 +2452,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "rfi", XL(19,50), 0xffffffff, COM, { 0 } },
{ "rfci", XL(19,51), 0xffffffff, PPC403, { 0 } },
+{ "rfci", XL(19,51), 0xffffffff, BOOKE, { 0 } },
{ "rfsvc", XL(19,82), 0xffffffff, POWER, { 0 } },
@@ -2156,89 +2479,145 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "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, PPCCOM, { CR } },
-{ "bltctr+", XLOCB(19,BOTP,CBLT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bltctr-", XLOCB(19,BOT,CBLT,528,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bltctr+", XLOCB(19,BOTP,CBLT,528,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bltctr-", XLOCB(19,BOTM64,CBLT,528,0), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bltctr+", XLOCB(19,BOTP64,CBLT,528,0), XLBOCBBB_MASK, PPCCOM64, { CR } },
{ "bltctrl", XLOCB(19,BOT,CBLT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bltctrl-",XLOCB(19,BOT,CBLT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bltctrl+",XLOCB(19,BOTP,CBLT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bltctrl-",XLOCB(19,BOT,CBLT,528,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bltctrl+",XLOCB(19,BOTP,CBLT,528,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bltctrl-",XLOCB(19,BOTM64,CBLT,528,1), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bltctrl+",XLOCB(19,BOTP64,CBLT,528,1), XLBOCBBB_MASK, PPCCOM64, { CR } },
{ "bgtctr", XLOCB(19,BOT,CBGT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgtctr-", XLOCB(19,BOT,CBGT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgtctr+", XLOCB(19,BOTP,CBGT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bgtctr-", XLOCB(19,BOT,CBGT,528,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bgtctr+", XLOCB(19,BOTP,CBGT,528,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bgtctr-", XLOCB(19,BOTM64,CBGT,528,0), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bgtctr+", XLOCB(19,BOTP64,CBGT,528,0), XLBOCBBB_MASK, PPCCOM64, { CR } },
{ "bgtctrl", XLOCB(19,BOT,CBGT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgtctrl-",XLOCB(19,BOT,CBGT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgtctrl+",XLOCB(19,BOTP,CBGT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bgtctrl-",XLOCB(19,BOT,CBGT,528,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bgtctrl+",XLOCB(19,BOTP,CBGT,528,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bgtctrl-",XLOCB(19,BOTM64,CBGT,528,1), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bgtctrl+",XLOCB(19,BOTP64,CBGT,528,1), XLBOCBBB_MASK, PPCCOM64, { CR } },
{ "beqctr", XLOCB(19,BOT,CBEQ,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "beqctr-", XLOCB(19,BOT,CBEQ,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "beqctr+", XLOCB(19,BOTP,CBEQ,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "beqctr-", XLOCB(19,BOT,CBEQ,528,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "beqctr+", XLOCB(19,BOTP,CBEQ,528,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "beqctr-", XLOCB(19,BOTM64,CBEQ,528,0), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "beqctr+", XLOCB(19,BOTP64,CBEQ,528,0), XLBOCBBB_MASK, PPCCOM64, { CR } },
{ "beqctrl", XLOCB(19,BOT,CBEQ,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "beqctrl-",XLOCB(19,BOT,CBEQ,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "beqctrl+",XLOCB(19,BOTP,CBEQ,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "beqctrl-",XLOCB(19,BOT,CBEQ,528,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "beqctrl+",XLOCB(19,BOTP,CBEQ,528,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "beqctrl-",XLOCB(19,BOTM64,CBEQ,528,1), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "beqctrl+",XLOCB(19,BOTP64,CBEQ,528,1), XLBOCBBB_MASK, PPCCOM64, { CR } },
{ "bsoctr", XLOCB(19,BOT,CBSO,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bsoctr-", XLOCB(19,BOT,CBSO,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bsoctr+", XLOCB(19,BOTP,CBSO,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bsoctr-", XLOCB(19,BOT,CBSO,528,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bsoctr+", XLOCB(19,BOTP,CBSO,528,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bsoctr-", XLOCB(19,BOTM64,CBSO,528,0), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bsoctr+", XLOCB(19,BOTP64,CBSO,528,0), XLBOCBBB_MASK, PPCCOM64, { CR } },
{ "bsoctrl", XLOCB(19,BOT,CBSO,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bsoctrl-",XLOCB(19,BOT,CBSO,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bsoctrl+",XLOCB(19,BOTP,CBSO,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bsoctrl-",XLOCB(19,BOT,CBSO,528,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bsoctrl+",XLOCB(19,BOTP,CBSO,528,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bsoctrl-",XLOCB(19,BOTM64,CBSO,528,1), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bsoctrl+",XLOCB(19,BOTP64,CBSO,528,1), XLBOCBBB_MASK, PPCCOM64, { CR } },
{ "bunctr", XLOCB(19,BOT,CBSO,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bunctr-", XLOCB(19,BOT,CBSO,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bunctr+", XLOCB(19,BOTP,CBSO,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bunctr-", XLOCB(19,BOT,CBSO,528,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bunctr+", XLOCB(19,BOTP,CBSO,528,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bunctr-", XLOCB(19,BOTM64,CBSO,528,0), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bunctr+", XLOCB(19,BOTP64,CBSO,528,0), XLBOCBBB_MASK, PPCCOM64, { CR } },
{ "bunctrl", XLOCB(19,BOT,CBSO,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bunctrl-",XLOCB(19,BOT,CBSO,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bunctrl+",XLOCB(19,BOTP,CBSO,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bunctrl-",XLOCB(19,BOT,CBSO,528,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bunctrl+",XLOCB(19,BOTP,CBSO,528,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bunctrl-",XLOCB(19,BOTM64,CBSO,528,1), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bunctrl+",XLOCB(19,BOTP64,CBSO,528,1), XLBOCBBB_MASK, PPCCOM64, { CR } },
{ "bgectr", XLOCB(19,BOF,CBLT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgectr-", XLOCB(19,BOF,CBLT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgectr+", XLOCB(19,BOFP,CBLT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bgectr-", XLOCB(19,BOF,CBLT,528,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bgectr+", XLOCB(19,BOFP,CBLT,528,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bgectr-", XLOCB(19,BOFM64,CBLT,528,0), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bgectr+", XLOCB(19,BOFP64,CBLT,528,0), XLBOCBBB_MASK, PPCCOM64, { CR } },
{ "bgectrl", XLOCB(19,BOF,CBLT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgectrl-",XLOCB(19,BOF,CBLT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgectrl+",XLOCB(19,BOFP,CBLT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bgectrl-",XLOCB(19,BOF,CBLT,528,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bgectrl+",XLOCB(19,BOFP,CBLT,528,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bgectrl-",XLOCB(19,BOFM64,CBLT,528,1), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bgectrl+",XLOCB(19,BOFP64,CBLT,528,1), XLBOCBBB_MASK, PPCCOM64, { CR } },
{ "bnlctr", XLOCB(19,BOF,CBLT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnlctr-", XLOCB(19,BOF,CBLT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnlctr+", XLOCB(19,BOFP,CBLT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnlctr-", XLOCB(19,BOF,CBLT,528,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bnlctr+", XLOCB(19,BOFP,CBLT,528,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bnlctr-", XLOCB(19,BOFM64,CBLT,528,0), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bnlctr+", XLOCB(19,BOFP64,CBLT,528,0), XLBOCBBB_MASK, PPCCOM64, { CR } },
{ "bnlctrl", XLOCB(19,BOF,CBLT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnlctrl-",XLOCB(19,BOF,CBLT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnlctrl+",XLOCB(19,BOFP,CBLT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnlctrl-",XLOCB(19,BOF,CBLT,528,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bnlctrl+",XLOCB(19,BOFP,CBLT,528,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bnlctrl-",XLOCB(19,BOFM64,CBLT,528,1), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bnlctrl+",XLOCB(19,BOFP64,CBLT,528,1), XLBOCBBB_MASK, PPCCOM64, { CR } },
{ "blectr", XLOCB(19,BOF,CBGT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "blectr-", XLOCB(19,BOF,CBGT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "blectr+", XLOCB(19,BOFP,CBGT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "blectr-", XLOCB(19,BOF,CBGT,528,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "blectr+", XLOCB(19,BOFP,CBGT,528,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "blectr-", XLOCB(19,BOFM64,CBGT,528,0), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "blectr+", XLOCB(19,BOFP64,CBGT,528,0), XLBOCBBB_MASK, PPCCOM64, { CR } },
{ "blectrl", XLOCB(19,BOF,CBGT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "blectrl-",XLOCB(19,BOF,CBGT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "blectrl+",XLOCB(19,BOFP,CBGT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "blectrl-",XLOCB(19,BOF,CBGT,528,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "blectrl+",XLOCB(19,BOFP,CBGT,528,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "blectrl-",XLOCB(19,BOFM64,CBGT,528,1), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "blectrl+",XLOCB(19,BOFP64,CBGT,528,1), XLBOCBBB_MASK, PPCCOM64, { CR } },
{ "bngctr", XLOCB(19,BOF,CBGT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bngctr-", XLOCB(19,BOF,CBGT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bngctr+", XLOCB(19,BOFP,CBGT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bngctr-", XLOCB(19,BOF,CBGT,528,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bngctr+", XLOCB(19,BOFP,CBGT,528,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bngctr-", XLOCB(19,BOFM64,CBGT,528,0), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bngctr+", XLOCB(19,BOFP64,CBGT,528,0), XLBOCBBB_MASK, PPCCOM64, { CR } },
{ "bngctrl", XLOCB(19,BOF,CBGT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bngctrl-",XLOCB(19,BOF,CBGT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bngctrl+",XLOCB(19,BOFP,CBGT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bngctrl-",XLOCB(19,BOF,CBGT,528,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bngctrl+",XLOCB(19,BOFP,CBGT,528,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bngctrl-",XLOCB(19,BOFM64,CBGT,528,1), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bngctrl+",XLOCB(19,BOFP64,CBGT,528,1), XLBOCBBB_MASK, PPCCOM64, { CR } },
{ "bnectr", XLOCB(19,BOF,CBEQ,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnectr-", XLOCB(19,BOF,CBEQ,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnectr+", XLOCB(19,BOFP,CBEQ,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnectr-", XLOCB(19,BOF,CBEQ,528,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bnectr+", XLOCB(19,BOFP,CBEQ,528,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bnectr-", XLOCB(19,BOFM64,CBEQ,528,0), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bnectr+", XLOCB(19,BOFP64,CBEQ,528,0), XLBOCBBB_MASK, PPCCOM64, { CR } },
{ "bnectrl", XLOCB(19,BOF,CBEQ,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnectrl-",XLOCB(19,BOF,CBEQ,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnectrl+",XLOCB(19,BOFP,CBEQ,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnectrl-",XLOCB(19,BOF,CBEQ,528,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bnectrl+",XLOCB(19,BOFP,CBEQ,528,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bnectrl-",XLOCB(19,BOFM64,CBEQ,528,1), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bnectrl+",XLOCB(19,BOFP64,CBEQ,528,1), XLBOCBBB_MASK, PPCCOM64, { CR } },
{ "bnsctr", XLOCB(19,BOF,CBSO,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnsctr-", XLOCB(19,BOF,CBSO,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnsctr+", XLOCB(19,BOFP,CBSO,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnsctr-", XLOCB(19,BOF,CBSO,528,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bnsctr+", XLOCB(19,BOFP,CBSO,528,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bnsctr-", XLOCB(19,BOFM64,CBSO,528,0), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bnsctr+", XLOCB(19,BOFP64,CBSO,528,0), XLBOCBBB_MASK, PPCCOM64, { CR } },
{ "bnsctrl", XLOCB(19,BOF,CBSO,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnsctrl-",XLOCB(19,BOF,CBSO,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnsctrl+",XLOCB(19,BOFP,CBSO,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnsctrl-",XLOCB(19,BOF,CBSO,528,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bnsctrl+",XLOCB(19,BOFP,CBSO,528,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bnsctrl-",XLOCB(19,BOFM64,CBSO,528,1), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bnsctrl+",XLOCB(19,BOFP64,CBSO,528,1), XLBOCBBB_MASK, PPCCOM64, { CR } },
{ "bnuctr", XLOCB(19,BOF,CBSO,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnuctr-", XLOCB(19,BOF,CBSO,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnuctr+", XLOCB(19,BOFP,CBSO,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnuctr-", XLOCB(19,BOF,CBSO,528,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bnuctr+", XLOCB(19,BOFP,CBSO,528,0), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bnuctr-", XLOCB(19,BOFM64,CBSO,528,0), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bnuctr+", XLOCB(19,BOFP64,CBSO,528,0), XLBOCBBB_MASK, PPCCOM64, { CR } },
{ "bnuctrl", XLOCB(19,BOF,CBSO,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnuctrl-",XLOCB(19,BOF,CBSO,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnuctrl+",XLOCB(19,BOFP,CBSO,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
+{ "bnuctrl-",XLOCB(19,BOF,CBSO,528,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bnuctrl+",XLOCB(19,BOFP,CBSO,528,1), XLBOCBBB_MASK, PPCCOM32, { CR } },
+{ "bnuctrl-",XLOCB(19,BOFM64,CBSO,528,1), XLBOCBBB_MASK, PPCCOM64, { CR } },
+{ "bnuctrl+",XLOCB(19,BOFP64,CBSO,528,1), XLBOCBBB_MASK, PPCCOM64, { CR } },
{ "btctr", XLO(19,BOT,528,0), XLBOBB_MASK, PPCCOM, { BI } },
-{ "btctr-", XLO(19,BOT,528,0), XLBOBB_MASK, PPCCOM, { BI } },
-{ "btctr+", XLO(19,BOTP,528,0), XLBOBB_MASK, PPCCOM, { BI } },
+{ "btctr-", XLO(19,BOT,528,0), XLBOBB_MASK, PPCCOM32, { BI } },
+{ "btctr+", XLO(19,BOTP,528,0), XLBOBB_MASK, PPCCOM32, { BI } },
+{ "btctr-", XLO(19,BOTM64,528,0), XLBOBB_MASK, PPCCOM64, { BI } },
+{ "btctr+", XLO(19,BOTP64,528,0), XLBOBB_MASK, PPCCOM64, { BI } },
{ "btctrl", XLO(19,BOT,528,1), XLBOBB_MASK, PPCCOM, { BI } },
-{ "btctrl-", XLO(19,BOT,528,1), XLBOBB_MASK, PPCCOM, { BI } },
-{ "btctrl+", XLO(19,BOTP,528,1), XLBOBB_MASK, PPCCOM, { BI } },
+{ "btctrl-", XLO(19,BOT,528,1), XLBOBB_MASK, PPCCOM32, { BI } },
+{ "btctrl+", XLO(19,BOTP,528,1), XLBOBB_MASK, PPCCOM32, { BI } },
+{ "btctrl-", XLO(19,BOTM64,528,1), XLBOBB_MASK, PPCCOM64, { BI } },
+{ "btctrl+", XLO(19,BOTP64,528,1), XLBOBB_MASK, PPCCOM64, { BI } },
{ "bfctr", XLO(19,BOF,528,0), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bfctr-", XLO(19,BOF,528,0), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bfctr+", XLO(19,BOFP,528,0), XLBOBB_MASK, PPCCOM, { BI } },
+{ "bfctr-", XLO(19,BOF,528,0), XLBOBB_MASK, PPCCOM32, { BI } },
+{ "bfctr+", XLO(19,BOFP,528,0), XLBOBB_MASK, PPCCOM32, { BI } },
+{ "bfctr-", XLO(19,BOFM64,528,0), XLBOBB_MASK, PPCCOM64, { BI } },
+{ "bfctr+", XLO(19,BOFP64,528,0), XLBOBB_MASK, PPCCOM64, { BI } },
{ "bfctrl", XLO(19,BOF,528,1), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bfctrl-", XLO(19,BOF,528,1), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bfctrl+", XLO(19,BOFP,528,1), XLBOBB_MASK, PPCCOM, { BI } },
+{ "bfctrl-", XLO(19,BOF,528,1), XLBOBB_MASK, PPCCOM32, { BI } },
+{ "bfctrl+", XLO(19,BOFP,528,1), XLBOBB_MASK, PPCCOM32, { BI } },
+{ "bfctrl-", XLO(19,BOFM64,528,1), XLBOBB_MASK, PPCCOM64, { BI } },
+{ "bfctrl+", XLO(19,BOFP64,528,1), XLBOBB_MASK, PPCCOM64, { BI } },
{ "bcctr", XLLK(19,528,0), XLYBB_MASK, PPCCOM, { BO, BI } },
{ "bcctr-", XLYLK(19,528,0,0), XLYBB_MASK, PPCCOM, { BOE, BI } },
{ "bcctr+", XLYLK(19,528,1,0), XLYBB_MASK, PPCCOM, { BOE, BI } },
@@ -2247,6 +2626,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "bcctrl+", XLYLK(19,528,1,1), XLYBB_MASK, PPCCOM, { BOE, BI } },
{ "bcc", XLLK(19,528,0), XLBB_MASK, PWRCOM, { BO, BI } },
{ "bccl", XLLK(19,528,1), XLBB_MASK, PWRCOM, { BO, BI } },
+{ "bcctre", XLLK(19,529,0), XLYBB_MASK, BOOKE64, { BO, BI } },
+{ "bcctrel", XLLK(19,529,1), XLYBB_MASK, BOOKE64, { 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 } },
@@ -2266,6 +2647,11 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "rlmi", M(22,0), M_MASK, M601, { RA,RS,RB,MBE,ME } },
{ "rlmi.", M(22,1), M_MASK, M601, { RA,RS,RB,MBE,ME } },
+{ "be", B(22,0,0), B_MASK, BOOKE64, { LI } },
+{ "bel", B(22,0,1), B_MASK, BOOKE64, { LI } },
+{ "bea", B(22,1,0), B_MASK, BOOKE64, { LIA } },
+{ "bela", B(22,1,1), B_MASK, BOOKE64, { LIA } },
+
{ "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 } },
@@ -2387,6 +2773,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "ldx", X(31,21), X_MASK, PPC64, { RT, RA, RB } },
+{ "icbt", X(31,22), X_MASK, BOOKE, { CT, RA, RB } },
+
{ "lwzx", X(31,23), X_MASK, PPCCOM, { RT, RA, RB } },
{ "lx", X(31,23), X_MASK, PWRCOM, { RT, RA, RB } },
@@ -2409,6 +2797,10 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "maskg", XRC(31,29,0), X_MASK, M601, { RA, RS, RB } },
{ "maskg.", XRC(31,29,1), X_MASK, M601, { RA, RS, RB } },
+{ "icbte", X(31,30), X_MASK, BOOKE64, { CT, RA, RB } },
+
+{ "lwzxe", X(31,31), X_MASK, BOOKE64, { RT, RA, 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 } },
@@ -2430,11 +2822,15 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "lwzux", X(31,55), X_MASK, PPCCOM, { RT, RAL, RB } },
{ "lux", X(31,55), X_MASK, PWRCOM, { RT, RA, RB } },
+{ "dcbste", X(31,62), XRT_MASK, BOOKE64, { RA, RB } },
+
+{ "lwzuxe", X(31,63), X_MASK, BOOKE64, { RT, RAL, 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 } },
+{ "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 } },
@@ -2468,6 +2864,10 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "lbzx", X(31,87), X_MASK, COM, { RT, RA, RB } },
+{ "dcbfe", X(31,94), XRT_MASK, BOOKE64, { RA, RB } },
+
+{ "lbzxe", X(31,95), X_MASK, BOOKE64, { 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 } },
@@ -2489,7 +2889,12 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "not.", XRC(31,124,1), X_MASK, COM, { RA, RS, RBS } },
{ "nor.", XRC(31,124,1), X_MASK, COM, { RA, RS, RB } },
+{ "lwarxe", X(31,126), X_MASK, BOOKE64, { RT, RA, RB } },
+
+{ "lbzuxe", X(31,127), X_MASK, BOOKE64, { RT, RAL, RB } },
+
{ "wrtee", X(31,131), XRARB_MASK, PPC403, { RS } },
+{ "wrtee", X(31,131), XRARB_MASK, BOOKE, { 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 } },
@@ -2521,6 +2926,10 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "stwx", X(31,151), X_MASK, PPCCOM, { RS, RA, RB } },
{ "stx", X(31,151), X_MASK, PWRCOM, { RS, RA, RB } },
+{ "stwcxe.", XRC(31,158,1), X_MASK, BOOKE64, { RS, RA, RB } },
+
+{ "stwxe", X(31,159), X_MASK, BOOKE64, { 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 } },
@@ -2528,6 +2937,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "sle.", XRC(31,153,1), X_MASK, M601, { RA, RS, RB } },
{ "wrteei", X(31,163), XE_MASK, PPC403, { E } },
+{ "wrteei", X(31,163), XE_MASK, BOOKE, { E } },
{ "mtmsrd", X(31,178), XRARB_MASK, PPC64, { RS } },
@@ -2539,6 +2949,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "sliq", XRC(31,184,0), X_MASK, M601, { RA, RS, SH } },
{ "sliq.", XRC(31,184,1), X_MASK, M601, { RA, RS, SH } },
+{ "stwuxe", X(31,191), X_MASK, BOOKE64, { RS, RAS, RB } },
+
{ "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 } },
@@ -2561,7 +2973,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "stdcx.", XRC(31,214,1), X_MASK, PPC64, { RS, RA, RB } },
-{ "stbx", X(31,215), X_MASK, COM, { 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 } },
@@ -2569,6 +2981,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "sleq", XRC(31,217,0), X_MASK, M601, { RA, RS, RB } },
{ "sleq.", XRC(31,217,1), X_MASK, M601, { RA, RS, RB } },
+{ "stbxe", X(31,223), X_MASK, BOOKE64, { RS, RA, 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 } },
@@ -2604,13 +3018,21 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "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 } },
+{ "dcbtst", X(31,246), XRT_MASK, PPC, { CT, 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 } },
+{ "dcbtste", X(31,253), X_MASK, BOOKE64, { CT, RA, RB } },
+
+{ "stbuxe", X(31,255), X_MASK, BOOKE64, { RS, RAS, RB } },
+
+{ "mfdcrx", X(31,259), X_MASK, BOOKE, { RS, RA } },
+
+{ "icbt", X(31,262), XRT_MASK, PPC403, { RA, RB } },
+
{ "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 } },
@@ -2625,18 +3047,22 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "addo.", XO(31,266,1,1), XO_MASK, PPCCOM, { RT, RA, RB } },
{ "caxo.", XO(31,266,1,1), XO_MASK, PWRCOM, { RT, RA, RB } },
+{ "mfapidi", X(31,275), X_MASK, BOOKE, { RT, RA } },
+
{ "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 } },
+{ "dcbt", X(31,278), XRT_MASK, PPC, { CT, RA, RB } },
{ "lhzx", X(31,279), X_MASK, COM, { RT, RA, RB } },
-{ "icbt", X(31,262), XRT_MASK, PPC403, { RA, RB } },
-
{ "eqv", XRC(31,284,0), X_MASK, COM, { RA, RS, RB } },
{ "eqv.", XRC(31,284,1), X_MASK, COM, { RA, RS, RB } },
+{ "dcbte", X(31,286), X_MASK, BOOKE64, { CT, RA, RB } },
+
+{ "lhzxe", X(31,287), X_MASK, BOOKE64, { RT, RA, RB } },
+
{ "tlbie", X(31,306), XRTRA_MASK, PPC, { RB } },
{ "tlbi", X(31,306), XRT_MASK, POWER, { RA, RB } },
@@ -2647,6 +3073,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "xor", XRC(31,316,0), X_MASK, COM, { RA, RS, RB } },
{ "xor.", XRC(31,316,1), X_MASK, COM, { RA, RS, RB } },
+{ "lhzuxe", X(31,319), X_MASK, BOOKE64, { RT, RAL, 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 } },
@@ -2682,6 +3110,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "mfdmacc3", XSPR(31,323,220), XSPR_MASK, PPC403, { RT } },
{ "mfdmasr", XSPR(31,323,224), XSPR_MASK, PPC403, { RT } },
{ "mfdcr", X(31,323), X_MASK, PPC403, { RT, SPR } },
+{ "mfdcr", X(31,323), X_MASK, BOOKE, { 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 } },
@@ -2719,6 +3148,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "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 } },
+{ "mfvrsave", XSPR(31,339,256), XSPR_MASK, PPCVEC, { RT } },
{ "mfsprg4", XSPR(31,339,260), XSPR_MASK, PPC405, { RT } },
{ "mfsprg5", XSPR(31,339,261), XSPR_MASK, PPC405, { RT } },
{ "mfsprg6", XSPR(31,339,262), XSPR_MASK, PPC405, { RT } },
@@ -2822,8 +3252,16 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "lwax", X(31,341), X_MASK, PPC64, { RT, RA, RB } },
+{ "dst", XDSS(31,342,0), XDSS_MASK, PPCVEC, { RA, RB, STRM } },
+{ "dstt", XDSS(31,342,1), XDSS_MASK, PPCVEC, { RA, RB, STRM } },
+
{ "lhax", X(31,343), X_MASK, COM, { RT, RA, RB } },
+{ "lhaxe", X(31,351), X_MASK, BOOKE64, { RT, RA, RB } },
+
+{ "dstst", XDSS(31,374,0), XDSS_MASK, PPCVEC, { RA, RB, STRM } },
+{ "dststt", XDSS(31,374,1), XDSS_MASK, PPCVEC, { RA, RB, STRM } },
+
{ "dccci", X(31,454), XRT_MASK, PPC403, { RA, RB } },
{ "abs", XO(31,360,0,0), XORB_MASK, M601, { RT, RA } },
@@ -2846,6 +3284,18 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "lhaux", X(31,375), X_MASK, COM, { RT, RAL, RB } },
+{ "lhauxe", X(31,383), X_MASK, BOOKE64, { RT, RAL, RB } },
+
+{ "mtdcrx", X(31,387), X_MASK, BOOKE, { RA, RS } },
+
+{ "subfe64", XO(31,392,0,0), XO_MASK, BOOKE64, { RT, RA, RB } },
+{ "subfe64o",XO(31,392,1,0), XO_MASK, BOOKE64, { RT, RA, RB } },
+
+{ "adde64", XO(31,394,0,0), XO_MASK, BOOKE64, { RT, RA, RB } },
+{ "adde64o", XO(31,394,1,0), XO_MASK, BOOKE64, { RT, RA, RB } },
+
+{ "slbmte", X(31,402), XRA_MASK, PPC64, { RS, RB } },
+
{ "sthx", X(31,407), X_MASK, COM, { RS, RA, RB } },
{ "lfqx", X(31,791), X_MASK, POWER2, { FRT, RA, RB } },
@@ -2862,12 +3312,16 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "sradi", XS(31,413,0), XS_MASK, PPC64, { RA, RS, SH6 } },
{ "sradi.", XS(31,413,1), XS_MASK, PPC64, { RA, RS, SH6 } },
+{ "sthxe", X(31,415), X_MASK, BOOKE64, { RS, RA, RB } },
+
{ "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 } },
+{ "sthuxe", X(31,447), X_MASK, BOOKE64, { 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 } },
@@ -2908,12 +3362,19 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "mtdmacc3", XSPR(31,451,220), XSPR_MASK, PPC403, { RT } },
{ "mtdmasr", XSPR(31,451,224), XSPR_MASK, PPC403, { RT } },
{ "mtdcr", X(31,451), X_MASK, PPC403, { SPR, RS } },
+{ "mtdcr", X(31,451), X_MASK, BOOKE, { SPR, RS } },
+
+{ "subfze64",XO(31,456,0,0), XORB_MASK, BOOKE64, { RT, RA } },
+{ "subfze64o",XO(31,456,1,0), XORB_MASK, BOOKE64, { RT, RA } },
{ "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 } },
+{ "addze64", XO(31,458,0,0), XORB_MASK, BOOKE64, { RT, RA } },
+{ "addze64o",XO(31,458,1,0), XORB_MASK, BOOKE64, { RT, RA } },
+
{ "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 } },
@@ -2949,6 +3410,7 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "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 } },
+{ "mtvrsave",XSPR(31,467,256), XSPR_MASK, PPCVEC, { 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 } },
@@ -3028,11 +3490,15 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "nand", XRC(31,476,0), X_MASK, COM, { RA, RS, RB } },
{ "nand.", XRC(31,476,1), X_MASK, COM, { RA, RS, RB } },
+{ "dcbie", X(31,478), XRT_MASK, BOOKE64, { RA, RB } },
+
{ "dcread", X(31,486), X_MASK, PPC403, { RT, RA, RB }},
{ "nabs", XO(31,488,0,0), XORB_MASK, M601, { RT, RA } },
+{ "subfme64",XO(31,488,0,0), XORB_MASK, BOOKE64, { RT, RA } },
{ "nabs.", XO(31,488,0,1), XORB_MASK, M601, { RT, RA } },
{ "nabso", XO(31,488,1,0), XORB_MASK, M601, { RT, RA } },
+{ "subfme64o",XO(31,488,1,0), XORB_MASK, BOOKE64, { 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 } },
@@ -3040,6 +3506,9 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "divdo", XO(31,489,1,0), XO_MASK, PPC64, { RT, RA, RB } },
{ "divdo.", XO(31,489,1,1), XO_MASK, PPC64, { RT, RA, RB } },
+{ "addme64", XO(31,490,0,0), XORB_MASK, BOOKE64, { RT, RA } },
+{ "addme64o",XO(31,490,1,0), XORB_MASK, BOOKE64, { RT, RA } },
+
{ "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 } },
@@ -3049,8 +3518,12 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "cli", X(31,502), XRB_MASK, POWER, { RT, RA } },
+{ "stdcxe.", XRC(31,511,1), X_MASK, BOOKE64, { RS, RA, RB } },
+
{ "mcrxr", X(31,512), XRARB_MASK|(3<<21), COM, { BF } },
+{ "mcrxr64", X(31,544), XRARB_MASK|(3<<21), BOOKE, { BF } },
+
{ "clcs", X(31,531), XRB_MASK, M601, { RT, RA } },
{ "lswx", X(31,533), X_MASK, PPCCOM, { RT, RA, RB } },
@@ -3075,26 +3548,39 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "maskir", XRC(31,541,0), X_MASK, M601, { RA, RS, RB } },
{ "maskir.", XRC(31,541,1), X_MASK, M601, { RA, RS, RB } },
+{ "lwbrxe", X(31,542), X_MASK, BOOKE64, { RT, RA, RB } },
+
+{ "lfsxe", X(31,543), X_MASK, BOOKE64, { FRT, RA, RB } },
+
{ "tlbsync", X(31,566), 0xffffffff, PPC, { 0 } },
{ "lfsux", X(31,567), X_MASK, COM, { FRT, RAS, RB } },
+{ "lfsuxe", X(31,575), X_MASK, BOOKE64, { 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 } },
+{ "lwsync", XSYNC(31,598,1), 0xffffffff, PPCONLY, { 0 } },
+{ "ptesync", XSYNC(31,598,2), 0xffffffff, PPC64, { 0 } },
+{ "sync", X(31,598), XSYNC_MASK, PPCCOM, { LS } },
{ "dcs", X(31,598), 0xffffffff, PWRCOM, { 0 } },
+{ "msync", X(31,598), 0xf80007fe, BOOKE, { 0 } },
{ "lfdx", X(31,599), X_MASK, COM, { FRT, RA, RB } },
+{ "lfdxe", X(31,607), X_MASK, BOOKE64, { 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 } },
+{ "lfduxe", X(31,639), X_MASK, BOOKE64, { FRT, RAS, RB } },
+
{ "mfsrin", X(31,659), XRA_MASK, PPC32, { RT, RB } },
{ "stswx", X(31,661), X_MASK, PPCCOM, { RS, RA, RB } },
@@ -3111,11 +3597,17 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "sre", XRC(31,665,0), X_MASK, M601, { RA, RS, RB } },
{ "sre.", XRC(31,665,1), X_MASK, M601, { RA, RS, RB } },
+{ "stwbrxe", X(31,670), X_MASK, BOOKE64, { RS, RA, RB } },
+
+{ "stfsxe", X(31,671), X_MASK, BOOKE64, { FRS, RA, 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 } },
+{ "stfsuxe", X(31,703), X_MASK, BOOKE64, { FRS, RAS, RB } },
+
{ "stswi", X(31,725), X_MASK, PPCCOM, { RS, RA, NB } },
{ "stsi", X(31,725), X_MASK, PWRCOM, { RS, RA, NB } },
@@ -3127,13 +3619,23 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "sreq", XRC(31,729,0), X_MASK, M601, { RA, RS, RB } },
{ "sreq.", XRC(31,729,1), X_MASK, M601, { RA, RS, RB } },
+{ "stfdxe", X(31,735), X_MASK, BOOKE64, { FRS, RA, RB } },
+
{ "dcba", X(31,758), XRT_MASK, PPC405, { RA, RB } },
+{ "dcba", X(31,758), XRT_MASK, BOOKE, { RA, 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 } },
+{ "dcbae", X(31,766), XRT_MASK, BOOKE64, { RA, RB } },
+
+{ "stfduxe", X(31,767), X_MASK, BOOKE64, { FRS, RAS, RB } },
+
+{ "tlbivax", X(31,786), XRT_MASK, BOOKE, { RA, RB } },
+{ "tlbivaxe",X(31,787), XRT_MASK, BOOKE, { RA, RB } },
+
{ "lhbrx", X(31,790), X_MASK, COM, { RT, RA, RB } },
{ "sraw", XRC(31,792,0), X_MASK, PPCCOM, { RA, RS, RB } },
@@ -3144,17 +3646,33 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "srad", XRC(31,794,0), X_MASK, PPC64, { RA, RS, RB } },
{ "srad.", XRC(31,794,1), X_MASK, PPC64, { RA, RS, RB } },
+{ "lhbrxe", X(31,798), X_MASK, BOOKE64, { RT, RA, RB } },
+
+{ "ldxe", X(31,799), X_MASK, BOOKE64, { RT, RA, RB } },
+{ "lduxe", X(31,831), X_MASK, BOOKE64, { RT, RA, RB } },
+
{ "rac", X(31,818), X_MASK, PWRCOM, { RT, RA, RB } },
+{ "dss", XDSS(31,822,0), XDSS_MASK, PPCVEC, { STRM } },
+{ "dssall", XDSS(31,822,1), XDSS_MASK, PPCVEC, { STRM } },
+
{ "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 } },
+{ "slbmfev", X(31,851), XRA_MASK, PPC64, { RT, RB } },
+
{ "eieio", X(31,854), 0xffffffff, PPC, { 0 } },
+{ "mbar", X(31,854), 0xffffffff, BOOKE, { MO } },
+
+{ "tlbsx", XRC(31,914,0), X_MASK, PPC403, { RT, RA, RB } },
+{ "tlbsx.", XRC(31,914,1), X_MASK, PPC403, { RT, RA, RB } },
-{ "tlbsx", XRC(31,914,0), X_MASK, PPC403, { RT, RA, RB } },
-{ "tlbsx.", XRC(31,914,1), X_MASK, PPC403, { RT, RA, RB } },
+{ "tlbsx", XRC(31,914,0), X_MASK, BOOKE, { RA, RB } },
+{ "tlbsxe", XRC(31,915,0), X_MASK, BOOKE, { RA, RB } },
+
+{ "slbmfee", X(31,915), XRA_MASK, PPC64, { RT, RB } },
{ "sthbrx", X(31,918), X_MASK, COM, { RS, RA, RB } },
@@ -3169,9 +3687,14 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "extsh.", XRC(31,922,1), XRB_MASK, PPCCOM, { RA, RS } },
{ "exts.", XRC(31,922,1), XRB_MASK, PWRCOM, { RA, RS } },
+{ "sthbrxe", X(31,926), X_MASK, BOOKE64, { RS, RA, RB } },
+
+{ "stdxe", X(31,927), X_MASK, BOOKE64, { RS, RA, RB } },
+
+{ "tlbre", X(31,946), X_MASK, BOOKE, { RT, RA, SH } },
+
{ "tlbrehi", XTLB(31,946,0), XTLB_MASK, PPC403, { RT, RA } },
{ "tlbrelo", XTLB(31,946,1), XTLB_MASK, PPC403, { RT, RA } },
-{ "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 } },
@@ -3179,6 +3702,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "extsb", XRC(31,954,0), XRB_MASK, PPC, { RA, RS} },
{ "extsb.", XRC(31,954,1), XRB_MASK, PPC, { RA, RS} },
+{ "stduxe", X(31,959), X_MASK, BOOKE64, { RS, RAS, RB } },
+
{ "iccci", X(31,966), XRT_MASK, PPC403, { RA, RB } },
{ "tlbld", X(31,978), XRTRA_MASK, PPC, { RB } },
@@ -3187,6 +3712,8 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "tlbwelo", XTLB(31,978,1), XTLB_MASK, PPC403, { RT, RA } },
{ "tlbwe", X(31,978), X_MASK, PPC403, { RS, RA, SH } },
+{ "tlbwe", X(31,978), X_MASK, BOOKE, { RT, RA, SH } },
+
{ "icbi", X(31,982), XRT_MASK, PPC, { RA, RB } },
{ "stfiwx", X(31,983), X_MASK, PPC, { FRS, RA, RB } },
@@ -3196,11 +3723,16 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "icread", X(31,998), XRT_MASK, PPC403, { RA, RB } },
+{ "icbie", X(31,990), XRT_MASK, BOOKE64, { RA, RB } },
+{ "stfiwxe", X(31,991), X_MASK, BOOKE64, { FRS, 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 } },
+{ "dcbze", X(31,1022), XRT_MASK, BOOKE64, { RA, RB } },
+
{ "lvebx", X(31, 7), X_MASK, PPCVEC, { VD, RA, RB } },
{ "lvehx", X(31, 39), X_MASK, PPCVEC, { VD, RA, RB } },
{ "lvewx", X(31, 71), X_MASK, PPCVEC, { VD, RA, RB } },
@@ -3272,6 +3804,21 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "lfqu", OP(57), OP_MASK, POWER2, { FRT, D, RA } },
+{ "lbze", DEO(58,0), DE_MASK, BOOKE64, { RT, DE, RA } },
+{ "lbzue", DEO(58,1), DE_MASK, BOOKE64, { RT, DE, RAL } },
+{ "lhze", DEO(58,2), DE_MASK, BOOKE64, { RT, DE, RA } },
+{ "lhzue", DEO(58,3), DE_MASK, BOOKE64, { RT, DE, RAL } },
+{ "lhae", DEO(58,4), DE_MASK, BOOKE64, { RT, DE, RA } },
+{ "lhaue", DEO(58,5), DE_MASK, BOOKE64, { RT, DE, RAL } },
+{ "lwze", DEO(58,6), DE_MASK, BOOKE64, { RT, DE, RA } },
+{ "lwzue", DEO(58,7), DE_MASK, BOOKE64, { RT, DE, RAL } },
+{ "stbe", DEO(58,8), DE_MASK, BOOKE64, { RS, DE, RA } },
+{ "stbue", DEO(58,9), DE_MASK, BOOKE64, { RS, DE, RAS } },
+{ "sthe", DEO(58,10), DE_MASK, BOOKE64, { RS, DE, RA } },
+{ "sthue", DEO(58,11), DE_MASK, BOOKE64, { RS, DE, RAS } },
+{ "stwe", DEO(58,14), DE_MASK, BOOKE64, { RS, DE, RA } },
+{ "stwue", DEO(58,15), DE_MASK, BOOKE64, { RS, DE, RAS } },
+
{ "ld", DSO(58,0), DS_MASK, PPC64, { RT, DS, RA } },
{ "ldu", DSO(58,1), DS_MASK, PPC64, { RT, DS, RAL } },
@@ -3312,6 +3859,19 @@ const struct powerpc_opcode powerpc_opcodes[] = {
{ "stfqu", OP(61), OP_MASK, POWER2, { FRS, D, RA } },
+{ "lde", DEO(62,0), DE_MASK, BOOKE64, { RT, DES, RA } },
+{ "ldue", DEO(62,1), DE_MASK, BOOKE64, { RT, DES, RA } },
+{ "lfse", DEO(62,4), DE_MASK, BOOKE64, { FRT, DES, RA } },
+{ "lfsue", DEO(62,5), DE_MASK, BOOKE64, { FRT, DES, RAS } },
+{ "lfde", DEO(62,6), DE_MASK, BOOKE64, { FRT, DES, RA } },
+{ "lfdue", DEO(62,7), DE_MASK, BOOKE64, { FRT, DES, RAS } },
+{ "stde", DEO(62,8), DE_MASK, BOOKE64, { RS, DES, RA } },
+{ "stdue", DEO(62,9), DE_MASK, BOOKE64, { RS, DES, RAS } },
+{ "stfse", DEO(62,12), DE_MASK, BOOKE64, { FRS, DES, RA } },
+{ "stfsue", DEO(62,13), DE_MASK, BOOKE64, { FRS, DES, RAS } },
+{ "stfde", DEO(62,14), DE_MASK, BOOKE64, { FRS, DES, RA } },
+{ "stfdue", DEO(62,15), DE_MASK, BOOKE64, { FRS, DES, RAS } },
+
{ "std", DSO(62,0), DS_MASK, PPC64, { RS, DS, RA } },
{ "stdu", DSO(62,1), DS_MASK, PPC64, { RS, DS, RAS } },
diff --git a/contrib/binutils/opcodes/sh-dis.c b/contrib/binutils/opcodes/sh-dis.c
index 7091afc..ed472dc 100644
--- a/contrib/binutils/opcodes/sh-dis.c
+++ b/contrib/binutils/opcodes/sh-dis.c
@@ -1,5 +1,5 @@
/* Disassemble SH instructions.
- Copyright 1993, 1994, 1995, 1997, 1998, 2000
+ Copyright 1993, 1994, 1995, 1997, 1998, 2000, 2001
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
@@ -26,6 +26,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#define LITTLE_BIT 2
+static void print_movxy
+ PARAMS ((sh_opcode_info *, int, int, fprintf_ftype, void *));
+static void print_insn_ddt PARAMS ((int, struct disassemble_info *));
+static void print_dsp_reg PARAMS ((int, fprintf_ftype, void *));
+static void print_insn_ppi PARAMS ((int, struct disassemble_info *));
+static int print_insn_shx PARAMS ((bfd_vma, struct disassemble_info *));
+
static void
print_movxy (op, rn, rm, fprintf_fn, stream)
sh_opcode_info *op;
diff --git a/contrib/binutils/opcodes/sh-opc.h b/contrib/binutils/opcodes/sh-opc.h
index 4128c08..38ba17d 100644
--- a/contrib/binutils/opcodes/sh-opc.h
+++ b/contrib/binutils/opcodes/sh-opc.h
@@ -835,7 +835,7 @@ sh_opcode_info sh_table[] = {
/* 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 }
+{ 0, {0}, {0}, 0 }
};
#endif
diff --git a/contrib/binutils/symlink-tree b/contrib/binutils/symlink-tree
index 8f11c08..5b18cab 100755
--- a/contrib/binutils/symlink-tree
+++ b/contrib/binutils/symlink-tree
@@ -20,13 +20,13 @@ ignore_additional=". .. CVS"
# If we were invoked with a relative path name, adjust ${prog} to work
# in subdirs.
case ${prog} in
-/*) ;;
+/* | [A-Za-z]:[\\/]*) ;;
*) prog=../${prog} ;;
esac
# Set newsrcdir to something subdirectories can use.
case ${srcdir} in
-/*) newsrcdir=${srcdir} ;;
+/* | [A-Za-z]:[\\/]*) newsrcdir=${srcdir} ;;
*) newsrcdir=../${srcdir} ;;
esac
OpenPOWER on IntegriCloud